@cerberus-design/react 0.14.2-next-58af9c8 → 0.14.2-next-9116729
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 +186 -45
- package/build/legacy/components/DatePicker.client.cjs +12 -6
- package/build/legacy/components/DatePicker.client.cjs.map +1 -1
- package/build/legacy/components/Dialog.cjs +86 -0
- package/build/legacy/components/Dialog.cjs.map +1 -0
- package/build/legacy/components/Dialog.client.cjs +95 -0
- package/build/legacy/components/Dialog.client.cjs.map +1 -0
- package/build/legacy/components/Modal.cjs.map +1 -1
- package/build/legacy/components/ModalDescription.cjs.map +1 -1
- package/build/legacy/components/ModalHeader.cjs.map +1 -1
- package/build/legacy/components/ModalHeading.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +2 -2
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/index.cjs +608 -517
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +186 -45
- package/build/modern/chunk-6BN3XKQF.js +42 -0
- package/build/modern/chunk-6BN3XKQF.js.map +1 -0
- package/build/modern/{chunk-2UXE5PDG.js → chunk-7NN3SJ7W.js} +1 -1
- package/build/modern/chunk-7NN3SJ7W.js.map +1 -0
- package/build/modern/{chunk-YLMGZAKU.js → chunk-JAROS4Q3.js} +6 -6
- package/build/modern/chunk-JAROS4Q3.js.map +1 -0
- package/build/modern/{chunk-BE4EOU2P.js → chunk-JIRW4XOJ.js} +1 -1
- package/build/modern/chunk-JIRW4XOJ.js.map +1 -0
- package/build/modern/{chunk-YJI4Y7BH.js → chunk-MUTAYS3P.js} +5 -5
- package/build/modern/{chunk-XY6WL55R.js → chunk-NUMM4TNC.js} +1 -1
- package/build/modern/chunk-NUMM4TNC.js.map +1 -0
- package/build/modern/{chunk-USYM6XU6.js → chunk-O6LFWUHI.js} +4 -4
- package/build/modern/{chunk-XDDLXEFV.js → chunk-R4RFWDBM.js} +8 -8
- package/build/modern/chunk-TFL56AYR.js +56 -0
- package/build/modern/chunk-TFL56AYR.js.map +1 -0
- package/build/modern/{chunk-ZHBHPMTP.js → chunk-VGEK2DQB.js} +8 -8
- package/build/modern/{chunk-D252JE4V.js → chunk-YKKNWILF.js} +20 -14
- package/build/modern/chunk-YKKNWILF.js.map +1 -0
- package/build/modern/{chunk-Q7BRMIBR.js → chunk-ZL6ZITLA.js} +1 -1
- package/build/modern/chunk-ZL6ZITLA.js.map +1 -0
- package/build/modern/components/DatePicker.client.js +4 -4
- package/build/modern/components/Dialog.client.js +10 -0
- package/build/modern/components/Dialog.client.js.map +1 -0
- package/build/modern/components/Dialog.js +24 -0
- package/build/modern/components/Dialog.js.map +1 -0
- package/build/modern/components/FileStatus.js +2 -2
- package/build/modern/components/Modal.js +1 -1
- package/build/modern/components/ModalDescription.js +1 -1
- package/build/modern/components/ModalHeader.js +1 -1
- package/build/modern/components/ModalHeading.js +1 -1
- package/build/modern/context/confirm-modal.js +5 -5
- package/build/modern/context/cta-modal.js +6 -6
- package/build/modern/context/notification-center.js +2 -2
- package/build/modern/context/prompt-modal.js +6 -6
- package/build/modern/index.js +78 -54
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/DatePicker.client.tsx +32 -8
- package/src/components/Dialog.client.tsx +39 -0
- package/src/components/Dialog.tsx +165 -0
- package/src/components/Modal.tsx +1 -16
- package/src/components/ModalDescription.tsx +1 -8
- package/src/components/ModalHeader.tsx +1 -10
- package/src/components/ModalHeading.tsx +1 -8
- package/src/context/notification-center.tsx +2 -2
- package/src/index.ts +2 -0
- package/build/modern/chunk-2UXE5PDG.js.map +0 -1
- package/build/modern/chunk-BE4EOU2P.js.map +0 -1
- package/build/modern/chunk-D252JE4V.js.map +0 -1
- package/build/modern/chunk-Q7BRMIBR.js.map +0 -1
- package/build/modern/chunk-XY6WL55R.js.map +0 -1
- package/build/modern/chunk-YLMGZAKU.js.map +0 -1
- /package/build/modern/{chunk-YJI4Y7BH.js.map → chunk-MUTAYS3P.js.map} +0 -0
- /package/build/modern/{chunk-USYM6XU6.js.map → chunk-O6LFWUHI.js.map} +0 -0
- /package/build/modern/{chunk-XDDLXEFV.js.map → chunk-R4RFWDBM.js.map} +0 -0
- /package/build/modern/{chunk-ZHBHPMTP.js.map → chunk-VGEK2DQB.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -55,6 +55,16 @@ __export(src_exports, {
|
|
|
55
55
|
DatePickerViewControl: () => DatePickerViewControl,
|
|
56
56
|
DatePickerViewControlGroup: () => DatePickerViewControlGroup,
|
|
57
57
|
DatePickerYearView: () => DatePickerYearView,
|
|
58
|
+
Dialog: () => Dialog,
|
|
59
|
+
DialogBackdrop: () => DialogBackdrop,
|
|
60
|
+
DialogCloseIconTrigger: () => DialogCloseIconTrigger,
|
|
61
|
+
DialogCloseTrigger: () => DialogCloseTrigger,
|
|
62
|
+
DialogContent: () => DialogContent,
|
|
63
|
+
DialogDescription: () => DialogDescription,
|
|
64
|
+
DialogHeading: () => DialogHeading,
|
|
65
|
+
DialogPositioner: () => DialogPositioner,
|
|
66
|
+
DialogProvider: () => DialogProvider,
|
|
67
|
+
DialogTrigger: () => DialogTrigger,
|
|
58
68
|
Droppable: () => Droppable,
|
|
59
69
|
FeatureFlag: () => FeatureFlag,
|
|
60
70
|
FeatureFlags: () => FeatureFlags,
|
|
@@ -834,6 +844,7 @@ function IconButton(props) {
|
|
|
834
844
|
}
|
|
835
845
|
|
|
836
846
|
// src/components/DatePicker.client.tsx
|
|
847
|
+
var import_react9 = require("react");
|
|
837
848
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
838
849
|
var datePickerStyles2 = (0, import_recipes9.datePicker)();
|
|
839
850
|
function DatePicker(props) {
|
|
@@ -908,15 +919,19 @@ function DatePickerInput(props) {
|
|
|
908
919
|
}
|
|
909
920
|
function RangePickerInput(props) {
|
|
910
921
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
922
|
+
const { defaultValue, ...nativeProps } = props;
|
|
923
|
+
const startDate = (0, import_react9.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
|
|
924
|
+
const endDate = (0, import_react9.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
|
|
911
925
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react8.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
912
926
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerTrigger, {}),
|
|
913
927
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
914
928
|
import_react8.DatePicker.Input,
|
|
915
929
|
{
|
|
916
|
-
...
|
|
930
|
+
...nativeProps,
|
|
917
931
|
...fieldStates,
|
|
918
932
|
...invalid && { "aria-invalid": true },
|
|
919
933
|
"data-range-input": true,
|
|
934
|
+
defaultValue: startDate,
|
|
920
935
|
className: (0, import_css11.cx)(props.className, datePickerStyles2.input),
|
|
921
936
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
922
937
|
maxLength: 11,
|
|
@@ -926,10 +941,11 @@ function RangePickerInput(props) {
|
|
|
926
941
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
927
942
|
import_react8.DatePicker.Input,
|
|
928
943
|
{
|
|
929
|
-
...
|
|
944
|
+
...nativeProps,
|
|
930
945
|
...fieldStates,
|
|
931
946
|
...invalid && { "aria-invalid": true },
|
|
932
947
|
"data-range-input": true,
|
|
948
|
+
defaultValue: endDate,
|
|
933
949
|
"data-range-end-input": true,
|
|
934
950
|
className: (0, import_css11.cx)(props.className, datePickerStyles2.input),
|
|
935
951
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
@@ -940,8 +956,8 @@ function RangePickerInput(props) {
|
|
|
940
956
|
] });
|
|
941
957
|
}
|
|
942
958
|
function DatePickerContent(props) {
|
|
943
|
-
const { children, ...contentProps } = props;
|
|
944
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react8.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
959
|
+
const { children, withModal, ...contentProps } = props;
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react8.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
945
961
|
import_react8.DatePicker.Content,
|
|
946
962
|
{
|
|
947
963
|
...contentProps,
|
|
@@ -993,28 +1009,93 @@ function DatePickerYearView(props) {
|
|
|
993
1009
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react8.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react8.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
994
1010
|
] }) }) });
|
|
995
1011
|
}
|
|
996
|
-
function DatePickerCalendar() {
|
|
997
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DatePickerContent, { children: [
|
|
1012
|
+
function DatePickerCalendar(props) {
|
|
1013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DatePickerContent, { withModal: props.withModal, children: [
|
|
998
1014
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerDayView, {}),
|
|
999
1015
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerMonthView, {}),
|
|
1000
1016
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DatePickerYearView, {})
|
|
1001
1017
|
] });
|
|
1002
1018
|
}
|
|
1003
1019
|
|
|
1020
|
+
// src/components/Dialog.tsx
|
|
1021
|
+
var import_react10 = require("@ark-ui/react");
|
|
1022
|
+
var import_recipes10 = require("@cerberus/styled-system/recipes");
|
|
1023
|
+
var import_css12 = require("@cerberus/styled-system/css");
|
|
1024
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1025
|
+
function DialogProvider(props) {
|
|
1026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react10.Dialog.Root, { ...props });
|
|
1027
|
+
}
|
|
1028
|
+
function Dialog(props) {
|
|
1029
|
+
const { size, ...contentProps } = props;
|
|
1030
|
+
const styles = (0, import_recipes10.dialog)({ size });
|
|
1031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Portal, { children: [
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogBackdrop, { className: styles.backdrop }),
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogPositioner, { className: styles.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogContent, { className: styles.content, ...contentProps }) })
|
|
1034
|
+
] });
|
|
1035
|
+
}
|
|
1036
|
+
function DialogHeading(props) {
|
|
1037
|
+
const styles = (0, import_recipes10.dialog)();
|
|
1038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react10.Dialog.Title, { ...props, className: (0, import_css12.cx)(props.className, styles.title) });
|
|
1039
|
+
}
|
|
1040
|
+
function DialogDescription(props) {
|
|
1041
|
+
const styles = (0, import_recipes10.dialog)();
|
|
1042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1043
|
+
import_react10.Dialog.Description,
|
|
1044
|
+
{
|
|
1045
|
+
...props,
|
|
1046
|
+
className: (0, import_css12.cx)(props.className, styles.description)
|
|
1047
|
+
}
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
var DialogTrigger = import_react10.Dialog.Trigger;
|
|
1051
|
+
var DialogCloseTrigger = import_react10.Dialog.CloseTrigger;
|
|
1052
|
+
var DialogBackdrop = import_react10.Dialog.Backdrop;
|
|
1053
|
+
var DialogPositioner = import_react10.Dialog.Positioner;
|
|
1054
|
+
var DialogContent = import_react10.Dialog.Content;
|
|
1055
|
+
|
|
1056
|
+
// src/components/Dialog.client.tsx
|
|
1057
|
+
var import_react11 = require("@ark-ui/react");
|
|
1058
|
+
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
1059
|
+
var import_css13 = require("@cerberus/styled-system/css");
|
|
1060
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1061
|
+
function DialogCloseIconTrigger(props) {
|
|
1062
|
+
const { icons } = useCerberusContext();
|
|
1063
|
+
const { close: CloseIcon } = icons;
|
|
1064
|
+
const styles = (0, import_recipes11.dialog)();
|
|
1065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1066
|
+
import_react11.Dialog.CloseTrigger,
|
|
1067
|
+
{
|
|
1068
|
+
...props,
|
|
1069
|
+
className: (0, import_css13.cx)(props.className, styles.closeTrigger),
|
|
1070
|
+
asChild: true,
|
|
1071
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1072
|
+
IconButton,
|
|
1073
|
+
{
|
|
1074
|
+
ariaLabel: "Close dialog",
|
|
1075
|
+
palette: "action",
|
|
1076
|
+
size: "lg",
|
|
1077
|
+
usage: "ghost",
|
|
1078
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CloseIcon, {})
|
|
1079
|
+
}
|
|
1080
|
+
)
|
|
1081
|
+
}
|
|
1082
|
+
);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1004
1085
|
// src/components/Droppable.tsx
|
|
1005
1086
|
var import_core = require("@dnd-kit/core");
|
|
1006
|
-
var
|
|
1007
|
-
var
|
|
1087
|
+
var import_react12 = require("react");
|
|
1088
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1008
1089
|
function Droppable(props) {
|
|
1009
1090
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
1010
|
-
const uuid = (0,
|
|
1091
|
+
const uuid = (0, import_react12.useId)();
|
|
1011
1092
|
const { isOver, setNodeRef } = (0, import_core.useDroppable)({
|
|
1012
1093
|
data,
|
|
1013
1094
|
disabled,
|
|
1014
1095
|
id: id || uuid,
|
|
1015
1096
|
resizeObserverConfig
|
|
1016
1097
|
});
|
|
1017
|
-
return /* @__PURE__ */ (0,
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1018
1099
|
"div",
|
|
1019
1100
|
{
|
|
1020
1101
|
...nativeProps,
|
|
@@ -1027,30 +1108,30 @@ function Droppable(props) {
|
|
|
1027
1108
|
}
|
|
1028
1109
|
|
|
1029
1110
|
// src/components/FieldMessage.tsx
|
|
1030
|
-
var
|
|
1031
|
-
var
|
|
1032
|
-
var
|
|
1111
|
+
var import_css14 = require("@cerberus/styled-system/css");
|
|
1112
|
+
var import_recipes12 = require("@cerberus/styled-system/recipes");
|
|
1113
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1033
1114
|
function FieldMessage(props) {
|
|
1034
1115
|
const { invalid } = useFieldContext();
|
|
1035
|
-
return /* @__PURE__ */ (0,
|
|
1116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1036
1117
|
"small",
|
|
1037
1118
|
{
|
|
1038
1119
|
...props,
|
|
1039
1120
|
...invalid && { "aria-invalid": true },
|
|
1040
|
-
className: (0,
|
|
1121
|
+
className: (0, import_css14.cx)(props.className, (0, import_recipes12.fieldMessage)())
|
|
1041
1122
|
}
|
|
1042
1123
|
);
|
|
1043
1124
|
}
|
|
1044
1125
|
|
|
1045
1126
|
// src/context/feature-flags.tsx
|
|
1046
|
-
var
|
|
1047
|
-
var
|
|
1048
|
-
var FeatureFlagContext = (0,
|
|
1127
|
+
var import_react13 = require("react");
|
|
1128
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1129
|
+
var FeatureFlagContext = (0, import_react13.createContext)(null);
|
|
1049
1130
|
function FeatureFlags(props) {
|
|
1050
|
-
return /* @__PURE__ */ (0,
|
|
1131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
1051
1132
|
}
|
|
1052
1133
|
function useFeatureFlags(key) {
|
|
1053
|
-
const context = (0,
|
|
1134
|
+
const context = (0, import_react13.useContext)(FeatureFlagContext);
|
|
1054
1135
|
if (context === null) {
|
|
1055
1136
|
throw new Error(
|
|
1056
1137
|
"useFeatureFlag must be used within a FeatureFlags Provider"
|
|
@@ -1060,26 +1141,26 @@ function useFeatureFlags(key) {
|
|
|
1060
1141
|
}
|
|
1061
1142
|
|
|
1062
1143
|
// src/components/FeatureFlag.tsx
|
|
1063
|
-
var
|
|
1144
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1064
1145
|
function FeatureFlag(props) {
|
|
1065
1146
|
const showContent = useFeatureFlags(props.flag);
|
|
1066
|
-
return /* @__PURE__ */ (0,
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Show, { when: showContent, children: props.children });
|
|
1067
1148
|
}
|
|
1068
1149
|
|
|
1069
1150
|
// src/components/Fieldset.tsx
|
|
1070
|
-
var
|
|
1071
|
-
var
|
|
1151
|
+
var import_css15 = require("@cerberus/styled-system/css");
|
|
1152
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1072
1153
|
function Fieldset(props) {
|
|
1073
1154
|
const { invalid, ...formState } = useFieldContext();
|
|
1074
|
-
return /* @__PURE__ */ (0,
|
|
1155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1075
1156
|
"fieldset",
|
|
1076
1157
|
{
|
|
1077
1158
|
...props,
|
|
1078
1159
|
...formState,
|
|
1079
1160
|
...invalid && { "aria-invalid": true },
|
|
1080
|
-
className: (0,
|
|
1161
|
+
className: (0, import_css15.cx)(
|
|
1081
1162
|
props.className,
|
|
1082
|
-
(0,
|
|
1163
|
+
(0, import_css15.css)({
|
|
1083
1164
|
border: "none",
|
|
1084
1165
|
pt: 2,
|
|
1085
1166
|
margin: 0
|
|
@@ -1090,18 +1171,18 @@ function Fieldset(props) {
|
|
|
1090
1171
|
}
|
|
1091
1172
|
|
|
1092
1173
|
// src/components/FieldsetLabel.tsx
|
|
1093
|
-
var
|
|
1094
|
-
var
|
|
1095
|
-
var
|
|
1174
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
1175
|
+
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1176
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1096
1177
|
function FieldsetLabel(props) {
|
|
1097
1178
|
const { size, usage, ...nativeProps } = props;
|
|
1098
|
-
return /* @__PURE__ */ (0,
|
|
1179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1099
1180
|
"label",
|
|
1100
1181
|
{
|
|
1101
1182
|
...nativeProps,
|
|
1102
|
-
className: (0,
|
|
1183
|
+
className: (0, import_css16.cx)(
|
|
1103
1184
|
nativeProps.className,
|
|
1104
|
-
(0,
|
|
1185
|
+
(0, import_recipes13.label)({
|
|
1105
1186
|
size,
|
|
1106
1187
|
usage
|
|
1107
1188
|
})
|
|
@@ -1111,23 +1192,23 @@ function FieldsetLabel(props) {
|
|
|
1111
1192
|
}
|
|
1112
1193
|
|
|
1113
1194
|
// src/components/FileStatus.tsx
|
|
1114
|
-
var
|
|
1115
|
-
var
|
|
1116
|
-
var
|
|
1195
|
+
var import_react14 = require("react");
|
|
1196
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1197
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
1117
1198
|
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
1118
1199
|
|
|
1119
1200
|
// src/components/ProgressBar.tsx
|
|
1120
|
-
var
|
|
1121
|
-
var
|
|
1122
|
-
var
|
|
1201
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1202
|
+
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1203
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1123
1204
|
function ProgressBar(props) {
|
|
1124
1205
|
const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
|
|
1125
|
-
const styles = (0,
|
|
1206
|
+
const styles = (0, import_recipes14.progressBar)({ size, usage });
|
|
1126
1207
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
1127
1208
|
const width = {
|
|
1128
1209
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
1129
1210
|
};
|
|
1130
|
-
return /* @__PURE__ */ (0,
|
|
1211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1131
1212
|
"div",
|
|
1132
1213
|
{
|
|
1133
1214
|
...nativeProps,
|
|
@@ -1135,9 +1216,9 @@ function ProgressBar(props) {
|
|
|
1135
1216
|
"aria-valuemin": 0,
|
|
1136
1217
|
"aria-valuemax": 100,
|
|
1137
1218
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
1138
|
-
className: (0,
|
|
1219
|
+
className: (0, import_css17.cx)(nativeProps.className, styles.root),
|
|
1139
1220
|
role: "progressbar",
|
|
1140
|
-
children: /* @__PURE__ */ (0,
|
|
1221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1141
1222
|
"div",
|
|
1142
1223
|
{
|
|
1143
1224
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -1151,7 +1232,7 @@ function ProgressBar(props) {
|
|
|
1151
1232
|
}
|
|
1152
1233
|
|
|
1153
1234
|
// src/components/FileStatus.tsx
|
|
1154
|
-
var
|
|
1235
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1155
1236
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
1156
1237
|
processStatus2["TODO"] = "todo";
|
|
1157
1238
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -1161,24 +1242,24 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
|
1161
1242
|
})(processStatus || {});
|
|
1162
1243
|
function FileStatus(props) {
|
|
1163
1244
|
const { file, now, status, onClick, ...nativeProps } = props;
|
|
1164
|
-
const actionLabel = (0,
|
|
1165
|
-
const palette = (0,
|
|
1166
|
-
const modalIconPalette = (0,
|
|
1167
|
-
const styles = (0,
|
|
1245
|
+
const actionLabel = (0, import_react14.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
1246
|
+
const palette = (0, import_react14.useMemo)(() => getPalette(status), [status]);
|
|
1247
|
+
const modalIconPalette = (0, import_react14.useMemo)(() => getModalIconPalette(status), [status]);
|
|
1248
|
+
const styles = (0, import_react14.useMemo)(() => {
|
|
1168
1249
|
switch (status) {
|
|
1169
1250
|
case "todo" /* TODO */:
|
|
1170
|
-
return (0,
|
|
1251
|
+
return (0, import_recipes15.fileStatus)({ status: "todo" });
|
|
1171
1252
|
case "processing" /* PROCESSING */:
|
|
1172
|
-
return (0,
|
|
1253
|
+
return (0, import_recipes15.fileStatus)({ status: "processing" });
|
|
1173
1254
|
case "done" /* DONE */:
|
|
1174
|
-
return (0,
|
|
1255
|
+
return (0, import_recipes15.fileStatus)({ status: "done" });
|
|
1175
1256
|
case "error" /* ERROR */:
|
|
1176
|
-
return (0,
|
|
1257
|
+
return (0, import_recipes15.fileStatus)({ status: "error" });
|
|
1177
1258
|
default:
|
|
1178
|
-
return (0,
|
|
1259
|
+
return (0, import_recipes15.fileStatus)();
|
|
1179
1260
|
}
|
|
1180
1261
|
}, [status]);
|
|
1181
|
-
const handleClick = (0,
|
|
1262
|
+
const handleClick = (0, import_react14.useCallback)(
|
|
1182
1263
|
(e) => {
|
|
1183
1264
|
const actionStatus = getStatusActionLabel(
|
|
1184
1265
|
status
|
|
@@ -1187,22 +1268,22 @@ function FileStatus(props) {
|
|
|
1187
1268
|
},
|
|
1188
1269
|
[onClick]
|
|
1189
1270
|
);
|
|
1190
|
-
return /* @__PURE__ */ (0,
|
|
1271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1191
1272
|
"div",
|
|
1192
1273
|
{
|
|
1193
1274
|
...nativeProps,
|
|
1194
|
-
className: (0,
|
|
1275
|
+
className: (0, import_css18.cx)(nativeProps.className, styles.root, (0, import_patterns5.hstack)()),
|
|
1195
1276
|
children: [
|
|
1196
|
-
/* @__PURE__ */ (0,
|
|
1277
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1197
1278
|
Avatar,
|
|
1198
1279
|
{
|
|
1199
1280
|
ariaLabel: "",
|
|
1200
1281
|
gradient: modalIconPalette,
|
|
1201
|
-
icon: /* @__PURE__ */ (0,
|
|
1282
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
1202
1283
|
src: ""
|
|
1203
1284
|
}
|
|
1204
1285
|
),
|
|
1205
|
-
/* @__PURE__ */ (0,
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1206
1287
|
"div",
|
|
1207
1288
|
{
|
|
1208
1289
|
className: (0, import_patterns5.vstack)({
|
|
@@ -1211,17 +1292,17 @@ function FileStatus(props) {
|
|
|
1211
1292
|
w: "full"
|
|
1212
1293
|
}),
|
|
1213
1294
|
children: [
|
|
1214
|
-
/* @__PURE__ */ (0,
|
|
1295
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1215
1296
|
"small",
|
|
1216
1297
|
{
|
|
1217
|
-
className: (0,
|
|
1298
|
+
className: (0, import_css18.css)({
|
|
1218
1299
|
color: "page.text.initial",
|
|
1219
1300
|
textStyle: "label-sm"
|
|
1220
1301
|
}),
|
|
1221
1302
|
children: file
|
|
1222
1303
|
}
|
|
1223
1304
|
),
|
|
1224
|
-
/* @__PURE__ */ (0,
|
|
1305
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1225
1306
|
ProgressBar,
|
|
1226
1307
|
{
|
|
1227
1308
|
id: props.id,
|
|
@@ -1230,27 +1311,27 @@ function FileStatus(props) {
|
|
|
1230
1311
|
size: "sm"
|
|
1231
1312
|
}
|
|
1232
1313
|
),
|
|
1233
|
-
/* @__PURE__ */ (0,
|
|
1314
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1234
1315
|
FieldMessage,
|
|
1235
1316
|
{
|
|
1236
|
-
className: (0,
|
|
1317
|
+
className: (0, import_css18.css)({
|
|
1237
1318
|
color: "page.text.100"
|
|
1238
1319
|
}),
|
|
1239
1320
|
id: `help:${file}`,
|
|
1240
|
-
children: /* @__PURE__ */ (0,
|
|
1321
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MatchFileStatusText, { status, now })
|
|
1241
1322
|
}
|
|
1242
1323
|
) })
|
|
1243
1324
|
]
|
|
1244
1325
|
}
|
|
1245
1326
|
),
|
|
1246
|
-
/* @__PURE__ */ (0,
|
|
1327
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1247
1328
|
IconButton,
|
|
1248
1329
|
{
|
|
1249
1330
|
ariaLabel: actionLabel,
|
|
1250
1331
|
onClick: handleClick,
|
|
1251
1332
|
palette,
|
|
1252
1333
|
size: "sm",
|
|
1253
|
-
children: /* @__PURE__ */ (0,
|
|
1334
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MatchStatusAction, { status })
|
|
1254
1335
|
}
|
|
1255
1336
|
)
|
|
1256
1337
|
]
|
|
@@ -1267,13 +1348,13 @@ function MatchFileStatusIcon(props) {
|
|
|
1267
1348
|
} = icons;
|
|
1268
1349
|
switch (props.status) {
|
|
1269
1350
|
case "todo" /* TODO */:
|
|
1270
|
-
return /* @__PURE__ */ (0,
|
|
1351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TodoIcon, { size: props.size });
|
|
1271
1352
|
case "processing" /* PROCESSING */:
|
|
1272
|
-
return /* @__PURE__ */ (0,
|
|
1353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FileUploaderIcon, { size: props.size });
|
|
1273
1354
|
case "done" /* DONE */:
|
|
1274
|
-
return /* @__PURE__ */ (0,
|
|
1355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DoneIcon, { size: props.size });
|
|
1275
1356
|
case "error" /* ERROR */:
|
|
1276
|
-
return /* @__PURE__ */ (0,
|
|
1357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(InvalidIcon, { size: props.size });
|
|
1277
1358
|
default:
|
|
1278
1359
|
throw new Error("Unknown status");
|
|
1279
1360
|
}
|
|
@@ -1298,11 +1379,11 @@ function MatchStatusAction(props) {
|
|
|
1298
1379
|
switch (props.status) {
|
|
1299
1380
|
case "todo" /* TODO */:
|
|
1300
1381
|
case "processing" /* PROCESSING */:
|
|
1301
|
-
return /* @__PURE__ */ (0,
|
|
1382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CloseIcon, {});
|
|
1302
1383
|
case "error" /* ERROR */:
|
|
1303
|
-
return /* @__PURE__ */ (0,
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RedoIcon, {});
|
|
1304
1385
|
case "done" /* DONE */:
|
|
1305
|
-
return /* @__PURE__ */ (0,
|
|
1386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TrashIcon, {});
|
|
1306
1387
|
default:
|
|
1307
1388
|
throw new Error("Invalid status");
|
|
1308
1389
|
}
|
|
@@ -1348,40 +1429,40 @@ function getModalIconPalette(status) {
|
|
|
1348
1429
|
}
|
|
1349
1430
|
|
|
1350
1431
|
// src/components/FileUploader.tsx
|
|
1351
|
-
var
|
|
1432
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
1352
1433
|
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
1353
|
-
var
|
|
1354
|
-
var
|
|
1434
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1435
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1355
1436
|
function FileUploader(props) {
|
|
1356
1437
|
var _a;
|
|
1357
1438
|
const { icons } = useCerberusContext();
|
|
1358
|
-
const styles = (0,
|
|
1439
|
+
const styles = (0, import_recipes16.fileUploader)();
|
|
1359
1440
|
const { waitingFileUploader: Icon } = icons;
|
|
1360
|
-
return /* @__PURE__ */ (0,
|
|
1441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1361
1442
|
"div",
|
|
1362
1443
|
{
|
|
1363
1444
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
1364
|
-
className: (0,
|
|
1445
|
+
className: (0, import_css19.cx)(
|
|
1365
1446
|
(0, import_patterns6.vstack)({
|
|
1366
1447
|
justify: "center"
|
|
1367
1448
|
}),
|
|
1368
1449
|
styles.container
|
|
1369
1450
|
),
|
|
1370
1451
|
children: [
|
|
1371
|
-
/* @__PURE__ */ (0,
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1372
1453
|
Avatar,
|
|
1373
1454
|
{
|
|
1374
1455
|
gradient: "charon-light",
|
|
1375
1456
|
ariaLabel: "",
|
|
1376
|
-
icon: /* @__PURE__ */ (0,
|
|
1457
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, {}),
|
|
1377
1458
|
size: "md",
|
|
1378
1459
|
src: ""
|
|
1379
1460
|
}
|
|
1380
1461
|
) }),
|
|
1381
|
-
/* @__PURE__ */ (0,
|
|
1462
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1382
1463
|
"label",
|
|
1383
1464
|
{
|
|
1384
|
-
className: (0,
|
|
1465
|
+
className: (0, import_css19.cx)(
|
|
1385
1466
|
(0, import_patterns6.vstack)({
|
|
1386
1467
|
justify: "center"
|
|
1387
1468
|
}),
|
|
@@ -1389,16 +1470,16 @@ function FileUploader(props) {
|
|
|
1389
1470
|
),
|
|
1390
1471
|
htmlFor: props.name,
|
|
1391
1472
|
children: [
|
|
1392
|
-
/* @__PURE__ */ (0,
|
|
1473
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
1393
1474
|
"Import ",
|
|
1394
1475
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
1395
1476
|
" files",
|
|
1396
|
-
/* @__PURE__ */ (0,
|
|
1397
|
-
/* @__PURE__ */ (0,
|
|
1477
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
1478
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1398
1479
|
"input",
|
|
1399
1480
|
{
|
|
1400
1481
|
...props,
|
|
1401
|
-
className: (0,
|
|
1482
|
+
className: (0, import_css19.cx)(props.className, styles.input),
|
|
1402
1483
|
type: "file"
|
|
1403
1484
|
}
|
|
1404
1485
|
)
|
|
@@ -1411,19 +1492,19 @@ function FileUploader(props) {
|
|
|
1411
1492
|
}
|
|
1412
1493
|
|
|
1413
1494
|
// src/components/Input.tsx
|
|
1414
|
-
var
|
|
1415
|
-
var
|
|
1416
|
-
var
|
|
1495
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1496
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1497
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1417
1498
|
function Input(props) {
|
|
1418
1499
|
const { describedBy, size, startIcon, endIcon, ...nativeProps } = props;
|
|
1419
|
-
const inputStyles = (0,
|
|
1500
|
+
const inputStyles = (0, import_recipes17.input)({ size });
|
|
1420
1501
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
1421
1502
|
const hasEndIcon = Boolean(endIcon);
|
|
1422
1503
|
const { icons } = useCerberusContext();
|
|
1423
1504
|
const { invalid: InvalidIcon } = icons;
|
|
1424
|
-
return /* @__PURE__ */ (0,
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1426
|
-
/* @__PURE__ */ (0,
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: inputStyles.root, children: [
|
|
1506
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1427
1508
|
"input",
|
|
1428
1509
|
{
|
|
1429
1510
|
...nativeProps,
|
|
@@ -1431,31 +1512,31 @@ function Input(props) {
|
|
|
1431
1512
|
...describedBy && { "aria-describedby": describedBy },
|
|
1432
1513
|
...invalid && { "aria-invalid": true },
|
|
1433
1514
|
"data-start-icon": Boolean(startIcon),
|
|
1434
|
-
className: (0,
|
|
1515
|
+
className: (0, import_css20.cx)("peer", nativeProps.className, inputStyles.input)
|
|
1435
1516
|
}
|
|
1436
1517
|
),
|
|
1437
|
-
/* @__PURE__ */ (0,
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1518
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
1439
1520
|
] });
|
|
1440
1521
|
}
|
|
1441
1522
|
|
|
1442
1523
|
// src/components/Label.tsx
|
|
1443
|
-
var
|
|
1444
|
-
var
|
|
1524
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1525
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1445
1526
|
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
1446
|
-
var
|
|
1527
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1447
1528
|
function Label(props) {
|
|
1448
1529
|
const { hidden, size, ...nativeProps } = props;
|
|
1449
1530
|
const { required, disabled } = useFieldContext();
|
|
1450
1531
|
const usage = hidden ? "hidden" : "visible";
|
|
1451
|
-
return /* @__PURE__ */ (0,
|
|
1532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1452
1533
|
"label",
|
|
1453
1534
|
{
|
|
1454
1535
|
...nativeProps,
|
|
1455
1536
|
...disabled && { "data-disabled": true },
|
|
1456
|
-
className: (0,
|
|
1537
|
+
className: (0, import_css21.cx)(
|
|
1457
1538
|
nativeProps.className,
|
|
1458
|
-
(0,
|
|
1539
|
+
(0, import_recipes18.label)({ size, usage }),
|
|
1459
1540
|
(0, import_patterns7.hstack)({
|
|
1460
1541
|
justify: "space-between",
|
|
1461
1542
|
w: "full"
|
|
@@ -1463,10 +1544,10 @@ function Label(props) {
|
|
|
1463
1544
|
),
|
|
1464
1545
|
children: [
|
|
1465
1546
|
props.children,
|
|
1466
|
-
/* @__PURE__ */ (0,
|
|
1547
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1467
1548
|
"span",
|
|
1468
1549
|
{
|
|
1469
|
-
className: (0,
|
|
1550
|
+
className: (0, import_css21.css)({
|
|
1470
1551
|
color: "page.text.100",
|
|
1471
1552
|
fontSize: "inherit"
|
|
1472
1553
|
}),
|
|
@@ -1479,35 +1560,35 @@ function Label(props) {
|
|
|
1479
1560
|
}
|
|
1480
1561
|
|
|
1481
1562
|
// src/components/Legend.tsx
|
|
1482
|
-
var
|
|
1483
|
-
var
|
|
1563
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1564
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1484
1565
|
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
1485
|
-
var
|
|
1566
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1486
1567
|
function Legend(props) {
|
|
1487
1568
|
const { size, ...nativeProps } = props;
|
|
1488
1569
|
const { invalid, ...formState } = useFieldContext();
|
|
1489
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1490
1571
|
"legend",
|
|
1491
1572
|
{
|
|
1492
1573
|
...nativeProps,
|
|
1493
1574
|
...formState,
|
|
1494
1575
|
...invalid && { "aria-invalid": true },
|
|
1495
|
-
className: (0,
|
|
1576
|
+
className: (0, import_css22.cx)(
|
|
1496
1577
|
nativeProps.className,
|
|
1497
1578
|
(0, import_patterns8.hstack)({
|
|
1498
1579
|
justify: "space-between",
|
|
1499
1580
|
w: "full"
|
|
1500
1581
|
}),
|
|
1501
|
-
(0,
|
|
1582
|
+
(0, import_recipes19.label)({
|
|
1502
1583
|
size
|
|
1503
1584
|
})
|
|
1504
1585
|
),
|
|
1505
1586
|
children: [
|
|
1506
1587
|
nativeProps.children,
|
|
1507
|
-
/* @__PURE__ */ (0,
|
|
1588
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1508
1589
|
"span",
|
|
1509
1590
|
{
|
|
1510
|
-
className: (0,
|
|
1591
|
+
className: (0, import_css22.css)({
|
|
1511
1592
|
color: "page.text.100",
|
|
1512
1593
|
fontSize: "inherit"
|
|
1513
1594
|
}),
|
|
@@ -1520,74 +1601,74 @@ function Legend(props) {
|
|
|
1520
1601
|
}
|
|
1521
1602
|
|
|
1522
1603
|
// src/components/Menu.tsx
|
|
1523
|
-
var
|
|
1524
|
-
var
|
|
1525
|
-
var
|
|
1526
|
-
var
|
|
1527
|
-
var menuStyles = (0,
|
|
1528
|
-
var Menu =
|
|
1604
|
+
var import_react15 = require("@ark-ui/react");
|
|
1605
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1606
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1607
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1608
|
+
var menuStyles = (0, import_recipes20.menu)();
|
|
1609
|
+
var Menu = import_react15.Menu.Root;
|
|
1529
1610
|
function MenuTrigger(props) {
|
|
1530
|
-
return /* @__PURE__ */ (0,
|
|
1611
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react15.Menu.Trigger, { ...props, asChild: true });
|
|
1531
1612
|
}
|
|
1532
1613
|
function MenuContent(props) {
|
|
1533
|
-
return /* @__PURE__ */ (0,
|
|
1534
|
-
|
|
1614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react15.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1615
|
+
import_react15.Menu.Content,
|
|
1535
1616
|
{
|
|
1536
1617
|
...props,
|
|
1537
|
-
className: (0,
|
|
1618
|
+
className: (0, import_css23.cx)(props.className, menuStyles.content)
|
|
1538
1619
|
}
|
|
1539
1620
|
) });
|
|
1540
1621
|
}
|
|
1541
1622
|
function MenuItem(props) {
|
|
1542
|
-
return /* @__PURE__ */ (0,
|
|
1623
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react15.Menu.Item, { ...props, className: (0, import_css23.cx)(props.className, menuStyles.item) });
|
|
1543
1624
|
}
|
|
1544
|
-
var MenuItemGroup =
|
|
1625
|
+
var MenuItemGroup = import_react15.Menu.ItemGroup;
|
|
1545
1626
|
function MenuGroupLabel(props) {
|
|
1546
|
-
return /* @__PURE__ */ (0,
|
|
1547
|
-
|
|
1627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1628
|
+
import_react15.Menu.ItemGroupLabel,
|
|
1548
1629
|
{
|
|
1549
1630
|
...props,
|
|
1550
|
-
className: (0,
|
|
1631
|
+
className: (0, import_css23.cx)(props.className, menuStyles.itemGroupLabel)
|
|
1551
1632
|
}
|
|
1552
1633
|
);
|
|
1553
1634
|
}
|
|
1554
1635
|
function MenuSeparator(props) {
|
|
1555
|
-
return /* @__PURE__ */ (0,
|
|
1556
|
-
|
|
1636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1637
|
+
import_react15.Menu.Separator,
|
|
1557
1638
|
{
|
|
1558
1639
|
...props,
|
|
1559
|
-
className: (0,
|
|
1640
|
+
className: (0, import_css23.cx)(props.className, menuStyles.separator)
|
|
1560
1641
|
}
|
|
1561
1642
|
);
|
|
1562
1643
|
}
|
|
1563
1644
|
|
|
1564
1645
|
// src/components/Modal.tsx
|
|
1565
|
-
var
|
|
1566
|
-
var
|
|
1567
|
-
var
|
|
1568
|
-
var
|
|
1646
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1647
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1648
|
+
var import_react16 = require("react");
|
|
1649
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1569
1650
|
function ModalEl(props, ref) {
|
|
1570
|
-
return /* @__PURE__ */ (0,
|
|
1651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1571
1652
|
"dialog",
|
|
1572
1653
|
{
|
|
1573
1654
|
...props,
|
|
1574
|
-
className: (0,
|
|
1655
|
+
className: (0, import_css24.cx)(props.className, (0, import_recipes21.modal)().dialog),
|
|
1575
1656
|
ref
|
|
1576
1657
|
}
|
|
1577
1658
|
);
|
|
1578
1659
|
}
|
|
1579
|
-
var Modal = (0,
|
|
1660
|
+
var Modal = (0, import_react16.forwardRef)(ModalEl);
|
|
1580
1661
|
|
|
1581
1662
|
// src/components/ModalHeader.tsx
|
|
1582
|
-
var
|
|
1663
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1583
1664
|
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
1584
|
-
var
|
|
1665
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1585
1666
|
function ModalHeader(props) {
|
|
1586
|
-
return /* @__PURE__ */ (0,
|
|
1667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1587
1668
|
"div",
|
|
1588
1669
|
{
|
|
1589
1670
|
...props,
|
|
1590
|
-
className: (0,
|
|
1671
|
+
className: (0, import_css25.cx)(
|
|
1591
1672
|
props.className,
|
|
1592
1673
|
(0, import_patterns9.vstack)({
|
|
1593
1674
|
alignItems: "flex-start",
|
|
@@ -1600,25 +1681,25 @@ function ModalHeader(props) {
|
|
|
1600
1681
|
}
|
|
1601
1682
|
|
|
1602
1683
|
// src/components/ModalHeading.tsx
|
|
1603
|
-
var
|
|
1604
|
-
var
|
|
1605
|
-
var
|
|
1684
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
1685
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
1686
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1606
1687
|
function ModalHeading(props) {
|
|
1607
|
-
return /* @__PURE__ */ (0,
|
|
1688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { ...props, className: (0, import_css26.cx)(props.className, (0, import_recipes22.modal)().heading) });
|
|
1608
1689
|
}
|
|
1609
1690
|
|
|
1610
1691
|
// src/components/ModalDescription.tsx
|
|
1611
|
-
var
|
|
1612
|
-
var
|
|
1613
|
-
var
|
|
1692
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
1693
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
1694
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1614
1695
|
function ModalDescription(props) {
|
|
1615
|
-
return /* @__PURE__ */ (0,
|
|
1696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { ...props, className: (0, import_css27.cx)(props.className, (0, import_recipes23.modal)().description) });
|
|
1616
1697
|
}
|
|
1617
1698
|
|
|
1618
1699
|
// src/components/NavMenuTrigger.tsx
|
|
1619
|
-
var
|
|
1620
|
-
var
|
|
1621
|
-
var
|
|
1700
|
+
var import_react18 = require("react");
|
|
1701
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
1702
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
1622
1703
|
|
|
1623
1704
|
// src/aria-helpers/nav-menu.aria.ts
|
|
1624
1705
|
function createNavTriggerProps(values) {
|
|
@@ -1629,18 +1710,18 @@ function createNavTriggerProps(values) {
|
|
|
1629
1710
|
}
|
|
1630
1711
|
|
|
1631
1712
|
// src/context/navMenu.tsx
|
|
1632
|
-
var
|
|
1633
|
-
var
|
|
1634
|
-
var
|
|
1635
|
-
var NavMenuContext = (0,
|
|
1713
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
1714
|
+
var import_react17 = require("react");
|
|
1715
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1716
|
+
var NavMenuContext = (0, import_react17.createContext)(null);
|
|
1636
1717
|
function NavMenu(props) {
|
|
1637
|
-
const triggerRef = (0,
|
|
1638
|
-
const menuRef = (0,
|
|
1639
|
-
const [expanded, setExpanded] = (0,
|
|
1640
|
-
const handleToggle = (0,
|
|
1718
|
+
const triggerRef = (0, import_react17.useRef)(null);
|
|
1719
|
+
const menuRef = (0, import_react17.useRef)(null);
|
|
1720
|
+
const [expanded, setExpanded] = (0, import_react17.useState)(false);
|
|
1721
|
+
const handleToggle = (0, import_react17.useCallback)(() => {
|
|
1641
1722
|
setExpanded((prev) => !prev);
|
|
1642
1723
|
}, []);
|
|
1643
|
-
const value = (0,
|
|
1724
|
+
const value = (0, import_react17.useMemo)(
|
|
1644
1725
|
() => ({
|
|
1645
1726
|
triggerRef,
|
|
1646
1727
|
menuRef,
|
|
@@ -1649,10 +1730,10 @@ function NavMenu(props) {
|
|
|
1649
1730
|
}),
|
|
1650
1731
|
[expanded, handleToggle]
|
|
1651
1732
|
);
|
|
1652
|
-
return /* @__PURE__ */ (0,
|
|
1733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1653
1734
|
"nav",
|
|
1654
1735
|
{
|
|
1655
|
-
className: (0,
|
|
1736
|
+
className: (0, import_css28.css)({
|
|
1656
1737
|
position: "relative"
|
|
1657
1738
|
}),
|
|
1658
1739
|
children: props.children
|
|
@@ -1660,7 +1741,7 @@ function NavMenu(props) {
|
|
|
1660
1741
|
) });
|
|
1661
1742
|
}
|
|
1662
1743
|
function useNavMenuContext() {
|
|
1663
|
-
const context = (0,
|
|
1744
|
+
const context = (0, import_react17.useContext)(NavMenuContext);
|
|
1664
1745
|
if (!context) {
|
|
1665
1746
|
throw new Error("useNavMenuContext must be used within a NavMenu.");
|
|
1666
1747
|
}
|
|
@@ -1668,7 +1749,7 @@ function useNavMenuContext() {
|
|
|
1668
1749
|
}
|
|
1669
1750
|
|
|
1670
1751
|
// src/components/NavMenuTrigger.tsx
|
|
1671
|
-
var
|
|
1752
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1672
1753
|
function NavMenuTrigger(props) {
|
|
1673
1754
|
const {
|
|
1674
1755
|
as,
|
|
@@ -1687,25 +1768,25 @@ function NavMenuTrigger(props) {
|
|
|
1687
1768
|
});
|
|
1688
1769
|
const hasAs = Boolean(as);
|
|
1689
1770
|
const AsSub = as;
|
|
1690
|
-
const handleClick = (0,
|
|
1771
|
+
const handleClick = (0, import_react18.useCallback)(
|
|
1691
1772
|
(e) => {
|
|
1692
1773
|
if (onClick) return onClick(e);
|
|
1693
1774
|
onToggle();
|
|
1694
1775
|
},
|
|
1695
1776
|
[onClick, onToggle]
|
|
1696
1777
|
);
|
|
1697
|
-
return /* @__PURE__ */ (0,
|
|
1778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1698
1779
|
Show,
|
|
1699
1780
|
{
|
|
1700
1781
|
when: hasAs,
|
|
1701
|
-
fallback: /* @__PURE__ */ (0,
|
|
1782
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1702
1783
|
"button",
|
|
1703
1784
|
{
|
|
1704
1785
|
...nativeProps,
|
|
1705
1786
|
...ariaProps,
|
|
1706
|
-
className: (0,
|
|
1787
|
+
className: (0, import_css29.cx)(
|
|
1707
1788
|
nativeProps.className,
|
|
1708
|
-
(0,
|
|
1789
|
+
(0, import_recipes24.button)({
|
|
1709
1790
|
palette,
|
|
1710
1791
|
usage,
|
|
1711
1792
|
shape
|
|
@@ -1716,7 +1797,7 @@ function NavMenuTrigger(props) {
|
|
|
1716
1797
|
children: props.children
|
|
1717
1798
|
}
|
|
1718
1799
|
),
|
|
1719
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1800
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1720
1801
|
AsSub,
|
|
1721
1802
|
{
|
|
1722
1803
|
...nativeProps,
|
|
@@ -1730,10 +1811,10 @@ function NavMenuTrigger(props) {
|
|
|
1730
1811
|
}
|
|
1731
1812
|
|
|
1732
1813
|
// src/components/NavMenuList.tsx
|
|
1733
|
-
var
|
|
1734
|
-
var
|
|
1814
|
+
var import_react19 = require("react");
|
|
1815
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
1735
1816
|
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
1736
|
-
var
|
|
1817
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1737
1818
|
function getPosition(position) {
|
|
1738
1819
|
const defaultPositions = {
|
|
1739
1820
|
left: "auto",
|
|
@@ -1787,16 +1868,16 @@ var navListStyles = (0, import_patterns10.vstack)({
|
|
|
1787
1868
|
function NavMenuList(props) {
|
|
1788
1869
|
const { position, ...nativeProps } = props;
|
|
1789
1870
|
const { menuRef, expanded } = useNavMenuContext();
|
|
1790
|
-
const locationStyles = (0,
|
|
1871
|
+
const locationStyles = (0, import_react19.useMemo)(
|
|
1791
1872
|
() => getPosition(position ?? "bottom"),
|
|
1792
1873
|
[position]
|
|
1793
1874
|
);
|
|
1794
|
-
return /* @__PURE__ */ (0,
|
|
1875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
1795
1876
|
"ul",
|
|
1796
1877
|
{
|
|
1797
1878
|
...nativeProps,
|
|
1798
1879
|
"data-position": position ?? "bottom",
|
|
1799
|
-
className: (0,
|
|
1880
|
+
className: (0, import_css30.cx)(nativeProps.className, navListStyles),
|
|
1800
1881
|
ref: menuRef,
|
|
1801
1882
|
style: locationStyles
|
|
1802
1883
|
}
|
|
@@ -1804,29 +1885,29 @@ function NavMenuList(props) {
|
|
|
1804
1885
|
}
|
|
1805
1886
|
|
|
1806
1887
|
// src/components/NavMenuLink.tsx
|
|
1807
|
-
var
|
|
1808
|
-
var
|
|
1888
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
1889
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1809
1890
|
function NavMenuLink(props) {
|
|
1810
1891
|
const { as, ...nativeProps } = props;
|
|
1811
1892
|
const hasAs = Boolean(as);
|
|
1812
1893
|
const AsSub = as;
|
|
1813
|
-
return /* @__PURE__ */ (0,
|
|
1894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1814
1895
|
"li",
|
|
1815
1896
|
{
|
|
1816
|
-
className: (0,
|
|
1897
|
+
className: (0, import_css31.css)({
|
|
1817
1898
|
w: "full"
|
|
1818
1899
|
}),
|
|
1819
|
-
children: /* @__PURE__ */ (0,
|
|
1900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1820
1901
|
Show,
|
|
1821
1902
|
{
|
|
1822
1903
|
when: hasAs,
|
|
1823
|
-
fallback: /* @__PURE__ */ (0,
|
|
1904
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1824
1905
|
"a",
|
|
1825
1906
|
{
|
|
1826
1907
|
...nativeProps,
|
|
1827
|
-
className: (0,
|
|
1908
|
+
className: (0, import_css31.cx)(
|
|
1828
1909
|
nativeProps.className,
|
|
1829
|
-
(0,
|
|
1910
|
+
(0, import_css31.css)({
|
|
1830
1911
|
color: "action.navigation.initial",
|
|
1831
1912
|
textStyle: "link",
|
|
1832
1913
|
_hover: {
|
|
@@ -1836,7 +1917,7 @@ function NavMenuLink(props) {
|
|
|
1836
1917
|
)
|
|
1837
1918
|
}
|
|
1838
1919
|
),
|
|
1839
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1920
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AsSub, { ...nativeProps })
|
|
1840
1921
|
}
|
|
1841
1922
|
)
|
|
1842
1923
|
}
|
|
@@ -1844,10 +1925,10 @@ function NavMenuLink(props) {
|
|
|
1844
1925
|
}
|
|
1845
1926
|
|
|
1846
1927
|
// src/components/Notification.tsx
|
|
1847
|
-
var
|
|
1928
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
1848
1929
|
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
1849
|
-
var
|
|
1850
|
-
var
|
|
1930
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
1931
|
+
var import_react20 = require("react");
|
|
1851
1932
|
|
|
1852
1933
|
// src/aria-helpers/trap-focus.aria.ts
|
|
1853
1934
|
function trapFocus(modalRef) {
|
|
@@ -1876,27 +1957,27 @@ function trapFocus(modalRef) {
|
|
|
1876
1957
|
}
|
|
1877
1958
|
|
|
1878
1959
|
// src/components/Notification.tsx
|
|
1879
|
-
var
|
|
1960
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1880
1961
|
function MatchNotificationIcon(props) {
|
|
1881
1962
|
const { icons } = useCerberusContext();
|
|
1882
1963
|
const palette = props.palette || "info";
|
|
1883
1964
|
const key = `${palette}Notification`;
|
|
1884
1965
|
const Icon = icons[key];
|
|
1885
|
-
return /* @__PURE__ */ (0,
|
|
1966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, {});
|
|
1886
1967
|
}
|
|
1887
1968
|
function Notification(props) {
|
|
1888
1969
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1889
|
-
const ref = (0,
|
|
1970
|
+
const ref = (0, import_react20.useRef)(null);
|
|
1890
1971
|
const onKeyDown = trapFocus(ref);
|
|
1891
|
-
const styles = (0,
|
|
1972
|
+
const styles = (0, import_recipes25.notification)({ palette });
|
|
1892
1973
|
const { icons } = useCerberusContext();
|
|
1893
1974
|
const { close: CloseIcon } = icons;
|
|
1894
|
-
return /* @__PURE__ */ (0,
|
|
1975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1895
1976
|
"dialog",
|
|
1896
1977
|
{
|
|
1897
1978
|
...nativeProps,
|
|
1898
1979
|
"data-placement": "left",
|
|
1899
|
-
className: (0,
|
|
1980
|
+
className: (0, import_css32.cx)(
|
|
1900
1981
|
nativeProps.className,
|
|
1901
1982
|
(0, import_patterns11.hstack)({
|
|
1902
1983
|
position: "relative",
|
|
@@ -1907,8 +1988,8 @@ function Notification(props) {
|
|
|
1907
1988
|
onKeyDown,
|
|
1908
1989
|
ref,
|
|
1909
1990
|
children: [
|
|
1910
|
-
/* @__PURE__ */ (0,
|
|
1911
|
-
/* @__PURE__ */ (0,
|
|
1991
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MatchNotificationIcon, { palette }) }),
|
|
1992
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1912
1993
|
"div",
|
|
1913
1994
|
{
|
|
1914
1995
|
className: (0, import_patterns11.vstack)({
|
|
@@ -1919,14 +2000,14 @@ function Notification(props) {
|
|
|
1919
2000
|
children
|
|
1920
2001
|
}
|
|
1921
2002
|
),
|
|
1922
|
-
/* @__PURE__ */ (0,
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1923
2004
|
"button",
|
|
1924
2005
|
{
|
|
1925
2006
|
"aria-label": "Close",
|
|
1926
2007
|
className: styles.close,
|
|
1927
2008
|
onClick: onClose,
|
|
1928
2009
|
value: props.id,
|
|
1929
|
-
children: /* @__PURE__ */ (0,
|
|
2010
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CloseIcon, {})
|
|
1930
2011
|
}
|
|
1931
2012
|
)
|
|
1932
2013
|
]
|
|
@@ -1935,44 +2016,44 @@ function Notification(props) {
|
|
|
1935
2016
|
}
|
|
1936
2017
|
|
|
1937
2018
|
// src/components/NotificationHeading.tsx
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
1940
|
-
var
|
|
2019
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
2020
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2021
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1941
2022
|
function NotificationHeading(props) {
|
|
1942
2023
|
const { palette, ...nativeProps } = props;
|
|
1943
|
-
const styles = (0,
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
2024
|
+
const styles = (0, import_recipes26.notification)({ palette });
|
|
2025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: (0, import_css33.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
1945
2026
|
}
|
|
1946
2027
|
|
|
1947
2028
|
// src/components/NotificationDescription.tsx
|
|
1948
|
-
var
|
|
1949
|
-
var
|
|
1950
|
-
var
|
|
2029
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2030
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2031
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1951
2032
|
function NotificationDescription(props) {
|
|
1952
2033
|
const { palette, ...nativeProps } = props;
|
|
1953
|
-
const styles = (0,
|
|
1954
|
-
return /* @__PURE__ */ (0,
|
|
2034
|
+
const styles = (0, import_recipes27.notification)({ palette });
|
|
2035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1955
2036
|
"p",
|
|
1956
2037
|
{
|
|
1957
|
-
className: (0,
|
|
2038
|
+
className: (0, import_css34.cx)(nativeProps.className, styles.description),
|
|
1958
2039
|
...nativeProps
|
|
1959
2040
|
}
|
|
1960
2041
|
);
|
|
1961
2042
|
}
|
|
1962
2043
|
|
|
1963
2044
|
// src/components/Radio.tsx
|
|
1964
|
-
var
|
|
2045
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
1965
2046
|
var import_patterns12 = require("@cerberus/styled-system/patterns");
|
|
1966
|
-
var
|
|
1967
|
-
var
|
|
2047
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2048
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
1968
2049
|
function Radio(props) {
|
|
1969
2050
|
const { children, size, ...nativeProps } = props;
|
|
1970
2051
|
const { invalid, ...state } = useFieldContext();
|
|
1971
|
-
const styles = (0,
|
|
1972
|
-
return /* @__PURE__ */ (0,
|
|
2052
|
+
const styles = (0, import_recipes28.radio)({ size });
|
|
2053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
1973
2054
|
"div",
|
|
1974
2055
|
{
|
|
1975
|
-
className: (0,
|
|
2056
|
+
className: (0, import_css35.cx)(
|
|
1976
2057
|
"group",
|
|
1977
2058
|
(0, import_patterns12.hstack)({
|
|
1978
2059
|
gap: "sm"
|
|
@@ -1981,13 +2062,13 @@ function Radio(props) {
|
|
|
1981
2062
|
),
|
|
1982
2063
|
tabIndex: 0,
|
|
1983
2064
|
children: [
|
|
1984
|
-
/* @__PURE__ */ (0,
|
|
2065
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
1985
2066
|
"input",
|
|
1986
2067
|
{
|
|
1987
2068
|
...nativeProps,
|
|
1988
2069
|
...state,
|
|
1989
2070
|
...invalid && { "aria-invalid": true },
|
|
1990
|
-
className: (0,
|
|
2071
|
+
className: (0, import_css35.cx)(nativeProps.className, styles.input),
|
|
1991
2072
|
tabIndex: -1,
|
|
1992
2073
|
type: "radio"
|
|
1993
2074
|
}
|
|
@@ -1999,20 +2080,20 @@ function Radio(props) {
|
|
|
1999
2080
|
}
|
|
2000
2081
|
|
|
2001
2082
|
// src/components/Select.tsx
|
|
2002
|
-
var
|
|
2083
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
2003
2084
|
var import_patterns13 = require("@cerberus/styled-system/patterns");
|
|
2004
|
-
var
|
|
2005
|
-
var
|
|
2085
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2086
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2006
2087
|
function Select(props) {
|
|
2007
2088
|
const { describedBy, size, ...nativeProps } = props;
|
|
2008
2089
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
2009
2090
|
const { icons } = useCerberusContext();
|
|
2010
2091
|
const { invalid: InvalidIcon, selectArrow: SelectArrow } = icons;
|
|
2011
|
-
const styles = (0,
|
|
2092
|
+
const styles = (0, import_recipes29.select)({
|
|
2012
2093
|
size
|
|
2013
2094
|
});
|
|
2014
|
-
return /* @__PURE__ */ (0,
|
|
2015
|
-
/* @__PURE__ */ (0,
|
|
2095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: styles.root, children: [
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2016
2097
|
"select",
|
|
2017
2098
|
{
|
|
2018
2099
|
...nativeProps,
|
|
@@ -2022,38 +2103,38 @@ function Select(props) {
|
|
|
2022
2103
|
className: styles.input
|
|
2023
2104
|
}
|
|
2024
2105
|
),
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2106
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2026
2107
|
"span",
|
|
2027
2108
|
{
|
|
2028
|
-
className: (0,
|
|
2109
|
+
className: (0, import_css36.cx)(
|
|
2029
2110
|
styles.iconStack,
|
|
2030
2111
|
(0, import_patterns13.hstack)({
|
|
2031
2112
|
gap: "2"
|
|
2032
2113
|
})
|
|
2033
2114
|
),
|
|
2034
2115
|
children: [
|
|
2035
|
-
/* @__PURE__ */ (0,
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2036
2117
|
"span",
|
|
2037
2118
|
{
|
|
2038
2119
|
...invalid && { "data-invalid": true },
|
|
2039
2120
|
className: styles.stateIcon,
|
|
2040
|
-
children: /* @__PURE__ */ (0,
|
|
2121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(InvalidIcon, {})
|
|
2041
2122
|
}
|
|
2042
2123
|
) }),
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectArrow, {}) })
|
|
2044
2125
|
]
|
|
2045
2126
|
}
|
|
2046
2127
|
)
|
|
2047
2128
|
] });
|
|
2048
2129
|
}
|
|
2049
2130
|
function Option(props) {
|
|
2050
|
-
return /* @__PURE__ */ (0,
|
|
2131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { ...props });
|
|
2051
2132
|
}
|
|
2052
2133
|
|
|
2053
2134
|
// src/components/Spinner.tsx
|
|
2054
|
-
var
|
|
2135
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2055
2136
|
function Spinner(props) {
|
|
2056
|
-
return /* @__PURE__ */ (0,
|
|
2137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2057
2138
|
"svg",
|
|
2058
2139
|
{
|
|
2059
2140
|
"aria-busy": "true",
|
|
@@ -2063,7 +2144,7 @@ function Spinner(props) {
|
|
|
2063
2144
|
width: props.size,
|
|
2064
2145
|
viewBox: "0 0 24 24",
|
|
2065
2146
|
...props,
|
|
2066
|
-
children: /* @__PURE__ */ (0,
|
|
2147
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2067
2148
|
"g",
|
|
2068
2149
|
{
|
|
2069
2150
|
fill: "none",
|
|
@@ -2072,14 +2153,14 @@ function Spinner(props) {
|
|
|
2072
2153
|
strokeLinejoin: "round",
|
|
2073
2154
|
strokeWidth: 2,
|
|
2074
2155
|
children: [
|
|
2075
|
-
/* @__PURE__ */ (0,
|
|
2156
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
2076
2157
|
"path",
|
|
2077
2158
|
{
|
|
2078
2159
|
strokeDasharray: 16,
|
|
2079
2160
|
strokeDashoffset: 16,
|
|
2080
2161
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
2081
2162
|
children: [
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2163
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2083
2164
|
"animate",
|
|
2084
2165
|
{
|
|
2085
2166
|
fill: "freeze",
|
|
@@ -2088,7 +2169,7 @@ function Spinner(props) {
|
|
|
2088
2169
|
values: "16;0"
|
|
2089
2170
|
}
|
|
2090
2171
|
),
|
|
2091
|
-
/* @__PURE__ */ (0,
|
|
2172
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2092
2173
|
"animateTransform",
|
|
2093
2174
|
{
|
|
2094
2175
|
attributeName: "transform",
|
|
@@ -2101,14 +2182,14 @@ function Spinner(props) {
|
|
|
2101
2182
|
]
|
|
2102
2183
|
}
|
|
2103
2184
|
),
|
|
2104
|
-
/* @__PURE__ */ (0,
|
|
2185
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2105
2186
|
"path",
|
|
2106
2187
|
{
|
|
2107
2188
|
strokeDasharray: 64,
|
|
2108
2189
|
strokeDashoffset: 64,
|
|
2109
2190
|
strokeOpacity: 0.3,
|
|
2110
2191
|
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",
|
|
2111
|
-
children: /* @__PURE__ */ (0,
|
|
2192
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2112
2193
|
"animate",
|
|
2113
2194
|
{
|
|
2114
2195
|
fill: "freeze",
|
|
@@ -2128,12 +2209,12 @@ function Spinner(props) {
|
|
|
2128
2209
|
|
|
2129
2210
|
// src/components/Tabs.client.tsx
|
|
2130
2211
|
var import_tabs2 = require("@ark-ui/react/tabs");
|
|
2131
|
-
var
|
|
2212
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
2132
2213
|
|
|
2133
2214
|
// src/context/tabs.tsx
|
|
2134
2215
|
var import_tabs = require("@ark-ui/react/tabs");
|
|
2135
|
-
var
|
|
2136
|
-
var
|
|
2216
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
2217
|
+
var import_react21 = require("react");
|
|
2137
2218
|
|
|
2138
2219
|
// src/utils/localStorage.ts
|
|
2139
2220
|
function getLocalStorage(key, defaultValue) {
|
|
@@ -2149,19 +2230,19 @@ function setLocalStorage(key, value) {
|
|
|
2149
2230
|
}
|
|
2150
2231
|
|
|
2151
2232
|
// src/context/tabs.tsx
|
|
2152
|
-
var
|
|
2153
|
-
var TabsContext = (0,
|
|
2233
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2234
|
+
var TabsContext = (0, import_react21.createContext)(null);
|
|
2154
2235
|
function Tabs(props) {
|
|
2155
2236
|
const { cache, defaultValue, palette, uuid, ...arkProps } = props;
|
|
2156
|
-
const [activeTab, setActiveTab] = (0,
|
|
2237
|
+
const [activeTab, setActiveTab] = (0, import_react21.useState)(
|
|
2157
2238
|
() => cache ? "" : defaultValue
|
|
2158
2239
|
);
|
|
2159
|
-
const styles = (0,
|
|
2160
|
-
const cacheKey = (0,
|
|
2240
|
+
const styles = (0, import_recipes30.tabs)({ palette });
|
|
2241
|
+
const cacheKey = (0, import_react21.useMemo)(
|
|
2161
2242
|
() => uuid ? `cerberus-tabs-${uuid}` : "cerberus-tabs",
|
|
2162
2243
|
[uuid]
|
|
2163
2244
|
);
|
|
2164
|
-
const handleValueChange = (0,
|
|
2245
|
+
const handleValueChange = (0, import_react21.useCallback)(
|
|
2165
2246
|
(details) => {
|
|
2166
2247
|
if (cache) {
|
|
2167
2248
|
setLocalStorage(cacheKey, details.value);
|
|
@@ -2170,20 +2251,20 @@ function Tabs(props) {
|
|
|
2170
2251
|
},
|
|
2171
2252
|
[cache]
|
|
2172
2253
|
);
|
|
2173
|
-
(0,
|
|
2254
|
+
(0, import_react21.useEffect)(() => {
|
|
2174
2255
|
if (cache && !activeTab) {
|
|
2175
2256
|
const cachedTab = getLocalStorage(cacheKey, defaultValue ?? "");
|
|
2176
2257
|
setActiveTab(cachedTab);
|
|
2177
2258
|
}
|
|
2178
2259
|
}, [cache, defaultValue, activeTab]);
|
|
2179
|
-
const value = (0,
|
|
2260
|
+
const value = (0, import_react21.useMemo)(
|
|
2180
2261
|
() => ({
|
|
2181
2262
|
active: activeTab,
|
|
2182
2263
|
styles
|
|
2183
2264
|
}),
|
|
2184
2265
|
[activeTab, palette, styles]
|
|
2185
2266
|
);
|
|
2186
|
-
return /* @__PURE__ */ (0,
|
|
2267
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TabsContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2187
2268
|
import_tabs.Tabs.Root,
|
|
2188
2269
|
{
|
|
2189
2270
|
...arkProps,
|
|
@@ -2197,7 +2278,7 @@ function Tabs(props) {
|
|
|
2197
2278
|
) });
|
|
2198
2279
|
}
|
|
2199
2280
|
function useTabsContext() {
|
|
2200
|
-
const context = (0,
|
|
2281
|
+
const context = (0, import_react21.useContext)(TabsContext);
|
|
2201
2282
|
if (!context) {
|
|
2202
2283
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
2203
2284
|
}
|
|
@@ -2205,18 +2286,18 @@ function useTabsContext() {
|
|
|
2205
2286
|
}
|
|
2206
2287
|
|
|
2207
2288
|
// src/components/Tabs.client.tsx
|
|
2208
|
-
var
|
|
2289
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2209
2290
|
function TabsList(props) {
|
|
2210
2291
|
const { children, ...tabsProps } = props;
|
|
2211
2292
|
const { styles } = useTabsContext();
|
|
2212
|
-
return /* @__PURE__ */ (0,
|
|
2293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2213
2294
|
import_tabs2.Tabs.List,
|
|
2214
2295
|
{
|
|
2215
2296
|
...tabsProps,
|
|
2216
|
-
className: (0,
|
|
2297
|
+
className: (0, import_css37.cx)(tabsProps.className, styles.list),
|
|
2217
2298
|
children: [
|
|
2218
2299
|
children,
|
|
2219
|
-
/* @__PURE__ */ (0,
|
|
2300
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TabIndicator, {})
|
|
2220
2301
|
]
|
|
2221
2302
|
}
|
|
2222
2303
|
);
|
|
@@ -2224,90 +2305,90 @@ function TabsList(props) {
|
|
|
2224
2305
|
var TabList = TabsList;
|
|
2225
2306
|
function Tab(props) {
|
|
2226
2307
|
const { styles } = useTabsContext();
|
|
2227
|
-
return /* @__PURE__ */ (0,
|
|
2308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2228
2309
|
import_tabs2.Tabs.Trigger,
|
|
2229
2310
|
{
|
|
2230
2311
|
...props,
|
|
2231
|
-
className: (0,
|
|
2312
|
+
className: (0, import_css37.cx)(props.className, styles.trigger)
|
|
2232
2313
|
}
|
|
2233
2314
|
);
|
|
2234
2315
|
}
|
|
2235
2316
|
function TabIndicator(props) {
|
|
2236
2317
|
const { styles } = useTabsContext();
|
|
2237
|
-
return /* @__PURE__ */ (0,
|
|
2318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2238
2319
|
import_tabs2.Tabs.Indicator,
|
|
2239
2320
|
{
|
|
2240
2321
|
...props,
|
|
2241
|
-
className: (0,
|
|
2322
|
+
className: (0, import_css37.cx)(props.className, styles.indicator)
|
|
2242
2323
|
}
|
|
2243
2324
|
);
|
|
2244
2325
|
}
|
|
2245
2326
|
function TabPanel(props) {
|
|
2246
2327
|
const { styles } = useTabsContext();
|
|
2247
|
-
return /* @__PURE__ */ (0,
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2248
2329
|
import_tabs2.Tabs.Content,
|
|
2249
2330
|
{
|
|
2250
2331
|
...props,
|
|
2251
|
-
className: (0,
|
|
2332
|
+
className: (0, import_css37.cx)(props.className, styles.content)
|
|
2252
2333
|
}
|
|
2253
2334
|
);
|
|
2254
2335
|
}
|
|
2255
2336
|
|
|
2256
2337
|
// src/components/Table.tsx
|
|
2257
|
-
var
|
|
2258
|
-
var
|
|
2259
|
-
var
|
|
2338
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
2339
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2340
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2260
2341
|
function Table(props) {
|
|
2261
2342
|
const { caption, children, ...nativeProps } = props;
|
|
2262
|
-
const styles = (0,
|
|
2263
|
-
return /* @__PURE__ */ (0,
|
|
2343
|
+
const styles = (0, import_recipes31.table)();
|
|
2344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2264
2345
|
"table",
|
|
2265
2346
|
{
|
|
2266
2347
|
...nativeProps,
|
|
2267
|
-
className: (0,
|
|
2348
|
+
className: (0, import_css38.cx)(nativeProps.className, styles.table),
|
|
2268
2349
|
children: [
|
|
2269
|
-
/* @__PURE__ */ (0,
|
|
2350
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("caption", { className: styles.caption, children: caption }),
|
|
2270
2351
|
children
|
|
2271
2352
|
]
|
|
2272
2353
|
}
|
|
2273
2354
|
) });
|
|
2274
2355
|
}
|
|
2275
2356
|
function Tr(props) {
|
|
2276
|
-
return /* @__PURE__ */ (0,
|
|
2357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("tr", { ...props });
|
|
2277
2358
|
}
|
|
2278
2359
|
|
|
2279
2360
|
// src/components/Thead.tsx
|
|
2280
|
-
var
|
|
2281
|
-
var
|
|
2282
|
-
var
|
|
2361
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
2362
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
2363
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2283
2364
|
function Thead(props) {
|
|
2284
|
-
return /* @__PURE__ */ (0,
|
|
2365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("thead", { ...props, className: (0, import_css39.cx)(props.className, (0, import_recipes32.thead)()) });
|
|
2285
2366
|
}
|
|
2286
2367
|
|
|
2287
2368
|
// src/components/Th.tsx
|
|
2288
|
-
var
|
|
2289
|
-
var
|
|
2290
|
-
var
|
|
2369
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
2370
|
+
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
2371
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2291
2372
|
function Th(props) {
|
|
2292
2373
|
const { size, onClick, ...nativeProps } = props;
|
|
2293
|
-
return /* @__PURE__ */ (0,
|
|
2374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2294
2375
|
Show,
|
|
2295
2376
|
{
|
|
2296
2377
|
when: Boolean(onClick),
|
|
2297
|
-
fallback: /* @__PURE__ */ (0,
|
|
2378
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2298
2379
|
"th",
|
|
2299
2380
|
{
|
|
2300
2381
|
...nativeProps,
|
|
2301
|
-
className: (0,
|
|
2382
|
+
className: (0, import_css40.cx)(nativeProps.className, (0, import_recipes33.th)({ size }))
|
|
2302
2383
|
}
|
|
2303
2384
|
),
|
|
2304
|
-
children: /* @__PURE__ */ (0,
|
|
2385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2305
2386
|
"button",
|
|
2306
2387
|
{
|
|
2307
|
-
className: (0,
|
|
2388
|
+
className: (0, import_css40.cx)(
|
|
2308
2389
|
nativeProps.className,
|
|
2309
|
-
(0,
|
|
2310
|
-
(0,
|
|
2390
|
+
(0, import_recipes33.th)({ size }),
|
|
2391
|
+
(0, import_css40.css)({
|
|
2311
2392
|
alignItems: "center",
|
|
2312
2393
|
display: "inline-flex",
|
|
2313
2394
|
justifyContent: "space-between",
|
|
@@ -2327,18 +2408,18 @@ function Th(props) {
|
|
|
2327
2408
|
}
|
|
2328
2409
|
|
|
2329
2410
|
// src/components/Td.tsx
|
|
2330
|
-
var
|
|
2331
|
-
var
|
|
2332
|
-
var
|
|
2411
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
2412
|
+
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
2413
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2333
2414
|
function Td(props) {
|
|
2334
2415
|
const { size, ...nativeProps } = props;
|
|
2335
|
-
return /* @__PURE__ */ (0,
|
|
2416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2336
2417
|
"td",
|
|
2337
2418
|
{
|
|
2338
2419
|
...nativeProps,
|
|
2339
|
-
className: (0,
|
|
2420
|
+
className: (0, import_css41.cx)(
|
|
2340
2421
|
nativeProps.className,
|
|
2341
|
-
(0,
|
|
2422
|
+
(0, import_recipes34.td)({
|
|
2342
2423
|
size
|
|
2343
2424
|
})
|
|
2344
2425
|
)
|
|
@@ -2347,18 +2428,18 @@ function Td(props) {
|
|
|
2347
2428
|
}
|
|
2348
2429
|
|
|
2349
2430
|
// src/components/Tbody.tsx
|
|
2350
|
-
var
|
|
2351
|
-
var
|
|
2352
|
-
var
|
|
2431
|
+
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
2432
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
2433
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2353
2434
|
function Tbody(props) {
|
|
2354
2435
|
const { decoration, ...nativeProps } = props;
|
|
2355
|
-
return /* @__PURE__ */ (0,
|
|
2436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2356
2437
|
"tbody",
|
|
2357
2438
|
{
|
|
2358
2439
|
...nativeProps,
|
|
2359
|
-
className: (0,
|
|
2440
|
+
className: (0, import_css42.cx)(
|
|
2360
2441
|
nativeProps.className,
|
|
2361
|
-
(0,
|
|
2442
|
+
(0, import_recipes35.tbody)({
|
|
2362
2443
|
decoration
|
|
2363
2444
|
})
|
|
2364
2445
|
)
|
|
@@ -2367,9 +2448,9 @@ function Tbody(props) {
|
|
|
2367
2448
|
}
|
|
2368
2449
|
|
|
2369
2450
|
// src/components/Tag.tsx
|
|
2370
|
-
var
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2451
|
+
var import_css43 = require("@cerberus/styled-system/css");
|
|
2452
|
+
var import_recipes36 = require("@cerberus/styled-system/recipes");
|
|
2453
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2373
2454
|
function Tag(props) {
|
|
2374
2455
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
2375
2456
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -2378,13 +2459,13 @@ function Tag(props) {
|
|
|
2378
2459
|
const closableStyles = isClosable ? closableCss : "";
|
|
2379
2460
|
const { icons } = useCerberusContext();
|
|
2380
2461
|
const { close: Close } = icons;
|
|
2381
|
-
return /* @__PURE__ */ (0,
|
|
2462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2382
2463
|
"span",
|
|
2383
2464
|
{
|
|
2384
2465
|
...nativeProps,
|
|
2385
|
-
className: (0,
|
|
2466
|
+
className: (0, import_css43.cx)(
|
|
2386
2467
|
nativeProps.className,
|
|
2387
|
-
(0,
|
|
2468
|
+
(0, import_recipes36.tag)({
|
|
2388
2469
|
gradient,
|
|
2389
2470
|
palette,
|
|
2390
2471
|
shape,
|
|
@@ -2394,24 +2475,24 @@ function Tag(props) {
|
|
|
2394
2475
|
),
|
|
2395
2476
|
children: [
|
|
2396
2477
|
props.children,
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2398
2479
|
"button",
|
|
2399
2480
|
{
|
|
2400
2481
|
"aria-label": "Close",
|
|
2401
|
-
className: (0,
|
|
2482
|
+
className: (0, import_recipes36.iconButton)({
|
|
2402
2483
|
palette: "action",
|
|
2403
2484
|
usage: "filled",
|
|
2404
2485
|
size: "sm"
|
|
2405
2486
|
}),
|
|
2406
2487
|
onClick,
|
|
2407
|
-
children: /* @__PURE__ */ (0,
|
|
2488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Close, {})
|
|
2408
2489
|
}
|
|
2409
2490
|
) })
|
|
2410
2491
|
]
|
|
2411
2492
|
}
|
|
2412
2493
|
);
|
|
2413
2494
|
}
|
|
2414
|
-
var closableCss = (0,
|
|
2495
|
+
var closableCss = (0, import_css43.css)({
|
|
2415
2496
|
bgColor: "action.bg.active",
|
|
2416
2497
|
color: "action.text.initial",
|
|
2417
2498
|
paddingInlineEnd: "0"
|
|
@@ -2419,53 +2500,53 @@ var closableCss = (0, import_css41.css)({
|
|
|
2419
2500
|
|
|
2420
2501
|
// src/components/Text.tsx
|
|
2421
2502
|
var import_jsx = require("@cerberus/styled-system/jsx");
|
|
2422
|
-
var
|
|
2503
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2423
2504
|
function Text(props) {
|
|
2424
2505
|
const { as = "p", ...pandaJSXProps } = props;
|
|
2425
2506
|
switch (as) {
|
|
2426
2507
|
case "h1":
|
|
2427
|
-
return /* @__PURE__ */ (0,
|
|
2508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H1, { ...pandaJSXProps });
|
|
2428
2509
|
case "h2":
|
|
2429
|
-
return /* @__PURE__ */ (0,
|
|
2510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H2, { ...pandaJSXProps });
|
|
2430
2511
|
case "h3":
|
|
2431
|
-
return /* @__PURE__ */ (0,
|
|
2512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H3, { ...pandaJSXProps });
|
|
2432
2513
|
case "h4":
|
|
2433
|
-
return /* @__PURE__ */ (0,
|
|
2514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H4, { ...pandaJSXProps });
|
|
2434
2515
|
case "h5":
|
|
2435
|
-
return /* @__PURE__ */ (0,
|
|
2516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H5, { ...pandaJSXProps });
|
|
2436
2517
|
case "h6":
|
|
2437
|
-
return /* @__PURE__ */ (0,
|
|
2518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.H6, { ...pandaJSXProps });
|
|
2438
2519
|
case "strong":
|
|
2439
|
-
return /* @__PURE__ */ (0,
|
|
2520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Strong, { ...pandaJSXProps });
|
|
2440
2521
|
case "em":
|
|
2441
|
-
return /* @__PURE__ */ (0,
|
|
2522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Em, { ...pandaJSXProps });
|
|
2442
2523
|
case "small":
|
|
2443
|
-
return /* @__PURE__ */ (0,
|
|
2524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Small, { ...pandaJSXProps });
|
|
2444
2525
|
case "span":
|
|
2445
|
-
return /* @__PURE__ */ (0,
|
|
2526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.Span, { ...pandaJSXProps });
|
|
2446
2527
|
default:
|
|
2447
|
-
return /* @__PURE__ */ (0,
|
|
2528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_jsx.P, { ...pandaJSXProps });
|
|
2448
2529
|
}
|
|
2449
2530
|
}
|
|
2450
2531
|
|
|
2451
2532
|
// src/components/Textarea.tsx
|
|
2452
|
-
var
|
|
2453
|
-
var
|
|
2454
|
-
var
|
|
2533
|
+
var import_css44 = require("@cerberus/styled-system/css");
|
|
2534
|
+
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
2535
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2455
2536
|
function Textarea(props) {
|
|
2456
2537
|
const { describedBy, ...nativeProps } = props;
|
|
2457
2538
|
const { invalid, ...fieldState } = useFieldContext();
|
|
2458
|
-
return /* @__PURE__ */ (0,
|
|
2539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2459
2540
|
"textarea",
|
|
2460
2541
|
{
|
|
2461
2542
|
...nativeProps,
|
|
2462
2543
|
...fieldState,
|
|
2463
2544
|
...describedBy && { "aria-describedby": describedBy },
|
|
2464
2545
|
...invalid && { "aria-invalid": true },
|
|
2465
|
-
className: (0,
|
|
2546
|
+
className: (0, import_css44.cx)(
|
|
2466
2547
|
props.className,
|
|
2467
|
-
(0,
|
|
2468
|
-
(0,
|
|
2548
|
+
(0, import_recipes37.input)().input,
|
|
2549
|
+
(0, import_css44.css)({
|
|
2469
2550
|
pxi: "2",
|
|
2470
2551
|
py: "2",
|
|
2471
2552
|
resize: "vertical"
|
|
@@ -2477,44 +2558,44 @@ function Textarea(props) {
|
|
|
2477
2558
|
}
|
|
2478
2559
|
|
|
2479
2560
|
// src/components/Toggle.tsx
|
|
2480
|
-
var
|
|
2561
|
+
var import_css45 = require("@cerberus/styled-system/css");
|
|
2481
2562
|
var import_patterns14 = require("@cerberus/styled-system/patterns");
|
|
2482
|
-
var
|
|
2483
|
-
var
|
|
2563
|
+
var import_recipes38 = require("@cerberus/styled-system/recipes");
|
|
2564
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2484
2565
|
function Toggle(props) {
|
|
2485
2566
|
const { size, describedBy, ...nativeProps } = props;
|
|
2486
|
-
const styles = (0,
|
|
2567
|
+
const styles = (0, import_recipes38.toggle)({ size });
|
|
2487
2568
|
const { invalid, ...state } = useFieldContext();
|
|
2488
2569
|
const { icons } = useCerberusContext();
|
|
2489
2570
|
const CheckedIcon = icons.toggleChecked;
|
|
2490
|
-
return /* @__PURE__ */ (0,
|
|
2571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2491
2572
|
"span",
|
|
2492
2573
|
{
|
|
2493
|
-
className: (0,
|
|
2574
|
+
className: (0, import_css45.cx)("group", styles.track, (0, import_patterns14.hstack)()),
|
|
2494
2575
|
"data-checked": props.checked || props.defaultChecked,
|
|
2495
2576
|
children: [
|
|
2496
|
-
/* @__PURE__ */ (0,
|
|
2577
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2497
2578
|
"input",
|
|
2498
2579
|
{
|
|
2499
2580
|
...nativeProps,
|
|
2500
2581
|
...state,
|
|
2501
2582
|
...describedBy && { "aria-describedby": describedBy },
|
|
2502
2583
|
...invalid && { "aria-invalid": true },
|
|
2503
|
-
className: (0,
|
|
2584
|
+
className: (0, import_css45.cx)("peer", styles.input),
|
|
2504
2585
|
role: "switch",
|
|
2505
2586
|
type: "checkbox"
|
|
2506
2587
|
}
|
|
2507
2588
|
),
|
|
2508
|
-
/* @__PURE__ */ (0,
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
2509
2590
|
"span",
|
|
2510
2591
|
{
|
|
2511
|
-
className: (0,
|
|
2592
|
+
className: (0, import_css45.cx)(
|
|
2512
2593
|
styles.thumb,
|
|
2513
2594
|
(0, import_patterns14.vstack)({
|
|
2514
2595
|
justify: "center"
|
|
2515
2596
|
})
|
|
2516
2597
|
),
|
|
2517
|
-
children: /* @__PURE__ */ (0,
|
|
2598
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CheckedIcon, {})
|
|
2518
2599
|
}
|
|
2519
2600
|
)
|
|
2520
2601
|
]
|
|
@@ -2524,24 +2605,24 @@ function Toggle(props) {
|
|
|
2524
2605
|
|
|
2525
2606
|
// src/components/Tooltip.tsx
|
|
2526
2607
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
2527
|
-
var
|
|
2528
|
-
var
|
|
2529
|
-
var
|
|
2608
|
+
var import_css46 = require("@cerberus/styled-system/css");
|
|
2609
|
+
var import_recipes39 = require("@cerberus/styled-system/recipes");
|
|
2610
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2530
2611
|
function Tooltip(props) {
|
|
2531
2612
|
const { content, children, asChild, ...nativeProps } = props;
|
|
2532
|
-
const styles = (0,
|
|
2613
|
+
const styles = (0, import_recipes39.tooltip)();
|
|
2533
2614
|
const position = {
|
|
2534
2615
|
placement: props.position || "top"
|
|
2535
2616
|
};
|
|
2536
|
-
return /* @__PURE__ */ (0,
|
|
2537
|
-
/* @__PURE__ */ (0,
|
|
2538
|
-
/* @__PURE__ */ (0,
|
|
2617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
|
|
2618
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
|
|
2619
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
2539
2620
|
import_tooltip.Tooltip.Content,
|
|
2540
2621
|
{
|
|
2541
2622
|
...nativeProps,
|
|
2542
|
-
className: (0,
|
|
2623
|
+
className: (0, import_css46.cx)(nativeProps.className, styles.content),
|
|
2543
2624
|
children: [
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
2625
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
2545
2626
|
content
|
|
2546
2627
|
]
|
|
2547
2628
|
}
|
|
@@ -2550,26 +2631,26 @@ function Tooltip(props) {
|
|
|
2550
2631
|
}
|
|
2551
2632
|
|
|
2552
2633
|
// src/context/confirm-modal.tsx
|
|
2553
|
-
var
|
|
2554
|
-
var
|
|
2634
|
+
var import_react23 = require("react");
|
|
2635
|
+
var import_css47 = require("@cerberus/styled-system/css");
|
|
2555
2636
|
var import_patterns15 = require("@cerberus/styled-system/patterns");
|
|
2556
2637
|
|
|
2557
2638
|
// src/hooks/useModal.ts
|
|
2558
|
-
var
|
|
2639
|
+
var import_react22 = require("react");
|
|
2559
2640
|
function useModal() {
|
|
2560
|
-
const modalRef = (0,
|
|
2561
|
-
const [isOpen, setIsOpen] = (0,
|
|
2562
|
-
const show = (0,
|
|
2641
|
+
const modalRef = (0, import_react22.useRef)(null);
|
|
2642
|
+
const [isOpen, setIsOpen] = (0, import_react22.useState)(false);
|
|
2643
|
+
const show = (0, import_react22.useCallback)(() => {
|
|
2563
2644
|
var _a;
|
|
2564
2645
|
(_a = modalRef.current) == null ? void 0 : _a.showModal();
|
|
2565
2646
|
setIsOpen(true);
|
|
2566
2647
|
}, []);
|
|
2567
|
-
const close = (0,
|
|
2648
|
+
const close = (0, import_react22.useCallback)(() => {
|
|
2568
2649
|
var _a;
|
|
2569
2650
|
(_a = modalRef.current) == null ? void 0 : _a.close();
|
|
2570
2651
|
setIsOpen(false);
|
|
2571
2652
|
}, []);
|
|
2572
|
-
return (0,
|
|
2653
|
+
return (0, import_react22.useMemo)(() => {
|
|
2573
2654
|
return {
|
|
2574
2655
|
modalRef,
|
|
2575
2656
|
show,
|
|
@@ -2581,21 +2662,21 @@ function useModal() {
|
|
|
2581
2662
|
|
|
2582
2663
|
// src/context/confirm-modal.tsx
|
|
2583
2664
|
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
2584
|
-
var
|
|
2585
|
-
var ConfirmModalContext = (0,
|
|
2665
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2666
|
+
var ConfirmModalContext = (0, import_react23.createContext)(null);
|
|
2586
2667
|
function ConfirmModal(props) {
|
|
2587
2668
|
const { modalRef, show, close } = useModal();
|
|
2588
|
-
const resolveRef = (0,
|
|
2589
|
-
const [content, setContent] = (0,
|
|
2669
|
+
const resolveRef = (0, import_react23.useRef)(null);
|
|
2670
|
+
const [content, setContent] = (0, import_react23.useState)(null);
|
|
2590
2671
|
const focusTrap = trapFocus(modalRef);
|
|
2591
2672
|
const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
|
|
2592
2673
|
const { icons } = useCerberusContext();
|
|
2593
2674
|
const { confirmModal: ConfirmIcon } = icons;
|
|
2594
|
-
const palette = (0,
|
|
2675
|
+
const palette = (0, import_react23.useMemo)(
|
|
2595
2676
|
() => kind === "destructive" ? "danger" : "action",
|
|
2596
2677
|
[kind]
|
|
2597
2678
|
);
|
|
2598
|
-
const handleChoice = (0,
|
|
2679
|
+
const handleChoice = (0, import_react23.useCallback)(
|
|
2599
2680
|
(e) => {
|
|
2600
2681
|
var _a, _b;
|
|
2601
2682
|
const target = e.currentTarget;
|
|
@@ -2607,7 +2688,7 @@ function ConfirmModal(props) {
|
|
|
2607
2688
|
},
|
|
2608
2689
|
[close]
|
|
2609
2690
|
);
|
|
2610
|
-
const handleShow = (0,
|
|
2691
|
+
const handleShow = (0, import_react23.useCallback)(
|
|
2611
2692
|
(options) => {
|
|
2612
2693
|
return new Promise((resolve) => {
|
|
2613
2694
|
setContent({ ...options });
|
|
@@ -2617,42 +2698,42 @@ function ConfirmModal(props) {
|
|
|
2617
2698
|
},
|
|
2618
2699
|
[show]
|
|
2619
2700
|
);
|
|
2620
|
-
const value = (0,
|
|
2701
|
+
const value = (0, import_react23.useMemo)(
|
|
2621
2702
|
() => ({
|
|
2622
2703
|
show: handleShow
|
|
2623
2704
|
}),
|
|
2624
2705
|
[handleShow]
|
|
2625
2706
|
);
|
|
2626
|
-
return /* @__PURE__ */ (0,
|
|
2707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2627
2708
|
props.children,
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
2629
|
-
/* @__PURE__ */ (0,
|
|
2630
|
-
/* @__PURE__ */ (0,
|
|
2709
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx2.VStack, { gap: "xl", w: "full", children: [
|
|
2710
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(ModalHeader, { children: [
|
|
2711
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2631
2712
|
"div",
|
|
2632
2713
|
{
|
|
2633
2714
|
className: (0, import_patterns15.hstack)({
|
|
2634
2715
|
justify: "center",
|
|
2635
2716
|
w: "full"
|
|
2636
2717
|
}),
|
|
2637
|
-
children: /* @__PURE__ */ (0,
|
|
2718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2638
2719
|
Show,
|
|
2639
2720
|
{
|
|
2640
2721
|
when: palette === "danger",
|
|
2641
|
-
fallback: /* @__PURE__ */ (0,
|
|
2722
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2642
2723
|
Avatar,
|
|
2643
2724
|
{
|
|
2644
2725
|
ariaLabel: "",
|
|
2645
2726
|
gradient: "charon-light",
|
|
2646
|
-
icon: /* @__PURE__ */ (0,
|
|
2727
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ConfirmIcon, { size: 24 }),
|
|
2647
2728
|
src: ""
|
|
2648
2729
|
}
|
|
2649
2730
|
),
|
|
2650
|
-
children: /* @__PURE__ */ (0,
|
|
2731
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2651
2732
|
Avatar,
|
|
2652
2733
|
{
|
|
2653
2734
|
ariaLabel: "",
|
|
2654
2735
|
gradient: "hades-dark",
|
|
2655
|
-
icon: /* @__PURE__ */ (0,
|
|
2736
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ConfirmIcon, { size: 24 }),
|
|
2656
2737
|
src: ""
|
|
2657
2738
|
}
|
|
2658
2739
|
)
|
|
@@ -2660,15 +2741,15 @@ function ConfirmModal(props) {
|
|
|
2660
2741
|
)
|
|
2661
2742
|
}
|
|
2662
2743
|
),
|
|
2663
|
-
/* @__PURE__ */ (0,
|
|
2664
|
-
/* @__PURE__ */ (0,
|
|
2744
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2745
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2665
2746
|
] }),
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2667
|
-
/* @__PURE__ */ (0,
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx2.HStack, { gap: "4", w: "full", children: [
|
|
2748
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2668
2749
|
Button,
|
|
2669
2750
|
{
|
|
2670
2751
|
autoFocus: true,
|
|
2671
|
-
className: (0,
|
|
2752
|
+
className: (0, import_css47.css)({
|
|
2672
2753
|
w: "1/2"
|
|
2673
2754
|
}),
|
|
2674
2755
|
name: "confirm",
|
|
@@ -2678,10 +2759,10 @@ function ConfirmModal(props) {
|
|
|
2678
2759
|
children: content == null ? void 0 : content.actionText
|
|
2679
2760
|
}
|
|
2680
2761
|
),
|
|
2681
|
-
/* @__PURE__ */ (0,
|
|
2762
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2682
2763
|
Button,
|
|
2683
2764
|
{
|
|
2684
|
-
className: (0,
|
|
2765
|
+
className: (0, import_css47.css)({
|
|
2685
2766
|
w: "1/2"
|
|
2686
2767
|
}),
|
|
2687
2768
|
name: "cancel",
|
|
@@ -2696,7 +2777,7 @@ function ConfirmModal(props) {
|
|
|
2696
2777
|
] });
|
|
2697
2778
|
}
|
|
2698
2779
|
function useConfirmModal() {
|
|
2699
|
-
const context = (0,
|
|
2780
|
+
const context = (0, import_react23.useContext)(ConfirmModalContext);
|
|
2700
2781
|
if (context === null) {
|
|
2701
2782
|
throw new Error(
|
|
2702
2783
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -2706,21 +2787,21 @@ function useConfirmModal() {
|
|
|
2706
2787
|
}
|
|
2707
2788
|
|
|
2708
2789
|
// src/context/cta-modal.tsx
|
|
2709
|
-
var
|
|
2790
|
+
var import_react24 = require("react");
|
|
2710
2791
|
var import_jsx3 = require("@cerberus/styled-system/jsx");
|
|
2711
|
-
var
|
|
2792
|
+
var import_css48 = require("@cerberus/styled-system/css");
|
|
2712
2793
|
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
2713
|
-
var
|
|
2714
|
-
var CTAModalContext = (0,
|
|
2794
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
2795
|
+
var CTAModalContext = (0, import_react24.createContext)(null);
|
|
2715
2796
|
function CTAModal(props) {
|
|
2716
2797
|
var _a, _b;
|
|
2717
2798
|
const { modalRef, show, close } = useModal();
|
|
2718
|
-
const [content, setContent] = (0,
|
|
2799
|
+
const [content, setContent] = (0, import_react24.useState)(null);
|
|
2719
2800
|
const focusTrap = trapFocus(modalRef);
|
|
2720
2801
|
const confirmIcon = content == null ? void 0 : content.icon;
|
|
2721
2802
|
const { icons } = useCerberusContext();
|
|
2722
2803
|
const { close: CloseIcon, confirmModal: FallbackIcon } = icons;
|
|
2723
|
-
const handleShow = (0,
|
|
2804
|
+
const handleShow = (0, import_react24.useCallback)(
|
|
2724
2805
|
(options) => {
|
|
2725
2806
|
const maxActions = 2;
|
|
2726
2807
|
if (options.actions.length > maxActions) {
|
|
@@ -2733,7 +2814,7 @@ function CTAModal(props) {
|
|
|
2733
2814
|
},
|
|
2734
2815
|
[show]
|
|
2735
2816
|
);
|
|
2736
|
-
const handleActionClick = (0,
|
|
2817
|
+
const handleActionClick = (0, import_react24.useCallback)(
|
|
2737
2818
|
(event) => {
|
|
2738
2819
|
const index = event.currentTarget.getAttribute("data-index");
|
|
2739
2820
|
const action = content == null ? void 0 : content.actions[Number(index)];
|
|
@@ -2743,54 +2824,54 @@ function CTAModal(props) {
|
|
|
2743
2824
|
},
|
|
2744
2825
|
[content, close]
|
|
2745
2826
|
);
|
|
2746
|
-
const value = (0,
|
|
2827
|
+
const value = (0, import_react24.useMemo)(
|
|
2747
2828
|
() => ({
|
|
2748
2829
|
show: handleShow
|
|
2749
2830
|
}),
|
|
2750
2831
|
[handleShow]
|
|
2751
2832
|
);
|
|
2752
|
-
return /* @__PURE__ */ (0,
|
|
2833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
2753
2834
|
props.children,
|
|
2754
|
-
/* @__PURE__ */ (0,
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
2836
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2756
2837
|
"span",
|
|
2757
2838
|
{
|
|
2758
|
-
className: (0,
|
|
2839
|
+
className: (0, import_css48.css)({
|
|
2759
2840
|
padding: "md",
|
|
2760
2841
|
position: "absolute",
|
|
2761
2842
|
right: 0,
|
|
2762
2843
|
top: 0,
|
|
2763
2844
|
zIndex: "decorator"
|
|
2764
2845
|
}),
|
|
2765
|
-
children: /* @__PURE__ */ (0,
|
|
2846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(IconButton, { ariaLabel: "Close modal", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(CloseIcon, {}) })
|
|
2766
2847
|
}
|
|
2767
2848
|
),
|
|
2768
|
-
/* @__PURE__ */ (0,
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
|
|
2850
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ModalHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2771
2852
|
Avatar,
|
|
2772
2853
|
{
|
|
2773
2854
|
ariaLabel: "",
|
|
2774
2855
|
gradient: "charon-light",
|
|
2775
|
-
icon: /* @__PURE__ */ (0,
|
|
2856
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2776
2857
|
Show,
|
|
2777
2858
|
{
|
|
2778
2859
|
when: Boolean(confirmIcon),
|
|
2779
|
-
fallback: /* @__PURE__ */ (0,
|
|
2860
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FallbackIcon, { size: 24 }),
|
|
2780
2861
|
children: confirmIcon
|
|
2781
2862
|
}
|
|
2782
2863
|
),
|
|
2783
2864
|
src: ""
|
|
2784
2865
|
}
|
|
2785
2866
|
),
|
|
2786
|
-
/* @__PURE__ */ (0,
|
|
2787
|
-
/* @__PURE__ */ (0,
|
|
2867
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2868
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2788
2869
|
] }) }),
|
|
2789
|
-
/* @__PURE__ */ (0,
|
|
2870
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx3.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Show, { when: Boolean((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.length), children: (_b = content == null ? void 0 : content.actions) == null ? void 0 : _b.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2790
2871
|
Button,
|
|
2791
2872
|
{
|
|
2792
2873
|
"data-index": index,
|
|
2793
|
-
className: (0,
|
|
2874
|
+
className: (0, import_css48.css)({
|
|
2794
2875
|
w: "1/2"
|
|
2795
2876
|
}),
|
|
2796
2877
|
onClick: handleActionClick,
|
|
@@ -2805,7 +2886,7 @@ function CTAModal(props) {
|
|
|
2805
2886
|
] });
|
|
2806
2887
|
}
|
|
2807
2888
|
function useCTAModal() {
|
|
2808
|
-
const context = (0,
|
|
2889
|
+
const context = (0, import_react24.useContext)(CTAModalContext);
|
|
2809
2890
|
if (context === null) {
|
|
2810
2891
|
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
2811
2892
|
}
|
|
@@ -2813,10 +2894,10 @@ function useCTAModal() {
|
|
|
2813
2894
|
}
|
|
2814
2895
|
|
|
2815
2896
|
// src/context/notification-center.tsx
|
|
2816
|
-
var
|
|
2897
|
+
var import_react25 = require("react");
|
|
2817
2898
|
var import_patterns16 = require("@cerberus/styled-system/patterns");
|
|
2818
|
-
var
|
|
2819
|
-
var
|
|
2899
|
+
var import_recipes40 = require("@cerberus/styled-system/recipes");
|
|
2900
|
+
var import_css49 = require("@cerberus/styled-system/css");
|
|
2820
2901
|
|
|
2821
2902
|
// src/context/notification-center/store.ts
|
|
2822
2903
|
function notificationCenterReducer(state, action) {
|
|
@@ -2849,28 +2930,28 @@ function clearNotificationState(dispatch) {
|
|
|
2849
2930
|
}
|
|
2850
2931
|
|
|
2851
2932
|
// src/context/notification-center.tsx
|
|
2852
|
-
var
|
|
2853
|
-
var NotificationsContext = (0,
|
|
2933
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
2934
|
+
var NotificationsContext = (0, import_react25.createContext)(null);
|
|
2854
2935
|
function NotificationCenter(props) {
|
|
2855
|
-
const [state, dispatch] = (0,
|
|
2856
|
-
const styles = (0,
|
|
2857
|
-
const timeout = (0,
|
|
2936
|
+
const [state, dispatch] = (0, import_react25.useReducer)(notificationCenterReducer, []);
|
|
2937
|
+
const styles = (0, import_recipes40.notification)();
|
|
2938
|
+
const timeout = (0, import_react25.useMemo)(
|
|
2858
2939
|
() => props.duration || 6e3,
|
|
2859
2940
|
[props.duration]
|
|
2860
2941
|
);
|
|
2861
|
-
const closeNotification = (0,
|
|
2942
|
+
const closeNotification = (0, import_react25.useCallback)(
|
|
2862
2943
|
(id) => {
|
|
2863
2944
|
updateNotificationState(dispatch, {
|
|
2864
2945
|
id,
|
|
2865
2946
|
state: "closed"
|
|
2866
2947
|
});
|
|
2867
|
-
setTimeout(() => {
|
|
2948
|
+
window.setTimeout(() => {
|
|
2868
2949
|
removeNotification(dispatch, id);
|
|
2869
2950
|
}, 150);
|
|
2870
2951
|
},
|
|
2871
2952
|
[dispatch]
|
|
2872
2953
|
);
|
|
2873
|
-
const handleNotify = (0,
|
|
2954
|
+
const handleNotify = (0, import_react25.useCallback)(
|
|
2874
2955
|
(options) => {
|
|
2875
2956
|
const id = `${options.palette}:${state.length + 1}`;
|
|
2876
2957
|
addNotification(dispatch, {
|
|
@@ -2878,38 +2959,38 @@ function NotificationCenter(props) {
|
|
|
2878
2959
|
id,
|
|
2879
2960
|
state: "open"
|
|
2880
2961
|
});
|
|
2881
|
-
setTimeout(() => {
|
|
2962
|
+
window.setTimeout(() => {
|
|
2882
2963
|
closeNotification(id);
|
|
2883
2964
|
}, timeout);
|
|
2884
2965
|
},
|
|
2885
2966
|
[dispatch, state, timeout, closeNotification]
|
|
2886
2967
|
);
|
|
2887
|
-
const handleClose = (0,
|
|
2968
|
+
const handleClose = (0, import_react25.useCallback)(
|
|
2888
2969
|
(e) => {
|
|
2889
2970
|
const target = e.currentTarget;
|
|
2890
2971
|
closeNotification(target.value);
|
|
2891
2972
|
},
|
|
2892
2973
|
[closeNotification]
|
|
2893
2974
|
);
|
|
2894
|
-
const handleCloseAll = (0,
|
|
2975
|
+
const handleCloseAll = (0, import_react25.useCallback)(() => {
|
|
2895
2976
|
state.forEach((item) => {
|
|
2896
2977
|
if (item.onClose) item.onClose();
|
|
2897
2978
|
});
|
|
2898
2979
|
clearNotificationState(dispatch);
|
|
2899
2980
|
}, [state, dispatch]);
|
|
2900
|
-
const value = (0,
|
|
2981
|
+
const value = (0, import_react25.useMemo)(
|
|
2901
2982
|
() => ({
|
|
2902
2983
|
notify: handleNotify
|
|
2903
2984
|
}),
|
|
2904
2985
|
[handleNotify]
|
|
2905
2986
|
);
|
|
2906
|
-
return /* @__PURE__ */ (0,
|
|
2987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2907
2988
|
props.children,
|
|
2908
|
-
/* @__PURE__ */ (0,
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
2989
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Show, { when: state.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: styles.center, children: [
|
|
2990
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Show, { when: state.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2910
2991
|
Button,
|
|
2911
2992
|
{
|
|
2912
|
-
className: (0,
|
|
2993
|
+
className: (0, import_css49.cx)(styles.closeAll, (0, import_patterns16.animateIn)()),
|
|
2913
2994
|
onClick: handleCloseAll,
|
|
2914
2995
|
palette: "action",
|
|
2915
2996
|
shape: "rounded",
|
|
@@ -2918,7 +2999,7 @@ function NotificationCenter(props) {
|
|
|
2918
2999
|
children: "Close all"
|
|
2919
3000
|
}
|
|
2920
3001
|
) }),
|
|
2921
|
-
/* @__PURE__ */ (0,
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2922
3003
|
"div",
|
|
2923
3004
|
{
|
|
2924
3005
|
className: (0, import_patterns16.vstack)({
|
|
@@ -2928,7 +3009,7 @@ function NotificationCenter(props) {
|
|
|
2928
3009
|
style: {
|
|
2929
3010
|
alignItems: "flex-end"
|
|
2930
3011
|
},
|
|
2931
|
-
children: state.map((option) => /* @__PURE__ */ (0,
|
|
3012
|
+
children: state.map((option) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2932
3013
|
MatchNotification,
|
|
2933
3014
|
{
|
|
2934
3015
|
...option,
|
|
@@ -2944,7 +3025,7 @@ function NotificationCenter(props) {
|
|
|
2944
3025
|
}
|
|
2945
3026
|
function MatchNotification(props) {
|
|
2946
3027
|
const { palette, id, onClose, heading, description, open } = props;
|
|
2947
|
-
const sharedProps = (0,
|
|
3028
|
+
const sharedProps = (0, import_react25.useMemo)(
|
|
2948
3029
|
() => ({
|
|
2949
3030
|
id,
|
|
2950
3031
|
open: true,
|
|
@@ -2955,30 +3036,30 @@ function MatchNotification(props) {
|
|
|
2955
3036
|
);
|
|
2956
3037
|
switch (palette) {
|
|
2957
3038
|
case "success":
|
|
2958
|
-
return /* @__PURE__ */ (0,
|
|
2959
|
-
/* @__PURE__ */ (0,
|
|
2960
|
-
/* @__PURE__ */ (0,
|
|
3039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "success", children: [
|
|
3040
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
3041
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2961
3042
|
] });
|
|
2962
3043
|
case "warning":
|
|
2963
|
-
return /* @__PURE__ */ (0,
|
|
2964
|
-
/* @__PURE__ */ (0,
|
|
2965
|
-
/* @__PURE__ */ (0,
|
|
3044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "warning", children: [
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
3046
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2966
3047
|
] });
|
|
2967
3048
|
case "danger":
|
|
2968
|
-
return /* @__PURE__ */ (0,
|
|
2969
|
-
/* @__PURE__ */ (0,
|
|
2970
|
-
/* @__PURE__ */ (0,
|
|
3049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "danger", children: [
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2971
3052
|
] });
|
|
2972
3053
|
case "info":
|
|
2973
3054
|
default:
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
2975
|
-
/* @__PURE__ */ (0,
|
|
2976
|
-
/* @__PURE__ */ (0,
|
|
3055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Notification, { ...sharedProps, palette: "info", children: [
|
|
3056
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
3057
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2977
3058
|
] });
|
|
2978
3059
|
}
|
|
2979
3060
|
}
|
|
2980
3061
|
function useNotificationCenter() {
|
|
2981
|
-
const context = (0,
|
|
3062
|
+
const context = (0, import_react25.useContext)(NotificationsContext);
|
|
2982
3063
|
if (!context) {
|
|
2983
3064
|
throw new Error(
|
|
2984
3065
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -2988,34 +3069,34 @@ function useNotificationCenter() {
|
|
|
2988
3069
|
}
|
|
2989
3070
|
|
|
2990
3071
|
// src/context/prompt-modal.tsx
|
|
2991
|
-
var
|
|
2992
|
-
var
|
|
3072
|
+
var import_react26 = require("react");
|
|
3073
|
+
var import_css50 = require("@cerberus/styled-system/css");
|
|
2993
3074
|
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2994
|
-
var
|
|
2995
|
-
var PromptModalContext = (0,
|
|
3075
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3076
|
+
var PromptModalContext = (0, import_react26.createContext)(null);
|
|
2996
3077
|
function PromptModal(props) {
|
|
2997
3078
|
const { modalRef, show, close } = useModal();
|
|
2998
|
-
const resolveRef = (0,
|
|
2999
|
-
const [content, setContent] = (0,
|
|
3000
|
-
const [inputValue, setInputValue] = (0,
|
|
3079
|
+
const resolveRef = (0, import_react26.useRef)(null);
|
|
3080
|
+
const [content, setContent] = (0, import_react26.useState)(null);
|
|
3081
|
+
const [inputValue, setInputValue] = (0, import_react26.useState)("");
|
|
3001
3082
|
const focusTrap = trapFocus(modalRef);
|
|
3002
3083
|
const { icons } = useCerberusContext();
|
|
3003
3084
|
const { promptModal: PromptIcon } = icons;
|
|
3004
|
-
const isValid = (0,
|
|
3085
|
+
const isValid = (0, import_react26.useMemo)(
|
|
3005
3086
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
3006
3087
|
[inputValue, content]
|
|
3007
3088
|
);
|
|
3008
|
-
const palette = (0,
|
|
3089
|
+
const palette = (0, import_react26.useMemo)(
|
|
3009
3090
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
3010
3091
|
[content]
|
|
3011
3092
|
);
|
|
3012
|
-
const handleChange = (0,
|
|
3093
|
+
const handleChange = (0, import_react26.useCallback)(
|
|
3013
3094
|
(e) => {
|
|
3014
3095
|
setInputValue(e.currentTarget.value);
|
|
3015
3096
|
},
|
|
3016
3097
|
[content]
|
|
3017
3098
|
);
|
|
3018
|
-
const handleChoice = (0,
|
|
3099
|
+
const handleChoice = (0, import_react26.useCallback)(
|
|
3019
3100
|
(e) => {
|
|
3020
3101
|
var _a;
|
|
3021
3102
|
const target = e.currentTarget;
|
|
@@ -3026,7 +3107,7 @@ function PromptModal(props) {
|
|
|
3026
3107
|
},
|
|
3027
3108
|
[inputValue, close]
|
|
3028
3109
|
);
|
|
3029
|
-
const handleShow = (0,
|
|
3110
|
+
const handleShow = (0, import_react26.useCallback)(
|
|
3030
3111
|
(options) => {
|
|
3031
3112
|
return new Promise((resolve) => {
|
|
3032
3113
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -3036,42 +3117,42 @@ function PromptModal(props) {
|
|
|
3036
3117
|
},
|
|
3037
3118
|
[show]
|
|
3038
3119
|
);
|
|
3039
|
-
const value = (0,
|
|
3120
|
+
const value = (0, import_react26.useMemo)(
|
|
3040
3121
|
() => ({
|
|
3041
3122
|
show: handleShow
|
|
3042
3123
|
}),
|
|
3043
3124
|
[handleShow]
|
|
3044
3125
|
);
|
|
3045
|
-
return /* @__PURE__ */ (0,
|
|
3126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
3046
3127
|
props.children,
|
|
3047
|
-
/* @__PURE__ */ (0,
|
|
3048
|
-
/* @__PURE__ */ (0,
|
|
3049
|
-
/* @__PURE__ */ (0,
|
|
3128
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(ModalHeader, { children: [
|
|
3130
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3050
3131
|
"div",
|
|
3051
3132
|
{
|
|
3052
3133
|
className: (0, import_patterns17.hstack)({
|
|
3053
3134
|
justify: "center",
|
|
3054
3135
|
w: "full"
|
|
3055
3136
|
}),
|
|
3056
|
-
children: /* @__PURE__ */ (0,
|
|
3137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3057
3138
|
Show,
|
|
3058
3139
|
{
|
|
3059
3140
|
when: palette === "danger",
|
|
3060
|
-
fallback: /* @__PURE__ */ (0,
|
|
3141
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3061
3142
|
Avatar,
|
|
3062
3143
|
{
|
|
3063
3144
|
ariaLabel: "",
|
|
3064
3145
|
gradient: "charon-light",
|
|
3065
|
-
icon: /* @__PURE__ */ (0,
|
|
3146
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(PromptIcon, { size: 24 }),
|
|
3066
3147
|
src: ""
|
|
3067
3148
|
}
|
|
3068
3149
|
),
|
|
3069
|
-
children: /* @__PURE__ */ (0,
|
|
3150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3070
3151
|
Avatar,
|
|
3071
3152
|
{
|
|
3072
3153
|
ariaLabel: "",
|
|
3073
3154
|
gradient: "hades-dark",
|
|
3074
|
-
icon: /* @__PURE__ */ (0,
|
|
3155
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(PromptIcon, { size: 24 }),
|
|
3075
3156
|
src: ""
|
|
3076
3157
|
}
|
|
3077
3158
|
)
|
|
@@ -3079,10 +3160,10 @@ function PromptModal(props) {
|
|
|
3079
3160
|
)
|
|
3080
3161
|
}
|
|
3081
3162
|
),
|
|
3082
|
-
/* @__PURE__ */ (0,
|
|
3083
|
-
/* @__PURE__ */ (0,
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
3084
3165
|
] }),
|
|
3085
|
-
/* @__PURE__ */ (0,
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3086
3167
|
"div",
|
|
3087
3168
|
{
|
|
3088
3169
|
className: (0, import_patterns17.vstack)({
|
|
@@ -3090,11 +3171,11 @@ function PromptModal(props) {
|
|
|
3090
3171
|
mt: "4",
|
|
3091
3172
|
mb: "8"
|
|
3092
3173
|
}),
|
|
3093
|
-
children: /* @__PURE__ */ (0,
|
|
3094
|
-
/* @__PURE__ */ (0,
|
|
3174
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Field, { invalid: !isValid, children: [
|
|
3175
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
3095
3176
|
Label,
|
|
3096
3177
|
{
|
|
3097
|
-
className: (0,
|
|
3178
|
+
className: (0, import_css50.css)({
|
|
3098
3179
|
gap: 1,
|
|
3099
3180
|
justifyContent: "flex-start"
|
|
3100
3181
|
}),
|
|
@@ -3102,10 +3183,10 @@ function PromptModal(props) {
|
|
|
3102
3183
|
size: "md",
|
|
3103
3184
|
children: [
|
|
3104
3185
|
"Type",
|
|
3105
|
-
/* @__PURE__ */ (0,
|
|
3186
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3106
3187
|
"strong",
|
|
3107
3188
|
{
|
|
3108
|
-
className: (0,
|
|
3189
|
+
className: (0, import_css50.css)({
|
|
3109
3190
|
textTransform: "uppercase"
|
|
3110
3191
|
}),
|
|
3111
3192
|
children: content == null ? void 0 : content.key
|
|
@@ -3115,7 +3196,7 @@ function PromptModal(props) {
|
|
|
3115
3196
|
]
|
|
3116
3197
|
}
|
|
3117
3198
|
),
|
|
3118
|
-
/* @__PURE__ */ (0,
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3119
3200
|
Input,
|
|
3120
3201
|
{
|
|
3121
3202
|
id: "confirm",
|
|
@@ -3127,7 +3208,7 @@ function PromptModal(props) {
|
|
|
3127
3208
|
] })
|
|
3128
3209
|
}
|
|
3129
3210
|
),
|
|
3130
|
-
/* @__PURE__ */ (0,
|
|
3211
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
3131
3212
|
"div",
|
|
3132
3213
|
{
|
|
3133
3214
|
className: (0, import_patterns17.hstack)({
|
|
@@ -3135,11 +3216,11 @@ function PromptModal(props) {
|
|
|
3135
3216
|
gap: "4"
|
|
3136
3217
|
}),
|
|
3137
3218
|
children: [
|
|
3138
|
-
/* @__PURE__ */ (0,
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3139
3220
|
Button,
|
|
3140
3221
|
{
|
|
3141
3222
|
autoFocus: true,
|
|
3142
|
-
className: (0,
|
|
3223
|
+
className: (0, import_css50.css)({
|
|
3143
3224
|
w: "1/2"
|
|
3144
3225
|
}),
|
|
3145
3226
|
disabled: !isValid,
|
|
@@ -3150,10 +3231,10 @@ function PromptModal(props) {
|
|
|
3150
3231
|
children: content == null ? void 0 : content.actionText
|
|
3151
3232
|
}
|
|
3152
3233
|
),
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3234
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3154
3235
|
Button,
|
|
3155
3236
|
{
|
|
3156
|
-
className: (0,
|
|
3237
|
+
className: (0, import_css50.css)({
|
|
3157
3238
|
w: "1/2"
|
|
3158
3239
|
}),
|
|
3159
3240
|
name: "cancel",
|
|
@@ -3170,7 +3251,7 @@ function PromptModal(props) {
|
|
|
3170
3251
|
] });
|
|
3171
3252
|
}
|
|
3172
3253
|
function usePromptModal() {
|
|
3173
|
-
const context = (0,
|
|
3254
|
+
const context = (0, import_react26.useContext)(PromptModalContext);
|
|
3174
3255
|
if (context === null) {
|
|
3175
3256
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
3176
3257
|
}
|
|
@@ -3178,50 +3259,50 @@ function usePromptModal() {
|
|
|
3178
3259
|
}
|
|
3179
3260
|
|
|
3180
3261
|
// src/context/theme.tsx
|
|
3181
|
-
var
|
|
3262
|
+
var import_react28 = require("react");
|
|
3182
3263
|
|
|
3183
3264
|
// src/hooks/useTheme.ts
|
|
3184
|
-
var
|
|
3265
|
+
var import_react27 = require("react");
|
|
3185
3266
|
var THEME_KEY = "cerberus-theme";
|
|
3186
3267
|
var MODE_KEY = "cerberus-mode";
|
|
3187
3268
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
3188
3269
|
const { updateMode, updateTheme, cache } = options;
|
|
3189
|
-
const [theme, setTheme] = (0,
|
|
3190
|
-
const [colorMode, setColorMode] = (0,
|
|
3191
|
-
const handleThemeChange = (0,
|
|
3270
|
+
const [theme, setTheme] = (0, import_react27.useState)(defaultTheme);
|
|
3271
|
+
const [colorMode, setColorMode] = (0, import_react27.useState)(defaultColorMode);
|
|
3272
|
+
const handleThemeChange = (0, import_react27.useCallback)(
|
|
3192
3273
|
(newTheme) => {
|
|
3193
3274
|
setTheme(newTheme);
|
|
3194
3275
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
3195
3276
|
},
|
|
3196
3277
|
[updateTheme]
|
|
3197
3278
|
);
|
|
3198
|
-
const handleColorModeChange = (0,
|
|
3279
|
+
const handleColorModeChange = (0, import_react27.useCallback)(
|
|
3199
3280
|
(newMode) => {
|
|
3200
3281
|
setColorMode(newMode);
|
|
3201
3282
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
3202
3283
|
},
|
|
3203
3284
|
[updateMode]
|
|
3204
3285
|
);
|
|
3205
|
-
(0,
|
|
3286
|
+
(0, import_react27.useLayoutEffect)(() => {
|
|
3206
3287
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
3207
3288
|
if (theme2) {
|
|
3208
3289
|
setTheme(theme2);
|
|
3209
3290
|
}
|
|
3210
3291
|
}, []);
|
|
3211
|
-
(0,
|
|
3292
|
+
(0, import_react27.useLayoutEffect)(() => {
|
|
3212
3293
|
const mode = localStorage.getItem(MODE_KEY);
|
|
3213
3294
|
if (mode) {
|
|
3214
3295
|
setColorMode(mode);
|
|
3215
3296
|
}
|
|
3216
3297
|
}, []);
|
|
3217
|
-
(0,
|
|
3298
|
+
(0, import_react27.useEffect)(() => {
|
|
3218
3299
|
const root = document.documentElement;
|
|
3219
3300
|
root.dataset.pandaTheme = theme;
|
|
3220
3301
|
if (cache) {
|
|
3221
3302
|
localStorage.setItem(THEME_KEY, theme);
|
|
3222
3303
|
}
|
|
3223
3304
|
}, [theme, cache]);
|
|
3224
|
-
(0,
|
|
3305
|
+
(0, import_react27.useEffect)(() => {
|
|
3225
3306
|
const root = document.documentElement;
|
|
3226
3307
|
if (colorMode === "system") {
|
|
3227
3308
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -3232,7 +3313,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3232
3313
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
3233
3314
|
}
|
|
3234
3315
|
}, [colorMode, cache]);
|
|
3235
|
-
return (0,
|
|
3316
|
+
return (0, import_react27.useMemo)(
|
|
3236
3317
|
() => ({
|
|
3237
3318
|
theme,
|
|
3238
3319
|
mode: colorMode,
|
|
@@ -3244,8 +3325,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3244
3325
|
}
|
|
3245
3326
|
|
|
3246
3327
|
// src/context/theme.tsx
|
|
3247
|
-
var
|
|
3248
|
-
var ThemeContext = (0,
|
|
3328
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3329
|
+
var ThemeContext = (0, import_react28.createContext)(
|
|
3249
3330
|
null
|
|
3250
3331
|
);
|
|
3251
3332
|
function ThemeProvider(props) {
|
|
@@ -3254,10 +3335,10 @@ function ThemeProvider(props) {
|
|
|
3254
3335
|
updateMode: props.updateMode,
|
|
3255
3336
|
updateTheme: props.updateTheme
|
|
3256
3337
|
});
|
|
3257
|
-
return /* @__PURE__ */ (0,
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
3258
3339
|
}
|
|
3259
3340
|
function useThemeContext() {
|
|
3260
|
-
const context = (0,
|
|
3341
|
+
const context = (0, import_react28.useContext)(ThemeContext);
|
|
3261
3342
|
if (!context) {
|
|
3262
3343
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
3263
3344
|
}
|
|
@@ -3265,13 +3346,13 @@ function useThemeContext() {
|
|
|
3265
3346
|
}
|
|
3266
3347
|
|
|
3267
3348
|
// src/hooks/useDate.ts
|
|
3268
|
-
var
|
|
3349
|
+
var import_react29 = require("react");
|
|
3269
3350
|
function useDate(options) {
|
|
3270
3351
|
const initialValue = (options == null ? void 0 : options.initialValue) ?? "";
|
|
3271
3352
|
const format = (options == null ? void 0 : options.format) ?? DateFormats.USMilitary;
|
|
3272
3353
|
const onChange = options == null ? void 0 : options.onChange;
|
|
3273
|
-
const [value, setValue] = (0,
|
|
3274
|
-
const handleChange = (0,
|
|
3354
|
+
const [value, setValue] = (0, import_react29.useState)(initialValue);
|
|
3355
|
+
const handleChange = (0, import_react29.useCallback)(
|
|
3275
3356
|
(e) => {
|
|
3276
3357
|
const newValue = formatMilitaryDate(e.currentTarget.value);
|
|
3277
3358
|
if (onChange) onChange(e);
|
|
@@ -3279,7 +3360,7 @@ function useDate(options) {
|
|
|
3279
3360
|
},
|
|
3280
3361
|
[onChange]
|
|
3281
3362
|
);
|
|
3282
|
-
return (0,
|
|
3363
|
+
return (0, import_react29.useMemo)(
|
|
3283
3364
|
() => ({
|
|
3284
3365
|
format,
|
|
3285
3366
|
value,
|
|
@@ -3358,11 +3439,11 @@ var MONTHS = [
|
|
|
3358
3439
|
];
|
|
3359
3440
|
|
|
3360
3441
|
// src/hooks/useToggle.ts
|
|
3361
|
-
var
|
|
3442
|
+
var import_react30 = require("react");
|
|
3362
3443
|
function useToggle(options) {
|
|
3363
|
-
const [checked, setChecked] = (0,
|
|
3444
|
+
const [checked, setChecked] = (0, import_react30.useState)((options == null ? void 0 : options.checked) ?? "");
|
|
3364
3445
|
const onChange = options == null ? void 0 : options.onChange;
|
|
3365
|
-
const handleChange = (0,
|
|
3446
|
+
const handleChange = (0, import_react30.useCallback)(
|
|
3366
3447
|
(e) => {
|
|
3367
3448
|
const target = e.currentTarget;
|
|
3368
3449
|
setChecked((prev) => {
|
|
@@ -3372,25 +3453,25 @@ function useToggle(options) {
|
|
|
3372
3453
|
},
|
|
3373
3454
|
[onChange]
|
|
3374
3455
|
);
|
|
3375
|
-
return (0,
|
|
3456
|
+
return (0, import_react30.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
3376
3457
|
}
|
|
3377
3458
|
|
|
3378
3459
|
// src/hooks/useRootColors.ts
|
|
3379
|
-
var
|
|
3460
|
+
var import_react31 = require("react");
|
|
3380
3461
|
function useRootColors(colors = []) {
|
|
3381
|
-
const [state, dispatch] = (0,
|
|
3382
|
-
const handleRefetch = (0,
|
|
3462
|
+
const [state, dispatch] = (0, import_react31.useReducer)(rootColorsReducer, {});
|
|
3463
|
+
const handleRefetch = (0, import_react31.useCallback)(() => {
|
|
3383
3464
|
return new Promise((resolve) => {
|
|
3384
3465
|
dispatch(formatColors(colors));
|
|
3385
3466
|
resolve();
|
|
3386
3467
|
});
|
|
3387
3468
|
}, []);
|
|
3388
|
-
(0,
|
|
3469
|
+
(0, import_react31.useEffect)(() => {
|
|
3389
3470
|
if (Object.keys(state).length === colors.length) return;
|
|
3390
3471
|
dispatch(formatColors(colors));
|
|
3391
3472
|
console.log("updating colors in root hook");
|
|
3392
3473
|
}, [colors]);
|
|
3393
|
-
return (0,
|
|
3474
|
+
return (0, import_react31.useMemo)(
|
|
3394
3475
|
() => ({ colors: state, refetch: handleRefetch }),
|
|
3395
3476
|
[state, handleRefetch]
|
|
3396
3477
|
);
|
|
@@ -3411,9 +3492,9 @@ function rootColorsReducer(state, action) {
|
|
|
3411
3492
|
}
|
|
3412
3493
|
|
|
3413
3494
|
// src/config/icons/checkbox.icons.tsx
|
|
3414
|
-
var
|
|
3495
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3415
3496
|
function CheckmarkIcon(props) {
|
|
3416
|
-
return /* @__PURE__ */ (0,
|
|
3497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3417
3498
|
"svg",
|
|
3418
3499
|
{
|
|
3419
3500
|
"aria-hidden": "true",
|
|
@@ -3422,7 +3503,7 @@ function CheckmarkIcon(props) {
|
|
|
3422
3503
|
role: "img",
|
|
3423
3504
|
viewBox: "0 0 24 24",
|
|
3424
3505
|
...props,
|
|
3425
|
-
children: /* @__PURE__ */ (0,
|
|
3506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3426
3507
|
"path",
|
|
3427
3508
|
{
|
|
3428
3509
|
fill: "currentColor",
|
|
@@ -3433,7 +3514,7 @@ function CheckmarkIcon(props) {
|
|
|
3433
3514
|
);
|
|
3434
3515
|
}
|
|
3435
3516
|
function IndeterminateIcon(props) {
|
|
3436
|
-
return /* @__PURE__ */ (0,
|
|
3517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
3437
3518
|
"svg",
|
|
3438
3519
|
{
|
|
3439
3520
|
"aria-hidden": "true",
|
|
@@ -3442,15 +3523,15 @@ function IndeterminateIcon(props) {
|
|
|
3442
3523
|
fill: "none",
|
|
3443
3524
|
viewBox: "0 0 24 24",
|
|
3444
3525
|
...props,
|
|
3445
|
-
children: /* @__PURE__ */ (0,
|
|
3526
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
|
|
3446
3527
|
}
|
|
3447
3528
|
);
|
|
3448
3529
|
}
|
|
3449
3530
|
|
|
3450
3531
|
// src/components/AnimatingUploadIcon.tsx
|
|
3451
|
-
var
|
|
3532
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3452
3533
|
function AnimatingUploadIcon(props) {
|
|
3453
|
-
return /* @__PURE__ */ (0,
|
|
3534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3454
3535
|
"svg",
|
|
3455
3536
|
{
|
|
3456
3537
|
"aria-hidden": "true",
|
|
@@ -3458,7 +3539,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3458
3539
|
width: props.size ?? "1em",
|
|
3459
3540
|
height: props.size ?? "1em",
|
|
3460
3541
|
viewBox: "0 0 24 24",
|
|
3461
|
-
children: /* @__PURE__ */ (0,
|
|
3542
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
3462
3543
|
"g",
|
|
3463
3544
|
{
|
|
3464
3545
|
fill: "none",
|
|
@@ -3467,14 +3548,14 @@ function AnimatingUploadIcon(props) {
|
|
|
3467
3548
|
strokeLinejoin: "round",
|
|
3468
3549
|
strokeWidth: 1.5,
|
|
3469
3550
|
children: [
|
|
3470
|
-
/* @__PURE__ */ (0,
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3471
3552
|
"path",
|
|
3472
3553
|
{
|
|
3473
3554
|
"data-name": "animating-trail",
|
|
3474
3555
|
strokeDasharray: "2 4",
|
|
3475
3556
|
strokeDashoffset: 6,
|
|
3476
3557
|
d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
|
|
3477
|
-
children: /* @__PURE__ */ (0,
|
|
3558
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3478
3559
|
"animate",
|
|
3479
3560
|
{
|
|
3480
3561
|
attributeName: "stroke-dashoffset",
|
|
@@ -3485,14 +3566,14 @@ function AnimatingUploadIcon(props) {
|
|
|
3485
3566
|
)
|
|
3486
3567
|
}
|
|
3487
3568
|
),
|
|
3488
|
-
/* @__PURE__ */ (0,
|
|
3569
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3489
3570
|
"path",
|
|
3490
3571
|
{
|
|
3491
3572
|
"data-name": "half-circle",
|
|
3492
3573
|
strokeDasharray: 32,
|
|
3493
3574
|
strokeDashoffset: 32,
|
|
3494
3575
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
|
|
3495
|
-
children: /* @__PURE__ */ (0,
|
|
3576
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3496
3577
|
"animate",
|
|
3497
3578
|
{
|
|
3498
3579
|
fill: "freeze",
|
|
@@ -3504,7 +3585,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3504
3585
|
)
|
|
3505
3586
|
}
|
|
3506
3587
|
),
|
|
3507
|
-
/* @__PURE__ */ (0,
|
|
3588
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3508
3589
|
"svg",
|
|
3509
3590
|
{
|
|
3510
3591
|
"aria-hidden": "true",
|
|
@@ -3514,7 +3595,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3514
3595
|
x: "27%",
|
|
3515
3596
|
y: "27%",
|
|
3516
3597
|
viewBox: "0 0 24 24",
|
|
3517
|
-
children: /* @__PURE__ */ (0,
|
|
3598
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3518
3599
|
"polygon",
|
|
3519
3600
|
{
|
|
3520
3601
|
fill: "currentColor",
|
|
@@ -3522,7 +3603,7 @@ function AnimatingUploadIcon(props) {
|
|
|
3522
3603
|
strokeWidth: 0.8,
|
|
3523
3604
|
opacity: "1",
|
|
3524
3605
|
points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
|
|
3525
|
-
children: /* @__PURE__ */ (0,
|
|
3606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3526
3607
|
"animate",
|
|
3527
3608
|
{
|
|
3528
3609
|
fill: "freeze",
|
|
@@ -3605,6 +3686,16 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3605
3686
|
DatePickerViewControl,
|
|
3606
3687
|
DatePickerViewControlGroup,
|
|
3607
3688
|
DatePickerYearView,
|
|
3689
|
+
Dialog,
|
|
3690
|
+
DialogBackdrop,
|
|
3691
|
+
DialogCloseIconTrigger,
|
|
3692
|
+
DialogCloseTrigger,
|
|
3693
|
+
DialogContent,
|
|
3694
|
+
DialogDescription,
|
|
3695
|
+
DialogHeading,
|
|
3696
|
+
DialogPositioner,
|
|
3697
|
+
DialogProvider,
|
|
3698
|
+
DialogTrigger,
|
|
3608
3699
|
Droppable,
|
|
3609
3700
|
FeatureFlag,
|
|
3610
3701
|
FeatureFlags,
|