@cere/cere-design-system 0.0.4 → 0.0.5
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/dist/index.d.mts +72 -7
- package/dist/index.d.ts +72 -7
- package/dist/index.js +366 -144
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +329 -107
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -800,6 +800,8 @@ import UnarchiveIcon from "@mui/icons-material/Unarchive";
|
|
|
800
800
|
import SearchIcon2 from "@mui/icons-material/Search";
|
|
801
801
|
import AddIcon from "@mui/icons-material/Add";
|
|
802
802
|
import CheckIcon from "@mui/icons-material/Check";
|
|
803
|
+
import SettingsIcon from "@mui/icons-material/Settings";
|
|
804
|
+
import PersonAddAltIcon from "@mui/icons-material/PersonAddAlt";
|
|
803
805
|
import { Fragment, jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
804
806
|
var ServiceSelectorButton = ({
|
|
805
807
|
services,
|
|
@@ -812,7 +814,9 @@ var ServiceSelectorButton = ({
|
|
|
812
814
|
onServiceCreated,
|
|
813
815
|
isManager = false,
|
|
814
816
|
sx = {},
|
|
815
|
-
panelWidth = 350
|
|
817
|
+
panelWidth = 350,
|
|
818
|
+
onOpenSettings,
|
|
819
|
+
onOpenAddMember
|
|
816
820
|
}) => {
|
|
817
821
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
818
822
|
const [searchTerm, setSearchTerm] = useState("");
|
|
@@ -900,7 +904,9 @@ var ServiceSelectorButton = ({
|
|
|
900
904
|
onSearchChange: setSearchTerm,
|
|
901
905
|
showArchived,
|
|
902
906
|
onToggleArchived: () => setShowArchived(!showArchived),
|
|
903
|
-
filteredServices
|
|
907
|
+
filteredServices,
|
|
908
|
+
onOpenSettings,
|
|
909
|
+
onOpenAddMember
|
|
904
910
|
}
|
|
905
911
|
)
|
|
906
912
|
] });
|
|
@@ -1026,7 +1032,9 @@ var ServiceSelectorButton = ({
|
|
|
1026
1032
|
onSearchChange: setSearchTerm,
|
|
1027
1033
|
showArchived,
|
|
1028
1034
|
onToggleArchived: () => setShowArchived(!showArchived),
|
|
1029
|
-
filteredServices
|
|
1035
|
+
filteredServices,
|
|
1036
|
+
onOpenSettings,
|
|
1037
|
+
onOpenAddMember
|
|
1030
1038
|
}
|
|
1031
1039
|
)
|
|
1032
1040
|
] });
|
|
@@ -1048,7 +1056,9 @@ var ServiceSelectorPanel = ({
|
|
|
1048
1056
|
onSearchChange: externalOnSearchChange,
|
|
1049
1057
|
showArchived: externalShowArchived,
|
|
1050
1058
|
onToggleArchived: externalOnToggleArchived,
|
|
1051
|
-
filteredServices: externalFilteredServices
|
|
1059
|
+
filteredServices: externalFilteredServices,
|
|
1060
|
+
onOpenSettings,
|
|
1061
|
+
onOpenAddMember
|
|
1052
1062
|
}) => {
|
|
1053
1063
|
const [internalSearchTerm, setInternalSearchTerm] = useState("");
|
|
1054
1064
|
const [internalShowArchived, setInternalShowArchived] = useState(false);
|
|
@@ -1097,62 +1107,126 @@ var ServiceSelectorPanel = ({
|
|
|
1097
1107
|
}
|
|
1098
1108
|
},
|
|
1099
1109
|
children: [
|
|
1100
|
-
selectedService && /* @__PURE__ */
|
|
1110
|
+
selectedService && /* @__PURE__ */ jsxs4(
|
|
1101
1111
|
Box2,
|
|
1102
1112
|
{
|
|
1103
1113
|
sx: {
|
|
1104
1114
|
paddingLeft: 2,
|
|
1105
1115
|
paddingRight: 2,
|
|
1106
|
-
paddingTop:
|
|
1116
|
+
paddingTop: 1.5,
|
|
1117
|
+
paddingBottom: 1.5,
|
|
1107
1118
|
borderBottom: 1,
|
|
1108
1119
|
borderColor: "divider"
|
|
1109
1120
|
},
|
|
1110
|
-
children:
|
|
1111
|
-
Box2,
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1121
|
+
children: [
|
|
1122
|
+
/* @__PURE__ */ jsxs4(Box2, { sx: {
|
|
1123
|
+
display: "flex",
|
|
1124
|
+
alignItems: "center",
|
|
1125
|
+
mb: 1.5
|
|
1126
|
+
}, children: [
|
|
1127
|
+
/* @__PURE__ */ jsx14(
|
|
1128
|
+
Avatar,
|
|
1129
|
+
{
|
|
1130
|
+
sx: {
|
|
1131
|
+
width: 32,
|
|
1132
|
+
height: 32,
|
|
1133
|
+
bgcolor: "primary.main",
|
|
1134
|
+
fontSize: "0.9rem",
|
|
1135
|
+
mr: 1.5
|
|
1136
|
+
},
|
|
1137
|
+
children: selectedService.name.charAt(0)
|
|
1138
|
+
}
|
|
1139
|
+
),
|
|
1140
|
+
/* @__PURE__ */ jsx14(Box2, { sx: { flex: 1 }, children: /* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
1141
|
+
/* @__PURE__ */ jsx14(Typography, { variant: "subtitle1", sx: { fontWeight: 600, fontSize: "1rem" }, children: selectedService.name }),
|
|
1120
1142
|
/* @__PURE__ */ jsx14(
|
|
1121
|
-
|
|
1143
|
+
Box2,
|
|
1122
1144
|
{
|
|
1123
1145
|
sx: {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1146
|
+
display: "inline-block",
|
|
1147
|
+
bgcolor: "rgba(0, 0, 0, 0.04)",
|
|
1148
|
+
color: "text.secondary",
|
|
1149
|
+
px: 1,
|
|
1150
|
+
py: 0.3,
|
|
1151
|
+
borderRadius: "12px",
|
|
1152
|
+
fontSize: "0.7rem",
|
|
1153
|
+
fontWeight: 500,
|
|
1154
|
+
lineHeight: 1
|
|
1129
1155
|
},
|
|
1130
|
-
children:
|
|
1156
|
+
children: isManager ? "Manager" : "Viewer"
|
|
1131
1157
|
}
|
|
1132
|
-
)
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1158
|
+
)
|
|
1159
|
+
] }) })
|
|
1160
|
+
] }),
|
|
1161
|
+
(onOpenSettings || onOpenAddMember) && /* @__PURE__ */ jsxs4(Box2, { sx: { display: "flex", gap: 1 }, children: [
|
|
1162
|
+
onOpenAddMember && /* @__PURE__ */ jsx14(
|
|
1163
|
+
Button2,
|
|
1164
|
+
{
|
|
1165
|
+
startIcon: /* @__PURE__ */ jsx14(PersonAddAltIcon, {}),
|
|
1166
|
+
variant: "outlined",
|
|
1167
|
+
size: "small",
|
|
1168
|
+
onClick: (e) => {
|
|
1169
|
+
e.stopPropagation();
|
|
1170
|
+
onClose();
|
|
1171
|
+
onOpenAddMember(selectedServiceId || "");
|
|
1172
|
+
},
|
|
1173
|
+
disabled: !isManager,
|
|
1174
|
+
sx: {
|
|
1175
|
+
flex: 1,
|
|
1176
|
+
textTransform: "none",
|
|
1177
|
+
color: "text.secondary",
|
|
1178
|
+
fontSize: "0.8rem",
|
|
1179
|
+
py: 0.75,
|
|
1180
|
+
justifyContent: "flex-start",
|
|
1181
|
+
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
1182
|
+
borderRadius: "6px",
|
|
1183
|
+
"&:hover": {
|
|
1184
|
+
borderColor: "rgba(0, 0, 0, 0.23)",
|
|
1185
|
+
backgroundColor: "rgba(0, 0, 0, 0.03)"
|
|
1186
|
+
},
|
|
1187
|
+
"&:disabled": {
|
|
1188
|
+
opacity: 0.5,
|
|
1189
|
+
cursor: "not-allowed"
|
|
1150
1190
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1191
|
+
},
|
|
1192
|
+
children: "Add member"
|
|
1193
|
+
}
|
|
1194
|
+
),
|
|
1195
|
+
onOpenSettings && /* @__PURE__ */ jsx14(
|
|
1196
|
+
Button2,
|
|
1197
|
+
{
|
|
1198
|
+
startIcon: /* @__PURE__ */ jsx14(SettingsIcon, {}),
|
|
1199
|
+
variant: "outlined",
|
|
1200
|
+
size: "small",
|
|
1201
|
+
onClick: (e) => {
|
|
1202
|
+
e.stopPropagation();
|
|
1203
|
+
onClose();
|
|
1204
|
+
onOpenSettings(selectedServiceId || "");
|
|
1205
|
+
},
|
|
1206
|
+
disabled: !isManager,
|
|
1207
|
+
sx: {
|
|
1208
|
+
flex: 1,
|
|
1209
|
+
textTransform: "none",
|
|
1210
|
+
color: "text.secondary",
|
|
1211
|
+
fontSize: "0.8rem",
|
|
1212
|
+
py: 0.75,
|
|
1213
|
+
justifyContent: "flex-start",
|
|
1214
|
+
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
1215
|
+
borderRadius: "6px",
|
|
1216
|
+
"&:hover": {
|
|
1217
|
+
borderColor: "rgba(0, 0, 0, 0.23)",
|
|
1218
|
+
backgroundColor: "rgba(0, 0, 0, 0.03)"
|
|
1219
|
+
},
|
|
1220
|
+
"&:disabled": {
|
|
1221
|
+
opacity: 0.5,
|
|
1222
|
+
cursor: "not-allowed"
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
children: "Settings"
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
] })
|
|
1229
|
+
]
|
|
1156
1230
|
}
|
|
1157
1231
|
),
|
|
1158
1232
|
/* @__PURE__ */ jsxs4(Box2, { sx: { px: 2, pt: 2, pb: 1.5 }, children: [
|
|
@@ -2143,36 +2217,158 @@ var Dialog = ({
|
|
|
2143
2217
|
// src/components/layout/Drawer.tsx
|
|
2144
2218
|
import MuiDrawer from "@mui/material/Drawer";
|
|
2145
2219
|
import { styled as styled19 } from "@mui/material/styles";
|
|
2146
|
-
import {
|
|
2220
|
+
import { Box as Box6, IconButton as IconButton5, Typography as Typography5, Divider as Divider3, Tabs, Tab as Tab2 } from "@mui/material";
|
|
2221
|
+
import CloseIcon2 from "@mui/icons-material/Close";
|
|
2222
|
+
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2147
2223
|
var StyledDrawer2 = styled19(MuiDrawer, {
|
|
2148
|
-
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed"
|
|
2149
|
-
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed }) => ({
|
|
2224
|
+
shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed" && prop !== "topOffset"
|
|
2225
|
+
})(({ theme: theme2, width = 240, miniWidth = 72, collapsed, topOffset = 0 }) => ({
|
|
2150
2226
|
width: collapsed ? miniWidth : width,
|
|
2151
2227
|
flexShrink: 0,
|
|
2152
2228
|
"& .MuiDrawer-paper": {
|
|
2153
2229
|
width: collapsed ? miniWidth : width,
|
|
2154
2230
|
boxSizing: "border-box",
|
|
2155
2231
|
boxShadow: "0px 2px 10px rgba(0, 0, 0, 0.05)",
|
|
2156
|
-
transition: theme2.transitions.create("width", {
|
|
2232
|
+
transition: theme2.transitions.create(["width", "top", "height"], {
|
|
2157
2233
|
easing: theme2.transitions.easing.sharp,
|
|
2158
2234
|
duration: theme2.transitions.duration.enteringScreen
|
|
2159
2235
|
}),
|
|
2160
|
-
overflow:
|
|
2236
|
+
overflow: "visible",
|
|
2237
|
+
// Let internal content handle scrolling
|
|
2238
|
+
display: "flex",
|
|
2239
|
+
flexDirection: "column",
|
|
2240
|
+
top: `${topOffset}px !important`,
|
|
2241
|
+
height: topOffset > 0 ? `calc(100% - ${topOffset}px) !important` : "100%",
|
|
2242
|
+
zIndex: `${theme2.zIndex.modal} !important`
|
|
2243
|
+
// Use modal zIndex to be above everything except AppBar (which is modal + 1)
|
|
2161
2244
|
}
|
|
2162
2245
|
}));
|
|
2163
2246
|
var Drawer2 = ({
|
|
2164
|
-
width
|
|
2247
|
+
width,
|
|
2165
2248
|
miniWidth = 72,
|
|
2166
2249
|
collapsed = false,
|
|
2250
|
+
title,
|
|
2251
|
+
header,
|
|
2252
|
+
showCloseButton,
|
|
2253
|
+
tabs,
|
|
2254
|
+
activeTab = 0,
|
|
2255
|
+
onTabChange,
|
|
2256
|
+
footer,
|
|
2257
|
+
contentProps,
|
|
2258
|
+
anchor = "right",
|
|
2259
|
+
variant = "temporary",
|
|
2260
|
+
topOffset = 0,
|
|
2261
|
+
children,
|
|
2262
|
+
onClose,
|
|
2167
2263
|
...props
|
|
2168
2264
|
}) => {
|
|
2169
|
-
|
|
2265
|
+
const defaultWidth = variant === "temporary" || variant === "persistent" ? 400 : 240;
|
|
2266
|
+
const finalWidth = width ?? defaultWidth;
|
|
2267
|
+
const shouldShowClose = showCloseButton ?? (variant === "temporary" || variant === "persistent");
|
|
2268
|
+
const hasHeader = title || header || shouldShowClose || tabs;
|
|
2269
|
+
return /* @__PURE__ */ jsxs9(
|
|
2170
2270
|
StyledDrawer2,
|
|
2171
2271
|
{
|
|
2172
|
-
width,
|
|
2272
|
+
width: finalWidth,
|
|
2173
2273
|
miniWidth,
|
|
2174
2274
|
collapsed,
|
|
2175
|
-
|
|
2275
|
+
anchor,
|
|
2276
|
+
variant,
|
|
2277
|
+
topOffset,
|
|
2278
|
+
onClose,
|
|
2279
|
+
ModalProps: {
|
|
2280
|
+
...props.ModalProps,
|
|
2281
|
+
style: {
|
|
2282
|
+
zIndex: topOffset > 0 ? void 0 : void 0
|
|
2283
|
+
// Let styled component handle zIndex
|
|
2284
|
+
}
|
|
2285
|
+
},
|
|
2286
|
+
BackdropProps: {
|
|
2287
|
+
...props.BackdropProps,
|
|
2288
|
+
style: {
|
|
2289
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
...props,
|
|
2293
|
+
children: [
|
|
2294
|
+
hasHeader && /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
2295
|
+
/* @__PURE__ */ jsx27(
|
|
2296
|
+
Box6,
|
|
2297
|
+
{
|
|
2298
|
+
sx: {
|
|
2299
|
+
display: "flex",
|
|
2300
|
+
alignItems: "center",
|
|
2301
|
+
justifyContent: "space-between",
|
|
2302
|
+
p: 2,
|
|
2303
|
+
minHeight: 64,
|
|
2304
|
+
borderBottom: 1,
|
|
2305
|
+
borderColor: "divider"
|
|
2306
|
+
},
|
|
2307
|
+
children: header || /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
2308
|
+
/* @__PURE__ */ jsx27(Box6, { sx: { flex: 1 }, children: typeof title === "string" ? /* @__PURE__ */ jsx27(Typography5, { variant: "h6", children: title }) : title }),
|
|
2309
|
+
shouldShowClose && onClose && /* @__PURE__ */ jsx27(
|
|
2310
|
+
IconButton5,
|
|
2311
|
+
{
|
|
2312
|
+
onClick: (e) => {
|
|
2313
|
+
e.stopPropagation();
|
|
2314
|
+
onClose(e, "backdropClick");
|
|
2315
|
+
},
|
|
2316
|
+
size: "small",
|
|
2317
|
+
sx: { ml: 1 },
|
|
2318
|
+
"aria-label": "close",
|
|
2319
|
+
children: /* @__PURE__ */ jsx27(CloseIcon2, {})
|
|
2320
|
+
}
|
|
2321
|
+
)
|
|
2322
|
+
] })
|
|
2323
|
+
}
|
|
2324
|
+
),
|
|
2325
|
+
tabs && tabs.length > 0 && /* @__PURE__ */ jsx27(
|
|
2326
|
+
Tabs,
|
|
2327
|
+
{
|
|
2328
|
+
value: activeTab,
|
|
2329
|
+
onChange: (_, newValue) => onTabChange?.(newValue),
|
|
2330
|
+
variant: tabs.length > 4 ? "scrollable" : "standard",
|
|
2331
|
+
scrollButtons: tabs.length > 4 ? "auto" : false,
|
|
2332
|
+
sx: {
|
|
2333
|
+
borderBottom: 1,
|
|
2334
|
+
borderColor: "divider",
|
|
2335
|
+
px: 2,
|
|
2336
|
+
"& .MuiTabs-scrollableContainer": {
|
|
2337
|
+
overflow: "auto"
|
|
2338
|
+
}
|
|
2339
|
+
},
|
|
2340
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsx27(Tab2, { label: tab }, index))
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
] }),
|
|
2344
|
+
/* @__PURE__ */ jsx27(
|
|
2345
|
+
Box6,
|
|
2346
|
+
{
|
|
2347
|
+
sx: {
|
|
2348
|
+
flex: 1,
|
|
2349
|
+
overflow: "auto",
|
|
2350
|
+
display: "flex",
|
|
2351
|
+
flexDirection: "column"
|
|
2352
|
+
},
|
|
2353
|
+
...contentProps,
|
|
2354
|
+
children
|
|
2355
|
+
}
|
|
2356
|
+
),
|
|
2357
|
+
footer && /* @__PURE__ */ jsxs9(Fragment6, { children: [
|
|
2358
|
+
/* @__PURE__ */ jsx27(Divider3, {}),
|
|
2359
|
+
/* @__PURE__ */ jsx27(
|
|
2360
|
+
Box6,
|
|
2361
|
+
{
|
|
2362
|
+
sx: {
|
|
2363
|
+
p: 2,
|
|
2364
|
+
borderTop: 1,
|
|
2365
|
+
borderColor: "divider"
|
|
2366
|
+
},
|
|
2367
|
+
children: footer
|
|
2368
|
+
}
|
|
2369
|
+
)
|
|
2370
|
+
] })
|
|
2371
|
+
]
|
|
2176
2372
|
}
|
|
2177
2373
|
);
|
|
2178
2374
|
};
|
|
@@ -2222,7 +2418,7 @@ import {
|
|
|
2222
2418
|
ListItemSecondaryAction
|
|
2223
2419
|
} from "@mui/material";
|
|
2224
2420
|
import { styled as styled21 } from "@mui/material/styles";
|
|
2225
|
-
import { jsx as jsx29, jsxs as
|
|
2421
|
+
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2226
2422
|
var List5 = (props) => {
|
|
2227
2423
|
return /* @__PURE__ */ jsx29(MuiList, { ...props });
|
|
2228
2424
|
};
|
|
@@ -2247,7 +2443,7 @@ var ListItem3 = ({
|
|
|
2247
2443
|
children,
|
|
2248
2444
|
...props
|
|
2249
2445
|
}) => {
|
|
2250
|
-
return /* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ jsxs10(StyledListItem, { hoverable, ...props, children: [
|
|
2251
2447
|
icon && /* @__PURE__ */ jsx29(ListItemIcon3, { children: icon }),
|
|
2252
2448
|
(primary || secondary) && /* @__PURE__ */ jsx29(
|
|
2253
2449
|
ListItemText6,
|
|
@@ -2333,7 +2529,7 @@ import { Grid } from "@mui/material";
|
|
|
2333
2529
|
// src/components/layout/Breadcrumbs.tsx
|
|
2334
2530
|
import MuiBreadcrumbs from "@mui/material/Breadcrumbs";
|
|
2335
2531
|
import Link4 from "@mui/material/Link";
|
|
2336
|
-
import
|
|
2532
|
+
import Typography6 from "@mui/material/Typography";
|
|
2337
2533
|
import { styled as styled24 } from "@mui/material/styles";
|
|
2338
2534
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2339
2535
|
var StyledBreadcrumbs = styled24(MuiBreadcrumbs)({
|
|
@@ -2355,7 +2551,7 @@ var Breadcrumbs = ({ items, ...props }) => {
|
|
|
2355
2551
|
return /* @__PURE__ */ jsx32(StyledBreadcrumbs, { ...props, children: items.map((item, index) => {
|
|
2356
2552
|
const isLast = index === items.length - 1;
|
|
2357
2553
|
if (isLast || !item.href && !item.onClick) {
|
|
2358
|
-
return /* @__PURE__ */ jsx32(
|
|
2554
|
+
return /* @__PURE__ */ jsx32(Typography6, { color: "text.primary", children: item.label }, index);
|
|
2359
2555
|
}
|
|
2360
2556
|
return /* @__PURE__ */ jsx32(
|
|
2361
2557
|
StyledLink2,
|
|
@@ -2382,7 +2578,7 @@ import {
|
|
|
2382
2578
|
} from "@mui/material";
|
|
2383
2579
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
2384
2580
|
import { styled as styled25 } from "@mui/material/styles";
|
|
2385
|
-
import { jsx as jsx33, jsxs as
|
|
2581
|
+
import { jsx as jsx33, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2386
2582
|
var StyledAccordion = styled25(MuiAccordion)({
|
|
2387
2583
|
borderRadius: 8,
|
|
2388
2584
|
boxShadow: "none",
|
|
@@ -2413,7 +2609,7 @@ var Accordion = ({
|
|
|
2413
2609
|
defaultExpanded = false,
|
|
2414
2610
|
...props
|
|
2415
2611
|
}) => {
|
|
2416
|
-
return /* @__PURE__ */
|
|
2612
|
+
return /* @__PURE__ */ jsxs11(StyledAccordion, { defaultExpanded, ...props, children: [
|
|
2417
2613
|
/* @__PURE__ */ jsx33(StyledAccordionSummary, { expandIcon: /* @__PURE__ */ jsx33(ExpandMoreIcon, {}), children: title }),
|
|
2418
2614
|
/* @__PURE__ */ jsx33(StyledAccordionDetails, { children })
|
|
2419
2615
|
] });
|
|
@@ -2444,7 +2640,7 @@ import { jsx as jsx35 } from "react/jsx-runtime";
|
|
|
2444
2640
|
var StyledDivider = styled27(MuiDivider)({
|
|
2445
2641
|
borderColor: colors.grey[200]
|
|
2446
2642
|
});
|
|
2447
|
-
var
|
|
2643
|
+
var Divider4 = ({ ...props }) => {
|
|
2448
2644
|
return /* @__PURE__ */ jsx35(StyledDivider, { ...props });
|
|
2449
2645
|
};
|
|
2450
2646
|
|
|
@@ -2452,10 +2648,10 @@ var Divider3 = ({ ...props }) => {
|
|
|
2452
2648
|
import { Stack } from "@mui/material";
|
|
2453
2649
|
|
|
2454
2650
|
// src/components/layout/Box.tsx
|
|
2455
|
-
import { Box as
|
|
2651
|
+
import { Box as Box7 } from "@mui/material";
|
|
2456
2652
|
|
|
2457
2653
|
// src/components/layout/Typography.tsx
|
|
2458
|
-
import { Typography as
|
|
2654
|
+
import { Typography as Typography7 } from "@mui/material";
|
|
2459
2655
|
|
|
2460
2656
|
// src/components/layout/Container.tsx
|
|
2461
2657
|
import { Container } from "@mui/material";
|
|
@@ -2496,11 +2692,12 @@ var Collapse = (props) => {
|
|
|
2496
2692
|
};
|
|
2497
2693
|
|
|
2498
2694
|
// src/components/feedback/Alert.tsx
|
|
2695
|
+
import React4 from "react";
|
|
2499
2696
|
import MuiAlert from "@mui/material/Alert";
|
|
2500
2697
|
import { AlertTitle as MuiAlertTitle } from "@mui/material";
|
|
2501
2698
|
import MuiSnackbar from "@mui/material/Snackbar";
|
|
2502
2699
|
import { styled as styled29 } from "@mui/material/styles";
|
|
2503
|
-
import { jsx as jsx38, jsxs as
|
|
2700
|
+
import { jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2504
2701
|
var StyledAlert = styled29(MuiAlert)({
|
|
2505
2702
|
borderRadius: 8,
|
|
2506
2703
|
"&.MuiAlert-filled": {
|
|
@@ -2513,7 +2710,7 @@ var Alert = ({
|
|
|
2513
2710
|
children,
|
|
2514
2711
|
...props
|
|
2515
2712
|
}) => {
|
|
2516
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsxs12(StyledAlert, { severity, ...props, children: [
|
|
2517
2714
|
title && /* @__PURE__ */ jsx38(MuiAlertTitle, { children: title }),
|
|
2518
2715
|
children
|
|
2519
2716
|
] });
|
|
@@ -2530,10 +2727,16 @@ var Snackbar = ({
|
|
|
2530
2727
|
autoHideDuration = 6e3,
|
|
2531
2728
|
...props
|
|
2532
2729
|
}) => {
|
|
2730
|
+
const handleClose = (_event, reason) => {
|
|
2731
|
+
if (reason === "clickaway" && onClose) {
|
|
2732
|
+
return;
|
|
2733
|
+
}
|
|
2734
|
+
onClose?.();
|
|
2735
|
+
};
|
|
2533
2736
|
const content = children || (message ? /* @__PURE__ */ jsx38(
|
|
2534
2737
|
Alert,
|
|
2535
2738
|
{
|
|
2536
|
-
onClose,
|
|
2739
|
+
onClose: onClose ? handleClose : void 0,
|
|
2537
2740
|
severity,
|
|
2538
2741
|
variant,
|
|
2539
2742
|
title,
|
|
@@ -2544,12 +2747,31 @@ var Snackbar = ({
|
|
|
2544
2747
|
if (!content) {
|
|
2545
2748
|
return null;
|
|
2546
2749
|
}
|
|
2750
|
+
const NoTransition = React4.forwardRef(
|
|
2751
|
+
(props2, ref) => {
|
|
2752
|
+
return React4.cloneElement(props2.children, {
|
|
2753
|
+
ref,
|
|
2754
|
+
style: {
|
|
2755
|
+
...props2.children.props.style,
|
|
2756
|
+
transition: "opacity 0.3s ease-in-out"
|
|
2757
|
+
}
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2760
|
+
);
|
|
2761
|
+
NoTransition.displayName = "NoTransition";
|
|
2547
2762
|
return /* @__PURE__ */ jsx38(
|
|
2548
2763
|
StyledSnackbar,
|
|
2549
2764
|
{
|
|
2550
2765
|
anchorOrigin,
|
|
2551
2766
|
autoHideDuration,
|
|
2552
|
-
onClose,
|
|
2767
|
+
onClose: handleClose,
|
|
2768
|
+
disableWindowBlurListener: true,
|
|
2769
|
+
ClickAwayListenerProps: {
|
|
2770
|
+
onClickAway: () => {
|
|
2771
|
+
}
|
|
2772
|
+
// Prevent scroll issues
|
|
2773
|
+
},
|
|
2774
|
+
TransitionComponent: NoTransition,
|
|
2553
2775
|
...props,
|
|
2554
2776
|
children: content
|
|
2555
2777
|
}
|
|
@@ -2557,16 +2779,16 @@ var Snackbar = ({
|
|
|
2557
2779
|
};
|
|
2558
2780
|
|
|
2559
2781
|
// src/components/feedback/EmptyState.tsx
|
|
2560
|
-
import { Box as
|
|
2561
|
-
import { jsx as jsx39, jsxs as
|
|
2782
|
+
import { Box as Box8, Typography as Typography8 } from "@mui/material";
|
|
2783
|
+
import { jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2562
2784
|
var EmptyState = ({
|
|
2563
2785
|
title = "No items found",
|
|
2564
2786
|
description,
|
|
2565
2787
|
icon,
|
|
2566
2788
|
action
|
|
2567
2789
|
}) => {
|
|
2568
|
-
return /* @__PURE__ */
|
|
2569
|
-
|
|
2790
|
+
return /* @__PURE__ */ jsxs13(
|
|
2791
|
+
Box8,
|
|
2570
2792
|
{
|
|
2571
2793
|
sx: {
|
|
2572
2794
|
display: "flex",
|
|
@@ -2579,7 +2801,7 @@ var EmptyState = ({
|
|
|
2579
2801
|
},
|
|
2580
2802
|
children: [
|
|
2581
2803
|
icon && /* @__PURE__ */ jsx39(
|
|
2582
|
-
|
|
2804
|
+
Box8,
|
|
2583
2805
|
{
|
|
2584
2806
|
sx: {
|
|
2585
2807
|
color: colors.text.secondary,
|
|
@@ -2589,24 +2811,24 @@ var EmptyState = ({
|
|
|
2589
2811
|
children: icon
|
|
2590
2812
|
}
|
|
2591
2813
|
),
|
|
2592
|
-
/* @__PURE__ */ jsx39(
|
|
2593
|
-
description && /* @__PURE__ */ jsx39(
|
|
2594
|
-
action && /* @__PURE__ */ jsx39(
|
|
2814
|
+
/* @__PURE__ */ jsx39(Typography8, { variant: "h6", sx: { marginBottom: 1, color: colors.text.primary }, children: title }),
|
|
2815
|
+
description && /* @__PURE__ */ jsx39(Typography8, { variant: "body2", sx: { color: colors.text.secondary, marginBottom: 3 }, children: description }),
|
|
2816
|
+
action && /* @__PURE__ */ jsx39(Box8, { children: action })
|
|
2595
2817
|
]
|
|
2596
2818
|
}
|
|
2597
2819
|
);
|
|
2598
2820
|
};
|
|
2599
2821
|
|
|
2600
2822
|
// src/components/feedback/Loading.tsx
|
|
2601
|
-
import { Box as
|
|
2602
|
-
import { jsx as jsx40, jsxs as
|
|
2823
|
+
import { Box as Box9, CircularProgress as CircularProgress4, Typography as Typography9 } from "@mui/material";
|
|
2824
|
+
import { jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2603
2825
|
var Loading = ({
|
|
2604
2826
|
message = "Loading...",
|
|
2605
2827
|
size = 40,
|
|
2606
2828
|
fullScreen = false
|
|
2607
2829
|
}) => {
|
|
2608
|
-
const content = /* @__PURE__ */
|
|
2609
|
-
|
|
2830
|
+
const content = /* @__PURE__ */ jsxs14(
|
|
2831
|
+
Box9,
|
|
2610
2832
|
{
|
|
2611
2833
|
sx: {
|
|
2612
2834
|
display: "flex",
|
|
@@ -2629,7 +2851,7 @@ var Loading = ({
|
|
|
2629
2851
|
},
|
|
2630
2852
|
children: [
|
|
2631
2853
|
/* @__PURE__ */ jsx40(CircularProgress4, { size, thickness: 4 }),
|
|
2632
|
-
message && /* @__PURE__ */ jsx40(
|
|
2854
|
+
message && /* @__PURE__ */ jsx40(Typography9, { variant: "body2", color: "text.secondary", children: message })
|
|
2633
2855
|
]
|
|
2634
2856
|
}
|
|
2635
2857
|
);
|
|
@@ -2637,15 +2859,15 @@ var Loading = ({
|
|
|
2637
2859
|
};
|
|
2638
2860
|
|
|
2639
2861
|
// src/components/feedback/AppLoading.tsx
|
|
2640
|
-
import { Box as
|
|
2641
|
-
import { jsx as jsx41, jsxs as
|
|
2862
|
+
import { Box as Box10, CircularProgress as CircularProgress5, Typography as Typography10 } from "@mui/material";
|
|
2863
|
+
import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2642
2864
|
var AppLoading = ({
|
|
2643
2865
|
message = "Loading...",
|
|
2644
2866
|
logo = "/icons/logo.png",
|
|
2645
2867
|
sx = {}
|
|
2646
2868
|
}) => {
|
|
2647
|
-
return /* @__PURE__ */
|
|
2648
|
-
|
|
2869
|
+
return /* @__PURE__ */ jsxs15(
|
|
2870
|
+
Box10,
|
|
2649
2871
|
{
|
|
2650
2872
|
sx: {
|
|
2651
2873
|
display: "flex",
|
|
@@ -2664,7 +2886,7 @@ var AppLoading = ({
|
|
|
2664
2886
|
},
|
|
2665
2887
|
children: [
|
|
2666
2888
|
logo && /* @__PURE__ */ jsx41(
|
|
2667
|
-
|
|
2889
|
+
Box10,
|
|
2668
2890
|
{
|
|
2669
2891
|
component: "img",
|
|
2670
2892
|
src: logo,
|
|
@@ -2677,7 +2899,7 @@ var AppLoading = ({
|
|
|
2677
2899
|
}
|
|
2678
2900
|
),
|
|
2679
2901
|
/* @__PURE__ */ jsx41(CircularProgress5, { size: 40, thickness: 4, sx: { mb: 2 } }),
|
|
2680
|
-
/* @__PURE__ */ jsx41(
|
|
2902
|
+
/* @__PURE__ */ jsx41(Typography10, { variant: "body1", color: "text.secondary", children: message })
|
|
2681
2903
|
]
|
|
2682
2904
|
}
|
|
2683
2905
|
);
|
|
@@ -2706,10 +2928,10 @@ import ReactFlow, {
|
|
|
2706
2928
|
BackgroundVariant,
|
|
2707
2929
|
ConnectionLineType
|
|
2708
2930
|
} from "reactflow";
|
|
2709
|
-
import { Box as
|
|
2931
|
+
import { Box as Box11 } from "@mui/material";
|
|
2710
2932
|
import { useTheme } from "@mui/material/styles";
|
|
2711
2933
|
import { Background as Background2, Controls as Controls2, MiniMap as MiniMap2, Panel, BackgroundVariant as BackgroundVariant2, ConnectionLineType as ConnectionLineType2 } from "reactflow";
|
|
2712
|
-
import { jsx as jsx43, jsxs as
|
|
2934
|
+
import { jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2713
2935
|
var FlowEditor = ({
|
|
2714
2936
|
nodes,
|
|
2715
2937
|
edges,
|
|
@@ -2736,7 +2958,7 @@ var FlowEditor = ({
|
|
|
2736
2958
|
[onInit]
|
|
2737
2959
|
);
|
|
2738
2960
|
return /* @__PURE__ */ jsx43(ReactFlowProvider, { children: /* @__PURE__ */ jsx43(
|
|
2739
|
-
|
|
2961
|
+
Box11,
|
|
2740
2962
|
{
|
|
2741
2963
|
sx: {
|
|
2742
2964
|
width: "100%",
|
|
@@ -2748,7 +2970,7 @@ var FlowEditor = ({
|
|
|
2748
2970
|
...containerProps?.sx
|
|
2749
2971
|
},
|
|
2750
2972
|
...containerProps,
|
|
2751
|
-
children: /* @__PURE__ */
|
|
2973
|
+
children: /* @__PURE__ */ jsxs16(
|
|
2752
2974
|
ReactFlow,
|
|
2753
2975
|
{
|
|
2754
2976
|
nodes,
|
|
@@ -2805,10 +3027,10 @@ var FlowEditor = ({
|
|
|
2805
3027
|
// src/components/third-party/CodeEditor.tsx
|
|
2806
3028
|
import { useCallback as useCallback4, useEffect, useState as useState4, useRef } from "react";
|
|
2807
3029
|
import Editor from "@monaco-editor/react";
|
|
2808
|
-
import { Box as
|
|
3030
|
+
import { Box as Box12, IconButton as IconButton6, Tooltip as Tooltip3, Alert as Alert2 } from "@mui/material";
|
|
2809
3031
|
import FullscreenIcon from "@mui/icons-material/Fullscreen";
|
|
2810
3032
|
import FullscreenExitIcon from "@mui/icons-material/FullscreenExit";
|
|
2811
|
-
import { jsx as jsx44, jsxs as
|
|
3033
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2812
3034
|
var configureTypeScript = (monaco) => {
|
|
2813
3035
|
monaco.languages.typescript.typescriptDefaults.setCompilerOptions({
|
|
2814
3036
|
target: monaco.languages.typescript.ScriptTarget.ES2020,
|
|
@@ -2996,7 +3218,7 @@ var CodeEditor = ({
|
|
|
2996
3218
|
...options
|
|
2997
3219
|
};
|
|
2998
3220
|
return /* @__PURE__ */ jsx44(
|
|
2999
|
-
|
|
3221
|
+
Box12,
|
|
3000
3222
|
{
|
|
3001
3223
|
sx: {
|
|
3002
3224
|
display: "flex",
|
|
@@ -3012,8 +3234,8 @@ var CodeEditor = ({
|
|
|
3012
3234
|
bgcolor: "background.paper",
|
|
3013
3235
|
p: isFullscreen ? 2 : 0
|
|
3014
3236
|
},
|
|
3015
|
-
children: /* @__PURE__ */
|
|
3016
|
-
|
|
3237
|
+
children: /* @__PURE__ */ jsxs17(
|
|
3238
|
+
Box12,
|
|
3017
3239
|
{
|
|
3018
3240
|
sx: {
|
|
3019
3241
|
flex: 1,
|
|
@@ -3029,7 +3251,7 @@ var CodeEditor = ({
|
|
|
3029
3251
|
...containerProps,
|
|
3030
3252
|
children: [
|
|
3031
3253
|
/* @__PURE__ */ jsx44(Tooltip3, { title: isFullscreen ? "Exit Fullscreen" : "Fullscreen", children: /* @__PURE__ */ jsx44(
|
|
3032
|
-
|
|
3254
|
+
IconButton6,
|
|
3033
3255
|
{
|
|
3034
3256
|
onClick: toggleFullscreen,
|
|
3035
3257
|
size: "small",
|
|
@@ -3048,7 +3270,7 @@ var CodeEditor = ({
|
|
|
3048
3270
|
}
|
|
3049
3271
|
) }),
|
|
3050
3272
|
/* @__PURE__ */ jsx44(
|
|
3051
|
-
|
|
3273
|
+
Box12,
|
|
3052
3274
|
{
|
|
3053
3275
|
sx: {
|
|
3054
3276
|
flex: 1,
|
|
@@ -3068,7 +3290,7 @@ var CodeEditor = ({
|
|
|
3068
3290
|
onMount: handleEditorDidMount,
|
|
3069
3291
|
theme: themeProp || "vs",
|
|
3070
3292
|
options: defaultOptions,
|
|
3071
|
-
loading: /* @__PURE__ */ jsx44(
|
|
3293
|
+
loading: /* @__PURE__ */ jsx44(Box12, { sx: { p: 2, textAlign: "center" }, children: "Loading Monaco Editor..." }),
|
|
3072
3294
|
beforeMount: (monaco) => {
|
|
3073
3295
|
console.log("CodeEditor: beforeMount called", { monaco: !!monaco });
|
|
3074
3296
|
}
|
|
@@ -3076,7 +3298,7 @@ var CodeEditor = ({
|
|
|
3076
3298
|
)
|
|
3077
3299
|
}
|
|
3078
3300
|
),
|
|
3079
|
-
validationErrors.length > 0 && /* @__PURE__ */
|
|
3301
|
+
validationErrors.length > 0 && /* @__PURE__ */ jsxs17(
|
|
3080
3302
|
Alert2,
|
|
3081
3303
|
{
|
|
3082
3304
|
severity: "error",
|
|
@@ -3094,15 +3316,15 @@ var CodeEditor = ({
|
|
|
3094
3316
|
overflow: "auto"
|
|
3095
3317
|
},
|
|
3096
3318
|
children: [
|
|
3097
|
-
/* @__PURE__ */ jsx44(
|
|
3098
|
-
/* @__PURE__ */
|
|
3099
|
-
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ jsx44(Box12, { sx: { mb: 1, fontWeight: 600 }, children: "Please fix the following errors:" }),
|
|
3320
|
+
/* @__PURE__ */ jsxs17(Box12, { component: "ul", sx: { m: 0, pl: 2 }, children: [
|
|
3321
|
+
validationErrors.slice(0, 3).map((error, index) => /* @__PURE__ */ jsxs17(Box12, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3100
3322
|
"Line ",
|
|
3101
3323
|
error.startLineNumber,
|
|
3102
3324
|
": ",
|
|
3103
3325
|
error.message
|
|
3104
3326
|
] }, index)),
|
|
3105
|
-
validationErrors.length > 3 && /* @__PURE__ */
|
|
3327
|
+
validationErrors.length > 3 && /* @__PURE__ */ jsxs17(Box12, { component: "li", sx: { fontSize: "0.85rem" }, children: [
|
|
3106
3328
|
validationErrors.length - 3,
|
|
3107
3329
|
" more error",
|
|
3108
3330
|
validationErrors.length - 3 > 1 ? "s" : "",
|
|
@@ -3130,7 +3352,7 @@ export {
|
|
|
3130
3352
|
Background2 as Background,
|
|
3131
3353
|
BackgroundVariant2 as BackgroundVariant,
|
|
3132
3354
|
Badge,
|
|
3133
|
-
|
|
3355
|
+
Box7 as Box,
|
|
3134
3356
|
Breadcrumbs,
|
|
3135
3357
|
Button,
|
|
3136
3358
|
ButtonGroup,
|
|
@@ -3147,7 +3369,7 @@ export {
|
|
|
3147
3369
|
Container,
|
|
3148
3370
|
Controls2 as Controls,
|
|
3149
3371
|
Dialog,
|
|
3150
|
-
|
|
3372
|
+
Divider4 as Divider,
|
|
3151
3373
|
Drawer2 as Drawer,
|
|
3152
3374
|
Dropdown,
|
|
3153
3375
|
EmptyState,
|
|
@@ -3198,7 +3420,7 @@ export {
|
|
|
3198
3420
|
ToggleButtonGroup,
|
|
3199
3421
|
Toolbar,
|
|
3200
3422
|
Tooltip2 as Tooltip,
|
|
3201
|
-
|
|
3423
|
+
Typography7 as Typography,
|
|
3202
3424
|
WorkspaceSelectorButton,
|
|
3203
3425
|
colors,
|
|
3204
3426
|
theme
|