@cerberus-design/react 0.10.4-next-8007762 → 0.10.4-next-4e536c0
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/build/legacy/_tsup-dts-rollup.d.cts +138 -0
- package/build/legacy/components/Fieldset.cjs +66 -0
- package/build/legacy/components/Fieldset.cjs.map +1 -0
- package/build/legacy/components/FieldsetLabel.cjs +49 -0
- package/build/legacy/components/FieldsetLabel.cjs.map +1 -0
- package/build/legacy/components/Label.cjs +1 -1
- package/build/legacy/components/Label.cjs.map +1 -1
- package/build/legacy/components/Legend.cjs +95 -0
- package/build/legacy/components/Legend.cjs.map +1 -0
- package/build/legacy/context/prompt-modal.cjs +1 -1
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +424 -333
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +138 -0
- package/build/modern/chunk-3ZDFQO25.js +31 -0
- package/build/modern/chunk-3ZDFQO25.js.map +1 -0
- package/build/modern/chunk-6TTN2JMY.js +54 -0
- package/build/modern/chunk-6TTN2JMY.js.map +1 -0
- package/build/modern/{chunk-LKFXUM3Z.js → chunk-77LI5SP3.js} +8 -8
- package/build/modern/{chunk-6YUB3ITX.js → chunk-BGBCJ2W2.js} +7 -7
- package/build/modern/{chunk-I35HMGJQ.js → chunk-NMF2HYWO.js} +2 -2
- package/build/modern/{chunk-I35HMGJQ.js.map → chunk-NMF2HYWO.js.map} +1 -1
- package/build/modern/chunk-PZAZKQMO.js +25 -0
- package/build/modern/chunk-PZAZKQMO.js.map +1 -0
- package/build/modern/{chunk-EZNGCXVJ.js → chunk-SP6O64KQ.js} +4 -4
- package/build/modern/components/Fieldset.js +9 -0
- package/build/modern/components/Fieldset.js.map +1 -0
- package/build/modern/components/FieldsetLabel.js +7 -0
- package/build/modern/components/FieldsetLabel.js.map +1 -0
- package/build/modern/components/Label.js +1 -1
- package/build/modern/components/Legend.js +10 -0
- package/build/modern/components/Legend.js.map +1 -0
- package/build/modern/context/confirm-modal.js +3 -3
- package/build/modern/context/notification-center.js +2 -2
- package/build/modern/context/prompt-modal.js +4 -4
- package/build/modern/index.js +45 -33
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Fieldset.tsx +65 -0
- package/src/components/FieldsetLabel.tsx +59 -0
- package/src/components/Label.tsx +1 -1
- package/src/components/Legend.tsx +87 -0
- package/src/index.ts +3 -0
- /package/build/modern/{chunk-LKFXUM3Z.js.map → chunk-77LI5SP3.js.map} +0 -0
- /package/build/modern/{chunk-6YUB3ITX.js.map → chunk-BGBCJ2W2.js.map} +0 -0
- /package/build/modern/{chunk-EZNGCXVJ.js.map → chunk-SP6O64KQ.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -32,11 +32,14 @@ __export(src_exports, {
|
|
|
32
32
|
FeatureFlags: () => FeatureFlags,
|
|
33
33
|
Field: () => Field,
|
|
34
34
|
FieldMessage: () => FieldMessage,
|
|
35
|
+
Fieldset: () => Fieldset,
|
|
36
|
+
FieldsetLabel: () => FieldsetLabel,
|
|
35
37
|
FileStatus: () => FileStatus,
|
|
36
38
|
FileUploader: () => FileUploader,
|
|
37
39
|
IconButton: () => IconButton,
|
|
38
40
|
Input: () => Input,
|
|
39
41
|
Label: () => Label,
|
|
42
|
+
Legend: () => Legend,
|
|
40
43
|
MODE_KEY: () => MODE_KEY,
|
|
41
44
|
Modal: () => Modal,
|
|
42
45
|
ModalDescription: () => ModalDescription,
|
|
@@ -574,34 +577,78 @@ function FeatureFlag(props) {
|
|
|
574
577
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Show, { when: showContent, children: props.children });
|
|
575
578
|
}
|
|
576
579
|
|
|
580
|
+
// src/components/Fieldset.tsx
|
|
581
|
+
var import_css6 = require("@cerberus/styled-system/css");
|
|
582
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
583
|
+
function Fieldset(props) {
|
|
584
|
+
const { invalid, ...formState } = useFieldContext();
|
|
585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
586
|
+
"fieldset",
|
|
587
|
+
{
|
|
588
|
+
...props,
|
|
589
|
+
...formState,
|
|
590
|
+
...invalid && { "aria-invalid": true },
|
|
591
|
+
className: (0, import_css6.cx)(
|
|
592
|
+
props.className,
|
|
593
|
+
(0, import_css6.css)({
|
|
594
|
+
border: "none",
|
|
595
|
+
pt: 2,
|
|
596
|
+
margin: 0
|
|
597
|
+
})
|
|
598
|
+
)
|
|
599
|
+
}
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
// src/components/FieldsetLabel.tsx
|
|
604
|
+
var import_css7 = require("@cerberus/styled-system/css");
|
|
605
|
+
var import_recipes5 = require("@cerberus/styled-system/recipes");
|
|
606
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
607
|
+
function FieldsetLabel(props) {
|
|
608
|
+
const { size, usage, ...nativeProps } = props;
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
610
|
+
"label",
|
|
611
|
+
{
|
|
612
|
+
...nativeProps,
|
|
613
|
+
className: (0, import_css7.cx)(
|
|
614
|
+
nativeProps.className,
|
|
615
|
+
(0, import_recipes5.label)({
|
|
616
|
+
size,
|
|
617
|
+
usage
|
|
618
|
+
})
|
|
619
|
+
)
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
|
|
577
624
|
// src/components/FileStatus.tsx
|
|
578
625
|
var import_react5 = require("react");
|
|
579
|
-
var
|
|
580
|
-
var
|
|
626
|
+
var import_recipes8 = require("@cerberus/styled-system/recipes");
|
|
627
|
+
var import_css10 = require("@cerberus/styled-system/css");
|
|
581
628
|
var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
582
629
|
|
|
583
630
|
// src/components/ProgressBar.tsx
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
var
|
|
631
|
+
var import_css8 = require("@cerberus/styled-system/css");
|
|
632
|
+
var import_recipes6 = require("@cerberus/styled-system/recipes");
|
|
633
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
587
634
|
function ProgressBar(props) {
|
|
588
|
-
const { indeterminate, size, usage, now, label:
|
|
589
|
-
const styles = (0,
|
|
635
|
+
const { indeterminate, size, usage, now, label: label4, ...nativeProps } = props;
|
|
636
|
+
const styles = (0, import_recipes6.progressBar)({ size, usage });
|
|
590
637
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
591
638
|
const width = {
|
|
592
639
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
593
640
|
};
|
|
594
|
-
return /* @__PURE__ */ (0,
|
|
641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
595
642
|
"div",
|
|
596
643
|
{
|
|
597
644
|
...nativeProps,
|
|
598
|
-
"aria-label":
|
|
645
|
+
"aria-label": label4,
|
|
599
646
|
"aria-valuemin": 0,
|
|
600
647
|
"aria-valuemax": 100,
|
|
601
648
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
602
|
-
className: (0,
|
|
649
|
+
className: (0, import_css8.cx)(nativeProps.className, styles.root),
|
|
603
650
|
role: "progressbar",
|
|
604
|
-
children: /* @__PURE__ */ (0,
|
|
651
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
605
652
|
"div",
|
|
606
653
|
{
|
|
607
654
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -615,19 +662,19 @@ function ProgressBar(props) {
|
|
|
615
662
|
}
|
|
616
663
|
|
|
617
664
|
// src/components/IconButton.tsx
|
|
618
|
-
var
|
|
619
|
-
var
|
|
620
|
-
var
|
|
665
|
+
var import_css9 = require("@cerberus/styled-system/css");
|
|
666
|
+
var import_recipes7 = require("@cerberus/styled-system/recipes");
|
|
667
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
621
668
|
function IconButton(props) {
|
|
622
669
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
623
|
-
return /* @__PURE__ */ (0,
|
|
670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
624
671
|
"button",
|
|
625
672
|
{
|
|
626
673
|
...nativeProps,
|
|
627
674
|
"aria-label": ariaLabel ?? "Icon Button",
|
|
628
|
-
className: (0,
|
|
675
|
+
className: (0, import_css9.cx)(
|
|
629
676
|
nativeProps.className,
|
|
630
|
-
(0,
|
|
677
|
+
(0, import_recipes7.iconButton)({
|
|
631
678
|
palette,
|
|
632
679
|
usage,
|
|
633
680
|
size
|
|
@@ -638,7 +685,7 @@ function IconButton(props) {
|
|
|
638
685
|
}
|
|
639
686
|
|
|
640
687
|
// src/components/FileStatus.tsx
|
|
641
|
-
var
|
|
688
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
642
689
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
643
690
|
processStatus2["TODO"] = "todo";
|
|
644
691
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -654,15 +701,15 @@ function FileStatus(props) {
|
|
|
654
701
|
const styles = (0, import_react5.useMemo)(() => {
|
|
655
702
|
switch (status) {
|
|
656
703
|
case "todo" /* TODO */:
|
|
657
|
-
return (0,
|
|
704
|
+
return (0, import_recipes8.fileStatus)({ status: "todo" });
|
|
658
705
|
case "processing" /* PROCESSING */:
|
|
659
|
-
return (0,
|
|
706
|
+
return (0, import_recipes8.fileStatus)({ status: "processing" });
|
|
660
707
|
case "done" /* DONE */:
|
|
661
|
-
return (0,
|
|
708
|
+
return (0, import_recipes8.fileStatus)({ status: "done" });
|
|
662
709
|
case "error" /* ERROR */:
|
|
663
|
-
return (0,
|
|
710
|
+
return (0, import_recipes8.fileStatus)({ status: "error" });
|
|
664
711
|
default:
|
|
665
|
-
return (0,
|
|
712
|
+
return (0, import_recipes8.fileStatus)();
|
|
666
713
|
}
|
|
667
714
|
}, [status]);
|
|
668
715
|
const handleClick = (0, import_react5.useCallback)(
|
|
@@ -674,22 +721,22 @@ function FileStatus(props) {
|
|
|
674
721
|
},
|
|
675
722
|
[onClick]
|
|
676
723
|
);
|
|
677
|
-
return /* @__PURE__ */ (0,
|
|
724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
678
725
|
"div",
|
|
679
726
|
{
|
|
680
727
|
...nativeProps,
|
|
681
|
-
className: (0,
|
|
728
|
+
className: (0, import_css10.cx)(nativeProps.className, styles.root, (0, import_patterns4.hstack)()),
|
|
682
729
|
children: [
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
730
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
684
731
|
Avatar,
|
|
685
732
|
{
|
|
686
733
|
ariaLabel: "",
|
|
687
734
|
gradient: modalIconPalette,
|
|
688
|
-
icon: /* @__PURE__ */ (0,
|
|
735
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
689
736
|
src: ""
|
|
690
737
|
}
|
|
691
738
|
),
|
|
692
|
-
/* @__PURE__ */ (0,
|
|
739
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
693
740
|
"div",
|
|
694
741
|
{
|
|
695
742
|
className: (0, import_patterns4.vstack)({
|
|
@@ -698,17 +745,17 @@ function FileStatus(props) {
|
|
|
698
745
|
w: "full"
|
|
699
746
|
}),
|
|
700
747
|
children: [
|
|
701
|
-
/* @__PURE__ */ (0,
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
702
749
|
"small",
|
|
703
750
|
{
|
|
704
|
-
className: (0,
|
|
751
|
+
className: (0, import_css10.css)({
|
|
705
752
|
color: "page.text.initial",
|
|
706
753
|
textStyle: "label-sm"
|
|
707
754
|
}),
|
|
708
755
|
children: file
|
|
709
756
|
}
|
|
710
757
|
),
|
|
711
|
-
/* @__PURE__ */ (0,
|
|
758
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
712
759
|
ProgressBar,
|
|
713
760
|
{
|
|
714
761
|
id: props.id,
|
|
@@ -717,27 +764,27 @@ function FileStatus(props) {
|
|
|
717
764
|
size: "sm"
|
|
718
765
|
}
|
|
719
766
|
),
|
|
720
|
-
/* @__PURE__ */ (0,
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
721
768
|
FieldMessage,
|
|
722
769
|
{
|
|
723
|
-
className: (0,
|
|
770
|
+
className: (0, import_css10.css)({
|
|
724
771
|
color: "page.text.100"
|
|
725
772
|
}),
|
|
726
773
|
id: `help:${file}`,
|
|
727
|
-
children: /* @__PURE__ */ (0,
|
|
774
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MatchFileStatusText, { status, now })
|
|
728
775
|
}
|
|
729
776
|
) })
|
|
730
777
|
]
|
|
731
778
|
}
|
|
732
779
|
),
|
|
733
|
-
/* @__PURE__ */ (0,
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
734
781
|
IconButton,
|
|
735
782
|
{
|
|
736
783
|
ariaLabel: actionLabel,
|
|
737
784
|
onClick: handleClick,
|
|
738
785
|
palette,
|
|
739
786
|
size: "sm",
|
|
740
|
-
children: /* @__PURE__ */ (0,
|
|
787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MatchStatusAction, { status })
|
|
741
788
|
}
|
|
742
789
|
)
|
|
743
790
|
]
|
|
@@ -753,11 +800,11 @@ function MatchFileStatusIcon(props) {
|
|
|
753
800
|
switch (props.status) {
|
|
754
801
|
case "todo" /* TODO */:
|
|
755
802
|
case "processing" /* PROCESSING */:
|
|
756
|
-
return /* @__PURE__ */ (0,
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FileUploaderIcon, { size: props.size });
|
|
757
804
|
case "done" /* DONE */:
|
|
758
|
-
return /* @__PURE__ */ (0,
|
|
805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DoneIcon, { size: props.size });
|
|
759
806
|
case "error" /* ERROR */:
|
|
760
|
-
return /* @__PURE__ */ (0,
|
|
807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(InvalidIcon, { size: props.size });
|
|
761
808
|
default:
|
|
762
809
|
throw new Error("Unknown status");
|
|
763
810
|
}
|
|
@@ -781,11 +828,11 @@ function MatchStatusAction(props) {
|
|
|
781
828
|
switch (props.status) {
|
|
782
829
|
case "todo" /* TODO */:
|
|
783
830
|
case "processing" /* PROCESSING */:
|
|
784
|
-
return /* @__PURE__ */ (0,
|
|
831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CloseIcon, {});
|
|
785
832
|
case "error" /* ERROR */:
|
|
786
|
-
return /* @__PURE__ */ (0,
|
|
833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RedoIcon, {});
|
|
787
834
|
case "done" /* DONE */:
|
|
788
|
-
return /* @__PURE__ */ (0,
|
|
835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TrashIcon, {});
|
|
789
836
|
default:
|
|
790
837
|
throw new Error("Invalid status");
|
|
791
838
|
}
|
|
@@ -831,38 +878,38 @@ function getModalIconPalette(status) {
|
|
|
831
878
|
}
|
|
832
879
|
|
|
833
880
|
// src/components/FileUploader.tsx
|
|
834
|
-
var
|
|
881
|
+
var import_css11 = require("@cerberus/styled-system/css");
|
|
835
882
|
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
836
|
-
var
|
|
837
|
-
var
|
|
883
|
+
var import_recipes9 = require("@cerberus/styled-system/recipes");
|
|
884
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
838
885
|
function FileUploader(props) {
|
|
839
886
|
var _a;
|
|
840
|
-
const styles = (0,
|
|
887
|
+
const styles = (0, import_recipes9.fileUploader)();
|
|
841
888
|
const Icon = $cerberusIcons.fileUploader;
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
843
890
|
"div",
|
|
844
891
|
{
|
|
845
|
-
className: (0,
|
|
892
|
+
className: (0, import_css11.cx)(
|
|
846
893
|
(0, import_patterns5.vstack)({
|
|
847
894
|
justify: "center"
|
|
848
895
|
}),
|
|
849
896
|
styles.container
|
|
850
897
|
),
|
|
851
898
|
children: [
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
899
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
853
900
|
Avatar,
|
|
854
901
|
{
|
|
855
902
|
gradient: "charon-light",
|
|
856
903
|
ariaLabel: "",
|
|
857
|
-
icon: /* @__PURE__ */ (0,
|
|
904
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, {}),
|
|
858
905
|
size: "md",
|
|
859
906
|
src: ""
|
|
860
907
|
}
|
|
861
908
|
) }),
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
909
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
863
910
|
"label",
|
|
864
911
|
{
|
|
865
|
-
className: (0,
|
|
912
|
+
className: (0, import_css11.cx)(
|
|
866
913
|
(0, import_patterns5.vstack)({
|
|
867
914
|
justify: "center"
|
|
868
915
|
}),
|
|
@@ -870,16 +917,16 @@ function FileUploader(props) {
|
|
|
870
917
|
),
|
|
871
918
|
htmlFor: props.name,
|
|
872
919
|
children: [
|
|
873
|
-
/* @__PURE__ */ (0,
|
|
920
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
874
921
|
"Import ",
|
|
875
922
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
876
923
|
" files",
|
|
877
|
-
/* @__PURE__ */ (0,
|
|
878
|
-
/* @__PURE__ */ (0,
|
|
924
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
879
926
|
"input",
|
|
880
927
|
{
|
|
881
928
|
...props,
|
|
882
|
-
className: (0,
|
|
929
|
+
className: (0, import_css11.cx)(props.className, styles.input),
|
|
883
930
|
type: "file"
|
|
884
931
|
}
|
|
885
932
|
)
|
|
@@ -892,18 +939,18 @@ function FileUploader(props) {
|
|
|
892
939
|
}
|
|
893
940
|
|
|
894
941
|
// src/components/Input.tsx
|
|
895
|
-
var
|
|
896
|
-
var
|
|
897
|
-
var
|
|
942
|
+
var import_recipes10 = require("@cerberus/styled-system/recipes");
|
|
943
|
+
var import_css12 = require("@cerberus/styled-system/css");
|
|
944
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
898
945
|
function Input(props) {
|
|
899
946
|
const { describedBy, size, startIcon, endIcon, ...nativeProps } = props;
|
|
900
|
-
const inputStyles = (0,
|
|
947
|
+
const inputStyles = (0, import_recipes10.input)({ size });
|
|
901
948
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
902
949
|
const hasEndIcon = Boolean(endIcon);
|
|
903
950
|
const { invalid: InvalidIcon } = $cerberusIcons;
|
|
904
|
-
return /* @__PURE__ */ (0,
|
|
905
|
-
/* @__PURE__ */ (0,
|
|
906
|
-
/* @__PURE__ */ (0,
|
|
951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: inputStyles.root, children: [
|
|
952
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
907
954
|
"input",
|
|
908
955
|
{
|
|
909
956
|
...nativeProps,
|
|
@@ -911,31 +958,31 @@ function Input(props) {
|
|
|
911
958
|
...describedBy && { "aria-describedby": describedBy },
|
|
912
959
|
...invalid && { "aria-invalid": true },
|
|
913
960
|
"data-start-icon": Boolean(startIcon),
|
|
914
|
-
className: (0,
|
|
961
|
+
className: (0, import_css12.cx)("peer", nativeProps.className, inputStyles.input)
|
|
915
962
|
}
|
|
916
963
|
),
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
918
|
-
/* @__PURE__ */ (0,
|
|
964
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
919
966
|
] });
|
|
920
967
|
}
|
|
921
968
|
|
|
922
969
|
// src/components/Label.tsx
|
|
923
|
-
var
|
|
924
|
-
var
|
|
970
|
+
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
971
|
+
var import_css13 = require("@cerberus/styled-system/css");
|
|
925
972
|
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
926
|
-
var
|
|
973
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
927
974
|
function Label(props) {
|
|
928
975
|
const { hidden, size, ...nativeProps } = props;
|
|
929
976
|
const { required, disabled } = useFieldContext();
|
|
930
977
|
const usage = hidden ? "hidden" : "visible";
|
|
931
|
-
return /* @__PURE__ */ (0,
|
|
978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
932
979
|
"label",
|
|
933
980
|
{
|
|
934
981
|
...nativeProps,
|
|
935
982
|
...disabled && { "data-disabled": true },
|
|
936
|
-
className: (0,
|
|
983
|
+
className: (0, import_css13.cx)(
|
|
937
984
|
nativeProps.className,
|
|
938
|
-
(0,
|
|
985
|
+
(0, import_recipes11.label)({ size, usage }),
|
|
939
986
|
(0, import_patterns6.hstack)({
|
|
940
987
|
justify: "space-between",
|
|
941
988
|
w: "full"
|
|
@@ -943,11 +990,52 @@ function Label(props) {
|
|
|
943
990
|
),
|
|
944
991
|
children: [
|
|
945
992
|
props.children,
|
|
946
|
-
/* @__PURE__ */ (0,
|
|
993
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
947
994
|
"span",
|
|
948
995
|
{
|
|
949
|
-
className: (0,
|
|
950
|
-
color: "
|
|
996
|
+
className: (0, import_css13.css)({
|
|
997
|
+
color: "page.text.100",
|
|
998
|
+
fontSize: "inherit"
|
|
999
|
+
}),
|
|
1000
|
+
children: "(required)"
|
|
1001
|
+
}
|
|
1002
|
+
) })
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
1005
|
+
);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
// src/components/Legend.tsx
|
|
1009
|
+
var import_css14 = require("@cerberus/styled-system/css");
|
|
1010
|
+
var import_recipes12 = require("@cerberus-design/styled-system/recipes");
|
|
1011
|
+
var import_patterns7 = require("@cerberus-design/styled-system/patterns");
|
|
1012
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1013
|
+
function Legend(props) {
|
|
1014
|
+
const { size, ...nativeProps } = props;
|
|
1015
|
+
const { invalid, ...formState } = useFieldContext();
|
|
1016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1017
|
+
"legend",
|
|
1018
|
+
{
|
|
1019
|
+
...nativeProps,
|
|
1020
|
+
...formState,
|
|
1021
|
+
...invalid && { "aria-invalid": true },
|
|
1022
|
+
className: (0, import_css14.cx)(
|
|
1023
|
+
nativeProps.className,
|
|
1024
|
+
(0, import_patterns7.hstack)({
|
|
1025
|
+
justify: "space-between",
|
|
1026
|
+
w: "full"
|
|
1027
|
+
}),
|
|
1028
|
+
(0, import_recipes12.label)({
|
|
1029
|
+
size
|
|
1030
|
+
})
|
|
1031
|
+
),
|
|
1032
|
+
children: [
|
|
1033
|
+
nativeProps.children,
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1035
|
+
"span",
|
|
1036
|
+
{
|
|
1037
|
+
className: (0, import_css14.css)({
|
|
1038
|
+
color: "page.text.100",
|
|
951
1039
|
fontSize: "inherit"
|
|
952
1040
|
}),
|
|
953
1041
|
children: "(required)"
|
|
@@ -959,16 +1047,16 @@ function Label(props) {
|
|
|
959
1047
|
}
|
|
960
1048
|
|
|
961
1049
|
// src/components/Modal.tsx
|
|
962
|
-
var
|
|
963
|
-
var
|
|
1050
|
+
var import_css15 = require("@cerberus/styled-system/css");
|
|
1051
|
+
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
964
1052
|
var import_react6 = require("react");
|
|
965
|
-
var
|
|
1053
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
966
1054
|
function ModalEl(props, ref) {
|
|
967
|
-
return /* @__PURE__ */ (0,
|
|
1055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
968
1056
|
"dialog",
|
|
969
1057
|
{
|
|
970
1058
|
...props,
|
|
971
|
-
className: (0,
|
|
1059
|
+
className: (0, import_css15.cx)(props.className, (0, import_recipes13.modal)().dialog),
|
|
972
1060
|
ref
|
|
973
1061
|
}
|
|
974
1062
|
);
|
|
@@ -976,17 +1064,17 @@ function ModalEl(props, ref) {
|
|
|
976
1064
|
var Modal = (0, import_react6.forwardRef)(ModalEl);
|
|
977
1065
|
|
|
978
1066
|
// src/components/ModalHeader.tsx
|
|
979
|
-
var
|
|
980
|
-
var
|
|
981
|
-
var
|
|
1067
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
1068
|
+
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
1069
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
982
1070
|
function ModalHeader(props) {
|
|
983
|
-
return /* @__PURE__ */ (0,
|
|
1071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
984
1072
|
"div",
|
|
985
1073
|
{
|
|
986
1074
|
...props,
|
|
987
|
-
className: (0,
|
|
1075
|
+
className: (0, import_css16.cx)(
|
|
988
1076
|
props.className,
|
|
989
|
-
(0,
|
|
1077
|
+
(0, import_patterns8.vstack)({
|
|
990
1078
|
alignItems: "flex-start",
|
|
991
1079
|
gap: "4",
|
|
992
1080
|
mb: "8"
|
|
@@ -997,25 +1085,25 @@ function ModalHeader(props) {
|
|
|
997
1085
|
}
|
|
998
1086
|
|
|
999
1087
|
// src/components/ModalHeading.tsx
|
|
1000
|
-
var
|
|
1001
|
-
var
|
|
1002
|
-
var
|
|
1088
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1089
|
+
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1090
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1003
1091
|
function ModalHeading(props) {
|
|
1004
|
-
return /* @__PURE__ */ (0,
|
|
1092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { ...props, className: (0, import_css17.cx)(props.className, (0, import_recipes14.modal)().heading) });
|
|
1005
1093
|
}
|
|
1006
1094
|
|
|
1007
1095
|
// src/components/ModalDescription.tsx
|
|
1008
|
-
var
|
|
1009
|
-
var
|
|
1010
|
-
var
|
|
1096
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
1097
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1098
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1011
1099
|
function ModalDescription(props) {
|
|
1012
|
-
return /* @__PURE__ */ (0,
|
|
1100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { ...props, className: (0, import_css18.cx)(props.className, (0, import_recipes15.modal)().description) });
|
|
1013
1101
|
}
|
|
1014
1102
|
|
|
1015
1103
|
// src/components/NavMenuTrigger.tsx
|
|
1016
1104
|
var import_react8 = require("react");
|
|
1017
|
-
var
|
|
1018
|
-
var
|
|
1105
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1106
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1019
1107
|
|
|
1020
1108
|
// src/aria-helpers/nav-menu.aria.ts
|
|
1021
1109
|
function createNavTriggerProps(values) {
|
|
@@ -1026,9 +1114,9 @@ function createNavTriggerProps(values) {
|
|
|
1026
1114
|
}
|
|
1027
1115
|
|
|
1028
1116
|
// src/context/navMenu.tsx
|
|
1029
|
-
var
|
|
1117
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
1030
1118
|
var import_react7 = require("react");
|
|
1031
|
-
var
|
|
1119
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1032
1120
|
var NavMenuContext = (0, import_react7.createContext)(null);
|
|
1033
1121
|
function NavMenu(props) {
|
|
1034
1122
|
const triggerRef = (0, import_react7.useRef)(null);
|
|
@@ -1046,10 +1134,10 @@ function NavMenu(props) {
|
|
|
1046
1134
|
}),
|
|
1047
1135
|
[expanded, handleToggle]
|
|
1048
1136
|
);
|
|
1049
|
-
return /* @__PURE__ */ (0,
|
|
1137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1050
1138
|
"nav",
|
|
1051
1139
|
{
|
|
1052
|
-
className: (0,
|
|
1140
|
+
className: (0, import_css19.css)({
|
|
1053
1141
|
position: "relative"
|
|
1054
1142
|
}),
|
|
1055
1143
|
children: props.children
|
|
@@ -1065,7 +1153,7 @@ function useNavMenuContext() {
|
|
|
1065
1153
|
}
|
|
1066
1154
|
|
|
1067
1155
|
// src/components/NavMenuTrigger.tsx
|
|
1068
|
-
var
|
|
1156
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1069
1157
|
function NavMenuTrigger(props) {
|
|
1070
1158
|
const {
|
|
1071
1159
|
as,
|
|
@@ -1091,18 +1179,18 @@ function NavMenuTrigger(props) {
|
|
|
1091
1179
|
},
|
|
1092
1180
|
[onClick, onToggle]
|
|
1093
1181
|
);
|
|
1094
|
-
return /* @__PURE__ */ (0,
|
|
1182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1095
1183
|
Show,
|
|
1096
1184
|
{
|
|
1097
1185
|
when: hasAs,
|
|
1098
|
-
fallback: /* @__PURE__ */ (0,
|
|
1186
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1099
1187
|
"button",
|
|
1100
1188
|
{
|
|
1101
1189
|
...nativeProps,
|
|
1102
1190
|
...ariaProps,
|
|
1103
|
-
className: (0,
|
|
1191
|
+
className: (0, import_css20.cx)(
|
|
1104
1192
|
nativeProps.className,
|
|
1105
|
-
(0,
|
|
1193
|
+
(0, import_recipes16.button)({
|
|
1106
1194
|
palette,
|
|
1107
1195
|
usage,
|
|
1108
1196
|
shape
|
|
@@ -1113,7 +1201,7 @@ function NavMenuTrigger(props) {
|
|
|
1113
1201
|
children: props.children
|
|
1114
1202
|
}
|
|
1115
1203
|
),
|
|
1116
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1204
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1117
1205
|
AsSub,
|
|
1118
1206
|
{
|
|
1119
1207
|
...nativeProps,
|
|
@@ -1128,9 +1216,9 @@ function NavMenuTrigger(props) {
|
|
|
1128
1216
|
|
|
1129
1217
|
// src/components/NavMenuList.tsx
|
|
1130
1218
|
var import_react9 = require("react");
|
|
1131
|
-
var
|
|
1132
|
-
var
|
|
1133
|
-
var
|
|
1219
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1220
|
+
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
1221
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1134
1222
|
function getPosition(position) {
|
|
1135
1223
|
const defaultPositions = {
|
|
1136
1224
|
left: "auto",
|
|
@@ -1151,7 +1239,7 @@ function getPosition(position) {
|
|
|
1151
1239
|
return defaultPositions;
|
|
1152
1240
|
}
|
|
1153
1241
|
}
|
|
1154
|
-
var navListStyles = (0,
|
|
1242
|
+
var navListStyles = (0, import_patterns9.vstack)({
|
|
1155
1243
|
alignItems: "flex-start",
|
|
1156
1244
|
bgColor: "page.surface.100",
|
|
1157
1245
|
boxShadow: "lg",
|
|
@@ -1188,12 +1276,12 @@ function NavMenuList(props) {
|
|
|
1188
1276
|
() => getPosition(position ?? "bottom"),
|
|
1189
1277
|
[position]
|
|
1190
1278
|
);
|
|
1191
|
-
return /* @__PURE__ */ (0,
|
|
1279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1192
1280
|
"ul",
|
|
1193
1281
|
{
|
|
1194
1282
|
...nativeProps,
|
|
1195
1283
|
"data-position": position ?? "bottom",
|
|
1196
|
-
className: (0,
|
|
1284
|
+
className: (0, import_css21.cx)(nativeProps.className, navListStyles),
|
|
1197
1285
|
ref: menuRef,
|
|
1198
1286
|
style: locationStyles
|
|
1199
1287
|
}
|
|
@@ -1201,29 +1289,29 @@ function NavMenuList(props) {
|
|
|
1201
1289
|
}
|
|
1202
1290
|
|
|
1203
1291
|
// src/components/NavMenuLink.tsx
|
|
1204
|
-
var
|
|
1205
|
-
var
|
|
1292
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1293
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1206
1294
|
function NavMenuLink(props) {
|
|
1207
1295
|
const { as, ...nativeProps } = props;
|
|
1208
1296
|
const hasAs = Boolean(as);
|
|
1209
1297
|
const AsSub = as;
|
|
1210
|
-
return /* @__PURE__ */ (0,
|
|
1298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1211
1299
|
"li",
|
|
1212
1300
|
{
|
|
1213
|
-
className: (0,
|
|
1301
|
+
className: (0, import_css22.css)({
|
|
1214
1302
|
w: "full"
|
|
1215
1303
|
}),
|
|
1216
|
-
children: /* @__PURE__ */ (0,
|
|
1304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1217
1305
|
Show,
|
|
1218
1306
|
{
|
|
1219
1307
|
when: hasAs,
|
|
1220
|
-
fallback: /* @__PURE__ */ (0,
|
|
1308
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1221
1309
|
"a",
|
|
1222
1310
|
{
|
|
1223
1311
|
...nativeProps,
|
|
1224
|
-
className: (0,
|
|
1312
|
+
className: (0, import_css22.cx)(
|
|
1225
1313
|
nativeProps.className,
|
|
1226
|
-
(0,
|
|
1314
|
+
(0, import_css22.css)({
|
|
1227
1315
|
color: "action.navigation.initial",
|
|
1228
1316
|
textStyle: "link",
|
|
1229
1317
|
_hover: {
|
|
@@ -1233,7 +1321,7 @@ function NavMenuLink(props) {
|
|
|
1233
1321
|
)
|
|
1234
1322
|
}
|
|
1235
1323
|
),
|
|
1236
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1324
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AsSub, { ...nativeProps })
|
|
1237
1325
|
}
|
|
1238
1326
|
)
|
|
1239
1327
|
}
|
|
@@ -1241,9 +1329,9 @@ function NavMenuLink(props) {
|
|
|
1241
1329
|
}
|
|
1242
1330
|
|
|
1243
1331
|
// src/components/Notification.tsx
|
|
1244
|
-
var
|
|
1245
|
-
var
|
|
1246
|
-
var
|
|
1332
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1333
|
+
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
1334
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1247
1335
|
var import_react10 = require("react");
|
|
1248
1336
|
var import_icons2 = require("@cerberus/icons");
|
|
1249
1337
|
|
|
@@ -1274,25 +1362,25 @@ function trapFocus(modalRef) {
|
|
|
1274
1362
|
}
|
|
1275
1363
|
|
|
1276
1364
|
// src/components/Notification.tsx
|
|
1277
|
-
var
|
|
1365
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1278
1366
|
function MatchNotificationIcon(props) {
|
|
1279
1367
|
const palette = props.palette || "info";
|
|
1280
1368
|
const key = `${palette}Notification`;
|
|
1281
1369
|
const Icon = $cerberusIcons[key];
|
|
1282
|
-
return /* @__PURE__ */ (0,
|
|
1370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, {});
|
|
1283
1371
|
}
|
|
1284
1372
|
function Notification(props) {
|
|
1285
1373
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1286
1374
|
const ref = (0, import_react10.useRef)(null);
|
|
1287
1375
|
const onKeyDown = trapFocus(ref);
|
|
1288
|
-
const styles = (0,
|
|
1289
|
-
return /* @__PURE__ */ (0,
|
|
1376
|
+
const styles = (0, import_recipes17.notification)({ palette });
|
|
1377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1290
1378
|
"dialog",
|
|
1291
1379
|
{
|
|
1292
1380
|
...nativeProps,
|
|
1293
|
-
className: (0,
|
|
1381
|
+
className: (0, import_css23.cx)(
|
|
1294
1382
|
nativeProps.className,
|
|
1295
|
-
(0,
|
|
1383
|
+
(0, import_patterns10.hstack)({
|
|
1296
1384
|
position: "relative",
|
|
1297
1385
|
gap: "4"
|
|
1298
1386
|
}),
|
|
@@ -1301,11 +1389,11 @@ function Notification(props) {
|
|
|
1301
1389
|
onKeyDown,
|
|
1302
1390
|
ref,
|
|
1303
1391
|
children: [
|
|
1304
|
-
/* @__PURE__ */ (0,
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1392
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MatchNotificationIcon, { palette }) }),
|
|
1393
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1306
1394
|
"div",
|
|
1307
1395
|
{
|
|
1308
|
-
className: (0,
|
|
1396
|
+
className: (0, import_patterns10.vstack)({
|
|
1309
1397
|
alignItems: "flex-start",
|
|
1310
1398
|
gap: "0",
|
|
1311
1399
|
py: "2"
|
|
@@ -1313,14 +1401,14 @@ function Notification(props) {
|
|
|
1313
1401
|
children
|
|
1314
1402
|
}
|
|
1315
1403
|
),
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1317
1405
|
"button",
|
|
1318
1406
|
{
|
|
1319
1407
|
"aria-label": "Close",
|
|
1320
1408
|
className: styles.close,
|
|
1321
1409
|
onClick: onClose,
|
|
1322
1410
|
value: props.id,
|
|
1323
|
-
children: /* @__PURE__ */ (0,
|
|
1411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons2.Close, {})
|
|
1324
1412
|
}
|
|
1325
1413
|
)
|
|
1326
1414
|
]
|
|
@@ -1329,26 +1417,26 @@ function Notification(props) {
|
|
|
1329
1417
|
}
|
|
1330
1418
|
|
|
1331
1419
|
// src/components/NotificationHeading.tsx
|
|
1332
|
-
var
|
|
1333
|
-
var
|
|
1334
|
-
var
|
|
1420
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1421
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1422
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1335
1423
|
function NotificationHeading(props) {
|
|
1336
1424
|
const { palette, ...nativeProps } = props;
|
|
1337
|
-
const styles = (0,
|
|
1338
|
-
return /* @__PURE__ */ (0,
|
|
1425
|
+
const styles = (0, import_recipes18.notification)({ palette });
|
|
1426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: (0, import_css24.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
1339
1427
|
}
|
|
1340
1428
|
|
|
1341
1429
|
// src/components/NotificationDescription.tsx
|
|
1342
|
-
var
|
|
1343
|
-
var
|
|
1344
|
-
var
|
|
1430
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1431
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1432
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1345
1433
|
function NotificationDescription(props) {
|
|
1346
1434
|
const { palette, ...nativeProps } = props;
|
|
1347
|
-
const styles = (0,
|
|
1348
|
-
return /* @__PURE__ */ (0,
|
|
1435
|
+
const styles = (0, import_recipes19.notification)({ palette });
|
|
1436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1349
1437
|
"p",
|
|
1350
1438
|
{
|
|
1351
|
-
className: (0,
|
|
1439
|
+
className: (0, import_css25.cx)(nativeProps.className, styles.description),
|
|
1352
1440
|
...nativeProps
|
|
1353
1441
|
}
|
|
1354
1442
|
);
|
|
@@ -1365,22 +1453,22 @@ function Portal(props) {
|
|
|
1365
1453
|
}
|
|
1366
1454
|
|
|
1367
1455
|
// src/components/Radio.tsx
|
|
1368
|
-
var
|
|
1369
|
-
var
|
|
1370
|
-
var
|
|
1371
|
-
var
|
|
1456
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
1457
|
+
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
1458
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1459
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1372
1460
|
function Radio(props) {
|
|
1373
1461
|
const { children, size, ...nativeProps } = props;
|
|
1374
1462
|
const { invalid, ...state } = useFieldContext();
|
|
1375
|
-
const styles = (0,
|
|
1376
|
-
return /* @__PURE__ */ (0,
|
|
1377
|
-
/* @__PURE__ */ (0,
|
|
1463
|
+
const styles = (0, import_recipes20.radio)({ size });
|
|
1464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: (0, import_css26.cx)("group", (0, import_patterns11.hstack)(), styles.root), tabIndex: 0, children: [
|
|
1465
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1378
1466
|
"input",
|
|
1379
1467
|
{
|
|
1380
1468
|
...nativeProps,
|
|
1381
1469
|
...state,
|
|
1382
1470
|
...invalid && { "aria-invalid": true },
|
|
1383
|
-
className: (0,
|
|
1471
|
+
className: (0, import_css26.cx)(nativeProps.className, styles.input),
|
|
1384
1472
|
tabIndex: -1,
|
|
1385
1473
|
type: "radio"
|
|
1386
1474
|
}
|
|
@@ -1390,19 +1478,19 @@ function Radio(props) {
|
|
|
1390
1478
|
}
|
|
1391
1479
|
|
|
1392
1480
|
// src/components/Select.tsx
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1395
|
-
var
|
|
1396
|
-
var
|
|
1481
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
1482
|
+
var import_patterns12 = require("@cerberus/styled-system/patterns");
|
|
1483
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1484
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1397
1485
|
function Select(props) {
|
|
1398
1486
|
const { describedBy, size, ...nativeProps } = props;
|
|
1399
1487
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
1400
1488
|
const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons;
|
|
1401
|
-
const styles = (0,
|
|
1489
|
+
const styles = (0, import_recipes21.select)({
|
|
1402
1490
|
size
|
|
1403
1491
|
});
|
|
1404
|
-
return /* @__PURE__ */ (0,
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: styles.root, children: [
|
|
1493
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1406
1494
|
"select",
|
|
1407
1495
|
{
|
|
1408
1496
|
...nativeProps,
|
|
@@ -1412,38 +1500,38 @@ function Select(props) {
|
|
|
1412
1500
|
className: styles.input
|
|
1413
1501
|
}
|
|
1414
1502
|
),
|
|
1415
|
-
/* @__PURE__ */ (0,
|
|
1503
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1416
1504
|
"span",
|
|
1417
1505
|
{
|
|
1418
|
-
className: (0,
|
|
1506
|
+
className: (0, import_css27.cx)(
|
|
1419
1507
|
styles.iconStack,
|
|
1420
|
-
(0,
|
|
1508
|
+
(0, import_patterns12.hstack)({
|
|
1421
1509
|
gap: "2"
|
|
1422
1510
|
})
|
|
1423
1511
|
),
|
|
1424
1512
|
children: [
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1426
1514
|
"span",
|
|
1427
1515
|
{
|
|
1428
1516
|
...invalid && { "data-invalid": true },
|
|
1429
1517
|
className: styles.stateIcon,
|
|
1430
|
-
children: /* @__PURE__ */ (0,
|
|
1518
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(InvalidIcon, {})
|
|
1431
1519
|
}
|
|
1432
1520
|
) }),
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1521
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectArrow, {}) })
|
|
1434
1522
|
]
|
|
1435
1523
|
}
|
|
1436
1524
|
)
|
|
1437
1525
|
] });
|
|
1438
1526
|
}
|
|
1439
1527
|
function Option(props) {
|
|
1440
|
-
return /* @__PURE__ */ (0,
|
|
1528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("option", { ...props });
|
|
1441
1529
|
}
|
|
1442
1530
|
|
|
1443
1531
|
// src/components/Spinner.tsx
|
|
1444
|
-
var
|
|
1532
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1445
1533
|
function Spinner(props) {
|
|
1446
|
-
return /* @__PURE__ */ (0,
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1447
1535
|
"svg",
|
|
1448
1536
|
{
|
|
1449
1537
|
"aria-busy": "true",
|
|
@@ -1453,7 +1541,7 @@ function Spinner(props) {
|
|
|
1453
1541
|
width: props.size,
|
|
1454
1542
|
viewBox: "0 0 24 24",
|
|
1455
1543
|
...props,
|
|
1456
|
-
children: /* @__PURE__ */ (0,
|
|
1544
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1457
1545
|
"g",
|
|
1458
1546
|
{
|
|
1459
1547
|
fill: "none",
|
|
@@ -1462,14 +1550,14 @@ function Spinner(props) {
|
|
|
1462
1550
|
strokeLinejoin: "round",
|
|
1463
1551
|
strokeWidth: 2,
|
|
1464
1552
|
children: [
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1553
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
1466
1554
|
"path",
|
|
1467
1555
|
{
|
|
1468
1556
|
strokeDasharray: 16,
|
|
1469
1557
|
strokeDashoffset: 16,
|
|
1470
1558
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1471
1559
|
children: [
|
|
1472
|
-
/* @__PURE__ */ (0,
|
|
1560
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1473
1561
|
"animate",
|
|
1474
1562
|
{
|
|
1475
1563
|
fill: "freeze",
|
|
@@ -1478,7 +1566,7 @@ function Spinner(props) {
|
|
|
1478
1566
|
values: "16;0"
|
|
1479
1567
|
}
|
|
1480
1568
|
),
|
|
1481
|
-
/* @__PURE__ */ (0,
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1482
1570
|
"animateTransform",
|
|
1483
1571
|
{
|
|
1484
1572
|
attributeName: "transform",
|
|
@@ -1491,14 +1579,14 @@ function Spinner(props) {
|
|
|
1491
1579
|
]
|
|
1492
1580
|
}
|
|
1493
1581
|
),
|
|
1494
|
-
/* @__PURE__ */ (0,
|
|
1582
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1495
1583
|
"path",
|
|
1496
1584
|
{
|
|
1497
1585
|
strokeDasharray: 64,
|
|
1498
1586
|
strokeDashoffset: 64,
|
|
1499
1587
|
strokeOpacity: 0.3,
|
|
1500
1588
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
|
|
1501
|
-
children: /* @__PURE__ */ (0,
|
|
1589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1502
1590
|
"animate",
|
|
1503
1591
|
{
|
|
1504
1592
|
fill: "freeze",
|
|
@@ -1520,9 +1608,9 @@ function Spinner(props) {
|
|
|
1520
1608
|
var import_react13 = require("react");
|
|
1521
1609
|
|
|
1522
1610
|
// src/context/tabs.tsx
|
|
1523
|
-
var
|
|
1611
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
1524
1612
|
var import_react11 = require("react");
|
|
1525
|
-
var
|
|
1613
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1526
1614
|
var TabsContext = (0, import_react11.createContext)(null);
|
|
1527
1615
|
function Tabs(props) {
|
|
1528
1616
|
const { cache, active, id, palette } = props;
|
|
@@ -1536,7 +1624,7 @@ function Tabs(props) {
|
|
|
1536
1624
|
tabs: tabsList,
|
|
1537
1625
|
id: uuid,
|
|
1538
1626
|
active: activeTab,
|
|
1539
|
-
styles: (0,
|
|
1627
|
+
styles: (0, import_recipes22.tabs)({ palette }),
|
|
1540
1628
|
onTabUpdate: setActiveTab
|
|
1541
1629
|
}),
|
|
1542
1630
|
[activeTab, setActiveTab, palette, uuid, tabsList]
|
|
@@ -1554,7 +1642,7 @@ function Tabs(props) {
|
|
|
1554
1642
|
window.localStorage.setItem(uuid, activeTab);
|
|
1555
1643
|
}
|
|
1556
1644
|
}, [activeTab, cache]);
|
|
1557
|
-
return /* @__PURE__ */ (0,
|
|
1645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsContext.Provider, { value, children: props.children });
|
|
1558
1646
|
}
|
|
1559
1647
|
function useTabsContext() {
|
|
1560
1648
|
const context = (0, import_react11.useContext)(TabsContext);
|
|
@@ -1565,7 +1653,7 @@ function useTabsContext() {
|
|
|
1565
1653
|
}
|
|
1566
1654
|
|
|
1567
1655
|
// src/components/Tab.tsx
|
|
1568
|
-
var
|
|
1656
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
1569
1657
|
|
|
1570
1658
|
// src/aria-helpers/tabs.aria.ts
|
|
1571
1659
|
var import_react12 = require("react");
|
|
@@ -1624,7 +1712,7 @@ function useTabsKeyboardNavigation() {
|
|
|
1624
1712
|
}
|
|
1625
1713
|
|
|
1626
1714
|
// src/components/Tab.tsx
|
|
1627
|
-
var
|
|
1715
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1628
1716
|
function Tab(props) {
|
|
1629
1717
|
const { value, ...nativeProps } = props;
|
|
1630
1718
|
const { active, onTabUpdate, styles } = useTabsContext();
|
|
@@ -1636,7 +1724,7 @@ function Tab(props) {
|
|
|
1636
1724
|
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
1637
1725
|
startTransition(() => onTabUpdate(e.currentTarget.value));
|
|
1638
1726
|
}
|
|
1639
|
-
return /* @__PURE__ */ (0,
|
|
1727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1640
1728
|
"button",
|
|
1641
1729
|
{
|
|
1642
1730
|
...nativeProps,
|
|
@@ -1645,7 +1733,7 @@ function Tab(props) {
|
|
|
1645
1733
|
"aria-busy": isPending,
|
|
1646
1734
|
"aria-selected": isActive,
|
|
1647
1735
|
id: `tab:${value}`,
|
|
1648
|
-
className: (0,
|
|
1736
|
+
className: (0, import_css28.cx)(nativeProps.className, styles.tab),
|
|
1649
1737
|
onClick: handleClick,
|
|
1650
1738
|
role: "tab",
|
|
1651
1739
|
ref,
|
|
@@ -1655,20 +1743,20 @@ function Tab(props) {
|
|
|
1655
1743
|
}
|
|
1656
1744
|
|
|
1657
1745
|
// src/components/TabList.tsx
|
|
1658
|
-
var
|
|
1659
|
-
var
|
|
1660
|
-
var
|
|
1746
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
1747
|
+
var import_patterns13 = require("@cerberus/styled-system/patterns");
|
|
1748
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1661
1749
|
function TabList(props) {
|
|
1662
1750
|
const { description, ...nativeProps } = props;
|
|
1663
1751
|
const { id, styles } = useTabsContext();
|
|
1664
|
-
return /* @__PURE__ */ (0,
|
|
1752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1665
1753
|
"div",
|
|
1666
1754
|
{
|
|
1667
1755
|
...nativeProps,
|
|
1668
1756
|
"aria-label": description,
|
|
1669
|
-
className: (0,
|
|
1757
|
+
className: (0, import_css29.cx)(
|
|
1670
1758
|
nativeProps.className,
|
|
1671
|
-
(0,
|
|
1759
|
+
(0, import_patterns13.hstack)({
|
|
1672
1760
|
gap: "0"
|
|
1673
1761
|
}),
|
|
1674
1762
|
styles.tabList
|
|
@@ -1680,20 +1768,20 @@ function TabList(props) {
|
|
|
1680
1768
|
}
|
|
1681
1769
|
|
|
1682
1770
|
// src/components/TabPanel.tsx
|
|
1683
|
-
var
|
|
1771
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
1684
1772
|
var import_react14 = require("react");
|
|
1685
|
-
var
|
|
1773
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1686
1774
|
function TabPanel(props) {
|
|
1687
1775
|
const { tab, ...nativeProps } = props;
|
|
1688
1776
|
const { active, styles } = useTabsContext();
|
|
1689
1777
|
const isActive = (0, import_react14.useMemo)(() => active === tab, [active, tab]);
|
|
1690
|
-
return /* @__PURE__ */ (0,
|
|
1778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Show, { when: isActive, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1691
1779
|
"div",
|
|
1692
1780
|
{
|
|
1693
1781
|
...nativeProps,
|
|
1694
1782
|
...isActive && { tabIndex: 0 },
|
|
1695
1783
|
"aria-labelledby": `tab:${tab}`,
|
|
1696
|
-
className: (0,
|
|
1784
|
+
className: (0, import_css30.cx)(nativeProps.className, styles.tabPanel),
|
|
1697
1785
|
id: `panel:${tab}`,
|
|
1698
1786
|
role: "tabpanel"
|
|
1699
1787
|
}
|
|
@@ -1701,60 +1789,60 @@ function TabPanel(props) {
|
|
|
1701
1789
|
}
|
|
1702
1790
|
|
|
1703
1791
|
// src/components/Table.tsx
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
1706
|
-
var
|
|
1792
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
1793
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
1794
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1707
1795
|
function Table(props) {
|
|
1708
1796
|
const { caption, children, ...nativeProps } = props;
|
|
1709
|
-
const styles = (0,
|
|
1710
|
-
return /* @__PURE__ */ (0,
|
|
1797
|
+
const styles = (0, import_recipes23.table)();
|
|
1798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1711
1799
|
"table",
|
|
1712
1800
|
{
|
|
1713
1801
|
...nativeProps,
|
|
1714
|
-
className: (0,
|
|
1802
|
+
className: (0, import_css31.cx)(nativeProps.className, styles.table),
|
|
1715
1803
|
children: [
|
|
1716
|
-
/* @__PURE__ */ (0,
|
|
1804
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("caption", { className: styles.caption, children: caption }),
|
|
1717
1805
|
children
|
|
1718
1806
|
]
|
|
1719
1807
|
}
|
|
1720
1808
|
) });
|
|
1721
1809
|
}
|
|
1722
1810
|
function Tr(props) {
|
|
1723
|
-
return /* @__PURE__ */ (0,
|
|
1811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { ...props });
|
|
1724
1812
|
}
|
|
1725
1813
|
|
|
1726
1814
|
// src/components/Thead.tsx
|
|
1727
|
-
var
|
|
1728
|
-
var
|
|
1729
|
-
var
|
|
1815
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
1816
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
1817
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1730
1818
|
function Thead(props) {
|
|
1731
|
-
return /* @__PURE__ */ (0,
|
|
1819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("thead", { ...props, className: (0, import_css32.cx)(props.className, (0, import_recipes24.thead)()) });
|
|
1732
1820
|
}
|
|
1733
1821
|
|
|
1734
1822
|
// src/components/Th.tsx
|
|
1735
|
-
var
|
|
1736
|
-
var
|
|
1737
|
-
var
|
|
1823
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
1824
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
1825
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1738
1826
|
function Th(props) {
|
|
1739
1827
|
const { size, onClick, ...nativeProps } = props;
|
|
1740
|
-
return /* @__PURE__ */ (0,
|
|
1828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1741
1829
|
Show,
|
|
1742
1830
|
{
|
|
1743
1831
|
when: Boolean(onClick),
|
|
1744
|
-
fallback: /* @__PURE__ */ (0,
|
|
1832
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1745
1833
|
"th",
|
|
1746
1834
|
{
|
|
1747
1835
|
...nativeProps,
|
|
1748
|
-
className: (0,
|
|
1836
|
+
className: (0, import_css33.cx)(nativeProps.className, (0, import_recipes25.th)({ size }))
|
|
1749
1837
|
}
|
|
1750
1838
|
),
|
|
1751
|
-
children: /* @__PURE__ */ (0,
|
|
1839
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1752
1840
|
"button",
|
|
1753
1841
|
{
|
|
1754
|
-
className: (0,
|
|
1842
|
+
className: (0, import_css33.cx)(
|
|
1755
1843
|
nativeProps.className,
|
|
1756
|
-
(0,
|
|
1757
|
-
(0,
|
|
1844
|
+
(0, import_recipes25.th)({ size }),
|
|
1845
|
+
(0, import_css33.css)({
|
|
1758
1846
|
alignItems: "center",
|
|
1759
1847
|
display: "inline-flex",
|
|
1760
1848
|
justifyContent: "space-between",
|
|
@@ -1771,18 +1859,18 @@ function Th(props) {
|
|
|
1771
1859
|
}
|
|
1772
1860
|
|
|
1773
1861
|
// src/components/Td.tsx
|
|
1774
|
-
var
|
|
1775
|
-
var
|
|
1776
|
-
var
|
|
1862
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
1863
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
1864
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1777
1865
|
function Td(props) {
|
|
1778
1866
|
const { size, ...nativeProps } = props;
|
|
1779
|
-
return /* @__PURE__ */ (0,
|
|
1867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1780
1868
|
"td",
|
|
1781
1869
|
{
|
|
1782
1870
|
...nativeProps,
|
|
1783
|
-
className: (0,
|
|
1871
|
+
className: (0, import_css34.cx)(
|
|
1784
1872
|
nativeProps.className,
|
|
1785
|
-
(0,
|
|
1873
|
+
(0, import_recipes26.td)({
|
|
1786
1874
|
size
|
|
1787
1875
|
})
|
|
1788
1876
|
)
|
|
@@ -1791,18 +1879,18 @@ function Td(props) {
|
|
|
1791
1879
|
}
|
|
1792
1880
|
|
|
1793
1881
|
// src/components/Tbody.tsx
|
|
1794
|
-
var
|
|
1795
|
-
var
|
|
1796
|
-
var
|
|
1882
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
1883
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
1884
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
1797
1885
|
function Tbody(props) {
|
|
1798
1886
|
const { decoration, ...nativeProps } = props;
|
|
1799
|
-
return /* @__PURE__ */ (0,
|
|
1887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
1800
1888
|
"tbody",
|
|
1801
1889
|
{
|
|
1802
1890
|
...nativeProps,
|
|
1803
|
-
className: (0,
|
|
1891
|
+
className: (0, import_css35.cx)(
|
|
1804
1892
|
nativeProps.className,
|
|
1805
|
-
(0,
|
|
1893
|
+
(0, import_recipes27.tbody)({
|
|
1806
1894
|
decoration
|
|
1807
1895
|
})
|
|
1808
1896
|
)
|
|
@@ -1811,9 +1899,9 @@ function Tbody(props) {
|
|
|
1811
1899
|
}
|
|
1812
1900
|
|
|
1813
1901
|
// src/components/Tag.tsx
|
|
1814
|
-
var
|
|
1815
|
-
var
|
|
1816
|
-
var
|
|
1902
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
1903
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
1904
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1817
1905
|
function Tag(props) {
|
|
1818
1906
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
1819
1907
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -1821,13 +1909,13 @@ function Tag(props) {
|
|
|
1821
1909
|
const shape = isClosable ? "pill" : initShape;
|
|
1822
1910
|
const closableStyles = isClosable ? closableCss : "";
|
|
1823
1911
|
const { close: Close2 } = $cerberusIcons;
|
|
1824
|
-
return /* @__PURE__ */ (0,
|
|
1912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
1825
1913
|
"span",
|
|
1826
1914
|
{
|
|
1827
1915
|
...nativeProps,
|
|
1828
|
-
className: (0,
|
|
1916
|
+
className: (0, import_css36.cx)(
|
|
1829
1917
|
nativeProps.className,
|
|
1830
|
-
(0,
|
|
1918
|
+
(0, import_recipes28.tag)({
|
|
1831
1919
|
gradient,
|
|
1832
1920
|
palette,
|
|
1833
1921
|
shape,
|
|
@@ -1837,47 +1925,47 @@ function Tag(props) {
|
|
|
1837
1925
|
),
|
|
1838
1926
|
children: [
|
|
1839
1927
|
props.children,
|
|
1840
|
-
/* @__PURE__ */ (0,
|
|
1928
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1841
1929
|
"button",
|
|
1842
1930
|
{
|
|
1843
1931
|
"aria-label": "Close",
|
|
1844
|
-
className: (0,
|
|
1932
|
+
className: (0, import_recipes28.iconButton)({
|
|
1845
1933
|
palette: "action",
|
|
1846
1934
|
usage: "filled",
|
|
1847
1935
|
size: "sm"
|
|
1848
1936
|
}),
|
|
1849
1937
|
onClick,
|
|
1850
|
-
children: /* @__PURE__ */ (0,
|
|
1938
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Close2, {})
|
|
1851
1939
|
}
|
|
1852
1940
|
) })
|
|
1853
1941
|
]
|
|
1854
1942
|
}
|
|
1855
1943
|
);
|
|
1856
1944
|
}
|
|
1857
|
-
var closableCss = (0,
|
|
1945
|
+
var closableCss = (0, import_css36.css)({
|
|
1858
1946
|
bgColor: "action.bg.active",
|
|
1859
1947
|
color: "action.text.initial",
|
|
1860
1948
|
paddingInlineEnd: "0"
|
|
1861
1949
|
});
|
|
1862
1950
|
|
|
1863
1951
|
// src/components/Textarea.tsx
|
|
1864
|
-
var
|
|
1865
|
-
var
|
|
1866
|
-
var
|
|
1952
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
1953
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
1954
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1867
1955
|
function Textarea(props) {
|
|
1868
1956
|
const { describedBy, ...nativeProps } = props;
|
|
1869
1957
|
const { invalid, ...fieldState } = useFieldContext();
|
|
1870
|
-
return /* @__PURE__ */ (0,
|
|
1958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1871
1959
|
"textarea",
|
|
1872
1960
|
{
|
|
1873
1961
|
...nativeProps,
|
|
1874
1962
|
...fieldState,
|
|
1875
1963
|
...describedBy && { "aria-describedby": describedBy },
|
|
1876
1964
|
...invalid && { "aria-invalid": true },
|
|
1877
|
-
className: (0,
|
|
1965
|
+
className: (0, import_css37.cx)(
|
|
1878
1966
|
props.className,
|
|
1879
|
-
(0,
|
|
1880
|
-
(0,
|
|
1967
|
+
(0, import_recipes29.input)().input,
|
|
1968
|
+
(0, import_css37.css)({
|
|
1881
1969
|
pxi: "2",
|
|
1882
1970
|
py: "2",
|
|
1883
1971
|
resize: "vertical"
|
|
@@ -1889,43 +1977,43 @@ function Textarea(props) {
|
|
|
1889
1977
|
}
|
|
1890
1978
|
|
|
1891
1979
|
// src/components/Toggle.tsx
|
|
1892
|
-
var
|
|
1893
|
-
var
|
|
1894
|
-
var
|
|
1895
|
-
var
|
|
1980
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
1981
|
+
var import_patterns14 = require("@cerberus/styled-system/patterns");
|
|
1982
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
1983
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1896
1984
|
function Toggle(props) {
|
|
1897
1985
|
const { size, describedBy, ...nativeProps } = props;
|
|
1898
|
-
const styles = (0,
|
|
1986
|
+
const styles = (0, import_recipes30.toggle)({ size });
|
|
1899
1987
|
const { invalid, ...state } = useFieldContext();
|
|
1900
1988
|
const Icon = $cerberusIcons.toggleChecked;
|
|
1901
|
-
return /* @__PURE__ */ (0,
|
|
1989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
1902
1990
|
"span",
|
|
1903
1991
|
{
|
|
1904
|
-
className: (0,
|
|
1992
|
+
className: (0, import_css38.cx)("group", styles.track, (0, import_patterns14.hstack)()),
|
|
1905
1993
|
"data-checked": props.checked || props.defaultChecked,
|
|
1906
1994
|
children: [
|
|
1907
|
-
/* @__PURE__ */ (0,
|
|
1995
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1908
1996
|
"input",
|
|
1909
1997
|
{
|
|
1910
1998
|
...nativeProps,
|
|
1911
1999
|
...state,
|
|
1912
2000
|
...describedBy && { "aria-describedby": describedBy },
|
|
1913
2001
|
...invalid && { "aria-invalid": true },
|
|
1914
|
-
className: (0,
|
|
2002
|
+
className: (0, import_css38.cx)("peer", styles.input),
|
|
1915
2003
|
role: "switch",
|
|
1916
2004
|
type: "checkbox"
|
|
1917
2005
|
}
|
|
1918
2006
|
),
|
|
1919
|
-
/* @__PURE__ */ (0,
|
|
2007
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1920
2008
|
"span",
|
|
1921
2009
|
{
|
|
1922
|
-
className: (0,
|
|
2010
|
+
className: (0, import_css38.cx)(
|
|
1923
2011
|
styles.thumb,
|
|
1924
|
-
(0,
|
|
2012
|
+
(0, import_patterns14.vstack)({
|
|
1925
2013
|
justify: "center"
|
|
1926
2014
|
})
|
|
1927
2015
|
),
|
|
1928
|
-
children: /* @__PURE__ */ (0,
|
|
2016
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Icon, {})
|
|
1929
2017
|
}
|
|
1930
2018
|
)
|
|
1931
2019
|
]
|
|
@@ -1935,8 +2023,8 @@ function Toggle(props) {
|
|
|
1935
2023
|
|
|
1936
2024
|
// src/context/confirm-modal.tsx
|
|
1937
2025
|
var import_react16 = require("react");
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
2026
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
2027
|
+
var import_patterns15 = require("@cerberus/styled-system/patterns");
|
|
1940
2028
|
|
|
1941
2029
|
// src/hooks/useModal.ts
|
|
1942
2030
|
var import_react15 = require("react");
|
|
@@ -1960,7 +2048,7 @@ function useModal() {
|
|
|
1960
2048
|
}
|
|
1961
2049
|
|
|
1962
2050
|
// src/context/confirm-modal.tsx
|
|
1963
|
-
var
|
|
2051
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1964
2052
|
var ConfirmModalContext = (0, import_react16.createContext)(null);
|
|
1965
2053
|
function ConfirmModal(props) {
|
|
1966
2054
|
const { modalRef, show, close } = useModal();
|
|
@@ -2000,36 +2088,36 @@ function ConfirmModal(props) {
|
|
|
2000
2088
|
}),
|
|
2001
2089
|
[handleShow]
|
|
2002
2090
|
);
|
|
2003
|
-
return /* @__PURE__ */ (0,
|
|
2091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2004
2092
|
props.children,
|
|
2005
|
-
/* @__PURE__ */ (0,
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(ModalHeader, { children: [
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2008
2096
|
"div",
|
|
2009
2097
|
{
|
|
2010
|
-
className: (0,
|
|
2098
|
+
className: (0, import_patterns15.hstack)({
|
|
2011
2099
|
justify: "center",
|
|
2012
2100
|
w: "full"
|
|
2013
2101
|
}),
|
|
2014
|
-
children: /* @__PURE__ */ (0,
|
|
2102
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2015
2103
|
Show,
|
|
2016
2104
|
{
|
|
2017
2105
|
when: palette === "danger",
|
|
2018
|
-
fallback: /* @__PURE__ */ (0,
|
|
2106
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2019
2107
|
Avatar,
|
|
2020
2108
|
{
|
|
2021
2109
|
ariaLabel: "",
|
|
2022
2110
|
gradient: "charon-light",
|
|
2023
|
-
icon: /* @__PURE__ */ (0,
|
|
2111
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ConfirmIcon, { size: 24 }),
|
|
2024
2112
|
src: ""
|
|
2025
2113
|
}
|
|
2026
2114
|
),
|
|
2027
|
-
children: /* @__PURE__ */ (0,
|
|
2115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2028
2116
|
Avatar,
|
|
2029
2117
|
{
|
|
2030
2118
|
ariaLabel: "",
|
|
2031
2119
|
gradient: "hades-dark",
|
|
2032
|
-
icon: /* @__PURE__ */ (0,
|
|
2120
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ConfirmIcon, { size: 24 }),
|
|
2033
2121
|
src: ""
|
|
2034
2122
|
}
|
|
2035
2123
|
)
|
|
@@ -2037,21 +2125,21 @@ function ConfirmModal(props) {
|
|
|
2037
2125
|
)
|
|
2038
2126
|
}
|
|
2039
2127
|
),
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2041
|
-
/* @__PURE__ */ (0,
|
|
2128
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2042
2130
|
] }),
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2044
2132
|
"div",
|
|
2045
2133
|
{
|
|
2046
|
-
className: (0,
|
|
2134
|
+
className: (0, import_patterns15.hstack)({
|
|
2047
2135
|
gap: "4"
|
|
2048
2136
|
}),
|
|
2049
2137
|
children: [
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2138
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2051
2139
|
Button,
|
|
2052
2140
|
{
|
|
2053
2141
|
autoFocus: true,
|
|
2054
|
-
className: (0,
|
|
2142
|
+
className: (0, import_css39.css)({
|
|
2055
2143
|
w: "1/2"
|
|
2056
2144
|
}),
|
|
2057
2145
|
name: "confirm",
|
|
@@ -2061,10 +2149,10 @@ function ConfirmModal(props) {
|
|
|
2061
2149
|
children: content == null ? void 0 : content.actionText
|
|
2062
2150
|
}
|
|
2063
2151
|
),
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2152
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2065
2153
|
Button,
|
|
2066
2154
|
{
|
|
2067
|
-
className: (0,
|
|
2155
|
+
className: (0, import_css39.css)({
|
|
2068
2156
|
w: "1/2"
|
|
2069
2157
|
}),
|
|
2070
2158
|
name: "cancel",
|
|
@@ -2092,14 +2180,14 @@ function useConfirmModal() {
|
|
|
2092
2180
|
|
|
2093
2181
|
// src/context/notification-center.tsx
|
|
2094
2182
|
var import_react17 = require("react");
|
|
2095
|
-
var
|
|
2096
|
-
var
|
|
2097
|
-
var
|
|
2098
|
-
var
|
|
2183
|
+
var import_patterns16 = require("@cerberus/styled-system/patterns");
|
|
2184
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2185
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
2186
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2099
2187
|
var NotificationsContext = (0, import_react17.createContext)(null);
|
|
2100
2188
|
function NotificationCenter(props) {
|
|
2101
2189
|
const [activeNotifications, setActiveNotifications] = (0, import_react17.useState)([]);
|
|
2102
|
-
const styles = (0,
|
|
2190
|
+
const styles = (0, import_recipes31.notification)();
|
|
2103
2191
|
const handleNotify = (0, import_react17.useCallback)((options) => {
|
|
2104
2192
|
setActiveNotifications((prev) => {
|
|
2105
2193
|
const id = `${options.palette}:${prev.length + 1}`;
|
|
@@ -2128,13 +2216,13 @@ function NotificationCenter(props) {
|
|
|
2128
2216
|
}),
|
|
2129
2217
|
[handleNotify]
|
|
2130
2218
|
);
|
|
2131
|
-
return /* @__PURE__ */ (0,
|
|
2219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2132
2220
|
props.children,
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2134
|
-
/* @__PURE__ */ (0,
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: styles.center, children: [
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2135
2223
|
Button,
|
|
2136
2224
|
{
|
|
2137
|
-
className: (0,
|
|
2225
|
+
className: (0, import_css40.cx)(styles.closeAll, (0, import_patterns16.animateIn)()),
|
|
2138
2226
|
onClick: handleCloseAll,
|
|
2139
2227
|
palette: "action",
|
|
2140
2228
|
shape: "rounded",
|
|
@@ -2143,17 +2231,17 @@ function NotificationCenter(props) {
|
|
|
2143
2231
|
children: "Close all"
|
|
2144
2232
|
}
|
|
2145
2233
|
) }),
|
|
2146
|
-
/* @__PURE__ */ (0,
|
|
2234
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2147
2235
|
"div",
|
|
2148
2236
|
{
|
|
2149
|
-
className: (0,
|
|
2237
|
+
className: (0, import_patterns16.vstack)({
|
|
2150
2238
|
alignItems: "flex-end",
|
|
2151
2239
|
gap: "4"
|
|
2152
2240
|
}),
|
|
2153
2241
|
style: {
|
|
2154
2242
|
alignItems: "flex-end"
|
|
2155
2243
|
},
|
|
2156
|
-
children: activeNotifications.map((option) => /* @__PURE__ */ (0,
|
|
2244
|
+
children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2157
2245
|
MatchNotification,
|
|
2158
2246
|
{
|
|
2159
2247
|
...option,
|
|
@@ -2170,7 +2258,7 @@ function MatchNotification(props) {
|
|
|
2170
2258
|
const { palette, id, onClose, heading, description } = props;
|
|
2171
2259
|
switch (palette) {
|
|
2172
2260
|
case "success":
|
|
2173
|
-
return /* @__PURE__ */ (0,
|
|
2261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2174
2262
|
Notification,
|
|
2175
2263
|
{
|
|
2176
2264
|
id,
|
|
@@ -2178,14 +2266,14 @@ function MatchNotification(props) {
|
|
|
2178
2266
|
open: true,
|
|
2179
2267
|
palette: "success",
|
|
2180
2268
|
children: [
|
|
2181
|
-
/* @__PURE__ */ (0,
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2269
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
2270
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2183
2271
|
]
|
|
2184
2272
|
},
|
|
2185
2273
|
id
|
|
2186
2274
|
);
|
|
2187
2275
|
case "warning":
|
|
2188
|
-
return /* @__PURE__ */ (0,
|
|
2276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
2189
2277
|
Notification,
|
|
2190
2278
|
{
|
|
2191
2279
|
id,
|
|
@@ -2193,22 +2281,22 @@ function MatchNotification(props) {
|
|
|
2193
2281
|
open: true,
|
|
2194
2282
|
palette: "warning",
|
|
2195
2283
|
children: [
|
|
2196
|
-
/* @__PURE__ */ (0,
|
|
2197
|
-
/* @__PURE__ */ (0,
|
|
2284
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2198
2286
|
]
|
|
2199
2287
|
},
|
|
2200
2288
|
id
|
|
2201
2289
|
);
|
|
2202
2290
|
case "danger":
|
|
2203
|
-
return /* @__PURE__ */ (0,
|
|
2204
|
-
/* @__PURE__ */ (0,
|
|
2205
|
-
/* @__PURE__ */ (0,
|
|
2291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
2293
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2206
2294
|
] }, id);
|
|
2207
2295
|
case "info":
|
|
2208
2296
|
default:
|
|
2209
|
-
return /* @__PURE__ */ (0,
|
|
2210
|
-
/* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
2299
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2212
2300
|
] }, id);
|
|
2213
2301
|
}
|
|
2214
2302
|
}
|
|
@@ -2224,9 +2312,9 @@ function useNotificationCenter() {
|
|
|
2224
2312
|
|
|
2225
2313
|
// src/context/prompt-modal.tsx
|
|
2226
2314
|
var import_react18 = require("react");
|
|
2227
|
-
var
|
|
2228
|
-
var
|
|
2229
|
-
var
|
|
2315
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
2316
|
+
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2317
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2230
2318
|
var PromptModalContext = (0, import_react18.createContext)(null);
|
|
2231
2319
|
function PromptModal(props) {
|
|
2232
2320
|
const { modalRef, show, close } = useModal();
|
|
@@ -2276,36 +2364,36 @@ function PromptModal(props) {
|
|
|
2276
2364
|
}),
|
|
2277
2365
|
[handleShow]
|
|
2278
2366
|
);
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
2280
2368
|
props.children,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2282
|
-
/* @__PURE__ */ (0,
|
|
2283
|
-
/* @__PURE__ */ (0,
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2370
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ModalHeader, { children: [
|
|
2371
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2284
2372
|
"div",
|
|
2285
2373
|
{
|
|
2286
|
-
className: (0,
|
|
2374
|
+
className: (0, import_patterns17.hstack)({
|
|
2287
2375
|
justify: "center",
|
|
2288
2376
|
w: "full"
|
|
2289
2377
|
}),
|
|
2290
|
-
children: /* @__PURE__ */ (0,
|
|
2378
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2291
2379
|
Show,
|
|
2292
2380
|
{
|
|
2293
2381
|
when: palette === "danger",
|
|
2294
|
-
fallback: /* @__PURE__ */ (0,
|
|
2382
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2295
2383
|
Avatar,
|
|
2296
2384
|
{
|
|
2297
2385
|
ariaLabel: "",
|
|
2298
2386
|
gradient: "charon-light",
|
|
2299
|
-
icon: /* @__PURE__ */ (0,
|
|
2387
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PromptIcon, { size: 24 }),
|
|
2300
2388
|
src: ""
|
|
2301
2389
|
}
|
|
2302
2390
|
),
|
|
2303
|
-
children: /* @__PURE__ */ (0,
|
|
2391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2304
2392
|
Avatar,
|
|
2305
2393
|
{
|
|
2306
2394
|
ariaLabel: "",
|
|
2307
2395
|
gradient: "hades-dark",
|
|
2308
|
-
icon: /* @__PURE__ */ (0,
|
|
2396
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PromptIcon, { size: 24 }),
|
|
2309
2397
|
src: ""
|
|
2310
2398
|
}
|
|
2311
2399
|
)
|
|
@@ -2313,24 +2401,24 @@ function PromptModal(props) {
|
|
|
2313
2401
|
)
|
|
2314
2402
|
}
|
|
2315
2403
|
),
|
|
2316
|
-
/* @__PURE__ */ (0,
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2404
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2318
2406
|
] }),
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2407
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2320
2408
|
"div",
|
|
2321
2409
|
{
|
|
2322
|
-
className: (0,
|
|
2410
|
+
className: (0, import_patterns17.vstack)({
|
|
2323
2411
|
alignItems: "flex-start",
|
|
2324
2412
|
mt: "4",
|
|
2325
2413
|
mb: "8"
|
|
2326
2414
|
}),
|
|
2327
|
-
children: /* @__PURE__ */ (0,
|
|
2328
|
-
/* @__PURE__ */ (0,
|
|
2415
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Field, { invalid: !isValid, children: [
|
|
2416
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Label, { htmlFor: "confirm", size: "md", children: [
|
|
2329
2417
|
"Type",
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2331
2419
|
"strong",
|
|
2332
2420
|
{
|
|
2333
|
-
className: (0,
|
|
2421
|
+
className: (0, import_css41.css)({
|
|
2334
2422
|
textTransform: "uppercase"
|
|
2335
2423
|
}),
|
|
2336
2424
|
children: content == null ? void 0 : content.key
|
|
@@ -2338,7 +2426,7 @@ function PromptModal(props) {
|
|
|
2338
2426
|
),
|
|
2339
2427
|
"to confirm"
|
|
2340
2428
|
] }),
|
|
2341
|
-
/* @__PURE__ */ (0,
|
|
2429
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2342
2430
|
Input,
|
|
2343
2431
|
{
|
|
2344
2432
|
id: "confirm",
|
|
@@ -2350,19 +2438,19 @@ function PromptModal(props) {
|
|
|
2350
2438
|
] })
|
|
2351
2439
|
}
|
|
2352
2440
|
),
|
|
2353
|
-
/* @__PURE__ */ (0,
|
|
2441
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
2354
2442
|
"div",
|
|
2355
2443
|
{
|
|
2356
|
-
className: (0,
|
|
2444
|
+
className: (0, import_patterns17.hstack)({
|
|
2357
2445
|
justifyContent: "stretch",
|
|
2358
2446
|
gap: "4"
|
|
2359
2447
|
}),
|
|
2360
2448
|
children: [
|
|
2361
|
-
/* @__PURE__ */ (0,
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2362
2450
|
Button,
|
|
2363
2451
|
{
|
|
2364
2452
|
autoFocus: true,
|
|
2365
|
-
className: (0,
|
|
2453
|
+
className: (0, import_css41.css)({
|
|
2366
2454
|
w: "1/2"
|
|
2367
2455
|
}),
|
|
2368
2456
|
disabled: !isValid,
|
|
@@ -2373,10 +2461,10 @@ function PromptModal(props) {
|
|
|
2373
2461
|
children: content == null ? void 0 : content.actionText
|
|
2374
2462
|
}
|
|
2375
2463
|
),
|
|
2376
|
-
/* @__PURE__ */ (0,
|
|
2464
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2377
2465
|
Button,
|
|
2378
2466
|
{
|
|
2379
|
-
className: (0,
|
|
2467
|
+
className: (0, import_css41.css)({
|
|
2380
2468
|
w: "1/2"
|
|
2381
2469
|
}),
|
|
2382
2470
|
name: "cancel",
|
|
@@ -2467,7 +2555,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
2467
2555
|
}
|
|
2468
2556
|
|
|
2469
2557
|
// src/context/theme.tsx
|
|
2470
|
-
var
|
|
2558
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2471
2559
|
var ThemeContext = (0, import_react20.createContext)(
|
|
2472
2560
|
null
|
|
2473
2561
|
);
|
|
@@ -2477,7 +2565,7 @@ function ThemeProvider(props) {
|
|
|
2477
2565
|
updateMode: props.updateMode,
|
|
2478
2566
|
updateTheme: props.updateTheme
|
|
2479
2567
|
});
|
|
2480
|
-
return /* @__PURE__ */ (0,
|
|
2568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
2481
2569
|
}
|
|
2482
2570
|
function useThemeContext() {
|
|
2483
2571
|
const context = (0, import_react20.useContext)(ThemeContext);
|
|
@@ -2520,11 +2608,14 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
2520
2608
|
FeatureFlags,
|
|
2521
2609
|
Field,
|
|
2522
2610
|
FieldMessage,
|
|
2611
|
+
Fieldset,
|
|
2612
|
+
FieldsetLabel,
|
|
2523
2613
|
FileStatus,
|
|
2524
2614
|
FileUploader,
|
|
2525
2615
|
IconButton,
|
|
2526
2616
|
Input,
|
|
2527
2617
|
Label,
|
|
2618
|
+
Legend,
|
|
2528
2619
|
MODE_KEY,
|
|
2529
2620
|
Modal,
|
|
2530
2621
|
ModalDescription,
|