@ory/elements-react 1.0.0-next.10 → 1.0.0-next.12
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/.eslintrc.js +2 -0
- package/CHANGELOG.md +47 -0
- package/api-report/elements-react-theme.api.json +25 -70
- package/api-report/elements-react-theme.api.md +15 -12
- package/api-report/elements-react.api.json +1380 -1920
- package/api-report/elements-react.api.md +237 -216
- package/api-report/temp/elements-react-theme.api.md +1 -0
- package/api-report/temp/elements-react.api.md +103 -20
- package/dist/index.d.mts +414 -2009
- package/dist/index.d.ts +414 -2009
- package/dist/index.js +6776 -857
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6755 -826
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +292 -29
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +9 -9
- package/dist/theme/default/index.d.ts +9 -9
- package/dist/theme/default/index.js +1034 -295
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +1028 -266
- package/dist/theme/default/index.mjs.map +1 -1
- package/jest.config.ts +4 -3
- package/package.json +13 -8
- package/tailwind.config.ts +6 -1
- package/tsconfig.json +5 -5
|
@@ -291,9 +291,9 @@ function useCardHeaderText(nodes, opts) {
|
|
|
291
291
|
// src/theme/default/components/card/header.tsx
|
|
292
292
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
293
293
|
function InnerCardHeader({ title, text }) {
|
|
294
|
-
const {
|
|
294
|
+
const { Card } = useComponents();
|
|
295
295
|
return /* @__PURE__ */ jsxs5("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
296
|
-
/* @__PURE__ */ jsx5(
|
|
296
|
+
/* @__PURE__ */ jsx5(Card.Logo, {}),
|
|
297
297
|
/* @__PURE__ */ jsxs5("div", { children: [
|
|
298
298
|
/* @__PURE__ */ jsx5("h2", { className: "font-semibold text-lg text-dialog-fg-default leading-normal", children: title }),
|
|
299
299
|
/* @__PURE__ */ jsx5("p", { className: "text-sm leading-normal text-dialog-fg-subtle", children: text })
|
|
@@ -317,19 +317,13 @@ function DefaultCardLogo() {
|
|
|
317
317
|
if (flow.config.logoUrl) {
|
|
318
318
|
return /* @__PURE__ */ jsx6("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
319
319
|
}
|
|
320
|
-
return /* @__PURE__ */ jsx6(
|
|
321
|
-
"h1",
|
|
322
|
-
{
|
|
323
|
-
className: "text-xl font-semibold leading-normal text-dialog-fg-default",
|
|
324
|
-
children: flow.config.name
|
|
325
|
-
}
|
|
326
|
-
);
|
|
320
|
+
return /* @__PURE__ */ jsx6("h1", { className: "text-xl font-semibold leading-normal text-dialog-fg-default", children: flow.config.name });
|
|
327
321
|
}
|
|
328
322
|
|
|
329
323
|
// src/theme/default/components/card/index.tsx
|
|
330
324
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
331
325
|
function DefaultCard({ children }) {
|
|
332
|
-
return /* @__PURE__ */ jsx7("div", { className: "font-sans", children: /* @__PURE__ */ jsxs6("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: [
|
|
326
|
+
return /* @__PURE__ */ jsx7("div", { className: "flex-1 flex-col flex justify-center items-center font-sans", children: /* @__PURE__ */ jsxs6("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: [
|
|
333
327
|
children,
|
|
334
328
|
/* @__PURE__ */ jsx7(Badge, {})
|
|
335
329
|
] }) });
|
|
@@ -343,8 +337,12 @@ function cn(...inputs) {
|
|
|
343
337
|
}
|
|
344
338
|
|
|
345
339
|
// src/theme/default/components/form/index.tsx
|
|
346
|
-
import { formatMessage } from "@ory/elements-react";
|
|
347
340
|
import { useIntl as useIntl3 } from "react-intl";
|
|
341
|
+
import {
|
|
342
|
+
uiTextToFormattedMessage,
|
|
343
|
+
useOryFlow as useOryFlow4
|
|
344
|
+
} from "@ory/elements-react";
|
|
345
|
+
import { FlowType as FlowType3 } from "@ory/client-fetch";
|
|
348
346
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
349
347
|
function DefaultFormContainer({
|
|
350
348
|
children,
|
|
@@ -365,10 +363,19 @@ function DefaultFormContainer({
|
|
|
365
363
|
);
|
|
366
364
|
}
|
|
367
365
|
function DefaultMessageContainer({ children }) {
|
|
366
|
+
const { flowType } = useOryFlow4();
|
|
368
367
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
369
368
|
return null;
|
|
370
369
|
}
|
|
371
|
-
return /* @__PURE__ */ jsx8(
|
|
370
|
+
return /* @__PURE__ */ jsx8(
|
|
371
|
+
"section",
|
|
372
|
+
{
|
|
373
|
+
className: cn(
|
|
374
|
+
flowType === FlowType3.Settings ? "text-center" : "text-left"
|
|
375
|
+
),
|
|
376
|
+
children
|
|
377
|
+
}
|
|
378
|
+
);
|
|
372
379
|
}
|
|
373
380
|
function DefaultMessage({ message }) {
|
|
374
381
|
const intl = useIntl3();
|
|
@@ -380,11 +387,14 @@ function DefaultMessage({ message }) {
|
|
|
380
387
|
"text-forms-fg-default": message.type === "info",
|
|
381
388
|
"text-forms-fg-success": message.type === "success"
|
|
382
389
|
}),
|
|
383
|
-
children:
|
|
390
|
+
children: uiTextToFormattedMessage(message, intl)
|
|
384
391
|
}
|
|
385
392
|
);
|
|
386
393
|
}
|
|
387
394
|
|
|
395
|
+
// src/theme/default/components/card/auth-methods.tsx
|
|
396
|
+
import { useIntl as useIntl4 } from "react-intl";
|
|
397
|
+
|
|
388
398
|
// src/theme/default/assets/icons/code.svg
|
|
389
399
|
import * as React3 from "react";
|
|
390
400
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
@@ -421,8 +431,12 @@ var SvgWebauthn = (props) => {
|
|
|
421
431
|
};
|
|
422
432
|
var webauthn_default = SvgWebauthn;
|
|
423
433
|
|
|
434
|
+
// src/theme/default/utils/form.ts
|
|
435
|
+
function isGroupImmediateSubmit(group) {
|
|
436
|
+
return group === "code";
|
|
437
|
+
}
|
|
438
|
+
|
|
424
439
|
// src/theme/default/components/card/auth-methods.tsx
|
|
425
|
-
import { useIntl as useIntl4 } from "react-intl";
|
|
426
440
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
427
441
|
var iconsMap = {
|
|
428
442
|
code: code_default,
|
|
@@ -439,8 +453,9 @@ function DefaultAuthMethodListItem({
|
|
|
439
453
|
return /* @__PURE__ */ jsx13("div", { className: "w-full hover:bg-forms-bg-hover px-2 py-1 rounded", children: /* @__PURE__ */ jsxs7(
|
|
440
454
|
"button",
|
|
441
455
|
{
|
|
442
|
-
className: "flex text-left py-2 gap-3 cursor-pointer
|
|
456
|
+
className: "flex text-left py-2 gap-3 cursor-pointer",
|
|
443
457
|
onClick,
|
|
458
|
+
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
444
459
|
children: [
|
|
445
460
|
/* @__PURE__ */ jsx13("div", { className: "flex-none w-4 h-4 mt-[2px]", children: Icon && /* @__PURE__ */ jsx13(Icon, { size: 20, className: "text-forms-fg-default" }) }),
|
|
446
461
|
/* @__PURE__ */ jsxs7("div", { className: "flex-1 text-sm leading-normal", children: [
|
|
@@ -453,6 +468,10 @@ function DefaultAuthMethodListItem({
|
|
|
453
468
|
}
|
|
454
469
|
|
|
455
470
|
// src/theme/default/components/form/button.tsx
|
|
471
|
+
import { FlowType as FlowType4, getNodeLabel } from "@ory/client-fetch";
|
|
472
|
+
import {
|
|
473
|
+
uiTextToFormattedMessage as uiTextToFormattedMessage2
|
|
474
|
+
} from "@ory/elements-react";
|
|
456
475
|
import { useFormContext } from "react-hook-form";
|
|
457
476
|
import { useIntl as useIntl5 } from "react-intl";
|
|
458
477
|
|
|
@@ -465,7 +484,7 @@ function Spinner({ className }) {
|
|
|
465
484
|
"aria-hidden": "true",
|
|
466
485
|
role: "status",
|
|
467
486
|
className: cn(
|
|
468
|
-
"absolute inset-0 mx-auto my-auto w-8 h-8
|
|
487
|
+
"absolute pointer-events-none inset-0 mx-auto my-auto w-8 h-8 animate-spin",
|
|
469
488
|
className
|
|
470
489
|
),
|
|
471
490
|
viewBox: "0 0 34 34",
|
|
@@ -496,14 +515,50 @@ function Spinner({ className }) {
|
|
|
496
515
|
}
|
|
497
516
|
|
|
498
517
|
// src/theme/default/components/form/button.tsx
|
|
499
|
-
import {
|
|
500
|
-
import {
|
|
518
|
+
import { useOryFlow as useOryFlow5 } from "@ory/elements-react";
|
|
519
|
+
import { cva } from "class-variance-authority";
|
|
501
520
|
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
521
|
+
var buttonStyles = cva(
|
|
522
|
+
[
|
|
523
|
+
"ring-1 relative overflow-hidden ring-inset rounded text-sm leading-none flex gap-3 justify-center",
|
|
524
|
+
"disabled:cursor-not-allowed loading:before:pointer-events-none loading:cursor-wait",
|
|
525
|
+
"transition-colors ease-linear duration-100"
|
|
526
|
+
],
|
|
527
|
+
{
|
|
528
|
+
variants: {
|
|
529
|
+
intent: {
|
|
530
|
+
primary: [
|
|
531
|
+
"bg-button-primary-bg-default text-button-primary-fg-default ring-button-primary-border-default",
|
|
532
|
+
"hover:bg-button-primary-bg-hover hover:text-button-primary-fg-hover hover:ring-button-primary-border-hover",
|
|
533
|
+
"disabled:bg-button-primary-bg-disabled disabled:text-button-primary-fg-disabled disabled:ring-button-primary-border-disabled",
|
|
534
|
+
"loading:bg-button-primary-bg-default loading:text-button-primary-fg-default loading:ring-button-primary-border-default",
|
|
535
|
+
"loading:before:absolute loading:before:content-[''] loading:before:inset-0 loading:before:bg-button-primary-bg-default loading:before:opacity-80"
|
|
536
|
+
],
|
|
537
|
+
secondary: [
|
|
538
|
+
"bg-button-secondary-bg-default text-button-secondary-fg-default ring-button-secondary-border-default",
|
|
539
|
+
"hover:bg-button-secondary-bg-hover hover:text-button-secondary-fg-hover hover:ring-button-secondary-border-hover",
|
|
540
|
+
"disabled:bg-button-secondary-bg-disabled disabled:text-button-secondary-fg-disabled disabled:ring-button-secondary-border-disabled",
|
|
541
|
+
"loading:bg-button-secondary-bg-default loading:text-button-secondary-fg-default loading:ring-button-secondary-border-default",
|
|
542
|
+
"loading:before:absolute loading:before:content-[''] loading:before:inset-0 loading:before:bg-button-secondary-bg-default loading:before:opacity-80"
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
size: {
|
|
546
|
+
default: ["px-4 py-3"],
|
|
547
|
+
large: ["px-4 py-4.5 max-md:py-3"]
|
|
548
|
+
},
|
|
549
|
+
defaultVariants: {
|
|
550
|
+
intent: "primary",
|
|
551
|
+
size: "default"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
);
|
|
502
556
|
var DefaultButton = ({
|
|
503
557
|
attributes,
|
|
504
558
|
node,
|
|
505
559
|
onClick
|
|
506
560
|
}) => {
|
|
561
|
+
var _a;
|
|
507
562
|
const {
|
|
508
563
|
type,
|
|
509
564
|
name,
|
|
@@ -517,11 +572,13 @@ var DefaultButton = ({
|
|
|
517
572
|
} = attributes;
|
|
518
573
|
const intl = useIntl5();
|
|
519
574
|
const label = getNodeLabel(node);
|
|
575
|
+
const { flowType } = useOryFlow5();
|
|
520
576
|
const {
|
|
521
577
|
formState: { isSubmitting },
|
|
522
578
|
setValue
|
|
523
579
|
} = useFormContext();
|
|
524
|
-
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn");
|
|
580
|
+
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
581
|
+
const isSmall = flowType === FlowType4.Settings && attributes.name !== "webauthn_register_trigger";
|
|
525
582
|
return /* @__PURE__ */ jsxs9(
|
|
526
583
|
"button",
|
|
527
584
|
{
|
|
@@ -533,38 +590,20 @@ var DefaultButton = ({
|
|
|
533
590
|
setValue(name, value);
|
|
534
591
|
},
|
|
535
592
|
onClick: (e) => {
|
|
536
|
-
|
|
537
|
-
onClick(e);
|
|
538
|
-
}
|
|
593
|
+
onClick == null ? void 0 : onClick(e);
|
|
539
594
|
if (type !== "button") {
|
|
540
595
|
setValue(name, value);
|
|
541
596
|
}
|
|
542
597
|
},
|
|
543
|
-
className:
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
"bg-button-secondary-bg-default hover:bg-button-secondary-bg-hover text-button-secondary-fg-default hover:text-button-secondary-fg-hover border-button-secondary-border-default": !isPrimary
|
|
550
|
-
},
|
|
551
|
-
{}
|
|
552
|
-
),
|
|
598
|
+
className: buttonStyles({
|
|
599
|
+
intent: isPrimary ? "primary" : "secondary",
|
|
600
|
+
size: isSmall ? "default" : "large"
|
|
601
|
+
}),
|
|
602
|
+
disabled: (_a = rest.disabled) != null ? _a : true,
|
|
603
|
+
"data-loading": isSubmitting,
|
|
553
604
|
children: [
|
|
554
605
|
isSubmitting ? /* @__PURE__ */ jsx15(Spinner, {}) : null,
|
|
555
|
-
|
|
556
|
-
"span",
|
|
557
|
-
{
|
|
558
|
-
className: cn(
|
|
559
|
-
"transition-colors ease-linear duration-100 leading-none text-button-primary-fg-default/20",
|
|
560
|
-
{
|
|
561
|
-
"text-button-primary-fg-default opacity-20 transition-opacity": isSubmitting && isPrimary,
|
|
562
|
-
"text-button-secondary-fg-default/20": isSubmitting && !isPrimary
|
|
563
|
-
}
|
|
564
|
-
),
|
|
565
|
-
children: formatMessage2(label, intl)
|
|
566
|
-
}
|
|
567
|
-
)
|
|
606
|
+
label ? uiTextToFormattedMessage2(label, intl) : ""
|
|
568
607
|
]
|
|
569
608
|
}
|
|
570
609
|
);
|
|
@@ -572,12 +611,113 @@ var DefaultButton = ({
|
|
|
572
611
|
DefaultButton.displayName = "DefaultButton";
|
|
573
612
|
|
|
574
613
|
// src/theme/default/components/form/checkbox.tsx
|
|
614
|
+
import { getNodeLabel as getNodeLabel2 } from "@ory/client-fetch";
|
|
615
|
+
import {
|
|
616
|
+
messageTestId,
|
|
617
|
+
uiTextToFormattedMessage as uiTextToFormattedMessage4
|
|
618
|
+
} from "@ory/elements-react";
|
|
575
619
|
import { useState } from "react";
|
|
576
620
|
import { useForm } from "react-hook-form";
|
|
621
|
+
import { useIntl as useIntl7 } from "react-intl";
|
|
622
|
+
|
|
623
|
+
// src/theme/default/components/ui/checkbox-label.tsx
|
|
577
624
|
import { useIntl as useIntl6 } from "react-intl";
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
625
|
+
|
|
626
|
+
// src/util/i18n/index.ts
|
|
627
|
+
var uiTextToFormattedMessage3 = ({ id, context = {}, text }, intl) => {
|
|
628
|
+
const contextInjectedMessage = Object.entries(context).reduce(
|
|
629
|
+
(accumulator, [key, value]) => {
|
|
630
|
+
if (Array.isArray(value)) {
|
|
631
|
+
return {
|
|
632
|
+
...accumulator,
|
|
633
|
+
[key]: value,
|
|
634
|
+
[key + "_list"]: intl.formatList(value)
|
|
635
|
+
};
|
|
636
|
+
} else if (key.endsWith("_unix")) {
|
|
637
|
+
if (typeof value === "number") {
|
|
638
|
+
return {
|
|
639
|
+
...accumulator,
|
|
640
|
+
[key]: intl.formatDate(new Date(value * 1e3)),
|
|
641
|
+
[key + "_since"]: intl.formatDateTimeRange(
|
|
642
|
+
new Date(value),
|
|
643
|
+
/* @__PURE__ */ new Date()
|
|
644
|
+
),
|
|
645
|
+
[key + "_since_minutes"]: Math.abs(
|
|
646
|
+
(value - (/* @__PURE__ */ new Date()).getTime() / 1e3) / 60
|
|
647
|
+
).toFixed(2),
|
|
648
|
+
[key + "_until"]: intl.formatDateTimeRange(
|
|
649
|
+
/* @__PURE__ */ new Date(),
|
|
650
|
+
new Date(value)
|
|
651
|
+
),
|
|
652
|
+
[key + "_until_minutes"]: Math.abs(
|
|
653
|
+
((/* @__PURE__ */ new Date()).getTime() / 1e3 - value) / 60
|
|
654
|
+
).toFixed(2)
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
return {
|
|
659
|
+
...accumulator,
|
|
660
|
+
[key]: value
|
|
661
|
+
};
|
|
662
|
+
},
|
|
663
|
+
{}
|
|
664
|
+
);
|
|
665
|
+
return intl.formatMessage(
|
|
666
|
+
{
|
|
667
|
+
id: `identities.messages.${id}`,
|
|
668
|
+
defaultMessage: text
|
|
669
|
+
},
|
|
670
|
+
contextInjectedMessage
|
|
671
|
+
);
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
// src/theme/default/components/ui/checkbox-label.tsx
|
|
675
|
+
import { Fragment, jsx as jsx16 } from "react/jsx-runtime";
|
|
676
|
+
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
677
|
+
function computeLabelElements(labelText) {
|
|
678
|
+
const elements = [];
|
|
679
|
+
let lastIndex = 0;
|
|
680
|
+
for (const match of labelText.matchAll(linkRegex)) {
|
|
681
|
+
const linkText = match[1];
|
|
682
|
+
const url = match[2];
|
|
683
|
+
const matchStart = match.index;
|
|
684
|
+
if (typeof matchStart === "undefined") {
|
|
685
|
+
continue;
|
|
686
|
+
}
|
|
687
|
+
if (matchStart > lastIndex) {
|
|
688
|
+
elements.push(labelText.slice(lastIndex, matchStart));
|
|
689
|
+
}
|
|
690
|
+
elements.push(
|
|
691
|
+
/* @__PURE__ */ jsx16(
|
|
692
|
+
"a",
|
|
693
|
+
{
|
|
694
|
+
href: url,
|
|
695
|
+
target: "_blank",
|
|
696
|
+
rel: "noopener noreferrer",
|
|
697
|
+
className: "text-links-link-default hover:text-links-link-hover hover:underline",
|
|
698
|
+
children: linkText
|
|
699
|
+
},
|
|
700
|
+
matchStart
|
|
701
|
+
)
|
|
702
|
+
);
|
|
703
|
+
lastIndex = matchStart + match[0].length;
|
|
704
|
+
}
|
|
705
|
+
if (lastIndex < labelText.length) {
|
|
706
|
+
elements.push(labelText.slice(lastIndex));
|
|
707
|
+
}
|
|
708
|
+
return elements;
|
|
709
|
+
}
|
|
710
|
+
function CheckboxLabel({ label }) {
|
|
711
|
+
const intl = useIntl6();
|
|
712
|
+
if (!label) {
|
|
713
|
+
return null;
|
|
714
|
+
}
|
|
715
|
+
const labelText = uiTextToFormattedMessage3(label, intl);
|
|
716
|
+
return /* @__PURE__ */ jsx16(Fragment, { children: computeLabelElements(labelText) });
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// src/theme/default/components/form/checkbox.tsx
|
|
720
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
581
721
|
function CheckboxSVG() {
|
|
582
722
|
return /* @__PURE__ */ jsxs10(
|
|
583
723
|
"svg",
|
|
@@ -589,14 +729,14 @@ function CheckboxSVG() {
|
|
|
589
729
|
viewBox: "0 0 16 16",
|
|
590
730
|
fill: "none",
|
|
591
731
|
children: [
|
|
592
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ jsx17(
|
|
593
733
|
"path",
|
|
594
734
|
{
|
|
595
735
|
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",
|
|
596
736
|
fill: "#0F172A"
|
|
597
737
|
}
|
|
598
738
|
),
|
|
599
|
-
/* @__PURE__ */
|
|
739
|
+
/* @__PURE__ */ jsx17(
|
|
600
740
|
"path",
|
|
601
741
|
{
|
|
602
742
|
fillRule: "evenodd",
|
|
@@ -619,10 +759,11 @@ var DefaultCheckbox = ({
|
|
|
619
759
|
// Button does not support these attributes, so we skip them
|
|
620
760
|
autocomplete: _autocomplete,
|
|
621
761
|
onclick: _onclick,
|
|
762
|
+
maxlength: _max,
|
|
622
763
|
// End of skipped attributes
|
|
623
764
|
...attributes
|
|
624
765
|
} = initialAttributes;
|
|
625
|
-
const intl =
|
|
766
|
+
const intl = useIntl7();
|
|
626
767
|
const label = getNodeLabel2(node);
|
|
627
768
|
const [checked, setChecked] = useState(Boolean(value));
|
|
628
769
|
const { register } = useForm();
|
|
@@ -635,7 +776,7 @@ var DefaultCheckbox = ({
|
|
|
635
776
|
},
|
|
636
777
|
children: [
|
|
637
778
|
/* @__PURE__ */ jsxs10("div", { className: "flex h-5 items-center", children: [
|
|
638
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ jsx17(
|
|
639
780
|
"input",
|
|
640
781
|
{
|
|
641
782
|
...attributes,
|
|
@@ -650,16 +791,16 @@ var DefaultCheckbox = ({
|
|
|
650
791
|
...register(name, { value })
|
|
651
792
|
}
|
|
652
793
|
),
|
|
653
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ jsx17(CheckboxSVG, {})
|
|
654
795
|
] }),
|
|
655
796
|
/* @__PURE__ */ jsxs10("div", { className: "text-sm items-center", children: [
|
|
656
|
-
/* @__PURE__ */
|
|
657
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ jsx17("label", { className: "text-sm font-normal leading-normal text-forms-fg-default", children: /* @__PURE__ */ jsx17(CheckboxLabel, { label }) }),
|
|
798
|
+
node.messages.map((message) => /* @__PURE__ */ jsx17(
|
|
658
799
|
"span",
|
|
659
800
|
{
|
|
660
801
|
className: "text-sm text-red-900 mt-1",
|
|
661
802
|
...messageTestId(message),
|
|
662
|
-
children:
|
|
803
|
+
children: uiTextToFormattedMessage4(message, intl)
|
|
663
804
|
},
|
|
664
805
|
message.id
|
|
665
806
|
))
|
|
@@ -670,31 +811,31 @@ var DefaultCheckbox = ({
|
|
|
670
811
|
};
|
|
671
812
|
|
|
672
813
|
// src/theme/default/components/form/group-container.tsx
|
|
673
|
-
import { jsx as
|
|
674
|
-
function DefaultGroupContainer({
|
|
675
|
-
children
|
|
676
|
-
}) {
|
|
677
|
-
return /* @__PURE__ */ jsx17("div", { className: "grid grid-cols-1 gap-6", children });
|
|
814
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
815
|
+
function DefaultGroupContainer({ children }) {
|
|
816
|
+
return /* @__PURE__ */ jsx18("div", { className: "grid grid-cols-1 gap-6", children });
|
|
678
817
|
}
|
|
679
818
|
|
|
680
819
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
681
|
-
import { jsx as
|
|
820
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
682
821
|
function DefaultHorizontalDivider() {
|
|
683
|
-
return /* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ jsx19("hr", { className: "border-dialog-border-default" });
|
|
684
823
|
}
|
|
685
824
|
|
|
686
825
|
// src/theme/default/components/form/image.tsx
|
|
687
|
-
import { jsx as
|
|
826
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
688
827
|
function DefaultImage({ attributes }) {
|
|
689
|
-
return /* @__PURE__ */
|
|
828
|
+
return /* @__PURE__ */ jsx20("figure", { children: /* @__PURE__ */ jsx20("img", { ...attributes }) });
|
|
690
829
|
}
|
|
691
830
|
|
|
692
831
|
// src/theme/default/components/form/input.tsx
|
|
693
832
|
import { getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
|
|
694
|
-
import {
|
|
833
|
+
import {
|
|
834
|
+
uiTextToFormattedMessage as uiTextToFormattedMessage5
|
|
835
|
+
} from "@ory/elements-react";
|
|
695
836
|
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
696
|
-
import { useIntl as
|
|
697
|
-
import { jsx as
|
|
837
|
+
import { useIntl as useIntl8 } from "react-intl";
|
|
838
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
698
839
|
var DefaultInput = ({
|
|
699
840
|
node,
|
|
700
841
|
attributes,
|
|
@@ -703,17 +844,17 @@ var DefaultInput = ({
|
|
|
703
844
|
const label = getNodeLabel3(node);
|
|
704
845
|
const { register } = useFormContext2();
|
|
705
846
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
706
|
-
const intl =
|
|
847
|
+
const intl = useIntl8();
|
|
707
848
|
const formattedLabel = label ? intl.formatMessage(
|
|
708
849
|
{
|
|
709
850
|
id: "input.placeholder",
|
|
710
851
|
defaultMessage: "Enter your {placeholder}"
|
|
711
852
|
},
|
|
712
853
|
{
|
|
713
|
-
placeholder:
|
|
854
|
+
placeholder: uiTextToFormattedMessage5(label, intl)
|
|
714
855
|
}
|
|
715
856
|
) : "";
|
|
716
|
-
return /* @__PURE__ */
|
|
857
|
+
return /* @__PURE__ */ jsx21(
|
|
717
858
|
"input",
|
|
718
859
|
{
|
|
719
860
|
...rest,
|
|
@@ -721,43 +862,46 @@ var DefaultInput = ({
|
|
|
721
862
|
maxLength: maxlength,
|
|
722
863
|
autoComplete: autocomplete,
|
|
723
864
|
placeholder: formattedLabel,
|
|
724
|
-
className: "antialiased bg-forms-bg-default rounded-border-radius-forms border px-3 py-2.5 md:px-4 md:py-4 border-forms-border-default leading-tight hover:border-forms-border-hover transition-colors text-sm",
|
|
865
|
+
className: "antialiased disabled:text-forms-fg-disabled disabled:bg-forms-bg-disabled bg-forms-bg-default rounded-border-radius-forms border px-3 py-2.5 md:px-4 md:py-4 border-forms-border-default leading-tight hover:border-forms-border-hover transition-colors text-sm",
|
|
725
866
|
...register(name, { value })
|
|
726
867
|
}
|
|
727
868
|
);
|
|
728
869
|
};
|
|
729
870
|
|
|
730
871
|
// src/theme/default/components/form/label.tsx
|
|
731
|
-
import { FlowType as
|
|
732
|
-
import {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
872
|
+
import { FlowType as FlowType5, getNodeLabel as getNodeLabel4 } from "@ory/client-fetch";
|
|
873
|
+
import {
|
|
874
|
+
messageTestId as messageTestId2,
|
|
875
|
+
uiTextToFormattedMessage as uiTextToFormattedMessage6,
|
|
876
|
+
useOryFlow as useOryFlow6
|
|
877
|
+
} from "@ory/elements-react";
|
|
878
|
+
import { useIntl as useIntl9 } from "react-intl";
|
|
879
|
+
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
736
880
|
function DefaultLabel({
|
|
737
881
|
node,
|
|
738
882
|
children,
|
|
739
883
|
attributes,
|
|
740
884
|
...rest
|
|
741
885
|
}) {
|
|
742
|
-
const intl =
|
|
886
|
+
const intl = useIntl9();
|
|
743
887
|
const label = getNodeLabel4(node);
|
|
744
|
-
const { config, flowType } =
|
|
888
|
+
const { config, flowType } = useOryFlow6();
|
|
745
889
|
const isPassword = attributes.type === "password";
|
|
746
890
|
const isCode = attributes.name === "code";
|
|
747
891
|
return /* @__PURE__ */ jsxs11("span", { className: "flex flex-col antialiased gap-1", children: [
|
|
748
892
|
label && /* @__PURE__ */ jsxs11("span", { className: "inline-flex justify-between", children: [
|
|
749
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ jsx22(
|
|
750
894
|
"label",
|
|
751
895
|
{
|
|
752
896
|
...messageTestId2(label),
|
|
753
897
|
className: "text-sm font-medium leading-normal",
|
|
754
898
|
htmlFor: attributes.name,
|
|
755
899
|
...rest,
|
|
756
|
-
children:
|
|
900
|
+
children: uiTextToFormattedMessage6(label, intl)
|
|
757
901
|
}
|
|
758
902
|
),
|
|
759
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
760
|
-
/* @__PURE__ */
|
|
903
|
+
isPassword && config.project.recovery_enabled && flowType === FlowType5.Login && // TODO: make it possible to override with a custom component
|
|
904
|
+
/* @__PURE__ */ jsx22(
|
|
761
905
|
"a",
|
|
762
906
|
{
|
|
763
907
|
href: config.project.recovery_ui_url,
|
|
@@ -768,17 +912,19 @@ function DefaultLabel({
|
|
|
768
912
|
})
|
|
769
913
|
}
|
|
770
914
|
),
|
|
771
|
-
isCode && /* @__PURE__ */
|
|
772
|
-
"
|
|
915
|
+
isCode && /* @__PURE__ */ jsx22(
|
|
916
|
+
"button",
|
|
773
917
|
{
|
|
774
918
|
type: "submit",
|
|
775
|
-
|
|
776
|
-
|
|
919
|
+
name: "method",
|
|
920
|
+
value: "code",
|
|
921
|
+
className: "text-links-link-default hover:underline hover:text-link-hover transition-colors text-sm font-medium cursor-pointer",
|
|
922
|
+
children: intl.formatMessage({ id: "identities.messages.1070008" })
|
|
777
923
|
}
|
|
778
924
|
)
|
|
779
925
|
] }),
|
|
780
926
|
children,
|
|
781
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
927
|
+
node.messages.map((message) => /* @__PURE__ */ jsx22(
|
|
782
928
|
"span",
|
|
783
929
|
{
|
|
784
930
|
className: cn("text-sm leading-normal", {
|
|
@@ -787,7 +933,7 @@ function DefaultLabel({
|
|
|
787
933
|
"text-forms-fg-success": message.type === "success"
|
|
788
934
|
}),
|
|
789
935
|
...messageTestId2(message),
|
|
790
|
-
children:
|
|
936
|
+
children: uiTextToFormattedMessage6(message, intl)
|
|
791
937
|
},
|
|
792
938
|
message.id
|
|
793
939
|
))
|
|
@@ -795,24 +941,26 @@ function DefaultLabel({
|
|
|
795
941
|
}
|
|
796
942
|
|
|
797
943
|
// src/theme/default/components/form/link-button.tsx
|
|
798
|
-
import { forwardRef } from "react";
|
|
799
|
-
import { useIntl as useIntl9 } from "react-intl";
|
|
800
|
-
import { formatMessage as formatMessage6 } from "@ory/elements-react";
|
|
801
944
|
import { getNodeLabel as getNodeLabel5 } from "@ory/client-fetch";
|
|
802
|
-
import {
|
|
945
|
+
import {
|
|
946
|
+
uiTextToFormattedMessage as uiTextToFormattedMessage7
|
|
947
|
+
} from "@ory/elements-react";
|
|
948
|
+
import { forwardRef } from "react";
|
|
949
|
+
import { useIntl as useIntl10 } from "react-intl";
|
|
950
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
803
951
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
804
|
-
const intl =
|
|
952
|
+
const intl = useIntl10();
|
|
805
953
|
const label = getNodeLabel5(node);
|
|
806
|
-
return /* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ jsx23(
|
|
807
955
|
"a",
|
|
808
956
|
{
|
|
809
957
|
...attributes,
|
|
810
958
|
ref,
|
|
811
|
-
title:
|
|
959
|
+
title: label ? uiTextToFormattedMessage7(label, intl) : "",
|
|
812
960
|
className: cn(
|
|
813
961
|
"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"
|
|
814
962
|
),
|
|
815
|
-
children:
|
|
963
|
+
children: label ? uiTextToFormattedMessage7(label, intl) : ""
|
|
816
964
|
}
|
|
817
965
|
);
|
|
818
966
|
});
|
|
@@ -824,8 +972,8 @@ import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
|
824
972
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
825
973
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
826
974
|
import * as React7 from "react";
|
|
827
|
-
import { jsx as
|
|
828
|
-
var InputOTP = React7.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
975
|
+
import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
976
|
+
var InputOTP = React7.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
829
977
|
OTPInput,
|
|
830
978
|
{
|
|
831
979
|
ref,
|
|
@@ -838,7 +986,7 @@ var InputOTP = React7.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
838
986
|
}
|
|
839
987
|
));
|
|
840
988
|
InputOTP.displayName = "InputOTP";
|
|
841
|
-
var InputOTPGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
989
|
+
var InputOTPGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
842
990
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
843
991
|
var InputOTPSlot = React7.forwardRef(({ index, className, ...props }, ref) => {
|
|
844
992
|
const inputOTPContext = React7.useContext(OTPInputContext);
|
|
@@ -855,7 +1003,7 @@ var InputOTPSlot = React7.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
855
1003
|
...props,
|
|
856
1004
|
children: [
|
|
857
1005
|
char,
|
|
858
|
-
hasFakeCaret && /* @__PURE__ */
|
|
1006
|
+
hasFakeCaret && /* @__PURE__ */ jsx24("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx24("div", { className: "h-4 w-px animate-caret-blink bg-branding-bg-default duration-750" }) })
|
|
859
1007
|
]
|
|
860
1008
|
}
|
|
861
1009
|
);
|
|
@@ -863,7 +1011,7 @@ var InputOTPSlot = React7.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
863
1011
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
864
1012
|
|
|
865
1013
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
866
|
-
import { jsx as
|
|
1014
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
867
1015
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
868
1016
|
const { setValue, watch } = useFormContext3();
|
|
869
1017
|
const { maxlength, name } = attributes;
|
|
@@ -872,195 +1020,189 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
872
1020
|
setValue(name, v);
|
|
873
1021
|
};
|
|
874
1022
|
const value = watch(name);
|
|
875
|
-
return /* @__PURE__ */
|
|
876
|
-
|
|
1023
|
+
return /* @__PURE__ */ jsx25(
|
|
1024
|
+
InputOTP,
|
|
877
1025
|
{
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
1026
|
+
maxLength: maxlength != null ? maxlength : 6,
|
|
1027
|
+
onChange: handleInputChange,
|
|
1028
|
+
name,
|
|
1029
|
+
value,
|
|
1030
|
+
children: /* @__PURE__ */ jsx25(InputOTPGroup, { className: "w-full space-x-2 justify-between", children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx25(
|
|
1031
|
+
InputOTPSlot,
|
|
881
1032
|
{
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
InputOTPSlot,
|
|
888
|
-
{
|
|
889
|
-
index,
|
|
890
|
-
className: "text-center px-1.5 py-2.5 h-10 w-11 md:w-14 md:h-12 border border-radius border-solid rounded-border-radius-forms border-forms-border-default bg-forms-bg-default"
|
|
891
|
-
},
|
|
892
|
-
index
|
|
893
|
-
)) })
|
|
894
|
-
}
|
|
895
|
-
)
|
|
1033
|
+
index,
|
|
1034
|
+
className: "text-center px-1.5 py-2.5 h-10 w-11 md:w-14 md:h-12 border border-radius border-solid rounded-border-radius-forms border-forms-border-default bg-forms-bg-default"
|
|
1035
|
+
},
|
|
1036
|
+
index
|
|
1037
|
+
)) })
|
|
896
1038
|
}
|
|
897
1039
|
);
|
|
898
1040
|
};
|
|
899
1041
|
|
|
900
1042
|
// src/theme/default/components/form/social.tsx
|
|
901
1043
|
import {
|
|
902
|
-
|
|
903
|
-
useOryFlow as
|
|
1044
|
+
uiTextToFormattedMessage as uiTextToFormattedMessage8,
|
|
1045
|
+
useOryFlow as useOryFlow7
|
|
904
1046
|
} from "@ory/elements-react";
|
|
905
1047
|
|
|
906
1048
|
// src/theme/default/provider-logos/apple.svg
|
|
907
1049
|
import * as React8 from "react";
|
|
908
|
-
import { jsx as
|
|
1050
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
909
1051
|
var SvgApple = (props) => {
|
|
910
1052
|
var _a, _b;
|
|
911
1053
|
return /* @__PURE__ */ jsxs13("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ jsx26("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" }),
|
|
1055
|
+
/* @__PURE__ */ jsx26("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" })
|
|
914
1056
|
] });
|
|
915
1057
|
};
|
|
916
1058
|
var apple_default = SvgApple;
|
|
917
1059
|
|
|
918
1060
|
// src/theme/default/provider-logos/auth0.svg
|
|
919
1061
|
import * as React9 from "react";
|
|
920
|
-
import { jsx as
|
|
1062
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
921
1063
|
var SvgAuth0 = (props) => {
|
|
922
1064
|
var _a, _b;
|
|
923
|
-
return /* @__PURE__ */
|
|
1065
|
+
return /* @__PURE__ */ jsx27("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__ */ jsx27("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" }) });
|
|
924
1066
|
};
|
|
925
1067
|
var auth0_default = SvgAuth0;
|
|
926
1068
|
|
|
927
1069
|
// src/theme/default/provider-logos/discord.svg
|
|
928
1070
|
import * as React10 from "react";
|
|
929
|
-
import { jsx as
|
|
1071
|
+
import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
930
1072
|
var SvgDiscord = (props) => {
|
|
931
1073
|
var _a, _b;
|
|
932
1074
|
return /* @__PURE__ */ jsxs14("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: [
|
|
933
|
-
/* @__PURE__ */
|
|
934
|
-
/* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ jsx28("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" }),
|
|
1076
|
+
/* @__PURE__ */ jsx28("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" })
|
|
935
1077
|
] });
|
|
936
1078
|
};
|
|
937
1079
|
var discord_default = SvgDiscord;
|
|
938
1080
|
|
|
939
1081
|
// src/theme/default/provider-logos/facebook.svg
|
|
940
1082
|
import * as React11 from "react";
|
|
941
|
-
import { jsx as
|
|
1083
|
+
import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
942
1084
|
var SvgFacebook = (props) => {
|
|
943
1085
|
var _a, _b;
|
|
944
1086
|
return /* @__PURE__ */ jsxs15("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: [
|
|
945
1087
|
/* @__PURE__ */ jsxs15("g", { clipPath: "url(#facebook_svg__a)", children: [
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
1088
|
+
/* @__PURE__ */ jsx29("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" }),
|
|
1089
|
+
/* @__PURE__ */ jsx29("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" })
|
|
948
1090
|
] }),
|
|
949
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ jsx29("defs", { children: /* @__PURE__ */ jsx29("clipPath", { id: "facebook_svg__a", children: /* @__PURE__ */ jsx29("rect", { fill: "#fff" }) }) })
|
|
950
1092
|
] });
|
|
951
1093
|
};
|
|
952
1094
|
var facebook_default = SvgFacebook;
|
|
953
1095
|
|
|
954
1096
|
// src/theme/default/provider-logos/generic.svg
|
|
955
1097
|
import * as React12 from "react";
|
|
956
|
-
import { jsx as
|
|
1098
|
+
import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
957
1099
|
var SvgGeneric = (props) => {
|
|
958
1100
|
var _a, _b;
|
|
959
1101
|
return /* @__PURE__ */ jsxs16("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: [
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
/* @__PURE__ */
|
|
962
|
-
/* @__PURE__ */
|
|
1102
|
+
/* @__PURE__ */ jsx30("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
1103
|
+
/* @__PURE__ */ jsx30("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
1104
|
+
/* @__PURE__ */ jsx30("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" })
|
|
963
1105
|
] });
|
|
964
1106
|
};
|
|
965
1107
|
var generic_default = SvgGeneric;
|
|
966
1108
|
|
|
967
1109
|
// src/theme/default/provider-logos/github.svg
|
|
968
1110
|
import * as React13 from "react";
|
|
969
|
-
import { jsx as
|
|
1111
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
970
1112
|
var SvgGithub = (props) => {
|
|
971
1113
|
var _a, _b;
|
|
972
|
-
return /* @__PURE__ */
|
|
1114
|
+
return /* @__PURE__ */ jsx31("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__ */ jsx31("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" }) });
|
|
973
1115
|
};
|
|
974
1116
|
var github_default = SvgGithub;
|
|
975
1117
|
|
|
976
1118
|
// src/theme/default/provider-logos/gitlab.svg
|
|
977
1119
|
import * as React14 from "react";
|
|
978
|
-
import { jsx as
|
|
1120
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
979
1121
|
var SvgGitlab = (props) => {
|
|
980
1122
|
var _a, _b;
|
|
981
1123
|
return /* @__PURE__ */ jsxs17("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: [
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
984
|
-
/* @__PURE__ */
|
|
985
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ jsx32("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" }),
|
|
1125
|
+
/* @__PURE__ */ jsx32("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" }),
|
|
1126
|
+
/* @__PURE__ */ jsx32("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" }),
|
|
1127
|
+
/* @__PURE__ */ jsx32("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" })
|
|
986
1128
|
] });
|
|
987
1129
|
};
|
|
988
1130
|
var gitlab_default = SvgGitlab;
|
|
989
1131
|
|
|
990
1132
|
// src/theme/default/provider-logos/google.svg
|
|
991
1133
|
import * as React15 from "react";
|
|
992
|
-
import { jsx as
|
|
1134
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
993
1135
|
var SvgGoogle = (props) => {
|
|
994
1136
|
var _a, _b;
|
|
995
1137
|
return /* @__PURE__ */ jsxs18("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: [
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */
|
|
998
|
-
/* @__PURE__ */
|
|
999
|
-
/* @__PURE__ */
|
|
1138
|
+
/* @__PURE__ */ jsx33("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" }),
|
|
1139
|
+
/* @__PURE__ */ jsx33("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" }),
|
|
1140
|
+
/* @__PURE__ */ jsx33("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" }),
|
|
1141
|
+
/* @__PURE__ */ jsx33("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" })
|
|
1000
1142
|
] });
|
|
1001
1143
|
};
|
|
1002
1144
|
var google_default = SvgGoogle;
|
|
1003
1145
|
|
|
1004
1146
|
// src/theme/default/provider-logos/linkedin.svg
|
|
1005
1147
|
import * as React16 from "react";
|
|
1006
|
-
import { jsx as
|
|
1148
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1007
1149
|
var SvgLinkedin = (props) => {
|
|
1008
1150
|
var _a, _b;
|
|
1009
1151
|
return /* @__PURE__ */ jsxs19("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: [
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ jsx34("rect", { x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
1153
|
+
/* @__PURE__ */ jsx34("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" })
|
|
1012
1154
|
] });
|
|
1013
1155
|
};
|
|
1014
1156
|
var linkedin_default = SvgLinkedin;
|
|
1015
1157
|
|
|
1016
1158
|
// src/theme/default/provider-logos/microsoft.svg
|
|
1017
1159
|
import * as React17 from "react";
|
|
1018
|
-
import { jsx as
|
|
1160
|
+
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1019
1161
|
var SvgMicrosoft = (props) => {
|
|
1020
1162
|
var _a, _b;
|
|
1021
1163
|
return /* @__PURE__ */ jsxs20("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: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ jsx35("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
1165
|
+
/* @__PURE__ */ jsx35("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
1166
|
+
/* @__PURE__ */ jsx35("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
1167
|
+
/* @__PURE__ */ jsx35("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
1026
1168
|
] });
|
|
1027
1169
|
};
|
|
1028
1170
|
var microsoft_default = SvgMicrosoft;
|
|
1029
1171
|
|
|
1030
1172
|
// src/theme/default/provider-logos/slack.svg
|
|
1031
1173
|
import * as React18 from "react";
|
|
1032
|
-
import { jsx as
|
|
1174
|
+
import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1033
1175
|
var SvgSlack = (props) => {
|
|
1034
1176
|
var _a, _b;
|
|
1035
1177
|
return /* @__PURE__ */ jsxs21("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: [
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ jsx36("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" }),
|
|
1179
|
+
/* @__PURE__ */ jsx36("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" }),
|
|
1180
|
+
/* @__PURE__ */ jsx36("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" }),
|
|
1181
|
+
/* @__PURE__ */ jsx36("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" })
|
|
1040
1182
|
] });
|
|
1041
1183
|
};
|
|
1042
1184
|
var slack_default = SvgSlack;
|
|
1043
1185
|
|
|
1044
1186
|
// src/theme/default/provider-logos/spotify.svg
|
|
1045
1187
|
import * as React19 from "react";
|
|
1046
|
-
import { jsx as
|
|
1188
|
+
import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1047
1189
|
var SvgSpotify = (props) => {
|
|
1048
1190
|
var _a, _b;
|
|
1049
1191
|
return /* @__PURE__ */ jsxs22("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: [
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ jsx37("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
1193
|
+
/* @__PURE__ */ jsx37("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" })
|
|
1052
1194
|
] });
|
|
1053
1195
|
};
|
|
1054
1196
|
var spotify_default = SvgSpotify;
|
|
1055
1197
|
|
|
1056
1198
|
// src/theme/default/provider-logos/yandex.svg
|
|
1057
1199
|
import * as React20 from "react";
|
|
1058
|
-
import { jsx as
|
|
1200
|
+
import { jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1059
1201
|
var SvgYandex = (props) => {
|
|
1060
1202
|
var _a, _b;
|
|
1061
1203
|
return /* @__PURE__ */ jsxs23("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: [
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ jsx38("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
1205
|
+
/* @__PURE__ */ jsx38("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" })
|
|
1064
1206
|
] });
|
|
1065
1207
|
};
|
|
1066
1208
|
var yandex_default = SvgYandex;
|
|
@@ -1084,8 +1226,8 @@ var logos = {
|
|
|
1084
1226
|
var provider_logos_default = logos;
|
|
1085
1227
|
|
|
1086
1228
|
// src/theme/default/components/form/social.tsx
|
|
1087
|
-
import { useIntl as
|
|
1088
|
-
import { jsx as
|
|
1229
|
+
import { useIntl as useIntl11 } from "react-intl";
|
|
1230
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1089
1231
|
function extractProvider(context) {
|
|
1090
1232
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
1091
1233
|
return context.provider;
|
|
@@ -1095,7 +1237,8 @@ function extractProvider(context) {
|
|
|
1095
1237
|
function DefaultButtonSocial({
|
|
1096
1238
|
attributes,
|
|
1097
1239
|
node,
|
|
1098
|
-
onClick
|
|
1240
|
+
onClick,
|
|
1241
|
+
showLabel: _showLabel
|
|
1099
1242
|
}) {
|
|
1100
1243
|
var _a, _b, _c;
|
|
1101
1244
|
const {
|
|
@@ -1106,11 +1249,11 @@ function DefaultButtonSocial({
|
|
|
1106
1249
|
} = attributes;
|
|
1107
1250
|
const {
|
|
1108
1251
|
flow: { ui }
|
|
1109
|
-
} =
|
|
1110
|
-
const intl =
|
|
1252
|
+
} = useOryFlow7();
|
|
1253
|
+
const intl = useIntl11();
|
|
1111
1254
|
const oidcNodeCount = (_a = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a : 0;
|
|
1112
1255
|
const Logo = provider_logos_default[attributes.value];
|
|
1113
|
-
const showLabel = oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
1256
|
+
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
1114
1257
|
const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
|
|
1115
1258
|
return /* @__PURE__ */ jsxs24(
|
|
1116
1259
|
"button",
|
|
@@ -1125,14 +1268,14 @@ function DefaultButtonSocial({
|
|
|
1125
1268
|
...props,
|
|
1126
1269
|
onClick,
|
|
1127
1270
|
children: [
|
|
1128
|
-
/* @__PURE__ */
|
|
1271
|
+
/* @__PURE__ */ jsx39("span", { className: "w-5 h-5", children: Logo ? /* @__PURE__ */ jsx39(
|
|
1129
1272
|
Logo,
|
|
1130
1273
|
{
|
|
1131
1274
|
size: 20,
|
|
1132
1275
|
className: "object-fill w-full h-full"
|
|
1133
1276
|
}
|
|
1134
|
-
) : /* @__PURE__ */
|
|
1135
|
-
showLabel ? /* @__PURE__ */
|
|
1277
|
+
) : /* @__PURE__ */ jsx39("span", { className: "rounded-full aspect-square border flex items-center justify-center text-xs", children: provider.slice(0, 2) }) }),
|
|
1278
|
+
showLabel && node.meta.label ? /* @__PURE__ */ jsx39("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: uiTextToFormattedMessage8(node.meta.label, intl) }) : null
|
|
1136
1279
|
]
|
|
1137
1280
|
}
|
|
1138
1281
|
);
|
|
@@ -1141,7 +1284,7 @@ function DefaultSocialButtonContainer({
|
|
|
1141
1284
|
children,
|
|
1142
1285
|
nodes
|
|
1143
1286
|
}) {
|
|
1144
|
-
return /* @__PURE__ */
|
|
1287
|
+
return /* @__PURE__ */ jsx39(
|
|
1145
1288
|
"div",
|
|
1146
1289
|
{
|
|
1147
1290
|
className: cn("grid gap-3", {
|
|
@@ -1156,29 +1299,29 @@ function DefaultSocialButtonContainer({
|
|
|
1156
1299
|
}
|
|
1157
1300
|
|
|
1158
1301
|
// src/theme/default/components/form/text.tsx
|
|
1159
|
-
import {
|
|
1160
|
-
import {
|
|
1161
|
-
import { Fragment, jsx as
|
|
1302
|
+
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
1303
|
+
import { useIntl as useIntl12 } from "react-intl";
|
|
1304
|
+
import { Fragment as Fragment2, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1162
1305
|
function DefaultText({ node, attributes }) {
|
|
1163
1306
|
var _a;
|
|
1164
|
-
const intl =
|
|
1165
|
-
return /* @__PURE__ */ jsxs25(
|
|
1166
|
-
/* @__PURE__ */
|
|
1167
|
-
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */
|
|
1307
|
+
const intl = useIntl12();
|
|
1308
|
+
return /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
1309
|
+
/* @__PURE__ */ jsx40("p", { "data-testid": `node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
1310
|
+
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ jsx40("pre", { "data-testid": `node/text/lookup_secret_codes/text`, children: /* @__PURE__ */ jsx40("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" }) }, index))
|
|
1168
1311
|
] });
|
|
1169
1312
|
}
|
|
1170
1313
|
|
|
1171
1314
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
1172
1315
|
import * as React21 from "react";
|
|
1173
|
-
import { jsx as
|
|
1316
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1174
1317
|
var SvgArrowLeft = (props) => {
|
|
1175
1318
|
var _a, _b;
|
|
1176
|
-
return /* @__PURE__ */
|
|
1319
|
+
return /* @__PURE__ */ jsx41("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__ */ jsx41("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
1177
1320
|
};
|
|
1178
1321
|
var arrow_left_default = SvgArrowLeft;
|
|
1179
1322
|
|
|
1180
1323
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
1181
|
-
import { jsx as
|
|
1324
|
+
import { jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1182
1325
|
function DefaultCurrentIdentifierButton({
|
|
1183
1326
|
attributes,
|
|
1184
1327
|
onClick,
|
|
@@ -1186,7 +1329,7 @@ function DefaultCurrentIdentifierButton({
|
|
|
1186
1329
|
href
|
|
1187
1330
|
}) {
|
|
1188
1331
|
const Element = onClick ? "button" : "a";
|
|
1189
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsxs26(
|
|
1190
1333
|
Element,
|
|
1191
1334
|
{
|
|
1192
1335
|
className: "cursor-pointer py-1.5 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",
|
|
@@ -1195,191 +1338,810 @@ function DefaultCurrentIdentifierButton({
|
|
|
1195
1338
|
href,
|
|
1196
1339
|
type,
|
|
1197
1340
|
children: [
|
|
1198
|
-
/* @__PURE__ */
|
|
1199
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ jsx42(arrow_left_default, { size: 16, className: "text-button-identifier-fg-subtle" }),
|
|
1342
|
+
/* @__PURE__ */ jsx42("span", { className: "text-sm font-medium leading-none text-button-identifier-fg-default", children: attributes.value })
|
|
1200
1343
|
]
|
|
1201
1344
|
}
|
|
1202
1345
|
) });
|
|
1203
1346
|
}
|
|
1204
1347
|
|
|
1348
|
+
// src/theme/default/components/form/section.tsx
|
|
1349
|
+
import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1350
|
+
var DefaultFormSection = ({ children }) => {
|
|
1351
|
+
return /* @__PURE__ */ jsx43("div", { className: "flex flex-col w-80 md:w-[712px] lg:w-[802px] xl:w-[896px]", children });
|
|
1352
|
+
};
|
|
1353
|
+
var DefaultFormSectionContent = ({
|
|
1354
|
+
title,
|
|
1355
|
+
description,
|
|
1356
|
+
children
|
|
1357
|
+
}) => {
|
|
1358
|
+
return /* @__PURE__ */ jsxs27("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: [
|
|
1359
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
|
|
1360
|
+
/* @__PURE__ */ jsx43("h3", { className: "font-medium text-dialog-fg-default", children: title }),
|
|
1361
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-dialog-fg-subtle", children: description })
|
|
1362
|
+
] }),
|
|
1363
|
+
children
|
|
1364
|
+
] });
|
|
1365
|
+
};
|
|
1366
|
+
var DefaultFormSectionFooter = ({ children }) => {
|
|
1367
|
+
return /* @__PURE__ */ jsx43("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 });
|
|
1368
|
+
};
|
|
1369
|
+
|
|
1370
|
+
// src/theme/default/assets/icons/download.svg
|
|
1371
|
+
import * as React22 from "react";
|
|
1372
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
1373
|
+
var SvgDownload = (props) => {
|
|
1374
|
+
var _a, _b;
|
|
1375
|
+
return /* @__PURE__ */ jsx44("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__ */ jsx44("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" }) });
|
|
1376
|
+
};
|
|
1377
|
+
var download_default = SvgDownload;
|
|
1378
|
+
|
|
1379
|
+
// src/theme/default/assets/icons/eye.svg
|
|
1380
|
+
import * as React23 from "react";
|
|
1381
|
+
import { jsx as jsx45, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1382
|
+
var SvgEye = (props) => {
|
|
1383
|
+
var _a, _b;
|
|
1384
|
+
return /* @__PURE__ */ jsx45("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__ */ jsxs28("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1385
|
+
/* @__PURE__ */ jsx45("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1386
|
+
/* @__PURE__ */ jsx45("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1387
|
+
] }) });
|
|
1388
|
+
};
|
|
1389
|
+
var eye_default = SvgEye;
|
|
1390
|
+
|
|
1391
|
+
// src/theme/default/assets/icons/refresh.svg
|
|
1392
|
+
import * as React24 from "react";
|
|
1393
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1394
|
+
var SvgRefresh = (props) => {
|
|
1395
|
+
var _a, _b;
|
|
1396
|
+
return /* @__PURE__ */ jsx46("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__ */ jsx46("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" }) });
|
|
1397
|
+
};
|
|
1398
|
+
var refresh_default = SvgRefresh;
|
|
1399
|
+
|
|
1400
|
+
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
1401
|
+
import { jsx as jsx47, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1402
|
+
function DefaultSettingsRecoveryCodes({
|
|
1403
|
+
codes,
|
|
1404
|
+
regnerateButton,
|
|
1405
|
+
revealButton
|
|
1406
|
+
}) {
|
|
1407
|
+
const onDownload = () => {
|
|
1408
|
+
const element = document.createElement("a");
|
|
1409
|
+
const file = new Blob([codes.join("\n")], {
|
|
1410
|
+
type: "text/plain"
|
|
1411
|
+
});
|
|
1412
|
+
element.href = URL.createObjectURL(file);
|
|
1413
|
+
element.download = "recovery-codes.txt";
|
|
1414
|
+
document.body.appendChild(element);
|
|
1415
|
+
element.click();
|
|
1416
|
+
};
|
|
1417
|
+
const hasCodes = codes.length >= 1;
|
|
1418
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-8", children: [
|
|
1419
|
+
/* @__PURE__ */ jsx47(DefaultHorizontalDivider, {}),
|
|
1420
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex justify-end gap-4", children: [
|
|
1421
|
+
regnerateButton && /* @__PURE__ */ jsx47(
|
|
1422
|
+
"button",
|
|
1423
|
+
{
|
|
1424
|
+
...regnerateButton.attributes,
|
|
1425
|
+
type: "submit",
|
|
1426
|
+
children: /* @__PURE__ */ jsx47(
|
|
1427
|
+
refresh_default,
|
|
1428
|
+
{
|
|
1429
|
+
size: 24,
|
|
1430
|
+
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover"
|
|
1431
|
+
}
|
|
1432
|
+
)
|
|
1433
|
+
}
|
|
1434
|
+
),
|
|
1435
|
+
revealButton && /* @__PURE__ */ jsx47(
|
|
1436
|
+
"button",
|
|
1437
|
+
{
|
|
1438
|
+
...revealButton.attributes,
|
|
1439
|
+
type: "submit",
|
|
1440
|
+
children: /* @__PURE__ */ jsx47(
|
|
1441
|
+
eye_default,
|
|
1442
|
+
{
|
|
1443
|
+
size: 24,
|
|
1444
|
+
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover"
|
|
1445
|
+
}
|
|
1446
|
+
)
|
|
1447
|
+
}
|
|
1448
|
+
),
|
|
1449
|
+
hasCodes ? /* @__PURE__ */ jsx47(
|
|
1450
|
+
download_default,
|
|
1451
|
+
{
|
|
1452
|
+
size: 24,
|
|
1453
|
+
onClick: onDownload,
|
|
1454
|
+
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover"
|
|
1455
|
+
}
|
|
1456
|
+
) : null
|
|
1457
|
+
] }),
|
|
1458
|
+
hasCodes ? /* @__PURE__ */ jsx47("div", { className: "rounded-border-radius-cards bg-bg-default ring-1 ring-dialog-border-default p-6", children: /* @__PURE__ */ jsx47("div", { className: "grid grid-cols-6 gap-4 flex-wrap text-dialog-fg-default text-sm", children: codes.map((code) => /* @__PURE__ */ jsx47("p", { children: code }, code)) }) }) : null
|
|
1459
|
+
] });
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
// src/theme/default/assets/icons/qrcode.svg
|
|
1463
|
+
import * as React25 from "react";
|
|
1464
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1465
|
+
var SvgQrcode = (props) => {
|
|
1466
|
+
var _a, _b;
|
|
1467
|
+
return /* @__PURE__ */ jsx48("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__ */ jsx48("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" }) });
|
|
1468
|
+
};
|
|
1469
|
+
var qrcode_default = SvgQrcode;
|
|
1470
|
+
|
|
1471
|
+
// src/theme/default/assets/icons/trash.svg
|
|
1472
|
+
import * as React26 from "react";
|
|
1473
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1474
|
+
var SvgTrash = (props) => {
|
|
1475
|
+
var _a, _b;
|
|
1476
|
+
return /* @__PURE__ */ jsx49("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__ */ jsx49("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" }) });
|
|
1477
|
+
};
|
|
1478
|
+
var trash_default = SvgTrash;
|
|
1479
|
+
|
|
1480
|
+
// src/theme/default/components/settings/settings-top.tsx
|
|
1481
|
+
import { jsx as jsx50, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1482
|
+
function DefaultSettingsTotp(props) {
|
|
1483
|
+
var _a;
|
|
1484
|
+
if ("totpUnlink" in props && props.totpUnlink) {
|
|
1485
|
+
const {
|
|
1486
|
+
type,
|
|
1487
|
+
autocomplete: _ignoredAutocomplete,
|
|
1488
|
+
label: _ignoredLabel,
|
|
1489
|
+
node_type: _ignoredNodeType,
|
|
1490
|
+
...buttonAttrs
|
|
1491
|
+
} = (_a = props.totpUnlink) == null ? void 0 : _a.attributes;
|
|
1492
|
+
return /* @__PURE__ */ jsxs30("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [
|
|
1493
|
+
/* @__PURE__ */ jsx50("div", { className: "col-span-full", children: /* @__PURE__ */ jsx50(DefaultHorizontalDivider, {}) }),
|
|
1494
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex gap-6 items-center col-span-full", children: [
|
|
1495
|
+
/* @__PURE__ */ jsx50("div", { className: "size-8 aspect-square ", children: /* @__PURE__ */ jsx50(qrcode_default, { size: 32 }) }),
|
|
1496
|
+
/* @__PURE__ */ jsx50("div", { className: "flex flex-col mr-auto", children: /* @__PURE__ */ jsx50("p", { className: "text-dialog-fg-subtle text-sm font-medium", children: "Authenticator app" }) }),
|
|
1497
|
+
/* @__PURE__ */ jsx50(
|
|
1498
|
+
"button",
|
|
1499
|
+
{
|
|
1500
|
+
type: type === "button" ? "button" : "submit",
|
|
1501
|
+
...buttonAttrs,
|
|
1502
|
+
children: /* @__PURE__ */ jsx50(
|
|
1503
|
+
trash_default,
|
|
1504
|
+
{
|
|
1505
|
+
size: 24,
|
|
1506
|
+
className: "text-links-link-mute-default hover:text-links-link-mute-hover"
|
|
1507
|
+
}
|
|
1508
|
+
)
|
|
1509
|
+
}
|
|
1510
|
+
)
|
|
1511
|
+
] })
|
|
1512
|
+
] });
|
|
1513
|
+
}
|
|
1514
|
+
if ("totpSecret" in props) {
|
|
1515
|
+
return /* @__PURE__ */ jsxs30("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8", children: [
|
|
1516
|
+
/* @__PURE__ */ jsx50("div", { className: "col-span-full", children: /* @__PURE__ */ jsx50(DefaultHorizontalDivider, {}) }),
|
|
1517
|
+
/* @__PURE__ */ jsx50("div", { className: "bg-dialog-bg-subtle p-8 rounded-xl flex justify-center", children: /* @__PURE__ */ jsx50("div", { className: "h-44 aspect-square bg-[white] rounded", children: /* @__PURE__ */ jsx50("div", { className: "mix-blend-multiply -m-3 antialiased", children: /* @__PURE__ */ jsx50(
|
|
1518
|
+
DefaultImage,
|
|
1519
|
+
{
|
|
1520
|
+
node: props.totpImage,
|
|
1521
|
+
attributes: {
|
|
1522
|
+
...props.totpImage.attributes
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
) }) }) }),
|
|
1526
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-6", children: [
|
|
1527
|
+
/* @__PURE__ */ jsx50(
|
|
1528
|
+
DefaultLabel,
|
|
1529
|
+
{
|
|
1530
|
+
node: props.totpSecret,
|
|
1531
|
+
attributes: props.totpSecret.attributes,
|
|
1532
|
+
children: /* @__PURE__ */ jsx50(
|
|
1533
|
+
DefaultInput,
|
|
1534
|
+
{
|
|
1535
|
+
node: props.totpSecret,
|
|
1536
|
+
attributes: {
|
|
1537
|
+
disabled: true,
|
|
1538
|
+
name: "totp_secret_key",
|
|
1539
|
+
node_type: "input",
|
|
1540
|
+
type: "text",
|
|
1541
|
+
value: props.totpSecret.attributes.text.text
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
)
|
|
1545
|
+
}
|
|
1546
|
+
),
|
|
1547
|
+
/* @__PURE__ */ jsx50(
|
|
1548
|
+
DefaultLabel,
|
|
1549
|
+
{
|
|
1550
|
+
attributes: props.totpInput.attributes,
|
|
1551
|
+
node: props.totpInput,
|
|
1552
|
+
children: /* @__PURE__ */ jsx50(
|
|
1553
|
+
DefaultInput,
|
|
1554
|
+
{
|
|
1555
|
+
node: props.totpInput,
|
|
1556
|
+
attributes: props.totpInput.attributes
|
|
1557
|
+
}
|
|
1558
|
+
)
|
|
1559
|
+
}
|
|
1560
|
+
)
|
|
1561
|
+
] })
|
|
1562
|
+
] });
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
// src/theme/default/components/settings/settings-oidc.tsx
|
|
1567
|
+
import { jsx as jsx51, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
1568
|
+
function DefaultSettingsOidc({
|
|
1569
|
+
linkButtons,
|
|
1570
|
+
unlinkButtons
|
|
1571
|
+
}) {
|
|
1572
|
+
const hasLinkButtons = linkButtons.length > 0;
|
|
1573
|
+
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
1574
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-8", children: [
|
|
1575
|
+
hasLinkButtons && /* @__PURE__ */ jsx51("div", { className: "flex gap-3 items-start [&>button]:w-[79px]", children: linkButtons.map((button) => {
|
|
1576
|
+
const attrs = button.attributes;
|
|
1577
|
+
return /* @__PURE__ */ jsx51(
|
|
1578
|
+
DefaultButtonSocial,
|
|
1579
|
+
{
|
|
1580
|
+
showLabel: false,
|
|
1581
|
+
node: button,
|
|
1582
|
+
attributes: attrs
|
|
1583
|
+
},
|
|
1584
|
+
attrs.value
|
|
1585
|
+
);
|
|
1586
|
+
}) }),
|
|
1587
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx51(DefaultHorizontalDivider, {}) : null,
|
|
1588
|
+
unlinkButtons.map((button) => {
|
|
1589
|
+
var _a, _b;
|
|
1590
|
+
const attrs = button.attributes;
|
|
1591
|
+
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
1592
|
+
const Logo = provider_logos_default[attrs.value];
|
|
1593
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex justify-between", children: [
|
|
1594
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex gap-6 items-center", children: [
|
|
1595
|
+
/* @__PURE__ */ jsx51(Logo, { size: 32 }),
|
|
1596
|
+
/* @__PURE__ */ jsx51("p", { className: "text-dialog-fg-subtle text-sm font-medium", children: provider })
|
|
1597
|
+
] }),
|
|
1598
|
+
/* @__PURE__ */ jsx51("button", { ...attrs, type: "submit", children: /* @__PURE__ */ jsx51(trash_default, { className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover" }) })
|
|
1599
|
+
] }, attrs.value);
|
|
1600
|
+
})
|
|
1601
|
+
] });
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
// src/theme/default/assets/icons/key.svg
|
|
1605
|
+
import * as React27 from "react";
|
|
1606
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1607
|
+
var SvgKey = (props) => {
|
|
1608
|
+
var _a, _b;
|
|
1609
|
+
return /* @__PURE__ */ jsx52("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__ */ jsx52("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" }) });
|
|
1610
|
+
};
|
|
1611
|
+
var key_default = SvgKey;
|
|
1612
|
+
|
|
1613
|
+
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
1614
|
+
import { jsx as jsx53, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
1615
|
+
function DefaultSettingsWebauthn({
|
|
1616
|
+
nameInput,
|
|
1617
|
+
triggerButton,
|
|
1618
|
+
removeButtons
|
|
1619
|
+
}) {
|
|
1620
|
+
const hasRemoveButtons = removeButtons.length > 0;
|
|
1621
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-8", children: [
|
|
1622
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex gap-3 items-end max-w-[60%]", children: [
|
|
1623
|
+
/* @__PURE__ */ jsx53("div", { className: "flex-1", children: /* @__PURE__ */ jsx53(
|
|
1624
|
+
DefaultLabel,
|
|
1625
|
+
{
|
|
1626
|
+
node: nameInput,
|
|
1627
|
+
attributes: nameInput.attributes,
|
|
1628
|
+
children: /* @__PURE__ */ jsx53(
|
|
1629
|
+
DefaultInput,
|
|
1630
|
+
{
|
|
1631
|
+
node: nameInput,
|
|
1632
|
+
attributes: nameInput.attributes
|
|
1633
|
+
}
|
|
1634
|
+
)
|
|
1635
|
+
}
|
|
1636
|
+
) }),
|
|
1637
|
+
triggerButton ? /* @__PURE__ */ jsx53(
|
|
1638
|
+
DefaultButton,
|
|
1639
|
+
{
|
|
1640
|
+
node: triggerButton,
|
|
1641
|
+
attributes: triggerButton.attributes,
|
|
1642
|
+
onClick: triggerButton.onClick
|
|
1643
|
+
}
|
|
1644
|
+
) : null
|
|
1645
|
+
] }),
|
|
1646
|
+
hasRemoveButtons ? /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-8", children: [
|
|
1647
|
+
/* @__PURE__ */ jsx53(DefaultHorizontalDivider, {}),
|
|
1648
|
+
/* @__PURE__ */ jsx53("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
1649
|
+
var _a, _b;
|
|
1650
|
+
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
1651
|
+
const addedAt = "added_at" in context ? context.added_at : null;
|
|
1652
|
+
const diaplyName = "display_name" in context ? context.display_name : null;
|
|
1653
|
+
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
1654
|
+
return /* @__PURE__ */ jsxs32(
|
|
1655
|
+
"div",
|
|
1656
|
+
{
|
|
1657
|
+
className: "flex justify-between gap-6",
|
|
1658
|
+
children: [
|
|
1659
|
+
/* @__PURE__ */ jsx53(key_default, { size: 32, className: "text-dialog-fg-default" }),
|
|
1660
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex-1 flex-col", children: [
|
|
1661
|
+
/* @__PURE__ */ jsx53("p", { className: "text-sm font-medium text-dialog-fg-subtle", children: diaplyName }),
|
|
1662
|
+
/* @__PURE__ */ jsx53("span", { className: "text-sm text-dialog-fg-mute", children: keyId })
|
|
1663
|
+
] }),
|
|
1664
|
+
addedAt && /* @__PURE__ */ jsx53("p", { className: "text-sm self-center text-dialog-fg-mute", children: new Date(addedAt).toLocaleDateString() }),
|
|
1665
|
+
/* @__PURE__ */ jsx53(
|
|
1666
|
+
"button",
|
|
1667
|
+
{
|
|
1668
|
+
...node.attributes,
|
|
1669
|
+
type: "submit",
|
|
1670
|
+
className: "cursor-pointer text-links-link-mute-default hover:text-links-link-mute-hover",
|
|
1671
|
+
children: /* @__PURE__ */ jsx53(trash_default, { size: 20 })
|
|
1672
|
+
}
|
|
1673
|
+
)
|
|
1674
|
+
]
|
|
1675
|
+
},
|
|
1676
|
+
`webauthn-remove-button-${i}`
|
|
1677
|
+
);
|
|
1678
|
+
}) })
|
|
1679
|
+
] }) : null
|
|
1680
|
+
] });
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
// src/theme/default/components/settings/settings-passkey.tsx
|
|
1684
|
+
import { jsx as jsx54, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
1685
|
+
function DefaultSettingsPasskey({
|
|
1686
|
+
triggerButton,
|
|
1687
|
+
removeButtons
|
|
1688
|
+
}) {
|
|
1689
|
+
const hasRemoveButtons = removeButtons.length > 0;
|
|
1690
|
+
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
1691
|
+
/* @__PURE__ */ jsx54("div", { className: "flex gap-3 items-end max-w-[60%]", children: triggerButton ? /* @__PURE__ */ jsx54(
|
|
1692
|
+
DefaultButton,
|
|
1693
|
+
{
|
|
1694
|
+
node: triggerButton,
|
|
1695
|
+
attributes: triggerButton.attributes,
|
|
1696
|
+
onClick: triggerButton.onClick
|
|
1697
|
+
}
|
|
1698
|
+
) : null }),
|
|
1699
|
+
hasRemoveButtons ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
1700
|
+
/* @__PURE__ */ jsx54(DefaultHorizontalDivider, {}),
|
|
1701
|
+
/* @__PURE__ */ jsx54("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__ */ jsxs33(
|
|
1708
|
+
"div",
|
|
1709
|
+
{
|
|
1710
|
+
className: "flex justify-between gap-6",
|
|
1711
|
+
children: [
|
|
1712
|
+
/* @__PURE__ */ jsx54(passkey_default, { size: 32, className: "text-dialog-fg-default" }),
|
|
1713
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col", children: [
|
|
1714
|
+
/* @__PURE__ */ jsx54("p", { className: "text-sm font-medium text-dialog-fg-subtle", children: diaplyName }),
|
|
1715
|
+
/* @__PURE__ */ jsx54("span", { className: "text-sm text-dialog-fg-mute", children: keyId })
|
|
1716
|
+
] }),
|
|
1717
|
+
addedAt && /* @__PURE__ */ jsx54("p", { className: "text-sm self-center text-dialog-fg-mute", children: new Date(addedAt).toLocaleDateString() }),
|
|
1718
|
+
/* @__PURE__ */ jsx54(
|
|
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__ */ jsx54(trash_default, { size: 20 })
|
|
1725
|
+
}
|
|
1726
|
+
)
|
|
1727
|
+
]
|
|
1728
|
+
},
|
|
1729
|
+
`webauthn-remove-button-${i}`
|
|
1730
|
+
);
|
|
1731
|
+
}) })
|
|
1732
|
+
] }) : null
|
|
1733
|
+
] });
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
// src/theme/default/components/generic/page-header.tsx
|
|
1737
|
+
import {
|
|
1738
|
+
useComponents as useComponents2,
|
|
1739
|
+
useSession
|
|
1740
|
+
} from "@ory/elements-react";
|
|
1741
|
+
|
|
1742
|
+
// src/theme/default/components/ui/user-menu.tsx
|
|
1743
|
+
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
1744
|
+
import { useCallback, useEffect, useState as useState2 } from "react";
|
|
1745
|
+
import { useOryFlow as useOryFlow8 } from "@ory/elements-react";
|
|
1746
|
+
|
|
1747
|
+
// src/util/client.ts
|
|
1748
|
+
import {
|
|
1749
|
+
Configuration,
|
|
1750
|
+
FrontendApi
|
|
1751
|
+
} from "@ory/client-fetch";
|
|
1752
|
+
function frontendClient(sdkUrl, opts = {}) {
|
|
1753
|
+
const config = new Configuration({
|
|
1754
|
+
...opts,
|
|
1755
|
+
basePath: sdkUrl,
|
|
1756
|
+
headers: {
|
|
1757
|
+
Accept: "application/json",
|
|
1758
|
+
...opts.headers
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1761
|
+
return new FrontendApi(config);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
// src/theme/default/assets/icons/logout.svg
|
|
1765
|
+
import * as React28 from "react";
|
|
1766
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
1767
|
+
var SvgLogout = (props) => {
|
|
1768
|
+
var _a, _b;
|
|
1769
|
+
return /* @__PURE__ */ jsx55("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__ */ jsx55("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" }) });
|
|
1770
|
+
};
|
|
1771
|
+
var logout_default = SvgLogout;
|
|
1772
|
+
|
|
1773
|
+
// src/theme/default/assets/icons/settings.svg
|
|
1774
|
+
import * as React29 from "react";
|
|
1775
|
+
import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
1776
|
+
var SvgSettings = (props) => {
|
|
1777
|
+
var _a, _b;
|
|
1778
|
+
return /* @__PURE__ */ jsx56("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__ */ jsxs34("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1779
|
+
/* @__PURE__ */ jsx56("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" }),
|
|
1780
|
+
/* @__PURE__ */ jsx56("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1781
|
+
] }) });
|
|
1782
|
+
};
|
|
1783
|
+
var settings_default = SvgSettings;
|
|
1784
|
+
|
|
1785
|
+
// src/theme/default/utils/user.ts
|
|
1786
|
+
var getUserInitials = (session) => {
|
|
1787
|
+
var _a, _b;
|
|
1788
|
+
const avatar = "";
|
|
1789
|
+
let primary = "";
|
|
1790
|
+
let secondary = "";
|
|
1791
|
+
if (!((_a = session == null ? void 0 : session.identity) == null ? void 0 : _a.traits)) {
|
|
1792
|
+
return {
|
|
1793
|
+
primary,
|
|
1794
|
+
secondary,
|
|
1795
|
+
avatar
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
const traits = (_b = session.identity) == null ? void 0 : _b.traits;
|
|
1799
|
+
if (traits.email) {
|
|
1800
|
+
secondary = traits.email;
|
|
1801
|
+
}
|
|
1802
|
+
if (traits.name) {
|
|
1803
|
+
if (typeof traits.name === "string") {
|
|
1804
|
+
primary = traits.name;
|
|
1805
|
+
}
|
|
1806
|
+
if (traits.name.first && traits.name.last) {
|
|
1807
|
+
primary = traits.name.first + " " + traits.name.last;
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
if (primary === "") {
|
|
1811
|
+
primary = secondary;
|
|
1812
|
+
secondary = "";
|
|
1813
|
+
}
|
|
1814
|
+
return {
|
|
1815
|
+
primary,
|
|
1816
|
+
secondary,
|
|
1817
|
+
avatar
|
|
1818
|
+
};
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1822
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
1823
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1824
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
1825
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1826
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1827
|
+
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx57(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx57(
|
|
1828
|
+
DropdownMenuPrimitive.Content,
|
|
1829
|
+
{
|
|
1830
|
+
ref,
|
|
1831
|
+
sideOffset,
|
|
1832
|
+
align: "end",
|
|
1833
|
+
className: cn(
|
|
1834
|
+
"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",
|
|
1835
|
+
"border border-dialog-border-default bg-dialog-bg-default rounded-border-radius-cards",
|
|
1836
|
+
className
|
|
1837
|
+
),
|
|
1838
|
+
...props
|
|
1839
|
+
}
|
|
1840
|
+
) }));
|
|
1841
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1842
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx57(
|
|
1843
|
+
DropdownMenuPrimitive.Item,
|
|
1844
|
+
{
|
|
1845
|
+
ref,
|
|
1846
|
+
className: cn(
|
|
1847
|
+
"relative flex cursor-pointer select-none items-center outline-none transition-colors data-[disabled]:pointer-events-none",
|
|
1848
|
+
"px-8 py-3 lg:py-4.5 text-sm gap-6",
|
|
1849
|
+
"first:border-0 border-t border-button-secondary-border-default hover:border-button-social-border-hover data-[disabled]:border-button-secondary-border-disabled",
|
|
1850
|
+
"text-button-secondary-fg-default bg-button-secondary-bg-default",
|
|
1851
|
+
"hover:text-button-secondary-fg-hover hover:bg-button-secondary-bg-hover",
|
|
1852
|
+
"data-[disabled]:text-button-secondary-fg-disabled data-[disabled]:bg-button-secondary-bg-disabled",
|
|
1853
|
+
inset && "pl-8",
|
|
1854
|
+
className
|
|
1855
|
+
),
|
|
1856
|
+
...props
|
|
1857
|
+
}
|
|
1858
|
+
));
|
|
1859
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1860
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx57(
|
|
1861
|
+
DropdownMenuPrimitive.Label,
|
|
1862
|
+
{
|
|
1863
|
+
ref,
|
|
1864
|
+
className: cn(
|
|
1865
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1866
|
+
inset && "pl-8",
|
|
1867
|
+
className
|
|
1868
|
+
),
|
|
1869
|
+
...props
|
|
1870
|
+
}
|
|
1871
|
+
));
|
|
1872
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1873
|
+
|
|
1874
|
+
// src/theme/default/components/ui/user-avater.tsx
|
|
1875
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
1876
|
+
|
|
1877
|
+
// src/theme/default/assets/icons/user.svg
|
|
1878
|
+
import * as React30 from "react";
|
|
1879
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
1880
|
+
var SvgUser = (props) => {
|
|
1881
|
+
var _a, _b;
|
|
1882
|
+
return /* @__PURE__ */ jsx58("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__ */ jsx58("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" }) });
|
|
1883
|
+
};
|
|
1884
|
+
var user_default = SvgUser;
|
|
1885
|
+
|
|
1886
|
+
// src/theme/default/components/ui/user-avater.tsx
|
|
1887
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
1888
|
+
var UserAvatar = forwardRef4(
|
|
1889
|
+
({ initials, ...rest }, ref) => {
|
|
1890
|
+
return /* @__PURE__ */ jsx59(
|
|
1891
|
+
"button",
|
|
1892
|
+
{
|
|
1893
|
+
ref,
|
|
1894
|
+
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",
|
|
1895
|
+
...rest,
|
|
1896
|
+
children: /* @__PURE__ */ jsx59("div", { className: "relative size-full flex items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx59(
|
|
1897
|
+
"img",
|
|
1898
|
+
{
|
|
1899
|
+
src: initials.avatar,
|
|
1900
|
+
alt: initials.primary,
|
|
1901
|
+
className: "w-full object-contain"
|
|
1902
|
+
}
|
|
1903
|
+
) : /* @__PURE__ */ jsx59(user_default, { size: 24, className: "text-button-primary-fg-default" }) })
|
|
1904
|
+
}
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1907
|
+
);
|
|
1908
|
+
UserAvatar.displayName = "UserAvatar";
|
|
1909
|
+
|
|
1910
|
+
// src/theme/default/components/ui/user-menu.tsx
|
|
1911
|
+
import { jsx as jsx60, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
1912
|
+
var UserMenu = ({ session }) => {
|
|
1913
|
+
const { config } = useOryFlow8();
|
|
1914
|
+
const initials = getUserInitials(session);
|
|
1915
|
+
const [logoutFlow, setLogoutFlow] = useState2();
|
|
1916
|
+
const fetchLogoutFlow = useCallback(async () => {
|
|
1917
|
+
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
1918
|
+
setLogoutFlow(flow);
|
|
1919
|
+
}, [config.sdk.url]);
|
|
1920
|
+
useEffect(() => {
|
|
1921
|
+
void fetchLogoutFlow();
|
|
1922
|
+
}, [fetchLogoutFlow]);
|
|
1923
|
+
return /* @__PURE__ */ jsxs35(DropdownMenu, { children: [
|
|
1924
|
+
/* @__PURE__ */ jsx60(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx60(UserAvatar, { initials }) }),
|
|
1925
|
+
/* @__PURE__ */ jsxs35(DropdownMenuContent, { children: [
|
|
1926
|
+
/* @__PURE__ */ jsxs35(DropdownMenuLabel2, { className: "px-5 py-4.5 flex gap-3", children: [
|
|
1927
|
+
/* @__PURE__ */ jsx60(UserAvatar, { disabled: true, initials }),
|
|
1928
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col text-sm leading-tight justify-center", children: [
|
|
1929
|
+
/* @__PURE__ */ jsx60("div", { className: "text-dialog-fg-default", children: initials.primary }),
|
|
1930
|
+
initials.secondary && /* @__PURE__ */ jsx60("div", { className: "text-dialog-fg-mute", children: initials.secondary })
|
|
1931
|
+
] })
|
|
1932
|
+
] }),
|
|
1933
|
+
/* @__PURE__ */ jsx60(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs35("a", { href: "/settings", children: [
|
|
1934
|
+
/* @__PURE__ */ jsx60(settings_default, { size: 16 }),
|
|
1935
|
+
" User settings"
|
|
1936
|
+
] }) }),
|
|
1937
|
+
/* @__PURE__ */ jsx60(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs35("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
1938
|
+
/* @__PURE__ */ jsx60(logout_default, { size: 16 }),
|
|
1939
|
+
" Logout"
|
|
1940
|
+
] }) })
|
|
1941
|
+
] })
|
|
1942
|
+
] });
|
|
1943
|
+
};
|
|
1944
|
+
|
|
1945
|
+
// src/theme/default/components/generic/page-header.tsx
|
|
1946
|
+
import { jsx as jsx61, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
1947
|
+
var DefaultPageHeader = (_props) => {
|
|
1948
|
+
const { Card } = useComponents2();
|
|
1949
|
+
const { session } = useSession();
|
|
1950
|
+
return /* @__PURE__ */ jsx61("div", { className: "flex max-w-[896px] flex-col w-full gap-3 mt-16", children: /* @__PURE__ */ jsx61("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ jsxs36("div", { className: "flex gap-2 max-h-10 justify-between flex-1", children: [
|
|
1951
|
+
/* @__PURE__ */ jsx61("div", { className: "h-10 flex-1 relative", children: /* @__PURE__ */ jsx61(Card.Logo, {}) }),
|
|
1952
|
+
/* @__PURE__ */ jsx61(UserMenu, { session })
|
|
1953
|
+
] }) }) });
|
|
1954
|
+
};
|
|
1955
|
+
|
|
1205
1956
|
// src/theme/default/components/default-components.tsx
|
|
1206
1957
|
var OryDefaultComponents = {
|
|
1207
|
-
Card:
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1958
|
+
Card: {
|
|
1959
|
+
Root: DefaultCard,
|
|
1960
|
+
Footer: DefaultCardFooter,
|
|
1961
|
+
Header: DefaultCardHeader,
|
|
1962
|
+
Content: DefaultCardContent,
|
|
1963
|
+
Logo: DefaultCardLogo,
|
|
1964
|
+
Divider: DefaultHorizontalDivider,
|
|
1965
|
+
AuthMethodListItem: DefaultAuthMethodListItem,
|
|
1966
|
+
SettingsSection: DefaultFormSection,
|
|
1967
|
+
SettingsSectionContent: DefaultFormSectionContent,
|
|
1968
|
+
SettingsSectionFooter: DefaultFormSectionFooter
|
|
1969
|
+
},
|
|
1970
|
+
Node: {
|
|
1971
|
+
Button: DefaultButton,
|
|
1972
|
+
OidcButton: DefaultButtonSocial,
|
|
1973
|
+
CurrentIdentifierButton: DefaultCurrentIdentifierButton,
|
|
1974
|
+
Input: DefaultInput,
|
|
1975
|
+
CodeInput: DefaultPinCodeInput,
|
|
1976
|
+
Image: DefaultImage,
|
|
1977
|
+
Label: DefaultLabel,
|
|
1978
|
+
Checkbox: DefaultCheckbox,
|
|
1979
|
+
Text: DefaultText,
|
|
1980
|
+
Anchor: DefaultLinkButton
|
|
1981
|
+
},
|
|
1982
|
+
Form: {
|
|
1983
|
+
Root: DefaultFormContainer,
|
|
1984
|
+
Group: DefaultGroupContainer,
|
|
1985
|
+
OidcRoot: DefaultSocialButtonContainer,
|
|
1986
|
+
RecoveryCodesSettings: DefaultSettingsRecoveryCodes,
|
|
1987
|
+
TotpSettings: DefaultSettingsTotp,
|
|
1988
|
+
OidcSettings: DefaultSettingsOidc,
|
|
1989
|
+
WebauthnSettings: DefaultSettingsWebauthn,
|
|
1990
|
+
PasskeySettings: DefaultSettingsPasskey
|
|
1991
|
+
},
|
|
1992
|
+
Message: {
|
|
1993
|
+
Root: DefaultMessageContainer,
|
|
1994
|
+
Content: DefaultMessage
|
|
1995
|
+
},
|
|
1996
|
+
Page: {
|
|
1997
|
+
Header: DefaultPageHeader
|
|
1998
|
+
}
|
|
1231
1999
|
};
|
|
1232
2000
|
|
|
1233
2001
|
// src/theme/default/flows/error.tsx
|
|
1234
|
-
import { jsx as
|
|
2002
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
1235
2003
|
function Error({
|
|
1236
2004
|
error,
|
|
1237
2005
|
children
|
|
1238
2006
|
}) {
|
|
1239
|
-
return /* @__PURE__ */
|
|
2007
|
+
return /* @__PURE__ */ jsx62("div", { children: JSON.stringify(error) || children });
|
|
1240
2008
|
}
|
|
1241
2009
|
|
|
1242
2010
|
// src/theme/default/flows/login.tsx
|
|
1243
|
-
import { FlowType as
|
|
2011
|
+
import { FlowType as FlowType6 } from "@ory/client-fetch";
|
|
1244
2012
|
import {
|
|
1245
2013
|
OryProvider,
|
|
1246
2014
|
OryTwoStepCard
|
|
1247
2015
|
} from "@ory/elements-react";
|
|
1248
|
-
import
|
|
2016
|
+
import merge from "lodash.merge";
|
|
2017
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
1249
2018
|
function Login({
|
|
1250
2019
|
flow,
|
|
1251
2020
|
config,
|
|
1252
2021
|
children,
|
|
1253
2022
|
components: flowOverrideComponents
|
|
1254
2023
|
}) {
|
|
1255
|
-
const components = {
|
|
1256
|
-
|
|
1257
|
-
...flowOverrideComponents
|
|
1258
|
-
};
|
|
1259
|
-
return /* @__PURE__ */ jsx43(
|
|
2024
|
+
const components = flowOverrideComponents ? merge({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
2025
|
+
return /* @__PURE__ */ jsx63(
|
|
1260
2026
|
OryProvider,
|
|
1261
2027
|
{
|
|
1262
2028
|
config,
|
|
1263
2029
|
flow,
|
|
1264
|
-
flowType:
|
|
2030
|
+
flowType: FlowType6.Login,
|
|
1265
2031
|
components,
|
|
1266
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2032
|
+
children: children != null ? children : /* @__PURE__ */ jsx63(OryTwoStepCard, {})
|
|
1267
2033
|
}
|
|
1268
2034
|
);
|
|
1269
2035
|
}
|
|
1270
2036
|
|
|
1271
2037
|
// src/theme/default/flows/recovery.tsx
|
|
1272
|
-
import { FlowType as
|
|
2038
|
+
import { FlowType as FlowType7 } from "@ory/client-fetch";
|
|
1273
2039
|
import {
|
|
1274
2040
|
OryProvider as OryProvider2,
|
|
1275
2041
|
OryTwoStepCard as OryTwoStepCard2
|
|
1276
2042
|
} from "@ory/elements-react";
|
|
1277
|
-
import
|
|
2043
|
+
import merge2 from "lodash.merge";
|
|
2044
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
1278
2045
|
function Recovery({
|
|
1279
2046
|
flow,
|
|
1280
2047
|
config,
|
|
1281
2048
|
children,
|
|
1282
2049
|
components: flowOverrideComponents
|
|
1283
2050
|
}) {
|
|
1284
|
-
const components = {
|
|
1285
|
-
|
|
1286
|
-
...flowOverrideComponents
|
|
1287
|
-
};
|
|
1288
|
-
return /* @__PURE__ */ jsx44(
|
|
2051
|
+
const components = flowOverrideComponents ? merge2({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
2052
|
+
return /* @__PURE__ */ jsx64(
|
|
1289
2053
|
OryProvider2,
|
|
1290
2054
|
{
|
|
1291
2055
|
config,
|
|
1292
2056
|
flow,
|
|
1293
|
-
flowType:
|
|
2057
|
+
flowType: FlowType7.Recovery,
|
|
1294
2058
|
components,
|
|
1295
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2059
|
+
children: children != null ? children : /* @__PURE__ */ jsx64(OryTwoStepCard2, {})
|
|
1296
2060
|
}
|
|
1297
2061
|
);
|
|
1298
2062
|
}
|
|
1299
2063
|
|
|
1300
2064
|
// src/theme/default/flows/registration.tsx
|
|
1301
|
-
import { FlowType as
|
|
2065
|
+
import { FlowType as FlowType8 } from "@ory/client-fetch";
|
|
1302
2066
|
import {
|
|
1303
2067
|
OryProvider as OryProvider3,
|
|
1304
2068
|
OryTwoStepCard as OryTwoStepCard3
|
|
1305
2069
|
} from "@ory/elements-react";
|
|
1306
|
-
import
|
|
2070
|
+
import merge3 from "lodash.merge";
|
|
2071
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
1307
2072
|
function Registration({
|
|
1308
2073
|
flow,
|
|
1309
2074
|
children,
|
|
1310
2075
|
components: flowOverrideComponents,
|
|
1311
2076
|
config
|
|
1312
2077
|
}) {
|
|
1313
|
-
const components = {
|
|
1314
|
-
|
|
1315
|
-
...flowOverrideComponents
|
|
1316
|
-
};
|
|
1317
|
-
return /* @__PURE__ */ jsx45(
|
|
2078
|
+
const components = flowOverrideComponents ? merge3({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
2079
|
+
return /* @__PURE__ */ jsx65(
|
|
1318
2080
|
OryProvider3,
|
|
1319
2081
|
{
|
|
1320
2082
|
config,
|
|
1321
2083
|
flow,
|
|
1322
|
-
flowType:
|
|
2084
|
+
flowType: FlowType8.Registration,
|
|
1323
2085
|
components,
|
|
1324
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2086
|
+
children: children != null ? children : /* @__PURE__ */ jsx65(OryTwoStepCard3, {})
|
|
1325
2087
|
}
|
|
1326
2088
|
);
|
|
1327
2089
|
}
|
|
1328
2090
|
|
|
1329
2091
|
// src/theme/default/flows/settings.tsx
|
|
1330
|
-
import { FlowType as
|
|
2092
|
+
import { FlowType as FlowType9 } from "@ory/client-fetch";
|
|
1331
2093
|
import {
|
|
2094
|
+
HeadlessPageHeader,
|
|
1332
2095
|
OryProvider as OryProvider4,
|
|
1333
|
-
|
|
2096
|
+
OrySettingsCard
|
|
1334
2097
|
} from "@ory/elements-react";
|
|
1335
|
-
import
|
|
2098
|
+
import merge4 from "lodash.merge";
|
|
2099
|
+
import { Fragment as Fragment3, jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
1336
2100
|
function Settings({
|
|
1337
2101
|
flow,
|
|
1338
2102
|
config,
|
|
1339
2103
|
children,
|
|
1340
2104
|
components: flowOverrideComponents
|
|
1341
2105
|
}) {
|
|
1342
|
-
const components = {
|
|
1343
|
-
|
|
1344
|
-
...flowOverrideComponents
|
|
1345
|
-
};
|
|
1346
|
-
return /* @__PURE__ */ jsx46(
|
|
2106
|
+
const components = flowOverrideComponents ? merge4({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
2107
|
+
return /* @__PURE__ */ jsx66(
|
|
1347
2108
|
OryProvider4,
|
|
1348
2109
|
{
|
|
1349
2110
|
config,
|
|
1350
2111
|
flow,
|
|
1351
|
-
flowType:
|
|
2112
|
+
flowType: FlowType9.Settings,
|
|
1352
2113
|
components,
|
|
1353
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2114
|
+
children: children != null ? children : /* @__PURE__ */ jsxs37(Fragment3, { children: [
|
|
2115
|
+
/* @__PURE__ */ jsx66(HeadlessPageHeader, {}),
|
|
2116
|
+
/* @__PURE__ */ jsx66(OrySettingsCard, {})
|
|
2117
|
+
] })
|
|
1354
2118
|
}
|
|
1355
2119
|
);
|
|
1356
2120
|
}
|
|
1357
2121
|
|
|
1358
2122
|
// src/theme/default/flows/verification.tsx
|
|
1359
|
-
import { FlowType as
|
|
2123
|
+
import { FlowType as FlowType10 } from "@ory/client-fetch";
|
|
1360
2124
|
import {
|
|
1361
2125
|
OryProvider as OryProvider5,
|
|
1362
|
-
OryTwoStepCard as
|
|
2126
|
+
OryTwoStepCard as OryTwoStepCard4
|
|
1363
2127
|
} from "@ory/elements-react";
|
|
1364
|
-
import
|
|
2128
|
+
import merge5 from "lodash.merge";
|
|
2129
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
1365
2130
|
function Verification({
|
|
1366
2131
|
flow,
|
|
1367
2132
|
config,
|
|
1368
2133
|
children,
|
|
1369
2134
|
components: flowOverrideComponents
|
|
1370
2135
|
}) {
|
|
1371
|
-
const components = {
|
|
1372
|
-
|
|
1373
|
-
...flowOverrideComponents
|
|
1374
|
-
};
|
|
1375
|
-
return /* @__PURE__ */ jsx47(
|
|
2136
|
+
const components = flowOverrideComponents ? merge5({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
2137
|
+
return /* @__PURE__ */ jsx67(
|
|
1376
2138
|
OryProvider5,
|
|
1377
2139
|
{
|
|
1378
2140
|
config,
|
|
1379
2141
|
flow,
|
|
1380
|
-
flowType:
|
|
2142
|
+
flowType: FlowType10.Verification,
|
|
1381
2143
|
components,
|
|
1382
|
-
children: children != null ? children : /* @__PURE__ */
|
|
2144
|
+
children: children != null ? children : /* @__PURE__ */ jsx67(OryTwoStepCard4, {})
|
|
1383
2145
|
}
|
|
1384
2146
|
);
|
|
1385
2147
|
}
|