@matteoaliano/forest-ui 0.2.9 → 0.2.10

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.
@@ -469,47 +469,9 @@ declare const chartColors: {
469
469
  readonly tooltipBg: "#0c111d";
470
470
  readonly tooltipFg: "#ffffff";
471
471
  readonly crosshairFg: "#667085";
472
- readonly legendFg: "#344054";
473
- readonly series1Fg: "#1570ef";
474
- readonly series1FgHover: "#175cd3";
475
- readonly series1Bg: "#d1e9ff";
476
- readonly series1BgHover: "#b2ddff";
477
- readonly series2Fg: "#7f56d9";
478
- readonly series2FgHover: "#6941c6";
479
- readonly series2Bg: "#f4ebff";
480
- readonly series2BgHover: "#e9d7fe";
481
- readonly series3Fg: "#0e9384";
482
- readonly series3FgHover: "#107569";
483
- readonly series3Bg: "#ccfbef";
484
- readonly series3BgHover: "#99f6e0";
485
- readonly series4Fg: "#e04f16";
486
- readonly series4FgHover: "#b93815";
487
- readonly series4Bg: "#fdead7";
488
- readonly series4BgHover: "#f9dbaf";
489
- readonly series5Fg: "#6938ef";
490
- readonly series5FgHover: "#5925dc";
491
- readonly series5Bg: "#ebe9fe";
492
- readonly series5BgHover: "#d9d6fe";
493
- readonly series6Fg: "#dd2590";
494
- readonly series6FgHover: "#c11574";
495
- readonly series6Bg: "#fce7f6";
496
- readonly series6BgHover: "#fcceee";
497
- readonly series7Fg: "#ba24d5";
498
- readonly series7FgHover: "#9f1ab1";
499
- readonly series7Bg: "#fbe8ff";
500
- readonly series7BgHover: "#f6d0fe";
501
- readonly series8Fg: "#e62e05";
502
- readonly series8FgHover: "#bc1b06";
503
- readonly series8Bg: "#ffe6d5";
504
- readonly series8BgHover: "#ffd6ae";
505
- readonly series9Fg: "#099250";
506
- readonly series9FgHover: "#087443";
507
- readonly series9Bg: "#d3f8df";
508
- readonly series9BgHover: "#aaf0c4";
509
- readonly series10Fg: "#444ce7";
510
- readonly series10FgHover: "#3538cd";
511
- readonly series10Bg: "#e0eaff";
512
- readonly series10BgHover: "#c7d7fe";
472
+ readonly legendFg: "#475467";
473
+ readonly categorical: readonly ["#7B61FF", "#FF7E67", "#76DFD5", "#F6C343", "#B36A6F", "#71BCF6", "#FFB076", "#11819D", "#3CB371", "#FFBCAE", "#C87EED", "#76C5AF"];
474
+ readonly vibrant: readonly ["#6B38FB", "#E85B22", "#4AABFF", "#E83B1A", "#E02088"];
513
475
  };
