@fattureincloud/fic-design-system 0.7.45 → 0.7.46

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.
@@ -0,0 +1,4 @@
1
+ import { ReactElement } from 'react';
2
+ import { ChartProps } from './types';
3
+ declare const Chart: ({ data, showIndicators, graphicSettingsContent, periodContent, renderYearDropdownContent, yearDropdownButtonText, renderEmptyFilters, }: ChartProps) => ReactElement;
4
+ export default Chart;
@@ -0,0 +1,7 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { ComponentProps } from 'react';
3
+ import { Chart, ChartProps } from './index';
4
+ export declare const Template: Story<ChartProps>;
5
+ export declare const EmptyFilters: Story<ChartProps>;
6
+ declare const ChartStories: Meta<ComponentProps<typeof Chart>>;
7
+ export default ChartStories;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { IconProps } from '../../icon';
3
+ interface GraphButtonProps {
4
+ text?: string;
5
+ icon?: IconProps;
6
+ }
7
+ declare const ChartButton: ({ text, icon }: GraphButtonProps) => JSX.Element;
8
+ export default ChartButton;
@@ -0,0 +1,14 @@
1
+ import { ReactElement } from 'react';
2
+ import { DropdownItemProps, renderContentType } from '../../dropdown';
3
+ import { Legend, LegendItem } from '../types';
4
+ interface ChartIndicatorsProps {
5
+ legend: Legend[];
6
+ setToggleLegendItem: (elem: LegendItem) => void;
7
+ toggleLegendItem: LegendItem;
8
+ graphicSettingsContent?: DropdownItemProps[];
9
+ periodContent?: DropdownItemProps[];
10
+ renderYearDropdownContent?: renderContentType;
11
+ yearDropdownButtonText?: string;
12
+ }
13
+ declare const ChartIndicators: ({ legend, setToggleLegendItem, toggleLegendItem, graphicSettingsContent, renderYearDropdownContent, yearDropdownButtonText, periodContent, }: ChartIndicatorsProps) => ReactElement;
14
+ export default ChartIndicators;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Legend, LegendItem } from '../types';
3
+ interface ChartLegendProps {
4
+ legend: Legend[];
5
+ setToggleLegendItem: (elem: LegendItem) => void;
6
+ toggleLegendItem: LegendItem;
7
+ }
8
+ declare const ChartLegend: ({ legend, setToggleLegendItem, toggleLegendItem }: ChartLegendProps) => JSX.Element;
9
+ export default ChartLegend;
@@ -0,0 +1,2 @@
1
+ export { default as Chart } from './Chart';
2
+ export { ChartProps, Legend, ChartData, LegendItem } from './types';
@@ -0,0 +1,2 @@
1
+ import { ChartData } from '../types';
2
+ export declare const data: ChartData[];
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const DropdownText: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const DropdownParagraph: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const Divider: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const ChartTooltip: import("styled-components").StyledComponent<({ message, placement, className, children, type, onMouseEnter, onMouseLeave, showAlways, showAfterSeconds, hideAfterSeconds, callbackAfterTimeout, onOpen, icon, renderButton, }: import("../tooltip").TooltipProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,52 @@
1
+ import { OrdinalColorScaleConfig } from '@nivo/colors/dist/types/scales/ordinalColorScale';
2
+ import { DatumValue } from '@nivo/line';
3
+ import { Serie } from '@nivo/line';
4
+ import { ReactElement } from 'react';
5
+ import { paletteColor } from '../../styles/types';
6
+ import { DropdownItemProps, renderContentType } from '../dropdown';
7
+ export declare type OrdinalColorScale = OrdinalColorScaleConfig & {
8
+ color: string;
9
+ };
10
+ export interface ChartData extends Serie {
11
+ prevTooltipLabel?: string;
12
+ afterTooltipLabel?: string;
13
+ color?: paletteColor;
14
+ }
15
+ export interface ChartProps {
16
+ data: ChartData[];
17
+ showIndicators: boolean;
18
+ graphicSettingsContent?: DropdownItemProps[];
19
+ periodContent?: DropdownItemProps[];
20
+ yearContent?: DropdownItemProps[];
21
+ renderYearDropdownContent?: renderContentType;
22
+ yearDropdownButtonText?: string;
23
+ renderEmptyFilters?: () => ReactElement;
24
+ }
25
+ export declare type Legend = {
26
+ text: string | number;
27
+ color?: paletteColor;
28
+ };
29
+ export declare type LegendItem = {
30
+ [index: number]: boolean;
31
+ };
32
+ export interface Point {
33
+ point: {
34
+ id: string;
35
+ index: number;
36
+ serieId: string | number;
37
+ serieColor: string;
38
+ x: number;
39
+ y: number;
40
+ color: string;
41
+ borderColor: string;
42
+ data: {
43
+ x: DatumValue;
44
+ xFormatted: string | number;
45
+ y: DatumValue;
46
+ yFormatted: string | number;
47
+ yStacked?: number;
48
+ prevTooltipLabel?: string | number;
49
+ afterTooltipLabel?: string | number;
50
+ };
51
+ };
52
+ }
@@ -0,0 +1,6 @@
1
+ import { DropdownItemProps } from '../dropdown';
2
+ import { ChartData, Legend, LegendItem } from './types';
3
+ export declare const getLegendValues: (data: ChartData[]) => Legend[];
4
+ export declare const getInitialLegendValues: (data: ChartData[]) => LegendItem;
5
+ export declare const getDropdownLabel: (content: DropdownItemProps[]) => string;
6
+ export declare const getDisabledLegendItem: (elemIndex: number, toggleLegendItem: LegendItem) => boolean;
@@ -10,5 +10,6 @@ export declare const FirstTime: () => React.JSX.Element;
10
10
  export declare const WithTips: () => React.JSX.Element;
11
11
  export declare const _ConfirmationModal: () => React.JSX.Element;
12
12
  export declare const StepModalExample: () => React.JSX.Element;
13
+ export declare const StepModalFullScreen: () => React.JSX.Element;
13
14
  declare const ModalStories: Meta<ModalPropsInterface>;
14
15
  export default ModalStories;
@@ -7,5 +7,6 @@ export declare type BodyProps = {
7
7
  minHeight?: number;
8
8
  withoutFooter?: boolean;
9
9
  withoutHeader?: boolean;
10
+ isFullscreen?: boolean;
10
11
  };
11
12
  export declare const StyledBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, import("../../types").ModalPropsInterface & MappedHeight & BodyProps, keyof MappedHeight>;
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { Body, Caption, Headline, Title1, Title2, Title3, Title4, Title5, Title6
4
4
  import { Accordion } from './components/accordions';
5
5
  import { Avatar } from './components/avatar';
6
6
  import { Button, ButtonPalette, ButtonProps, IconButton, IconButtonPalette, IconButtonProps } from './components/buttons';
7
+ import { Chart, ChartProps } from './components/chart';
7
8
  import { CircularProgressBar, circularProgressBarPalette, CircularProgressBarProps, CircularProgressBarType } from './components/circularProgressBar';
8
9
  import { ClosableCard, ClosableCardPalette, ClosableCardProps } from './components/closableCard';
9
10
  import { Drawer } from './components/drawer';
@@ -17,7 +18,6 @@ import { Radio, RadioPalette, RadioProps, RadioStatus, useRadioValue } from './c
17
18
  import { RadioGroup, RadioGroupOptions, RadioGroupProps } from './components/form/radioGroup';
18
19
  import { AsyncCreatableSelect, AsyncCreatableSelectProps, AsyncSelect, AsyncSelectProps, CreatableSelect, CreatableSelectProps, isSimpleValue, OptionType, Select, SelectComponentsType, SelectPalette, SelectProps, simpleValue, useSelectMultiValues, useSelectSimpleValue, useSelectValue } from './components/form/select';
19
20
  import { TextArea, TextAreaPalette, TextAreaProps } from './components/form/textArea';
20
- import { Graphic } from './components/graphic';
21
21
  import { GroupedList, GroupType, ItemType } from './components/groupedList';
22
22
  import { Icon, iconColors, IconPalette, IconProps } from './components/icon';
23
23
  import { IconBackground, IconBackgroundPalette } from './components/icon/components/iconBackground';
@@ -53,4 +53,4 @@ export { Segment, SegmentButton, SegmentButtonPalette, SegmentButtonProps } from
53
53
  export { ShortcutTip, ShortcutTipProps, Tip, TipPalette, TipProps, TipType } from './components/tip';
54
54
  export { bwColor } from './styles/types';
55
55
  export { Card, CardColor, CardPalette, CardProps, CardElevation, CardType } from './components/card';
56
- export { NewTable, Table, CircularProgressBar, CircularProgressBarProps, circularProgressBarPalette, CircularProgressBarType, ColumnsType, ColumnDefType, CellProps, BulkAction, NewRowActions, RowAction, autocompleteYellow, paletteColor, Avatar, Button, ButtonProps, ButtonPalette, IconButton, IconButtonProps, IconButtonPalette, Icon, IconProps, IconPalette, iconColors, IconBackground, IconBackgroundPalette, TableProps, TableData, VerticalTab, VerticalTabSelector, VerticalTabSelectorStatus, VerticalTabSelectorPalette, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette, CheckboxStatus, Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, useSelectSimpleValue, isSimpleValue, simpleValue, CreatableSelectProps, useSelectValue, useSelectMultiValues, SelectPalette, SelectComponentsType, OptionType, PageEmptySet, Modal, ModalBody, ModalSearchable, StepModal, StepModalBody, StepModalCommonProps, StepModalFooter, StepModalFooterProps, StepModalHeader, StepModalHeaderProps, StepModalProps, Tooltip, TooltipProps, TooltipPalette, Accordion, Drawer, Radio, useRadioValue, RadioProps, RadioPalette, RadioStatus, RadioGroup, RadioGroupProps, RadioGroupOptions, InlineMessage, InlineMessageProps, InlineMessagePalette, InlineMessageType, Dropdown, DropdownItemProps, DropdownPalette, DropdownItemType, closeDropdownType, renderContentType, DropdownTabs, ScrollableTabs, TabsItem, Stepper, StepperProps, StepperPalette, ThemeProvider, Theme, Palette, GroupedList, ItemType, GroupType, Toast, ToastProps, toastPalette, ToastPalette, ToastType, ConfirmationModal, MicroTag, MicroTagProps, MicroTagPalette, Tag, TagProps, TagPalette, tagTypes, InputText, InputCode, InputTelephone, InputTextProps, InputCodeProps, InputTelephoneProps, InputTextPalette, UnitDropdownProps, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions, InputHelper, InputHelperProps, InputHelperPalette, TextArea, TextAreaProps, TextAreaPalette, FileUploader, FileUploaderProps, FileUploaderPalette, FileRejection, fileUploaderOnDrop, Spinner, EditableInput, MonthlyTab, MonthlyTabPalette, Graphic, ClosableCard, ClosableCardProps, ClosableCardPalette, };
56
+ export { NewTable, Table, CircularProgressBar, CircularProgressBarProps, circularProgressBarPalette, CircularProgressBarType, ColumnsType, ColumnDefType, CellProps, BulkAction, NewRowActions, RowAction, autocompleteYellow, paletteColor, Avatar, Button, ButtonProps, ButtonPalette, IconButton, IconButtonProps, IconButtonPalette, Icon, IconProps, IconPalette, iconColors, IconBackground, IconBackgroundPalette, TableProps, TableData, VerticalTab, VerticalTabSelector, VerticalTabSelectorStatus, VerticalTabSelectorPalette, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette, CheckboxStatus, Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, useSelectSimpleValue, isSimpleValue, simpleValue, CreatableSelectProps, useSelectValue, useSelectMultiValues, SelectPalette, SelectComponentsType, OptionType, PageEmptySet, Modal, ModalBody, ModalSearchable, StepModal, StepModalBody, StepModalCommonProps, StepModalFooter, StepModalFooterProps, StepModalHeader, StepModalHeaderProps, StepModalProps, Tooltip, TooltipProps, TooltipPalette, Accordion, Drawer, Radio, useRadioValue, RadioProps, RadioPalette, RadioStatus, RadioGroup, RadioGroupProps, RadioGroupOptions, InlineMessage, InlineMessageProps, InlineMessagePalette, InlineMessageType, Dropdown, DropdownItemProps, DropdownPalette, DropdownItemType, closeDropdownType, renderContentType, DropdownTabs, ScrollableTabs, TabsItem, Stepper, StepperProps, StepperPalette, ThemeProvider, Theme, Palette, GroupedList, ItemType, GroupType, Toast, ToastProps, toastPalette, ToastPalette, ToastType, ConfirmationModal, MicroTag, MicroTagProps, MicroTagPalette, Tag, TagProps, TagPalette, tagTypes, InputText, InputCode, InputTelephone, InputTextProps, InputCodeProps, InputTelephoneProps, InputTextPalette, UnitDropdownProps, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions, InputHelper, InputHelperProps, InputHelperPalette, TextArea, TextAreaProps, TextAreaPalette, FileUploader, FileUploaderProps, FileUploaderPalette, FileRejection, fileUploaderOnDrop, Spinner, EditableInput, MonthlyTab, MonthlyTabPalette, Chart, ChartProps, ClosableCard, ClosableCardProps, ClosableCardPalette, };