@fattureincloud/fic-design-system 0.15.4 → 0.15.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. package/dist/assets/index-0788b002.css +626 -0
  2. package/dist/assets/index.esm-7d789d8e.css +626 -0
  3. package/dist/common/components/Label.d.ts +3 -0
  4. package/dist/common/types/label.d.ts +12 -0
  5. package/dist/common/utils/label.d.ts +5 -0
  6. package/dist/components/accordion-new/Accordion.d.ts +12 -0
  7. package/dist/components/accordion-new/accordion-new.stories.d.ts +4 -0
  8. package/dist/components/accordion-new/components/AccordionIcon.d.ts +3 -0
  9. package/dist/components/accordion-new/components/AccordionItem.d.ts +3 -0
  10. package/dist/components/accordion-new/components/styled.d.ts +8 -0
  11. package/dist/components/accordion-new/index.d.ts +3 -0
  12. package/dist/components/accordion-new/types.d.ts +58 -0
  13. package/dist/components/accordion-new/utils.d.ts +10 -0
  14. package/dist/components/accordions/accordions.d.ts +9 -0
  15. package/dist/components/accordions/accordions.stories.d.ts +8 -0
  16. package/dist/components/accordions/components/styledAccordionWrapper.d.ts +1 -0
  17. package/dist/components/accordions/index.d.ts +1 -0
  18. package/dist/components/accordions/types.d.ts +19 -0
  19. package/dist/components/banner/utils.d.ts +8 -0
  20. package/dist/components/carousel/components/common/styled.d.ts +2 -0
  21. package/dist/components/chart/components/styled.d.ts +13 -0
  22. package/dist/components/checkbox/Checkbox.d.ts +15 -0
  23. package/dist/components/checkbox/checkbox.stories.d.ts +1 -0
  24. package/dist/components/checkbox/checkboxPalette.d.ts +16 -0
  25. package/dist/components/checkbox/components/Input.d.ts +9 -0
  26. package/dist/components/checkbox/components/Label.d.ts +8 -0
  27. package/dist/components/checkbox/hooks/useCheckboxValue.d.ts +11 -0
  28. package/dist/components/checkbox/index.d.ts +4 -0
  29. package/dist/components/checkbox/types.d.ts +19 -0
  30. package/dist/components/checkbox/utils.d.ts +24 -0
  31. package/dist/components/chips/chips.d.ts +7 -0
  32. package/dist/components/chips/chips.stories.d.ts +6 -0
  33. package/dist/components/chips/components/styledChipWrapper.d.ts +4 -0
  34. package/dist/components/chips/index.d.ts +2 -0
  35. package/dist/components/chips/types.d.ts +11 -0
  36. package/dist/components/drawer/types.d.ts +14 -0
  37. package/dist/components/form/checkbox/components/Input.d.ts +9 -0
  38. package/dist/components/form/checkbox/components/Label.d.ts +8 -0
  39. package/dist/components/form/datepicker/StyledDatePicker.d.ts +1 -0
  40. package/dist/components/form/datepicker/components/MonthPicker.d.ts +5 -0
  41. package/dist/components/form/fileUploader/fileTypes.d.ts +3 -0
  42. package/dist/components/form/fileUploader/hooks/useIcon.d.ts +4 -0
  43. package/dist/components/form/fileUploader/hooks/useTexts.d.ts +3 -0
  44. package/dist/components/form/select/components/Placeholder.d.ts +4 -0
  45. package/dist/components/form/select/components/types.d.ts +10 -0
  46. package/dist/components/groupRadioButton/index.d.ts +23 -0
  47. package/dist/components/groupRadioButton/radio-group.stories.d.ts +6 -0
  48. package/dist/components/inlineMessages/components/styledInlineMessageWrapper.d.ts +8 -0
  49. package/dist/components/inlineMessages/index.d.ts +2 -0
  50. package/dist/components/inlineMessages/inlineMessages.d.ts +4 -0
  51. package/dist/components/inlineMessages/inlineMessages.stories.d.ts +7 -0
  52. package/dist/components/inlineMessages/types.d.ts +29 -0
  53. package/dist/components/inputText/components/icons.d.ts +8 -0
  54. package/dist/components/inputText/components/inputContainer.d.ts +1 -0
  55. package/dist/components/inputText/components/messages.d.ts +2 -0
  56. package/dist/components/inputText/components/wrapperTextArea.d.ts +1 -0
  57. package/dist/components/inputText/icons.d.ts +9 -0
  58. package/dist/components/inputText/index.d.ts +3 -0
  59. package/dist/components/inputText/inputText.stories.d.ts +1 -0
  60. package/dist/components/inputText/inputTextStyledWrapper.d.ts +2 -0
  61. package/dist/components/inputText/sideText.d.ts +6 -0
  62. package/dist/components/inputText/typings/enums.d.ts +17 -0
  63. package/dist/components/inputText/typings/inputText.d.ts +43 -0
  64. package/dist/components/inputText/utils.d.ts +8 -0
  65. package/dist/components/newTable/components/action/favorite/Favorite.d.ts +13 -0
  66. package/dist/components/newTable/components/action/favorite/index.d.ts +1 -0
  67. package/dist/components/newTable/components/action/favorite/styled.d.ts +3 -0
  68. package/dist/components/newTable_v2/index.d.ts +1 -1
  69. package/dist/components/newTable_v2/types/features/actions.d.ts +1 -1
  70. package/dist/components/pagination/paginationStyledWrapper.d.ts +1 -0
  71. package/dist/components/progressbar/components/styledProgressbarWrapper.d.ts +2 -0
  72. package/dist/components/radioButton/components/label.d.ts +2 -0
  73. package/dist/components/radioButton/components/radio.d.ts +2 -0
  74. package/dist/components/radioButton/index.d.ts +2 -0
  75. package/dist/components/radioButton/radio.stories.d.ts +6 -0
  76. package/dist/components/radioButton/typings/radioButton.d.ts +21 -0
  77. package/dist/components/select/hooks/constants.d.ts +4613 -0
  78. package/dist/components/select/hooks/useCustomSelectStyle.d.ts +4 -0
  79. package/dist/components/select/index.d.ts +4 -0
  80. package/dist/components/select/select.stories.d.ts +1 -0
  81. package/dist/components/select/typings/select.d.ts +22 -0
  82. package/dist/components/stepBar/components/singleStep.d.ts +3 -0
  83. package/dist/components/stepBar/components/styledStepBarWrapper.d.ts +2 -0
  84. package/dist/components/stepBar/index.d.ts +2 -0
  85. package/dist/components/stepBar/stepBar.d.ts +7 -0
  86. package/dist/components/stepBar/stepBar.stories.d.ts +1 -0
  87. package/dist/components/stepBar/types.d.ts +15 -0
  88. package/dist/components/table/components/EmptyState.d.ts +7 -0
  89. package/dist/components/table/components/SelectedRowsCount.d.ts +7 -0
  90. package/dist/components/table/components/actionLink.d.ts +3 -0
  91. package/dist/components/table/components/actions/ActionsCell.d.ts +10 -0
  92. package/dist/components/table/components/actions/DropdownActions.d.ts +10 -0
  93. package/dist/components/table/components/actions/PrimaryAction.d.ts +12 -0
  94. package/dist/components/table/components/actions/actionsContainer.d.ts +1 -0
  95. package/dist/components/table/components/actions/actionsPopUp.d.ts +12 -0
  96. package/dist/components/table/components/actions/actionsPopUpButton.d.ts +8 -0
  97. package/dist/components/table/components/actions/actionsPopUpUnderlay.d.ts +3 -0
  98. package/dist/components/table/components/checkboxes/Cell.d.ts +5 -0
  99. package/dist/components/table/components/checkboxes/Header.d.ts +5 -0
  100. package/dist/components/table/components/checkboxes/useHeaderCheckboxProps.d.ts +12 -0
  101. package/dist/components/table/components/components/headDesktop.d.ts +15 -0
  102. package/dist/components/table/components/components/listMobile.d.ts +15 -0
  103. package/dist/components/table/components/components/rowDesktop.d.ts +18 -0
  104. package/dist/components/table/components/customizationModal/customizationsModal.d.ts +10 -0
  105. package/dist/components/table/components/customizationModal/index.d.ts +2 -0
  106. package/dist/components/table/components/customizationModal/styledWrapper.d.ts +3 -0
  107. package/dist/components/table/components/customizationModal/useDnd.d.ts +8 -0
  108. package/dist/components/table/components/customizationModal/utils.d.ts +6 -0
  109. package/dist/components/table/components/emptySet.d.ts +10 -0
  110. package/dist/components/table/components/linearBackground.d.ts +1 -0
  111. package/dist/components/table/components/loadingCell/LoadingCell.d.ts +8 -0
  112. package/dist/components/table/components/loadingContent.d.ts +7 -0
  113. package/dist/components/table/components/pagination/PageButton.d.ts +10 -0
  114. package/dist/components/table/components/pagination/PaginationButtons.d.ts +10 -0
  115. package/dist/components/table/components/pagination/utils.d.ts +14 -0
  116. package/dist/components/table/components/pagination.d.ts +8 -0
  117. package/dist/components/table/components/sortIcon.d.ts +2 -0
  118. package/dist/components/table/components/styledWrapper.d.ts +3 -0
  119. package/dist/components/table/components/tableBody/TableBody.d.ts +17 -0
  120. package/dist/components/table/components/tableBody/TableBodyTr.d.ts +8 -0
  121. package/dist/components/table/components/tableHeader/SortIndicator.d.ts +7 -0
  122. package/dist/components/table/components/tableHeader/TableHeader.d.ts +12 -0
  123. package/dist/components/table/components/tableParts/TableTd.d.ts +8 -0
  124. package/dist/components/table/components/tableParts/TableTh.d.ts +4 -0
  125. package/dist/components/table/components/tableParts/styled.d.ts +17 -0
  126. package/dist/components/table/components/unstyledTable.d.ts +11 -0
  127. package/dist/components/table/constants.d.ts +2 -0
  128. package/dist/components/table/hooks/useCheckboxesComponents.d.ts +4 -0
  129. package/dist/components/table/hooks/useRowsSelection.d.ts +4 -0
  130. package/dist/components/table/hooks/useTableHooks.d.ts +6 -0
  131. package/dist/components/table/hooks/useTableValues.d.ts +14 -0
  132. package/dist/components/table/index.d.ts +7 -0
  133. package/dist/components/table/stories/columns.d.ts +3 -0
  134. package/dist/components/table/stories/components/CustomPerson.d.ts +7 -0
  135. package/dist/components/table/stories/components/Role.d.ts +8 -0
  136. package/dist/components/table/stories/components/types.d.ts +14 -0
  137. package/dist/components/table/stories/data.d.ts +2 -0
  138. package/dist/components/table/table.d.ts +57 -0
  139. package/dist/components/table/table.stories.d.ts +6 -0
  140. package/dist/components/table/tablePalette.d.ts +33 -0
  141. package/dist/components/table/types.d.ts +28 -0
  142. package/dist/components/table/typings/main.d.ts +92 -0
  143. package/dist/components/table/utils/configPersistency.d.ts +14 -0
  144. package/dist/components/table/utils.d.ts +16 -0
  145. package/dist/components/textButton/TextButton.d.ts +12 -0
  146. package/dist/components/textButton/index.d.ts +2 -0
  147. package/dist/components/textButton/textButton.stories.d.ts +1 -0
  148. package/dist/components/tip/components/styledTip.d.ts +4 -0
  149. package/dist/components/toast/ToastContainer.d.ts +9 -0
  150. package/dist/components/toast/typings/toast.d.ts +32 -0
  151. package/dist/components/tooltip/tooltip.stories.d.ts +2 -1
  152. package/dist/components/tooltips/components/message.d.ts +12 -0
  153. package/dist/components/tooltips/components/styledTooltipWrapper.d.ts +1 -0
  154. package/dist/components/tooltips/index.d.ts +2 -0
  155. package/dist/components/tooltips/tooltips.d.ts +15 -0
  156. package/dist/components/tooltips/tooltips.stories.d.ts +1 -0
  157. package/dist/components/tooltips/types.d.ts +25 -0
  158. package/dist/components/verticalTab/VerticalTab.d.ts +4 -0
  159. package/dist/components/verticalTab/components/VerticalTabSelector/VerticalTabSelector.d.ts +13 -0
  160. package/dist/components/verticalTab/components/VerticalTabSelector/index.d.ts +5 -0
  161. package/dist/components/verticalTab/components/VerticalTabSelector/styled.d.ts +11 -0
  162. package/dist/components/verticalTab/components/VerticalTabSelector/types.d.ts +37 -0
  163. package/dist/components/verticalTab/components/VerticalTabSelector/verticalTabSelector.stories.d.ts +5 -0
  164. package/dist/components/verticalTab/components/VerticalTabSelector/verticalTabSelectorPalette.d.ts +3 -0
  165. package/dist/components/verticalTab/index.d.ts +2 -0
  166. package/dist/components/verticalTab/styled.d.ts +6 -0
  167. package/dist/components/verticalTab/types.d.ts +6 -0
  168. package/dist/components/verticalTab/verticalTab.stories.d.ts +8 -0
  169. package/dist/index.esm.js +1 -1
  170. package/dist/index.js +1 -1
  171. package/dist/index.js.map +1 -1
  172. package/dist/styles/elevations.d.ts +7 -0
  173. package/dist/utils/FICNumbers.d.ts +11 -0
  174. package/package.json +1 -1
  175. /package/dist/components/floatingBadge/{FloatingBadge.d.ts → floatingBadge.d.ts} +0 -0
  176. /package/dist/components/floatingBadge/{WithBadge.d.ts → withBadge.d.ts} +0 -0
  177. /package/dist/components/progressbar/{ProgressBar.d.ts → progressbar.d.ts} +0 -0
  178. /package/dist/components/progressbar/{progressBar.stories.d.ts → progressbar.stories.d.ts} +0 -0
  179. /package/dist/components/tip/{ShortcutTip.d.ts → shortcutTip.d.ts} +0 -0
  180. /package/dist/components/tip/{Tip.d.ts → tip.d.ts} +0 -0
  181. /package/dist/components/toast/components/{ToastContent.d.ts → toastContent.d.ts} +0 -0
  182. /package/dist/components/toast/{Toast.d.ts → toast.d.ts} +0 -0
