@matteoaliano/forest-ui 0.2.10 → 0.3.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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { bg, navColors, text, forestTheme, getPreset, buildTheme } from './chunk-7B6NCKX3.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-7B6NCKX3.mjs';
3
- import { createContext, useMemo, useContext } from 'react';
1
+ import { bg, navColors, text, forestTheme, getPreset, buildTheme, lineHeight, fontSize } from './chunk-EULMNCHH.mjs';
2
+ export { alpha, avatarColors, bg, border, breadcrumbColors, buildTheme, buildThemeOptions, buttonColors, chartColors, colors, container, display, fg, focusRings, fontFamily, fontSize, fontWeight, forestAgencyPreset, forestExternalPreset, forestInternalPreset, forestTheme, forestThemeOptions, getAvailablePresets, getPreset, iconColors, lineHeight, navColors, radius, registerPreset, sliderColors, spacing, text, toggleColors, shadows as tokenShadows, widths } from './chunk-EULMNCHH.mjs';
3
+ import React2, { forwardRef, 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,17 @@ 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';
24
+ import { Box, Typography as Typography$1 } from '@mui/material';
21
25
  import MuiToggleButton from '@mui/material/ToggleButton';
22
26
  import MuiToggleButtonGroup from '@mui/material/ToggleButtonGroup';
27
+ import { DatePicker as DatePicker$1 } from '@mui/x-date-pickers/DatePicker';
28
+ import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
29
+ import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
23
30
  import MuiBadge from '@mui/material/Badge';
24
31
  import MuiChip from '@mui/material/Chip';
25
- import { createSvgIcon } from '@mui/material/utils';
26
32
  import MuiDivider from '@mui/material/Divider';
27
33
  import MuiList from '@mui/material/List';
28
34
  import MuiListItem from '@mui/material/ListItem';
@@ -62,12 +68,22 @@ import MuiDialogContentText from '@mui/material/DialogContentText';
62
68
  import MuiLinearProgress from '@mui/material/LinearProgress';
63
69
  import MuiCircularProgress from '@mui/material/CircularProgress';
64
70
  import MuiSkeleton from '@mui/material/Skeleton';
71
+ import MuiModal from '@mui/material/Modal';
72
+ import MuiPopover from '@mui/material/Popover';
65
73
  import MuiSnackbar from '@mui/material/Snackbar';
74
+ import MuiBreadcrumbs from '@mui/material/Breadcrumbs';
75
+ import MuiLink from '@mui/material/Link';
76
+ import MuiMenu from '@mui/material/Menu';
77
+ import MuiMenuList from '@mui/material/MenuList';
78
+ import MuiPagination from '@mui/material/Pagination';
79
+ import MuiStepper from '@mui/material/Stepper';
80
+ import MuiStep from '@mui/material/Step';
81
+ import MuiStepLabel from '@mui/material/StepLabel';
82
+ import MuiTabs from '@mui/material/Tabs';
83
+ import MuiTab from '@mui/material/Tab';
66
84
  import MuiDrawer from '@mui/material/Drawer';
67
- import Box from '@mui/material/Box';
68
- import IconButton from '@mui/material/IconButton';
85
+ import Box2 from '@mui/material/Box';
69
86
  import { LineChart as LineChart$1 } from '@mui/x-charts/LineChart';
70
- import { Box as Box$1, Typography as Typography$1 } from '@mui/material';
71
87
  import { BarChart as BarChart$1 } from '@mui/x-charts/BarChart';
72
88
  import { PieChart as PieChart$1 } from '@mui/x-charts/PieChart';
73
89
 
@@ -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 = (e) => {
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
- MuiButton,
187
+ "li",
173
188
  {
174
- size: "small",
175
- variant: "text",
176
- onMouseDown: handleSelectAll,
177
- children: allSelected ? "Deselect All" : selectAllLabel
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,128 @@ 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
+ }
269
+ var sizeMap = {
270
+ sm: 24,
271
+ md: 32,
272
+ lg: 48,
273
+ xl: 64
274
+ };
275
+ var variantColors = {
276
+ agency: "#1a1a1a",
277
+ external: "#1a1a1a",
278
+ internal: "#1a1a1a"
279
+ };
280
+ var Logo = forwardRef(
281
+ ({ variant = "agency", size = "md", logomarkOnly = false, sx, ...props }, ref) => {
282
+ const dimension = sizeMap[size];
283
+ return /* @__PURE__ */ jsxs(
284
+ Box,
285
+ {
286
+ ref,
287
+ component: "svg",
288
+ viewBox: "0 0 64 64",
289
+ sx: {
290
+ width: dimension,
291
+ height: dimension,
292
+ display: "inline-flex",
293
+ alignItems: "center",
294
+ justifyContent: "center",
295
+ ...sx
296
+ },
297
+ ...props,
298
+ children: [
299
+ /* @__PURE__ */ jsx(
300
+ "path",
301
+ {
302
+ d: "M32 4L8 28h12v28h8V28h12L32 4z",
303
+ fill: variantColors[variant]
304
+ }
305
+ ),
306
+ !logomarkOnly && /* @__PURE__ */ jsx(
307
+ "text",
308
+ {
309
+ x: "32",
310
+ y: "60",
311
+ textAnchor: "middle",
312
+ fontSize: "10",
313
+ fontWeight: "600",
314
+ fill: variantColors[variant],
315
+ fontFamily: "Aeonik, sans-serif",
316
+ children: "Forest"
317
+ }
318
+ )
319
+ ]
320
+ }
321
+ );
322
+ }
323
+ );
324
+ Logo.displayName = "Logo";
195
325
  function ToggleButton(props) {
196
326
  return /* @__PURE__ */ jsx(MuiToggleButton, { ...props });
197
327
  }
198
328
  function ToggleButtonGroup(props) {
199
329
  return /* @__PURE__ */ jsx(MuiToggleButtonGroup, { ...props });
200
330
  }
331
+ function DatePicker(props) {
332
+ return /* @__PURE__ */ jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: /* @__PURE__ */ jsx(DatePicker$1, { ...props }) });
333
+ }
201
334
  function Badge(props) {
202
335
  return /* @__PURE__ */ jsx(MuiBadge, { ...props });
203
336
  }