514
476
  declare const alpha: {
515
477
  readonly white: {
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { Theme } from '@mui/material/styles';
3
- export { D as DesignTokens, P as PresetVariantConfig, T as ThemePreset, a as alkemyPlusPreset, b as alpha, c as avatarColors, d as bg, e as border, f as breadcrumbColors, g as buildTheme, h as buildThemeOptions, i as buttonColors, j as chartColors, k as colors, l as container, m as display, n as fg, o as focusRings, p as fontFamily, q as fontSize, r as fontWeight, s as forestPreset, t as forestTheme, u as forestThemeOptions, v as getAvailablePresets, w as getPreset, x as iconColors, y as lineHeight, z as navColors, A as radius, B as registerPreset, C as sliderColors, E as spacing, F as text, G as toggleColors, H as tokenShadows, I as widths } from './index-BxpOMmf6.mjs';
3
+ export { D as DesignTokens, P as PresetVariantConfig, T as ThemePreset, a as alkemyPlusPreset, b as alpha, c as avatarColors, d as bg, e as border, f as breadcrumbColors, g as buildTheme, h as buildThemeOptions, i as buttonColors, j as chartColors, k as colors, l as container, m as display, n as fg, o as focusRings, p as fontFamily, q as fontSize, r as fontWeight, s as forestPreset, t as forestTheme, u as forestThemeOptions, v as getAvailablePresets, w as getPreset, x as iconColors, y as lineHeight, z as navColors, A as radius, B as registerPreset, C as sliderColors, E as spacing, F as text, G as toggleColors, H as tokenShadows, I as widths } from './index-DiI9xbOM.mjs';
4
4
  import { AutocompleteProps } from '@mui/material/Autocomplete';
5
5
  export { AutocompleteProps } from '@mui/material/Autocomplete';
6
6
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
@@ -114,6 +114,11 @@ import { SnackbarProps } from '@mui/material/Snackbar';
114
114
  export { SnackbarProps } from '@mui/material/Snackbar';
115
115
  import React$1 from 'react';
116
116
  import { DrawerProps } from '@mui/material/Drawer';
117
+ import { LineChartProps as LineChartProps$1 } from '@mui/x-charts/LineChart';
118
+ import { BarChartProps as BarChartProps$1 } from '@mui/x-charts/BarChart';
119
+ import { MakeOptional } from '@mui/x-charts/models/helpers';
120
+ import { BarSeriesType } from '@mui/x-charts/models/seriesType/bar';
121
+ import { PieChartProps as PieChartProps$1 } from '@mui/x-charts/PieChart';
117
122
  import '@mui/material';
118
123
 
119
124
  interface ForestProviderProps {
@@ -142,6 +147,19 @@ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
142
147
  declare function Select<Value = unknown>(props: SelectProps<Value>): react_jsx_runtime.JSX.Element;
143
148
  declare function MenuItem(props: MenuItemProps): react_jsx_runtime.JSX.Element;
144
149
 
150
+ interface MultiSelectOption {
151
+ label: string;
152
+ value: string;
153
+ }
154
+ interface MultiSelectProps extends Omit<SelectProps<string[]>, "multiple" | "value" | "onChange" | "renderValue"> {
155
+ options: MultiSelectOption[];
156
+ value: string[];
157
+ onChange: (values: string[]) => void;
158
+ selectAll?: boolean;
159
+ selectAllLabel?: string;
160
+ }
161
+ declare function MultiSelect({ options, value, onChange, selectAll, selectAllLabel, label, ...rest }: MultiSelectProps): react_jsx_runtime.JSX.Element;
162
+
145
163
  declare function Switch(props: SwitchProps): react_jsx_runtime.JSX.Element;
146
164
 
147
165
  declare function TextField(props: TextFieldProps): react_jsx_runtime.JSX.Element;
@@ -250,4 +268,31 @@ interface SidebarItemProps extends Omit<ListItemButtonProps, "children"> {
250
268
  }
251
269
  declare function SidebarItem({ icon, label, endAdornment, sx, ...rest }: SidebarItemProps): react_jsx_runtime.JSX.Element;
252
270
 
253
- export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Alert, AlertTitle, AppBar, Autocomplete, Backdrop, Badge, Button, ButtonGroup, type ButtonProps, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, DataGrid, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Fab, ForestProvider, type ForestProviderProps, LinearProgress, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText, ListSubheader, MenuItem, Paper, Radio, RadioGroup, Select, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarNavProps, Skeleton, Snackbar, Switch, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, ToggleButton, ToggleButtonGroup, Toolbar, Tooltip, Typography, useSidebar };
271
+ interface LineChartProps extends Omit<LineChartProps$1, "series"> {
272
+ series?: LineChartProps$1["series"];
273
+ /** Which color palette variant to use (categorical=12 pastel, vibrant=5 bright) */
274
+ palette?: "categorical" | "vibrant";
275
+ }
276
+ declare function LineChart({ series, colors, palette, ...props }: LineChartProps): react_jsx_runtime.JSX.Element;
277
+
278
+ type ForestBarSeriesType = MakeOptional<BarSeriesType, "type"> & {
279
+ /** Enables diagonal striped fill for comparative data representation */
280
+ variant?: "solid" | "striped";
281
+ };
282
+ interface BarChartProps extends Omit<BarChartProps$1, "series"> {
283
+ series?: ForestBarSeriesType[];
284
+ /** Which color palette variant to use (categorical=12 pastel, vibrant=5 bright) */
285
+ palette?: "categorical" | "vibrant";
286
+ }
287
+ declare function BarChart({ series, colors, palette, ...props }: BarChartProps): react_jsx_runtime.JSX.Element;
288
+
289
+ interface PieChartProps extends Omit<PieChartProps$1, "series"> {
290
+ series?: PieChartProps$1["series"];
291
+ /** Which color palette variant to use (categorical=12 pastel, vibrant=5 bright) */
292
+ palette?: "categorical" | "vibrant";
293
+ }
294
+ declare function PieChart({ series, colors, palette, ...props }: PieChartProps): react_jsx_runtime.JSX.Element;
295
+
296
+ declare function useChartColors(count: number, palette?: "categorical" | "vibrant"): string[];
297
+
298
+ export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Alert, AlertTitle, AppBar, Autocomplete, Backdrop, Badge, BarChart, type BarChartProps, Button, ButtonGroup, type ButtonProps, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, DataGrid, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Fab, ForestProvider, type ForestProviderProps, LineChart, type LineChartProps, LinearProgress, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText, ListSubheader, MenuItem, MultiSelect, type MultiSelectOption, type MultiSelectProps, Paper, PieChart, type PieChartProps, Radio, RadioGroup, Select, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarNavProps, Skeleton, Snackbar, Switch, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, ToggleButton, ToggleButtonGroup, Toolbar, Tooltip, Typography, useChartColors, useSidebar };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { Theme } from '@mui/material/styles';
3
- export { D as DesignTokens, P as PresetVariantConfig, T as ThemePreset, a as alkemyPlusPreset, b as alpha, c as avatarColors, d as bg, e as border, f as breadcrumbColors, g as buildTheme, h as buildThemeOptions, i as buttonColors, j as chartColors, k as colors, l as container, m as display, n as fg, o as focusRings, p as fontFamily, q as fontSize, r as fontWeight, s as forestPreset, t as forestTheme, u as forestThemeOptions, v as getAvailablePresets, w as getPreset, x as iconColors, y as lineHeight, z as navColors, A as radius, B as registerPreset, C as sliderColors, E as spacing, F as text, G as toggleColors, H as tokenShadows, I as widths } from './index-BxpOMmf6.js';
3
+ export { D as DesignTokens, P as PresetVariantConfig, T as ThemePreset, a as alkemyPlusPreset, b as alpha, c as avatarColors, d as bg, e as border, f as breadcrumbColors, g as buildTheme, h as buildThemeOptions, i as buttonColors, j as chartColors, k as colors, l as container, m as display, n as fg, o as focusRings, p as fontFamily, q as fontSize, r as fontWeight, s as forestPreset, t as forestTheme, u as forestThemeOptions, v as getAvailablePresets, w as getPreset, x as iconColors, y as lineHeight, z as navColors, A as radius, B as registerPreset, C as sliderColors, E as spacing, F as text, G as toggleColors, H as tokenShadows, I as widths } from './index-DiI9xbOM.js';
4
4
  import { AutocompleteProps } from '@mui/material/Autocomplete';
5
5
  export { AutocompleteProps } from '@mui/material/Autocomplete';
6
6
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
@@ -114,6 +114,11 @@ import { SnackbarProps } from '@mui/material/Snackbar';
114
114
  export { SnackbarProps } from '@mui/material/Snackbar';
115
115
  import React$1 from 'react';
116
116
  import { DrawerProps } from '@mui/material/Drawer';
117
+ import { LineChartProps as LineChartProps$1 } from '@mui/x-charts/LineChart';
118
+ import { BarChartProps as BarChartProps$1 } from '@mui/x-charts/BarChart';
119
+ import { MakeOptional } from '@mui/x-charts/models/helpers';
120
+ import { BarSeriesType } from '@mui/x-charts/models/seriesType/bar';
121
+ import { PieChartProps as PieChartProps$1 } from '@mui/x-charts/PieChart';
117
122
  import '@mui/material';
118
123
 
119
124
  interface ForestProviderProps {
@@ -142,6 +147,19 @@ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
142
147
  declare function Select<Value = unknown>(props: SelectProps<Value>): react_jsx_runtime.JSX.Element;
143
148
  declare function MenuItem(props: MenuItemProps): react_jsx_runtime.JSX.Element;
144
149
 
150
+ interface MultiSelectOption {
151
+ label: string;
152
+ value: string;
153
+ }
154
+ interface MultiSelectProps extends Omit<SelectProps<string[]>, "multiple" | "value" | "onChange" | "renderValue"> {
155
+ options: MultiSelectOption[];
156
+ value: string[];
157
+ onChange: (values: string[]) => void;
158
+ selectAll?: boolean;
159
+ selectAllLabel?: string;
160
+ }
161
+ declare function MultiSelect({ options, value, onChange, selectAll, selectAllLabel, label, ...rest }: MultiSelectProps): react_jsx_runtime.JSX.Element;
162
+
145
163
  declare function Switch(props: SwitchProps): react_jsx_runtime.JSX.Element;
146
164
 
147
165
  declare function TextField(props: TextFieldProps): react_jsx_runtime.JSX.Element;
@@ -250,4 +268,31 @@ interface SidebarItemProps extends Omit<ListItemButtonProps, "children"> {
250
268
  }
251
269
  declare function SidebarItem({ icon, label, endAdornment, sx, ...rest }: SidebarItemProps): react_jsx_runtime.JSX.Element;
252
270
 
253
- export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Alert, AlertTitle, AppBar, Autocomplete, Backdrop, Badge, Button, ButtonGroup, type ButtonProps, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, DataGrid, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Fab, ForestProvider, type ForestProviderProps, LinearProgress, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText, ListSubheader, MenuItem, Paper, Radio, RadioGroup, Select, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarNavProps, Skeleton, Snackbar, Switch, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, ToggleButton, ToggleButtonGroup, Toolbar, Tooltip, Typography, useSidebar };
271
+ interface LineChartProps extends Omit<LineChartProps$1, "series"> {
272
+ series?: LineChartProps$1["series"];
273
+ /** Which color palette variant to use (categorical=12 pastel, vibrant=5 bright) */
274
+ palette?: "categorical" | "vibrant";
275
+ }
276
+ declare function LineChart({ series, colors, palette, ...props }: LineChartProps): react_jsx_runtime.JSX.Element;
277
+
278
+ type ForestBarSeriesType = MakeOptional<BarSeriesType, "type"> & {
279
+ /** Enables diagonal striped fill for comparative data representation */
280
+ variant?: "solid" | "striped";
281
+ };
282
+ interface BarChartProps extends Omit<BarChartProps$1, "series"> {
283
+ series?: ForestBarSeriesType[];
284
+ /** Which color palette variant to use (categorical=12 pastel, vibrant=5 bright) */
285
+ palette?: "categorical" | "vibrant";
286
+ }
287
+ declare function BarChart({ series, colors, palette, ...props }: BarChartProps): react_jsx_runtime.JSX.Element;
288
+
289
+ interface PieChartProps extends Omit<PieChartProps$1, "series"> {
290
+ series?: PieChartProps$1["series"];
291
+ /** Which color palette variant to use (categorical=12 pastel, vibrant=5 bright) */
292
+ palette?: "categorical" | "vibrant";
293
+ }
294
+ declare function PieChart({ series, colors, palette, ...props }: PieChartProps): react_jsx_runtime.JSX.Element;
295
+
296
+ declare function useChartColors(count: number, palette?: "categorical" | "vibrant"): string[];
297
+
298
+ export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Alert, AlertTitle, AppBar, Autocomplete, Backdrop, Badge, BarChart, type BarChartProps, Button, ButtonGroup, type ButtonProps, Card, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, DataGrid, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Fab, ForestProvider, type ForestProviderProps, LineChart, type LineChartProps, LinearProgress, List, ListItem, ListItemAvatar, ListItemButton, ListItemIcon, ListItemText, ListSubheader, MenuItem, MultiSelect, type MultiSelectOption, type MultiSelectProps, Paper, PieChart, type PieChartProps, Radio, RadioGroup, Select, SidebarItem, type SidebarItemProps, SidebarNav, type SidebarNavProps, Skeleton, Snackbar, Switch, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, TextField, ToggleButton, ToggleButtonGroup, Toolbar, Tooltip, Typography, useChartColors, useSidebar };