@@ -0,0 +1,57 @@
1
+ /// <reference types="react" />
2
+ import { Row, UseTableOptions } from 'react-table';
3
+ import { EmptyTablePageProps } from './components/EmptyState';
4
+ import { ManualPagination, OnSelectionChange, OnSort, RowActions, TableData } from './types';
5
+ export interface TableProps<T extends TableData> extends UseTableOptions<T> {
6
+ sortable?: boolean;
7
+ onSort?: OnSort<T>;
8
+ noPagination?: boolean;
9
+ manualPagination?: ManualPagination;
10
+ onScroll?: () => void;
11
+ pageSize?: number;
12
+ selectableRows?: boolean;
13
+ preSelectAllRows?: boolean;
14
+ onSelectionChange?: OnSelectionChange<T>;
15
+ onRowClick?: (row: Row<T>) => void;
16
+ globalFilter?: string;
17
+ hideHeader?: boolean;
18
+ EmptyPage?: EmptyTablePageProps['EmptyPage'];
19
+ Footer?: JSX.Element;
20
+ withCheckbox?: boolean;
21
+ isLoading?: boolean;
22
+ actions?: RowActions<T>;
23
+ renderActions?: () => JSX.Element;
24
+ actionsHeader?: string | JSX.Element;
25
+ bodyHeight?: number | string;
26
+ headerHeight?: number | string;
27
+ rowHeight?: number | string;
28
+ disableArrowNavigation?: boolean;
29
+ }
30
+ /**
31
+ * Component Props:
32
+ * @param {boolean} sortable Makes all columns sortable, sort can be disabled for a single column inside columns definition
33
+ * @param {function} onSort Callback called on column sort change
34
+ * @param {boolean} noPagination Hide table paginator and disabled pagination
35
+ * @param {number} pageSize Define the page size to use in every page
36
+ * @param {object} manualPagination If you want to manage the pagination by yourself
37
+ * @param {function} onScroll If pagination is disabled, this callback is called when user scroll to the bottom of the table
38
+ * @param {boolean} selectableRows Allow to select rows
39
+ * @param {boolean} preSelectAllRows Pre-select all rows
40
+ * @param {function} onSelectionChange Callback called when rows selection changes
41
+ * @param {function} onRowClick Callback called on row click
42
+ * @param {string} globalFilter Filter all columns by value
43
+ * @param {boolean} hideHeader Hide the table header
44
+ * @param {object} EmptyPage Configuration to show a custom component when table has no rows
45
+ * @param {JSX.Element} Footer Custom footer component
46
+ * @param {boolean} withCheckbox Show a column with checkboxes on left side of the table
47
+ * @param {boolean} isLoading Apply loading style to all cells
48
+ * @param {object} actions Configuration to render actions column
49
+ * @param {function} renderActions Used to customize actions column
50
+ * @param {string | JSX.Element} actionsHeader Used to customize actions header
51
+ * @param {number|string} bodyHeight Set tbody height, default 300px
52
+ * @param {number|string} headerHeight Set thead and th height, default 40px
53
+ * @param {number|string} rowHeight Set row height, default 40px
54
+ * @param {boolean} disableArrowNavigation Used to turn off Up/Down row selection and Enter click
55
+ */
56
+ declare const Table: <T extends TableData>({ actions, bodyHeight, columns, data, EmptyPage, Footer, globalFilter: externalGlobalFilter, headerHeight, hideHeader, isLoading, manualPagination, noPagination, onRowClick, onScroll, onSelectionChange, onSort, preSelectAllRows, renderActions, actionsHeader, rowHeight, selectableRows, sortable, withCheckbox, pageSize, disableArrowNavigation, }: TableProps<T>) => JSX.Element;
57
+ export default Table;
@@ -0,0 +1,6 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { DataType } from './stories/components/types';
3
+ import { TableProps } from './Table';
4
+ export declare const Template: Story<TableProps<DataType>>;
5
+ declare const TableStories: Meta<TableProps<DataType>>;
6
+ export default TableStories;
@@ -0,0 +1,33 @@
1
+ import { colorsPalette } from '../../common/types/colorsPalette';
2
+ import { ButtonProps, IconButtonProps } from '../buttons';
3
+ import { DropdownItemType } from '../dropdown/types';
4
+ declare type TableHeaderPalette = colorsPalette;
5
+ declare type rowStatus = 'normal' | 'hover' | 'selected' | 'disabled';
6
+ declare type TableRowsPalette = {
7
+ [k in rowStatus]: colorsPalette;
8
+ };
9
+ interface SelectedRowsCountPalette extends colorsPalette {
10
+ resetButtonColor: ButtonProps['color'];
11
+ }
12
+ declare type paginationItemStatus = 'normal' | 'hover' | 'active';
13
+ declare type PaginationPalette = {
14
+ numbers: {
15
+ [k in paginationItemStatus]: colorsPalette;
16
+ };
17
+ buttons: ButtonProps['color'];
18
+ };
19
+ declare type ActionsPalette = {
20
+ colors: {
21
+ [k in DropdownItemType]: ButtonProps['color'];
22
+ };
23
+ dropdownTriggerColor: IconButtonProps['color'];
24
+ };
25
+ export interface TablePalette {
26
+ header: TableHeaderPalette;
27
+ rows: TableRowsPalette;
28
+ selectedRowsCount: SelectedRowsCountPalette;
29
+ actions: ActionsPalette;
30
+ pagination: PaginationPalette;
31
+ }
32
+ declare const tablePalette: TablePalette;
33
+ export default tablePalette;
@@ -0,0 +1,28 @@
1
+ import { Row, SortingRule } from 'react-table';
2
+ import { DropdownItemType } from '../dropdown/types';
3
+ import { IconProps } from '../icon';
4
+ export interface TableData {
5
+ isDisabled?: boolean;
6
+ }
7
+ export interface CustomColumn {
8
+ align?: 'left' | 'center' | 'right';
9
+ }
10
+ export interface RowActions<T extends TableData> {
11
+ primary?: RowAction<T>;
12
+ dropdown?: RowAction<T>[];
13
+ }
14
+ export interface RowAction<T extends TableData> {
15
+ icon?: IconProps;
16
+ type?: DropdownItemType;
17
+ text: string;
18
+ onClick: (row: Row<T>) => void;
19
+ isDisabled?: boolean;
20
+ }
21
+ interface ManualPaginationConfig {
22
+ pageCount: number;
23
+ setCurrentPage: (page: number) => void;
24
+ }
25
+ export declare type ManualPagination = ManualPaginationConfig | undefined;
26
+ export declare type OnSort<T extends TableData> = (sortBy: Array<SortingRule<T>>) => void;
27
+ export declare type OnSelectionChange<T extends TableData> = (rows: Row<T>[], addedRows: Row<T>[], removedRows: Row<T>[]) => void;
28
+ export {};
@@ -0,0 +1,92 @@
1
+ import React from 'react';
2
+ import { checkboxStatus } from '../../form/checkbox/types';
3
+ import { IconProps } from '../../icon';
4
+ export interface PropertyInterface {
5
+ id: string;
6
+ label: string;
7
+ columnStyle?: React.CSSProperties;
8
+ render?: (val: string | number, id?: string | number) => JSX.Element;
9
+ deactivateActive?: boolean;
10
+ sortable?: boolean;
11
+ }
12
+ export declare type TControlledProperty = PropertyInterface & {
13
+ active: checkboxStatus;
14
+ position: number;
15
+ };
16
+ export declare type TControlledProperties = TControlledProperty[];
17
+ export declare type ActionType = {
18
+ label: string;
19
+ action: (element: {
20
+ id: number;
21
+ [key: string]: string | number;
22
+ }, selectedRows: Array<number>) => void;
23
+ color?: string;
24
+ };
25
+ export interface TablePropsInterface {
26
+ className?: string;
27
+ properties: Array<PropertyInterface>;
28
+ data: Array<{
29
+ id: number;
30
+ [key: string]: string | number;
31
+ }>;
32
+ actions?: Array<ActionType>;
33
+ listSize: number;
34
+ pageSize: number;
35
+ changePageAction: (pageNumber: number) => void;
36
+ nextPageAction?: () => void;
37
+ prevPageAction?: () => void;
38
+ currentPage: number;
39
+ customizeModalTitle: string;
40
+ isLoading?: boolean;
41
+ selectionCallback?: (newData: Array<number>) => void;
42
+ selectedList?: Array<number>;
43
+ disableSelection?: boolean;
44
+ emptySetIcon?: IconProps;
45
+ emptySetTitle?: string;
46
+ emptySetText?: string;
47
+ emptySetAction?: {
48
+ text: string;
49
+ icon?: IconProps;
50
+ action: () => void;
51
+ };
52
+ renderMobileRow?: (o: {
53
+ [key: string]: React.ReactText;
54
+ id: number;
55
+ }) => JSX.Element;
56
+ persistencyId?: string;
57
+ isHeaderFixed?: boolean;
58
+ }
59
+ export interface PropertyFilterInterface {
60
+ id: string;
61
+ type: 'asc' | 'desc' | boolean;
62
+ }
63
+ export interface TableStateInterface {
64
+ propertiesFilter: Array<PropertyFilterInterface>;
65
+ showModalCustomize: boolean;
66
+ controlledProperties: TControlledProperties;
67
+ currentActionsPopUp?: number;
68
+ }
69
+ export declare type TTable = React.FunctionComponent<TablePropsInterface>;
70
+ export declare type TSortIcon = React.FC<{
71
+ property: string;
72
+ propertiesFilter: Array<PropertyFilterInterface>;
73
+ handleSortOnProperty: (id: string, type: 'asc' | 'desc' | boolean) => void;
74
+ }>;
75
+ export declare type TPagination = React.FC<{
76
+ pageSize: number;
77
+ listSize: number;
78
+ changePageAction: (pageNumber: number) => void;
79
+ nextPageAction?: () => void;
80
+ prevPageAction?: () => void;
81
+ currentPage: number;
82
+ }>;
83
+ export interface CustomizationsModalPropsInterface {
84
+ show?: boolean;
85
+ close: () => void;
86
+ title: string;
87
+ properties: TControlledProperties;
88
+ modifyControlledPropertiesHandler: (properties: TControlledProperties) => void;
89
+ }
90
+ export interface CustomizationsModalStateInterface {
91
+ localProperties: TControlledProperties;
92
+ }
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { PropertyInterface, TControlledProperties } from '../typings/main';
3
+ export declare const getConfig: (persistencyId?: string | undefined) => TControlledProperties | undefined;
4
+ export declare const modifyConfig: (properties: TControlledProperties, persistencyId?: string | undefined) => void;
5
+ export declare const mergePropertiesPersistency: (properties: PropertyInterface[], persistency: TControlledProperties) => {
6
+ id: string;
7
+ label: string;
8
+ columnStyle?: import("react").CSSProperties | undefined;
9
+ render?: ((val: string | number, id?: string | number | undefined) => JSX.Element) | undefined;
10
+ deactivateActive?: boolean | undefined;
11
+ sortable?: boolean | undefined;
12
+ active: import("../../form/checkbox/types").checkboxStatus;
13
+ position: number;
14
+ }[];
@@ -0,0 +1,16 @@
1
+ import { Row, TableData } from 'index';
2
+ import { DefaultTheme } from 'styled-components';
3
+ import { paletteColor } from '../../styles/types';
4
+ import { TableBodyTrProps } from './components/tableBody/TableBodyTr';
5
+ interface GetTableBodyTrStylesParams extends TableBodyTrProps {
6
+ theme: DefaultTheme;
7
+ }
8
+ export interface TableBodyTrStyles {
9
+ background: paletteColor;
10
+ color: paletteColor;
11
+ hoverColor: paletteColor;
12
+ hoverBackground: paletteColor;
13
+ }
14
+ export declare const getTableBodyTrStyles: ({ theme, isDisabled, isSelected, }: GetTableBodyTrStylesParams) => TableBodyTrStyles;
15
+ export declare const getIdsFromRows: <T extends TableData>(rows: Row<T>[] | undefined) => string[];
16
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ interface Props extends WrapperProps {
3
+ text: string;
4
+ }
5
+ declare const TextButton: ({ isDisabled, onClick, text, ...rest }: Props) => JSX.Element;
6
+ interface WrapperProps {
7
+ color?: 'blue' | 'red' | 'green' | 'yellow' | 'white';
8
+ isDisabled?: boolean;
9
+ onClick: () => void;
10
+ className?: string;
11
+ }
12
+ export default TextButton;
@@ -0,0 +1,2 @@
1
+ import TextButton from './TextButton';
2
+ export { TextButton };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const StyledTip: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const StyledLeftIcon: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
3
+ export declare const StyledText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const StyledCloseIcon: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ToastContainerProps } from './typings/toast';
3
+ export declare const ToastContainer: import("styled-components").StyledComponent<import("react").FC<import("react-toastify").ToastContainerProps>, import("styled-components").DefaultTheme, {
4
+ hideProgressBar: true;
5
+ newestOnTop: true;
6
+ closeOnClick: false;
7
+ draggable: false;
8
+ rtl: false;
9
+ } & ToastContainerProps, "draggable" | "rtl" | "closeOnClick" | "newestOnTop" | "hideProgressBar">;
@@ -0,0 +1,32 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ToastPosition } from 'react-toastify/dist/types';
3
+ import { IconProps } from '../../icon';
4
+ export declare type toastType = 'standard' | 'error' | 'info' | 'warning' | 'success';
5
+ export interface ToastProps {
6
+ type?: toastType;
7
+ content?: ReactNode;
8
+ icon?: IconProps;
9
+ actionLabel?: string;
10
+ onActionClick?: () => void;
11
+ autoClose?: false;
12
+ }
13
+ export interface ToastContentProps {
14
+ title: ReactNode;
15
+ content?: ReactNode;
16
+ icon: IconProps;
17
+ actionLabel?: string;
18
+ onActionClick?: () => void;
19
+ }
20
+ export interface ToastInterface {
21
+ Container: React.FC<ToastContainerProps>;
22
+ show: (title: ReactNode, options: ToastProps) => string | undefined;
23
+ dismiss: (toastId: string | undefined) => void;
24
+ success: (title: ReactNode, options?: ToastProps) => string | undefined;
25
+ error: (title: ReactNode, options?: ToastProps) => string | undefined;
26
+ info: (title: ReactNode, options?: ToastProps) => string | undefined;
27
+ warning: (title: ReactNode, options?: ToastProps) => string | undefined;
28
+ standard: (title: ReactNode, options?: ToastProps) => string | undefined;
29
+ }
30
+ export interface ToastContainerProps {
31
+ position: ToastPosition;
32
+ }
@@ -1,6 +1,7 @@
1
1
  import { Meta, Story } from '@storybook/react';
