@matteoaliano/forest-ui 0.2.10 → 0.2.11
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 +18 -34
- package/dist/{chunk-7B6NCKX3.mjs → chunk-6W3RIXXY.mjs} +106 -148
- package/dist/chunk-6W3RIXXY.mjs.map +1 -0
- package/dist/{index-DiI9xbOM.d.mts → index-DJDmMb_c.d.mts} +98 -3
- package/dist/{index-DiI9xbOM.d.ts → index-DJDmMb_c.d.ts} +98 -3
- package/dist/index.d.mts +61 -14
- package/dist/index.d.ts +61 -14
- package/dist/index.js +299 -205
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +166 -58
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +104 -146
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/guidelines/FOREST_BE_GUIDELINES.md +90 -0
- package/guidelines/FOREST_FE_GUIDELINES.md +543 -0
- package/guidelines/FOREST_UI_GUIDELINES.md +372 -0
- package/package.json +9 -4
- package/dist/chunk-7B6NCKX3.mjs.map +0 -1
- package/guidelines/FOREST_AI_GUIDELINES.md +0 -344
- package/guidelines/FOREST_DEV_GUIDELINES.md +0 -47
- package/guidelines/themes/FOREST_THEME_ALKEMY_PLUS.md +0 -139
- package/guidelines/themes/FOREST_THEME_DEFAULT.md +0 -70
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bg, navColors, text, forestTheme, getPreset, buildTheme } from './chunk-
|
|
2
|
-
export { alkemyPlusPreset, alpha, avatarColors, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, colors, container, display, fg, focusRings, fontFamily, fontSize, fontWeight, forestPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, iconColors, lineHeight, navColors, radius, registerPreset, sliderColors, spacing, text, toggleColors, shadows as tokenShadows, widths } from './chunk-
|
|
3
|
-
import { createContext, useMemo, useContext } from 'react';
|
|
1
|
+
import { bg, navColors, text, forestTheme, getPreset, buildTheme, lineHeight, fontSize } from './chunk-6W3RIXXY.mjs';
|
|
2
|
+
export { alkemyPlusPreset, alpha, avatarColors, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, colors, container, display, fg, focusRings, fontFamily, fontSize, fontWeight, forestPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, iconColors, lineHeight, navColors, radius, registerPreset, sliderColors, spacing, text, toggleColors, shadows as tokenShadows, widths } from './chunk-6W3RIXXY.mjs';
|
|
3
|
+
import React2, { createContext, useMemo, useState, useCallback, useContext } from 'react';
|
|
4
4
|
import { ThemeProvider, useTheme } from '@mui/material/styles';
|
|
5
5
|
import CssBaseline from '@mui/material/CssBaseline';
|
|
6
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -18,11 +18,16 @@ import MuiFormControl from '@mui/material/FormControl';
|
|
|
18
18
|
import MuiInputLabel from '@mui/material/InputLabel';
|
|
19
19
|
import MuiSwitch from '@mui/material/Switch';
|
|
20
20
|
import MuiTextField from '@mui/material/TextField';
|
|
21
|
+
import InputAdornment from '@mui/material/InputAdornment';
|
|
22
|
+
import IconButton from '@mui/material/IconButton';
|
|
23
|
+
import { createSvgIcon } from '@mui/material/utils';
|
|
21
24
|
import MuiToggleButton from '@mui/material/ToggleButton';
|
|
22
25
|
import MuiToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
26
|
+
import { DatePicker as DatePicker$1 } from '@mui/x-date-pickers/DatePicker';
|
|
27
|
+
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
|
|
28
|
+
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
23
29
|
import MuiBadge from '@mui/material/Badge';
|
|
24
30
|
import MuiChip from '@mui/material/Chip';
|
|
25
|
-
import { createSvgIcon } from '@mui/material/utils';
|
|
26
31
|
import MuiDivider from '@mui/material/Divider';
|
|
27
32
|
import MuiList from '@mui/material/List';
|
|
28
33
|
import MuiListItem from '@mui/material/ListItem';
|
|
@@ -62,10 +67,21 @@ import MuiDialogContentText from '@mui/material/DialogContentText';
|
|
|
62
67
|
import MuiLinearProgress from '@mui/material/LinearProgress';
|
|
63
68
|
import MuiCircularProgress from '@mui/material/CircularProgress';
|
|
64
69
|
import MuiSkeleton from '@mui/material/Skeleton';
|
|
70
|
+
import MuiModal from '@mui/material/Modal';
|
|
71
|
+
import MuiPopover from '@mui/material/Popover';
|
|
65
72
|
import MuiSnackbar from '@mui/material/Snackbar';
|
|
73
|
+
import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
|
|
74
|
+
import MuiLink from '@mui/material/Link';
|
|
75
|
+
import MuiMenu from '@mui/material/Menu';
|
|
76
|
+
import MuiMenuList from '@mui/material/MenuList';
|
|
77
|
+
import MuiPagination from '@mui/material/Pagination';
|
|
78
|
+
import MuiStepper from '@mui/material/Stepper';
|
|
79
|
+
import MuiStep from '@mui/material/Step';
|
|
80
|
+
import MuiStepLabel from '@mui/material/StepLabel';
|
|
81
|
+
import MuiTabs from '@mui/material/Tabs';
|
|
82
|
+
import MuiTab from '@mui/material/Tab';
|
|
66
83
|
import MuiDrawer from '@mui/material/Drawer';
|
|
67
84
|
import Box from '@mui/material/Box';
|
|
68
|
-
import IconButton from '@mui/material/IconButton';
|
|
69
85
|
import { LineChart as LineChart$1 } from '@mui/x-charts/LineChart';
|
|
70
86
|
import { Box as Box$1, Typography as Typography$1 } from '@mui/material';
|
|
71
87
|
import { BarChart as BarChart$1 } from '@mui/x-charts/BarChart';
|
|
@@ -143,8 +159,7 @@ function MultiSelect({
|
|
|
143
159
|
const arr = typeof selected === "string" ? selected.split(",") : selected;
|
|
144
160
|
onChange(arr);
|
|
145
161
|
};
|
|
146
|
-
const handleSelectAll = (
|
|
147
|
-
e.stopPropagation();
|
|
162
|
+
const handleSelectAll = () => {
|
|
148
163
|
onChange(allSelected ? [] : options.map((o) => o.value));
|
|
149
164
|
};
|
|
150
165
|
const labelMap = new Map(options.map((o) => [o.value, o.label]));
|
|
@@ -169,12 +184,14 @@ function MultiSelect({
|
|
|
169
184
|
...rest,
|
|
170
185
|
children: [
|
|
171
186
|
selectAll && /* @__PURE__ */ jsx(
|
|
172
|
-
|
|
187
|
+
"li",
|
|
173
188
|
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
189
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
190
|
+
onClick: (e) => {
|
|
191
|
+
e.stopPropagation();
|
|
192
|
+
handleSelectAll();
|
|
193
|
+
},
|
|
194
|
+
children: /* @__PURE__ */ jsx(MuiButton, { size: "small", variant: "text", children: allSelected ? "Deselect All" : selectAllLabel })
|
|
178
195
|
}
|
|
179
196
|
),
|
|
180
197
|
options.map((option) => /* @__PURE__ */ jsxs(MuiMenuItem, { value: option.value, children: [
|
|
@@ -192,12 +209,72 @@ function Switch(props) {
|
|
|
192
209
|
function TextField(props) {
|
|
193
210
|
return /* @__PURE__ */ jsx(MuiTextField, { ...props });
|
|
194
211
|
}
|
|
212
|
+
var Search_default = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
213
|
+
d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
|
|
214
|
+
}), "Search");
|
|
215
|
+
var Clear_default = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
216
|
+
d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
217
|
+
}), "Clear");
|
|
218
|
+
function Search({
|
|
219
|
+
value: controlledValue,
|
|
220
|
+
onChange,
|
|
221
|
+
onClear,
|
|
222
|
+
placeholder = "Search\u2026",
|
|
223
|
+
slotProps,
|
|
224
|
+
...props
|
|
225
|
+
}) {
|
|
226
|
+
const [internalValue, setInternalValue] = useState("");
|
|
227
|
+
const isControlled = controlledValue !== void 0;
|
|
228
|
+
const currentValue = isControlled ? controlledValue : internalValue;
|
|
229
|
+
const handleChange = useCallback(
|
|
230
|
+
(e) => {
|
|
231
|
+
if (!isControlled) setInternalValue(e.target.value);
|
|
232
|
+
onChange == null ? void 0 : onChange(e);
|
|
233
|
+
},
|
|
234
|
+
[isControlled, onChange]
|
|
235
|
+
);
|
|
236
|
+
const handleClear = useCallback(() => {
|
|
237
|
+
if (!isControlled) setInternalValue("");
|
|
238
|
+
onClear == null ? void 0 : onClear();
|
|
239
|
+
}, [isControlled, onClear]);
|
|
240
|
+
return /* @__PURE__ */ jsx(
|
|
241
|
+
MuiTextField,
|
|
242
|
+
{
|
|
243
|
+
variant: "outlined",
|
|
244
|
+
placeholder,
|
|
245
|
+
value: currentValue,
|
|
246
|
+
onChange: handleChange,
|
|
247
|
+
slotProps: {
|
|
248
|
+
...slotProps,
|
|
249
|
+
input: {
|
|
250
|
+
sx: { pl: "12px", gap: 0 },
|
|
251
|
+
startAdornment: /* @__PURE__ */ jsx(InputAdornment, { position: "start", sx: { mr: 0 }, children: /* @__PURE__ */ jsx(Search_default, { sx: { fontSize: 20 } }) }),
|
|
252
|
+
endAdornment: currentValue ? /* @__PURE__ */ jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsx(
|
|
253
|
+
IconButton,
|
|
254
|
+
{
|
|
255
|
+
"aria-label": "clear search",
|
|
256
|
+
onClick: handleClear,
|
|
257
|
+
edge: "end",
|
|
258
|
+
size: "small",
|
|
259
|
+
children: /* @__PURE__ */ jsx(Clear_default, { fontSize: "small" })
|
|
260
|
+
}
|
|
261
|
+
) }) : null,
|
|
262
|
+
...typeof (slotProps == null ? void 0 : slotProps.input) === "object" ? slotProps.input : {}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
...props
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
}
|
|
195
269
|
function ToggleButton(props) {
|
|
196
270
|
return /* @__PURE__ */ jsx(MuiToggleButton, { ...props });
|
|
197
271
|
}
|
|
198
272
|
function ToggleButtonGroup(props) {
|
|
199
273
|
return /* @__PURE__ */ jsx(MuiToggleButtonGroup, { ...props });
|
|
200
274
|
}
|
|
275
|
+
function DatePicker(props) {
|
|
276
|
+
return /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsx(DatePicker$1, { ...props }) });
|
|
277
|
+
}
|
|
201
278
|
function Badge(props) {
|
|
202
279
|
return /* @__PURE__ */ jsx(MuiBadge, { ...props });
|
|
203
280
|
}
|
|
@@ -300,9 +377,9 @@ function CardMedia(props) {
|
|
|
300
377
|
function Paper(props) {
|
|
301
378
|
return /* @__PURE__ */ jsx(MuiPaper, { ...props });
|
|
302
379
|
}
|
|
303
|
-
|
|
304
|
-
return /* @__PURE__ */ jsx(MuiAlert, { ...props });
|
|
305
|
-
}
|
|
380
|
+
var Alert = React2.forwardRef(function Alert2(props, ref) {
|
|
381
|
+
return /* @__PURE__ */ jsx(MuiAlert, { ref, ...props });
|
|
382
|
+
});
|
|
306
383
|
function AlertTitle(props) {
|
|
307
384
|
return /* @__PURE__ */ jsx(MuiAlertTitle, { ...props });
|
|
308
385
|
}
|
|
@@ -333,9 +410,45 @@ function CircularProgress(props) {
|
|
|
333
410
|
function Skeleton(props) {
|
|
334
411
|
return /* @__PURE__ */ jsx(MuiSkeleton, { ...props });
|
|
335
412
|
}
|
|
413
|
+
function Modal(props) {
|
|
414
|
+
return /* @__PURE__ */ jsx(MuiModal, { ...props });
|
|
415
|
+
}
|
|
416
|
+
function Popover(props) {
|
|
417
|
+
return /* @__PURE__ */ jsx(MuiPopover, { ...props });
|
|
418
|
+
}
|
|
336
419
|
function Snackbar(props) {
|
|
337
420
|
return /* @__PURE__ */ jsx(MuiSnackbar, { ...props });
|
|
338
421
|
}
|
|
422
|
+
function Breadcrumbs(props) {
|
|
423
|
+
return /* @__PURE__ */ jsx(MuiBreadcrumbs, { ...props });
|
|
424
|
+
}
|
|
425
|
+
function Link(props) {
|
|
426
|
+
return /* @__PURE__ */ jsx(MuiLink, { ...props });
|
|
427
|
+
}
|
|
428
|
+
function Menu(props) {
|
|
429
|
+
return /* @__PURE__ */ jsx(MuiMenu, { ...props });
|
|
430
|
+
}
|
|
431
|
+
function MenuList(props) {
|
|
432
|
+
return /* @__PURE__ */ jsx(MuiMenuList, { ...props });
|
|
433
|
+
}
|
|
434
|
+
function Pagination(props) {
|
|
435
|
+
return /* @__PURE__ */ jsx(MuiPagination, { ...props });
|
|
436
|
+
}
|
|
437
|
+
function Stepper(props) {
|
|
438
|
+
return /* @__PURE__ */ jsx(MuiStepper, { ...props });
|
|
439
|
+
}
|
|
440
|
+
function Step(props) {
|
|
441
|
+
return /* @__PURE__ */ jsx(MuiStep, { ...props });
|
|
442
|
+
}
|
|
443
|
+
function StepLabel(props) {
|
|
444
|
+
return /* @__PURE__ */ jsx(MuiStepLabel, { ...props });
|
|
445
|
+
}
|
|
446
|
+
function Tabs(props) {
|
|
447
|
+
return /* @__PURE__ */ jsx(MuiTabs, { ...props });
|
|
448
|
+
}
|
|
449
|
+
function Tab(props) {
|
|
450
|
+
return /* @__PURE__ */ jsx(MuiTab, { ...props });
|
|
451
|
+
}
|
|
339
452
|
var ChevronLeftOutlined_default = createSvgIcon(/* @__PURE__ */ jsx("path", {
|
|
340
453
|
d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
341
454
|
}), "ChevronLeftOutlined");
|
|
@@ -495,16 +608,10 @@ function SidebarItem({
|
|
|
495
608
|
endAdornment
|
|
496
609
|
] });
|
|
497
610
|
}
|
|
498
|
-
function useChartColors(count
|
|
611
|
+
function useChartColors(count) {
|
|
499
612
|
const theme = useTheme();
|
|
500
613
|
const chart = theme.palette.chart;
|
|
501
|
-
const colors2 = chart
|
|
502
|
-
"#7B61FF",
|
|
503
|
-
"#FF7E67",
|
|
504
|
-
"#76DFD5",
|
|
505
|
-
"#F6C343",
|
|
506
|
-
"#B36A6F"
|
|
507
|
-
];
|
|
614
|
+
const colors2 = chart.series.map((s) => s.fg);
|
|
508
615
|
return colors2.slice(0, Math.min(count, colors2.length));
|
|
509
616
|
}
|
|
510
617
|
function formatDate(date) {
|
|
@@ -547,8 +654,7 @@ function CustomTooltip(props) {
|
|
|
547
654
|
borderTop: `1px solid ${theme.palette.divider}`,
|
|
548
655
|
borderRight: `1px solid ${theme.palette.divider}`,
|
|
549
656
|
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
550
|
-
borderLeft: `4px solid ${theme.palette.chart.
|
|
551
|
-
// Primary Accent line
|
|
657
|
+
borderLeft: `4px solid ${theme.palette.chart.series[0].fg}`
|
|
552
658
|
},
|
|
553
659
|
children: [
|
|
554
660
|
/* @__PURE__ */ jsx(
|
|
@@ -617,16 +723,16 @@ function CustomTooltip(props) {
|
|
|
617
723
|
}
|
|
618
724
|
);
|
|
619
725
|
}
|
|
620
|
-
function LineChart({ series, colors: colors2,
|
|
726
|
+
function LineChart({ series, colors: colors2, ...props }) {
|
|
621
727
|
var _a, _b;
|
|
622
728
|
const theme = useTheme();
|
|
623
729
|
const chart = theme.palette.chart;
|
|
624
|
-
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0
|
|
730
|
+
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
625
731
|
const modifiedSeries = series == null ? void 0 : series.map((s) => {
|
|
626
732
|
var _a2, _b2;
|
|
627
733
|
return {
|
|
628
734
|
...s,
|
|
629
|
-
curve: (_a2 = s.curve) != null ? _a2 : "
|
|
735
|
+
curve: (_a2 = s.curve) != null ? _a2 : "linear",
|
|
630
736
|
highlightScope: (_b2 = s.highlightScope) != null ? _b2 : { highlighted: "item", faded: "global" }
|
|
631
737
|
};
|
|
632
738
|
});
|
|
@@ -647,17 +753,18 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
|
|
|
647
753
|
}
|
|
648
754
|
},
|
|
649
755
|
sx: {
|
|
650
|
-
"& .MuiChartsAxis-line": { stroke: chart.axisFg },
|
|
651
|
-
"& .MuiChartsAxis-tick": { stroke: chart.axisFg },
|
|
756
|
+
"& .MuiChartsAxis-line": { stroke: `${chart.axisFg} !important` },
|
|
757
|
+
"& .MuiChartsAxis-tick": { stroke: `${chart.axisFg} !important` },
|
|
652
758
|
"& .MuiChartsAxis-tickLabel": {
|
|
653
|
-
fill: chart.labelFg
|
|
654
|
-
fontFamily: theme.typography.fontFamily
|
|
655
|
-
fontSize:
|
|
759
|
+
fill: `${chart.labelFg} !important`,
|
|
760
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
761
|
+
fontSize: `${fontSize.xxs}px !important`,
|
|
762
|
+
lineHeight: lineHeight.xxs
|
|
656
763
|
},
|
|
657
764
|
"& .MuiChartsAxis-label": {
|
|
658
|
-
fill: chart.labelFgEmphasis
|
|
659
|
-
fontFamily: theme.typography.fontFamily
|
|
660
|
-
fontSize: typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14
|
|
765
|
+
fill: `${chart.labelFgEmphasis} !important`,
|
|
766
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
767
|
+
fontSize: `${typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14}px !important`,
|
|
661
768
|
fontWeight: theme.typography.fontWeightMedium
|
|
662
769
|
},
|
|
663
770
|
"& .MuiChartsGrid-line": {
|
|
@@ -665,8 +772,8 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
|
|
|
665
772
|
strokeDasharray: "4 4"
|
|
666
773
|
},
|
|
667
774
|
"& .MuiChartsLegend-series text": {
|
|
668
|
-
fill: chart.legendFg
|
|
669
|
-
fontFamily: theme.typography.fontFamily
|
|
775
|
+
fill: `${chart.legendFg} !important`,
|
|
776
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
670
777
|
fontSize: "14px !important"
|
|
671
778
|
},
|
|
672
779
|
"& .MuiChartsLegend-mark": {
|
|
@@ -687,7 +794,9 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
|
|
|
687
794
|
},
|
|
688
795
|
"& .MuiLineElement-root": {
|
|
689
796
|
strokeWidth: 3
|
|
690
|
-
|
|
797
|
+
},
|
|
798
|
+
"& .MuiMarkElement-root": {
|
|
799
|
+
display: "none"
|
|
691
800
|
},
|
|
692
801
|
...(_b = props.sx) != null ? _b : {}
|
|
693
802
|
},
|
|
@@ -695,11 +804,11 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
|
|
|
695
804
|
}
|
|
696
805
|
);
|
|
697
806
|
}
|
|
698
|
-
function BarChart({ series, colors: colors2,
|
|
807
|
+
function BarChart({ series, colors: colors2, ...props }) {
|
|
699
808
|
var _a, _b;
|
|
700
809
|
const theme = useTheme();
|
|
701
810
|
const chart = theme.palette.chart;
|
|
702
|
-
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0
|
|
811
|
+
const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
|
|
703
812
|
const resolvedColors = colors2 != null ? colors2 : seriesColors;
|
|
704
813
|
const modifiedSeries = series == null ? void 0 : series.map((s, idx) => {
|
|
705
814
|
var _a2;
|
|
@@ -730,18 +839,18 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
|
|
|
730
839
|
}
|
|
731
840
|
},
|
|
732
841
|
sx: {
|
|
733
|
-
"& .MuiChartsAxis-line": { stroke: chart.axisFg },
|
|
734
|
-
"& .MuiChartsAxis-tick": { stroke: chart.axisFg },
|
|
842
|
+
"& .MuiChartsAxis-line": { stroke: `${chart.axisFg} !important` },
|
|
843
|
+
"& .MuiChartsAxis-tick": { stroke: `${chart.axisFg} !important` },
|
|
735
844
|
"& .MuiChartsAxis-tickLabel": {
|
|
736
|
-
fill: chart.labelFg
|
|
737
|
-
fontFamily: theme.typography.fontFamily
|
|
738
|
-
fontSize:
|
|
739
|
-
|
|
845
|
+
fill: `${chart.labelFg} !important`,
|
|
846
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
847
|
+
fontSize: `${fontSize.xxs}px !important`,
|
|
848
|
+
lineHeight: lineHeight.xxs
|
|
740
849
|
},
|
|
741
850
|
"& .MuiChartsAxis-label": {
|
|
742
|
-
fill: chart.labelFgEmphasis
|
|
743
|
-
fontFamily: theme.typography.fontFamily
|
|
744
|
-
fontSize: typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14
|
|
851
|
+
fill: `${chart.labelFgEmphasis} !important`,
|
|
852
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
853
|
+
fontSize: `${typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14}px !important`,
|
|
745
854
|
fontWeight: theme.typography.fontWeightMedium
|
|
746
855
|
},
|
|
747
856
|
"& .MuiChartsGrid-line": {
|
|
@@ -749,8 +858,8 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
|
|
|
749
858
|
strokeDasharray: "4 4"
|
|
750
859
|
},
|
|
751
860
|
"& .MuiChartsLegend-series text": {
|
|
752
|
-
fill: chart.legendFg
|
|
753
|
-
fontFamily: theme.typography.fontFamily
|
|
861
|
+
fill: `${chart.legendFg} !important`,
|
|
862
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
754
863
|
fontSize: "14px !important"
|
|
755
864
|
},
|
|
756
865
|
"& .MuiChartsLegend-mark": {
|
|
@@ -768,7 +877,6 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
|
|
|
768
877
|
color: chart.tooltipFg,
|
|
769
878
|
borderRadius: theme.shape.borderRadius,
|
|
770
879
|
boxShadow: theme.shadows[4]
|
|
771
|
-
// md equivalent in MUI default array length
|
|
772
880
|
},
|
|
773
881
|
...(_b = props.sx) != null ? _b : {}
|
|
774
882
|
},
|
|
@@ -795,12 +903,12 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
|
|
|
795
903
|
}
|
|
796
904
|
);
|
|
797
905
|
}
|
|
798
|
-
function PieChart({ series, colors: colors2,
|
|
906
|
+
function PieChart({ series, colors: colors2, ...props }) {
|
|
799
907
|
var _a, _b, _c, _d;
|
|
800
908
|
const theme = useTheme();
|
|
801
909
|
const chart = theme.palette.chart;
|
|
802
910
|
const sliceCount = (_c = (_b = (_a = series == null ? void 0 : series[0]) == null ? void 0 : _a.data) == null ? void 0 : _b.length) != null ? _c : 0;
|
|
803
|
-
const seriesColors = useChartColors(sliceCount
|
|
911
|
+
const seriesColors = useChartColors(sliceCount);
|
|
804
912
|
const modifiedSeries = series == null ? void 0 : series.map((s) => {
|
|
805
913
|
var _a2;
|
|
806
914
|
return {
|
|
@@ -822,8 +930,8 @@ function PieChart({ series, colors: colors2, palette = "categorical", ...props }
|
|
|
822
930
|
},
|
|
823
931
|
sx: {
|
|
824
932
|
"& .MuiChartsLegend-series text": {
|
|
825
|
-
fill: chart.legendFg
|
|
826
|
-
fontFamily: theme.typography.fontFamily
|
|
933
|
+
fill: `${chart.legendFg} !important`,
|
|
934
|
+
fontFamily: `${theme.typography.fontFamily} !important`,
|
|
827
935
|
fontSize: "14px !important"
|
|
828
936
|
},
|
|
829
937
|
"& .MuiChartsLegend-mark": {
|
|
@@ -849,6 +957,6 @@ function PieChart({ series, colors: colors2, palette = "categorical", ...props }
|
|
|
849
957
|
);
|
|
850
958
|
}
|
|
851
959
|
|
|
852
|
-
export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Alert, AlertTitle, AppBar, Autocomplete, Backdrop, Badge, BarChart, Button, ButtonGroup, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, DataGrid, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Fab, ForestProvider, LineChart, LinearProgress, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText, ListSubheader, MenuItem, MultiSelect, Paper, PieChart, Radio, RadioGroup, Select, SidebarItem, SidebarNav, Skeleton, Snackbar, Switch, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, ToggleButton, ToggleButtonGroup, Toolbar, Tooltip, Typography, useChartColors, useSidebar };
|
|
960
|
+
export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Alert, AlertTitle, AppBar, Autocomplete, Backdrop, Badge, BarChart, Breadcrumbs, Button, ButtonGroup, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, DataGrid, DatePicker, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Fab, ForestProvider, LineChart, LinearProgress, Link, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText, ListSubheader, Menu, MenuItem, MenuList, Modal, MultiSelect, Pagination, Paper, PieChart, Popover, Radio, RadioGroup, Search, Select, SidebarItem, SidebarNav, Skeleton, Snackbar, Step, StepLabel, Stepper, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tabs, TextField, ToggleButton, ToggleButtonGroup, Toolbar, Tooltip, Typography, useChartColors, useSidebar };
|
|
853
961
|
//# sourceMappingURL=index.mjs.map
|
|
854
962
|
//# sourceMappingURL=index.mjs.map
|