@ory/elements-react 1.0.0-next.31 → 1.0.0-next.33
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 +0 -2
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +215 -73
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +215 -73
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +17 -0
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +743 -553
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +702 -511
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -91,13 +91,15 @@ function DefaultCardContent({ children }) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// src/theme/default/components/card/footer.tsx
|
|
94
|
-
var
|
|
94
|
+
var import_client_fetch3 = require("@ory/client-fetch");
|
|
95
95
|
var import_elements_react = require("@ory/elements-react");
|
|
96
96
|
var import_react_hook_form = require("react-hook-form");
|
|
97
97
|
var import_react_intl = require("react-intl");
|
|
98
98
|
|
|
99
99
|
// src/theme/default/utils/url.ts
|
|
100
100
|
function restartFlowUrl(flow, fallback) {
|
|
101
|
+
if (flow.requested_aal === "aal2")
|
|
102
|
+
return appendRefresh(appendAal(fallback, "aal1"), true);
|
|
101
103
|
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
102
104
|
}
|
|
103
105
|
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
@@ -127,48 +129,213 @@ function appendReturnTo(url, returnTo) {
|
|
|
127
129
|
urlObj.searchParams.set("return_to", returnTo);
|
|
128
130
|
return urlObj.toString();
|
|
129
131
|
}
|
|
132
|
+
function appendAal(url, aal) {
|
|
133
|
+
const urlObj = new URL(url);
|
|
134
|
+
urlObj.searchParams.set("aal", aal);
|
|
135
|
+
return urlObj.toString();
|
|
136
|
+
}
|
|
137
|
+
function appendRefresh(url, refresh) {
|
|
138
|
+
const urlObj = new URL(url);
|
|
139
|
+
urlObj.searchParams.set("refresh", refresh ? "true" : "false");
|
|
140
|
+
return urlObj.toString();
|
|
141
|
+
}
|
|
130
142
|
|
|
131
|
-
// src/
|
|
143
|
+
// src/util/ui/index.ts
|
|
144
|
+
var import_client_fetch2 = require("@ory/client-fetch");
|
|
145
|
+
var import_react2 = require("react");
|
|
146
|
+
|
|
147
|
+
// src/context/component.tsx
|
|
148
|
+
var import_client_fetch = require("@ory/client-fetch");
|
|
149
|
+
var import_react = require("react");
|
|
132
150
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
151
|
+
var ComponentContext = (0, import_react.createContext)({
|
|
152
|
+
components: null,
|
|
153
|
+
// fine because we throw an error if it's not provided
|
|
154
|
+
nodeSorter: () => 0,
|
|
155
|
+
groupSorter: () => 0
|
|
156
|
+
});
|
|
157
|
+
function useComponents() {
|
|
158
|
+
const ctx = (0, import_react.useContext)(ComponentContext);
|
|
159
|
+
if (!ctx) {
|
|
160
|
+
throw new Error("useComponents must be used within a ComponentProvider");
|
|
161
|
+
}
|
|
162
|
+
return ctx.components;
|
|
163
|
+
}
|
|
164
|
+
var defaultGroupOrder = [
|
|
165
|
+
import_client_fetch.UiNodeGroupEnum.Default,
|
|
166
|
+
import_client_fetch.UiNodeGroupEnum.Profile,
|
|
167
|
+
import_client_fetch.UiNodeGroupEnum.Password,
|
|
168
|
+
import_client_fetch.UiNodeGroupEnum.Oidc,
|
|
169
|
+
import_client_fetch.UiNodeGroupEnum.Code,
|
|
170
|
+
import_client_fetch.UiNodeGroupEnum.LookupSecret,
|
|
171
|
+
import_client_fetch.UiNodeGroupEnum.Passkey,
|
|
172
|
+
import_client_fetch.UiNodeGroupEnum.Webauthn,
|
|
173
|
+
import_client_fetch.UiNodeGroupEnum.Totp
|
|
174
|
+
];
|
|
175
|
+
|
|
176
|
+
// src/util/ui/index.ts
|
|
177
|
+
function triggerToWindowCall(trigger) {
|
|
178
|
+
if (!trigger) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const fn = triggerToFunction(trigger);
|
|
182
|
+
if (fn) {
|
|
183
|
+
fn();
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
let i = 0;
|
|
187
|
+
const ms = 100;
|
|
188
|
+
const interval = setInterval(() => {
|
|
189
|
+
i++;
|
|
190
|
+
if (i > 100) {
|
|
191
|
+
clearInterval(interval);
|
|
192
|
+
throw new Error(
|
|
193
|
+
"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."
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
const fn2 = triggerToFunction(trigger);
|
|
197
|
+
if (fn2) {
|
|
198
|
+
clearInterval(interval);
|
|
199
|
+
return fn2();
|
|
200
|
+
}
|
|
201
|
+
}, ms);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
function triggerToFunction(trigger) {
|
|
205
|
+
if (typeof window === "undefined") {
|
|
206
|
+
console.debug(
|
|
207
|
+
"The Ory SDK is missing a required function: window is undefined."
|
|
208
|
+
);
|
|
209
|
+
return void 0;
|
|
210
|
+
}
|
|
211
|
+
const typedWindow = window;
|
|
212
|
+
if (!(trigger in typedWindow) || !typedWindow[trigger]) {
|
|
213
|
+
console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
|
|
214
|
+
return void 0;
|
|
215
|
+
}
|
|
216
|
+
const triggerFn = typedWindow[trigger];
|
|
217
|
+
if (typeof triggerFn !== "function") {
|
|
218
|
+
console.debug(
|
|
219
|
+
`The Ory SDK is missing a required function: ${trigger}. It is not a function.`
|
|
220
|
+
);
|
|
221
|
+
return void 0;
|
|
222
|
+
}
|
|
223
|
+
return triggerFn;
|
|
224
|
+
}
|
|
225
|
+
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
226
|
+
var _a;
|
|
227
|
+
const groups = {};
|
|
228
|
+
for (const node of nodes) {
|
|
229
|
+
if (node.type === "script") {
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
const groupNodes = (_a = groups[node.group]) != null ? _a : [];
|
|
233
|
+
groupNodes.push(node);
|
|
234
|
+
groups[node.group] = groupNodes;
|
|
235
|
+
}
|
|
236
|
+
return Object.values(import_client_fetch2.UiNodeGroupEnum).filter((group) => {
|
|
237
|
+
var _a2;
|
|
238
|
+
return (_a2 = groups[group]) == null ? void 0 : _a2.length;
|
|
239
|
+
}).filter(
|
|
240
|
+
(group) => ![
|
|
241
|
+
import_client_fetch2.UiNodeGroupEnum.Default,
|
|
242
|
+
import_client_fetch2.UiNodeGroupEnum.IdentifierFirst,
|
|
243
|
+
import_client_fetch2.UiNodeGroupEnum.Profile,
|
|
244
|
+
import_client_fetch2.UiNodeGroupEnum.Captcha,
|
|
245
|
+
...excludeAuthMethods
|
|
246
|
+
].includes(group)
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// src/theme/default/components/card/footer.tsx
|
|
251
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
133
252
|
function DefaultCardFooter() {
|
|
134
253
|
const { flowType } = (0, import_elements_react.useOryFlow)();
|
|
135
254
|
switch (flowType) {
|
|
136
|
-
case
|
|
137
|
-
return /* @__PURE__ */ (0,
|
|
138
|
-
case
|
|
139
|
-
return /* @__PURE__ */ (0,
|
|
140
|
-
case
|
|
141
|
-
return /* @__PURE__ */ (0,
|
|
142
|
-
case
|
|
143
|
-
return /* @__PURE__ */ (0,
|
|
255
|
+
case import_client_fetch3.FlowType.Login:
|
|
256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LoginCardFooter, {});
|
|
257
|
+
case import_client_fetch3.FlowType.Registration:
|
|
258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RegistrationCardFooter, {});
|
|
259
|
+
case import_client_fetch3.FlowType.Recovery:
|
|
260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecoveryCardFooter, {});
|
|
261
|
+
case import_client_fetch3.FlowType.Verification:
|
|
262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(VerificationCardFooter, {});
|
|
144
263
|
default:
|
|
145
264
|
return null;
|
|
146
265
|
}
|
|
147
266
|
}
|
|
148
267
|
function LoginCardFooter() {
|
|
149
|
-
const { config, formState, flow } = (0, import_elements_react.useOryFlow)();
|
|
268
|
+
const { config, formState, flow, flowType } = (0, import_elements_react.useOryFlow)();
|
|
150
269
|
const intl = (0, import_react_intl.useIntl)();
|
|
151
|
-
|
|
270
|
+
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
271
|
+
if (flowType === import_client_fetch3.FlowType.Login && flow.refresh) {
|
|
152
272
|
return null;
|
|
153
273
|
}
|
|
154
|
-
return /* @__PURE__ */ (0,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
275
|
+
formState.current === "provide_identifier" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
276
|
+
intl.formatMessage({
|
|
277
|
+
id: "login.registration-label",
|
|
278
|
+
defaultMessage: "No account?"
|
|
279
|
+
}),
|
|
280
|
+
" ",
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
282
|
+
"a",
|
|
283
|
+
{
|
|
284
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
285
|
+
href: initFlowUrl(config.sdk.url, "registration", flow),
|
|
286
|
+
"data-testid": "ory/screen/registration/action/login",
|
|
287
|
+
children: intl.formatMessage({
|
|
288
|
+
id: "login.registration-button",
|
|
289
|
+
defaultMessage: "Sign up"
|
|
290
|
+
})
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
] }),
|
|
294
|
+
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
161
295
|
"a",
|
|
162
296
|
{
|
|
163
297
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
164
|
-
href:
|
|
165
|
-
"data-testid": "ory/screen/
|
|
298
|
+
href: "",
|
|
299
|
+
"data-testid": "ory/screen/login/mfa/action/selectMethod",
|
|
166
300
|
children: intl.formatMessage({
|
|
167
|
-
id: "login.
|
|
168
|
-
defaultMessage: "Sign up"
|
|
301
|
+
id: "login.2fa.method.go-back"
|
|
169
302
|
})
|
|
170
303
|
}
|
|
171
|
-
)
|
|
304
|
+
) }),
|
|
305
|
+
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
306
|
+
"a",
|
|
307
|
+
{
|
|
308
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
309
|
+
href: restartFlowUrl(
|
|
310
|
+
flow,
|
|
311
|
+
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
312
|
+
),
|
|
313
|
+
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
314
|
+
children: intl.formatMessage({
|
|
315
|
+
id: "login.2fa.go-back.link"
|
|
316
|
+
})
|
|
317
|
+
}
|
|
318
|
+
) }),
|
|
319
|
+
flowType === import_client_fetch3.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
320
|
+
intl.formatMessage({
|
|
321
|
+
id: "login.2fa.go-back"
|
|
322
|
+
}),
|
|
323
|
+
" ",
|
|
324
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
325
|
+
"a",
|
|
326
|
+
{
|
|
327
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
328
|
+
href: restartFlowUrl(
|
|
329
|
+
flow,
|
|
330
|
+
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
331
|
+
),
|
|
332
|
+
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
333
|
+
children: intl.formatMessage({
|
|
334
|
+
id: "login.2fa.go-back.link"
|
|
335
|
+
})
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
] })
|
|
172
339
|
] });
|
|
173
340
|
}
|
|
174
341
|
function findScreenSelectionButton(nodes) {
|
|
@@ -193,7 +360,7 @@ function RegistrationCardFooter() {
|
|
|
193
360
|
);
|
|
194
361
|
}
|
|
195
362
|
}
|
|
196
|
-
return /* @__PURE__ */ (0,
|
|
363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
197
364
|
"button",
|
|
198
365
|
{
|
|
199
366
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
@@ -206,13 +373,13 @@ function RegistrationCardFooter() {
|
|
|
206
373
|
defaultMessage: "Select another method"
|
|
207
374
|
})
|
|
208
375
|
}
|
|
209
|
-
) }) : /* @__PURE__ */ (0,
|
|
376
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
210
377
|
intl.formatMessage({
|
|
211
378
|
id: "registration.login-label",
|
|
212
379
|
defaultMessage: "Already have an account?"
|
|
213
380
|
}),
|
|
214
381
|
" ",
|
|
215
|
-
/* @__PURE__ */ (0,
|
|
382
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
216
383
|
"a",
|
|
217
384
|
{
|
|
218
385
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -237,7 +404,7 @@ function VerificationCardFooter() {
|
|
|
237
404
|
var import_elements_react3 = require("@ory/elements-react");
|
|
238
405
|
|
|
239
406
|
// src/theme/default/utils/constructCardHeader.ts
|
|
240
|
-
var
|
|
407
|
+
var import_client_fetch4 = require("@ory/client-fetch");
|
|
241
408
|
var import_react_intl2 = require("react-intl");
|
|
242
409
|
function joinWithCommaOr(list, orText = "or") {
|
|
243
410
|
if (list.length === 0) {
|
|
@@ -250,11 +417,11 @@ function joinWithCommaOr(list, orText = "or") {
|
|
|
250
417
|
}
|
|
251
418
|
}
|
|
252
419
|
function useCardHeaderText(container, opts) {
|
|
253
|
-
var _a, _b;
|
|
420
|
+
var _a, _b, _c;
|
|
254
421
|
const nodes = container.nodes;
|
|
255
422
|
const intl = (0, import_react_intl2.useIntl)();
|
|
256
423
|
switch (opts.flowType) {
|
|
257
|
-
case
|
|
424
|
+
case import_client_fetch4.FlowType.Recovery:
|
|
258
425
|
if (nodes.find(
|
|
259
426
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
260
427
|
)) {
|
|
@@ -275,7 +442,7 @@ function useCardHeaderText(container, opts) {
|
|
|
275
442
|
id: "recovery.subtitle"
|
|
276
443
|
})
|
|
277
444
|
};
|
|
278
|
-
case
|
|
445
|
+
case import_client_fetch4.FlowType.Settings:
|
|
279
446
|
return {
|
|
280
447
|
title: intl.formatMessage({
|
|
281
448
|
id: "settings.title"
|
|
@@ -284,7 +451,7 @@ function useCardHeaderText(container, opts) {
|
|
|
284
451
|
id: "settings.subtitle"
|
|
285
452
|
})
|
|
286
453
|
};
|
|
287
|
-
case
|
|
454
|
+
case import_client_fetch4.FlowType.Verification:
|
|
288
455
|
if (nodes.find(
|
|
289
456
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
290
457
|
)) {
|
|
@@ -305,7 +472,7 @@ function useCardHeaderText(container, opts) {
|
|
|
305
472
|
id: "verification.subtitle"
|
|
306
473
|
})
|
|
307
474
|
};
|
|
308
|
-
case
|
|
475
|
+
case import_client_fetch4.FlowType.Login: {
|
|
309
476
|
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
310
477
|
(m) => m.id === 1010016
|
|
311
478
|
);
|
|
@@ -327,7 +494,7 @@ function useCardHeaderText(container, opts) {
|
|
|
327
494
|
const parts = [];
|
|
328
495
|
if (nodes.find((node) => node.group === "password")) {
|
|
329
496
|
switch (opts.flowType) {
|
|
330
|
-
case
|
|
497
|
+
case import_client_fetch4.FlowType.Registration:
|
|
331
498
|
parts.push(
|
|
332
499
|
intl.formatMessage(
|
|
333
500
|
{ id: "card.header.parts.password.registration" },
|
|
@@ -364,7 +531,7 @@ function useCardHeaderText(container, opts) {
|
|
|
364
531
|
}
|
|
365
532
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
366
533
|
const identifier = nodes.find(
|
|
367
|
-
(node) => (0,
|
|
534
|
+
(node) => (0, import_client_fetch4.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
368
535
|
);
|
|
369
536
|
if (identifier) {
|
|
370
537
|
parts.push(
|
|
@@ -380,7 +547,7 @@ function useCardHeaderText(container, opts) {
|
|
|
380
547
|
}
|
|
381
548
|
}
|
|
382
549
|
switch (opts.flowType) {
|
|
383
|
-
case
|
|
550
|
+
case import_client_fetch4.FlowType.Login:
|
|
384
551
|
if (opts.flow.refresh) {
|
|
385
552
|
return {
|
|
386
553
|
title: intl.formatMessage({
|
|
@@ -395,6 +562,15 @@ function useCardHeaderText(container, opts) {
|
|
|
395
562
|
}
|
|
396
563
|
)
|
|
397
564
|
};
|
|
565
|
+
} else if (opts.flow.requested_aal === "aal2") {
|
|
566
|
+
return {
|
|
567
|
+
title: intl.formatMessage({
|
|
568
|
+
id: "login.title-aal2"
|
|
569
|
+
}),
|
|
570
|
+
description: intl.formatMessage({
|
|
571
|
+
id: ((_c = opts.formState) == null ? void 0 : _c.current) === "method_active" ? `login.${opts.formState.method}.subtitle` : "login.subtitle-aal2"
|
|
572
|
+
})
|
|
573
|
+
};
|
|
398
574
|
}
|
|
399
575
|
return {
|
|
400
576
|
title: intl.formatMessage({
|
|
@@ -412,7 +588,7 @@ function useCardHeaderText(container, opts) {
|
|
|
412
588
|
}
|
|
413
589
|
) : ""
|
|
414
590
|
};
|
|
415
|
-
case
|
|
591
|
+
case import_client_fetch4.FlowType.Registration:
|
|
416
592
|
return {
|
|
417
593
|
title: intl.formatMessage({
|
|
418
594
|
id: "registration.title"
|
|
@@ -437,15 +613,15 @@ function useCardHeaderText(container, opts) {
|
|
|
437
613
|
}
|
|
438
614
|
|
|
439
615
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
440
|
-
var
|
|
616
|
+
var import_client_fetch5 = require("@ory/client-fetch");
|
|
441
617
|
var import_elements_react2 = require("@ory/elements-react");
|
|
442
618
|
|
|
443
619
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
444
620
|
var React3 = __toESM(require("react"));
|
|
445
|
-
var
|
|
621
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
446
622
|
var SvgArrowLeft = (props) => {
|
|
447
623
|
var _a, _b;
|
|
448
|
-
return /* @__PURE__ */ (0,
|
|
624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("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__ */ (0, import_jsx_runtime6.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
449
625
|
};
|
|
450
626
|
var arrow_left_default = SvgArrowLeft;
|
|
451
627
|
|
|
@@ -459,13 +635,16 @@ function omit(obj, keys) {
|
|
|
459
635
|
}
|
|
460
636
|
|
|
461
637
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
462
|
-
var
|
|
638
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
463
639
|
function DefaultCurrentIdentifierButton() {
|
|
464
640
|
const { flow, flowType, config, formState } = (0, import_elements_react2.useOryFlow)();
|
|
465
641
|
const ui = flow.ui;
|
|
466
642
|
if (formState.current === "provide_identifier") {
|
|
467
643
|
return null;
|
|
468
644
|
}
|
|
645
|
+
if (flowType === import_client_fetch5.FlowType.Login && flow.requested_aal === "aal2") {
|
|
646
|
+
return null;
|
|
647
|
+
}
|
|
469
648
|
const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
|
|
470
649
|
if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
|
|
471
650
|
return null;
|
|
@@ -479,7 +658,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
479
658
|
"node_type",
|
|
480
659
|
"maxlength"
|
|
481
660
|
]);
|
|
482
|
-
return /* @__PURE__ */ (0,
|
|
661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
483
662
|
"a",
|
|
484
663
|
{
|
|
485
664
|
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",
|
|
@@ -487,8 +666,8 @@ function DefaultCurrentIdentifierButton() {
|
|
|
487
666
|
href: initFlowUrl2,
|
|
488
667
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
|
|
489
668
|
"data-testid": "ory/screen/login/action/restart",
|
|
490
|
-
children: /* @__PURE__ */ (0,
|
|
491
|
-
/* @__PURE__ */ (0,
|
|
669
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
670
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
492
671
|
arrow_left_default,
|
|
493
672
|
{
|
|
494
673
|
size: 16,
|
|
@@ -496,7 +675,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
496
675
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
497
676
|
}
|
|
498
677
|
),
|
|
499
|
-
/* @__PURE__ */ (0,
|
|
678
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.attributes.value })
|
|
500
679
|
] })
|
|
501
680
|
}
|
|
502
681
|
);
|
|
@@ -504,16 +683,16 @@ function DefaultCurrentIdentifierButton() {
|
|
|
504
683
|
function getBackButtonNode(flowType, nodes) {
|
|
505
684
|
let nodeBackButton;
|
|
506
685
|
switch (flowType) {
|
|
507
|
-
case
|
|
686
|
+
case import_client_fetch5.FlowType.Login:
|
|
508
687
|
nodeBackButton = nodes.find(
|
|
509
688
|
(node) => "name" in node.attributes && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
510
689
|
);
|
|
511
690
|
break;
|
|
512
|
-
case
|
|
691
|
+
case import_client_fetch5.FlowType.Registration:
|
|
513
692
|
nodeBackButton = guessRegistrationBackButton(nodes);
|
|
514
693
|
break;
|
|
515
|
-
case
|
|
516
|
-
case
|
|
694
|
+
case import_client_fetch5.FlowType.Recovery:
|
|
695
|
+
case import_client_fetch5.FlowType.Verification:
|
|
517
696
|
nodeBackButton = nodes.find(
|
|
518
697
|
(n) => "name" in n.attributes && n.attributes.name === "email"
|
|
519
698
|
);
|
|
@@ -533,47 +712,47 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
533
712
|
}
|
|
534
713
|
|
|
535
714
|
// src/theme/default/components/card/header.tsx
|
|
536
|
-
var
|
|
715
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
537
716
|
function InnerCardHeader({ title, text }) {
|
|
538
717
|
const { Card } = (0, import_elements_react3.useComponents)();
|
|
539
|
-
return /* @__PURE__ */ (0,
|
|
540
|
-
/* @__PURE__ */ (0,
|
|
541
|
-
/* @__PURE__ */ (0,
|
|
542
|
-
/* @__PURE__ */ (0,
|
|
543
|
-
/* @__PURE__ */ (0,
|
|
544
|
-
/* @__PURE__ */ (0,
|
|
718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
719
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Card.Logo, {}),
|
|
720
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
721
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
722
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: text }),
|
|
723
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DefaultCurrentIdentifierButton, {})
|
|
545
724
|
] })
|
|
546
725
|
] });
|
|
547
726
|
}
|
|
548
727
|
function DefaultCardHeader() {
|
|
549
728
|
const context = (0, import_elements_react3.useOryFlow)();
|
|
550
729
|
const { title, description } = useCardHeaderText(context.flow.ui, context);
|
|
551
|
-
return /* @__PURE__ */ (0,
|
|
730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(InnerCardHeader, { title, text: description });
|
|
552
731
|
}
|
|
553
732
|
|
|
554
733
|
// src/theme/default/components/card/logo.tsx
|
|
555
734
|
var import_elements_react4 = require("@ory/elements-react");
|
|
556
|
-
var
|
|
735
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
557
736
|
function DefaultCardLogo() {
|
|
558
737
|
const flow = (0, import_elements_react4.useOryFlow)();
|
|
559
738
|
if (flow.config.logoUrl) {
|
|
560
|
-
return /* @__PURE__ */ (0,
|
|
739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
561
740
|
}
|
|
562
|
-
return /* @__PURE__ */ (0,
|
|
741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: flow.config.name });
|
|
563
742
|
}
|
|
564
743
|
|
|
565
744
|
// src/theme/default/components/card/layout.tsx
|
|
566
|
-
var
|
|
745
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
567
746
|
function DefaultCardLayout({ children }) {
|
|
568
|
-
return /* @__PURE__ */ (0,
|
|
747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
569
748
|
}
|
|
570
749
|
|
|
571
750
|
// src/theme/default/components/card/index.tsx
|
|
572
|
-
var
|
|
751
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
573
752
|
function DefaultCard({ children }) {
|
|
574
|
-
return /* @__PURE__ */ (0,
|
|
753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex flex-1 sm:items-center justify-center font-sans items-start w-full sm:w-[480px] sm:max-w-[480px]", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative grid grid-cols-1 gap-8 sm:rounded-cards sm:border border-form-border-default bg-form-background-default px-8 py-12 sm:px-12 sm:py-14 border-b w-full", children: [
|
|
575
754
|
children,
|
|
576
|
-
/* @__PURE__ */ (0,
|
|
755
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Badge, {})
|
|
577
756
|
] }) });
|
|
578
757
|
}
|
|
579
758
|
|
|
@@ -587,56 +766,56 @@ function cn(...inputs) {
|
|
|
587
766
|
// src/theme/default/components/form/index.tsx
|
|
588
767
|
var import_react_intl4 = require("react-intl");
|
|
589
768
|
var import_elements_react6 = require("@ory/elements-react");
|
|
590
|
-
var
|
|
769
|
+
var import_client_fetch6 = require("@ory/client-fetch");
|
|
591
770
|
|
|
592
771
|
// src/theme/default/components/form/social.tsx
|
|
593
772
|
var import_elements_react5 = require("@ory/elements-react");
|
|
594
|
-
var
|
|
773
|
+
var import_react3 = require("react");
|
|
595
774
|
var import_react_hook_form2 = require("react-hook-form");
|
|
596
775
|
var import_react_intl3 = require("react-intl");
|
|
597
776
|
var import_usehooks_ts = require("usehooks-ts");
|
|
598
777
|
|
|
599
778
|
// src/theme/default/provider-logos/apple.svg
|
|
600
779
|
var React4 = __toESM(require("react"));
|
|
601
|
-
var
|
|
780
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
602
781
|
var SvgApple = (props) => {
|
|
603
782
|
var _a, _b;
|
|
604
|
-
return /* @__PURE__ */ (0,
|
|
783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { fill: "#283544", d: "M27.734 11.55c-.134.078-3.317 1.724-3.317 5.374.15 4.162 4.017 5.621 4.083 5.621-.066.078-.584 1.988-2.116 3.991C25.167 28.261 23.817 30 21.767 30c-1.95 0-2.65-1.15-4.9-1.15-2.416 0-3.1 1.15-4.95 1.15-2.05 0-3.5-1.832-4.782-3.541-1.667-2.236-3.083-5.746-3.133-9.116-.034-1.786.334-3.54 1.266-5.032 1.317-2.081 3.667-3.494 6.233-3.54 1.966-.063 3.716 1.257 4.916 1.257 1.15 0 3.3-1.258 5.733-1.258 1.05.001 3.85.296 5.584 2.78M16.25 8.414c-.35-1.631.616-3.262 1.516-4.302C18.917 2.854 20.734 2 22.3 2c.1 1.63-.534 3.23-1.666 4.395-1.017 1.258-2.767 2.205-4.383 2.019" }) });
|
|
605
784
|
};
|
|
606
785
|
var apple_default = SvgApple;
|
|
607
786
|
|
|
608
787
|
// src/theme/default/provider-logos/auth0.svg
|
|
609
788
|
var React5 = __toESM(require("react"));
|
|
610
|
-
var
|
|
789
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
611
790
|
var SvgAuth0 = (props) => {
|
|
612
791
|
var _a, _b;
|
|
613
|
-
return /* @__PURE__ */ (0,
|
|
792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
|
|
614
793
|
};
|
|
615
794
|
var auth0_default = SvgAuth0;
|
|
616
795
|
|
|
617
796
|
// src/theme/default/provider-logos/discord.svg
|
|
618
797
|
var React6 = __toESM(require("react"));
|
|
619
|
-
var
|
|
798
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
620
799
|
var SvgDiscord = (props) => {
|
|
621
800
|
var _a, _b;
|
|
622
|
-
return /* @__PURE__ */ (0,
|
|
623
|
-
/* @__PURE__ */ (0,
|
|
624
|
-
/* @__PURE__ */ (0,
|
|
801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
802
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
803
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
|
|
625
804
|
] });
|
|
626
805
|
};
|
|
627
806
|
var discord_default = SvgDiscord;
|
|
628
807
|
|
|
629
808
|
// src/theme/default/provider-logos/facebook.svg
|
|
630
809
|
var React7 = __toESM(require("react"));
|
|
631
|
-
var
|
|
810
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
632
811
|
var SvgFacebook = (props) => {
|
|
633
812
|
var _a, _b;
|
|
634
|
-
return /* @__PURE__ */ (0,
|
|
635
|
-
/* @__PURE__ */ (0,
|
|
636
|
-
/* @__PURE__ */ (0,
|
|
637
|
-
/* @__PURE__ */ (0,
|
|
638
|
-
/* @__PURE__ */ (0,
|
|
639
|
-
/* @__PURE__ */ (0,
|
|
813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
814
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
815
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
817
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { stopColor: "#18ACFE" }),
|
|
818
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("stop", { offset: 1, stopColor: "#0163E0" })
|
|
640
819
|
] }) })
|
|
641
820
|
] });
|
|
642
821
|
};
|
|
@@ -644,124 +823,124 @@ var facebook_default = SvgFacebook;
|
|
|
644
823
|
|
|
645
824
|
// src/theme/default/provider-logos/generic.svg
|
|
646
825
|
var React8 = __toESM(require("react"));
|
|
647
|
-
var
|
|
826
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
648
827
|
var SvgGeneric = (props) => {
|
|
649
828
|
var _a, _b;
|
|
650
|
-
return /* @__PURE__ */ (0,
|
|
651
|
-
/* @__PURE__ */ (0,
|
|
652
|
-
/* @__PURE__ */ (0,
|
|
653
|
-
/* @__PURE__ */ (0,
|
|
829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, className: "generic_svg__icon generic_svg__icon-tabler generic_svg__icon-tabler-brand-oauth", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
830
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
831
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
832
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M12.556 6c.65 0 1.235.373 1.508.947l2.839 7.848a1.646 1.646 0 0 1-1.01 2.108 1.673 1.673 0 0 1-2.068-.851L13.365 15h-2.73l-.398.905A1.67 1.67 0 0 1 8.26 16.95l-.153-.047a1.647 1.647 0 0 1-1.056-1.956l2.824-7.852a1.66 1.66 0 0 1 1.409-1.087z" })
|
|
654
833
|
] });
|
|
655
834
|
};
|
|
656
835
|
var generic_default = SvgGeneric;
|
|
657
836
|
|
|
658
837
|
// src/theme/default/provider-logos/github.svg
|
|
659
838
|
var React9 = __toESM(require("react"));
|
|
660
|
-
var
|
|
839
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
661
840
|
var SvgGithub = (props) => {
|
|
662
841
|
var _a, _b;
|
|
663
|
-
return /* @__PURE__ */ (0,
|
|
842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
664
843
|
};
|
|
665
844
|
var github_default = SvgGithub;
|
|
666
845
|
|
|
667
846
|
// src/theme/default/provider-logos/gitlab.svg
|
|
668
847
|
var React10 = __toESM(require("react"));
|
|
669
|
-
var
|
|
848
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
670
849
|
var SvgGitlab = (props) => {
|
|
671
850
|
var _a, _b;
|
|
672
|
-
return /* @__PURE__ */ (0,
|
|
673
|
-
/* @__PURE__ */ (0,
|
|
674
|
-
/* @__PURE__ */ (0,
|
|
675
|
-
/* @__PURE__ */ (0,
|
|
676
|
-
/* @__PURE__ */ (0,
|
|
851
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
677
856
|
] });
|
|
678
857
|
};
|
|
679
858
|
var gitlab_default = SvgGitlab;
|
|
680
859
|
|
|
681
860
|
// src/theme/default/provider-logos/google.svg
|
|
682
861
|
var React11 = __toESM(require("react"));
|
|
683
|
-
var
|
|
862
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
684
863
|
var SvgGoogle = (props) => {
|
|
685
864
|
var _a, _b;
|
|
686
|
-
return /* @__PURE__ */ (0,
|
|
687
|
-
/* @__PURE__ */ (0,
|
|
688
|
-
/* @__PURE__ */ (0,
|
|
689
|
-
/* @__PURE__ */ (0,
|
|
690
|
-
/* @__PURE__ */ (0,
|
|
865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
|
|
867
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
|
|
691
870
|
] });
|
|
692
871
|
};
|
|
693
872
|
var google_default = SvgGoogle;
|
|
694
873
|
|
|
695
874
|
// src/theme/default/provider-logos/linkedin.svg
|
|
696
875
|
var React12 = __toESM(require("react"));
|
|
697
|
-
var
|
|
876
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
698
877
|
var SvgLinkedin = (props) => {
|
|
699
878
|
var _a, _b;
|
|
700
|
-
return /* @__PURE__ */ (0,
|
|
701
|
-
/* @__PURE__ */ (0,
|
|
702
|
-
/* @__PURE__ */ (0,
|
|
879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
880
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
881
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
703
882
|
] });
|
|
704
883
|
};
|
|
705
884
|
var linkedin_default = SvgLinkedin;
|
|
706
885
|
|
|
707
886
|
// src/theme/default/provider-logos/microsoft.svg
|
|
708
887
|
var React13 = __toESM(require("react"));
|
|
709
|
-
var
|
|
888
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
710
889
|
var SvgMicrosoft = (props) => {
|
|
711
890
|
var _a, _b;
|
|
712
|
-
return /* @__PURE__ */ (0,
|
|
713
|
-
/* @__PURE__ */ (0,
|
|
714
|
-
/* @__PURE__ */ (0,
|
|
715
|
-
/* @__PURE__ */ (0,
|
|
716
|
-
/* @__PURE__ */ (0,
|
|
891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
893
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
894
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
717
896
|
] });
|
|
718
897
|
};
|
|
719
898
|
var microsoft_default = SvgMicrosoft;
|
|
720
899
|
|
|
721
900
|
// src/theme/default/provider-logos/slack.svg
|
|
722
901
|
var React14 = __toESM(require("react"));
|
|
723
|
-
var
|
|
902
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
724
903
|
var SvgSlack = (props) => {
|
|
725
904
|
var _a, _b;
|
|
726
|
-
return /* @__PURE__ */ (0,
|
|
727
|
-
/* @__PURE__ */ (0,
|
|
728
|
-
/* @__PURE__ */ (0,
|
|
729
|
-
/* @__PURE__ */ (0,
|
|
730
|
-
/* @__PURE__ */ (0,
|
|
905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
731
910
|
] });
|
|
732
911
|
};
|
|
733
912
|
var slack_default = SvgSlack;
|
|
734
913
|
|
|
735
914
|
// src/theme/default/provider-logos/spotify.svg
|
|
736
915
|
var React15 = __toESM(require("react"));
|
|
737
|
-
var
|
|
916
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
738
917
|
var SvgSpotify = (props) => {
|
|
739
918
|
var _a, _b;
|
|
740
|
-
return /* @__PURE__ */ (0,
|
|
741
|
-
/* @__PURE__ */ (0,
|
|
742
|
-
/* @__PURE__ */ (0,
|
|
919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
743
922
|
] });
|
|
744
923
|
};
|
|
745
924
|
var spotify_default = SvgSpotify;
|
|
746
925
|
|
|
747
926
|
// src/theme/default/provider-logos/yandex.svg
|
|
748
927
|
var React16 = __toESM(require("react"));
|
|
749
|
-
var
|
|
928
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
750
929
|
var SvgYandex = (props) => {
|
|
751
930
|
var _a, _b;
|
|
752
|
-
return /* @__PURE__ */ (0,
|
|
753
|
-
/* @__PURE__ */ (0,
|
|
754
|
-
/* @__PURE__ */ (0,
|
|
931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
933
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
755
934
|
] });
|
|
756
935
|
};
|
|
757
936
|
var yandex_default = SvgYandex;
|
|
758
937
|
|
|
759
938
|
// src/theme/default/provider-logos/x.svg
|
|
760
939
|
var React17 = __toESM(require("react"));
|
|
761
|
-
var
|
|
940
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
762
941
|
var SvgX = (props) => {
|
|
763
942
|
var _a, _b;
|
|
764
|
-
return /* @__PURE__ */ (0,
|
|
943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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" }) });
|
|
765
944
|
};
|
|
766
945
|
var x_default = SvgX;
|
|
767
946
|
|
|
@@ -785,9 +964,9 @@ var logos = {
|
|
|
785
964
|
var provider_logos_default = logos;
|
|
786
965
|
|
|
787
966
|
// src/theme/default/components/form/spinner.tsx
|
|
788
|
-
var
|
|
967
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
789
968
|
function Spinner({ className }) {
|
|
790
|
-
return /* @__PURE__ */ (0,
|
|
969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
791
970
|
"svg",
|
|
792
971
|
{
|
|
793
972
|
"aria-hidden": "true",
|
|
@@ -800,7 +979,7 @@ function Spinner({ className }) {
|
|
|
800
979
|
fill: "none",
|
|
801
980
|
xmlns: "http://www.w3.org/2000/svg",
|
|
802
981
|
children: [
|
|
803
|
-
/* @__PURE__ */ (0,
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
804
983
|
"path",
|
|
805
984
|
{
|
|
806
985
|
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",
|
|
@@ -809,7 +988,7 @@ function Spinner({ className }) {
|
|
|
809
988
|
strokeLinejoin: "round"
|
|
810
989
|
}
|
|
811
990
|
) }),
|
|
812
|
-
/* @__PURE__ */ (0,
|
|
991
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
813
992
|
"rect",
|
|
814
993
|
{
|
|
815
994
|
width: "24",
|
|
@@ -824,7 +1003,7 @@ function Spinner({ className }) {
|
|
|
824
1003
|
}
|
|
825
1004
|
|
|
826
1005
|
// src/theme/default/components/form/social.tsx
|
|
827
|
-
var
|
|
1006
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
828
1007
|
function extractProvider(context) {
|
|
829
1008
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
830
1009
|
return context.provider;
|
|
@@ -862,12 +1041,12 @@ function DefaultButtonSocial({
|
|
|
862
1041
|
onClick == null ? void 0 : onClick();
|
|
863
1042
|
setClicked(true);
|
|
864
1043
|
};
|
|
865
|
-
(0,
|
|
1044
|
+
(0, import_react3.useEffect)(() => {
|
|
866
1045
|
if (!isSubmitting) {
|
|
867
1046
|
setClicked(false);
|
|
868
1047
|
}
|
|
869
1048
|
}, [isSubmitting, setClicked]);
|
|
870
|
-
return /* @__PURE__ */ (0,
|
|
1049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
871
1050
|
"button",
|
|
872
1051
|
{
|
|
873
1052
|
className: "gap-3 border border-button-social-border-default bg-button-social-background-default hover:bg-button-social-background-hover transition-colors rounded-buttons flex items-center justify-center px-4 py-[13px] loading:bg-button-social-background-disabled loading:border-button-social-border-disabled loading:text-button-social-foreground-disabled hover:text-button-social-foreground-hover",
|
|
@@ -880,21 +1059,21 @@ function DefaultButtonSocial({
|
|
|
880
1059
|
"data-loading": clicked,
|
|
881
1060
|
disabled: isSubmitting,
|
|
882
1061
|
children: [
|
|
883
|
-
/* @__PURE__ */ (0,
|
|
884
|
-
showLabel && node.meta.label ? /* @__PURE__ */ (0,
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
886
|
-
/* @__PURE__ */ (0,
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Spinner, { className: "size-5" }) }),
|
|
1063
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
|
|
1064
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) }),
|
|
1065
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-5 block" })
|
|
887
1066
|
] }) : null
|
|
888
1067
|
]
|
|
889
1068
|
}
|
|
890
1069
|
);
|
|
891
1070
|
}
|
|
892
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0,
|
|
1071
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
893
1072
|
function DefaultSocialButtonContainer({
|
|
894
1073
|
children,
|
|
895
1074
|
nodes
|
|
896
1075
|
}) {
|
|
897
|
-
return /* @__PURE__ */ (0,
|
|
1076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
898
1077
|
"div",
|
|
899
1078
|
{
|
|
900
1079
|
className: cn("grid gap-3", {
|
|
@@ -909,14 +1088,14 @@ function DefaultSocialButtonContainer({
|
|
|
909
1088
|
}
|
|
910
1089
|
|
|
911
1090
|
// src/theme/default/components/form/index.tsx
|
|
912
|
-
var
|
|
1091
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
913
1092
|
function DefaultFormContainer({
|
|
914
1093
|
children,
|
|
915
1094
|
onSubmit,
|
|
916
1095
|
action,
|
|
917
1096
|
method
|
|
918
1097
|
}) {
|
|
919
|
-
return /* @__PURE__ */ (0,
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
920
1099
|
"form",
|
|
921
1100
|
{
|
|
922
1101
|
onSubmit,
|
|
@@ -933,11 +1112,11 @@ function DefaultMessageContainer({ children }) {
|
|
|
933
1112
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
934
1113
|
return null;
|
|
935
1114
|
}
|
|
936
|
-
return /* @__PURE__ */ (0,
|
|
1115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
937
1116
|
"section",
|
|
938
1117
|
{
|
|
939
1118
|
className: cn(
|
|
940
|
-
flowType ===
|
|
1119
|
+
flowType === import_client_fetch6.FlowType.Settings ? "text-center" : "text-left"
|
|
941
1120
|
),
|
|
942
1121
|
children
|
|
943
1122
|
}
|
|
@@ -945,7 +1124,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
945
1124
|
}
|
|
946
1125
|
function DefaultMessage({ message }) {
|
|
947
1126
|
const intl = (0, import_react_intl4.useIntl)();
|
|
948
|
-
return /* @__PURE__ */ (0,
|
|
1127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
949
1128
|
"span",
|
|
950
1129
|
{
|
|
951
1130
|
className: cn(
|
|
@@ -965,61 +1144,84 @@ var import_react_intl5 = require("react-intl");
|
|
|
965
1144
|
|
|
966
1145
|
// src/theme/default/assets/icons/code.svg
|
|
967
1146
|
var React18 = __toESM(require("react"));
|
|
968
|
-
var
|
|
1147
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
969
1148
|
var SvgCode = (props) => {
|
|
970
1149
|
var _a, _b;
|
|
971
|
-
return /* @__PURE__ */ (0,
|
|
1150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
|
|
972
1151
|
};
|
|
973
1152
|
var code_default = SvgCode;
|
|
974
1153
|
|
|
975
1154
|
// src/theme/default/assets/icons/passkey.svg
|
|
976
1155
|
var React19 = __toESM(require("react"));
|
|
977
|
-
var
|
|
1156
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
978
1157
|
var SvgPasskey = (props) => {
|
|
979
1158
|
var _a, _b;
|
|
980
|
-
return /* @__PURE__ */ (0,
|
|
1159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
|
|
981
1160
|
};
|
|
982
1161
|
var passkey_default = SvgPasskey;
|
|
983
1162
|
|
|
984
1163
|
// src/theme/default/assets/icons/password.svg
|
|
985
1164
|
var React20 = __toESM(require("react"));
|
|
986
|
-
var
|
|
1165
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
987
1166
|
var SvgPassword = (props) => {
|
|
988
1167
|
var _a, _b;
|
|
989
|
-
return /* @__PURE__ */ (0,
|
|
1168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
|
|
990
1169
|
};
|
|
991
1170
|
var password_default = SvgPassword;
|
|
992
1171
|
|
|
993
1172
|
// src/theme/default/assets/icons/webauthn.svg
|
|
994
1173
|
var React21 = __toESM(require("react"));
|
|
995
|
-
var
|
|
1174
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
996
1175
|
var SvgWebauthn = (props) => {
|
|
997
1176
|
var _a, _b;
|
|
998
|
-
return /* @__PURE__ */ (0,
|
|
1177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
|
|
999
1178
|
};
|
|
1000
1179
|
var webauthn_default = SvgWebauthn;
|
|
1001
1180
|
|
|
1181
|
+
// src/theme/default/assets/icons/totp.svg
|
|
1182
|
+
var React22 = __toESM(require("react"));
|
|
1183
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1184
|
+
var SvgTotp = (props) => {
|
|
1185
|
+
var _a, _b;
|
|
1186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("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" }) });
|
|
1187
|
+
};
|
|
1188
|
+
var totp_default = SvgTotp;
|
|
1189
|
+
|
|
1190
|
+
// src/theme/default/assets/icons/code-asterix.svg
|
|
1191
|
+
var React23 = __toESM(require("react"));
|
|
1192
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1193
|
+
var SvgCodeAsterix = (props) => {
|
|
1194
|
+
var _a, _b;
|
|
1195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("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__ */ (0, import_jsx_runtime34.jsx)("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" }) });
|
|
1196
|
+
};
|
|
1197
|
+
var code_asterix_default = SvgCodeAsterix;
|
|
1198
|
+
|
|
1002
1199
|
// src/theme/default/utils/form.ts
|
|
1003
1200
|
function isGroupImmediateSubmit(group) {
|
|
1004
1201
|
return group === "code";
|
|
1005
1202
|
}
|
|
1006
1203
|
|
|
1007
1204
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
1008
|
-
var
|
|
1205
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1009
1206
|
var iconsMap = {
|
|
1010
1207
|
code: code_default,
|
|
1011
1208
|
passkey: passkey_default,
|
|
1012
1209
|
password: password_default,
|
|
1013
1210
|
webauthn: webauthn_default,
|
|
1211
|
+
hardware_token: passkey_default,
|
|
1212
|
+
totp: totp_default,
|
|
1213
|
+
lookup_secret: code_asterix_default,
|
|
1014
1214
|
...provider_logos_default
|
|
1015
1215
|
};
|
|
1016
1216
|
function DefaultAuthMethodListItem({
|
|
1017
1217
|
onClick,
|
|
1018
|
-
group
|
|
1218
|
+
group,
|
|
1219
|
+
title
|
|
1019
1220
|
}) {
|
|
1221
|
+
var _a;
|
|
1020
1222
|
const intl = (0, import_react_intl5.useIntl)();
|
|
1021
1223
|
const Icon = iconsMap[group] || null;
|
|
1022
|
-
return /* @__PURE__ */ (0,
|
|
1224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1023
1225
|
"button",
|
|
1024
1226
|
{
|
|
1025
1227
|
className: "flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
|
|
@@ -1027,10 +1229,16 @@ function DefaultAuthMethodListItem({
|
|
|
1027
1229
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
1028
1230
|
"data-testid": `ory/form/auth-picker/${group}`,
|
|
1029
1231
|
children: [
|
|
1030
|
-
/* @__PURE__ */ (0,
|
|
1031
|
-
/* @__PURE__ */ (0,
|
|
1032
|
-
/* @__PURE__ */ (0,
|
|
1033
|
-
|
|
1232
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "mt-1", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex-1 leading-normal inline-flex flex-col w-full", children: [
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "text-interface-foreground-default-primary truncate mr-6", children: [
|
|
1235
|
+
intl.formatMessage(
|
|
1236
|
+
{ id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
|
|
1237
|
+
title == null ? void 0 : title.values
|
|
1238
|
+
),
|
|
1239
|
+
" "
|
|
1240
|
+
] }),
|
|
1241
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
|
|
1034
1242
|
id: `two-step.${group}.description`
|
|
1035
1243
|
}) })
|
|
1036
1244
|
] })
|
|
@@ -1040,13 +1248,13 @@ function DefaultAuthMethodListItem({
|
|
|
1040
1248
|
}
|
|
1041
1249
|
|
|
1042
1250
|
// src/theme/default/components/form/button.tsx
|
|
1043
|
-
var
|
|
1251
|
+
var import_client_fetch7 = require("@ory/client-fetch");
|
|
1044
1252
|
var import_elements_react7 = require("@ory/elements-react");
|
|
1045
1253
|
var import_class_variance_authority = require("class-variance-authority");
|
|
1046
1254
|
var import_react_hook_form3 = require("react-hook-form");
|
|
1047
1255
|
var import_react_intl6 = require("react-intl");
|
|
1048
|
-
var
|
|
1049
|
-
var
|
|
1256
|
+
var import_react4 = require("react");
|
|
1257
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1050
1258
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
1051
1259
|
[
|
|
1052
1260
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -1097,20 +1305,20 @@ var DefaultButton = ({
|
|
|
1097
1305
|
// End of skipped attributes
|
|
1098
1306
|
...rest
|
|
1099
1307
|
} = attributes;
|
|
1100
|
-
const [clicked, setClicked] = (0,
|
|
1308
|
+
const [clicked, setClicked] = (0, import_react4.useState)(false);
|
|
1101
1309
|
const intl = (0, import_react_intl6.useIntl)();
|
|
1102
|
-
const label = (0,
|
|
1310
|
+
const label = (0, import_client_fetch7.getNodeLabel)(node);
|
|
1103
1311
|
const {
|
|
1104
1312
|
formState: { isSubmitting },
|
|
1105
1313
|
setValue
|
|
1106
1314
|
} = (0, import_react_hook_form3.useFormContext)();
|
|
1107
|
-
(0,
|
|
1315
|
+
(0, import_react4.useEffect)(() => {
|
|
1108
1316
|
if (!isSubmitting) {
|
|
1109
1317
|
setClicked(false);
|
|
1110
1318
|
}
|
|
1111
1319
|
}, [isSubmitting]);
|
|
1112
1320
|
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
1113
|
-
return /* @__PURE__ */ (0,
|
|
1321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
1114
1322
|
"button",
|
|
1115
1323
|
{
|
|
1116
1324
|
...rest,
|
|
@@ -1130,8 +1338,8 @@ var DefaultButton = ({
|
|
|
1130
1338
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
1131
1339
|
"data-loading": clicked,
|
|
1132
1340
|
children: [
|
|
1133
|
-
clicked ? /* @__PURE__ */ (0,
|
|
1134
|
-
label ? /* @__PURE__ */ (0,
|
|
1341
|
+
clicked ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Spinner, {}) : null,
|
|
1342
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: (0, import_elements_react7.uiTextToFormattedMessage)(label, intl) }) : ""
|
|
1135
1343
|
]
|
|
1136
1344
|
}
|
|
1137
1345
|
);
|
|
@@ -1139,7 +1347,7 @@ var DefaultButton = ({
|
|
|
1139
1347
|
DefaultButton.displayName = "DefaultButton";
|
|
1140
1348
|
|
|
1141
1349
|
// src/theme/default/components/form/checkbox.tsx
|
|
1142
|
-
var
|
|
1350
|
+
var import_client_fetch8 = require("@ory/client-fetch");
|
|
1143
1351
|
var import_elements_react8 = require("@ory/elements-react");
|
|
1144
1352
|
var import_react_hook_form4 = require("react-hook-form");
|
|
1145
1353
|
var import_react_intl8 = require("react-intl");
|
|
@@ -1204,7 +1412,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
|
1204
1412
|
};
|
|
1205
1413
|
|
|
1206
1414
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
1207
|
-
var
|
|
1415
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1208
1416
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
1209
1417
|
function computeLabelElements(labelText) {
|
|
1210
1418
|
const elements = [];
|
|
@@ -1220,7 +1428,7 @@ function computeLabelElements(labelText) {
|
|
|
1220
1428
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
1221
1429
|
}
|
|
1222
1430
|
elements.push(
|
|
1223
|
-
/* @__PURE__ */ (0,
|
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1224
1432
|
"a",
|
|
1225
1433
|
{
|
|
1226
1434
|
href: url,
|
|
@@ -1245,13 +1453,13 @@ function CheckboxLabel({ label }) {
|
|
|
1245
1453
|
return null;
|
|
1246
1454
|
}
|
|
1247
1455
|
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1248
|
-
return /* @__PURE__ */ (0,
|
|
1456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: computeLabelElements(labelText) });
|
|
1249
1457
|
}
|
|
1250
1458
|
|
|
1251
1459
|
// src/theme/default/components/form/checkbox.tsx
|
|
1252
|
-
var
|
|
1460
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1253
1461
|
function CheckboxSVG() {
|
|
1254
|
-
return /* @__PURE__ */ (0,
|
|
1462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1255
1463
|
"svg",
|
|
1256
1464
|
{
|
|
1257
1465
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -1260,7 +1468,7 @@ function CheckboxSVG() {
|
|
|
1260
1468
|
height: "16",
|
|
1261
1469
|
viewBox: "0 0 16 16",
|
|
1262
1470
|
fill: "none",
|
|
1263
|
-
children: /* @__PURE__ */ (0,
|
|
1471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1264
1472
|
"path",
|
|
1265
1473
|
{
|
|
1266
1474
|
fillRule: "evenodd",
|
|
@@ -1286,12 +1494,12 @@ var DefaultCheckbox = ({
|
|
|
1286
1494
|
...attributes
|
|
1287
1495
|
} = initialAttributes;
|
|
1288
1496
|
const intl = (0, import_react_intl8.useIntl)();
|
|
1289
|
-
const label = (0,
|
|
1497
|
+
const label = (0, import_client_fetch8.getNodeLabel)(node);
|
|
1290
1498
|
const { register } = (0, import_react_hook_form4.useForm)();
|
|
1291
1499
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
1292
|
-
return /* @__PURE__ */ (0,
|
|
1293
|
-
/* @__PURE__ */ (0,
|
|
1294
|
-
/* @__PURE__ */ (0,
|
|
1500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
1501
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex h-5 items-center", children: [
|
|
1502
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1295
1503
|
"input",
|
|
1296
1504
|
{
|
|
1297
1505
|
...attributes,
|
|
@@ -1305,11 +1513,11 @@ var DefaultCheckbox = ({
|
|
|
1305
1513
|
...register(name, { value })
|
|
1306
1514
|
}
|
|
1307
1515
|
),
|
|
1308
|
-
/* @__PURE__ */ (0,
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckboxSVG, {})
|
|
1309
1517
|
] }),
|
|
1310
|
-
/* @__PURE__ */ (0,
|
|
1311
|
-
/* @__PURE__ */ (0,
|
|
1312
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex flex-col", children: [
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckboxLabel, { label }) }),
|
|
1520
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1313
1521
|
"span",
|
|
1314
1522
|
{
|
|
1315
1523
|
className: cn(
|
|
@@ -1326,35 +1534,59 @@ var DefaultCheckbox = ({
|
|
|
1326
1534
|
};
|
|
1327
1535
|
|
|
1328
1536
|
// src/theme/default/components/form/group-container.tsx
|
|
1329
|
-
var
|
|
1537
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1330
1538
|
function DefaultGroupContainer({ children }) {
|
|
1331
|
-
return /* @__PURE__ */ (0,
|
|
1539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "grid grid-cols-1 gap-8", children });
|
|
1332
1540
|
}
|
|
1333
1541
|
|
|
1334
1542
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1335
|
-
var
|
|
1543
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1336
1544
|
function DefaultHorizontalDivider() {
|
|
1337
|
-
return /* @__PURE__ */ (0,
|
|
1545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("hr", { className: "border-interface-border-default-primary" });
|
|
1338
1546
|
}
|
|
1339
1547
|
|
|
1340
1548
|
// src/theme/default/components/form/image.tsx
|
|
1341
|
-
var
|
|
1549
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1342
1550
|
function DefaultImage({ attributes }) {
|
|
1343
|
-
return /* @__PURE__ */ (0,
|
|
1551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("img", { ...attributes }) });
|
|
1344
1552
|
}
|
|
1345
1553
|
|
|
1346
1554
|
// src/theme/default/components/form/input.tsx
|
|
1347
|
-
var
|
|
1555
|
+
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1348
1556
|
var import_elements_react9 = require("@ory/elements-react");
|
|
1557
|
+
var import_react5 = require("react");
|
|
1349
1558
|
var import_react_hook_form5 = require("react-hook-form");
|
|
1350
1559
|
var import_react_intl9 = require("react-intl");
|
|
1351
|
-
|
|
1560
|
+
|
|
1561
|
+
// src/theme/default/assets/icons/eye-off.svg
|
|
1562
|
+
var React24 = __toESM(require("react"));
|
|
1563
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1564
|
+
var SvgEyeOff = (props) => {
|
|
1565
|
+
var _a, _b;
|
|
1566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
|
|
1567
|
+
};
|
|
1568
|
+
var eye_off_default = SvgEyeOff;
|
|
1569
|
+
|
|
1570
|
+
// src/theme/default/assets/icons/eye.svg
|
|
1571
|
+
var React25 = __toESM(require("react"));
|
|
1572
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1573
|
+
var SvgEye = (props) => {
|
|
1574
|
+
var _a, _b;
|
|
1575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1576
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1577
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1578
|
+
] }) });
|
|
1579
|
+
};
|
|
1580
|
+
var eye_default = SvgEye;
|
|
1581
|
+
|
|
1582
|
+
// src/theme/default/components/form/input.tsx
|
|
1583
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1352
1584
|
var DefaultInput = ({
|
|
1353
1585
|
node,
|
|
1354
1586
|
attributes,
|
|
1355
1587
|
onClick
|
|
1356
1588
|
}) => {
|
|
1357
|
-
const label = (0,
|
|
1589
|
+
const label = (0, import_client_fetch9.getNodeLabel)(node);
|
|
1358
1590
|
const { register } = (0, import_react_hook_form5.useFormContext)();
|
|
1359
1591
|
const {
|
|
1360
1592
|
value,
|
|
@@ -1366,6 +1598,7 @@ var DefaultInput = ({
|
|
|
1366
1598
|
} = attributes;
|
|
1367
1599
|
const intl = (0, import_react_intl9.useIntl)();
|
|
1368
1600
|
const { flowType } = (0, import_elements_react9.useOryFlow)();
|
|
1601
|
+
const inputRef = (0, import_react5.useRef)(null);
|
|
1369
1602
|
const formattedLabel = label ? intl.formatMessage(
|
|
1370
1603
|
{
|
|
1371
1604
|
id: "input.placeholder",
|
|
@@ -1375,36 +1608,86 @@ var DefaultInput = ({
|
|
|
1375
1608
|
placeholder: (0, import_elements_react9.uiTextToFormattedMessage)(label, intl)
|
|
1376
1609
|
}
|
|
1377
1610
|
) : "";
|
|
1378
|
-
|
|
1379
|
-
|
|
1611
|
+
if (rest.type === "hidden") {
|
|
1612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1613
|
+
"input",
|
|
1614
|
+
{
|
|
1615
|
+
...rest,
|
|
1616
|
+
onClick,
|
|
1617
|
+
maxLength: maxlength,
|
|
1618
|
+
autoComplete: autocomplete,
|
|
1619
|
+
placeholder: formattedLabel,
|
|
1620
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
1621
|
+
...register(name, { value })
|
|
1622
|
+
}
|
|
1623
|
+
);
|
|
1624
|
+
}
|
|
1625
|
+
const { ref, ...restRegister } = register(name, { value });
|
|
1626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
1627
|
+
"div",
|
|
1380
1628
|
{
|
|
1381
|
-
...rest,
|
|
1382
|
-
onClick,
|
|
1383
|
-
maxLength: maxlength,
|
|
1384
|
-
autoComplete: autocomplete,
|
|
1385
|
-
placeholder: formattedLabel,
|
|
1386
|
-
"data-testid": `ory/form/node/input/${name}`,
|
|
1387
1629
|
className: cn(
|
|
1388
|
-
"
|
|
1389
|
-
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
1390
|
-
"disabled:bg-input-background-disabled disabled:border-input-border-disabled disabled:text-input-foreground-disabled",
|
|
1391
|
-
"focus:border-input-border-focus focus-visible:border-input-border-focus",
|
|
1392
|
-
"hover:bg-input-background-hover hover:border-input-border-hover",
|
|
1393
|
-
"px-4 py-[13px]",
|
|
1630
|
+
"relative flex justify-stretch",
|
|
1394
1631
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1395
|
-
flowType ===
|
|
1632
|
+
flowType === import_client_fetch9.FlowType.Settings && "max-w-[488px]"
|
|
1396
1633
|
),
|
|
1397
|
-
|
|
1634
|
+
children: [
|
|
1635
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1636
|
+
"input",
|
|
1637
|
+
{
|
|
1638
|
+
...rest,
|
|
1639
|
+
onClick,
|
|
1640
|
+
maxLength: maxlength,
|
|
1641
|
+
autoComplete: autocomplete,
|
|
1642
|
+
placeholder: formattedLabel,
|
|
1643
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
1644
|
+
className: cn(
|
|
1645
|
+
"antialiased rounded-forms border leading-tight transition-colors placeholder:h-[20px] placeholder:text-input-foreground-tertiary focus-visible:outline-none focus:ring-0 w-full",
|
|
1646
|
+
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
1647
|
+
"disabled:bg-input-background-disabled disabled:border-input-border-disabled disabled:text-input-foreground-disabled",
|
|
1648
|
+
"focus:border-input-border-focus focus-visible:border-input-border-focus",
|
|
1649
|
+
"hover:bg-input-background-hover hover:border-input-border-hover",
|
|
1650
|
+
"px-4 py-[13px]"
|
|
1651
|
+
),
|
|
1652
|
+
ref: (e) => {
|
|
1653
|
+
inputRef.current = e;
|
|
1654
|
+
ref(e);
|
|
1655
|
+
},
|
|
1656
|
+
...restRegister
|
|
1657
|
+
}
|
|
1658
|
+
),
|
|
1659
|
+
rest.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PasswordToggle, { inputRef })
|
|
1660
|
+
]
|
|
1398
1661
|
}
|
|
1399
1662
|
);
|
|
1400
1663
|
};
|
|
1664
|
+
function PasswordToggle({
|
|
1665
|
+
inputRef
|
|
1666
|
+
}) {
|
|
1667
|
+
const [shown, setShown] = (0, import_react5.useState)(false);
|
|
1668
|
+
const handleClick = () => {
|
|
1669
|
+
setShown(!shown);
|
|
1670
|
+
if (inputRef.current) {
|
|
1671
|
+
inputRef.current.type = shown ? "password" : "text";
|
|
1672
|
+
}
|
|
1673
|
+
};
|
|
1674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1675
|
+
"button",
|
|
1676
|
+
{
|
|
1677
|
+
onClick: handleClick,
|
|
1678
|
+
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
1679
|
+
type: "button",
|
|
1680
|
+
children: shown ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(eye_default, {})
|
|
1681
|
+
}
|
|
1682
|
+
);
|
|
1683
|
+
}
|
|
1401
1684
|
|
|
1402
1685
|
// src/theme/default/components/form/label.tsx
|
|
1403
|
-
var
|
|
1686
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
1404
1687
|
var import_elements_react10 = require("@ory/elements-react");
|
|
1405
1688
|
var import_react_hook_form6 = require("react-hook-form");
|
|
1406
1689
|
var import_react_intl10 = require("react-intl");
|
|
1407
|
-
var
|
|
1690
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1408
1691
|
function findResendNode(nodes) {
|
|
1409
1692
|
return nodes.find(
|
|
1410
1693
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -1417,7 +1700,7 @@ function DefaultLabel({
|
|
|
1417
1700
|
...rest
|
|
1418
1701
|
}) {
|
|
1419
1702
|
const intl = (0, import_react_intl10.useIntl)();
|
|
1420
|
-
const label = (0,
|
|
1703
|
+
const label = (0, import_client_fetch10.getNodeLabel)(node);
|
|
1421
1704
|
const { Message } = (0, import_elements_react10.useComponents)();
|
|
1422
1705
|
const { config, flowType, flow } = (0, import_elements_react10.useOryFlow)();
|
|
1423
1706
|
const { setValue, formState } = (0, import_react_hook_form6.useFormContext)();
|
|
@@ -1429,9 +1712,9 @@ function DefaultLabel({
|
|
|
1429
1712
|
}
|
|
1430
1713
|
};
|
|
1431
1714
|
const fieldError = formState.errors[attributes.name];
|
|
1432
|
-
return /* @__PURE__ */ (0,
|
|
1433
|
-
label && /* @__PURE__ */ (0,
|
|
1434
|
-
/* @__PURE__ */ (0,
|
|
1715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
1716
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "inline-flex justify-between", children: [
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1435
1718
|
"label",
|
|
1436
1719
|
{
|
|
1437
1720
|
...(0, import_elements_react10.messageTestId)(label),
|
|
@@ -1442,8 +1725,8 @@ function DefaultLabel({
|
|
|
1442
1725
|
children: (0, import_elements_react10.uiTextToFormattedMessage)(label, intl)
|
|
1443
1726
|
}
|
|
1444
1727
|
),
|
|
1445
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
1446
|
-
/* @__PURE__ */ (0,
|
|
1728
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch10.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1447
1730
|
"a",
|
|
1448
1731
|
{
|
|
1449
1732
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -1454,7 +1737,7 @@ function DefaultLabel({
|
|
|
1454
1737
|
})
|
|
1455
1738
|
}
|
|
1456
1739
|
),
|
|
1457
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0,
|
|
1740
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1458
1741
|
"button",
|
|
1459
1742
|
{
|
|
1460
1743
|
type: "submit",
|
|
@@ -1467,21 +1750,21 @@ function DefaultLabel({
|
|
|
1467
1750
|
)
|
|
1468
1751
|
] }),
|
|
1469
1752
|
children,
|
|
1470
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
1471
|
-
fieldError && (0,
|
|
1753
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message.Content, { message }, message.id)),
|
|
1754
|
+
fieldError && (0, import_client_fetch10.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message.Content, { message: fieldError })
|
|
1472
1755
|
] });
|
|
1473
1756
|
}
|
|
1474
1757
|
|
|
1475
1758
|
// src/theme/default/components/form/link-button.tsx
|
|
1476
|
-
var
|
|
1759
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
1477
1760
|
var import_elements_react11 = require("@ory/elements-react");
|
|
1478
|
-
var
|
|
1761
|
+
var import_react6 = require("react");
|
|
1479
1762
|
var import_react_intl11 = require("react-intl");
|
|
1480
|
-
var
|
|
1481
|
-
var DefaultLinkButton = (0,
|
|
1763
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1764
|
+
var DefaultLinkButton = (0, import_react6.forwardRef)(({ attributes, node }, ref) => {
|
|
1482
1765
|
const intl = (0, import_react_intl11.useIntl)();
|
|
1483
|
-
const label = (0,
|
|
1484
|
-
return /* @__PURE__ */ (0,
|
|
1766
|
+
const label = (0, import_client_fetch11.getNodeLabel)(node);
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1485
1768
|
"a",
|
|
1486
1769
|
{
|
|
1487
1770
|
...attributes,
|
|
@@ -1502,9 +1785,9 @@ var import_react_hook_form7 = require("react-hook-form");
|
|
|
1502
1785
|
|
|
1503
1786
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1504
1787
|
var import_input_otp = require("input-otp");
|
|
1505
|
-
var
|
|
1506
|
-
var
|
|
1507
|
-
var InputOTP =
|
|
1788
|
+
var React26 = __toESM(require("react"));
|
|
1789
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1790
|
+
var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1508
1791
|
import_input_otp.OTPInput,
|
|
1509
1792
|
{
|
|
1510
1793
|
ref,
|
|
@@ -1517,12 +1800,12 @@ var InputOTP = React22.forwardRef(({ className, containerClassName, ...props },
|
|
|
1517
1800
|
}
|
|
1518
1801
|
));
|
|
1519
1802
|
InputOTP.displayName = "InputOTP";
|
|
1520
|
-
var InputOTPGroup =
|
|
1803
|
+
var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1521
1804
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1522
|
-
var InputOTPSlot =
|
|
1523
|
-
const inputOTPContext =
|
|
1805
|
+
var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
1806
|
+
const inputOTPContext = React26.useContext(import_input_otp.OTPInputContext);
|
|
1524
1807
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1525
|
-
return /* @__PURE__ */ (0,
|
|
1808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
1526
1809
|
"div",
|
|
1527
1810
|
{
|
|
1528
1811
|
ref,
|
|
@@ -1534,8 +1817,8 @@ var InputOTPSlot = React22.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1534
1817
|
),
|
|
1535
1818
|
...props,
|
|
1536
1819
|
children: [
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-block size-4", children: char }),
|
|
1821
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
1539
1822
|
]
|
|
1540
1823
|
}
|
|
1541
1824
|
);
|
|
@@ -1544,8 +1827,8 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
1544
1827
|
|
|
1545
1828
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1546
1829
|
var import_elements_react12 = require("@ory/elements-react");
|
|
1547
|
-
var
|
|
1548
|
-
var
|
|
1830
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
1831
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1549
1832
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1550
1833
|
const { setValue, watch } = (0, import_react_hook_form7.useFormContext)();
|
|
1551
1834
|
const { maxlength, name } = attributes;
|
|
@@ -1555,22 +1838,22 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1555
1838
|
setValue(name, v);
|
|
1556
1839
|
};
|
|
1557
1840
|
const value = watch(name);
|
|
1558
|
-
return /* @__PURE__ */ (0,
|
|
1841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1559
1842
|
InputOTP,
|
|
1560
1843
|
{
|
|
1561
1844
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1562
1845
|
onChange: handleInputChange,
|
|
1563
1846
|
name,
|
|
1564
1847
|
value,
|
|
1565
|
-
children: /* @__PURE__ */ (0,
|
|
1848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1566
1849
|
InputOTPGroup,
|
|
1567
1850
|
{
|
|
1568
1851
|
className: cn(
|
|
1569
1852
|
"w-full flex gap-2 justify-stretch",
|
|
1570
1853
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1571
|
-
flowType ===
|
|
1854
|
+
flowType === import_client_fetch12.FlowType.Settings && "max-w-[488px]"
|
|
1572
1855
|
),
|
|
1573
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0,
|
|
1856
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(InputOTPSlot, { index }, index))
|
|
1574
1857
|
}
|
|
1575
1858
|
)
|
|
1576
1859
|
}
|
|
@@ -1578,13 +1861,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1578
1861
|
};
|
|
1579
1862
|
|
|
1580
1863
|
// src/theme/default/components/form/section.tsx
|
|
1581
|
-
var
|
|
1864
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1582
1865
|
var DefaultFormSection = ({
|
|
1583
1866
|
children,
|
|
1584
1867
|
nodes: _nodes,
|
|
1585
1868
|
...rest
|
|
1586
1869
|
}) => {
|
|
1587
|
-
return /* @__PURE__ */ (0,
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
1588
1871
|
"form",
|
|
1589
1872
|
{
|
|
1590
1873
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -1598,10 +1881,10 @@ var DefaultFormSectionContent = ({
|
|
|
1598
1881
|
description,
|
|
1599
1882
|
children
|
|
1600
1883
|
}) => {
|
|
1601
|
-
return /* @__PURE__ */ (0,
|
|
1602
|
-
/* @__PURE__ */ (0,
|
|
1603
|
-
/* @__PURE__ */ (0,
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
1884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("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: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1605
1888
|
] }),
|
|
1606
1889
|
children
|
|
1607
1890
|
] });
|
|
@@ -1610,14 +1893,14 @@ var DefaultFormSectionFooter = ({
|
|
|
1610
1893
|
children,
|
|
1611
1894
|
text
|
|
1612
1895
|
}) => {
|
|
1613
|
-
return /* @__PURE__ */ (0,
|
|
1896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
1614
1897
|
"div",
|
|
1615
1898
|
{
|
|
1616
1899
|
className: cn(
|
|
1617
1900
|
"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"
|
|
1618
1901
|
),
|
|
1619
1902
|
children: [
|
|
1620
|
-
/* @__PURE__ */ (0,
|
|
1903
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: text }),
|
|
1621
1904
|
children
|
|
1622
1905
|
]
|
|
1623
1906
|
}
|
|
@@ -1627,31 +1910,31 @@ var DefaultFormSectionFooter = ({
|
|
|
1627
1910
|
// src/theme/default/components/form/text.tsx
|
|
1628
1911
|
var import_elements_react13 = require("@ory/elements-react");
|
|
1629
1912
|
var import_react_intl12 = require("react-intl");
|
|
1630
|
-
var
|
|
1913
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1631
1914
|
function DefaultText({ node, attributes }) {
|
|
1632
1915
|
var _a;
|
|
1633
1916
|
const intl = (0, import_react_intl12.useIntl)();
|
|
1634
1917
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
1635
1918
|
if (lookup) {
|
|
1636
|
-
return /* @__PURE__ */ (0,
|
|
1637
|
-
/* @__PURE__ */ (0,
|
|
1638
|
-
lookup.map((text, index) => /* @__PURE__ */ (0,
|
|
1919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
1920
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
|
|
1921
|
+
lookup.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
1639
1922
|
"pre",
|
|
1640
1923
|
{
|
|
1641
1924
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
1642
|
-
children: /* @__PURE__ */ (0,
|
|
1925
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("code", { children: text ? (0, import_elements_react13.uiTextToFormattedMessage)(text, intl) : "" })
|
|
1643
1926
|
},
|
|
1644
1927
|
index
|
|
1645
1928
|
))
|
|
1646
1929
|
] });
|
|
1647
1930
|
}
|
|
1648
|
-
return /* @__PURE__ */ (0,
|
|
1931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
1649
1932
|
"p",
|
|
1650
1933
|
{
|
|
1651
1934
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
1652
1935
|
id: attributes.id,
|
|
1653
1936
|
children: [
|
|
1654
|
-
node.meta.label ? /* @__PURE__ */ (0,
|
|
1937
|
+
node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("label", { children: (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) }) : null,
|
|
1655
1938
|
attributes.text ? (0, import_elements_react13.uiTextToFormattedMessage)(attributes.text, intl) : ""
|
|
1656
1939
|
]
|
|
1657
1940
|
}
|
|
@@ -1663,13 +1946,13 @@ var import_elements_react15 = require("@ory/elements-react");
|
|
|
1663
1946
|
|
|
1664
1947
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1665
1948
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
1666
|
-
var
|
|
1949
|
+
var import_react9 = require("react");
|
|
1667
1950
|
var import_elements_react14 = require("@ory/elements-react");
|
|
1668
1951
|
|
|
1669
1952
|
// src/util/client.ts
|
|
1670
|
-
var
|
|
1953
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
1671
1954
|
function frontendClient(sdkUrl, opts = {}) {
|
|
1672
|
-
const config = new
|
|
1955
|
+
const config = new import_client_fetch13.Configuration({
|
|
1673
1956
|
...opts,
|
|
1674
1957
|
basePath: sdkUrl,
|
|
1675
1958
|
headers: {
|
|
@@ -1677,26 +1960,26 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
1677
1960
|
...opts.headers
|
|
1678
1961
|
}
|
|
1679
1962
|
});
|
|
1680
|
-
return new
|
|
1963
|
+
return new import_client_fetch13.FrontendApi(config);
|
|
1681
1964
|
}
|
|
1682
1965
|
|
|
1683
1966
|
// src/theme/default/assets/icons/logout.svg
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1967
|
+
var React27 = __toESM(require("react"));
|
|
1968
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1686
1969
|
var SvgLogout = (props) => {
|
|
1687
1970
|
var _a, _b;
|
|
1688
|
-
return /* @__PURE__ */ (0,
|
|
1971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
|
|
1689
1972
|
};
|
|
1690
1973
|
var logout_default = SvgLogout;
|
|
1691
1974
|
|
|
1692
1975
|
// src/theme/default/assets/icons/settings.svg
|
|
1693
|
-
var
|
|
1694
|
-
var
|
|
1976
|
+
var React28 = __toESM(require("react"));
|
|
1977
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1695
1978
|
var SvgSettings = (props) => {
|
|
1696
1979
|
var _a, _b;
|
|
1697
|
-
return /* @__PURE__ */ (0,
|
|
1698
|
-
/* @__PURE__ */ (0,
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1700
1983
|
] }) });
|
|
1701
1984
|
};
|
|
1702
1985
|
var settings_default = SvgSettings;
|
|
@@ -1741,12 +2024,12 @@ var getUserInitials = (session) => {
|
|
|
1741
2024
|
};
|
|
1742
2025
|
|
|
1743
2026
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1744
|
-
var
|
|
2027
|
+
var import_react7 = require("react");
|
|
1745
2028
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1746
|
-
var
|
|
2029
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1747
2030
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1748
2031
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1749
|
-
var DropdownMenuContent = (0,
|
|
2032
|
+
var DropdownMenuContent = (0, import_react7.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1750
2033
|
DropdownMenuPrimitive.Content,
|
|
1751
2034
|
{
|
|
1752
2035
|
ref,
|
|
@@ -1761,7 +2044,7 @@ var DropdownMenuContent = (0, import_react4.forwardRef)(({ className, sideOffset
|
|
|
1761
2044
|
}
|
|
1762
2045
|
) }));
|
|
1763
2046
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1764
|
-
var DropdownMenuItem = (0,
|
|
2047
|
+
var DropdownMenuItem = (0, import_react7.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1765
2048
|
DropdownMenuPrimitive.Item,
|
|
1766
2049
|
{
|
|
1767
2050
|
ref,
|
|
@@ -1779,7 +2062,7 @@ var DropdownMenuItem = (0, import_react4.forwardRef)(({ className, inset, ...pro
|
|
|
1779
2062
|
}
|
|
1780
2063
|
));
|
|
1781
2064
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1782
|
-
var DropdownMenuLabel = (0,
|
|
2065
|
+
var DropdownMenuLabel = (0, import_react7.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1783
2066
|
DropdownMenuPrimitive.Label,
|
|
1784
2067
|
{
|
|
1785
2068
|
ref,
|
|
@@ -1794,35 +2077,35 @@ var DropdownMenuLabel = (0, import_react4.forwardRef)(({ className, inset, ...pr
|
|
|
1794
2077
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1795
2078
|
|
|
1796
2079
|
// src/theme/default/components/ui/user-avater.tsx
|
|
1797
|
-
var
|
|
2080
|
+
var import_react8 = require("react");
|
|
1798
2081
|
|
|
1799
2082
|
// src/theme/default/assets/icons/user.svg
|
|
1800
|
-
var
|
|
1801
|
-
var
|
|
2083
|
+
var React29 = __toESM(require("react"));
|
|
2084
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1802
2085
|
var SvgUser = (props) => {
|
|
1803
2086
|
var _a, _b;
|
|
1804
|
-
return /* @__PURE__ */ (0,
|
|
2087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
|
|
1805
2088
|
};
|
|
1806
2089
|
var user_default = SvgUser;
|
|
1807
2090
|
|
|
1808
2091
|
// src/theme/default/components/ui/user-avater.tsx
|
|
1809
|
-
var
|
|
1810
|
-
var UserAvatar = (0,
|
|
2092
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2093
|
+
var UserAvatar = (0, import_react8.forwardRef)(
|
|
1811
2094
|
({ initials, ...rest }, ref) => {
|
|
1812
|
-
return /* @__PURE__ */ (0,
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1813
2096
|
"button",
|
|
1814
2097
|
{
|
|
1815
2098
|
ref,
|
|
1816
2099
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
1817
2100
|
...rest,
|
|
1818
|
-
children: /* @__PURE__ */ (0,
|
|
2101
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1819
2102
|
"img",
|
|
1820
2103
|
{
|
|
1821
2104
|
src: initials.avatar,
|
|
1822
2105
|
alt: initials.primary,
|
|
1823
2106
|
className: "w-full object-contain"
|
|
1824
2107
|
}
|
|
1825
|
-
) : /* @__PURE__ */ (0,
|
|
2108
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
1826
2109
|
user_default,
|
|
1827
2110
|
{
|
|
1828
2111
|
size: 24,
|
|
@@ -1836,34 +2119,34 @@ var UserAvatar = (0, import_react5.forwardRef)(
|
|
|
1836
2119
|
UserAvatar.displayName = "UserAvatar";
|
|
1837
2120
|
|
|
1838
2121
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1839
|
-
var
|
|
2122
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1840
2123
|
var UserMenu = ({ session }) => {
|
|
1841
2124
|
const { config } = (0, import_elements_react14.useOryFlow)();
|
|
1842
2125
|
const initials = getUserInitials(session);
|
|
1843
|
-
const [logoutFlow, setLogoutFlow] = (0,
|
|
1844
|
-
const fetchLogoutFlow = (0,
|
|
2126
|
+
const [logoutFlow, setLogoutFlow] = (0, import_react9.useState)();
|
|
2127
|
+
const fetchLogoutFlow = (0, import_react9.useCallback)(async () => {
|
|
1845
2128
|
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
1846
2129
|
setLogoutFlow(flow);
|
|
1847
2130
|
}, [config.sdk.url]);
|
|
1848
|
-
(0,
|
|
2131
|
+
(0, import_react9.useEffect)(() => {
|
|
1849
2132
|
void fetchLogoutFlow();
|
|
1850
2133
|
}, [fetchLogoutFlow]);
|
|
1851
|
-
return /* @__PURE__ */ (0,
|
|
1852
|
-
/* @__PURE__ */ (0,
|
|
1853
|
-
/* @__PURE__ */ (0,
|
|
1854
|
-
/* @__PURE__ */ (0,
|
|
1855
|
-
/* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1857
|
-
/* @__PURE__ */ (0,
|
|
1858
|
-
initials.secondary && /* @__PURE__ */ (0,
|
|
2134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenu, { children: [
|
|
2135
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UserAvatar, { initials }) }),
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenuContent, { children: [
|
|
2137
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
2138
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UserAvatar, { disabled: true, initials }),
|
|
2139
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
2141
|
+
initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
1859
2142
|
] })
|
|
1860
2143
|
] }),
|
|
1861
|
-
/* @__PURE__ */ (0,
|
|
1862
|
-
/* @__PURE__ */ (0,
|
|
2144
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("a", { href: "/settings", children: [
|
|
2145
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(settings_default, { size: 16 }),
|
|
1863
2146
|
" User settings"
|
|
1864
2147
|
] }) }),
|
|
1865
|
-
/* @__PURE__ */ (0,
|
|
1866
|
-
/* @__PURE__ */ (0,
|
|
2148
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
2149
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(logout_default, { size: 16 }),
|
|
1867
2150
|
" Logout"
|
|
1868
2151
|
] }) })
|
|
1869
2152
|
] })
|
|
@@ -1872,42 +2155,42 @@ var UserMenu = ({ session }) => {
|
|
|
1872
2155
|
|
|
1873
2156
|
// src/theme/default/components/generic/page-header.tsx
|
|
1874
2157
|
var import_client2 = require("@ory/elements-react/client");
|
|
1875
|
-
var
|
|
2158
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1876
2159
|
var DefaultPageHeader = (_props) => {
|
|
1877
2160
|
const { Card } = (0, import_elements_react15.useComponents)();
|
|
1878
2161
|
const { session } = (0, import_client2.useSession)();
|
|
1879
|
-
return /* @__PURE__ */ (0,
|
|
1880
|
-
/* @__PURE__ */ (0,
|
|
1881
|
-
/* @__PURE__ */ (0,
|
|
2162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
|
|
2163
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Card.Logo, {}) }),
|
|
2164
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserMenu, { session })
|
|
1882
2165
|
] }) }) });
|
|
1883
2166
|
};
|
|
1884
2167
|
|
|
1885
2168
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1886
|
-
var
|
|
2169
|
+
var import_react10 = require("react");
|
|
1887
2170
|
var import_react_hook_form8 = require("react-hook-form");
|
|
1888
2171
|
var import_usehooks_ts2 = require("usehooks-ts");
|
|
1889
2172
|
|
|
1890
2173
|
// src/theme/default/assets/icons/trash.svg
|
|
1891
|
-
var
|
|
1892
|
-
var
|
|
2174
|
+
var React30 = __toESM(require("react"));
|
|
2175
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1893
2176
|
var SvgTrash = (props) => {
|
|
1894
2177
|
var _a, _b;
|
|
1895
|
-
return /* @__PURE__ */ (0,
|
|
2178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
|
|
1896
2179
|
};
|
|
1897
2180
|
var trash_default = SvgTrash;
|
|
1898
2181
|
|
|
1899
2182
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1900
|
-
var
|
|
2183
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1901
2184
|
function DefaultSettingsOidc({
|
|
1902
2185
|
linkButtons,
|
|
1903
2186
|
unlinkButtons
|
|
1904
2187
|
}) {
|
|
1905
2188
|
const hasLinkButtons = linkButtons.length > 0;
|
|
1906
2189
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1907
|
-
return /* @__PURE__ */ (0,
|
|
1908
|
-
hasLinkButtons && /* @__PURE__ */ (0,
|
|
2190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2191
|
+
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
1909
2192
|
const attrs = button.attributes;
|
|
1910
|
-
return /* @__PURE__ */ (0,
|
|
2193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1911
2194
|
DefaultButtonSocial,
|
|
1912
2195
|
{
|
|
1913
2196
|
showLabel: true,
|
|
@@ -1918,12 +2201,12 @@ function DefaultSettingsOidc({
|
|
|
1918
2201
|
attrs.value
|
|
1919
2202
|
);
|
|
1920
2203
|
}) }),
|
|
1921
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0,
|
|
2204
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
1922
2205
|
unlinkButtons.map((button) => {
|
|
1923
2206
|
if (button.attributes.node_type !== "input") {
|
|
1924
2207
|
return null;
|
|
1925
2208
|
}
|
|
1926
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(UnlinkRow, { button }, button.attributes.value);
|
|
1927
2210
|
})
|
|
1928
2211
|
] });
|
|
1929
2212
|
}
|
|
@@ -1940,17 +2223,17 @@ function UnlinkRow({ button }) {
|
|
|
1940
2223
|
button.onClick();
|
|
1941
2224
|
setClicked(true);
|
|
1942
2225
|
};
|
|
1943
|
-
(0,
|
|
2226
|
+
(0, import_react10.useEffect)(() => {
|
|
1944
2227
|
if (!isSubmitting) {
|
|
1945
2228
|
setClicked(false);
|
|
1946
2229
|
}
|
|
1947
2230
|
}, [isSubmitting, setClicked]);
|
|
1948
|
-
return /* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
Logo ? /* @__PURE__ */ (0,
|
|
1951
|
-
/* @__PURE__ */ (0,
|
|
2231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex justify-between", children: [
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
2233
|
+
Logo ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Logo, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(provider_logos_default.generic, { size: 32 }),
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
1952
2235
|
] }),
|
|
1953
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1954
2237
|
"button",
|
|
1955
2238
|
{
|
|
1956
2239
|
...attrs,
|
|
@@ -1959,7 +2242,7 @@ function UnlinkRow({ button }) {
|
|
|
1959
2242
|
disabled: isSubmitting,
|
|
1960
2243
|
className: "relative",
|
|
1961
2244
|
title: `Unlink ${provider}`,
|
|
1962
|
-
children: clicked ? /* @__PURE__ */ (0,
|
|
2245
|
+
children: clicked ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1963
2246
|
trash_default,
|
|
1964
2247
|
{
|
|
1965
2248
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -1974,7 +2257,7 @@ function UnlinkRow({ button }) {
|
|
|
1974
2257
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
1975
2258
|
var import_elements_react16 = require("@ory/elements-react");
|
|
1976
2259
|
var import_react_hook_form9 = require("react-hook-form");
|
|
1977
|
-
var
|
|
2260
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1978
2261
|
function DefaultSettingsPasskey({
|
|
1979
2262
|
triggerButton,
|
|
1980
2263
|
removeButtons
|
|
@@ -1984,8 +2267,8 @@ function DefaultSettingsPasskey({
|
|
|
1984
2267
|
} = (0, import_react_hook_form9.useFormContext)();
|
|
1985
2268
|
const { Node: Node2 } = (0, import_elements_react16.useComponents)();
|
|
1986
2269
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
1987
|
-
return /* @__PURE__ */ (0,
|
|
1988
|
-
/* @__PURE__ */ (0,
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
1989
2272
|
Node2.Button,
|
|
1990
2273
|
{
|
|
1991
2274
|
node: triggerButton,
|
|
@@ -1993,38 +2276,38 @@ function DefaultSettingsPasskey({
|
|
|
1993
2276
|
onClick: triggerButton.onClick
|
|
1994
2277
|
}
|
|
1995
2278
|
) }),
|
|
1996
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
2279
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DefaultHorizontalDivider, {}),
|
|
2281
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1999
2282
|
var _a, _b;
|
|
2000
2283
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2001
2284
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
2002
2285
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
2003
2286
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
2004
|
-
return /* @__PURE__ */ (0,
|
|
2287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
2005
2288
|
"div",
|
|
2006
2289
|
{
|
|
2007
2290
|
className: "flex justify-between gap-6 md:items-center",
|
|
2008
2291
|
children: [
|
|
2009
|
-
/* @__PURE__ */ (0,
|
|
2010
|
-
/* @__PURE__ */ (0,
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2293
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2011
2294
|
passkey_default,
|
|
2012
2295
|
{
|
|
2013
2296
|
size: 32,
|
|
2014
2297
|
className: "text-interface-foreground-default-primary"
|
|
2015
2298
|
}
|
|
2016
2299
|
),
|
|
2017
|
-
/* @__PURE__ */ (0,
|
|
2018
|
-
/* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2300
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2301
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
|
|
2302
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2303
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2021
2304
|
] }),
|
|
2022
|
-
addedAt && /* @__PURE__ */ (0,
|
|
2305
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2023
2306
|
dateStyle: "long"
|
|
2024
2307
|
}).format(new Date(addedAt)) })
|
|
2025
2308
|
] })
|
|
2026
2309
|
] }),
|
|
2027
|
-
/* @__PURE__ */ (0,
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2028
2311
|
"button",
|
|
2029
2312
|
{
|
|
2030
2313
|
...node.attributes,
|
|
@@ -2032,7 +2315,7 @@ function DefaultSettingsPasskey({
|
|
|
2032
2315
|
onClick: node.onClick,
|
|
2033
2316
|
disabled: isSubmitting,
|
|
2034
2317
|
className: "relative",
|
|
2035
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
2318
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
2036
2319
|
trash_default,
|
|
2037
2320
|
{
|
|
2038
2321
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2051,38 +2334,26 @@ function DefaultSettingsPasskey({
|
|
|
2051
2334
|
}
|
|
2052
2335
|
|
|
2053
2336
|
// src/theme/default/assets/icons/download.svg
|
|
2054
|
-
var
|
|
2055
|
-
var
|
|
2337
|
+
var React31 = __toESM(require("react"));
|
|
2338
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2056
2339
|
var SvgDownload = (props) => {
|
|
2057
2340
|
var _a, _b;
|
|
2058
|
-
return /* @__PURE__ */ (0,
|
|
2341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
|
|
2059
2342
|
};
|
|
2060
2343
|
var download_default = SvgDownload;
|
|
2061
2344
|
|
|
2062
|
-
// src/theme/default/assets/icons/eye.svg
|
|
2063
|
-
var React28 = __toESM(require("react"));
|
|
2064
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2065
|
-
var SvgEye = (props) => {
|
|
2066
|
-
var _a, _b;
|
|
2067
|
-
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2068
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
2069
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
2070
|
-
] }) });
|
|
2071
|
-
};
|
|
2072
|
-
var eye_default = SvgEye;
|
|
2073
|
-
|
|
2074
2345
|
// src/theme/default/assets/icons/refresh.svg
|
|
2075
|
-
var
|
|
2076
|
-
var
|
|
2346
|
+
var React32 = __toESM(require("react"));
|
|
2347
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
2077
2348
|
var SvgRefresh = (props) => {
|
|
2078
2349
|
var _a, _b;
|
|
2079
|
-
return /* @__PURE__ */ (0,
|
|
2350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
|
|
2080
2351
|
};
|
|
2081
2352
|
var refresh_default = SvgRefresh;
|
|
2082
2353
|
|
|
2083
2354
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
2084
2355
|
var import_react_hook_form10 = require("react-hook-form");
|
|
2085
|
-
var
|
|
2356
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2086
2357
|
function DefaultSettingsRecoveryCodes({
|
|
2087
2358
|
codes,
|
|
2088
2359
|
regnerateButton,
|
|
@@ -2104,12 +2375,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2104
2375
|
element.click();
|
|
2105
2376
|
};
|
|
2106
2377
|
const hasCodes = codes.length >= 1;
|
|
2107
|
-
return /* @__PURE__ */ (0,
|
|
2108
|
-
codes.length > 0 && /* @__PURE__ */ (0,
|
|
2109
|
-
/* @__PURE__ */ (0,
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2111
|
-
/* @__PURE__ */ (0,
|
|
2112
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0,
|
|
2378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2379
|
+
codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DefaultHorizontalDivider, {}),
|
|
2380
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex gap-4 justify-between", children: [
|
|
2381
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex gap-2", children: [
|
|
2383
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2113
2384
|
"button",
|
|
2114
2385
|
{
|
|
2115
2386
|
...regnerateButton.attributes,
|
|
@@ -2118,7 +2389,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2118
2389
|
onClick: onRegenerate,
|
|
2119
2390
|
disabled: isSubmitting,
|
|
2120
2391
|
"data-loading": isSubmitting,
|
|
2121
|
-
children: /* @__PURE__ */ (0,
|
|
2392
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2122
2393
|
refresh_default,
|
|
2123
2394
|
{
|
|
2124
2395
|
size: 24,
|
|
@@ -2127,7 +2398,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2127
2398
|
)
|
|
2128
2399
|
}
|
|
2129
2400
|
),
|
|
2130
|
-
revealButton && /* @__PURE__ */ (0,
|
|
2401
|
+
revealButton && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2131
2402
|
"button",
|
|
2132
2403
|
{
|
|
2133
2404
|
...revealButton.attributes,
|
|
@@ -2135,7 +2406,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2135
2406
|
className: "ml-auto",
|
|
2136
2407
|
onClick: onReveal,
|
|
2137
2408
|
title: "Reveal recovery codes",
|
|
2138
|
-
children: /* @__PURE__ */ (0,
|
|
2409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2139
2410
|
eye_default,
|
|
2140
2411
|
{
|
|
2141
2412
|
size: 24,
|
|
@@ -2144,7 +2415,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2144
2415
|
)
|
|
2145
2416
|
}
|
|
2146
2417
|
) }),
|
|
2147
|
-
hasCodes && /* @__PURE__ */ (0,
|
|
2418
|
+
hasCodes && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2148
2419
|
"button",
|
|
2149
2420
|
{
|
|
2150
2421
|
onClick: onDownload,
|
|
@@ -2152,7 +2423,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2152
2423
|
className: "ml-auto",
|
|
2153
2424
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
2154
2425
|
title: "Download recovery codes",
|
|
2155
|
-
children: /* @__PURE__ */ (0,
|
|
2426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2156
2427
|
download_default,
|
|
2157
2428
|
{
|
|
2158
2429
|
size: 24,
|
|
@@ -2163,12 +2434,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2163
2434
|
)
|
|
2164
2435
|
] })
|
|
2165
2436
|
] }),
|
|
2166
|
-
hasCodes ? /* @__PURE__ */ (0,
|
|
2437
|
+
hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2167
2438
|
"div",
|
|
2168
2439
|
{
|
|
2169
2440
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
2170
2441
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
2171
|
-
children: codes.map((code) => /* @__PURE__ */ (0,
|
|
2442
|
+
children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { children: code }, code))
|
|
2172
2443
|
}
|
|
2173
2444
|
) }) : null
|
|
2174
2445
|
] });
|
|
@@ -2178,17 +2449,17 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2178
2449
|
var import_elements_react17 = require("@ory/elements-react");
|
|
2179
2450
|
|
|
2180
2451
|
// src/theme/default/assets/icons/qrcode.svg
|
|
2181
|
-
var
|
|
2182
|
-
var
|
|
2452
|
+
var React33 = __toESM(require("react"));
|
|
2453
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2183
2454
|
var SvgQrcode = (props) => {
|
|
2184
2455
|
var _a, _b;
|
|
2185
|
-
return /* @__PURE__ */ (0,
|
|
2456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
2186
2457
|
};
|
|
2187
2458
|
var qrcode_default = SvgQrcode;
|
|
2188
2459
|
|
|
2189
2460
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2190
2461
|
var import_react_hook_form11 = require("react-hook-form");
|
|
2191
|
-
var
|
|
2462
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2192
2463
|
function DefaultSettingsTotp({
|
|
2193
2464
|
totpImage,
|
|
2194
2465
|
totpInput,
|
|
@@ -2208,19 +2479,19 @@ function DefaultSettingsTotp({
|
|
|
2208
2479
|
node_type: _ignoredNodeType,
|
|
2209
2480
|
...buttonAttrs
|
|
2210
2481
|
} = totpUnlink.attributes;
|
|
2211
|
-
return /* @__PURE__ */ (0,
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2214
|
-
/* @__PURE__ */ (0,
|
|
2215
|
-
/* @__PURE__ */ (0,
|
|
2216
|
-
/* @__PURE__ */ (0,
|
|
2482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Card.Divider, {}) }),
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(qrcode_default, { size: 32 }) }),
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2217
2488
|
"button",
|
|
2218
2489
|
{
|
|
2219
2490
|
type: type === "button" ? "button" : "submit",
|
|
2220
2491
|
...buttonAttrs,
|
|
2221
2492
|
onClick: onUnlink,
|
|
2222
2493
|
disabled: isSubmitting,
|
|
2223
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
2494
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2224
2495
|
trash_default,
|
|
2225
2496
|
{
|
|
2226
2497
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2233,9 +2504,9 @@ function DefaultSettingsTotp({
|
|
|
2233
2504
|
] });
|
|
2234
2505
|
}
|
|
2235
2506
|
if (totpImage && totpSecret && totpInput) {
|
|
2236
|
-
return /* @__PURE__ */ (0,
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2238
|
-
/* @__PURE__ */ (0,
|
|
2507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DefaultHorizontalDivider, {}) }),
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2239
2510
|
Node2.Image,
|
|
2240
2511
|
{
|
|
2241
2512
|
node: totpImage,
|
|
@@ -2244,13 +2515,13 @@ function DefaultSettingsTotp({
|
|
|
2244
2515
|
}
|
|
2245
2516
|
}
|
|
2246
2517
|
) }) }) }),
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
2248
|
-
/* @__PURE__ */ (0,
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2249
2520
|
Node2.Label,
|
|
2250
2521
|
{
|
|
2251
2522
|
node: totpSecret,
|
|
2252
2523
|
attributes: totpSecret.attributes,
|
|
2253
|
-
children: /* @__PURE__ */ (0,
|
|
2524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2254
2525
|
Node2.Input,
|
|
2255
2526
|
{
|
|
2256
2527
|
node: totpSecret,
|
|
@@ -2265,12 +2536,12 @@ function DefaultSettingsTotp({
|
|
|
2265
2536
|
)
|
|
2266
2537
|
}
|
|
2267
2538
|
),
|
|
2268
|
-
/* @__PURE__ */ (0,
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2269
2540
|
Node2.Label,
|
|
2270
2541
|
{
|
|
2271
2542
|
attributes: totpInput.attributes,
|
|
2272
2543
|
node: totpInput,
|
|
2273
|
-
children: /* @__PURE__ */ (0,
|
|
2544
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2274
2545
|
Node2.CodeInput,
|
|
2275
2546
|
{
|
|
2276
2547
|
node: totpInput,
|
|
@@ -2288,17 +2559,17 @@ function DefaultSettingsTotp({
|
|
|
2288
2559
|
var import_elements_react18 = require("@ory/elements-react");
|
|
2289
2560
|
|
|
2290
2561
|
// src/theme/default/assets/icons/key.svg
|
|
2291
|
-
var
|
|
2292
|
-
var
|
|
2562
|
+
var React34 = __toESM(require("react"));
|
|
2563
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2293
2564
|
var SvgKey = (props) => {
|
|
2294
2565
|
var _a, _b;
|
|
2295
|
-
return /* @__PURE__ */ (0,
|
|
2566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
|
|
2296
2567
|
};
|
|
2297
2568
|
var key_default = SvgKey;
|
|
2298
2569
|
|
|
2299
2570
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2300
2571
|
var import_react_hook_form12 = require("react-hook-form");
|
|
2301
|
-
var
|
|
2572
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2302
2573
|
function DefaultSettingsWebauthn({
|
|
2303
2574
|
nameInput,
|
|
2304
2575
|
triggerButton,
|
|
@@ -2309,14 +2580,14 @@ function DefaultSettingsWebauthn({
|
|
|
2309
2580
|
} = (0, import_react_hook_form12.useFormContext)();
|
|
2310
2581
|
const { Node: Node2, Card } = (0, import_elements_react18.useComponents)();
|
|
2311
2582
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2312
|
-
return /* @__PURE__ */ (0,
|
|
2313
|
-
/* @__PURE__ */ (0,
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2315
2586
|
Node2.Label,
|
|
2316
2587
|
{
|
|
2317
2588
|
node: nameInput,
|
|
2318
2589
|
attributes: nameInput.attributes,
|
|
2319
|
-
children: /* @__PURE__ */ (0,
|
|
2590
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2320
2591
|
Node2.Input,
|
|
2321
2592
|
{
|
|
2322
2593
|
node: nameInput,
|
|
@@ -2325,7 +2596,7 @@ function DefaultSettingsWebauthn({
|
|
|
2325
2596
|
)
|
|
2326
2597
|
}
|
|
2327
2598
|
) }),
|
|
2328
|
-
triggerButton ? /* @__PURE__ */ (0,
|
|
2599
|
+
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2329
2600
|
Node2.Button,
|
|
2330
2601
|
{
|
|
2331
2602
|
node: triggerButton,
|
|
@@ -2334,38 +2605,38 @@ function DefaultSettingsWebauthn({
|
|
|
2334
2605
|
}
|
|
2335
2606
|
) : null
|
|
2336
2607
|
] }),
|
|
2337
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
2338
|
-
/* @__PURE__ */ (0,
|
|
2339
|
-
/* @__PURE__ */ (0,
|
|
2608
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2609
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card.Divider, {}),
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
2340
2611
|
var _a, _b;
|
|
2341
2612
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2342
2613
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
2343
2614
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
2344
2615
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
2345
|
-
return /* @__PURE__ */ (0,
|
|
2616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
2346
2617
|
"div",
|
|
2347
2618
|
{
|
|
2348
2619
|
className: "flex justify-between gap-6 md:items-center",
|
|
2349
2620
|
children: [
|
|
2350
|
-
/* @__PURE__ */ (0,
|
|
2351
|
-
/* @__PURE__ */ (0,
|
|
2621
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2622
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2352
2623
|
key_default,
|
|
2353
2624
|
{
|
|
2354
2625
|
size: 32,
|
|
2355
2626
|
className: "text-interface-foreground-default-primary"
|
|
2356
2627
|
}
|
|
2357
2628
|
),
|
|
2358
|
-
/* @__PURE__ */ (0,
|
|
2359
|
-
/* @__PURE__ */ (0,
|
|
2360
|
-
/* @__PURE__ */ (0,
|
|
2361
|
-
/* @__PURE__ */ (0,
|
|
2629
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2630
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
|
|
2631
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2362
2633
|
] }),
|
|
2363
|
-
addedAt && /* @__PURE__ */ (0,
|
|
2634
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2364
2635
|
dateStyle: "long"
|
|
2365
2636
|
}).format(new Date(addedAt)) })
|
|
2366
2637
|
] })
|
|
2367
2638
|
] }),
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2639
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2369
2640
|
"button",
|
|
2370
2641
|
{
|
|
2371
2642
|
...node.attributes,
|
|
@@ -2373,7 +2644,7 @@ function DefaultSettingsWebauthn({
|
|
|
2373
2644
|
onClick: node.onClick,
|
|
2374
2645
|
disabled: isSubmitting,
|
|
2375
2646
|
className: "relative",
|
|
2376
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
2647
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2377
2648
|
trash_default,
|
|
2378
2649
|
{
|
|
2379
2650
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2392,119 +2663,38 @@ function DefaultSettingsWebauthn({
|
|
|
2392
2663
|
}
|
|
2393
2664
|
|
|
2394
2665
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
2395
|
-
var
|
|
2666
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
2396
2667
|
function DefaultAuthMethodListContainer({
|
|
2397
2668
|
children
|
|
2398
2669
|
}) {
|
|
2399
|
-
return /* @__PURE__ */ (0,
|
|
2670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
|
|
2400
2671
|
}
|
|
2401
2672
|
|
|
2402
2673
|
// src/theme/default/components/form/captcha.tsx
|
|
2403
2674
|
var import_client_fetch30 = require("@ory/client-fetch");
|
|
2404
2675
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
2405
|
-
var
|
|
2676
|
+
var import_react14 = require("react");
|
|
2406
2677
|
var import_react_hook_form25 = require("react-hook-form");
|
|
2407
2678
|
|
|
2408
|
-
// src/context/component.tsx
|
|
2409
|
-
var import_client_fetch12 = require("@ory/client-fetch");
|
|
2410
|
-
var import_react8 = require("react");
|
|
2411
|
-
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2412
|
-
var ComponentContext = (0, import_react8.createContext)({
|
|
2413
|
-
components: null,
|
|
2414
|
-
// fine because we throw an error if it's not provided
|
|
2415
|
-
nodeSorter: () => 0,
|
|
2416
|
-
groupSorter: () => 0
|
|
2417
|
-
});
|
|
2418
|
-
function useComponents7() {
|
|
2419
|
-
const ctx = (0, import_react8.useContext)(ComponentContext);
|
|
2420
|
-
if (!ctx) {
|
|
2421
|
-
throw new Error("useComponents must be used within a ComponentProvider");
|
|
2422
|
-
}
|
|
2423
|
-
return ctx.components;
|
|
2424
|
-
}
|
|
2425
|
-
var defaultGroupOrder = [
|
|
2426
|
-
import_client_fetch12.UiNodeGroupEnum.Default,
|
|
2427
|
-
import_client_fetch12.UiNodeGroupEnum.Profile,
|
|
2428
|
-
import_client_fetch12.UiNodeGroupEnum.Password,
|
|
2429
|
-
import_client_fetch12.UiNodeGroupEnum.Oidc,
|
|
2430
|
-
import_client_fetch12.UiNodeGroupEnum.Code,
|
|
2431
|
-
import_client_fetch12.UiNodeGroupEnum.LookupSecret,
|
|
2432
|
-
import_client_fetch12.UiNodeGroupEnum.Passkey,
|
|
2433
|
-
import_client_fetch12.UiNodeGroupEnum.Webauthn,
|
|
2434
|
-
import_client_fetch12.UiNodeGroupEnum.Totp
|
|
2435
|
-
];
|
|
2436
|
-
|
|
2437
2679
|
// src/context/flow-context.tsx
|
|
2438
|
-
var
|
|
2680
|
+
var import_react12 = require("react");
|
|
2439
2681
|
|
|
2440
2682
|
// src/context/form-state.ts
|
|
2441
2683
|
var import_client_fetch15 = require("@ory/client-fetch");
|
|
2442
|
-
var
|
|
2684
|
+
var import_react11 = require("react");
|
|
2443
2685
|
|
|
2444
2686
|
// src/components/card/card-two-step.utils.ts
|
|
2445
|
-
var import_client_fetch13 = require("@ory/client-fetch");
|
|
2446
|
-
|
|
2447
|
-
// src/util/ui/index.ts
|
|
2448
2687
|
var import_client_fetch14 = require("@ory/client-fetch");
|
|
2449
|
-
var import_react9 = require("react");
|
|
2450
|
-
function triggerToWindowCall(trigger) {
|
|
2451
|
-
if (!trigger) {
|
|
2452
|
-
return;
|
|
2453
|
-
}
|
|
2454
|
-
const fn = triggerToFunction(trigger);
|
|
2455
|
-
if (fn) {
|
|
2456
|
-
fn();
|
|
2457
|
-
return;
|
|
2458
|
-
}
|
|
2459
|
-
let i = 0;
|
|
2460
|
-
const ms = 100;
|
|
2461
|
-
const interval = setInterval(() => {
|
|
2462
|
-
i++;
|
|
2463
|
-
if (i > 100) {
|
|
2464
|
-
clearInterval(interval);
|
|
2465
|
-
throw new Error(
|
|
2466
|
-
"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."
|
|
2467
|
-
);
|
|
2468
|
-
}
|
|
2469
|
-
const fn2 = triggerToFunction(trigger);
|
|
2470
|
-
if (fn2) {
|
|
2471
|
-
clearInterval(interval);
|
|
2472
|
-
return fn2();
|
|
2473
|
-
}
|
|
2474
|
-
}, ms);
|
|
2475
|
-
return;
|
|
2476
|
-
}
|
|
2477
|
-
function triggerToFunction(trigger) {
|
|
2478
|
-
if (typeof window === "undefined") {
|
|
2479
|
-
console.debug(
|
|
2480
|
-
"The Ory SDK is missing a required function: window is undefined."
|
|
2481
|
-
);
|
|
2482
|
-
return void 0;
|
|
2483
|
-
}
|
|
2484
|
-
const typedWindow = window;
|
|
2485
|
-
if (!(trigger in typedWindow) || !typedWindow[trigger]) {
|
|
2486
|
-
console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
|
|
2487
|
-
return void 0;
|
|
2488
|
-
}
|
|
2489
|
-
const triggerFn = typedWindow[trigger];
|
|
2490
|
-
if (typeof triggerFn !== "function") {
|
|
2491
|
-
console.debug(
|
|
2492
|
-
`The Ory SDK is missing a required function: ${trigger}. It is not a function.`
|
|
2493
|
-
);
|
|
2494
|
-
return void 0;
|
|
2495
|
-
}
|
|
2496
|
-
return triggerFn;
|
|
2497
|
-
}
|
|
2498
2688
|
|
|
2499
2689
|
// src/context/flow-context.tsx
|
|
2500
|
-
var
|
|
2501
|
-
var OryFlowContext = (0,
|
|
2690
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
2691
|
+
var OryFlowContext = (0, import_react12.createContext)(null);
|
|
2502
2692
|
|
|
2503
2693
|
// src/context/intl-context.tsx
|
|
2504
2694
|
var import_react_intl20 = require("react-intl");
|
|
2505
2695
|
|
|
2506
2696
|
// src/components/card/header.tsx
|
|
2507
|
-
var
|
|
2697
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
2508
2698
|
|
|
2509
2699
|
// src/components/form/form-provider.tsx
|
|
2510
2700
|
var import_client_fetch18 = require("@ory/client-fetch");
|
|
@@ -2517,16 +2707,16 @@ var import_client_fetch16 = require("@ory/client-fetch");
|
|
|
2517
2707
|
var import_client_fetch17 = require("@ory/client-fetch");
|
|
2518
2708
|
|
|
2519
2709
|
// src/components/form/form-provider.tsx
|
|
2520
|
-
var
|
|
2710
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
2521
2711
|
|
|
2522
2712
|
// src/components/card/card.tsx
|
|
2523
|
-
var
|
|
2713
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
2524
2714
|
|
|
2525
2715
|
// src/components/card/footer.tsx
|
|
2526
|
-
var
|
|
2716
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
2527
2717
|
|
|
2528
2718
|
// src/components/card/content.tsx
|
|
2529
|
-
var
|
|
2719
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
2530
2720
|
|
|
2531
2721
|
// src/components/card/card-two-step.tsx
|
|
2532
2722
|
var import_client_fetch27 = require("@ory/client-fetch");
|
|
@@ -2557,34 +2747,34 @@ var import_client_fetch22 = require("@ory/client-fetch");
|
|
|
2557
2747
|
var import_client_fetch23 = require("@ory/client-fetch");
|
|
2558
2748
|
|
|
2559
2749
|
// src/components/form/form.tsx
|
|
2560
|
-
var
|
|
2750
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
2561
2751
|
|
|
2562
2752
|
// src/components/form/messages.tsx
|
|
2563
|
-
var
|
|
2753
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
2564
2754
|
|
|
2565
2755
|
// src/components/form/nodes/node.tsx
|
|
2566
2756
|
var import_client_fetch26 = require("@ory/client-fetch");
|
|
2567
|
-
var
|
|
2757
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
2568
2758
|
|
|
2569
2759
|
// src/components/form/social.tsx
|
|
2570
2760
|
var import_react_hook_form16 = require("react-hook-form");
|
|
2571
|
-
var
|
|
2761
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
2572
2762
|
|
|
2573
2763
|
// src/components/card/card-two-step.tsx
|
|
2574
|
-
var
|
|
2764
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
2575
2765
|
|
|
2576
2766
|
// src/components/form/groups.tsx
|
|
2577
|
-
var
|
|
2767
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
2578
2768
|
|
|
2579
2769
|
// src/components/form/section.tsx
|
|
2580
2770
|
var import_react_hook_form18 = require("react-hook-form");
|
|
2581
|
-
var
|
|
2771
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
2582
2772
|
|
|
2583
2773
|
// src/components/generic/divider.tsx
|
|
2584
|
-
var
|
|
2774
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
2585
2775
|
|
|
2586
2776
|
// src/components/generic/page-header.tsx
|
|
2587
|
-
var
|
|
2777
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
2588
2778
|
|
|
2589
2779
|
// src/components/settings/settings-card.tsx
|
|
2590
2780
|
var import_client_fetch28 = require("@ory/client-fetch");
|
|
@@ -2593,48 +2783,48 @@ var import_react_intl19 = require("react-intl");
|
|
|
2593
2783
|
// src/components/settings/oidc-settings.tsx
|
|
2594
2784
|
var import_react_intl14 = require("react-intl");
|
|
2595
2785
|
var import_react_hook_form19 = require("react-hook-form");
|
|
2596
|
-
var
|
|
2786
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
2597
2787
|
|
|
2598
2788
|
// src/components/settings/passkey-settings.tsx
|
|
2599
2789
|
var import_react_hook_form20 = require("react-hook-form");
|
|
2600
2790
|
var import_react_intl15 = require("react-intl");
|
|
2601
|
-
var
|
|
2791
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
2602
2792
|
|
|
2603
2793
|
// src/components/settings/recovery-codes-settings.tsx
|
|
2604
2794
|
var import_react_intl16 = require("react-intl");
|
|
2605
2795
|
var import_react_hook_form21 = require("react-hook-form");
|
|
2606
|
-
var
|
|
2796
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
2607
2797
|
|
|
2608
2798
|
// src/components/settings/totp-settings.tsx
|
|
2609
2799
|
var import_react_hook_form22 = require("react-hook-form");
|
|
2610
2800
|
var import_react_intl17 = require("react-intl");
|
|
2611
|
-
var
|
|
2801
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
2612
2802
|
|
|
2613
2803
|
// src/components/settings/webauthn-settings.tsx
|
|
2614
2804
|
var import_react_hook_form23 = require("react-hook-form");
|
|
2615
2805
|
var import_react_intl18 = require("react-intl");
|
|
2616
|
-
var
|
|
2806
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
2617
2807
|
|
|
2618
2808
|
// src/components/settings/settings-card.tsx
|
|
2619
|
-
var
|
|
2809
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
2620
2810
|
|
|
2621
2811
|
// src/context/intl-context.tsx
|
|
2622
|
-
var
|
|
2812
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
2623
2813
|
|
|
2624
2814
|
// src/context/provider.tsx
|
|
2625
|
-
var
|
|
2815
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
2626
2816
|
|
|
2627
2817
|
// src/components/form/nodes/input.tsx
|
|
2628
2818
|
var import_client_fetch29 = require("@ory/client-fetch");
|
|
2629
|
-
var
|
|
2819
|
+
var import_react13 = require("react");
|
|
2630
2820
|
var import_react_hook_form24 = require("react-hook-form");
|
|
2631
|
-
var
|
|
2821
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
2632
2822
|
var NodeInput = ({
|
|
2633
2823
|
node,
|
|
2634
2824
|
attributes
|
|
2635
2825
|
}) => {
|
|
2636
2826
|
var _a;
|
|
2637
|
-
const { Node: Node2 } =
|
|
2827
|
+
const { Node: Node2 } = useComponents();
|
|
2638
2828
|
const { setValue } = (0, import_react_hook_form24.useFormContext)();
|
|
2639
2829
|
const {
|
|
2640
2830
|
onloadTrigger,
|
|
@@ -2652,8 +2842,8 @@ var NodeInput = ({
|
|
|
2652
2842
|
setValue(attrs.name, attrs.value);
|
|
2653
2843
|
}
|
|
2654
2844
|
};
|
|
2655
|
-
const hasRun = (0,
|
|
2656
|
-
(0,
|
|
2845
|
+
const hasRun = (0, import_react13.useRef)(false);
|
|
2846
|
+
(0, import_react13.useEffect)(
|
|
2657
2847
|
() => {
|
|
2658
2848
|
setFormValue();
|
|
2659
2849
|
if (!hasRun.current && onloadTrigger) {
|
|
@@ -2682,30 +2872,30 @@ var NodeInput = ({
|
|
|
2682
2872
|
if (isResendNode || isScreenSelectionNode) {
|
|
2683
2873
|
return null;
|
|
2684
2874
|
}
|
|
2685
|
-
return /* @__PURE__ */ (0,
|
|
2875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
2686
2876
|
Node2.Label,
|
|
2687
2877
|
{
|
|
2688
2878
|
attributes: { ...attrs, label: void 0 },
|
|
2689
2879
|
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2690
|
-
children: /* @__PURE__ */ (0,
|
|
2880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Button, { attributes: attrs, node, onClick: handleClick })
|
|
2691
2881
|
}
|
|
2692
2882
|
);
|
|
2693
2883
|
case import_client_fetch29.UiNodeInputAttributesTypeEnum.DatetimeLocal:
|
|
2694
2884
|
throw new Error("Not implemented");
|
|
2695
2885
|
case import_client_fetch29.UiNodeInputAttributesTypeEnum.Checkbox:
|
|
2696
|
-
return /* @__PURE__ */ (0,
|
|
2886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
2697
2887
|
Node2.Label,
|
|
2698
2888
|
{
|
|
2699
2889
|
attributes: { ...attrs, label: void 0 },
|
|
2700
2890
|
node: { ...node, meta: { ...node.meta, label: void 0 } },
|
|
2701
|
-
children: /* @__PURE__ */ (0,
|
|
2891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
|
|
2702
2892
|
}
|
|
2703
2893
|
);
|
|
2704
2894
|
case import_client_fetch29.UiNodeInputAttributesTypeEnum.Hidden:
|
|
2705
|
-
return /* @__PURE__ */ (0,
|
|
2895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Input, { attributes: attrs, node, onClick: handleClick });
|
|
2706
2896
|
default:
|
|
2707
2897
|
if (isPinCodeInput) {
|
|
2708
|
-
return /* @__PURE__ */ (0,
|
|
2898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
2709
2899
|
Node2.CodeInput,
|
|
2710
2900
|
{
|
|
2711
2901
|
attributes: attrs,
|
|
@@ -2714,25 +2904,25 @@ var NodeInput = ({
|
|
|
2714
2904
|
}
|
|
2715
2905
|
) });
|
|
2716
2906
|
}
|
|
2717
|
-
return /* @__PURE__ */ (0,
|
|
2907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
|
|
2718
2908
|
}
|
|
2719
2909
|
};
|
|
2720
2910
|
|
|
2721
2911
|
// src/theme/default/components/form/captcha.tsx
|
|
2722
|
-
var
|
|
2912
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
2723
2913
|
var DefaultCaptcha = ({ node }) => {
|
|
2724
2914
|
const { setValue } = (0, import_react_hook_form25.useFormContext)();
|
|
2725
|
-
const ref = (0,
|
|
2915
|
+
const ref = (0, import_react14.useRef)();
|
|
2726
2916
|
const nodes = [];
|
|
2727
2917
|
if ((0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes)) {
|
|
2728
2918
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2729
|
-
nodes.push(/* @__PURE__ */ (0,
|
|
2919
|
+
nodes.push(/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NodeInput, { node, attributes: node.attributes }, 1));
|
|
2730
2920
|
}
|
|
2731
2921
|
}
|
|
2732
2922
|
if ((0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2733
2923
|
const options = JSON.parse(node.attributes.value);
|
|
2734
2924
|
nodes.push(
|
|
2735
|
-
/* @__PURE__ */ (0,
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
2736
2926
|
import_react_turnstile.Turnstile,
|
|
2737
2927
|
{
|
|
2738
2928
|
ref,
|
|
@@ -2809,18 +2999,18 @@ function getOryComponents(overrides) {
|
|
|
2809
2999
|
}
|
|
2810
3000
|
|
|
2811
3001
|
// src/theme/default/flows/error.tsx
|
|
2812
|
-
var
|
|
3002
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
2813
3003
|
function Error2({
|
|
2814
3004
|
error,
|
|
2815
3005
|
children
|
|
2816
3006
|
}) {
|
|
2817
|
-
return /* @__PURE__ */ (0,
|
|
3007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
|
|
2818
3008
|
}
|
|
2819
3009
|
|
|
2820
3010
|
// src/theme/default/flows/login.tsx
|
|
2821
3011
|
var import_client_fetch31 = require("@ory/client-fetch");
|
|
2822
3012
|
var import_elements_react19 = require("@ory/elements-react");
|
|
2823
|
-
var
|
|
3013
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
2824
3014
|
function Login({
|
|
2825
3015
|
flow,
|
|
2826
3016
|
config,
|
|
@@ -2828,14 +3018,14 @@ function Login({
|
|
|
2828
3018
|
components: flowOverrideComponents
|
|
2829
3019
|
}) {
|
|
2830
3020
|
const components = getOryComponents(flowOverrideComponents);
|
|
2831
|
-
return /* @__PURE__ */ (0,
|
|
3021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
2832
3022
|
import_elements_react19.OryProvider,
|
|
2833
3023
|
{
|
|
2834
3024
|
config,
|
|
2835
3025
|
flow,
|
|
2836
3026
|
flowType: import_client_fetch31.FlowType.Login,
|
|
2837
3027
|
components,
|
|
2838
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
3028
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_elements_react19.OryTwoStepCard, {})
|
|
2839
3029
|
}
|
|
2840
3030
|
);
|
|
2841
3031
|
}
|
|
@@ -2843,7 +3033,7 @@ function Login({
|
|
|
2843
3033
|
// src/theme/default/flows/recovery.tsx
|
|
2844
3034
|
var import_client_fetch32 = require("@ory/client-fetch");
|
|
2845
3035
|
var import_elements_react20 = require("@ory/elements-react");
|
|
2846
|
-
var
|
|
3036
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
2847
3037
|
function Recovery({
|
|
2848
3038
|
flow,
|
|
2849
3039
|
config,
|
|
@@ -2851,14 +3041,14 @@ function Recovery({
|
|
|
2851
3041
|
components: flowOverrideComponents
|
|
2852
3042
|
}) {
|
|
2853
3043
|
const components = getOryComponents(flowOverrideComponents);
|
|
2854
|
-
return /* @__PURE__ */ (0,
|
|
3044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
2855
3045
|
import_elements_react20.OryProvider,
|
|
2856
3046
|
{
|
|
2857
3047
|
config,
|
|
2858
3048
|
flow,
|
|
2859
3049
|
flowType: import_client_fetch32.FlowType.Recovery,
|
|
2860
3050
|
components,
|
|
2861
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
3051
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_elements_react20.OryTwoStepCard, {})
|
|
2862
3052
|
}
|
|
2863
3053
|
);
|
|
2864
3054
|
}
|
|
@@ -2866,7 +3056,7 @@ function Recovery({
|
|
|
2866
3056
|
// src/theme/default/flows/registration.tsx
|
|
2867
3057
|
var import_client_fetch33 = require("@ory/client-fetch");
|
|
2868
3058
|
var import_elements_react21 = require("@ory/elements-react");
|
|
2869
|
-
var
|
|
3059
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
2870
3060
|
function Registration({
|
|
2871
3061
|
flow,
|
|
2872
3062
|
children,
|
|
@@ -2874,14 +3064,14 @@ function Registration({
|
|
|
2874
3064
|
config
|
|
2875
3065
|
}) {
|
|
2876
3066
|
const components = getOryComponents(flowOverrideComponents);
|
|
2877
|
-
return /* @__PURE__ */ (0,
|
|
3067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
2878
3068
|
import_elements_react21.OryProvider,
|
|
2879
3069
|
{
|
|
2880
3070
|
config,
|
|
2881
3071
|
flow,
|
|
2882
3072
|
flowType: import_client_fetch33.FlowType.Registration,
|
|
2883
3073
|
components,
|
|
2884
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
3074
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_elements_react21.OryTwoStepCard, {})
|
|
2885
3075
|
}
|
|
2886
3076
|
);
|
|
2887
3077
|
}
|
|
@@ -2889,7 +3079,7 @@ function Registration({
|
|
|
2889
3079
|
// src/theme/default/flows/settings.tsx
|
|
2890
3080
|
var import_client_fetch34 = require("@ory/client-fetch");
|
|
2891
3081
|
var import_elements_react22 = require("@ory/elements-react");
|
|
2892
|
-
var
|
|
3082
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
2893
3083
|
function Settings({
|
|
2894
3084
|
flow,
|
|
2895
3085
|
config,
|
|
@@ -2897,16 +3087,16 @@ function Settings({
|
|
|
2897
3087
|
components: flowOverrideComponents
|
|
2898
3088
|
}) {
|
|
2899
3089
|
const components = getOryComponents(flowOverrideComponents);
|
|
2900
|
-
return /* @__PURE__ */ (0,
|
|
3090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
2901
3091
|
import_elements_react22.OryProvider,
|
|
2902
3092
|
{
|
|
2903
3093
|
config,
|
|
2904
3094
|
flow,
|
|
2905
3095
|
flowType: import_client_fetch34.FlowType.Settings,
|
|
2906
3096
|
components,
|
|
2907
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
2908
|
-
/* @__PURE__ */ (0,
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
3097
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_elements_react22.HeadlessPageHeader, {}),
|
|
3099
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_elements_react22.OrySettingsCard, {})
|
|
2910
3100
|
] })
|
|
2911
3101
|
}
|
|
2912
3102
|
);
|
|
@@ -2915,7 +3105,7 @@ function Settings({
|
|
|
2915
3105
|
// src/theme/default/flows/verification.tsx
|
|
2916
3106
|
var import_client_fetch35 = require("@ory/client-fetch");
|
|
2917
3107
|
var import_elements_react23 = require("@ory/elements-react");
|
|
2918
|
-
var
|
|
3108
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
2919
3109
|
function Verification({
|
|
2920
3110
|
flow,
|
|
2921
3111
|
config,
|
|
@@ -2923,14 +3113,14 @@ function Verification({
|
|
|
2923
3113
|
components: flowOverrideComponents
|
|
2924
3114
|
}) {
|
|
2925
3115
|
const components = getOryComponents(flowOverrideComponents);
|
|
2926
|
-
return /* @__PURE__ */ (0,
|
|
3116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
2927
3117
|
import_elements_react23.OryProvider,
|
|
2928
3118
|
{
|
|
2929
3119
|
config,
|
|
2930
3120
|
flow,
|
|
2931
3121
|
flowType: import_client_fetch35.FlowType.Verification,
|
|
2932
3122
|
components,
|
|
2933
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
3123
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
2934
3124
|
}
|
|
2935
3125
|
);
|
|
2936
3126
|
}
|