@fattureincloud/fic-design-system 0.10.2 → 0.11.1
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.
- 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,8 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { bannerColorType } from './Banner';
|
|
3
|
+
interface MappedColors {
|
|
4
|
+
bgColor: string;
|
|
5
|
+
textColor: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const mapColors: (theme: DefaultTheme, color: bannerColorType) => MappedColors;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { TChip, UnstyledChipProps, UnstyledChipState } from './types';
|
|
3
|
+
export declare class UnstyledChip extends Component<UnstyledChipProps, UnstyledChipState> {
|
|
4
|
+
render(): JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
declare const Chip: TChip;
|
|
7
|
+
export default Chip;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChipsProps } from '../types';
|
|
3
|
+
export declare const StyledChipWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ChipsProps, never>;
|
|
4
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ChipsProps {
|
|
3
|
+
text?: string | number;
|
|
4
|
+
statusEdit?: boolean;
|
|
5
|
+
closeAction?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare type TChip = React.FunctionComponent<ChipsProps>;
|
|
8
|
+
export interface UnstyledChipProps extends ChipsProps {
|
|
9
|
+
}
|
|
10
|
+
export interface UnstyledChipState {
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Props {
|
|
3
|
+
show?: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
renderHeader?: () => JSX.Element;
|
|
6
|
+
renderFooter?: () => JSX.Element;
|
|
7
|
+
actionClose?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare type TDrawer = React.FunctionComponent<Props>;
|
|
10
|
+
export interface UnstyledDrawerProps extends Props {
|
|
11
|
+
}
|
|
12
|
+
export interface UnstyledDrawerState {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { checkboxStatus, CheckboxStyles } from '../types';
|
|
2
|
+
export interface CheckboxInputProps {
|
|
3
|
+
value: checkboxStatus;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
large?: boolean;
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Input: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, CheckboxStyles & CheckboxInputProps, keyof CheckboxStyles>;
|
|
9
|
+
export default Input;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MappedLabelProps } from '../types';
|
|
2
|
+
export interface CheckboxLabelProps {
|
|
3
|
+
large?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
hasError: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Label: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, MappedLabelProps & CheckboxLabelProps, keyof MappedLabelProps>;
|
|
8
|
+
export default Label;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
interface ReturnType {
|
|
3
|
+
date: Date | null;
|
|
4
|
+
setDate: Dispatch<SetStateAction<Date | null>>;
|
|
5
|
+
value: string | null;
|
|
6
|
+
setValue: Dispatch<SetStateAction<string | null>>;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
initialDate?: Date | null;
|
|
10
|
+
initialValue?: string | null;
|
|
11
|
+
}
|
|
12
|
+
declare const useDatePickerValues: ({ initialDate, initialValue }?: Props) => ReturnType;
|
|
13
|
+
export default useDatePickerValues;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const CodeInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
|
+
gap: number | undefined;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const SingleNumberInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../common/types").CommonFormTypes & {
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
onFocus?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
|
|
10
|
+
onBlur?: import("react").FocusEventHandler<HTMLInputElement> | undefined;
|
|
11
|
+
onChange?: import("react").ChangeEventHandler<HTMLInputElement> | undefined;
|
|
12
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
13
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
14
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
15
|
+
autoFocus?: boolean | undefined;
|
|
16
|
+
required?: boolean | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
actionIcon?: import("../../../../icon").IconProps | undefined;
|
|
19
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
20
|
+
isPrefilled?: boolean | undefined;
|
|
21
|
+
isTransparent?: boolean | undefined;
|
|
22
|
+
leadingIcon?: import("../../../../icon").IconProps | undefined;
|
|
23
|
+
placeholder?: import("react").ReactText | undefined;
|
|
24
|
+
setValue?: import("react").Dispatch<import("react").SetStateAction<string>> | undefined;
|
|
25
|
+
strict?: boolean | undefined;
|
|
26
|
+
tooltip?: import("../../../../tooltip").TooltipProps | undefined;
|
|
27
|
+
unitDropdownProps?: import("../UnitDropdown").UnitDropdownProps | undefined;
|
|
28
|
+
value?: string | number | null | undefined;
|
|
29
|
+
} & import("react").RefAttributes<HTMLInputElement | null>>, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { CodeInputProps } from '../../types';
|
|
3
|
+
declare type CodInputHooks = {
|
|
4
|
+
handleInput: (v: string) => void;
|
|
5
|
+
handlePaste: (e: React.ClipboardEvent) => void;
|
|
6
|
+
refs: React.MutableRefObject<(HTMLInputElement | null)[]>;
|
|
7
|
+
setCurrentIndex: Dispatch<SetStateAction<number>>;
|
|
8
|
+
values: (string | null)[];
|
|
9
|
+
};
|
|
10
|
+
declare const useCodeInputHooks: ({ fieldsCount, onChange, status, }: Omit<CodeInputProps, 'helper' | 'className'>) => CodInputHooks;
|
|
11
|
+
export default useCodeInputHooks;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const SelectWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PlaceholderProps } from 'react-select';
|
|
2
|
+
import { OptionType } from './Option';
|
|
3
|
+
declare const Placeholder: <O extends OptionType = OptionType, IsMulti extends boolean = false>({ children, }: PlaceholderProps<O, IsMulti, import("react-select").GroupTypeBase<O>>) => JSX.Element;
|
|
4
|
+
export default Placeholder;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { GridCard } from '.';
|
|
4
|
+
import { GridCardProps } from './types';
|
|
5
|
+
export declare const Template: Story<GridCardProps>;
|
|
6
|
+
export declare const CustomData: Story<GridCardProps>;
|
|
7
|
+
declare const GridCardStories: Meta<ComponentProps<typeof GridCard>>;
|
|
8
|
+
export default GridCardStories;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const Row: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const InnerContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
5
|
+
cardBackgroundColor?: string | undefined;
|
|
6
|
+
isLastElement?: boolean | undefined;
|
|
7
|
+
}, never>;
|
|
8
|
+
export declare const IconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
9
|
+
iconBackgroundColor?: string | undefined;
|
|
10
|
+
}, never>;
|
|
11
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../icon/Icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
12
|
+
export declare const TextContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const Label: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export declare const Value: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const Description: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IconProps } from 'components/icon';
|
|
2
|
+
import { ReactElement, ReactNode } from 'react';
|
|
3
|
+
import { paletteColor } from '../../styles/types';
|
|
4
|
+
export interface GridCardProps {
|
|
5
|
+
data: CardData[][];
|
|
6
|
+
renderCustomData?: () => ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export interface CardData {
|
|
9
|
+
icon?: IconProps;
|
|
10
|
+
label?: string;
|
|
11
|
+
value?: string | ReactNode;
|
|
12
|
+
description?: string;
|
|
13
|
+
cardBackgroundColor?: paletteColor;
|
|
14
|
+
iconBackgroundColor?: paletteColor;
|
|
15
|
+
renderCustomData?: () => ReactElement;
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
export declare const getIconBackgroundColor: (theme: DefaultTheme, iconColor?: "black" | "white" | "grey" | "blue" | "indigo" | "yellow" | "orange" | "red" | "green" | "fuchsia" | "pink" | "cyan" | "primary" | undefined, customIconBackground?: string | undefined) => string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
options: Array<{
|
|
4
|
+
key: number;
|
|
5
|
+
label: string;
|
|
6
|
+
}>;
|
|
7
|
+
value: number;
|
|
8
|
+
onClick: (option: {
|
|
9
|
+
key: number;
|
|
10
|
+
label: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
renderOption?: (props: {
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
isChecked: boolean;
|
|
16
|
+
label: string;
|
|
17
|
+
}) => JSX.Element;
|
|
18
|
+
optionsSpacing?: number;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
inline?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const RadioButtonGroup: (props: Props) => JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { RadioButtonGroup } from '.';
|
|
4
|
+
export declare const WithKnobs: () => JSX.Element;
|
|
5
|
+
declare const RadioButtonGroupStories: Meta<ComponentProps<typeof RadioButtonGroup>>;
|
|
6
|
+
export default RadioButtonGroupStories;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InlineMessagesProps, StyledContentProps } from '../types';
|
|
3
|
+
export declare const StyledIconTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const StyledInlineMessageWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, InlineMessagesProps, never>;
|
|
6
|
+
export declare const StyledIconContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledContentProps, never>;
|
|
7
|
+
export declare const StyledCloseIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const StyledCloseIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { InlineMessagesProps } from './types';
|
|
4
|
+
export declare const Colors: () => JSX.Element;
|
|
5
|
+
export declare const Sizes: () => JSX.Element;
|
|
6
|
+
declare const InlineMessageStories: Meta<InlineMessagesProps>;
|
|
7
|
+
export default InlineMessageStories;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconProps } from '../icon';
|
|
3
|
+
export declare type MessageType = 'standard' | 'error' | 'info' | 'warning' | 'success';
|
|
4
|
+
export interface InlineMessagesProps {
|
|
5
|
+
icon?: IconProps;
|
|
6
|
+
renderIcon?: () => JSX.Element;
|
|
7
|
+
title?: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
size?: 'medium' | 'large';
|
|
10
|
+
type?: MessageType;
|
|
11
|
+
renderTitle?: () => JSX.Element;
|
|
12
|
+
renderContent?: () => JSX.Element;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
closeIcon?: IconProps;
|
|
15
|
+
renderCloseIcon?: () => JSX.Element;
|
|
16
|
+
componentStyle?: InlineMessageStyle;
|
|
17
|
+
}
|
|
18
|
+
export interface InlineMessageStyle {
|
|
19
|
+
root?: Record<string, unknown>;
|
|
20
|
+
icon?: Record<string, unknown>;
|
|
21
|
+
contentWrapper?: Record<string, unknown>;
|
|
22
|
+
title?: Record<string, unknown>;
|
|
23
|
+
content?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
export interface UnstyledInlineMessagePropsInterface extends InlineMessagesProps {
|
|
26
|
+
}
|
|
27
|
+
export interface StyledContentProps {
|
|
28
|
+
margin: boolean;
|
|
29
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { SizeProp } from '@fortawesome/fontawesome-svg-core';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ButtonProps } from '../buttons
|
|
3
|
+
import { ButtonProps } from '../buttons';
|
|
3
4
|
export interface ModalStateInterface {
|
|
4
5
|
topAttachmentHeight: number;
|
|
5
6
|
fullScreenHeight: number;
|
|
@@ -28,6 +29,8 @@ export interface ModalPropsInterface {
|
|
|
28
29
|
contentEl: HTMLDivElement;
|
|
29
30
|
}) => void;
|
|
30
31
|
isConfirmModal?: boolean;
|
|
32
|
+
sizeCloseX?: SizeProp;
|
|
33
|
+
zIndex?: number;
|
|
31
34
|
}
|
|
32
35
|
export interface StyledModalBoxProps {
|
|
33
36
|
isFullscreen?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const THead: import("styled-components").StyledComponent<"thead", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { RadioButtonInterface } from './typings/radioButton';
|
|
4
|
+
export declare const WithKnobs: () => JSX.Element;
|
|
5
|
+
declare const RadioButtonStories: Meta<RadioButtonInterface>;
|
|
6
|
+
export default RadioButtonStories;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface RadioInterface {
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
isChecked: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface LabelInterface {
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface RadioButtonInterface extends RadioInterface {
|
|
10
|
+
className?: string;
|
|
11
|
+
label: string;
|
|
12
|
+
inline?: boolean;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
optionsSpacing?: number;
|
|
15
|
+
renderOption?: (props: {
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
isChecked: boolean;
|
|
18
|
+
label: string;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
}
|
|
21
|
+
export declare type TRadioButton = React.FunctionComponent<RadioButtonInterface>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { colors } from '../../styles/types';
|
|
2
|
-
export declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
|
|
3
2
|
export declare const SwitchButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
3
|
export declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
|
|
5
4
|
color: colors;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
|
2
1
|
export declare type switchColors = 'blue' | 'green';
|
|
3
2
|
export interface SwitchProps {
|
|
4
3
|
checked: boolean;
|
|
5
|
-
onChange:
|
|
4
|
+
onChange: (e: boolean) => void;
|
|
6
5
|
color?: switchColors;
|
|
7
6
|
}
|
|
@@ -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,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { RowActions, TableData } from '../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
row: Row<T>;
|
|
6
|
+
actions?: RowActions<T>;
|
|
7
|
+
renderActions?: () => JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
declare const ActionsCell: <T extends TableData>({ row, actions, renderActions }: Props<T>) => JSX.Element;
|
|
10
|
+
export default ActionsCell;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UsePaginationInstanceProps } from 'react-table';
|
|
3
|
+
import { TableData } from '../types';
|
|
4
|
+
interface Props<T extends TableData> extends Omit<UsePaginationInstanceProps<T>, 'page' | 'pageOptions' | 'setPageSize'> {
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
}
|
|
7
|
+
declare const Pagination: <T extends TableData>({ canPreviousPage, nextPage, previousPage, canNextPage, gotoPage, pageCount, pageIndex, }: Props<T>) => JSX.Element;
|
|
8
|
+
export default Pagination;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Row, UseTableInstanceProps } from 'react-table';
|
|
2
|
+
import { TableData } from '../types';
|
|
3
|
+
interface Props<T extends TableData> {
|
|
4
|
+
rows: Row<T>[];
|
|
5
|
+
prepareRow: UseTableInstanceProps<T>['prepareRow'];
|
|
6
|
+
selectedRowsIds: string[];
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const TableBody: <T extends TableData>({ isLoading, rows, prepareRow, selectedRowsIds }: Props<T>) => JSX.Element;
|
|
10
|
+
export interface TableBodyTrProps {
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export default TableBody;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HeaderGroup } from 'react-table';
|
|
2
|
+
import { TableData } from '../types';
|
|
3
|
+
interface Props<T extends TableData> {
|
|
4
|
+
headerGroups: HeaderGroup<T>[];
|
|
5
|
+
}
|
|
6
|
+
declare const TableHeader: <T extends TableData>({ headerGroups }: Props<T>) => JSX.Element;
|
|
7
|
+
export default TableHeader;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { RowActions, TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
row: Row<T>;
|
|
6
|
+
actions?: RowActions<T>;
|
|
7
|
+
renderActions?: () => JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
declare const ActionsCell: <T extends TableData>({ row, actions, renderActions }: Props<T>) => JSX.Element;
|
|
10
|
+
export default ActionsCell;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { RowAction, TableData } from '../../types';
|
|
4
|
+
interface Props<T extends TableData> {
|
|
5
|
+
row: Row<T>;
|
|
6
|
+
actions: RowAction<T>[];
|
|
7
|
+
rowIsDisabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const DropdownActions: <T extends TableData>({ row, actions, rowIsDisabled }: Props<T>) => JSX.Element;
|
|
10
|
+
export default DropdownActions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Row } from 'react-table';
|
|
3
|
+
import { DropdownItemType } from '../../../dropdown/types';
|
|
4
|
+
import { RowAction, TableData } from '../../types';
|
|
5
|
+
interface Props<T extends TableData> {
|
|
6
|
+
action: RowAction<T>;
|
|
7
|
+
row: Row<T>;
|
|
8
|
+
rowIsDisabled?: boolean;
|
|
9
|
+
type?: DropdownItemType;
|
|
10
|
+
}
|
|
11
|
+
declare const PrimaryAction: <T extends TableData>({ action, row, rowIsDisabled, type, }: Props<T>) => JSX.Element | null;
|
|
12
|
+
export default PrimaryAction;
|