@fattureincloud/fic-design-system 0.6.0 → 0.6.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/accordion-new/Accordion.d.ts +12 -0
- package/dist/components/accordion-new/accordion-new.stories.d.ts +4 -0
- package/dist/components/accordion-new/components/AccordionIcon.d.ts +3 -0
- package/dist/components/accordion-new/components/AccordionItem.d.ts +3 -0
- package/dist/components/accordion-new/components/styled.d.ts +8 -0
- package/dist/components/accordion-new/index.d.ts +3 -0
- package/dist/components/accordion-new/types.d.ts +58 -0
- package/dist/components/accordion-new/utils.d.ts +10 -0
- package/dist/components/banner/utils.d.ts +8 -0
- package/dist/components/checkbox/Checkbox.d.ts +15 -0
- package/dist/components/checkbox/checkbox.stories.d.ts +1 -0
- package/dist/components/checkbox/checkboxPalette.d.ts +16 -0
- package/dist/components/checkbox/components/Input.d.ts +9 -0
- package/dist/components/checkbox/components/Label.d.ts +8 -0
- package/dist/components/checkbox/hooks/useCheckboxValue.d.ts +11 -0
- package/dist/components/checkbox/index.d.ts +4 -0
- package/dist/components/checkbox/types.d.ts +19 -0
- package/dist/components/checkbox/utils.d.ts +24 -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/floatingBadge/{FloatingBadge.d.ts → floatingBadge.d.ts} +0 -0
- package/dist/components/floatingBadge/{WithBadge.d.ts → withBadge.d.ts} +0 -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/fileUploader/fileTypes.d.ts +3 -0
- package/dist/components/form/fileUploader/hooks/useIcon.d.ts +4 -0
- package/dist/components/form/fileUploader/hooks/useTexts.d.ts +3 -0
- package/dist/components/form/inputText/InputCode.d.ts +4 -0
- package/dist/components/form/inputText/InputTelephone.d.ts +4 -0
- package/dist/components/form/inputText/InputText.d.ts +24 -2
- package/dist/components/form/inputText/components/styled.d.ts +6 -0
- package/dist/components/form/inputText/{components/telephoneInput/countriesTelephonePrefixes.d.ts → countriesTelephonePrefixes.d.ts} +0 -0
- package/dist/components/form/inputText/{components/codeInput → hooks}/useCodeInputHooks.d.ts +2 -2
- package/dist/components/form/inputText/index.d.ts +4 -2
- package/dist/components/form/inputText/inputText.stories.d.ts +5 -5
- package/dist/components/form/inputText/types.d.ts +3 -4
- package/dist/components/form/select/components/Placeholder.d.ts +4 -0
- package/dist/components/form/select/components/types.d.ts +10 -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/inputText/components/icons.d.ts +8 -0
- package/dist/components/inputText/components/inputContainer.d.ts +1 -0
- package/dist/components/inputText/components/messages.d.ts +2 -0
- package/dist/components/inputText/components/wrapperTextArea.d.ts +1 -0
- package/dist/components/inputText/icons.d.ts +9 -0
- package/dist/components/inputText/index.d.ts +3 -0
- package/dist/components/inputText/inputText.stories.d.ts +1 -0
- package/dist/components/inputText/inputTextStyledWrapper.d.ts +2 -0
- package/dist/components/inputText/sideText.d.ts +6 -0
- package/dist/components/inputText/typings/enums.d.ts +17 -0
- package/dist/components/inputText/typings/inputText.d.ts +43 -0
- package/dist/components/inputText/utils.d.ts +8 -0
- package/dist/components/pagination/paginationStyledWrapper.d.ts +1 -0
- package/dist/components/progressbar/components/styledProgressbarWrapper.d.ts +2 -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/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/select/hooks/constants.d.ts +4613 -0
- package/dist/components/select/hooks/useCustomSelectStyle.d.ts +4 -0
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/select.stories.d.ts +1 -0
- package/dist/components/select/typings/select.d.ts +22 -0
- package/dist/components/stepBar/components/singleStep.d.ts +3 -0
- package/dist/components/stepBar/components/styledStepBarWrapper.d.ts +2 -0
- package/dist/components/stepBar/index.d.ts +2 -0
- package/dist/components/stepBar/stepBar.d.ts +7 -0
- package/dist/components/stepBar/stepBar.stories.d.ts +1 -0
- package/dist/components/stepBar/types.d.ts +15 -0
- package/dist/components/table/components/actionLink.d.ts +3 -0
- package/dist/components/table/components/actions/actionsContainer.d.ts +1 -0
- package/dist/components/table/components/actions/actionsPopUp.d.ts +12 -0
- package/dist/components/table/components/actions/actionsPopUpButton.d.ts +8 -0
- package/dist/components/table/components/actions/actionsPopUpUnderlay.d.ts +3 -0
- package/dist/components/table/components/components/headDesktop.d.ts +15 -0
- package/dist/components/table/components/components/listMobile.d.ts +15 -0
- package/dist/components/table/components/components/rowDesktop.d.ts +18 -0
- package/dist/components/table/components/customizationModal/customizationsModal.d.ts +10 -0
- package/dist/components/table/components/customizationModal/index.d.ts +2 -0
- package/dist/components/table/components/customizationModal/styledWrapper.d.ts +3 -0
- package/dist/components/table/components/customizationModal/useDnd.d.ts +8 -0
- package/dist/components/table/components/customizationModal/utils.d.ts +6 -0
- package/dist/components/table/components/emptySet.d.ts +10 -0
- package/dist/components/table/components/linearBackground.d.ts +1 -0
- package/dist/components/table/components/loadingContent.d.ts +7 -0
- package/dist/components/table/components/{Pagination.d.ts → pagination.d.ts} +0 -0
- package/dist/components/table/components/sortIcon.d.ts +2 -0
- package/dist/components/table/components/styledWrapper.d.ts +3 -0
- package/dist/components/table/components/unstyledTable.d.ts +11 -0
- package/dist/components/table/{Table.d.ts → table.d.ts} +0 -0
- package/dist/components/table/typings/main.d.ts +92 -0
- package/dist/components/table/utils/configPersistency.d.ts +14 -0
- package/dist/components/textButton/TextButton.d.ts +12 -0
- package/dist/components/textButton/index.d.ts +2 -0
- package/dist/components/textButton/textButton.stories.d.ts +1 -0
- package/dist/components/tip/components/styledTip.d.ts +4 -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/ToastContainer.d.ts +9 -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
- package/dist/components/toast/typings/toast.d.ts +32 -0
- package/dist/components/tooltips/components/message.d.ts +12 -0
- package/dist/components/tooltips/components/styledTooltipWrapper.d.ts +1 -0
- package/dist/components/tooltips/index.d.ts +2 -0
- package/dist/components/tooltips/tooltips.d.ts +15 -0
- package/dist/components/tooltips/tooltips.stories.d.ts +1 -0
- package/dist/components/tooltips/types.d.ts +25 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/elevations.d.ts +7 -0
- package/dist/utils/FICNumbers.d.ts +11 -0
- package/package.json +1 -1
- package/dist/components/form/inputText/components/codeInput/CodeInput.d.ts +0 -4
- package/dist/components/form/inputText/components/codeInput/styled.d.ts +0 -29
- package/dist/components/form/inputText/components/telephoneInput/TelephoneInput.d.ts +0 -4
- package/dist/components/form/inputText/components/telephoneInput/styled.d.ts +0 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccordionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Component props
|
|
4
|
+
* @param {boolean} multipleOpen Allows to open multiple accordion items at the same time
|
|
5
|
+
* @param {AnimatedIcon} leftIcon Left icon on the header of the accorion
|
|
6
|
+
* @param {AnimatedIcon} rightIcon Right icon on the header of the accordion
|
|
7
|
+
* @param {ReactChild} divider Component used to divide accordion items
|
|
8
|
+
* @param {ItemListProps} items List of the accordion items
|
|
9
|
+
* @param {object} style Styles for header and content of each accordion item
|
|
10
|
+
*/
|
|
11
|
+
declare const AccordionNew: ({ divider, items, leftIcon, multipleOpen, rightIcon, style }: AccordionProps) => JSX.Element;
|
|
12
|
+
export default AccordionNew;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconContainerProps, MappedProps } from '../types';
|
|
2
|
+
export declare const Header: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const HeaderContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
4
|
+
leftPad: boolean;
|
|
5
|
+
rightPad: boolean;
|
|
6
|
+
}, never>;
|
|
7
|
+
export declare const Content: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
8
|
+
export declare const IconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, MappedProps & IconContainerProps, keyof MappedProps>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CSSProperties, ReactChild } from 'react';
|
|
2
|
+
import { IconProps } from '../icon';
|
|
3
|
+
export declare const rotate45 = "rotate45";
|
|
4
|
+
export declare const rotate90 = "rotate90";
|
|
5
|
+
export declare const rotate180 = "rotate180";
|
|
6
|
+
export declare type Animations = typeof rotate45 | typeof rotate90 | typeof rotate180;
|
|
7
|
+
export interface AnimatedIcon extends Omit<IconProps, 'rotation'> {
|
|
8
|
+
animation?: Animations;
|
|
9
|
+
changeColor?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface AccordionProps {
|
|
12
|
+
multipleOpen?: boolean;
|
|
13
|
+
leftIcon?: AnimatedIcon;
|
|
14
|
+
rightIcon?: IconProps;
|
|
15
|
+
divider?: ReactChild;
|
|
16
|
+
items: ItemListProps[];
|
|
17
|
+
style?: {
|
|
18
|
+
header?: Record<string, unknown>;
|
|
19
|
+
content?: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface ItemListProps {
|
|
23
|
+
header: React.ReactChild;
|
|
24
|
+
content: React.ReactChild;
|
|
25
|
+
style?: {
|
|
26
|
+
header?: CSSProperties;
|
|
27
|
+
content?: CSSProperties;
|
|
28
|
+
};
|
|
29
|
+
defaultOpen?: boolean;
|
|
30
|
+
leftIcon?: AnimatedIcon;
|
|
31
|
+
rightIcon?: AnimatedIcon;
|
|
32
|
+
}
|
|
33
|
+
export interface AccordionItemProps {
|
|
34
|
+
index: number;
|
|
35
|
+
header: React.ReactChild;
|
|
36
|
+
content: React.ReactChild;
|
|
37
|
+
style?: {
|
|
38
|
+
header?: CSSProperties;
|
|
39
|
+
content?: CSSProperties;
|
|
40
|
+
};
|
|
41
|
+
open: boolean;
|
|
42
|
+
toggleOpen: (index: number) => void;
|
|
43
|
+
leftIcon?: AnimatedIcon;
|
|
44
|
+
rightIcon?: AnimatedIcon;
|
|
45
|
+
}
|
|
46
|
+
export interface AccordionIconProps {
|
|
47
|
+
iconProps: AnimatedIcon;
|
|
48
|
+
open: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface MappedProps {
|
|
51
|
+
animation: string;
|
|
52
|
+
iconColor: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IconContainerProps {
|
|
55
|
+
animation?: Animations;
|
|
56
|
+
changeColor?: boolean;
|
|
57
|
+
open: boolean;
|
|
58
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { Animations, MappedProps } from './types';
|
|
3
|
+
interface MapParams {
|
|
4
|
+
animation?: Animations;
|
|
5
|
+
changeColor?: boolean;
|
|
6
|
+
open: boolean;
|
|
7
|
+
theme: DefaultTheme;
|
|
8
|
+
}
|
|
9
|
+
export declare const mapAnimation: ({ animation, changeColor, open, theme }: MapParams) => MappedProps;
|
|
10
|
+
export {};
|
|
@@ -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,15 @@
|
|
|
1
|
+
import { ChangeEvent, InputHTMLAttributes } from 'react';
|
|
2
|
+
import { CheckboxInputProps } from './components/Input';
|
|
3
|
+
import { CheckboxLabelProps } from './components/Label';
|
|
4
|
+
interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'>, Omit<CheckboxLabelProps, 'hasError'> {
|
|
5
|
+
onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
text?: string;
|
|
7
|
+
error?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
|
10
|
+
}
|
|
11
|
+
export interface CheckboxProps extends Omit<CheckboxImplProps, 'value'> {
|
|
12
|
+
value: CheckboxImplProps['value'] | boolean;
|
|
13
|
+
}
|
|
14
|
+
declare const Checkbox: ({ value, ...rest }: CheckboxProps) => JSX.Element;
|
|
15
|
+
export default Checkbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|
|
15
|
+
declare const checkboxPalette: CheckboxPalette;
|
|
16
|
+
export default checkboxPalette;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { checkboxStatus, CheckboxStyles } from '../types';
|
|
2
|
+
export interface CheckboxInputProps {
|
|
3
|
+
value: checkboxStatus;
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
large?: boolean;
|
|
6
|
+
hasError: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Input: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, CheckboxStyles & CheckboxInputProps, "height" | "width" | "backgroundColor" | "tickColor" | "borderColor" | "cursor" | "opacity">;
|
|
9
|
+
export default Input;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MappedLabelProps } from '../types';
|
|
2
|
+
export interface CheckboxLabelProps {
|
|
3
|
+
large?: boolean;
|
|
4
|
+
isDisabled?: boolean;
|
|
5
|
+
hasError: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Label: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, MappedLabelProps & CheckboxLabelProps, "color" | "fontSize" | "cursor" | "opacity">;
|
|
8
|
+
export default Label;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { checkboxStatus } from '../types';
|
|
2
|
+
interface UseCheckboxValueReturn {
|
|
3
|
+
status: checkboxStatus;
|
|
4
|
+
value: boolean;
|
|
5
|
+
setCheck: () => void;
|
|
6
|
+
setUncheck: () => void;
|
|
7
|
+
setIndeterminate: () => void;
|
|
8
|
+
toggleCheckbox: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const useCheckboxValue: (initialValue?: boolean | "checked" | "unchecked" | "indeterminate") => UseCheckboxValueReturn;
|
|
11
|
+
export default useCheckboxValue;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import Checkbox, { CheckboxProps } from './Checkbox';
|
|
2
|
+
import checkboxPalette, { CheckboxPalette } from './checkboxPalette';
|
|
3
|
+
import useCheckboxValue from './hooks/useCheckboxValue';
|
|
4
|
+
export { Checkbox, useCheckboxValue, CheckboxProps, checkboxPalette, CheckboxPalette };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
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';
|
|
5
|
+
export interface CheckboxStyles {
|
|
6
|
+
height: string;
|
|
7
|
+
width: string;
|
|
8
|
+
backgroundColor: paletteColor;
|
|
9
|
+
tickColor: paletteColor;
|
|
10
|
+
borderColor: paletteColor;
|
|
11
|
+
cursor: string;
|
|
12
|
+
opacity: number;
|
|
13
|
+
}
|
|
14
|
+
export interface MappedLabelProps {
|
|
15
|
+
fontSize: string;
|
|
16
|
+
cursor: string;
|
|
17
|
+
color: paletteColor;
|
|
18
|
+
opacity: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DefaultTheme } from 'styled-components';
|
|
2
|
+
import { IconProps } from '../icon';
|
|
3
|
+
import { CheckboxInputProps } from './components/Input';
|
|
4
|
+
import { CheckboxLabelProps } from './components/Label';
|
|
5
|
+
import { checkboxStatus, CheckboxStyles } from './types';
|
|
6
|
+
interface InputMapParams extends CheckboxInputProps {
|
|
7
|
+
theme: DefaultTheme;
|
|
8
|
+
}
|
|
9
|
+
export declare const getInputStyle: ({ theme, value, isDisabled, large, hasError }: InputMapParams) => CheckboxStyles;
|
|
10
|
+
interface LabelMapProps extends CheckboxLabelProps {
|
|
11
|
+
theme: DefaultTheme;
|
|
12
|
+
}
|
|
13
|
+
export declare const getLabelStyle: ({ isDisabled, 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;
|
|
21
|
+
};
|
|
22
|
+
export declare const statusIcon: statusIconType;
|
|
23
|
+
export declare const convertToStatus: (value: boolean | "checked" | "unchecked" | "indeterminate") => checkboxStatus;
|
|
24
|
+
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
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -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>;
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<import("../label").LabelProps & import("../common/types").CommonFormTypes & {
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
name?: string | undefined;
|
|
5
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
6
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
7
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
8
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
9
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
10
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
11
|
+
autoFocus?: boolean | undefined;
|
|
12
|
+
required?: boolean | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
actionIcon?: import("../../icon").IconProps | undefined;
|
|
15
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
16
|
+
isPrefilled?: boolean | undefined;
|
|
17
|
+
isTransparent?: boolean | undefined;
|
|
18
|
+
leadingIcon?: import("../../icon").IconProps | undefined;
|
|
19
|
+
placeholder?: React.ReactText | undefined;
|
|
20
|
+
setValue?: React.Dispatch<React.SetStateAction<string>> | undefined;
|
|
21
|
+
strict?: boolean | undefined;
|
|
22
|
+
tooltip?: import("../../tooltip").TooltipProps | undefined;
|
|
23
|
+
unitDropdownProps?: import(".").UnitDropdownProps | undefined;
|
|
24
|
+
value?: string | number | null | undefined;
|
|
25
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
4
26
|
export default _default;
|
|
@@ -6,4 +6,10 @@ export declare const StyledInput: import("styled-components").StyledComponent<"i
|
|
|
6
6
|
export declare const FlexRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
7
7
|
gap: number | undefined;
|
|
8
8
|
}, never>;
|
|
9
|
+
export declare const CodeInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
10
|
+
gap: number | undefined;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const SingleInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
|
+
export declare const TelSelectWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
|
+
export declare const TelInputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
9
15
|
export {};
|
|
File without changes
|
package/dist/components/form/inputText/{components/codeInput → hooks}/useCodeInputHooks.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { InputCodeProps } from '../types';
|
|
3
3
|
declare type CodInputHooks = {
|
|
4
4
|
handleInput: (v: string) => void;
|
|
5
5
|
handlePaste: (e: React.ClipboardEvent) => void;
|
|
@@ -7,5 +7,5 @@ declare type CodInputHooks = {
|
|
|
7
7
|
setCurrentIndex: Dispatch<SetStateAction<number>>;
|
|
8
8
|
values: (string | null)[];
|
|
9
9
|
};
|
|
10
|
-
declare const useCodeInputHooks: ({ fieldsCount, onChange, status, }: Omit<
|
|
10
|
+
declare const useCodeInputHooks: ({ fieldsCount, onChange, status, }: Omit<InputCodeProps, 'helper' | 'className'>) => CodInputHooks;
|
|
11
11
|
export default useCodeInputHooks;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { UnitDropdownProps } from './components/UnitDropdown';
|
|
2
|
+
import InputCode from './InputCode';
|
|
3
|
+
import InputTelephone from './InputTelephone';
|
|
2
4
|
import InputText from './InputText';
|
|
3
5
|
import inputTextPalette, { InputTextPalette } from './inputTextPalette';
|
|
4
|
-
import {
|
|
5
|
-
export {
|
|
6
|
+
import { InputCodeProps, InputTelephoneProps, InputTextProps } from './types';
|
|
7
|
+
export { InputCode, InputCodeProps, InputTelephone, InputTelephoneProps, InputText, inputTextPalette, InputTextPalette, InputTextProps, UnitDropdownProps, };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const WithKnobs: Story<
|
|
4
|
-
export declare const WithUnitDropdown: Story<
|
|
5
|
-
export declare const CodeInputExample: Story<
|
|
6
|
-
export declare const TelephoneInputExample: Story<
|
|
2
|
+
import { InputCodeProps, InputTelephoneProps, InputTextProps } from './types';
|
|
3
|
+
export declare const WithKnobs: Story<InputTextProps>;
|
|
4
|
+
export declare const WithUnitDropdown: Story<InputTextProps>;
|
|
5
|
+
export declare const CodeInputExample: Story<InputCodeProps>;
|
|
6
|
+
export declare const TelephoneInputExample: Story<InputTelephoneProps>;
|
|
7
7
|
declare const InputTextStories: Meta<InputTextProps>;
|
|
8
8
|
export default InputTextStories;
|
|
@@ -20,14 +20,14 @@ export declare type InputElementProps = CommonFormTypes & HTMLInputProps & {
|
|
|
20
20
|
unitDropdownProps?: UnitDropdownProps;
|
|
21
21
|
value?: number | string | null;
|
|
22
22
|
};
|
|
23
|
-
export declare type
|
|
23
|
+
export declare type InputCodeProps = LabelProps & CommonFormTypes & Omit<HTMLInputProps, 'onChange'> & {
|
|
24
24
|
fieldsCount: number;
|
|
25
25
|
fieldsGap?: number;
|
|
26
26
|
inputType: 'code';
|
|
27
27
|
onChange?: (code: (string | null)[]) => void;
|
|
28
28
|
style?: CSSProperties;
|
|
29
29
|
};
|
|
30
|
-
export declare type
|
|
30
|
+
export declare type InputTelephoneProps = LabelProps & CommonFormTypes & {
|
|
31
31
|
className?: string;
|
|
32
32
|
inputType: 'telephone';
|
|
33
33
|
placeholder?: ReactText;
|
|
@@ -35,6 +35,5 @@ export declare type TelephoneInputProps = LabelProps & CommonFormTypes & {
|
|
|
35
35
|
setValue: Dispatch<SetStateAction<string>>;
|
|
36
36
|
value?: string | null;
|
|
37
37
|
};
|
|
38
|
-
export declare type
|
|
39
|
-
export declare type InputTextProps = StandardInputProps | CodeInputProps | TelephoneInputProps;
|
|
38
|
+
export declare type InputTextProps = LabelProps & InputElementProps;
|
|
40
39
|
export {};
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { SelectProps } from '../types';
|
|
3
|
+
declare type SelectComponents<IsMulti extends boolean = false> = Required<Required<SelectProps<IsMulti>>['components']>;
|
|
4
|
+
export declare type OptionProps<IsMulti extends boolean = false> = ComponentProps<SelectComponents<IsMulti>['Option']>;
|
|
5
|
+
export declare type PlaceholderProps<IsMulti extends boolean = false> = ComponentProps<SelectComponents<IsMulti>['Placeholder']>;
|
|
6
|
+
export declare type ControlProps<IsMulti extends boolean = false> = ComponentProps<SelectComponents<IsMulti>['Control']>;
|
|
7
|
+
export declare type MenuListProps<IsMulti extends boolean = false> = ComponentProps<SelectComponents<IsMulti>['MenuList']>;
|
|
8
|
+
export declare type DropdownIndicatorProps<IsMulti extends boolean = false> = ComponentProps<NonNullable<SelectComponents<IsMulti>['DropdownIndicator']>>;
|
|
9
|
+
export declare type ClearIndicatorProps<IsMulti extends boolean = false> = ComponentProps<NonNullable<SelectComponents<IsMulti>['ClearIndicator']>>;
|
|
10
|
+
export {};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EInputSize } from '../typings/enums';
|
|
2
|
+
interface IconProps {
|
|
3
|
+
size?: EInputSize;
|
|
4
|
+
hasAction: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const IconLeft: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, IconProps, never>;
|
|
7
|
+
export declare const IconRight: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, IconProps, never>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InputContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const ErrorMessage: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const DescriptionMessage: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WrapperTextArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconProps } from '../icon';
|
|
2
|
+
export declare const LefIcon: import("styled-components").StyledComponent<typeof import("@fortawesome/react-fontawesome").FontAwesomeIcon, import("styled-components").DefaultTheme, import("../icon/iconPalette").IconColorPalette & IconProps & {
|
|
3
|
+
isDisabled?: boolean | undefined;
|
|
4
|
+
}, "primary" | "secondary">;
|
|
5
|
+
export declare const RightIcon: import("styled-components").StyledComponent<typeof import("@fortawesome/react-fontawesome").FontAwesomeIcon, import("styled-components").DefaultTheme, import("../icon/iconPalette").IconColorPalette & IconProps & {
|
|
6
|
+
isDisabled?: boolean | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
isValid?: boolean | undefined;
|
|
9
|
+
}, "primary" | "secondary">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|