@fattureincloud/fic-design-system 0.4.26 → 0.4.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/common/components/Label.d.ts +3 -0
  3. package/dist/common/types/label.d.ts +12 -0
  4. package/dist/common/utils/label.d.ts +5 -0
  5. package/dist/components/form/checkbox/Checkbox.d.ts +12 -14
  6. package/dist/components/form/checkbox/checkbox.stories.d.ts +1 -1
  7. package/dist/components/form/checkbox/checkboxPalette.d.ts +1 -14
  8. package/dist/components/form/checkbox/hooks/useCheckboxValue.d.ts +3 -3
  9. package/dist/components/form/checkbox/index.d.ts +4 -5
  10. package/dist/components/form/checkbox/styled.d.ts +3 -0
  11. package/dist/components/form/checkbox/types.d.ts +45 -8
  12. package/dist/components/form/checkbox/utils.d.ts +5 -16
  13. package/dist/components/form/common/components/ClickableWrapper.d.ts +2 -0
  14. package/dist/components/form/common/components/HiddenInput.d.ts +2 -0
  15. package/dist/components/form/inputText/InputText.d.ts +2 -2
  16. package/dist/components/form/radio/Radio.d.ts +14 -0
  17. package/dist/components/form/radio/hooks/useRadioValue.d.ts +10 -0
  18. package/dist/components/form/radio/index.d.ts +4 -0
  19. package/dist/components/form/radio/radio.stories.d.ts +6 -0
  20. package/dist/components/form/radio/radioPalette.d.ts +3 -0
  21. package/dist/components/form/radio/styled.d.ts +3 -0
  22. package/dist/components/form/radio/types.d.ts +53 -0
  23. package/dist/components/form/radio/utils.d.ts +8 -0
  24. package/dist/components/form/radioGroup/RadioGroup.d.ts +13 -0
  25. package/dist/components/form/radioGroup/index.d.ts +2 -0
  26. package/dist/components/form/radioGroup/radioGroup.stories.d.ts +5 -0
  27. package/dist/components/form/radioGroup/styled.d.ts +2 -0
  28. package/dist/components/form/radioGroup/types.d.ts +16 -0
  29. package/dist/components/inlineMessage/InlineMessage.d.ts +22 -0
  30. package/dist/components/inlineMessage/index.d.ts +3 -0
  31. package/dist/components/inlineMessage/inlineMessage.stories.d.ts +5 -0
  32. package/dist/components/inlineMessage/inlineMessagePalette.d.ts +3 -0
  33. package/dist/components/inlineMessage/styled.d.ts +11 -0
  34. package/dist/components/inlineMessage/types.d.ts +45 -0
  35. package/dist/components/inlineMessage/utils.d.ts +3 -0
  36. package/dist/components/toast/Toast.d.ts +1 -1
  37. package/dist/components/toast/components/ToastContent.d.ts +10 -13
  38. package/dist/components/toast/index.d.ts +2 -1
  39. package/dist/components/toast/styled.d.ts +9 -0
  40. package/dist/components/toast/toast.stories.d.ts +3 -4
  41. package/dist/components/toast/toastPalette.d.ts +3 -0
  42. package/dist/components/toast/types.d.ts +50 -0
  43. package/dist/components/toast/utils.d.ts +3 -0
  44. package/dist/index.d.ts +6 -6
  45. package/dist/index.esm.js +5 -5
  46. package/dist/index.esm.js.map +1 -1
  47. package/dist/index.js +4 -4
  48. package/dist/index.js.map +1 -1
  49. package/dist/styles/theme.d.ts +6 -0
  50. 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,3 @@
