@matteoaliano/forest-ui 1.0.0 → 1.1.0
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/bin/sync.mjs +37 -72
- package/dist/index.d.mts +74 -2
- package/dist/index.d.ts +74 -2
- package/dist/index.js +250 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +257 -49
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/skills/forest-alkemy-plus/SKILL.md +25 -131
- package/skills/forest-alkemy-plus/references/components.md +2 -0
- package/skills/forest-alkemy-plus/references/patterns.md +65 -121
- package/skills/forest-alkemy-plus/references/upgrading.md +6 -25
package/dist/index.mjs
CHANGED
|
@@ -70,7 +70,7 @@ function ForestProvider({
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// src/index.ts
|
|
73
|
-
import { useColorScheme } from "@mui/material/styles";
|
|
73
|
+
import { useColorScheme as useColorScheme2 } from "@mui/material/styles";
|
|
74
74
|
import { InitColorSchemeScript } from "@mui/material";
|
|
75
75
|
|
|
76
76
|
// src/components/Autocomplete/index.tsx
|
|
@@ -1140,9 +1140,215 @@ function SidebarItem({
|
|
|
1140
1140
|
] });
|
|
1141
1141
|
}
|
|
1142
1142
|
|
|
1143
|
+
// src/components/AppShell/index.tsx
|
|
1144
|
+
import { useState as useState2 } from "react";
|
|
1145
|
+
import Box3 from "@mui/material/Box";
|
|
1146
|
+
import MuiDrawer3 from "@mui/material/Drawer";
|
|
1147
|
+
import List from "@mui/material/List";
|
|
1148
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
1149
|
+
import { useColorScheme, useTheme } from "@mui/material/styles";
|
|
1150
|
+
import MenuOutlined from "@mui/icons-material/MenuOutlined";
|
|
1151
|
+
import DarkModeOutlined from "@mui/icons-material/DarkModeOutlined";
|
|
1152
|
+
import LightModeOutlined from "@mui/icons-material/LightModeOutlined";
|
|
1153
|
+
import { jsx as jsx20, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1154
|
+
function ColorModeToggle() {
|
|
1155
|
+
const { mode, systemMode, setMode } = useColorScheme();
|
|
1156
|
+
const resolved = mode === "system" ? systemMode : mode;
|
|
1157
|
+
const isDark = resolved === "dark";
|
|
1158
|
+
return /* @__PURE__ */ jsx20(Tooltip, { title: isDark ? "Switch to light mode" : "Switch to dark mode", children: /* @__PURE__ */ jsx20(
|
|
1159
|
+
IconButton2,
|
|
1160
|
+
{
|
|
1161
|
+
size: "small",
|
|
1162
|
+
color: "inherit",
|
|
1163
|
+
"aria-label": "Toggle color mode",
|
|
1164
|
+
onClick: () => setMode(isDark ? "light" : "dark"),
|
|
1165
|
+
children: isDark ? /* @__PURE__ */ jsx20(LightModeOutlined, { fontSize: "small" }) : /* @__PURE__ */ jsx20(DarkModeOutlined, { fontSize: "small" })
|
|
1166
|
+
}
|
|
1167
|
+
) });
|
|
1168
|
+
}
|
|
1169
|
+
function ShellBrand({
|
|
1170
|
+
product,
|
|
1171
|
+
logoVariant
|
|
1172
|
+
}) {
|
|
1173
|
+
const { mode, systemMode } = useColorScheme();
|
|
1174
|
+
const dark = (mode === "system" ? systemMode : mode) === "dark";
|
|
1175
|
+
if (logoVariant === "full") {
|
|
1176
|
+
return /* @__PURE__ */ jsx20(Logo, { product, variant: "logo", color: dark ? "negative" : "positive" });
|
|
1177
|
+
}
|
|
1178
|
+
return /* @__PURE__ */ jsx20(Logo, { product, variant: "logomark", color: dark ? "negative" : "default" });
|
|
1179
|
+
}
|
|
1180
|
+
function AppShell({
|
|
1181
|
+
navItems,
|
|
1182
|
+
nav,
|
|
1183
|
+
product = "studio",
|
|
1184
|
+
logoVariant = "logomark",
|
|
1185
|
+
brand,
|
|
1186
|
+
search,
|
|
1187
|
+
actions,
|
|
1188
|
+
sidebarBehavior = "permanent",
|
|
1189
|
+
defaultSidebarOpen = true,
|
|
1190
|
+
children
|
|
1191
|
+
}) {
|
|
1192
|
+
const theme = useTheme();
|
|
1193
|
+
const isMobile = useMediaQuery(theme.breakpoints.down("sm"));
|
|
1194
|
+
const [sidebarOpen, setSidebarOpen] = useState2(defaultSidebarOpen);
|
|
1195
|
+
const [mobileOpen, setMobileOpen] = useState2(false);
|
|
1196
|
+
const navContent = nav != null ? nav : navItems && /* @__PURE__ */ jsx20(List, { children: navItems.map(({ label, icon, active, endAdornment, ...link }) => /* @__PURE__ */ jsx20(
|
|
1197
|
+
SidebarItem,
|
|
1198
|
+
{
|
|
1199
|
+
icon,
|
|
1200
|
+
label,
|
|
1201
|
+
selected: active,
|
|
1202
|
+
endAdornment,
|
|
1203
|
+
...link
|
|
1204
|
+
},
|
|
1205
|
+
label
|
|
1206
|
+
)) });
|
|
1207
|
+
const brandEl = brand != null ? brand : /* @__PURE__ */ jsx20(ShellBrand, { product, logoVariant });
|
|
1208
|
+
const wrapLogomark = !brand && logoVariant === "logomark" && !isMobile;
|
|
1209
|
+
return /* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", flexDirection: "column", height: "100vh" }, children: [
|
|
1210
|
+
/* @__PURE__ */ jsx20(
|
|
1211
|
+
default51,
|
|
1212
|
+
{
|
|
1213
|
+
position: "sticky",
|
|
1214
|
+
elevation: 0,
|
|
1215
|
+
sx: { zIndex: theme.zIndex.drawer + 1 },
|
|
1216
|
+
children: /* @__PURE__ */ jsxs4(default52, { variant: "dense", sx: { px: { xs: "16px", sm: "16px" } }, children: [
|
|
1217
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { flex: 1, display: "flex", alignItems: "center", justifyContent: "flex-start", gap: 1 }, children: [
|
|
1218
|
+
isMobile && /* @__PURE__ */ jsx20(
|
|
1219
|
+
IconButton2,
|
|
1220
|
+
{
|
|
1221
|
+
size: "small",
|
|
1222
|
+
color: "inherit",
|
|
1223
|
+
"aria-label": "Open navigation",
|
|
1224
|
+
onClick: () => setMobileOpen(true),
|
|
1225
|
+
children: /* @__PURE__ */ jsx20(MenuOutlined, { fontSize: "small" })
|
|
1226
|
+
}
|
|
1227
|
+
),
|
|
1228
|
+
wrapLogomark ? /* @__PURE__ */ jsx20(Box3, { sx: { width: 48, ml: "-16px", display: "flex", justifyContent: "center" }, children: brandEl }) : brandEl
|
|
1229
|
+
] }),
|
|
1230
|
+
/* @__PURE__ */ jsx20(Box3, { sx: { flex: 1, display: "flex", justifyContent: "center" }, children: search === true ? /* @__PURE__ */ jsx20(Search, { size: "small", placeholder: "Search\u2026", sx: { width: "100%", maxWidth: 480 } }) : search || null }),
|
|
1231
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { flex: 1, display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 1 }, children: [
|
|
1232
|
+
/* @__PURE__ */ jsx20(ColorModeToggle, {}),
|
|
1233
|
+
actions
|
|
1234
|
+
] })
|
|
1235
|
+
] })
|
|
1236
|
+
}
|
|
1237
|
+
),
|
|
1238
|
+
/* @__PURE__ */ jsxs4(Box3, { sx: { display: "flex", flexGrow: 1, overflow: "hidden" }, children: [
|
|
1239
|
+
!isMobile && navContent && /* @__PURE__ */ jsx20(
|
|
1240
|
+
SidebarNav,
|
|
1241
|
+
{
|
|
1242
|
+
open: sidebarOpen,
|
|
1243
|
+
onOpenChange: setSidebarOpen,
|
|
1244
|
+
behavior: sidebarBehavior,
|
|
1245
|
+
sx: {
|
|
1246
|
+
height: "100%",
|
|
1247
|
+
"& .MuiDrawer-paper": { position: "relative", height: "100%" }
|
|
1248
|
+
},
|
|
1249
|
+
children: navContent
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
/* @__PURE__ */ jsx20(Box3, { component: "main", sx: { flexGrow: 1, overflow: "auto" }, children })
|
|
1253
|
+
] }),
|
|
1254
|
+
isMobile && navContent && /* @__PURE__ */ jsx20(
|
|
1255
|
+
MuiDrawer3,
|
|
1256
|
+
{
|
|
1257
|
+
open: mobileOpen,
|
|
1258
|
+
onClose: () => setMobileOpen(false),
|
|
1259
|
+
onClick: () => setMobileOpen(false),
|
|
1260
|
+
sx: { "& .MuiDrawer-paper": { width: 240 } },
|
|
1261
|
+
children: navContent
|
|
1262
|
+
}
|
|
1263
|
+
)
|
|
1264
|
+
] });
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
// src/components/Page/index.tsx
|
|
1268
|
+
import Box4 from "@mui/material/Box";
|
|
1269
|
+
import MuiBreadcrumbs from "@mui/material/Breadcrumbs";
|
|
1270
|
+
import MuiLink from "@mui/material/Link";
|
|
1271
|
+
import Typography from "@mui/material/Typography";
|
|
1272
|
+
import { jsx as jsx21, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1273
|
+
function Page({
|
|
1274
|
+
title,
|
|
1275
|
+
breadcrumbs,
|
|
1276
|
+
actions,
|
|
1277
|
+
disableGutters = false,
|
|
1278
|
+
maxWidth,
|
|
1279
|
+
sx,
|
|
1280
|
+
children
|
|
1281
|
+
}) {
|
|
1282
|
+
return /* @__PURE__ */ jsx21(
|
|
1283
|
+
Box4,
|
|
1284
|
+
{
|
|
1285
|
+
component: "section",
|
|
1286
|
+
sx: [
|
|
1287
|
+
{
|
|
1288
|
+
display: "flex",
|
|
1289
|
+
flexDirection: "column",
|
|
1290
|
+
minHeight: "100%",
|
|
1291
|
+
backgroundColor: "background.paper",
|
|
1292
|
+
...disableGutters ? {} : { p: 3 }
|
|
1293
|
+
},
|
|
1294
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
1295
|
+
],
|
|
1296
|
+
children: /* @__PURE__ */ jsxs5(
|
|
1297
|
+
Box4,
|
|
1298
|
+
{
|
|
1299
|
+
sx: {
|
|
1300
|
+
display: "flex",
|
|
1301
|
+
flexDirection: "column",
|
|
1302
|
+
flexGrow: 1,
|
|
1303
|
+
width: "100%",
|
|
1304
|
+
...maxWidth ? { maxWidth, mx: "auto" } : {}
|
|
1305
|
+
},
|
|
1306
|
+
children: [
|
|
1307
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx21(MuiBreadcrumbs, { "aria-label": "breadcrumb", sx: { mb: 1 }, children: breadcrumbs.map(
|
|
1308
|
+
(crumb, i) => i === breadcrumbs.length - 1 ? (
|
|
1309
|
+
// Current page: plain text, not a link.
|
|
1310
|
+
/* @__PURE__ */ jsx21(Typography, { variant: "body2", color: "text.primary", children: crumb.label }, crumb.label)
|
|
1311
|
+
) : /* @__PURE__ */ jsx21(
|
|
1312
|
+
MuiLink,
|
|
1313
|
+
{
|
|
1314
|
+
variant: "body2",
|
|
1315
|
+
underline: "hover",
|
|
1316
|
+
color: "text.secondary",
|
|
1317
|
+
...crumb.component ? { component: crumb.component } : {},
|
|
1318
|
+
...crumb.href ? { href: crumb.href } : {},
|
|
1319
|
+
...crumb.onClick ? { onClick: crumb.onClick } : {},
|
|
1320
|
+
children: crumb.label
|
|
1321
|
+
},
|
|
1322
|
+
crumb.label
|
|
1323
|
+
)
|
|
1324
|
+
) }),
|
|
1325
|
+
/* @__PURE__ */ jsxs5(
|
|
1326
|
+
Box4,
|
|
1327
|
+
{
|
|
1328
|
+
sx: {
|
|
1329
|
+
display: "flex",
|
|
1330
|
+
alignItems: "center",
|
|
1331
|
+
justifyContent: "space-between",
|
|
1332
|
+
gap: 2,
|
|
1333
|
+
mb: 3
|
|
1334
|
+
},
|
|
1335
|
+
children: [
|
|
1336
|
+
/* @__PURE__ */ jsx21(Typography, { variant: "h5", children: title }),
|
|
1337
|
+
actions && /* @__PURE__ */ jsx21(Box4, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
1338
|
+
]
|
|
1339
|
+
}
|
|
1340
|
+
),
|
|
1341
|
+
children
|
|
1342
|
+
]
|
|
1343
|
+
}
|
|
1344
|
+
)
|
|
1345
|
+
}
|
|
1346
|
+
);
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1143
1349
|
// src/components/Box/index.tsx
|
|
1144
1350
|
import MuiBox from "@mui/material/Box";
|
|
1145
|
-
var
|
|
1351
|
+
var Box5 = MuiBox;
|
|
1146
1352
|
|
|
1147
1353
|
// src/components/Stack/index.tsx
|
|
1148
1354
|
import MuiStack from "@mui/material/Stack";
|
|
@@ -1203,21 +1409,21 @@ import { default as default107 } from "@mui/material/TextareaAutosize";
|
|
|
1203
1409
|
import {
|
|
1204
1410
|
LineChart as MuiLineChart
|
|
1205
1411
|
} from "@mui/x-charts/LineChart";
|
|
1206
|
-
import { useTheme as
|
|
1412
|
+
import { useTheme as useTheme4 } from "@mui/material/styles";
|
|
1207
1413
|
|
|
1208
1414
|
// src/components/Charts/useChartColors.ts
|
|
1209
|
-
import { useTheme } from "@mui/material/styles";
|
|
1415
|
+
import { useTheme as useTheme2 } from "@mui/material/styles";
|
|
1210
1416
|
function useChartColors(count) {
|
|
1211
|
-
const theme =
|
|
1417
|
+
const theme = useTheme2();
|
|
1212
1418
|
const chart = theme.palette.chart;
|
|
1213
1419
|
const colors = chart.series.map((s) => s.fg);
|
|
1214
1420
|
return colors.slice(0, Math.min(count, colors.length));
|
|
1215
1421
|
}
|
|
1216
1422
|
|
|
1217
1423
|
// src/components/Charts/CustomTooltip.tsx
|
|
1218
|
-
import { Box as
|
|
1219
|
-
import { useTheme as
|
|
1220
|
-
import { jsx as
|
|
1424
|
+
import { Box as Box6, Typography as Typography2 } from "@mui/material";
|
|
1425
|
+
import { useTheme as useTheme3 } from "@mui/material/styles";
|
|
1426
|
+
import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1221
1427
|
function formatDate(date) {
|
|
1222
1428
|
if (!date) return "";
|
|
1223
1429
|
const d = new Date(date);
|
|
@@ -1238,12 +1444,12 @@ function renderValue(val) {
|
|
|
1238
1444
|
}
|
|
1239
1445
|
function CustomTooltip(props) {
|
|
1240
1446
|
const { series, axisValue, dataIndex } = props;
|
|
1241
|
-
const theme =
|
|
1447
|
+
const theme = useTheme3();
|
|
1242
1448
|
if (dataIndex == null) {
|
|
1243
1449
|
return null;
|
|
1244
1450
|
}
|
|
1245
|
-
return /* @__PURE__ */
|
|
1246
|
-
|
|
1451
|
+
return /* @__PURE__ */ jsxs6(
|
|
1452
|
+
Box6,
|
|
1247
1453
|
{
|
|
1248
1454
|
sx: {
|
|
1249
1455
|
backgroundColor: theme.palette.common.white,
|
|
@@ -1258,8 +1464,8 @@ function CustomTooltip(props) {
|
|
|
1258
1464
|
border: `1px solid ${theme.palette.divider}`
|
|
1259
1465
|
},
|
|
1260
1466
|
children: [
|
|
1261
|
-
/* @__PURE__ */
|
|
1262
|
-
|
|
1467
|
+
/* @__PURE__ */ jsx22(
|
|
1468
|
+
Typography2,
|
|
1263
1469
|
{
|
|
1264
1470
|
variant: "body2",
|
|
1265
1471
|
sx: {
|
|
@@ -1275,9 +1481,9 @@ function CustomTooltip(props) {
|
|
|
1275
1481
|
const color = typeof s.getColor === "function" ? s.getColor(dataIndex) : s.color;
|
|
1276
1482
|
const value = s.data ? s.data[dataIndex] : null;
|
|
1277
1483
|
if (value == null) return null;
|
|
1278
|
-
return /* @__PURE__ */
|
|
1279
|
-
/* @__PURE__ */
|
|
1280
|
-
|
|
1484
|
+
return /* @__PURE__ */ jsx22(Box6, { sx: { display: "flex", flexDirection: "column", gap: "6px" }, children: /* @__PURE__ */ jsxs6(Box6, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
1485
|
+
/* @__PURE__ */ jsx22(
|
|
1486
|
+
Box6,
|
|
1281
1487
|
{
|
|
1282
1488
|
sx: {
|
|
1283
1489
|
width: 16,
|
|
@@ -1288,8 +1494,8 @@ function CustomTooltip(props) {
|
|
|
1288
1494
|
}
|
|
1289
1495
|
}
|
|
1290
1496
|
),
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
|
|
1497
|
+
/* @__PURE__ */ jsxs6(
|
|
1498
|
+
Typography2,
|
|
1293
1499
|
{
|
|
1294
1500
|
variant: "body2",
|
|
1295
1501
|
sx: {
|
|
@@ -1299,8 +1505,8 @@ function CustomTooltip(props) {
|
|
|
1299
1505
|
gap: "6px"
|
|
1300
1506
|
},
|
|
1301
1507
|
children: [
|
|
1302
|
-
/* @__PURE__ */
|
|
1303
|
-
|
|
1508
|
+
/* @__PURE__ */ jsx22(
|
|
1509
|
+
Box6,
|
|
1304
1510
|
{
|
|
1305
1511
|
component: "span",
|
|
1306
1512
|
sx: {
|
|
@@ -1327,10 +1533,10 @@ function CustomTooltip(props) {
|
|
|
1327
1533
|
}
|
|
1328
1534
|
|
|
1329
1535
|
// src/components/Charts/LineChart.tsx
|
|
1330
|
-
import { jsx as
|
|
1536
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1331
1537
|
function LineChart({ series, colors, ...props }) {
|
|
1332
1538
|
var _a, _b;
|
|
1333
|
-
const theme =
|
|
1539
|
+
const theme = useTheme4();
|
|
1334
1540
|
const chart = theme.palette.chart;
|
|
1335
1541
|
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
1336
1542
|
const modifiedSeries = series == null ? void 0 : series.map((s) => {
|
|
@@ -1341,7 +1547,7 @@ function LineChart({ series, colors, ...props }) {
|
|
|
1341
1547
|
highlightScope: (_b2 = s.highlightScope) != null ? _b2 : { highlighted: "item", faded: "global" }
|
|
1342
1548
|
};
|
|
1343
1549
|
});
|
|
1344
|
-
return /* @__PURE__ */
|
|
1550
|
+
return /* @__PURE__ */ jsx23(
|
|
1345
1551
|
MuiLineChart,
|
|
1346
1552
|
{
|
|
1347
1553
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -1414,11 +1620,11 @@ function LineChart({ series, colors, ...props }) {
|
|
|
1414
1620
|
import {
|
|
1415
1621
|
BarChart as MuiBarChart
|
|
1416
1622
|
} from "@mui/x-charts/BarChart";
|
|
1417
|
-
import { useTheme as
|
|
1418
|
-
import { jsx as
|
|
1623
|
+
import { useTheme as useTheme5 } from "@mui/material/styles";
|
|
1624
|
+
import { jsx as jsx24, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1419
1625
|
function BarChart({ series, colors, ...props }) {
|
|
1420
1626
|
var _a, _b;
|
|
1421
|
-
const theme =
|
|
1627
|
+
const theme = useTheme5();
|
|
1422
1628
|
const chart = theme.palette.chart;
|
|
1423
1629
|
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
1424
1630
|
const resolvedColors = colors != null ? colors : seriesColors;
|
|
@@ -1433,7 +1639,7 @@ function BarChart({ series, colors, ...props }) {
|
|
|
1433
1639
|
highlightScope: (_a2 = s.highlightScope) != null ? _a2 : { highlighted: "item", faded: "global" }
|
|
1434
1640
|
};
|
|
1435
1641
|
});
|
|
1436
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ jsx24(
|
|
1437
1643
|
MuiBarChart,
|
|
1438
1644
|
{
|
|
1439
1645
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -1493,10 +1699,10 @@ function BarChart({ series, colors, ...props }) {
|
|
|
1493
1699
|
...(_b = props.sx) != null ? _b : {}
|
|
1494
1700
|
},
|
|
1495
1701
|
...props,
|
|
1496
|
-
children: /* @__PURE__ */
|
|
1702
|
+
children: /* @__PURE__ */ jsx24("defs", { children: series == null ? void 0 : series.map((s, idx) => {
|
|
1497
1703
|
if (s.variant !== "striped") return null;
|
|
1498
1704
|
const baseColor = s.color || resolvedColors[idx % resolvedColors.length];
|
|
1499
|
-
return /* @__PURE__ */
|
|
1705
|
+
return /* @__PURE__ */ jsxs7(
|
|
1500
1706
|
"pattern",
|
|
1501
1707
|
{
|
|
1502
1708
|
id: `striped-pattern-${idx}`,
|
|
@@ -1505,8 +1711,8 @@ function BarChart({ series, colors, ...props }) {
|
|
|
1505
1711
|
height: "8",
|
|
1506
1712
|
patternTransform: "rotate(45)",
|
|
1507
1713
|
children: [
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ jsx24("rect", { width: "8", height: "8", fill: theme.palette.background.paper }),
|
|
1715
|
+
/* @__PURE__ */ jsx24("line", { x1: "0", y: "0", x2: "0", y2: "8", stroke: baseColor, strokeWidth: "4" })
|
|
1510
1716
|
]
|
|
1511
1717
|
},
|
|
1512
1718
|
`striped-${idx}`
|
|
@@ -1520,11 +1726,11 @@ function BarChart({ series, colors, ...props }) {
|
|
|
1520
1726
|
import {
|
|
1521
1727
|
PieChart as MuiPieChart
|
|
1522
1728
|
} from "@mui/x-charts/PieChart";
|
|
1523
|
-
import { useTheme as
|
|
1524
|
-
import { jsx as
|
|
1729
|
+
import { useTheme as useTheme6 } from "@mui/material/styles";
|
|
1730
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1525
1731
|
function PieChart({ series, colors, ...props }) {
|
|
1526
1732
|
var _a, _b, _c, _d;
|
|
1527
|
-
const theme =
|
|
1733
|
+
const theme = useTheme6();
|
|
1528
1734
|
const chart = theme.palette.chart;
|
|
1529
1735
|
const sliceCount = (_c = (_b = (_a = series == null ? void 0 : series[0]) == null ? void 0 : _a.data) == null ? void 0 : _b.length) != null ? _c : 0;
|
|
1530
1736
|
const seriesColors = useChartColors(sliceCount);
|
|
@@ -1535,7 +1741,7 @@ function PieChart({ series, colors, ...props }) {
|
|
|
1535
1741
|
highlightScope: (_a2 = s.highlightScope) != null ? _a2 : { highlighted: "item", faded: "global" }
|
|
1536
1742
|
};
|
|
1537
1743
|
});
|
|
1538
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ jsx25(
|
|
1539
1745
|
MuiPieChart,
|
|
1540
1746
|
{
|
|
1541
1747
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -1580,7 +1786,7 @@ function PieChart({ series, colors, ...props }) {
|
|
|
1580
1786
|
import {
|
|
1581
1787
|
ScatterChart as MuiScatterChart
|
|
1582
1788
|
} from "@mui/x-charts/ScatterChart";
|
|
1583
|
-
import { useTheme as
|
|
1789
|
+
import { useTheme as useTheme7 } from "@mui/material/styles";
|
|
1584
1790
|
|
|
1585
1791
|
// src/components/Charts/chartSx.ts
|
|
1586
1792
|
function getForestChartSx(theme) {
|
|
@@ -1636,10 +1842,10 @@ var forestLegendSlotProps = {
|
|
|
1636
1842
|
};
|
|
1637
1843
|
|
|
1638
1844
|
// src/components/Charts/ScatterChart.tsx
|
|
1639
|
-
import { jsx as
|
|
1845
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1640
1846
|
function ScatterChart({ series, colors, ...props }) {
|
|
1641
1847
|
var _a, _b;
|
|
1642
|
-
const theme =
|
|
1848
|
+
const theme = useTheme7();
|
|
1643
1849
|
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
1644
1850
|
const modifiedSeries = series == null ? void 0 : series.map((s) => {
|
|
1645
1851
|
var _a2;
|
|
@@ -1648,7 +1854,7 @@ function ScatterChart({ series, colors, ...props }) {
|
|
|
1648
1854
|
highlightScope: (_a2 = s.highlightScope) != null ? _a2 : { highlighted: "item", faded: "global" }
|
|
1649
1855
|
};
|
|
1650
1856
|
});
|
|
1651
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsx26(
|
|
1652
1858
|
MuiScatterChart,
|
|
1653
1859
|
{
|
|
1654
1860
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -1668,12 +1874,12 @@ function ScatterChart({ series, colors, ...props }) {
|
|
|
1668
1874
|
import {
|
|
1669
1875
|
Gauge as MuiGauge
|
|
1670
1876
|
} from "@mui/x-charts/Gauge";
|
|
1671
|
-
import { useTheme as
|
|
1672
|
-
import { jsx as
|
|
1877
|
+
import { useTheme as useTheme8 } from "@mui/material/styles";
|
|
1878
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1673
1879
|
function Gauge(props) {
|
|
1674
1880
|
var _a;
|
|
1675
|
-
const theme =
|
|
1676
|
-
return /* @__PURE__ */
|
|
1881
|
+
const theme = useTheme8();
|
|
1882
|
+
return /* @__PURE__ */ jsx27(
|
|
1677
1883
|
MuiGauge,
|
|
1678
1884
|
{
|
|
1679
1885
|
...props,
|
|
@@ -1757,10 +1963,10 @@ import { getSeriesToDisplay } from "@mui/x-charts/ChartsLegend";
|
|
|
1757
1963
|
import { getPieCoordinates } from "@mui/x-charts/PieChart";
|
|
1758
1964
|
|
|
1759
1965
|
// src/index.ts
|
|
1760
|
-
import { useMediaQuery } from "@mui/material";
|
|
1966
|
+
import { useMediaQuery as useMediaQuery2 } from "@mui/material";
|
|
1761
1967
|
import { useScrollTrigger } from "@mui/material";
|
|
1762
1968
|
import { useFormControl } from "@mui/material";
|
|
1763
|
-
import { useTheme as
|
|
1969
|
+
import { useTheme as useTheme9 } from "@mui/material";
|
|
1764
1970
|
export {
|
|
1765
1971
|
default47 as Accordion,
|
|
1766
1972
|
default50 as AccordionActions,
|
|
@@ -1772,6 +1978,7 @@ export {
|
|
|
1772
1978
|
AnimatedLine,
|
|
1773
1979
|
default51 as AppBar,
|
|
1774
1980
|
AppBarNavItem,
|
|
1981
|
+
AppShell,
|
|
1775
1982
|
AreaElement,
|
|
1776
1983
|
AreaElementPath,
|
|
1777
1984
|
AreaPlot,
|
|
@@ -1787,7 +1994,7 @@ export {
|
|
|
1787
1994
|
BarPlot,
|
|
1788
1995
|
default73 as BottomNavigation,
|
|
1789
1996
|
default74 as BottomNavigationAction,
|
|
1790
|
-
|
|
1997
|
+
Box5 as Box,
|
|
1791
1998
|
default75 as Breadcrumbs,
|
|
1792
1999
|
Button,
|
|
1793
2000
|
default100 as ButtonBase,
|
|
@@ -1893,6 +2100,7 @@ export {
|
|
|
1893
2100
|
MultiSelect,
|
|
1894
2101
|
default103 as NoSsr,
|
|
1895
2102
|
default19 as OutlinedInput,
|
|
2103
|
+
Page,
|
|
1896
2104
|
default80 as Pagination,
|
|
1897
2105
|
default81 as PaginationItem,
|
|
1898
2106
|
Paper,
|
|
@@ -2007,19 +2215,19 @@ export {
|
|
|
2007
2215
|
useAxisTooltip,
|
|
2008
2216
|
useChartColors,
|
|
2009
2217
|
useChartId,
|
|
2010
|
-
useColorScheme,
|
|
2218
|
+
useColorScheme2 as useColorScheme,
|
|
2011
2219
|
useDrawingArea,
|
|
2012
2220
|
useFormControl,
|
|
2013
2221
|
useGaugeState,
|
|
2014
2222
|
useHighlighted,
|
|
2015
2223
|
useItemHighlighted,
|
|
2016
2224
|
useItemTooltip,
|
|
2017
|
-
useMediaQuery,
|
|
2225
|
+
useMediaQuery2 as useMediaQuery,
|
|
2018
2226
|
useMouseTracker,
|
|
2019
2227
|
useScrollTrigger,
|
|
2020
2228
|
useSidebar,
|
|
2021
2229
|
useSvgRef,
|
|
2022
|
-
|
|
2230
|
+
useTheme9 as useTheme,
|
|
2023
2231
|
useXAxis,
|
|
2024
2232
|
useXColorScale,
|
|
2025
2233
|
useXScale,
|