@fattureincloud/fic-design-system 0.4.26 → 0.4.27
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/CHANGELOG.md +22 -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/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 +16 -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 +1 -1
- package/dist/components/toast/components/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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.4.27 - 24/08/2022
|
|
4
|
+
|
|
5
|
+
### 💥 Breaking
|
|
6
|
+
|
|
7
|
+
- RadioButton replaced with Radio
|
|
8
|
+
- RadioButtonGroup replaced with RadioGroup
|
|
9
|
+
|
|
10
|
+
### 🚀 Added
|
|
11
|
+
|
|
12
|
+
- RadioGroup selection handled
|
|
13
|
+
- Radio palette
|
|
14
|
+
- InlineMessage palette
|
|
15
|
+
- InlineMessage action button
|
|
16
|
+
|
|
17
|
+
### 🐛 Bug Fix
|
|
18
|
+
|
|
19
|
+
- Fix Toast icon graphical appearance
|
|
20
|
+
|
|
21
|
+
### 💅 Enhancement
|
|
22
|
+
|
|
23
|
+
- InlineMessageType and ToastType exported enums
|
|
24
|
+
|
|
3
25
|
## v0.4.26 - 16/08/2022
|
|
4
26
|
|
|
5
27
|
- Aggiunte props `emptyState` e `isDisabled` in Dropdown
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { paletteColor } from '../../styles/types';
|
|
2
|
+
export interface LabelProps {
|
|
3
|
+
large?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
hasError: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface MappedLabelProps {
|
|
8
|
+
fontSize: string;
|
|
9
|
+
cursor: string;
|
|
10
|
+
color: paletteColor;
|
|
11
|
+
opacity: number;
|
|
12
|
+
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
value: CheckboxImplProps['value'] | boolean;
|
|
14
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CheckboxProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Component Props:
|
|
5
|
+
* @param {string} className To support styled-components customization
|
|
6
|
+
* @param {boolean} disabled Checkbox interaction disabled
|
|
7
|
+
* @param {InputHelperProps} helper Render an error form box when necessary
|
|
8
|
+
* @param {boolean} large Improve Checkbox size
|
|
9
|
+
* @param {function} onClick Callback called on component click
|
|
10
|
+
* @param {string} text Component label text
|
|
11
|
+
* @param {CheckboxStatus} value Checkbox status
|
|
12
|
+
*/
|
|
15
13
|
declare const Checkbox: ({ value, ...rest }: CheckboxProps) => JSX.Element;
|
|
16
14
|
export default Checkbox;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
|
-
import { CheckboxProps } from './
|
|
2
|
+
import { CheckboxProps } from './types';
|
|
3
3
|
export declare const WithStatus: Story<CheckboxProps>;
|
|
4
4
|
export declare const WithBoolean: Story<CheckboxProps>;
|
|
5
5
|
declare const CheckboxStories: Meta<CheckboxProps>;
|
|
@@ -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,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { spacing } from '../../../styles/spacing';
|
|
3
|
+
import { InputHelperProps } from '../inputHelper/InputHelper';
|
|
4
|
+
import { RadioProps } from '../radio';
|
|
5
|
+
export interface RadioGroupProps extends RadioGroupWrapperProps {
|
|
6
|
+
options: Omit<RadioProps, 'value' | 'onClick' | 'helper'>[];
|
|
7
|
+
initialSelection?: number;
|
|
8
|
+
onChange: (selected: number) => void;
|
|
9
|
+
helper?: InputHelperProps;
|
|
10
|
+
}
|
|
11
|
+
export interface RadioGroupWrapperProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
spacing?: keyof typeof spacing;
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
}
|
|
@@ -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,2 +1,2 @@
|
|
|
1
|
-
import { ToastInterface } from './
|
|
1
|
+
import { ToastInterface } from './types';
|
|
2
2
|
export declare const Toast: ToastInterface;
|
|
@@ -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;
|