@cerberus-design/react 0.16.0-next-7f1fa64 → 0.16.0-next-d049636
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 +94 -48
- package/build/legacy/components/admonition/admonition.cjs +314 -0
- package/build/legacy/components/admonition/admonition.cjs.map +1 -0
- package/build/legacy/components/admonition/index.cjs +326 -0
- package/build/legacy/components/admonition/index.cjs.map +1 -0
- package/build/legacy/components/{Admonition.client.cjs → admonition/match-avatar.cjs} +61 -65
- package/build/legacy/components/admonition/match-avatar.cjs.map +1 -0
- package/build/legacy/components/admonition/parts.cjs +88 -0
- package/build/legacy/components/admonition/parts.cjs.map +1 -0
- package/build/legacy/components/admonition/primitives.cjs +85 -0
- package/build/legacy/components/admonition/primitives.cjs.map +1 -0
- package/build/legacy/index.cjs +749 -718
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +94 -48
- package/build/modern/chunk-572S5CLA.js +41 -0
- package/build/modern/chunk-572S5CLA.js.map +1 -0
- package/build/modern/{chunk-32M5JS5F.js → chunk-6I2FW4WI.js} +5 -5
- package/build/modern/{chunk-3B4SFTQB.js → chunk-A45TFOGO.js} +4 -4
- package/build/modern/{chunk-J7SAFAW3.js → chunk-EKIAT7N7.js} +4 -4
- package/build/modern/{chunk-Z6EXPMTS.js → chunk-EKZENP7X.js} +6 -6
- package/build/modern/{chunk-WA3QADO4.js → chunk-EQPYRZ3X.js} +4 -4
- package/build/modern/{chunk-R7IDIIST.js → chunk-LT62577B.js} +2 -2
- package/build/modern/{chunk-3J5D3O6Z.js → chunk-NTU5OYUF.js} +2 -2
- package/build/modern/chunk-RKGFPKKK.js +59 -0
- package/build/modern/chunk-RKGFPKKK.js.map +1 -0
- package/build/modern/chunk-RQCJKDXU.js +21 -0
- package/build/modern/chunk-RQCJKDXU.js.map +1 -0
- package/build/modern/chunk-TM6TVO2D.js +78 -0
- package/build/modern/chunk-TM6TVO2D.js.map +1 -0
- package/build/modern/chunk-UR2NYAQC.js +1 -0
- package/build/modern/{chunk-VNPLKMEM.js → chunk-VSTOSLFS.js} +4 -4
- package/build/modern/{chunk-R662TP4N.js → chunk-XYDJ5TRW.js} +12 -12
- package/build/modern/components/FileStatus.js +6 -6
- package/build/modern/components/admonition/admonition.js +15 -0
- package/build/modern/components/admonition/index.js +30 -0
- package/build/modern/components/admonition/index.js.map +1 -0
- package/build/modern/components/admonition/match-avatar.js +11 -0
- package/build/modern/components/admonition/match-avatar.js.map +1 -0
- package/build/modern/components/admonition/parts.js +8 -0
- package/build/modern/components/admonition/parts.js.map +1 -0
- package/build/modern/components/admonition/primitives.js +15 -0
- package/build/modern/components/admonition/primitives.js.map +1 -0
- package/build/modern/components/combobox/combobox.js +2 -2
- package/build/modern/components/combobox/index.js +6 -6
- 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 +5 -5
- package/build/modern/components/field/field.js +3 -3
- package/build/modern/components/field/index.js +6 -6
- package/build/modern/components/field/parts.js +3 -3
- package/build/modern/components/field/primitives.js +2 -2
- package/build/modern/context/confirm-modal.js +2 -2
- package/build/modern/context/field.js +2 -2
- package/build/modern/context/prompt-modal.js +9 -9
- package/build/modern/index.js +126 -113
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/admonition/admonition.tsx +65 -0
- package/src/components/admonition/index.ts +3 -0
- package/src/components/admonition/match-avatar.tsx +84 -0
- package/src/components/admonition/parts.ts +53 -0
- package/src/components/admonition/primitives.tsx +73 -0
- package/src/index.ts +1 -1
- package/build/legacy/components/Admonition.cjs +0 -273
- package/build/legacy/components/Admonition.cjs.map +0 -1
- package/build/legacy/components/Admonition.client.cjs.map +0 -1
- package/build/modern/chunk-2HOUQ2DX.js +0 -82
- package/build/modern/chunk-2HOUQ2DX.js.map +0 -1
- package/build/modern/chunk-DXBZ3HMY.js +0 -68
- package/build/modern/chunk-DXBZ3HMY.js.map +0 -1
- package/build/modern/components/Admonition.client.js +0 -11
- package/build/modern/components/Admonition.js +0 -15
- package/src/components/Admonition.client.tsx +0 -73
- package/src/components/Admonition.tsx +0 -117
- /package/build/modern/{chunk-32M5JS5F.js.map → chunk-6I2FW4WI.js.map} +0 -0
- /package/build/modern/{chunk-3B4SFTQB.js.map → chunk-A45TFOGO.js.map} +0 -0
- /package/build/modern/{chunk-J7SAFAW3.js.map → chunk-EKIAT7N7.js.map} +0 -0
- /package/build/modern/{chunk-Z6EXPMTS.js.map → chunk-EKZENP7X.js.map} +0 -0
- /package/build/modern/{chunk-WA3QADO4.js.map → chunk-EQPYRZ3X.js.map} +0 -0
- /package/build/modern/{chunk-R7IDIIST.js.map → chunk-LT62577B.js.map} +0 -0
- /package/build/modern/{chunk-3J5D3O6Z.js.map → chunk-NTU5OYUF.js.map} +0 -0
- /package/build/modern/{components/Admonition.client.js.map → chunk-UR2NYAQC.js.map} +0 -0
- /package/build/modern/{chunk-VNPLKMEM.js.map → chunk-VSTOSLFS.js.map} +0 -0
- /package/build/modern/{chunk-R662TP4N.js.map → chunk-XYDJ5TRW.js.map} +0 -0
- /package/build/modern/components/{Admonition.js.map → admonition/admonition.js.map} +0 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -30,8 +30,12 @@ __export(src_exports, {
|
|
|
30
30
|
AccordionParts: () => AccordionParts,
|
|
31
31
|
AccordionRoot: () => AccordionRoot,
|
|
32
32
|
Admonition: () => Admonition,
|
|
33
|
+
AdmonitionContent: () => AdmonitionContent,
|
|
33
34
|
AdmonitionDescription: () => AdmonitionDescription,
|
|
34
35
|
AdmonitionHeading: () => AdmonitionHeading,
|
|
36
|
+
AdmonitionIndicator: () => AdmonitionIndicator,
|
|
37
|
+
AdmonitionParts: () => AdmonitionParts,
|
|
38
|
+
AdmonitionRoot: () => AdmonitionRoot,
|
|
35
39
|
Avatar: () => Avatar,
|
|
36
40
|
Button: () => Button,
|
|
37
41
|
ButtonIcon: () => ButtonIcon,
|
|
@@ -959,107 +963,69 @@ function useToggle(options) {
|
|
|
959
963
|
return (0, import_react10.useMemo)(() => ({ checked, handleChange }), [checked, handleChange]);
|
|
960
964
|
}
|
|
961
965
|
|
|
962
|
-
// src/components/
|
|
963
|
-
var
|
|
966
|
+
// src/components/admonition/primitives.tsx
|
|
967
|
+
var import_factory = require("@ark-ui/react/factory");
|
|
964
968
|
var import_css15 = require("@cerberus/styled-system/css");
|
|
965
969
|
var import_recipes11 = require("@cerberus/styled-system/recipes");
|
|
966
970
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
967
|
-
function
|
|
968
|
-
const {
|
|
969
|
-
const styles = (0, import_recipes11.
|
|
971
|
+
function AdmonitionRoot(props) {
|
|
972
|
+
const { palette, usage, ...nativeProps } = props;
|
|
973
|
+
const styles = (0, import_recipes11.admonition)({ palette, usage });
|
|
970
974
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
971
|
-
|
|
975
|
+
import_factory.ark.aside,
|
|
972
976
|
{
|
|
973
|
-
...
|
|
974
|
-
className: (0, import_css15.cx)(styles.root,
|
|
975
|
-
"data-
|
|
977
|
+
...nativeProps,
|
|
978
|
+
className: (0, import_css15.cx)(styles.root, nativeProps.className),
|
|
979
|
+
"data-scope": "admonition",
|
|
980
|
+
"data-part": "root"
|
|
976
981
|
}
|
|
977
982
|
);
|
|
978
983
|
}
|
|
979
|
-
function
|
|
980
|
-
|
|
981
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_accordion.Accordion.Item, { ...props, className: (0, import_css15.cx)(styles.item, props.className) });
|
|
984
|
+
function AdmonitionIndicator(props) {
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_factory.ark.span, { ...props, "data-scope": "admonition", "data-part": "indicator" });
|
|
982
986
|
}
|
|
983
|
-
function
|
|
984
|
-
|
|
985
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
986
|
-
import_accordion.Accordion.ItemTrigger,
|
|
987
|
-
{
|
|
988
|
-
...props,
|
|
989
|
-
className: (0, import_css15.cx)(styles.itemTrigger, props.className)
|
|
990
|
-
}
|
|
991
|
-
);
|
|
987
|
+
function AdmonitionContent(props) {
|
|
988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_factory.ark.div, { ...props, "data-scope": "admonition", "data-part": "content" });
|
|
992
989
|
}
|
|
993
|
-
function
|
|
994
|
-
const styles = (0, import_recipes11.
|
|
990
|
+
function AdmonitionHeading(props) {
|
|
991
|
+
const styles = (0, import_recipes11.admonition)();
|
|
995
992
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
996
|
-
|
|
993
|
+
import_factory.ark.p,
|
|
997
994
|
{
|
|
998
995
|
...props,
|
|
999
|
-
className: (0, import_css15.cx)(styles.
|
|
996
|
+
className: (0, import_css15.cx)(styles.heading, props.className),
|
|
997
|
+
"data-scope": "admonition",
|
|
998
|
+
"data-part": "heading"
|
|
1000
999
|
}
|
|
1001
1000
|
);
|
|
1002
1001
|
}
|
|
1003
|
-
function
|
|
1004
|
-
const styles = (0, import_recipes11.
|
|
1002
|
+
function AdmonitionDescription(props) {
|
|
1003
|
+
const styles = (0, import_recipes11.admonition)();
|
|
1005
1004
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1006
|
-
|
|
1005
|
+
import_factory.ark.p,
|
|
1007
1006
|
{
|
|
1008
1007
|
...props,
|
|
1009
|
-
className: (0, import_css15.cx)(styles.
|
|
1008
|
+
className: (0, import_css15.cx)(styles.description, props.className),
|
|
1009
|
+
"data-scope": "admonition",
|
|
1010
|
+
"data-part": "description"
|
|
1010
1011
|
}
|
|
1011
1012
|
);
|
|
1012
1013
|
}
|
|
1013
1014
|
|
|
1014
|
-
// src/components/
|
|
1015
|
-
var
|
|
1016
|
-
Root:
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1015
|
+
// src/components/admonition/parts.ts
|
|
1016
|
+
var AdmonitionParts = {
|
|
1017
|
+
Root: AdmonitionRoot,
|
|
1018
|
+
Indicator: AdmonitionIndicator,
|
|
1019
|
+
Content: AdmonitionContent,
|
|
1020
|
+
Heading: AdmonitionHeading,
|
|
1021
|
+
Description: AdmonitionDescription
|
|
1021
1022
|
};
|
|
1022
1023
|
|
|
1023
|
-
// src/components/accordion/item-indicator.tsx
|
|
1024
|
-
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1025
|
-
function AccordionChevronItemIndicator(props) {
|
|
1026
|
-
const { size, ...indicatorProps } = props;
|
|
1027
|
-
const iconSize = size === "sm" ? 16 : "24";
|
|
1028
|
-
const { icons } = useCerberusContext();
|
|
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 }) });
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
// src/components/accordion/item-group.tsx
|
|
1034
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1035
|
-
var Accordion2 = AccordionParts.Root;
|
|
1036
|
-
function AccordionItemGroup(props) {
|
|
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, {}) })
|
|
1048
|
-
] }),
|
|
1049
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AccordionParts.ItemContent, { children: groupProps.children })
|
|
1050
|
-
] });
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
// src/components/Admonition.tsx
|
|
1054
|
-
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1055
|
-
var import_css17 = require("@cerberus/styled-system/css");
|
|
1056
|
-
var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
1057
|
-
|
|
1058
1024
|
// src/components/Avatar.tsx
|
|
1059
1025
|
var import_css16 = require("@cerberus/styled-system/css");
|
|
1060
1026
|
var import_patterns3 = require("@cerberus/styled-system/patterns");
|
|
1061
1027
|
var import_recipes12 = require("@cerberus/styled-system/recipes");
|
|
1062
|
-
var
|
|
1028
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1063
1029
|
function Avatar(props) {
|
|
1064
1030
|
const {
|
|
1065
1031
|
ariaLabel,
|
|
@@ -1075,7 +1041,7 @@ function Avatar(props) {
|
|
|
1075
1041
|
const { icons } = useCerberusContext();
|
|
1076
1042
|
const { avatar: AvatarIcon } = icons;
|
|
1077
1043
|
const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
|
|
1078
|
-
return /* @__PURE__ */ (0,
|
|
1044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1079
1045
|
"div",
|
|
1080
1046
|
{
|
|
1081
1047
|
...nativeProps,
|
|
@@ -1084,19 +1050,19 @@ function Avatar(props) {
|
|
|
1084
1050
|
(0, import_recipes12.avatar)({ gradient, size }),
|
|
1085
1051
|
(0, import_patterns3.circle)()
|
|
1086
1052
|
),
|
|
1087
|
-
children: /* @__PURE__ */ (0,
|
|
1053
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1088
1054
|
Show,
|
|
1089
1055
|
{
|
|
1090
1056
|
when: Boolean(src) || Boolean(as),
|
|
1091
|
-
fallback: /* @__PURE__ */ (0,
|
|
1057
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1092
1058
|
Show,
|
|
1093
1059
|
{
|
|
1094
1060
|
when: Boolean(initials),
|
|
1095
|
-
fallback: /* @__PURE__ */ (0,
|
|
1061
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1096
1062
|
Show,
|
|
1097
1063
|
{
|
|
1098
1064
|
when: Boolean(icon),
|
|
1099
|
-
fallback: /* @__PURE__ */ (0,
|
|
1065
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1100
1066
|
AvatarIcon,
|
|
1101
1067
|
{
|
|
1102
1068
|
size: iconSizeMap[size]
|
|
@@ -1108,11 +1074,11 @@ function Avatar(props) {
|
|
|
1108
1074
|
children: initials
|
|
1109
1075
|
}
|
|
1110
1076
|
),
|
|
1111
|
-
children: /* @__PURE__ */ (0,
|
|
1077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1112
1078
|
Show,
|
|
1113
1079
|
{
|
|
1114
1080
|
when: Boolean(as),
|
|
1115
|
-
fallback: /* @__PURE__ */ (0,
|
|
1081
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1116
1082
|
"img",
|
|
1117
1083
|
{
|
|
1118
1084
|
alt: props.ariaLabel,
|
|
@@ -1147,9 +1113,11 @@ var iconSizeMap = {
|
|
|
1147
1113
|
"4xl": 32
|
|
1148
1114
|
};
|
|
1149
1115
|
|
|
1150
|
-
// src/components/
|
|
1151
|
-
var
|
|
1116
|
+
// src/components/admonition/match-avatar.tsx
|
|
1117
|
+
var import_react11 = require("react");
|
|
1118
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1152
1119
|
function MatchAvatar(props) {
|
|
1120
|
+
const { palette = "page" } = props;
|
|
1153
1121
|
const { icons } = useCerberusContext();
|
|
1154
1122
|
const {
|
|
1155
1123
|
infoNotification: InfoIcon,
|
|
@@ -1157,127 +1125,186 @@ function MatchAvatar(props) {
|
|
|
1157
1125
|
warningNotification: WarningIcon,
|
|
1158
1126
|
dangerNotification: DangerIcon
|
|
1159
1127
|
} = icons;
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
{
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
src: ""
|
|
1214
|
-
}
|
|
1215
|
-
);
|
|
1216
|
-
default:
|
|
1217
|
-
throw new Error("Unsupported admonition palette");
|
|
1218
|
-
}
|
|
1128
|
+
const elRef = (0, import_react11.useRef)({
|
|
1129
|
+
page: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1130
|
+
Avatar,
|
|
1131
|
+
{
|
|
1132
|
+
gradient: "charon-light",
|
|
1133
|
+
ariaLabel: "",
|
|
1134
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InfoIcon, {}),
|
|
1135
|
+
size: "sm",
|
|
1136
|
+
src: ""
|
|
1137
|
+
}
|
|
1138
|
+
),
|
|
1139
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1140
|
+
Avatar,
|
|
1141
|
+
{
|
|
1142
|
+
gradient: "amphiaraus-dark",
|
|
1143
|
+
ariaLabel: "",
|
|
1144
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InfoIcon, {}),
|
|
1145
|
+
size: "sm",
|
|
1146
|
+
src: ""
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1149
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1150
|
+
Avatar,
|
|
1151
|
+
{
|
|
1152
|
+
gradient: "thanatos-dark",
|
|
1153
|
+
ariaLabel: "",
|
|
1154
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SuccessIcon, {}),
|
|
1155
|
+
size: "sm",
|
|
1156
|
+
src: ""
|
|
1157
|
+
}
|
|
1158
|
+
),
|
|
1159
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1160
|
+
Avatar,
|
|
1161
|
+
{
|
|
1162
|
+
gradient: "asphodel-light",
|
|
1163
|
+
ariaLabel: "",
|
|
1164
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WarningIcon, {}),
|
|
1165
|
+
size: "sm",
|
|
1166
|
+
src: ""
|
|
1167
|
+
}
|
|
1168
|
+
),
|
|
1169
|
+
danger: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1170
|
+
Avatar,
|
|
1171
|
+
{
|
|
1172
|
+
gradient: "hades-light",
|
|
1173
|
+
ariaLabel: "",
|
|
1174
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DangerIcon, {}),
|
|
1175
|
+
size: "sm",
|
|
1176
|
+
src: ""
|
|
1177
|
+
}
|
|
1178
|
+
)
|
|
1179
|
+
});
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: elRef.current[palette] });
|
|
1219
1181
|
}
|
|
1220
1182
|
|
|
1221
|
-
// src/components/
|
|
1222
|
-
var
|
|
1183
|
+
// src/components/admonition/admonition.tsx
|
|
1184
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1223
1185
|
function Admonition(props) {
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1226
|
-
"
|
|
1186
|
+
const [elProps, styleProps, rootProps] = splitProps(
|
|
1187
|
+
props,
|
|
1188
|
+
["heading", "icon", "children"],
|
|
1189
|
+
["palette", "usage"]
|
|
1190
|
+
);
|
|
1191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(AdmonitionParts.Root, { ...styleProps, ...rootProps, children: [
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1193
|
+
Show,
|
|
1194
|
+
{
|
|
1195
|
+
when: Boolean(elProps.icon),
|
|
1196
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MatchAvatar, { palette: styleProps.palette }),
|
|
1197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AdmonitionParts.Indicator, { children: elProps.icon })
|
|
1198
|
+
}
|
|
1199
|
+
),
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(AdmonitionParts.Content, { children: [
|
|
1201
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Show, { when: Boolean(elProps.heading), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AdmonitionParts.Heading, { children: elProps.heading }) }),
|
|
1202
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(AdmonitionParts.Description, { children: elProps.children })
|
|
1203
|
+
] })
|
|
1204
|
+
] });
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
// src/components/accordion/primitives.tsx
|
|
1208
|
+
var import_accordion = require("@ark-ui/react/accordion");
|
|
1209
|
+
var import_css17 = require("@cerberus/styled-system/css");
|
|
1210
|
+
var import_recipes13 = require("@cerberus/styled-system/recipes");
|
|
1211
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1212
|
+
function AccordionRoot(props) {
|
|
1213
|
+
const { size, ...rootProps } = props;
|
|
1214
|
+
const styles = (0, import_recipes13.accordion)({ size });
|
|
1215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1216
|
+
import_accordion.Accordion.Root,
|
|
1227
1217
|
{
|
|
1228
|
-
...
|
|
1229
|
-
className: (0, import_css17.cx)(
|
|
1230
|
-
|
|
1231
|
-
(0, import_patterns4.hstack)({
|
|
1232
|
-
gap: "md",
|
|
1233
|
-
w: "full"
|
|
1234
|
-
}),
|
|
1235
|
-
(0, import_recipes13.admonition)({ palette, usage }).root
|
|
1236
|
-
),
|
|
1237
|
-
children: [
|
|
1238
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Show, { when: Boolean(icon), fallback: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MatchAvatar, { palette }), children: icon }),
|
|
1239
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children })
|
|
1240
|
-
]
|
|
1218
|
+
...props,
|
|
1219
|
+
className: (0, import_css17.cx)(styles.root, rootProps.className),
|
|
1220
|
+
"data-size": size
|
|
1241
1221
|
}
|
|
1242
1222
|
);
|
|
1243
1223
|
}
|
|
1244
|
-
function
|
|
1245
|
-
const
|
|
1246
|
-
return /* @__PURE__ */ (0,
|
|
1247
|
-
|
|
1224
|
+
function AccordionItem(props) {
|
|
1225
|
+
const styles = (0, import_recipes13.accordion)();
|
|
1226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_accordion.Accordion.Item, { ...props, className: (0, import_css17.cx)(styles.item, props.className) });
|
|
1227
|
+
}
|
|
1228
|
+
function AccordionItemTrigger(props) {
|
|
1229
|
+
const styles = (0, import_recipes13.accordion)();
|
|
1230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1231
|
+
import_accordion.Accordion.ItemTrigger,
|
|
1248
1232
|
{
|
|
1249
|
-
...
|
|
1250
|
-
className: (0, import_css17.cx)(
|
|
1251
|
-
nativeProps.className,
|
|
1252
|
-
(0, import_recipes13.admonition)({ palette, usage }).heading
|
|
1253
|
-
)
|
|
1233
|
+
...props,
|
|
1234
|
+
className: (0, import_css17.cx)(styles.itemTrigger, props.className)
|
|
1254
1235
|
}
|
|
1255
1236
|
);
|
|
1256
1237
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const
|
|
1259
|
-
return /* @__PURE__ */ (0,
|
|
1260
|
-
|
|
1238
|
+
function AccordionItemIndicator(props) {
|
|
1239
|
+
const styles = (0, import_recipes13.accordion)();
|
|
1240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1241
|
+
import_accordion.Accordion.ItemIndicator,
|
|
1261
1242
|
{
|
|
1262
|
-
...
|
|
1263
|
-
className: (0, import_css17.cx)(
|
|
1264
|
-
nativeProps.className,
|
|
1265
|
-
(0, import_recipes13.admonition)({ palette, usage }).description
|
|
1266
|
-
)
|
|
1243
|
+
...props,
|
|
1244
|
+
className: (0, import_css17.cx)(styles.itemIndicator, props.className)
|
|
1267
1245
|
}
|
|
1268
1246
|
);
|
|
1269
1247
|
}
|
|
1248
|
+
function AccordionItemContent(props) {
|
|
1249
|
+
const styles = (0, import_recipes13.accordion)();
|
|
1250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1251
|
+
import_accordion.Accordion.ItemContent,
|
|
1252
|
+
{
|
|
1253
|
+
...props,
|
|
1254
|
+
className: (0, import_css17.cx)(styles.itemContent, props.className)
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
// src/components/accordion/parts.ts
|
|
1260
|
+
var AccordionParts = {
|
|
1261
|
+
Root: AccordionRoot,
|
|
1262
|
+
Item: AccordionItem,
|
|
1263
|
+
ItemTrigger: AccordionItemTrigger,
|
|
1264
|
+
ItemContent: AccordionItemContent,
|
|
1265
|
+
ItemIndicator: AccordionItemIndicator
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1268
|
+
// src/components/accordion/item-indicator.tsx
|
|
1269
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1270
|
+
function AccordionChevronItemIndicator(props) {
|
|
1271
|
+
const { size, ...indicatorProps } = props;
|
|
1272
|
+
const iconSize = size === "sm" ? 16 : "24";
|
|
1273
|
+
const { icons } = useCerberusContext();
|
|
1274
|
+
const { accordionIndicator: ChevronDown } = icons;
|
|
1275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AccordionParts.ItemIndicator, { ...indicatorProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChevronDown, { size: iconSize }) });
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
// src/components/accordion/item-group.tsx
|
|
1279
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1280
|
+
var Accordion2 = AccordionParts.Root;
|
|
1281
|
+
function AccordionItemGroup(props) {
|
|
1282
|
+
const [groupProps, itemProps] = splitProps(props, [
|
|
1283
|
+
"heading",
|
|
1284
|
+
"children",
|
|
1285
|
+
"indicatorPosition"
|
|
1286
|
+
]);
|
|
1287
|
+
const indicatorPosition = groupProps.indicatorPosition ?? "end";
|
|
1288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(AccordionParts.Item, { ...itemProps, children: [
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(AccordionParts.ItemTrigger, { "data-indicator-position": indicatorPosition, children: [
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: indicatorPosition === "start", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AccordionChevronItemIndicator, {}) }),
|
|
1291
|
+
groupProps.heading,
|
|
1292
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Show, { when: indicatorPosition === "end", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AccordionChevronItemIndicator, {}) })
|
|
1293
|
+
] }),
|
|
1294
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AccordionParts.ItemContent, { children: groupProps.children })
|
|
1295
|
+
] });
|
|
1296
|
+
}
|
|
1270
1297
|
|
|
1271
1298
|
// src/components/button/button.tsx
|
|
1272
|
-
var
|
|
1299
|
+
var import_react12 = require("react");
|
|
1273
1300
|
var import_css18 = require("@cerberus/styled-system/css");
|
|
1274
1301
|
var import_recipes14 = require("@cerberus/styled-system/recipes");
|
|
1275
1302
|
var import_jsx2 = require("@cerberus/styled-system/jsx");
|
|
1276
1303
|
|
|
1277
1304
|
// src/components/Spinner.tsx
|
|
1278
|
-
var
|
|
1305
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1279
1306
|
function Spinner(props) {
|
|
1280
|
-
return /* @__PURE__ */ (0,
|
|
1307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1281
1308
|
"svg",
|
|
1282
1309
|
{
|
|
1283
1310
|
"aria-busy": "true",
|
|
@@ -1287,7 +1314,7 @@ function Spinner(props) {
|
|
|
1287
1314
|
width: props.size,
|
|
1288
1315
|
viewBox: "0 0 24 24",
|
|
1289
1316
|
...props,
|
|
1290
|
-
children: /* @__PURE__ */ (0,
|
|
1317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1291
1318
|
"g",
|
|
1292
1319
|
{
|
|
1293
1320
|
fill: "none",
|
|
@@ -1296,14 +1323,14 @@ function Spinner(props) {
|
|
|
1296
1323
|
strokeLinejoin: "round",
|
|
1297
1324
|
strokeWidth: 2,
|
|
1298
1325
|
children: [
|
|
1299
|
-
/* @__PURE__ */ (0,
|
|
1326
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1300
1327
|
"path",
|
|
1301
1328
|
{
|
|
1302
1329
|
strokeDasharray: 16,
|
|
1303
1330
|
strokeDashoffset: 16,
|
|
1304
1331
|
d: "M12 3c4.97 0 9 4.03 9 9",
|
|
1305
1332
|
children: [
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1307
1334
|
"animate",
|
|
1308
1335
|
{
|
|
1309
1336
|
fill: "freeze",
|
|
@@ -1312,7 +1339,7 @@ function Spinner(props) {
|
|
|
1312
1339
|
values: "16;0"
|
|
1313
1340
|
}
|
|
1314
1341
|
),
|
|
1315
|
-
/* @__PURE__ */ (0,
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1316
1343
|
"animateTransform",
|
|
1317
1344
|
{
|
|
1318
1345
|
attributeName: "transform",
|
|
@@ -1325,14 +1352,14 @@ function Spinner(props) {
|
|
|
1325
1352
|
]
|
|
1326
1353
|
}
|
|
1327
1354
|
),
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1355
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1329
1356
|
"path",
|
|
1330
1357
|
{
|
|
1331
1358
|
strokeDasharray: 64,
|
|
1332
1359
|
strokeDashoffset: 64,
|
|
1333
1360
|
strokeOpacity: 0.3,
|
|
1334
1361
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z",
|
|
1335
|
-
children: /* @__PURE__ */ (0,
|
|
1362
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1336
1363
|
"animate",
|
|
1337
1364
|
{
|
|
1338
1365
|
fill: "freeze",
|
|
@@ -1351,14 +1378,14 @@ function Spinner(props) {
|
|
|
1351
1378
|
}
|
|
1352
1379
|
|
|
1353
1380
|
// src/components/button/button.tsx
|
|
1354
|
-
var
|
|
1355
|
-
var ButtonContext = (0,
|
|
1381
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1382
|
+
var ButtonContext = (0, import_react12.createContext)({
|
|
1356
1383
|
pending: false
|
|
1357
1384
|
});
|
|
1358
1385
|
function Button(props) {
|
|
1359
1386
|
const { palette, usage, shape, size, pending = false, ...nativeProps } = props;
|
|
1360
|
-
const value = (0,
|
|
1361
|
-
return /* @__PURE__ */ (0,
|
|
1387
|
+
const value = (0, import_react12.useMemo)(() => ({ pending }), [pending]);
|
|
1388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ButtonContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1362
1389
|
"button",
|
|
1363
1390
|
{
|
|
1364
1391
|
...nativeProps,
|
|
@@ -1376,8 +1403,8 @@ function Button(props) {
|
|
|
1376
1403
|
) });
|
|
1377
1404
|
}
|
|
1378
1405
|
function ButtonIcon(props) {
|
|
1379
|
-
const { pending } = (0,
|
|
1380
|
-
return /* @__PURE__ */ (0,
|
|
1406
|
+
const { pending } = (0, import_react12.useContext)(ButtonContext);
|
|
1407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Show, { when: pending, fallback: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: props.children }), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx2.Box, { w: "4", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Spinner, {}) }) });
|
|
1381
1408
|
}
|
|
1382
1409
|
|
|
1383
1410
|
// src/components/button/parts.ts
|
|
@@ -1388,49 +1415,49 @@ var ButtonParts = {
|
|
|
1388
1415
|
|
|
1389
1416
|
// src/components/Text.tsx
|
|
1390
1417
|
var import_jsx3 = require("@cerberus/styled-system/jsx");
|
|
1391
|
-
var
|
|
1418
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1392
1419
|
function Text(props) {
|
|
1393
1420
|
const { as = "p", ...pandaJSXProps } = props;
|
|
1394
1421
|
switch (as) {
|
|
1395
1422
|
case "h1":
|
|
1396
|
-
return /* @__PURE__ */ (0,
|
|
1423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.H1, { ...pandaJSXProps });
|
|
1397
1424
|
case "h2":
|
|
1398
|
-
return /* @__PURE__ */ (0,
|
|
1425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.H2, { ...pandaJSXProps });
|
|
1399
1426
|
case "h3":
|
|
1400
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.H3, { ...pandaJSXProps });
|
|
1401
1428
|
case "h4":
|
|
1402
|
-
return /* @__PURE__ */ (0,
|
|
1429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.H4, { ...pandaJSXProps });
|
|
1403
1430
|
case "h5":
|
|
1404
|
-
return /* @__PURE__ */ (0,
|
|
1431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.H5, { ...pandaJSXProps });
|
|
1405
1432
|
case "h6":
|
|
1406
|
-
return /* @__PURE__ */ (0,
|
|
1433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.H6, { ...pandaJSXProps });
|
|
1407
1434
|
case "strong":
|
|
1408
|
-
return /* @__PURE__ */ (0,
|
|
1435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.Strong, { ...pandaJSXProps });
|
|
1409
1436
|
case "em":
|
|
1410
|
-
return /* @__PURE__ */ (0,
|
|
1437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.Em, { ...pandaJSXProps });
|
|
1411
1438
|
case "small":
|
|
1412
|
-
return /* @__PURE__ */ (0,
|
|
1439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.Small, { ...pandaJSXProps });
|
|
1413
1440
|
case "span":
|
|
1414
|
-
return /* @__PURE__ */ (0,
|
|
1441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.Span, { ...pandaJSXProps });
|
|
1415
1442
|
default:
|
|
1416
|
-
return /* @__PURE__ */ (0,
|
|
1443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx3.P, { ...pandaJSXProps });
|
|
1417
1444
|
}
|
|
1418
1445
|
}
|
|
1419
1446
|
|
|
1420
1447
|
// src/components/checkbox/primitives.tsx
|
|
1421
|
-
var
|
|
1448
|
+
var import_react13 = require("@ark-ui/react");
|
|
1422
1449
|
var import_css19 = require("@cerberus/styled-system/css");
|
|
1423
1450
|
var import_recipes15 = require("@cerberus/styled-system/recipes");
|
|
1424
|
-
var
|
|
1451
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1425
1452
|
function CheckboxRoot(props) {
|
|
1426
1453
|
const styles = (0, import_recipes15.checkbox)();
|
|
1427
|
-
return /* @__PURE__ */ (0,
|
|
1454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react13.Checkbox.Root, { ...props, className: (0, import_css19.cx)(styles.root, props.className) });
|
|
1428
1455
|
}
|
|
1429
1456
|
function CheckboxLabel(props) {
|
|
1430
1457
|
const { size, ...labelProps } = props;
|
|
1431
1458
|
const styles = (0, import_recipes15.checkbox)({ size });
|
|
1432
|
-
return /* @__PURE__ */ (0,
|
|
1433
|
-
|
|
1459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1460
|
+
import_react13.Checkbox.Label,
|
|
1434
1461
|
{
|
|
1435
1462
|
...labelProps,
|
|
1436
1463
|
className: (0, import_css19.cx)(styles.label, labelProps.className)
|
|
@@ -1440,8 +1467,8 @@ function CheckboxLabel(props) {
|
|
|
1440
1467
|
function CheckboxControl(props) {
|
|
1441
1468
|
const { size, ...controlProps } = props;
|
|
1442
1469
|
const styles = (0, import_recipes15.checkbox)({ size });
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1444
|
-
|
|
1470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1471
|
+
import_react13.Checkbox.Control,
|
|
1445
1472
|
{
|
|
1446
1473
|
...controlProps,
|
|
1447
1474
|
className: (0, import_css19.cx)(styles.control, controlProps.className)
|
|
@@ -1450,8 +1477,8 @@ function CheckboxControl(props) {
|
|
|
1450
1477
|
}
|
|
1451
1478
|
function CheckboxIndicator(props) {
|
|
1452
1479
|
const styles = (0, import_recipes15.checkbox)();
|
|
1453
|
-
return /* @__PURE__ */ (0,
|
|
1454
|
-
|
|
1480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1481
|
+
import_react13.Checkbox.Indicator,
|
|
1455
1482
|
{
|
|
1456
1483
|
...props,
|
|
1457
1484
|
className: (0, import_css19.cx)(styles.indicator, props.className)
|
|
@@ -1459,11 +1486,11 @@ function CheckboxIndicator(props) {
|
|
|
1459
1486
|
);
|
|
1460
1487
|
}
|
|
1461
1488
|
function CheckboxHiddenInput(props) {
|
|
1462
|
-
return /* @__PURE__ */ (0,
|
|
1489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react13.Checkbox.HiddenInput, { ...props });
|
|
1463
1490
|
}
|
|
1464
1491
|
function CheckboxGroup(props) {
|
|
1465
1492
|
const styles = (0, import_recipes15.checkbox)();
|
|
1466
|
-
return /* @__PURE__ */ (0,
|
|
1493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react13.Checkbox.Group, { ...props, className: (0, import_css19.cx)(styles.group, props.className) });
|
|
1467
1494
|
}
|
|
1468
1495
|
|
|
1469
1496
|
// src/components/checkbox/parts.ts
|
|
@@ -1477,38 +1504,38 @@ var CheckboxParts = {
|
|
|
1477
1504
|
};
|
|
1478
1505
|
|
|
1479
1506
|
// src/components/checkbox/checkbox-icon.tsx
|
|
1480
|
-
var
|
|
1507
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1481
1508
|
function CheckboxIcon(props) {
|
|
1482
1509
|
const { icons } = useCerberusContext();
|
|
1483
1510
|
const { checkbox: CheckIcon, indeterminate: IndeterminateIcon2 } = icons;
|
|
1484
|
-
return /* @__PURE__ */ (0,
|
|
1511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckboxParts.Indicator, { indeterminate: props.indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Show, { when: props.indeterminate, fallback: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CheckIcon, {}), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IndeterminateIcon2, {}) }) });
|
|
1485
1512
|
}
|
|
1486
1513
|
|
|
1487
1514
|
// src/components/checkbox/checkbox.tsx
|
|
1488
|
-
var
|
|
1515
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1489
1516
|
function Checkbox2(props) {
|
|
1490
1517
|
const { size, children, ...rootProps } = props;
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1492
|
-
/* @__PURE__ */ (0,
|
|
1493
|
-
/* @__PURE__ */ (0,
|
|
1518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(CheckboxParts.Root, { ...rootProps, children: [
|
|
1519
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckboxParts.Control, { size, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckboxIcon, { indeterminate: rootProps.checked === "indeterminate" }) }),
|
|
1520
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(CheckboxParts.Label, { size, children: [
|
|
1494
1521
|
children,
|
|
1495
|
-
/* @__PURE__ */ (0,
|
|
1522
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Show, { when: props.required, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Text, { as: "span", "data-part": "required-indicator", children: "(required)" }) })
|
|
1496
1523
|
] }),
|
|
1497
|
-
/* @__PURE__ */ (0,
|
|
1524
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CheckboxParts.HiddenInput, {})
|
|
1498
1525
|
] });
|
|
1499
1526
|
}
|
|
1500
1527
|
|
|
1501
1528
|
// src/components/CircularProgress.tsx
|
|
1502
|
-
var
|
|
1529
|
+
var import_patterns4 = require("@cerberus/styled-system/patterns");
|
|
1503
1530
|
var import_css20 = require("@cerberus/styled-system/css");
|
|
1504
|
-
var
|
|
1531
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1505
1532
|
function CircularProgress(props) {
|
|
1506
1533
|
const strokeW = 14;
|
|
1507
1534
|
const radius = `calc(50% * (1 - ${strokeW}/100))`;
|
|
1508
1535
|
const status = props.syntax ?? "Done";
|
|
1509
1536
|
const now = props.now >= 100 ? 100 : props.now;
|
|
1510
1537
|
const bgStyle = props.bgStyle ?? "filled";
|
|
1511
|
-
return /* @__PURE__ */ (0,
|
|
1538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1512
1539
|
"div",
|
|
1513
1540
|
{
|
|
1514
1541
|
id: props.id,
|
|
@@ -1516,14 +1543,14 @@ function CircularProgress(props) {
|
|
|
1516
1543
|
"aria-valuemin": 0,
|
|
1517
1544
|
"aria-valuemax": 100,
|
|
1518
1545
|
"aria-valuenow": now,
|
|
1519
|
-
className: (0,
|
|
1546
|
+
className: (0, import_patterns4.cq)({
|
|
1520
1547
|
alignSelf: "stretch",
|
|
1521
1548
|
flex: 1,
|
|
1522
1549
|
m: "4px",
|
|
1523
1550
|
position: "relative"
|
|
1524
1551
|
}),
|
|
1525
1552
|
role: "progressbar",
|
|
1526
|
-
children: /* @__PURE__ */ (0,
|
|
1553
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1527
1554
|
"svg",
|
|
1528
1555
|
{
|
|
1529
1556
|
"data-complete": now === 100,
|
|
@@ -1538,17 +1565,17 @@ function CircularProgress(props) {
|
|
|
1538
1565
|
viewBox: "0 0 100 100",
|
|
1539
1566
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1540
1567
|
children: [
|
|
1541
|
-
/* @__PURE__ */ (0,
|
|
1542
|
-
/* @__PURE__ */ (0,
|
|
1543
|
-
/* @__PURE__ */ (0,
|
|
1544
|
-
/* @__PURE__ */ (0,
|
|
1568
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("title", { children: props.title }),
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("desc", { children: `${now}% ${status}` }),
|
|
1570
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("linearGradient", { id: "gradient", children: [
|
|
1571
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1545
1572
|
"stop",
|
|
1546
1573
|
{
|
|
1547
1574
|
offset: "0%",
|
|
1548
1575
|
stopColor: "var(--cerberus-colors-data-viz-progress-start)"
|
|
1549
1576
|
}
|
|
1550
1577
|
),
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1552
1579
|
"stop",
|
|
1553
1580
|
{
|
|
1554
1581
|
offset: "100%",
|
|
@@ -1556,7 +1583,7 @@ function CircularProgress(props) {
|
|
|
1556
1583
|
}
|
|
1557
1584
|
)
|
|
1558
1585
|
] }) }),
|
|
1559
|
-
/* @__PURE__ */ (0,
|
|
1586
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Show, { when: bgStyle === "filled", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1560
1587
|
"circle",
|
|
1561
1588
|
{
|
|
1562
1589
|
className: (0, import_css20.css)({
|
|
@@ -1568,7 +1595,7 @@ function CircularProgress(props) {
|
|
|
1568
1595
|
pathLength: "100"
|
|
1569
1596
|
}
|
|
1570
1597
|
) }),
|
|
1571
|
-
/* @__PURE__ */ (0,
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1572
1599
|
"circle",
|
|
1573
1600
|
{
|
|
1574
1601
|
className: (0, import_css20.css)({
|
|
@@ -1580,7 +1607,7 @@ function CircularProgress(props) {
|
|
|
1580
1607
|
pathLength: "100"
|
|
1581
1608
|
}
|
|
1582
1609
|
),
|
|
1583
|
-
/* @__PURE__ */ (0,
|
|
1610
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1584
1611
|
"circle",
|
|
1585
1612
|
{
|
|
1586
1613
|
"data-complete": now === 100,
|
|
@@ -1601,8 +1628,8 @@ function CircularProgress(props) {
|
|
|
1601
1628
|
transform: "rotate(-90 50 50)"
|
|
1602
1629
|
}
|
|
1603
1630
|
),
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
1605
|
-
/* @__PURE__ */ (0,
|
|
1631
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("g", { children: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1606
1633
|
"text",
|
|
1607
1634
|
{
|
|
1608
1635
|
className: (0, import_css20.css)({
|
|
@@ -1620,7 +1647,7 @@ function CircularProgress(props) {
|
|
|
1620
1647
|
]
|
|
1621
1648
|
}
|
|
1622
1649
|
),
|
|
1623
|
-
/* @__PURE__ */ (0,
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1624
1651
|
"text",
|
|
1625
1652
|
{
|
|
1626
1653
|
className: (0, import_css20.css)({
|
|
@@ -1645,14 +1672,14 @@ function CircularProgress(props) {
|
|
|
1645
1672
|
|
|
1646
1673
|
// src/components/combobox/primitives.tsx
|
|
1647
1674
|
var import_combobox = require("@ark-ui/react/combobox");
|
|
1648
|
-
var
|
|
1675
|
+
var import_factory2 = require("@ark-ui/react/factory");
|
|
1649
1676
|
var import_recipes16 = require("@cerberus/styled-system/recipes");
|
|
1650
1677
|
var import_css21 = require("@cerberus/styled-system/css");
|
|
1651
|
-
var
|
|
1678
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1652
1679
|
function ComboboxRoot(props) {
|
|
1653
1680
|
const { size, ...rootProps } = props;
|
|
1654
1681
|
const styles = (0, import_recipes16.combobox)({ size });
|
|
1655
|
-
return /* @__PURE__ */ (0,
|
|
1682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1656
1683
|
import_combobox.Combobox.Root,
|
|
1657
1684
|
{
|
|
1658
1685
|
...rootProps,
|
|
@@ -1662,11 +1689,11 @@ function ComboboxRoot(props) {
|
|
|
1662
1689
|
}
|
|
1663
1690
|
function ComboboxLabel(props) {
|
|
1664
1691
|
const styles = (0, import_recipes16.combobox)();
|
|
1665
|
-
return /* @__PURE__ */ (0,
|
|
1692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_combobox.Combobox.Label, { ...props, className: (0, import_css21.cx)(styles.label, props.className) });
|
|
1666
1693
|
}
|
|
1667
1694
|
function ComboboxControl(props) {
|
|
1668
1695
|
const styles = (0, import_recipes16.combobox)();
|
|
1669
|
-
return /* @__PURE__ */ (0,
|
|
1696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1670
1697
|
import_combobox.Combobox.Control,
|
|
1671
1698
|
{
|
|
1672
1699
|
...props,
|
|
@@ -1676,11 +1703,11 @@ function ComboboxControl(props) {
|
|
|
1676
1703
|
}
|
|
1677
1704
|
function ComboboxInput(props) {
|
|
1678
1705
|
const styles = (0, import_recipes16.combobox)();
|
|
1679
|
-
return /* @__PURE__ */ (0,
|
|
1706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_combobox.Combobox.Input, { ...props, className: (0, import_css21.cx)(styles.input, props.className) });
|
|
1680
1707
|
}
|
|
1681
1708
|
function ComboboxTrigger(props) {
|
|
1682
1709
|
const styles = (0, import_recipes16.combobox)();
|
|
1683
|
-
return /* @__PURE__ */ (0,
|
|
1710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1684
1711
|
import_combobox.Combobox.Trigger,
|
|
1685
1712
|
{
|
|
1686
1713
|
...props,
|
|
@@ -1690,7 +1717,7 @@ function ComboboxTrigger(props) {
|
|
|
1690
1717
|
}
|
|
1691
1718
|
function ComboboxClearTrigger(props) {
|
|
1692
1719
|
const styles = (0, import_recipes16.combobox)();
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
1720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1694
1721
|
import_combobox.Combobox.ClearTrigger,
|
|
1695
1722
|
{
|
|
1696
1723
|
...props,
|
|
@@ -1700,7 +1727,7 @@ function ComboboxClearTrigger(props) {
|
|
|
1700
1727
|
}
|
|
1701
1728
|
function ComboboxPositioner(props) {
|
|
1702
1729
|
const styles = (0, import_recipes16.combobox)();
|
|
1703
|
-
return /* @__PURE__ */ (0,
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1704
1731
|
import_combobox.Combobox.Positioner,
|
|
1705
1732
|
{
|
|
1706
1733
|
...props,
|
|
@@ -1711,7 +1738,7 @@ function ComboboxPositioner(props) {
|
|
|
1711
1738
|
function ComboboxContent(props) {
|
|
1712
1739
|
const { size, ...contentProps } = props;
|
|
1713
1740
|
const styles = (0, import_recipes16.combobox)({ size });
|
|
1714
|
-
return /* @__PURE__ */ (0,
|
|
1741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1715
1742
|
import_combobox.Combobox.Content,
|
|
1716
1743
|
{
|
|
1717
1744
|
...contentProps,
|
|
@@ -1721,7 +1748,7 @@ function ComboboxContent(props) {
|
|
|
1721
1748
|
}
|
|
1722
1749
|
function ComboboxItemGroup(props) {
|
|
1723
1750
|
const styles = (0, import_recipes16.combobox)();
|
|
1724
|
-
return /* @__PURE__ */ (0,
|
|
1751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1725
1752
|
import_combobox.Combobox.ItemGroup,
|
|
1726
1753
|
{
|
|
1727
1754
|
...props,
|
|
@@ -1731,7 +1758,7 @@ function ComboboxItemGroup(props) {
|
|
|
1731
1758
|
}
|
|
1732
1759
|
function ComboboxItemGroupLabel(props) {
|
|
1733
1760
|
const styles = (0, import_recipes16.combobox)();
|
|
1734
|
-
return /* @__PURE__ */ (0,
|
|
1761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1735
1762
|
import_combobox.Combobox.ItemGroupLabel,
|
|
1736
1763
|
{
|
|
1737
1764
|
...props,
|
|
@@ -1741,11 +1768,11 @@ function ComboboxItemGroupLabel(props) {
|
|
|
1741
1768
|
}
|
|
1742
1769
|
function ComboboxItem(props) {
|
|
1743
1770
|
const styles = (0, import_recipes16.combobox)();
|
|
1744
|
-
return /* @__PURE__ */ (0,
|
|
1771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_combobox.Combobox.Item, { ...props, className: (0, import_css21.cx)(styles.item, props.className) });
|
|
1745
1772
|
}
|
|
1746
1773
|
function ComboboxItemText(props) {
|
|
1747
1774
|
const styles = (0, import_recipes16.combobox)();
|
|
1748
|
-
return /* @__PURE__ */ (0,
|
|
1775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1749
1776
|
import_combobox.Combobox.ItemText,
|
|
1750
1777
|
{
|
|
1751
1778
|
...props,
|
|
@@ -1755,7 +1782,7 @@ function ComboboxItemText(props) {
|
|
|
1755
1782
|
}
|
|
1756
1783
|
function ComboboxItemIndicator(props) {
|
|
1757
1784
|
const styles = (0, import_recipes16.combobox)();
|
|
1758
|
-
return /* @__PURE__ */ (0,
|
|
1785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1759
1786
|
import_combobox.Combobox.ItemIndicator,
|
|
1760
1787
|
{
|
|
1761
1788
|
...props,
|
|
@@ -1765,7 +1792,7 @@ function ComboboxItemIndicator(props) {
|
|
|
1765
1792
|
}
|
|
1766
1793
|
function ComboboxStartIcon(props) {
|
|
1767
1794
|
const styles = (0, import_recipes16.combobox)();
|
|
1768
|
-
return /* @__PURE__ */ (0,
|
|
1795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_factory2.ark.span, { ...props, className: styles.startIcon });
|
|
1769
1796
|
}
|
|
1770
1797
|
var ComboItemText = ComboboxItemText;
|
|
1771
1798
|
|
|
@@ -1787,66 +1814,66 @@ var ComboboxParts = {
|
|
|
1787
1814
|
};
|
|
1788
1815
|
|
|
1789
1816
|
// src/components/Portal.tsx
|
|
1790
|
-
var
|
|
1791
|
-
var Portal =
|
|
1817
|
+
var import_react14 = require("@ark-ui/react");
|
|
1818
|
+
var Portal = import_react14.Portal;
|
|
1792
1819
|
|
|
1793
1820
|
// src/components/combobox/combobox.tsx
|
|
1794
|
-
var
|
|
1821
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1795
1822
|
function Combobox2(props) {
|
|
1796
1823
|
const { label: label5, children, startIcon, ...rootProps } = props;
|
|
1797
1824
|
const { icons } = useCerberusContext();
|
|
1798
1825
|
const { selectArrow: SelectArrow, close: CloseIcon } = icons;
|
|
1799
1826
|
const hasStartIcon = Boolean(startIcon);
|
|
1800
|
-
return /* @__PURE__ */ (0,
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1802
|
-
/* @__PURE__ */ (0,
|
|
1803
|
-
/* @__PURE__ */ (0,
|
|
1804
|
-
/* @__PURE__ */ (0,
|
|
1827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ComboboxParts.Root, { ...rootProps, children: [
|
|
1828
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Show, { when: Boolean(label5), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxParts.Label, { children: label5 }) }),
|
|
1829
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ComboboxParts.Control, { children: [
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Show, { when: hasStartIcon, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxStartIcon, { children: startIcon }) }),
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
1805
1832
|
ComboboxParts.Input,
|
|
1806
1833
|
{
|
|
1807
1834
|
...hasStartIcon && { "data-has": "start-indicator" }
|
|
1808
1835
|
}
|
|
1809
1836
|
),
|
|
1810
|
-
/* @__PURE__ */ (0,
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1837
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxParts.ClearTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CloseIcon, {}) }),
|
|
1838
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxParts.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectArrow, {}) })
|
|
1812
1839
|
] }),
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
1840
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxParts.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ComboboxParts.Content, { size: rootProps.size, children }) }) })
|
|
1814
1841
|
] });
|
|
1815
1842
|
}
|
|
1816
1843
|
|
|
1817
1844
|
// src/components/combobox/item.tsx
|
|
1818
|
-
var
|
|
1845
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1819
1846
|
function ComboItemWithIndicator(props) {
|
|
1820
1847
|
const { icons } = useCerberusContext();
|
|
1821
1848
|
const { selectChecked: CheckedIcon } = icons;
|
|
1822
|
-
return /* @__PURE__ */ (0,
|
|
1823
|
-
/* @__PURE__ */ (0,
|
|
1849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ComboboxParts.Item, { ...props, children: [
|
|
1850
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ComboboxParts.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CheckedIcon, {}) }),
|
|
1824
1851
|
props.children
|
|
1825
1852
|
] });
|
|
1826
1853
|
}
|
|
1827
1854
|
|
|
1828
1855
|
// src/components/combobox/item-group.tsx
|
|
1829
|
-
var
|
|
1856
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1830
1857
|
function ComboItemGroup(props) {
|
|
1831
1858
|
const { label: label5, children, ...groupProps } = props;
|
|
1832
|
-
return /* @__PURE__ */ (0,
|
|
1833
|
-
/* @__PURE__ */ (0,
|
|
1859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(ComboboxParts.ItemGroup, { ...groupProps, children: [
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ComboboxParts.ItemGroupLabel, { children: label5 }),
|
|
1834
1861
|
children
|
|
1835
1862
|
] });
|
|
1836
1863
|
}
|
|
1837
1864
|
|
|
1838
1865
|
// src/components/combobox/use-stateful-collection.ts
|
|
1839
|
-
var
|
|
1866
|
+
var import_react15 = require("react");
|
|
1840
1867
|
|
|
1841
1868
|
// src/components/select/primitives.tsx
|
|
1842
1869
|
var import_select = require("@ark-ui/react/select");
|
|
1843
1870
|
var import_recipes17 = require("@cerberus/styled-system/recipes");
|
|
1844
1871
|
var import_css22 = require("@cerberus/styled-system/css");
|
|
1845
|
-
var
|
|
1872
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
1846
1873
|
function SelectRoot(props) {
|
|
1847
1874
|
const { size, ...rootProps } = props;
|
|
1848
1875
|
const styles = (0, import_recipes17.select)({ size });
|
|
1849
|
-
return /* @__PURE__ */ (0,
|
|
1876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1850
1877
|
import_select.Select.Root,
|
|
1851
1878
|
{
|
|
1852
1879
|
...rootProps,
|
|
@@ -1856,14 +1883,14 @@ function SelectRoot(props) {
|
|
|
1856
1883
|
}
|
|
1857
1884
|
function SelectLabel(props) {
|
|
1858
1885
|
const styles = (0, import_recipes17.select)();
|
|
1859
|
-
return /* @__PURE__ */ (0,
|
|
1886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.Label, { ...props, className: (0, import_css22.cx)(styles.label, props.className) });
|
|
1860
1887
|
}
|
|
1861
1888
|
function SelectControl(props) {
|
|
1862
|
-
return /* @__PURE__ */ (0,
|
|
1889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.Control, { ...props });
|
|
1863
1890
|
}
|
|
1864
1891
|
function SelectTrigger(props) {
|
|
1865
1892
|
const styles = (0, import_recipes17.select)();
|
|
1866
|
-
return /* @__PURE__ */ (0,
|
|
1893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1867
1894
|
import_select.Select.Trigger,
|
|
1868
1895
|
{
|
|
1869
1896
|
...props,
|
|
@@ -1872,11 +1899,11 @@ function SelectTrigger(props) {
|
|
|
1872
1899
|
);
|
|
1873
1900
|
}
|
|
1874
1901
|
function SelectValueText(props) {
|
|
1875
|
-
return /* @__PURE__ */ (0,
|
|
1902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.ValueText, { ...props });
|
|
1876
1903
|
}
|
|
1877
1904
|
function SelectIndicator(props) {
|
|
1878
1905
|
const styles = (0, import_recipes17.select)();
|
|
1879
|
-
return /* @__PURE__ */ (0,
|
|
1906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1880
1907
|
import_select.Select.Indicator,
|
|
1881
1908
|
{
|
|
1882
1909
|
...props,
|
|
@@ -1885,11 +1912,11 @@ function SelectIndicator(props) {
|
|
|
1885
1912
|
);
|
|
1886
1913
|
}
|
|
1887
1914
|
function SelectClearTrigger(props) {
|
|
1888
|
-
return /* @__PURE__ */ (0,
|
|
1915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.ClearTrigger, { ...props });
|
|
1889
1916
|
}
|
|
1890
1917
|
function SelectPositioner(props) {
|
|
1891
1918
|
const styles = (0, import_recipes17.select)();
|
|
1892
|
-
return /* @__PURE__ */ (0,
|
|
1919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1893
1920
|
import_select.Select.Positioner,
|
|
1894
1921
|
{
|
|
1895
1922
|
...props,
|
|
@@ -1900,7 +1927,7 @@ function SelectPositioner(props) {
|
|
|
1900
1927
|
function SelectContent(props) {
|
|
1901
1928
|
const { size, ...contentProps } = props;
|
|
1902
1929
|
const styles = (0, import_recipes17.select)({ size });
|
|
1903
|
-
return /* @__PURE__ */ (0,
|
|
1930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1904
1931
|
import_select.Select.Content,
|
|
1905
1932
|
{
|
|
1906
1933
|
...contentProps,
|
|
@@ -1909,11 +1936,11 @@ function SelectContent(props) {
|
|
|
1909
1936
|
);
|
|
1910
1937
|
}
|
|
1911
1938
|
function SelectItemGroup(props) {
|
|
1912
|
-
return /* @__PURE__ */ (0,
|
|
1939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.ItemGroup, { ...props });
|
|
1913
1940
|
}
|
|
1914
1941
|
function SelectItemGroupLabel(props) {
|
|
1915
1942
|
const styles = (0, import_recipes17.select)();
|
|
1916
|
-
return /* @__PURE__ */ (0,
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1917
1944
|
import_select.Select.ItemGroupLabel,
|
|
1918
1945
|
{
|
|
1919
1946
|
...props,
|
|
@@ -1923,14 +1950,14 @@ function SelectItemGroupLabel(props) {
|
|
|
1923
1950
|
}
|
|
1924
1951
|
function SelectItem(props) {
|
|
1925
1952
|
const styles = (0, import_recipes17.select)();
|
|
1926
|
-
return /* @__PURE__ */ (0,
|
|
1953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.Item, { ...props, className: (0, import_css22.cx)(styles.item, props.className) });
|
|
1927
1954
|
}
|
|
1928
1955
|
function SelectItemText(props) {
|
|
1929
|
-
return /* @__PURE__ */ (0,
|
|
1956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.ItemText, { ...props });
|
|
1930
1957
|
}
|
|
1931
1958
|
function SelectItemIndicator(props) {
|
|
1932
1959
|
const styles = (0, import_recipes17.select)();
|
|
1933
|
-
return /* @__PURE__ */ (0,
|
|
1960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1934
1961
|
import_select.Select.ItemIndicator,
|
|
1935
1962
|
{
|
|
1936
1963
|
...props,
|
|
@@ -1939,7 +1966,7 @@ function SelectItemIndicator(props) {
|
|
|
1939
1966
|
);
|
|
1940
1967
|
}
|
|
1941
1968
|
function SelectHiddenSelect(props) {
|
|
1942
|
-
return /* @__PURE__ */ (0,
|
|
1969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_select.Select.HiddenSelect, { ...props });
|
|
1943
1970
|
}
|
|
1944
1971
|
function createSelectCollection(collection) {
|
|
1945
1972
|
return (0, import_select.createListCollection)({
|
|
@@ -1949,10 +1976,10 @@ function createSelectCollection(collection) {
|
|
|
1949
1976
|
|
|
1950
1977
|
// src/components/combobox/use-stateful-collection.ts
|
|
1951
1978
|
function useStatefulCollection(initialItems = []) {
|
|
1952
|
-
const [items, setItems] = (0,
|
|
1953
|
-
const [filterValue, setFilterValue] = (0,
|
|
1954
|
-
const collection = (0,
|
|
1955
|
-
const handleInputChange = (0,
|
|
1979
|
+
const [items, setItems] = (0, import_react15.useState)(initialItems);
|
|
1980
|
+
const [filterValue, setFilterValue] = (0, import_react15.useState)([]);
|
|
1981
|
+
const collection = (0, import_react15.useMemo)(() => createSelectCollection(items), [items]);
|
|
1982
|
+
const handleInputChange = (0, import_react15.useCallback)(
|
|
1956
1983
|
(details) => {
|
|
1957
1984
|
if (details.inputValue === "") {
|
|
1958
1985
|
return setItems(initialItems);
|
|
@@ -1966,7 +1993,7 @@ function useStatefulCollection(initialItems = []) {
|
|
|
1966
1993
|
},
|
|
1967
1994
|
[initialItems]
|
|
1968
1995
|
);
|
|
1969
|
-
return (0,
|
|
1996
|
+
return (0, import_react15.useMemo)(
|
|
1970
1997
|
() => ({
|
|
1971
1998
|
collection,
|
|
1972
1999
|
filterChars: filterValue,
|
|
@@ -1977,7 +2004,7 @@ function useStatefulCollection(initialItems = []) {
|
|
|
1977
2004
|
}
|
|
1978
2005
|
|
|
1979
2006
|
// src/components/cta-dialog/provider.tsx
|
|
1980
|
-
var
|
|
2007
|
+
var import_react17 = require("react");
|
|
1981
2008
|
var import_jsx4 = require("@cerberus/styled-system/jsx");
|
|
1982
2009
|
|
|
1983
2010
|
// src/components/for.tsx
|
|
@@ -1993,13 +2020,13 @@ function For(props) {
|
|
|
1993
2020
|
var import_dialog = require("@ark-ui/react/dialog");
|
|
1994
2021
|
var import_css23 = require("@cerberus/styled-system/css");
|
|
1995
2022
|
var import_recipes18 = require("@cerberus/styled-system/recipes");
|
|
1996
|
-
var
|
|
2023
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1997
2024
|
function DialogRoot(props) {
|
|
1998
|
-
return /* @__PURE__ */ (0,
|
|
2025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_dialog.Dialog.Root, { ...props });
|
|
1999
2026
|
}
|
|
2000
2027
|
function DialogTrigger(props) {
|
|
2001
2028
|
const styles = (0, import_recipes18.dialog)();
|
|
2002
|
-
return /* @__PURE__ */ (0,
|
|
2029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2003
2030
|
import_dialog.Dialog.Trigger,
|
|
2004
2031
|
{
|
|
2005
2032
|
...props,
|
|
@@ -2009,7 +2036,7 @@ function DialogTrigger(props) {
|
|
|
2009
2036
|
}
|
|
2010
2037
|
function DialogBackdrop(props) {
|
|
2011
2038
|
const styles = (0, import_recipes18.dialog)();
|
|
2012
|
-
return /* @__PURE__ */ (0,
|
|
2039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2013
2040
|
import_dialog.Dialog.Backdrop,
|
|
2014
2041
|
{
|
|
2015
2042
|
...props,
|
|
@@ -2019,7 +2046,7 @@ function DialogBackdrop(props) {
|
|
|
2019
2046
|
}
|
|
2020
2047
|
function DialogPositioner(props) {
|
|
2021
2048
|
const styles = (0, import_recipes18.dialog)();
|
|
2022
|
-
return /* @__PURE__ */ (0,
|
|
2049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2023
2050
|
import_dialog.Dialog.Positioner,
|
|
2024
2051
|
{
|
|
2025
2052
|
...props,
|
|
@@ -2030,7 +2057,7 @@ function DialogPositioner(props) {
|
|
|
2030
2057
|
function DialogContent(props) {
|
|
2031
2058
|
const { size, ...contentProps } = props;
|
|
2032
2059
|
const styles = (0, import_recipes18.dialog)({ size });
|
|
2033
|
-
return /* @__PURE__ */ (0,
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2034
2061
|
import_dialog.Dialog.Content,
|
|
2035
2062
|
{
|
|
2036
2063
|
...contentProps,
|
|
@@ -2040,11 +2067,11 @@ function DialogContent(props) {
|
|
|
2040
2067
|
}
|
|
2041
2068
|
function DialogHeading(props) {
|
|
2042
2069
|
const styles = (0, import_recipes18.dialog)();
|
|
2043
|
-
return /* @__PURE__ */ (0,
|
|
2070
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_dialog.Dialog.Title, { ...props, className: (0, import_css23.cx)(styles.title, props.className) });
|
|
2044
2071
|
}
|
|
2045
2072
|
function DialogDescription(props) {
|
|
2046
2073
|
const styles = (0, import_recipes18.dialog)();
|
|
2047
|
-
return /* @__PURE__ */ (0,
|
|
2074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2048
2075
|
import_dialog.Dialog.Description,
|
|
2049
2076
|
{
|
|
2050
2077
|
...props,
|
|
@@ -2053,7 +2080,7 @@ function DialogDescription(props) {
|
|
|
2053
2080
|
);
|
|
2054
2081
|
}
|
|
2055
2082
|
function DialogCloseTrigger(props) {
|
|
2056
|
-
return /* @__PURE__ */ (0,
|
|
2083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_dialog.Dialog.CloseTrigger, { ...props });
|
|
2057
2084
|
}
|
|
2058
2085
|
var DialogProvider = DialogRoot;
|
|
2059
2086
|
|
|
@@ -2072,10 +2099,10 @@ var DialogParts = {
|
|
|
2072
2099
|
// src/components/IconButton.tsx
|
|
2073
2100
|
var import_css24 = require("@cerberus/styled-system/css");
|
|
2074
2101
|
var import_recipes19 = require("@cerberus/styled-system/recipes");
|
|
2075
|
-
var
|
|
2102
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2076
2103
|
function IconButton(props) {
|
|
2077
2104
|
const { ariaLabel, palette, usage, size, ...nativeProps } = props;
|
|
2078
|
-
return /* @__PURE__ */ (0,
|
|
2105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2079
2106
|
"button",
|
|
2080
2107
|
{
|
|
2081
2108
|
...nativeProps,
|
|
@@ -2095,25 +2122,25 @@ function IconButton(props) {
|
|
|
2095
2122
|
// src/components/dialog/close-icon-trigger.tsx
|
|
2096
2123
|
var import_recipes20 = require("@cerberus/styled-system/recipes");
|
|
2097
2124
|
var import_css25 = require("@cerberus/styled-system/css");
|
|
2098
|
-
var
|
|
2125
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2099
2126
|
function DialogCloseIconTrigger(props) {
|
|
2100
2127
|
const styles = (0, import_recipes20.dialog)();
|
|
2101
2128
|
const { icons } = useCerberusContext();
|
|
2102
2129
|
const { close: CloseIcon } = icons;
|
|
2103
|
-
return /* @__PURE__ */ (0,
|
|
2130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2104
2131
|
DialogCloseTrigger,
|
|
2105
2132
|
{
|
|
2106
2133
|
...props,
|
|
2107
2134
|
className: (0, import_css25.cx)(styles.closeTrigger, props.className),
|
|
2108
2135
|
asChild: true,
|
|
2109
|
-
children: /* @__PURE__ */ (0,
|
|
2136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2110
2137
|
IconButton,
|
|
2111
2138
|
{
|
|
2112
2139
|
ariaLabel: "Close dialog",
|
|
2113
2140
|
palette: "action",
|
|
2114
2141
|
size: "lg",
|
|
2115
2142
|
usage: "ghost",
|
|
2116
|
-
children: /* @__PURE__ */ (0,
|
|
2143
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CloseIcon, {})
|
|
2117
2144
|
}
|
|
2118
2145
|
)
|
|
2119
2146
|
}
|
|
@@ -2121,28 +2148,28 @@ function DialogCloseIconTrigger(props) {
|
|
|
2121
2148
|
}
|
|
2122
2149
|
|
|
2123
2150
|
// src/components/dialog/dialog.tsx
|
|
2124
|
-
var
|
|
2151
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2125
2152
|
function Dialog2(props) {
|
|
2126
|
-
return /* @__PURE__ */ (0,
|
|
2127
|
-
/* @__PURE__ */ (0,
|
|
2128
|
-
/* @__PURE__ */ (0,
|
|
2153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Portal, { children: [
|
|
2154
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogBackdrop, {}),
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogPositioner, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DialogContent, { ...props }) })
|
|
2129
2156
|
] });
|
|
2130
2157
|
}
|
|
2131
2158
|
|
|
2132
2159
|
// src/components/cta-dialog/context.tsx
|
|
2133
|
-
var
|
|
2134
|
-
var CTAModalContext = (0,
|
|
2160
|
+
var import_react16 = require("react");
|
|
2161
|
+
var CTAModalContext = (0, import_react16.createContext)(null);
|
|
2135
2162
|
|
|
2136
2163
|
// src/components/cta-dialog/trigger-item.tsx
|
|
2137
2164
|
var import_css26 = require("@cerberus/styled-system/css");
|
|
2138
|
-
var
|
|
2165
|
+
var import_factory3 = require("@ark-ui/react/factory");
|
|
2139
2166
|
var import_recipes21 = require("@cerberus/styled-system/recipes");
|
|
2140
|
-
var
|
|
2167
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2141
2168
|
function TriggerItem(props) {
|
|
2142
2169
|
const { asChild, children, ...buttonProps } = props;
|
|
2143
2170
|
if (asChild) {
|
|
2144
|
-
return /* @__PURE__ */ (0,
|
|
2145
|
-
|
|
2171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2172
|
+
import_factory3.ark.div,
|
|
2146
2173
|
{
|
|
2147
2174
|
className: (0, import_css26.cx)(
|
|
2148
2175
|
(0, import_recipes21.button)({
|
|
@@ -2158,7 +2185,7 @@ function TriggerItem(props) {
|
|
|
2158
2185
|
}
|
|
2159
2186
|
);
|
|
2160
2187
|
}
|
|
2161
|
-
return /* @__PURE__ */ (0,
|
|
2188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2162
2189
|
Button,
|
|
2163
2190
|
{
|
|
2164
2191
|
...buttonProps,
|
|
@@ -2173,21 +2200,21 @@ function TriggerItem(props) {
|
|
|
2173
2200
|
}
|
|
2174
2201
|
|
|
2175
2202
|
// src/components/cta-dialog/provider.tsx
|
|
2176
|
-
var
|
|
2203
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2177
2204
|
function CTAModal(props) {
|
|
2178
|
-
const [open, setOpen] = (0,
|
|
2179
|
-
const [content, setContent] = (0,
|
|
2205
|
+
const [open, setOpen] = (0, import_react17.useState)(false);
|
|
2206
|
+
const [content, setContent] = (0, import_react17.useState)(null);
|
|
2180
2207
|
const confirmIcon = content == null ? void 0 : content.icon;
|
|
2181
2208
|
const { icons } = useCerberusContext();
|
|
2182
2209
|
const { confirmModal: FallbackIcon } = icons;
|
|
2183
|
-
const handleShow = (0,
|
|
2210
|
+
const handleShow = (0, import_react17.useCallback)(
|
|
2184
2211
|
(options) => {
|
|
2185
2212
|
setContent({ ...options });
|
|
2186
2213
|
setOpen(true);
|
|
2187
2214
|
},
|
|
2188
2215
|
[setOpen]
|
|
2189
2216
|
);
|
|
2190
|
-
const handleActionClick = (0,
|
|
2217
|
+
const handleActionClick = (0, import_react17.useCallback)(
|
|
2191
2218
|
(event) => {
|
|
2192
2219
|
var _a;
|
|
2193
2220
|
const index = Number(event.currentTarget.getAttribute("data-index"));
|
|
@@ -2198,45 +2225,45 @@ function CTAModal(props) {
|
|
|
2198
2225
|
},
|
|
2199
2226
|
[content, setOpen]
|
|
2200
2227
|
);
|
|
2201
|
-
const value = (0,
|
|
2228
|
+
const value = (0, import_react17.useMemo)(
|
|
2202
2229
|
() => ({
|
|
2203
2230
|
show: handleShow
|
|
2204
2231
|
}),
|
|
2205
2232
|
[handleShow]
|
|
2206
2233
|
);
|
|
2207
|
-
return /* @__PURE__ */ (0,
|
|
2234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(CTAModalContext.Provider, { value, children: [
|
|
2208
2235
|
props.children,
|
|
2209
|
-
/* @__PURE__ */ (0,
|
|
2210
|
-
/* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2212
|
-
/* @__PURE__ */ (0,
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Dialog2, { size: "sm", children: [
|
|
2237
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogCloseIconTrigger, {}),
|
|
2238
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx4.VStack, { gap: "xl", w: "full", children: [
|
|
2239
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx4.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx4.VStack, { gap: "lg", w: "full", children: [
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2214
2241
|
Avatar,
|
|
2215
2242
|
{
|
|
2216
2243
|
ariaLabel: "",
|
|
2217
2244
|
gradient: "charon-light",
|
|
2218
|
-
icon: /* @__PURE__ */ (0,
|
|
2245
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2219
2246
|
Show,
|
|
2220
2247
|
{
|
|
2221
2248
|
when: Boolean(confirmIcon),
|
|
2222
|
-
fallback: /* @__PURE__ */ (0,
|
|
2249
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(FallbackIcon, { size: 24 }),
|
|
2223
2250
|
children: confirmIcon
|
|
2224
2251
|
}
|
|
2225
2252
|
),
|
|
2226
2253
|
src: ""
|
|
2227
2254
|
}
|
|
2228
2255
|
),
|
|
2229
|
-
/* @__PURE__ */ (0,
|
|
2230
|
-
/* @__PURE__ */ (0,
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
2231
2258
|
] }) }),
|
|
2232
|
-
/* @__PURE__ */ (0,
|
|
2259
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx4.HStack, { gap: "md", w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(For, { each: content == null ? void 0 : content.actions._actions, children: (action, index) => {
|
|
2233
2260
|
var _a;
|
|
2234
|
-
return /* @__PURE__ */ (0,
|
|
2261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2235
2262
|
Show,
|
|
2236
2263
|
{
|
|
2237
2264
|
when: ((_a = content == null ? void 0 : content.actions) == null ? void 0 : _a.type) === "btnAction",
|
|
2238
|
-
fallback: /* @__PURE__ */ (0,
|
|
2239
|
-
children: /* @__PURE__ */ (0,
|
|
2265
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TriggerItem, { asChild: true, children: action }),
|
|
2266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TriggerItem, { "data-index": index, onClick: handleActionClick, children: action == null ? void 0 : action.text })
|
|
2240
2267
|
},
|
|
2241
2268
|
index
|
|
2242
2269
|
);
|
|
@@ -2246,7 +2273,7 @@ function CTAModal(props) {
|
|
|
2246
2273
|
] });
|
|
2247
2274
|
}
|
|
2248
2275
|
function useCTAModal() {
|
|
2249
|
-
const context = (0,
|
|
2276
|
+
const context = (0, import_react17.useContext)(CTAModalContext);
|
|
2250
2277
|
if (context === null) {
|
|
2251
2278
|
throw new Error("useCTAModal must be used within a CTAModal Provider");
|
|
2252
2279
|
}
|
|
@@ -2273,20 +2300,20 @@ function createCTAModalActions(providedActions) {
|
|
|
2273
2300
|
}
|
|
2274
2301
|
|
|
2275
2302
|
// src/components/DatePicker.client.tsx
|
|
2276
|
-
var
|
|
2303
|
+
var import_react19 = require("@ark-ui/react");
|
|
2277
2304
|
var import_recipes23 = require("@cerberus/styled-system/recipes");
|
|
2278
2305
|
var import_css28 = require("@cerberus/styled-system/css");
|
|
2279
2306
|
|
|
2280
2307
|
// src/components/DatePicker.server.tsx
|
|
2281
|
-
var
|
|
2308
|
+
var import_react18 = require("@ark-ui/react");
|
|
2282
2309
|
var import_css27 = require("@cerberus/styled-system/css");
|
|
2283
2310
|
var import_recipes22 = require("@cerberus/styled-system/recipes");
|
|
2284
|
-
var
|
|
2311
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2285
2312
|
var datePickerStyles = (0, import_recipes22.datePicker)();
|
|
2286
2313
|
function DatePickerLabel(props) {
|
|
2287
2314
|
const { className, ...arkProps } = props;
|
|
2288
|
-
return /* @__PURE__ */ (0,
|
|
2289
|
-
|
|
2315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2316
|
+
import_react18.DatePicker.Label,
|
|
2290
2317
|
{
|
|
2291
2318
|
...arkProps,
|
|
2292
2319
|
className: (0, import_css27.cx)(
|
|
@@ -2299,8 +2326,8 @@ function DatePickerLabel(props) {
|
|
|
2299
2326
|
);
|
|
2300
2327
|
}
|
|
2301
2328
|
function DatePickerViewControl(props) {
|
|
2302
|
-
return /* @__PURE__ */ (0,
|
|
2303
|
-
|
|
2329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2330
|
+
import_react18.DatePicker.Control,
|
|
2304
2331
|
{
|
|
2305
2332
|
...props,
|
|
2306
2333
|
className: (0, import_css27.cx)(props.className, datePickerStyles.viewControl)
|
|
@@ -2308,8 +2335,8 @@ function DatePickerViewControl(props) {
|
|
|
2308
2335
|
);
|
|
2309
2336
|
}
|
|
2310
2337
|
function DatePickerTable(props) {
|
|
2311
|
-
return /* @__PURE__ */ (0,
|
|
2312
|
-
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2339
|
+
import_react18.DatePicker.Table,
|
|
2313
2340
|
{
|
|
2314
2341
|
...props,
|
|
2315
2342
|
className: (0, import_css27.cx)(props.className, datePickerStyles.table)
|
|
@@ -2317,8 +2344,8 @@ function DatePickerTable(props) {
|
|
|
2317
2344
|
);
|
|
2318
2345
|
}
|
|
2319
2346
|
function DatePickerTableHeader(props) {
|
|
2320
|
-
return /* @__PURE__ */ (0,
|
|
2321
|
-
|
|
2347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2348
|
+
import_react18.DatePicker.TableHeader,
|
|
2322
2349
|
{
|
|
2323
2350
|
...props,
|
|
2324
2351
|
className: (0, import_css27.cx)(props.className, datePickerStyles.tableHeader)
|
|
@@ -2326,8 +2353,8 @@ function DatePickerTableHeader(props) {
|
|
|
2326
2353
|
);
|
|
2327
2354
|
}
|
|
2328
2355
|
function DatePickerTableCell(props) {
|
|
2329
|
-
return /* @__PURE__ */ (0,
|
|
2330
|
-
|
|
2356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2357
|
+
import_react18.DatePicker.TableCell,
|
|
2331
2358
|
{
|
|
2332
2359
|
...props,
|
|
2333
2360
|
className: (0, import_css27.cx)(props.className, datePickerStyles.tableCell)
|
|
@@ -2335,24 +2362,24 @@ function DatePickerTableCell(props) {
|
|
|
2335
2362
|
);
|
|
2336
2363
|
}
|
|
2337
2364
|
function DatePickerTableCellTrigger(props) {
|
|
2338
|
-
return /* @__PURE__ */ (0,
|
|
2339
|
-
|
|
2365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
2366
|
+
import_react18.DatePicker.TableCellTrigger,
|
|
2340
2367
|
{
|
|
2341
2368
|
...props,
|
|
2342
2369
|
className: (0, import_css27.cx)(props.className, datePickerStyles.tableCellTrigger)
|
|
2343
2370
|
}
|
|
2344
2371
|
);
|
|
2345
2372
|
}
|
|
2346
|
-
var DatePickerView =
|
|
2347
|
-
var DatePickerContext =
|
|
2373
|
+
var DatePickerView = import_react18.DatePicker.View;
|
|
2374
|
+
var DatePickerContext = import_react18.DatePicker.Context;
|
|
2348
2375
|
|
|
2349
2376
|
// src/components/DatePicker.client.tsx
|
|
2350
|
-
var
|
|
2351
|
-
var
|
|
2377
|
+
var import_react20 = require("react");
|
|
2378
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2352
2379
|
var datePickerStyles2 = (0, import_recipes23.datePicker)();
|
|
2353
2380
|
function DatePicker(props) {
|
|
2354
|
-
return /* @__PURE__ */ (0,
|
|
2355
|
-
|
|
2381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2382
|
+
import_react19.DatePicker.Root,
|
|
2356
2383
|
{
|
|
2357
2384
|
...props,
|
|
2358
2385
|
positioning: {
|
|
@@ -2364,9 +2391,9 @@ function DatePicker(props) {
|
|
|
2364
2391
|
function DatePickerViewControlGroup(props) {
|
|
2365
2392
|
const { icons } = useCerberusContext();
|
|
2366
2393
|
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
|
|
2367
|
-
return /* @__PURE__ */ (0,
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2369
|
-
/* @__PURE__ */ (0,
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DatePickerViewControl, { ...props, children: [
|
|
2395
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PrevIcon, {}) }) }),
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2370
2397
|
Button,
|
|
2371
2398
|
{
|
|
2372
2399
|
className: (0, import_css28.css)({
|
|
@@ -2376,17 +2403,17 @@ function DatePickerViewControlGroup(props) {
|
|
|
2376
2403
|
shape: "rounded",
|
|
2377
2404
|
size: "sm",
|
|
2378
2405
|
usage: "ghost",
|
|
2379
|
-
children: /* @__PURE__ */ (0,
|
|
2406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.RangeText, {})
|
|
2380
2407
|
}
|
|
2381
2408
|
) }),
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2409
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(NextIcon, {}) }) })
|
|
2383
2410
|
] });
|
|
2384
2411
|
}
|
|
2385
2412
|
function DatePickerTrigger(props) {
|
|
2386
2413
|
const { icons } = useCerberusContext();
|
|
2387
2414
|
const { calendar: CalendarIcon } = icons;
|
|
2388
|
-
return /* @__PURE__ */ (0,
|
|
2389
|
-
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2416
|
+
import_react19.DatePicker.Trigger,
|
|
2390
2417
|
{
|
|
2391
2418
|
...props,
|
|
2392
2419
|
className: (0, import_css28.cx)(
|
|
@@ -2397,15 +2424,15 @@ function DatePickerTrigger(props) {
|
|
|
2397
2424
|
}),
|
|
2398
2425
|
datePickerStyles2.trigger
|
|
2399
2426
|
),
|
|
2400
|
-
children: /* @__PURE__ */ (0,
|
|
2427
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CalendarIcon, {})
|
|
2401
2428
|
}
|
|
2402
2429
|
);
|
|
2403
2430
|
}
|
|
2404
2431
|
function DatePickerInput(props) {
|
|
2405
|
-
return /* @__PURE__ */ (0,
|
|
2406
|
-
/* @__PURE__ */ (0,
|
|
2407
|
-
/* @__PURE__ */ (0,
|
|
2408
|
-
|
|
2432
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react19.DatePicker.Control, { className: datePickerStyles2.control, children: [
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTrigger, {}),
|
|
2434
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2435
|
+
import_react19.DatePicker.Input,
|
|
2409
2436
|
{
|
|
2410
2437
|
...props,
|
|
2411
2438
|
className: (0, import_css28.cx)(props.className, datePickerStyles2.input),
|
|
@@ -2417,12 +2444,12 @@ function DatePickerInput(props) {
|
|
|
2417
2444
|
}
|
|
2418
2445
|
function RangePickerInput(props) {
|
|
2419
2446
|
const { defaultValue, ...nativeProps } = props;
|
|
2420
|
-
const startDate = (0,
|
|
2421
|
-
const endDate = (0,
|
|
2422
|
-
return /* @__PURE__ */ (0,
|
|
2423
|
-
/* @__PURE__ */ (0,
|
|
2424
|
-
/* @__PURE__ */ (0,
|
|
2425
|
-
|
|
2447
|
+
const startDate = (0, import_react20.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
|
|
2448
|
+
const endDate = (0, import_react20.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_react19.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
|
|
2450
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTrigger, {}),
|
|
2451
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2452
|
+
import_react19.DatePicker.Input,
|
|
2426
2453
|
{
|
|
2427
2454
|
...nativeProps,
|
|
2428
2455
|
"data-range-input": true,
|
|
@@ -2433,8 +2460,8 @@ function RangePickerInput(props) {
|
|
|
2433
2460
|
index: 0
|
|
2434
2461
|
}
|
|
2435
2462
|
),
|
|
2436
|
-
/* @__PURE__ */ (0,
|
|
2437
|
-
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2464
|
+
import_react19.DatePicker.Input,
|
|
2438
2465
|
{
|
|
2439
2466
|
...nativeProps,
|
|
2440
2467
|
"data-range-input": true,
|
|
@@ -2450,8 +2477,8 @@ function RangePickerInput(props) {
|
|
|
2450
2477
|
}
|
|
2451
2478
|
function DatePickerContent(props) {
|
|
2452
2479
|
const { children, withModal, ...contentProps } = props;
|
|
2453
|
-
return /* @__PURE__ */ (0,
|
|
2454
|
-
|
|
2480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Portal, { disabled: withModal ?? false, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2481
|
+
import_react19.DatePicker.Content,
|
|
2455
2482
|
{
|
|
2456
2483
|
...contentProps,
|
|
2457
2484
|
className: (0, import_css28.cx)(contentProps.className, datePickerStyles2.content),
|
|
@@ -2476,11 +2503,11 @@ function DatePickerDayView(props) {
|
|
|
2476
2503
|
if (isPastDay(date)) return "past";
|
|
2477
2504
|
return "future";
|
|
2478
2505
|
}
|
|
2479
|
-
return /* @__PURE__ */ (0,
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2481
|
-
/* @__PURE__ */ (0,
|
|
2482
|
-
/* @__PURE__ */ (0,
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
2506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2507
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerViewControlGroup, {}),
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DatePickerTable, { children: [
|
|
2509
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2484
2511
|
DatePickerTableCellTrigger,
|
|
2485
2512
|
{
|
|
2486
2513
|
"data-date": getDayValue(day),
|
|
@@ -2491,39 +2518,39 @@ function DatePickerDayView(props) {
|
|
|
2491
2518
|
] }) }) });
|
|
2492
2519
|
}
|
|
2493
2520
|
function DatePickerMonthView(props) {
|
|
2494
|
-
return /* @__PURE__ */ (0,
|
|
2495
|
-
/* @__PURE__ */ (0,
|
|
2496
|
-
/* @__PURE__ */ (0,
|
|
2521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerViewControlGroup, {}),
|
|
2523
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
2497
2524
|
] }) }) });
|
|
2498
2525
|
}
|
|
2499
2526
|
function DatePickerYearView(props) {
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2501
|
-
/* @__PURE__ */ (0,
|
|
2502
|
-
/* @__PURE__ */ (0,
|
|
2527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerViewControlGroup, {}),
|
|
2529
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react19.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
2503
2530
|
] }) }) });
|
|
2504
2531
|
}
|
|
2505
2532
|
function DatePickerCalendar(props) {
|
|
2506
|
-
return /* @__PURE__ */ (0,
|
|
2507
|
-
/* @__PURE__ */ (0,
|
|
2508
|
-
/* @__PURE__ */ (0,
|
|
2509
|
-
/* @__PURE__ */ (0,
|
|
2533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DatePickerContent, { withModal: props.withModal, children: [
|
|
2534
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerDayView, {}),
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerMonthView, {}),
|
|
2536
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DatePickerYearView, {})
|
|
2510
2537
|
] });
|
|
2511
2538
|
}
|
|
2512
2539
|
|
|
2513
2540
|
// src/components/Droppable.tsx
|
|
2514
2541
|
var import_core = require("@dnd-kit/core");
|
|
2515
|
-
var
|
|
2516
|
-
var
|
|
2542
|
+
var import_react21 = require("react");
|
|
2543
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2517
2544
|
function Droppable(props) {
|
|
2518
2545
|
const { dropped, id, disabled, data, resizeObserverConfig, ...nativeProps } = props;
|
|
2519
|
-
const uuid = (0,
|
|
2546
|
+
const uuid = (0, import_react21.useId)();
|
|
2520
2547
|
const { isOver, setNodeRef } = (0, import_core.useDroppable)({
|
|
2521
2548
|
data,
|
|
2522
2549
|
disabled,
|
|
2523
2550
|
id: id || uuid,
|
|
2524
2551
|
resizeObserverConfig
|
|
2525
2552
|
});
|
|
2526
|
-
return /* @__PURE__ */ (0,
|
|
2553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2527
2554
|
"div",
|
|
2528
2555
|
{
|
|
2529
2556
|
...nativeProps,
|
|
@@ -2536,14 +2563,14 @@ function Droppable(props) {
|
|
|
2536
2563
|
}
|
|
2537
2564
|
|
|
2538
2565
|
// src/context/feature-flags.tsx
|
|
2539
|
-
var
|
|
2540
|
-
var
|
|
2541
|
-
var FeatureFlagContext = (0,
|
|
2566
|
+
var import_react22 = require("react");
|
|
2567
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2568
|
+
var FeatureFlagContext = (0, import_react22.createContext)(null);
|
|
2542
2569
|
function FeatureFlags(props) {
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FeatureFlagContext.Provider, { value: props.flags, children: props.children });
|
|
2544
2571
|
}
|
|
2545
2572
|
function useFeatureFlags(key) {
|
|
2546
|
-
const context = (0,
|
|
2573
|
+
const context = (0, import_react22.useContext)(FeatureFlagContext);
|
|
2547
2574
|
if (context === null) {
|
|
2548
2575
|
throw new Error(
|
|
2549
2576
|
"useFeatureFlag must be used within a FeatureFlags Provider"
|
|
@@ -2553,25 +2580,25 @@ function useFeatureFlags(key) {
|
|
|
2553
2580
|
}
|
|
2554
2581
|
|
|
2555
2582
|
// src/components/FeatureFlag.tsx
|
|
2556
|
-
var
|
|
2583
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2557
2584
|
function FeatureFlag(props) {
|
|
2558
2585
|
const showContent = useFeatureFlags(props.flag);
|
|
2559
|
-
return /* @__PURE__ */ (0,
|
|
2586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Show, { when: showContent, children: props.children });
|
|
2560
2587
|
}
|
|
2561
2588
|
|
|
2562
2589
|
// src/components/fieldset/primitives.tsx
|
|
2563
2590
|
var import_fieldset = require("@ark-ui/react/fieldset");
|
|
2564
2591
|
var import_css29 = require("@cerberus/styled-system/css");
|
|
2565
2592
|
var import_recipes24 = require("@cerberus/styled-system/recipes");
|
|
2566
|
-
var
|
|
2593
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2567
2594
|
function FieldsetRoot(props) {
|
|
2568
2595
|
const styles = (0, import_recipes24.fieldset)();
|
|
2569
|
-
return /* @__PURE__ */ (0,
|
|
2596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_fieldset.Fieldset.Root, { ...props, className: (0, import_css29.cx)(styles.root, props.className) });
|
|
2570
2597
|
}
|
|
2571
2598
|
function FieldsetLegend(props) {
|
|
2572
2599
|
const { usage, ...legendProps } = props;
|
|
2573
2600
|
const styles = (0, import_recipes24.fieldset)({ usage });
|
|
2574
|
-
return /* @__PURE__ */ (0,
|
|
2601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2575
2602
|
import_fieldset.Fieldset.Legend,
|
|
2576
2603
|
{
|
|
2577
2604
|
...legendProps,
|
|
@@ -2582,7 +2609,7 @@ function FieldsetLegend(props) {
|
|
|
2582
2609
|
function FieldsetHelperText(props) {
|
|
2583
2610
|
const { usage, ...helperTextProps } = props;
|
|
2584
2611
|
const styles = (0, import_recipes24.fieldset)({ usage });
|
|
2585
|
-
return /* @__PURE__ */ (0,
|
|
2612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2586
2613
|
import_fieldset.Fieldset.HelperText,
|
|
2587
2614
|
{
|
|
2588
2615
|
...helperTextProps,
|
|
@@ -2592,7 +2619,7 @@ function FieldsetHelperText(props) {
|
|
|
2592
2619
|
}
|
|
2593
2620
|
function FieldsetErrorText(props) {
|
|
2594
2621
|
const styles = (0, import_recipes24.fieldset)();
|
|
2595
|
-
return /* @__PURE__ */ (0,
|
|
2622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2596
2623
|
import_fieldset.Fieldset.ErrorText,
|
|
2597
2624
|
{
|
|
2598
2625
|
...props,
|
|
@@ -2610,31 +2637,31 @@ var FieldsetParts = {
|
|
|
2610
2637
|
};
|
|
2611
2638
|
|
|
2612
2639
|
// src/components/fieldset/fieldset.tsx
|
|
2613
|
-
var
|
|
2640
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2614
2641
|
function Fieldset2(props) {
|
|
2615
2642
|
const [fieldsetProps, { usage }, rootProps] = splitProps(
|
|
2616
2643
|
props,
|
|
2617
2644
|
["legend", "helperText", "errorText", "children"],
|
|
2618
2645
|
["usage"]
|
|
2619
2646
|
);
|
|
2620
|
-
return /* @__PURE__ */ (0,
|
|
2621
|
-
/* @__PURE__ */ (0,
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(FieldsetParts.Root, { ...rootProps, children: [
|
|
2648
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldsetParts.Legend, { usage, children: fieldsetProps.legend }),
|
|
2649
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldsetParts.HelperText, { usage, children: fieldsetProps.helperText }),
|
|
2623
2650
|
fieldsetProps.children,
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
2651
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldsetParts.ErrorText, { children: fieldsetProps.errorText })
|
|
2625
2652
|
] });
|
|
2626
2653
|
}
|
|
2627
2654
|
|
|
2628
2655
|
// src/components/FileStatus.tsx
|
|
2629
|
-
var
|
|
2656
|
+
var import_react23 = require("react");
|
|
2630
2657
|
var import_recipes26 = require("@cerberus/styled-system/recipes");
|
|
2631
2658
|
var import_css31 = require("@cerberus/styled-system/css");
|
|
2632
|
-
var
|
|
2659
|
+
var import_patterns5 = require("@cerberus/styled-system/patterns");
|
|
2633
2660
|
|
|
2634
2661
|
// src/components/ProgressBar.tsx
|
|
2635
2662
|
var import_css30 = require("@cerberus/styled-system/css");
|
|
2636
2663
|
var import_recipes25 = require("@cerberus/styled-system/recipes");
|
|
2637
|
-
var
|
|
2664
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
2638
2665
|
function ProgressBar(props) {
|
|
2639
2666
|
const { indeterminate, size, usage, now, label: label5, ...nativeProps } = props;
|
|
2640
2667
|
const styles = (0, import_recipes25.progressBar)({ size, usage });
|
|
@@ -2642,7 +2669,7 @@ function ProgressBar(props) {
|
|
|
2642
2669
|
const width = {
|
|
2643
2670
|
width: indeterminate ? "50%" : `${nowClamped}%`
|
|
2644
2671
|
};
|
|
2645
|
-
return /* @__PURE__ */ (0,
|
|
2672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2646
2673
|
"div",
|
|
2647
2674
|
{
|
|
2648
2675
|
...nativeProps,
|
|
@@ -2652,7 +2679,7 @@ function ProgressBar(props) {
|
|
|
2652
2679
|
"aria-valuenow": indeterminate ? 0 : nowClamped,
|
|
2653
2680
|
className: (0, import_css30.cx)(nativeProps.className, styles.root),
|
|
2654
2681
|
role: "progressbar",
|
|
2655
|
-
children: /* @__PURE__ */ (0,
|
|
2682
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
2656
2683
|
"div",
|
|
2657
2684
|
{
|
|
2658
2685
|
...indeterminate && { "data-indeterminate": true },
|
|
@@ -2666,7 +2693,7 @@ function ProgressBar(props) {
|
|
|
2666
2693
|
}
|
|
2667
2694
|
|
|
2668
2695
|
// src/components/FileStatus.tsx
|
|
2669
|
-
var
|
|
2696
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
2670
2697
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
2671
2698
|
processStatus2["TODO"] = "todo";
|
|
2672
2699
|
processStatus2["PROCESSING"] = "processing";
|
|
@@ -2676,10 +2703,10 @@ var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
|
2676
2703
|
})(processStatus || {});
|
|
2677
2704
|
function FileStatus(props) {
|
|
2678
2705
|
const { file, now, status, onClick, ...nativeProps } = props;
|
|
2679
|
-
const actionLabel = (0,
|
|
2680
|
-
const palette = (0,
|
|
2681
|
-
const modalIconPalette = (0,
|
|
2682
|
-
const styles = (0,
|
|
2706
|
+
const actionLabel = (0, import_react23.useMemo)(() => getStatusActionLabel(status), [status]);
|
|
2707
|
+
const palette = (0, import_react23.useMemo)(() => getPalette(status), [status]);
|
|
2708
|
+
const modalIconPalette = (0, import_react23.useMemo)(() => getModalIconPalette(status), [status]);
|
|
2709
|
+
const styles = (0, import_react23.useMemo)(() => {
|
|
2683
2710
|
switch (status) {
|
|
2684
2711
|
case "todo" /* TODO */:
|
|
2685
2712
|
return (0, import_recipes26.fileStatus)({ status: "todo" });
|
|
@@ -2693,7 +2720,7 @@ function FileStatus(props) {
|
|
|
2693
2720
|
return (0, import_recipes26.fileStatus)();
|
|
2694
2721
|
}
|
|
2695
2722
|
}, [status]);
|
|
2696
|
-
const handleClick = (0,
|
|
2723
|
+
const handleClick = (0, import_react23.useCallback)(
|
|
2697
2724
|
(e) => {
|
|
2698
2725
|
const actionStatus = getStatusActionLabel(
|
|
2699
2726
|
status
|
|
@@ -2702,31 +2729,31 @@ function FileStatus(props) {
|
|
|
2702
2729
|
},
|
|
2703
2730
|
[onClick]
|
|
2704
2731
|
);
|
|
2705
|
-
return /* @__PURE__ */ (0,
|
|
2732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2706
2733
|
"div",
|
|
2707
2734
|
{
|
|
2708
2735
|
...nativeProps,
|
|
2709
|
-
className: (0, import_css31.cx)(nativeProps.className, styles.root, (0,
|
|
2736
|
+
className: (0, import_css31.cx)(nativeProps.className, styles.root, (0, import_patterns5.hstack)()),
|
|
2710
2737
|
children: [
|
|
2711
|
-
/* @__PURE__ */ (0,
|
|
2738
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2712
2739
|
Avatar,
|
|
2713
2740
|
{
|
|
2714
2741
|
ariaLabel: "",
|
|
2715
2742
|
gradient: modalIconPalette,
|
|
2716
|
-
icon: /* @__PURE__ */ (0,
|
|
2743
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MatchFileStatusIcon, { size: 24, status }),
|
|
2717
2744
|
src: ""
|
|
2718
2745
|
}
|
|
2719
2746
|
),
|
|
2720
|
-
/* @__PURE__ */ (0,
|
|
2747
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
2721
2748
|
"div",
|
|
2722
2749
|
{
|
|
2723
|
-
className: (0,
|
|
2750
|
+
className: (0, import_patterns5.vstack)({
|
|
2724
2751
|
alignItems: "flex-start",
|
|
2725
2752
|
gap: "0.12rem",
|
|
2726
2753
|
w: "full"
|
|
2727
2754
|
}),
|
|
2728
2755
|
children: [
|
|
2729
|
-
/* @__PURE__ */ (0,
|
|
2756
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2730
2757
|
"small",
|
|
2731
2758
|
{
|
|
2732
2759
|
className: (0, import_css31.css)({
|
|
@@ -2736,7 +2763,7 @@ function FileStatus(props) {
|
|
|
2736
2763
|
children: file
|
|
2737
2764
|
}
|
|
2738
2765
|
),
|
|
2739
|
-
/* @__PURE__ */ (0,
|
|
2766
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2740
2767
|
ProgressBar,
|
|
2741
2768
|
{
|
|
2742
2769
|
id: props.id,
|
|
@@ -2745,27 +2772,27 @@ function FileStatus(props) {
|
|
|
2745
2772
|
size: "sm"
|
|
2746
2773
|
}
|
|
2747
2774
|
),
|
|
2748
|
-
/* @__PURE__ */ (0,
|
|
2775
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Field2, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2749
2776
|
FieldHelperText,
|
|
2750
2777
|
{
|
|
2751
2778
|
className: (0, import_css31.css)({
|
|
2752
2779
|
color: "page.text.100"
|
|
2753
2780
|
}),
|
|
2754
2781
|
id: `help:${file}`,
|
|
2755
|
-
children: /* @__PURE__ */ (0,
|
|
2782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MatchFileStatusText, { status, now })
|
|
2756
2783
|
}
|
|
2757
2784
|
) })
|
|
2758
2785
|
]
|
|
2759
2786
|
}
|
|
2760
2787
|
),
|
|
2761
|
-
/* @__PURE__ */ (0,
|
|
2788
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
2762
2789
|
IconButton,
|
|
2763
2790
|
{
|
|
2764
2791
|
ariaLabel: actionLabel,
|
|
2765
2792
|
onClick: handleClick,
|
|
2766
2793
|
palette,
|
|
2767
2794
|
size: "sm",
|
|
2768
|
-
children: /* @__PURE__ */ (0,
|
|
2795
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(MatchStatusAction, { status })
|
|
2769
2796
|
}
|
|
2770
2797
|
)
|
|
2771
2798
|
]
|
|
@@ -2782,13 +2809,13 @@ function MatchFileStatusIcon(props) {
|
|
|
2782
2809
|
} = icons;
|
|
2783
2810
|
switch (props.status) {
|
|
2784
2811
|
case "todo" /* TODO */:
|
|
2785
|
-
return /* @__PURE__ */ (0,
|
|
2812
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TodoIcon, { size: props.size });
|
|
2786
2813
|
case "processing" /* PROCESSING */:
|
|
2787
|
-
return /* @__PURE__ */ (0,
|
|
2814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(FileUploaderIcon, { size: props.size });
|
|
2788
2815
|
case "done" /* DONE */:
|
|
2789
|
-
return /* @__PURE__ */ (0,
|
|
2816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DoneIcon, { size: props.size });
|
|
2790
2817
|
case "error" /* ERROR */:
|
|
2791
|
-
return /* @__PURE__ */ (0,
|
|
2818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(InvalidIcon, { size: props.size });
|
|
2792
2819
|
default:
|
|
2793
2820
|
throw new Error("Unknown status");
|
|
2794
2821
|
}
|
|
@@ -2813,11 +2840,11 @@ function MatchStatusAction(props) {
|
|
|
2813
2840
|
switch (props.status) {
|
|
2814
2841
|
case "todo" /* TODO */:
|
|
2815
2842
|
case "processing" /* PROCESSING */:
|
|
2816
|
-
return /* @__PURE__ */ (0,
|
|
2843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CloseIcon, {});
|
|
2817
2844
|
case "error" /* ERROR */:
|
|
2818
|
-
return /* @__PURE__ */ (0,
|
|
2845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RedoIcon, {});
|
|
2819
2846
|
case "done" /* DONE */:
|
|
2820
|
-
return /* @__PURE__ */ (0,
|
|
2847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TrashIcon, {});
|
|
2821
2848
|
default:
|
|
2822
2849
|
throw new Error("Invalid status");
|
|
2823
2850
|
}
|
|
@@ -2864,52 +2891,52 @@ function getModalIconPalette(status) {
|
|
|
2864
2891
|
|
|
2865
2892
|
// src/components/FileUploader.tsx
|
|
2866
2893
|
var import_css32 = require("@cerberus/styled-system/css");
|
|
2867
|
-
var
|
|
2894
|
+
var import_patterns6 = require("@cerberus/styled-system/patterns");
|
|
2868
2895
|
var import_recipes27 = require("@cerberus/styled-system/recipes");
|
|
2869
|
-
var
|
|
2896
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
2870
2897
|
function FileUploader(props) {
|
|
2871
2898
|
var _a;
|
|
2872
2899
|
const { icons } = useCerberusContext();
|
|
2873
2900
|
const styles = (0, import_recipes27.fileUploader)();
|
|
2874
2901
|
const { waitingFileUploader: Icon } = icons;
|
|
2875
|
-
return /* @__PURE__ */ (0,
|
|
2902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2876
2903
|
"div",
|
|
2877
2904
|
{
|
|
2878
2905
|
...props.disabled ? { "aria-disabled": true } : {},
|
|
2879
2906
|
className: (0, import_css32.cx)(
|
|
2880
|
-
(0,
|
|
2907
|
+
(0, import_patterns6.vstack)({
|
|
2881
2908
|
justify: "center"
|
|
2882
2909
|
}),
|
|
2883
2910
|
styles.container
|
|
2884
2911
|
),
|
|
2885
2912
|
children: [
|
|
2886
|
-
/* @__PURE__ */ (0,
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2887
2914
|
Avatar,
|
|
2888
2915
|
{
|
|
2889
2916
|
gradient: "charon-light",
|
|
2890
2917
|
ariaLabel: "",
|
|
2891
|
-
icon: /* @__PURE__ */ (0,
|
|
2918
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, {}),
|
|
2892
2919
|
size: "md",
|
|
2893
2920
|
src: ""
|
|
2894
2921
|
}
|
|
2895
2922
|
) }),
|
|
2896
|
-
/* @__PURE__ */ (0,
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
2897
2924
|
"label",
|
|
2898
2925
|
{
|
|
2899
2926
|
className: (0, import_css32.cx)(
|
|
2900
|
-
(0,
|
|
2927
|
+
(0, import_patterns6.vstack)({
|
|
2901
2928
|
justify: "center"
|
|
2902
2929
|
}),
|
|
2903
2930
|
styles.label
|
|
2904
2931
|
),
|
|
2905
2932
|
htmlFor: props.name,
|
|
2906
2933
|
children: [
|
|
2907
|
-
/* @__PURE__ */ (0,
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Show, { when: Boolean(props.heading), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: styles.heading, children: props.heading }) }),
|
|
2908
2935
|
"Import ",
|
|
2909
2936
|
(_a = props.accept) == null ? void 0 : _a.replace(",", ", "),
|
|
2910
2937
|
" files",
|
|
2911
|
-
/* @__PURE__ */ (0,
|
|
2912
|
-
/* @__PURE__ */ (0,
|
|
2938
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: styles.description, children: "Click to select files" }),
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
2913
2940
|
"input",
|
|
2914
2941
|
{
|
|
2915
2942
|
...props,
|
|
@@ -2928,20 +2955,20 @@ function FileUploader(props) {
|
|
|
2928
2955
|
// src/components/Legend.tsx
|
|
2929
2956
|
var import_css33 = require("@cerberus/styled-system/css");
|
|
2930
2957
|
var import_recipes28 = require("@cerberus/styled-system/recipes");
|
|
2931
|
-
var
|
|
2958
|
+
var import_patterns7 = require("@cerberus/styled-system/patterns");
|
|
2932
2959
|
var import_field5 = require("@ark-ui/react/field");
|
|
2933
|
-
var
|
|
2960
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
2934
2961
|
function Legend(props) {
|
|
2935
2962
|
const { size, ...nativeProps } = props;
|
|
2936
2963
|
const { invalid, required } = (0, import_field5.useFieldContext)();
|
|
2937
|
-
return /* @__PURE__ */ (0,
|
|
2964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
2938
2965
|
"legend",
|
|
2939
2966
|
{
|
|
2940
2967
|
...nativeProps,
|
|
2941
2968
|
...invalid && { "aria-invalid": true },
|
|
2942
2969
|
className: (0, import_css33.cx)(
|
|
2943
2970
|
nativeProps.className,
|
|
2944
|
-
(0,
|
|
2971
|
+
(0, import_patterns7.hstack)({
|
|
2945
2972
|
justify: "space-between",
|
|
2946
2973
|
w: "full"
|
|
2947
2974
|
}),
|
|
@@ -2951,7 +2978,7 @@ function Legend(props) {
|
|
|
2951
2978
|
),
|
|
2952
2979
|
children: [
|
|
2953
2980
|
nativeProps.children,
|
|
2954
|
-
/* @__PURE__ */ (0,
|
|
2981
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Show, { when: required, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
2955
2982
|
"span",
|
|
2956
2983
|
{
|
|
2957
2984
|
className: (0, import_css33.css)({
|
|
@@ -2967,18 +2994,18 @@ function Legend(props) {
|
|
|
2967
2994
|
}
|
|
2968
2995
|
|
|
2969
2996
|
// src/components/Menu.tsx
|
|
2970
|
-
var
|
|
2997
|
+
var import_react24 = require("@ark-ui/react");
|
|
2971
2998
|
var import_recipes29 = require("@cerberus/styled-system/recipes");
|
|
2972
2999
|
var import_css34 = require("@cerberus/styled-system/css");
|
|
2973
|
-
var
|
|
3000
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
2974
3001
|
var menuStyles = (0, import_recipes29.menu)();
|
|
2975
|
-
var Menu =
|
|
3002
|
+
var Menu = import_react24.Menu.Root;
|
|
2976
3003
|
function MenuTrigger(props) {
|
|
2977
|
-
return /* @__PURE__ */ (0,
|
|
3004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react24.Menu.Trigger, { ...props, asChild: true });
|
|
2978
3005
|
}
|
|
2979
3006
|
function MenuContent(props) {
|
|
2980
|
-
return /* @__PURE__ */ (0,
|
|
2981
|
-
|
|
3007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react24.Menu.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3008
|
+
import_react24.Menu.Content,
|
|
2982
3009
|
{
|
|
2983
3010
|
...props,
|
|
2984
3011
|
className: (0, import_css34.cx)(props.className, menuStyles.content)
|
|
@@ -2986,12 +3013,12 @@ function MenuContent(props) {
|
|
|
2986
3013
|
) });
|
|
2987
3014
|
}
|
|
2988
3015
|
function MenuItem(props) {
|
|
2989
|
-
return /* @__PURE__ */ (0,
|
|
3016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react24.Menu.Item, { ...props, className: (0, import_css34.cx)(props.className, menuStyles.item) });
|
|
2990
3017
|
}
|
|
2991
|
-
var MenuItemGroup =
|
|
3018
|
+
var MenuItemGroup = import_react24.Menu.ItemGroup;
|
|
2992
3019
|
function MenuGroupLabel(props) {
|
|
2993
|
-
return /* @__PURE__ */ (0,
|
|
2994
|
-
|
|
3020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3021
|
+
import_react24.Menu.ItemGroupLabel,
|
|
2995
3022
|
{
|
|
2996
3023
|
...props,
|
|
2997
3024
|
className: (0, import_css34.cx)(props.className, menuStyles.itemGroupLabel)
|
|
@@ -2999,8 +3026,8 @@ function MenuGroupLabel(props) {
|
|
|
2999
3026
|
);
|
|
3000
3027
|
}
|
|
3001
3028
|
function MenuSeparator(props) {
|
|
3002
|
-
return /* @__PURE__ */ (0,
|
|
3003
|
-
|
|
3029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3030
|
+
import_react24.Menu.Separator,
|
|
3004
3031
|
{
|
|
3005
3032
|
...props,
|
|
3006
3033
|
className: (0, import_css34.cx)(props.className, menuStyles.separator)
|
|
@@ -3010,9 +3037,9 @@ function MenuSeparator(props) {
|
|
|
3010
3037
|
|
|
3011
3038
|
// src/components/Notification.tsx
|
|
3012
3039
|
var import_css35 = require("@cerberus/styled-system/css");
|
|
3013
|
-
var
|
|
3040
|
+
var import_patterns8 = require("@cerberus/styled-system/patterns");
|
|
3014
3041
|
var import_recipes30 = require("@cerberus/styled-system/recipes");
|
|
3015
|
-
var
|
|
3042
|
+
var import_react25 = require("react");
|
|
3016
3043
|
|
|
3017
3044
|
// src/aria-helpers/trap-focus.aria.ts
|
|
3018
3045
|
function trapFocus(modalRef) {
|
|
@@ -3041,29 +3068,29 @@ function trapFocus(modalRef) {
|
|
|
3041
3068
|
}
|
|
3042
3069
|
|
|
3043
3070
|
// src/components/Notification.tsx
|
|
3044
|
-
var
|
|
3071
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3045
3072
|
function MatchNotificationIcon(props) {
|
|
3046
3073
|
const { icons } = useCerberusContext();
|
|
3047
3074
|
const palette = props.palette || "info";
|
|
3048
3075
|
const key = `${palette}Notification`;
|
|
3049
3076
|
const Icon = icons[key];
|
|
3050
|
-
return /* @__PURE__ */ (0,
|
|
3077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, {});
|
|
3051
3078
|
}
|
|
3052
3079
|
function Notification(props) {
|
|
3053
3080
|
const { children, palette, onClose, ...nativeProps } = props;
|
|
3054
|
-
const ref = (0,
|
|
3081
|
+
const ref = (0, import_react25.useRef)(null);
|
|
3055
3082
|
const onKeyDown = trapFocus(ref);
|
|
3056
3083
|
const styles = (0, import_recipes30.notification)({ palette });
|
|
3057
3084
|
const { icons } = useCerberusContext();
|
|
3058
3085
|
const { close: CloseIcon } = icons;
|
|
3059
|
-
return /* @__PURE__ */ (0,
|
|
3086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
3060
3087
|
"dialog",
|
|
3061
3088
|
{
|
|
3062
3089
|
...nativeProps,
|
|
3063
3090
|
"data-placement": "left",
|
|
3064
3091
|
className: (0, import_css35.cx)(
|
|
3065
3092
|
nativeProps.className,
|
|
3066
|
-
(0,
|
|
3093
|
+
(0, import_patterns8.hstack)({
|
|
3067
3094
|
position: "relative",
|
|
3068
3095
|
gap: "4"
|
|
3069
3096
|
}),
|
|
@@ -3072,11 +3099,11 @@ function Notification(props) {
|
|
|
3072
3099
|
onKeyDown,
|
|
3073
3100
|
ref,
|
|
3074
3101
|
children: [
|
|
3075
|
-
/* @__PURE__ */ (0,
|
|
3076
|
-
/* @__PURE__ */ (0,
|
|
3102
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: styles.icon, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MatchNotificationIcon, { palette }) }),
|
|
3103
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3077
3104
|
"div",
|
|
3078
3105
|
{
|
|
3079
|
-
className: (0,
|
|
3106
|
+
className: (0, import_patterns8.vstack)({
|
|
3080
3107
|
alignItems: "flex-start",
|
|
3081
3108
|
gap: "0",
|
|
3082
3109
|
py: "2"
|
|
@@ -3084,14 +3111,14 @@ function Notification(props) {
|
|
|
3084
3111
|
children
|
|
3085
3112
|
}
|
|
3086
3113
|
),
|
|
3087
|
-
/* @__PURE__ */ (0,
|
|
3114
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3088
3115
|
"button",
|
|
3089
3116
|
{
|
|
3090
3117
|
"aria-label": "Close",
|
|
3091
3118
|
className: styles.close,
|
|
3092
3119
|
onClick: onClose,
|
|
3093
3120
|
value: props.id,
|
|
3094
|
-
children: /* @__PURE__ */ (0,
|
|
3121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseIcon, {})
|
|
3095
3122
|
}
|
|
3096
3123
|
)
|
|
3097
3124
|
]
|
|
@@ -3102,21 +3129,21 @@ function Notification(props) {
|
|
|
3102
3129
|
// src/components/NotificationHeading.tsx
|
|
3103
3130
|
var import_css36 = require("@cerberus/styled-system/css");
|
|
3104
3131
|
var import_recipes31 = require("@cerberus/styled-system/recipes");
|
|
3105
|
-
var
|
|
3132
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3106
3133
|
function NotificationHeading(props) {
|
|
3107
3134
|
const { palette, ...nativeProps } = props;
|
|
3108
3135
|
const styles = (0, import_recipes31.notification)({ palette });
|
|
3109
|
-
return /* @__PURE__ */ (0,
|
|
3136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: (0, import_css36.cx)(nativeProps.className, styles.heading), ...nativeProps });
|
|
3110
3137
|
}
|
|
3111
3138
|
|
|
3112
3139
|
// src/components/NotificationDescription.tsx
|
|
3113
3140
|
var import_css37 = require("@cerberus/styled-system/css");
|
|
3114
3141
|
var import_recipes32 = require("@cerberus/styled-system/recipes");
|
|
3115
|
-
var
|
|
3142
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3116
3143
|
function NotificationDescription(props) {
|
|
3117
3144
|
const { palette, ...nativeProps } = props;
|
|
3118
3145
|
const styles = (0, import_recipes32.notification)({ palette });
|
|
3119
|
-
return /* @__PURE__ */ (0,
|
|
3146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3120
3147
|
"p",
|
|
3121
3148
|
{
|
|
3122
3149
|
className: (0, import_css37.cx)(nativeProps.className, styles.description),
|
|
@@ -3129,11 +3156,11 @@ function NotificationDescription(props) {
|
|
|
3129
3156
|
var import_radio_group = require("@ark-ui/react/radio-group");
|
|
3130
3157
|
var import_css38 = require("@cerberus/styled-system/css");
|
|
3131
3158
|
var import_recipes33 = require("@cerberus/styled-system/recipes");
|
|
3132
|
-
var
|
|
3159
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3133
3160
|
function RadioGroupRoot(props) {
|
|
3134
3161
|
const { size, orientation, ...rootProps } = props;
|
|
3135
3162
|
const styles = (0, import_recipes33.radioGroup)({ size, orientation });
|
|
3136
|
-
return /* @__PURE__ */ (0,
|
|
3163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3137
3164
|
import_radio_group.RadioGroup.Root,
|
|
3138
3165
|
{
|
|
3139
3166
|
...rootProps,
|
|
@@ -3143,7 +3170,7 @@ function RadioGroupRoot(props) {
|
|
|
3143
3170
|
}
|
|
3144
3171
|
function RadioGroupLabel(props) {
|
|
3145
3172
|
const styles = (0, import_recipes33.radioGroup)();
|
|
3146
|
-
return /* @__PURE__ */ (0,
|
|
3173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3147
3174
|
import_radio_group.RadioGroup.Label,
|
|
3148
3175
|
{
|
|
3149
3176
|
...props,
|
|
@@ -3153,7 +3180,7 @@ function RadioGroupLabel(props) {
|
|
|
3153
3180
|
}
|
|
3154
3181
|
function RadioGroupIndicator(props) {
|
|
3155
3182
|
const styles = (0, import_recipes33.radioGroup)();
|
|
3156
|
-
return /* @__PURE__ */ (0,
|
|
3183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3157
3184
|
import_radio_group.RadioGroup.Indicator,
|
|
3158
3185
|
{
|
|
3159
3186
|
...props,
|
|
@@ -3163,7 +3190,7 @@ function RadioGroupIndicator(props) {
|
|
|
3163
3190
|
}
|
|
3164
3191
|
function RadioGroupItem(props) {
|
|
3165
3192
|
const styles = (0, import_recipes33.radioGroup)();
|
|
3166
|
-
return /* @__PURE__ */ (0,
|
|
3193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3167
3194
|
import_radio_group.RadioGroup.Item,
|
|
3168
3195
|
{
|
|
3169
3196
|
...props,
|
|
@@ -3174,7 +3201,7 @@ function RadioGroupItem(props) {
|
|
|
3174
3201
|
function RadioGroupItemText(props) {
|
|
3175
3202
|
const { size, orientation, ...itemTextProps } = props;
|
|
3176
3203
|
const styles = (0, import_recipes33.radioGroup)({ size, orientation });
|
|
3177
|
-
return /* @__PURE__ */ (0,
|
|
3204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3178
3205
|
import_radio_group.RadioGroup.ItemText,
|
|
3179
3206
|
{
|
|
3180
3207
|
...itemTextProps,
|
|
@@ -3185,7 +3212,7 @@ function RadioGroupItemText(props) {
|
|
|
3185
3212
|
function RadioGroupItemControl(props) {
|
|
3186
3213
|
const { size, orientation, ...itemControlProps } = props;
|
|
3187
3214
|
const styles = (0, import_recipes33.radioGroup)({ size, orientation });
|
|
3188
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3189
3216
|
import_radio_group.RadioGroup.ItemControl,
|
|
3190
3217
|
{
|
|
3191
3218
|
...itemControlProps,
|
|
@@ -3194,7 +3221,7 @@ function RadioGroupItemControl(props) {
|
|
|
3194
3221
|
);
|
|
3195
3222
|
}
|
|
3196
3223
|
function RadioGroupItemHiddenInput(props) {
|
|
3197
|
-
return /* @__PURE__ */ (0,
|
|
3224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_radio_group.RadioGroup.ItemHiddenInput, { ...props });
|
|
3198
3225
|
}
|
|
3199
3226
|
var RadioGroup = RadioGroupRoot;
|
|
3200
3227
|
|
|
@@ -3210,13 +3237,13 @@ var RadioParts = {
|
|
|
3210
3237
|
};
|
|
3211
3238
|
|
|
3212
3239
|
// src/components/radio/radio.tsx
|
|
3213
|
-
var
|
|
3240
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3214
3241
|
function Radio(props) {
|
|
3215
3242
|
const { size, children, ...groupProps } = props;
|
|
3216
|
-
return /* @__PURE__ */ (0,
|
|
3217
|
-
/* @__PURE__ */ (0,
|
|
3218
|
-
/* @__PURE__ */ (0,
|
|
3219
|
-
/* @__PURE__ */ (0,
|
|
3243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(RadioGroupItem, { ...groupProps, children: [
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(RadioGroupItemControl, { size }),
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(RadioGroupItemText, { size, children }),
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(RadioGroupItemHiddenInput, {})
|
|
3220
3247
|
] });
|
|
3221
3248
|
}
|
|
3222
3249
|
|
|
@@ -3224,11 +3251,11 @@ function Radio(props) {
|
|
|
3224
3251
|
var import_rating_group = require("@ark-ui/react/rating-group");
|
|
3225
3252
|
var import_css39 = require("@cerberus/styled-system/css");
|
|
3226
3253
|
var import_recipes34 = require("@cerberus/styled-system/recipes");
|
|
3227
|
-
var
|
|
3254
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3228
3255
|
function RatingRoot(props) {
|
|
3229
3256
|
const { orientation, size, ...rootProps } = props;
|
|
3230
3257
|
const styles = (0, import_recipes34.ratingGroup)({ orientation, size });
|
|
3231
|
-
return /* @__PURE__ */ (0,
|
|
3258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3232
3259
|
import_rating_group.RatingGroup.Root,
|
|
3233
3260
|
{
|
|
3234
3261
|
...rootProps,
|
|
@@ -3238,7 +3265,7 @@ function RatingRoot(props) {
|
|
|
3238
3265
|
}
|
|
3239
3266
|
function RatingLabel(props) {
|
|
3240
3267
|
const styles = (0, import_recipes34.ratingGroup)();
|
|
3241
|
-
return /* @__PURE__ */ (0,
|
|
3268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3242
3269
|
import_rating_group.RatingGroup.Label,
|
|
3243
3270
|
{
|
|
3244
3271
|
...props,
|
|
@@ -3248,7 +3275,7 @@ function RatingLabel(props) {
|
|
|
3248
3275
|
}
|
|
3249
3276
|
function RatingControl(props) {
|
|
3250
3277
|
const styles = (0, import_recipes34.ratingGroup)();
|
|
3251
|
-
return /* @__PURE__ */ (0,
|
|
3278
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3252
3279
|
import_rating_group.RatingGroup.Control,
|
|
3253
3280
|
{
|
|
3254
3281
|
...props,
|
|
@@ -3257,12 +3284,12 @@ function RatingControl(props) {
|
|
|
3257
3284
|
);
|
|
3258
3285
|
}
|
|
3259
3286
|
function RatingContext(props) {
|
|
3260
|
-
return /* @__PURE__ */ (0,
|
|
3287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_rating_group.RatingGroup.Context, { ...props });
|
|
3261
3288
|
}
|
|
3262
3289
|
function RatingItem(props) {
|
|
3263
3290
|
const { palette, ...itemProps } = props;
|
|
3264
3291
|
const styles = (0, import_recipes34.ratingGroup)({ palette });
|
|
3265
|
-
return /* @__PURE__ */ (0,
|
|
3292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3266
3293
|
import_rating_group.RatingGroup.Item,
|
|
3267
3294
|
{
|
|
3268
3295
|
...itemProps,
|
|
@@ -3271,10 +3298,10 @@ function RatingItem(props) {
|
|
|
3271
3298
|
);
|
|
3272
3299
|
}
|
|
3273
3300
|
function RatingItemContext(props) {
|
|
3274
|
-
return /* @__PURE__ */ (0,
|
|
3301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_rating_group.RatingGroup.ItemContext, { ...props });
|
|
3275
3302
|
}
|
|
3276
3303
|
function RatingHiddenInput(props) {
|
|
3277
|
-
return /* @__PURE__ */ (0,
|
|
3304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_rating_group.RatingGroup.HiddenInput, { ...props });
|
|
3278
3305
|
}
|
|
3279
3306
|
|
|
3280
3307
|
// src/components/rating/parts.tsx
|
|
@@ -3289,21 +3316,21 @@ var RatingParts = {
|
|
|
3289
3316
|
};
|
|
3290
3317
|
|
|
3291
3318
|
// src/components/rating/rating.tsx
|
|
3292
|
-
var
|
|
3319
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3293
3320
|
function Rating(props) {
|
|
3294
3321
|
const [{ label: label5 }, styleProps, rootProps] = splitProps(
|
|
3295
3322
|
props,
|
|
3296
3323
|
["label"],
|
|
3297
3324
|
["orientation", "palette", "size"]
|
|
3298
3325
|
);
|
|
3299
|
-
return /* @__PURE__ */ (0,
|
|
3300
|
-
/* @__PURE__ */ (0,
|
|
3301
|
-
/* @__PURE__ */ (0,
|
|
3326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(RatingParts.Root, { ...styleProps, ...rootProps, children: [
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Show, { when: Boolean(label5), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RatingParts.Label, { children: label5 }) }),
|
|
3328
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RatingParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RatingParts.Context, { children: (context) => context.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
3302
3329
|
RatingParts.Item,
|
|
3303
3330
|
{
|
|
3304
3331
|
index: item,
|
|
3305
3332
|
palette: styleProps.palette,
|
|
3306
|
-
children: /* @__PURE__ */ (0,
|
|
3333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RatingParts.ItemContext, { children: rootProps.children })
|
|
3307
3334
|
},
|
|
3308
3335
|
item
|
|
3309
3336
|
)) }) })
|
|
@@ -3331,52 +3358,52 @@ var SelectParts = {
|
|
|
3331
3358
|
|
|
3332
3359
|
// src/components/select/select.tsx
|
|
3333
3360
|
var import_jsx5 = require("@cerberus/styled-system/jsx");
|
|
3334
|
-
var
|
|
3361
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3335
3362
|
function Select2(props) {
|
|
3336
3363
|
const { collection, placeholder, ...rootProps } = props;
|
|
3337
3364
|
const { icons } = useCerberusContext();
|
|
3338
3365
|
const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
|
|
3339
|
-
return /* @__PURE__ */ (0,
|
|
3340
|
-
/* @__PURE__ */ (0,
|
|
3341
|
-
/* @__PURE__ */ (0,
|
|
3342
|
-
/* @__PURE__ */ (0,
|
|
3343
|
-
/* @__PURE__ */ (0,
|
|
3344
|
-
/* @__PURE__ */ (0,
|
|
3366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(SelectParts.Root, { collection, ...rootProps, children: [
|
|
3367
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(SelectParts.Trigger, { children: [
|
|
3368
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.ValueText, { placeholder }),
|
|
3369
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(import_jsx5.HStack, { children: [
|
|
3370
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Show, { when: props.invalid, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(InvalidIcon, { "data-part": "invalid-icon" }) }),
|
|
3371
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectArrow, {}) })
|
|
3345
3372
|
] })
|
|
3346
3373
|
] }) }),
|
|
3347
|
-
/* @__PURE__ */ (0,
|
|
3348
|
-
/* @__PURE__ */ (0,
|
|
3374
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.Content, { size: rootProps.size, children: props.children }) }) }),
|
|
3375
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.HiddenSelect, {})
|
|
3349
3376
|
] });
|
|
3350
3377
|
}
|
|
3351
3378
|
function Option(props) {
|
|
3352
3379
|
const { item, ...itemProps } = props;
|
|
3353
3380
|
const { icons } = useCerberusContext();
|
|
3354
3381
|
const { selectChecked: CheckedIcon } = icons;
|
|
3355
|
-
return /* @__PURE__ */ (0,
|
|
3356
|
-
/* @__PURE__ */ (0,
|
|
3357
|
-
/* @__PURE__ */ (0,
|
|
3382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(SelectParts.Item, { ...itemProps, item, children: [
|
|
3383
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.ItemText, { children: item == null ? void 0 : item.label }),
|
|
3384
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SelectParts.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CheckedIcon, {}) })
|
|
3358
3385
|
] });
|
|
3359
3386
|
}
|
|
3360
3387
|
|
|
3361
3388
|
// src/components/select/option-group.tsx
|
|
3362
|
-
var
|
|
3389
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3363
3390
|
function OptionGroup(props) {
|
|
3364
|
-
return /* @__PURE__ */ (0,
|
|
3391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectItemGroup, { ...props });
|
|
3365
3392
|
}
|
|
3366
3393
|
function OptionGroupLabel(props) {
|
|
3367
|
-
return /* @__PURE__ */ (0,
|
|
3394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(SelectItemGroupLabel, { ...props });
|
|
3368
3395
|
}
|
|
3369
3396
|
|
|
3370
3397
|
// src/components/switch/primitives.tsx
|
|
3371
|
-
var
|
|
3398
|
+
var import_react26 = require("@ark-ui/react");
|
|
3372
3399
|
var import_css40 = require("@cerberus/styled-system/css");
|
|
3373
3400
|
var import_recipes35 = require("@cerberus/styled-system/recipes");
|
|
3374
|
-
var
|
|
3401
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3375
3402
|
function SwitchRoot(props) {
|
|
3376
3403
|
const { size, ...rootProps } = props;
|
|
3377
3404
|
const styles = (0, import_recipes35.switchRecipe)({ size });
|
|
3378
|
-
return /* @__PURE__ */ (0,
|
|
3379
|
-
|
|
3405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3406
|
+
import_react26.Switch.Root,
|
|
3380
3407
|
{
|
|
3381
3408
|
...rootProps,
|
|
3382
3409
|
className: (0, import_css40.cx)(styles.root, rootProps.className)
|
|
@@ -3385,12 +3412,12 @@ function SwitchRoot(props) {
|
|
|
3385
3412
|
}
|
|
3386
3413
|
function SwitchLabel(props) {
|
|
3387
3414
|
const styles = (0, import_recipes35.switchRecipe)();
|
|
3388
|
-
return /* @__PURE__ */ (0,
|
|
3415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react26.Switch.Label, { ...props, className: (0, import_css40.cx)(styles.label, props.className) });
|
|
3389
3416
|
}
|
|
3390
3417
|
function SwitchControl(props) {
|
|
3391
3418
|
const styles = (0, import_recipes35.switchRecipe)();
|
|
3392
|
-
return /* @__PURE__ */ (0,
|
|
3393
|
-
|
|
3419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
3420
|
+
import_react26.Switch.Control,
|
|
3394
3421
|
{
|
|
3395
3422
|
...props,
|
|
3396
3423
|
className: (0, import_css40.cx)(styles.control, props.className)
|
|
@@ -3399,9 +3426,9 @@ function SwitchControl(props) {
|
|
|
3399
3426
|
}
|
|
3400
3427
|
function SwitchThumb(props) {
|
|
3401
3428
|
const styles = (0, import_recipes35.switchRecipe)();
|
|
3402
|
-
return /* @__PURE__ */ (0,
|
|
3429
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react26.Switch.Thumb, { ...props, className: (0, import_css40.cx)(styles.thumb, props.className) });
|
|
3403
3430
|
}
|
|
3404
|
-
var SwitchHiddenInput =
|
|
3431
|
+
var SwitchHiddenInput = import_react26.Switch.HiddenInput;
|
|
3405
3432
|
|
|
3406
3433
|
// src/components/switch/parts.ts
|
|
3407
3434
|
var SwitchParts = {
|
|
@@ -3413,21 +3440,21 @@ var SwitchParts = {
|
|
|
3413
3440
|
};
|
|
3414
3441
|
|
|
3415
3442
|
// src/components/switch/switch-indicator.tsx
|
|
3416
|
-
var
|
|
3443
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3417
3444
|
function SwitchIndicator() {
|
|
3418
3445
|
const { icons } = useCerberusContext();
|
|
3419
3446
|
const { toggleChecked: CheckIcon } = icons;
|
|
3420
|
-
return /* @__PURE__ */ (0,
|
|
3447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(CheckIcon, {});
|
|
3421
3448
|
}
|
|
3422
3449
|
|
|
3423
3450
|
// src/components/switch/switch.tsx
|
|
3424
|
-
var
|
|
3451
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3425
3452
|
function Switch2(props) {
|
|
3426
3453
|
const { children, ...rootProps } = props;
|
|
3427
|
-
return /* @__PURE__ */ (0,
|
|
3428
|
-
/* @__PURE__ */ (0,
|
|
3429
|
-
/* @__PURE__ */ (0,
|
|
3430
|
-
/* @__PURE__ */ (0,
|
|
3454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(SwitchParts.Root, { ...rootProps, children: [
|
|
3455
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SwitchParts.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SwitchParts.Thumb, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SwitchIndicator, {}) }) }),
|
|
3456
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SwitchParts.Label, { children }),
|
|
3457
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SwitchParts.HiddenInput, {})
|
|
3431
3458
|
] });
|
|
3432
3459
|
}
|
|
3433
3460
|
|
|
@@ -3438,20 +3465,20 @@ var import_css41 = require("@cerberus/styled-system/css");
|
|
|
3438
3465
|
// src/context/tabs.tsx
|
|
3439
3466
|
var import_tabs = require("@ark-ui/react/tabs");
|
|
3440
3467
|
var import_recipes36 = require("@cerberus/styled-system/recipes");
|
|
3441
|
-
var
|
|
3442
|
-
var
|
|
3443
|
-
var TabsContext = (0,
|
|
3468
|
+
var import_react27 = require("react");
|
|
3469
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
3470
|
+
var TabsContext = (0, import_react27.createContext)(null);
|
|
3444
3471
|
function Tabs(props) {
|
|
3445
3472
|
const { cache, defaultValue, palette, uuid, ...arkProps } = props;
|
|
3446
|
-
const [activeTab, setActiveTab] = (0,
|
|
3473
|
+
const [activeTab, setActiveTab] = (0, import_react27.useState)(
|
|
3447
3474
|
() => cache ? "" : defaultValue
|
|
3448
3475
|
);
|
|
3449
3476
|
const styles = (0, import_recipes36.tabs)({ palette });
|
|
3450
|
-
const cacheKey = (0,
|
|
3477
|
+
const cacheKey = (0, import_react27.useMemo)(
|
|
3451
3478
|
() => uuid ? `cerberus-tabs-${uuid}` : "cerberus-tabs",
|
|
3452
3479
|
[uuid]
|
|
3453
3480
|
);
|
|
3454
|
-
const handleValueChange = (0,
|
|
3481
|
+
const handleValueChange = (0, import_react27.useCallback)(
|
|
3455
3482
|
(details) => {
|
|
3456
3483
|
if (cache) {
|
|
3457
3484
|
setLocalStorage(cacheKey, details.value);
|
|
@@ -3460,20 +3487,20 @@ function Tabs(props) {
|
|
|
3460
3487
|
},
|
|
3461
3488
|
[cache]
|
|
3462
3489
|
);
|
|
3463
|
-
(0,
|
|
3490
|
+
(0, import_react27.useEffect)(() => {
|
|
3464
3491
|
if (cache && !activeTab) {
|
|
3465
3492
|
const cachedTab = getLocalStorage(cacheKey, defaultValue ?? "");
|
|
3466
3493
|
setActiveTab(cachedTab);
|
|
3467
3494
|
}
|
|
3468
3495
|
}, [cache, defaultValue, activeTab]);
|
|
3469
|
-
const value = (0,
|
|
3496
|
+
const value = (0, import_react27.useMemo)(
|
|
3470
3497
|
() => ({
|
|
3471
3498
|
active: activeTab,
|
|
3472
3499
|
styles
|
|
3473
3500
|
}),
|
|
3474
3501
|
[activeTab, palette, styles]
|
|
3475
3502
|
);
|
|
3476
|
-
return /* @__PURE__ */ (0,
|
|
3503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TabsContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
3477
3504
|
import_tabs.Tabs.Root,
|
|
3478
3505
|
{
|
|
3479
3506
|
...arkProps,
|
|
@@ -3487,7 +3514,7 @@ function Tabs(props) {
|
|
|
3487
3514
|
) });
|
|
3488
3515
|
}
|
|
3489
3516
|
function useTabsContext() {
|
|
3490
|
-
const context = (0,
|
|
3517
|
+
const context = (0, import_react27.useContext)(TabsContext);
|
|
3491
3518
|
if (!context) {
|
|
3492
3519
|
throw new Error("useTabsContext must be used within a Tabs Provider.");
|
|
3493
3520
|
}
|
|
@@ -3495,18 +3522,18 @@ function useTabsContext() {
|
|
|
3495
3522
|
}
|
|
3496
3523
|
|
|
3497
3524
|
// src/components/Tabs.client.tsx
|
|
3498
|
-
var
|
|
3525
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
3499
3526
|
function TabsList(props) {
|
|
3500
3527
|
const { children, ...tabsProps } = props;
|
|
3501
3528
|
const { styles } = useTabsContext();
|
|
3502
|
-
return /* @__PURE__ */ (0,
|
|
3529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3503
3530
|
import_tabs2.Tabs.List,
|
|
3504
3531
|
{
|
|
3505
3532
|
...tabsProps,
|
|
3506
3533
|
className: (0, import_css41.cx)(tabsProps.className, styles.list),
|
|
3507
3534
|
children: [
|
|
3508
3535
|
children,
|
|
3509
|
-
/* @__PURE__ */ (0,
|
|
3536
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TabIndicator, {})
|
|
3510
3537
|
]
|
|
3511
3538
|
}
|
|
3512
3539
|
);
|
|
@@ -3514,7 +3541,7 @@ function TabsList(props) {
|
|
|
3514
3541
|
var TabList = TabsList;
|
|
3515
3542
|
function Tab(props) {
|
|
3516
3543
|
const { styles } = useTabsContext();
|
|
3517
|
-
return /* @__PURE__ */ (0,
|
|
3544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3518
3545
|
import_tabs2.Tabs.Trigger,
|
|
3519
3546
|
{
|
|
3520
3547
|
...props,
|
|
@@ -3524,7 +3551,7 @@ function Tab(props) {
|
|
|
3524
3551
|
}
|
|
3525
3552
|
function TabIndicator(props) {
|
|
3526
3553
|
const { styles } = useTabsContext();
|
|
3527
|
-
return /* @__PURE__ */ (0,
|
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3528
3555
|
import_tabs2.Tabs.Indicator,
|
|
3529
3556
|
{
|
|
3530
3557
|
...props,
|
|
@@ -3534,7 +3561,7 @@ function TabIndicator(props) {
|
|
|
3534
3561
|
}
|
|
3535
3562
|
function TabPanel(props) {
|
|
3536
3563
|
const { styles } = useTabsContext();
|
|
3537
|
-
return /* @__PURE__ */ (0,
|
|
3564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3538
3565
|
import_tabs2.Tabs.Content,
|
|
3539
3566
|
{
|
|
3540
3567
|
...props,
|
|
@@ -3546,52 +3573,52 @@ function TabPanel(props) {
|
|
|
3546
3573
|
// src/components/Table.tsx
|
|
3547
3574
|
var import_css42 = require("@cerberus/styled-system/css");
|
|
3548
3575
|
var import_recipes37 = require("@cerberus/styled-system/recipes");
|
|
3549
|
-
var
|
|
3576
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
3550
3577
|
function Table(props) {
|
|
3551
3578
|
const { caption, children, ...nativeProps } = props;
|
|
3552
3579
|
const styles = (0, import_recipes37.table)();
|
|
3553
|
-
return /* @__PURE__ */ (0,
|
|
3580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: styles.container, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
3554
3581
|
"table",
|
|
3555
3582
|
{
|
|
3556
3583
|
...nativeProps,
|
|
3557
3584
|
className: (0, import_css42.cx)(nativeProps.className, styles.table),
|
|
3558
3585
|
children: [
|
|
3559
|
-
/* @__PURE__ */ (0,
|
|
3586
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("caption", { className: styles.caption, children: caption }),
|
|
3560
3587
|
children
|
|
3561
3588
|
]
|
|
3562
3589
|
}
|
|
3563
3590
|
) });
|
|
3564
3591
|
}
|
|
3565
3592
|
function Tr(props) {
|
|
3566
|
-
return /* @__PURE__ */ (0,
|
|
3593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("tr", { ...props });
|
|
3567
3594
|
}
|
|
3568
3595
|
|
|
3569
3596
|
// src/components/Thead.tsx
|
|
3570
3597
|
var import_css43 = require("@cerberus/styled-system/css");
|
|
3571
3598
|
var import_recipes38 = require("@cerberus/styled-system/recipes");
|
|
3572
|
-
var
|
|
3599
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
3573
3600
|
function Thead(props) {
|
|
3574
|
-
return /* @__PURE__ */ (0,
|
|
3601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("thead", { ...props, className: (0, import_css43.cx)(props.className, (0, import_recipes38.thead)()) });
|
|
3575
3602
|
}
|
|
3576
3603
|
|
|
3577
3604
|
// src/components/Th.tsx
|
|
3578
3605
|
var import_css44 = require("@cerberus/styled-system/css");
|
|
3579
3606
|
var import_recipes39 = require("@cerberus/styled-system/recipes");
|
|
3580
|
-
var
|
|
3607
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
3581
3608
|
function Th(props) {
|
|
3582
3609
|
const { size, onClick, ...nativeProps } = props;
|
|
3583
|
-
return /* @__PURE__ */ (0,
|
|
3610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3584
3611
|
Show,
|
|
3585
3612
|
{
|
|
3586
3613
|
when: Boolean(onClick),
|
|
3587
|
-
fallback: /* @__PURE__ */ (0,
|
|
3614
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3588
3615
|
"th",
|
|
3589
3616
|
{
|
|
3590
3617
|
...nativeProps,
|
|
3591
3618
|
className: (0, import_css44.cx)(nativeProps.className, (0, import_recipes39.th)({ size }))
|
|
3592
3619
|
}
|
|
3593
3620
|
),
|
|
3594
|
-
children: /* @__PURE__ */ (0,
|
|
3621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("th", { ...nativeProps, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
3595
3622
|
"button",
|
|
3596
3623
|
{
|
|
3597
3624
|
className: (0, import_css44.cx)(
|
|
@@ -3619,10 +3646,10 @@ function Th(props) {
|
|
|
3619
3646
|
// src/components/Td.tsx
|
|
3620
3647
|
var import_css45 = require("@cerberus/styled-system/css");
|
|
3621
3648
|
var import_recipes40 = require("@cerberus/styled-system/recipes");
|
|
3622
|
-
var
|
|
3649
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
3623
3650
|
function Td(props) {
|
|
3624
3651
|
const { size, ...nativeProps } = props;
|
|
3625
|
-
return /* @__PURE__ */ (0,
|
|
3652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
3626
3653
|
"td",
|
|
3627
3654
|
{
|
|
3628
3655
|
...nativeProps,
|
|
@@ -3639,10 +3666,10 @@ function Td(props) {
|
|
|
3639
3666
|
// src/components/Tbody.tsx
|
|
3640
3667
|
var import_recipes41 = require("@cerberus/styled-system/recipes");
|
|
3641
3668
|
var import_css46 = require("@cerberus/styled-system/css");
|
|
3642
|
-
var
|
|
3669
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
3643
3670
|
function Tbody(props) {
|
|
3644
3671
|
const { decoration, ...nativeProps } = props;
|
|
3645
|
-
return /* @__PURE__ */ (0,
|
|
3672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
3646
3673
|
"tbody",
|
|
3647
3674
|
{
|
|
3648
3675
|
...nativeProps,
|
|
@@ -3659,7 +3686,7 @@ function Tbody(props) {
|
|
|
3659
3686
|
// src/components/Tag.tsx
|
|
3660
3687
|
var import_css47 = require("@cerberus/styled-system/css");
|
|
3661
3688
|
var import_recipes42 = require("@cerberus/styled-system/recipes");
|
|
3662
|
-
var
|
|
3689
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
3663
3690
|
function Tag(props) {
|
|
3664
3691
|
const { shape: initShape, gradient, onClick, usage, ...nativeProps } = props;
|
|
3665
3692
|
const palette = (props == null ? void 0 : props.palette) ?? "page";
|
|
@@ -3668,7 +3695,7 @@ function Tag(props) {
|
|
|
3668
3695
|
const closableStyles = isClosable ? closableCss : "";
|
|
3669
3696
|
const { icons } = useCerberusContext();
|
|
3670
3697
|
const { close: Close } = icons;
|
|
3671
|
-
return /* @__PURE__ */ (0,
|
|
3698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
3672
3699
|
"span",
|
|
3673
3700
|
{
|
|
3674
3701
|
...nativeProps,
|
|
@@ -3684,7 +3711,7 @@ function Tag(props) {
|
|
|
3684
3711
|
),
|
|
3685
3712
|
children: [
|
|
3686
3713
|
props.children,
|
|
3687
|
-
/* @__PURE__ */ (0,
|
|
3714
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Show, { when: isClosable, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
3688
3715
|
"button",
|
|
3689
3716
|
{
|
|
3690
3717
|
"aria-label": "Close",
|
|
@@ -3694,7 +3721,7 @@ function Tag(props) {
|
|
|
3694
3721
|
size: "sm"
|
|
3695
3722
|
}),
|
|
3696
3723
|
onClick,
|
|
3697
|
-
children: /* @__PURE__ */ (0,
|
|
3724
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Close, {})
|
|
3698
3725
|
}
|
|
3699
3726
|
) })
|
|
3700
3727
|
]
|
|
@@ -3722,22 +3749,22 @@ var ToggleParts = {
|
|
|
3722
3749
|
var import_tooltip = require("@ark-ui/react/tooltip");
|
|
3723
3750
|
var import_css48 = require("@cerberus/styled-system/css");
|
|
3724
3751
|
var import_recipes43 = require("@cerberus/styled-system/recipes");
|
|
3725
|
-
var
|
|
3752
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
3726
3753
|
function Tooltip(props) {
|
|
3727
3754
|
const { content, children, asChild, ...nativeProps } = props;
|
|
3728
3755
|
const styles = (0, import_recipes43.tooltip)();
|
|
3729
3756
|
const position = {
|
|
3730
3757
|
placement: props.position || "top"
|
|
3731
3758
|
};
|
|
3732
|
-
return /* @__PURE__ */ (0,
|
|
3733
|
-
/* @__PURE__ */ (0,
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_tooltip.Tooltip.Root, { openDelay: 400, positioning: position, children: [
|
|
3760
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_tooltip.Tooltip.Trigger, { className: styles.trigger, asChild, children }),
|
|
3761
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_tooltip.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
3735
3762
|
import_tooltip.Tooltip.Content,
|
|
3736
3763
|
{
|
|
3737
3764
|
...nativeProps,
|
|
3738
3765
|
className: (0, import_css48.cx)(nativeProps.className, styles.content),
|
|
3739
3766
|
children: [
|
|
3740
|
-
/* @__PURE__ */ (0,
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_tooltip.Tooltip.Arrow, { className: styles.arrow, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_tooltip.Tooltip.ArrowTip, { className: styles.arrowTip }) }),
|
|
3741
3768
|
content
|
|
3742
3769
|
]
|
|
3743
3770
|
}
|
|
@@ -3746,23 +3773,23 @@ function Tooltip(props) {
|
|
|
3746
3773
|
}
|
|
3747
3774
|
|
|
3748
3775
|
// src/context/confirm-modal.tsx
|
|
3749
|
-
var
|
|
3776
|
+
var import_react28 = require("react");
|
|
3750
3777
|
var import_css49 = require("@cerberus/styled-system/css");
|
|
3751
3778
|
var import_jsx6 = require("@cerberus/styled-system/jsx");
|
|
3752
|
-
var
|
|
3753
|
-
var ConfirmModalContext = (0,
|
|
3779
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
3780
|
+
var ConfirmModalContext = (0, import_react28.createContext)(null);
|
|
3754
3781
|
function ConfirmModal(props) {
|
|
3755
|
-
const [open, setOpen] = (0,
|
|
3756
|
-
const [content, setContent] = (0,
|
|
3757
|
-
const resolveRef = (0,
|
|
3782
|
+
const [open, setOpen] = (0, import_react28.useState)(false);
|
|
3783
|
+
const [content, setContent] = (0, import_react28.useState)(null);
|
|
3784
|
+
const resolveRef = (0, import_react28.useRef)(null);
|
|
3758
3785
|
const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
|
|
3759
3786
|
const { icons } = useCerberusContext();
|
|
3760
3787
|
const { confirmModal: ConfirmIcon } = icons;
|
|
3761
|
-
const palette = (0,
|
|
3788
|
+
const palette = (0, import_react28.useMemo)(
|
|
3762
3789
|
() => kind === "destructive" ? "danger" : "action",
|
|
3763
3790
|
[kind]
|
|
3764
3791
|
);
|
|
3765
|
-
const handleChoice = (0,
|
|
3792
|
+
const handleChoice = (0, import_react28.useCallback)(
|
|
3766
3793
|
(e) => {
|
|
3767
3794
|
var _a, _b;
|
|
3768
3795
|
const target = e.currentTarget;
|
|
@@ -3774,7 +3801,7 @@ function ConfirmModal(props) {
|
|
|
3774
3801
|
},
|
|
3775
3802
|
[setOpen]
|
|
3776
3803
|
);
|
|
3777
|
-
const handleShow = (0,
|
|
3804
|
+
const handleShow = (0, import_react28.useCallback)(
|
|
3778
3805
|
(options) => {
|
|
3779
3806
|
return new Promise((resolve) => {
|
|
3780
3807
|
setContent({ ...options });
|
|
@@ -3784,42 +3811,42 @@ function ConfirmModal(props) {
|
|
|
3784
3811
|
},
|
|
3785
3812
|
[setOpen, setContent]
|
|
3786
3813
|
);
|
|
3787
|
-
const value = (0,
|
|
3814
|
+
const value = (0, import_react28.useMemo)(
|
|
3788
3815
|
() => ({
|
|
3789
3816
|
show: handleShow
|
|
3790
3817
|
}),
|
|
3791
3818
|
[handleShow]
|
|
3792
3819
|
);
|
|
3793
|
-
return /* @__PURE__ */ (0,
|
|
3820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(ConfirmModalContext.Provider, { value, children: [
|
|
3794
3821
|
props.children,
|
|
3795
|
-
/* @__PURE__ */ (0,
|
|
3796
|
-
/* @__PURE__ */ (0,
|
|
3797
|
-
/* @__PURE__ */ (0,
|
|
3822
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Dialog2, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx6.VStack, { gap: "xl", w: "full", children: [
|
|
3823
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx6.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3798
3825
|
import_jsx6.HStack,
|
|
3799
3826
|
{
|
|
3800
3827
|
alignSelf: "center",
|
|
3801
3828
|
justify: "center",
|
|
3802
3829
|
paddingBlockEnd: "md",
|
|
3803
3830
|
w: "full",
|
|
3804
|
-
children: /* @__PURE__ */ (0,
|
|
3831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3805
3832
|
Show,
|
|
3806
3833
|
{
|
|
3807
3834
|
when: palette === "danger",
|
|
3808
|
-
fallback: /* @__PURE__ */ (0,
|
|
3835
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3809
3836
|
Avatar,
|
|
3810
3837
|
{
|
|
3811
3838
|
ariaLabel: "",
|
|
3812
3839
|
gradient: "charon-light",
|
|
3813
|
-
icon: /* @__PURE__ */ (0,
|
|
3840
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ConfirmIcon, { size: 24 }),
|
|
3814
3841
|
src: ""
|
|
3815
3842
|
}
|
|
3816
3843
|
),
|
|
3817
|
-
children: /* @__PURE__ */ (0,
|
|
3844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3818
3845
|
Avatar,
|
|
3819
3846
|
{
|
|
3820
3847
|
ariaLabel: "",
|
|
3821
3848
|
gradient: "hades-dark",
|
|
3822
|
-
icon: /* @__PURE__ */ (0,
|
|
3849
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ConfirmIcon, { size: 24 }),
|
|
3823
3850
|
src: ""
|
|
3824
3851
|
}
|
|
3825
3852
|
)
|
|
@@ -3827,11 +3854,11 @@ function ConfirmModal(props) {
|
|
|
3827
3854
|
)
|
|
3828
3855
|
}
|
|
3829
3856
|
),
|
|
3830
|
-
/* @__PURE__ */ (0,
|
|
3831
|
-
/* @__PURE__ */ (0,
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
3832
3859
|
] }),
|
|
3833
|
-
/* @__PURE__ */ (0,
|
|
3834
|
-
/* @__PURE__ */ (0,
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(import_jsx6.HStack, { gap: "4", w: "full", children: [
|
|
3861
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3835
3862
|
Button,
|
|
3836
3863
|
{
|
|
3837
3864
|
autoFocus: true,
|
|
@@ -3845,7 +3872,7 @@ function ConfirmModal(props) {
|
|
|
3845
3872
|
children: content == null ? void 0 : content.actionText
|
|
3846
3873
|
}
|
|
3847
3874
|
),
|
|
3848
|
-
/* @__PURE__ */ (0,
|
|
3875
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
3849
3876
|
Button,
|
|
3850
3877
|
{
|
|
3851
3878
|
className: (0, import_css49.css)({
|
|
@@ -3863,7 +3890,7 @@ function ConfirmModal(props) {
|
|
|
3863
3890
|
] });
|
|
3864
3891
|
}
|
|
3865
3892
|
function useConfirmModal() {
|
|
3866
|
-
const context = (0,
|
|
3893
|
+
const context = (0, import_react28.useContext)(ConfirmModalContext);
|
|
3867
3894
|
if (context === null) {
|
|
3868
3895
|
throw new Error(
|
|
3869
3896
|
"useConfirmModal must be used within a ConfirmModal Provider"
|
|
@@ -3873,8 +3900,8 @@ function useConfirmModal() {
|
|
|
3873
3900
|
}
|
|
3874
3901
|
|
|
3875
3902
|
// src/context/notification-center.tsx
|
|
3876
|
-
var
|
|
3877
|
-
var
|
|
3903
|
+
var import_react29 = require("react");
|
|
3904
|
+
var import_patterns9 = require("@cerberus/styled-system/patterns");
|
|
3878
3905
|
var import_recipes44 = require("@cerberus/styled-system/recipes");
|
|
3879
3906
|
var import_css50 = require("@cerberus/styled-system/css");
|
|
3880
3907
|
|
|
@@ -3909,16 +3936,16 @@ function clearNotificationState(dispatch) {
|
|
|
3909
3936
|
}
|
|
3910
3937
|
|
|
3911
3938
|
// src/context/notification-center.tsx
|
|
3912
|
-
var
|
|
3913
|
-
var NotificationsContext = (0,
|
|
3939
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
3940
|
+
var NotificationsContext = (0, import_react29.createContext)(null);
|
|
3914
3941
|
function NotificationCenter(props) {
|
|
3915
|
-
const [state, dispatch] = (0,
|
|
3942
|
+
const [state, dispatch] = (0, import_react29.useReducer)(notificationCenterReducer, []);
|
|
3916
3943
|
const styles = (0, import_recipes44.notification)();
|
|
3917
|
-
const timeout = (0,
|
|
3944
|
+
const timeout = (0, import_react29.useMemo)(
|
|
3918
3945
|
() => props.duration || 6e3,
|
|
3919
3946
|
[props.duration]
|
|
3920
3947
|
);
|
|
3921
|
-
const closeNotification = (0,
|
|
3948
|
+
const closeNotification = (0, import_react29.useCallback)(
|
|
3922
3949
|
(id) => {
|
|
3923
3950
|
updateNotificationState(dispatch, {
|
|
3924
3951
|
id,
|
|
@@ -3930,7 +3957,7 @@ function NotificationCenter(props) {
|
|
|
3930
3957
|
},
|
|
3931
3958
|
[dispatch]
|
|
3932
3959
|
);
|
|
3933
|
-
const handleNotify = (0,
|
|
3960
|
+
const handleNotify = (0, import_react29.useCallback)(
|
|
3934
3961
|
(options) => {
|
|
3935
3962
|
const id = `${options.palette}:${state.length + 1}`;
|
|
3936
3963
|
addNotification(dispatch, {
|
|
@@ -3944,32 +3971,32 @@ function NotificationCenter(props) {
|
|
|
3944
3971
|
},
|
|
3945
3972
|
[dispatch, state, timeout, closeNotification]
|
|
3946
3973
|
);
|
|
3947
|
-
const handleClose = (0,
|
|
3974
|
+
const handleClose = (0, import_react29.useCallback)(
|
|
3948
3975
|
(e) => {
|
|
3949
3976
|
const target = e.currentTarget;
|
|
3950
3977
|
closeNotification(target.value);
|
|
3951
3978
|
},
|
|
3952
3979
|
[closeNotification]
|
|
3953
3980
|
);
|
|
3954
|
-
const handleCloseAll = (0,
|
|
3981
|
+
const handleCloseAll = (0, import_react29.useCallback)(() => {
|
|
3955
3982
|
state.forEach((item) => {
|
|
3956
3983
|
if (item.onClose) item.onClose();
|
|
3957
3984
|
});
|
|
3958
3985
|
clearNotificationState(dispatch);
|
|
3959
3986
|
}, [state, dispatch]);
|
|
3960
|
-
const value = (0,
|
|
3987
|
+
const value = (0, import_react29.useMemo)(
|
|
3961
3988
|
() => ({
|
|
3962
3989
|
notify: handleNotify
|
|
3963
3990
|
}),
|
|
3964
3991
|
[handleNotify]
|
|
3965
3992
|
);
|
|
3966
|
-
return /* @__PURE__ */ (0,
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(NotificationsContext.Provider, { value, children: [
|
|
3967
3994
|
props.children,
|
|
3968
|
-
/* @__PURE__ */ (0,
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
3995
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Show, { when: state.length > 0, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Portal, { container: props.container, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: styles.center, children: [
|
|
3996
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Show, { when: state.length >= 4, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3970
3997
|
Button,
|
|
3971
3998
|
{
|
|
3972
|
-
className: (0, import_css50.cx)(styles.closeAll, (0,
|
|
3999
|
+
className: (0, import_css50.cx)(styles.closeAll, (0, import_patterns9.animateIn)()),
|
|
3973
4000
|
onClick: handleCloseAll,
|
|
3974
4001
|
palette: "action",
|
|
3975
4002
|
shape: "rounded",
|
|
@@ -3978,17 +4005,17 @@ function NotificationCenter(props) {
|
|
|
3978
4005
|
children: "Close all"
|
|
3979
4006
|
}
|
|
3980
4007
|
) }),
|
|
3981
|
-
/* @__PURE__ */ (0,
|
|
4008
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3982
4009
|
"div",
|
|
3983
4010
|
{
|
|
3984
|
-
className: (0,
|
|
4011
|
+
className: (0, import_patterns9.vstack)({
|
|
3985
4012
|
alignItems: "flex-end",
|
|
3986
4013
|
gap: "4"
|
|
3987
4014
|
}),
|
|
3988
4015
|
style: {
|
|
3989
4016
|
alignItems: "flex-end"
|
|
3990
4017
|
},
|
|
3991
|
-
children: state.map((option) => /* @__PURE__ */ (0,
|
|
4018
|
+
children: state.map((option) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
3992
4019
|
MatchNotification,
|
|
3993
4020
|
{
|
|
3994
4021
|
...option,
|
|
@@ -4004,7 +4031,7 @@ function NotificationCenter(props) {
|
|
|
4004
4031
|
}
|
|
4005
4032
|
function MatchNotification(props) {
|
|
4006
4033
|
const { palette, id, onClose, heading, description, open } = props;
|
|
4007
|
-
const sharedProps = (0,
|
|
4034
|
+
const sharedProps = (0, import_react29.useMemo)(
|
|
4008
4035
|
() => ({
|
|
4009
4036
|
id,
|
|
4010
4037
|
open: true,
|
|
@@ -4015,30 +4042,30 @@ function MatchNotification(props) {
|
|
|
4015
4042
|
);
|
|
4016
4043
|
switch (palette) {
|
|
4017
4044
|
case "success":
|
|
4018
|
-
return /* @__PURE__ */ (0,
|
|
4019
|
-
/* @__PURE__ */ (0,
|
|
4020
|
-
/* @__PURE__ */ (0,
|
|
4045
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Notification, { ...sharedProps, palette: "success", children: [
|
|
4046
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationHeading, { palette: "success", children: heading }),
|
|
4047
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationDescription, { palette: "success", children: description })
|
|
4021
4048
|
] });
|
|
4022
4049
|
case "warning":
|
|
4023
|
-
return /* @__PURE__ */ (0,
|
|
4024
|
-
/* @__PURE__ */ (0,
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Notification, { ...sharedProps, palette: "warning", children: [
|
|
4051
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationHeading, { palette: "warning", children: heading }),
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationDescription, { palette: "warning", children: description })
|
|
4026
4053
|
] });
|
|
4027
4054
|
case "danger":
|
|
4028
|
-
return /* @__PURE__ */ (0,
|
|
4029
|
-
/* @__PURE__ */ (0,
|
|
4030
|
-
/* @__PURE__ */ (0,
|
|
4055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Notification, { ...sharedProps, palette: "danger", children: [
|
|
4056
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationHeading, { palette: "danger", children: heading }),
|
|
4057
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationDescription, { palette: "danger", children: description })
|
|
4031
4058
|
] });
|
|
4032
4059
|
case "info":
|
|
4033
4060
|
default:
|
|
4034
|
-
return /* @__PURE__ */ (0,
|
|
4035
|
-
/* @__PURE__ */ (0,
|
|
4036
|
-
/* @__PURE__ */ (0,
|
|
4061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(Notification, { ...sharedProps, palette: "info", children: [
|
|
4062
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationHeading, { palette: "info", children: heading }),
|
|
4063
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(NotificationDescription, { palette: "info", children: description })
|
|
4037
4064
|
] });
|
|
4038
4065
|
}
|
|
4039
4066
|
}
|
|
4040
4067
|
function useNotificationCenter() {
|
|
4041
|
-
const context = (0,
|
|
4068
|
+
const context = (0, import_react29.useContext)(NotificationsContext);
|
|
4042
4069
|
if (!context) {
|
|
4043
4070
|
throw new Error(
|
|
4044
4071
|
"useNotificationCenter must be used within a NotificationsProvider"
|
|
@@ -4048,35 +4075,35 @@ function useNotificationCenter() {
|
|
|
4048
4075
|
}
|
|
4049
4076
|
|
|
4050
4077
|
// src/context/prompt-modal.tsx
|
|
4051
|
-
var
|
|
4052
|
-
var
|
|
4078
|
+
var import_react30 = require("react");
|
|
4079
|
+
var import_react31 = require("@ark-ui/react");
|
|
4053
4080
|
var import_jsx7 = require("@cerberus/styled-system/jsx");
|
|
4054
4081
|
var import_css51 = require("@cerberus/styled-system/css");
|
|
4055
|
-
var
|
|
4056
|
-
var
|
|
4057
|
-
var PromptModalContext = (0,
|
|
4082
|
+
var import_patterns10 = require("@cerberus/styled-system/patterns");
|
|
4083
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4084
|
+
var PromptModalContext = (0, import_react30.createContext)(null);
|
|
4058
4085
|
function PromptModal(props) {
|
|
4059
|
-
const resolveRef = (0,
|
|
4060
|
-
const [open, setOpen] = (0,
|
|
4061
|
-
const [content, setContent] = (0,
|
|
4062
|
-
const [inputValue, setInputValue] = (0,
|
|
4086
|
+
const resolveRef = (0, import_react30.useRef)(null);
|
|
4087
|
+
const [open, setOpen] = (0, import_react30.useState)(false);
|
|
4088
|
+
const [content, setContent] = (0, import_react30.useState)(null);
|
|
4089
|
+
const [inputValue, setInputValue] = (0, import_react30.useState)("");
|
|
4063
4090
|
const { icons } = useCerberusContext();
|
|
4064
4091
|
const { promptModal: PromptIcon } = icons;
|
|
4065
|
-
const isValid = (0,
|
|
4092
|
+
const isValid = (0, import_react30.useMemo)(
|
|
4066
4093
|
() => inputValue === (content == null ? void 0 : content.key),
|
|
4067
4094
|
[inputValue, content]
|
|
4068
4095
|
);
|
|
4069
|
-
const palette = (0,
|
|
4096
|
+
const palette = (0, import_react30.useMemo)(
|
|
4070
4097
|
() => (content == null ? void 0 : content.kind) === "destructive" ? "danger" : "action",
|
|
4071
4098
|
[content]
|
|
4072
4099
|
);
|
|
4073
|
-
const handleChange = (0,
|
|
4100
|
+
const handleChange = (0, import_react30.useCallback)(
|
|
4074
4101
|
(e) => {
|
|
4075
4102
|
setInputValue(e.currentTarget.value);
|
|
4076
4103
|
},
|
|
4077
4104
|
[content]
|
|
4078
4105
|
);
|
|
4079
|
-
const handleChoice = (0,
|
|
4106
|
+
const handleChoice = (0, import_react30.useCallback)(
|
|
4080
4107
|
(e) => {
|
|
4081
4108
|
var _a;
|
|
4082
4109
|
const target = e.currentTarget;
|
|
@@ -4087,7 +4114,7 @@ function PromptModal(props) {
|
|
|
4087
4114
|
},
|
|
4088
4115
|
[inputValue, setOpen]
|
|
4089
4116
|
);
|
|
4090
|
-
const handleShow = (0,
|
|
4117
|
+
const handleShow = (0, import_react30.useCallback)(
|
|
4091
4118
|
(options) => {
|
|
4092
4119
|
return new Promise((resolve) => {
|
|
4093
4120
|
setContent({ ...options, kind: options.kind || "non-destructive" });
|
|
@@ -4097,42 +4124,42 @@ function PromptModal(props) {
|
|
|
4097
4124
|
},
|
|
4098
4125
|
[setOpen]
|
|
4099
4126
|
);
|
|
4100
|
-
const value = (0,
|
|
4127
|
+
const value = (0, import_react30.useMemo)(
|
|
4101
4128
|
() => ({
|
|
4102
4129
|
show: handleShow
|
|
4103
4130
|
}),
|
|
4104
4131
|
[handleShow]
|
|
4105
4132
|
);
|
|
4106
|
-
return /* @__PURE__ */ (0,
|
|
4133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(PromptModalContext.Provider, { value, children: [
|
|
4107
4134
|
props.children,
|
|
4108
|
-
/* @__PURE__ */ (0,
|
|
4109
|
-
/* @__PURE__ */ (0,
|
|
4110
|
-
/* @__PURE__ */ (0,
|
|
4135
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DialogProvider, { open, onOpenChange: (e) => setOpen(e.open), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Dialog2, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx7.VStack, { gap: "xl", w: "full", children: [
|
|
4136
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx7.VStack, { alignItems: "flex-start", gap: "md", w: "full", children: [
|
|
4137
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4111
4138
|
import_jsx7.HStack,
|
|
4112
4139
|
{
|
|
4113
4140
|
alignSelf: "center",
|
|
4114
4141
|
justify: "center",
|
|
4115
4142
|
paddingBlockEnd: "md",
|
|
4116
4143
|
w: "full",
|
|
4117
|
-
children: /* @__PURE__ */ (0,
|
|
4144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4118
4145
|
Show,
|
|
4119
4146
|
{
|
|
4120
4147
|
when: palette === "danger",
|
|
4121
|
-
fallback: /* @__PURE__ */ (0,
|
|
4148
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4122
4149
|
Avatar,
|
|
4123
4150
|
{
|
|
4124
4151
|
ariaLabel: "",
|
|
4125
4152
|
gradient: "charon-light",
|
|
4126
|
-
icon: /* @__PURE__ */ (0,
|
|
4153
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PromptIcon, { size: 24 }),
|
|
4127
4154
|
src: ""
|
|
4128
4155
|
}
|
|
4129
4156
|
),
|
|
4130
|
-
children: /* @__PURE__ */ (0,
|
|
4157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4131
4158
|
Avatar,
|
|
4132
4159
|
{
|
|
4133
4160
|
ariaLabel: "",
|
|
4134
4161
|
gradient: "hades-dark",
|
|
4135
|
-
icon: /* @__PURE__ */ (0,
|
|
4162
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(PromptIcon, { size: 24 }),
|
|
4136
4163
|
src: ""
|
|
4137
4164
|
}
|
|
4138
4165
|
)
|
|
@@ -4140,17 +4167,17 @@ function PromptModal(props) {
|
|
|
4140
4167
|
)
|
|
4141
4168
|
}
|
|
4142
4169
|
),
|
|
4143
|
-
/* @__PURE__ */ (0,
|
|
4144
|
-
/* @__PURE__ */ (0,
|
|
4170
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DialogHeading, { children: content == null ? void 0 : content.heading }),
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DialogDescription, { children: content == null ? void 0 : content.description })
|
|
4145
4172
|
] }),
|
|
4146
|
-
/* @__PURE__ */ (0,
|
|
4173
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4147
4174
|
import_jsx7.VStack,
|
|
4148
4175
|
{
|
|
4149
4176
|
alignItems: "flex-start",
|
|
4150
4177
|
marginBlockStart: "md",
|
|
4151
4178
|
marginBlockEnd: "lg",
|
|
4152
4179
|
w: "full",
|
|
4153
|
-
children: /* @__PURE__ */ (0,
|
|
4180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4154
4181
|
FieldRoot,
|
|
4155
4182
|
{
|
|
4156
4183
|
ids: {
|
|
@@ -4158,10 +4185,10 @@ function PromptModal(props) {
|
|
|
4158
4185
|
},
|
|
4159
4186
|
invalid: !isValid,
|
|
4160
4187
|
children: [
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4188
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4162
4189
|
FieldLabel,
|
|
4163
4190
|
{
|
|
4164
|
-
className: (0,
|
|
4191
|
+
className: (0, import_patterns10.hstack)({
|
|
4165
4192
|
gap: "xs",
|
|
4166
4193
|
justify: "flex-start !important",
|
|
4167
4194
|
marginBlockEnd: "xs",
|
|
@@ -4169,19 +4196,19 @@ function PromptModal(props) {
|
|
|
4169
4196
|
}),
|
|
4170
4197
|
children: [
|
|
4171
4198
|
"Type",
|
|
4172
|
-
/* @__PURE__ */ (0,
|
|
4199
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text, { as: "strong", textTransform: "uppercase", children: content == null ? void 0 : content.key }),
|
|
4173
4200
|
"to confirm"
|
|
4174
4201
|
]
|
|
4175
4202
|
}
|
|
4176
4203
|
),
|
|
4177
|
-
/* @__PURE__ */ (0,
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Input, { name: "confirm", onChange: handleChange, type: "text" })
|
|
4178
4205
|
]
|
|
4179
4206
|
}
|
|
4180
4207
|
)
|
|
4181
4208
|
}
|
|
4182
4209
|
),
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4184
|
-
/* @__PURE__ */ (0,
|
|
4210
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx7.HStack, { gap: "md", justify: "stretch", w: "full", children: [
|
|
4211
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4185
4212
|
Button,
|
|
4186
4213
|
{
|
|
4187
4214
|
autoFocus: true,
|
|
@@ -4196,7 +4223,7 @@ function PromptModal(props) {
|
|
|
4196
4223
|
children: content == null ? void 0 : content.actionText
|
|
4197
4224
|
}
|
|
4198
4225
|
),
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4226
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react31.DialogCloseTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4200
4227
|
Button,
|
|
4201
4228
|
{
|
|
4202
4229
|
className: (0, import_css51.css)({
|
|
@@ -4214,7 +4241,7 @@ function PromptModal(props) {
|
|
|
4214
4241
|
] });
|
|
4215
4242
|
}
|
|
4216
4243
|
function usePromptModal() {
|
|
4217
|
-
const context = (0,
|
|
4244
|
+
const context = (0, import_react30.useContext)(PromptModalContext);
|
|
4218
4245
|
if (context === null) {
|
|
4219
4246
|
throw new Error("usePromptModal must be used within a PromptModal Provider");
|
|
4220
4247
|
}
|
|
@@ -4222,50 +4249,50 @@ function usePromptModal() {
|
|
|
4222
4249
|
}
|
|
4223
4250
|
|
|
4224
4251
|
// src/context/theme.tsx
|
|
4225
|
-
var
|
|
4252
|
+
var import_react33 = require("react");
|
|
4226
4253
|
|
|
4227
4254
|
// src/hooks/useTheme.ts
|
|
4228
|
-
var
|
|
4255
|
+
var import_react32 = require("react");
|
|
4229
4256
|
var THEME_KEY = "cerberus-theme";
|
|
4230
4257
|
var MODE_KEY = "cerberus-mode";
|
|
4231
4258
|
function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options = {}) {
|
|
4232
4259
|
const { updateMode, updateTheme, cache } = options;
|
|
4233
|
-
const [theme, setTheme] = (0,
|
|
4234
|
-
const [colorMode, setColorMode] = (0,
|
|
4235
|
-
const handleThemeChange = (0,
|
|
4260
|
+
const [theme, setTheme] = (0, import_react32.useState)(defaultTheme);
|
|
4261
|
+
const [colorMode, setColorMode] = (0, import_react32.useState)(defaultColorMode);
|
|
4262
|
+
const handleThemeChange = (0, import_react32.useCallback)(
|
|
4236
4263
|
(newTheme) => {
|
|
4237
4264
|
setTheme(newTheme);
|
|
4238
4265
|
updateTheme == null ? void 0 : updateTheme(newTheme);
|
|
4239
4266
|
},
|
|
4240
4267
|
[updateTheme]
|
|
4241
4268
|
);
|
|
4242
|
-
const handleColorModeChange = (0,
|
|
4269
|
+
const handleColorModeChange = (0, import_react32.useCallback)(
|
|
4243
4270
|
(newMode) => {
|
|
4244
4271
|
setColorMode(newMode);
|
|
4245
4272
|
updateMode == null ? void 0 : updateMode(newMode);
|
|
4246
4273
|
},
|
|
4247
4274
|
[updateMode]
|
|
4248
4275
|
);
|
|
4249
|
-
(0,
|
|
4276
|
+
(0, import_react32.useLayoutEffect)(() => {
|
|
4250
4277
|
const theme2 = localStorage.getItem(THEME_KEY);
|
|
4251
4278
|
if (theme2) {
|
|
4252
4279
|
setTheme(theme2);
|
|
4253
4280
|
}
|
|
4254
4281
|
}, []);
|
|
4255
|
-
(0,
|
|
4282
|
+
(0, import_react32.useLayoutEffect)(() => {
|
|
4256
4283
|
const mode = localStorage.getItem(MODE_KEY);
|
|
4257
4284
|
if (mode) {
|
|
4258
4285
|
setColorMode(mode);
|
|
4259
4286
|
}
|
|
4260
4287
|
}, []);
|
|
4261
|
-
(0,
|
|
4288
|
+
(0, import_react32.useEffect)(() => {
|
|
4262
4289
|
const root = document.documentElement;
|
|
4263
4290
|
root.dataset.pandaTheme = theme;
|
|
4264
4291
|
if (cache) {
|
|
4265
4292
|
localStorage.setItem(THEME_KEY, theme);
|
|
4266
4293
|
}
|
|
4267
4294
|
}, [theme, cache]);
|
|
4268
|
-
(0,
|
|
4295
|
+
(0, import_react32.useEffect)(() => {
|
|
4269
4296
|
const root = document.documentElement;
|
|
4270
4297
|
if (colorMode === "system") {
|
|
4271
4298
|
root.dataset.colorMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -4276,7 +4303,7 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
4276
4303
|
localStorage.setItem(MODE_KEY, colorMode);
|
|
4277
4304
|
}
|
|
4278
4305
|
}, [colorMode, cache]);
|
|
4279
|
-
return (0,
|
|
4306
|
+
return (0, import_react32.useMemo)(
|
|
4280
4307
|
() => ({
|
|
4281
4308
|
theme,
|
|
4282
4309
|
mode: colorMode,
|
|
@@ -4288,8 +4315,8 @@ function useTheme(defaultTheme = "cerberus", defaultColorMode = "light", options
|
|
|
4288
4315
|
}
|
|
4289
4316
|
|
|
4290
4317
|
// src/context/theme.tsx
|
|
4291
|
-
var
|
|
4292
|
-
var ThemeContext = (0,
|
|
4318
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4319
|
+
var ThemeContext = (0, import_react33.createContext)(
|
|
4293
4320
|
null
|
|
4294
4321
|
);
|
|
4295
4322
|
function ThemeProvider(props) {
|
|
@@ -4298,10 +4325,10 @@ function ThemeProvider(props) {
|
|
|
4298
4325
|
updateMode: props.updateMode,
|
|
4299
4326
|
updateTheme: props.updateTheme
|
|
4300
4327
|
});
|
|
4301
|
-
return /* @__PURE__ */ (0,
|
|
4328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ThemeContext.Provider, { value: state, children: props.children });
|
|
4302
4329
|
}
|
|
4303
4330
|
function useThemeContext() {
|
|
4304
|
-
const context = (0,
|
|
4331
|
+
const context = (0, import_react33.useContext)(ThemeContext);
|
|
4305
4332
|
if (!context) {
|
|
4306
4333
|
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
4307
4334
|
}
|
|
@@ -4309,20 +4336,20 @@ function useThemeContext() {
|
|
|
4309
4336
|
}
|
|
4310
4337
|
|
|
4311
4338
|
// src/hooks/useRootColors.ts
|
|
4312
|
-
var
|
|
4339
|
+
var import_react34 = require("react");
|
|
4313
4340
|
function useRootColors(colors = []) {
|
|
4314
|
-
const [state, dispatch] = (0,
|
|
4315
|
-
const handleRefetch = (0,
|
|
4341
|
+
const [state, dispatch] = (0, import_react34.useReducer)(rootColorsReducer, {});
|
|
4342
|
+
const handleRefetch = (0, import_react34.useCallback)(() => {
|
|
4316
4343
|
return new Promise((resolve) => {
|
|
4317
4344
|
dispatch(formatColors(colors));
|
|
4318
4345
|
resolve();
|
|
4319
4346
|
});
|
|
4320
4347
|
}, []);
|
|
4321
|
-
(0,
|
|
4348
|
+
(0, import_react34.useEffect)(() => {
|
|
4322
4349
|
if (Object.keys(state).length === colors.length) return;
|
|
4323
4350
|
dispatch(formatColors(colors));
|
|
4324
4351
|
}, [colors]);
|
|
4325
|
-
return (0,
|
|
4352
|
+
return (0, import_react34.useMemo)(
|
|
4326
4353
|
() => ({ colors: state, refetch: handleRefetch }),
|
|
4327
4354
|
[state, handleRefetch]
|
|
4328
4355
|
);
|
|
@@ -4343,9 +4370,9 @@ function rootColorsReducer(state, action) {
|
|
|
4343
4370
|
}
|
|
4344
4371
|
|
|
4345
4372
|
// src/config/icons/checkbox.icons.tsx
|
|
4346
|
-
var
|
|
4373
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4347
4374
|
function CheckmarkIcon(props) {
|
|
4348
|
-
return /* @__PURE__ */ (0,
|
|
4375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4349
4376
|
"svg",
|
|
4350
4377
|
{
|
|
4351
4378
|
"aria-hidden": "true",
|
|
@@ -4354,7 +4381,7 @@ function CheckmarkIcon(props) {
|
|
|
4354
4381
|
role: "img",
|
|
4355
4382
|
viewBox: "0 0 24 24",
|
|
4356
4383
|
...props,
|
|
4357
|
-
children: /* @__PURE__ */ (0,
|
|
4384
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4358
4385
|
"path",
|
|
4359
4386
|
{
|
|
4360
4387
|
fill: "currentColor",
|
|
@@ -4365,7 +4392,7 @@ function CheckmarkIcon(props) {
|
|
|
4365
4392
|
);
|
|
4366
4393
|
}
|
|
4367
4394
|
function IndeterminateIcon(props) {
|
|
4368
|
-
return /* @__PURE__ */ (0,
|
|
4395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4369
4396
|
"svg",
|
|
4370
4397
|
{
|
|
4371
4398
|
"aria-hidden": "true",
|
|
@@ -4374,15 +4401,15 @@ function IndeterminateIcon(props) {
|
|
|
4374
4401
|
fill: "none",
|
|
4375
4402
|
viewBox: "0 0 24 24",
|
|
4376
4403
|
...props,
|
|
4377
|
-
children: /* @__PURE__ */ (0,
|
|
4404
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
|
|
4378
4405
|
}
|
|
4379
4406
|
);
|
|
4380
4407
|
}
|
|
4381
4408
|
|
|
4382
4409
|
// src/components/AnimatingUploadIcon.tsx
|
|
4383
|
-
var
|
|
4410
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4384
4411
|
function AnimatingUploadIcon(props) {
|
|
4385
|
-
return /* @__PURE__ */ (0,
|
|
4412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4386
4413
|
"svg",
|
|
4387
4414
|
{
|
|
4388
4415
|
"aria-hidden": "true",
|
|
@@ -4390,7 +4417,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4390
4417
|
width: props.size ?? "1em",
|
|
4391
4418
|
height: props.size ?? "1em",
|
|
4392
4419
|
viewBox: "0 0 24 24",
|
|
4393
|
-
children: /* @__PURE__ */ (0,
|
|
4420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
4394
4421
|
"g",
|
|
4395
4422
|
{
|
|
4396
4423
|
fill: "none",
|
|
@@ -4399,14 +4426,14 @@ function AnimatingUploadIcon(props) {
|
|
|
4399
4426
|
strokeLinejoin: "round",
|
|
4400
4427
|
strokeWidth: 1.5,
|
|
4401
4428
|
children: [
|
|
4402
|
-
/* @__PURE__ */ (0,
|
|
4429
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4403
4430
|
"path",
|
|
4404
4431
|
{
|
|
4405
4432
|
"data-name": "animating-trail",
|
|
4406
4433
|
strokeDasharray: "2 4",
|
|
4407
4434
|
strokeDashoffset: 6,
|
|
4408
4435
|
d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
|
|
4409
|
-
children: /* @__PURE__ */ (0,
|
|
4436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4410
4437
|
"animate",
|
|
4411
4438
|
{
|
|
4412
4439
|
attributeName: "stroke-dashoffset",
|
|
@@ -4417,14 +4444,14 @@ function AnimatingUploadIcon(props) {
|
|
|
4417
4444
|
)
|
|
4418
4445
|
}
|
|
4419
4446
|
),
|
|
4420
|
-
/* @__PURE__ */ (0,
|
|
4447
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4421
4448
|
"path",
|
|
4422
4449
|
{
|
|
4423
4450
|
"data-name": "half-circle",
|
|
4424
4451
|
strokeDasharray: 32,
|
|
4425
4452
|
strokeDashoffset: 32,
|
|
4426
4453
|
d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
|
|
4427
|
-
children: /* @__PURE__ */ (0,
|
|
4454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4428
4455
|
"animate",
|
|
4429
4456
|
{
|
|
4430
4457
|
fill: "freeze",
|
|
@@ -4436,7 +4463,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4436
4463
|
)
|
|
4437
4464
|
}
|
|
4438
4465
|
),
|
|
4439
|
-
/* @__PURE__ */ (0,
|
|
4466
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4440
4467
|
"svg",
|
|
4441
4468
|
{
|
|
4442
4469
|
"aria-hidden": "true",
|
|
@@ -4446,7 +4473,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4446
4473
|
x: "27%",
|
|
4447
4474
|
y: "27%",
|
|
4448
4475
|
viewBox: "0 0 24 24",
|
|
4449
|
-
children: /* @__PURE__ */ (0,
|
|
4476
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4450
4477
|
"polygon",
|
|
4451
4478
|
{
|
|
4452
4479
|
fill: "currentColor",
|
|
@@ -4454,7 +4481,7 @@ function AnimatingUploadIcon(props) {
|
|
|
4454
4481
|
strokeWidth: 0.8,
|
|
4455
4482
|
opacity: "1",
|
|
4456
4483
|
points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
|
|
4457
|
-
children: /* @__PURE__ */ (0,
|
|
4484
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4458
4485
|
"animate",
|
|
4459
4486
|
{
|
|
4460
4487
|
fill: "freeze",
|
|
@@ -4506,8 +4533,12 @@ __reExport(src_exports, require("@dnd-kit/core"), module.exports);
|
|
|
4506
4533
|
AccordionParts,
|
|
4507
4534
|
AccordionRoot,
|
|
4508
4535
|
Admonition,
|
|
4536
|
+
AdmonitionContent,
|
|
4509
4537
|
AdmonitionDescription,
|
|
4510
4538
|
AdmonitionHeading,
|
|
4539
|
+
AdmonitionIndicator,
|
|
4540
|
+
AdmonitionParts,
|
|
4541
|
+
AdmonitionRoot,
|
|
4511
4542
|
Avatar,
|
|
4512
4543
|
Button,
|
|
4513
4544
|
ButtonIcon,
|