@cerberus-design/react 0.13.2-next-c6aea71 → 0.13.2-next-b5a889e
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 +346 -23
- package/build/legacy/components/Accordion.cjs.map +1 -1
- package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
- package/build/legacy/components/Admonition.cjs +3 -0
- package/build/legacy/components/Admonition.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs +3 -0
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +3 -0
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/DatePicker.client.cjs +525 -0
- package/build/legacy/components/DatePicker.client.cjs.map +1 -0
- package/build/legacy/components/DatePicker.server.cjs +364 -0
- package/build/legacy/components/DatePicker.server.cjs.map +1 -0
- package/build/legacy/components/FileStatus.cjs +3 -0
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +3 -0
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +3 -0
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +3 -0
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/NotificationDescription.cjs.map +1 -1
- package/build/legacy/components/NotificationHeading.cjs.map +1 -1
- package/build/legacy/components/ProgressBar.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +3 -0
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +3 -0
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Text.cjs +59 -0
- package/build/legacy/components/Text.cjs.map +1 -0
- package/build/legacy/components/Toggle.cjs +3 -0
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +3 -0
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +3 -0
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/config/icons/checkbox.icons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +3 -0
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs +5 -3
- package/build/legacy/context/cta-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +3 -0
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +3 -0
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/hooks/useDate.cjs +8 -0
- package/build/legacy/hooks/useDate.cjs.map +1 -1
- package/build/legacy/index.cjs +936 -608
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +346 -23
- package/build/modern/chunk-2ZNIYPDV.js +47 -0
- package/build/modern/chunk-2ZNIYPDV.js.map +1 -0
- package/build/modern/{chunk-ZTYKIWYQ.js → chunk-34E3UFFB.js} +1 -1
- package/build/modern/chunk-34E3UFFB.js.map +1 -0
- package/build/modern/{chunk-CZND26FC.js → chunk-3BM6MZ4A.js} +8 -1
- package/build/modern/{chunk-CZND26FC.js.map → chunk-3BM6MZ4A.js.map} +1 -1
- package/build/modern/{chunk-N4QTLDVM.js → chunk-4IMOKN2D.js} +3 -3
- package/build/modern/{chunk-F27AAKQ3.js → chunk-5KHU6MM5.js} +8 -2
- package/build/modern/chunk-5KHU6MM5.js.map +1 -0
- package/build/modern/{chunk-SPZYPRZ6.js → chunk-BU5JK37R.js} +2 -2
- package/build/modern/{chunk-VERRHMW4.js → chunk-DDOTCGGA.js} +2 -2
- package/build/modern/{chunk-CP7OUC2Q.js → chunk-E3PAEB7Y.js} +1 -1
- package/build/modern/chunk-E3PAEB7Y.js.map +1 -0
- package/build/modern/{chunk-TM5AS6M6.js → chunk-ECKJGCNH.js} +6 -6
- package/build/modern/chunk-ECKJGCNH.js.map +1 -0
- package/build/modern/{chunk-F72ZABKX.js → chunk-F4LTOZAN.js} +2 -2
- package/build/modern/{chunk-NKM6PISB.js → chunk-F7EWTOML.js} +2 -2
- package/build/modern/{chunk-CSMPRYNC.js → chunk-F7XWOSN3.js} +2 -2
- package/build/modern/{chunk-622N7YRT.js → chunk-FRWNAVDM.js} +8 -9
- package/build/modern/chunk-FRWNAVDM.js.map +1 -0
- package/build/modern/{chunk-4QBPJVEN.js → chunk-G7AGKII3.js} +11 -11
- package/build/modern/chunk-G7AGKII3.js.map +1 -0
- package/build/modern/{chunk-7MM5KYEX.js → chunk-GI6CSUU4.js} +7 -7
- package/build/modern/{chunk-7SGPJM66.js → chunk-HP4ZN473.js} +2 -2
- package/build/modern/chunk-HP4ZN473.js.map +1 -0
- package/build/modern/chunk-IP5VFOPZ.js +132 -0
- package/build/modern/chunk-IP5VFOPZ.js.map +1 -0
- package/build/modern/{chunk-C3CDRCHS.js → chunk-M73ECA25.js} +4 -4
- package/build/modern/chunk-M73ECA25.js.map +1 -0
- package/build/modern/{chunk-W4DXACNV.js → chunk-O7QVCF3H.js} +3 -3
- package/build/modern/chunk-QX4V5V74.js +169 -0
- package/build/modern/chunk-QX4V5V74.js.map +1 -0
- package/build/modern/{chunk-XL4JREDT.js → chunk-S25RHYZV.js} +2 -2
- package/build/modern/{chunk-SXIXDXG3.js → chunk-SLHYBPJ5.js} +1 -1
- package/build/modern/chunk-SLHYBPJ5.js.map +1 -0
- package/build/modern/{chunk-XEW6TJJ4.js → chunk-UXY3KCC3.js} +1 -1
- package/build/modern/chunk-UXY3KCC3.js.map +1 -0
- package/build/modern/{chunk-NB6DV4VA.js → chunk-W2LSPRQ3.js} +2 -2
- package/build/modern/{chunk-KCANMM64.js → chunk-WZJ5UQNM.js} +1 -1
- package/build/modern/chunk-WZJ5UQNM.js.map +1 -0
- package/build/modern/{chunk-NMNONSHU.js → chunk-XVU2NQCW.js} +2 -2
- package/build/modern/components/Accordion.js +1 -1
- package/build/modern/components/AccordionItemGroup.js +2 -2
- package/build/modern/components/Admonition.js +5 -5
- package/build/modern/components/Avatar.js +4 -4
- package/build/modern/components/Checkbox.js +4 -4
- package/build/modern/components/DatePicker.client.js +32 -0
- package/build/modern/components/DatePicker.client.js.map +1 -0
- package/build/modern/components/DatePicker.server.js +31 -0
- package/build/modern/components/DatePicker.server.js.map +1 -0
- package/build/modern/components/FileStatus.js +7 -7
- package/build/modern/components/FileUploader.js +5 -5
- package/build/modern/components/Input.js +4 -4
- package/build/modern/components/Notification.js +4 -4
- package/build/modern/components/NotificationDescription.js +1 -1
- package/build/modern/components/NotificationHeading.js +1 -1
- package/build/modern/components/ProgressBar.js +1 -1
- package/build/modern/components/Select.js +4 -4
- package/build/modern/components/Tag.js +4 -4
- package/build/modern/components/Text.js +7 -0
- package/build/modern/components/Text.js.map +1 -0
- package/build/modern/components/Toggle.js +4 -4
- package/build/modern/config/cerbIcons.js +2 -2
- package/build/modern/config/defineIcons.js +3 -3
- package/build/modern/config/icons/checkbox.icons.js +1 -1
- package/build/modern/context/confirm-modal.js +6 -6
- package/build/modern/context/cta-modal.js +6 -6
- package/build/modern/context/notification-center.js +7 -7
- package/build/modern/context/prompt-modal.js +9 -9
- package/build/modern/hooks/useDate.js +3 -1
- package/build/modern/index.js +118 -72
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Accordion.tsx +0 -1
- package/src/components/DatePicker.client.tsx +364 -0
- package/src/components/DatePicker.server.tsx +229 -0
- package/src/components/Notification.tsx +6 -3
- package/src/components/NotificationDescription.tsx +2 -2
- package/src/components/NotificationHeading.tsx +1 -2
- package/src/components/ProgressBar.tsx +1 -1
- package/src/components/Text.tsx +70 -0
- package/src/config/cerbIcons.ts +9 -0
- package/src/config/icons/checkbox.icons.tsx +2 -2
- package/src/context/confirm-modal.tsx +1 -1
- package/src/context/cta-modal.tsx +6 -7
- package/src/context/notification-center.tsx +1 -1
- package/src/context/prompt-modal.tsx +1 -1
- package/src/hooks/useDate.ts +12 -0
- package/src/index.ts +3 -0
- package/build/modern/chunk-4QBPJVEN.js.map +0 -1
- package/build/modern/chunk-622N7YRT.js.map +0 -1
- package/build/modern/chunk-7SGPJM66.js.map +0 -1
- package/build/modern/chunk-C3CDRCHS.js.map +0 -1
- package/build/modern/chunk-CP7OUC2Q.js.map +0 -1
- package/build/modern/chunk-F27AAKQ3.js.map +0 -1
- package/build/modern/chunk-KCANMM64.js.map +0 -1
- package/build/modern/chunk-SXIXDXG3.js.map +0 -1
- package/build/modern/chunk-TM5AS6M6.js.map +0 -1
- package/build/modern/chunk-XEW6TJJ4.js.map +0 -1
- package/build/modern/chunk-ZTYKIWYQ.js.map +0 -1
- /package/build/modern/{chunk-N4QTLDVM.js.map → chunk-4IMOKN2D.js.map} +0 -0
- /package/build/modern/{chunk-SPZYPRZ6.js.map → chunk-BU5JK37R.js.map} +0 -0
- /package/build/modern/{chunk-VERRHMW4.js.map → chunk-DDOTCGGA.js.map} +0 -0
- /package/build/modern/{chunk-F72ZABKX.js.map → chunk-F4LTOZAN.js.map} +0 -0
- /package/build/modern/{chunk-NKM6PISB.js.map → chunk-F7EWTOML.js.map} +0 -0
- /package/build/modern/{chunk-CSMPRYNC.js.map → chunk-F7XWOSN3.js.map} +0 -0
- /package/build/modern/{chunk-7MM5KYEX.js.map → chunk-GI6CSUU4.js.map} +0 -0
- /package/build/modern/{chunk-W4DXACNV.js.map → chunk-O7QVCF3H.js.map} +0 -0
- /package/build/modern/{chunk-XL4JREDT.js.map → chunk-S25RHYZV.js.map} +0 -0
- /package/build/modern/{chunk-NB6DV4VA.js.map → chunk-W2LSPRQ3.js.map} +0 -0
- /package/build/modern/{chunk-NMNONSHU.js.map → chunk-XVU2NQCW.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -38,6 +38,23 @@ __export(src_exports, {
|
|
|
38
38
|
CircularProgress: () => CircularProgress,
|
|
39
39
|
ConfirmModal: () => ConfirmModal,
|
|
40
40
|
DateFormats: () => DateFormats,
|
|
41
|
+
DatePicker: () => DatePicker,
|
|
42
|
+
DatePickerCalendar: () => DatePickerCalendar,
|
|
43
|
+
DatePickerContent: () => DatePickerContent,
|
|
44
|
+
DatePickerContext: () => DatePickerContext,
|
|
45
|
+
DatePickerDayView: () => DatePickerDayView,
|
|
46
|
+
DatePickerInput: () => DatePickerInput,
|
|
47
|
+
DatePickerLabel: () => DatePickerLabel,
|
|
48
|
+
DatePickerMonthView: () => DatePickerMonthView,
|
|
49
|
+
DatePickerTable: () => DatePickerTable,
|
|
50
|
+
DatePickerTableCell: () => DatePickerTableCell,
|
|
51
|
+
DatePickerTableCellTrigger: () => DatePickerTableCellTrigger,
|
|
52
|
+
DatePickerTableHeader: () => DatePickerTableHeader,
|
|
53
|
+
DatePickerTrigger: () => DatePickerTrigger,
|
|
54
|
+
DatePickerView: () => DatePickerView,
|
|
55
|
+
DatePickerViewControl: () => DatePickerViewControl,
|
|
56
|
+
DatePickerViewControlGroup: () => DatePickerViewControlGroup,
|
|
57
|
+
DatePickerYearView: () => DatePickerYearView,
|
|
41
58
|
Droppable: () => Droppable,
|
|
42
59
|
FeatureFlag: () => FeatureFlag,
|
|
43
60
|
FeatureFlags: () => FeatureFlags,
|
|
@@ -76,6 +93,7 @@ __export(src_exports, {
|
|
|
76
93
|
ProgressBar: () => ProgressBar,
|
|
77
94
|
PromptModal: () => PromptModal,
|
|
78
95
|
Radio: () => Radio,
|
|
96
|
+
RangePickerInput: () => RangePickerInput,
|
|
79
97
|
Select: () => Select,
|
|
80
98
|
Show: () => Show,
|
|
81
99
|
Spinner: () => Spinner,
|
|
@@ -89,6 +107,7 @@ __export(src_exports, {
|
|
|
89
107
|
Tag: () => Tag,
|
|
90
108
|
Tbody: () => Tbody,
|
|
91
109
|
Td: () => Td,
|
|
110
|
+
Text: () => Text,
|
|
92
111
|
Textarea: () => Textarea,
|
|
93
112
|
Th: () => Th,
|
|
94
113
|
Thead: () => Thead,
|
|
@@ -98,6 +117,7 @@ __export(src_exports, {
|
|
|
98
117
|
Tr: () => Tr,
|
|
99
118
|
createNavTriggerProps: () => createNavTriggerProps,
|
|
100
119
|
defineIcons: () => defineIcons,
|
|
120
|
+
formatISOToMilitary: () => formatISOToMilitary,
|
|
101
121
|
formatMilitaryDate: () => formatMilitaryDate,
|
|
102
122
|
formatMilitaryToISO: () => formatMilitaryToISO,
|
|
103
123
|
formatNotifyCount: () => formatNotifyCount,
|
|
@@ -367,6 +387,9 @@ function AnimatingUploadIcon(props) {
|
|
|
367
387
|
// src/config/cerbIcons.ts
|
|
368
388
|
var defaultIcons = {
|
|
369
389
|
avatar: import_icons2.UserFilled,
|
|
390
|
+
calendar: import_icons2.Calendar,
|
|
391
|
+
calendarPrev: import_icons2.ChevronLeft,
|
|
392
|
+
calendarNext: import_icons2.ChevronRight,
|
|
370
393
|
checkbox: CheckmarkIcon,
|
|
371
394
|
close: import_icons2.Close,
|
|
372
395
|
confirmModal: import_icons2.Information,
|
|
@@ -845,20 +868,389 @@ function CircularProgress(props) {
|
|
|
845
868
|
);
|
|
846
869
|
}
|
|
847
870
|
|
|
871
|
+
// src/components/DatePicker.client.tsx
|
|
872
|
+
var import_react7 = require("@ark-ui/react");
|
|
873
|
+
|
|
874
|
+
// src/components/Portal.tsx
|
|
875
|
+
var import_react4 = require("@ark-ui/react");
|
|
876
|
+
var Portal = import_react4.Portal;
|
|
877
|
+
|
|
878
|
+
// src/components/DatePicker.client.tsx
|
|
879
|
+
var import_react8 = require("react");
|
|
880
|
+
var import_recipes8 = require("@cerberus/styled-system/recipes");
|
|
881
|
+
var import_css10 = require("@cerberus/styled-system/css");
|
|
882
|
+
|
|
883
|
+
// src/components/DatePicker.server.tsx
|
|
884
|
+
var import_react5 = require("@ark-ui/react");
|
|
885
|
+
var import_css9 = require("@cerberus/styled-system/css");
|
|
886
|
+
var import_recipes7 = require("@cerberus/styled-system/recipes");
|
|
887
|
+
|
|
888
|
+
// src/components/IconButton.tsx
|
|
889
|
+
var import_css8 = require("@cerberus/styled-system/css");
|
|
890
|
+
var import_recipes6 = require("@cerberus/styled-system/recipes");
|
|
891
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
892
|
+
function IconButton(props) {
|
|
893
|
+
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
895
|
+
"button",
|
|
896
|
+
{
|
|
897
|
+
...nativeProps,
|
|
898
|
+
"aria-label": ariaLabel ?? "Icon Button",
|
|
899
|
+
className: (0, import_css8.cx)(
|
|
900
|
+
nativeProps.className,
|
|
901
|
+
(0, import_recipes6.iconButton)({
|
|
902
|
+
palette,
|
|
903
|
+
usage,
|
|
904
|
+
size
|
|
905
|
+
})
|
|
906
|
+
)
|
|
907
|
+
}
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
// src/components/DatePicker.server.tsx
|
|
912
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
913
|
+
var datePickerStyles = (0, import_recipes7.datePicker)();
|
|
914
|
+
function DatePickerLabel(props) {
|
|
915
|
+
const { className, ...arkProps } = props;
|
|
916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
917
|
+
import_react5.DatePicker.Label,
|
|
918
|
+
{
|
|
919
|
+
...arkProps,
|
|
920
|
+
className: (0, import_css9.cx)(
|
|
921
|
+
className,
|
|
922
|
+
(0, import_recipes7.label)({
|
|
923
|
+
size: "sm"
|
|
924
|
+
})
|
|
925
|
+
)
|
|
926
|
+
}
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
function DatePickerTrigger(props) {
|
|
930
|
+
const { calendar: CalendarIcon } = $cerberusIcons;
|
|
931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
932
|
+
import_react5.DatePicker.Trigger,
|
|
933
|
+
{
|
|
934
|
+
...props,
|
|
935
|
+
className: (0, import_css9.cx)(
|
|
936
|
+
props.className,
|
|
937
|
+
(0, import_recipes7.iconButton)({
|
|
938
|
+
size: "sm",
|
|
939
|
+
usage: "ghost"
|
|
940
|
+
}),
|
|
941
|
+
datePickerStyles.trigger
|
|
942
|
+
),
|
|
943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CalendarIcon, {})
|
|
944
|
+
}
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
function DatePickerViewControl(props) {
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
949
|
+
import_react5.DatePicker.Control,
|
|
950
|
+
{
|
|
951
|
+
...props,
|
|
952
|
+
className: (0, import_css9.cx)(props.className, datePickerStyles.viewControl)
|
|
953
|
+
}
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
function DatePickerViewControlGroup(props) {
|
|
957
|
+
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = $cerberusIcons;
|
|
958
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(DatePickerViewControl, { ...props, children: [
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(PrevIcon, {}) }) }),
|
|
960
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
961
|
+
Button,
|
|
962
|
+
{
|
|
963
|
+
className: (0, import_css9.css)({
|
|
964
|
+
h: "2rem",
|
|
965
|
+
paddingInline: "md"
|
|
966
|
+
}),
|
|
967
|
+
shape: "rounded",
|
|
968
|
+
size: "sm",
|
|
969
|
+
usage: "ghost",
|
|
970
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.RangeText, {})
|
|
971
|
+
}
|
|
972
|
+
) }),
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react5.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NextIcon, {}) }) })
|
|
974
|
+
] });
|
|
975
|
+
}
|
|
976
|
+
function DatePickerTable(props) {
|
|
977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
978
|
+
import_react5.DatePicker.Table,
|
|
979
|
+
{
|
|
980
|
+
...props,
|
|
981
|
+
className: (0, import_css9.cx)(props.className, datePickerStyles.table)
|
|
982
|
+
}
|
|
983
|
+
);
|
|
984
|
+
}
|
|
985
|
+
function DatePickerTableHeader(props) {
|
|
986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
987
|
+
import_react5.DatePicker.TableHeader,
|
|
988
|
+
{
|
|
989
|
+
...props,
|
|
990
|
+
className: (0, import_css9.cx)(props.className, datePickerStyles.tableHeader)
|
|
991
|
+
}
|
|
992
|
+
);
|
|
993
|
+
}
|
|
994
|
+
function DatePickerTableCell(props) {
|
|
995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
996
|
+
import_react5.DatePicker.TableCell,
|
|
997
|
+
{
|
|
998
|
+
...props,
|
|
999
|
+
className: (0, import_css9.cx)(props.className, datePickerStyles.tableCell)
|
|
1000
|
+
}
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
function DatePickerTableCellTrigger(props) {
|
|
1004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1005
|
+
import_react5.DatePicker.TableCellTrigger,
|
|
1006
|
+
{
|
|
1007
|
+
...props,
|
|
1008
|
+
className: (0, import_css9.cx)(props.className, datePickerStyles.tableCellTrigger)
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
var DatePickerView = import_react5.DatePicker.View;
|
|
1013
|
+
var DatePickerContext = import_react5.DatePicker.Context;
|
|
1014
|
+
|
|
1015
|
+
// src/hooks/useDate.ts
|
|
1016
|
+
var import_react6 = require("react");
|
|
1017
|
+
function useDate(options) {
|
|
1018
|
+
const initialValue = (options == null ? void 0 : options.initialValue) ?? "";
|
|
1019
|
+
const format = (options == null ? void 0 : options.format) ?? DateFormats.USMilitary;
|
|
1020
|
+
const onChange = options == null ? void 0 : options.onChange;
|
|
1021
|
+
const [value, setValue] = (0, import_react6.useState)(initialValue);
|
|
1022
|
+
const handleChange = (0, import_react6.useCallback)(
|
|
1023
|
+
(e) => {
|
|
1024
|
+
const newValue = formatMilitaryDate(e.currentTarget.value);
|
|
1025
|
+
if (onChange) onChange(e);
|
|
1026
|
+
setValue(newValue);
|
|
1027
|
+
},
|
|
1028
|
+
[onChange]
|
|
1029
|
+
);
|
|
1030
|
+
return (0, import_react6.useMemo)(
|
|
1031
|
+
() => ({
|
|
1032
|
+
format,
|
|
1033
|
+
value,
|
|
1034
|
+
ISO: formatMilitaryToISO(value),
|
|
1035
|
+
onChange: handleChange
|
|
1036
|
+
}),
|
|
1037
|
+
[format, value, handleChange]
|
|
1038
|
+
);
|
|
1039
|
+
}
|
|
1040
|
+
function formatMilitaryToISO(input3) {
|
|
1041
|
+
const [day, month, year] = input3.split(" ");
|
|
1042
|
+
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
1043
|
+
const monthNum = monthIndex + 1;
|
|
1044
|
+
return `${year ?? "0000"}-${monthNum.toString().padStart(2, "0")}-${day.padStart(
|
|
1045
|
+
2,
|
|
1046
|
+
"0"
|
|
1047
|
+
)}`;
|
|
1048
|
+
}
|
|
1049
|
+
function formatMilitaryDate(input3) {
|
|
1050
|
+
let formatted = input3.toUpperCase().replace(/[^0-9A-Z]/g, "");
|
|
1051
|
+
let day = "";
|
|
1052
|
+
let month = "";
|
|
1053
|
+
let year = "";
|
|
1054
|
+
if (formatted.length >= 2) {
|
|
1055
|
+
day = formatted.replace(/[^0-9]/g, "").slice(0, 2);
|
|
1056
|
+
const dayNum = parseInt(day, 10);
|
|
1057
|
+
if (dayNum > 31) day = "31";
|
|
1058
|
+
else if (dayNum === 0) day = "01";
|
|
1059
|
+
formatted = formatted.slice(2);
|
|
1060
|
+
}
|
|
1061
|
+
if (formatted.length >= 3) {
|
|
1062
|
+
month = formatted.slice(0, 3);
|
|
1063
|
+
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
1064
|
+
if (monthIndex !== -1) {
|
|
1065
|
+
month = MONTHS[monthIndex];
|
|
1066
|
+
} else {
|
|
1067
|
+
month = month.replace(/[^A-Z]/g, "");
|
|
1068
|
+
}
|
|
1069
|
+
formatted = formatted.slice(3);
|
|
1070
|
+
}
|
|
1071
|
+
if (formatted.length > 0) {
|
|
1072
|
+
year = formatted.slice(0, 4);
|
|
1073
|
+
}
|
|
1074
|
+
return [day, month, year].filter(Boolean).join(" ");
|
|
1075
|
+
}
|
|
1076
|
+
function formatISOToMilitary(date) {
|
|
1077
|
+
const [year, month, day] = date.split("-");
|
|
1078
|
+
const monthIndex = parseInt(month, 10) - 1;
|
|
1079
|
+
const monthStr = MONTHS[monthIndex];
|
|
1080
|
+
return `${day} ${monthStr} ${year}`;
|
|
1081
|
+
}
|
|
1082
|
+
var DateFormats = {
|
|
1083
|
+
get ISO() {
|
|
1084
|
+
return "YYYY-MM-DD";
|
|
1085
|
+
},
|
|
1086
|
+
get USMilitary() {
|
|
1087
|
+
return "DD MMM YYYY";
|
|
1088
|
+
},
|
|
1089
|
+
get Months() {
|
|
1090
|
+
return MONTHS;
|
|
1091
|
+
}
|
|
1092
|
+
};
|
|
1093
|
+
var MONTHS = [
|
|
1094
|
+
"JAN",
|
|
1095
|
+
"FEB",
|
|
1096
|
+
"MAR",
|
|
1097
|
+
"APR",
|
|
1098
|
+
"MAY",
|
|
1099
|
+
"JUN",
|
|
1100
|
+
"JUL",
|
|
1101
|
+
"AUG",
|
|
1102
|
+
"SEP",
|
|
1103
|
+
"OCT",
|
|
1104
|
+
"NOV",
|
|
1105
|
+
"DEC"
|
|
1106
|
+
];
|
|
1107
|
+
|
|
1108
|
+
// src/components/DatePicker.client.tsx
|
|
1109
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1110
|
+
var datePickerStyles2 = (0, import_recipes8.datePicker)();
|
|
1111
|
+
function DatePicker(props) {
|
|
1112
|
+
const states = useFieldContext();
|
|
1113
|
+
const handleFormat = (0, import_react8.useCallback)((value) => {
|
|
1114
|
+
return formatISOToMilitary(value.toString());
|
|
1115
|
+
}, []);
|
|
1116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1117
|
+
import_react7.DatePicker.Root,
|
|
1118
|
+
{
|
|
1119
|
+
...props,
|
|
1120
|
+
...states,
|
|
1121
|
+
format: handleFormat,
|
|
1122
|
+
positioning: {
|
|
1123
|
+
placement: "bottom-start"
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
1127
|
+
}
|
|
1128
|
+
function DatePickerInput(props) {
|
|
1129
|
+
const { invalid, ...fieldStates } = useFieldContext();
|
|
1130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react7.DatePicker.Control, { className: datePickerStyles2.control, children: [
|
|
1131
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTrigger, {}),
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1133
|
+
import_react7.DatePicker.Input,
|
|
1134
|
+
{
|
|
1135
|
+
...props,
|
|
1136
|
+
...fieldStates,
|
|
1137
|
+
...invalid && { "aria-invalid": true },
|
|
1138
|
+
className: (0, import_css10.cx)(props.className, datePickerStyles2.input),
|
|
1139
|
+
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
1140
|
+
maxLength: 11
|
|
1141
|
+
}
|
|
1142
|
+
)
|
|
1143
|
+
] });
|
|
1144
|
+
}
|
|
1145
|
+
function RangePickerInput(props) {
|
|
1146
|
+
const { invalid, ...fieldStates } = useFieldContext();
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react7.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
1148
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTrigger, {}),
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1150
|
+
import_react7.DatePicker.Input,
|
|
1151
|
+
{
|
|
1152
|
+
...props,
|
|
1153
|
+
...fieldStates,
|
|
1154
|
+
...invalid && { "aria-invalid": true },
|
|
1155
|
+
"data-range-input": true,
|
|
1156
|
+
className: (0, import_css10.cx)(props.className, datePickerStyles2.input),
|
|
1157
|
+
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
1158
|
+
maxLength: 11,
|
|
1159
|
+
index: 0
|
|
1160
|
+
}
|
|
1161
|
+
),
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1163
|
+
import_react7.DatePicker.Input,
|
|
1164
|
+
{
|
|
1165
|
+
...props,
|
|
1166
|
+
...fieldStates,
|
|
1167
|
+
...invalid && { "aria-invalid": true },
|
|
1168
|
+
"data-range-input": true,
|
|
1169
|
+
"data-range-end-input": true,
|
|
1170
|
+
className: (0, import_css10.cx)(props.className, datePickerStyles2.input),
|
|
1171
|
+
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
1172
|
+
maxLength: 11,
|
|
1173
|
+
index: 1
|
|
1174
|
+
}
|
|
1175
|
+
)
|
|
1176
|
+
] });
|
|
1177
|
+
}
|
|
1178
|
+
function DatePickerContent(props) {
|
|
1179
|
+
const { children, ...contentProps } = props;
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1181
|
+
import_react7.DatePicker.Content,
|
|
1182
|
+
{
|
|
1183
|
+
...contentProps,
|
|
1184
|
+
className: (0, import_css10.cx)(contentProps.className, datePickerStyles2.content),
|
|
1185
|
+
children
|
|
1186
|
+
}
|
|
1187
|
+
) }) });
|
|
1188
|
+
}
|
|
1189
|
+
function DatePickerDayView(props) {
|
|
1190
|
+
function isToday(date) {
|
|
1191
|
+
const today = /* @__PURE__ */ new Date();
|
|
1192
|
+
const formatted = today.toISOString().split("T")[0];
|
|
1193
|
+
const arkDate = `${date.year}-${String(date.month).padStart(2, "0")}-${String(date.day).padStart(2, "0")}`;
|
|
1194
|
+
return formatted === arkDate;
|
|
1195
|
+
}
|
|
1196
|
+
function isPastDay(date) {
|
|
1197
|
+
const today = /* @__PURE__ */ new Date();
|
|
1198
|
+
const arkDate = `${date.year}-${String(date.month).padStart(2, "0")}-${String(date.day).padStart(2, "0")}`;
|
|
1199
|
+
return new Date(arkDate) < today;
|
|
1200
|
+
}
|
|
1201
|
+
function getDayValue(date) {
|
|
1202
|
+
if (isToday(date)) return "today";
|
|
1203
|
+
if (isPastDay(date)) return "past";
|
|
1204
|
+
return "future";
|
|
1205
|
+
}
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerViewControlGroup, {}),
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DatePickerTable, { children: [
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
1210
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1211
|
+
DatePickerTableCellTrigger,
|
|
1212
|
+
{
|
|
1213
|
+
"data-date": getDayValue(day),
|
|
1214
|
+
children: day.day
|
|
1215
|
+
}
|
|
1216
|
+
) }, id2)) }, id)) })
|
|
1217
|
+
] })
|
|
1218
|
+
] }) }) });
|
|
1219
|
+
}
|
|
1220
|
+
function DatePickerMonthView(props) {
|
|
1221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerViewControlGroup, {}),
|
|
1223
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
1224
|
+
] }) }) });
|
|
1225
|
+
}
|
|
1226
|
+
function DatePickerYearView(props) {
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1228
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerViewControlGroup, {}),
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react7.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
1230
|
+
] }) }) });
|
|
1231
|
+
}
|
|
1232
|
+
function DatePickerCalendar() {
|
|
1233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DatePickerContent, { children: [
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerDayView, {}),
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerMonthView, {}),
|
|
1236
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DatePickerYearView, {})
|
|
1237
|
+
] });
|
|
1238
|
+
}
|
|
1239
|
+
|
|
848
1240
|
// src/components/Droppable.tsx
|
|
849
1241
|
var import_core = require("@dnd-kit/core");
|
|
850
|
-
var
|
|
851
|
-
var
|
|
1242
|
+
var import_react9 = require("react");
|
|
1243
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
852
1244
|
function Droppable(props) {
|
|
853
1245
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
854
|
-
const uuid = (0,
|
|
1246
|
+
const uuid = (0, import_react9.useId)();
|
|
855
1247
|
const { isOver, setNodeRef } = (0, import_core.useDroppable)({
|
|
856
1248
|
data,
|
|
857
1249
|
disabled,
|
|
858
1250
|
id: id || uuid,
|
|
859
1251
|
resizeObserverConfig
|
|
860
1252
|
});
|
|
861
|
-
return /* @__PURE__ */ (0,
|
|
1253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
862
1254
|
"div",
|
|
863
1255
|
{
|
|
864
1256
|
...nativeProps,
|
|
@@ -871,30 +1263,30 @@ function Droppable(props) {
|
|
|
871
1263
|
}
|
|
872
1264
|
|
|
873
1265
|
// src/components/FieldMessage.tsx
|
|
874
|
-
var
|
|
875
|
-
var
|
|
876
|
-
var
|
|
1266
|
+
var import_css11 = require("@cerberus/styled-system/css");
|
|
1267
|
+
var import_recipes9 = require("@cerberus/styled-system/recipes");
|
|
1268
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
877
1269
|
function FieldMessage(props) {
|
|
878
1270
|
const { invalid } = useFieldContext();
|
|
879
|
-
return /* @__PURE__ */ (0,
|
|
1271
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
880
1272
|
"small",
|
|
881
1273
|
{
|
|
882
1274
|
...props,
|
|
883
1275
|
...invalid && { "aria-invalid": true },
|
|
884
|
-
className: (0,
|
|
1276
|
+
className: (0, import_css11.cx)(props.className, (0, import_recipes9.fieldMessage)())
|
|
885
1277
|
}
|
|
886
1278
|
);
|
|
887
1279
|
}
|
|
888
1280
|
|
|
889
1281
|
// src/context/feature-flags.tsx
|
|
890
|
-
var
|
|
891
|
-
var
|
|
892
|
-
var FeatureFlagContext = (0,
|
|
1282
|
+
var import_react10 = require("react");
|
|
1283
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1284
|
+
var FeatureFlagContext = (0, import_react10.createContext)(null);
|
|
893
1285
|
function FeatureFlags(props) {
|
|
894
|
-
return /* @__PURE__ */ (0,
|
|
1286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
895
1287
|
}
|
|
896
1288
|
function useFeatureFlags(key) {
|
|
897
|
-
const context = (0,
|
|
1289
|
+
const context = (0, import_react10.useContext)(FeatureFlagContext);
|
|
898
1290
|
if (context === null) {
|
|
899
1291
|
throw new Error(
|
|
900
1292
|
"useFeatureFlag must be used within a FeatureFlags Provider"
|
|
@@ -904,26 +1296,26 @@ function useFeatureFlags(key) {
|
|
|
904
1296
|
}
|
|
905
1297
|
|
|
906
1298
|
// src/components/FeatureFlag.tsx
|
|
907
|
-
var
|
|
1299
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
908
1300
|
function FeatureFlag(props) {
|
|
909
1301
|
const showContent = useFeatureFlags(props.flag);
|
|
910
|
-
return /* @__PURE__ */ (0,
|
|
1302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Show, { when: showContent, children: props.children });
|
|
911
1303
|
}
|
|
912
1304
|
|
|
913
1305
|
// src/components/Fieldset.tsx
|
|
914
|
-
var
|
|
915
|
-
var
|
|
1306
|
+
var import_css12 = require("@cerberus/styled-system/css");
|
|
1307
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
916
1308
|
function Fieldset(props) {
|
|
917
1309
|
const { invalid, ...formState } = useFieldContext();
|
|
918
|
-
return /* @__PURE__ */ (0,
|
|
1310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
919
1311
|
"fieldset",
|
|
920
1312
|
{
|
|
921
1313
|
...props,
|
|
922
1314
|
...formState,
|
|
923
1315
|
...invalid && { "aria-invalid": true },
|
|
924
|
-
className: (0,
|
|
1316
|
+
className: (0, import_css12.cx)(
|
|
925
1317
|
props.className,
|
|
926
|
-
(0,
|
|
1318
|
+
(0, import_css12.css)({
|
|
927
1319
|
border: "none",
|
|
928
1320
|
pt: 2,
|
|
929
1321
|
margin: 0
|
|
@@ -934,18 +1326,18 @@ function Fieldset(props) {
|
|
|
934
1326
|
}
|
|
935
1327
|
|
|
936
1328
|
// src/components/FieldsetLabel.tsx
|
|
937
|
-
var
|
|
938
|
-
var
|
|
939
|
-
var
|
|
1329
|
+
var import_css13 = require("@cerberus/styled-system/css");
|
|
1330
|
+
var import_recipes10 = require("@cerberus/styled-system/recipes");
|
|
1331
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
940
1332
|
function FieldsetLabel(props) {
|
|
941
1333
|
const { size, usage, ...nativeProps } = props;
|
|
942
|
-
return /* @__PURE__ */ (0,
|
|
1334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
943
1335
|
"label",
|
|
944
1336
|
{
|
|
945
1337
|
...nativeProps,
|
|
946
|
-
className: (0,
|
|
1338
|
+
className: (0, import_css13.cx)(
|
|
947
1339
|
nativeProps.className,
|
|
948
|
-
(0,
|
|
1340
|
+
(0, import_recipes10.label)({
|
|
949
1341
|
size,
|
|
950
1342
|
usage
|
|
951
1343
|
})
|
|
@@ -955,33 +1347,33 @@ function FieldsetLabel(props) {
|
|
|
955
1347
|
}
|
|
956
1348
|
|
|
957
1349
|
// src/components/FileStatus.tsx
|
|
958
|
-
var
|
|
959
|
-
var
|
|
960
|
-
var
|
|
1350
|
+
var import_react11 = require("react");
|
|
1351
|
+
var import_recipes12 = require("@cerberus/styled-system/recipes");
|
|
1352
|
+
var import_css15 = require("@cerberus/styled-system/css");
|
|
961
1353
|
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
962
1354
|
|
|
963
1355
|
// src/components/ProgressBar.tsx
|
|
964
|
-
var
|
|
965
|
-
var
|
|
966
|
-
var
|
|
1356
|
+
var import_css14 = require("@cerberus/styled-system/css");
|
|
1357
|
+
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
1358
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
967
1359
|
function ProgressBar(props) {
|
|
968
|
-
const { indeterminate, size, usage, now, label:
|
|
969
|
-
const styles = (0,
|
|
1360
|
+
const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
|
|
1361
|
+
const styles = (0, import_recipes11.progressBar)({ size, usage });
|
|
970
1362
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
971
1363
|
const width = {
|
|
972
1364
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
973
1365
|
};
|
|
974
|
-
return /* @__PURE__ */ (0,
|
|
1366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
975
1367
|
"div",
|
|
976
1368
|
{
|
|
977
1369
|
...nativeProps,
|
|
978
|
-
"aria-label":
|
|
1370
|
+
"aria-label": label5,
|
|
979
1371
|
"aria-valuemin": 0,
|
|
980
1372
|
"aria-valuemax": 100,
|
|
981
1373
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
982
|
-
className: (0,
|
|
1374
|
+
className: (0, import_css14.cx)(nativeProps.className, styles.root),
|
|
983
1375
|
role: "progressbar",
|
|
984
|
-
children: /* @__PURE__ */ (0,
|
|
1376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
985
1377
|
"div",
|
|
986
1378
|
{
|
|
987
1379
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -994,31 +1386,8 @@ function ProgressBar(props) {
|
|
|
994
1386
|
);
|
|
995
1387
|
}
|
|
996
1388
|
|
|
997
|
-
// src/components/IconButton.tsx
|
|
998
|
-
var import_css12 = require("@cerberus/styled-system/css");
|
|
999
|
-
var import_recipes9 = require("@cerberus/styled-system/recipes");
|
|
1000
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1001
|
-
function IconButton(props) {
|
|
1002
|
-
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
1003
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1004
|
-
"button",
|
|
1005
|
-
{
|
|
1006
|
-
...nativeProps,
|
|
1007
|
-
"aria-label": ariaLabel ?? "Icon Button",
|
|
1008
|
-
className: (0, import_css12.cx)(
|
|
1009
|
-
nativeProps.className,
|
|
1010
|
-
(0, import_recipes9.iconButton)({
|
|
1011
|
-
palette,
|
|
1012
|
-
usage,
|
|
1013
|
-
size
|
|
1014
|
-
})
|
|
1015
|
-
)
|
|
1016
|
-
}
|
|
1017
|
-
);
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
1389
|
// src/components/FileStatus.tsx
|
|
1021
|
-
var
|
|
1390
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1022
1391
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
1023
1392
|
processStatus2["TODO"] = "todo";
|
|
1024
1393
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -1028,24 +1397,24 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
|
1028
1397
|
})(processStatus || {});
|
|
1029
1398
|
function FileStatus(props) {
|
|
1030
1399
|
const { file, now, status, onClick, ...nativeProps } = props;
|
|
1031
|
-
const actionLabel = (0,
|
|
1032
|
-
const palette = (0,
|
|
1033
|
-
const modalIconPalette = (0,
|
|
1034
|
-
const styles = (0,
|
|
1400
|
+
const actionLabel = (0, import_react11.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
1401
|
+
const palette = (0, import_react11.useMemo)(() => getPalette(status), [status]);
|
|
1402
|
+
const modalIconPalette = (0, import_react11.useMemo)(() => getModalIconPalette(status), [status]);
|
|
1403
|
+
const styles = (0, import_react11.useMemo)(() => {
|
|
1035
1404
|
switch (status) {
|
|
1036
1405
|
case "todo" /* TODO */:
|
|
1037
|
-
return (0,
|
|
1406
|
+
return (0, import_recipes12.fileStatus)({ status: "todo" });
|
|
1038
1407
|
case "processing" /* PROCESSING */:
|
|
1039
|
-
return (0,
|
|
1408
|
+
return (0, import_recipes12.fileStatus)({ status: "processing" });
|
|
1040
1409
|
case "done" /* DONE */:
|
|
1041
|
-
return (0,
|
|
1410
|
+
return (0, import_recipes12.fileStatus)({ status: "done" });
|
|
1042
1411
|
case "error" /* ERROR */:
|
|
1043
|
-
return (0,
|
|
1412
|
+
return (0, import_recipes12.fileStatus)({ status: "error" });
|
|
1044
1413
|
default:
|
|
1045
|
-
return (0,
|
|
1414
|
+
return (0, import_recipes12.fileStatus)();
|
|
1046
1415
|
}
|
|
1047
1416
|
}, [status]);
|
|
1048
|
-
const handleClick = (0,
|
|
1417
|
+
const handleClick = (0, import_react11.useCallback)(
|
|
1049
1418
|
(e) => {
|
|
1050
1419
|
const actionStatus = getStatusActionLabel(
|
|
1051
1420
|
status
|
|
@@ -1054,22 +1423,22 @@ function FileStatus(props) {
|
|
|
1054
1423
|
},
|
|
1055
1424
|
[onClick]
|
|
1056
1425
|
);
|
|
1057
|
-
return /* @__PURE__ */ (0,
|
|
1426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1058
1427
|
"div",
|
|
1059
1428
|
{
|
|
1060
1429
|
...nativeProps,
|
|
1061
|
-
className: (0,
|
|
1430
|
+
className: (0, import_css15.cx)(nativeProps.className, styles.root, (0, import_patterns5.hstack)()),
|
|
1062
1431
|
children: [
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1064
1433
|
Avatar,
|
|
1065
1434
|
{
|
|
1066
1435
|
ariaLabel: "",
|
|
1067
1436
|
gradient: modalIconPalette,
|
|
1068
|
-
icon: /* @__PURE__ */ (0,
|
|
1437
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
1069
1438
|
src: ""
|
|
1070
1439
|
}
|
|
1071
1440
|
),
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1441
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1073
1442
|
"div",
|
|
1074
1443
|
{
|
|
1075
1444
|
className: (0, import_patterns5.vstack)({
|
|
@@ -1078,17 +1447,17 @@ function FileStatus(props) {
|
|
|
1078
1447
|
w: "full"
|
|
1079
1448
|
}),
|
|
1080
1449
|
children: [
|
|
1081
|
-
/* @__PURE__ */ (0,
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1082
1451
|
"small",
|
|
1083
1452
|
{
|
|
1084
|
-
className: (0,
|
|
1453
|
+
className: (0, import_css15.css)({
|
|
1085
1454
|
color: "page.text.initial",
|
|
1086
1455
|
textStyle: "label-sm"
|
|
1087
1456
|
}),
|
|
1088
1457
|
children: file
|
|
1089
1458
|
}
|
|
1090
1459
|
),
|
|
1091
|
-
/* @__PURE__ */ (0,
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1092
1461
|
ProgressBar,
|
|
1093
1462
|
{
|
|
1094
1463
|
id: props.id,
|
|
@@ -1097,27 +1466,27 @@ function FileStatus(props) {
|
|
|
1097
1466
|
size: "sm"
|
|
1098
1467
|
}
|
|
1099
1468
|
),
|
|
1100
|
-
/* @__PURE__ */ (0,
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1101
1470
|
FieldMessage,
|
|
1102
1471
|
{
|
|
1103
|
-
className: (0,
|
|
1472
|
+
className: (0, import_css15.css)({
|
|
1104
1473
|
color: "page.text.100"
|
|
1105
1474
|
}),
|
|
1106
1475
|
id: `help:${file}`,
|
|
1107
|
-
children: /* @__PURE__ */ (0,
|
|
1476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MatchFileStatusText, { status, now })
|
|
1108
1477
|
}
|
|
1109
1478
|
) })
|
|
1110
1479
|
]
|
|
1111
1480
|
}
|
|
1112
1481
|
),
|
|
1113
|
-
/* @__PURE__ */ (0,
|
|
1482
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1114
1483
|
IconButton,
|
|
1115
1484
|
{
|
|
1116
1485
|
ariaLabel: actionLabel,
|
|
1117
1486
|
onClick: handleClick,
|
|
1118
1487
|
palette,
|
|
1119
1488
|
size: "sm",
|
|
1120
|
-
children: /* @__PURE__ */ (0,
|
|
1489
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MatchStatusAction, { status })
|
|
1121
1490
|
}
|
|
1122
1491
|
)
|
|
1123
1492
|
]
|
|
@@ -1133,13 +1502,13 @@ function MatchFileStatusIcon(props) {
|
|
|
1133
1502
|
} = $cerberusIcons;
|
|
1134
1503
|
switch (props.status) {
|
|
1135
1504
|
case "todo" /* TODO */:
|
|
1136
|
-
return /* @__PURE__ */ (0,
|
|
1505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TodoIcon, { size: props.size });
|
|
1137
1506
|
case "processing" /* PROCESSING */:
|
|
1138
|
-
return /* @__PURE__ */ (0,
|
|
1507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FileUploaderIcon, { size: props.size });
|
|
1139
1508
|
case "done" /* DONE */:
|
|
1140
|
-
return /* @__PURE__ */ (0,
|
|
1509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DoneIcon, { size: props.size });
|
|
1141
1510
|
case "error" /* ERROR */:
|
|
1142
|
-
return /* @__PURE__ */ (0,
|
|
1511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InvalidIcon, { size: props.size });
|
|
1143
1512
|
default:
|
|
1144
1513
|
throw new Error("Unknown status");
|
|
1145
1514
|
}
|
|
@@ -1163,11 +1532,11 @@ function MatchStatusAction(props) {
|
|
|
1163
1532
|
switch (props.status) {
|
|
1164
1533
|
case "todo" /* TODO */:
|
|
1165
1534
|
case "processing" /* PROCESSING */:
|
|
1166
|
-
return /* @__PURE__ */ (0,
|
|
1535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseIcon, {});
|
|
1167
1536
|
case "error" /* ERROR */:
|
|
1168
|
-
return /* @__PURE__ */ (0,
|
|
1537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RedoIcon, {});
|
|
1169
1538
|
case "done" /* DONE */:
|
|
1170
|
-
return /* @__PURE__ */ (0,
|
|
1539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TrashIcon, {});
|
|
1171
1540
|
default:
|
|
1172
1541
|
throw new Error("Invalid status");
|
|
1173
1542
|
}
|
|
@@ -1213,39 +1582,39 @@ function getModalIconPalette(status) {
|
|
|
1213
1582
|
}
|
|
1214
1583
|
|
|
1215
1584
|
// src/components/FileUploader.tsx
|
|
1216
|
-
var
|
|
1585
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
1217
1586
|
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
1218
|
-
var
|
|
1219
|
-
var
|
|
1587
|
+
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1588
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1220
1589
|
function FileUploader(props) {
|
|
1221
1590
|
var _a;
|
|
1222
|
-
const styles = (0,
|
|
1591
|
+
const styles = (0, import_recipes13.fileUploader)();
|
|
1223
1592
|
const { waitingFileUploader: Icon } = $cerberusIcons;
|
|
1224
|
-
return /* @__PURE__ */ (0,
|
|
1593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1225
1594
|
"div",
|
|
1226
1595
|
{
|
|
1227
1596
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
1228
|
-
className: (0,
|
|
1597
|
+
className: (0, import_css16.cx)(
|
|
1229
1598
|
(0, import_patterns6.vstack)({
|
|
1230
1599
|
justify: "center"
|
|
1231
1600
|
}),
|
|
1232
1601
|
styles.container
|
|
1233
1602
|
),
|
|
1234
1603
|
children: [
|
|
1235
|
-
/* @__PURE__ */ (0,
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1236
1605
|
Avatar,
|
|
1237
1606
|
{
|
|
1238
1607
|
gradient: "charon-light",
|
|
1239
1608
|
ariaLabel: "",
|
|
1240
|
-
icon: /* @__PURE__ */ (0,
|
|
1609
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, {}),
|
|
1241
1610
|
size: "md",
|
|
1242
1611
|
src: ""
|
|
1243
1612
|
}
|
|
1244
1613
|
) }),
|
|
1245
|
-
/* @__PURE__ */ (0,
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1246
1615
|
"label",
|
|
1247
1616
|
{
|
|
1248
|
-
className: (0,
|
|
1617
|
+
className: (0, import_css16.cx)(
|
|
1249
1618
|
(0, import_patterns6.vstack)({
|
|
1250
1619
|
justify: "center"
|
|
1251
1620
|
}),
|
|
@@ -1253,16 +1622,16 @@ function FileUploader(props) {
|
|
|
1253
1622
|
),
|
|
1254
1623
|
htmlFor: props.name,
|
|
1255
1624
|
children: [
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1625
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
1257
1626
|
"Import ",
|
|
1258
1627
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
1259
1628
|
" files",
|
|
1260
|
-
/* @__PURE__ */ (0,
|
|
1261
|
-
/* @__PURE__ */ (0,
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1262
1631
|
"input",
|
|
1263
1632
|
{
|
|
1264
1633
|
...props,
|
|
1265
|
-
className: (0,
|
|
1634
|
+
className: (0, import_css16.cx)(props.className, styles.input),
|
|
1266
1635
|
type: "file"
|
|
1267
1636
|
}
|
|
1268
1637
|
)
|
|
@@ -1275,18 +1644,18 @@ function FileUploader(props) {
|
|
|
1275
1644
|
}
|
|
1276
1645
|
|
|
1277
1646
|
// src/components/Input.tsx
|
|
1278
|
-
var
|
|
1279
|
-
var
|
|
1280
|
-
var
|
|
1647
|
+
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1648
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1649
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1281
1650
|
function Input(props) {
|
|
1282
1651
|
const { describedBy, size, startIcon, endIcon, ...nativeProps } = props;
|
|
1283
|
-
const inputStyles = (0,
|
|
1652
|
+
const inputStyles = (0, import_recipes14.input)({ size });
|
|
1284
1653
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
1285
1654
|
const hasEndIcon = Boolean(endIcon);
|
|
1286
1655
|
const { invalid: InvalidIcon } = $cerberusIcons;
|
|
1287
|
-
return /* @__PURE__ */ (0,
|
|
1288
|
-
/* @__PURE__ */ (0,
|
|
1289
|
-
/* @__PURE__ */ (0,
|
|
1656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: inputStyles.root, children: [
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: Boolean(startIcon), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: inputStyles.startIcon, children: startIcon }) }),
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1290
1659
|
"input",
|
|
1291
1660
|
{
|
|
1292
1661
|
...nativeProps,
|
|
@@ -1294,31 +1663,31 @@ function Input(props) {
|
|
|
1294
1663
|
...describedBy && { "aria-describedby": describedBy },
|
|
1295
1664
|
...invalid && { "aria-invalid": true },
|
|
1296
1665
|
"data-start-icon": Boolean(startIcon),
|
|
1297
|
-
className: (0,
|
|
1666
|
+
className: (0, import_css17.cx)("peer", nativeProps.className, inputStyles.input)
|
|
1298
1667
|
}
|
|
1299
1668
|
),
|
|
1300
|
-
/* @__PURE__ */ (0,
|
|
1301
|
-
/* @__PURE__ */ (0,
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InvalidIcon, { className: inputStyles.icon }) }),
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: hasEndIcon && !invalid, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: inputStyles.icon, children: endIcon }) })
|
|
1302
1671
|
] });
|
|
1303
1672
|
}
|
|
1304
1673
|
|
|
1305
1674
|
// src/components/Label.tsx
|
|
1306
|
-
var
|
|
1307
|
-
var
|
|
1675
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1676
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
1308
1677
|
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
1309
|
-
var
|
|
1678
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1310
1679
|
function Label(props) {
|
|
1311
1680
|
const { hidden, size, ...nativeProps } = props;
|
|
1312
1681
|
const { required, disabled } = useFieldContext();
|
|
1313
1682
|
const usage = hidden ? "hidden" : "visible";
|
|
1314
|
-
return /* @__PURE__ */ (0,
|
|
1683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1315
1684
|
"label",
|
|
1316
1685
|
{
|
|
1317
1686
|
...nativeProps,
|
|
1318
1687
|
...disabled && { "data-disabled": true },
|
|
1319
|
-
className: (0,
|
|
1688
|
+
className: (0, import_css18.cx)(
|
|
1320
1689
|
nativeProps.className,
|
|
1321
|
-
(0,
|
|
1690
|
+
(0, import_recipes15.label)({ size, usage }),
|
|
1322
1691
|
(0, import_patterns7.hstack)({
|
|
1323
1692
|
justify: "space-between",
|
|
1324
1693
|
w: "full"
|
|
@@ -1326,10 +1695,10 @@ function Label(props) {
|
|
|
1326
1695
|
),
|
|
1327
1696
|
children: [
|
|
1328
1697
|
props.children,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1330
1699
|
"span",
|
|
1331
1700
|
{
|
|
1332
|
-
className: (0,
|
|
1701
|
+
className: (0, import_css18.css)({
|
|
1333
1702
|
color: "page.text.100",
|
|
1334
1703
|
fontSize: "inherit"
|
|
1335
1704
|
}),
|
|
@@ -1342,35 +1711,35 @@ function Label(props) {
|
|
|
1342
1711
|
}
|
|
1343
1712
|
|
|
1344
1713
|
// src/components/Legend.tsx
|
|
1345
|
-
var
|
|
1346
|
-
var
|
|
1714
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
1715
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1347
1716
|
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
1348
|
-
var
|
|
1717
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1349
1718
|
function Legend(props) {
|
|
1350
1719
|
const { size, ...nativeProps } = props;
|
|
1351
1720
|
const { invalid, ...formState } = useFieldContext();
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1353
1722
|
"legend",
|
|
1354
1723
|
{
|
|
1355
1724
|
...nativeProps,
|
|
1356
1725
|
...formState,
|
|
1357
1726
|
...invalid && { "aria-invalid": true },
|
|
1358
|
-
className: (0,
|
|
1727
|
+
className: (0, import_css19.cx)(
|
|
1359
1728
|
nativeProps.className,
|
|
1360
1729
|
(0, import_patterns8.hstack)({
|
|
1361
1730
|
justify: "space-between",
|
|
1362
1731
|
w: "full"
|
|
1363
1732
|
}),
|
|
1364
|
-
(0,
|
|
1733
|
+
(0, import_recipes16.label)({
|
|
1365
1734
|
size
|
|
1366
1735
|
})
|
|
1367
1736
|
),
|
|
1368
1737
|
children: [
|
|
1369
1738
|
nativeProps.children,
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Show, { when: formState.required, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1371
1740
|
"span",
|
|
1372
1741
|
{
|
|
1373
|
-
className: (0,
|
|
1742
|
+
className: (0, import_css19.css)({
|
|
1374
1743
|
color: "page.text.100",
|
|
1375
1744
|
fontSize: "inherit"
|
|
1376
1745
|
}),
|
|
@@ -1383,74 +1752,74 @@ function Legend(props) {
|
|
|
1383
1752
|
}
|
|
1384
1753
|
|
|
1385
1754
|
// src/components/Menu.tsx
|
|
1386
|
-
var
|
|
1387
|
-
var
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1390
|
-
var menuStyles = (0,
|
|
1391
|
-
var Menu =
|
|
1755
|
+
var import_react12 = require("@ark-ui/react");
|
|
1756
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1757
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1758
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1759
|
+
var menuStyles = (0, import_recipes17.menu)();
|
|
1760
|
+
var Menu = import_react12.Menu.Root;
|
|
1392
1761
|
function MenuTrigger(props) {
|
|
1393
|
-
return /* @__PURE__ */ (0,
|
|
1762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react12.Menu.Trigger, { ...props, asChild: true });
|
|
1394
1763
|
}
|
|
1395
1764
|
function MenuContent(props) {
|
|
1396
|
-
return /* @__PURE__ */ (0,
|
|
1397
|
-
|
|
1765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react12.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1766
|
+
import_react12.Menu.Content,
|
|
1398
1767
|
{
|
|
1399
1768
|
...props,
|
|
1400
|
-
className: (0,
|
|
1769
|
+
className: (0, import_css20.cx)(props.className, menuStyles.content)
|
|
1401
1770
|
}
|
|
1402
1771
|
) });
|
|
1403
1772
|
}
|
|
1404
1773
|
function MenuItem(props) {
|
|
1405
|
-
return /* @__PURE__ */ (0,
|
|
1774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react12.Menu.Item, { ...props, className: (0, import_css20.cx)(props.className, menuStyles.item) });
|
|
1406
1775
|
}
|
|
1407
|
-
var MenuItemGroup =
|
|
1776
|
+
var MenuItemGroup = import_react12.Menu.ItemGroup;
|
|
1408
1777
|
function MenuGroupLabel(props) {
|
|
1409
|
-
return /* @__PURE__ */ (0,
|
|
1410
|
-
|
|
1778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1779
|
+
import_react12.Menu.ItemGroupLabel,
|
|
1411
1780
|
{
|
|
1412
1781
|
...props,
|
|
1413
|
-
className: (0,
|
|
1782
|
+
className: (0, import_css20.cx)(props.className, menuStyles.itemGroupLabel)
|
|
1414
1783
|
}
|
|
1415
1784
|
);
|
|
1416
1785
|
}
|
|
1417
1786
|
function MenuSeparator(props) {
|
|
1418
|
-
return /* @__PURE__ */ (0,
|
|
1419
|
-
|
|
1787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1788
|
+
import_react12.Menu.Separator,
|
|
1420
1789
|
{
|
|
1421
1790
|
...props,
|
|
1422
|
-
className: (0,
|
|
1791
|
+
className: (0, import_css20.cx)(props.className, menuStyles.separator)
|
|
1423
1792
|
}
|
|
1424
1793
|
);
|
|
1425
1794
|
}
|
|
1426
1795
|
|
|
1427
1796
|
// src/components/Modal.tsx
|
|
1428
|
-
var
|
|
1429
|
-
var
|
|
1430
|
-
var
|
|
1431
|
-
var
|
|
1797
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1798
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1799
|
+
var import_react13 = require("react");
|
|
1800
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1432
1801
|
function ModalEl(props, ref) {
|
|
1433
|
-
return /* @__PURE__ */ (0,
|
|
1802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1434
1803
|
"dialog",
|
|
1435
1804
|
{
|
|
1436
1805
|
...props,
|
|
1437
|
-
className: (0,
|
|
1806
|
+
className: (0, import_css21.cx)(props.className, (0, import_recipes18.modal)().dialog),
|
|
1438
1807
|
ref
|
|
1439
1808
|
}
|
|
1440
1809
|
);
|
|
1441
1810
|
}
|
|
1442
|
-
var Modal = (0,
|
|
1811
|
+
var Modal = (0, import_react13.forwardRef)(ModalEl);
|
|
1443
1812
|
|
|
1444
1813
|
// src/components/ModalHeader.tsx
|
|
1445
|
-
var
|
|
1814
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1446
1815
|
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
1447
|
-
var
|
|
1816
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1448
1817
|
function ModalHeader(props) {
|
|
1449
|
-
return /* @__PURE__ */ (0,
|
|
1818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1450
1819
|
"div",
|
|
1451
1820
|
{
|
|
1452
1821
|
...props,
|
|
1453
|
-
className: (0,
|
|
1822
|
+
className: (0, import_css22.cx)(
|
|
1454
1823
|
props.className,
|
|
1455
1824
|
(0, import_patterns9.vstack)({
|
|
1456
1825
|
alignItems: "flex-start",
|
|
@@ -1463,25 +1832,25 @@ function ModalHeader(props) {
|
|
|
1463
1832
|
}
|
|
1464
1833
|
|
|
1465
1834
|
// src/components/ModalHeading.tsx
|
|
1466
|
-
var
|
|
1467
|
-
var
|
|
1468
|
-
var
|
|
1835
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1836
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
1837
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1469
1838
|
function ModalHeading(props) {
|
|
1470
|
-
return /* @__PURE__ */ (0,
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { ...props, className: (0, import_css23.cx)(props.className, (0, import_recipes19.modal)().heading) });
|
|
1471
1840
|
}
|
|
1472
1841
|
|
|
1473
1842
|
// src/components/ModalDescription.tsx
|
|
1474
|
-
var
|
|
1475
|
-
var
|
|
1476
|
-
var
|
|
1843
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
1844
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
1845
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1477
1846
|
function ModalDescription(props) {
|
|
1478
|
-
return /* @__PURE__ */ (0,
|
|
1847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { ...props, className: (0, import_css24.cx)(props.className, (0, import_recipes20.modal)().description) });
|
|
1479
1848
|
}
|
|
1480
1849
|
|
|
1481
1850
|
// src/components/NavMenuTrigger.tsx
|
|
1482
|
-
var
|
|
1483
|
-
var
|
|
1484
|
-
var
|
|
1851
|
+
var import_react15 = require("react");
|
|
1852
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
1853
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
1485
1854
|
|
|
1486
1855
|
// src/aria-helpers/nav-menu.aria.ts
|
|
1487
1856
|
function createNavTriggerProps(values) {
|
|
@@ -1492,18 +1861,18 @@ function createNavTriggerProps(values) {
|
|
|
1492
1861
|
}
|
|
1493
1862
|
|
|
1494
1863
|
// src/context/navMenu.tsx
|
|
1495
|
-
var
|
|
1496
|
-
var
|
|
1497
|
-
var
|
|
1498
|
-
var NavMenuContext = (0,
|
|
1864
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
1865
|
+
var import_react14 = require("react");
|
|
1866
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1867
|
+
var NavMenuContext = (0, import_react14.createContext)(null);
|
|
1499
1868
|
function NavMenu(props) {
|
|
1500
|
-
const triggerRef = (0,
|
|
1501
|
-
const menuRef = (0,
|
|
1502
|
-
const [expanded, setExpanded] = (0,
|
|
1503
|
-
const handleToggle = (0,
|
|
1869
|
+
const triggerRef = (0, import_react14.useRef)(null);
|
|
1870
|
+
const menuRef = (0, import_react14.useRef)(null);
|
|
1871
|
+
const [expanded, setExpanded] = (0, import_react14.useState)(false);
|
|
1872
|
+
const handleToggle = (0, import_react14.useCallback)(() => {
|
|
1504
1873
|
setExpanded((prev) => !prev);
|
|
1505
1874
|
}, []);
|
|
1506
|
-
const value = (0,
|
|
1875
|
+
const value = (0, import_react14.useMemo)(
|
|
1507
1876
|
() => ({
|
|
1508
1877
|
triggerRef,
|
|
1509
1878
|
menuRef,
|
|
@@ -1512,10 +1881,10 @@ function NavMenu(props) {
|
|
|
1512
1881
|
}),
|
|
1513
1882
|
[expanded, handleToggle]
|
|
1514
1883
|
);
|
|
1515
|
-
return /* @__PURE__ */ (0,
|
|
1884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NavMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1516
1885
|
"nav",
|
|
1517
1886
|
{
|
|
1518
|
-
className: (0,
|
|
1887
|
+
className: (0, import_css25.css)({
|
|
1519
1888
|
position: "relative"
|
|
1520
1889
|
}),
|
|
1521
1890
|
children: props.children
|
|
@@ -1523,7 +1892,7 @@ function NavMenu(props) {
|
|
|
1523
1892
|
) });
|
|
1524
1893
|
}
|
|
1525
1894
|
function useNavMenuContext() {
|
|
1526
|
-
const context = (0,
|
|
1895
|
+
const context = (0, import_react14.useContext)(NavMenuContext);
|
|
1527
1896
|
if (!context) {
|
|
1528
1897
|
throw new Error("useNavMenuContext must be used within a NavMenu.");
|
|
1529
1898
|
}
|
|
@@ -1531,7 +1900,7 @@ function useNavMenuContext() {
|
|
|
1531
1900
|
}
|
|
1532
1901
|
|
|
1533
1902
|
// src/components/NavMenuTrigger.tsx
|
|
1534
|
-
var
|
|
1903
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1535
1904
|
function NavMenuTrigger(props) {
|
|
1536
1905
|
const {
|
|
1537
1906
|
as,
|
|
@@ -1550,25 +1919,25 @@ function NavMenuTrigger(props) {
|
|
|
1550
1919
|
});
|
|
1551
1920
|
const hasAs = Boolean(as);
|
|
1552
1921
|
const AsSub = as;
|
|
1553
|
-
const handleClick = (0,
|
|
1922
|
+
const handleClick = (0, import_react15.useCallback)(
|
|
1554
1923
|
(e) => {
|
|
1555
1924
|
if (onClick) return onClick(e);
|
|
1556
1925
|
onToggle();
|
|
1557
1926
|
},
|
|
1558
1927
|
[onClick, onToggle]
|
|
1559
1928
|
);
|
|
1560
|
-
return /* @__PURE__ */ (0,
|
|
1929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1561
1930
|
Show,
|
|
1562
1931
|
{
|
|
1563
1932
|
when: hasAs,
|
|
1564
|
-
fallback: /* @__PURE__ */ (0,
|
|
1933
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1565
1934
|
"button",
|
|
1566
1935
|
{
|
|
1567
1936
|
...nativeProps,
|
|
1568
1937
|
...ariaProps,
|
|
1569
|
-
className: (0,
|
|
1938
|
+
className: (0, import_css26.cx)(
|
|
1570
1939
|
nativeProps.className,
|
|
1571
|
-
(0,
|
|
1940
|
+
(0, import_recipes21.button)({
|
|
1572
1941
|
palette,
|
|
1573
1942
|
usage,
|
|
1574
1943
|
shape
|
|
@@ -1579,7 +1948,7 @@ function NavMenuTrigger(props) {
|
|
|
1579
1948
|
children: props.children
|
|
1580
1949
|
}
|
|
1581
1950
|
),
|
|
1582
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
1951
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1583
1952
|
AsSub,
|
|
1584
1953
|
{
|
|
1585
1954
|
...nativeProps,
|
|
@@ -1593,10 +1962,10 @@ function NavMenuTrigger(props) {
|
|
|
1593
1962
|
}
|
|
1594
1963
|
|
|
1595
1964
|
// src/components/NavMenuList.tsx
|
|
1596
|
-
var
|
|
1597
|
-
var
|
|
1965
|
+
var import_react16 = require("react");
|
|
1966
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
1598
1967
|
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
1599
|
-
var
|
|
1968
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1600
1969
|
function getPosition(position) {
|
|
1601
1970
|
const defaultPositions = {
|
|
1602
1971
|
left: "auto",
|
|
@@ -1650,16 +2019,16 @@ var navListStyles = (0, import_patterns10.vstack)({
|
|
|
1650
2019
|
function NavMenuList(props) {
|
|
1651
2020
|
const { position, ...nativeProps } = props;
|
|
1652
2021
|
const { menuRef, expanded } = useNavMenuContext();
|
|
1653
|
-
const locationStyles = (0,
|
|
2022
|
+
const locationStyles = (0, import_react16.useMemo)(
|
|
1654
2023
|
() => getPosition(position ?? "bottom"),
|
|
1655
2024
|
[position]
|
|
1656
2025
|
);
|
|
1657
|
-
return /* @__PURE__ */ (0,
|
|
2026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Show, { when: expanded, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1658
2027
|
"ul",
|
|
1659
2028
|
{
|
|
1660
2029
|
...nativeProps,
|
|
1661
2030
|
"data-position": position ?? "bottom",
|
|
1662
|
-
className: (0,
|
|
2031
|
+
className: (0, import_css27.cx)(nativeProps.className, navListStyles),
|
|
1663
2032
|
ref: menuRef,
|
|
1664
2033
|
style: locationStyles
|
|
1665
2034
|
}
|
|
@@ -1667,29 +2036,29 @@ function NavMenuList(props) {
|
|
|
1667
2036
|
}
|
|
1668
2037
|
|
|
1669
2038
|
// src/components/NavMenuLink.tsx
|
|
1670
|
-
var
|
|
1671
|
-
var
|
|
2039
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
2040
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1672
2041
|
function NavMenuLink(props) {
|
|
1673
2042
|
const { as, ...nativeProps } = props;
|
|
1674
2043
|
const hasAs = Boolean(as);
|
|
1675
2044
|
const AsSub = as;
|
|
1676
|
-
return /* @__PURE__ */ (0,
|
|
2045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1677
2046
|
"li",
|
|
1678
2047
|
{
|
|
1679
|
-
className: (0,
|
|
2048
|
+
className: (0, import_css28.css)({
|
|
1680
2049
|
w: "full"
|
|
1681
2050
|
}),
|
|
1682
|
-
children: /* @__PURE__ */ (0,
|
|
2051
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1683
2052
|
Show,
|
|
1684
2053
|
{
|
|
1685
2054
|
when: hasAs,
|
|
1686
|
-
fallback: /* @__PURE__ */ (0,
|
|
2055
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1687
2056
|
"a",
|
|
1688
2057
|
{
|
|
1689
2058
|
...nativeProps,
|
|
1690
|
-
className: (0,
|
|
2059
|
+
className: (0, import_css28.cx)(
|
|
1691
2060
|
nativeProps.className,
|
|
1692
|
-
(0,
|
|
2061
|
+
(0, import_css28.css)({
|
|
1693
2062
|
color: "action.navigation.initial",
|
|
1694
2063
|
textStyle: "link",
|
|
1695
2064
|
_hover: {
|
|
@@ -1699,7 +2068,7 @@ function NavMenuLink(props) {
|
|
|
1699
2068
|
)
|
|
1700
2069
|
}
|
|
1701
2070
|
),
|
|
1702
|
-
children: hasAs && /* @__PURE__ */ (0,
|
|
2071
|
+
children: hasAs && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(AsSub, { ...nativeProps })
|
|
1703
2072
|
}
|
|
1704
2073
|
)
|
|
1705
2074
|
}
|
|
@@ -1707,10 +2076,10 @@ function NavMenuLink(props) {
|
|
|
1707
2076
|
}
|
|
1708
2077
|
|
|
1709
2078
|
// src/components/Notification.tsx
|
|
1710
|
-
var
|
|
2079
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
1711
2080
|
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
1712
|
-
var
|
|
1713
|
-
var
|
|
2081
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
2082
|
+
var import_react17 = require("react");
|
|
1714
2083
|
|
|
1715
2084
|
// src/aria-helpers/trap-focus.aria.ts
|
|
1716
2085
|
function trapFocus(modalRef) {
|
|
@@ -1739,24 +2108,24 @@ function trapFocus(modalRef) {
|
|
|
1739
2108
|
}
|
|
1740
2109
|
|
|
1741
2110
|
// src/components/Notification.tsx
|
|
1742
|
-
var
|
|
2111
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1743
2112
|
function MatchNotificationIcon(props) {
|
|
1744
2113
|
const palette = props.palette || "info";
|
|
1745
2114
|
const key = `${palette}Notification`;
|
|
1746
2115
|
const Icon = $cerberusIcons[key];
|
|
1747
|
-
return /* @__PURE__ */ (0,
|
|
2116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, {});
|
|
1748
2117
|
}
|
|
1749
2118
|
function Notification(props) {
|
|
1750
2119
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
1751
|
-
const ref = (0,
|
|
2120
|
+
const ref = (0, import_react17.useRef)(null);
|
|
1752
2121
|
const onKeyDown = trapFocus(ref);
|
|
1753
|
-
const styles = (0,
|
|
2122
|
+
const styles = (0, import_recipes22.notification)({ palette });
|
|
1754
2123
|
const { close: CloseIcon } = $cerberusIcons;
|
|
1755
|
-
return /* @__PURE__ */ (0,
|
|
2124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
1756
2125
|
"dialog",
|
|
1757
2126
|
{
|
|
1758
2127
|
...nativeProps,
|
|
1759
|
-
className: (0,
|
|
2128
|
+
className: (0, import_css29.cx)(
|
|
1760
2129
|
nativeProps.className,
|
|
1761
2130
|
(0, import_patterns11.hstack)({
|
|
1762
2131
|
position: "relative",
|
|
@@ -1767,8 +2136,8 @@ function Notification(props) {
|
|
|
1767
2136
|
onKeyDown,
|
|
1768
2137
|
ref,
|
|
1769
2138
|
children: [
|
|
1770
|
-
/* @__PURE__ */ (0,
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
2139
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MatchNotificationIcon, { palette }) }),
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1772
2141
|
"div",
|
|
1773
2142
|
{
|
|
1774
2143
|
className: (0, import_patterns11.vstack)({
|
|
@@ -1779,14 +2148,14 @@ function Notification(props) {
|
|
|
1779
2148
|
children
|
|
1780
2149
|
}
|
|
1781
2150
|
),
|
|
1782
|
-
/* @__PURE__ */ (0,
|
|
2151
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1783
2152
|
"button",
|
|
1784
2153
|
{
|
|
1785
2154
|
"aria-label": "Close",
|
|
1786
2155
|
className: styles.close,
|
|
1787
2156
|
onClick: onClose,
|
|
1788
2157
|
value: props.id,
|
|
1789
|
-
children: /* @__PURE__ */ (0,
|
|
2158
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CloseIcon, {})
|
|
1790
2159
|
}
|
|
1791
2160
|
)
|
|
1792
2161
|
]
|
|
@@ -1795,48 +2164,44 @@ function Notification(props) {
|
|
|
1795
2164
|
}
|
|
1796
2165
|
|
|
1797
2166
|
// src/components/NotificationHeading.tsx
|
|
1798
|
-
var
|
|
1799
|
-
var
|
|
1800
|
-
var
|
|
2167
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
2168
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
2169
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1801
2170
|
function NotificationHeading(props) {
|
|
1802
2171
|
const { palette, ...nativeProps } = props;
|
|
1803
|
-
const styles = (0,
|
|
1804
|
-
return /* @__PURE__ */ (0,
|
|
2172
|
+
const styles = (0, import_recipes23.notification)({ palette });
|
|
2173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: (0, import_css30.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
1805
2174
|
}
|
|
1806
|
-
|
|
1807
|
-
// src/components/NotificationDescription.tsx
|
|
1808
|
-
var
|
|
1809
|
-
var
|
|
1810
|
-
var
|
|
2175
|
+
|
|
2176
|
+
// src/components/NotificationDescription.tsx
|
|
2177
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
2178
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
2179
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
1811
2180
|
function NotificationDescription(props) {
|
|
1812
2181
|
const { palette, ...nativeProps } = props;
|
|
1813
|
-
const styles = (0,
|
|
1814
|
-
return /* @__PURE__ */ (0,
|
|
2182
|
+
const styles = (0, import_recipes24.notification)({ palette });
|
|
2183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
1815
2184
|
"p",
|
|
1816
2185
|
{
|
|
1817
|
-
className: (0,
|
|
2186
|
+
className: (0, import_css31.cx)(nativeProps.className, styles.description),
|
|
1818
2187
|
...nativeProps
|
|
1819
2188
|
}
|
|
1820
2189
|
);
|
|
1821
2190
|
}
|
|
1822
2191
|
|
|
1823
|
-
// src/components/Portal.tsx
|
|
1824
|
-
var import_react13 = require("@ark-ui/react");
|
|
1825
|
-
var Portal = import_react13.Portal;
|
|
1826
|
-
|
|
1827
2192
|
// src/components/Radio.tsx
|
|
1828
|
-
var
|
|
2193
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
1829
2194
|
var import_patterns12 = require("@cerberus/styled-system/patterns");
|
|
1830
|
-
var
|
|
1831
|
-
var
|
|
2195
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2196
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1832
2197
|
function Radio(props) {
|
|
1833
2198
|
const { children, size, ...nativeProps } = props;
|
|
1834
2199
|
const { invalid, ...state } = useFieldContext();
|
|
1835
|
-
const styles = (0,
|
|
1836
|
-
return /* @__PURE__ */ (0,
|
|
2200
|
+
const styles = (0, import_recipes25.radio)({ size });
|
|
2201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
1837
2202
|
"div",
|
|
1838
2203
|
{
|
|
1839
|
-
className: (0,
|
|
2204
|
+
className: (0, import_css32.cx)(
|
|
1840
2205
|
"group",
|
|
1841
2206
|
(0, import_patterns12.hstack)({
|
|
1842
2207
|
gap: "sm"
|
|
@@ -1845,13 +2210,13 @@ function Radio(props) {
|
|
|
1845
2210
|
),
|
|
1846
2211
|
tabIndex: 0,
|
|
1847
2212
|
children: [
|
|
1848
|
-
/* @__PURE__ */ (0,
|
|
2213
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
1849
2214
|
"input",
|
|
1850
2215
|
{
|
|
1851
2216
|
...nativeProps,
|
|
1852
2217
|
...state,
|
|
1853
2218
|
...invalid && { "aria-invalid": true },
|
|
1854
|
-
className: (0,
|
|
2219
|
+
className: (0, import_css32.cx)(nativeProps.className, styles.input),
|
|
1855
2220
|
tabIndex: -1,
|
|
1856
2221
|
type: "radio"
|
|
1857
2222
|
}
|
|
@@ -1863,19 +2228,19 @@ function Radio(props) {
|
|
|
1863
2228
|
}
|
|
1864
2229
|
|
|
1865
2230
|
// src/components/Select.tsx
|
|
1866
|
-
var
|
|
2231
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
1867
2232
|
var import_patterns13 = require("@cerberus/styled-system/patterns");
|
|
1868
|
-
var
|
|
1869
|
-
var
|
|
2233
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2234
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1870
2235
|
function Select(props) {
|
|
1871
2236
|
const { describedBy, size, ...nativeProps } = props;
|
|
1872
2237
|
const { invalid, ...fieldStates } = useFieldContext();
|
|
1873
2238
|
const { invalid: InvalidIcon, selectArrow: SelectArrow } = $cerberusIcons;
|
|
1874
|
-
const styles = (0,
|
|
2239
|
+
const styles = (0, import_recipes26.select)({
|
|
1875
2240
|
size
|
|
1876
2241
|
});
|
|
1877
|
-
return /* @__PURE__ */ (0,
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
2242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: styles.root, children: [
|
|
2243
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1879
2244
|
"select",
|
|
1880
2245
|
{
|
|
1881
2246
|
...nativeProps,
|
|
@@ -1885,38 +2250,38 @@ function Select(props) {
|
|
|
1885
2250
|
className: styles.input
|
|
1886
2251
|
}
|
|
1887
2252
|
),
|
|
1888
|
-
/* @__PURE__ */ (0,
|
|
2253
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
1889
2254
|
"span",
|
|
1890
2255
|
{
|
|
1891
|
-
className: (0,
|
|
2256
|
+
className: (0, import_css33.cx)(
|
|
1892
2257
|
styles.iconStack,
|
|
1893
2258
|
(0, import_patterns13.hstack)({
|
|
1894
2259
|
gap: "2"
|
|
1895
2260
|
})
|
|
1896
2261
|
),
|
|
1897
2262
|
children: [
|
|
1898
|
-
/* @__PURE__ */ (0,
|
|
2263
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
1899
2264
|
"span",
|
|
1900
2265
|
{
|
|
1901
2266
|
...invalid && { "data-invalid": true },
|
|
1902
2267
|
className: styles.stateIcon,
|
|
1903
|
-
children: /* @__PURE__ */ (0,
|
|
2268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(InvalidIcon, {})
|
|
1904
2269
|
}
|
|
1905
2270
|
) }),
|
|
1906
|
-
/* @__PURE__ */ (0,
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectArrow, {}) })
|
|
1907
2272
|
]
|
|
1908
2273
|
}
|
|
1909
2274
|
)
|
|
1910
2275
|
] });
|
|
1911
2276
|
}
|
|
1912
2277
|
function Option(props) {
|
|
1913
|
-
return /* @__PURE__ */ (0,
|
|
2278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { ...props });
|
|
1914
2279
|
}
|
|
1915
2280
|
|
|
1916
2281
|
// src/components/Spinner.tsx
|
|
1917
|
-
var
|
|
2282
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
1918
2283
|
function Spinner(props) {
|
|
1919
|
-
return /* @__PURE__ */ (0,
|
|
2284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1920
2285
|
"svg",
|
|
1921
2286
|
{
|
|
1922
2287
|
"aria-busy": "true",
|
|
@@ -1926,7 +2291,7 @@ function Spinner(props) {
|
|
|
1926
2291
|
width: props.size,
|
|
1927
2292
|
viewBox: "0 0 24 24",
|
|
1928
2293
|
...props,
|
|
1929
|
-
children: /* @__PURE__ */ (0,
|
|
2294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
1930
2295
|
"g",
|
|
1931
2296
|
{
|
|
1932
2297
|
fill: "none",
|
|
@@ -1935,14 +2300,14 @@ function Spinner(props) {
|
|
|
1935
2300
|
strokeLinejoin: "round",
|
|
1936
2301
|
strokeWidth: 2,
|
|
1937
2302
|
children: [
|
|
1938
|
-
/* @__PURE__ */ (0,
|
|
2303
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
1939
2304
|
"path",
|
|
1940
2305
|
{
|
|
1941
2306
|
strokeDasharray: 16,
|
|
1942
2307
|
strokeDashoffset: 16,
|
|
1943
2308
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1944
2309
|
children: [
|
|
1945
|
-
/* @__PURE__ */ (0,
|
|
2310
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1946
2311
|
"animate",
|
|
1947
2312
|
{
|
|
1948
2313
|
fill: "freeze",
|
|
@@ -1951,7 +2316,7 @@ function Spinner(props) {
|
|
|
1951
2316
|
values: "16;0"
|
|
1952
2317
|
}
|
|
1953
2318
|
),
|
|
1954
|
-
/* @__PURE__ */ (0,
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1955
2320
|
"animateTransform",
|
|
1956
2321
|
{
|
|
1957
2322
|
attributeName: "transform",
|
|
@@ -1964,14 +2329,14 @@ function Spinner(props) {
|
|
|
1964
2329
|
]
|
|
1965
2330
|
}
|
|
1966
2331
|
),
|
|
1967
|
-
/* @__PURE__ */ (0,
|
|
2332
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1968
2333
|
"path",
|
|
1969
2334
|
{
|
|
1970
2335
|
strokeDasharray: 64,
|
|
1971
2336
|
strokeDashoffset: 64,
|
|
1972
2337
|
strokeOpacity: 0.3,
|
|
1973
2338
|
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",
|
|
1974
|
-
children: /* @__PURE__ */ (0,
|
|
2339
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
1975
2340
|
"animate",
|
|
1976
2341
|
{
|
|
1977
2342
|
fill: "freeze",
|
|
@@ -1990,31 +2355,31 @@ function Spinner(props) {
|
|
|
1990
2355
|
}
|
|
1991
2356
|
|
|
1992
2357
|
// src/components/Tab.tsx
|
|
1993
|
-
var
|
|
2358
|
+
var import_react20 = require("react");
|
|
1994
2359
|
|
|
1995
2360
|
// src/context/tabs.tsx
|
|
1996
|
-
var
|
|
1997
|
-
var
|
|
1998
|
-
var
|
|
1999
|
-
var TabsContext = (0,
|
|
2361
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2362
|
+
var import_react18 = require("react");
|
|
2363
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2364
|
+
var TabsContext = (0, import_react18.createContext)(null);
|
|
2000
2365
|
function Tabs(props) {
|
|
2001
2366
|
const { cache, active, id, palette } = props;
|
|
2002
|
-
const [activeTab, setActiveTab] = (0,
|
|
2003
|
-
const tabsList = (0,
|
|
2004
|
-
const uuid = (0,
|
|
2367
|
+
const [activeTab, setActiveTab] = (0, import_react18.useState)(() => cache ? "" : active ?? "");
|
|
2368
|
+
const tabsList = (0, import_react18.useRef)([]);
|
|
2369
|
+
const uuid = (0, import_react18.useMemo)(() => {
|
|
2005
2370
|
return id ? `cerberus-tabs-${id}` : "cerberus-tabs";
|
|
2006
2371
|
}, [id]);
|
|
2007
|
-
const value = (0,
|
|
2372
|
+
const value = (0, import_react18.useMemo)(
|
|
2008
2373
|
() => ({
|
|
2009
2374
|
tabs: tabsList,
|
|
2010
2375
|
id: uuid,
|
|
2011
2376
|
active: activeTab,
|
|
2012
|
-
styles: (0,
|
|
2377
|
+
styles: (0, import_recipes27.tabs)({ palette }),
|
|
2013
2378
|
onTabUpdate: setActiveTab
|
|
2014
2379
|
}),
|
|
2015
2380
|
[activeTab, setActiveTab, palette, uuid, tabsList]
|
|
2016
2381
|
);
|
|
2017
|
-
(0,
|
|
2382
|
+
(0, import_react18.useEffect)(() => {
|
|
2018
2383
|
if (cache) {
|
|
2019
2384
|
const cachedTab = window.localStorage.getItem(uuid);
|
|
2020
2385
|
setActiveTab(
|
|
@@ -2022,15 +2387,15 @@ function Tabs(props) {
|
|
|
2022
2387
|
);
|
|
2023
2388
|
}
|
|
2024
2389
|
}, [cache, active, uuid]);
|
|
2025
|
-
(0,
|
|
2390
|
+
(0, import_react18.useEffect)(() => {
|
|
2026
2391
|
if (cache && activeTab) {
|
|
2027
2392
|
window.localStorage.setItem(uuid, activeTab);
|
|
2028
2393
|
}
|
|
2029
2394
|
}, [activeTab, cache]);
|
|
2030
|
-
return /* @__PURE__ */ (0,
|
|
2395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TabsContext.Provider, { value, children: props.children });
|
|
2031
2396
|
}
|
|
2032
2397
|
function useTabsContext() {
|
|
2033
|
-
const context = (0,
|
|
2398
|
+
const context = (0, import_react18.useContext)(TabsContext);
|
|
2034
2399
|
if (!context) {
|
|
2035
2400
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
2036
2401
|
}
|
|
@@ -2038,10 +2403,10 @@ function useTabsContext() {
|
|
|
2038
2403
|
}
|
|
2039
2404
|
|
|
2040
2405
|
// src/components/Tab.tsx
|
|
2041
|
-
var
|
|
2406
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2042
2407
|
|
|
2043
2408
|
// src/aria-helpers/tabs.aria.ts
|
|
2044
|
-
var
|
|
2409
|
+
var import_react19 = require("react");
|
|
2045
2410
|
function getNextIndex(index, length) {
|
|
2046
2411
|
return index === length - 1 ? 0 : index + 1;
|
|
2047
2412
|
}
|
|
@@ -2050,8 +2415,8 @@ function getPrevIndex(index, length) {
|
|
|
2050
2415
|
}
|
|
2051
2416
|
function useTabsKeyboardNavigation() {
|
|
2052
2417
|
const { tabs: tabs2 } = useTabsContext();
|
|
2053
|
-
const [activeTab, setActiveTab] = (0,
|
|
2054
|
-
(0,
|
|
2418
|
+
const [activeTab, setActiveTab] = (0, import_react19.useState)(-1);
|
|
2419
|
+
(0, import_react19.useEffect)(() => {
|
|
2055
2420
|
const handleKeyDown = (event) => {
|
|
2056
2421
|
const index = activeTab === -1 ? tabs2.current.findIndex((tab) => tab.ariaSelected === "true") : activeTab;
|
|
2057
2422
|
const nextIndex = getNextIndex(index, tabs2.current.length);
|
|
@@ -2097,19 +2462,19 @@ function useTabsKeyboardNavigation() {
|
|
|
2097
2462
|
}
|
|
2098
2463
|
|
|
2099
2464
|
// src/components/Tab.tsx
|
|
2100
|
-
var
|
|
2465
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2101
2466
|
function Tab(props) {
|
|
2102
2467
|
const { value, ...nativeProps } = props;
|
|
2103
2468
|
const { active, onTabUpdate, styles } = useTabsContext();
|
|
2104
|
-
const [isPending, startTransition] = (0,
|
|
2469
|
+
const [isPending, startTransition] = (0, import_react20.useTransition)();
|
|
2105
2470
|
const { ref } = useTabsKeyboardNavigation();
|
|
2106
|
-
const isActive = (0,
|
|
2471
|
+
const isActive = (0, import_react20.useMemo)(() => active === value, [active, value]);
|
|
2107
2472
|
function handleClick(e) {
|
|
2108
2473
|
var _a;
|
|
2109
2474
|
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
2110
2475
|
startTransition(() => onTabUpdate(e.currentTarget.value));
|
|
2111
2476
|
}
|
|
2112
|
-
return /* @__PURE__ */ (0,
|
|
2477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2113
2478
|
"button",
|
|
2114
2479
|
{
|
|
2115
2480
|
...nativeProps,
|
|
@@ -2118,7 +2483,7 @@ function Tab(props) {
|
|
|
2118
2483
|
"aria-busy": isPending,
|
|
2119
2484
|
"aria-selected": isActive,
|
|
2120
2485
|
id: `tab:${value}`,
|
|
2121
|
-
className: (0,
|
|
2486
|
+
className: (0, import_css34.cx)(nativeProps.className, styles.tab),
|
|
2122
2487
|
onClick: handleClick,
|
|
2123
2488
|
role: "tab",
|
|
2124
2489
|
ref,
|
|
@@ -2128,18 +2493,18 @@ function Tab(props) {
|
|
|
2128
2493
|
}
|
|
2129
2494
|
|
|
2130
2495
|
// src/components/TabList.tsx
|
|
2131
|
-
var
|
|
2496
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
2132
2497
|
var import_patterns14 = require("@cerberus/styled-system/patterns");
|
|
2133
|
-
var
|
|
2498
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2134
2499
|
function TabList(props) {
|
|
2135
2500
|
const { description, ...nativeProps } = props;
|
|
2136
2501
|
const { id, styles } = useTabsContext();
|
|
2137
|
-
return /* @__PURE__ */ (0,
|
|
2502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2138
2503
|
"div",
|
|
2139
2504
|
{
|
|
2140
2505
|
...nativeProps,
|
|
2141
2506
|
"aria-label": description,
|
|
2142
|
-
className: (0,
|
|
2507
|
+
className: (0, import_css35.cx)(
|
|
2143
2508
|
nativeProps.className,
|
|
2144
2509
|
(0, import_patterns14.hstack)({
|
|
2145
2510
|
gap: "0"
|
|
@@ -2153,20 +2518,20 @@ function TabList(props) {
|
|
|
2153
2518
|
}
|
|
2154
2519
|
|
|
2155
2520
|
// src/components/TabPanel.tsx
|
|
2156
|
-
var
|
|
2157
|
-
var
|
|
2158
|
-
var
|
|
2521
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
2522
|
+
var import_react21 = require("react");
|
|
2523
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2159
2524
|
function TabPanel(props) {
|
|
2160
2525
|
const { tab, ...nativeProps } = props;
|
|
2161
2526
|
const { active, styles } = useTabsContext();
|
|
2162
|
-
const isActive = (0,
|
|
2163
|
-
return /* @__PURE__ */ (0,
|
|
2527
|
+
const isActive = (0, import_react21.useMemo)(() => active === tab, [active, tab]);
|
|
2528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Show, { when: isActive, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2164
2529
|
"div",
|
|
2165
2530
|
{
|
|
2166
2531
|
...nativeProps,
|
|
2167
2532
|
...isActive && { tabIndex: 0 },
|
|
2168
2533
|
"aria-labelledby": `tab:${tab}`,
|
|
2169
|
-
className: (0,
|
|
2534
|
+
className: (0, import_css36.cx)(nativeProps.className, styles.tabPanel),
|
|
2170
2535
|
id: `panel:${tab}`,
|
|
2171
2536
|
role: "tabpanel"
|
|
2172
2537
|
}
|
|
@@ -2174,60 +2539,60 @@ function TabPanel(props) {
|
|
|
2174
2539
|
}
|
|
2175
2540
|
|
|
2176
2541
|
// src/components/Table.tsx
|
|
2177
|
-
var
|
|
2178
|
-
var
|
|
2179
|
-
var
|
|
2542
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
2543
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2544
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2180
2545
|
function Table(props) {
|
|
2181
2546
|
const { caption, children, ...nativeProps } = props;
|
|
2182
|
-
const styles = (0,
|
|
2183
|
-
return /* @__PURE__ */ (0,
|
|
2547
|
+
const styles = (0, import_recipes28.table)();
|
|
2548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2184
2549
|
"table",
|
|
2185
2550
|
{
|
|
2186
2551
|
...nativeProps,
|
|
2187
|
-
className: (0,
|
|
2552
|
+
className: (0, import_css37.cx)(nativeProps.className, styles.table),
|
|
2188
2553
|
children: [
|
|
2189
|
-
/* @__PURE__ */ (0,
|
|
2554
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("caption", { className: styles.caption, children: caption }),
|
|
2190
2555
|
children
|
|
2191
2556
|
]
|
|
2192
2557
|
}
|
|
2193
2558
|
) });
|
|
2194
2559
|
}
|
|
2195
2560
|
function Tr(props) {
|
|
2196
|
-
return /* @__PURE__ */ (0,
|
|
2561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("tr", { ...props });
|
|
2197
2562
|
}
|
|
2198
2563
|
|
|
2199
2564
|
// src/components/Thead.tsx
|
|
2200
|
-
var
|
|
2201
|
-
var
|
|
2202
|
-
var
|
|
2565
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
2566
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2567
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2203
2568
|
function Thead(props) {
|
|
2204
|
-
return /* @__PURE__ */ (0,
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("thead", { ...props, className: (0, import_css38.cx)(props.className, (0, import_recipes29.thead)()) });
|
|
2205
2570
|
}
|
|
2206
2571
|
|
|
2207
2572
|
// src/components/Th.tsx
|
|
2208
|
-
var
|
|
2209
|
-
var
|
|
2210
|
-
var
|
|
2573
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
2574
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
2575
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2211
2576
|
function Th(props) {
|
|
2212
2577
|
const { size, onClick, ...nativeProps } = props;
|
|
2213
|
-
return /* @__PURE__ */ (0,
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2214
2579
|
Show,
|
|
2215
2580
|
{
|
|
2216
2581
|
when: Boolean(onClick),
|
|
2217
|
-
fallback: /* @__PURE__ */ (0,
|
|
2582
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2218
2583
|
"th",
|
|
2219
2584
|
{
|
|
2220
2585
|
...nativeProps,
|
|
2221
|
-
className: (0,
|
|
2586
|
+
className: (0, import_css39.cx)(nativeProps.className, (0, import_recipes30.th)({ size }))
|
|
2222
2587
|
}
|
|
2223
2588
|
),
|
|
2224
|
-
children: /* @__PURE__ */ (0,
|
|
2589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2225
2590
|
"button",
|
|
2226
2591
|
{
|
|
2227
|
-
className: (0,
|
|
2592
|
+
className: (0, import_css39.cx)(
|
|
2228
2593
|
nativeProps.className,
|
|
2229
|
-
(0,
|
|
2230
|
-
(0,
|
|
2594
|
+
(0, import_recipes30.th)({ size }),
|
|
2595
|
+
(0, import_css39.css)({
|
|
2231
2596
|
alignItems: "center",
|
|
2232
2597
|
display: "inline-flex",
|
|
2233
2598
|
justifyContent: "space-between",
|
|
@@ -2247,18 +2612,18 @@ function Th(props) {
|
|
|
2247
2612
|
}
|
|
2248
2613
|
|
|
2249
2614
|
// src/components/Td.tsx
|
|
2250
|
-
var
|
|
2251
|
-
var
|
|
2252
|
-
var
|
|
2615
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
2616
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
2617
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2253
2618
|
function Td(props) {
|
|
2254
2619
|
const { size, ...nativeProps } = props;
|
|
2255
|
-
return /* @__PURE__ */ (0,
|
|
2620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2256
2621
|
"td",
|
|
2257
2622
|
{
|
|
2258
2623
|
...nativeProps,
|
|
2259
|
-
className: (0,
|
|
2624
|
+
className: (0, import_css40.cx)(
|
|
2260
2625
|
nativeProps.className,
|
|
2261
|
-
(0,
|
|
2626
|
+
(0, import_recipes31.td)({
|
|
2262
2627
|
size
|
|
2263
2628
|
})
|
|
2264
2629
|
)
|
|
@@ -2267,18 +2632,18 @@ function Td(props) {
|
|
|
2267
2632
|
}
|
|
2268
2633
|
|
|
2269
2634
|
// src/components/Tbody.tsx
|
|
2270
|
-
var
|
|
2271
|
-
var
|
|
2272
|
-
var
|
|
2635
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
2636
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
2637
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2273
2638
|
function Tbody(props) {
|
|
2274
2639
|
const { decoration, ...nativeProps } = props;
|
|
2275
|
-
return /* @__PURE__ */ (0,
|
|
2640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2276
2641
|
"tbody",
|
|
2277
2642
|
{
|
|
2278
2643
|
...nativeProps,
|
|
2279
|
-
className: (0,
|
|
2644
|
+
className: (0, import_css41.cx)(
|
|
2280
2645
|
nativeProps.className,
|
|
2281
|
-
(0,
|
|
2646
|
+
(0, import_recipes32.tbody)({
|
|
2282
2647
|
decoration
|
|
2283
2648
|
})
|
|
2284
2649
|
)
|
|
@@ -2287,9 +2652,9 @@ function Tbody(props) {
|
|
|
2287
2652
|
}
|
|
2288
2653
|
|
|
2289
2654
|
// src/components/Tag.tsx
|
|
2290
|
-
var
|
|
2291
|
-
var
|
|
2292
|
-
var
|
|
2655
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
2656
|
+
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
2657
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2293
2658
|
function Tag(props) {
|
|
2294
2659
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
2295
2660
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -2297,13 +2662,13 @@ function Tag(props) {
|
|
|
2297
2662
|
const shape = isClosable ? "pill" : initShape;
|
|
2298
2663
|
const closableStyles = isClosable ? closableCss : "";
|
|
2299
2664
|
const { close: Close2 } = $cerberusIcons;
|
|
2300
|
-
return /* @__PURE__ */ (0,
|
|
2665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2301
2666
|
"span",
|
|
2302
2667
|
{
|
|
2303
2668
|
...nativeProps,
|
|
2304
|
-
className: (0,
|
|
2669
|
+
className: (0, import_css42.cx)(
|
|
2305
2670
|
nativeProps.className,
|
|
2306
|
-
(0,
|
|
2671
|
+
(0, import_recipes33.tag)({
|
|
2307
2672
|
gradient,
|
|
2308
2673
|
palette,
|
|
2309
2674
|
shape,
|
|
@@ -2313,47 +2678,78 @@ function Tag(props) {
|
|
|
2313
2678
|
),
|
|
2314
2679
|
children: [
|
|
2315
2680
|
props.children,
|
|
2316
|
-
/* @__PURE__ */ (0,
|
|
2681
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2317
2682
|
"button",
|
|
2318
2683
|
{
|
|
2319
2684
|
"aria-label": "Close",
|
|
2320
|
-
className: (0,
|
|
2685
|
+
className: (0, import_recipes33.iconButton)({
|
|
2321
2686
|
palette: "action",
|
|
2322
2687
|
usage: "filled",
|
|
2323
2688
|
size: "sm"
|
|
2324
2689
|
}),
|
|
2325
2690
|
onClick,
|
|
2326
|
-
children: /* @__PURE__ */ (0,
|
|
2691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Close2, {})
|
|
2327
2692
|
}
|
|
2328
2693
|
) })
|
|
2329
2694
|
]
|
|
2330
2695
|
}
|
|
2331
2696
|
);
|
|
2332
2697
|
}
|
|
2333
|
-
var closableCss = (0,
|
|
2698
|
+
var closableCss = (0, import_css42.css)({
|
|
2334
2699
|
bgColor: "action.bg.active",
|
|
2335
2700
|
color: "action.text.initial",
|
|
2336
2701
|
paddingInlineEnd: "0"
|
|
2337
2702
|
});
|
|
2338
2703
|
|
|
2704
|
+
// src/components/Text.tsx
|
|
2705
|
+
var import_jsx = require("@cerberus-design/styled-system/jsx");
|
|
2706
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2707
|
+
function Text(props) {
|
|
2708
|
+
const { as = "p", ...pandaJSXProps } = props;
|
|
2709
|
+
switch (as) {
|
|
2710
|
+
case "h1":
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.H1, { ...pandaJSXProps });
|
|
2712
|
+
case "h2":
|
|
2713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.H2, { ...pandaJSXProps });
|
|
2714
|
+
case "h3":
|
|
2715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.H3, { ...pandaJSXProps });
|
|
2716
|
+
case "h4":
|
|
2717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.H4, { ...pandaJSXProps });
|
|
2718
|
+
case "h5":
|
|
2719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.H5, { ...pandaJSXProps });
|
|
2720
|
+
case "h6":
|
|
2721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.H6, { ...pandaJSXProps });
|
|
2722
|
+
case "strong":
|
|
2723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.Strong, { ...pandaJSXProps });
|
|
2724
|
+
case "em":
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.Em, { ...pandaJSXProps });
|
|
2726
|
+
case "small":
|
|
2727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.Small, { ...pandaJSXProps });
|
|
2728
|
+
case "span":
|
|
2729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.Span, { ...pandaJSXProps });
|
|
2730
|
+
default:
|
|
2731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx.P, { ...pandaJSXProps });
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2339
2735
|
// src/components/Textarea.tsx
|
|
2340
|
-
var
|
|
2341
|
-
var
|
|
2342
|
-
var
|
|
2736
|
+
var import_css43 = require("@cerberus/styled-system/css");
|
|
2737
|
+
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
2738
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2343
2739
|
function Textarea(props) {
|
|
2344
2740
|
const { describedBy, ...nativeProps } = props;
|
|
2345
2741
|
const { invalid, ...fieldState } = useFieldContext();
|
|
2346
|
-
return /* @__PURE__ */ (0,
|
|
2742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2347
2743
|
"textarea",
|
|
2348
2744
|
{
|
|
2349
2745
|
...nativeProps,
|
|
2350
2746
|
...fieldState,
|
|
2351
2747
|
...describedBy && { "aria-describedby": describedBy },
|
|
2352
2748
|
...invalid && { "aria-invalid": true },
|
|
2353
|
-
className: (0,
|
|
2749
|
+
className: (0, import_css43.cx)(
|
|
2354
2750
|
props.className,
|
|
2355
|
-
(0,
|
|
2356
|
-
(0,
|
|
2751
|
+
(0, import_recipes34.input)().input,
|
|
2752
|
+
(0, import_css43.css)({
|
|
2357
2753
|
pxi: "2",
|
|
2358
2754
|
py: "2",
|
|
2359
2755
|
resize: "vertical"
|
|
@@ -2365,43 +2761,43 @@ function Textarea(props) {
|
|
|
2365
2761
|
}
|
|
2366
2762
|
|
|
2367
2763
|
// src/components/Toggle.tsx
|
|
2368
|
-
var
|
|
2764
|
+
var import_css44 = require("@cerberus/styled-system/css");
|
|
2369
2765
|
var import_patterns15 = require("@cerberus/styled-system/patterns");
|
|
2370
|
-
var
|
|
2371
|
-
var
|
|
2766
|
+
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
2767
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2372
2768
|
function Toggle(props) {
|
|
2373
2769
|
const { size, describedBy, ...nativeProps } = props;
|
|
2374
|
-
const styles = (0,
|
|
2770
|
+
const styles = (0, import_recipes35.toggle)({ size });
|
|
2375
2771
|
const { invalid, ...state } = useFieldContext();
|
|
2376
2772
|
const Icon = $cerberusIcons.toggleChecked;
|
|
2377
|
-
return /* @__PURE__ */ (0,
|
|
2773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
2378
2774
|
"span",
|
|
2379
2775
|
{
|
|
2380
|
-
className: (0,
|
|
2776
|
+
className: (0, import_css44.cx)("group", styles.track, (0, import_patterns15.hstack)()),
|
|
2381
2777
|
"data-checked": props.checked || props.defaultChecked,
|
|
2382
2778
|
children: [
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
2779
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2384
2780
|
"input",
|
|
2385
2781
|
{
|
|
2386
2782
|
...nativeProps,
|
|
2387
2783
|
...state,
|
|
2388
2784
|
...describedBy && { "aria-describedby": describedBy },
|
|
2389
2785
|
...invalid && { "aria-invalid": true },
|
|
2390
|
-
className: (0,
|
|
2786
|
+
className: (0, import_css44.cx)("peer", styles.input),
|
|
2391
2787
|
role: "switch",
|
|
2392
2788
|
type: "checkbox"
|
|
2393
2789
|
}
|
|
2394
2790
|
),
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2791
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
2396
2792
|
"span",
|
|
2397
2793
|
{
|
|
2398
|
-
className: (0,
|
|
2794
|
+
className: (0, import_css44.cx)(
|
|
2399
2795
|
styles.thumb,
|
|
2400
2796
|
(0, import_patterns15.vstack)({
|
|
2401
2797
|
justify: "center"
|
|
2402
2798
|
})
|
|
2403
2799
|
),
|
|
2404
|
-
children: /* @__PURE__ */ (0,
|
|
2800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon, {})
|
|
2405
2801
|
}
|
|
2406
2802
|
)
|
|
2407
2803
|
]
|
|
@@ -2411,24 +2807,24 @@ function Toggle(props) {
|
|
|
2411
2807
|
|
|
2412
2808
|
// src/components/Tooltip.tsx
|
|
2413
2809
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
2414
|
-
var
|
|
2415
|
-
var
|
|
2416
|
-
var
|
|
2810
|
+
var import_css45 = require("@cerberus/styled-system/css");
|
|
2811
|
+
var import_recipes36 = require("@cerberus/styled-system/recipes");
|
|
2812
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
2417
2813
|
function Tooltip(props) {
|
|
2418
2814
|
const { content, children, asChild, ...nativeProps } = props;
|
|
2419
|
-
const styles = (0,
|
|
2815
|
+
const styles = (0, import_recipes36.tooltip)();
|
|
2420
2816
|
const position = {
|
|
2421
2817
|
placement: props.position || "top"
|
|
2422
2818
|
};
|
|
2423
|
-
return /* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
/* @__PURE__ */ (0,
|
|
2819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
|
|
2820
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
|
|
2821
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
2426
2822
|
import_tooltip.Tooltip.Content,
|
|
2427
2823
|
{
|
|
2428
2824
|
...nativeProps,
|
|
2429
|
-
className: (0,
|
|
2825
|
+
className: (0, import_css45.cx)(nativeProps.className, styles.content),
|
|
2430
2826
|
children: [
|
|
2431
|
-
/* @__PURE__ */ (0,
|
|
2827
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
2432
2828
|
content
|
|
2433
2829
|
]
|
|
2434
2830
|
}
|
|
@@ -2437,26 +2833,26 @@ function Tooltip(props) {
|
|
|
2437
2833
|
}
|
|
2438
2834
|
|
|
2439
2835
|
// src/context/confirm-modal.tsx
|
|
2440
|
-
var
|
|
2441
|
-
var
|
|
2836
|
+
var import_react23 = require("react");
|
|
2837
|
+
var import_css46 = require("@cerberus/styled-system/css");
|
|
2442
2838
|
var import_patterns16 = require("@cerberus/styled-system/patterns");
|
|
2443
2839
|
|
|
2444
2840
|
// src/hooks/useModal.ts
|
|
2445
|
-
var
|
|
2841
|
+
var import_react22 = require("react");
|
|
2446
2842
|
function useModal() {
|
|
2447
|
-
const modalRef = (0,
|
|
2448
|
-
const [isOpen, setIsOpen] = (0,
|
|
2449
|
-
const show = (0,
|
|
2843
|
+
const modalRef = (0, import_react22.useRef)(null);
|
|
2844
|
+
const [isOpen, setIsOpen] = (0, import_react22.useState)(false);
|
|
2845
|
+
const show = (0, import_react22.useCallback)(() => {
|
|
2450
2846
|
var _a;
|
|
2451
2847
|
(_a = modalRef.current) == null ? void 0 : _a.showModal();
|
|
2452
2848
|
setIsOpen(true);
|
|
2453
2849
|
}, []);
|
|
2454
|
-
const close = (0,
|
|
2850
|
+
const close = (0, import_react22.useCallback)(() => {
|
|
2455
2851
|
var _a;
|
|
2456
2852
|
(_a = modalRef.current) == null ? void 0 : _a.close();
|
|
2457
2853
|
setIsOpen(false);
|
|
2458
2854
|
}, []);
|
|
2459
|
-
return (0,
|
|
2855
|
+
return (0, import_react22.useMemo)(() => {
|
|
2460
2856
|
return {
|
|
2461
2857
|
modalRef,
|
|
2462
2858
|
show,
|
|
@@ -2467,21 +2863,21 @@ function useModal() {
|
|
|
2467
2863
|
}
|
|
2468
2864
|
|
|
2469
2865
|
// src/context/confirm-modal.tsx
|
|
2470
|
-
var
|
|
2471
|
-
var
|
|
2472
|
-
var ConfirmModalContext = (0,
|
|
2866
|
+
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
2867
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
2868
|
+
var ConfirmModalContext = (0, import_react23.createContext)(null);
|
|
2473
2869
|
function ConfirmModal(props) {
|
|
2474
2870
|
const { modalRef, show, close } = useModal();
|
|
2475
|
-
const resolveRef = (0,
|
|
2476
|
-
const [content, setContent] = (0,
|
|
2871
|
+
const resolveRef = (0, import_react23.useRef)(null);
|
|
2872
|
+
const [content, setContent] = (0, import_react23.useState)(null);
|
|
2477
2873
|
const focusTrap = trapFocus(modalRef);
|
|
2478
2874
|
const ConfirmIcon = $cerberusIcons.confirmModal;
|
|
2479
2875
|
const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
|
|
2480
|
-
const palette = (0,
|
|
2876
|
+
const palette = (0, import_react23.useMemo)(
|
|
2481
2877
|
() => kind === "destructive" ? "danger" : "action",
|
|
2482
2878
|
[kind]
|
|
2483
2879
|
);
|
|
2484
|
-
const handleChoice = (0,
|
|
2880
|
+
const handleChoice = (0, import_react23.useCallback)(
|
|
2485
2881
|
(e) => {
|
|
2486
2882
|
var _a, _b;
|
|
2487
2883
|
const target = e.currentTarget;
|
|
@@ -2493,7 +2889,7 @@ function ConfirmModal(props) {
|
|
|
2493
2889
|
},
|
|
2494
2890
|
[close]
|
|
2495
2891
|
);
|
|
2496
|
-
const handleShow = (0,
|
|
2892
|
+
const handleShow = (0, import_react23.useCallback)(
|
|
2497
2893
|
(options) => {
|
|
2498
2894
|
return new Promise((resolve) => {
|
|
2499
2895
|
setContent({ ...options });
|
|
@@ -2503,42 +2899,42 @@ function ConfirmModal(props) {
|
|
|
2503
2899
|
},
|
|
2504
2900
|
[show]
|
|
2505
2901
|
);
|
|
2506
|
-
const value = (0,
|
|
2902
|
+
const value = (0, import_react23.useMemo)(
|
|
2507
2903
|
() => ({
|
|
2508
2904
|
show: handleShow
|
|
2509
2905
|
}),
|
|
2510
2906
|
[handleShow]
|
|
2511
2907
|
);
|
|
2512
|
-
return /* @__PURE__ */ (0,
|
|
2908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
2513
2909
|
props.children,
|
|
2514
|
-
/* @__PURE__ */ (0,
|
|
2515
|
-
/* @__PURE__ */ (0,
|
|
2516
|
-
/* @__PURE__ */ (0,
|
|
2910
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx2.VStack, { gap: "xl", w: "full", children: [
|
|
2911
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(ModalHeader, { children: [
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2517
2913
|
"div",
|
|
2518
2914
|
{
|
|
2519
2915
|
className: (0, import_patterns16.hstack)({
|
|
2520
2916
|
justify: "center",
|
|
2521
2917
|
w: "full"
|
|
2522
2918
|
}),
|
|
2523
|
-
children: /* @__PURE__ */ (0,
|
|
2919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2524
2920
|
Show,
|
|
2525
2921
|
{
|
|
2526
2922
|
when: palette === "danger",
|
|
2527
|
-
fallback: /* @__PURE__ */ (0,
|
|
2923
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2528
2924
|
Avatar,
|
|
2529
2925
|
{
|
|
2530
2926
|
ariaLabel: "",
|
|
2531
2927
|
gradient: "charon-light",
|
|
2532
|
-
icon: /* @__PURE__ */ (0,
|
|
2928
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ConfirmIcon, { size: 24 }),
|
|
2533
2929
|
src: ""
|
|
2534
2930
|
}
|
|
2535
2931
|
),
|
|
2536
|
-
children: /* @__PURE__ */ (0,
|
|
2932
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2537
2933
|
Avatar,
|
|
2538
2934
|
{
|
|
2539
2935
|
ariaLabel: "",
|
|
2540
2936
|
gradient: "hades-dark",
|
|
2541
|
-
icon: /* @__PURE__ */ (0,
|
|
2937
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ConfirmIcon, { size: 24 }),
|
|
2542
2938
|
src: ""
|
|
2543
2939
|
}
|
|
2544
2940
|
)
|
|
@@ -2546,15 +2942,15 @@ function ConfirmModal(props) {
|
|
|
2546
2942
|
)
|
|
2547
2943
|
}
|
|
2548
2944
|
),
|
|
2549
|
-
/* @__PURE__ */ (0,
|
|
2550
|
-
/* @__PURE__ */ (0,
|
|
2945
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
2946
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2551
2947
|
] }),
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2948
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx2.HStack, { gap: "4", w: "full", children: [
|
|
2949
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2554
2950
|
Button,
|
|
2555
2951
|
{
|
|
2556
2952
|
autoFocus: true,
|
|
2557
|
-
className: (0,
|
|
2953
|
+
className: (0, import_css46.css)({
|
|
2558
2954
|
w: "1/2"
|
|
2559
2955
|
}),
|
|
2560
2956
|
name: "confirm",
|
|
@@ -2564,10 +2960,10 @@ function ConfirmModal(props) {
|
|
|
2564
2960
|
children: content == null ? void 0 : content.actionText
|
|
2565
2961
|
}
|
|
2566
2962
|
),
|
|
2567
|
-
/* @__PURE__ */ (0,
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
2568
2964
|
Button,
|
|
2569
2965
|
{
|
|
2570
|
-
className: (0,
|
|
2966
|
+
className: (0, import_css46.css)({
|
|
2571
2967
|
w: "1/2"
|
|
2572
2968
|
}),
|
|
2573
2969
|
name: "cancel",
|
|
@@ -2582,7 +2978,7 @@ function ConfirmModal(props) {
|
|
|
2582
2978
|
] });
|
|
2583
2979
|
}
|
|
2584
2980
|
function useConfirmModal() {
|
|
2585
|
-
const context = (0,
|
|
2981
|
+
const context = (0, import_react23.useContext)(ConfirmModalContext);
|
|
2586
2982
|
if (context === null) {
|
|
2587
2983
|
throw new Error(
|
|
2588
2984
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -2592,21 +2988,21 @@ function useConfirmModal() {
|
|
|
2592
2988
|
}
|
|
2593
2989
|
|
|
2594
2990
|
// src/context/cta-modal.tsx
|
|
2595
|
-
var
|
|
2596
|
-
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
2597
|
-
var import_css45 = require("@cerberus/styled-system/css");
|
|
2991
|
+
var import_react24 = require("react");
|
|
2598
2992
|
var import_jsx3 = require("@cerberus/styled-system/jsx");
|
|
2599
|
-
var
|
|
2600
|
-
var
|
|
2993
|
+
var import_css47 = require("@cerberus/styled-system/css");
|
|
2994
|
+
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
2995
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
2996
|
+
var CTAModalContext = (0, import_react24.createContext)(null);
|
|
2601
2997
|
function CTAModal(props) {
|
|
2602
2998
|
var _a, _b;
|
|
2603
2999
|
const { modalRef, show, close } = useModal();
|
|
2604
|
-
const [content, setContent] = (0,
|
|
3000
|
+
const [content, setContent] = (0, import_react24.useState)(null);
|
|
2605
3001
|
const focusTrap = trapFocus(modalRef);
|
|
2606
3002
|
const FallbackIcon = $cerberusIcons.confirmModal;
|
|
2607
3003
|
const confirmIcon = content == null ? void 0 : content.icon;
|
|
2608
3004
|
const { close: CloseIcon } = $cerberusIcons;
|
|
2609
|
-
const handleShow = (0,
|
|
3005
|
+
const handleShow = (0, import_react24.useCallback)(
|
|
2610
3006
|
(options) => {
|
|
2611
3007
|
const maxActions = 2;
|
|
2612
3008
|
if (options.actions.length > maxActions) {
|
|
@@ -2619,65 +3015,64 @@ function CTAModal(props) {
|
|
|
2619
3015
|
},
|
|
2620
3016
|
[show]
|
|
2621
3017
|
);
|
|
2622
|
-
const handleActionClick = (0,
|
|
3018
|
+
const handleActionClick = (0, import_react24.useCallback)(
|
|
2623
3019
|
(event) => {
|
|
2624
3020
|
const index = event.currentTarget.getAttribute("data-index");
|
|
2625
3021
|
const action = content == null ? void 0 : content.actions[Number(index)];
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
}
|
|
3022
|
+
const { onClick } = action || {};
|
|
3023
|
+
onClick == null ? void 0 : onClick(event);
|
|
2629
3024
|
close();
|
|
2630
3025
|
},
|
|
2631
3026
|
[content, close]
|
|
2632
3027
|
);
|
|
2633
|
-
const value = (0,
|
|
3028
|
+
const value = (0, import_react24.useMemo)(
|
|
2634
3029
|
() => ({
|
|
2635
3030
|
show: handleShow
|
|
2636
3031
|
}),
|
|
2637
3032
|
[handleShow]
|
|
2638
3033
|
);
|
|
2639
|
-
return /* @__PURE__ */ (0,
|
|
3034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
2640
3035
|
props.children,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
3037
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2643
3038
|
"span",
|
|
2644
3039
|
{
|
|
2645
|
-
className: (0,
|
|
3040
|
+
className: (0, import_css47.css)({
|
|
2646
3041
|
padding: "md",
|
|
2647
3042
|
position: "absolute",
|
|
2648
3043
|
right: 0,
|
|
2649
3044
|
top: 0,
|
|
2650
3045
|
zIndex: "decorator"
|
|
2651
3046
|
}),
|
|
2652
|
-
children: /* @__PURE__ */ (0,
|
|
3047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(IconButton, { ariaLabel: "Close modal", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(CloseIcon, {}) })
|
|
2653
3048
|
}
|
|
2654
3049
|
),
|
|
2655
|
-
/* @__PURE__ */ (0,
|
|
2656
|
-
/* @__PURE__ */ (0,
|
|
2657
|
-
/* @__PURE__ */ (0,
|
|
3050
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
|
|
3051
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
|
|
3052
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2658
3053
|
Avatar,
|
|
2659
3054
|
{
|
|
2660
3055
|
ariaLabel: "",
|
|
2661
3056
|
gradient: "charon-light",
|
|
2662
|
-
icon: /* @__PURE__ */ (0,
|
|
3057
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
2663
3058
|
Show,
|
|
2664
3059
|
{
|
|
2665
3060
|
when: Boolean(confirmIcon),
|
|
2666
|
-
fallback: /* @__PURE__ */ (0,
|
|
3061
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FallbackIcon, { size: 24 }),
|
|
2667
3062
|
children: confirmIcon
|
|
2668
3063
|
}
|
|
2669
3064
|
),
|
|
2670
3065
|
src: ""
|
|
2671
3066
|
}
|
|
2672
3067
|
),
|
|
2673
|
-
/* @__PURE__ */ (0,
|
|
2674
|
-
/* @__PURE__ */ (0,
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2675
3070
|
] }) }),
|
|
2676
|
-
/* @__PURE__ */ (0,
|
|
3071
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx3.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime56.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_runtime56.jsx)(
|
|
2677
3072
|
Button,
|
|
2678
3073
|
{
|
|
2679
3074
|
"data-index": index,
|
|
2680
|
-
className: (0,
|
|
3075
|
+
className: (0, import_css47.css)({
|
|
2681
3076
|
w: "1/2"
|
|
2682
3077
|
}),
|
|
2683
3078
|
onClick: handleActionClick,
|
|
@@ -2692,7 +3087,7 @@ function CTAModal(props) {
|
|
|
2692
3087
|
] });
|
|
2693
3088
|
}
|
|
2694
3089
|
function useCTAModal() {
|
|
2695
|
-
const context = (0,
|
|
3090
|
+
const context = (0, import_react24.useContext)(CTAModalContext);
|
|
2696
3091
|
if (context === null) {
|
|
2697
3092
|
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
2698
3093
|
}
|
|
@@ -2700,22 +3095,22 @@ function useCTAModal() {
|
|
|
2700
3095
|
}
|
|
2701
3096
|
|
|
2702
3097
|
// src/context/notification-center.tsx
|
|
2703
|
-
var
|
|
3098
|
+
var import_react25 = require("react");
|
|
2704
3099
|
var import_patterns17 = require("@cerberus/styled-system/patterns");
|
|
2705
|
-
var
|
|
2706
|
-
var
|
|
2707
|
-
var
|
|
2708
|
-
var NotificationsContext = (0,
|
|
3100
|
+
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
3101
|
+
var import_css48 = require("@cerberus/styled-system/css");
|
|
3102
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3103
|
+
var NotificationsContext = (0, import_react25.createContext)(null);
|
|
2709
3104
|
function NotificationCenter(props) {
|
|
2710
|
-
const [activeNotifications, setActiveNotifications] = (0,
|
|
2711
|
-
const styles = (0,
|
|
2712
|
-
const handleNotify = (0,
|
|
3105
|
+
const [activeNotifications, setActiveNotifications] = (0, import_react25.useState)([]);
|
|
3106
|
+
const styles = (0, import_recipes37.notification)();
|
|
3107
|
+
const handleNotify = (0, import_react25.useCallback)((options) => {
|
|
2713
3108
|
setActiveNotifications((prev) => {
|
|
2714
3109
|
const id = `${options.palette}:${prev.length + 1}`;
|
|
2715
3110
|
return [...prev, { ...options, id }];
|
|
2716
3111
|
});
|
|
2717
3112
|
}, []);
|
|
2718
|
-
const handleClose = (0,
|
|
3113
|
+
const handleClose = (0, import_react25.useCallback)((e) => {
|
|
2719
3114
|
const target = e.currentTarget;
|
|
2720
3115
|
setActiveNotifications((prev) => {
|
|
2721
3116
|
const item = prev.find((option) => option.id === target.value);
|
|
@@ -2723,7 +3118,7 @@ function NotificationCenter(props) {
|
|
|
2723
3118
|
return prev.filter((option) => option.id !== target.value);
|
|
2724
3119
|
});
|
|
2725
3120
|
}, []);
|
|
2726
|
-
const handleCloseAll = (0,
|
|
3121
|
+
const handleCloseAll = (0, import_react25.useCallback)(() => {
|
|
2727
3122
|
setActiveNotifications((prev) => {
|
|
2728
3123
|
prev.forEach((item) => {
|
|
2729
3124
|
if (item.onClose) item.onClose();
|
|
@@ -2731,19 +3126,19 @@ function NotificationCenter(props) {
|
|
|
2731
3126
|
return [];
|
|
2732
3127
|
});
|
|
2733
3128
|
}, []);
|
|
2734
|
-
const value = (0,
|
|
3129
|
+
const value = (0, import_react25.useMemo)(
|
|
2735
3130
|
() => ({
|
|
2736
3131
|
notify: handleNotify
|
|
2737
3132
|
}),
|
|
2738
3133
|
[handleNotify]
|
|
2739
3134
|
);
|
|
2740
|
-
return /* @__PURE__ */ (0,
|
|
3135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
2741
3136
|
props.children,
|
|
2742
|
-
/* @__PURE__ */ (0,
|
|
2743
|
-
/* @__PURE__ */ (0,
|
|
3137
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Show, { when: activeNotifications.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: styles.center, children: [
|
|
3138
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Show, { when: activeNotifications.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2744
3139
|
Button,
|
|
2745
3140
|
{
|
|
2746
|
-
className: (0,
|
|
3141
|
+
className: (0, import_css48.cx)(styles.closeAll, (0, import_patterns17.animateIn)()),
|
|
2747
3142
|
onClick: handleCloseAll,
|
|
2748
3143
|
palette: "action",
|
|
2749
3144
|
shape: "rounded",
|
|
@@ -2752,7 +3147,7 @@ function NotificationCenter(props) {
|
|
|
2752
3147
|
children: "Close all"
|
|
2753
3148
|
}
|
|
2754
3149
|
) }),
|
|
2755
|
-
/* @__PURE__ */ (0,
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2756
3151
|
"div",
|
|
2757
3152
|
{
|
|
2758
3153
|
className: (0, import_patterns17.vstack)({
|
|
@@ -2762,7 +3157,7 @@ function NotificationCenter(props) {
|
|
|
2762
3157
|
style: {
|
|
2763
3158
|
alignItems: "flex-end"
|
|
2764
3159
|
},
|
|
2765
|
-
children: activeNotifications.map((option) => /* @__PURE__ */ (0,
|
|
3160
|
+
children: activeNotifications.map((option) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
2766
3161
|
MatchNotification,
|
|
2767
3162
|
{
|
|
2768
3163
|
...option,
|
|
@@ -2779,7 +3174,7 @@ function MatchNotification(props) {
|
|
|
2779
3174
|
const { palette, id, onClose, heading, description } = props;
|
|
2780
3175
|
switch (palette) {
|
|
2781
3176
|
case "success":
|
|
2782
|
-
return /* @__PURE__ */ (0,
|
|
3177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
2783
3178
|
Notification,
|
|
2784
3179
|
{
|
|
2785
3180
|
id,
|
|
@@ -2787,14 +3182,14 @@ function MatchNotification(props) {
|
|
|
2787
3182
|
open: true,
|
|
2788
3183
|
palette: "success",
|
|
2789
3184
|
children: [
|
|
2790
|
-
/* @__PURE__ */ (0,
|
|
2791
|
-
/* @__PURE__ */ (0,
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
3186
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
2792
3187
|
]
|
|
2793
3188
|
},
|
|
2794
3189
|
id
|
|
2795
3190
|
);
|
|
2796
3191
|
case "warning":
|
|
2797
|
-
return /* @__PURE__ */ (0,
|
|
3192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
2798
3193
|
Notification,
|
|
2799
3194
|
{
|
|
2800
3195
|
id,
|
|
@@ -2802,27 +3197,27 @@ function MatchNotification(props) {
|
|
|
2802
3197
|
open: true,
|
|
2803
3198
|
palette: "warning",
|
|
2804
3199
|
children: [
|
|
2805
|
-
/* @__PURE__ */ (0,
|
|
2806
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
3201
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
2807
3202
|
]
|
|
2808
3203
|
},
|
|
2809
3204
|
id
|
|
2810
3205
|
);
|
|
2811
3206
|
case "danger":
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
3207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Notification, { id, onClose, open: true, palette: "danger", children: [
|
|
3208
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
3209
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
2815
3210
|
] }, id);
|
|
2816
3211
|
case "info":
|
|
2817
3212
|
default:
|
|
2818
|
-
return /* @__PURE__ */ (0,
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
3213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Notification, { id, onClose, open: true, palette: "info", children: [
|
|
3214
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
2821
3216
|
] }, id);
|
|
2822
3217
|
}
|
|
2823
3218
|
}
|
|
2824
3219
|
function useNotificationCenter() {
|
|
2825
|
-
const context = (0,
|
|
3220
|
+
const context = (0, import_react25.useContext)(NotificationsContext);
|
|
2826
3221
|
if (!context) {
|
|
2827
3222
|
throw new Error(
|
|
2828
3223
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -2832,33 +3227,33 @@ function useNotificationCenter() {
|
|
|
2832
3227
|
}
|
|
2833
3228
|
|
|
2834
3229
|
// src/context/prompt-modal.tsx
|
|
2835
|
-
var
|
|
2836
|
-
var
|
|
3230
|
+
var import_react26 = require("react");
|
|
3231
|
+
var import_css49 = require("@cerberus/styled-system/css");
|
|
2837
3232
|
var import_patterns18 = require("@cerberus/styled-system/patterns");
|
|
2838
|
-
var
|
|
2839
|
-
var PromptModalContext = (0,
|
|
3233
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3234
|
+
var PromptModalContext = (0, import_react26.createContext)(null);
|
|
2840
3235
|
function PromptModal(props) {
|
|
2841
3236
|
const { modalRef, show, close } = useModal();
|
|
2842
|
-
const resolveRef = (0,
|
|
2843
|
-
const [content, setContent] = (0,
|
|
2844
|
-
const [inputValue, setInputValue] = (0,
|
|
3237
|
+
const resolveRef = (0, import_react26.useRef)(null);
|
|
3238
|
+
const [content, setContent] = (0, import_react26.useState)(null);
|
|
3239
|
+
const [inputValue, setInputValue] = (0, import_react26.useState)("");
|
|
2845
3240
|
const focusTrap = trapFocus(modalRef);
|
|
2846
3241
|
const PromptIcon = $cerberusIcons.promptModal;
|
|
2847
|
-
const isValid = (0,
|
|
3242
|
+
const isValid = (0, import_react26.useMemo)(
|
|
2848
3243
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
2849
3244
|
[inputValue, content]
|
|
2850
3245
|
);
|
|
2851
|
-
const palette = (0,
|
|
3246
|
+
const palette = (0, import_react26.useMemo)(
|
|
2852
3247
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
2853
3248
|
[content]
|
|
2854
3249
|
);
|
|
2855
|
-
const handleChange = (0,
|
|
3250
|
+
const handleChange = (0, import_react26.useCallback)(
|
|
2856
3251
|
(e) => {
|
|
2857
3252
|
setInputValue(e.currentTarget.value);
|
|
2858
3253
|
},
|
|
2859
3254
|
[content]
|
|
2860
3255
|
);
|
|
2861
|
-
const handleChoice = (0,
|
|
3256
|
+
const handleChoice = (0, import_react26.useCallback)(
|
|
2862
3257
|
(e) => {
|
|
2863
3258
|
var _a;
|
|
2864
3259
|
const target = e.currentTarget;
|
|
@@ -2869,7 +3264,7 @@ function PromptModal(props) {
|
|
|
2869
3264
|
},
|
|
2870
3265
|
[inputValue, close]
|
|
2871
3266
|
);
|
|
2872
|
-
const handleShow = (0,
|
|
3267
|
+
const handleShow = (0, import_react26.useCallback)(
|
|
2873
3268
|
(options) => {
|
|
2874
3269
|
return new Promise((resolve) => {
|
|
2875
3270
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -2879,42 +3274,42 @@ function PromptModal(props) {
|
|
|
2879
3274
|
},
|
|
2880
3275
|
[show]
|
|
2881
3276
|
);
|
|
2882
|
-
const value = (0,
|
|
3277
|
+
const value = (0, import_react26.useMemo)(
|
|
2883
3278
|
() => ({
|
|
2884
3279
|
show: handleShow
|
|
2885
3280
|
}),
|
|
2886
3281
|
[handleShow]
|
|
2887
3282
|
);
|
|
2888
|
-
return /* @__PURE__ */ (0,
|
|
3283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
2889
3284
|
props.children,
|
|
2890
|
-
/* @__PURE__ */ (0,
|
|
2891
|
-
/* @__PURE__ */ (0,
|
|
2892
|
-
/* @__PURE__ */ (0,
|
|
3285
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: [
|
|
3286
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(ModalHeader, { children: [
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2893
3288
|
"div",
|
|
2894
3289
|
{
|
|
2895
3290
|
className: (0, import_patterns18.hstack)({
|
|
2896
3291
|
justify: "center",
|
|
2897
3292
|
w: "full"
|
|
2898
3293
|
}),
|
|
2899
|
-
children: /* @__PURE__ */ (0,
|
|
3294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2900
3295
|
Show,
|
|
2901
3296
|
{
|
|
2902
3297
|
when: palette === "danger",
|
|
2903
|
-
fallback: /* @__PURE__ */ (0,
|
|
3298
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2904
3299
|
Avatar,
|
|
2905
3300
|
{
|
|
2906
3301
|
ariaLabel: "",
|
|
2907
3302
|
gradient: "charon-light",
|
|
2908
|
-
icon: /* @__PURE__ */ (0,
|
|
3303
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PromptIcon, { size: 24 }),
|
|
2909
3304
|
src: ""
|
|
2910
3305
|
}
|
|
2911
3306
|
),
|
|
2912
|
-
children: /* @__PURE__ */ (0,
|
|
3307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2913
3308
|
Avatar,
|
|
2914
3309
|
{
|
|
2915
3310
|
ariaLabel: "",
|
|
2916
3311
|
gradient: "hades-dark",
|
|
2917
|
-
icon: /* @__PURE__ */ (0,
|
|
3312
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PromptIcon, { size: 24 }),
|
|
2918
3313
|
src: ""
|
|
2919
3314
|
}
|
|
2920
3315
|
)
|
|
@@ -2922,10 +3317,10 @@ function PromptModal(props) {
|
|
|
2922
3317
|
)
|
|
2923
3318
|
}
|
|
2924
3319
|
),
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
2926
|
-
/* @__PURE__ */ (0,
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
|
|
2927
3322
|
] }),
|
|
2928
|
-
/* @__PURE__ */ (0,
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2929
3324
|
"div",
|
|
2930
3325
|
{
|
|
2931
3326
|
className: (0, import_patterns18.vstack)({
|
|
@@ -2933,11 +3328,11 @@ function PromptModal(props) {
|
|
|
2933
3328
|
mt: "4",
|
|
2934
3329
|
mb: "8"
|
|
2935
3330
|
}),
|
|
2936
|
-
children: /* @__PURE__ */ (0,
|
|
2937
|
-
/* @__PURE__ */ (0,
|
|
3331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Field, { invalid: !isValid, children: [
|
|
3332
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
2938
3333
|
Label,
|
|
2939
3334
|
{
|
|
2940
|
-
className: (0,
|
|
3335
|
+
className: (0, import_css49.css)({
|
|
2941
3336
|
gap: 1,
|
|
2942
3337
|
justifyContent: "flex-start"
|
|
2943
3338
|
}),
|
|
@@ -2945,10 +3340,10 @@ function PromptModal(props) {
|
|
|
2945
3340
|
size: "md",
|
|
2946
3341
|
children: [
|
|
2947
3342
|
"Type",
|
|
2948
|
-
/* @__PURE__ */ (0,
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2949
3344
|
"strong",
|
|
2950
3345
|
{
|
|
2951
|
-
className: (0,
|
|
3346
|
+
className: (0, import_css49.css)({
|
|
2952
3347
|
textTransform: "uppercase"
|
|
2953
3348
|
}),
|
|
2954
3349
|
children: content == null ? void 0 : content.key
|
|
@@ -2958,7 +3353,7 @@ function PromptModal(props) {
|
|
|
2958
3353
|
]
|
|
2959
3354
|
}
|
|
2960
3355
|
),
|
|
2961
|
-
/* @__PURE__ */ (0,
|
|
3356
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2962
3357
|
Input,
|
|
2963
3358
|
{
|
|
2964
3359
|
id: "confirm",
|
|
@@ -2970,7 +3365,7 @@ function PromptModal(props) {
|
|
|
2970
3365
|
] })
|
|
2971
3366
|
}
|
|
2972
3367
|
),
|
|
2973
|
-
/* @__PURE__ */ (0,
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
2974
3369
|
"div",
|
|
2975
3370
|
{
|
|
2976
3371
|
className: (0, import_patterns18.hstack)({
|
|
@@ -2978,11 +3373,11 @@ function PromptModal(props) {
|
|
|
2978
3373
|
gap: "4"
|
|
2979
3374
|
}),
|
|
2980
3375
|
children: [
|
|
2981
|
-
/* @__PURE__ */ (0,
|
|
3376
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2982
3377
|
Button,
|
|
2983
3378
|
{
|
|
2984
3379
|
autoFocus: true,
|
|
2985
|
-
className: (0,
|
|
3380
|
+
className: (0, import_css49.css)({
|
|
2986
3381
|
w: "1/2"
|
|
2987
3382
|
}),
|
|
2988
3383
|
disabled: !isValid,
|
|
@@ -2993,10 +3388,10 @@ function PromptModal(props) {
|
|
|
2993
3388
|
children: content == null ? void 0 : content.actionText
|
|
2994
3389
|
}
|
|
2995
3390
|
),
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
3391
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
2997
3392
|
Button,
|
|
2998
3393
|
{
|
|
2999
|
-
className: (0,
|
|
3394
|
+
className: (0, import_css49.css)({
|
|
3000
3395
|
w: "1/2"
|
|
3001
3396
|
}),
|
|
3002
3397
|
name: "cancel",
|
|
@@ -3013,7 +3408,7 @@ function PromptModal(props) {
|
|
|
3013
3408
|
] });
|
|
3014
3409
|
}
|
|
3015
3410
|
function usePromptModal() {
|
|
3016
|
-
const context = (0,
|
|
3411
|
+
const context = (0, import_react26.useContext)(PromptModalContext);
|
|
3017
3412
|
if (context === null) {
|
|
3018
3413
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
3019
3414
|
}
|
|
@@ -3021,50 +3416,50 @@ function usePromptModal() {
|
|
|
3021
3416
|
}
|
|
3022
3417
|
|
|
3023
3418
|
// src/context/theme.tsx
|
|
3024
|
-
var
|
|
3419
|
+
var import_react28 = require("react");
|
|
3025
3420
|
|
|
3026
3421
|
// src/hooks/useTheme.ts
|
|
3027
|
-
var
|
|
3422
|
+
var import_react27 = require("react");
|
|
3028
3423
|
var THEME_KEY = "cerberus-theme";
|
|
3029
3424
|
var MODE_KEY = "cerberus-mode";
|
|
3030
3425
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
3031
3426
|
const { updateMode, updateTheme, cache } = options;
|
|
3032
|
-
const [theme, setTheme] = (0,
|
|
3033
|
-
const [colorMode, setColorMode] = (0,
|
|
3034
|
-
const handleThemeChange = (0,
|
|
3427
|
+
const [theme, setTheme] = (0, import_react27.useState)(defaultTheme);
|
|
3428
|
+
const [colorMode, setColorMode] = (0, import_react27.useState)(defaultColorMode);
|
|
3429
|
+
const handleThemeChange = (0, import_react27.useCallback)(
|
|
3035
3430
|
(newTheme) => {
|
|
3036
3431
|
setTheme(newTheme);
|
|
3037
3432
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
3038
3433
|
},
|
|
3039
3434
|
[updateTheme]
|
|
3040
3435
|
);
|
|
3041
|
-
const handleColorModeChange = (0,
|
|
3436
|
+
const handleColorModeChange = (0, import_react27.useCallback)(
|
|
3042
3437
|
(newMode) => {
|
|
3043
3438
|
setColorMode(newMode);
|
|
3044
3439
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
3045
3440
|
},
|
|
3046
3441
|
[updateMode]
|
|
3047
3442
|
);
|
|
3048
|
-
(0,
|
|
3443
|
+
(0, import_react27.useLayoutEffect)(() => {
|
|
3049
3444
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
3050
3445
|
if (theme2) {
|
|
3051
3446
|
setTheme(theme2);
|
|
3052
3447
|
}
|
|
3053
3448
|
}, []);
|
|
3054
|
-
(0,
|
|
3449
|
+
(0, import_react27.useLayoutEffect)(() => {
|
|
3055
3450
|
const mode = localStorage.getItem(MODE_KEY);
|
|
3056
3451
|
if (mode) {
|
|
3057
3452
|
setColorMode(mode);
|
|
3058
3453
|
}
|
|
3059
3454
|
}, []);
|
|
3060
|
-
(0,
|
|
3455
|
+
(0, import_react27.useEffect)(() => {
|
|
3061
3456
|
const root = document.documentElement;
|
|
3062
3457
|
root.dataset.pandaTheme = theme;
|
|
3063
3458
|
if (cache) {
|
|
3064
3459
|
localStorage.setItem(THEME_KEY, theme);
|
|
3065
3460
|
}
|
|
3066
3461
|
}, [theme, cache]);
|
|
3067
|
-
(0,
|
|
3462
|
+
(0, import_react27.useEffect)(() => {
|
|
3068
3463
|
const root = document.documentElement;
|
|
3069
3464
|
if (colorMode === "system") {
|
|
3070
3465
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -3075,7 +3470,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3075
3470
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
3076
3471
|
}
|
|
3077
3472
|
}, [colorMode, cache]);
|
|
3078
|
-
return (0,
|
|
3473
|
+
return (0, import_react27.useMemo)(
|
|
3079
3474
|
() => ({
|
|
3080
3475
|
theme,
|
|
3081
3476
|
mode: colorMode,
|
|
@@ -3087,8 +3482,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
3087
3482
|
}
|
|
3088
3483
|
|
|
3089
3484
|
// src/context/theme.tsx
|
|
3090
|
-
var
|
|
3091
|
-
var ThemeContext = (0,
|
|
3485
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3486
|
+
var ThemeContext = (0, import_react28.createContext)(
|
|
3092
3487
|
null
|
|
3093
3488
|
);
|
|
3094
3489
|
function ThemeProvider(props) {
|
|
@@ -3097,109 +3492,22 @@ function ThemeProvider(props) {
|
|
|
3097
3492
|
updateMode: props.updateMode,
|
|
3098
3493
|
updateTheme: props.updateTheme
|
|
3099
3494
|
});
|
|
3100
|
-
return /* @__PURE__ */ (0,
|
|
3495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
3101
3496
|
}
|
|
3102
3497
|
function useThemeContext() {
|
|
3103
|
-
const context = (0,
|
|
3498
|
+
const context = (0, import_react28.useContext)(ThemeContext);
|
|
3104
3499
|
if (!context) {
|
|
3105
3500
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
3106
3501
|
}
|
|
3107
3502
|
return context;
|
|
3108
3503
|
}
|
|
3109
3504
|
|
|
3110
|
-
// src/hooks/useDate.ts
|
|
3111
|
-
var import_react25 = require("react");
|
|
3112
|
-
function useDate(options) {
|
|
3113
|
-
const initialValue = (options == null ? void 0 : options.initialValue) ?? "";
|
|
3114
|
-
const format = (options == null ? void 0 : options.format) ?? DateFormats.USMilitary;
|
|
3115
|
-
const onChange = options == null ? void 0 : options.onChange;
|
|
3116
|
-
const [value, setValue] = (0, import_react25.useState)(initialValue);
|
|
3117
|
-
const handleChange = (0, import_react25.useCallback)(
|
|
3118
|
-
(e) => {
|
|
3119
|
-
const newValue = formatMilitaryDate(e.currentTarget.value);
|
|
3120
|
-
if (onChange) onChange(e);
|
|
3121
|
-
setValue(newValue);
|
|
3122
|
-
},
|
|
3123
|
-
[onChange]
|
|
3124
|
-
);
|
|
3125
|
-
return (0, import_react25.useMemo)(
|
|
3126
|
-
() => ({
|
|
3127
|
-
format,
|
|
3128
|
-
value,
|
|
3129
|
-
ISO: formatMilitaryToISO(value),
|
|
3130
|
-
onChange: handleChange
|
|
3131
|
-
}),
|
|
3132
|
-
[format, value, handleChange]
|
|
3133
|
-
);
|
|
3134
|
-
}
|
|
3135
|
-
function formatMilitaryToISO(input3) {
|
|
3136
|
-
const [day, month, year] = input3.split(" ");
|
|
3137
|
-
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
3138
|
-
const monthNum = monthIndex + 1;
|
|
3139
|
-
return `${year ?? "0000"}-${monthNum.toString().padStart(2, "0")}-${day.padStart(
|
|
3140
|
-
2,
|
|
3141
|
-
"0"
|
|
3142
|
-
)}`;
|
|
3143
|
-
}
|
|
3144
|
-
function formatMilitaryDate(input3) {
|
|
3145
|
-
let formatted = input3.toUpperCase().replace(/[^0-9A-Z]/g, "");
|
|
3146
|
-
let day = "";
|
|
3147
|
-
let month = "";
|
|
3148
|
-
let year = "";
|
|
3149
|
-
if (formatted.length >= 2) {
|
|
3150
|
-
day = formatted.replace(/[^0-9]/g, "").slice(0, 2);
|
|
3151
|
-
const dayNum = parseInt(day, 10);
|
|
3152
|
-
if (dayNum > 31) day = "31";
|
|
3153
|
-
else if (dayNum === 0) day = "01";
|
|
3154
|
-
formatted = formatted.slice(2);
|
|
3155
|
-
}
|
|
3156
|
-
if (formatted.length >= 3) {
|
|
3157
|
-
month = formatted.slice(0, 3);
|
|
3158
|
-
const monthIndex = MONTHS.findIndex((m) => m.startsWith(month));
|
|
3159
|
-
if (monthIndex !== -1) {
|
|
3160
|
-
month = MONTHS[monthIndex];
|
|
3161
|
-
} else {
|
|
3162
|
-
month = month.replace(/[^A-Z]/g, "");
|
|
3163
|
-
}
|
|
3164
|
-
formatted = formatted.slice(3);
|
|
3165
|
-
}
|
|
3166
|
-
if (formatted.length > 0) {
|
|
3167
|
-
year = formatted.slice(0, 4);
|
|
3168
|
-
}
|
|
3169
|
-
return [day, month, year].filter(Boolean).join(" ");
|
|
3170
|
-
}
|
|
3171
|
-
var DateFormats = {
|
|
3172
|
-
get ISO() {
|
|
3173
|
-
return "YYYY-MM-DD";
|
|
3174
|
-
},
|
|
3175
|
-
get USMilitary() {
|
|
3176
|
-
return "DD MMM YYYY";
|
|
3177
|
-
},
|
|
3178
|
-
get Months() {
|
|
3179
|
-
return MONTHS;
|
|
3180
|
-
}
|
|
3181
|
-
};
|
|
3182
|
-
var MONTHS = [
|
|
3183
|
-
"JAN",
|
|
3184
|
-
"FEB",
|
|
3185
|
-
"MAR",
|
|
3186
|
-
"APR",
|
|
3187
|
-
"MAY",
|
|
3188
|
-
"JUN",
|
|
3189
|
-
"JUL",
|
|
3190
|
-
"AUG",
|
|
3191
|
-
"SEP",
|
|
3192
|
-
"OCT",
|
|
3193
|
-
"NOV",
|
|
3194
|
-
"DEC"
|
|
3195
|
-
];
|
|
3196
|
-
|
|
3197
3505
|
// src/hooks/useToggle.ts
|
|
3198
|
-
var
|
|
3506
|
+
var import_react29 = require("react");
|
|
3199
3507
|
function useToggle(options) {
|
|
3200
|
-
const [checked, setChecked] = (0,
|
|
3508
|
+
const [checked, setChecked] = (0, import_react29.useState)((options == null ? void 0 : options.checked) ?? "");
|
|
3201
3509
|
const onChange = options == null ? void 0 : options.onChange;
|
|
3202
|
-
const handleChange = (0,
|
|
3510
|
+
const handleChange = (0, import_react29.useCallback)(
|
|
3203
3511
|
(e) => {
|
|
3204
3512
|
const target = e.currentTarget;
|
|
3205
3513
|
setChecked((prev) => {
|
|
@@ -3209,25 +3517,25 @@ function useToggle(options) {
|
|
|
3209
3517
|
},
|
|
3210
3518
|
[onChange]
|
|
3211
3519
|
);
|
|
3212
|
-
return (0,
|
|
3520
|
+
return (0, import_react29.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
3213
3521
|
}
|
|
3214
3522
|
|
|
3215
3523
|
// src/hooks/useRootColors.ts
|
|
3216
|
-
var
|
|
3524
|
+
var import_react30 = require("react");
|
|
3217
3525
|
function useRootColors(colors = []) {
|
|
3218
|
-
const [state, dispatch] = (0,
|
|
3219
|
-
const handleRefetch = (0,
|
|
3526
|
+
const [state, dispatch] = (0, import_react30.useReducer)(rootColorsReducer, {});
|
|
3527
|
+
const handleRefetch = (0, import_react30.useCallback)(() => {
|
|
3220
3528
|
return new Promise((resolve) => {
|
|
3221
3529
|
dispatch(formatColors(colors));
|
|
3222
3530
|
resolve();
|
|
3223
3531
|
});
|
|
3224
3532
|
}, []);
|
|
3225
|
-
(0,
|
|
3533
|
+
(0, import_react30.useEffect)(() => {
|
|
3226
3534
|
if (Object.keys(state).length === colors.length) return;
|
|
3227
3535
|
dispatch(formatColors(colors));
|
|
3228
3536
|
console.log("updating colors in root hook");
|
|
3229
3537
|
}, [colors]);
|
|
3230
|
-
return (0,
|
|
3538
|
+
return (0, import_react30.useMemo)(
|
|
3231
3539
|
() => ({ colors: state, refetch: handleRefetch }),
|
|
3232
3540
|
[state, handleRefetch]
|
|
3233
3541
|
);
|
|
@@ -3274,6 +3582,23 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3274
3582
|
CircularProgress,
|
|
3275
3583
|
ConfirmModal,
|
|
3276
3584
|
DateFormats,
|
|
3585
|
+
DatePicker,
|
|
3586
|
+
DatePickerCalendar,
|
|
3587
|
+
DatePickerContent,
|
|
3588
|
+
DatePickerContext,
|
|
3589
|
+
DatePickerDayView,
|
|
3590
|
+
DatePickerInput,
|
|
3591
|
+
DatePickerLabel,
|
|
3592
|
+
DatePickerMonthView,
|
|
3593
|
+
DatePickerTable,
|
|
3594
|
+
DatePickerTableCell,
|
|
3595
|
+
DatePickerTableCellTrigger,
|
|
3596
|
+
DatePickerTableHeader,
|
|
3597
|
+
DatePickerTrigger,
|
|
3598
|
+
DatePickerView,
|
|
3599
|
+
DatePickerViewControl,
|
|
3600
|
+
DatePickerViewControlGroup,
|
|
3601
|
+
DatePickerYearView,
|
|
3277
3602
|
Droppable,
|
|
3278
3603
|
FeatureFlag,
|
|
3279
3604
|
FeatureFlags,
|
|
@@ -3312,6 +3637,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3312
3637
|
ProgressBar,
|
|
3313
3638
|
PromptModal,
|
|
3314
3639
|
Radio,
|
|
3640
|
+
RangePickerInput,
|
|
3315
3641
|
Select,
|
|
3316
3642
|
Show,
|
|
3317
3643
|
Spinner,
|
|
@@ -3325,6 +3651,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3325
3651
|
Tag,
|
|
3326
3652
|
Tbody,
|
|
3327
3653
|
Td,
|
|
3654
|
+
Text,
|
|
3328
3655
|
Textarea,
|
|
3329
3656
|
Th,
|
|
3330
3657
|
Thead,
|
|
@@ -3334,6 +3661,7 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
3334
3661
|
Tr,
|
|
3335
3662
|
createNavTriggerProps,
|
|
3336
3663
|
defineIcons,
|
|
3664
|
+
formatISOToMilitary,
|
|
3337
3665
|
formatMilitaryDate,
|
|
3338
3666
|
formatMilitaryToISO,
|
|
3339
3667
|
formatNotifyCount,
|