1
+ import { LabelProps, MappedLabelProps } from '../types/label';
2
+ declare const Label: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, MappedLabelProps & LabelProps, keyof MappedLabelProps>;
3
+ export default Label;
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ import { DefaultTheme } from 'styled-components';
2
+ import { LabelProps, MappedLabelProps } from '../types/label';
3
+ export declare const getLabelStyle: ({ disabled, large, theme, hasError, }: LabelProps & {
4
+ theme: DefaultTheme;
5
+ }) => MappedLabelProps;
@@ -1,16 +1,14 @@
1
- import { ChangeEvent, InputHTMLAttributes } from 'react';
2
- import { InputHelperProps } from '../inputHelper';
3
- import { CheckboxInputProps } from './components/Input';
4
- import { CheckboxLabelProps } from './components/Label';
5
- interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'>, Omit<CheckboxLabelProps, 'hasError'> {
6
- onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
7
- text?: string;
8
- helper?: InputHelperProps;
9
- className?: string;
10
- onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
11
- }
12
- export interface CheckboxProps extends Omit<CheckboxImplProps, 'value'> {
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 './Checkbox';
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 { paletteColor } from '../../../styles/types';
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 { checkboxStatus } from '../types';
1
+ import { CheckboxStatus } from '../types';
2
2
  interface UseCheckboxValueReturn {
3
- status: checkboxStatus;
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?: checkboxStatus | boolean) => UseCheckboxValueReturn;
10
+ declare const useCheckboxValue: (initialValue?: CheckboxStatus | boolean) => UseCheckboxValueReturn;
11
11
  export default useCheckboxValue;
@@ -1,5 +1,4 @@
1
- import Checkbox, { CheckboxProps } from './Checkbox';
2
- import checkboxPalette, { CheckboxPalette } from './checkboxPalette';
3
- import useCheckboxValue from './hooks/useCheckboxValue';
4
- import { checkboxStatus } from './types';
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';
@@ -0,0 +1,3 @@
1
+ import { CheckboxInputProps, CheckboxStyles } from './types';
2
+ declare const Input: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, CheckboxStyles & CheckboxInputProps, keyof CheckboxStyles>;
3
+ export default Input;
@@ -1,7 +1,21 @@
1
+ import { ChangeEvent, InputHTMLAttributes } from 'react';
1
2
  import { paletteColor } from '../../../styles/types';
2
- export declare type checkboxStatus = 'checked' | 'unchecked' | 'indeterminate';
3
- export declare type checkboxState = 'normal' | 'error';
4
- export declare type checkboxParts = 'tickColor' | 'backgroundColor' | 'borderColor';
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 MappedLabelProps {
15
- fontSize: string;
16
- cursor: string;
17
- color: paletteColor;
18
- opacity: number;
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 './components/Input';
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
- interface LabelMapProps extends CheckboxLabelProps {
11
- theme: DefaultTheme;
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: statusIconType;
23
- export declare const convertToStatus: (value: boolean | checkboxStatus) => checkboxStatus;
11
+ export declare const statusIcon: StatusIconType;
12
+ export declare const convertToStatus: (value: boolean | CheckboxStatus) => CheckboxStatus;
24
13
  export {};
@@ -0,0 +1,2 @@
1
+ declare const ClickableWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export default ClickableWrapper;
@@ -0,0 +1,2 @@
1
+ declare const HiddenInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {}, never>;
2
+ export default HiddenInput;
@@ -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 InputText: React.ForwardRefExoticComponent<LabelProps & InputElementProps & React.RefAttributes<HTMLInputElement>>;
6
- export default InputText;
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,4 @@
1
+ export { default as useRadioValue } from './hooks/useRadioValue';
2
+ export { default as Radio } from './Radio';
3
+ export { default as radioPalette } from './radioPalette';
4
+ export { RadioStatus, RadioProps, RadioPalette } from './types';
@@ -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,3 @@
1
+ import { RadioPalette } from './types';
2
+ declare const radioPalette: RadioPalette;
3
+ export default radioPalette;
@@ -0,0 +1,3 @@
1
+ import { RadioInputProps, RadioStyles } from './types';
2
+ declare const Input: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, RadioStyles & RadioInputProps, keyof RadioStyles>;
3
+ export default Input;
@@ -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,2 @@
1
+ export { RadioGroup } from './RadioGroup';
2
+ export { RadioGroupProps } from './types';
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { RadioGroupProps } from './types';
3
+ export declare const WithStatus: Story<RadioGroupProps>;
4
+ declare const RadioGrupStories: Meta<RadioGroupProps>;
5
+ export default RadioGrupStories;
@@ -0,0 +1,2 @@
1
+ import { RadioGroupWrapperProps } from './types';
2
+ export declare const RadioGroupWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, RadioGroupWrapperProps, never>;
@@ -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,3 @@
1
+ export { default as InlineMessage } from './InlineMessage';
2
+ export { InlineMessageProps, InlineMessagePalette, InlineMessageType } from './types';
3
+ export { default as inlineMessagePalette } from './inlineMessagePalette';
@@ -0,0 +1,5 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ import { InlineMessageProps } from './types';
3
+ export declare const Standard: Story<InlineMessageProps>;
4
+ declare const InlineMessageStories: Meta<InlineMessageProps>;
5
+ export default InlineMessageStories;
@@ -0,0 +1,3 @@
1
+ import { InlineMessagePalette } from './types';
2
+ declare const inlineMessagePalette: InlineMessagePalette;
3
+ export default inlineMessagePalette;
@@ -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
+ };
@@ -0,0 +1,3 @@
1
+ import { buttonColors } from '../buttons/button/types';
2
+ import { InlineMessageType } from './types';
3
+ export declare const typeToButtonColor: (type: InlineMessageType) => buttonColors;
@@ -1,2 +1,2 @@
1
- import { ToastInterface } from './typings/toast';
1
+ import { ToastInterface } from './types';
2
2
  export declare const Toast: ToastInterface;
@@ -1,17 +1,14 @@
1
1
  /// <reference types="react" />
2
- export declare const StyledIconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
- isCentered: boolean;
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 StyledTitleContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
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 StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
- export declare const StyledTitleText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
12
- export declare const StyledAction: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
13
- export declare const StyledToast: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
14
- export declare const StyledActionLabel: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
15
- export declare const StyledHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
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>;
@@ -1,2 +1,3 @@
1
1
  export { Toast } from './Toast';
2
- export { ToastInterface, ToastProps } from './typings/toast';
2
+ export { ToastInterface, ToastProps, ToastPalette, ToastType } from './types';
3
+ export { default as toastPalette } from './toastPalette';
@@ -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
- /// <reference types="react" />
2
- import { Meta } from '@storybook/react';
3
- import { ToastProps } from './typings/toast';
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,3 @@
1
+ import { ToastPalette } from './types';
2
+ declare const toastPalette: ToastPalette;
3
+ export default toastPalette;