@fattureincloud/fic-design-system 0.7.52 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/index-0788b002.css +626 -0
- package/dist/assets/index.esm-7d789d8e.css +626 -0
- package/dist/common/components/label/Label.d.ts +3 -0
- package/dist/common/components/label/types.d.ts +16 -0
- package/dist/common/components/label/utils.d.ts +5 -0
- package/dist/common/types/index.d.ts +0 -1
- package/dist/common/utils/dsUtils.d.ts +3 -0
- 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/accordions/index.d.ts +1 -2
- package/dist/components/card/Card.d.ts +1 -3
- package/dist/components/card/types.d.ts +3 -5
- package/dist/components/chart/components/styled.d.ts +13 -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/form/checkbox/Checkbox.d.ts +8 -7
- package/dist/components/form/checkbox/types.d.ts +5 -7
- package/dist/components/form/datepicker/components/DatePickerHeader.d.ts +1 -2
- package/dist/components/form/datepicker/components/MonthPicker.d.ts +1 -1
- package/dist/components/form/datepicker/components/hooks/useDatePickerHeaderShowLogic.d.ts +1 -1
- package/dist/components/form/datepicker/datePickerPalette.d.ts +4 -1
- package/dist/components/form/datepicker/datepicker.stories.d.ts +14 -3
- package/dist/components/form/datepicker/styled.d.ts +5 -1
- package/dist/components/form/datepicker/types.d.ts +8 -4
- 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/radio/types.d.ts +2 -2
- package/dist/components/form/select/components/types.d.ts +10 -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/modals/index.d.ts +1 -0
- package/dist/components/modals/stepModal/styled.d.ts +4 -1
- package/dist/components/newTable/Table.d.ts +2 -2
- package/dist/components/newTable/components/action/favorite/Favorite.d.ts +0 -1
- package/dist/components/newTable/components/action/favorite/styled.d.ts +0 -1
- package/dist/components/newTable/components/body/Body.d.ts +1 -1
- package/dist/components/newTable/components/cell/Cell.d.ts +1 -1
- package/dist/components/newTable/components/cell/customActionCell/CustomActionCell.d.ts +1 -1
- package/dist/components/newTable/components/cell/customCell/CustomCell.d.ts +1 -1
- package/dist/components/newTable/components/cell/hooks/useCellValues.d.ts +1 -1
- package/dist/components/newTable/components/header/Header.d.ts +1 -1
- package/dist/components/newTable/components/header/headerCell/ActionHeaderCell.d.ts +1 -1
- package/dist/components/newTable/components/header/headerCell/HeaderCell.d.ts +1 -1
- package/dist/components/newTable/components/header/headerCell/styled.d.ts +1 -0
- package/dist/components/newTable/components/header/hooks/useHeaderValues.d.ts +1 -1
- package/dist/components/newTable/components/row/Row.d.ts +1 -1
- package/dist/components/newTable/stories/actions.d.ts +1 -0
- package/dist/components/newTable/table.stories.d.ts +1 -0
- package/dist/components/newTable/types.d.ts +3 -3
- 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/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/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/toast/typings/toast.d.ts +0 -2
- 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/components/verticalTab/components/VerticalTabSelector/types.d.ts +1 -1
- package/dist/components/verticalTab/index.d.ts +2 -2
- package/dist/components/verticalTabs/index.d.ts +1 -0
- package/dist/components/verticalTabs/styled.d.ts +1 -3
- package/dist/index.d.ts +44 -45
- package/dist/index.esm.js +8 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/styles/elevations.d.ts +7 -0
- package/dist/styles/types.d.ts +2 -2
- package/dist/utils/FICNumbers.d.ts +11 -0
- package/package.json +1 -1
- package/dist/components/form/datepicker/hooks/useDatePickerValues.d.ts +0 -13
- 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/codeInput/useCodeInputHooks.d.ts +0 -11
- package/dist/components/form/inputText/components/telephoneInput/TelephoneInput.d.ts +0 -4
- package/dist/components/form/inputText/components/telephoneInput/countriesTelephonePrefixes.d.ts +0 -7
- package/dist/components/form/inputText/components/telephoneInput/styled.d.ts +0 -2
- package/dist/components/graphic/Graphic.d.ts +0 -4
- package/dist/components/graphic/components/ChartLegend.d.ts +0 -9
- package/dist/components/graphic/components/GraphButton.d.ts +0 -8
- package/dist/components/graphic/components/GraphIndicators.d.ts +0 -14
- package/dist/components/graphic/graphic.stories.d.ts +0 -7
- package/dist/components/graphic/index.d.ts +0 -2
- package/dist/components/graphic/stories/data.d.ts +0 -2
- package/dist/components/graphic/stories/styled.d.ts +0 -4
- package/dist/components/graphic/styled.d.ts +0 -3
- package/dist/components/graphic/types.d.ts +0 -52
- package/dist/components/graphic/utils.d.ts +0 -6
- package/dist/components/gridCard/GridCard.d.ts +0 -4
- package/dist/components/gridCard/gridCard.stories.d.ts +0 -8
- package/dist/components/gridCard/index.d.ts +0 -2
- package/dist/components/gridCard/stories/data.d.ts +0 -3
- package/dist/components/gridCard/styled.d.ts +0 -15
- package/dist/components/gridCard/types.d.ts +0 -16
- package/dist/components/gridCard/utils.d.ts +0 -2
- package/dist/components/newTable/components/header/styled.d.ts +0 -1
- package/dist/components/newTable/components/row/LoadingRow.d.ts +0 -9
- 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/index.css +0 -128
- package/dist/index.esm.css +0 -128
- package/dist/styles/defaultPalette/colors/azure.d.ts +0 -2
- package/dist/styles/defaultPalette/colors/purple.d.ts +0 -2
- /package/dist/components/table/components/{Pagination.d.ts → pagination.d.ts} +0 -0
- /package/dist/components/table/{Table.d.ts → table.d.ts} +0 -0
@@ -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 {};
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { Accordion };
|
1
|
+
export { default as Accordion } from './accordions';
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
declare const _default: React.ForwardRefExoticComponent<import("./types").StyledCardProps & {
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & import("./types").StyledCardProps & {
|
3
3
|
children: React.ReactNode | React.ReactNode[];
|
4
|
-
className?: string | undefined;
|
5
|
-
style?: React.CSSProperties | undefined;
|
6
4
|
} & React.RefAttributes<HTMLDivElement>>;
|
7
5
|
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
2
2
|
import { paletteColor } from '../../styles/types';
|
3
3
|
export declare enum CardType {
|
4
4
|
PRIMARY = "primary",
|
@@ -22,10 +22,8 @@ export declare type StyledCardProps = {
|
|
22
22
|
elevation?: CardElevation;
|
23
23
|
type?: CardType;
|
24
24
|
};
|
25
|
-
export declare type CardProps = StyledCardProps & {
|
26
|
-
children:
|
27
|
-
className?: string;
|
28
|
-
style?: CSSProperties;
|
25
|
+
export declare type CardProps = HTMLAttributes<HTMLDivElement> & StyledCardProps & {
|
26
|
+
children: ReactNode | ReactNode[];
|
29
27
|
};
|
30
28
|
declare type CardPaletteAttributes = {
|
31
29
|
background: paletteColor;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const ButtonContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
|
+
export declare const ButtonText: import("styled-components").StyledComponent<({ children, type, ...otherProps }: import("../../../common/components/typography/types").TextProps & import("react").HTMLAttributes<HTMLDivElement>) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
4
|
+
export declare const IndicatorContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
5
|
+
export declare const IndicatorButtonContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
6
|
+
export declare const LegendContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
7
|
+
export declare const LegendItemContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
8
|
+
disabled: boolean;
|
9
|
+
}, never>;
|
10
|
+
export declare const LegendSquare: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
11
|
+
color?: string | undefined;
|
12
|
+
}, never>;
|
13
|
+
export declare const LegendIcon: import("styled-components").StyledComponent<({ onClick, isDisabled, ...props }: import("../../icon").IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
@@ -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 {};
|
@@ -2,14 +2,15 @@
|
|
2
2
|
import { CheckboxProps } from './types';
|
3
3
|
/**
|
4
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}
|
10
|
-
* @param {
|
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} [onChange] Callback called on value change
|
10
|
+
* @param {function} [onClick] Callback called on component click
|
11
|
+
* @param {boolean} [required] Mark the checkbox as required with a red asterisk
|
12
|
+
* @param {ReactNode} [text] Component label text
|
11
13
|
* @param {CheckboxStatus} value Checkbox status
|
12
|
-
* @param {string} textColor To change label text color
|
13
14
|
*/
|
14
15
|
declare const Checkbox: ({ value, ...rest }: CheckboxProps) => JSX.Element;
|
15
16
|
export default Checkbox;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { InputHTMLAttributes, MouseEvent, ReactNode } from 'react';
|
2
2
|
import { paletteColor } from '../../../styles/types';
|
3
3
|
import { InputHelperProps } from '../inputHelper';
|
4
|
-
import { LabelProps } from '../label';
|
5
4
|
export declare enum CheckboxStatus {
|
6
5
|
CHECKED = "checked",
|
7
6
|
UNCHECKED = "unchecked",
|
@@ -31,14 +30,13 @@ export interface CheckboxInputProps {
|
|
31
30
|
large?: boolean;
|
32
31
|
hasError: boolean;
|
33
32
|
}
|
34
|
-
export interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'
|
35
|
-
onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
|
36
|
-
text?: string;
|
37
|
-
helper?: InputHelperProps;
|
33
|
+
export interface CheckboxImplProps extends Omit<CheckboxInputProps, 'hasError'> {
|
38
34
|
className?: string;
|
35
|
+
helper?: InputHelperProps;
|
39
36
|
onChange?: InputHTMLAttributes<HTMLInputElement>['onChange'];
|
40
|
-
|
37
|
+
onClick?: (e: MouseEvent) => void;
|
41
38
|
required?: boolean;
|
39
|
+
text?: ReactNode;
|
42
40
|
}
|
43
41
|
export interface CheckboxProps extends Omit<CheckboxImplProps, 'value'> {
|
44
42
|
value: CheckboxImplProps['value'] | boolean;
|
@@ -1,9 +1,8 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
|
3
3
|
export interface DatePickerHeaderProps extends ReactDatePickerCustomHeaderProps {
|
4
|
-
allowMonthView: boolean;
|
5
|
-
allowYearView: boolean;
|
6
4
|
yearsDisplayed: number;
|
5
|
+
setHideMonth: (value: boolean) => void;
|
7
6
|
}
|
8
7
|
declare const DatePickerHeader: (props: DatePickerHeaderProps) => JSX.Element;
|
9
8
|
export default DatePickerHeader;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ReactDatePickerCustomHeaderProps } from 'react-datepicker';
|
3
|
-
|
3
|
+
type Props = Pick<ReactDatePickerCustomHeaderProps, 'changeMonth' | 'date'>;
|
4
4
|
declare const MonthPicker: ({ changeMonth, date }: Props) => JSX.Element;
|
5
5
|
export default MonthPicker;
|
@@ -11,5 +11,5 @@ interface ReturnType {
|
|
11
11
|
showBottomArrow: boolean;
|
12
12
|
showLRArrows: boolean;
|
13
13
|
}
|
14
|
-
declare const useDatePickerHeaderShowLogic: ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, nextYearButtonDisabled, prevYearButtonDisabled, decreaseYear, increaseYear,
|
14
|
+
declare const useDatePickerHeaderShowLogic: ({ date, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, nextYearButtonDisabled, prevYearButtonDisabled, decreaseYear, increaseYear, }: DatePickerHeaderProps) => ReturnType;
|
15
15
|
export default useDatePickerHeaderShowLogic;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { colorsPalette } from '../../../common/types
|
1
|
+
import { colorsPalette } from '../../../common/types';
|
2
2
|
import { paletteColor } from '../../../styles/types';
|
3
3
|
declare type ItemStatus = 'normal' | 'active' | 'normalHover' | 'activeHover' | 'disabled';
|
4
4
|
declare type DayPalette = {
|
@@ -12,6 +12,9 @@ declare type DayPalette = {
|
|
12
12
|
outMonth: {
|
13
13
|
[k in Exclude<ItemStatus, 'active' | 'activeHover' | 'disabled'>]: colorsPalette;
|
14
14
|
};
|
15
|
+
weekend: {
|
16
|
+
[k in Exclude<ItemStatus, 'disabled'>]: colorsPalette;
|
17
|
+
};
|
15
18
|
};
|
16
19
|
declare type ItemStatusPalette = {
|
17
20
|
[k in ItemStatus]: colorsPalette;
|
@@ -1,6 +1,17 @@
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
2
2
|
import { DatePickerProps } from './types';
|
3
|
-
export declare const Normal: Story<DatePickerProps
|
4
|
-
|
5
|
-
|
3
|
+
export declare const Normal: Story<DatePickerProps & {
|
4
|
+
renderWrapper: boolean;
|
5
|
+
containerWidth: number;
|
6
|
+
containerHeight: number;
|
7
|
+
}>;
|
8
|
+
export declare const WithCustomButton: Story<DatePickerProps & {
|
9
|
+
renderWrapper: boolean;
|
10
|
+
containerWidth: number;
|
11
|
+
containerHeight: number;
|
12
|
+
}>;
|
13
|
+
declare const DatePickerStories: Meta<DatePickerProps & {
|
14
|
+
renderWrapper: boolean;
|
15
|
+
containerWidth: number;
|
16
|
+
}>;
|
6
17
|
export default DatePickerStories;
|
@@ -1,3 +1,7 @@
|
|
1
|
-
export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
1
|
+
export declare const StyledDatePicker: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
2
|
+
fitBiggerContainer?: boolean | undefined;
|
3
|
+
hideMonth: boolean;
|
4
|
+
inline?: boolean | undefined;
|
5
|
+
}, never>;
|
2
6
|
export declare const FooterWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
3
7
|
export declare const SelectedOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
@@ -2,7 +2,7 @@ import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
2
2
|
import { ReactDatePickerProps } from 'react-datepicker';
|
3
3
|
import { CommonFormTypes } from '../common/types';
|
4
4
|
import { LabelProps } from '../label';
|
5
|
-
export declare type DatePickerStatus = 'dayPicker' | '
|
5
|
+
export declare type DatePickerStatus = 'dayPicker' | 'yearPicker';
|
6
6
|
export declare type RenderCustomFooterType = (props: RenderCustomFooterProps) => ReactNode;
|
7
7
|
export declare type CustomButtonProps = {
|
8
8
|
text: string;
|
@@ -13,15 +13,19 @@ export interface RenderCustomFooterProps extends DatePickerImplProps {
|
|
13
13
|
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
14
14
|
}
|
15
15
|
export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
|
16
|
-
date
|
16
|
+
date?: Date | null;
|
17
|
+
startDate?: Date | null;
|
18
|
+
endDate?: Date | null;
|
17
19
|
setDate: Dispatch<SetStateAction<Date | null>>;
|
18
|
-
allowMonthView?: boolean;
|
19
|
-
allowYearView?: boolean;
|
20
20
|
yearsDisplayed?: number;
|
21
21
|
hasTodayButton?: boolean;
|
22
22
|
customButtons?: CustomButtonProps[];
|
23
23
|
renderCustomFooter?: RenderCustomFooterType;
|
24
24
|
isPrefilled?: boolean;
|
25
25
|
onChangeManually?: (date: Date | null) => void;
|
26
|
+
inline?: boolean;
|
27
|
+
fitBiggerContainer?: boolean;
|
28
|
+
includeDates?: Date[];
|
29
|
+
excludeDates?: Date[];
|
26
30
|
}
|
27
31
|
export declare type DatePickerProps = LabelProps & DatePickerImplProps;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ChangeEvent, InputHTMLAttributes } from 'react';
|
2
|
-
import { LabelProps } from '../../../common/
|
2
|
+
import { LabelProps } from '../../../common/components/label/types';
|
3
3
|
import { paletteColor } from '../../../styles/types';
|
4
4
|
import { InputHelperProps } from '../inputHelper';
|
5
5
|
export declare enum RadioStatus {
|
@@ -28,7 +28,7 @@ export interface RadioInputProps {
|
|
28
28
|
large?: boolean;
|
29
29
|
hasError: boolean;
|
30
30
|
}
|
31
|
-
export interface RadioImplProps extends Omit<RadioInputProps, 'hasError'>, Omit<LabelProps, 'hasError'> {
|
31
|
+
export interface RadioImplProps extends Omit<RadioInputProps, 'hasError'>, Omit<LabelProps, 'hasError' | 'palette'> {
|
32
32
|
onClick?: (e: ChangeEvent<HTMLInputElement>) => void;
|
33
33
|
text?: string;
|
34
34
|
helper?: InputHelperProps;
|
@@ -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,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 {};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export declare const LeftText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
2
|
+
size?: "small" | "large" | "medium" | undefined;
|
3
|
+
}, never>;
|
4
|
+
export declare const RightText: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {
|
5
|
+
size?: "small" | "large" | "medium" | undefined;
|
6
|
+
}, never>;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export declare enum EInputSize {
|
2
|
+
medium = "medium",
|
3
|
+
large = "large"
|
4
|
+
}
|
5
|
+
export declare enum EInputTags {
|
6
|
+
textarea = "textarea",
|
7
|
+
input = "input"
|
8
|
+
}
|
9
|
+
export declare enum EInputTypes {
|
10
|
+
password = "password",
|
11
|
+
text = "text",
|
12
|
+
number = "number"
|
13
|
+
}
|
14
|
+
export declare enum EInputErrorTypes {
|
15
|
+
generic = "generic",
|
16
|
+
wordcount = "wordcount"
|
17
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { IconProps } from '../../icon';
|
3
|
+
import { EInputErrorTypes, EInputSize, EInputTags, EInputTypes } from './enums';
|
4
|
+
export declare type MergedInputElements = HTMLInputElement | HTMLTextAreaElement;
|
5
|
+
export interface InputTextStateInterface {
|
6
|
+
}
|
7
|
+
export interface InputTextStylingPropsInterface {
|
8
|
+
size?: EInputSize;
|
9
|
+
isDisabled?: boolean;
|
10
|
+
inputWidth?: string;
|
11
|
+
error?: {
|
12
|
+
id: EInputErrorTypes;
|
13
|
+
message: string;
|
14
|
+
};
|
15
|
+
rightInputIcon?: IconProps;
|
16
|
+
leftInputIcon?: IconProps;
|
17
|
+
}
|
18
|
+
export interface InputTextPropsInterface extends InputTextStylingPropsInterface {
|
19
|
+
tag?: EInputTags;
|
20
|
+
inputType?: EInputTypes;
|
21
|
+
value?: number | string;
|
22
|
+
inputPlaceholder?: string;
|
23
|
+
autoFocus?: boolean;
|
24
|
+
label?: string;
|
25
|
+
textAreaWordCount?: {
|
26
|
+
max: number;
|
27
|
+
current: number;
|
28
|
+
};
|
29
|
+
name?: string;
|
30
|
+
rows?: number;
|
31
|
+
className?: string;
|
32
|
+
description?: {
|
33
|
+
message: string;
|
34
|
+
};
|
35
|
+
onChange?: (e: React.ChangeEvent<MergedInputElements>) => void;
|
36
|
+
onFocus?: (e: React.FocusEvent<MergedInputElements>) => void;
|
37
|
+
onBlur?: (e: React.FocusEvent<MergedInputElements>) => void;
|
38
|
+
onKeyPress?: (e: React.KeyboardEvent<MergedInputElements>) => void;
|
39
|
+
onKeyUp?: (e: React.KeyboardEvent<MergedInputElements>) => void;
|
40
|
+
onKeyDown?: (e: React.KeyboardEvent<MergedInputElements>) => void;
|
41
|
+
rightIconOnClick?: () => void;
|
42
|
+
leftIconOnClick?: () => void;
|
43
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { MergedInputElements } from './typings/inputText';
|
3
|
+
/**
|
4
|
+
*
|
5
|
+
* @param textInput
|
6
|
+
* It checks if the type of input is HTMLTextAreaElement or not
|
7
|
+
*/
|
8
|
+
export declare function isTextArea(textInput: React.RefObject<MergedInputElements>): textInput is React.RefObject<HTMLTextAreaElement>;
|
@@ -1,4 +1,7 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
1
2
|
import { Modal } from '../modals';
|
2
3
|
import { ContentWrapperProps } from './types';
|
3
4
|
export declare const ModalBodyWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ContentWrapperProps, never>;
|
4
|
-
export declare const StyledModal: import("styled-components").StyledComponent<typeof Modal, import("styled-components").DefaultTheme, {
|
5
|
+
export declare const StyledModal: import("styled-components").StyledComponent<typeof Modal, import("styled-components").DefaultTheme, {
|
6
|
+
children: ReactNode;
|
7
|
+
}, never>;
|
@@ -15,7 +15,7 @@ import { TableProps } from './types';
|
|
15
15
|
* @param {boolean} sortDescFirst If true, all sorts will default to descending as their first toggle state.
|
16
16
|
* @param {boolean} enableSettings Used to enable table settings
|
17
17
|
* @param {SettingsDropdownConfig} settingsDropdownConfig Define dropdown settings configuration
|
18
|
-
* @param {RowActions<T>} rowActions Used to define primary and dropdown actions
|
18
|
+
* @param {RowActions<T> | ((row?: Row<T>) => RowActions<T>)} rowActions Used to define primary and dropdown actions
|
19
19
|
* @param {BulkAction<T>} bulkActions Used to define bulk bar actions
|
20
20
|
* @param {boolean} isLoading Loading table state
|
21
21
|
* @param {AllSelectedCTA} allSelectedCTA clickable text that appears when all rows are selected
|
@@ -28,7 +28,7 @@ import { TableProps } from './types';
|
|
28
28
|
* @param {function} renderEmptyState Render a custom empty state for the table's body
|
29
29
|
* @param {function} onRowClick Callback called after a click on a row, returns the row
|
30
30
|
* @param {number} rowIdHighlight id of the row that will be highlighted
|
31
|
-
* @param {
|
31
|
+
* @param {number} actionColumnWidth used to determine the width of the action column
|
32
32
|
*/
|
33
33
|
declare const Table: <T>({ data, columns, isSelectable, toggles, onTogglesChange, headerSize, isTogglesSortable, sortable, sortDescFirst, enableSettings, settingsDropdownConfig, rowActions, bulkActions, isLoading, allSelectedCTA, noPagination, pageSize: pageLength, listSize, paginationPreviousText, paginationNextText, onPaginationChange, uniqueId, onSort, renderEmptyState, onRowClick, bodyHeight, totalPages, rowIdHighlight, rowHighlightColor, rowSelection, onRowSelection, forceHideSettings, renderBulkActions, preSettedTableSettings, onChangeTableSettings, notRemovableColumns, rowSize, actionColumnWidth, disableScrollX, resetPageIndex, }: TableProps<T>) => JSX.Element;
|
34
34
|
export default Table;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
export declare const Icon: import("styled-components").StyledComponent<({ className, color, icon, isDisabled, onClick, type }: import("../../../../buttons").IconButtonProps) => JSX.Element, import("styled-components").DefaultTheme, {
|
3
2
|
checked: boolean;
|
4
3
|
}, never>;
|