@@ -300,9 +433,9 @@ function CardMedia(props) {
300
433
  function Paper(props) {
301
434
  return /* @__PURE__ */ jsx(MuiPaper, { ...props });
302
435
  }
303
- function Alert(props) {
304
- return /* @__PURE__ */ jsx(MuiAlert, { ...props });
305
- }
436
+ var Alert = React2.forwardRef(function Alert2(props, ref) {
437
+ return /* @__PURE__ */ jsx(MuiAlert, { ref, ...props });
438
+ });
306
439
  function AlertTitle(props) {
307
440
  return /* @__PURE__ */ jsx(MuiAlertTitle, { ...props });
308
441
  }
@@ -333,9 +466,45 @@ function CircularProgress(props) {
333
466
  function Skeleton(props) {
334
467
  return /* @__PURE__ */ jsx(MuiSkeleton, { ...props });
335
468
  }
469
+ function Modal(props) {
470
+ return /* @__PURE__ */ jsx(MuiModal, { ...props });
471
+ }
472
+ function Popover(props) {
473
+ return /* @__PURE__ */ jsx(MuiPopover, { ...props });
474
+ }
336
475
  function Snackbar(props) {
337
476
  return /* @__PURE__ */ jsx(MuiSnackbar, { ...props });
338
477
  }
478
+ function Breadcrumbs(props) {
479
+ return /* @__PURE__ */ jsx(MuiBreadcrumbs, { ...props });
480
+ }
481
+ function Link(props) {
482
+ return /* @__PURE__ */ jsx(MuiLink, { ...props });
483
+ }
484
+ function Menu(props) {
485
+ return /* @__PURE__ */ jsx(MuiMenu, { ...props });
486
+ }
487
+ function MenuList(props) {
488
+ return /* @__PURE__ */ jsx(MuiMenuList, { ...props });
489
+ }
490
+ function Pagination(props) {
491
+ return /* @__PURE__ */ jsx(MuiPagination, { ...props });
492
+ }
493
+ function Stepper(props) {
494
+ return /* @__PURE__ */ jsx(MuiStepper, { ...props });
495
+ }
496
+ function Step(props) {
497
+ return /* @__PURE__ */ jsx(MuiStep, { ...props });
498
+ }
499
+ function StepLabel(props) {
500
+ return /* @__PURE__ */ jsx(MuiStepLabel, { ...props });
501
+ }
502
+ function Tabs(props) {
503
+ return /* @__PURE__ */ jsx(MuiTabs, { ...props });
504
+ }
505
+ function Tab(props) {
506
+ return /* @__PURE__ */ jsx(MuiTab, { ...props });
507
+ }
339
508
  var ChevronLeftOutlined_default = createSvgIcon(/* @__PURE__ */ jsx("path", {
340
509
  d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"
341
510
  }), "ChevronLeftOutlined");
@@ -371,7 +540,7 @@ function SidebarNav({
371
540
  onMouseEnter: () => onOpenChange(true),
372
541
  onMouseLeave: () => onOpenChange(false)
373
542
  } : {};
374
- return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { open, collapsedWidth, expandedWidth }, children: /* @__PURE__ */ jsxs(Box, { sx: { position: "relative", width: layoutWidth, flexShrink: 0 }, children: [
543
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { open, collapsedWidth, expandedWidth }, children: /* @__PURE__ */ jsxs(Box2, { sx: { position: "relative", width: layoutWidth, flexShrink: 0 }, children: [
375
544
  /* @__PURE__ */ jsx(
376
545
  MuiDrawer,
377
546
  {
@@ -391,7 +560,7 @@ function SidebarNav({
391
560
  ...sx
392
561
  },
393
562
  children: /* @__PURE__ */ jsxs(
394
- Box,
563
+ Box2,
395
564
  {
396
565
  sx: {
397
566
  display: "flex",
@@ -400,9 +569,9 @@ function SidebarNav({
400
569
  overflow: "hidden"
401
570
  },
402
571
  children: [
403
- header && /* @__PURE__ */ jsx(Box, { sx: { flexShrink: 0 }, children: header }),
404
- /* @__PURE__ */ jsx(Box, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children }),
405
- footer && /* @__PURE__ */ jsx(Box, { sx: { flexShrink: 0 }, children: footer })
572
+ header && /* @__PURE__ */ jsx(Box2, { sx: { flexShrink: 0 }, children: header }),
573
+ /* @__PURE__ */ jsx(Box2, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children }),
574
+ footer && /* @__PURE__ */ jsx(Box2, { sx: { flexShrink: 0 }, children: footer })
406
575
  ]
407
576
  }
408
577
  )
@@ -495,16 +664,10 @@ function SidebarItem({
495
664
  endAdornment
496
665
  ] });
497
666
  }
498
- function useChartColors(count, palette = "categorical") {
667
+ function useChartColors(count) {
499
668
  const theme = useTheme();
500
669
  const chart = theme.palette.chart;
501
- const colors2 = chart[palette] || chart.categorical || [
502
- "#7B61FF",
503
- "#FF7E67",
504
- "#76DFD5",
505
- "#F6C343",
506
- "#B36A6F"
507
- ];
670
+ const colors2 = chart.series.map((s) => s.fg);
508
671
  return colors2.slice(0, Math.min(count, colors2.length));
509
672
  }
510
673
  function formatDate(date) {
@@ -532,7 +695,7 @@ function CustomTooltip(props) {
532
695
  return null;
533
696
  }
534
697
  return /* @__PURE__ */ jsxs(
535
- Box$1,
698
+ Box,
536
699
  {
537
700
  sx: {
538
701
  backgroundColor: theme.palette.common.white,
@@ -547,8 +710,7 @@ function CustomTooltip(props) {
547
710
  borderTop: `1px solid ${theme.palette.divider}`,
548
711
  borderRight: `1px solid ${theme.palette.divider}`,
549
712
  borderBottom: `1px solid ${theme.palette.divider}`,
550
- borderLeft: `4px solid ${theme.palette.chart.series1Fg}`
551
- // Primary Accent line
713
+ borderLeft: `4px solid ${theme.palette.chart.series[0].fg}`
552
714
  },
553
715
  children: [
554
716
  /* @__PURE__ */ jsx(
@@ -567,9 +729,9 @@ function CustomTooltip(props) {
567
729
  const color = typeof s.getColor === "function" ? s.getColor(dataIndex) : s.color;
568
730
  const value = s.data ? s.data[dataIndex] : null;
569
731
  if (value == null) return null;
570
- return /* @__PURE__ */ jsx(Box$1, { sx: { display: "flex", flexDirection: "column", gap: "6px" }, children: /* @__PURE__ */ jsxs(Box$1, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
732
+ return /* @__PURE__ */ jsx(Box, { sx: { display: "flex", flexDirection: "column", gap: "6px" }, children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: "8px" }, children: [
571
733
  /* @__PURE__ */ jsx(
572
- Box$1,
734
+ Box,
573
735
  {
574
736
  sx: {
575
737
  width: 16,
@@ -592,7 +754,7 @@ function CustomTooltip(props) {
592
754
  },
593
755
  children: [
594
756
  /* @__PURE__ */ jsx(
595
- Box$1,
757
+ Box,
596
758
  {
597
759
  component: "span",
598
760
  sx: {
@@ -617,16 +779,16 @@ function CustomTooltip(props) {
617
779
  }
618
780
  );
619
781
  }
620
- function LineChart({ series, colors: colors2, palette = "categorical", ...props }) {
782
+ function LineChart({ series, colors: colors2, ...props }) {
621
783
  var _a, _b;
622
784
  const theme = useTheme();
623
785
  const chart = theme.palette.chart;
624
- const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0, palette);
786
+ const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
625
787
  const modifiedSeries = series == null ? void 0 : series.map((s) => {
626
788
  var _a2, _b2;
627
789
  return {
628
790
  ...s,
629
- curve: (_a2 = s.curve) != null ? _a2 : "monotoneX",
791
+ curve: (_a2 = s.curve) != null ? _a2 : "linear",
630
792
  highlightScope: (_b2 = s.highlightScope) != null ? _b2 : { highlighted: "item", faded: "global" }
631
793
  };
632
794
  });
@@ -647,17 +809,18 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
647
809
  }
648
810
  },
649
811
  sx: {
650
- "& .MuiChartsAxis-line": { stroke: chart.axisFg },
651
- "& .MuiChartsAxis-tick": { stroke: chart.axisFg },
812
+ "& .MuiChartsAxis-line": { stroke: `${chart.axisFg} !important` },
813
+ "& .MuiChartsAxis-tick": { stroke: `${chart.axisFg} !important` },
652
814
  "& .MuiChartsAxis-tickLabel": {
653
- fill: chart.labelFg,
654
- fontFamily: theme.typography.fontFamily,
655
- fontSize: typeof theme.typography.body2.fontSize === "number" ? theme.typography.body2.fontSize : 12
815
+ fill: `${chart.labelFg} !important`,
816
+ fontFamily: `${theme.typography.fontFamily} !important`,
817
+ fontSize: `${fontSize.xxs}px !important`,
818
+ lineHeight: lineHeight.xxs
656
819
  },
657
820
  "& .MuiChartsAxis-label": {
658
- fill: chart.labelFgEmphasis,
659
- fontFamily: theme.typography.fontFamily,
660
- fontSize: typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14,
821
+ fill: `${chart.labelFgEmphasis} !important`,
822
+ fontFamily: `${theme.typography.fontFamily} !important`,
823
+ fontSize: `${typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14}px !important`,
661
824
  fontWeight: theme.typography.fontWeightMedium
662
825
  },
663
826
  "& .MuiChartsGrid-line": {
@@ -665,8 +828,8 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
665
828
  strokeDasharray: "4 4"
666
829
  },
667
830
  "& .MuiChartsLegend-series text": {
668
- fill: chart.legendFg,
669
- fontFamily: theme.typography.fontFamily,
831
+ fill: `${chart.legendFg} !important`,
832
+ fontFamily: `${theme.typography.fontFamily} !important`,
670
833
  fontSize: "14px !important"
671
834
  },
672
835
  "& .MuiChartsLegend-mark": {
@@ -687,7 +850,9 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
687
850
  },
688
851
  "& .MuiLineElement-root": {
689
852
  strokeWidth: 3
690
- // Thicker lines for line charts
853
+ },
854
+ "& .MuiMarkElement-root": {
855
+ display: "none"
691
856
  },
692
857
  ...(_b = props.sx) != null ? _b : {}
693
858
  },
@@ -695,11 +860,11 @@ function LineChart({ series, colors: colors2, palette = "categorical", ...props
695
860
  }
696
861
  );
697
862
  }
698
- function BarChart({ series, colors: colors2, palette = "categorical", ...props }) {
863
+ function BarChart({ series, colors: colors2, ...props }) {
699
864
  var _a, _b;
700
865
  const theme = useTheme();
701
866
  const chart = theme.palette.chart;
702
- const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0, palette);
867
+ const seriesColors = useChartColors((_a = series == null ? void 0 : series.length) != null ? _a : 0);
703
868
  const resolvedColors = colors2 != null ? colors2 : seriesColors;
704
869
  const modifiedSeries = series == null ? void 0 : series.map((s, idx) => {
705
870
  var _a2;
@@ -730,18 +895,18 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
730
895
  }
731
896
  },
732
897
  sx: {
733
- "& .MuiChartsAxis-line": { stroke: chart.axisFg },
734
- "& .MuiChartsAxis-tick": { stroke: chart.axisFg },
898
+ "& .MuiChartsAxis-line": { stroke: `${chart.axisFg} !important` },
899
+ "& .MuiChartsAxis-tick": { stroke: `${chart.axisFg} !important` },
735
900
  "& .MuiChartsAxis-tickLabel": {
736
- fill: chart.labelFg,
737
- fontFamily: theme.typography.fontFamily,
738
- fontSize: typeof theme.typography.body2.fontSize === "number" ? theme.typography.body2.fontSize : 12
739
- // fallback to xs value conceptually if needed
901
+ fill: `${chart.labelFg} !important`,
902
+ fontFamily: `${theme.typography.fontFamily} !important`,
903
+ fontSize: `${fontSize.xxs}px !important`,
904
+ lineHeight: lineHeight.xxs
740
905
  },
741
906
  "& .MuiChartsAxis-label": {
742
- fill: chart.labelFgEmphasis,
743
- fontFamily: theme.typography.fontFamily,
744
- fontSize: typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14,
907
+ fill: `${chart.labelFgEmphasis} !important`,
908
+ fontFamily: `${theme.typography.fontFamily} !important`,
909
+ fontSize: `${typeof theme.typography.body1.fontSize === "number" ? theme.typography.body1.fontSize : 14}px !important`,
745
910
  fontWeight: theme.typography.fontWeightMedium
746
911
  },
747
912
  "& .MuiChartsGrid-line": {
@@ -749,8 +914,8 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
749
914
  strokeDasharray: "4 4"
750
915
  },
751
916
  "& .MuiChartsLegend-series text": {
752
- fill: chart.legendFg,
753
- fontFamily: theme.typography.fontFamily,
917
+ fill: `${chart.legendFg} !important`,
918
+ fontFamily: `${theme.typography.fontFamily} !important`,
754
919
  fontSize: "14px !important"
755
920
  },
756
921
  "& .MuiChartsLegend-mark": {
@@ -768,7 +933,6 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
768
933
  color: chart.tooltipFg,
769
934
  borderRadius: theme.shape.borderRadius,
770
935
  boxShadow: theme.shadows[4]
771
- // md equivalent in MUI default array length
772
936
  },
773
937
  ...(_b = props.sx) != null ? _b : {}
774
938
  },
@@ -795,12 +959,12 @@ function BarChart({ series, colors: colors2, palette = "categorical", ...props }
795
959
  }
796
960
  );
797
961
  }
798
- function PieChart({ series, colors: colors2, palette = "categorical", ...props }) {
962
+ function PieChart({ series, colors: colors2, ...props }) {
799
963
  var _a, _b, _c, _d;
800
964
  const theme = useTheme();
801
965
  const chart = theme.palette.chart;
802
966
  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, palette);
967
+ const seriesColors = useChartColors(sliceCount);
804
968
  const modifiedSeries = series == null ? void 0 : series.map((s) => {
805
969
  var _a2;
806
970
  return {
@@ -822,8 +986,8 @@ function PieChart({ series, colors: colors2, palette = "categorical", ...props }
822
986
  },
823
987
  sx: {
824
988
  "& .MuiChartsLegend-series text": {
825
- fill: chart.legendFg,
826
- fontFamily: theme.typography.fontFamily,
989
+ fill: `${chart.legendFg} !important`,
990
+ fontFamily: `${theme.typography.fontFamily} !important`,
827
991
  fontSize: "14px !important"
828
992
  },
829
993
  "& .MuiChartsLegend-mark": {
@@ -849,6 +1013,6 @@ function PieChart({ series, colors: colors2, palette = "categorical", ...props }
849
1013
  );
850
1014
  }
851
1015
 
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 };
1016
+ 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, Logo, 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
1017
  //# sourceMappingURL=index.mjs.map
854
1018
  //# sourceMappingURL=index.mjs.map