@fattureincloud/fic-design-system 0.10.2 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/banner/utils.d.ts +8 -0
- package/dist/components/chips/chips.d.ts +7 -0
- package/dist/components/chips/chips.stories.d.ts +6 -0
- package/dist/components/chips/components/styledChipWrapper.d.ts +4 -0
- package/dist/components/chips/index.d.ts +2 -0
- package/dist/components/chips/types.d.ts +11 -0
- package/dist/components/drawer/types.d.ts +14 -0
- package/dist/components/form/checkbox/components/Input.d.ts +9 -0
- package/dist/components/form/checkbox/components/Label.d.ts +8 -0
- package/dist/components/form/datepicker/StyledDatePicker.d.ts +1 -0
- package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +13 -0
- package/dist/components/form/inputText/components/codeInput/CodeInput.d.ts +4 -0
- package/dist/components/form/inputText/components/codeInput/styled.d.ts +29 -0
- package/dist/components/form/inputText/components/codeInput/useCodeInputHooks.d.ts +11 -0
- package/dist/components/form/inputText/components/telephoneInput/TelephoneInput.d.ts +4 -0
- package/dist/components/form/inputText/components/telephoneInput/countriesTelephonePrefixes.d.ts +7 -0
- package/dist/components/form/inputText/components/telephoneInput/styled.d.ts +2 -0
- package/dist/components/form/select/components/Placeholder.d.ts +4 -0
- package/dist/components/gridCard/GridCard.d.ts +4 -0
- package/dist/components/gridCard/gridCard.stories.d.ts +8 -0
- package/dist/components/gridCard/index.d.ts +2 -0
- package/dist/components/gridCard/stories/data.d.ts +3 -0
- package/dist/components/gridCard/styled.d.ts +15 -0
- package/dist/components/gridCard/types.d.ts +16 -0
- package/dist/components/gridCard/utils.d.ts +2 -0
- package/dist/components/groupRadioButton/index.d.ts +23 -0
- package/dist/components/groupRadioButton/radio-group.stories.d.ts +6 -0
- package/dist/components/inlineMessages/components/styledInlineMessageWrapper.d.ts +8 -0
- package/dist/components/inlineMessages/index.d.ts +2 -0
- package/dist/components/inlineMessages/inlineMessages.d.ts +4 -0
- package/dist/components/inlineMessages/inlineMessages.stories.d.ts +7 -0
- package/dist/components/inlineMessages/types.d.ts +29 -0
- package/dist/components/modals/types.d.ts +4 -1
- package/dist/components/newTable/components/header/styled.d.ts +1 -0
- package/dist/components/pagination/paginationStyledWrapper.d.ts +1 -0
- package/dist/components/progressbar/components/styledProgressbarWrapper.d.ts +2 -0
- package/dist/components/radioButton/components/label.d.ts +2 -0
- package/dist/components/radioButton/components/radio.d.ts +2 -0
- package/dist/components/radioButton/index.d.ts +2 -0
- package/dist/components/radioButton/radio.stories.d.ts +6 -0
- package/dist/components/radioButton/typings/radioButton.d.ts +21 -0
- package/dist/components/switch/Switch.d.ts +1 -1
- package/dist/components/switch/styled.d.ts +0 -1
- package/dist/components/switch/types.d.ts +1 -2
- package/dist/components/table/Table.d.ts +57 -0
- package/dist/components/table/components/ActionsCell.d.ts +10 -0
- package/dist/components/table/components/EmptyState.d.ts +7 -0
- package/dist/components/table/components/Pagination.d.ts +8 -0
- package/dist/components/table/components/SelectedRowsCount.d.ts +7 -0
- package/dist/components/table/components/SortIndicator.d.ts +6 -0
- package/dist/components/table/components/TableBody.d.ts +14 -0
- package/dist/components/table/components/TableFoot.d.ts +2 -0
- package/dist/components/table/components/TableHeader.d.ts +7 -0
- package/dist/components/table/components/actions/ActionsCell.d.ts +10 -0
- package/dist/components/table/components/actions/DropdownActions.d.ts +10 -0
- package/dist/components/table/components/actions/PrimaryAction.d.ts +12 -0
- package/dist/components/table/components/checkboxes/Cell.d.ts +5 -0
- package/dist/components/table/components/checkboxes/Header.d.ts +5 -0
- package/dist/components/table/components/checkboxes/useHeaderCheckboxProps.d.ts +12 -0
- package/dist/components/table/components/loadingCell/LoadingCell.d.ts +8 -0
- package/dist/components/table/components/pagination/PageButton.d.ts +10 -0
- package/dist/components/table/components/pagination/PaginationButtons.d.ts +10 -0
- package/dist/components/table/components/pagination/utils.d.ts +14 -0
- package/dist/components/table/components/tableBody/TableBody.d.ts +17 -0
- package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +7 -0
- package/dist/components/table/components/tableBody/TableBodyTr.d.ts +8 -0
- package/dist/components/table/components/tableBody/styled.d.ts +3 -0
- package/dist/components/table/components/tableHeader/SortIndicator.d.ts +7 -0
- package/dist/components/table/components/tableHeader/TableHeader.d.ts +12 -0
- package/dist/components/table/components/tableParts/TableTd.d.ts +8 -0
- package/dist/components/table/components/tableParts/TableTh.d.ts +4 -0
- package/dist/components/table/components/tableParts/styled.d.ts +17 -0
- package/dist/components/table/constants.d.ts +2 -0
- package/dist/components/table/hooks/useCheckboxesComponents.d.ts +4 -0
- package/dist/components/table/hooks/useRowsSelection.d.ts +4 -0
- package/dist/components/table/hooks/useTableHooks.d.ts +6 -0
- package/dist/components/table/hooks/useTableValues.d.ts +14 -0
- package/dist/components/table/index.d.ts +7 -0
- package/dist/components/table/stories/columns.d.ts +3 -0
- package/dist/components/table/stories/components/CustomPerson.d.ts +7 -0
- package/dist/components/table/stories/components/Role.d.ts +8 -0
- package/dist/components/table/stories/components/types.d.ts +14 -0
- package/dist/components/table/stories/data.d.ts +2 -0
- package/dist/components/table/table.stories.d.ts +6 -0
- package/dist/components/table/tablePalette.d.ts +33 -0
- package/dist/components/table/types.d.ts +28 -0
- package/dist/components/table/utils.d.ts +16 -0
- package/dist/components/tip/components/styledTip.d.ts +4 -0
- package/dist/components/toast/ToastContainer.d.ts +9 -0
- package/dist/components/toast/typings/toast.d.ts +34 -0
- package/dist/index.css +128 -0
- package/dist/index.esm.css +128 -0
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/styles/defaultPalette/colors/azure.d.ts +2 -0
- package/dist/styles/defaultPalette/colors/purple.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/components/floatingBadge/{FloatingBadge.d.ts → floatingBadge.d.ts} +0 -0
- /package/dist/components/floatingBadge/{WithBadge.d.ts → withBadge.d.ts} +0 -0
- /package/dist/components/progressbar/{ProgressBar.d.ts → progressbar.d.ts} +0 -0
- /package/dist/components/progressbar/{progressBar.stories.d.ts → progressbar.stories.d.ts} +0 -0
- /package/dist/components/tip/{ShortcutTip.d.ts → shortcutTip.d.ts} +0 -0
- /package/dist/components/tip/{Tip.d.ts → tip.d.ts} +0 -0
- /package/dist/components/toast/components/{ToastContent.d.ts → toastContent.d.ts} +0 -0
- /package/dist/components/toast/{Toast.d.ts → toast.d.ts} +0 -0
@@ -0,0 +1,12 @@
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
2
|
+
import { HeaderProps, TableToggleAllRowsSelectedProps } from 'react-table';
|
3
|
+
import { TableData } from '../../types';
|
4
|
+
interface Props<T extends TableData> {
|
5
|
+
headerProps: PropsWithChildren<HeaderProps<T>>;
|
6
|
+
selectSinglePage?: boolean;
|
7
|
+
}
|
8
|
+
interface ReturnType extends TableToggleAllRowsSelectedProps {
|
9
|
+
disabled: boolean;
|
10
|
+
}
|
11
|
+
declare const useHeaderCheckboxProps: <T extends TableData>({ headerProps, selectSinglePage, }: Props<T>) => ReturnType;
|
12
|
+
export default useHeaderCheckboxProps;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ColumnInstance } from 'react-table';
|
3
|
+
import { TableData } from '../../types';
|
4
|
+
interface LoadingCellProps<T extends TableData> {
|
5
|
+
column: ColumnInstance<T>;
|
6
|
+
}
|
7
|
+
declare const LoadingCell: <T extends TableData>({ column }: LoadingCellProps<T>) => JSX.Element;
|
8
|
+
export default LoadingCell;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { ReactText } from 'react';
|
2
|
+
interface Props extends PageButtonWrapperProps {
|
3
|
+
text: ReactText;
|
4
|
+
onClick: () => void;
|
5
|
+
}
|
6
|
+
declare const PageButton: ({ text, onClick, isActive }: Props) => JSX.Element;
|
7
|
+
export interface PageButtonWrapperProps {
|
8
|
+
isActive: boolean;
|
9
|
+
}
|
10
|
+
export default PageButton;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { UsePaginationInstanceProps } from 'react-table';
|
3
|
+
import { TableData } from '../../types';
|
4
|
+
interface Props<T extends TableData> {
|
5
|
+
pageCount: number;
|
6
|
+
pageIndex: number;
|
7
|
+
gotoPage: UsePaginationInstanceProps<T>['gotoPage'];
|
8
|
+
}
|
9
|
+
declare const PaginationButtons: <T extends TableData>({ pageCount, pageIndex, gotoPage }: Props<T>) => JSX.Element;
|
10
|
+
export default PaginationButtons;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
2
|
+
import { paletteColor } from '../../../../styles/types';
|
3
|
+
import { PageButtonWrapperProps } from './PageButton';
|
4
|
+
interface GetPageButtonParams extends PageButtonWrapperProps {
|
5
|
+
theme: DefaultTheme;
|
6
|
+
}
|
7
|
+
export interface PageButtonStyles {
|
8
|
+
color: paletteColor;
|
9
|
+
background: paletteColor;
|
10
|
+
hoverColor: paletteColor;
|
11
|
+
hoverBackground: paletteColor;
|
12
|
+
}
|
13
|
+
export declare const getPageButtonStyles: ({ theme, isActive }: GetPageButtonParams) => PageButtonStyles;
|
14
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Row, UseTableInstanceProps } from 'react-table';
|
3
|
+
import { TableData } from '../../types';
|
4
|
+
interface Props<T extends TableData> {
|
5
|
+
rows: Row<T>[];
|
6
|
+
prepareRow: UseTableInstanceProps<T>['prepareRow'];
|
7
|
+
selectedRowsIds: string[];
|
8
|
+
isLoading: boolean;
|
9
|
+
onRowClick?: (row: Row<T>) => void;
|
10
|
+
rowHasFocus: boolean;
|
11
|
+
rowHeight: number | string;
|
12
|
+
selectableRows?: boolean;
|
13
|
+
setHighlightedRow: React.Dispatch<React.SetStateAction<number>>;
|
14
|
+
tableId: string;
|
15
|
+
}
|
16
|
+
declare const TableBody: <T extends TableData>({ isLoading, onRowClick, prepareRow, rowHasFocus, rowHeight, rows, selectableRows, selectedRowsIds, setHighlightedRow, tableId, }: Props<T>) => JSX.Element;
|
17
|
+
export default TableBody;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ColumnInstance } from 'react-table';
|
2
|
+
import { TableData } from '../../types';
|
3
|
+
interface Props<T extends TableData> {
|
4
|
+
allColumns: ColumnInstance<T>[];
|
5
|
+
}
|
6
|
+
declare const TableBodyLoader: <T extends TableData>({ allColumns }: Props<T>) => JSX.Element;
|
7
|
+
export default TableBodyLoader;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { TableBodyTrStyles } from '../../utils';
|
2
|
+
export interface TableBodyTrProps {
|
3
|
+
isSelected?: boolean;
|
4
|
+
isDisabled?: boolean;
|
5
|
+
rowHasFocus: boolean;
|
6
|
+
}
|
7
|
+
declare const TableBodyTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, import("../tableParts/styled").TrProps & TableBodyTrStyles & TableBodyTrProps, keyof TableBodyTrStyles>;
|
8
|
+
export default TableBodyTr;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { TableBodyTrStyles } from '../../utils';
|
2
|
+
import { TableBodyTrProps } from '../TableBody';
|
3
|
+
export declare const TableBodyTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, import("../tableParts/styled").TrProps & TableBodyTrStyles & TableBodyTrProps, keyof TableBodyTrStyles>;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { HeaderGroup, SortingRule } from 'react-table';
|
3
|
+
import { TableData } from '../../types';
|
4
|
+
interface Props<T extends TableData> {
|
5
|
+
scrollBar: number;
|
6
|
+
headerGroups: HeaderGroup<T>[];
|
7
|
+
headerHeight?: number | string;
|
8
|
+
selectedRowsIds?: string[];
|
9
|
+
sortBy: SortingRule<T>[];
|
10
|
+
}
|
11
|
+
declare const TableHeader: <T extends TableData>({ headerHeight, headerGroups, scrollBar }: Props<T>) => JSX.Element;
|
12
|
+
export default TableHeader;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare type alignType = 'left' | 'center' | 'right';
|
3
|
+
interface Props extends React.HTMLAttributes<HTMLTableDataCellElement> {
|
4
|
+
align?: alignType;
|
5
|
+
isLoading?: boolean;
|
6
|
+
}
|
7
|
+
export declare const TableTd: import("styled-components").StyledComponent<({ children, align, isLoading, ...rest }: Props) => JSX.Element, import("styled-components").DefaultTheme, Props, never>;
|
8
|
+
export default TableTd;
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
declare type Props = React.HTMLAttributes<HTMLTableHeaderCellElement>;
|
3
|
+
export declare const TableTh: import("styled-components").StyledComponent<({ children, ...rest }: Props) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
4
|
+
export default TableTh;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export declare const TableWrapper: import("styled-components").StyledComponent<"table", import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
interface THeadProps {
|
3
|
+
scrollBar: number;
|
4
|
+
}
|
5
|
+
export declare const THead: import("styled-components").StyledComponent<"thead", import("styled-components").DefaultTheme, THeadProps, never>;
|
6
|
+
interface TableBodyProps {
|
7
|
+
bodyHeight: number | string;
|
8
|
+
}
|
9
|
+
export declare const TBody: import("styled-components").StyledComponent<"tbody", import("styled-components").DefaultTheme, TableBodyProps, never>;
|
10
|
+
export interface TrProps {
|
11
|
+
isHeader?: boolean;
|
12
|
+
rowHeight?: number | string;
|
13
|
+
headerHeight?: number | string;
|
14
|
+
}
|
15
|
+
export declare const TableTr: import("styled-components").StyledComponent<"tr", import("styled-components").DefaultTheme, TrProps, never>;
|
16
|
+
export declare const TFoot: import("styled-components").StyledComponent<"tfoot", import("styled-components").DefaultTheme, {}, never>;
|
17
|
+
export {};
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { Row } from 'react-table';
|
2
|
+
import { OnSelectionChange, TableData } from '../types';
|
3
|
+
declare const useRowsSelection: <T extends TableData>(selectedFlatRows: Row<T>[], preSelectAllRows: boolean, onSelectionChange: OnSelectionChange<T> | undefined, allRows: Row<T>[]) => string[];
|
4
|
+
export default useRowsSelection;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { PluginHook } from 'react-table';
|
2
|
+
import { TableProps } from '../Table';
|
3
|
+
import { TableData } from '../types';
|
4
|
+
declare type Props<T extends TableData> = Pick<TableProps<T>, 'actions' | 'withCheckbox' | 'renderActions' | 'selectableRows' | 'actionsHeader'>;
|
5
|
+
declare const useTableHooks: <T extends TableData>({ actions, renderActions, withCheckbox, selectableRows, actionsHeader, }: Props<T>) => PluginHook<T>[];
|
6
|
+
export default useTableHooks;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { Row } from 'react-table';
|
3
|
+
import { TableData } from '../types';
|
4
|
+
interface Props {
|
5
|
+
initialFilter?: string;
|
6
|
+
}
|
7
|
+
interface ReturnType<DataType extends TableData> {
|
8
|
+
filter: string;
|
9
|
+
setFilter: Dispatch<SetStateAction<string>>;
|
10
|
+
selection: Row<DataType>[];
|
11
|
+
setSelection: Dispatch<SetStateAction<Row<DataType>[]>>;
|
12
|
+
}
|
13
|
+
declare const useTableValues: <DataType extends TableData>({ initialFilter }?: Props) => ReturnType<DataType>;
|
14
|
+
export default useTableValues;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Column, Row } from 'react-table';
|
2
|
+
import useTableValues from './hooks/useTableValues';
|
3
|
+
import Table from './Table';
|
4
|
+
import { TableProps } from './Table';
|
5
|
+
import tablePalette, { TablePalette } from './tablePalette';
|
6
|
+
import { ManualPagination, OnSelectionChange, OnSort, RowActions, TableData } from './types';
|
7
|
+
export { Table, TableProps, TableData, tablePalette, useTableValues, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Row, Column, };
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const rolesArray: readonly ["master", "admin", undefined];
|
3
|
+
export declare type roleType = typeof rolesArray[number];
|
4
|
+
interface Props {
|
5
|
+
role: roleType;
|
6
|
+
}
|
7
|
+
declare const Role: ({ role }: Props) => JSX.Element | null;
|
8
|
+
export default Role;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { roleType } from './Role';
|
2
|
+
export interface CustomPersonData {
|
3
|
+
img: string;
|
4
|
+
name: string;
|
5
|
+
role?: roleType;
|
6
|
+
}
|
7
|
+
export interface DataType {
|
8
|
+
person: CustomPersonData;
|
9
|
+
name: string;
|
10
|
+
address: string;
|
11
|
+
date: string;
|
12
|
+
order: number;
|
13
|
+
isDisabled?: boolean;
|
14
|
+
}
|
@@ -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,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,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,34 @@
|
|
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 declare type toastLibraryType = 'dark' | 'error' | 'info' | 'warning' | 'success';
|
6
|
+
export declare const typeMap: Record<toastType, toastLibraryType>;
|
7
|
+
export interface ToastProps {
|
8
|
+
type?: toastType;
|
9
|
+
content?: ReactNode;
|
10
|
+
icon?: IconProps;
|
11
|
+
actionLabel?: string;
|
12
|
+
onActionClick?: () => void;
|
13
|
+
autoClose?: false;
|
14
|
+
}
|
15
|
+
export interface ToastContentProps {
|
16
|
+
title: ReactNode;
|
17
|
+
content?: ReactNode;
|
18
|
+
icon: IconProps;
|
19
|
+
actionLabel?: string;
|
20
|
+
onActionClick?: () => void;
|
21
|
+
}
|
22
|
+
export interface ToastInterface {
|
23
|
+
Container: React.FC<ToastContainerProps>;
|
24
|
+
show: (title: ReactNode, options: ToastProps) => string | undefined;
|
25
|
+
dismiss: (toastId: string | undefined) => void;
|
26
|
+
success: (title: ReactNode, options?: ToastProps) => string | undefined;
|
27
|
+
error: (title: ReactNode, options?: ToastProps) => string | undefined;
|
28
|
+
info: (title: ReactNode, options?: ToastProps) => string | undefined;
|
29
|
+
warning: (title: ReactNode, options?: ToastProps) => string | undefined;
|
30
|
+
standard: (title: ReactNode, options?: ToastProps) => string | undefined;
|
31
|
+
}
|
32
|
+
export interface ToastContainerProps {
|
33
|
+
position: ToastPosition;
|
34
|
+
}
|
package/dist/index.css
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
.DS-ReactTable {
|
2
|
+
position: relative;
|
3
|
+
display: -webkit-box;
|
4
|
+
display: -ms-flexbox;
|
5
|
+
display: flex;
|
6
|
+
-webkit-box-orient: vertical;
|
7
|
+
-webkit-box-direction: normal;
|
8
|
+
-ms-flex-direction: column;
|
9
|
+
flex-direction: column;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.DS-ReactTable .DS-rt-table {
|
14
|
+
-webkit-box-flex: 1;
|
15
|
+
-ms-flex: 1;
|
16
|
+
flex: 1;
|
17
|
+
display: -webkit-box;
|
18
|
+
display: -ms-flexbox;
|
19
|
+
display: flex;
|
20
|
+
-webkit-box-orient: vertical;
|
21
|
+
-webkit-box-direction: normal;
|
22
|
+
-ms-flex-direction: column;
|
23
|
+
flex-direction: column;
|
24
|
+
-webkit-box-align: stretch;
|
25
|
+
-ms-flex-align: stretch;
|
26
|
+
align-items: stretch;
|
27
|
+
width: 100%;
|
28
|
+
border-collapse: collapse;
|
29
|
+
overflow-x: auto;
|
30
|
+
overflow-y: hidden;
|
31
|
+
}
|
32
|
+
|
33
|
+
.DS-ReactTable .DS-rt-thead {
|
34
|
+
-webkit-box-flex: 1;
|
35
|
+
-ms-flex: 1 0 auto;
|
36
|
+
flex: 1 0 auto;
|
37
|
+
display: -webkit-box;
|
38
|
+
display: -ms-flexbox;
|
39
|
+
display: flex;
|
40
|
+
-webkit-box-orient: vertical;
|
41
|
+
-webkit-box-direction: normal;
|
42
|
+
-ms-flex-direction: column;
|
43
|
+
flex-direction: column;
|
44
|
+
-webkit-user-select: none;
|
45
|
+
-moz-user-select: none;
|
46
|
+
-ms-user-select: none;
|
47
|
+
user-select: none;
|
48
|
+
cursor: default;
|
49
|
+
}
|
50
|
+
|
51
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-th {
|
52
|
+
position: relative;
|
53
|
+
}
|
54
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-td {
|
55
|
+
line-height: normal;
|
56
|
+
position: relative;
|
57
|
+
}
|
58
|
+
|
59
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-resizable-header:last-child {
|
60
|
+
overflow: hidden;
|
61
|
+
}
|
62
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-resizable-header-content {
|
63
|
+
overflow: hidden;
|
64
|
+
text-overflow: ellipsis;
|
65
|
+
}
|
66
|
+
|
67
|
+
.DS-ReactTable .DS-rt-thead.DS-header .DS-rt-th:after {
|
68
|
+
content: "";
|
69
|
+
display: block;
|
70
|
+
position: absolute;
|
71
|
+
}
|
72
|
+
|
73
|
+
.DS-ReactTable .DS-rt-tbody {
|
74
|
+
display: flex;
|
75
|
+
flex-direction: column;
|
76
|
+
overflow: auto;
|
77
|
+
}
|
78
|
+
|
79
|
+
.DS-ReactTable .DS-rt-tbody .DS-rt-tr-group {
|
80
|
+
flex: none;
|
81
|
+
}
|
82
|
+
|
83
|
+
.DS-ReactTable .DS-rt-tr-group {
|
84
|
+
-webkit-box-flex: 1;
|
85
|
+
-ms-flex: 1 0 auto;
|
86
|
+
flex: 1 0 auto;
|
87
|
+
display: -webkit-box;
|
88
|
+
display: -ms-flexbox;
|
89
|
+
display: flex;
|
90
|
+
-webkit-box-orient: vertical;
|
91
|
+
-webkit-box-direction: normal;
|
92
|
+
-ms-flex-direction: column;
|
93
|
+
flex-direction: column;
|
94
|
+
-webkit-box-align: stretch;
|
95
|
+
-ms-flex-align: stretch;
|
96
|
+
align-items: stretch;
|
97
|
+
cursor: pointer;
|
98
|
+
}
|
99
|
+
|
100
|
+
.DS-ReactTable .DS-rt-tr {
|
101
|
+
flex: 1 0 auto;
|
102
|
+
display: inline-flex;
|
103
|
+
flex-direction: row;
|
104
|
+
flex-wrap: wrap;
|
105
|
+
align-content: center;
|
106
|
+
justify-content: center;
|
107
|
+
align-items: center;
|
108
|
+
}
|
109
|
+
|
110
|
+
.DS-ReactTable .DS-rt-th {
|
111
|
+
-webkit-box-flex: 1;
|
112
|
+
-ms-flex: 1;
|
113
|
+
flex: 1;
|
114
|
+
white-space: nowrap;
|
115
|
+
vertical-align: middle;
|
116
|
+
align-self: center;
|
117
|
+
overflow: hidden;
|
118
|
+
}
|
119
|
+
|
120
|
+
.DS-ReactTable .DS-rt-td {
|
121
|
+
-webkit-box-flex: 1;
|
122
|
+
-ms-flex: 1;
|
123
|
+
flex: 1;
|
124
|
+
white-space: nowrap;
|
125
|
+
text-overflow: ellipsis;
|
126
|
+
align-self: center;
|
127
|
+
overflow: hidden;
|
128
|
+
}
|
@@ -0,0 +1,128 @@
|
|
1
|
+
.DS-ReactTable {
|
2
|
+
position: relative;
|
3
|
+
display: -webkit-box;
|
4
|
+
display: -ms-flexbox;
|
5
|
+
display: flex;
|
6
|
+
-webkit-box-orient: vertical;
|
7
|
+
-webkit-box-direction: normal;
|
8
|
+
-ms-flex-direction: column;
|
9
|
+
flex-direction: column;
|
10
|
+
overflow: hidden;
|
11
|
+
}
|
12
|
+
|
13
|
+
.DS-ReactTable .DS-rt-table {
|
14
|
+
-webkit-box-flex: 1;
|
15
|
+
-ms-flex: 1;
|
16
|
+
flex: 1;
|
17
|
+
display: -webkit-box;
|
18
|
+
display: -ms-flexbox;
|
19
|
+
display: flex;
|
20
|
+
-webkit-box-orient: vertical;
|
21
|
+
-webkit-box-direction: normal;
|
22
|
+
-ms-flex-direction: column;
|
23
|
+
flex-direction: column;
|
24
|
+
-webkit-box-align: stretch;
|
25
|
+
-ms-flex-align: stretch;
|
26
|
+
align-items: stretch;
|
27
|
+
width: 100%;
|
28
|
+
border-collapse: collapse;
|
29
|
+
overflow-x: auto;
|
30
|
+
overflow-y: hidden;
|
31
|
+
}
|
32
|
+
|
33
|
+
.DS-ReactTable .DS-rt-thead {
|
34
|
+
-webkit-box-flex: 1;
|
35
|
+
-ms-flex: 1 0 auto;
|
36
|
+
flex: 1 0 auto;
|
37
|
+
display: -webkit-box;
|
38
|
+
display: -ms-flexbox;
|
39
|
+
display: flex;
|
40
|
+
-webkit-box-orient: vertical;
|
41
|
+
-webkit-box-direction: normal;
|
42
|
+
-ms-flex-direction: column;
|
43
|
+
flex-direction: column;
|
44
|
+
-webkit-user-select: none;
|
45
|
+
-moz-user-select: none;
|
46
|
+
-ms-user-select: none;
|
47
|
+
user-select: none;
|
48
|
+
cursor: default;
|
49
|
+
}
|
50
|
+
|
51
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-th {
|
52
|
+
position: relative;
|
53
|
+
}
|
54
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-td {
|
55
|
+
line-height: normal;
|
56
|
+
position: relative;
|
57
|
+
}
|
58
|
+
|
59
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-resizable-header:last-child {
|
60
|
+
overflow: hidden;
|
61
|
+
}
|
62
|
+
.DS-ReactTable .DS-rt-thead .DS-rt-resizable-header-content {
|
63
|
+
overflow: hidden;
|
64
|
+
text-overflow: ellipsis;
|
65
|
+
}
|
66
|
+
|
67
|
+
.DS-ReactTable .DS-rt-thead.DS-header .DS-rt-th:after {
|
68
|
+
content: "";
|
69
|
+
display: block;
|
70
|
+
position: absolute;
|
71
|
+
}
|
72
|
+
|
73
|
+
.DS-ReactTable .DS-rt-tbody {
|
74
|
+
display: flex;
|
75
|
+
flex-direction: column;
|
76
|
+
overflow: auto;
|
77
|
+
}
|
78
|
+
|
79
|
+
.DS-ReactTable .DS-rt-tbody .DS-rt-tr-group {
|
80
|
+
flex: none;
|
81
|
+
}
|
82
|
+
|
83
|
+
.DS-ReactTable .DS-rt-tr-group {
|
84
|
+
-webkit-box-flex: 1;
|
85
|
+
-ms-flex: 1 0 auto;
|
86
|
+
flex: 1 0 auto;
|
87
|
+
display: -webkit-box;
|
88
|
+
display: -ms-flexbox;
|
89
|
+
display: flex;
|
90
|
+
-webkit-box-orient: vertical;
|
91
|
+
-webkit-box-direction: normal;
|
92
|
+
-ms-flex-direction: column;
|
93
|
+
flex-direction: column;
|
94
|
+
-webkit-box-align: stretch;
|
95
|
+
-ms-flex-align: stretch;
|
96
|
+
align-items: stretch;
|
97
|
+
cursor: pointer;
|
98
|
+
}
|
99
|
+
|
100
|
+
.DS-ReactTable .DS-rt-tr {
|
101
|
+
flex: 1 0 auto;
|
102
|
+
display: inline-flex;
|
103
|
+
flex-direction: row;
|
104
|
+
flex-wrap: wrap;
|
105
|
+
align-content: center;
|
106
|
+
justify-content: center;
|
107
|
+
align-items: center;
|
108
|
+
}
|
109
|
+
|
110
|
+
.DS-ReactTable .DS-rt-th {
|
111
|
+
-webkit-box-flex: 1;
|
112
|
+
-ms-flex: 1;
|
113
|
+
flex: 1;
|
114
|
+
white-space: nowrap;
|
115
|
+
vertical-align: middle;
|
116
|
+
align-self: center;
|
117
|
+
overflow: hidden;
|
118
|
+
}
|
119
|
+
|
120
|
+
.DS-ReactTable .DS-rt-td {
|
121
|
+
-webkit-box-flex: 1;
|
122
|
+
-ms-flex: 1;
|
123
|
+
flex: 1;
|
124
|
+
white-space: nowrap;
|
125
|
+
text-overflow: ellipsis;
|
126
|
+
align-self: center;
|
127
|
+
overflow: hidden;
|
128
|
+
}
|