@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.js
CHANGED
|
@@ -40,6 +40,7 @@ __export(src_exports, {
|
|
|
40
40
|
AnimatedLine: () => import_LineChart7.AnimatedLine,
|
|
41
41
|
AppBar: () => import_AppBar.default,
|
|
42
42
|
AppBarNavItem: () => AppBarNavItem,
|
|
43
|
+
AppShell: () => AppShell,
|
|
43
44
|
AreaElement: () => import_LineChart4.AreaElement,
|
|
44
45
|
AreaElementPath: () => import_LineChart4.AreaElementPath,
|
|
45
46
|
AreaPlot: () => import_LineChart4.AreaPlot,
|
|
@@ -55,7 +56,7 @@ __export(src_exports, {
|
|
|
55
56
|
BarPlot: () => import_BarChart3.BarPlot,
|
|
56
57
|
BottomNavigation: () => import_BottomNavigation.default,
|
|
57
58
|
BottomNavigationAction: () => import_BottomNavigationAction.default,
|
|
58
|
-
Box: () =>
|
|
59
|
+
Box: () => Box5,
|
|
59
60
|
Breadcrumbs: () => import_Breadcrumbs.default,
|
|
60
61
|
Button: () => Button,
|
|
61
62
|
ButtonBase: () => import_ButtonBase.default,
|
|
@@ -161,6 +162,7 @@ __export(src_exports, {
|
|
|
161
162
|
MultiSelect: () => MultiSelect,
|
|
162
163
|
NoSsr: () => import_NoSsr.default,
|
|
163
164
|
OutlinedInput: () => import_OutlinedInput.default,
|
|
165
|
+
Page: () => Page,
|
|
164
166
|
Pagination: () => import_Pagination.default,
|
|
165
167
|
PaginationItem: () => import_PaginationItem.default,
|
|
166
168
|
Paper: () => Paper,
|
|
@@ -275,7 +277,7 @@ __export(src_exports, {
|
|
|
275
277
|
useAxisTooltip: () => import_ChartsTooltip4.useAxisTooltip,
|
|
276
278
|
useChartColors: () => useChartColors,
|
|
277
279
|
useChartId: () => import_hooks2.useChartId,
|
|
278
|
-
useColorScheme: () =>
|
|
280
|
+
useColorScheme: () => import_styles12.useColorScheme,
|
|
279
281
|
useDrawingArea: () => import_hooks.useDrawingArea,
|
|
280
282
|
useFormControl: () => import_material6.useFormControl,
|
|
281
283
|
useGaugeState: () => import_Gauge4.useGaugeState,
|
|
@@ -4262,7 +4264,7 @@ function ForestProvider({
|
|
|
4262
4264
|
}
|
|
4263
4265
|
|
|
4264
4266
|
// src/index.ts
|
|
4265
|
-
var
|
|
4267
|
+
var import_styles12 = require("@mui/material/styles");
|
|
4266
4268
|
var import_material3 = require("@mui/material");
|
|
4267
4269
|
|
|
4268
4270
|
// src/components/Autocomplete/index.tsx
|
|
@@ -5332,9 +5334,215 @@ function SidebarItem({
|
|
|
5332
5334
|
] });
|
|
5333
5335
|
}
|
|
5334
5336
|
|
|
5335
|
-
// src/components/
|
|
5337
|
+
// src/components/AppShell/index.tsx
|
|
5338
|
+
var import_react5 = require("react");
|
|
5336
5339
|
var import_Box2 = __toESM(require("@mui/material/Box"));
|
|
5337
|
-
var
|
|
5340
|
+
var import_Drawer3 = __toESM(require("@mui/material/Drawer"));
|
|
5341
|
+
var import_List2 = __toESM(require("@mui/material/List"));
|
|
5342
|
+
var import_useMediaQuery = __toESM(require("@mui/material/useMediaQuery"));
|
|
5343
|
+
var import_styles4 = require("@mui/material/styles");
|
|
5344
|
+
var import_MenuOutlined = __toESM(require("@mui/icons-material/MenuOutlined"));
|
|
5345
|
+
var import_DarkModeOutlined = __toESM(require("@mui/icons-material/DarkModeOutlined"));
|
|
5346
|
+
var import_LightModeOutlined = __toESM(require("@mui/icons-material/LightModeOutlined"));
|
|
5347
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
5348
|
+
function ColorModeToggle() {
|
|
5349
|
+
const { mode, systemMode, setMode } = (0, import_styles4.useColorScheme)();
|
|
5350
|
+
const resolved = mode === "system" ? systemMode : mode;
|
|
5351
|
+
const isDark = resolved === "dark";
|
|
5352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Tooltip, { title: isDark ? "Switch to light mode" : "Switch to dark mode", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5353
|
+
IconButton2,
|
|
5354
|
+
{
|
|
5355
|
+
size: "small",
|
|
5356
|
+
color: "inherit",
|
|
5357
|
+
"aria-label": "Toggle color mode",
|
|
5358
|
+
onClick: () => setMode(isDark ? "light" : "dark"),
|
|
5359
|
+
children: isDark ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_LightModeOutlined.default, { fontSize: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_DarkModeOutlined.default, { fontSize: "small" })
|
|
5360
|
+
}
|
|
5361
|
+
) });
|
|
5362
|
+
}
|
|
5363
|
+
function ShellBrand({
|
|
5364
|
+
product,
|
|
5365
|
+
logoVariant
|
|
5366
|
+
}) {
|
|
5367
|
+
const { mode, systemMode } = (0, import_styles4.useColorScheme)();
|
|
5368
|
+
const dark = (mode === "system" ? systemMode : mode) === "dark";
|
|
5369
|
+
if (logoVariant === "full") {
|
|
5370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Logo, { product, variant: "logo", color: dark ? "negative" : "positive" });
|
|
5371
|
+
}
|
|
5372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Logo, { product, variant: "logomark", color: dark ? "negative" : "default" });
|
|
5373
|
+
}
|
|
5374
|
+
function AppShell({
|
|
5375
|
+
navItems,
|
|
5376
|
+
nav,
|
|
5377
|
+
product = "studio",
|
|
5378
|
+
logoVariant = "logomark",
|
|
5379
|
+
brand,
|
|
5380
|
+
search,
|
|
5381
|
+
actions,
|
|
5382
|
+
sidebarBehavior = "permanent",
|
|
5383
|
+
defaultSidebarOpen = true,
|
|
5384
|
+
children
|
|
5385
|
+
}) {
|
|
5386
|
+
const theme = (0, import_styles4.useTheme)();
|
|
5387
|
+
const isMobile = (0, import_useMediaQuery.default)(theme.breakpoints.down("sm"));
|
|
5388
|
+
const [sidebarOpen, setSidebarOpen] = (0, import_react5.useState)(defaultSidebarOpen);
|
|
5389
|
+
const [mobileOpen, setMobileOpen] = (0, import_react5.useState)(false);
|
|
5390
|
+
const navContent = nav != null ? nav : navItems && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_List2.default, { children: navItems.map(({ label, icon, active, endAdornment, ...link }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5391
|
+
SidebarItem,
|
|
5392
|
+
{
|
|
5393
|
+
icon,
|
|
5394
|
+
label,
|
|
5395
|
+
selected: active,
|
|
5396
|
+
endAdornment,
|
|
5397
|
+
...link
|
|
5398
|
+
},
|
|
5399
|
+
label
|
|
5400
|
+
)) });
|
|
5401
|
+
const brandEl = brand != null ? brand : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ShellBrand, { product, logoVariant });
|
|
5402
|
+
const wrapLogomark = !brand && logoVariant === "logomark" && !isMobile;
|
|
5403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_Box2.default, { sx: { display: "flex", flexDirection: "column", height: "100vh" }, children: [
|
|
5404
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5405
|
+
import_AppBar.default,
|
|
5406
|
+
{
|
|
5407
|
+
position: "sticky",
|
|
5408
|
+
elevation: 0,
|
|
5409
|
+
sx: { zIndex: theme.zIndex.drawer + 1 },
|
|
5410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_Toolbar.default, { variant: "dense", sx: { px: { xs: "16px", sm: "16px" } }, children: [
|
|
5411
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_Box2.default, { sx: { flex: 1, display: "flex", alignItems: "center", justifyContent: "flex-start", gap: 1 }, children: [
|
|
5412
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5413
|
+
IconButton2,
|
|
5414
|
+
{
|
|
5415
|
+
size: "small",
|
|
5416
|
+
color: "inherit",
|
|
5417
|
+
"aria-label": "Open navigation",
|
|
5418
|
+
onClick: () => setMobileOpen(true),
|
|
5419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_MenuOutlined.default, { fontSize: "small" })
|
|
5420
|
+
}
|
|
5421
|
+
),
|
|
5422
|
+
wrapLogomark ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Box2.default, { sx: { width: 48, ml: "-16px", display: "flex", justifyContent: "center" }, children: brandEl }) : brandEl
|
|
5423
|
+
] }),
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Box2.default, { sx: { flex: 1, display: "flex", justifyContent: "center" }, children: search === true ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Search, { size: "small", placeholder: "Search\u2026", sx: { width: "100%", maxWidth: 480 } }) : search || null }),
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_Box2.default, { sx: { flex: 1, display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 1 }, children: [
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ColorModeToggle, {}),
|
|
5427
|
+
actions
|
|
5428
|
+
] })
|
|
5429
|
+
] })
|
|
5430
|
+
}
|
|
5431
|
+
),
|
|
5432
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_Box2.default, { sx: { display: "flex", flexGrow: 1, overflow: "hidden" }, children: [
|
|
5433
|
+
!isMobile && navContent && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5434
|
+
SidebarNav,
|
|
5435
|
+
{
|
|
5436
|
+
open: sidebarOpen,
|
|
5437
|
+
onOpenChange: setSidebarOpen,
|
|
5438
|
+
behavior: sidebarBehavior,
|
|
5439
|
+
sx: {
|
|
5440
|
+
height: "100%",
|
|
5441
|
+
"& .MuiDrawer-paper": { position: "relative", height: "100%" }
|
|
5442
|
+
},
|
|
5443
|
+
children: navContent
|
|
5444
|
+
}
|
|
5445
|
+
),
|
|
5446
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Box2.default, { component: "main", sx: { flexGrow: 1, overflow: "auto" }, children })
|
|
5447
|
+
] }),
|
|
5448
|
+
isMobile && navContent && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
5449
|
+
import_Drawer3.default,
|
|
5450
|
+
{
|
|
5451
|
+
open: mobileOpen,
|
|
5452
|
+
onClose: () => setMobileOpen(false),
|
|
5453
|
+
onClick: () => setMobileOpen(false),
|
|
5454
|
+
sx: { "& .MuiDrawer-paper": { width: 240 } },
|
|
5455
|
+
children: navContent
|
|
5456
|
+
}
|
|
5457
|
+
)
|
|
5458
|
+
] });
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
// src/components/Page/index.tsx
|
|
5462
|
+
var import_Box3 = __toESM(require("@mui/material/Box"));
|
|
5463
|
+
var import_Breadcrumbs2 = __toESM(require("@mui/material/Breadcrumbs"));
|
|
5464
|
+
var import_Link2 = __toESM(require("@mui/material/Link"));
|
|
5465
|
+
var import_Typography2 = __toESM(require("@mui/material/Typography"));
|
|
5466
|
+
var import_jsx_runtime21 = (
|
|
5467
|
+
// Current page: plain text, not a link.
|
|
5468
|
+
require("react/jsx-runtime")
|
|
5469
|
+
);
|
|
5470
|
+
function Page({
|
|
5471
|
+
title,
|
|
5472
|
+
breadcrumbs,
|
|
5473
|
+
actions,
|
|
5474
|
+
disableGutters = false,
|
|
5475
|
+
maxWidth,
|
|
5476
|
+
sx,
|
|
5477
|
+
children
|
|
5478
|
+
}) {
|
|
5479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5480
|
+
import_Box3.default,
|
|
5481
|
+
{
|
|
5482
|
+
component: "section",
|
|
5483
|
+
sx: [
|
|
5484
|
+
{
|
|
5485
|
+
display: "flex",
|
|
5486
|
+
flexDirection: "column",
|
|
5487
|
+
minHeight: "100%",
|
|
5488
|
+
backgroundColor: "background.paper",
|
|
5489
|
+
...disableGutters ? {} : { p: 3 }
|
|
5490
|
+
},
|
|
5491
|
+
...Array.isArray(sx) ? sx : [sx]
|
|
5492
|
+
],
|
|
5493
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
5494
|
+
import_Box3.default,
|
|
5495
|
+
{
|
|
5496
|
+
sx: {
|
|
5497
|
+
display: "flex",
|
|
5498
|
+
flexDirection: "column",
|
|
5499
|
+
flexGrow: 1,
|
|
5500
|
+
width: "100%",
|
|
5501
|
+
...maxWidth ? { maxWidth, mx: "auto" } : {}
|
|
5502
|
+
},
|
|
5503
|
+
children: [
|
|
5504
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_Breadcrumbs2.default, { "aria-label": "breadcrumb", sx: { mb: 1 }, children: breadcrumbs.map(
|
|
5505
|
+
(crumb, i) => i === breadcrumbs.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_Typography2.default, { variant: "body2", color: "text.primary", children: crumb.label }, crumb.label) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
5506
|
+
import_Link2.default,
|
|
5507
|
+
{
|
|
5508
|
+
variant: "body2",
|
|
5509
|
+
underline: "hover",
|
|
5510
|
+
color: "text.secondary",
|
|
5511
|
+
...crumb.component ? { component: crumb.component } : {},
|
|
5512
|
+
...crumb.href ? { href: crumb.href } : {},
|
|
5513
|
+
...crumb.onClick ? { onClick: crumb.onClick } : {},
|
|
5514
|
+
children: crumb.label
|
|
5515
|
+
},
|
|
5516
|
+
crumb.label
|
|
5517
|
+
)
|
|
5518
|
+
) }),
|
|
5519
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
5520
|
+
import_Box3.default,
|
|
5521
|
+
{
|
|
5522
|
+
sx: {
|
|
5523
|
+
display: "flex",
|
|
5524
|
+
alignItems: "center",
|
|
5525
|
+
justifyContent: "space-between",
|
|
5526
|
+
gap: 2,
|
|
5527
|
+
mb: 3
|
|
5528
|
+
},
|
|
5529
|
+
children: [
|
|
5530
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_Typography2.default, { variant: "h5", children: title }),
|
|
5531
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_Box3.default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: actions })
|
|
5532
|
+
]
|
|
5533
|
+
}
|
|
5534
|
+
),
|
|
5535
|
+
children
|
|
5536
|
+
]
|
|
5537
|
+
}
|
|
5538
|
+
)
|
|
5539
|
+
}
|
|
5540
|
+
);
|
|
5541
|
+
}
|
|
5542
|
+
|
|
5543
|
+
// src/components/Box/index.tsx
|
|
5544
|
+
var import_Box4 = __toESM(require("@mui/material/Box"));
|
|
5545
|
+
var Box5 = import_Box4.default;
|
|
5338
5546
|
|
|
5339
5547
|
// src/components/Stack/index.tsx
|
|
5340
5548
|
var import_Stack = __toESM(require("@mui/material/Stack"));
|
|
@@ -5393,12 +5601,12 @@ var import_TextareaAutosize = __toESM(require("@mui/material/TextareaAutosize"))
|
|
|
5393
5601
|
|
|
5394
5602
|
// src/components/Charts/LineChart.tsx
|
|
5395
5603
|
var import_LineChart = require("@mui/x-charts/LineChart");
|
|
5396
|
-
var
|
|
5604
|
+
var import_styles7 = require("@mui/material/styles");
|
|
5397
5605
|
|
|
5398
5606
|
// src/components/Charts/useChartColors.ts
|
|
5399
|
-
var
|
|
5607
|
+
var import_styles5 = require("@mui/material/styles");
|
|
5400
5608
|
function useChartColors(count) {
|
|
5401
|
-
const theme = (0,
|
|
5609
|
+
const theme = (0, import_styles5.useTheme)();
|
|
5402
5610
|
const chart = theme.palette.chart;
|
|
5403
5611
|
const colors2 = chart.series.map((s) => s.fg);
|
|
5404
5612
|
return colors2.slice(0, Math.min(count, colors2.length));
|
|
@@ -5406,8 +5614,8 @@ function useChartColors(count) {
|
|
|
5406
5614
|
|
|
5407
5615
|
// src/components/Charts/CustomTooltip.tsx
|
|
5408
5616
|
var import_material2 = require("@mui/material");
|
|
5409
|
-
var
|
|
5410
|
-
var
|
|
5617
|
+
var import_styles6 = require("@mui/material/styles");
|
|
5618
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
5411
5619
|
function formatDate(date) {
|
|
5412
5620
|
if (!date) return "";
|
|
5413
5621
|
const d = new Date(date);
|
|
@@ -5428,11 +5636,11 @@ function renderValue(val) {
|
|
|
5428
5636
|
}
|
|
5429
5637
|
function CustomTooltip(props) {
|
|
5430
5638
|
const { series, axisValue, dataIndex } = props;
|
|
5431
|
-
const theme = (0,
|
|
5639
|
+
const theme = (0, import_styles6.useTheme)();
|
|
5432
5640
|
if (dataIndex == null) {
|
|
5433
5641
|
return null;
|
|
5434
5642
|
}
|
|
5435
|
-
return /* @__PURE__ */ (0,
|
|
5643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5436
5644
|
import_material2.Box,
|
|
5437
5645
|
{
|
|
5438
5646
|
sx: {
|
|
@@ -5448,7 +5656,7 @@ function CustomTooltip(props) {
|
|
|
5448
5656
|
border: `1px solid ${theme.palette.divider}`
|
|
5449
5657
|
},
|
|
5450
5658
|
children: [
|
|
5451
|
-
/* @__PURE__ */ (0,
|
|
5659
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5452
5660
|
import_material2.Typography,
|
|
5453
5661
|
{
|
|
5454
5662
|
variant: "body2",
|
|
@@ -5465,8 +5673,8 @@ function CustomTooltip(props) {
|
|
|
5465
5673
|
const color = typeof s.getColor === "function" ? s.getColor(dataIndex) : s.color;
|
|
5466
5674
|
const value = s.data ? s.data[dataIndex] : null;
|
|
5467
5675
|
if (value == null) return null;
|
|
5468
|
-
return /* @__PURE__ */ (0,
|
|
5469
|
-
/* @__PURE__ */ (0,
|
|
5676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_material2.Box, { sx: { display: "flex", flexDirection: "column", gap: "6px" }, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_material2.Box, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
|
|
5677
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5470
5678
|
import_material2.Box,
|
|
5471
5679
|
{
|
|
5472
5680
|
sx: {
|
|
@@ -5478,7 +5686,7 @@ function CustomTooltip(props) {
|
|
|
5478
5686
|
}
|
|
5479
5687
|
}
|
|
5480
5688
|
),
|
|
5481
|
-
/* @__PURE__ */ (0,
|
|
5689
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
5482
5690
|
import_material2.Typography,
|
|
5483
5691
|
{
|
|
5484
5692
|
variant: "body2",
|
|
@@ -5489,7 +5697,7 @@ function CustomTooltip(props) {
|
|
|
5489
5697
|
gap: "6px"
|
|
5490
5698
|
},
|
|
5491
5699
|
children: [
|
|
5492
|
-
/* @__PURE__ */ (0,
|
|
5700
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
5493
5701
|
import_material2.Box,
|
|
5494
5702
|
{
|
|
5495
5703
|
component: "span",
|
|
@@ -5517,10 +5725,10 @@ function CustomTooltip(props) {
|
|
|
5517
5725
|
}
|
|
5518
5726
|
|
|
5519
5727
|
// src/components/Charts/LineChart.tsx
|
|
5520
|
-
var
|
|
5728
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
5521
5729
|
function LineChart({ series, colors: colors2, ...props }) {
|
|
5522
5730
|
var _a, _b;
|
|
5523
|
-
const theme = (0,
|
|
5731
|
+
const theme = (0, import_styles7.useTheme)();
|
|
5524
5732
|
const chart = theme.palette.chart;
|
|
5525
5733
|
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
5526
5734
|
const modifiedSeries = series == null ? void 0 : series.map((s) => {
|
|
@@ -5531,7 +5739,7 @@ function LineChart({ series, colors: colors2, ...props }) {
|
|
|
5531
5739
|
highlightScope: (_b2 = s.highlightScope) != null ? _b2 : { highlighted: "item", faded: "global" }
|
|
5532
5740
|
};
|
|
5533
5741
|
});
|
|
5534
|
-
return /* @__PURE__ */ (0,
|
|
5742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
5535
5743
|
import_LineChart.LineChart,
|
|
5536
5744
|
{
|
|
5537
5745
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -5602,11 +5810,11 @@ function LineChart({ series, colors: colors2, ...props }) {
|
|
|
5602
5810
|
|
|
5603
5811
|
// src/components/Charts/BarChart.tsx
|
|
5604
5812
|
var import_BarChart = require("@mui/x-charts/BarChart");
|
|
5605
|
-
var
|
|
5606
|
-
var
|
|
5813
|
+
var import_styles8 = require("@mui/material/styles");
|
|
5814
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
5607
5815
|
function BarChart({ series, colors: colors2, ...props }) {
|
|
5608
5816
|
var _a, _b;
|
|
5609
|
-
const theme = (0,
|
|
5817
|
+
const theme = (0, import_styles8.useTheme)();
|
|
5610
5818
|
const chart = theme.palette.chart;
|
|
5611
5819
|
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
5612
5820
|
const resolvedColors = colors2 != null ? colors2 : seriesColors;
|
|
@@ -5621,7 +5829,7 @@ function BarChart({ series, colors: colors2, ...props }) {
|
|
|
5621
5829
|
highlightScope: (_a2 = s.highlightScope) != null ? _a2 : { highlighted: "item", faded: "global" }
|
|
5622
5830
|
};
|
|
5623
5831
|
});
|
|
5624
|
-
return /* @__PURE__ */ (0,
|
|
5832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5625
5833
|
import_BarChart.BarChart,
|
|
5626
5834
|
{
|
|
5627
5835
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -5681,10 +5889,10 @@ function BarChart({ series, colors: colors2, ...props }) {
|
|
|
5681
5889
|
...(_b = props.sx) != null ? _b : {}
|
|
5682
5890
|
},
|
|
5683
5891
|
...props,
|
|
5684
|
-
children: /* @__PURE__ */ (0,
|
|
5892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("defs", { children: series == null ? void 0 : series.map((s, idx) => {
|
|
5685
5893
|
if (s.variant !== "striped") return null;
|
|
5686
5894
|
const baseColor = s.color || resolvedColors[idx % resolvedColors.length];
|
|
5687
|
-
return /* @__PURE__ */ (0,
|
|
5895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
5688
5896
|
"pattern",
|
|
5689
5897
|
{
|
|
5690
5898
|
id: `striped-pattern-${idx}`,
|
|
@@ -5693,8 +5901,8 @@ function BarChart({ series, colors: colors2, ...props }) {
|
|
|
5693
5901
|
height: "8",
|
|
5694
5902
|
patternTransform: "rotate(45)",
|
|
5695
5903
|
children: [
|
|
5696
|
-
/* @__PURE__ */ (0,
|
|
5697
|
-
/* @__PURE__ */ (0,
|
|
5904
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { width: "8", height: "8", fill: theme.palette.background.paper }),
|
|
5905
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "0", y: "0", x2: "0", y2: "8", stroke: baseColor, strokeWidth: "4" })
|
|
5698
5906
|
]
|
|
5699
5907
|
},
|
|
5700
5908
|
`striped-${idx}`
|
|
@@ -5706,11 +5914,11 @@ function BarChart({ series, colors: colors2, ...props }) {
|
|
|
5706
5914
|
|
|
5707
5915
|
// src/components/Charts/PieChart.tsx
|
|
5708
5916
|
var import_PieChart = require("@mui/x-charts/PieChart");
|
|
5709
|
-
var
|
|
5710
|
-
var
|
|
5917
|
+
var import_styles9 = require("@mui/material/styles");
|
|
5918
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5711
5919
|
function PieChart({ series, colors: colors2, ...props }) {
|
|
5712
5920
|
var _a, _b, _c, _d;
|
|
5713
|
-
const theme = (0,
|
|
5921
|
+
const theme = (0, import_styles9.useTheme)();
|
|
5714
5922
|
const chart = theme.palette.chart;
|
|
5715
5923
|
const sliceCount = (_c = (_b = (_a = series == null ? void 0 : series[0]) == null ? void 0 : _a.data) == null ? void 0 : _b.length) != null ? _c : 0;
|
|
5716
5924
|
const seriesColors = useChartColors(sliceCount);
|
|
@@ -5721,7 +5929,7 @@ function PieChart({ series, colors: colors2, ...props }) {
|
|
|
5721
5929
|
highlightScope: (_a2 = s.highlightScope) != null ? _a2 : { highlighted: "item", faded: "global" }
|
|
5722
5930
|
};
|
|
5723
5931
|
});
|
|
5724
|
-
return /* @__PURE__ */ (0,
|
|
5932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5725
5933
|
import_PieChart.PieChart,
|
|
5726
5934
|
{
|
|
5727
5935
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -5764,7 +5972,7 @@ function PieChart({ series, colors: colors2, ...props }) {
|
|
|
5764
5972
|
|
|
5765
5973
|
// src/components/Charts/ScatterChart.tsx
|
|
5766
5974
|
var import_ScatterChart = require("@mui/x-charts/ScatterChart");
|
|
5767
|
-
var
|
|
5975
|
+
var import_styles10 = require("@mui/material/styles");
|
|
5768
5976
|
|
|
5769
5977
|
// src/components/Charts/chartSx.ts
|
|
5770
5978
|
function getForestChartSx(theme) {
|
|
@@ -5820,10 +6028,10 @@ var forestLegendSlotProps = {
|
|
|
5820
6028
|
};
|
|
5821
6029
|
|
|
5822
6030
|
// src/components/Charts/ScatterChart.tsx
|
|
5823
|
-
var
|
|
6031
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
5824
6032
|
function ScatterChart({ series, colors: colors2, ...props }) {
|
|
5825
6033
|
var _a, _b;
|
|
5826
|
-
const theme = (0,
|
|
6034
|
+
const theme = (0, import_styles10.useTheme)();
|
|
5827
6035
|
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
5828
6036
|
const modifiedSeries = series == null ? void 0 : series.map((s) => {
|
|
5829
6037
|
var _a2;
|
|
@@ -5832,7 +6040,7 @@ function ScatterChart({ series, colors: colors2, ...props }) {
|
|
|
5832
6040
|
highlightScope: (_a2 = s.highlightScope) != null ? _a2 : { highlighted: "item", faded: "global" }
|
|
5833
6041
|
};
|
|
5834
6042
|
});
|
|
5835
|
-
return /* @__PURE__ */ (0,
|
|
6043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5836
6044
|
import_ScatterChart.ScatterChart,
|
|
5837
6045
|
{
|
|
5838
6046
|
series: modifiedSeries != null ? modifiedSeries : [],
|
|
@@ -5850,12 +6058,12 @@ function ScatterChart({ series, colors: colors2, ...props }) {
|
|
|
5850
6058
|
|
|
5851
6059
|
// src/components/Charts/Gauge.tsx
|
|
5852
6060
|
var import_Gauge = require("@mui/x-charts/Gauge");
|
|
5853
|
-
var
|
|
5854
|
-
var
|
|
6061
|
+
var import_styles11 = require("@mui/material/styles");
|
|
6062
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
5855
6063
|
function Gauge(props) {
|
|
5856
6064
|
var _a;
|
|
5857
|
-
const theme = (0,
|
|
5858
|
-
return /* @__PURE__ */ (0,
|
|
6065
|
+
const theme = (0, import_styles11.useTheme)();
|
|
6066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5859
6067
|
import_Gauge.Gauge,
|
|
5860
6068
|
{
|
|
5861
6069
|
...props,
|
|
@@ -5945,6 +6153,7 @@ var import_material7 = require("@mui/material");
|
|
|
5945
6153
|
AnimatedLine,
|
|
5946
6154
|
AppBar,
|
|
5947
6155
|
AppBarNavItem,
|
|
6156
|
+
AppShell,
|
|
5948
6157
|
AreaElement,
|
|
5949
6158
|
AreaElementPath,
|
|
5950
6159
|
AreaPlot,
|
|
@@ -6066,6 +6275,7 @@ var import_material7 = require("@mui/material");
|
|
|
6066
6275
|
MultiSelect,
|
|
6067
6276
|
NoSsr,
|
|
6068
6277
|
OutlinedInput,
|
|
6278
|
+
Page,
|
|
6069
6279
|
Pagination,
|
|
6070
6280
|
PaginationItem,
|
|
6071
6281
|
Paper,
|