@agregio-solutions/design-system 1.76.3 → 1.77.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.
@@ -1,4 +1,6 @@
1
1
  import { ButtonProps } from 'react-aria-components';
2
+ export declare const chartLegendIcons: readonly ["line", "plainline", "dottedline", "square", "rect", "circle", "cross", "diamond", "star", "triangle", "wye"];
3
+ export type ChartLegendIcon = (typeof chartLegendIcons)[number];
2
4
  export type Props = Omit<ButtonProps, "onPress" | "isDisabled" | "children"> & {
3
5
  /**
4
6
  * Button text, required.
@@ -8,13 +10,29 @@ export type Props = Omit<ButtonProps, "onPress" | "isDisabled" | "children"> & {
8
10
  * Color of the related chart element.
9
11
  */
10
12
  chartColor: string;
13
+ /**
14
+ * Color of the outline of the bullet (default to white).
15
+ * Can be useful if the color is not visible enough on the background.
16
+ * Only applied if the icon is "circle".
17
+ */
18
+ circleOutlineColor?: string;
11
19
  /**
12
20
  * Handler that is called when the press is released over the target.
21
+ * If not provided, the legend item will not render as a button but instead as a simple legend item (no interaction).
13
22
  */
14
23
  onClick?: () => void;
15
24
  /**
16
25
  * Whether the legend item is selected.
17
26
  */
18
27
  isSelected?: boolean;
28
+ /**
29
+ * The icon to display to represent the legend color.
30
+ * @default "circle".
31
+ */
32
+ icon?: ChartLegendIcon;
33
+ /**
34
+ * The custom icon to display (like a CSS shape or an SVG icon) to replace the default icon.
35
+ */
36
+ customIcon?: React.ReactNode;
19
37
  };
20
- export default function ChartLegend({ text, chartColor, onClick, isSelected, ...reactAriaButtonProps }: Props): import("react/jsx-runtime").JSX.Element;
38
+ export default function ChartLegend({ text, chartColor, onClick, isSelected, icon, customIcon, circleOutlineColor, ...reactAriaButtonProps }: Props): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,51 @@
1
+ import { default as React } from 'react';
2
+ export interface ChartTooltipItem {
3
+ /**
4
+ * Text to display in the tooltip
5
+ */
6
+ text: string;
7
+ /**
8
+ * Color of the bullet
9
+ */
10
+ color: string;
11
+ /**
12
+ * Color of the outline of the bullet (default to the color).
13
+ * Can be useful if the color is not visible enough on the background.
14
+ */
15
+ outlineColor?: string;
16
+ }
17
+ export interface Props {
18
+ /**
19
+ * Main title displayed at the top of the tooltip
20
+ */
21
+ title: string;
22
+ /**
23
+ * List of label-value pairs with an associated bullet color
24
+ */
25
+ items: ChartTooltipItem[];
26
+ /**
27
+ * Additional description of the tooltip, placed under the items
28
+ */
29
+ description?: string;
30
+ /**
31
+ * Title of middle section.
32
+ */
33
+ bodyTitle?: string;
34
+ /**
35
+ * Text content of middle section.
36
+ */
37
+ bodyContent?: string;
38
+ /**
39
+ * Custom content for the footer area. Must be read-only (i.e. no interactivity like buttons, links, etc.)
40
+ */
41
+ footerSlot?: React.ReactNode;
42
+ /**
43
+ * Additional CSS class for customizing the root container
44
+ */
45
+ className?: string;
46
+ /**
47
+ * Additional styles for the root container
48
+ */
49
+ style?: React.CSSProperties;
50
+ }
51
+ export default function ChartTooltip({ title, items, description, bodyTitle, bodyContent, footerSlot, ...props }: Props): import("react/jsx-runtime").JSX.Element;
@@ -4,6 +4,7 @@ import { default as Breadcrumbs } from './components/Breadcrumbs';
4
4
  import { default as Button } from './components/Button';
5
5
  import { default as Calendar, CalendarCell } from './components/Calendar/Calendar';
6
6
  import { default as ChartLegend } from './components/ChartLegend/ChartLegend';
7
+ import { default as ChartTooltip } from './components/ChartTooltip/ChartTooltip';
7
8
  import { default as Checkbox } from './components/Checkbox';
8
9
  import { default as CheckboxGroup } from './components/CheckboxGroup';
9
10
  import { default as Chip } from './components/Chip';
@@ -68,5 +69,5 @@ import { default as createMuiTheme } from './mui/mui-theme.ts';
68
69
  import { tokens, fontSize, lineHeight } from './ds-design-tokens/index';
69
70
  import { I18nProvider } from 'react-aria';
70
71
  import { toast } from 'sonner';
71
- export { Accordion, Badge, Breadcrumbs, Button, Calendar, CalendarCell, ChartLegend, Checkbox, CheckboxGroup, Chip, Combobox, createMuiTheme, DataTable, DataTableCell, DataTableHeader, DataTableRoot, DataTableRow, DatePicker, DateRangePicker, Drawer, Dropdown, DropdownListItem, EmptyState, FileUpload, Filter, fontSize, Header, I18nProvider, Icon, Label, LinearProgressBar, lineHeight, Link, List, Loader, Menu, MenuItem, Message, Modal, ModalContent, ModalActions, ModalForm, Navigation, NavigationItem, Notifications, NotificationCard, PageLayout, Pagination, Popover, PopoverTrigger, Radio, RouterProvider, SearchBar, SegmentedControl, SegmentedControlButton, SegmentedControlList, SegmentedControlPanel, Select, SelectItem, Skeleton, Slider, Stepper, Step, Switch, Tab, TabList, TabPanel, Tabs, Tag, TextInput, TimeField, Timeline, toast, Toaster, Tooltip, TooltipTrigger, tokens, YearMonthPicker, };
72
+ export { Accordion, Badge, Breadcrumbs, Button, Calendar, CalendarCell, ChartLegend, ChartTooltip, Checkbox, CheckboxGroup, Chip, Combobox, createMuiTheme, DataTable, DataTableCell, DataTableHeader, DataTableRoot, DataTableRow, DatePicker, DateRangePicker, Drawer, Dropdown, DropdownListItem, EmptyState, FileUpload, Filter, fontSize, Header, I18nProvider, Icon, Label, LinearProgressBar, lineHeight, Link, List, Loader, Menu, MenuItem, Message, Modal, ModalContent, ModalActions, ModalForm, Navigation, NavigationItem, Notifications, NotificationCard, PageLayout, Pagination, Popover, PopoverTrigger, Radio, RouterProvider, SearchBar, SegmentedControl, SegmentedControlButton, SegmentedControlList, SegmentedControlPanel, Select, SelectItem, Skeleton, Slider, Stepper, Step, Switch, Tab, TabList, TabPanel, Tabs, Tag, TextInput, TimeField, Timeline, toast, Toaster, Tooltip, TooltipTrigger, tokens, YearMonthPicker, };
72
73
  export type { TypeTableColumnWithFilter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agregio-solutions/design-system",
3
- "version": "1.76.3",
3
+ "version": "1.77.0",
4
4
  "description": "React Component library and Storybook that is part of the Design System for Agregio Solutions",
5
5
  "type": "module",
6
6
  "module": "dist/design-system.js",