react-asc 20.2.0 → 21.0.0
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/components/Alert/Alert.d.ts +11 -0
- package/components/Alert/index.d.ts +1 -0
- package/components/AppBar/AppBar.d.ts +9 -0
- package/components/AppBar/AppBarTitle.d.ts +5 -0
- package/components/AppBar/index.d.ts +2 -0
- package/components/AutoComplete/AutoComplete.d.ts +19 -0
- package/components/AutoComplete/index.d.ts +1 -0
- package/components/Backdrop/Backdrop.d.ts +7 -0
- package/components/Backdrop/index.d.ts +1 -0
- package/components/Badge/Badge.d.ts +7 -0
- package/components/Badge/index.d.ts +1 -0
- package/components/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/components/Breadcrumb/BreadcrumbItem.d.ts +6 -0
- package/components/Breadcrumb/index.d.ts +2 -0
- package/components/Button/Button.d.ts +12 -0
- package/components/Button/index.d.ts +1 -0
- package/components/ButtonGroup/ButtonGroup.d.ts +2 -0
- package/components/ButtonGroup/index.d.ts +1 -0
- package/components/Card/Card.d.ts +6 -0
- package/components/Card/CardBody.d.ts +2 -0
- package/components/Card/CardFooter.d.ts +2 -0
- package/components/Card/CardImage.d.ts +2 -0
- package/components/Card/CardSubtitle.d.ts +2 -0
- package/components/Card/CardText.d.ts +2 -0
- package/components/Card/CardTitle.d.ts +6 -0
- package/components/Card/index.d.ts +7 -0
- package/components/Checkbox/Checkbox.d.ts +7 -0
- package/components/Checkbox/index.d.ts +1 -0
- package/components/Chip/Chip.d.ts +11 -0
- package/components/Chip/index.d.ts +1 -0
- package/components/ConditionalWrapper/ConditionalWrapper.d.ts +8 -0
- package/components/ConditionalWrapper/index.d.ts +1 -0
- package/components/DateSelect/DateSelect.d.ts +17 -0
- package/components/DateSelect/DaySelect.d.ts +12 -0
- package/components/DateSelect/MonthSelect.d.ts +10 -0
- package/components/DateSelect/YearSelect.d.ts +12 -0
- package/components/DateSelect/index.d.ts +4 -0
- package/components/Drawer/Drawer.d.ts +9 -0
- package/components/Drawer/index.d.ts +1 -0
- package/components/ExpansionPanel/ExpansionPanel.d.ts +8 -0
- package/components/ExpansionPanel/ExpansionPanelContent.d.ts +5 -0
- package/components/ExpansionPanel/ExpansionPanelHeader.d.ts +7 -0
- package/components/ExpansionPanel/index.d.ts +3 -0
- package/components/FileInput/FileInput.d.ts +5 -0
- package/components/FileInput/index.d.ts +1 -0
- package/components/FloatingActionButton/FloatingActionButton.d.ts +12 -0
- package/components/FloatingActionButton/index.d.ts +1 -0
- package/components/Form/Form.d.ts +38 -0
- package/components/Form/FormError.d.ts +8 -0
- package/components/Form/FormGroup.d.ts +7 -0
- package/components/Form/FormHint/FormHint.d.ts +2 -0
- package/components/Form/FormHint/index.d.ts +1 -0
- package/components/Form/FormInput/FormInput.d.ts +29 -0
- package/components/Form/FormInput/index.d.ts +1 -0
- package/components/Form/FormLabel/FormLabel.d.ts +2 -0
- package/components/Form/FormLabel/index.d.ts +1 -0
- package/components/Form/form.interfaces.d.ts +42 -0
- package/components/Form/form.models.d.ts +12 -0
- package/components/Form/form.types.d.ts +2 -0
- package/components/Form/index.d.ts +10 -0
- package/components/Form/validators/EmailValidtor.d.ts +1 -0
- package/components/Form/validators/IsEmptyValidator.d.ts +1 -0
- package/components/Form/validators/IsEqualValidator.d.ts +1 -0
- package/components/Form/validators/index.d.ts +3 -0
- package/components/Grid/Column/Column.d.ts +10 -0
- package/components/Grid/Column/index.d.ts +1 -0
- package/components/Grid/Row/Row.d.ts +5 -0
- package/components/Grid/Row/index.d.ts +1 -0
- package/components/Grid/index.d.ts +2 -0
- package/components/Icon/Icon.d.ts +6 -0
- package/components/Icon/index.d.ts +1 -0
- package/components/IconButton/IconButton.d.ts +11 -0
- package/components/IconButton/index.d.ts +1 -0
- package/components/Link/Link.d.ts +2 -0
- package/components/Link/Link.test.d.ts +1 -0
- package/components/Link/index.d.ts +1 -0
- package/components/List/List.d.ts +5 -0
- package/components/List/ListItem.d.ts +9 -0
- package/components/List/ListItemAction.d.ts +2 -0
- package/components/List/ListItemAvatar.d.ts +6 -0
- package/components/List/ListItemIcon.d.ts +6 -0
- package/components/List/ListItemText.d.ts +7 -0
- package/components/List/index.d.ts +6 -0
- package/components/List/list.models.d.ts +8 -0
- package/components/LoadingIndicator/LoadingIndicator.d.ts +2 -0
- package/components/LoadingIndicator/LoadingIndicatorContainer.d.ts +5 -0
- package/components/LoadingIndicator/index.d.ts +3 -0
- package/components/LoadingIndicator/loading-indicator.service.d.ts +11 -0
- package/components/Menu/Menu.d.ts +11 -0
- package/components/Menu/MenuBackdrop.d.ts +6 -0
- package/components/Menu/MenuBody.d.ts +12 -0
- package/components/Menu/MenuContext.d.ts +6 -0
- package/components/Menu/MenuDivider.d.ts +2 -0
- package/components/Menu/MenuItem.d.ts +8 -0
- package/components/Menu/MenuToggle.d.ts +6 -0
- package/components/Menu/index.d.ts +6 -0
- package/components/Menu/menu.types.d.ts +1 -0
- package/components/Modal/GlobalModal.d.ts +19 -0
- package/components/Modal/Modal.d.ts +14 -0
- package/components/Modal/ModalBody.d.ts +6 -0
- package/components/Modal/ModalFooter.d.ts +2 -0
- package/components/Modal/ModalHeader.d.ts +7 -0
- package/components/Modal/index.d.ts +8 -0
- package/components/Modal/modal.enum.d.ts +10 -0
- package/components/Modal/modal.interfaces.d.ts +12 -0
- package/components/Modal/modal.service.d.ts +21 -0
- package/components/NumberSelect/NumberSelect.d.ts +12 -0
- package/components/NumberSelect/index.d.ts +1 -0
- package/components/Select/Select.d.ts +16 -0
- package/components/Select/index.d.ts +1 -0
- package/components/Sidebar/Sidebar.d.ts +9 -0
- package/components/Sidebar/index.d.ts +2 -0
- package/components/Sidebar/sidebar.interfaces.d.ts +9 -0
- package/components/Sidebar/sidebar.models.d.ts +11 -0
- package/components/Snackbar/Snackbar.d.ts +8 -0
- package/components/Snackbar/index.d.ts +2 -0
- package/components/Snackbar/snackbar.service.d.ts +19 -0
- package/components/SpeedDial/SpeedDial.d.ts +7 -0
- package/components/SpeedDial/SpeedDialAction.d.ts +9 -0
- package/components/SpeedDial/SpeedDialActions.d.ts +2 -0
- package/components/SpeedDial/SpeedDialIcon.d.ts +5 -0
- package/components/SpeedDial/index.d.ts +3 -0
- package/components/Stepper/Step/Step.d.ts +19 -0
- package/components/Stepper/Step/index.d.ts +1 -0
- package/components/Stepper/StepConnector/StepConnector.d.ts +6 -0
- package/components/Stepper/StepPanel/StepPanel.d.ts +5 -0
- package/components/Stepper/Stepper.d.ts +16 -0
- package/components/Stepper/StepperActions/StepperActions.d.ts +12 -0
- package/components/Stepper/StepperActions/index.d.ts +1 -0
- package/components/Stepper/index.d.ts +3 -0
- package/components/Table/Table.d.ts +10 -0
- package/components/Table/index.d.ts +1 -0
- package/components/Tabs/Tab.d.ts +14 -0
- package/components/Tabs/TabIndicator.d.ts +10 -0
- package/components/Tabs/TabPanel.d.ts +6 -0
- package/components/Tabs/Tabs.d.ts +17 -0
- package/components/Tabs/index.d.ts +3 -0
- package/components/Textarea/Textarea.d.ts +5 -0
- package/components/Textarea/index.d.ts +1 -0
- package/components/TimeSelect/HourSelect.d.ts +10 -0
- package/components/TimeSelect/MilliSecondSelect.d.ts +11 -0
- package/components/TimeSelect/MinuteSelect.d.ts +10 -0
- package/components/TimeSelect/SecondSelect.d.ts +10 -0
- package/components/TimeSelect/TimeSelect.d.ts +20 -0
- package/components/TimeSelect/index.d.ts +5 -0
- package/components/Tooltip/Tooltip.d.ts +6 -0
- package/components/Tooltip/index.d.ts +1 -0
- package/components/TreeView/TreeItem.d.ts +14 -0
- package/components/TreeView/TreeView.d.ts +2 -0
- package/components/TreeView/index.d.ts +2 -0
- package/components/Typography/Typography.d.ts +10 -0
- package/components/Typography/index.d.ts +1 -0
- package/components/component.enums.d.ts +25 -0
- package/components/component.interfaces.d.ts +18 -0
- package/components/index.d.ts +41 -0
- package/hooks/index.d.ts +4 -0
- package/hooks/useConstructor.d.ts +1 -0
- package/hooks/useDebounce.d.ts +2 -0
- package/hooks/useHover.d.ts +2 -0
- package/hooks/useWindowSize.d.ts +4 -0
- package/icons/CaretDownSolidIcon.d.ts +2 -0
- package/icons/CheckSolidIcon.d.ts +2 -0
- package/icons/CheckSquareRegularIcon.d.ts +2 -0
- package/icons/ChevronDownSolidIcon.d.ts +2 -0
- package/icons/ChevronLeftSolidIcon.d.ts +2 -0
- package/icons/ChevronRightSolidIcon.d.ts +2 -0
- package/icons/ChevronUpSolidIcon.d.ts +2 -0
- package/icons/CircleSolidIcon.d.ts +2 -0
- package/icons/HomeSolidIcon.d.ts +2 -0
- package/icons/PlusSolidIcon.d.ts +2 -0
- package/icons/SpinnerSolidIcon.d.ts +2 -0
- package/icons/SquareRegularIcon.d.ts +2 -0
- package/icons/TimesCircleSolidIcon.d.ts +2 -0
- package/icons/TimesSolidIcon.d.ts +2 -0
- package/icons/index.d.ts +14 -0
- package/index.d.ts +3 -0
- package/index.es.js +2635 -0
- package/index.js +2751 -0
- package/package.json +1 -3
- package/react-asc.scss +4 -0
- package/readme.md +3 -5
- package/apple-touch-icon.png +0 -0
- package/assets/index.1f5e1902.js +0 -10
- package/assets/index.a1009f35.css +0 -1
- package/assets/vendor.d012860f.js +0 -57
- package/changelog.md +0 -919
- package/favicon-16x16.png +0 -0
- package/favicon-32x32.png +0 -0
- package/favicon.ico +0 -0
- package/favicon.svg +0 -23
- package/index.html +0 -27
- package/manifest.webmanifest +0 -1
- package/pwa-192x192.png +0 -0
- package/pwa-512x512.png +0 -0
- package/registerSW.js +0 -1
- package/robots.txt +0 -3
- package/showcase/alert.md +0 -3
- package/showcase/appbar.md +0 -8
- package/showcase/autocomplete.md +0 -53
- package/showcase/backdrop.md +0 -11
- package/showcase/badge.md +0 -8
- package/showcase/breadcrumb.md +0 -5
- package/showcase/button.md +0 -11
- package/showcase/buttongroup.md +0 -5
- package/showcase/card.md +0 -9
- package/showcase/checkbox.md +0 -7
- package/showcase/chip.md +0 -7
- package/showcase/dateselect.md +0 -8
- package/showcase/drawer.md +0 -13
- package/showcase/expansionpanel.md +0 -40
- package/showcase/fileinput.md +0 -6
- package/showcase/floatingactionbutton.md +0 -8
- package/showcase/form.md +0 -7
- package/showcase/grid.md +0 -5
- package/showcase/hookuseconstructor.md +0 -3
- package/showcase/hookusedebounce.md +0 -5
- package/showcase/hookusehover.md +0 -8
- package/showcase/hookusewindowsize.md +0 -5
- package/showcase/icon.md +0 -3
- package/showcase/iconbutton.md +0 -5
- package/showcase/link.md +0 -1
- package/showcase/list.md +0 -7
- package/showcase/loadingindicator.md +0 -18
- package/showcase/menu.md +0 -18
- package/showcase/modal.md +0 -17
- package/showcase/numberselect.md +0 -20
- package/showcase/select.md +0 -27
- package/showcase/snackbar.md +0 -22
- package/showcase/speeddial.md +0 -43
- package/showcase/stepper.md +0 -1
- package/showcase/table.md +0 -34
- package/showcase/tabs.md +0 -35
- package/showcase/timeselect.md +0 -1
- package/showcase/tooltip.md +0 -6
- package/showcase/treeview.md +0 -12
- package/showcase/typography.md +0 -6
- package/sw.js +0 -1
- package/workbox-6cd28afd.js +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { VARIANT } from '../component.enums';
|
|
3
|
+
import { COLOR, SIZE } from '../component.enums';
|
|
4
|
+
export interface IAlertProps extends React.ComponentProps<"div"> {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
variant?: VARIANT;
|
|
8
|
+
color?: COLOR;
|
|
9
|
+
shadow?: boolean | SIZE.sm | SIZE.md | SIZE.lg;
|
|
10
|
+
}
|
|
11
|
+
export declare const Alert: (props: IAlertProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Alert';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { COLOR, SIZE } from '../component.enums';
|
|
3
|
+
export interface IAppBarProps extends React.ComponentProps<"nav"> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: COLOR.primary | COLOR.light;
|
|
7
|
+
shadow?: boolean | SIZE.sm | SIZE.md | SIZE.lg;
|
|
8
|
+
}
|
|
9
|
+
export declare const AppBar: (props: IAppBarProps) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ISelectOption } from '../component.interfaces';
|
|
3
|
+
export interface IAutoCompleteProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
options?: Array<ISelectOption>;
|
|
8
|
+
value?: string;
|
|
9
|
+
openOnFocus?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
debounce?: number;
|
|
14
|
+
showNoEntry?: boolean;
|
|
15
|
+
showClearButton?: boolean;
|
|
16
|
+
onSelect?: (val: ISelectOption) => void;
|
|
17
|
+
onChange?: (val: string | undefined) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const AutoComplete: (props: IAutoCompleteProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AutoComplete';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Backdrop';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { COLOR, VARIANT } from '../component.enums';
|
|
3
|
+
export interface IButtonProps extends React.ComponentProps<"button"> {
|
|
4
|
+
color?: COLOR;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
isRounded?: boolean;
|
|
7
|
+
variant?: VARIANT;
|
|
8
|
+
startIcon?: React.SVGProps<SVGSVGElement>;
|
|
9
|
+
endIcon?: React.SVGProps<SVGSVGElement>;
|
|
10
|
+
shadow?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const Button: React.FunctionComponent<IButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ButtonGroup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { COLOR } from '../component.enums';
|
|
3
|
+
export interface IChipProps extends React.ComponentProps<"div"> {
|
|
4
|
+
color?: COLOR;
|
|
5
|
+
shadow?: boolean;
|
|
6
|
+
onClick?: (e: React.MouseEvent<Element>) => void;
|
|
7
|
+
isDeletable?: boolean;
|
|
8
|
+
onDelete?: (e: React.MouseEvent<Element>) => void;
|
|
9
|
+
deleteIcon?: JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export declare const Chip: (props: IChipProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Chip';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IConditionalWrapperProps {
|
|
3
|
+
condition: boolean;
|
|
4
|
+
wrapper: (children: React.ReactNode) => JSX.Element;
|
|
5
|
+
children: any;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionalWrapper: ({ condition, wrapper, children }: IConditionalWrapperProps) => any;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ConditionalWrapper';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare enum DATEMODE {
|
|
3
|
+
YEAR = 0,
|
|
4
|
+
MONTH = 1,
|
|
5
|
+
DAY = 2
|
|
6
|
+
}
|
|
7
|
+
export interface IDateSelectProps {
|
|
8
|
+
value?: Date;
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
yearConfig?: {
|
|
12
|
+
from?: number;
|
|
13
|
+
to?: number;
|
|
14
|
+
};
|
|
15
|
+
onChange?: (val: Date) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const DateSelect: (props: IDateSelectProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IDaySelectProps {
|
|
3
|
+
day?: number;
|
|
4
|
+
month?: number;
|
|
5
|
+
year?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onChange?: (val: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const DaySelect: (props: IDaySelectProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IMonthProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
className?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange?: (val: number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MonthSelect: (props: IMonthProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IYearProps {
|
|
3
|
+
from?: number;
|
|
4
|
+
to?: number;
|
|
5
|
+
value?: number;
|
|
6
|
+
className?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onChange?: (val: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const YearSelect: (props: IYearProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IDrawerProps extends React.ComponentProps<"div"> {
|
|
3
|
+
position?: 'left' | 'right';
|
|
4
|
+
shadow?: boolean;
|
|
5
|
+
onClickBackdrop?: () => void;
|
|
6
|
+
permanent?: boolean;
|
|
7
|
+
target?: HTMLElement;
|
|
8
|
+
}
|
|
9
|
+
export declare const Drawer: (props: IDrawerProps) => React.ReactPortal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Drawer';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface IExpansionPanelProps {
|
|
3
|
+
header: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
isExpanded?: boolean;
|
|
6
|
+
onChange?: (event: React.MouseEvent, isExpanded: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const ExpansionPanel: (props: IExpansionPanelProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface IExpansionPanelHeaderProps {
|
|
3
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
isExpanded: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ExpansionPanelHeader: (props: IExpansionPanelHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FileInput';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { COLOR, SIZE } from '../component.enums';
|
|
3
|
+
export interface IFloatingActionButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
4
|
+
icon?: React.SVGProps<SVGSVGElement>;
|
|
5
|
+
color?: COLOR;
|
|
6
|
+
size?: SIZE;
|
|
7
|
+
fixed?: boolean;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const FloatingActionButton: (props: IFloatingActionButtonProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FloatingActionButton';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { IControls, IFormValues } from './form.interfaces';
|
|
3
|
+
import { FormControl } from './form.models';
|
|
4
|
+
export interface IFormProps {
|
|
5
|
+
controls: IControls;
|
|
6
|
+
validateOnBlur?: boolean;
|
|
7
|
+
onSubmit?: (values: IFormValues) => void;
|
|
8
|
+
onChange?: (values: IFormValues) => void;
|
|
9
|
+
submitOnEnter?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface IFormState {
|
|
12
|
+
controls: IControls | undefined;
|
|
13
|
+
isValid: boolean;
|
|
14
|
+
isSubmitted: boolean;
|
|
15
|
+
isChanged: boolean;
|
|
16
|
+
submitOnEnter?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class Form extends Component<IFormProps, IFormState> {
|
|
19
|
+
constructor(props: IFormProps);
|
|
20
|
+
static getDerivedStateFromProps(nextProps: IFormProps, state: IFormState): {
|
|
21
|
+
controls: IControls;
|
|
22
|
+
} | null;
|
|
23
|
+
myForm: React.RefObject<HTMLFormElement>;
|
|
24
|
+
handleChange(): void;
|
|
25
|
+
private validateField;
|
|
26
|
+
private handleInputChange;
|
|
27
|
+
private handleOnBlur;
|
|
28
|
+
private isRequired;
|
|
29
|
+
private isInvalid;
|
|
30
|
+
getControl(name: string): FormControl;
|
|
31
|
+
private renderLabel;
|
|
32
|
+
handleFormSubmit(): void;
|
|
33
|
+
handleFormReset(): void;
|
|
34
|
+
handleOnKeyDown(e: React.KeyboardEvent<HTMLInputElement | undefined>): void;
|
|
35
|
+
destroy(): void;
|
|
36
|
+
getFormGroupCssClass(fieldKey: string): string | undefined;
|
|
37
|
+
render(): JSX.Element;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormHint';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IFormInputOptions, IFormTextAreaOptions, IFormSelectOptions, IFormAutoCompleteOptions } from '../form.interfaces';
|
|
3
|
+
import { IFormControlType } from '../form.types';
|
|
4
|
+
export interface IFormInputEvent {
|
|
5
|
+
value: any;
|
|
6
|
+
type?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IFormInputProps {
|
|
10
|
+
value: any;
|
|
11
|
+
name: string;
|
|
12
|
+
type: IFormControlType;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
isValid?: boolean;
|
|
18
|
+
autoFocus?: boolean;
|
|
19
|
+
options?: Array<IFormInputOptions>;
|
|
20
|
+
textareaOptions?: IFormTextAreaOptions;
|
|
21
|
+
selectOptions?: IFormSelectOptions;
|
|
22
|
+
autoCompleteOptions?: IFormAutoCompleteOptions;
|
|
23
|
+
label?: string;
|
|
24
|
+
onInput?: (e: IFormInputEvent) => void;
|
|
25
|
+
onChange?: (e: IFormInputEvent) => void;
|
|
26
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
27
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement | undefined>;
|
|
28
|
+
}
|
|
29
|
+
export declare const FormInput: (props: IFormInputProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormLabel';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FormControl } from './form.models';
|
|
2
|
+
export interface IControls {
|
|
3
|
+
[key: string]: FormControl;
|
|
4
|
+
}
|
|
5
|
+
export interface IFormValues {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface IFormTextAreaOptions {
|
|
9
|
+
rows: number;
|
|
10
|
+
resize: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface IFormSelectOptions {
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface IFormAutoCompleteOptions {
|
|
16
|
+
openOnFocus?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface IFormInputError {
|
|
19
|
+
validator: string;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IFormInputOptions {
|
|
23
|
+
id?: string;
|
|
24
|
+
value: string;
|
|
25
|
+
label?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface IFormControlConfig {
|
|
28
|
+
label: string;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
formControlClassName?: string;
|
|
31
|
+
formGroupClassName?: string;
|
|
32
|
+
labelClassName?: string;
|
|
33
|
+
labelPosition?: string;
|
|
34
|
+
autoFocus?: boolean;
|
|
35
|
+
hint?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
readonly?: boolean;
|
|
38
|
+
options?: Array<IFormInputOptions>;
|
|
39
|
+
textareaOptions?: IFormTextAreaOptions;
|
|
40
|
+
selectOptions?: IFormSelectOptions;
|
|
41
|
+
autoCompleteOptions?: IFormAutoCompleteOptions;
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IFormControlConfig, IFormInputError } from './form.interfaces';
|
|
2
|
+
import { IFormControlType } from './form.types';
|
|
3
|
+
export declare class FormControl {
|
|
4
|
+
value: any;
|
|
5
|
+
validators: Array<string>;
|
|
6
|
+
type: IFormControlType;
|
|
7
|
+
config: IFormControlConfig;
|
|
8
|
+
constructor(value: any, validators: Array<string>, type: IFormControlType, config: IFormControlConfig);
|
|
9
|
+
errors: Array<IFormInputError>;
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
isDirty: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare type IFormControlType = 'text' | 'textarea' | 'email' | 'number' | 'checkbox' | 'checkboxgroup' | 'radio' | 'select' | 'password' | 'color' | 'time' | 'file' | 'date' | 'datetime-local' | 'autocomplete';
|
|
2
|
+
export declare type IFormValidatorType = 'required' | 'email' | 'match';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './Form';
|
|
2
|
+
export * from './FormError';
|
|
3
|
+
export * from './FormGroup';
|
|
4
|
+
export * from './FormHint';
|
|
5
|
+
export * from './FormInput';
|
|
6
|
+
export * from './FormLabel';
|
|
7
|
+
export * from './form.models';
|
|
8
|
+
export * from './form.interfaces';
|
|
9
|
+
export * from './form.types';
|
|
10
|
+
export * from './validators';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmailValidator: (value: string) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IsEmptyValidator: (value: unknown) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IsEqualValidator: (valueA: unknown, valueB: unknown) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Column';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface IContainerProps extends React.ComponentProps<"div"> {
|
|
3
|
+
direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
4
|
+
}
|
|
5
|
+
export declare const Row: ({ children, direction, className, ...rest }: IContainerProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Row';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Icon';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { COLOR, SIZE, VARIANT } from '../component.enums';
|
|
3
|
+
export interface IIconButtonProps extends React.ComponentProps<"button"> {
|
|
4
|
+
icon?: React.SVGProps<SVGSVGElement>;
|
|
5
|
+
color?: COLOR;
|
|
6
|
+
size?: SIZE;
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
variant?: VARIANT;
|
|
9
|
+
shadow?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const IconButton: (props: IIconButtonProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IconButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Link';
|