@ory/elements-react 1.0.0-next.14 → 1.0.0-next.16
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 +41 -0
- package/api-report/elements-react-theme.api.json +33 -0
- package/api-report/elements-react-theme.api.md +5 -2
- package/api-report/elements-react.api.json +115 -107
- package/api-report/elements-react.api.md +27 -12
- package/dist/index.d.mts +87 -71
- package/dist/index.d.ts +87 -71
- package/dist/index.js +505 -437
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +507 -439
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +62 -2
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +3 -1
- package/dist/theme/default/index.d.ts +3 -1
- package/dist/theme/default/index.js +884 -757
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +837 -709
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +2 -2
- package/tailwind.config.ts +1 -1
- package/api-report/temp/elements-react-client.api.md +0 -22
- package/api-report/temp/elements-react-theme.api.md +0 -131
- package/api-report/temp/elements-react.api.md +0 -406
|
@@ -36,6 +36,7 @@ __export(default_exports, {
|
|
|
36
36
|
DefaultCardFooter: () => DefaultCardFooter,
|
|
37
37
|
DefaultCardHeader: () => DefaultCardHeader,
|
|
38
38
|
DefaultCardLogo: () => DefaultCardLogo,
|
|
39
|
+
DefaultCurrentIdentifierButton: () => DefaultCurrentIdentifierButton,
|
|
39
40
|
DefaultFormContainer: () => DefaultFormContainer,
|
|
40
41
|
DefaultMessage: () => DefaultMessage,
|
|
41
42
|
DefaultMessageContainer: () => DefaultMessageContainer,
|
|
@@ -89,8 +90,9 @@ function DefaultCardContent({ children }) {
|
|
|
89
90
|
|
|
90
91
|
// src/theme/default/components/card/footer.tsx
|
|
91
92
|
var import_client_fetch = require("@ory/client-fetch");
|
|
92
|
-
var import_react_intl = require("react-intl");
|
|
93
93
|
var import_elements_react = require("@ory/elements-react");
|
|
94
|
+
var import_react_hook_form = require("react-hook-form");
|
|
95
|
+
var import_react_intl = require("react-intl");
|
|
94
96
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
95
97
|
function DefaultCardFooter() {
|
|
96
98
|
const { flowType } = (0, import_elements_react.useOryFlow)();
|
|
@@ -114,9 +116,9 @@ function getReturnToQueryParam() {
|
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
function LoginCardFooter() {
|
|
117
|
-
const { config } = (0, import_elements_react.useOryFlow)();
|
|
119
|
+
const { config, formState } = (0, import_elements_react.useOryFlow)();
|
|
118
120
|
const intl = (0, import_react_intl.useIntl)();
|
|
119
|
-
if (!config.project.registration_enabled) {
|
|
121
|
+
if (!config.project.registration_enabled || formState.current !== "provide_identifier") {
|
|
120
122
|
return null;
|
|
121
123
|
}
|
|
122
124
|
let registrationLink = `${config.sdk.url}/self-service/registration/browser`;
|
|
@@ -143,15 +145,42 @@ function LoginCardFooter() {
|
|
|
143
145
|
)
|
|
144
146
|
] });
|
|
145
147
|
}
|
|
148
|
+
function findScreenSelectionButton(nodes) {
|
|
149
|
+
return nodes.find(
|
|
150
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
151
|
+
);
|
|
152
|
+
}
|
|
146
153
|
function RegistrationCardFooter() {
|
|
147
154
|
const intl = (0, import_react_intl.useIntl)();
|
|
148
|
-
const { config } = (0, import_elements_react.useOryFlow)();
|
|
155
|
+
const { config, flow, formState } = (0, import_elements_react.useOryFlow)();
|
|
156
|
+
const { setValue } = (0, import_react_hook_form.useFormContext)();
|
|
157
|
+
if (formState.current === "select_method") {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
161
|
+
function handleScreenSelection() {
|
|
162
|
+
setValue("method", "profile");
|
|
163
|
+
if (screenSelectionNode) {
|
|
164
|
+
setValue("screen", "credential-selection");
|
|
165
|
+
}
|
|
166
|
+
}
|
|
149
167
|
let loginLink = `${config.sdk.url}/self-service/login/browser`;
|
|
150
168
|
const returnTo = getReturnToQueryParam();
|
|
151
169
|
if (returnTo) {
|
|
152
170
|
loginLink += `?return_to=${returnTo}`;
|
|
153
171
|
}
|
|
154
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-sm font-normal antialiased leading-normal", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
173
|
+
"button",
|
|
174
|
+
{
|
|
175
|
+
className: "font-medium text-links-link-default",
|
|
176
|
+
type: "submit",
|
|
177
|
+
onClick: handleScreenSelection,
|
|
178
|
+
children: intl.formatMessage({
|
|
179
|
+
id: "card.footer.select-another-method",
|
|
180
|
+
defaultMessage: "Select another method"
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
155
184
|
intl.formatMessage({
|
|
156
185
|
id: "registration.login-label",
|
|
157
186
|
defaultMessage: "Already have an account?"
|
|
@@ -168,7 +197,7 @@ function RegistrationCardFooter() {
|
|
|
168
197
|
})
|
|
169
198
|
}
|
|
170
199
|
)
|
|
171
|
-
] });
|
|
200
|
+
] }) });
|
|
172
201
|
}
|
|
173
202
|
function RecoveryCardFooter() {
|
|
174
203
|
return null;
|
|
@@ -178,7 +207,7 @@ function VerificationCardFooter() {
|
|
|
178
207
|
}
|
|
179
208
|
|
|
180
209
|
// src/theme/default/components/card/header.tsx
|
|
181
|
-
var
|
|
210
|
+
var import_elements_react3 = require("@ory/elements-react");
|
|
182
211
|
|
|
183
212
|
// src/theme/default/utils/constructCardHeader.ts
|
|
184
213
|
var import_client_fetch2 = require("@ory/client-fetch");
|
|
@@ -198,6 +227,18 @@ function useCardHeaderText(nodes, opts) {
|
|
|
198
227
|
const intl = (0, import_react_intl2.useIntl)();
|
|
199
228
|
switch (opts.flowType) {
|
|
200
229
|
case import_client_fetch2.FlowType.Recovery:
|
|
230
|
+
if (nodes.find(
|
|
231
|
+
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
232
|
+
)) {
|
|
233
|
+
return {
|
|
234
|
+
title: intl.formatMessage({
|
|
235
|
+
id: "recovery.title"
|
|
236
|
+
}),
|
|
237
|
+
description: intl.formatMessage({
|
|
238
|
+
id: "identities.messages.1060003"
|
|
239
|
+
})
|
|
240
|
+
};
|
|
241
|
+
}
|
|
201
242
|
return {
|
|
202
243
|
title: intl.formatMessage({
|
|
203
244
|
id: "recovery.title"
|
|
@@ -216,6 +257,18 @@ function useCardHeaderText(nodes, opts) {
|
|
|
216
257
|
})
|
|
217
258
|
};
|
|
218
259
|
case import_client_fetch2.FlowType.Verification:
|
|
260
|
+
if (nodes.find(
|
|
261
|
+
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
262
|
+
)) {
|
|
263
|
+
return {
|
|
264
|
+
title: intl.formatMessage({
|
|
265
|
+
id: "verification.title"
|
|
266
|
+
}),
|
|
267
|
+
description: intl.formatMessage({
|
|
268
|
+
id: "identities.messages.1080003"
|
|
269
|
+
})
|
|
270
|
+
};
|
|
271
|
+
}
|
|
219
272
|
return {
|
|
220
273
|
title: intl.formatMessage({
|
|
221
274
|
id: "verification.title"
|
|
@@ -337,44 +390,139 @@ function useCardHeaderText(nodes, opts) {
|
|
|
337
390
|
};
|
|
338
391
|
}
|
|
339
392
|
|
|
340
|
-
// src/theme/default/components/card/
|
|
393
|
+
// src/theme/default/components/card/current-identifier-button.tsx
|
|
394
|
+
var import_client_fetch3 = require("@ory/client-fetch");
|
|
395
|
+
var import_elements_react2 = require("@ory/elements-react");
|
|
396
|
+
|
|
397
|
+
// src/theme/default/assets/icons/arrow-left.svg
|
|
398
|
+
var React3 = __toESM(require("react"));
|
|
341
399
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
400
|
+
var SvgArrowLeft = (props) => {
|
|
401
|
+
var _a, _b;
|
|
402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.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_runtime5.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
403
|
+
};
|
|
404
|
+
var arrow_left_default = SvgArrowLeft;
|
|
405
|
+
|
|
406
|
+
// src/theme/default/utils/attributes.ts
|
|
407
|
+
function omit(obj, keys) {
|
|
408
|
+
const ret = { ...obj };
|
|
409
|
+
for (const key of keys) {
|
|
410
|
+
delete ret[key];
|
|
411
|
+
}
|
|
412
|
+
return ret;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// src/theme/default/components/card/current-identifier-button.tsx
|
|
416
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
417
|
+
function DefaultCurrentIdentifierButton() {
|
|
418
|
+
const {
|
|
419
|
+
flow: { ui },
|
|
420
|
+
flowType,
|
|
421
|
+
config,
|
|
422
|
+
formState
|
|
423
|
+
} = (0, import_elements_react2.useOryFlow)();
|
|
424
|
+
if (formState.current === "provide_identifier") {
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
427
|
+
const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
|
|
428
|
+
if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
const initFlowUrl = `${config.sdk.url}/self-service/${flowType}/browser`;
|
|
432
|
+
const attributes = omit(nodeBackButton.attributes, [
|
|
433
|
+
"autocomplete",
|
|
434
|
+
"node_type"
|
|
435
|
+
]);
|
|
436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
437
|
+
"a",
|
|
438
|
+
{
|
|
439
|
+
className: "cursor-pointer py-[5px] px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default hover:border-button-identifier-border-hover hover:bg-button-identifier-bg-hover transition-colors inline-flex gap-1 items-center self-start max-w-full",
|
|
440
|
+
...attributes,
|
|
441
|
+
href: initFlowUrl,
|
|
442
|
+
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
|
|
443
|
+
children: [
|
|
444
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
445
|
+
arrow_left_default,
|
|
446
|
+
{
|
|
447
|
+
size: 16,
|
|
448
|
+
className: "text-button-identifier-fg-subtle shrink-0"
|
|
449
|
+
}
|
|
450
|
+
),
|
|
451
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-sm font-medium text-button-identifier-fg-default text-ellipsis overflow-hidden text-nowrap", children: nodeBackButton == null ? void 0 : nodeBackButton.attributes.value })
|
|
452
|
+
]
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
function getBackButtonNode(flowType, nodes) {
|
|
457
|
+
let nodeBackButton;
|
|
458
|
+
switch (flowType) {
|
|
459
|
+
case import_client_fetch3.FlowType.Login:
|
|
460
|
+
nodeBackButton = nodes.find(
|
|
461
|
+
(node) => "name" in node.attributes && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
462
|
+
);
|
|
463
|
+
break;
|
|
464
|
+
case import_client_fetch3.FlowType.Registration:
|
|
465
|
+
nodeBackButton = guessRegistrationBackButton(nodes);
|
|
466
|
+
break;
|
|
467
|
+
case import_client_fetch3.FlowType.Recovery:
|
|
468
|
+
case import_client_fetch3.FlowType.Verification:
|
|
469
|
+
nodeBackButton = nodes.find(
|
|
470
|
+
(n) => "name" in n.attributes && n.attributes.name === "email"
|
|
471
|
+
);
|
|
472
|
+
break;
|
|
473
|
+
}
|
|
474
|
+
return nodeBackButton;
|
|
475
|
+
}
|
|
476
|
+
var backButtonCandiates = [
|
|
477
|
+
"traits.email",
|
|
478
|
+
"traits.username",
|
|
479
|
+
"traits.phone_number"
|
|
480
|
+
];
|
|
481
|
+
function guessRegistrationBackButton(uiNodes) {
|
|
482
|
+
return uiNodes.find(
|
|
483
|
+
(node) => "name" in node.attributes && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// src/theme/default/components/card/header.tsx
|
|
488
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
342
489
|
function InnerCardHeader({ title, text }) {
|
|
343
|
-
const { Card } = (0,
|
|
344
|
-
return /* @__PURE__ */ (0,
|
|
345
|
-
/* @__PURE__ */ (0,
|
|
346
|
-
/* @__PURE__ */ (0,
|
|
347
|
-
/* @__PURE__ */ (0,
|
|
348
|
-
/* @__PURE__ */ (0,
|
|
490
|
+
const { Card } = (0, import_elements_react3.useComponents)();
|
|
491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
492
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Card.Logo, {}),
|
|
493
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
494
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h2", { className: "font-semibold text-lg text-dialog-fg-default leading-normal", children: title }),
|
|
495
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-sm leading-normal text-dialog-fg-subtle", children: text }),
|
|
496
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DefaultCurrentIdentifierButton, {})
|
|
349
497
|
] })
|
|
350
498
|
] });
|
|
351
499
|
}
|
|
352
500
|
function DefaultCardHeader() {
|
|
353
|
-
const context = (0,
|
|
501
|
+
const context = (0, import_elements_react3.useOryFlow)();
|
|
354
502
|
const { title, description } = useCardHeaderText(
|
|
355
503
|
context.flow.ui.nodes,
|
|
356
504
|
context
|
|
357
505
|
);
|
|
358
|
-
return /* @__PURE__ */ (0,
|
|
506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InnerCardHeader, { title, text: description });
|
|
359
507
|
}
|
|
360
508
|
|
|
361
509
|
// src/theme/default/components/card/logo.tsx
|
|
362
|
-
var
|
|
363
|
-
var
|
|
510
|
+
var import_elements_react4 = require("@ory/elements-react");
|
|
511
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
364
512
|
function DefaultCardLogo() {
|
|
365
|
-
const flow = (0,
|
|
513
|
+
const flow = (0, import_elements_react4.useOryFlow)();
|
|
366
514
|
if (flow.config.logoUrl) {
|
|
367
|
-
return /* @__PURE__ */ (0,
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
368
516
|
}
|
|
369
|
-
return /* @__PURE__ */ (0,
|
|
517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "text-xl font-semibold leading-normal text-dialog-fg-default", children: flow.config.name });
|
|
370
518
|
}
|
|
371
519
|
|
|
372
520
|
// src/theme/default/components/card/index.tsx
|
|
373
|
-
var
|
|
521
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
374
522
|
function DefaultCard({ children }) {
|
|
375
|
-
return /* @__PURE__ */ (0,
|
|
523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1 flex-col flex justify-center items-center font-sans", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "grid grid-cols-1 max-w-sm md:max-w-[480px] md:w-[480px] gap-8 bg-dialog-bg-default px-8 md:px-12 py-12 md:py-14 relative rounded-border-radius-cards border border-dialog-border-default", children: [
|
|
376
524
|
children,
|
|
377
|
-
/* @__PURE__ */ (0,
|
|
525
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Badge, {})
|
|
378
526
|
] }) });
|
|
379
527
|
}
|
|
380
528
|
|
|
@@ -387,16 +535,16 @@ function cn(...inputs) {
|
|
|
387
535
|
|
|
388
536
|
// src/theme/default/components/form/index.tsx
|
|
389
537
|
var import_react_intl3 = require("react-intl");
|
|
390
|
-
var
|
|
391
|
-
var
|
|
392
|
-
var
|
|
538
|
+
var import_elements_react5 = require("@ory/elements-react");
|
|
539
|
+
var import_client_fetch4 = require("@ory/client-fetch");
|
|
540
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
393
541
|
function DefaultFormContainer({
|
|
394
542
|
children,
|
|
395
543
|
onSubmit,
|
|
396
544
|
action,
|
|
397
545
|
method
|
|
398
546
|
}) {
|
|
399
|
-
return /* @__PURE__ */ (0,
|
|
547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
400
548
|
"form",
|
|
401
549
|
{
|
|
402
550
|
onSubmit,
|
|
@@ -409,15 +557,15 @@ function DefaultFormContainer({
|
|
|
409
557
|
);
|
|
410
558
|
}
|
|
411
559
|
function DefaultMessageContainer({ children }) {
|
|
412
|
-
const { flowType } = (0,
|
|
560
|
+
const { flowType } = (0, import_elements_react5.useOryFlow)();
|
|
413
561
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
414
562
|
return null;
|
|
415
563
|
}
|
|
416
|
-
return /* @__PURE__ */ (0,
|
|
564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
417
565
|
"section",
|
|
418
566
|
{
|
|
419
567
|
className: cn(
|
|
420
|
-
flowType ===
|
|
568
|
+
flowType === import_client_fetch4.FlowType.Settings ? "text-center" : "text-left"
|
|
421
569
|
),
|
|
422
570
|
children
|
|
423
571
|
}
|
|
@@ -425,15 +573,16 @@ function DefaultMessageContainer({ children }) {
|
|
|
425
573
|
}
|
|
426
574
|
function DefaultMessage({ message }) {
|
|
427
575
|
const intl = (0, import_react_intl3.useIntl)();
|
|
428
|
-
return /* @__PURE__ */ (0,
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
429
577
|
"span",
|
|
430
578
|
{
|
|
431
|
-
className: cn("text-sm
|
|
579
|
+
className: cn("text-sm leading-normal", {
|
|
432
580
|
"text-forms-fg-error": message.type === "error",
|
|
433
581
|
"text-forms-fg-default": message.type === "info",
|
|
434
582
|
"text-forms-fg-success": message.type === "success"
|
|
435
583
|
}),
|
|
436
|
-
|
|
584
|
+
...(0, import_elements_react5.messageTestId)(message),
|
|
585
|
+
children: (0, import_elements_react5.uiTextToFormattedMessage)(message, intl)
|
|
437
586
|
}
|
|
438
587
|
);
|
|
439
588
|
}
|
|
@@ -442,38 +591,38 @@ function DefaultMessage({ message }) {
|
|
|
442
591
|
var import_react_intl4 = require("react-intl");
|
|
443
592
|
|
|
444
593
|
// src/theme/default/assets/icons/code.svg
|
|
445
|
-
var
|
|
446
|
-
var
|
|
594
|
+
var React4 = __toESM(require("react"));
|
|
595
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
447
596
|
var SvgCode = (props) => {
|
|
448
597
|
var _a, _b;
|
|
449
|
-
return /* @__PURE__ */ (0,
|
|
598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.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_runtime11.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" }) });
|
|
450
599
|
};
|
|
451
600
|
var code_default = SvgCode;
|
|
452
601
|
|
|
453
602
|
// src/theme/default/assets/icons/passkey.svg
|
|
454
|
-
var
|
|
455
|
-
var
|
|
603
|
+
var React5 = __toESM(require("react"));
|
|
604
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
456
605
|
var SvgPasskey = (props) => {
|
|
457
606
|
var _a, _b;
|
|
458
|
-
return /* @__PURE__ */ (0,
|
|
607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.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_runtime12.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" }) });
|
|
459
608
|
};
|
|
460
609
|
var passkey_default = SvgPasskey;
|
|
461
610
|
|
|
462
611
|
// src/theme/default/assets/icons/password.svg
|
|
463
|
-
var
|
|
464
|
-
var
|
|
612
|
+
var React6 = __toESM(require("react"));
|
|
613
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
465
614
|
var SvgPassword = (props) => {
|
|
466
615
|
var _a, _b;
|
|
467
|
-
return /* @__PURE__ */ (0,
|
|
616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.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_runtime13.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" }) });
|
|
468
617
|
};
|
|
469
618
|
var password_default = SvgPassword;
|
|
470
619
|
|
|
471
620
|
// src/theme/default/assets/icons/webauthn.svg
|
|
472
|
-
var
|
|
473
|
-
var
|
|
621
|
+
var React7 = __toESM(require("react"));
|
|
622
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
474
623
|
var SvgWebauthn = (props) => {
|
|
475
624
|
var _a, _b;
|
|
476
|
-
return /* @__PURE__ */ (0,
|
|
625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.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_runtime14.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" }) });
|
|
477
626
|
};
|
|
478
627
|
var webauthn_default = SvgWebauthn;
|
|
479
628
|
|
|
@@ -483,7 +632,7 @@ function isGroupImmediateSubmit(group) {
|
|
|
483
632
|
}
|
|
484
633
|
|
|
485
634
|
// src/theme/default/components/card/auth-methods.tsx
|
|
486
|
-
var
|
|
635
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
487
636
|
var iconsMap = {
|
|
488
637
|
code: code_default,
|
|
489
638
|
passkey: passkey_default,
|
|
@@ -496,17 +645,20 @@ function DefaultAuthMethodListItem({
|
|
|
496
645
|
}) {
|
|
497
646
|
const intl = (0, import_react_intl4.useIntl)();
|
|
498
647
|
const Icon = iconsMap[group] || null;
|
|
499
|
-
return /* @__PURE__ */ (0,
|
|
648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-full hover:bg-forms-bg-hover px-2 py-1 rounded", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
500
649
|
"button",
|
|
501
650
|
{
|
|
502
651
|
className: "flex text-left py-2 gap-3 cursor-pointer",
|
|
503
652
|
onClick,
|
|
504
653
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
654
|
+
id: `auth-method-list-item-${group}`,
|
|
655
|
+
"data-testid": "auth-method-list-item",
|
|
656
|
+
"aria-label": `Authenticate with ${group}`,
|
|
505
657
|
children: [
|
|
506
|
-
/* @__PURE__ */ (0,
|
|
507
|
-
/* @__PURE__ */ (0,
|
|
508
|
-
/* @__PURE__ */ (0,
|
|
509
|
-
/* @__PURE__ */ (0,
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex-none w-4 h-4 mt-[2px]", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Icon, { size: 20, className: "text-forms-fg-default" }) }),
|
|
659
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex-1 text-sm leading-normal", children: [
|
|
660
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-forms-fg-default text-sm", children: intl.formatMessage({ id: `two-step.${group}.title` }) }),
|
|
661
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-forms-fg-mute text-sm", children: intl.formatMessage({ id: `two-step.${group}.description` }) })
|
|
510
662
|
] })
|
|
511
663
|
]
|
|
512
664
|
}
|
|
@@ -514,15 +666,15 @@ function DefaultAuthMethodListItem({
|
|
|
514
666
|
}
|
|
515
667
|
|
|
516
668
|
// src/theme/default/components/form/button.tsx
|
|
517
|
-
var
|
|
518
|
-
var
|
|
519
|
-
var
|
|
669
|
+
var import_client_fetch5 = require("@ory/client-fetch");
|
|
670
|
+
var import_elements_react6 = require("@ory/elements-react");
|
|
671
|
+
var import_react_hook_form2 = require("react-hook-form");
|
|
520
672
|
var import_react_intl5 = require("react-intl");
|
|
521
673
|
|
|
522
674
|
// src/theme/default/components/form/spinner.tsx
|
|
523
|
-
var
|
|
675
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
524
676
|
function Spinner({ className }) {
|
|
525
|
-
return /* @__PURE__ */ (0,
|
|
677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
526
678
|
"svg",
|
|
527
679
|
{
|
|
528
680
|
"aria-hidden": "true",
|
|
@@ -535,7 +687,7 @@ function Spinner({ className }) {
|
|
|
535
687
|
fill: "none",
|
|
536
688
|
xmlns: "http://www.w3.org/2000/svg",
|
|
537
689
|
children: [
|
|
538
|
-
/* @__PURE__ */ (0,
|
|
690
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
539
691
|
"path",
|
|
540
692
|
{
|
|
541
693
|
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",
|
|
@@ -544,7 +696,7 @@ function Spinner({ className }) {
|
|
|
544
696
|
strokeLinejoin: "round"
|
|
545
697
|
}
|
|
546
698
|
) }),
|
|
547
|
-
/* @__PURE__ */ (0,
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
548
700
|
"rect",
|
|
549
701
|
{
|
|
550
702
|
width: "24",
|
|
@@ -559,9 +711,9 @@ function Spinner({ className }) {
|
|
|
559
711
|
}
|
|
560
712
|
|
|
561
713
|
// src/theme/default/components/form/button.tsx
|
|
562
|
-
var
|
|
714
|
+
var import_elements_react7 = require("@ory/elements-react");
|
|
563
715
|
var import_class_variance_authority = require("class-variance-authority");
|
|
564
|
-
var
|
|
716
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
565
717
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
566
718
|
[
|
|
567
719
|
"ring-1 relative overflow-hidden ring-inset rounded text-sm leading-none flex gap-3 justify-center",
|
|
@@ -615,15 +767,15 @@ var DefaultButton = ({
|
|
|
615
767
|
...rest
|
|
616
768
|
} = attributes;
|
|
617
769
|
const intl = (0, import_react_intl5.useIntl)();
|
|
618
|
-
const label = (0,
|
|
619
|
-
const { flowType } = (0,
|
|
770
|
+
const label = (0, import_client_fetch5.getNodeLabel)(node);
|
|
771
|
+
const { flowType } = (0, import_elements_react7.useOryFlow)();
|
|
620
772
|
const {
|
|
621
773
|
formState: { isSubmitting },
|
|
622
774
|
setValue
|
|
623
|
-
} = (0,
|
|
775
|
+
} = (0, import_react_hook_form2.useFormContext)();
|
|
624
776
|
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
625
|
-
const isSmall = flowType ===
|
|
626
|
-
return /* @__PURE__ */ (0,
|
|
777
|
+
const isSmall = flowType === import_client_fetch5.FlowType.Settings && attributes.name !== "webauthn_register_trigger";
|
|
778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
627
779
|
"button",
|
|
628
780
|
{
|
|
629
781
|
...rest,
|
|
@@ -646,8 +798,8 @@ var DefaultButton = ({
|
|
|
646
798
|
disabled: (_a = rest.disabled) != null ? _a : true,
|
|
647
799
|
"data-loading": isSubmitting,
|
|
648
800
|
children: [
|
|
649
|
-
isSubmitting ? /* @__PURE__ */ (0,
|
|
650
|
-
label ? (0,
|
|
801
|
+
isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Spinner, {}) : null,
|
|
802
|
+
label ? (0, import_elements_react6.uiTextToFormattedMessage)(label, intl) : ""
|
|
651
803
|
]
|
|
652
804
|
}
|
|
653
805
|
);
|
|
@@ -655,10 +807,10 @@ var DefaultButton = ({
|
|
|
655
807
|
DefaultButton.displayName = "DefaultButton";
|
|
656
808
|
|
|
657
809
|
// src/theme/default/components/form/checkbox.tsx
|
|
658
|
-
var
|
|
659
|
-
var
|
|
810
|
+
var import_client_fetch6 = require("@ory/client-fetch");
|
|
811
|
+
var import_elements_react8 = require("@ory/elements-react");
|
|
660
812
|
var import_react = require("react");
|
|
661
|
-
var
|
|
813
|
+
var import_react_hook_form3 = require("react-hook-form");
|
|
662
814
|
var import_react_intl7 = require("react-intl");
|
|
663
815
|
|
|
664
816
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
@@ -713,7 +865,7 @@ var uiTextToFormattedMessage3 = ({ id, context = {}, text }, intl) => {
|
|
|
713
865
|
};
|
|
714
866
|
|
|
715
867
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
716
|
-
var
|
|
868
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
717
869
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
718
870
|
function computeLabelElements(labelText) {
|
|
719
871
|
const elements = [];
|
|
@@ -729,7 +881,7 @@ function computeLabelElements(labelText) {
|
|
|
729
881
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
730
882
|
}
|
|
731
883
|
elements.push(
|
|
732
|
-
/* @__PURE__ */ (0,
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
733
885
|
"a",
|
|
734
886
|
{
|
|
735
887
|
href: url,
|
|
@@ -754,13 +906,13 @@ function CheckboxLabel({ label }) {
|
|
|
754
906
|
return null;
|
|
755
907
|
}
|
|
756
908
|
const labelText = uiTextToFormattedMessage3(label, intl);
|
|
757
|
-
return /* @__PURE__ */ (0,
|
|
909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: computeLabelElements(labelText) });
|
|
758
910
|
}
|
|
759
911
|
|
|
760
912
|
// src/theme/default/components/form/checkbox.tsx
|
|
761
|
-
var
|
|
913
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
762
914
|
function CheckboxSVG() {
|
|
763
|
-
return /* @__PURE__ */ (0,
|
|
915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
764
916
|
"svg",
|
|
765
917
|
{
|
|
766
918
|
className: "absolute w-4 h-4 hidden peer-checked:block",
|
|
@@ -770,14 +922,14 @@ function CheckboxSVG() {
|
|
|
770
922
|
viewBox: "0 0 16 16",
|
|
771
923
|
fill: "none",
|
|
772
924
|
children: [
|
|
773
|
-
/* @__PURE__ */ (0,
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
774
926
|
"path",
|
|
775
927
|
{
|
|
776
928
|
d: "M0 4C0 1.79086 1.79086 0 4 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H4C1.79086 16 0 14.2091 0 12V4Z",
|
|
777
929
|
fill: "#0F172A"
|
|
778
930
|
}
|
|
779
931
|
),
|
|
780
|
-
/* @__PURE__ */ (0,
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
781
933
|
"path",
|
|
782
934
|
{
|
|
783
935
|
fillRule: "evenodd",
|
|
@@ -805,10 +957,10 @@ var DefaultCheckbox = ({
|
|
|
805
957
|
...attributes
|
|
806
958
|
} = initialAttributes;
|
|
807
959
|
const intl = (0, import_react_intl7.useIntl)();
|
|
808
|
-
const label = (0,
|
|
960
|
+
const label = (0, import_client_fetch6.getNodeLabel)(node);
|
|
809
961
|
const [checked, setChecked] = (0, import_react.useState)(Boolean(value));
|
|
810
|
-
const { register } = (0,
|
|
811
|
-
return /* @__PURE__ */ (0,
|
|
962
|
+
const { register } = (0, import_react_hook_form3.useForm)();
|
|
963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
812
964
|
"div",
|
|
813
965
|
{
|
|
814
966
|
className: "flex antialiased gap-3 self-stretch item-start",
|
|
@@ -816,8 +968,8 @@ var DefaultCheckbox = ({
|
|
|
816
968
|
setChecked(!checked);
|
|
817
969
|
},
|
|
818
970
|
children: [
|
|
819
|
-
/* @__PURE__ */ (0,
|
|
820
|
-
/* @__PURE__ */ (0,
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex h-5 items-center", children: [
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
821
973
|
"input",
|
|
822
974
|
{
|
|
823
975
|
...attributes,
|
|
@@ -832,16 +984,16 @@ var DefaultCheckbox = ({
|
|
|
832
984
|
...register(name, { value })
|
|
833
985
|
}
|
|
834
986
|
),
|
|
835
|
-
/* @__PURE__ */ (0,
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CheckboxSVG, {})
|
|
836
988
|
] }),
|
|
837
|
-
/* @__PURE__ */ (0,
|
|
838
|
-
/* @__PURE__ */ (0,
|
|
839
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "text-sm items-center", children: [
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { className: "text-sm font-normal leading-normal text-forms-fg-default", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CheckboxLabel, { label }) }),
|
|
991
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
840
992
|
"span",
|
|
841
993
|
{
|
|
842
994
|
className: "text-sm text-red-900 mt-1",
|
|
843
|
-
...(0,
|
|
844
|
-
children: (0,
|
|
995
|
+
...(0, import_elements_react8.messageTestId)(message),
|
|
996
|
+
children: (0, import_elements_react8.uiTextToFormattedMessage)(message, intl)
|
|
845
997
|
},
|
|
846
998
|
message.id
|
|
847
999
|
))
|
|
@@ -852,49 +1004,56 @@ var DefaultCheckbox = ({
|
|
|
852
1004
|
};
|
|
853
1005
|
|
|
854
1006
|
// src/theme/default/components/form/group-container.tsx
|
|
855
|
-
var
|
|
1007
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
856
1008
|
function DefaultGroupContainer({ children }) {
|
|
857
|
-
return /* @__PURE__ */ (0,
|
|
1009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "grid grid-cols-1 gap-6", children });
|
|
858
1010
|
}
|
|
859
1011
|
|
|
860
1012
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
861
|
-
var
|
|
1013
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
862
1014
|
function DefaultHorizontalDivider() {
|
|
863
|
-
return /* @__PURE__ */ (0,
|
|
1015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("hr", { className: "border-dialog-border-default" });
|
|
864
1016
|
}
|
|
865
1017
|
|
|
866
1018
|
// src/theme/default/components/form/image.tsx
|
|
867
|
-
var
|
|
1019
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
868
1020
|
function DefaultImage({ attributes }) {
|
|
869
|
-
return /* @__PURE__ */ (0,
|
|
1021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { ...attributes }) });
|
|
870
1022
|
}
|
|
871
1023
|
|
|
872
1024
|
// src/theme/default/components/form/input.tsx
|
|
873
|
-
var
|
|
874
|
-
var
|
|
875
|
-
var
|
|
1025
|
+
var import_client_fetch7 = require("@ory/client-fetch");
|
|
1026
|
+
var import_elements_react9 = require("@ory/elements-react");
|
|
1027
|
+
var import_react_hook_form4 = require("react-hook-form");
|
|
876
1028
|
var import_react_intl8 = require("react-intl");
|
|
877
|
-
var
|
|
1029
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
878
1030
|
var DefaultInput = ({
|
|
879
1031
|
node,
|
|
880
1032
|
attributes,
|
|
881
1033
|
onClick
|
|
882
1034
|
}) => {
|
|
883
|
-
const label = (0,
|
|
884
|
-
const { register } = (0,
|
|
885
|
-
const {
|
|
1035
|
+
const label = (0, import_client_fetch7.getNodeLabel)(node);
|
|
1036
|
+
const { register } = (0, import_react_hook_form4.useFormContext)();
|
|
1037
|
+
const {
|
|
1038
|
+
value,
|
|
1039
|
+
autocomplete,
|
|
1040
|
+
name,
|
|
1041
|
+
maxlength,
|
|
1042
|
+
node_type: _,
|
|
1043
|
+
...rest
|
|
1044
|
+
} = attributes;
|
|
886
1045
|
const intl = (0, import_react_intl8.useIntl)();
|
|
887
|
-
const { flowType } = (0,
|
|
1046
|
+
const { flowType } = (0, import_elements_react9.useOryFlow)();
|
|
888
1047
|
const formattedLabel = label ? intl.formatMessage(
|
|
889
1048
|
{
|
|
890
1049
|
id: "input.placeholder",
|
|
891
1050
|
defaultMessage: "Enter your {placeholder}"
|
|
892
1051
|
},
|
|
893
1052
|
{
|
|
894
|
-
placeholder: (0,
|
|
1053
|
+
placeholder: (0, import_elements_react9.uiTextToFormattedMessage)(label, intl)
|
|
895
1054
|
}
|
|
896
1055
|
) : "";
|
|
897
|
-
return /* @__PURE__ */ (0,
|
|
1056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
898
1057
|
"input",
|
|
899
1058
|
{
|
|
900
1059
|
...rest,
|
|
@@ -906,7 +1065,7 @@ var DefaultInput = ({
|
|
|
906
1065
|
"antialiased disabled:text-forms-fg-disabled disabled:bg-forms-bg-disabled bg-forms-bg-default rounded-border-radius-forms border border-forms-border-default leading-tight hover:border-forms-border-hover transition-colors text-sm",
|
|
907
1066
|
"px-3 py-2.5",
|
|
908
1067
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
909
|
-
flowType ===
|
|
1068
|
+
flowType === import_client_fetch7.FlowType.Settings ? "max-w-[488px]" : "md:px-4 md:py-4"
|
|
910
1069
|
),
|
|
911
1070
|
...register(name, { value })
|
|
912
1071
|
}
|
|
@@ -914,10 +1073,16 @@ var DefaultInput = ({
|
|
|
914
1073
|
};
|
|
915
1074
|
|
|
916
1075
|
// src/theme/default/components/form/label.tsx
|
|
917
|
-
var
|
|
918
|
-
var
|
|
1076
|
+
var import_client_fetch8 = require("@ory/client-fetch");
|
|
1077
|
+
var import_elements_react10 = require("@ory/elements-react");
|
|
1078
|
+
var import_react_hook_form5 = require("react-hook-form");
|
|
919
1079
|
var import_react_intl9 = require("react-intl");
|
|
920
|
-
var
|
|
1080
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1081
|
+
function findResendNode(nodes) {
|
|
1082
|
+
return nodes.find(
|
|
1083
|
+
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
921
1086
|
function DefaultLabel({
|
|
922
1087
|
node,
|
|
923
1088
|
children,
|
|
@@ -925,24 +1090,31 @@ function DefaultLabel({
|
|
|
925
1090
|
...rest
|
|
926
1091
|
}) {
|
|
927
1092
|
const intl = (0, import_react_intl9.useIntl)();
|
|
928
|
-
const label = (0,
|
|
929
|
-
const {
|
|
1093
|
+
const label = (0, import_client_fetch8.getNodeLabel)(node);
|
|
1094
|
+
const { Message } = (0, import_elements_react10.useComponents)();
|
|
1095
|
+
const { config, flowType, flow } = (0, import_elements_react10.useOryFlow)();
|
|
1096
|
+
const { setValue } = (0, import_react_hook_form5.useFormContext)();
|
|
930
1097
|
const isPassword = attributes.type === "password";
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
1098
|
+
const resendNode = findResendNode(flow.ui.nodes);
|
|
1099
|
+
const handleResend = () => {
|
|
1100
|
+
if ((resendNode == null ? void 0 : resendNode.attributes) && "name" in resendNode.attributes) {
|
|
1101
|
+
setValue(resendNode.attributes.name, resendNode.attributes.value);
|
|
1102
|
+
}
|
|
1103
|
+
};
|
|
1104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col antialiased gap-1", children: [
|
|
1105
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: "inline-flex justify-between", children: [
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
935
1107
|
"label",
|
|
936
1108
|
{
|
|
937
|
-
...(0,
|
|
1109
|
+
...(0, import_elements_react10.messageTestId)(label),
|
|
938
1110
|
className: "text-sm font-medium leading-normal",
|
|
939
1111
|
htmlFor: attributes.name,
|
|
940
1112
|
...rest,
|
|
941
|
-
children: (0,
|
|
1113
|
+
children: (0, import_elements_react10.uiTextToFormattedMessage)(label, intl)
|
|
942
1114
|
}
|
|
943
1115
|
),
|
|
944
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
945
|
-
/* @__PURE__ */ (0,
|
|
1116
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch8.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
1117
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
946
1118
|
"a",
|
|
947
1119
|
{
|
|
948
1120
|
href: config.project.recovery_ui_url,
|
|
@@ -953,66 +1125,55 @@ function DefaultLabel({
|
|
|
953
1125
|
})
|
|
954
1126
|
}
|
|
955
1127
|
),
|
|
956
|
-
|
|
1128
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
957
1129
|
"button",
|
|
958
1130
|
{
|
|
959
1131
|
type: "submit",
|
|
960
|
-
name:
|
|
961
|
-
value:
|
|
1132
|
+
name: resendNode.attributes.name,
|
|
1133
|
+
value: resendNode.attributes.value,
|
|
1134
|
+
onClick: handleResend,
|
|
962
1135
|
className: "text-links-link-default hover:underline hover:text-link-hover transition-colors text-sm font-medium cursor-pointer",
|
|
963
1136
|
children: intl.formatMessage({ id: "identities.messages.1070008" })
|
|
964
1137
|
}
|
|
965
1138
|
)
|
|
966
1139
|
] }),
|
|
967
1140
|
children,
|
|
968
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
969
|
-
"span",
|
|
970
|
-
{
|
|
971
|
-
className: cn("text-sm leading-normal", {
|
|
972
|
-
"text-forms-fg-error": message.type === "error",
|
|
973
|
-
"text-forms-fg-default": message.type === "info",
|
|
974
|
-
"text-forms-fg-success": message.type === "success"
|
|
975
|
-
}),
|
|
976
|
-
...(0, import_elements_react9.messageTestId)(message),
|
|
977
|
-
children: (0, import_elements_react9.uiTextToFormattedMessage)(message, intl)
|
|
978
|
-
},
|
|
979
|
-
message.id
|
|
980
|
-
))
|
|
1141
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Message.Content, { message }, message.id))
|
|
981
1142
|
] });
|
|
982
1143
|
}
|
|
983
1144
|
|
|
984
1145
|
// src/theme/default/components/form/link-button.tsx
|
|
985
|
-
var
|
|
986
|
-
var
|
|
1146
|
+
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1147
|
+
var import_elements_react11 = require("@ory/elements-react");
|
|
987
1148
|
var import_react2 = require("react");
|
|
988
1149
|
var import_react_intl10 = require("react-intl");
|
|
989
|
-
var
|
|
1150
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
990
1151
|
var DefaultLinkButton = (0, import_react2.forwardRef)(({ attributes, node }, ref) => {
|
|
991
1152
|
const intl = (0, import_react_intl10.useIntl)();
|
|
992
|
-
const label = (0,
|
|
993
|
-
return /* @__PURE__ */ (0,
|
|
1153
|
+
const label = (0, import_client_fetch9.getNodeLabel)(node);
|
|
1154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
994
1155
|
"a",
|
|
995
1156
|
{
|
|
996
1157
|
...attributes,
|
|
997
1158
|
ref,
|
|
998
|
-
title: label ? (0,
|
|
1159
|
+
title: label ? (0, import_elements_react11.uiTextToFormattedMessage)(label, intl) : "",
|
|
999
1160
|
className: cn(
|
|
1000
1161
|
"antialiased rounded cursor-pointer text-center border border-transparent gap-3 leading-none bg-button-primary-bg-default hover:bg-button-primary-bg-hover transition-colors text-button-primary-fg-default hover:text-button-primary-fg-hover px-4 py-4.5 text-sm font-medium"
|
|
1001
1162
|
),
|
|
1002
|
-
children: label ? (0,
|
|
1163
|
+
children: label ? (0, import_elements_react11.uiTextToFormattedMessage)(label, intl) : ""
|
|
1003
1164
|
}
|
|
1004
1165
|
);
|
|
1005
1166
|
});
|
|
1006
1167
|
DefaultLinkButton.displayName = "DefaultLinkButton";
|
|
1007
1168
|
|
|
1008
1169
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1009
|
-
var
|
|
1170
|
+
var import_react_hook_form6 = require("react-hook-form");
|
|
1010
1171
|
|
|
1011
1172
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1012
1173
|
var import_input_otp = require("input-otp");
|
|
1013
|
-
var
|
|
1014
|
-
var
|
|
1015
|
-
var InputOTP =
|
|
1174
|
+
var React8 = __toESM(require("react"));
|
|
1175
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1176
|
+
var InputOTP = React8.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1016
1177
|
import_input_otp.OTPInput,
|
|
1017
1178
|
{
|
|
1018
1179
|
ref,
|
|
@@ -1025,12 +1186,12 @@ var InputOTP = React7.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
1025
1186
|
}
|
|
1026
1187
|
));
|
|
1027
1188
|
InputOTP.displayName = "InputOTP";
|
|
1028
|
-
var InputOTPGroup =
|
|
1189
|
+
var InputOTPGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1029
1190
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1030
|
-
var InputOTPSlot =
|
|
1031
|
-
const inputOTPContext =
|
|
1191
|
+
var InputOTPSlot = React8.forwardRef(({ index, className, ...props }, ref) => {
|
|
1192
|
+
const inputOTPContext = React8.useContext(import_input_otp.OTPInputContext);
|
|
1032
1193
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1033
|
-
return /* @__PURE__ */ (0,
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1034
1195
|
"div",
|
|
1035
1196
|
{
|
|
1036
1197
|
ref,
|
|
@@ -1042,7 +1203,7 @@ var InputOTPSlot = React7.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1042
1203
|
...props,
|
|
1043
1204
|
children: [
|
|
1044
1205
|
char,
|
|
1045
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
1206
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-branding-bg-default duration-750" }) })
|
|
1046
1207
|
]
|
|
1047
1208
|
}
|
|
1048
1209
|
);
|
|
@@ -1050,23 +1211,23 @@ var InputOTPSlot = React7.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1050
1211
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1051
1212
|
|
|
1052
1213
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1053
|
-
var
|
|
1214
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1054
1215
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1055
|
-
const { setValue, watch } = (0,
|
|
1216
|
+
const { setValue, watch } = (0, import_react_hook_form6.useFormContext)();
|
|
1056
1217
|
const { maxlength, name } = attributes;
|
|
1057
1218
|
const elements = maxlength != null ? maxlength : 6;
|
|
1058
1219
|
const handleInputChange = (v) => {
|
|
1059
1220
|
setValue(name, v);
|
|
1060
1221
|
};
|
|
1061
1222
|
const value = watch(name);
|
|
1062
|
-
return /* @__PURE__ */ (0,
|
|
1223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1063
1224
|
InputOTP,
|
|
1064
1225
|
{
|
|
1065
1226
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1066
1227
|
onChange: handleInputChange,
|
|
1067
1228
|
name,
|
|
1068
1229
|
value,
|
|
1069
|
-
children: /* @__PURE__ */ (0,
|
|
1230
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(InputOTPGroup, { className: "w-full space-x-2 justify-between", children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1070
1231
|
InputOTPSlot,
|
|
1071
1232
|
{
|
|
1072
1233
|
index,
|
|
@@ -1078,167 +1239,189 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1078
1239
|
);
|
|
1079
1240
|
};
|
|
1080
1241
|
|
|
1242
|
+
// src/theme/default/components/form/section.tsx
|
|
1243
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1244
|
+
var DefaultFormSection = ({ children }) => {
|
|
1245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-col w-80 md:w-[712px] lg:w-[802px] xl:w-[896px]", children });
|
|
1246
|
+
};
|
|
1247
|
+
var DefaultFormSectionContent = ({
|
|
1248
|
+
title,
|
|
1249
|
+
description,
|
|
1250
|
+
children
|
|
1251
|
+
}) => {
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "border rounded-t-xl border-b-0 border-dialog-border-default bg-forms-bg-default px-6 py-8 flex flex-col gap-8", children: [
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h3", { className: "font-medium text-dialog-fg-default", children: title }),
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm text-dialog-fg-subtle", children: description })
|
|
1256
|
+
] }),
|
|
1257
|
+
children
|
|
1258
|
+
] });
|
|
1259
|
+
};
|
|
1260
|
+
var DefaultFormSectionFooter = ({ children }) => {
|
|
1261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "rounded-b-xl gap-2 flex justify-end px-6 py-4 bg-dialog-bg-subtle border border-dialog-border-default text-sm text-dialog-fg-mute items-center [&>span]:mr-auto min-h-[72px]", children });
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1081
1264
|
// src/theme/default/components/form/social.tsx
|
|
1082
|
-
var
|
|
1265
|
+
var import_elements_react12 = require("@ory/elements-react");
|
|
1083
1266
|
|
|
1084
1267
|
// src/theme/default/provider-logos/apple.svg
|
|
1085
|
-
var
|
|
1086
|
-
var
|
|
1268
|
+
var React9 = __toESM(require("react"));
|
|
1269
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1087
1270
|
var SvgApple = (props) => {
|
|
1088
1271
|
var _a, _b;
|
|
1089
|
-
return /* @__PURE__ */ (0,
|
|
1090
|
-
/* @__PURE__ */ (0,
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1273
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { fill: "#283544", d: "M30 16c0 7.728-6.265 14-14 14S2 23.728 2 16C2 8.265 8.265 2 16 2s14 6.265 14 14" }),
|
|
1274
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("path", { fill: "#fff", d: "M22.562 12.457c-.076.045-1.895.986-1.895 3.07.086 2.38 2.295 3.213 2.333 3.213-.038.045-.334 1.136-1.21 2.28-.694.986-1.466 1.98-2.637 1.98-1.114 0-1.514-.657-2.8-.657-1.381 0-1.772.657-2.829.657-1.171 0-2-1.047-2.733-2.023-.952-1.278-1.761-3.284-1.79-5.21-.02-1.02.19-2.023.724-2.875.752-1.19 2.095-1.997 3.561-2.023 1.124-.036 2.124.719 2.81.719.657 0 1.885-.72 3.275-.72.6.001 2.2.17 3.191 1.59m-6.561-1.792c-.2-.932.352-1.864.866-2.458.657-.72 1.695-1.207 2.59-1.207a3.33 3.33 0 0 1-.952 2.511c-.58.72-1.58 1.26-2.504 1.154" })
|
|
1092
1275
|
] });
|
|
1093
1276
|
};
|
|
1094
1277
|
var apple_default = SvgApple;
|
|
1095
1278
|
|
|
1096
1279
|
// src/theme/default/provider-logos/auth0.svg
|
|
1097
|
-
var
|
|
1098
|
-
var
|
|
1280
|
+
var React10 = __toESM(require("react"));
|
|
1281
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1099
1282
|
var SvgAuth0 = (props) => {
|
|
1100
1283
|
var _a, _b;
|
|
1101
|
-
return /* @__PURE__ */ (0,
|
|
1284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
|
|
1102
1285
|
};
|
|
1103
1286
|
var auth0_default = SvgAuth0;
|
|
1104
1287
|
|
|
1105
1288
|
// src/theme/default/provider-logos/discord.svg
|
|
1106
|
-
var
|
|
1107
|
-
var
|
|
1289
|
+
var React11 = __toESM(require("react"));
|
|
1290
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1108
1291
|
var SvgDiscord = (props) => {
|
|
1109
1292
|
var _a, _b;
|
|
1110
|
-
return /* @__PURE__ */ (0,
|
|
1111
|
-
/* @__PURE__ */ (0,
|
|
1112
|
-
/* @__PURE__ */ (0,
|
|
1293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1294
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
1295
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
|
|
1113
1296
|
] });
|
|
1114
1297
|
};
|
|
1115
1298
|
var discord_default = SvgDiscord;
|
|
1116
1299
|
|
|
1117
1300
|
// src/theme/default/provider-logos/facebook.svg
|
|
1118
|
-
var
|
|
1119
|
-
var
|
|
1301
|
+
var React12 = __toESM(require("react"));
|
|
1302
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1120
1303
|
var SvgFacebook = (props) => {
|
|
1121
1304
|
var _a, _b;
|
|
1122
|
-
return /* @__PURE__ */ (0,
|
|
1123
|
-
/* @__PURE__ */ (0,
|
|
1124
|
-
/* @__PURE__ */ (0,
|
|
1125
|
-
/* @__PURE__ */ (0,
|
|
1305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1306
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("g", { clipPath: "url(#facebook_svg__a)", children: [
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { fill: "#1877F2", d: "M24 12c0-6.627-5.373-12-12-12C5.372 0 0 5.374 0 12c0 5.99 4.388 10.954 10.125 11.854V15.47H7.078V12h3.047V9.357c0-3.008 1.791-4.669 4.532-4.669 1.313 0 2.686.234 2.686.234v2.953H15.83c-1.49 0-1.955.925-1.955 1.874V12h3.328l-.532 3.469h-2.796v8.385c5.736-.9 10.124-5.864 10.124-11.854" }),
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { fill: "#fff", d: "M16.67 15.469 17.204 12h-3.328V9.75c0-.95.465-1.875 1.955-1.875h1.513V4.922s-1.373-.234-2.686-.234c-2.74 0-4.532 1.661-4.532 4.669V12H7.078v3.469h3.047v8.385a12.1 12.1 0 0 0 3.75 0V15.47z" })
|
|
1126
1309
|
] }),
|
|
1127
|
-
/* @__PURE__ */ (0,
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("clipPath", { id: "facebook_svg__a", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("rect", { fill: "#fff" }) }) })
|
|
1128
1311
|
] });
|
|
1129
1312
|
};
|
|
1130
1313
|
var facebook_default = SvgFacebook;
|
|
1131
1314
|
|
|
1132
1315
|
// src/theme/default/provider-logos/generic.svg
|
|
1133
|
-
var
|
|
1134
|
-
var
|
|
1316
|
+
var React13 = __toESM(require("react"));
|
|
1317
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1135
1318
|
var SvgGeneric = (props) => {
|
|
1136
1319
|
var _a, _b;
|
|
1137
|
-
return /* @__PURE__ */ (0,
|
|
1138
|
-
/* @__PURE__ */ (0,
|
|
1139
|
-
/* @__PURE__ */ (0,
|
|
1140
|
-
/* @__PURE__ */ (0,
|
|
1320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, className: "generic_svg__icon generic_svg__icon-tabler generic_svg__icon-tabler-brand-oauth", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1321
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
1322
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M12.556 6c.65 0 1.235.373 1.508.947l2.839 7.848a1.646 1.646 0 0 1-1.01 2.108 1.673 1.673 0 0 1-2.068-.851L13.365 15h-2.73l-.398.905A1.67 1.67 0 0 1 8.26 16.95l-.153-.047a1.647 1.647 0 0 1-1.056-1.956l2.824-7.852a1.66 1.66 0 0 1 1.409-1.087z" })
|
|
1141
1324
|
] });
|
|
1142
1325
|
};
|
|
1143
1326
|
var generic_default = SvgGeneric;
|
|
1144
1327
|
|
|
1145
1328
|
// src/theme/default/provider-logos/github.svg
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1329
|
+
var React14 = __toESM(require("react"));
|
|
1330
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1148
1331
|
var SvgGithub = (props) => {
|
|
1149
1332
|
var _a, _b;
|
|
1150
|
-
return /* @__PURE__ */ (0,
|
|
1333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
1151
1334
|
};
|
|
1152
1335
|
var github_default = SvgGithub;
|
|
1153
1336
|
|
|
1154
1337
|
// src/theme/default/provider-logos/gitlab.svg
|
|
1155
|
-
var
|
|
1156
|
-
var
|
|
1338
|
+
var React15 = __toESM(require("react"));
|
|
1339
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1157
1340
|
var SvgGitlab = (props) => {
|
|
1158
1341
|
var _a, _b;
|
|
1159
|
-
return /* @__PURE__ */ (0,
|
|
1160
|
-
/* @__PURE__ */ (0,
|
|
1161
|
-
/* @__PURE__ */ (0,
|
|
1162
|
-
/* @__PURE__ */ (0,
|
|
1163
|
-
/* @__PURE__ */ (0,
|
|
1342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1343
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
1344
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
1346
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
1164
1347
|
] });
|
|
1165
1348
|
};
|
|
1166
1349
|
var gitlab_default = SvgGitlab;
|
|
1167
1350
|
|
|
1168
1351
|
// src/theme/default/provider-logos/google.svg
|
|
1169
|
-
var
|
|
1170
|
-
var
|
|
1352
|
+
var React16 = __toESM(require("react"));
|
|
1353
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1171
1354
|
var SvgGoogle = (props) => {
|
|
1172
1355
|
var _a, _b;
|
|
1173
|
-
return /* @__PURE__ */ (0,
|
|
1174
|
-
/* @__PURE__ */ (0,
|
|
1175
|
-
/* @__PURE__ */ (0,
|
|
1176
|
-
/* @__PURE__ */ (0,
|
|
1177
|
-
/* @__PURE__ */ (0,
|
|
1356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#4285F4", d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82" }),
|
|
1358
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#34A853", d: "M12.255 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96h-3.98v3.09C3.515 21.3 7.565 24 12.255 24" }),
|
|
1359
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#FBBC05", d: "M5.525 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62h-3.98a11.86 11.86 0 0 0 0 10.76z" }),
|
|
1360
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { fill: "#EA4335", d: "M12.255 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C18.205 1.19 15.495 0 12.255 0c-4.69 0-8.74 2.7-10.71 6.62l3.98 3.09c.95-2.85 3.6-4.96 6.73-4.96" })
|
|
1178
1361
|
] });
|
|
1179
1362
|
};
|
|
1180
1363
|
var google_default = SvgGoogle;
|
|
1181
1364
|
|
|
1182
1365
|
// src/theme/default/provider-logos/linkedin.svg
|
|
1183
|
-
var
|
|
1184
|
-
var
|
|
1366
|
+
var React17 = __toESM(require("react"));
|
|
1367
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1185
1368
|
var SvgLinkedin = (props) => {
|
|
1186
1369
|
var _a, _b;
|
|
1187
|
-
return /* @__PURE__ */ (0,
|
|
1188
|
-
/* @__PURE__ */ (0,
|
|
1189
|
-
/* @__PURE__ */ (0,
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("rect", { x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
1190
1373
|
] });
|
|
1191
1374
|
};
|
|
1192
1375
|
var linkedin_default = SvgLinkedin;
|
|
1193
1376
|
|
|
1194
1377
|
// src/theme/default/provider-logos/microsoft.svg
|
|
1195
|
-
var
|
|
1196
|
-
var
|
|
1378
|
+
var React18 = __toESM(require("react"));
|
|
1379
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1197
1380
|
var SvgMicrosoft = (props) => {
|
|
1198
1381
|
var _a, _b;
|
|
1199
|
-
return /* @__PURE__ */ (0,
|
|
1200
|
-
/* @__PURE__ */ (0,
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1202
|
-
/* @__PURE__ */ (0,
|
|
1203
|
-
/* @__PURE__ */ (0,
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
1386
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
1204
1387
|
] });
|
|
1205
1388
|
};
|
|
1206
1389
|
var microsoft_default = SvgMicrosoft;
|
|
1207
1390
|
|
|
1208
1391
|
// src/theme/default/provider-logos/slack.svg
|
|
1209
|
-
var
|
|
1210
|
-
var
|
|
1392
|
+
var React19 = __toESM(require("react"));
|
|
1393
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1211
1394
|
var SvgSlack = (props) => {
|
|
1212
1395
|
var _a, _b;
|
|
1213
|
-
return /* @__PURE__ */ (0,
|
|
1214
|
-
/* @__PURE__ */ (0,
|
|
1215
|
-
/* @__PURE__ */ (0,
|
|
1216
|
-
/* @__PURE__ */ (0,
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
1399
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
1218
1401
|
] });
|
|
1219
1402
|
};
|
|
1220
1403
|
var slack_default = SvgSlack;
|
|
1221
1404
|
|
|
1222
1405
|
// src/theme/default/provider-logos/spotify.svg
|
|
1223
|
-
var
|
|
1224
|
-
var
|
|
1225
|
-
var SvgSpotify = (props) => {
|
|
1406
|
+
var React20 = __toESM(require("react"));
|
|
1407
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1408
|
+
var SvgSpotify = (props) => {
|
|
1226
1409
|
var _a, _b;
|
|
1227
|
-
return /* @__PURE__ */ (0,
|
|
1228
|
-
/* @__PURE__ */ (0,
|
|
1229
|
-
/* @__PURE__ */ (0,
|
|
1410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
1230
1413
|
] });
|
|
1231
1414
|
};
|
|
1232
1415
|
var spotify_default = SvgSpotify;
|
|
1233
1416
|
|
|
1234
1417
|
// src/theme/default/provider-logos/yandex.svg
|
|
1235
|
-
var
|
|
1236
|
-
var
|
|
1418
|
+
var React21 = __toESM(require("react"));
|
|
1419
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1237
1420
|
var SvgYandex = (props) => {
|
|
1238
1421
|
var _a, _b;
|
|
1239
|
-
return /* @__PURE__ */ (0,
|
|
1240
|
-
/* @__PURE__ */ (0,
|
|
1241
|
-
/* @__PURE__ */ (0,
|
|
1422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
1242
1425
|
] });
|
|
1243
1426
|
};
|
|
1244
1427
|
var yandex_default = SvgYandex;
|
|
@@ -1263,7 +1446,7 @@ var provider_logos_default = logos;
|
|
|
1263
1446
|
|
|
1264
1447
|
// src/theme/default/components/form/social.tsx
|
|
1265
1448
|
var import_react_intl11 = require("react-intl");
|
|
1266
|
-
var
|
|
1449
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1267
1450
|
function extractProvider(context) {
|
|
1268
1451
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
1269
1452
|
return context.provider;
|
|
@@ -1285,13 +1468,13 @@ function DefaultButtonSocial({
|
|
|
1285
1468
|
} = attributes;
|
|
1286
1469
|
const {
|
|
1287
1470
|
flow: { ui }
|
|
1288
|
-
} = (0,
|
|
1471
|
+
} = (0, import_elements_react12.useOryFlow)();
|
|
1289
1472
|
const intl = (0, import_react_intl11.useIntl)();
|
|
1290
1473
|
const oidcNodeCount = (_a = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a : 0;
|
|
1291
1474
|
const Logo = provider_logos_default[attributes.value];
|
|
1292
1475
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
1293
1476
|
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
1294
|
-
return /* @__PURE__ */ (0,
|
|
1477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
1295
1478
|
"button",
|
|
1296
1479
|
{
|
|
1297
1480
|
className: cn(
|
|
@@ -1304,14 +1487,14 @@ function DefaultButtonSocial({
|
|
|
1304
1487
|
...props,
|
|
1305
1488
|
onClick,
|
|
1306
1489
|
children: [
|
|
1307
|
-
/* @__PURE__ */ (0,
|
|
1490
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "w-5 h-5", children: Logo ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1308
1491
|
Logo,
|
|
1309
1492
|
{
|
|
1310
1493
|
size: 20,
|
|
1311
1494
|
className: "object-fill w-full h-full"
|
|
1312
1495
|
}
|
|
1313
|
-
) : /* @__PURE__ */ (0,
|
|
1314
|
-
showLabel && node.meta.label ? /* @__PURE__ */ (0,
|
|
1496
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "rounded-full aspect-square border flex items-center justify-center text-xs", children: provider.slice(0, 2) }) }),
|
|
1497
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (0, import_elements_react12.uiTextToFormattedMessage)(node.meta.label, intl) }) : null
|
|
1315
1498
|
]
|
|
1316
1499
|
}
|
|
1317
1500
|
);
|
|
@@ -1320,7 +1503,7 @@ function DefaultSocialButtonContainer({
|
|
|
1320
1503
|
children,
|
|
1321
1504
|
nodes
|
|
1322
1505
|
}) {
|
|
1323
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1324
1507
|
"div",
|
|
1325
1508
|
{
|
|
1326
1509
|
className: cn("grid gap-3", {
|
|
@@ -1335,106 +1518,382 @@ function DefaultSocialButtonContainer({
|
|
|
1335
1518
|
}
|
|
1336
1519
|
|
|
1337
1520
|
// src/theme/default/components/form/text.tsx
|
|
1338
|
-
var
|
|
1521
|
+
var import_elements_react13 = require("@ory/elements-react");
|
|
1339
1522
|
var import_react_intl12 = require("react-intl");
|
|
1340
|
-
var
|
|
1523
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1341
1524
|
function DefaultText({ node, attributes }) {
|
|
1342
1525
|
var _a;
|
|
1343
1526
|
const intl = (0, import_react_intl12.useIntl)();
|
|
1344
|
-
return /* @__PURE__ */ (0,
|
|
1345
|
-
/* @__PURE__ */ (0,
|
|
1346
|
-
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0,
|
|
1527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
1528
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { "data-testid": `node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
|
|
1529
|
+
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("pre", { "data-testid": `node/text/lookup_secret_codes/text`, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("code", { children: text ? (0, import_elements_react13.uiTextToFormattedMessage)(text, intl) : "" }) }, index))
|
|
1347
1530
|
] });
|
|
1348
1531
|
}
|
|
1349
1532
|
|
|
1350
|
-
// src/theme/default/
|
|
1351
|
-
var
|
|
1352
|
-
|
|
1353
|
-
|
|
1533
|
+
// src/theme/default/components/generic/page-header.tsx
|
|
1534
|
+
var import_elements_react15 = require("@ory/elements-react");
|
|
1535
|
+
|
|
1536
|
+
// src/theme/default/components/ui/user-menu.tsx
|
|
1537
|
+
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
1538
|
+
var import_react5 = require("react");
|
|
1539
|
+
var import_elements_react14 = require("@ory/elements-react");
|
|
1540
|
+
|
|
1541
|
+
// src/util/client.ts
|
|
1542
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
1543
|
+
function frontendClient(sdkUrl, opts = {}) {
|
|
1544
|
+
const config = new import_client_fetch10.Configuration({
|
|
1545
|
+
...opts,
|
|
1546
|
+
basePath: sdkUrl,
|
|
1547
|
+
headers: {
|
|
1548
|
+
Accept: "application/json",
|
|
1549
|
+
...opts.headers
|
|
1550
|
+
}
|
|
1551
|
+
});
|
|
1552
|
+
return new import_client_fetch10.FrontendApi(config);
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
// src/theme/default/assets/icons/logout.svg
|
|
1556
|
+
var React22 = __toESM(require("react"));
|
|
1557
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1558
|
+
var SvgLogout = (props) => {
|
|
1354
1559
|
var _a, _b;
|
|
1355
|
-
return /* @__PURE__ */ (0,
|
|
1560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.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_runtime44.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" }) });
|
|
1356
1561
|
};
|
|
1357
|
-
var
|
|
1562
|
+
var logout_default = SvgLogout;
|
|
1358
1563
|
|
|
1359
|
-
// src/theme/default/
|
|
1360
|
-
var
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1564
|
+
// src/theme/default/assets/icons/settings.svg
|
|
1565
|
+
var React23 = __toESM(require("react"));
|
|
1566
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1567
|
+
var SvgSettings = (props) => {
|
|
1568
|
+
var _a, _b;
|
|
1569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.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" }),
|
|
1571
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1572
|
+
] }) });
|
|
1573
|
+
};
|
|
1574
|
+
var settings_default = SvgSettings;
|
|
1575
|
+
|
|
1576
|
+
// src/theme/default/utils/user.ts
|
|
1577
|
+
var getUserInitials = (session) => {
|
|
1578
|
+
var _a, _b;
|
|
1579
|
+
const avatar = "";
|
|
1580
|
+
let primary = "";
|
|
1581
|
+
let secondary = "";
|
|
1582
|
+
if (!((_a = session == null ? void 0 : session.identity) == null ? void 0 : _a.traits)) {
|
|
1583
|
+
return {
|
|
1584
|
+
primary,
|
|
1585
|
+
secondary,
|
|
1586
|
+
avatar
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1589
|
+
const traits = (_b = session.identity) == null ? void 0 : _b.traits;
|
|
1590
|
+
if (traits.email) {
|
|
1591
|
+
secondary = traits.email;
|
|
1592
|
+
}
|
|
1593
|
+
if (traits.name) {
|
|
1594
|
+
if (typeof traits.name === "string") {
|
|
1595
|
+
primary = traits.name;
|
|
1380
1596
|
}
|
|
1381
|
-
|
|
1382
|
-
|
|
1597
|
+
if (traits.name.first && traits.name.last) {
|
|
1598
|
+
primary = traits.name.first + " " + traits.name.last;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
if (primary === "") {
|
|
1602
|
+
primary = secondary;
|
|
1603
|
+
secondary = "";
|
|
1604
|
+
}
|
|
1605
|
+
return {
|
|
1606
|
+
primary,
|
|
1607
|
+
secondary,
|
|
1608
|
+
avatar
|
|
1609
|
+
};
|
|
1610
|
+
};
|
|
1383
1611
|
|
|
1384
|
-
// src/theme/default/components/
|
|
1385
|
-
var
|
|
1386
|
-
var
|
|
1387
|
-
|
|
1612
|
+
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1613
|
+
var import_react3 = require("react");
|
|
1614
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1615
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1616
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1617
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1618
|
+
var DropdownMenuContent = (0, import_react3.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1619
|
+
DropdownMenuPrimitive.Content,
|
|
1620
|
+
{
|
|
1621
|
+
ref,
|
|
1622
|
+
sideOffset,
|
|
1623
|
+
align: "end",
|
|
1624
|
+
className: cn(
|
|
1625
|
+
"z-50 min-w-[19rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1626
|
+
"border border-dialog-border-default bg-dialog-bg-default rounded-border-radius-cards",
|
|
1627
|
+
className
|
|
1628
|
+
),
|
|
1629
|
+
...props
|
|
1630
|
+
}
|
|
1631
|
+
) }));
|
|
1632
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1633
|
+
var DropdownMenuItem = (0, import_react3.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1634
|
+
DropdownMenuPrimitive.Item,
|
|
1635
|
+
{
|
|
1636
|
+
ref,
|
|
1637
|
+
className: cn(
|
|
1638
|
+
"relative flex cursor-pointer select-none items-center outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
1639
|
+
"px-8 py-3 lg:py-4.5 text-sm gap-6",
|
|
1640
|
+
"first:border-0 border-t border-button-secondary-border-default hover:border-button-social-border-hover data-[disabled]:border-button-secondary-border-disabled",
|
|
1641
|
+
"text-button-secondary-fg-default bg-button-secondary-bg-default",
|
|
1642
|
+
"hover:text-button-secondary-fg-hover hover:bg-button-secondary-bg-hover",
|
|
1643
|
+
"data-[disabled]:text-button-secondary-fg-disabled data-[disabled]:bg-button-secondary-bg-disabled",
|
|
1644
|
+
inset && "pl-8",
|
|
1645
|
+
className
|
|
1646
|
+
),
|
|
1647
|
+
...props
|
|
1648
|
+
}
|
|
1649
|
+
));
|
|
1650
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1651
|
+
var DropdownMenuLabel = (0, import_react3.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1652
|
+
DropdownMenuPrimitive.Label,
|
|
1653
|
+
{
|
|
1654
|
+
ref,
|
|
1655
|
+
className: cn(
|
|
1656
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1657
|
+
inset && "pl-8",
|
|
1658
|
+
className
|
|
1659
|
+
),
|
|
1660
|
+
...props
|
|
1661
|
+
}
|
|
1662
|
+
));
|
|
1663
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1664
|
+
|
|
1665
|
+
// src/theme/default/components/ui/user-avater.tsx
|
|
1666
|
+
var import_react4 = require("react");
|
|
1667
|
+
|
|
1668
|
+
// src/theme/default/assets/icons/user.svg
|
|
1669
|
+
var React24 = __toESM(require("react"));
|
|
1670
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1671
|
+
var SvgUser = (props) => {
|
|
1672
|
+
var _a, _b;
|
|
1673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.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_runtime47.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" }) });
|
|
1388
1674
|
};
|
|
1389
|
-
var
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1675
|
+
var user_default = SvgUser;
|
|
1676
|
+
|
|
1677
|
+
// src/theme/default/components/ui/user-avater.tsx
|
|
1678
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
1679
|
+
var UserAvatar = (0, import_react4.forwardRef)(
|
|
1680
|
+
({ initials, ...rest }, ref) => {
|
|
1681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1682
|
+
"button",
|
|
1683
|
+
{
|
|
1684
|
+
ref,
|
|
1685
|
+
className: "size-10 relative flex overflow-hidden items-center justify-center rounded-full bg-button-primary-bg-default disabled:hover:bg-button-primary-bg-default hover:bg-button-primary-bg-hover",
|
|
1686
|
+
...rest,
|
|
1687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "relative size-full flex items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1688
|
+
"img",
|
|
1689
|
+
{
|
|
1690
|
+
src: initials.avatar,
|
|
1691
|
+
alt: initials.primary,
|
|
1692
|
+
className: "w-full object-contain"
|
|
1693
|
+
}
|
|
1694
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(user_default, { size: 24, className: "text-button-primary-fg-default" }) })
|
|
1695
|
+
}
|
|
1696
|
+
);
|
|
1697
|
+
}
|
|
1698
|
+
);
|
|
1699
|
+
UserAvatar.displayName = "UserAvatar";
|
|
1700
|
+
|
|
1701
|
+
// src/theme/default/components/ui/user-menu.tsx
|
|
1702
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1703
|
+
var UserMenu = ({ session }) => {
|
|
1704
|
+
const { config } = (0, import_elements_react14.useOryFlow)();
|
|
1705
|
+
const initials = getUserInitials(session);
|
|
1706
|
+
const [logoutFlow, setLogoutFlow] = (0, import_react5.useState)();
|
|
1707
|
+
const fetchLogoutFlow = (0, import_react5.useCallback)(async () => {
|
|
1708
|
+
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
1709
|
+
setLogoutFlow(flow);
|
|
1710
|
+
}, [config.sdk.url]);
|
|
1711
|
+
(0, import_react5.useEffect)(() => {
|
|
1712
|
+
void fetchLogoutFlow();
|
|
1713
|
+
}, [fetchLogoutFlow]);
|
|
1714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu, { children: [
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UserAvatar, { initials }) }),
|
|
1716
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenuContent, { children: [
|
|
1717
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "px-5 py-4.5 flex gap-3", children: [
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UserAvatar, { disabled: true, initials }),
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col text-sm leading-tight justify-center", children: [
|
|
1720
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-dialog-fg-default", children: initials.primary }),
|
|
1721
|
+
initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-dialog-fg-mute", children: initials.secondary })
|
|
1722
|
+
] })
|
|
1723
|
+
] }),
|
|
1724
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("a", { href: "/settings", children: [
|
|
1725
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(settings_default, { size: 16 }),
|
|
1726
|
+
" User settings"
|
|
1727
|
+
] }) }),
|
|
1728
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(logout_default, { size: 16 }),
|
|
1730
|
+
" Logout"
|
|
1731
|
+
] }) })
|
|
1732
|
+
] })
|
|
1400
1733
|
] });
|
|
1401
1734
|
};
|
|
1402
|
-
|
|
1403
|
-
|
|
1735
|
+
|
|
1736
|
+
// src/theme/default/components/generic/page-header.tsx
|
|
1737
|
+
var import_client2 = require("@ory/elements-react/client");
|
|
1738
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
1739
|
+
var DefaultPageHeader = (_props) => {
|
|
1740
|
+
const { Card } = (0, import_elements_react15.useComponents)();
|
|
1741
|
+
const { session } = (0, import_client2.useSession)();
|
|
1742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex max-w-[896px] flex-col w-full gap-3 mt-16", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex gap-2 max-h-10 justify-between flex-1", children: [
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "h-10 flex-1 relative", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Card.Logo, {}) }),
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UserMenu, { session })
|
|
1745
|
+
] }) }) });
|
|
1404
1746
|
};
|
|
1405
1747
|
|
|
1748
|
+
// src/theme/default/assets/icons/trash.svg
|
|
1749
|
+
var React25 = __toESM(require("react"));
|
|
1750
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1751
|
+
var SvgTrash = (props) => {
|
|
1752
|
+
var _a, _b;
|
|
1753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.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_runtime51.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" }) });
|
|
1754
|
+
};
|
|
1755
|
+
var trash_default = SvgTrash;
|
|
1756
|
+
|
|
1757
|
+
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1758
|
+
var import_react_hook_form7 = require("react-hook-form");
|
|
1759
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1760
|
+
function DefaultSettingsOidc({
|
|
1761
|
+
linkButtons,
|
|
1762
|
+
unlinkButtons
|
|
1763
|
+
}) {
|
|
1764
|
+
const hasLinkButtons = linkButtons.length > 0;
|
|
1765
|
+
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1766
|
+
const { setValue } = (0, import_react_hook_form7.useFormContext)();
|
|
1767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1768
|
+
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex gap-3 items-start [&>button]:w-[79px]", children: linkButtons.map((button) => {
|
|
1769
|
+
const attrs = button.attributes;
|
|
1770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1771
|
+
DefaultButtonSocial,
|
|
1772
|
+
{
|
|
1773
|
+
showLabel: false,
|
|
1774
|
+
node: button,
|
|
1775
|
+
attributes: attrs,
|
|
1776
|
+
onClick: () => {
|
|
1777
|
+
setValue("link", attrs.value);
|
|
1778
|
+
setValue("method", "oidc");
|
|
1779
|
+
}
|
|
1780
|
+
},
|
|
1781
|
+
attrs.value
|
|
1782
|
+
);
|
|
1783
|
+
}) }),
|
|
1784
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
1785
|
+
unlinkButtons.map((button) => {
|
|
1786
|
+
var _a, _b;
|
|
1787
|
+
const attrs = button.attributes;
|
|
1788
|
+
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
1789
|
+
const Logo = attrs.value in provider_logos_default ? provider_logos_default[attrs.value] : provider_logos_default.generic;
|
|
1790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex justify-between", children: [
|
|
1791
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex gap-6 items-center", children: [
|
|
1792
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Logo, { size: 32 }),
|
|
1793
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-dialog-fg-subtle text-sm font-medium", children: provider })
|
|
1794
|
+
] }),
|
|
1795
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
1796
|
+
"button",
|
|
1797
|
+
{
|
|
1798
|
+
...attrs,
|
|
1799
|
+
type: "submit",
|
|
1800
|
+
onClick: () => {
|
|
1801
|
+
setValue("unlink", attrs.value);
|
|
1802
|
+
setValue("method", "oidc");
|
|
1803
|
+
},
|
|
1804
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(trash_default, { className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover" })
|
|
1805
|
+
}
|
|
1806
|
+
)
|
|
1807
|
+
] }, attrs.value);
|
|
1808
|
+
})
|
|
1809
|
+
] });
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
// src/theme/default/components/settings/settings-passkey.tsx
|
|
1813
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1814
|
+
function DefaultSettingsPasskey({
|
|
1815
|
+
triggerButton,
|
|
1816
|
+
removeButtons
|
|
1817
|
+
}) {
|
|
1818
|
+
const hasRemoveButtons = removeButtons.length > 0;
|
|
1819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-3 items-end max-w-[60%]", children: triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1821
|
+
DefaultButton,
|
|
1822
|
+
{
|
|
1823
|
+
node: triggerButton,
|
|
1824
|
+
attributes: triggerButton.attributes,
|
|
1825
|
+
onClick: triggerButton.onClick
|
|
1826
|
+
}
|
|
1827
|
+
) : null }),
|
|
1828
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DefaultHorizontalDivider, {}),
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1831
|
+
var _a, _b;
|
|
1832
|
+
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1833
|
+
const addedAt = "added_at" in context ? context.added_at : null;
|
|
1834
|
+
const diaplyName = "display_name" in context ? context.display_name : null;
|
|
1835
|
+
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
1836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
1837
|
+
"div",
|
|
1838
|
+
{
|
|
1839
|
+
className: "flex justify-between gap-6",
|
|
1840
|
+
children: [
|
|
1841
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(passkey_default, { size: 32, className: "text-dialog-fg-default" }),
|
|
1842
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-1 flex-col", children: [
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm font-medium text-dialog-fg-subtle", children: diaplyName }),
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-sm text-dialog-fg-mute", children: keyId })
|
|
1845
|
+
] }),
|
|
1846
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm self-center text-dialog-fg-mute", children: new Date(addedAt).toLocaleDateString() }),
|
|
1847
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1848
|
+
"button",
|
|
1849
|
+
{
|
|
1850
|
+
...node.attributes,
|
|
1851
|
+
type: "submit",
|
|
1852
|
+
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover",
|
|
1853
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(trash_default, { size: 20 })
|
|
1854
|
+
}
|
|
1855
|
+
)
|
|
1856
|
+
]
|
|
1857
|
+
},
|
|
1858
|
+
`webauthn-remove-button-${i}`
|
|
1859
|
+
);
|
|
1860
|
+
}) })
|
|
1861
|
+
] }) : null
|
|
1862
|
+
] });
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1406
1865
|
// src/theme/default/assets/icons/download.svg
|
|
1407
|
-
var
|
|
1408
|
-
var
|
|
1866
|
+
var React26 = __toESM(require("react"));
|
|
1867
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
1409
1868
|
var SvgDownload = (props) => {
|
|
1410
1869
|
var _a, _b;
|
|
1411
|
-
return /* @__PURE__ */ (0,
|
|
1870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.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_runtime54.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" }) });
|
|
1412
1871
|
};
|
|
1413
1872
|
var download_default = SvgDownload;
|
|
1414
1873
|
|
|
1415
1874
|
// src/theme/default/assets/icons/eye.svg
|
|
1416
|
-
var
|
|
1417
|
-
var
|
|
1875
|
+
var React27 = __toESM(require("react"));
|
|
1876
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1418
1877
|
var SvgEye = (props) => {
|
|
1419
1878
|
var _a, _b;
|
|
1420
|
-
return /* @__PURE__ */ (0,
|
|
1421
|
-
/* @__PURE__ */ (0,
|
|
1422
|
-
/* @__PURE__ */ (0,
|
|
1879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1880
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1423
1882
|
] }) });
|
|
1424
1883
|
};
|
|
1425
1884
|
var eye_default = SvgEye;
|
|
1426
1885
|
|
|
1427
1886
|
// src/theme/default/assets/icons/refresh.svg
|
|
1428
|
-
var
|
|
1429
|
-
var
|
|
1887
|
+
var React28 = __toESM(require("react"));
|
|
1888
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1430
1889
|
var SvgRefresh = (props) => {
|
|
1431
1890
|
var _a, _b;
|
|
1432
|
-
return /* @__PURE__ */ (0,
|
|
1891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime56.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" }) });
|
|
1433
1892
|
};
|
|
1434
1893
|
var refresh_default = SvgRefresh;
|
|
1435
1894
|
|
|
1436
1895
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
1437
|
-
var
|
|
1896
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1438
1897
|
function DefaultSettingsRecoveryCodes({
|
|
1439
1898
|
codes,
|
|
1440
1899
|
regnerateButton,
|
|
@@ -1451,15 +1910,15 @@ function DefaultSettingsRecoveryCodes({
|
|
|
1451
1910
|
element.click();
|
|
1452
1911
|
};
|
|
1453
1912
|
const hasCodes = codes.length >= 1;
|
|
1454
|
-
return /* @__PURE__ */ (0,
|
|
1455
|
-
/* @__PURE__ */ (0,
|
|
1456
|
-
/* @__PURE__ */ (0,
|
|
1457
|
-
regnerateButton && /* @__PURE__ */ (0,
|
|
1913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DefaultHorizontalDivider, {}),
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex justify-end gap-4", children: [
|
|
1916
|
+
regnerateButton && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1458
1917
|
"button",
|
|
1459
1918
|
{
|
|
1460
1919
|
...regnerateButton.attributes,
|
|
1461
1920
|
type: "submit",
|
|
1462
|
-
children: /* @__PURE__ */ (0,
|
|
1921
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1463
1922
|
refresh_default,
|
|
1464
1923
|
{
|
|
1465
1924
|
size: 24,
|
|
@@ -1468,12 +1927,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
1468
1927
|
)
|
|
1469
1928
|
}
|
|
1470
1929
|
),
|
|
1471
|
-
revealButton && /* @__PURE__ */ (0,
|
|
1930
|
+
revealButton && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1472
1931
|
"button",
|
|
1473
1932
|
{
|
|
1474
1933
|
...revealButton.attributes,
|
|
1475
1934
|
type: "submit",
|
|
1476
|
-
children: /* @__PURE__ */ (0,
|
|
1935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1477
1936
|
eye_default,
|
|
1478
1937
|
{
|
|
1479
1938
|
size: 24,
|
|
@@ -1482,7 +1941,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
1482
1941
|
)
|
|
1483
1942
|
}
|
|
1484
1943
|
),
|
|
1485
|
-
hasCodes ? /* @__PURE__ */ (0,
|
|
1944
|
+
hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1486
1945
|
download_default,
|
|
1487
1946
|
{
|
|
1488
1947
|
size: 24,
|
|
@@ -1491,30 +1950,21 @@ function DefaultSettingsRecoveryCodes({
|
|
|
1491
1950
|
}
|
|
1492
1951
|
) : null
|
|
1493
1952
|
] }),
|
|
1494
|
-
hasCodes ? /* @__PURE__ */ (0,
|
|
1953
|
+
hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "rounded-border-radius-cards bg-bg-default ring-1 ring-dialog-border-default p-6", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "grid grid-cols-6 gap-4 flex-wrap text-dialog-fg-default text-sm", children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { children: code }, code)) }) }) : null
|
|
1495
1954
|
] });
|
|
1496
1955
|
}
|
|
1497
1956
|
|
|
1498
1957
|
// src/theme/default/assets/icons/qrcode.svg
|
|
1499
|
-
var
|
|
1500
|
-
var
|
|
1958
|
+
var React29 = __toESM(require("react"));
|
|
1959
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1501
1960
|
var SvgQrcode = (props) => {
|
|
1502
1961
|
var _a, _b;
|
|
1503
|
-
return /* @__PURE__ */ (0,
|
|
1962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.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_runtime58.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" }) });
|
|
1504
1963
|
};
|
|
1505
1964
|
var qrcode_default = SvgQrcode;
|
|
1506
1965
|
|
|
1507
|
-
// src/theme/default/assets/icons/trash.svg
|
|
1508
|
-
var React26 = __toESM(require("react"));
|
|
1509
|
-
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
1510
|
-
var SvgTrash = (props) => {
|
|
1511
|
-
var _a, _b;
|
|
1512
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.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_runtime49.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" }) });
|
|
1513
|
-
};
|
|
1514
|
-
var trash_default = SvgTrash;
|
|
1515
|
-
|
|
1516
1966
|
// src/theme/default/components/settings/settings-top.tsx
|
|
1517
|
-
var
|
|
1967
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1518
1968
|
function DefaultSettingsTotp(props) {
|
|
1519
1969
|
var _a;
|
|
1520
1970
|
if ("totpUnlink" in props && props.totpUnlink) {
|
|
@@ -1525,17 +1975,17 @@ function DefaultSettingsTotp(props) {
|
|
|
1525
1975
|
node_type: _ignoredNodeType,
|
|
1526
1976
|
...buttonAttrs
|
|
1527
1977
|
} = (_a = props.totpUnlink) == null ? void 0 : _a.attributes;
|
|
1528
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1530
|
-
/* @__PURE__ */ (0,
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1532
|
-
/* @__PURE__ */ (0,
|
|
1533
|
-
/* @__PURE__ */ (0,
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DefaultHorizontalDivider, {}) }),
|
|
1980
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex gap-6 items-center col-span-full", children: [
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "size-8 aspect-square ", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(qrcode_default, { size: 32 }) }),
|
|
1982
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex flex-col mr-auto", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-dialog-fg-subtle text-sm font-medium", children: "Authenticator app" }) }),
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1534
1984
|
"button",
|
|
1535
1985
|
{
|
|
1536
1986
|
type: type === "button" ? "button" : "submit",
|
|
1537
1987
|
...buttonAttrs,
|
|
1538
|
-
children: /* @__PURE__ */ (0,
|
|
1988
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1539
1989
|
trash_default,
|
|
1540
1990
|
{
|
|
1541
1991
|
size: 24,
|
|
@@ -1548,9 +1998,9 @@ function DefaultSettingsTotp(props) {
|
|
|
1548
1998
|
] });
|
|
1549
1999
|
}
|
|
1550
2000
|
if ("totpSecret" in props) {
|
|
1551
|
-
return /* @__PURE__ */ (0,
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1553
|
-
/* @__PURE__ */ (0,
|
|
2001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [
|
|
2002
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DefaultHorizontalDivider, {}) }),
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "bg-dialog-bg-subtle p-8 rounded-xl flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-44 aspect-square bg-[white] rounded", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mix-blend-multiply -m-3 antialiased", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1554
2004
|
DefaultImage,
|
|
1555
2005
|
{
|
|
1556
2006
|
node: props.totpImage,
|
|
@@ -1559,13 +2009,13 @@ function DefaultSettingsTotp(props) {
|
|
|
1559
2009
|
}
|
|
1560
2010
|
}
|
|
1561
2011
|
) }) }) }),
|
|
1562
|
-
/* @__PURE__ */ (0,
|
|
1563
|
-
/* @__PURE__ */ (0,
|
|
2012
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
2013
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1564
2014
|
DefaultLabel,
|
|
1565
2015
|
{
|
|
1566
2016
|
node: props.totpSecret,
|
|
1567
2017
|
attributes: props.totpSecret.attributes,
|
|
1568
|
-
children: /* @__PURE__ */ (0,
|
|
2018
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1569
2019
|
DefaultInput,
|
|
1570
2020
|
{
|
|
1571
2021
|
node: props.totpSecret,
|
|
@@ -1580,12 +2030,12 @@ function DefaultSettingsTotp(props) {
|
|
|
1580
2030
|
)
|
|
1581
2031
|
}
|
|
1582
2032
|
),
|
|
1583
|
-
/* @__PURE__ */ (0,
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1584
2034
|
DefaultLabel,
|
|
1585
2035
|
{
|
|
1586
2036
|
attributes: props.totpInput.attributes,
|
|
1587
2037
|
node: props.totpInput,
|
|
1588
|
-
children: /* @__PURE__ */ (0,
|
|
2038
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1589
2039
|
DefaultInput,
|
|
1590
2040
|
{
|
|
1591
2041
|
node: props.totpInput,
|
|
@@ -1594,187 +2044,79 @@ function DefaultSettingsTotp(props) {
|
|
|
1594
2044
|
)
|
|
1595
2045
|
}
|
|
1596
2046
|
)
|
|
1597
|
-
] })
|
|
1598
|
-
] });
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1603
|
-
var import_react_hook_form5 = require("react-hook-form");
|
|
1604
|
-
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
1605
|
-
function DefaultSettingsOidc({
|
|
1606
|
-
linkButtons,
|
|
1607
|
-
unlinkButtons
|
|
1608
|
-
}) {
|
|
1609
|
-
const hasLinkButtons = linkButtons.length > 0;
|
|
1610
|
-
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1611
|
-
const { setValue } = (0, import_react_hook_form5.useFormContext)();
|
|
1612
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1613
|
-
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex gap-3 items-start [&>button]:w-[79px]", children: linkButtons.map((button) => {
|
|
1614
|
-
const attrs = button.attributes;
|
|
1615
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1616
|
-
DefaultButtonSocial,
|
|
1617
|
-
{
|
|
1618
|
-
showLabel: false,
|
|
1619
|
-
node: button,
|
|
1620
|
-
attributes: attrs,
|
|
1621
|
-
onClick: () => {
|
|
1622
|
-
setValue("link", attrs.value);
|
|
1623
|
-
setValue("method", "oidc");
|
|
1624
|
-
}
|
|
1625
|
-
},
|
|
1626
|
-
attrs.value
|
|
1627
|
-
);
|
|
1628
|
-
}) }),
|
|
1629
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
1630
|
-
unlinkButtons.map((button) => {
|
|
1631
|
-
var _a, _b;
|
|
1632
|
-
const attrs = button.attributes;
|
|
1633
|
-
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
1634
|
-
const Logo = attrs.value in provider_logos_default ? provider_logos_default[attrs.value] : provider_logos_default.generic;
|
|
1635
|
-
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex justify-between", children: [
|
|
1636
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex gap-6 items-center", children: [
|
|
1637
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Logo, { size: 32 }),
|
|
1638
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-dialog-fg-subtle text-sm font-medium", children: provider })
|
|
1639
|
-
] }),
|
|
1640
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
1641
|
-
"button",
|
|
1642
|
-
{
|
|
1643
|
-
...attrs,
|
|
1644
|
-
type: "submit",
|
|
1645
|
-
onClick: () => {
|
|
1646
|
-
setValue("unlink", attrs.value);
|
|
1647
|
-
setValue("method", "oidc");
|
|
1648
|
-
},
|
|
1649
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(trash_default, { className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover" })
|
|
1650
|
-
}
|
|
1651
|
-
)
|
|
1652
|
-
] }, attrs.value);
|
|
1653
|
-
})
|
|
1654
|
-
] });
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
// src/theme/default/assets/icons/key.svg
|
|
1658
|
-
var React27 = __toESM(require("react"));
|
|
1659
|
-
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
1660
|
-
var SvgKey = (props) => {
|
|
1661
|
-
var _a, _b;
|
|
1662
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.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_runtime52.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" }) });
|
|
1663
|
-
};
|
|
1664
|
-
var key_default = SvgKey;
|
|
1665
|
-
|
|
1666
|
-
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
1667
|
-
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
1668
|
-
function DefaultSettingsWebauthn({
|
|
1669
|
-
nameInput,
|
|
1670
|
-
triggerButton,
|
|
1671
|
-
removeButtons
|
|
1672
|
-
}) {
|
|
1673
|
-
const hasRemoveButtons = removeButtons.length > 0;
|
|
1674
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1675
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex gap-3 items-end max-w-[60%]", children: [
|
|
1676
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1677
|
-
DefaultLabel,
|
|
1678
|
-
{
|
|
1679
|
-
node: nameInput,
|
|
1680
|
-
attributes: nameInput.attributes,
|
|
1681
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1682
|
-
DefaultInput,
|
|
1683
|
-
{
|
|
1684
|
-
node: nameInput,
|
|
1685
|
-
attributes: nameInput.attributes
|
|
1686
|
-
}
|
|
1687
|
-
)
|
|
1688
|
-
}
|
|
1689
|
-
) }),
|
|
1690
|
-
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1691
|
-
DefaultButton,
|
|
1692
|
-
{
|
|
1693
|
-
node: triggerButton,
|
|
1694
|
-
attributes: triggerButton.attributes,
|
|
1695
|
-
onClick: triggerButton.onClick
|
|
1696
|
-
}
|
|
1697
|
-
) : null
|
|
1698
|
-
] }),
|
|
1699
|
-
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
1700
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DefaultHorizontalDivider, {}),
|
|
1701
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1702
|
-
var _a, _b;
|
|
1703
|
-
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1704
|
-
const addedAt = "added_at" in context ? context.added_at : null;
|
|
1705
|
-
const diaplyName = "display_name" in context ? context.display_name : null;
|
|
1706
|
-
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
1707
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
1708
|
-
"div",
|
|
1709
|
-
{
|
|
1710
|
-
className: "flex justify-between gap-6",
|
|
1711
|
-
children: [
|
|
1712
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(key_default, { size: 32, className: "text-dialog-fg-default" }),
|
|
1713
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-1 flex-col", children: [
|
|
1714
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm font-medium text-dialog-fg-subtle", children: diaplyName }),
|
|
1715
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-sm text-dialog-fg-mute", children: keyId })
|
|
1716
|
-
] }),
|
|
1717
|
-
addedAt && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm self-center text-dialog-fg-mute", children: new Date(addedAt).toLocaleDateString() }),
|
|
1718
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
1719
|
-
"button",
|
|
1720
|
-
{
|
|
1721
|
-
...node.attributes,
|
|
1722
|
-
type: "submit",
|
|
1723
|
-
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover",
|
|
1724
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(trash_default, { size: 20 })
|
|
1725
|
-
}
|
|
1726
|
-
)
|
|
1727
|
-
]
|
|
1728
|
-
},
|
|
1729
|
-
`webauthn-remove-button-${i}`
|
|
1730
|
-
);
|
|
1731
|
-
}) })
|
|
1732
|
-
] }) : null
|
|
1733
|
-
] });
|
|
2047
|
+
] })
|
|
2048
|
+
] });
|
|
2049
|
+
}
|
|
1734
2050
|
}
|
|
1735
2051
|
|
|
1736
|
-
// src/theme/default/
|
|
1737
|
-
var
|
|
1738
|
-
|
|
2052
|
+
// src/theme/default/assets/icons/key.svg
|
|
2053
|
+
var React30 = __toESM(require("react"));
|
|
2054
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
2055
|
+
var SvgKey = (props) => {
|
|
2056
|
+
var _a, _b;
|
|
2057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.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_runtime60.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" }) });
|
|
2058
|
+
};
|
|
2059
|
+
var key_default = SvgKey;
|
|
2060
|
+
|
|
2061
|
+
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2062
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
2063
|
+
function DefaultSettingsWebauthn({
|
|
2064
|
+
nameInput,
|
|
1739
2065
|
triggerButton,
|
|
1740
2066
|
removeButtons
|
|
1741
2067
|
}) {
|
|
1742
2068
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
1743
|
-
return /* @__PURE__ */ (0,
|
|
1744
|
-
/* @__PURE__ */ (0,
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
2069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex gap-3 items-end max-w-[60%]", children: [
|
|
2071
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2072
|
+
DefaultLabel,
|
|
2073
|
+
{
|
|
2074
|
+
node: nameInput,
|
|
2075
|
+
attributes: nameInput.attributes,
|
|
2076
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2077
|
+
DefaultInput,
|
|
2078
|
+
{
|
|
2079
|
+
node: nameInput,
|
|
2080
|
+
attributes: nameInput.attributes
|
|
2081
|
+
}
|
|
2082
|
+
)
|
|
2083
|
+
}
|
|
2084
|
+
) }),
|
|
2085
|
+
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
2086
|
+
DefaultButton,
|
|
2087
|
+
{
|
|
2088
|
+
node: triggerButton,
|
|
2089
|
+
attributes: triggerButton.attributes,
|
|
2090
|
+
onClick: triggerButton.onClick
|
|
2091
|
+
}
|
|
2092
|
+
) : null
|
|
2093
|
+
] }),
|
|
2094
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DefaultHorizontalDivider, {}),
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1755
2097
|
var _a, _b;
|
|
1756
2098
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1757
2099
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
1758
2100
|
const diaplyName = "display_name" in context ? context.display_name : null;
|
|
1759
2101
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
1760
|
-
return /* @__PURE__ */ (0,
|
|
2102
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
1761
2103
|
"div",
|
|
1762
2104
|
{
|
|
1763
2105
|
className: "flex justify-between gap-6",
|
|
1764
2106
|
children: [
|
|
1765
|
-
/* @__PURE__ */ (0,
|
|
1766
|
-
/* @__PURE__ */ (0,
|
|
1767
|
-
/* @__PURE__ */ (0,
|
|
1768
|
-
/* @__PURE__ */ (0,
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(key_default, { size: 32, className: "text-dialog-fg-default" }),
|
|
2108
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-1 flex-col", children: [
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-sm font-medium text-dialog-fg-subtle", children: diaplyName }),
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-sm text-dialog-fg-mute", children: keyId })
|
|
1769
2111
|
] }),
|
|
1770
|
-
addedAt && /* @__PURE__ */ (0,
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
2112
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-sm self-center text-dialog-fg-mute", children: new Date(addedAt).toLocaleDateString() }),
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
1772
2114
|
"button",
|
|
1773
2115
|
{
|
|
1774
2116
|
...node.attributes,
|
|
1775
2117
|
type: "submit",
|
|
1776
2118
|
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover",
|
|
1777
|
-
children: /* @__PURE__ */ (0,
|
|
2119
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(trash_default, { size: 20 })
|
|
1778
2120
|
}
|
|
1779
2121
|
)
|
|
1780
2122
|
]
|
|
@@ -1786,224 +2128,9 @@ function DefaultSettingsPasskey({
|
|
|
1786
2128
|
] });
|
|
1787
2129
|
}
|
|
1788
2130
|
|
|
1789
|
-
// src/theme/default/components/generic/page-header.tsx
|
|
1790
|
-
var import_elements_react14 = require("@ory/elements-react");
|
|
1791
|
-
|
|
1792
|
-
// src/theme/default/components/ui/user-menu.tsx
|
|
1793
|
-
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
1794
|
-
var import_react5 = require("react");
|
|
1795
|
-
var import_elements_react13 = require("@ory/elements-react");
|
|
1796
|
-
|
|
1797
|
-
// src/util/client.ts
|
|
1798
|
-
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1799
|
-
function frontendClient(sdkUrl, opts = {}) {
|
|
1800
|
-
const config = new import_client_fetch9.Configuration({
|
|
1801
|
-
...opts,
|
|
1802
|
-
basePath: sdkUrl,
|
|
1803
|
-
headers: {
|
|
1804
|
-
Accept: "application/json",
|
|
1805
|
-
...opts.headers
|
|
1806
|
-
}
|
|
1807
|
-
});
|
|
1808
|
-
return new import_client_fetch9.FrontendApi(config);
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
// src/theme/default/assets/icons/logout.svg
|
|
1812
|
-
var React28 = __toESM(require("react"));
|
|
1813
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
1814
|
-
var SvgLogout = (props) => {
|
|
1815
|
-
var _a, _b;
|
|
1816
|
-
return /* @__PURE__ */ (0, import_jsx_runtime55.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_runtime55.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" }) });
|
|
1817
|
-
};
|
|
1818
|
-
var logout_default = SvgLogout;
|
|
1819
|
-
|
|
1820
|
-
// src/theme/default/assets/icons/settings.svg
|
|
1821
|
-
var React29 = __toESM(require("react"));
|
|
1822
|
-
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
1823
|
-
var SvgSettings = (props) => {
|
|
1824
|
-
var _a, _b;
|
|
1825
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.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_runtime56.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1826
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.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" }),
|
|
1827
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1828
|
-
] }) });
|
|
1829
|
-
};
|
|
1830
|
-
var settings_default = SvgSettings;
|
|
1831
|
-
|
|
1832
|
-
// src/theme/default/utils/user.ts
|
|
1833
|
-
var getUserInitials = (session) => {
|
|
1834
|
-
var _a, _b;
|
|
1835
|
-
const avatar = "";
|
|
1836
|
-
let primary = "";
|
|
1837
|
-
let secondary = "";
|
|
1838
|
-
if (!((_a = session == null ? void 0 : session.identity) == null ? void 0 : _a.traits)) {
|
|
1839
|
-
return {
|
|
1840
|
-
primary,
|
|
1841
|
-
secondary,
|
|
1842
|
-
avatar
|
|
1843
|
-
};
|
|
1844
|
-
}
|
|
1845
|
-
const traits = (_b = session.identity) == null ? void 0 : _b.traits;
|
|
1846
|
-
if (traits.email) {
|
|
1847
|
-
secondary = traits.email;
|
|
1848
|
-
}
|
|
1849
|
-
if (traits.name) {
|
|
1850
|
-
if (typeof traits.name === "string") {
|
|
1851
|
-
primary = traits.name;
|
|
1852
|
-
}
|
|
1853
|
-
if (traits.name.first && traits.name.last) {
|
|
1854
|
-
primary = traits.name.first + " " + traits.name.last;
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
|
-
if (primary === "") {
|
|
1858
|
-
primary = secondary;
|
|
1859
|
-
secondary = "";
|
|
1860
|
-
}
|
|
1861
|
-
return {
|
|
1862
|
-
primary,
|
|
1863
|
-
secondary,
|
|
1864
|
-
avatar
|
|
1865
|
-
};
|
|
1866
|
-
};
|
|
1867
|
-
|
|
1868
|
-
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1869
|
-
var import_react3 = require("react");
|
|
1870
|
-
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1871
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
1872
|
-
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1873
|
-
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1874
|
-
var DropdownMenuContent = (0, import_react3.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1875
|
-
DropdownMenuPrimitive.Content,
|
|
1876
|
-
{
|
|
1877
|
-
ref,
|
|
1878
|
-
sideOffset,
|
|
1879
|
-
align: "end",
|
|
1880
|
-
className: cn(
|
|
1881
|
-
"z-50 min-w-[19rem] overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1882
|
-
"border border-dialog-border-default bg-dialog-bg-default rounded-border-radius-cards",
|
|
1883
|
-
className
|
|
1884
|
-
),
|
|
1885
|
-
...props
|
|
1886
|
-
}
|
|
1887
|
-
) }));
|
|
1888
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1889
|
-
var DropdownMenuItem = (0, import_react3.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1890
|
-
DropdownMenuPrimitive.Item,
|
|
1891
|
-
{
|
|
1892
|
-
ref,
|
|
1893
|
-
className: cn(
|
|
1894
|
-
"relative flex cursor-pointer select-none items-center outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
1895
|
-
"px-8 py-3 lg:py-4.5 text-sm gap-6",
|
|
1896
|
-
"first:border-0 border-t border-button-secondary-border-default hover:border-button-social-border-hover data-[disabled]:border-button-secondary-border-disabled",
|
|
1897
|
-
"text-button-secondary-fg-default bg-button-secondary-bg-default",
|
|
1898
|
-
"hover:text-button-secondary-fg-hover hover:bg-button-secondary-bg-hover",
|
|
1899
|
-
"data-[disabled]:text-button-secondary-fg-disabled data-[disabled]:bg-button-secondary-bg-disabled",
|
|
1900
|
-
inset && "pl-8",
|
|
1901
|
-
className
|
|
1902
|
-
),
|
|
1903
|
-
...props
|
|
1904
|
-
}
|
|
1905
|
-
));
|
|
1906
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1907
|
-
var DropdownMenuLabel = (0, import_react3.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
1908
|
-
DropdownMenuPrimitive.Label,
|
|
1909
|
-
{
|
|
1910
|
-
ref,
|
|
1911
|
-
className: cn(
|
|
1912
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
1913
|
-
inset && "pl-8",
|
|
1914
|
-
className
|
|
1915
|
-
),
|
|
1916
|
-
...props
|
|
1917
|
-
}
|
|
1918
|
-
));
|
|
1919
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1920
|
-
|
|
1921
|
-
// src/theme/default/components/ui/user-avater.tsx
|
|
1922
|
-
var import_react4 = require("react");
|
|
1923
|
-
|
|
1924
|
-
// src/theme/default/assets/icons/user.svg
|
|
1925
|
-
var React30 = __toESM(require("react"));
|
|
1926
|
-
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
1927
|
-
var SvgUser = (props) => {
|
|
1928
|
-
var _a, _b;
|
|
1929
|
-
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: "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" }) });
|
|
1930
|
-
};
|
|
1931
|
-
var user_default = SvgUser;
|
|
1932
|
-
|
|
1933
|
-
// src/theme/default/components/ui/user-avater.tsx
|
|
1934
|
-
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
1935
|
-
var UserAvatar = (0, import_react4.forwardRef)(
|
|
1936
|
-
({ initials, ...rest }, ref) => {
|
|
1937
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1938
|
-
"button",
|
|
1939
|
-
{
|
|
1940
|
-
ref,
|
|
1941
|
-
className: "size-10 relative flex overflow-hidden items-center justify-center rounded-full bg-button-primary-bg-default disabled:hover:bg-button-primary-bg-default hover:bg-button-primary-bg-hover",
|
|
1942
|
-
...rest,
|
|
1943
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "relative size-full flex items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
1944
|
-
"img",
|
|
1945
|
-
{
|
|
1946
|
-
src: initials.avatar,
|
|
1947
|
-
alt: initials.primary,
|
|
1948
|
-
className: "w-full object-contain"
|
|
1949
|
-
}
|
|
1950
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(user_default, { size: 24, className: "text-button-primary-fg-default" }) })
|
|
1951
|
-
}
|
|
1952
|
-
);
|
|
1953
|
-
}
|
|
1954
|
-
);
|
|
1955
|
-
UserAvatar.displayName = "UserAvatar";
|
|
1956
|
-
|
|
1957
|
-
// src/theme/default/components/ui/user-menu.tsx
|
|
1958
|
-
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
1959
|
-
var UserMenu = ({ session }) => {
|
|
1960
|
-
const { config } = (0, import_elements_react13.useOryFlow)();
|
|
1961
|
-
const initials = getUserInitials(session);
|
|
1962
|
-
const [logoutFlow, setLogoutFlow] = (0, import_react5.useState)();
|
|
1963
|
-
const fetchLogoutFlow = (0, import_react5.useCallback)(async () => {
|
|
1964
|
-
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
1965
|
-
setLogoutFlow(flow);
|
|
1966
|
-
}, [config.sdk.url]);
|
|
1967
|
-
(0, import_react5.useEffect)(() => {
|
|
1968
|
-
void fetchLogoutFlow();
|
|
1969
|
-
}, [fetchLogoutFlow]);
|
|
1970
|
-
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenu, { children: [
|
|
1971
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(UserAvatar, { initials }) }),
|
|
1972
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(DropdownMenuContent, { children: [
|
|
1973
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "px-5 py-4.5 flex gap-3", children: [
|
|
1974
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(UserAvatar, { disabled: true, initials }),
|
|
1975
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col text-sm leading-tight justify-center", children: [
|
|
1976
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-dialog-fg-default", children: initials.primary }),
|
|
1977
|
-
initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "text-dialog-fg-mute", children: initials.secondary })
|
|
1978
|
-
] })
|
|
1979
|
-
] }),
|
|
1980
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("a", { href: "/settings", children: [
|
|
1981
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(settings_default, { size: 16 }),
|
|
1982
|
-
" User settings"
|
|
1983
|
-
] }) }),
|
|
1984
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
1985
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(logout_default, { size: 16 }),
|
|
1986
|
-
" Logout"
|
|
1987
|
-
] }) })
|
|
1988
|
-
] })
|
|
1989
|
-
] });
|
|
1990
|
-
};
|
|
1991
|
-
|
|
1992
|
-
// src/theme/default/components/generic/page-header.tsx
|
|
1993
|
-
var import_client2 = require("@ory/elements-react/client");
|
|
1994
|
-
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
1995
|
-
var DefaultPageHeader = (_props) => {
|
|
1996
|
-
const { Card } = (0, import_elements_react14.useComponents)();
|
|
1997
|
-
const { session } = (0, import_client2.useSession)();
|
|
1998
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex max-w-[896px] flex-col w-full gap-3 mt-16", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex gap-2 max-h-10 justify-between flex-1", children: [
|
|
1999
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "h-10 flex-1 relative", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Card.Logo, {}) }),
|
|
2000
|
-
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(UserMenu, { session })
|
|
2001
|
-
] }) }) });
|
|
2002
|
-
};
|
|
2003
|
-
|
|
2004
2131
|
// src/theme/default/components/default-components.tsx
|
|
2005
2132
|
function getOryComponents(overrides) {
|
|
2006
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa
|
|
2133
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa;
|
|
2007
2134
|
return {
|
|
2008
2135
|
Card: {
|
|
2009
2136
|
Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
|
|
@@ -2020,31 +2147,30 @@ function getOryComponents(overrides) {
|
|
|
2020
2147
|
Node: {
|
|
2021
2148
|
Button: (_v = (_u = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _u.Button) != null ? _v : DefaultButton,
|
|
2022
2149
|
OidcButton: (_x = (_w = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _w.OidcButton) != null ? _x : DefaultButtonSocial,
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton
|
|
2150
|
+
Input: (_z = (_y = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _y.Input) != null ? _z : DefaultInput,
|
|
2151
|
+
CodeInput: (_B = (_A = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _A.CodeInput) != null ? _B : DefaultPinCodeInput,
|
|
2152
|
+
Image: (_D = (_C = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _C.Image) != null ? _D : DefaultImage,
|
|
2153
|
+
Label: (_F = (_E = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _E.Label) != null ? _F : DefaultLabel,
|
|
2154
|
+
Checkbox: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Checkbox) != null ? _H : DefaultCheckbox,
|
|
2155
|
+
Text: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Text) != null ? _J : DefaultText,
|
|
2156
|
+
Anchor: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Anchor) != null ? _L : DefaultLinkButton
|
|
2031
2157
|
},
|
|
2032
2158
|
Form: {
|
|
2033
|
-
Root: (
|
|
2034
|
-
Group: (
|
|
2035
|
-
OidcRoot: (
|
|
2036
|
-
RecoveryCodesSettings: (
|
|
2037
|
-
TotpSettings: (
|
|
2038
|
-
OidcSettings: (
|
|
2039
|
-
WebauthnSettings: (
|
|
2040
|
-
PasskeySettings: (
|
|
2159
|
+
Root: (_N = (_M = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _M.Root) != null ? _N : DefaultFormContainer,
|
|
2160
|
+
Group: (_P = (_O = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _O.Group) != null ? _P : DefaultGroupContainer,
|
|
2161
|
+
OidcRoot: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.OidcRoot) != null ? _R : DefaultSocialButtonContainer,
|
|
2162
|
+
RecoveryCodesSettings: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.RecoveryCodesSettings) != null ? _T : DefaultSettingsRecoveryCodes,
|
|
2163
|
+
TotpSettings: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.TotpSettings) != null ? _V : DefaultSettingsTotp,
|
|
2164
|
+
OidcSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcSettings) != null ? _X : DefaultSettingsOidc,
|
|
2165
|
+
WebauthnSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.WebauthnSettings) != null ? _Z : DefaultSettingsWebauthn,
|
|
2166
|
+
PasskeySettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.PasskeySettings) != null ? _$ : DefaultSettingsPasskey
|
|
2041
2167
|
},
|
|
2042
2168
|
Message: {
|
|
2043
|
-
Root: (
|
|
2044
|
-
Content: (
|
|
2169
|
+
Root: (_ba = (_aa = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _aa.Root) != null ? _ba : DefaultMessageContainer,
|
|
2170
|
+
Content: (_da = (_ca = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ca.Content) != null ? _da : DefaultMessage
|
|
2045
2171
|
},
|
|
2046
2172
|
Page: {
|
|
2047
|
-
Header: (
|
|
2173
|
+
Header: (_fa = (_ea = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ea.Header) != null ? _fa : DefaultPageHeader
|
|
2048
2174
|
}
|
|
2049
2175
|
};
|
|
2050
2176
|
}
|
|
@@ -2059,8 +2185,8 @@ function Error2({
|
|
|
2059
2185
|
}
|
|
2060
2186
|
|
|
2061
2187
|
// src/theme/default/flows/login.tsx
|
|
2062
|
-
var
|
|
2063
|
-
var
|
|
2188
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
2189
|
+
var import_elements_react16 = require("@ory/elements-react");
|
|
2064
2190
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
2065
2191
|
function Login({
|
|
2066
2192
|
flow,
|
|
@@ -2070,20 +2196,20 @@ function Login({
|
|
|
2070
2196
|
}) {
|
|
2071
2197
|
const components = getOryComponents(flowOverrideComponents);
|
|
2072
2198
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2073
|
-
|
|
2199
|
+
import_elements_react16.OryProvider,
|
|
2074
2200
|
{
|
|
2075
2201
|
config,
|
|
2076
2202
|
flow,
|
|
2077
|
-
flowType:
|
|
2203
|
+
flowType: import_client_fetch11.FlowType.Login,
|
|
2078
2204
|
components,
|
|
2079
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
2205
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_elements_react16.OryTwoStepCard, {})
|
|
2080
2206
|
}
|
|
2081
2207
|
);
|
|
2082
2208
|
}
|
|
2083
2209
|
|
|
2084
2210
|
// src/theme/default/flows/recovery.tsx
|
|
2085
|
-
var
|
|
2086
|
-
var
|
|
2211
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
2212
|
+
var import_elements_react17 = require("@ory/elements-react");
|
|
2087
2213
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2088
2214
|
function Recovery({
|
|
2089
2215
|
flow,
|
|
@@ -2093,20 +2219,20 @@ function Recovery({
|
|
|
2093
2219
|
}) {
|
|
2094
2220
|
const components = getOryComponents(flowOverrideComponents);
|
|
2095
2221
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2096
|
-
|
|
2222
|
+
import_elements_react17.OryProvider,
|
|
2097
2223
|
{
|
|
2098
2224
|
config,
|
|
2099
2225
|
flow,
|
|
2100
|
-
flowType:
|
|
2226
|
+
flowType: import_client_fetch12.FlowType.Recovery,
|
|
2101
2227
|
components,
|
|
2102
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
2228
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_elements_react17.OryTwoStepCard, {})
|
|
2103
2229
|
}
|
|
2104
2230
|
);
|
|
2105
2231
|
}
|
|
2106
2232
|
|
|
2107
2233
|
// src/theme/default/flows/registration.tsx
|
|
2108
|
-
var
|
|
2109
|
-
var
|
|
2234
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
2235
|
+
var import_elements_react18 = require("@ory/elements-react");
|
|
2110
2236
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2111
2237
|
function Registration({
|
|
2112
2238
|
flow,
|
|
@@ -2116,20 +2242,20 @@ function Registration({
|
|
|
2116
2242
|
}) {
|
|
2117
2243
|
const components = getOryComponents(flowOverrideComponents);
|
|
2118
2244
|
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2119
|
-
|
|
2245
|
+
import_elements_react18.OryProvider,
|
|
2120
2246
|
{
|
|
2121
2247
|
config,
|
|
2122
2248
|
flow,
|
|
2123
|
-
flowType:
|
|
2249
|
+
flowType: import_client_fetch13.FlowType.Registration,
|
|
2124
2250
|
components,
|
|
2125
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
2251
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_elements_react18.OryTwoStepCard, {})
|
|
2126
2252
|
}
|
|
2127
2253
|
);
|
|
2128
2254
|
}
|
|
2129
2255
|
|
|
2130
2256
|
// src/theme/default/flows/settings.tsx
|
|
2131
|
-
var
|
|
2132
|
-
var
|
|
2257
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
2258
|
+
var import_elements_react19 = require("@ory/elements-react");
|
|
2133
2259
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
2134
2260
|
function Settings({
|
|
2135
2261
|
flow,
|
|
@@ -2139,23 +2265,23 @@ function Settings({
|
|
|
2139
2265
|
}) {
|
|
2140
2266
|
const components = getOryComponents(flowOverrideComponents);
|
|
2141
2267
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2142
|
-
|
|
2268
|
+
import_elements_react19.OryProvider,
|
|
2143
2269
|
{
|
|
2144
2270
|
config,
|
|
2145
2271
|
flow,
|
|
2146
|
-
flowType:
|
|
2272
|
+
flowType: import_client_fetch14.FlowType.Settings,
|
|
2147
2273
|
components,
|
|
2148
2274
|
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
2149
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2150
|
-
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
2275
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_elements_react19.HeadlessPageHeader, {}),
|
|
2276
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_elements_react19.OrySettingsCard, {})
|
|
2151
2277
|
] })
|
|
2152
2278
|
}
|
|
2153
2279
|
);
|
|
2154
2280
|
}
|
|
2155
2281
|
|
|
2156
2282
|
// src/theme/default/flows/verification.tsx
|
|
2157
|
-
var
|
|
2158
|
-
var
|
|
2283
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
2284
|
+
var import_elements_react20 = require("@ory/elements-react");
|
|
2159
2285
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
2160
2286
|
function Verification({
|
|
2161
2287
|
flow,
|
|
@@ -2165,13 +2291,13 @@ function Verification({
|
|
|
2165
2291
|
}) {
|
|
2166
2292
|
const components = getOryComponents(flowOverrideComponents);
|
|
2167
2293
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2168
|
-
|
|
2294
|
+
import_elements_react20.OryProvider,
|
|
2169
2295
|
{
|
|
2170
2296
|
config,
|
|
2171
2297
|
flow,
|
|
2172
|
-
flowType:
|
|
2298
|
+
flowType: import_client_fetch15.FlowType.Verification,
|
|
2173
2299
|
components,
|
|
2174
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
2300
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_elements_react20.OryTwoStepCard, {})
|
|
2175
2301
|
}
|
|
2176
2302
|
);
|
|
2177
2303
|
}
|
|
@@ -2182,6 +2308,7 @@ function Verification({
|
|
|
2182
2308
|
DefaultCardFooter,
|
|
2183
2309
|
DefaultCardHeader,
|
|
2184
2310
|
DefaultCardLogo,
|
|
2311
|
+
DefaultCurrentIdentifierButton,
|
|
2185
2312
|
DefaultFormContainer,
|
|
2186
2313
|
DefaultMessage,
|
|
2187
2314
|
DefaultMessageContainer,
|