@cerberus-design/react 0.16.0-next-ba05f96 → 0.16.0-next-7f1fa64
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 +104 -112
- package/build/legacy/components/accordion/index.cjs +178 -0
- package/build/legacy/components/accordion/index.cjs.map +1 -0
- package/build/legacy/components/accordion/item-group.cjs +166 -0
- package/build/legacy/components/accordion/item-group.cjs.map +1 -0
- package/build/legacy/components/accordion/item-indicator.cjs +114 -0
- package/build/legacy/components/accordion/item-indicator.cjs.map +1 -0
- package/build/legacy/components/accordion/parts.cjs +91 -0
- package/build/legacy/components/accordion/parts.cjs.map +1 -0
- package/build/legacy/components/{Accordion.cjs → accordion/primitives.cjs} +35 -32
- package/build/legacy/components/accordion/primitives.cjs.map +1 -0
- package/build/legacy/index.cjs +471 -473
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +104 -112
- package/build/modern/{chunk-RHCTPSKT.js → chunk-2KPSUYFL.js} +4 -4
- package/build/modern/{chunk-6I2FW4WI.js → chunk-32M5JS5F.js} +5 -5
- package/build/modern/{chunk-FBS7AX76.js → chunk-3J5D3O6Z.js} +5 -5
- package/build/modern/chunk-6OJ27QWV.js +21 -0
- package/build/modern/chunk-6OJ27QWV.js.map +1 -0
- package/build/modern/{chunk-RKVY2HJ3.js → chunk-AAGQR6B4.js} +4 -4
- package/build/modern/chunk-CPNKDKC2.js +64 -0
- package/build/modern/chunk-CPNKDKC2.js.map +1 -0
- package/build/modern/chunk-FWVFM7RK.js +38 -0
- package/build/modern/chunk-FWVFM7RK.js.map +1 -0
- package/build/modern/chunk-R2V75WU6.js +1 -0
- package/build/modern/{chunk-R7MPDSXX.js → chunk-R662TP4N.js} +5 -5
- package/build/modern/{chunk-LT62577B.js → chunk-R7IDIIST.js} +2 -2
- package/build/modern/{chunk-VSTOSLFS.js → chunk-VNPLKMEM.js} +4 -4
- package/build/modern/{chunk-U5XRQ2JZ.js → chunk-WA3QADO4.js} +4 -4
- package/build/modern/chunk-XBDEIBW2.js +21 -0
- package/build/modern/chunk-XBDEIBW2.js.map +1 -0
- package/build/modern/{chunk-QQCB6JXW.js → chunk-XTIIAYPU.js} +4 -4
- package/build/modern/{chunk-VTQ6RW3Z.js → chunk-Z6EXPMTS.js} +3 -3
- package/build/modern/components/DatePicker.client.js +3 -3
- package/build/modern/components/FileStatus.js +6 -6
- package/build/modern/components/accordion/index.js +31 -0
- package/build/modern/components/accordion/item-group.js +16 -0
- package/build/modern/components/accordion/item-indicator.js +11 -0
- package/build/modern/components/accordion/item-indicator.js.map +1 -0
- package/build/modern/components/accordion/parts.js +8 -0
- package/build/modern/components/accordion/parts.js.map +1 -0
- package/build/modern/components/accordion/primitives.js +15 -0
- package/build/modern/components/accordion/primitives.js.map +1 -0
- package/build/modern/components/combobox/index.js +3 -3
- package/build/modern/components/cta-dialog/index.js +2 -2
- package/build/modern/components/cta-dialog/provider.js +2 -2
- package/build/modern/components/deprecated/Label.js +6 -6
- package/build/modern/components/field/field.js +4 -4
- package/build/modern/components/field/index.js +7 -7
- package/build/modern/components/field/parts.js +3 -3
- package/build/modern/components/field/primitives.js +2 -2
- package/build/modern/components/rating/index.js +2 -2
- package/build/modern/components/rating/rating.js +2 -2
- package/build/modern/components/select/index.js +4 -4
- package/build/modern/context/confirm-modal.js +3 -3
- package/build/modern/context/field.js +2 -2
- package/build/modern/context/notification-center.js +3 -3
- package/build/modern/context/prompt-modal.js +8 -8
- package/build/modern/index.js +118 -112
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/accordion/index.ts +3 -0
- package/src/components/accordion/item-group.tsx +66 -0
- package/src/components/accordion/item-indicator.tsx +27 -0
- package/src/components/accordion/parts.ts +53 -0
- package/src/components/accordion/primitives.tsx +101 -0
- package/src/index.ts +1 -3
- package/build/legacy/components/Accordion.cjs.map +0 -1
- package/build/legacy/components/Accordion.client.cjs +0 -64
- package/build/legacy/components/Accordion.client.cjs.map +0 -1
- package/build/legacy/components/AccordionItemGroup.cjs +0 -142
- package/build/legacy/components/AccordionItemGroup.cjs.map +0 -1
- package/build/modern/chunk-AZRFYQO7.js +0 -60
- package/build/modern/chunk-AZRFYQO7.js.map +0 -1
- package/build/modern/chunk-WN7TJX6J.js +0 -41
- package/build/modern/chunk-WN7TJX6J.js.map +0 -1
- package/build/modern/chunk-XZGXRRSQ.js +0 -31
- package/build/modern/chunk-XZGXRRSQ.js.map +0 -1
- package/build/modern/components/Accordion.client.js +0 -9
- package/build/modern/components/Accordion.js +0 -13
- package/build/modern/components/AccordionItemGroup.js +0 -11
- package/src/components/Accordion.client.tsx +0 -46
- package/src/components/Accordion.tsx +0 -125
- package/src/components/AccordionItemGroup.tsx +0 -79
- /package/build/modern/{chunk-RHCTPSKT.js.map → chunk-2KPSUYFL.js.map} +0 -0
- /package/build/modern/{chunk-6I2FW4WI.js.map → chunk-32M5JS5F.js.map} +0 -0
- /package/build/modern/{chunk-FBS7AX76.js.map → chunk-3J5D3O6Z.js.map} +0 -0
- /package/build/modern/{chunk-RKVY2HJ3.js.map → chunk-AAGQR6B4.js.map} +0 -0
- /package/build/modern/{components/Accordion.client.js.map → chunk-R2V75WU6.js.map} +0 -0
- /package/build/modern/{chunk-R7MPDSXX.js.map → chunk-R662TP4N.js.map} +0 -0
- /package/build/modern/{chunk-LT62577B.js.map → chunk-R7IDIIST.js.map} +0 -0
- /package/build/modern/{chunk-VSTOSLFS.js.map → chunk-VNPLKMEM.js.map} +0 -0
- /package/build/modern/{chunk-U5XRQ2JZ.js.map → chunk-WA3QADO4.js.map} +0 -0
- /package/build/modern/{chunk-QQCB6JXW.js.map → chunk-XTIIAYPU.js.map} +0 -0
- /package/build/modern/{chunk-VTQ6RW3Z.js.map → chunk-Z6EXPMTS.js.map} +0 -0
- /package/build/modern/components/{Accordion.js.map → accordion/index.js.map} +0 -0
- /package/build/modern/components/{AccordionItemGroup.js.map → accordion/item-group.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -21,12 +21,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
var src_exports = {};
|
|
23
23
|
__export(src_exports, {
|
|
24
|
-
Accordion: () =>
|
|
24
|
+
Accordion: () => Accordion2,
|
|
25
25
|
AccordionItem: () => AccordionItem,
|
|
26
26
|
AccordionItemContent: () => AccordionItemContent,
|
|
27
27
|
AccordionItemGroup: () => AccordionItemGroup,
|
|
28
28
|
AccordionItemIndicator: () => AccordionItemIndicator,
|
|
29
29
|
AccordionItemTrigger: () => AccordionItemTrigger,
|
|
30
|
+
AccordionParts: () => AccordionParts,
|
|
31
|
+
AccordionRoot: () => AccordionRoot,
|
|
30
32
|
Admonition: () => Admonition,
|
|
31
33
|
AdmonitionDescription: () => AdmonitionDescription,
|
|
32
34
|
AdmonitionHeading: () => AdmonitionHeading,
|
|
@@ -957,112 +959,106 @@ function useToggle(options) {
|
|
|
957
959
|
return (0, import_react10.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
958
960
|
}
|
|
959
961
|
|
|
960
|
-
// src/components/
|
|
961
|
-
var
|
|
962
|
+
// src/components/accordion/primitives.tsx
|
|
963
|
+
var import_accordion = require("@ark-ui/react/accordion");
|
|
962
964
|
var import_css15 = require("@cerberus/styled-system/css");
|
|
963
965
|
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
964
966
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
965
|
-
function
|
|
966
|
-
const { size,
|
|
967
|
+
function AccordionRoot(props) {
|
|
968
|
+
const { size, ...rootProps } = props;
|
|
967
969
|
const styles = (0, import_recipes11.accordion)({ size });
|
|
968
970
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
969
|
-
|
|
971
|
+
import_accordion.Accordion.Root,
|
|
970
972
|
{
|
|
971
|
-
|
|
972
|
-
className: (0, import_css15.cx)(
|
|
973
|
-
|
|
973
|
+
...props,
|
|
974
|
+
className: (0, import_css15.cx)(styles.root, rootProps.className),
|
|
975
|
+
"data-size": size
|
|
974
976
|
}
|
|
975
977
|
);
|
|
976
978
|
}
|
|
977
979
|
function AccordionItem(props) {
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
+
const styles = (0, import_recipes11.accordion)();
|
|
981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_accordion.Accordion.Item, { ...props, className: (0, import_css15.cx)(styles.item, props.className) });
|
|
982
|
+
}
|
|
983
|
+
function AccordionItemTrigger(props) {
|
|
984
|
+
const styles = (0, import_recipes11.accordion)();
|
|
980
985
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
981
|
-
|
|
986
|
+
import_accordion.Accordion.ItemTrigger,
|
|
982
987
|
{
|
|
983
|
-
...
|
|
984
|
-
className: (0, import_css15.cx)(
|
|
988
|
+
...props,
|
|
989
|
+
className: (0, import_css15.cx)(styles.itemTrigger, props.className)
|
|
985
990
|
}
|
|
986
991
|
);
|
|
987
992
|
}
|
|
988
|
-
function
|
|
989
|
-
const
|
|
990
|
-
const styles = (0, import_recipes11.accordion)({ size });
|
|
993
|
+
function AccordionItemIndicator(props) {
|
|
994
|
+
const styles = (0, import_recipes11.accordion)();
|
|
991
995
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
992
|
-
|
|
996
|
+
import_accordion.Accordion.ItemIndicator,
|
|
993
997
|
{
|
|
994
|
-
...
|
|
995
|
-
className: (0, import_css15.cx)(
|
|
998
|
+
...props,
|
|
999
|
+
className: (0, import_css15.cx)(styles.itemIndicator, props.className)
|
|
996
1000
|
}
|
|
997
1001
|
);
|
|
998
1002
|
}
|
|
999
1003
|
function AccordionItemContent(props) {
|
|
1000
|
-
const
|
|
1001
|
-
const styles = (0, import_recipes11.accordion)({ size });
|
|
1004
|
+
const styles = (0, import_recipes11.accordion)();
|
|
1002
1005
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1003
|
-
|
|
1006
|
+
import_accordion.Accordion.ItemContent,
|
|
1004
1007
|
{
|
|
1005
|
-
...
|
|
1006
|
-
className: (0, import_css15.cx)(
|
|
1008
|
+
...props,
|
|
1009
|
+
className: (0, import_css15.cx)(styles.itemContent, props.className)
|
|
1007
1010
|
}
|
|
1008
1011
|
);
|
|
1009
1012
|
}
|
|
1010
1013
|
|
|
1011
|
-
// src/components/
|
|
1012
|
-
var
|
|
1013
|
-
|
|
1014
|
-
|
|
1014
|
+
// src/components/accordion/parts.ts
|
|
1015
|
+
var AccordionParts = {
|
|
1016
|
+
Root: AccordionRoot,
|
|
1017
|
+
Item: AccordionItem,
|
|
1018
|
+
ItemTrigger: AccordionItemTrigger,
|
|
1019
|
+
ItemContent: AccordionItemContent,
|
|
1020
|
+
ItemIndicator: AccordionItemIndicator
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
// src/components/accordion/item-indicator.tsx
|
|
1015
1024
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1016
|
-
function
|
|
1025
|
+
function AccordionChevronItemIndicator(props) {
|
|
1017
1026
|
const { size, ...indicatorProps } = props;
|
|
1018
|
-
const styles = (0, import_recipes12.accordion)({ size });
|
|
1019
1027
|
const iconSize = size === "sm" ? 16 : "24";
|
|
1020
1028
|
const { icons } = useCerberusContext();
|
|
1021
|
-
const ChevronDown = icons
|
|
1022
|
-
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1023
|
-
import_react12.Accordion.ItemIndicator,
|
|
1024
|
-
{
|
|
1025
|
-
...indicatorProps,
|
|
1026
|
-
className: (0, import_css16.cx)(indicatorProps.className, styles.itemIndicator),
|
|
1027
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { size: iconSize })
|
|
1028
|
-
}
|
|
1029
|
-
);
|
|
1029
|
+
const { accordionIndicator: ChevronDown } = icons;
|
|
1030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AccordionParts.ItemIndicator, { ...indicatorProps, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ChevronDown, { size: iconSize }) });
|
|
1030
1031
|
}
|
|
1031
1032
|
|
|
1032
|
-
// src/components/
|
|
1033
|
-
var import_css17 = require("@cerberus/styled-system/css");
|
|
1033
|
+
// src/components/accordion/item-group.tsx
|
|
1034
1034
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1035
|
+
var Accordion2 = AccordionParts.Root;
|
|
1035
1036
|
function AccordionItemGroup(props) {
|
|
1036
|
-
const
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AccordionItem, { ...itemProps, children: [
|
|
1048
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AccordionItemTrigger, { className: (0, import_css17.css)(triggerStyles), size, children: [
|
|
1049
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: indicatorPosition === "start", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionItemIndicator, { size }) }),
|
|
1050
|
-
heading,
|
|
1051
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: indicatorPosition === "end", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionItemIndicator, { size }) })
|
|
1037
|
+
const [groupProps, itemProps] = splitProps(props, [
|
|
1038
|
+
"heading",
|
|
1039
|
+
"children",
|
|
1040
|
+
"indicatorPosition"
|
|
1041
|
+
]);
|
|
1042
|
+
const indicatorPosition = groupProps.indicatorPosition ?? "end";
|
|
1043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AccordionParts.Item, { ...itemProps, children: [
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(AccordionParts.ItemTrigger, { "data-indicator-position": indicatorPosition, children: [
|
|
1045
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: indicatorPosition === "start", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionChevronItemIndicator, {}) }),
|
|
1046
|
+
groupProps.heading,
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Show, { when: indicatorPosition === "end", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionChevronItemIndicator, {}) })
|
|
1052
1048
|
] }),
|
|
1053
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1049
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionParts.ItemContent, { children: groupProps.children })
|
|
1054
1050
|
] });
|
|
1055
1051
|
}
|
|
1056
1052
|
|
|
1057
1053
|
// src/components/Admonition.tsx
|
|
1058
|
-
var
|
|
1059
|
-
var
|
|
1054
|
+
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1055
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1060
1056
|
var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
1061
1057
|
|
|
1062
1058
|
// src/components/Avatar.tsx
|
|
1063
|
-
var
|
|
1059
|
+
var import_css16 = require("@cerberus/styled-system/css");
|
|
1064
1060
|
var import_patterns3 = require("@cerberus/styled-system/patterns");
|
|
1065
|
-
var
|
|
1061
|
+
var import_recipes12 = require("@cerberus/styled-system/recipes");
|
|
1066
1062
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1067
1063
|
function Avatar(props) {
|
|
1068
1064
|
const {
|
|
@@ -1083,9 +1079,9 @@ function Avatar(props) {
|
|
|
1083
1079
|
"div",
|
|
1084
1080
|
{
|
|
1085
1081
|
...nativeProps,
|
|
1086
|
-
className: (0,
|
|
1082
|
+
className: (0, import_css16.cx)(
|
|
1087
1083
|
nativeProps.className,
|
|
1088
|
-
(0,
|
|
1084
|
+
(0, import_recipes12.avatar)({ gradient, size }),
|
|
1089
1085
|
(0, import_patterns3.circle)()
|
|
1090
1086
|
),
|
|
1091
1087
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -1120,7 +1116,7 @@ function Avatar(props) {
|
|
|
1120
1116
|
"img",
|
|
1121
1117
|
{
|
|
1122
1118
|
alt: props.ariaLabel,
|
|
1123
|
-
className: (0,
|
|
1119
|
+
className: (0, import_css16.css)({
|
|
1124
1120
|
h: "full",
|
|
1125
1121
|
objectFit: "cover",
|
|
1126
1122
|
w: "full"
|
|
@@ -1230,13 +1226,13 @@ function Admonition(props) {
|
|
|
1230
1226
|
"aside",
|
|
1231
1227
|
{
|
|
1232
1228
|
...nativeProps,
|
|
1233
|
-
className: (0,
|
|
1229
|
+
className: (0, import_css17.cx)(
|
|
1234
1230
|
nativeProps.className,
|
|
1235
1231
|
(0, import_patterns4.hstack)({
|
|
1236
1232
|
gap: "md",
|
|
1237
1233
|
w: "full"
|
|
1238
1234
|
}),
|
|
1239
|
-
(0,
|
|
1235
|
+
(0, import_recipes13.admonition)({ palette, usage }).root
|
|
1240
1236
|
),
|
|
1241
1237
|
children: [
|
|
1242
1238
|
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MatchAvatar, { palette }), children: icon }),
|
|
@@ -1251,9 +1247,9 @@ function AdmonitionHeading(props) {
|
|
|
1251
1247
|
"p",
|
|
1252
1248
|
{
|
|
1253
1249
|
...nativeProps,
|
|
1254
|
-
className: (0,
|
|
1250
|
+
className: (0, import_css17.cx)(
|
|
1255
1251
|
nativeProps.className,
|
|
1256
|
-
(0,
|
|
1252
|
+
(0, import_recipes13.admonition)({ palette, usage }).heading
|
|
1257
1253
|
)
|
|
1258
1254
|
}
|
|
1259
1255
|
);
|
|
@@ -1264,18 +1260,18 @@ function AdmonitionDescription(props) {
|
|
|
1264
1260
|
"p",
|
|
1265
1261
|
{
|
|
1266
1262
|
...nativeProps,
|
|
1267
|
-
className: (0,
|
|
1263
|
+
className: (0, import_css17.cx)(
|
|
1268
1264
|
nativeProps.className,
|
|
1269
|
-
(0,
|
|
1265
|
+
(0, import_recipes13.admonition)({ palette, usage }).description
|
|
1270
1266
|
)
|
|
1271
1267
|
}
|
|
1272
1268
|
);
|
|
1273
1269
|
}
|
|
1274
1270
|
|
|
1275
1271
|
// src/components/button/button.tsx
|
|
1276
|
-
var
|
|
1277
|
-
var
|
|
1278
|
-
var
|
|
1272
|
+
var import_react11 = require("react");
|
|
1273
|
+
var import_css18 = require("@cerberus/styled-system/css");
|
|
1274
|
+
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1279
1275
|
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
1280
1276
|
|
|
1281
1277
|
// src/components/Spinner.tsx
|
|
@@ -1356,20 +1352,20 @@ function Spinner(props) {
|
|
|
1356
1352
|
|
|
1357
1353
|
// src/components/button/button.tsx
|
|
1358
1354
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1359
|
-
var ButtonContext = (0,
|
|
1355
|
+
var ButtonContext = (0, import_react11.createContext)({
|
|
1360
1356
|
pending: false
|
|
1361
1357
|
});
|
|
1362
1358
|
function Button(props) {
|
|
1363
1359
|
const { palette, usage, shape, size, pending = false, ...nativeProps } = props;
|
|
1364
|
-
const value = (0,
|
|
1360
|
+
const value = (0, import_react11.useMemo)(() => ({ pending }), [pending]);
|
|
1365
1361
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ButtonContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1366
1362
|
"button",
|
|
1367
1363
|
{
|
|
1368
1364
|
...nativeProps,
|
|
1369
1365
|
disabled: pending || nativeProps.disabled,
|
|
1370
|
-
className: (0,
|
|
1366
|
+
className: (0, import_css18.cx)(
|
|
1371
1367
|
nativeProps.className,
|
|
1372
|
-
(0,
|
|
1368
|
+
(0, import_recipes14.button)({
|
|
1373
1369
|
palette,
|
|
1374
1370
|
usage,
|
|
1375
1371
|
shape,
|
|
@@ -1380,7 +1376,7 @@ function Button(props) {
|
|
|
1380
1376
|
) });
|
|
1381
1377
|
}
|
|
1382
1378
|
function ButtonIcon(props) {
|
|
1383
|
-
const { pending } = (0,
|
|
1379
|
+
const { pending } = (0, import_react11.useContext)(ButtonContext);
|
|
1384
1380
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Show, { when: pending, fallback: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: props.children }), children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx2.Box, { w: "4", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Spinner, {}) }) });
|
|
1385
1381
|
}
|
|
1386
1382
|
|
|
@@ -1422,52 +1418,52 @@ function Text(props) {
|
|
|
1422
1418
|
}
|
|
1423
1419
|
|
|
1424
1420
|
// src/components/checkbox/primitives.tsx
|
|
1425
|
-
var
|
|
1426
|
-
var
|
|
1427
|
-
var
|
|
1421
|
+
var import_react12 = require("@ark-ui/react");
|
|
1422
|
+
var import_css19 = require("@cerberus/styled-system/css");
|
|
1423
|
+
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1428
1424
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1429
1425
|
function CheckboxRoot(props) {
|
|
1430
|
-
const styles = (0,
|
|
1431
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1426
|
+
const styles = (0, import_recipes15.checkbox)();
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react12.Checkbox.Root, { ...props, className: (0, import_css19.cx)(styles.root, props.className) });
|
|
1432
1428
|
}
|
|
1433
1429
|
function CheckboxLabel(props) {
|
|
1434
1430
|
const { size, ...labelProps } = props;
|
|
1435
|
-
const styles = (0,
|
|
1431
|
+
const styles = (0, import_recipes15.checkbox)({ size });
|
|
1436
1432
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1437
|
-
|
|
1433
|
+
import_react12.Checkbox.Label,
|
|
1438
1434
|
{
|
|
1439
1435
|
...labelProps,
|
|
1440
|
-
className: (0,
|
|
1436
|
+
className: (0, import_css19.cx)(styles.label, labelProps.className)
|
|
1441
1437
|
}
|
|
1442
1438
|
);
|
|
1443
1439
|
}
|
|
1444
1440
|
function CheckboxControl(props) {
|
|
1445
1441
|
const { size, ...controlProps } = props;
|
|
1446
|
-
const styles = (0,
|
|
1442
|
+
const styles = (0, import_recipes15.checkbox)({ size });
|
|
1447
1443
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1448
|
-
|
|
1444
|
+
import_react12.Checkbox.Control,
|
|
1449
1445
|
{
|
|
1450
1446
|
...controlProps,
|
|
1451
|
-
className: (0,
|
|
1447
|
+
className: (0, import_css19.cx)(styles.control, controlProps.className)
|
|
1452
1448
|
}
|
|
1453
1449
|
);
|
|
1454
1450
|
}
|
|
1455
1451
|
function CheckboxIndicator(props) {
|
|
1456
|
-
const styles = (0,
|
|
1452
|
+
const styles = (0, import_recipes15.checkbox)();
|
|
1457
1453
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1458
|
-
|
|
1454
|
+
import_react12.Checkbox.Indicator,
|
|
1459
1455
|
{
|
|
1460
1456
|
...props,
|
|
1461
|
-
className: (0,
|
|
1457
|
+
className: (0, import_css19.cx)(styles.indicator, props.className)
|
|
1462
1458
|
}
|
|
1463
1459
|
);
|
|
1464
1460
|
}
|
|
1465
1461
|
function CheckboxHiddenInput(props) {
|
|
1466
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react12.Checkbox.HiddenInput, { ...props });
|
|
1467
1463
|
}
|
|
1468
1464
|
function CheckboxGroup(props) {
|
|
1469
|
-
const styles = (0,
|
|
1470
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1465
|
+
const styles = (0, import_recipes15.checkbox)();
|
|
1466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react12.Checkbox.Group, { ...props, className: (0, import_css19.cx)(styles.group, props.className) });
|
|
1471
1467
|
}
|
|
1472
1468
|
|
|
1473
1469
|
// src/components/checkbox/parts.ts
|
|
@@ -1504,7 +1500,7 @@ function Checkbox2(props) {
|
|
|
1504
1500
|
|
|
1505
1501
|
// src/components/CircularProgress.tsx
|
|
1506
1502
|
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
1507
|
-
var
|
|
1503
|
+
var import_css20 = require("@cerberus/styled-system/css");
|
|
1508
1504
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1509
1505
|
function CircularProgress(props) {
|
|
1510
1506
|
const strokeW = 14;
|
|
@@ -1531,7 +1527,7 @@ function CircularProgress(props) {
|
|
|
1531
1527
|
"svg",
|
|
1532
1528
|
{
|
|
1533
1529
|
"data-complete": now === 100,
|
|
1534
|
-
className: (0,
|
|
1530
|
+
className: (0, import_css20.css)({
|
|
1535
1531
|
display: "block",
|
|
1536
1532
|
rounded: "full",
|
|
1537
1533
|
transition: "all 0.5s ease"
|
|
@@ -1563,7 +1559,7 @@ function CircularProgress(props) {
|
|
|
1563
1559
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Show, { when: bgStyle === "filled", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1564
1560
|
"circle",
|
|
1565
1561
|
{
|
|
1566
|
-
className: (0,
|
|
1562
|
+
className: (0, import_css20.css)({
|
|
1567
1563
|
fill: "page.surface.initial"
|
|
1568
1564
|
}),
|
|
1569
1565
|
cx: "50%",
|
|
@@ -1575,7 +1571,7 @@ function CircularProgress(props) {
|
|
|
1575
1571
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1576
1572
|
"circle",
|
|
1577
1573
|
{
|
|
1578
|
-
className: (0,
|
|
1574
|
+
className: (0, import_css20.css)({
|
|
1579
1575
|
stroke: "page.bg.100"
|
|
1580
1576
|
}),
|
|
1581
1577
|
cx: "50%",
|
|
@@ -1588,7 +1584,7 @@ function CircularProgress(props) {
|
|
|
1588
1584
|
"circle",
|
|
1589
1585
|
{
|
|
1590
1586
|
"data-complete": now === 100,
|
|
1591
|
-
className: (0,
|
|
1587
|
+
className: (0, import_css20.css)({
|
|
1592
1588
|
stroke: "url(#gradient)",
|
|
1593
1589
|
transition: "stroke-dashoffset, stroke 0.5s ease",
|
|
1594
1590
|
_isComplete: {
|
|
@@ -1609,7 +1605,7 @@ function CircularProgress(props) {
|
|
|
1609
1605
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1610
1606
|
"text",
|
|
1611
1607
|
{
|
|
1612
|
-
className: (0,
|
|
1608
|
+
className: (0, import_css20.css)({
|
|
1613
1609
|
fill: "page.text.initial",
|
|
1614
1610
|
fontFamily: "mono",
|
|
1615
1611
|
textStyle: "1.25rem"
|
|
@@ -1627,7 +1623,7 @@ function CircularProgress(props) {
|
|
|
1627
1623
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1628
1624
|
"text",
|
|
1629
1625
|
{
|
|
1630
|
-
className: (0,
|
|
1626
|
+
className: (0, import_css20.css)({
|
|
1631
1627
|
fill: "page.text.100",
|
|
1632
1628
|
fontSize: "0.5rem",
|
|
1633
1629
|
fontWeight: 600
|
|
@@ -1650,125 +1646,125 @@ function CircularProgress(props) {
|
|
|
1650
1646
|
// src/components/combobox/primitives.tsx
|
|
1651
1647
|
var import_combobox = require("@ark-ui/react/combobox");
|
|
1652
1648
|
var import_factory = require("@ark-ui/react/factory");
|
|
1653
|
-
var
|
|
1654
|
-
var
|
|
1649
|
+
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1650
|
+
var import_css21 = require("@cerberus/styled-system/css");
|
|
1655
1651
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1656
1652
|
function ComboboxRoot(props) {
|
|
1657
1653
|
const { size, ...rootProps } = props;
|
|
1658
|
-
const styles = (0,
|
|
1654
|
+
const styles = (0, import_recipes16.combobox)({ size });
|
|
1659
1655
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1660
1656
|
import_combobox.Combobox.Root,
|
|
1661
1657
|
{
|
|
1662
1658
|
...rootProps,
|
|
1663
|
-
className: (0,
|
|
1659
|
+
className: (0, import_css21.cx)(styles.root, rootProps.className)
|
|
1664
1660
|
}
|
|
1665
1661
|
);
|
|
1666
1662
|
}
|
|
1667
1663
|
function ComboboxLabel(props) {
|
|
1668
|
-
const styles = (0,
|
|
1669
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Label, { ...props, className: (0,
|
|
1664
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Label, { ...props, className: (0, import_css21.cx)(styles.label, props.className) });
|
|
1670
1666
|
}
|
|
1671
1667
|
function ComboboxControl(props) {
|
|
1672
|
-
const styles = (0,
|
|
1668
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1673
1669
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1674
1670
|
import_combobox.Combobox.Control,
|
|
1675
1671
|
{
|
|
1676
1672
|
...props,
|
|
1677
|
-
className: (0,
|
|
1673
|
+
className: (0, import_css21.cx)(styles.control, props.className)
|
|
1678
1674
|
}
|
|
1679
1675
|
);
|
|
1680
1676
|
}
|
|
1681
1677
|
function ComboboxInput(props) {
|
|
1682
|
-
const styles = (0,
|
|
1683
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Input, { ...props, className: (0,
|
|
1678
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Input, { ...props, className: (0, import_css21.cx)(styles.input, props.className) });
|
|
1684
1680
|
}
|
|
1685
1681
|
function ComboboxTrigger(props) {
|
|
1686
|
-
const styles = (0,
|
|
1682
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1687
1683
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1688
1684
|
import_combobox.Combobox.Trigger,
|
|
1689
1685
|
{
|
|
1690
1686
|
...props,
|
|
1691
|
-
className: (0,
|
|
1687
|
+
className: (0, import_css21.cx)(styles.trigger, props.className)
|
|
1692
1688
|
}
|
|
1693
1689
|
);
|
|
1694
1690
|
}
|
|
1695
1691
|
function ComboboxClearTrigger(props) {
|
|
1696
|
-
const styles = (0,
|
|
1692
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1697
1693
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1698
1694
|
import_combobox.Combobox.ClearTrigger,
|
|
1699
1695
|
{
|
|
1700
1696
|
...props,
|
|
1701
|
-
className: (0,
|
|
1697
|
+
className: (0, import_css21.cx)(styles.clearTrigger, props.className)
|
|
1702
1698
|
}
|
|
1703
1699
|
);
|
|
1704
1700
|
}
|
|
1705
1701
|
function ComboboxPositioner(props) {
|
|
1706
|
-
const styles = (0,
|
|
1702
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1707
1703
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1708
1704
|
import_combobox.Combobox.Positioner,
|
|
1709
1705
|
{
|
|
1710
1706
|
...props,
|
|
1711
|
-
className: (0,
|
|
1707
|
+
className: (0, import_css21.cx)(styles.positioner, props.className)
|
|
1712
1708
|
}
|
|
1713
1709
|
);
|
|
1714
1710
|
}
|
|
1715
1711
|
function ComboboxContent(props) {
|
|
1716
1712
|
const { size, ...contentProps } = props;
|
|
1717
|
-
const styles = (0,
|
|
1713
|
+
const styles = (0, import_recipes16.combobox)({ size });
|
|
1718
1714
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1719
1715
|
import_combobox.Combobox.Content,
|
|
1720
1716
|
{
|
|
1721
1717
|
...contentProps,
|
|
1722
|
-
className: (0,
|
|
1718
|
+
className: (0, import_css21.cx)(styles.content, contentProps.className)
|
|
1723
1719
|
}
|
|
1724
1720
|
);
|
|
1725
1721
|
}
|
|
1726
1722
|
function ComboboxItemGroup(props) {
|
|
1727
|
-
const styles = (0,
|
|
1723
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1728
1724
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1729
1725
|
import_combobox.Combobox.ItemGroup,
|
|
1730
1726
|
{
|
|
1731
1727
|
...props,
|
|
1732
|
-
className: (0,
|
|
1728
|
+
className: (0, import_css21.cx)(styles.itemGroup, props.className)
|
|
1733
1729
|
}
|
|
1734
1730
|
);
|
|
1735
1731
|
}
|
|
1736
1732
|
function ComboboxItemGroupLabel(props) {
|
|
1737
|
-
const styles = (0,
|
|
1733
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1738
1734
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1739
1735
|
import_combobox.Combobox.ItemGroupLabel,
|
|
1740
1736
|
{
|
|
1741
1737
|
...props,
|
|
1742
|
-
className: (0,
|
|
1738
|
+
className: (0, import_css21.cx)(styles.itemGroupLabel, props.className)
|
|
1743
1739
|
}
|
|
1744
1740
|
);
|
|
1745
1741
|
}
|
|
1746
1742
|
function ComboboxItem(props) {
|
|
1747
|
-
const styles = (0,
|
|
1748
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Item, { ...props, className: (0,
|
|
1743
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_combobox.Combobox.Item, { ...props, className: (0, import_css21.cx)(styles.item, props.className) });
|
|
1749
1745
|
}
|
|
1750
1746
|
function ComboboxItemText(props) {
|
|
1751
|
-
const styles = (0,
|
|
1747
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1752
1748
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1753
1749
|
import_combobox.Combobox.ItemText,
|
|
1754
1750
|
{
|
|
1755
1751
|
...props,
|
|
1756
|
-
className: (0,
|
|
1752
|
+
className: (0, import_css21.cx)(styles.itemText, props.className)
|
|
1757
1753
|
}
|
|
1758
1754
|
);
|
|
1759
1755
|
}
|
|
1760
1756
|
function ComboboxItemIndicator(props) {
|
|
1761
|
-
const styles = (0,
|
|
1757
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1762
1758
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1763
1759
|
import_combobox.Combobox.ItemIndicator,
|
|
1764
1760
|
{
|
|
1765
1761
|
...props,
|
|
1766
|
-
className: (0,
|
|
1762
|
+
className: (0, import_css21.cx)(styles.itemIndicator, props.className)
|
|
1767
1763
|
}
|
|
1768
1764
|
);
|
|
1769
1765
|
}
|
|
1770
1766
|
function ComboboxStartIcon(props) {
|
|
1771
|
-
const styles = (0,
|
|
1767
|
+
const styles = (0, import_recipes16.combobox)();
|
|
1772
1768
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_factory.ark.span, { ...props, className: styles.startIcon });
|
|
1773
1769
|
}
|
|
1774
1770
|
var ComboItemText = ComboboxItemText;
|
|
@@ -1791,8 +1787,8 @@ var ComboboxParts = {
|
|
|
1791
1787
|
};
|
|
1792
1788
|
|
|
1793
1789
|
// src/components/Portal.tsx
|
|
1794
|
-
var
|
|
1795
|
-
var Portal =
|
|
1790
|
+
var import_react13 = require("@ark-ui/react");
|
|
1791
|
+
var Portal = import_react13.Portal;
|
|
1796
1792
|
|
|
1797
1793
|
// src/components/combobox/combobox.tsx
|
|
1798
1794
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -1840,38 +1836,38 @@ function ComboItemGroup(props) {
|
|
|
1840
1836
|
}
|
|
1841
1837
|
|
|
1842
1838
|
// src/components/combobox/use-stateful-collection.ts
|
|
1843
|
-
var
|
|
1839
|
+
var import_react14 = require("react");
|
|
1844
1840
|
|
|
1845
1841
|
// src/components/select/primitives.tsx
|
|
1846
1842
|
var import_select = require("@ark-ui/react/select");
|
|
1847
|
-
var
|
|
1848
|
-
var
|
|
1843
|
+
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1844
|
+
var import_css22 = require("@cerberus/styled-system/css");
|
|
1849
1845
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1850
1846
|
function SelectRoot(props) {
|
|
1851
1847
|
const { size, ...rootProps } = props;
|
|
1852
|
-
const styles = (0,
|
|
1848
|
+
const styles = (0, import_recipes17.select)({ size });
|
|
1853
1849
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1854
1850
|
import_select.Select.Root,
|
|
1855
1851
|
{
|
|
1856
1852
|
...rootProps,
|
|
1857
|
-
className: (0,
|
|
1853
|
+
className: (0, import_css22.cx)(styles.root, rootProps.className)
|
|
1858
1854
|
}
|
|
1859
1855
|
);
|
|
1860
1856
|
}
|
|
1861
1857
|
function SelectLabel(props) {
|
|
1862
|
-
const styles = (0,
|
|
1863
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Label, { ...props, className: (0,
|
|
1858
|
+
const styles = (0, import_recipes17.select)();
|
|
1859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Label, { ...props, className: (0, import_css22.cx)(styles.label, props.className) });
|
|
1864
1860
|
}
|
|
1865
1861
|
function SelectControl(props) {
|
|
1866
1862
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Control, { ...props });
|
|
1867
1863
|
}
|
|
1868
1864
|
function SelectTrigger(props) {
|
|
1869
|
-
const styles = (0,
|
|
1865
|
+
const styles = (0, import_recipes17.select)();
|
|
1870
1866
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1871
1867
|
import_select.Select.Trigger,
|
|
1872
1868
|
{
|
|
1873
1869
|
...props,
|
|
1874
|
-
className: (0,
|
|
1870
|
+
className: (0, import_css22.cx)(styles.trigger, props.className)
|
|
1875
1871
|
}
|
|
1876
1872
|
);
|
|
1877
1873
|
}
|
|
@@ -1879,12 +1875,12 @@ function SelectValueText(props) {
|
|
|
1879
1875
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ValueText, { ...props });
|
|
1880
1876
|
}
|
|
1881
1877
|
function SelectIndicator(props) {
|
|
1882
|
-
const styles = (0,
|
|
1878
|
+
const styles = (0, import_recipes17.select)();
|
|
1883
1879
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1884
1880
|
import_select.Select.Indicator,
|
|
1885
1881
|
{
|
|
1886
1882
|
...props,
|
|
1887
|
-
className: (0,
|
|
1883
|
+
className: (0, import_css22.cx)(styles.indicator, props.className)
|
|
1888
1884
|
}
|
|
1889
1885
|
);
|
|
1890
1886
|
}
|
|
@@ -1892,23 +1888,23 @@ function SelectClearTrigger(props) {
|
|
|
1892
1888
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ClearTrigger, { ...props });
|
|
1893
1889
|
}
|
|
1894
1890
|
function SelectPositioner(props) {
|
|
1895
|
-
const styles = (0,
|
|
1891
|
+
const styles = (0, import_recipes17.select)();
|
|
1896
1892
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1897
1893
|
import_select.Select.Positioner,
|
|
1898
1894
|
{
|
|
1899
1895
|
...props,
|
|
1900
|
-
className: (0,
|
|
1896
|
+
className: (0, import_css22.cx)(styles.positioner, props.className)
|
|
1901
1897
|
}
|
|
1902
1898
|
);
|
|
1903
1899
|
}
|
|
1904
1900
|
function SelectContent(props) {
|
|
1905
1901
|
const { size, ...contentProps } = props;
|
|
1906
|
-
const styles = (0,
|
|
1902
|
+
const styles = (0, import_recipes17.select)({ size });
|
|
1907
1903
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1908
1904
|
import_select.Select.Content,
|
|
1909
1905
|
{
|
|
1910
1906
|
...contentProps,
|
|
1911
|
-
className: (0,
|
|
1907
|
+
className: (0, import_css22.cx)(styles.content, contentProps.className)
|
|
1912
1908
|
}
|
|
1913
1909
|
);
|
|
1914
1910
|
}
|
|
@@ -1916,29 +1912,29 @@ function SelectItemGroup(props) {
|
|
|
1916
1912
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ItemGroup, { ...props });
|
|
1917
1913
|
}
|
|
1918
1914
|
function SelectItemGroupLabel(props) {
|
|
1919
|
-
const styles = (0,
|
|
1915
|
+
const styles = (0, import_recipes17.select)();
|
|
1920
1916
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1921
1917
|
import_select.Select.ItemGroupLabel,
|
|
1922
1918
|
{
|
|
1923
1919
|
...props,
|
|
1924
|
-
className: (0,
|
|
1920
|
+
className: (0, import_css22.cx)(styles.itemGroupLabel, props.className)
|
|
1925
1921
|
}
|
|
1926
1922
|
);
|
|
1927
1923
|
}
|
|
1928
1924
|
function SelectItem(props) {
|
|
1929
|
-
const styles = (0,
|
|
1930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Item, { ...props, className: (0,
|
|
1925
|
+
const styles = (0, import_recipes17.select)();
|
|
1926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.Item, { ...props, className: (0, import_css22.cx)(styles.item, props.className) });
|
|
1931
1927
|
}
|
|
1932
1928
|
function SelectItemText(props) {
|
|
1933
1929
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_select.Select.ItemText, { ...props });
|
|
1934
1930
|
}
|
|
1935
1931
|
function SelectItemIndicator(props) {
|
|
1936
|
-
const styles = (0,
|
|
1932
|
+
const styles = (0, import_recipes17.select)();
|
|
1937
1933
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1938
1934
|
import_select.Select.ItemIndicator,
|
|
1939
1935
|
{
|
|
1940
1936
|
...props,
|
|
1941
|
-
className: (0,
|
|
1937
|
+
className: (0, import_css22.cx)(styles.itemIndicator, props.className)
|
|
1942
1938
|
}
|
|
1943
1939
|
);
|
|
1944
1940
|
}
|
|
@@ -1953,10 +1949,10 @@ function createSelectCollection(collection) {
|
|
|
1953
1949
|
|
|
1954
1950
|
// src/components/combobox/use-stateful-collection.ts
|
|
1955
1951
|
function useStatefulCollection(initialItems = []) {
|
|
1956
|
-
const [items, setItems] = (0,
|
|
1957
|
-
const [filterValue, setFilterValue] = (0,
|
|
1958
|
-
const collection = (0,
|
|
1959
|
-
const handleInputChange = (0,
|
|
1952
|
+
const [items, setItems] = (0, import_react14.useState)(initialItems);
|
|
1953
|
+
const [filterValue, setFilterValue] = (0, import_react14.useState)([]);
|
|
1954
|
+
const collection = (0, import_react14.useMemo)(() => createSelectCollection(items), [items]);
|
|
1955
|
+
const handleInputChange = (0, import_react14.useCallback)(
|
|
1960
1956
|
(details) => {
|
|
1961
1957
|
if (details.inputValue === "") {
|
|
1962
1958
|
return setItems(initialItems);
|
|
@@ -1970,7 +1966,7 @@ function useStatefulCollection(initialItems = []) {
|
|
|
1970
1966
|
},
|
|
1971
1967
|
[initialItems]
|
|
1972
1968
|
);
|
|
1973
|
-
return (0,
|
|
1969
|
+
return (0, import_react14.useMemo)(
|
|
1974
1970
|
() => ({
|
|
1975
1971
|
collection,
|
|
1976
1972
|
filterChars: filterValue,
|
|
@@ -1981,7 +1977,7 @@ function useStatefulCollection(initialItems = []) {
|
|
|
1981
1977
|
}
|
|
1982
1978
|
|
|
1983
1979
|
// src/components/cta-dialog/provider.tsx
|
|
1984
|
-
var
|
|
1980
|
+
var import_react16 = require("react");
|
|
1985
1981
|
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
1986
1982
|
|
|
1987
1983
|
// src/components/for.tsx
|
|
@@ -1995,64 +1991,64 @@ function For(props) {
|
|
|
1995
1991
|
|
|
1996
1992
|
// src/components/dialog/primitives.tsx
|
|
1997
1993
|
var import_dialog = require("@ark-ui/react/dialog");
|
|
1998
|
-
var
|
|
1999
|
-
var
|
|
1994
|
+
var import_css23 = require("@cerberus/styled-system/css");
|
|
1995
|
+
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
2000
1996
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2001
1997
|
function DialogRoot(props) {
|
|
2002
1998
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_dialog.Dialog.Root, { ...props });
|
|
2003
1999
|
}
|
|
2004
2000
|
function DialogTrigger(props) {
|
|
2005
|
-
const styles = (0,
|
|
2001
|
+
const styles = (0, import_recipes18.dialog)();
|
|
2006
2002
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2007
2003
|
import_dialog.Dialog.Trigger,
|
|
2008
2004
|
{
|
|
2009
2005
|
...props,
|
|
2010
|
-
className: (0,
|
|
2006
|
+
className: (0, import_css23.cx)(styles.trigger, props.className)
|
|
2011
2007
|
}
|
|
2012
2008
|
);
|
|
2013
2009
|
}
|
|
2014
2010
|
function DialogBackdrop(props) {
|
|
2015
|
-
const styles = (0,
|
|
2011
|
+
const styles = (0, import_recipes18.dialog)();
|
|
2016
2012
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2017
2013
|
import_dialog.Dialog.Backdrop,
|
|
2018
2014
|
{
|
|
2019
2015
|
...props,
|
|
2020
|
-
className: (0,
|
|
2016
|
+
className: (0, import_css23.cx)(styles.backdrop, props.className)
|
|
2021
2017
|
}
|
|
2022
2018
|
);
|
|
2023
2019
|
}
|
|
2024
2020
|
function DialogPositioner(props) {
|
|
2025
|
-
const styles = (0,
|
|
2021
|
+
const styles = (0, import_recipes18.dialog)();
|
|
2026
2022
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2027
2023
|
import_dialog.Dialog.Positioner,
|
|
2028
2024
|
{
|
|
2029
2025
|
...props,
|
|
2030
|
-
className: (0,
|
|
2026
|
+
className: (0, import_css23.cx)(styles.positioner, props.className)
|
|
2031
2027
|
}
|
|
2032
2028
|
);
|
|
2033
2029
|
}
|
|
2034
2030
|
function DialogContent(props) {
|
|
2035
2031
|
const { size, ...contentProps } = props;
|
|
2036
|
-
const styles = (0,
|
|
2032
|
+
const styles = (0, import_recipes18.dialog)({ size });
|
|
2037
2033
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2038
2034
|
import_dialog.Dialog.Content,
|
|
2039
2035
|
{
|
|
2040
2036
|
...contentProps,
|
|
2041
|
-
className: (0,
|
|
2037
|
+
className: (0, import_css23.cx)(styles.content, contentProps.className)
|
|
2042
2038
|
}
|
|
2043
2039
|
);
|
|
2044
2040
|
}
|
|
2045
2041
|
function DialogHeading(props) {
|
|
2046
|
-
const styles = (0,
|
|
2047
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_dialog.Dialog.Title, { ...props, className: (0,
|
|
2042
|
+
const styles = (0, import_recipes18.dialog)();
|
|
2043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_dialog.Dialog.Title, { ...props, className: (0, import_css23.cx)(styles.title, props.className) });
|
|
2048
2044
|
}
|
|
2049
2045
|
function DialogDescription(props) {
|
|
2050
|
-
const styles = (0,
|
|
2046
|
+
const styles = (0, import_recipes18.dialog)();
|
|
2051
2047
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2052
2048
|
import_dialog.Dialog.Description,
|
|
2053
2049
|
{
|
|
2054
2050
|
...props,
|
|
2055
|
-
className: (0,
|
|
2051
|
+
className: (0, import_css23.cx)(styles.description, props.className)
|
|
2056
2052
|
}
|
|
2057
2053
|
);
|
|
2058
2054
|
}
|
|
@@ -2074,8 +2070,8 @@ var DialogParts = {
|
|
|
2074
2070
|
};
|
|
2075
2071
|
|
|
2076
2072
|
// src/components/IconButton.tsx
|
|
2077
|
-
var
|
|
2078
|
-
var
|
|
2073
|
+
var import_css24 = require("@cerberus/styled-system/css");
|
|
2074
|
+
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
2079
2075
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2080
2076
|
function IconButton(props) {
|
|
2081
2077
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
@@ -2084,9 +2080,9 @@ function IconButton(props) {
|
|
|
2084
2080
|
{
|
|
2085
2081
|
...nativeProps,
|
|
2086
2082
|
"aria-label": ariaLabel ?? "Icon Button",
|
|
2087
|
-
className: (0,
|
|
2083
|
+
className: (0, import_css24.cx)(
|
|
2088
2084
|
nativeProps.className,
|
|
2089
|
-
(0,
|
|
2085
|
+
(0, import_recipes19.iconButton)({
|
|
2090
2086
|
palette,
|
|
2091
2087
|
usage,
|
|
2092
2088
|
size
|
|
@@ -2097,18 +2093,18 @@ function IconButton(props) {
|
|
|
2097
2093
|
}
|
|
2098
2094
|
|
|
2099
2095
|
// src/components/dialog/close-icon-trigger.tsx
|
|
2100
|
-
var
|
|
2101
|
-
var
|
|
2096
|
+
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
2097
|
+
var import_css25 = require("@cerberus/styled-system/css");
|
|
2102
2098
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2103
2099
|
function DialogCloseIconTrigger(props) {
|
|
2104
|
-
const styles = (0,
|
|
2100
|
+
const styles = (0, import_recipes20.dialog)();
|
|
2105
2101
|
const { icons } = useCerberusContext();
|
|
2106
2102
|
const { close: CloseIcon } = icons;
|
|
2107
2103
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2108
2104
|
DialogCloseTrigger,
|
|
2109
2105
|
{
|
|
2110
2106
|
...props,
|
|
2111
|
-
className: (0,
|
|
2107
|
+
className: (0, import_css25.cx)(styles.closeTrigger, props.className),
|
|
2112
2108
|
asChild: true,
|
|
2113
2109
|
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2114
2110
|
IconButton,
|
|
@@ -2134,13 +2130,13 @@ function Dialog2(props) {
|
|
|
2134
2130
|
}
|
|
2135
2131
|
|
|
2136
2132
|
// src/components/cta-dialog/context.tsx
|
|
2137
|
-
var
|
|
2138
|
-
var CTAModalContext = (0,
|
|
2133
|
+
var import_react15 = require("react");
|
|
2134
|
+
var CTAModalContext = (0, import_react15.createContext)(null);
|
|
2139
2135
|
|
|
2140
2136
|
// src/components/cta-dialog/trigger-item.tsx
|
|
2141
|
-
var
|
|
2137
|
+
var import_css26 = require("@cerberus/styled-system/css");
|
|
2142
2138
|
var import_factory2 = require("@ark-ui/react/factory");
|
|
2143
|
-
var
|
|
2139
|
+
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
2144
2140
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2145
2141
|
function TriggerItem(props) {
|
|
2146
2142
|
const { asChild, children, ...buttonProps } = props;
|
|
@@ -2148,12 +2144,12 @@ function TriggerItem(props) {
|
|
|
2148
2144
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2149
2145
|
import_factory2.ark.div,
|
|
2150
2146
|
{
|
|
2151
|
-
className: (0,
|
|
2152
|
-
(0,
|
|
2147
|
+
className: (0, import_css26.cx)(
|
|
2148
|
+
(0, import_recipes21.button)({
|
|
2153
2149
|
shape: "rounded",
|
|
2154
2150
|
usage: "ghost"
|
|
2155
2151
|
}),
|
|
2156
|
-
(0,
|
|
2152
|
+
(0, import_css26.css)({
|
|
2157
2153
|
w: "1/2"
|
|
2158
2154
|
})
|
|
2159
2155
|
),
|
|
@@ -2166,7 +2162,7 @@ function TriggerItem(props) {
|
|
|
2166
2162
|
Button,
|
|
2167
2163
|
{
|
|
2168
2164
|
...buttonProps,
|
|
2169
|
-
className: (0,
|
|
2165
|
+
className: (0, import_css26.css)({
|
|
2170
2166
|
w: "1/2"
|
|
2171
2167
|
}),
|
|
2172
2168
|
shape: "rounded",
|
|
@@ -2179,19 +2175,19 @@ function TriggerItem(props) {
|
|
|
2179
2175
|
// src/components/cta-dialog/provider.tsx
|
|
2180
2176
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2181
2177
|
function CTAModal(props) {
|
|
2182
|
-
const [open, setOpen] = (0,
|
|
2183
|
-
const [content, setContent] = (0,
|
|
2178
|
+
const [open, setOpen] = (0, import_react16.useState)(false);
|
|
2179
|
+
const [content, setContent] = (0, import_react16.useState)(null);
|
|
2184
2180
|
const confirmIcon = content == null ? void 0 : content.icon;
|
|
2185
2181
|
const { icons } = useCerberusContext();
|
|
2186
2182
|
const { confirmModal: FallbackIcon } = icons;
|
|
2187
|
-
const handleShow = (0,
|
|
2183
|
+
const handleShow = (0, import_react16.useCallback)(
|
|
2188
2184
|
(options) => {
|
|
2189
2185
|
setContent({ ...options });
|
|
2190
2186
|
setOpen(true);
|
|
2191
2187
|
},
|
|
2192
2188
|
[setOpen]
|
|
2193
2189
|
);
|
|
2194
|
-
const handleActionClick = (0,
|
|
2190
|
+
const handleActionClick = (0, import_react16.useCallback)(
|
|
2195
2191
|
(event) => {
|
|
2196
2192
|
var _a;
|
|
2197
2193
|
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
@@ -2202,7 +2198,7 @@ function CTAModal(props) {
|
|
|
2202
2198
|
},
|
|
2203
2199
|
[content, setOpen]
|
|
2204
2200
|
);
|
|
2205
|
-
const value = (0,
|
|
2201
|
+
const value = (0, import_react16.useMemo)(
|
|
2206
2202
|
() => ({
|
|
2207
2203
|
show: handleShow
|
|
2208
2204
|
}),
|
|
@@ -2250,7 +2246,7 @@ function CTAModal(props) {
|
|
|
2250
2246
|
] });
|
|
2251
2247
|
}
|
|
2252
2248
|
function useCTAModal() {
|
|
2253
|
-
const context = (0,
|
|
2249
|
+
const context = (0, import_react16.useContext)(CTAModalContext);
|
|
2254
2250
|
if (context === null) {
|
|
2255
2251
|
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
2256
2252
|
}
|
|
@@ -2277,25 +2273,25 @@ function createCTAModalActions(providedActions) {
|
|
|
2277
2273
|
}
|
|
2278
2274
|
|
|
2279
2275
|
// src/components/DatePicker.client.tsx
|
|
2280
|
-
var
|
|
2281
|
-
var
|
|
2282
|
-
var
|
|
2276
|
+
var import_react18 = require("@ark-ui/react");
|
|
2277
|
+
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
2278
|
+
var import_css28 = require("@cerberus/styled-system/css");
|
|
2283
2279
|
|
|
2284
2280
|
// src/components/DatePicker.server.tsx
|
|
2285
|
-
var
|
|
2286
|
-
var
|
|
2287
|
-
var
|
|
2281
|
+
var import_react17 = require("@ark-ui/react");
|
|
2282
|
+
var import_css27 = require("@cerberus/styled-system/css");
|
|
2283
|
+
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
2288
2284
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2289
|
-
var datePickerStyles = (0,
|
|
2285
|
+
var datePickerStyles = (0, import_recipes22.datePicker)();
|
|
2290
2286
|
function DatePickerLabel(props) {
|
|
2291
2287
|
const { className, ...arkProps } = props;
|
|
2292
2288
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2293
|
-
|
|
2289
|
+
import_react17.DatePicker.Label,
|
|
2294
2290
|
{
|
|
2295
2291
|
...arkProps,
|
|
2296
|
-
className: (0,
|
|
2292
|
+
className: (0, import_css27.cx)(
|
|
2297
2293
|
className,
|
|
2298
|
-
(0,
|
|
2294
|
+
(0, import_recipes22.label)({
|
|
2299
2295
|
size: "sm"
|
|
2300
2296
|
})
|
|
2301
2297
|
)
|
|
@@ -2304,59 +2300,59 @@ function DatePickerLabel(props) {
|
|
|
2304
2300
|
}
|
|
2305
2301
|
function DatePickerViewControl(props) {
|
|
2306
2302
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2307
|
-
|
|
2303
|
+
import_react17.DatePicker.Control,
|
|
2308
2304
|
{
|
|
2309
2305
|
...props,
|
|
2310
|
-
className: (0,
|
|
2306
|
+
className: (0, import_css27.cx)(props.className, datePickerStyles.viewControl)
|
|
2311
2307
|
}
|
|
2312
2308
|
);
|
|
2313
2309
|
}
|
|
2314
2310
|
function DatePickerTable(props) {
|
|
2315
2311
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2316
|
-
|
|
2312
|
+
import_react17.DatePicker.Table,
|
|
2317
2313
|
{
|
|
2318
2314
|
...props,
|
|
2319
|
-
className: (0,
|
|
2315
|
+
className: (0, import_css27.cx)(props.className, datePickerStyles.table)
|
|
2320
2316
|
}
|
|
2321
2317
|
);
|
|
2322
2318
|
}
|
|
2323
2319
|
function DatePickerTableHeader(props) {
|
|
2324
2320
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2325
|
-
|
|
2321
|
+
import_react17.DatePicker.TableHeader,
|
|
2326
2322
|
{
|
|
2327
2323
|
...props,
|
|
2328
|
-
className: (0,
|
|
2324
|
+
className: (0, import_css27.cx)(props.className, datePickerStyles.tableHeader)
|
|
2329
2325
|
}
|
|
2330
2326
|
);
|
|
2331
2327
|
}
|
|
2332
2328
|
function DatePickerTableCell(props) {
|
|
2333
2329
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2334
|
-
|
|
2330
|
+
import_react17.DatePicker.TableCell,
|
|
2335
2331
|
{
|
|
2336
2332
|
...props,
|
|
2337
|
-
className: (0,
|
|
2333
|
+
className: (0, import_css27.cx)(props.className, datePickerStyles.tableCell)
|
|
2338
2334
|
}
|
|
2339
2335
|
);
|
|
2340
2336
|
}
|
|
2341
2337
|
function DatePickerTableCellTrigger(props) {
|
|
2342
2338
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2343
|
-
|
|
2339
|
+
import_react17.DatePicker.TableCellTrigger,
|
|
2344
2340
|
{
|
|
2345
2341
|
...props,
|
|
2346
|
-
className: (0,
|
|
2342
|
+
className: (0, import_css27.cx)(props.className, datePickerStyles.tableCellTrigger)
|
|
2347
2343
|
}
|
|
2348
2344
|
);
|
|
2349
2345
|
}
|
|
2350
|
-
var DatePickerView =
|
|
2351
|
-
var DatePickerContext =
|
|
2346
|
+
var DatePickerView = import_react17.DatePicker.View;
|
|
2347
|
+
var DatePickerContext = import_react17.DatePicker.Context;
|
|
2352
2348
|
|
|
2353
2349
|
// src/components/DatePicker.client.tsx
|
|
2354
|
-
var
|
|
2350
|
+
var import_react19 = require("react");
|
|
2355
2351
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2356
|
-
var datePickerStyles2 = (0,
|
|
2352
|
+
var datePickerStyles2 = (0, import_recipes23.datePicker)();
|
|
2357
2353
|
function DatePicker(props) {
|
|
2358
2354
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2359
|
-
|
|
2355
|
+
import_react18.DatePicker.Root,
|
|
2360
2356
|
{
|
|
2361
2357
|
...props,
|
|
2362
2358
|
positioning: {
|
|
@@ -2369,33 +2365,33 @@ function DatePickerViewControlGroup(props) {
|
|
|
2369
2365
|
const { icons } = useCerberusContext();
|
|
2370
2366
|
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
|
|
2371
2367
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DatePickerViewControl, { ...props, children: [
|
|
2372
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2373
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PrevIcon, {}) }) }),
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2374
2370
|
Button,
|
|
2375
2371
|
{
|
|
2376
|
-
className: (0,
|
|
2372
|
+
className: (0, import_css28.css)({
|
|
2377
2373
|
h: "2rem",
|
|
2378
2374
|
paddingInline: "md"
|
|
2379
2375
|
}),
|
|
2380
2376
|
shape: "rounded",
|
|
2381
2377
|
size: "sm",
|
|
2382
2378
|
usage: "ghost",
|
|
2383
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.RangeText, {})
|
|
2384
2380
|
}
|
|
2385
2381
|
) }),
|
|
2386
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NextIcon, {}) }) })
|
|
2387
2383
|
] });
|
|
2388
2384
|
}
|
|
2389
2385
|
function DatePickerTrigger(props) {
|
|
2390
2386
|
const { icons } = useCerberusContext();
|
|
2391
2387
|
const { calendar: CalendarIcon } = icons;
|
|
2392
2388
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2393
|
-
|
|
2389
|
+
import_react18.DatePicker.Trigger,
|
|
2394
2390
|
{
|
|
2395
2391
|
...props,
|
|
2396
|
-
className: (0,
|
|
2392
|
+
className: (0, import_css28.cx)(
|
|
2397
2393
|
props.className,
|
|
2398
|
-
(0,
|
|
2394
|
+
(0, import_recipes23.iconButton)({
|
|
2399
2395
|
size: "sm",
|
|
2400
2396
|
usage: "ghost"
|
|
2401
2397
|
}),
|
|
@@ -2406,13 +2402,13 @@ function DatePickerTrigger(props) {
|
|
|
2406
2402
|
);
|
|
2407
2403
|
}
|
|
2408
2404
|
function DatePickerInput(props) {
|
|
2409
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react18.DatePicker.Control, { className: datePickerStyles2.control, children: [
|
|
2410
2406
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTrigger, {}),
|
|
2411
2407
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2412
|
-
|
|
2408
|
+
import_react18.DatePicker.Input,
|
|
2413
2409
|
{
|
|
2414
2410
|
...props,
|
|
2415
|
-
className: (0,
|
|
2411
|
+
className: (0, import_css28.cx)(props.className, datePickerStyles2.input),
|
|
2416
2412
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
2417
2413
|
maxLength: 11
|
|
2418
2414
|
}
|
|
@@ -2421,30 +2417,30 @@ function DatePickerInput(props) {
|
|
|
2421
2417
|
}
|
|
2422
2418
|
function RangePickerInput(props) {
|
|
2423
2419
|
const { defaultValue, ...nativeProps } = props;
|
|
2424
|
-
const startDate = (0,
|
|
2425
|
-
const endDate = (0,
|
|
2426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
2420
|
+
const startDate = (0, import_react19.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
|
|
2421
|
+
const endDate = (0, import_react19.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
|
|
2422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react18.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
2427
2423
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTrigger, {}),
|
|
2428
2424
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2429
|
-
|
|
2425
|
+
import_react18.DatePicker.Input,
|
|
2430
2426
|
{
|
|
2431
2427
|
...nativeProps,
|
|
2432
2428
|
"data-range-input": true,
|
|
2433
2429
|
defaultValue: startDate,
|
|
2434
|
-
className: (0,
|
|
2430
|
+
className: (0, import_css28.cx)(props.className, datePickerStyles2.input),
|
|
2435
2431
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
2436
2432
|
maxLength: 11,
|
|
2437
2433
|
index: 0
|
|
2438
2434
|
}
|
|
2439
2435
|
),
|
|
2440
2436
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2441
|
-
|
|
2437
|
+
import_react18.DatePicker.Input,
|
|
2442
2438
|
{
|
|
2443
2439
|
...nativeProps,
|
|
2444
2440
|
"data-range-input": true,
|
|
2445
2441
|
defaultValue: endDate,
|
|
2446
2442
|
"data-range-end-input": true,
|
|
2447
|
-
className: (0,
|
|
2443
|
+
className: (0, import_css28.cx)(props.className, datePickerStyles2.input),
|
|
2448
2444
|
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
2449
2445
|
maxLength: 11,
|
|
2450
2446
|
index: 1
|
|
@@ -2454,11 +2450,11 @@ function RangePickerInput(props) {
|
|
|
2454
2450
|
}
|
|
2455
2451
|
function DatePickerContent(props) {
|
|
2456
2452
|
const { children, withModal, ...contentProps } = props;
|
|
2457
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2458
|
-
|
|
2453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2454
|
+
import_react18.DatePicker.Content,
|
|
2459
2455
|
{
|
|
2460
2456
|
...contentProps,
|
|
2461
|
-
className: (0,
|
|
2457
|
+
className: (0, import_css28.cx)(contentProps.className, datePickerStyles2.content),
|
|
2462
2458
|
children
|
|
2463
2459
|
}
|
|
2464
2460
|
) }) });
|
|
@@ -2483,8 +2479,8 @@ function DatePickerDayView(props) {
|
|
|
2483
2479
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2484
2480
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerViewControlGroup, {}),
|
|
2485
2481
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DatePickerTable, { children: [
|
|
2486
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2487
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2482
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2488
2484
|
DatePickerTableCellTrigger,
|
|
2489
2485
|
{
|
|
2490
2486
|
"data-date": getDayValue(day),
|
|
@@ -2495,15 +2491,15 @@ function DatePickerDayView(props) {
|
|
|
2495
2491
|
] }) }) });
|
|
2496
2492
|
}
|
|
2497
2493
|
function DatePickerMonthView(props) {
|
|
2498
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2499
2495
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerViewControlGroup, {}),
|
|
2500
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2496
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
2501
2497
|
] }) }) });
|
|
2502
2498
|
}
|
|
2503
2499
|
function DatePickerYearView(props) {
|
|
2504
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
2505
2501
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerViewControlGroup, {}),
|
|
2506
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2502
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react18.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
2507
2503
|
] }) }) });
|
|
2508
2504
|
}
|
|
2509
2505
|
function DatePickerCalendar(props) {
|
|
@@ -2516,11 +2512,11 @@ function DatePickerCalendar(props) {
|
|
|
2516
2512
|
|
|
2517
2513
|
// src/components/Droppable.tsx
|
|
2518
2514
|
var import_core = require("@dnd-kit/core");
|
|
2519
|
-
var
|
|
2515
|
+
var import_react20 = require("react");
|
|
2520
2516
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2521
2517
|
function Droppable(props) {
|
|
2522
2518
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
2523
|
-
const uuid = (0,
|
|
2519
|
+
const uuid = (0, import_react20.useId)();
|
|
2524
2520
|
const { isOver, setNodeRef } = (0, import_core.useDroppable)({
|
|
2525
2521
|
data,
|
|
2526
2522
|
disabled,
|
|
@@ -2540,14 +2536,14 @@ function Droppable(props) {
|
|
|
2540
2536
|
}
|
|
2541
2537
|
|
|
2542
2538
|
// src/context/feature-flags.tsx
|
|
2543
|
-
var
|
|
2539
|
+
var import_react21 = require("react");
|
|
2544
2540
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2545
|
-
var FeatureFlagContext = (0,
|
|
2541
|
+
var FeatureFlagContext = (0, import_react21.createContext)(null);
|
|
2546
2542
|
function FeatureFlags(props) {
|
|
2547
2543
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
2548
2544
|
}
|
|
2549
2545
|
function useFeatureFlags(key) {
|
|
2550
|
-
const context = (0,
|
|
2546
|
+
const context = (0, import_react21.useContext)(FeatureFlagContext);
|
|
2551
2547
|
if (context === null) {
|
|
2552
2548
|
throw new Error(
|
|
2553
2549
|
"useFeatureFlag must be used within a FeatureFlags Provider"
|
|
@@ -2565,42 +2561,42 @@ function FeatureFlag(props) {
|
|
|
2565
2561
|
|
|
2566
2562
|
// src/components/fieldset/primitives.tsx
|
|
2567
2563
|
var import_fieldset = require("@ark-ui/react/fieldset");
|
|
2568
|
-
var
|
|
2569
|
-
var
|
|
2564
|
+
var import_css29 = require("@cerberus/styled-system/css");
|
|
2565
|
+
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
2570
2566
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2571
2567
|
function FieldsetRoot(props) {
|
|
2572
|
-
const styles = (0,
|
|
2573
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0,
|
|
2568
|
+
const styles = (0, import_recipes24.fieldset)();
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0, import_css29.cx)(styles.root, props.className) });
|
|
2574
2570
|
}
|
|
2575
2571
|
function FieldsetLegend(props) {
|
|
2576
2572
|
const { usage, ...legendProps } = props;
|
|
2577
|
-
const styles = (0,
|
|
2573
|
+
const styles = (0, import_recipes24.fieldset)({ usage });
|
|
2578
2574
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2579
2575
|
import_fieldset.Fieldset.Legend,
|
|
2580
2576
|
{
|
|
2581
2577
|
...legendProps,
|
|
2582
|
-
className: (0,
|
|
2578
|
+
className: (0, import_css29.cx)(styles.legend, legendProps.className)
|
|
2583
2579
|
}
|
|
2584
2580
|
);
|
|
2585
2581
|
}
|
|
2586
2582
|
function FieldsetHelperText(props) {
|
|
2587
2583
|
const { usage, ...helperTextProps } = props;
|
|
2588
|
-
const styles = (0,
|
|
2584
|
+
const styles = (0, import_recipes24.fieldset)({ usage });
|
|
2589
2585
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2590
2586
|
import_fieldset.Fieldset.HelperText,
|
|
2591
2587
|
{
|
|
2592
2588
|
...helperTextProps,
|
|
2593
|
-
className: (0,
|
|
2589
|
+
className: (0, import_css29.cx)(styles.helperText, helperTextProps.className)
|
|
2594
2590
|
}
|
|
2595
2591
|
);
|
|
2596
2592
|
}
|
|
2597
2593
|
function FieldsetErrorText(props) {
|
|
2598
|
-
const styles = (0,
|
|
2594
|
+
const styles = (0, import_recipes24.fieldset)();
|
|
2599
2595
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
2600
2596
|
import_fieldset.Fieldset.ErrorText,
|
|
2601
2597
|
{
|
|
2602
2598
|
...props,
|
|
2603
|
-
className: (0,
|
|
2599
|
+
className: (0, import_css29.cx)(styles.errorText, props.className)
|
|
2604
2600
|
}
|
|
2605
2601
|
);
|
|
2606
2602
|
}
|
|
@@ -2630,18 +2626,18 @@ function Fieldset2(props) {
|
|
|
2630
2626
|
}
|
|
2631
2627
|
|
|
2632
2628
|
// src/components/FileStatus.tsx
|
|
2633
|
-
var
|
|
2634
|
-
var
|
|
2635
|
-
var
|
|
2629
|
+
var import_react22 = require("react");
|
|
2630
|
+
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2631
|
+
var import_css31 = require("@cerberus/styled-system/css");
|
|
2636
2632
|
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
2637
2633
|
|
|
2638
2634
|
// src/components/ProgressBar.tsx
|
|
2639
|
-
var
|
|
2640
|
-
var
|
|
2635
|
+
var import_css30 = require("@cerberus/styled-system/css");
|
|
2636
|
+
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2641
2637
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2642
2638
|
function ProgressBar(props) {
|
|
2643
2639
|
const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
|
|
2644
|
-
const styles = (0,
|
|
2640
|
+
const styles = (0, import_recipes25.progressBar)({ size, usage });
|
|
2645
2641
|
const nowClamped = Math.min(100, Math.max(0, now || 0));
|
|
2646
2642
|
const width = {
|
|
2647
2643
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
@@ -2654,7 +2650,7 @@ function ProgressBar(props) {
|
|
|
2654
2650
|
"aria-valuemin": 0,
|
|
2655
2651
|
"aria-valuemax": 100,
|
|
2656
2652
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
2657
|
-
className: (0,
|
|
2653
|
+
className: (0, import_css30.cx)(nativeProps.className, styles.root),
|
|
2658
2654
|
role: "progressbar",
|
|
2659
2655
|
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2660
2656
|
"div",
|
|
@@ -2680,24 +2676,24 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
|
2680
2676
|
})(processStatus || {});
|
|
2681
2677
|
function FileStatus(props) {
|
|
2682
2678
|
const { file, now, status, onClick, ...nativeProps } = props;
|
|
2683
|
-
const actionLabel = (0,
|
|
2684
|
-
const palette = (0,
|
|
2685
|
-
const modalIconPalette = (0,
|
|
2686
|
-
const styles = (0,
|
|
2679
|
+
const actionLabel = (0, import_react22.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
2680
|
+
const palette = (0, import_react22.useMemo)(() => getPalette(status), [status]);
|
|
2681
|
+
const modalIconPalette = (0, import_react22.useMemo)(() => getModalIconPalette(status), [status]);
|
|
2682
|
+
const styles = (0, import_react22.useMemo)(() => {
|
|
2687
2683
|
switch (status) {
|
|
2688
2684
|
case "todo" /* TODO */:
|
|
2689
|
-
return (0,
|
|
2685
|
+
return (0, import_recipes26.fileStatus)({ status: "todo" });
|
|
2690
2686
|
case "processing" /* PROCESSING */:
|
|
2691
|
-
return (0,
|
|
2687
|
+
return (0, import_recipes26.fileStatus)({ status: "processing" });
|
|
2692
2688
|
case "done" /* DONE */:
|
|
2693
|
-
return (0,
|
|
2689
|
+
return (0, import_recipes26.fileStatus)({ status: "done" });
|
|
2694
2690
|
case "error" /* ERROR */:
|
|
2695
|
-
return (0,
|
|
2691
|
+
return (0, import_recipes26.fileStatus)({ status: "error" });
|
|
2696
2692
|
default:
|
|
2697
|
-
return (0,
|
|
2693
|
+
return (0, import_recipes26.fileStatus)();
|
|
2698
2694
|
}
|
|
2699
2695
|
}, [status]);
|
|
2700
|
-
const handleClick = (0,
|
|
2696
|
+
const handleClick = (0, import_react22.useCallback)(
|
|
2701
2697
|
(e) => {
|
|
2702
2698
|
const actionStatus = getStatusActionLabel(
|
|
2703
2699
|
status
|
|
@@ -2710,7 +2706,7 @@ function FileStatus(props) {
|
|
|
2710
2706
|
"div",
|
|
2711
2707
|
{
|
|
2712
2708
|
...nativeProps,
|
|
2713
|
-
className: (0,
|
|
2709
|
+
className: (0, import_css31.cx)(nativeProps.className, styles.root, (0, import_patterns6.hstack)()),
|
|
2714
2710
|
children: [
|
|
2715
2711
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2716
2712
|
Avatar,
|
|
@@ -2733,7 +2729,7 @@ function FileStatus(props) {
|
|
|
2733
2729
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2734
2730
|
"small",
|
|
2735
2731
|
{
|
|
2736
|
-
className: (0,
|
|
2732
|
+
className: (0, import_css31.css)({
|
|
2737
2733
|
color: "page.text.initial",
|
|
2738
2734
|
textStyle: "label-sm"
|
|
2739
2735
|
}),
|
|
@@ -2752,7 +2748,7 @@ function FileStatus(props) {
|
|
|
2752
2748
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Field2, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2753
2749
|
FieldHelperText,
|
|
2754
2750
|
{
|
|
2755
|
-
className: (0,
|
|
2751
|
+
className: (0, import_css31.css)({
|
|
2756
2752
|
color: "page.text.100"
|
|
2757
2753
|
}),
|
|
2758
2754
|
id: `help:${file}`,
|
|
@@ -2867,20 +2863,20 @@ function getModalIconPalette(status) {
|
|
|
2867
2863
|
}
|
|
2868
2864
|
|
|
2869
2865
|
// src/components/FileUploader.tsx
|
|
2870
|
-
var
|
|
2866
|
+
var import_css32 = require("@cerberus/styled-system/css");
|
|
2871
2867
|
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
2872
|
-
var
|
|
2868
|
+
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2873
2869
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2874
2870
|
function FileUploader(props) {
|
|
2875
2871
|
var _a;
|
|
2876
2872
|
const { icons } = useCerberusContext();
|
|
2877
|
-
const styles = (0,
|
|
2873
|
+
const styles = (0, import_recipes27.fileUploader)();
|
|
2878
2874
|
const { waitingFileUploader: Icon } = icons;
|
|
2879
2875
|
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2880
2876
|
"div",
|
|
2881
2877
|
{
|
|
2882
2878
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
2883
|
-
className: (0,
|
|
2879
|
+
className: (0, import_css32.cx)(
|
|
2884
2880
|
(0, import_patterns7.vstack)({
|
|
2885
2881
|
justify: "center"
|
|
2886
2882
|
}),
|
|
@@ -2900,7 +2896,7 @@ function FileUploader(props) {
|
|
|
2900
2896
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2901
2897
|
"label",
|
|
2902
2898
|
{
|
|
2903
|
-
className: (0,
|
|
2899
|
+
className: (0, import_css32.cx)(
|
|
2904
2900
|
(0, import_patterns7.vstack)({
|
|
2905
2901
|
justify: "center"
|
|
2906
2902
|
}),
|
|
@@ -2917,7 +2913,7 @@ function FileUploader(props) {
|
|
|
2917
2913
|
"input",
|
|
2918
2914
|
{
|
|
2919
2915
|
...props,
|
|
2920
|
-
className: (0,
|
|
2916
|
+
className: (0, import_css32.cx)(props.className, styles.input),
|
|
2921
2917
|
type: "file"
|
|
2922
2918
|
}
|
|
2923
2919
|
)
|
|
@@ -2930,8 +2926,8 @@ function FileUploader(props) {
|
|
|
2930
2926
|
}
|
|
2931
2927
|
|
|
2932
2928
|
// src/components/Legend.tsx
|
|
2933
|
-
var
|
|
2934
|
-
var
|
|
2929
|
+
var import_css33 = require("@cerberus/styled-system/css");
|
|
2930
|
+
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2935
2931
|
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
2936
2932
|
var import_field5 = require("@ark-ui/react/field");
|
|
2937
2933
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
@@ -2943,13 +2939,13 @@ function Legend(props) {
|
|
|
2943
2939
|
{
|
|
2944
2940
|
...nativeProps,
|
|
2945
2941
|
...invalid && { "aria-invalid": true },
|
|
2946
|
-
className: (0,
|
|
2942
|
+
className: (0, import_css33.cx)(
|
|
2947
2943
|
nativeProps.className,
|
|
2948
2944
|
(0, import_patterns8.hstack)({
|
|
2949
2945
|
justify: "space-between",
|
|
2950
2946
|
w: "full"
|
|
2951
2947
|
}),
|
|
2952
|
-
(0,
|
|
2948
|
+
(0, import_recipes28.label)({
|
|
2953
2949
|
size
|
|
2954
2950
|
})
|
|
2955
2951
|
),
|
|
@@ -2958,7 +2954,7 @@ function Legend(props) {
|
|
|
2958
2954
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2959
2955
|
"span",
|
|
2960
2956
|
{
|
|
2961
|
-
className: (0,
|
|
2957
|
+
className: (0, import_css33.css)({
|
|
2962
2958
|
color: "page.text.100",
|
|
2963
2959
|
fontSize: "inherit"
|
|
2964
2960
|
}),
|
|
@@ -2971,52 +2967,52 @@ function Legend(props) {
|
|
|
2971
2967
|
}
|
|
2972
2968
|
|
|
2973
2969
|
// src/components/Menu.tsx
|
|
2974
|
-
var
|
|
2975
|
-
var
|
|
2976
|
-
var
|
|
2970
|
+
var import_react23 = require("@ark-ui/react");
|
|
2971
|
+
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2972
|
+
var import_css34 = require("@cerberus/styled-system/css");
|
|
2977
2973
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2978
|
-
var menuStyles = (0,
|
|
2979
|
-
var Menu =
|
|
2974
|
+
var menuStyles = (0, import_recipes29.menu)();
|
|
2975
|
+
var Menu = import_react23.Menu.Root;
|
|
2980
2976
|
function MenuTrigger(props) {
|
|
2981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react23.Menu.Trigger, { ...props, asChild: true });
|
|
2982
2978
|
}
|
|
2983
2979
|
function MenuContent(props) {
|
|
2984
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2985
|
-
|
|
2980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react23.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2981
|
+
import_react23.Menu.Content,
|
|
2986
2982
|
{
|
|
2987
2983
|
...props,
|
|
2988
|
-
className: (0,
|
|
2984
|
+
className: (0, import_css34.cx)(props.className, menuStyles.content)
|
|
2989
2985
|
}
|
|
2990
2986
|
) });
|
|
2991
2987
|
}
|
|
2992
2988
|
function MenuItem(props) {
|
|
2993
|
-
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react23.Menu.Item, { ...props, className: (0, import_css34.cx)(props.className, menuStyles.item) });
|
|
2994
2990
|
}
|
|
2995
|
-
var MenuItemGroup =
|
|
2991
|
+
var MenuItemGroup = import_react23.Menu.ItemGroup;
|
|
2996
2992
|
function MenuGroupLabel(props) {
|
|
2997
2993
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2998
|
-
|
|
2994
|
+
import_react23.Menu.ItemGroupLabel,
|
|
2999
2995
|
{
|
|
3000
2996
|
...props,
|
|
3001
|
-
className: (0,
|
|
2997
|
+
className: (0, import_css34.cx)(props.className, menuStyles.itemGroupLabel)
|
|
3002
2998
|
}
|
|
3003
2999
|
);
|
|
3004
3000
|
}
|
|
3005
3001
|
function MenuSeparator(props) {
|
|
3006
3002
|
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3007
|
-
|
|
3003
|
+
import_react23.Menu.Separator,
|
|
3008
3004
|
{
|
|
3009
3005
|
...props,
|
|
3010
|
-
className: (0,
|
|
3006
|
+
className: (0, import_css34.cx)(props.className, menuStyles.separator)
|
|
3011
3007
|
}
|
|
3012
3008
|
);
|
|
3013
3009
|
}
|
|
3014
3010
|
|
|
3015
3011
|
// src/components/Notification.tsx
|
|
3016
|
-
var
|
|
3012
|
+
var import_css35 = require("@cerberus/styled-system/css");
|
|
3017
3013
|
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
3018
|
-
var
|
|
3019
|
-
var
|
|
3014
|
+
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
3015
|
+
var import_react24 = require("react");
|
|
3020
3016
|
|
|
3021
3017
|
// src/aria-helpers/trap-focus.aria.ts
|
|
3022
3018
|
function trapFocus(modalRef) {
|
|
@@ -3055,9 +3051,9 @@ function MatchNotificationIcon(props) {
|
|
|
3055
3051
|
}
|
|
3056
3052
|
function Notification(props) {
|
|
3057
3053
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
3058
|
-
const ref = (0,
|
|
3054
|
+
const ref = (0, import_react24.useRef)(null);
|
|
3059
3055
|
const onKeyDown = trapFocus(ref);
|
|
3060
|
-
const styles = (0,
|
|
3056
|
+
const styles = (0, import_recipes30.notification)({ palette });
|
|
3061
3057
|
const { icons } = useCerberusContext();
|
|
3062
3058
|
const { close: CloseIcon } = icons;
|
|
3063
3059
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
@@ -3065,7 +3061,7 @@ function Notification(props) {
|
|
|
3065
3061
|
{
|
|
3066
3062
|
...nativeProps,
|
|
3067
3063
|
"data-placement": "left",
|
|
3068
|
-
className: (0,
|
|
3064
|
+
className: (0, import_css35.cx)(
|
|
3069
3065
|
nativeProps.className,
|
|
3070
3066
|
(0, import_patterns9.hstack)({
|
|
3071
3067
|
position: "relative",
|
|
@@ -3104,26 +3100,26 @@ function Notification(props) {
|
|
|
3104
3100
|
}
|
|
3105
3101
|
|
|
3106
3102
|
// src/components/NotificationHeading.tsx
|
|
3107
|
-
var
|
|
3108
|
-
var
|
|
3103
|
+
var import_css36 = require("@cerberus/styled-system/css");
|
|
3104
|
+
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
3109
3105
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3110
3106
|
function NotificationHeading(props) {
|
|
3111
3107
|
const { palette, ...nativeProps } = props;
|
|
3112
|
-
const styles = (0,
|
|
3113
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: (0,
|
|
3108
|
+
const styles = (0, import_recipes31.notification)({ palette });
|
|
3109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: (0, import_css36.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
3114
3110
|
}
|
|
3115
3111
|
|
|
3116
3112
|
// src/components/NotificationDescription.tsx
|
|
3117
|
-
var
|
|
3118
|
-
var
|
|
3113
|
+
var import_css37 = require("@cerberus/styled-system/css");
|
|
3114
|
+
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
3119
3115
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3120
3116
|
function NotificationDescription(props) {
|
|
3121
3117
|
const { palette, ...nativeProps } = props;
|
|
3122
|
-
const styles = (0,
|
|
3118
|
+
const styles = (0, import_recipes32.notification)({ palette });
|
|
3123
3119
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3124
3120
|
"p",
|
|
3125
3121
|
{
|
|
3126
|
-
className: (0,
|
|
3122
|
+
className: (0, import_css37.cx)(nativeProps.className, styles.description),
|
|
3127
3123
|
...nativeProps
|
|
3128
3124
|
}
|
|
3129
3125
|
);
|
|
@@ -3131,69 +3127,69 @@ function NotificationDescription(props) {
|
|
|
3131
3127
|
|
|
3132
3128
|
// src/components/radio/primitives.tsx
|
|
3133
3129
|
var import_radio_group = require("@ark-ui/react/radio-group");
|
|
3134
|
-
var
|
|
3135
|
-
var
|
|
3130
|
+
var import_css38 = require("@cerberus/styled-system/css");
|
|
3131
|
+
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
3136
3132
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3137
3133
|
function RadioGroupRoot(props) {
|
|
3138
3134
|
const { size, orientation, ...rootProps } = props;
|
|
3139
|
-
const styles = (0,
|
|
3135
|
+
const styles = (0, import_recipes33.radioGroup)({ size, orientation });
|
|
3140
3136
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3141
3137
|
import_radio_group.RadioGroup.Root,
|
|
3142
3138
|
{
|
|
3143
3139
|
...rootProps,
|
|
3144
|
-
className: (0,
|
|
3140
|
+
className: (0, import_css38.cx)(styles.root, rootProps.className)
|
|
3145
3141
|
}
|
|
3146
3142
|
);
|
|
3147
3143
|
}
|
|
3148
3144
|
function RadioGroupLabel(props) {
|
|
3149
|
-
const styles = (0,
|
|
3145
|
+
const styles = (0, import_recipes33.radioGroup)();
|
|
3150
3146
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3151
3147
|
import_radio_group.RadioGroup.Label,
|
|
3152
3148
|
{
|
|
3153
3149
|
...props,
|
|
3154
|
-
className: (0,
|
|
3150
|
+
className: (0, import_css38.cx)(styles.label, props.className)
|
|
3155
3151
|
}
|
|
3156
3152
|
);
|
|
3157
3153
|
}
|
|
3158
3154
|
function RadioGroupIndicator(props) {
|
|
3159
|
-
const styles = (0,
|
|
3155
|
+
const styles = (0, import_recipes33.radioGroup)();
|
|
3160
3156
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3161
3157
|
import_radio_group.RadioGroup.Indicator,
|
|
3162
3158
|
{
|
|
3163
3159
|
...props,
|
|
3164
|
-
className: (0,
|
|
3160
|
+
className: (0, import_css38.cx)(styles.indicator, props.className)
|
|
3165
3161
|
}
|
|
3166
3162
|
);
|
|
3167
3163
|
}
|
|
3168
3164
|
function RadioGroupItem(props) {
|
|
3169
|
-
const styles = (0,
|
|
3165
|
+
const styles = (0, import_recipes33.radioGroup)();
|
|
3170
3166
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3171
3167
|
import_radio_group.RadioGroup.Item,
|
|
3172
3168
|
{
|
|
3173
3169
|
...props,
|
|
3174
|
-
className: (0,
|
|
3170
|
+
className: (0, import_css38.cx)(styles.item, props.className)
|
|
3175
3171
|
}
|
|
3176
3172
|
);
|
|
3177
3173
|
}
|
|
3178
3174
|
function RadioGroupItemText(props) {
|
|
3179
3175
|
const { size, orientation, ...itemTextProps } = props;
|
|
3180
|
-
const styles = (0,
|
|
3176
|
+
const styles = (0, import_recipes33.radioGroup)({ size, orientation });
|
|
3181
3177
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3182
3178
|
import_radio_group.RadioGroup.ItemText,
|
|
3183
3179
|
{
|
|
3184
3180
|
...itemTextProps,
|
|
3185
|
-
className: (0,
|
|
3181
|
+
className: (0, import_css38.cx)(styles.itemText, itemTextProps.className)
|
|
3186
3182
|
}
|
|
3187
3183
|
);
|
|
3188
3184
|
}
|
|
3189
3185
|
function RadioGroupItemControl(props) {
|
|
3190
3186
|
const { size, orientation, ...itemControlProps } = props;
|
|
3191
|
-
const styles = (0,
|
|
3187
|
+
const styles = (0, import_recipes33.radioGroup)({ size, orientation });
|
|
3192
3188
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3193
3189
|
import_radio_group.RadioGroup.ItemControl,
|
|
3194
3190
|
{
|
|
3195
3191
|
...itemControlProps,
|
|
3196
|
-
className: (0,
|
|
3192
|
+
className: (0, import_css38.cx)(styles.itemControl, itemControlProps.className)
|
|
3197
3193
|
}
|
|
3198
3194
|
);
|
|
3199
3195
|
}
|
|
@@ -3226,37 +3222,37 @@ function Radio(props) {
|
|
|
3226
3222
|
|
|
3227
3223
|
// src/components/rating/primitives.tsx
|
|
3228
3224
|
var import_rating_group = require("@ark-ui/react/rating-group");
|
|
3229
|
-
var
|
|
3230
|
-
var
|
|
3225
|
+
var import_css39 = require("@cerberus/styled-system/css");
|
|
3226
|
+
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
3231
3227
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3232
3228
|
function RatingRoot(props) {
|
|
3233
3229
|
const { orientation, size, ...rootProps } = props;
|
|
3234
|
-
const styles = (0,
|
|
3230
|
+
const styles = (0, import_recipes34.ratingGroup)({ orientation, size });
|
|
3235
3231
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3236
3232
|
import_rating_group.RatingGroup.Root,
|
|
3237
3233
|
{
|
|
3238
3234
|
...rootProps,
|
|
3239
|
-
className: (0,
|
|
3235
|
+
className: (0, import_css39.cx)(styles.root, rootProps.className)
|
|
3240
3236
|
}
|
|
3241
3237
|
);
|
|
3242
3238
|
}
|
|
3243
3239
|
function RatingLabel(props) {
|
|
3244
|
-
const styles = (0,
|
|
3240
|
+
const styles = (0, import_recipes34.ratingGroup)();
|
|
3245
3241
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3246
3242
|
import_rating_group.RatingGroup.Label,
|
|
3247
3243
|
{
|
|
3248
3244
|
...props,
|
|
3249
|
-
className: (0,
|
|
3245
|
+
className: (0, import_css39.cx)(styles.label, props.className)
|
|
3250
3246
|
}
|
|
3251
3247
|
);
|
|
3252
3248
|
}
|
|
3253
3249
|
function RatingControl(props) {
|
|
3254
|
-
const styles = (0,
|
|
3250
|
+
const styles = (0, import_recipes34.ratingGroup)();
|
|
3255
3251
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3256
3252
|
import_rating_group.RatingGroup.Control,
|
|
3257
3253
|
{
|
|
3258
3254
|
...props,
|
|
3259
|
-
className: (0,
|
|
3255
|
+
className: (0, import_css39.cx)(styles.control, props.className)
|
|
3260
3256
|
}
|
|
3261
3257
|
);
|
|
3262
3258
|
}
|
|
@@ -3265,12 +3261,12 @@ function RatingContext(props) {
|
|
|
3265
3261
|
}
|
|
3266
3262
|
function RatingItem(props) {
|
|
3267
3263
|
const { palette, ...itemProps } = props;
|
|
3268
|
-
const styles = (0,
|
|
3264
|
+
const styles = (0, import_recipes34.ratingGroup)({ palette });
|
|
3269
3265
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
3270
3266
|
import_rating_group.RatingGroup.Item,
|
|
3271
3267
|
{
|
|
3272
3268
|
...itemProps,
|
|
3273
|
-
className: (0,
|
|
3269
|
+
className: (0, import_css39.cx)(styles.item, itemProps.className)
|
|
3274
3270
|
}
|
|
3275
3271
|
);
|
|
3276
3272
|
}
|
|
@@ -3372,40 +3368,40 @@ function OptionGroupLabel(props) {
|
|
|
3372
3368
|
}
|
|
3373
3369
|
|
|
3374
3370
|
// src/components/switch/primitives.tsx
|
|
3375
|
-
var
|
|
3376
|
-
var
|
|
3377
|
-
var
|
|
3371
|
+
var import_react25 = require("@ark-ui/react");
|
|
3372
|
+
var import_css40 = require("@cerberus/styled-system/css");
|
|
3373
|
+
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
3378
3374
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3379
3375
|
function SwitchRoot(props) {
|
|
3380
3376
|
const { size, ...rootProps } = props;
|
|
3381
|
-
const styles = (0,
|
|
3377
|
+
const styles = (0, import_recipes35.switchRecipe)({ size });
|
|
3382
3378
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3383
|
-
|
|
3379
|
+
import_react25.Switch.Root,
|
|
3384
3380
|
{
|
|
3385
3381
|
...rootProps,
|
|
3386
|
-
className: (0,
|
|
3382
|
+
className: (0, import_css40.cx)(styles.root, rootProps.className)
|
|
3387
3383
|
}
|
|
3388
3384
|
);
|
|
3389
3385
|
}
|
|
3390
3386
|
function SwitchLabel(props) {
|
|
3391
|
-
const styles = (0,
|
|
3392
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3387
|
+
const styles = (0, import_recipes35.switchRecipe)();
|
|
3388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react25.Switch.Label, { ...props, className: (0, import_css40.cx)(styles.label, props.className) });
|
|
3393
3389
|
}
|
|
3394
3390
|
function SwitchControl(props) {
|
|
3395
|
-
const styles = (0,
|
|
3391
|
+
const styles = (0, import_recipes35.switchRecipe)();
|
|
3396
3392
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3397
|
-
|
|
3393
|
+
import_react25.Switch.Control,
|
|
3398
3394
|
{
|
|
3399
3395
|
...props,
|
|
3400
|
-
className: (0,
|
|
3396
|
+
className: (0, import_css40.cx)(styles.control, props.className)
|
|
3401
3397
|
}
|
|
3402
3398
|
);
|
|
3403
3399
|
}
|
|
3404
3400
|
function SwitchThumb(props) {
|
|
3405
|
-
const styles = (0,
|
|
3406
|
-
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
3401
|
+
const styles = (0, import_recipes35.switchRecipe)();
|
|
3402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_react25.Switch.Thumb, { ...props, className: (0, import_css40.cx)(styles.thumb, props.className) });
|
|
3407
3403
|
}
|
|
3408
|
-
var SwitchHiddenInput =
|
|
3404
|
+
var SwitchHiddenInput = import_react25.Switch.HiddenInput;
|
|
3409
3405
|
|
|
3410
3406
|
// src/components/switch/parts.ts
|
|
3411
3407
|
var SwitchParts = {
|
|
@@ -3437,25 +3433,25 @@ function Switch2(props) {
|
|
|
3437
3433
|
|
|
3438
3434
|
// src/components/Tabs.client.tsx
|
|
3439
3435
|
var import_tabs2 = require("@ark-ui/react/tabs");
|
|
3440
|
-
var
|
|
3436
|
+
var import_css41 = require("@cerberus/styled-system/css");
|
|
3441
3437
|
|
|
3442
3438
|
// src/context/tabs.tsx
|
|
3443
3439
|
var import_tabs = require("@ark-ui/react/tabs");
|
|
3444
|
-
var
|
|
3445
|
-
var
|
|
3440
|
+
var import_recipes36 = require("@cerberus/styled-system/recipes");
|
|
3441
|
+
var import_react26 = require("react");
|
|
3446
3442
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3447
|
-
var TabsContext = (0,
|
|
3443
|
+
var TabsContext = (0, import_react26.createContext)(null);
|
|
3448
3444
|
function Tabs(props) {
|
|
3449
3445
|
const { cache, defaultValue, palette, uuid, ...arkProps } = props;
|
|
3450
|
-
const [activeTab, setActiveTab] = (0,
|
|
3446
|
+
const [activeTab, setActiveTab] = (0, import_react26.useState)(
|
|
3451
3447
|
() => cache ? "" : defaultValue
|
|
3452
3448
|
);
|
|
3453
|
-
const styles = (0,
|
|
3454
|
-
const cacheKey = (0,
|
|
3449
|
+
const styles = (0, import_recipes36.tabs)({ palette });
|
|
3450
|
+
const cacheKey = (0, import_react26.useMemo)(
|
|
3455
3451
|
() => uuid ? `cerberus-tabs-${uuid}` : "cerberus-tabs",
|
|
3456
3452
|
[uuid]
|
|
3457
3453
|
);
|
|
3458
|
-
const handleValueChange = (0,
|
|
3454
|
+
const handleValueChange = (0, import_react26.useCallback)(
|
|
3459
3455
|
(details) => {
|
|
3460
3456
|
if (cache) {
|
|
3461
3457
|
setLocalStorage(cacheKey, details.value);
|
|
@@ -3464,13 +3460,13 @@ function Tabs(props) {
|
|
|
3464
3460
|
},
|
|
3465
3461
|
[cache]
|
|
3466
3462
|
);
|
|
3467
|
-
(0,
|
|
3463
|
+
(0, import_react26.useEffect)(() => {
|
|
3468
3464
|
if (cache && !activeTab) {
|
|
3469
3465
|
const cachedTab = getLocalStorage(cacheKey, defaultValue ?? "");
|
|
3470
3466
|
setActiveTab(cachedTab);
|
|
3471
3467
|
}
|
|
3472
3468
|
}, [cache, defaultValue, activeTab]);
|
|
3473
|
-
const value = (0,
|
|
3469
|
+
const value = (0, import_react26.useMemo)(
|
|
3474
3470
|
() => ({
|
|
3475
3471
|
active: activeTab,
|
|
3476
3472
|
styles
|
|
@@ -3491,7 +3487,7 @@ function Tabs(props) {
|
|
|
3491
3487
|
) });
|
|
3492
3488
|
}
|
|
3493
3489
|
function useTabsContext() {
|
|
3494
|
-
const context = (0,
|
|
3490
|
+
const context = (0, import_react26.useContext)(TabsContext);
|
|
3495
3491
|
if (!context) {
|
|
3496
3492
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
3497
3493
|
}
|
|
@@ -3507,7 +3503,7 @@ function TabsList(props) {
|
|
|
3507
3503
|
import_tabs2.Tabs.List,
|
|
3508
3504
|
{
|
|
3509
3505
|
...tabsProps,
|
|
3510
|
-
className: (0,
|
|
3506
|
+
className: (0, import_css41.cx)(tabsProps.className, styles.list),
|
|
3511
3507
|
children: [
|
|
3512
3508
|
children,
|
|
3513
3509
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TabIndicator, {})
|
|
@@ -3522,7 +3518,7 @@ function Tab(props) {
|
|
|
3522
3518
|
import_tabs2.Tabs.Trigger,
|
|
3523
3519
|
{
|
|
3524
3520
|
...props,
|
|
3525
|
-
className: (0,
|
|
3521
|
+
className: (0, import_css41.cx)(props.className, styles.trigger)
|
|
3526
3522
|
}
|
|
3527
3523
|
);
|
|
3528
3524
|
}
|
|
@@ -3532,7 +3528,7 @@ function TabIndicator(props) {
|
|
|
3532
3528
|
import_tabs2.Tabs.Indicator,
|
|
3533
3529
|
{
|
|
3534
3530
|
...props,
|
|
3535
|
-
className: (0,
|
|
3531
|
+
className: (0, import_css41.cx)(props.className, styles.indicator)
|
|
3536
3532
|
}
|
|
3537
3533
|
);
|
|
3538
3534
|
}
|
|
@@ -3542,23 +3538,23 @@ function TabPanel(props) {
|
|
|
3542
3538
|
import_tabs2.Tabs.Content,
|
|
3543
3539
|
{
|
|
3544
3540
|
...props,
|
|
3545
|
-
className: (0,
|
|
3541
|
+
className: (0, import_css41.cx)(props.className, styles.content)
|
|
3546
3542
|
}
|
|
3547
3543
|
);
|
|
3548
3544
|
}
|
|
3549
3545
|
|
|
3550
3546
|
// src/components/Table.tsx
|
|
3551
|
-
var
|
|
3552
|
-
var
|
|
3547
|
+
var import_css42 = require("@cerberus/styled-system/css");
|
|
3548
|
+
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
3553
3549
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3554
3550
|
function Table(props) {
|
|
3555
3551
|
const { caption, children, ...nativeProps } = props;
|
|
3556
|
-
const styles = (0,
|
|
3552
|
+
const styles = (0, import_recipes37.table)();
|
|
3557
3553
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3558
3554
|
"table",
|
|
3559
3555
|
{
|
|
3560
3556
|
...nativeProps,
|
|
3561
|
-
className: (0,
|
|
3557
|
+
className: (0, import_css42.cx)(nativeProps.className, styles.table),
|
|
3562
3558
|
children: [
|
|
3563
3559
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("caption", { className: styles.caption, children: caption }),
|
|
3564
3560
|
children
|
|
@@ -3571,16 +3567,16 @@ function Tr(props) {
|
|
|
3571
3567
|
}
|
|
3572
3568
|
|
|
3573
3569
|
// src/components/Thead.tsx
|
|
3574
|
-
var
|
|
3575
|
-
var
|
|
3570
|
+
var import_css43 = require("@cerberus/styled-system/css");
|
|
3571
|
+
var import_recipes38 = require("@cerberus/styled-system/recipes");
|
|
3576
3572
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3577
3573
|
function Thead(props) {
|
|
3578
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { ...props, className: (0,
|
|
3574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { ...props, className: (0, import_css43.cx)(props.className, (0, import_recipes38.thead)()) });
|
|
3579
3575
|
}
|
|
3580
3576
|
|
|
3581
3577
|
// src/components/Th.tsx
|
|
3582
|
-
var
|
|
3583
|
-
var
|
|
3578
|
+
var import_css44 = require("@cerberus/styled-system/css");
|
|
3579
|
+
var import_recipes39 = require("@cerberus/styled-system/recipes");
|
|
3584
3580
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3585
3581
|
function Th(props) {
|
|
3586
3582
|
const { size, onClick, ...nativeProps } = props;
|
|
@@ -3592,16 +3588,16 @@ function Th(props) {
|
|
|
3592
3588
|
"th",
|
|
3593
3589
|
{
|
|
3594
3590
|
...nativeProps,
|
|
3595
|
-
className: (0,
|
|
3591
|
+
className: (0, import_css44.cx)(nativeProps.className, (0, import_recipes39.th)({ size }))
|
|
3596
3592
|
}
|
|
3597
3593
|
),
|
|
3598
3594
|
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
3599
3595
|
"button",
|
|
3600
3596
|
{
|
|
3601
|
-
className: (0,
|
|
3597
|
+
className: (0, import_css44.cx)(
|
|
3602
3598
|
nativeProps.className,
|
|
3603
|
-
(0,
|
|
3604
|
-
(0,
|
|
3599
|
+
(0, import_recipes39.th)({ size }),
|
|
3600
|
+
(0, import_css44.css)({
|
|
3605
3601
|
alignItems: "center",
|
|
3606
3602
|
display: "inline-flex",
|
|
3607
3603
|
justifyContent: "space-between",
|
|
@@ -3621,8 +3617,8 @@ function Th(props) {
|
|
|
3621
3617
|
}
|
|
3622
3618
|
|
|
3623
3619
|
// src/components/Td.tsx
|
|
3624
|
-
var
|
|
3625
|
-
var
|
|
3620
|
+
var import_css45 = require("@cerberus/styled-system/css");
|
|
3621
|
+
var import_recipes40 = require("@cerberus/styled-system/recipes");
|
|
3626
3622
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3627
3623
|
function Td(props) {
|
|
3628
3624
|
const { size, ...nativeProps } = props;
|
|
@@ -3630,9 +3626,9 @@ function Td(props) {
|
|
|
3630
3626
|
"td",
|
|
3631
3627
|
{
|
|
3632
3628
|
...nativeProps,
|
|
3633
|
-
className: (0,
|
|
3629
|
+
className: (0, import_css45.cx)(
|
|
3634
3630
|
nativeProps.className,
|
|
3635
|
-
(0,
|
|
3631
|
+
(0, import_recipes40.td)({
|
|
3636
3632
|
size
|
|
3637
3633
|
})
|
|
3638
3634
|
)
|
|
@@ -3641,8 +3637,8 @@ function Td(props) {
|
|
|
3641
3637
|
}
|
|
3642
3638
|
|
|
3643
3639
|
// src/components/Tbody.tsx
|
|
3644
|
-
var
|
|
3645
|
-
var
|
|
3640
|
+
var import_recipes41 = require("@cerberus/styled-system/recipes");
|
|
3641
|
+
var import_css46 = require("@cerberus/styled-system/css");
|
|
3646
3642
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3647
3643
|
function Tbody(props) {
|
|
3648
3644
|
const { decoration, ...nativeProps } = props;
|
|
@@ -3650,9 +3646,9 @@ function Tbody(props) {
|
|
|
3650
3646
|
"tbody",
|
|
3651
3647
|
{
|
|
3652
3648
|
...nativeProps,
|
|
3653
|
-
className: (0,
|
|
3649
|
+
className: (0, import_css46.cx)(
|
|
3654
3650
|
nativeProps.className,
|
|
3655
|
-
(0,
|
|
3651
|
+
(0, import_recipes41.tbody)({
|
|
3656
3652
|
decoration
|
|
3657
3653
|
})
|
|
3658
3654
|
)
|
|
@@ -3661,8 +3657,8 @@ function Tbody(props) {
|
|
|
3661
3657
|
}
|
|
3662
3658
|
|
|
3663
3659
|
// src/components/Tag.tsx
|
|
3664
|
-
var
|
|
3665
|
-
var
|
|
3660
|
+
var import_css47 = require("@cerberus/styled-system/css");
|
|
3661
|
+
var import_recipes42 = require("@cerberus/styled-system/recipes");
|
|
3666
3662
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3667
3663
|
function Tag(props) {
|
|
3668
3664
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
@@ -3676,9 +3672,9 @@ function Tag(props) {
|
|
|
3676
3672
|
"span",
|
|
3677
3673
|
{
|
|
3678
3674
|
...nativeProps,
|
|
3679
|
-
className: (0,
|
|
3675
|
+
className: (0, import_css47.cx)(
|
|
3680
3676
|
nativeProps.className,
|
|
3681
|
-
(0,
|
|
3677
|
+
(0, import_recipes42.tag)({
|
|
3682
3678
|
gradient,
|
|
3683
3679
|
palette,
|
|
3684
3680
|
shape,
|
|
@@ -3692,7 +3688,7 @@ function Tag(props) {
|
|
|
3692
3688
|
"button",
|
|
3693
3689
|
{
|
|
3694
3690
|
"aria-label": "Close",
|
|
3695
|
-
className: (0,
|
|
3691
|
+
className: (0, import_recipes42.iconButton)({
|
|
3696
3692
|
palette: "action",
|
|
3697
3693
|
usage: "filled",
|
|
3698
3694
|
size: "sm"
|
|
@@ -3705,7 +3701,7 @@ function Tag(props) {
|
|
|
3705
3701
|
}
|
|
3706
3702
|
);
|
|
3707
3703
|
}
|
|
3708
|
-
var closableCss = (0,
|
|
3704
|
+
var closableCss = (0, import_css47.css)({
|
|
3709
3705
|
bgColor: "action.bg.active",
|
|
3710
3706
|
color: "action.text.initial",
|
|
3711
3707
|
paddingInlineEnd: "0"
|
|
@@ -3724,12 +3720,12 @@ var ToggleParts = {
|
|
|
3724
3720
|
|
|
3725
3721
|
// src/components/Tooltip.tsx
|
|
3726
3722
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
3727
|
-
var
|
|
3728
|
-
var
|
|
3723
|
+
var import_css48 = require("@cerberus/styled-system/css");
|
|
3724
|
+
var import_recipes43 = require("@cerberus/styled-system/recipes");
|
|
3729
3725
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3730
3726
|
function Tooltip(props) {
|
|
3731
3727
|
const { content, children, asChild, ...nativeProps } = props;
|
|
3732
|
-
const styles = (0,
|
|
3728
|
+
const styles = (0, import_recipes43.tooltip)();
|
|
3733
3729
|
const position = {
|
|
3734
3730
|
placement: props.position || "top"
|
|
3735
3731
|
};
|
|
@@ -3739,7 +3735,7 @@ function Tooltip(props) {
|
|
|
3739
3735
|
import_tooltip.Tooltip.Content,
|
|
3740
3736
|
{
|
|
3741
3737
|
...nativeProps,
|
|
3742
|
-
className: (0,
|
|
3738
|
+
className: (0, import_css48.cx)(nativeProps.className, styles.content),
|
|
3743
3739
|
children: [
|
|
3744
3740
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
3745
3741
|
content
|
|
@@ -3750,23 +3746,23 @@ function Tooltip(props) {
|
|
|
3750
3746
|
}
|
|
3751
3747
|
|
|
3752
3748
|
// src/context/confirm-modal.tsx
|
|
3753
|
-
var
|
|
3754
|
-
var
|
|
3749
|
+
var import_react27 = require("react");
|
|
3750
|
+
var import_css49 = require("@cerberus/styled-system/css");
|
|
3755
3751
|
var import_jsx6 = require("@cerberus/styled-system/jsx");
|
|
3756
3752
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3757
|
-
var ConfirmModalContext = (0,
|
|
3753
|
+
var ConfirmModalContext = (0, import_react27.createContext)(null);
|
|
3758
3754
|
function ConfirmModal(props) {
|
|
3759
|
-
const [open, setOpen] = (0,
|
|
3760
|
-
const [content, setContent] = (0,
|
|
3761
|
-
const resolveRef = (0,
|
|
3755
|
+
const [open, setOpen] = (0, import_react27.useState)(false);
|
|
3756
|
+
const [content, setContent] = (0, import_react27.useState)(null);
|
|
3757
|
+
const resolveRef = (0, import_react27.useRef)(null);
|
|
3762
3758
|
const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
|
|
3763
3759
|
const { icons } = useCerberusContext();
|
|
3764
3760
|
const { confirmModal: ConfirmIcon } = icons;
|
|
3765
|
-
const palette = (0,
|
|
3761
|
+
const palette = (0, import_react27.useMemo)(
|
|
3766
3762
|
() => kind === "destructive" ? "danger" : "action",
|
|
3767
3763
|
[kind]
|
|
3768
3764
|
);
|
|
3769
|
-
const handleChoice = (0,
|
|
3765
|
+
const handleChoice = (0, import_react27.useCallback)(
|
|
3770
3766
|
(e) => {
|
|
3771
3767
|
var _a, _b;
|
|
3772
3768
|
const target = e.currentTarget;
|
|
@@ -3778,7 +3774,7 @@ function ConfirmModal(props) {
|
|
|
3778
3774
|
},
|
|
3779
3775
|
[setOpen]
|
|
3780
3776
|
);
|
|
3781
|
-
const handleShow = (0,
|
|
3777
|
+
const handleShow = (0, import_react27.useCallback)(
|
|
3782
3778
|
(options) => {
|
|
3783
3779
|
return new Promise((resolve) => {
|
|
3784
3780
|
setContent({ ...options });
|
|
@@ -3788,7 +3784,7 @@ function ConfirmModal(props) {
|
|
|
3788
3784
|
},
|
|
3789
3785
|
[setOpen, setContent]
|
|
3790
3786
|
);
|
|
3791
|
-
const value = (0,
|
|
3787
|
+
const value = (0, import_react27.useMemo)(
|
|
3792
3788
|
() => ({
|
|
3793
3789
|
show: handleShow
|
|
3794
3790
|
}),
|
|
@@ -3839,7 +3835,7 @@ function ConfirmModal(props) {
|
|
|
3839
3835
|
Button,
|
|
3840
3836
|
{
|
|
3841
3837
|
autoFocus: true,
|
|
3842
|
-
className: (0,
|
|
3838
|
+
className: (0, import_css49.css)({
|
|
3843
3839
|
w: "1/2"
|
|
3844
3840
|
}),
|
|
3845
3841
|
name: "confirm",
|
|
@@ -3852,7 +3848,7 @@ function ConfirmModal(props) {
|
|
|
3852
3848
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
3853
3849
|
Button,
|
|
3854
3850
|
{
|
|
3855
|
-
className: (0,
|
|
3851
|
+
className: (0, import_css49.css)({
|
|
3856
3852
|
w: "1/2"
|
|
3857
3853
|
}),
|
|
3858
3854
|
name: "cancel",
|
|
@@ -3867,7 +3863,7 @@ function ConfirmModal(props) {
|
|
|
3867
3863
|
] });
|
|
3868
3864
|
}
|
|
3869
3865
|
function useConfirmModal() {
|
|
3870
|
-
const context = (0,
|
|
3866
|
+
const context = (0, import_react27.useContext)(ConfirmModalContext);
|
|
3871
3867
|
if (context === null) {
|
|
3872
3868
|
throw new Error(
|
|
3873
3869
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -3877,10 +3873,10 @@ function useConfirmModal() {
|
|
|
3877
3873
|
}
|
|
3878
3874
|
|
|
3879
3875
|
// src/context/notification-center.tsx
|
|
3880
|
-
var
|
|
3876
|
+
var import_react28 = require("react");
|
|
3881
3877
|
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
3882
|
-
var
|
|
3883
|
-
var
|
|
3878
|
+
var import_recipes44 = require("@cerberus/styled-system/recipes");
|
|
3879
|
+
var import_css50 = require("@cerberus/styled-system/css");
|
|
3884
3880
|
|
|
3885
3881
|
// src/context/notification-center/store.ts
|
|
3886
3882
|
function notificationCenterReducer(state, action) {
|
|
@@ -3914,15 +3910,15 @@ function clearNotificationState(dispatch) {
|
|
|
3914
3910
|
|
|
3915
3911
|
// src/context/notification-center.tsx
|
|
3916
3912
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3917
|
-
var NotificationsContext = (0,
|
|
3913
|
+
var NotificationsContext = (0, import_react28.createContext)(null);
|
|
3918
3914
|
function NotificationCenter(props) {
|
|
3919
|
-
const [state, dispatch] = (0,
|
|
3920
|
-
const styles = (0,
|
|
3921
|
-
const timeout = (0,
|
|
3915
|
+
const [state, dispatch] = (0, import_react28.useReducer)(notificationCenterReducer, []);
|
|
3916
|
+
const styles = (0, import_recipes44.notification)();
|
|
3917
|
+
const timeout = (0, import_react28.useMemo)(
|
|
3922
3918
|
() => props.duration || 6e3,
|
|
3923
3919
|
[props.duration]
|
|
3924
3920
|
);
|
|
3925
|
-
const closeNotification = (0,
|
|
3921
|
+
const closeNotification = (0, import_react28.useCallback)(
|
|
3926
3922
|
(id) => {
|
|
3927
3923
|
updateNotificationState(dispatch, {
|
|
3928
3924
|
id,
|
|
@@ -3934,7 +3930,7 @@ function NotificationCenter(props) {
|
|
|
3934
3930
|
},
|
|
3935
3931
|
[dispatch]
|
|
3936
3932
|
);
|
|
3937
|
-
const handleNotify = (0,
|
|
3933
|
+
const handleNotify = (0, import_react28.useCallback)(
|
|
3938
3934
|
(options) => {
|
|
3939
3935
|
const id = `${options.palette}:${state.length + 1}`;
|
|
3940
3936
|
addNotification(dispatch, {
|
|
@@ -3948,20 +3944,20 @@ function NotificationCenter(props) {
|
|
|
3948
3944
|
},
|
|
3949
3945
|
[dispatch, state, timeout, closeNotification]
|
|
3950
3946
|
);
|
|
3951
|
-
const handleClose = (0,
|
|
3947
|
+
const handleClose = (0, import_react28.useCallback)(
|
|
3952
3948
|
(e) => {
|
|
3953
3949
|
const target = e.currentTarget;
|
|
3954
3950
|
closeNotification(target.value);
|
|
3955
3951
|
},
|
|
3956
3952
|
[closeNotification]
|
|
3957
3953
|
);
|
|
3958
|
-
const handleCloseAll = (0,
|
|
3954
|
+
const handleCloseAll = (0, import_react28.useCallback)(() => {
|
|
3959
3955
|
state.forEach((item) => {
|
|
3960
3956
|
if (item.onClose) item.onClose();
|
|
3961
3957
|
});
|
|
3962
3958
|
clearNotificationState(dispatch);
|
|
3963
3959
|
}, [state, dispatch]);
|
|
3964
|
-
const value = (0,
|
|
3960
|
+
const value = (0, import_react28.useMemo)(
|
|
3965
3961
|
() => ({
|
|
3966
3962
|
notify: handleNotify
|
|
3967
3963
|
}),
|
|
@@ -3973,7 +3969,7 @@ function NotificationCenter(props) {
|
|
|
3973
3969
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Show, { when: state.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3974
3970
|
Button,
|
|
3975
3971
|
{
|
|
3976
|
-
className: (0,
|
|
3972
|
+
className: (0, import_css50.cx)(styles.closeAll, (0, import_patterns10.animateIn)()),
|
|
3977
3973
|
onClick: handleCloseAll,
|
|
3978
3974
|
palette: "action",
|
|
3979
3975
|
shape: "rounded",
|
|
@@ -4008,7 +4004,7 @@ function NotificationCenter(props) {
|
|
|
4008
4004
|
}
|
|
4009
4005
|
function MatchNotification(props) {
|
|
4010
4006
|
const { palette, id, onClose, heading, description, open } = props;
|
|
4011
|
-
const sharedProps = (0,
|
|
4007
|
+
const sharedProps = (0, import_react28.useMemo)(
|
|
4012
4008
|
() => ({
|
|
4013
4009
|
id,
|
|
4014
4010
|
open: true,
|
|
@@ -4042,7 +4038,7 @@ function MatchNotification(props) {
|
|
|
4042
4038
|
}
|
|
4043
4039
|
}
|
|
4044
4040
|
function useNotificationCenter() {
|
|
4045
|
-
const context = (0,
|
|
4041
|
+
const context = (0, import_react28.useContext)(NotificationsContext);
|
|
4046
4042
|
if (!context) {
|
|
4047
4043
|
throw new Error(
|
|
4048
4044
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -4052,35 +4048,35 @@ function useNotificationCenter() {
|
|
|
4052
4048
|
}
|
|
4053
4049
|
|
|
4054
4050
|
// src/context/prompt-modal.tsx
|
|
4055
|
-
var
|
|
4056
|
-
var
|
|
4051
|
+
var import_react29 = require("react");
|
|
4052
|
+
var import_react30 = require("@ark-ui/react");
|
|
4057
4053
|
var import_jsx7 = require("@cerberus/styled-system/jsx");
|
|
4058
|
-
var
|
|
4054
|
+
var import_css51 = require("@cerberus/styled-system/css");
|
|
4059
4055
|
var import_patterns11 = require("@cerberus/styled-system/patterns");
|
|
4060
4056
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4061
|
-
var PromptModalContext = (0,
|
|
4057
|
+
var PromptModalContext = (0, import_react29.createContext)(null);
|
|
4062
4058
|
function PromptModal(props) {
|
|
4063
|
-
const resolveRef = (0,
|
|
4064
|
-
const [open, setOpen] = (0,
|
|
4065
|
-
const [content, setContent] = (0,
|
|
4066
|
-
const [inputValue, setInputValue] = (0,
|
|
4059
|
+
const resolveRef = (0, import_react29.useRef)(null);
|
|
4060
|
+
const [open, setOpen] = (0, import_react29.useState)(false);
|
|
4061
|
+
const [content, setContent] = (0, import_react29.useState)(null);
|
|
4062
|
+
const [inputValue, setInputValue] = (0, import_react29.useState)("");
|
|
4067
4063
|
const { icons } = useCerberusContext();
|
|
4068
4064
|
const { promptModal: PromptIcon } = icons;
|
|
4069
|
-
const isValid = (0,
|
|
4065
|
+
const isValid = (0, import_react29.useMemo)(
|
|
4070
4066
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
4071
4067
|
[inputValue, content]
|
|
4072
4068
|
);
|
|
4073
|
-
const palette = (0,
|
|
4069
|
+
const palette = (0, import_react29.useMemo)(
|
|
4074
4070
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
4075
4071
|
[content]
|
|
4076
4072
|
);
|
|
4077
|
-
const handleChange = (0,
|
|
4073
|
+
const handleChange = (0, import_react29.useCallback)(
|
|
4078
4074
|
(e) => {
|
|
4079
4075
|
setInputValue(e.currentTarget.value);
|
|
4080
4076
|
},
|
|
4081
4077
|
[content]
|
|
4082
4078
|
);
|
|
4083
|
-
const handleChoice = (0,
|
|
4079
|
+
const handleChoice = (0, import_react29.useCallback)(
|
|
4084
4080
|
(e) => {
|
|
4085
4081
|
var _a;
|
|
4086
4082
|
const target = e.currentTarget;
|
|
@@ -4091,7 +4087,7 @@ function PromptModal(props) {
|
|
|
4091
4087
|
},
|
|
4092
4088
|
[inputValue, setOpen]
|
|
4093
4089
|
);
|
|
4094
|
-
const handleShow = (0,
|
|
4090
|
+
const handleShow = (0, import_react29.useCallback)(
|
|
4095
4091
|
(options) => {
|
|
4096
4092
|
return new Promise((resolve) => {
|
|
4097
4093
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -4101,7 +4097,7 @@ function PromptModal(props) {
|
|
|
4101
4097
|
},
|
|
4102
4098
|
[setOpen]
|
|
4103
4099
|
);
|
|
4104
|
-
const value = (0,
|
|
4100
|
+
const value = (0, import_react29.useMemo)(
|
|
4105
4101
|
() => ({
|
|
4106
4102
|
show: handleShow
|
|
4107
4103
|
}),
|
|
@@ -4189,7 +4185,7 @@ function PromptModal(props) {
|
|
|
4189
4185
|
Button,
|
|
4190
4186
|
{
|
|
4191
4187
|
autoFocus: true,
|
|
4192
|
-
className: (0,
|
|
4188
|
+
className: (0, import_css51.css)({
|
|
4193
4189
|
w: "1/2"
|
|
4194
4190
|
}),
|
|
4195
4191
|
disabled: !isValid,
|
|
@@ -4200,10 +4196,10 @@ function PromptModal(props) {
|
|
|
4200
4196
|
children: content == null ? void 0 : content.actionText
|
|
4201
4197
|
}
|
|
4202
4198
|
),
|
|
4203
|
-
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4199
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_react30.DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4204
4200
|
Button,
|
|
4205
4201
|
{
|
|
4206
|
-
className: (0,
|
|
4202
|
+
className: (0, import_css51.css)({
|
|
4207
4203
|
w: "1/2"
|
|
4208
4204
|
}),
|
|
4209
4205
|
name: "cancel",
|
|
@@ -4218,7 +4214,7 @@ function PromptModal(props) {
|
|
|
4218
4214
|
] });
|
|
4219
4215
|
}
|
|
4220
4216
|
function usePromptModal() {
|
|
4221
|
-
const context = (0,
|
|
4217
|
+
const context = (0, import_react29.useContext)(PromptModalContext);
|
|
4222
4218
|
if (context === null) {
|
|
4223
4219
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
4224
4220
|
}
|
|
@@ -4226,50 +4222,50 @@ function usePromptModal() {
|
|
|
4226
4222
|
}
|
|
4227
4223
|
|
|
4228
4224
|
// src/context/theme.tsx
|
|
4229
|
-
var
|
|
4225
|
+
var import_react32 = require("react");
|
|
4230
4226
|
|
|
4231
4227
|
// src/hooks/useTheme.ts
|
|
4232
|
-
var
|
|
4228
|
+
var import_react31 = require("react");
|
|
4233
4229
|
var THEME_KEY = "cerberus-theme";
|
|
4234
4230
|
var MODE_KEY = "cerberus-mode";
|
|
4235
4231
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
4236
4232
|
const { updateMode, updateTheme, cache } = options;
|
|
4237
|
-
const [theme, setTheme] = (0,
|
|
4238
|
-
const [colorMode, setColorMode] = (0,
|
|
4239
|
-
const handleThemeChange = (0,
|
|
4233
|
+
const [theme, setTheme] = (0, import_react31.useState)(defaultTheme);
|
|
4234
|
+
const [colorMode, setColorMode] = (0, import_react31.useState)(defaultColorMode);
|
|
4235
|
+
const handleThemeChange = (0, import_react31.useCallback)(
|
|
4240
4236
|
(newTheme) => {
|
|
4241
4237
|
setTheme(newTheme);
|
|
4242
4238
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
4243
4239
|
},
|
|
4244
4240
|
[updateTheme]
|
|
4245
4241
|
);
|
|
4246
|
-
const handleColorModeChange = (0,
|
|
4242
|
+
const handleColorModeChange = (0, import_react31.useCallback)(
|
|
4247
4243
|
(newMode) => {
|
|
4248
4244
|
setColorMode(newMode);
|
|
4249
4245
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
4250
4246
|
},
|
|
4251
4247
|
[updateMode]
|
|
4252
4248
|
);
|
|
4253
|
-
(0,
|
|
4249
|
+
(0, import_react31.useLayoutEffect)(() => {
|
|
4254
4250
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
4255
4251
|
if (theme2) {
|
|
4256
4252
|
setTheme(theme2);
|
|
4257
4253
|
}
|
|
4258
4254
|
}, []);
|
|
4259
|
-
(0,
|
|
4255
|
+
(0, import_react31.useLayoutEffect)(() => {
|
|
4260
4256
|
const mode = localStorage.getItem(MODE_KEY);
|
|
4261
4257
|
if (mode) {
|
|
4262
4258
|
setColorMode(mode);
|
|
4263
4259
|
}
|
|
4264
4260
|
}, []);
|
|
4265
|
-
(0,
|
|
4261
|
+
(0, import_react31.useEffect)(() => {
|
|
4266
4262
|
const root = document.documentElement;
|
|
4267
4263
|
root.dataset.pandaTheme = theme;
|
|
4268
4264
|
if (cache) {
|
|
4269
4265
|
localStorage.setItem(THEME_KEY, theme);
|
|
4270
4266
|
}
|
|
4271
4267
|
}, [theme, cache]);
|
|
4272
|
-
(0,
|
|
4268
|
+
(0, import_react31.useEffect)(() => {
|
|
4273
4269
|
const root = document.documentElement;
|
|
4274
4270
|
if (colorMode === "system") {
|
|
4275
4271
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -4280,7 +4276,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
4280
4276
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
4281
4277
|
}
|
|
4282
4278
|
}, [colorMode, cache]);
|
|
4283
|
-
return (0,
|
|
4279
|
+
return (0, import_react31.useMemo)(
|
|
4284
4280
|
() => ({
|
|
4285
4281
|
theme,
|
|
4286
4282
|
mode: colorMode,
|
|
@@ -4293,7 +4289,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
4293
4289
|
|
|
4294
4290
|
// src/context/theme.tsx
|
|
4295
4291
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4296
|
-
var ThemeContext = (0,
|
|
4292
|
+
var ThemeContext = (0, import_react32.createContext)(
|
|
4297
4293
|
null
|
|
4298
4294
|
);
|
|
4299
4295
|
function ThemeProvider(props) {
|
|
@@ -4305,7 +4301,7 @@ function ThemeProvider(props) {
|
|
|
4305
4301
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
4306
4302
|
}
|
|
4307
4303
|
function useThemeContext() {
|
|
4308
|
-
const context = (0,
|
|
4304
|
+
const context = (0, import_react32.useContext)(ThemeContext);
|
|
4309
4305
|
if (!context) {
|
|
4310
4306
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
4311
4307
|
}
|
|
@@ -4313,20 +4309,20 @@ function useThemeContext() {
|
|
|
4313
4309
|
}
|
|
4314
4310
|
|
|
4315
4311
|
// src/hooks/useRootColors.ts
|
|
4316
|
-
var
|
|
4312
|
+
var import_react33 = require("react");
|
|
4317
4313
|
function useRootColors(colors = []) {
|
|
4318
|
-
const [state, dispatch] = (0,
|
|
4319
|
-
const handleRefetch = (0,
|
|
4314
|
+
const [state, dispatch] = (0, import_react33.useReducer)(rootColorsReducer, {});
|
|
4315
|
+
const handleRefetch = (0, import_react33.useCallback)(() => {
|
|
4320
4316
|
return new Promise((resolve) => {
|
|
4321
4317
|
dispatch(formatColors(colors));
|
|
4322
4318
|
resolve();
|
|
4323
4319
|
});
|
|
4324
4320
|
}, []);
|
|
4325
|
-
(0,
|
|
4321
|
+
(0, import_react33.useEffect)(() => {
|
|
4326
4322
|
if (Object.keys(state).length === colors.length) return;
|
|
4327
4323
|
dispatch(formatColors(colors));
|
|
4328
4324
|
}, [colors]);
|
|
4329
|
-
return (0,
|
|
4325
|
+
return (0, import_react33.useMemo)(
|
|
4330
4326
|
() => ({ colors: state, refetch: handleRefetch }),
|
|
4331
4327
|
[state, handleRefetch]
|
|
4332
4328
|
);
|
|
@@ -4507,6 +4503,8 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
4507
4503
|
AccordionItemGroup,
|
|
4508
4504
|
AccordionItemIndicator,
|
|
4509
4505
|
AccordionItemTrigger,
|
|
4506
|
+
AccordionParts,
|
|
4507
|
+
AccordionRoot,
|
|
4510
4508
|
Admonition,
|
|
4511
4509
|
AdmonitionDescription,
|
|
4512
4510
|
AdmonitionHeading,
|