2
2
  import { ComponentProps } from 'react';
3
- import Tooltip, { TooltipProps } from './Tooltip';
3
+ import Tooltip from './Tooltip';
4
+ import { TooltipProps } from './types';
4
5
  export declare const Template: Story<TooltipProps>;
5
6
  export declare const WithIcon: Story<TooltipProps>;
6
7
  export declare const WithButton: Story<TooltipProps>;
@@ -0,0 +1,12 @@
1
+ import { TPlacement } from '../types';
2
+ interface MessageInterface {
3
+ messageHeight: number;
4
+ messageWidth: number;
5
+ placement: TPlacement;
6
+ triggerDimension: {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ }
11
+ export declare const Message: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, MessageInterface, never>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,2 @@
1
+ import Tooltip from './tooltips';
2
+ export { Tooltip };
@@ -0,0 +1,15 @@
1
+ import React, { Component } from 'react';
2
+ import { TTooltip, UnstyledTooltipPropsInterface, UnstyledTooltipStateInterface } from './types';
3
+ export declare class UnstyledTooltip extends Component<UnstyledTooltipPropsInterface, UnstyledTooltipStateInterface> {
4
+ constructor(props: UnstyledTooltipPropsInterface);
5
+ messageRef: React.RefObject<HTMLDivElement>;
6
+ triggerRef: React.RefObject<HTMLDivElement>;
7
+ componentDidMount(): void;
8
+ componentDidUpdate(prevProps: UnstyledTooltipPropsInterface): void;
9
+ handleMouseLeave: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
10
+ handleMouseEnter: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
11
+ updateStateDimensions: (width: number, height: number) => void;
12
+ render(): JSX.Element;
13
+ }
14
+ declare const Tooltip: TTooltip;
15
+ export default Tooltip;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ export declare type TPlacement = 'top' | 'left' | 'right' | 'bottom';
3
+ export declare type TTooltip = React.FunctionComponent<{
4
+ message?: string;
5
+ renderMessage?: () => JSX.Element;
6
+ placement: TPlacement;
7
+ isMessageVisible?: boolean;
8
+ isFullWidth?: boolean;
9
+ }>;
10
+ export interface UnstyledTooltipPropsInterface {
11
+ message?: string;
12
+ renderMessage?: () => JSX.Element;
13
+ placement: TPlacement;
14
+ isMessageVisible?: boolean;
15
+ isFullWidth?: boolean;
16
+ }
17
+ export interface UnstyledTooltipStateInterface {
18
+ show: boolean;
19
+ messageHeight?: number;
20
+ messageWidth?: number;
21
+ triggerDimension: {
22
+ width: number;
23
+ height: number;
24
+ };
25
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { VerticalTabProps } from './types';
3
+ declare const VerticalTab: ({ width, renderLeftContent, renderRightContent, }: VerticalTabProps) => JSX.Element;
4
+ export default VerticalTab;
@@ -0,0 +1,13 @@
1
+ import { MouseEvent } from 'react';
2
+ import { IconProps } from '../../../icon';
3
+ import { VerticalTabSelectorStatus } from './types';
4
+ export interface VerticalTabSelectorProps {
5
+ leftIcon?: IconProps;
6
+ text: string;
7
+ counter?: number;
8
+ active?: boolean;
9
+ status: VerticalTabSelectorStatus;
10
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
11
+ }
12
+ declare const VerticalTabSelector: ({ leftIcon, text, status, counter, active, onClick, }: VerticalTabSelectorProps) => JSX.Element;
13
+ export default VerticalTabSelector;
@@ -0,0 +1,5 @@
1
+ export { default as verticalTabSelectorPalette } from './verticalTabSelectorPalette';
2
+ import { VerticalTabSelectorStatus } from './types';
3
+ import VerticalTabSelector from './VerticalTabSelector';
4
+ export { VerticalTabSelector, VerticalTabSelectorStatus };
5
+ export { VerticalTabSelectorPalette } from './types';
@@ -0,0 +1,11 @@
1
+ import { DefaultTheme } from 'styled-components';
2
+ import { VerticalTabSelectorProps } from './VerticalTabSelector';
3
+ export declare const VerticalTabSelectorWrapper: import("styled-components").StyledComponent<"button", DefaultTheme, {
4
+ active: VerticalTabSelectorProps['active'];
5
+ status: VerticalTabSelectorProps['status'];
6
+ }, never>;
7
+ export declare const IconContainer: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
8
+ export declare const StatusContainer: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
9
+ export declare const TextContainer: import("styled-components").StyledComponent<"div", DefaultTheme, {
10
+ status: VerticalTabSelectorProps['status'];
11
+ }, never>;
@@ -0,0 +1,37 @@
1
+ import { paletteColor } from '../../../../styles/types';
2
+ export declare enum VerticalTabSelectorStatus {
3
+ DEFAULT = "default",
4
+ COMPLETED = "completed",
5
+ EDIT = "edit",
6
+ WARNING = "warning"
7
+ }
8
+ export type VerticalTabSelectorPalette = {
9
+ default: {
10
+ active: {
11
+ color: paletteColor;
12
+ backgroundColor: paletteColor;
13
+ hoverBackground: paletteColor;
14
+ activeButtonBackground: paletteColor;
15
+ };
16
+ inactive: {
17
+ color: paletteColor;
18
+ backgroundColor: paletteColor;
19
+ hoverBackground: paletteColor;
20
+ activeButtonBackground: paletteColor;
21
+ };
22
+ };
23
+ warning: {
24
+ active: {
25
+ color: paletteColor;
26
+ backgroundColor: paletteColor;
27
+ hoverBackground: paletteColor;
28
+ activeButtonBackground: paletteColor;
29
+ };
30
+ inactive: {
31
+ color: paletteColor;
32
+ backgroundColor: paletteColor;
33
+ hoverBackground: paletteColor;
34
+ activeButtonBackground: paletteColor;
35
+ };
36
+ };
37
+ };
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { VerticalTabSelectorProps } from './VerticalTabSelector';
3
+ export declare const Template: Story<VerticalTabSelectorProps>;
4
+ declare const VerticalTabSelectorStories: Meta<VerticalTabSelectorProps>;
5
+ export default VerticalTabSelectorStories;
@@ -0,0 +1,3 @@
1
+ import { VerticalTabSelectorPalette } from './types';
2
+ declare const verticalTabSelectorPalette: VerticalTabSelectorPalette;
3
+ export default verticalTabSelectorPalette;
@@ -0,0 +1,2 @@
1
+ export { default as VerticalTab } from './VerticalTab';
2
+ export { VerticalTabSelector, VerticalTabSelectorPalette, VerticalTabSelectorStatus, } from './components/VerticalTabSelector';
@@ -0,0 +1,6 @@
1
+ import { VerticalTabProps } from './types';
2
+ export declare const VerticalTabWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ width: VerticalTabProps['width'];
4
+ }, never>;
5
+ export declare const VerticalTabSelectorsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const VerticalTabContentWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface VerticalTabProps {
3
+ width?: string | number;
4
+ renderLeftContent: () => JSX.Element | JSX.Element[];
5
+ renderRightContent: () => JSX.Element | JSX.Element[];
6
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Meta, Story } from '@storybook/react';
3
+ import { VerticalTabProps } from './types';
4
+ export declare const Template: Story<VerticalTabProps>;
5
+ export declare const WithVerticalTabSelectors: () => JSX.Element;
6
+ export declare const WithVerticalTabSelectorsEdit: () => JSX.Element;
7
+ declare const VerticalTabStories: Meta<VerticalTabProps>;
8
+ export default VerticalTabStories;