@fattureincloud/fic-design-system 0.4.25 → 0.4.28
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +519 -0
- package/dist/common/components/Label.d.ts +3 -0
- package/dist/common/types/label.d.ts +12 -0
- package/dist/common/utils/label.d.ts +5 -0
- package/dist/components/dropdown/DropdownImpl.d.ts +1 -1
- package/dist/components/dropdown/components/DefaultDropdown.d.ts +3 -13
- package/dist/components/dropdown/components/DefaultTrigger.d.ts +2 -4
- package/dist/components/dropdown/components/Item.d.ts +1 -4
- package/dist/components/dropdown/dropdownPalette.d.ts +14 -0
- package/dist/components/dropdown/types.d.ts +22 -3
- package/dist/components/dropdown/utils.d.ts +1 -1
- package/dist/components/form/checkbox/Checkbox.d.ts +12 -14
- package/dist/components/form/checkbox/checkbox.stories.d.ts +1 -1
- package/dist/components/form/checkbox/checkboxPalette.d.ts +1 -14
- package/dist/components/form/checkbox/hooks/useCheckboxValue.d.ts +3 -3
- package/dist/components/form/checkbox/index.d.ts +4 -5
- package/dist/components/form/checkbox/styled.d.ts +3 -0
- package/dist/components/form/checkbox/types.d.ts +45 -8
- package/dist/components/form/checkbox/utils.d.ts +5 -16
- package/dist/components/form/common/components/ClickableWrapper.d.ts +2 -0
- package/dist/components/form/common/components/HiddenInput.d.ts +2 -0
- package/dist/components/form/inputText/InputText.d.ts +2 -2
- package/dist/components/form/radio/Radio.d.ts +14 -0
- package/dist/components/form/radio/hooks/useRadioValue.d.ts +10 -0
- package/dist/components/form/radio/index.d.ts +4 -0
- package/dist/components/form/radio/radio.stories.d.ts +6 -0
- package/dist/components/form/radio/radioPalette.d.ts +3 -0
- package/dist/components/form/radio/styled.d.ts +3 -0
- package/dist/components/form/radio/types.d.ts +53 -0
- package/dist/components/form/radio/utils.d.ts +8 -0
- package/dist/components/form/radioGroup/RadioGroup.d.ts +13 -0
- package/dist/components/form/radioGroup/index.d.ts +2 -0
- package/dist/components/form/radioGroup/radioGroup.stories.d.ts +5 -0
- package/dist/components/form/radioGroup/styled.d.ts +2 -0
- package/dist/components/form/radioGroup/types.d.ts +17 -0
- package/dist/components/inlineMessage/InlineMessage.d.ts +22 -0
- package/dist/components/inlineMessage/index.d.ts +3 -0
- package/dist/components/inlineMessage/inlineMessage.stories.d.ts +5 -0
- package/dist/components/inlineMessage/inlineMessagePalette.d.ts +3 -0
- package/dist/components/inlineMessage/styled.d.ts +11 -0
- package/dist/components/inlineMessage/types.d.ts +45 -0
- package/dist/components/inlineMessage/utils.d.ts +3 -0
- package/dist/components/toast/Toast.d.ts +2 -0
- package/dist/components/toast/components/{toastContent.d.ts → ToastContent.d.ts} +10 -13
- package/dist/components/toast/index.d.ts +2 -1
- package/dist/components/toast/styled.d.ts +9 -0
- package/dist/components/toast/toast.stories.d.ts +3 -4
- package/dist/components/toast/toastPalette.d.ts +3 -0
- package/dist/components/toast/types.d.ts +50 -0
- package/dist/components/toast/utils.d.ts +3 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/styles/theme.d.ts +6 -0
- package/package.json +1 -1
- package/dist/components/form/datepicker/StyledDatePicker.d.ts +0 -1
- package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +0 -13
- package/dist/components/form/select/components/Placeholder.d.ts +0 -4
- package/dist/components/table/components/ActionsCell.d.ts +0 -10
- package/dist/components/table/components/SortIndicator.d.ts +0 -6
- package/dist/components/table/components/TableBody.d.ts +0 -14
- package/dist/components/table/components/TableFoot.d.ts +0 -2
- package/dist/components/table/components/TableHeader.d.ts +0 -7
- package/dist/components/table/components/tableBody/TableBodyLoader.d.ts +0 -7
- package/dist/components/table/components/tableBody/styled.d.ts +0 -3
- package/dist/components/toast/toast.d.ts +0 -2
@@ -1,16 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
import { checkboxParts, checkboxState, checkboxStatus } from './types';
|
3
|
-
export declare type CheckboxPalette = {
|
4
|
-
input: {
|
5
|
-
[k in checkboxState]: {
|
6
|
-
[k in checkboxStatus]: {
|
7
|
-
[k in checkboxParts]: paletteColor;
|
8
|
-
};
|
9
|
-
};
|
10
|
-
};
|
11
|
-
label: {
|
12
|
-
[k in checkboxState]: paletteColor;
|
13
|
-
};
|
14
|
-
};
|
1
|
+
import { CheckboxPalette } from './types';
|
15
2
|
declare const checkboxPalette: CheckboxPalette;
|
16
3
|
export default checkboxPalette;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { CheckboxStatus } from '../types';
|
2
2
|
interface UseCheckboxValueReturn {
|
3
|
-
status:
|
3
|
+
status: CheckboxStatus;
|
4
4
|
value: boolean;
|
5
5
|
setCheck: () => void;
|
6
6
|
setUncheck: () => void;
|
7
7
|
setIndeterminate: () => void;
|
8
8
|
toggleCheckbox: () => void;
|
9
9
|
}
|
10
|
-
declare const useCheckboxValue: (initialValue?:
|
10
|
+
declare const useCheckboxValue: (initialValue?: CheckboxStatus | boolean) => UseCheckboxValueReturn;
|
11
11
|
export default useCheckboxValue;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export { Checkbox, useCheckboxValue, CheckboxProps, checkboxPalette, CheckboxPalette, checkboxStatus };
|
1
|
+
export { default as Checkbox } from './Checkbox';
|
2
|
+
export { default as checkboxPalette } from './checkboxPalette';
|
3
|
+
export { default as useCheckboxValue } from './hooks/useCheckboxValue';
|
4
|
+
export { CheckboxProps, CheckboxStatus, CheckboxPalette } from './types';
|
@@ -1,7 +1,21 @@
|
|
1
|
+
import { ChangeEvent, InputHTMLAttributes } from 'react';
|
1
2
|
import { paletteColor } from '../../../styles/types';
|
2
|
-
|
3
|
-
|
4
|
-
export declare
|
3
|
+
import { InputHelperProps } from '../inputHelper';
|
4
|
+
import { LabelProps } from '../label';
|
5
|
+
export declare enum CheckboxStatus {
|
6
|
+
CHECKED = "checked",
|
7
|
+
UNCHECKED = "unchecked",
|
8
|
+
INDETERMINATE = "indeterminate"
|
9
|
+
}
|
10
|
+
declare enum CheckboxState {
|
11
|
+
NORMAL = "normal",
|
12
|
+
ERROR = "error"
|
13
|
+
}
|
14
|
+
declare enum CheckboxParts {
|
15
|
+
TICKCOLOR = "tickColor",
|
16
|
+
BACKGROUNDCOLOR = "backgroundColor",
|
17
|
+
BORDERCOLOR = "borderColor"
|
18
|
+
}
|
5
19
|
export interface CheckboxStyles {
|
6
20
|
height: string;
|
7
21
|
width: string;
|
@@ -11,9 +25,32 @@ export interface CheckboxStyles {
|
|
11
25
|
cursor: string;
|
12
26
|
opacity: number;
|
13
27
|
}
|
14
|
-
export interface
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
28
|
+
export interface CheckboxInputProps {
|
29
|
+
value: CheckboxStatus;
|
30
|
+
disabled?: boolean;
|
31
|
+
large?: boolean;
|
32
|
+
hasError: boolean;
|
33
|
+
}
|
34
|
+
export interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'>, Omit<LabelProps, 'hasError'> {
|
35
|
+
onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
|
36
|
+
text?: string;
|
37
|
+
helper?: InputHelperProps;
|
38
|
+
className?: string;
|
39
|
+
onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
40
|
+
}
|
41
|
+
export interface CheckboxProps extends Omit<CheckboxImplProps, 'value'> {
|
42
|
+
value: CheckboxImplProps['value'] | boolean;
|
19
43
|
}
|
44
|
+
export declare type CheckboxPalette = {
|
45
|
+
input: {
|
46
|
+
[k in CheckboxState]: {
|
47
|
+
[k in CheckboxStatus]: {
|
48
|
+
[k in CheckboxParts]: paletteColor;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
};
|
52
|
+
label: {
|
53
|
+
[k in CheckboxState]: paletteColor;
|
54
|
+
};
|
55
|
+
};
|
56
|
+
export {};
|
@@ -1,24 +1,13 @@
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
2
2
|
import { IconProps } from '../../icon';
|
3
|
-
import { CheckboxInputProps } from './
|
4
|
-
import { CheckboxLabelProps } from './components/Label';
|
5
|
-
import { checkboxStatus, CheckboxStyles } from './types';
|
3
|
+
import { CheckboxInputProps, CheckboxStatus, CheckboxStyles } from './types';
|
6
4
|
interface InputMapParams extends CheckboxInputProps {
|
7
5
|
theme: DefaultTheme;
|
8
6
|
}
|
9
7
|
export declare const getInputStyle: ({ theme, value, disabled, large, hasError }: InputMapParams) => CheckboxStyles;
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
export declare const getLabelStyle: ({ disabled, large, theme, hasError }: LabelMapProps) => {
|
14
|
-
fontSize: string;
|
15
|
-
cursor: string;
|
16
|
-
opacity: number;
|
17
|
-
color: string;
|
18
|
-
};
|
19
|
-
declare type statusIconType = {
|
20
|
-
[k in checkboxStatus]: IconProps['icon'] | null;
|
8
|
+
declare type StatusIconType = {
|
9
|
+
[k in CheckboxStatus]: IconProps['icon'] | null;
|
21
10
|
};
|
22
|
-
export declare const statusIcon:
|
23
|
-
export declare const convertToStatus: (value: boolean |
|
11
|
+
export declare const statusIcon: StatusIconType;
|
12
|
+
export declare const convertToStatus: (value: boolean | CheckboxStatus) => CheckboxStatus;
|
24
13
|
export {};
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
2
2
|
import { LabelProps } from '../label';
|
3
3
|
import { InputElementProps } from './types';
|
4
4
|
export declare type InputTextProps = LabelProps & InputElementProps;
|
5
|
-
declare const
|
6
|
-
export default
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<LabelProps & InputElementProps & React.RefAttributes<HTMLInputElement>>;
|
6
|
+
export default _default;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { RadioProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {string} className To support styled-components customization
|
6
|
+
* @param {boolean} disabled Radio interaction disabled
|
7
|
+
* @param {InputHelperProps} helper Render an error form box when necessary
|
8
|
+
* @param {boolean} large Improve Radio size
|
9
|
+
* @param {function} onClick Callback called on component click
|
10
|
+
* @param {string} text Component label text
|
11
|
+
* @param {boolean} value Radio status
|
12
|
+
*/
|
13
|
+
declare const Radio: ({ value, ...rest }: RadioProps) => JSX.Element;
|
14
|
+
export default Radio;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { RadioStatus } from '../types';
|
2
|
+
interface UseRadioValueReturn {
|
3
|
+
status: RadioStatus;
|
4
|
+
value: boolean;
|
5
|
+
setCheck: () => void;
|
6
|
+
setUncheck: () => void;
|
7
|
+
toggleRadio: () => void;
|
8
|
+
}
|
9
|
+
declare const useRadioValue: (initialValue?: RadioStatus | boolean) => UseRadioValueReturn;
|
10
|
+
export default useRadioValue;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
2
|
+
import { RadioProps } from './types';
|
3
|
+
export declare const WithStatus: Story<RadioProps>;
|
4
|
+
export declare const WithBoolean: Story<RadioProps>;
|
5
|
+
declare const RadioStories: Meta<RadioProps>;
|
6
|
+
export default RadioStories;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { ChangeEvent, InputHTMLAttributes } from 'react';
|
2
|
+
import { LabelProps } from '../../../common/types/label';
|
3
|
+
import { paletteColor } from '../../../styles/types';
|
4
|
+
import { InputHelperProps } from '../inputHelper';
|
5
|
+
export declare enum RadioStatus {
|
6
|
+
CHECKED = "checked",
|
7
|
+
UNCHECKED = "unchecked"
|
8
|
+
}
|
9
|
+
declare enum RadioState {
|
10
|
+
NORMAL = "normal",
|
11
|
+
ERROR = "error"
|
12
|
+
}
|
13
|
+
declare enum RadioParts {
|
14
|
+
BACKGROUNDCOLOR = "backgroundColor",
|
15
|
+
BORDERCOLOR = "borderColor"
|
16
|
+
}
|
17
|
+
export interface RadioStyles {
|
18
|
+
height: string;
|
19
|
+
width: string;
|
20
|
+
backgroundColor: paletteColor;
|
21
|
+
borderColor: paletteColor;
|
22
|
+
cursor: string;
|
23
|
+
opacity: number;
|
24
|
+
}
|
25
|
+
export interface RadioInputProps {
|
26
|
+
value: RadioStatus;
|
27
|
+
disabled?: boolean;
|
28
|
+
large?: boolean;
|
29
|
+
hasError: boolean;
|
30
|
+
}
|
31
|
+
export interface RadioImplProps extends Omit<RadioInputProps, 'hasError'>, Omit<LabelProps, 'hasError'> {
|
32
|
+
onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
|
33
|
+
text?: string;
|
34
|
+
helper?: InputHelperProps;
|
35
|
+
className?: string;
|
36
|
+
onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
37
|
+
}
|
38
|
+
export interface RadioProps extends Omit<RadioImplProps, 'value'> {
|
39
|
+
value: RadioImplProps['value'] | boolean;
|
40
|
+
}
|
41
|
+
export declare type RadioPalette = {
|
42
|
+
input: {
|
43
|
+
[k in RadioState]: {
|
44
|
+
[k in RadioStatus]: {
|
45
|
+
[k in RadioParts]: paletteColor;
|
46
|
+
};
|
47
|
+
};
|
48
|
+
};
|
49
|
+
label: {
|
50
|
+
[k in RadioState]: paletteColor;
|
51
|
+
};
|
52
|
+
};
|
53
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
2
|
+
import { RadioInputProps, RadioStatus, RadioStyles } from './types';
|
3
|
+
interface InputMapParams extends RadioInputProps {
|
4
|
+
theme: DefaultTheme;
|
5
|
+
}
|
6
|
+
export declare const getInputStyle: ({ theme, value, disabled, large, hasError }: InputMapParams) => RadioStyles;
|
7
|
+
export declare const convertToStatus: (value: boolean | RadioStatus) => RadioStatus;
|
8
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { RadioGroupProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {string} className To support styled-components customization
|
6
|
+
* @param {InputHelperProps} helper Render an error form box when necessary
|
7
|
+
* @param {number} initialSelection Initial selected Radio index
|
8
|
+
* @param {boolean} inline Display Radios on the same row
|
9
|
+
* @param {function} onChange Callback called when selection changes
|
10
|
+
* @param {Omit<RadioProps, 'value' | 'onClick' | 'helper'>[]} options Radio list
|
11
|
+
* @param {keyof typeof spacing} spacing Gap between Radios
|
12
|
+
*/
|
13
|
+
export declare const RadioGroup: ({ onChange, helper, initialSelection, options, ...otherProps }: RadioGroupProps) => JSX.Element;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { spacing } from '../../../styles/spacing';
|
3
|
+
import { InputHelperProps } from '../inputHelper';
|
4
|
+
import { RadioProps } from '../radio';
|
5
|
+
export declare type RadioGroupOptions = Omit<RadioProps, 'value' | 'onClick' | 'helper'>[];
|
6
|
+
export interface RadioGroupProps extends RadioGroupWrapperProps {
|
7
|
+
options: RadioGroupOptions;
|
8
|
+
initialSelection?: number;
|
9
|
+
onChange: (selected: number) => void;
|
10
|
+
helper?: InputHelperProps;
|
11
|
+
}
|
12
|
+
export interface RadioGroupWrapperProps {
|
13
|
+
className?: string;
|
14
|
+
style?: React.CSSProperties;
|
15
|
+
spacing?: keyof typeof spacing;
|
16
|
+
inline?: boolean;
|
17
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { InlineMessageProps } from './types';
|
3
|
+
/**
|
4
|
+
* Component Props:
|
5
|
+
* @param {IconProps} icon configuration of the left icon
|
6
|
+
* @param {() => JSX.Element} renderIcon used to render a custom component instead of the left icon
|
7
|
+
* @param {InlineMessageType} type inline message role
|
8
|
+
* @param {string} title text rendered as a title
|
9
|
+
* @param {string} content text rendered as a description
|
10
|
+
* @param {() => JSX.Element} renderTitle custom component rendered in place of the title
|
11
|
+
* @param {() => JSX.Element} renderContent custom component rendered in place of the description
|
12
|
+
* @param {IconProps} closeIcon configuration of the right icon
|
13
|
+
* @param {() => JSX.Element} renderCloseIcon used to render a custom component instead of the right icon
|
14
|
+
* @param {() => void} onClose action called on the right icon click
|
15
|
+
* @param {InlineMessageStyle} componentStyle to support styled-components customization
|
16
|
+
* @param {string} actionLabel text of the right action button
|
17
|
+
* @param {() => void} onActionClick action called on the right button click
|
18
|
+
* @param {'medium' | 'large'} size fake size support
|
19
|
+
*
|
20
|
+
*/
|
21
|
+
declare const InlineMessage: (props: InlineMessageProps) => JSX.Element;
|
22
|
+
export default InlineMessage;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { InlineMessageProps, InlineMessageType, 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, {
|
5
|
+
type?: InlineMessageType | undefined;
|
6
|
+
}, never>;
|
7
|
+
export declare const StyledInlineMessageWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, InlineMessageProps, never>;
|
8
|
+
export declare const StyledIconContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledContentProps, never>;
|
9
|
+
export declare const StyledCloseIconWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
10
|
+
export declare const StyledCloseIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
11
|
+
export declare const ActionButton: import("styled-components").StyledComponent<({ className, color, fullWidth, href, iconLeft, iconRight, isDisabled, isLoading, onClick, size, target, text, type, }: import("../buttons").ButtonProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { paletteColor } from '../../styles/types';
|
3
|
+
import { IconProps } from '../icon';
|
4
|
+
export declare enum InlineMessageType {
|
5
|
+
STANDARD = "standard",
|
6
|
+
ERROR = "error",
|
7
|
+
INFO = "info",
|
8
|
+
WARNING = "warning",
|
9
|
+
SUCCESS = "success"
|
10
|
+
}
|
11
|
+
export interface InlineMessageProps {
|
12
|
+
icon?: IconProps;
|
13
|
+
renderIcon?: () => JSX.Element;
|
14
|
+
title?: string;
|
15
|
+
content?: string;
|
16
|
+
size?: 'medium' | 'large';
|
17
|
+
type?: InlineMessageType;
|
18
|
+
renderTitle?: () => JSX.Element;
|
19
|
+
renderContent?: () => JSX.Element;
|
20
|
+
onClose?: () => void;
|
21
|
+
closeIcon?: IconProps;
|
22
|
+
renderCloseIcon?: () => JSX.Element;
|
23
|
+
componentStyle?: InlineMessageStyle;
|
24
|
+
actionLabel?: string;
|
25
|
+
onActionClick?: () => void;
|
26
|
+
}
|
27
|
+
export interface InlineMessageStyle {
|
28
|
+
root?: Record<string, unknown>;
|
29
|
+
icon?: Record<string, unknown>;
|
30
|
+
contentWrapper?: Record<string, unknown>;
|
31
|
+
title?: Record<string, unknown>;
|
32
|
+
content?: Record<string, unknown>;
|
33
|
+
}
|
34
|
+
export interface StyledContentProps {
|
35
|
+
margin: boolean;
|
36
|
+
}
|
37
|
+
export declare type InlineMessageColor = {
|
38
|
+
title: paletteColor;
|
39
|
+
content: paletteColor;
|
40
|
+
background: paletteColor;
|
41
|
+
border?: paletteColor;
|
42
|
+
};
|
43
|
+
export declare type InlineMessagePalette = {
|
44
|
+
[k in InlineMessageType]: InlineMessageColor;
|
45
|
+
};
|
@@ -1,17 +1,14 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
|
3
|
-
|
4
|
-
}, never>;
|
5
|
-
export declare const StyledIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
2
|
+
import { ToastType } from '../types';
|
3
|
+
export declare const StyledToast: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
4
|
+
export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
6
5
|
export declare const ActionButton: import("styled-components").StyledComponent<({ className, color, fullWidth, href, iconLeft, iconRight, isDisabled, isLoading, onClick, size, target, text, type, }: import("../../buttons").ButtonProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
7
|
-
export declare const
|
8
|
-
export declare const StyledBody: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
6
|
+
export declare const StyledIconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
9
7
|
export declare const StyledTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
10
|
-
export declare const
|
11
|
-
export declare const StyledTitleText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
12
|
-
|
13
|
-
|
14
|
-
export declare const
|
15
|
-
|
16
|
-
isCentered: boolean;
|
8
|
+
export declare const StyledIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
9
|
+
export declare const StyledTitleText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
10
|
+
type: ToastType;
|
11
|
+
}, never>;
|
12
|
+
export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
13
|
+
type: ToastType;
|
17
14
|
}, never>;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ToastContainerProps } from './types';
|
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">;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
|
2
|
-
import {
|
3
|
-
|
4
|
-
export declare const WithKnobs: () => JSX.Element;
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
2
|
+
import { ToastProps } from './types';
|
3
|
+
export declare const WithKnobs: Story<ToastProps>;
|
5
4
|
declare const ToastStories: Meta<ToastProps>;
|
6
5
|
export default ToastStories;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { paletteColor } from 'index';
|
2
|
+
import React, { ReactNode } from 'react';
|
3
|
+
import { ToastPosition } from 'react-toastify/dist/types';
|
4
|
+
import { IconProps } from '../icon';
|
5
|
+
export declare type ToastLibraryType = 'dark' | 'error' | 'info' | 'warning' | 'success';
|
6
|
+
export declare enum ToastType {
|
7
|
+
STANDARD = "standard",
|
8
|
+
ERROR = "error",
|
9
|
+
INFO = "info",
|
10
|
+
WARNING = "warning",
|
11
|
+
SUCCESS = "success"
|
12
|
+
}
|
13
|
+
export declare const typeMap: Record<ToastType, ToastLibraryType>;
|
14
|
+
export interface ToastProps {
|
15
|
+
type?: ToastType;
|
16
|
+
content?: ReactNode;
|
17
|
+
icon?: IconProps;
|
18
|
+
actionLabel?: string;
|
19
|
+
onActionClick?: () => void;
|
20
|
+
autoClose?: false;
|
21
|
+
}
|
22
|
+
export interface ToastContentProps {
|
23
|
+
title: ReactNode;
|
24
|
+
content?: ReactNode;
|
25
|
+
icon: IconProps;
|
26
|
+
actionLabel?: string;
|
27
|
+
onActionClick?: () => void;
|
28
|
+
type?: ToastType;
|
29
|
+
}
|
30
|
+
export interface ToastInterface {
|
31
|
+
Container: React.FC<ToastContainerProps>;
|
32
|
+
show: (title: ReactNode, options: ToastProps) => string | undefined;
|
33
|
+
dismiss: (toastId: string | undefined) => void;
|
34
|
+
success: (title: ReactNode, options?: ToastProps) => string | undefined;
|
35
|
+
error: (title: ReactNode, options?: ToastProps) => string | undefined;
|
36
|
+
info: (title: ReactNode, options?: ToastProps) => string | undefined;
|
37
|
+
warning: (title: ReactNode, options?: ToastProps) => string | undefined;
|
38
|
+
standard: (title: ReactNode, options?: ToastProps) => string | undefined;
|
39
|
+
}
|
40
|
+
export interface ToastContainerProps {
|
41
|
+
position: ToastPosition;
|
42
|
+
}
|
43
|
+
export declare type ToastColor = {
|
44
|
+
title: paletteColor;
|
45
|
+
content: paletteColor;
|
46
|
+
background: paletteColor;
|
47
|
+
};
|
48
|
+
export declare type ToastPalette = {
|
49
|
+
[k in ToastType]: ToastColor;
|
50
|
+
};
|
package/dist/index.d.ts
CHANGED
@@ -8,18 +8,19 @@ import { Chip } from './components/chips';
|
|
8
8
|
import { Drawer } from './components/drawer';
|
9
9
|
import { closeDropdownType, Dropdown, DropdownItemProps, DropdownPalette, renderContentType } from './components/dropdown';
|
10
10
|
import { WithBadge } from './components/floatingBadge';
|
11
|
-
import { Checkbox, CheckboxPalette, CheckboxProps,
|
11
|
+
import { Checkbox, CheckboxPalette, CheckboxProps, CheckboxStatus, useCheckboxValue } from './components/form/checkbox';
|
12
12
|
import { DatePicker, DatePickerPalette, DatePickerProps, timeConversionOptions, useFormattedDate } from './components/form/datepicker';
|
13
13
|
import { FileRejection, FileUploader, fileUploaderOnDrop, FileUploaderPalette, FileUploaderProps } from './components/form/fileUploader';
|
14
14
|
import { InputHelper, InputHelperPalette, InputHelperProps } from './components/form/inputHelper';
|
15
15
|
import { InputText, InputTextPalette, InputTextProps, UnitDropdownProps } from './components/form/inputText';
|
16
|
+
import { Radio, RadioPalette, RadioProps, RadioStatus, useRadioValue } from './components/form/radio';
|
17
|
+
import { RadioGroup, RadioGroupOptions, RadioGroupProps } from './components/form/radioGroup';
|
16
18
|
import { AsyncCreatableSelect, AsyncCreatableSelectProps, AsyncSelect, AsyncSelectProps, CreatableSelect, CreatableSelectProps, isSimpleValue, OptionType, Select, SelectComponentsType, SelectPalette, SelectProps, simpleValue, useSelectMultiValues, useSelectSimpleValue, useSelectValue } from './components/form/select';
|
17
19
|
import { TextArea, TextAreaPalette, TextAreaProps } from './components/form/textArea';
|
18
20
|
import { GroupedList, GroupType, ItemType } from './components/groupedList';
|
19
|
-
import { RadioButtonGroup } from './components/groupRadioButton';
|
20
21
|
import { Icon, IconPalette, IconProps } from './components/icon';
|
21
22
|
import { IconBackground, IconBackgroundPalette } from './components/icon/components/iconBackground';
|
22
|
-
import { InlineMessage } from './components/
|
23
|
+
import { InlineMessage, InlineMessagePalette, InlineMessageProps, InlineMessageType } from './components/inlineMessage';
|
23
24
|
import { CustomSidebarItemProps, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps } from './components/layout';
|
24
25
|
import { MicroTag, MicroTagPalette, MicroTagProps } from './components/microTag';
|
25
26
|
import { Modal, ModalSearchable } from './components/modals';
|
@@ -28,16 +29,15 @@ import { ModalBody } from './components/modals/modalStyled';
|
|
28
29
|
import { PageEmptySet } from './components/pageEmptySet';
|
29
30
|
import { Pagination } from './components/pagination';
|
30
31
|
import { Progressbar } from './components/progressbar';
|
31
|
-
import { RadioButton } from './components/radioButton';
|
32
32
|
import { Stepper, StepperPalette, StepperProps } from './components/stepper';
|
33
33
|
import { Column, ManualPagination, OnSelectionChange, OnSort, Row, RowActions, Table, TableData, TablePalette, TableProps, useTableValues } from './components/table';
|
34
34
|
import { DropdownTabs, ScrollableTabs, TabsItem } from './components/tabs';
|
35
35
|
import { Tag, TagPalette, TagProps } from './components/tag';
|
36
36
|
import { ThemeProvider } from './components/themeProvider';
|
37
37
|
import { ShortcutTip, Tip } from './components/tip';
|
38
|
-
import { Toast, ToastProps } from './components/toast';
|
38
|
+
import { Toast, ToastPalette, toastPalette, ToastProps, ToastType } from './components/toast';
|
39
39
|
import { Tooltip, TooltipPalette, TooltipProps } from './components/tooltip';
|
40
40
|
import { autocompleteYellow } from './styles/defaultPalette/colors/others';
|
41
41
|
import { Theme } from './styles/theme';
|
42
42
|
import { Palette, paletteColor } from './styles/types';
|
43
|
-
export { autocompleteYellow, paletteColor, Avatar, Banner, BannerProps, Button, ButtonProps, IconButton, IconButtonProps, Icon, IconProps, IconPalette, IconBackground, IconBackgroundPalette, Table, TableProps, TableData, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette,
|
43
|
+
export { autocompleteYellow, paletteColor, Avatar, Banner, BannerProps, Button, ButtonProps, IconButton, IconButtonProps, Icon, IconProps, IconPalette, IconBackground, IconBackgroundPalette, Table, TableProps, TableData, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette, CheckboxStatus, Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, useSelectSimpleValue, isSimpleValue, simpleValue, CreatableSelectProps, useSelectValue, useSelectMultiValues, SelectPalette, SelectComponentsType, OptionType, PageEmptySet, Modal, ModalBody, ModalSearchable, Tooltip, TooltipProps, TooltipPalette, Accordion, Progressbar, Drawer, Chip, Radio, useRadioValue, RadioProps, RadioPalette, RadioStatus, RadioGroup, RadioGroupProps, RadioGroupOptions, InlineMessage, InlineMessageProps, InlineMessagePalette, InlineMessageType, Badge, BadgeProps, Dropdown, DropdownItemProps, DropdownPalette, closeDropdownType, renderContentType, DropdownTabs, ScrollableTabs, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, CustomSidebarItemProps, TabsItem, Stepper, StepperProps, StepperPalette, Tip, ShortcutTip, ThemeProvider, Theme, Palette, GroupedList, ItemType, GroupType, WithBadge, Pagination, Toast, ToastProps, toastPalette, ToastPalette, ToastType, ConfirmationModal, MicroTag, MicroTagProps, MicroTagPalette, Tag, TagProps, TagPalette, InputText, InputTextProps, InputTextPalette, UnitDropdownProps, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions, InputHelper, InputHelperProps, InputHelperPalette, TextArea, TextAreaProps, TextAreaPalette, FileUploader, FileUploaderProps, FileUploaderPalette, FileRejection, fileUploaderOnDrop, Spinner, };
|