@agilekit/ui 0.1.0-alpha.3 → 0.1.0-alpha.32
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/lib/index.css +205 -0
- package/lib/index.js +1 -1
- package/lib/src/components/Button/Button.d.ts +1 -0
- package/lib/src/components/ButtonGroup/ButtonGroup.d.ts +23 -0
- package/lib/src/components/ButtonGroup/index.d.ts +2 -0
- package/lib/src/components/ButtonGroup/tests/ButtonGroup.test.d.ts +1 -0
- package/lib/src/components/DatePicker/DatePicker.d.ts +28 -0
- package/lib/src/components/DatePicker/index.d.ts +2 -0
- package/lib/src/components/DatePicker/tests/DatePicker.test.d.ts +1 -0
- package/lib/src/components/Drawer/Drawer.d.ts +1 -0
- package/lib/src/components/IconButton/IconButton.d.ts +11 -0
- package/lib/src/components/IconButton/index.d.ts +2 -0
- package/lib/src/components/IconButton/tests/IconButton.test.d.ts +1 -0
- package/lib/src/components/InputDuration/InputDuration.d.ts +5 -0
- package/lib/src/components/InputDuration/InputDuration.styles.d.ts +1 -0
- package/lib/src/components/InputDuration/InputDuration.types.d.ts +14 -0
- package/lib/src/components/InputDuration/index.d.ts +2 -0
- package/lib/src/components/InputDuration/tests/InputDuration.test.d.ts +1 -0
- package/lib/src/components/MultiTextField/MultiTextField.d.ts +1 -1
- package/lib/src/components/MultiselectGroup/MultiselectGroup.d.ts +13 -0
- package/lib/src/components/MultiselectGroup/MultiselectGroup.test.d.ts +1 -0
- package/lib/src/components/MultiselectGroup/index.d.ts +2 -0
- package/lib/src/components/NumberStepper/NumberStepper.d.ts +5 -0
- package/lib/src/components/NumberStepper/NumberStepper.styles.d.ts +1 -0
- package/lib/src/components/NumberStepper/NumberStepper.types.d.ts +18 -0
- package/lib/src/components/NumberStepper/index.d.ts +2 -0
- package/lib/src/components/NumberStepper/tests/NumberStepper.test.d.ts +1 -0
- package/lib/src/components/SectionMessage/SectionMessage.d.ts +1 -1
- package/lib/src/components/Select/Select.d.ts +2 -0
- package/lib/src/components/Select/Select.styles.d.ts +1 -1
- package/lib/src/components/Select/tests/Select.test.d.ts +1 -0
- package/lib/src/components/TextField/TextField.d.ts +2 -55
- package/lib/src/components/TextField/TextField.helpers.d.ts +8 -0
- package/lib/src/components/TextField/TextField.renderers.d.ts +72 -0
- package/lib/src/components/TextField/TextField.styles.d.ts +1 -1
- package/lib/src/components/TextField/TextField.types.d.ts +62 -0
- package/lib/src/components/TextField/index.d.ts +2 -0
- package/lib/src/components/TextField/tests/TextField.test.d.ts +1 -0
- package/lib/src/components/TextField/tests/TextFieldDatePicker.integration.test.d.ts +1 -0
- package/lib/src/components/TooltipBox/TooltipBox.d.ts +21 -0
- package/lib/src/components/TooltipBox/index.d.ts +1 -0
- package/lib/src/index.d.ts +9 -2
- package/package.json +10 -7
- package/src/components/utils/breakpoints.ts +4 -0
- package/src/components/utils/browser.ts +4 -0
- package/src/components/utils/findParentBySelector.ts +4 -0
- package/src/components/utils/idGenerator.ts +4 -0
- package/src/components/utils/index.ts +4 -0
- package/src/components/utils/setNativeValue.ts +4 -0
- package/lib/1b1dbde44b8e57f5249d.svg +0 -1
- package/lib/1bacdb48288af7b7e773.woff +0 -1
- package/lib/22061185048a95e44414.woff2 +0 -1
- package/lib/22703789f58da9775feb.ttf +0 -1
- package/lib/56d8b246d1fc50fab7d9.eot +0 -1
- package/lib/src/components/FileUpload/FileUpload.stories.d.ts +0 -14
|
@@ -16,6 +16,7 @@ export interface IButtonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
|
16
16
|
type?: 'button' | 'submit' | 'reset';
|
|
17
17
|
ariaLabel?: string;
|
|
18
18
|
startIcon?: React.ReactNode;
|
|
19
|
+
endIcon?: React.ReactNode;
|
|
19
20
|
onClick?(event: React.MouseEvent<HTMLButtonElement>): void;
|
|
20
21
|
}
|
|
21
22
|
declare const Button: React.FC<IButtonProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IButtonGroupItem {
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
startIcon?: React.ReactNode;
|
|
7
|
+
endIcon?: React.ReactNode;
|
|
8
|
+
onClick?(event: React.MouseEvent<HTMLButtonElement>): void;
|
|
9
|
+
}
|
|
10
|
+
export interface IButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
items: IButtonGroupItem[];
|
|
12
|
+
selectedValues: string[];
|
|
13
|
+
onSelectionChange: (values: string[]) => void;
|
|
14
|
+
selectionMode: 'single' | 'multiple';
|
|
15
|
+
type?: 'primary' | 'secondary' | 'success' | 'danger' | 'subtle';
|
|
16
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
17
|
+
outline?: boolean;
|
|
18
|
+
orientation?: 'horizontal' | 'vertical';
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
fullWidth?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const ButtonGroup: React.FC<IButtonGroupProps>;
|
|
23
|
+
export default ButtonGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Placement } from 'popper.js';
|
|
3
|
+
import type { CalendarProps } from 'react-calendar';
|
|
4
|
+
export type DatePickerValue = Date | null | [Date | null, Date | null];
|
|
5
|
+
export interface DatePickerTriggerProps {
|
|
6
|
+
open: boolean;
|
|
7
|
+
onClick: (event: React.MouseEvent<any>) => void;
|
|
8
|
+
'aria-haspopup': 'dialog';
|
|
9
|
+
'aria-expanded': boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface DatePickerProps {
|
|
12
|
+
open?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
value?: DatePickerValue;
|
|
16
|
+
defaultValue?: DatePickerValue;
|
|
17
|
+
onChange?: (value: DatePickerValue, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
|
+
renderTrigger: (props: DatePickerTriggerProps) => React.ReactElement<any>;
|
|
19
|
+
selectRange?: boolean;
|
|
20
|
+
locale?: string;
|
|
21
|
+
closeOnSelect?: boolean;
|
|
22
|
+
placement?: Placement;
|
|
23
|
+
isPortal?: boolean;
|
|
24
|
+
zIndex?: number;
|
|
25
|
+
calendarProps?: Omit<CalendarProps, 'value' | 'defaultValue' | 'onChange' | 'selectRange' | 'locale'>;
|
|
26
|
+
}
|
|
27
|
+
declare const DatePicker: React.FC<DatePickerProps>;
|
|
28
|
+
export default DatePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type IconButtonVariant = 'basic' | 'primary' | 'success' | 'danger' | 'subtle';
|
|
3
|
+
export type IconButtonSize = 'small' | 'medium' | 'large' | 'xlarge';
|
|
4
|
+
export interface IIconButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'children'> {
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
variant?: IconButtonVariant;
|
|
8
|
+
size?: IconButtonSize;
|
|
9
|
+
}
|
|
10
|
+
declare const IconButton: React.FC<IIconButtonProps>;
|
|
11
|
+
export default IconButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useInputDurationStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"divider" | "root" | "helperText" | "secondaryLabel" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "sizeMd" | "sizeSm" | "segmentContainer" | "iconWrapper" | "iconMd" | "iconSm" | "numberContainer" | "numberInput" | "numberInputDisabled" | "unitLabel">;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BasicTextFieldProps } from '../TextField';
|
|
3
|
+
export interface DurationValue {
|
|
4
|
+
hours: number | '';
|
|
5
|
+
minutes: number | '';
|
|
6
|
+
}
|
|
7
|
+
export interface IInputDurationProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'onBlur' | 'onFocus'>, BasicTextFieldProps {
|
|
8
|
+
value?: DurationValue;
|
|
9
|
+
onChange?(value: DurationValue): void;
|
|
10
|
+
size?: 'md' | 'sm';
|
|
11
|
+
name?: string;
|
|
12
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
13
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MultiselectGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
items: string[];
|
|
4
|
+
selectedItems?: string[];
|
|
5
|
+
consolidated?: boolean;
|
|
6
|
+
collapsed?: boolean;
|
|
7
|
+
onSelectionChange?: (newSelected: string[]) => void;
|
|
8
|
+
isRange?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
'data-testid'?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const MultiselectGroup: React.FC<MultiselectGroupProps>;
|
|
13
|
+
export default MultiselectGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NumberStepperProps } from './NumberStepper.types';
|
|
3
|
+
export type { NumberStepperProps, NumberStepperValue } from './NumberStepper.types';
|
|
4
|
+
declare const NumberStepper: React.FC<NumberStepperProps>;
|
|
5
|
+
export default NumberStepper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useNumberStepperStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"input" | "root" | "helperText" | "secondaryLabel" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "inputDisabled" | "sizeMd" | "sizeSm" | "actionButton" | "actionButtonLeft" | "actionButtonRight" | "actionButtonLeftMd" | "actionButtonRightMd" | "actionButtonSm" | "actionButtonDisabled" | "actionIconMd" | "actionIconSm" | "valueSegment" | "valueSegmentMd" | "valueSegmentSm" | "valueSegmentFocus" | "valueSegmentDisabled">;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BasicTextFieldProps } from '../TextField';
|
|
3
|
+
export type NumberStepperValue = number | '';
|
|
4
|
+
export interface NumberStepperProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue' | 'onBlur' | 'onFocus'>, BasicTextFieldProps {
|
|
5
|
+
value?: NumberStepperValue;
|
|
6
|
+
defaultValue?: NumberStepperValue;
|
|
7
|
+
onValueChange?(nextValue: NumberStepperValue): void;
|
|
8
|
+
onChange?(event: React.ChangeEvent<HTMLInputElement>): void;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
size?: 'md' | 'sm';
|
|
13
|
+
decrementDisabled?: boolean;
|
|
14
|
+
incrementDisabled?: boolean;
|
|
15
|
+
name?: string;
|
|
16
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
17
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,7 +8,7 @@ export interface SectionMessageAction {
|
|
|
8
8
|
rel?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface SectionMessageProps {
|
|
11
|
-
title
|
|
11
|
+
title?: string;
|
|
12
12
|
appearance?: 'information' | 'success' | 'warning' | 'error' | 'discovery';
|
|
13
13
|
size?: 'small' | 'medium';
|
|
14
14
|
children?: React.ReactNode;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { NativeSelectProps } from '@material-ui/core';
|
|
3
3
|
export interface ISelectProps extends NativeSelectProps {
|
|
4
4
|
inputRef?: any;
|
|
5
|
+
prepend?: React.ReactNode;
|
|
6
|
+
append?: React.ReactNode;
|
|
5
7
|
label?: string;
|
|
6
8
|
labelHidden?: boolean;
|
|
7
9
|
disabled?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useSelectStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"icon" | "select" | "asteriskRequired" | "containerNotFull">;
|
|
1
|
+
declare const useSelectStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"icon" | "slot" | "select" | "inputBase" | "asteriskRequired" | "containerNotFull" | "append" | "prepend" | "selectWithPrepend" | "selectWithAppend" | "slotDisabled">;
|
|
2
2
|
export default useSelectStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,58 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export interface BasicTextFieldProps {
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
label?: string;
|
|
7
|
-
labelHidden?: boolean;
|
|
8
|
-
secondaryLabel?: React.ReactNode;
|
|
9
|
-
error?: Error | boolean | string;
|
|
10
|
-
helperText?: React.ReactNode;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
id?: string;
|
|
13
|
-
displayRequired?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface ITextFieldProps extends React.HTMLAttributes<HTMLInputElement>, BasicTextFieldProps {
|
|
16
|
-
inputRef?: any;
|
|
17
|
-
prepend?: React.ReactNode;
|
|
18
|
-
append?: React.ReactNode;
|
|
19
|
-
startAdornment?: React.ReactNode;
|
|
20
|
-
endAdornment?: React.ReactNode;
|
|
21
|
-
value?: string | number | undefined;
|
|
22
|
-
readOnly?: boolean;
|
|
23
|
-
autoFocus?: boolean;
|
|
24
|
-
autoComplete?: string;
|
|
25
|
-
focused?: boolean;
|
|
26
|
-
multiline?: boolean;
|
|
27
|
-
datePicker?: boolean;
|
|
28
|
-
dateRange?: boolean;
|
|
29
|
-
colorPicker?: boolean | number;
|
|
30
|
-
type?: string;
|
|
31
|
-
mask?: string;
|
|
32
|
-
name?: string;
|
|
33
|
-
iconLeft?: React.ReactNode;
|
|
34
|
-
iconRight?: React.ReactNode;
|
|
35
|
-
inputProps?: Record<string, any>;
|
|
36
|
-
inputSize?: 'medium' | 'large';
|
|
37
|
-
onFocus?: any;
|
|
38
|
-
onBlur?: any;
|
|
39
|
-
color?: 'primary' | 'secondary' | undefined;
|
|
40
|
-
rows?: string | number;
|
|
41
|
-
rowsMax?: string | number;
|
|
42
|
-
rowsMin?: string | number;
|
|
43
|
-
onChange?(e: React.ChangeEvent<any> | string, id?: string): void;
|
|
44
|
-
mode?: string;
|
|
45
|
-
decimalScale?: number;
|
|
46
|
-
fixedDecimalScale?: boolean;
|
|
47
|
-
allowNegative?: boolean;
|
|
48
|
-
prefix?: string;
|
|
49
|
-
suffix?: string;
|
|
50
|
-
defaultValue?: string | number;
|
|
51
|
-
isNumericString?: boolean;
|
|
52
|
-
format?: string;
|
|
53
|
-
allowEmptyFormatting?: boolean;
|
|
54
|
-
isAllowed?: (values: NumberFormatValues) => boolean;
|
|
55
|
-
locale?: string;
|
|
56
|
-
}
|
|
2
|
+
import type { ITextFieldProps } from './TextField.types';
|
|
3
|
+
export type { BasicTextFieldProps, ITextFieldProps } from './TextField.types';
|
|
57
4
|
declare const TextField: React.FC<ITextFieldProps>;
|
|
58
5
|
export default TextField;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const createInputChangeEvent: (value: string | number, name?: string) => React.ChangeEvent<HTMLInputElement>;
|
|
3
|
+
export declare const formatDatePickerValue: (value: any, dateRange: boolean, locale: string) => string;
|
|
4
|
+
export interface TimePickerOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const getTimePickerOptions: (inputProps?: Record<string, any>, timePickerFormat?: '12h' | '24h') => TimePickerOption[];
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorResult } from 'react-color';
|
|
3
|
+
import { DatePickerValue } from '../DatePicker/DatePicker';
|
|
4
|
+
import type { TextFieldCalendarProps } from './TextField.types';
|
|
5
|
+
interface AdornmentParams {
|
|
6
|
+
startAdornment?: React.ReactNode;
|
|
7
|
+
endAdornment?: React.ReactNode;
|
|
8
|
+
iconLeft?: React.ReactNode;
|
|
9
|
+
iconRight?: React.ReactNode;
|
|
10
|
+
datePicker?: boolean;
|
|
11
|
+
dateRange?: boolean;
|
|
12
|
+
timePicker?: boolean;
|
|
13
|
+
timePickerDisabled?: boolean;
|
|
14
|
+
datePickerAdornment?: React.ReactNode;
|
|
15
|
+
classes: any;
|
|
16
|
+
handleTimePickerClick: (event: React.MouseEvent<any>) => void;
|
|
17
|
+
}
|
|
18
|
+
interface DatePickerAdornmentParams {
|
|
19
|
+
open: boolean;
|
|
20
|
+
datePicker?: boolean;
|
|
21
|
+
dateRange?: boolean;
|
|
22
|
+
locale: string;
|
|
23
|
+
calendarProps?: TextFieldCalendarProps;
|
|
24
|
+
classes: any;
|
|
25
|
+
handleDatePickerOpenChange: (open: boolean) => void;
|
|
26
|
+
handleDatePicker: (value: DatePickerValue) => void;
|
|
27
|
+
}
|
|
28
|
+
interface ColorPickerButtonParams {
|
|
29
|
+
classes: any;
|
|
30
|
+
value?: string | number;
|
|
31
|
+
handlePopoverClick: (event: React.MouseEvent<any>) => void;
|
|
32
|
+
}
|
|
33
|
+
interface ColorPickerPopoverParams {
|
|
34
|
+
name?: string;
|
|
35
|
+
open: boolean;
|
|
36
|
+
anchorEl: HTMLElement | null;
|
|
37
|
+
classes: any;
|
|
38
|
+
value?: string | number;
|
|
39
|
+
colorPickerMode: 'free' | 'predefined';
|
|
40
|
+
predefinedColors?: string[];
|
|
41
|
+
handlePopoverClose: () => void;
|
|
42
|
+
handleColorPicker: (color: ColorResult) => void;
|
|
43
|
+
handlePredefinedColorPicker: (color: ColorResult) => void;
|
|
44
|
+
}
|
|
45
|
+
interface TimePickerPopoverParams {
|
|
46
|
+
open: boolean;
|
|
47
|
+
anchorEl: HTMLElement | null;
|
|
48
|
+
timePicker?: boolean;
|
|
49
|
+
classes: any;
|
|
50
|
+
value?: string | number;
|
|
51
|
+
options: {
|
|
52
|
+
label: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}[];
|
|
55
|
+
handlePopoverClose: () => void;
|
|
56
|
+
handleTimePickerSelect: (value: string) => void;
|
|
57
|
+
}
|
|
58
|
+
interface HelperTextParams {
|
|
59
|
+
error?: Error | boolean | string;
|
|
60
|
+
helperText?: React.ReactNode;
|
|
61
|
+
classes: any;
|
|
62
|
+
}
|
|
63
|
+
export declare const getTextFieldAdornments: ({ startAdornment, endAdornment, iconLeft, iconRight, datePicker, dateRange, timePicker, timePickerDisabled, datePickerAdornment, classes, handleTimePickerClick, }: AdornmentParams) => {
|
|
64
|
+
finalStartAdornment: React.ReactNode;
|
|
65
|
+
finalEndAdornment: React.ReactNode;
|
|
66
|
+
};
|
|
67
|
+
export declare const renderDatePickerAdornment: ({ open, datePicker, dateRange, locale, calendarProps, classes, handleDatePickerOpenChange, handleDatePicker, }: DatePickerAdornmentParams) => React.ReactNode;
|
|
68
|
+
export declare const renderColorPickerButton: ({ classes, value, handlePopoverClick, }: ColorPickerButtonParams) => React.ReactNode;
|
|
69
|
+
export declare const renderColorPickerPopover: ({ name, open, anchorEl, classes, value, colorPickerMode, predefinedColors, handlePopoverClose, handleColorPicker, handlePredefinedColorPicker, }: ColorPickerPopoverParams) => React.ReactNode;
|
|
70
|
+
export declare const renderTimePickerPopover: ({ open, anchorEl, timePicker, classes, value, options, handlePopoverClose, handleTimePickerSelect, }: TimePickerPopoverParams) => React.ReactNode;
|
|
71
|
+
export declare const renderHelperText: ({ error, helperText, classes }: HelperTextParams) => React.ReactNode;
|
|
72
|
+
export {};
|
|
@@ -12,5 +12,5 @@ interface HelperTextStyles {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const inputLabelStyles: (theme: ThemeAgile) => InputLabelStyles;
|
|
14
14
|
export declare const helperTextStyles: (theme: ThemeAgile) => HelperTextStyles;
|
|
15
|
-
export declare const useTextFieldStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"helperText" | "secondaryLabel" | "inputBase" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "multilineContainer" | "inputDisabled" | "inputAction" | "inputGroupAppend" | "inputBtn" | "withAppend" | "withIconLeft" | "sideIcon" | "colorPickerButton" | "colorPopover" | "withMask" | "append" | "edgeEnd">;
|
|
15
|
+
export declare const useTextFieldStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"helperText" | "secondaryLabel" | "inputBase" | "inputLabel" | "inputLabelFocused" | "asteriskRequired" | "inputContainer" | "inputContainerFocus" | "inputContainerDisabled" | "inputContainerError" | "multilineContainer" | "inputDisabled" | "inputAction" | "inputGroupAppend" | "inputBtn" | "withAppend" | "withIconLeft" | "sideIcon" | "colorPickerButton" | "colorPopover" | "predefinedColorInput" | "timePickerInput" | "timePickerPopover" | "timePickerOptionList" | "timePickerOption" | "timePickerOptionSelected" | "withMask" | "append" | "edgeEnd">;
|
|
16
16
|
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NumberFormatValues } from 'react-number-format';
|
|
3
|
+
import type { CalendarProps } from 'react-calendar';
|
|
4
|
+
export type TextFieldCalendarProps = Omit<CalendarProps, 'value' | 'defaultValue' | 'onChange' | 'selectRange' | 'locale'>;
|
|
5
|
+
export interface BasicTextFieldProps {
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
labelHidden?: boolean;
|
|
9
|
+
secondaryLabel?: React.ReactNode;
|
|
10
|
+
error?: Error | boolean | string;
|
|
11
|
+
helperText?: React.ReactNode;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
id?: string;
|
|
14
|
+
displayRequired?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ITextFieldProps extends React.HTMLAttributes<HTMLInputElement>, BasicTextFieldProps {
|
|
17
|
+
inputRef?: any;
|
|
18
|
+
prepend?: React.ReactNode;
|
|
19
|
+
append?: React.ReactNode;
|
|
20
|
+
startAdornment?: React.ReactNode;
|
|
21
|
+
endAdornment?: React.ReactNode;
|
|
22
|
+
value?: string | number | undefined;
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
autoFocus?: boolean;
|
|
25
|
+
autoComplete?: string;
|
|
26
|
+
focused?: boolean;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
datePicker?: boolean;
|
|
29
|
+
dateRange?: boolean;
|
|
30
|
+
timePicker?: boolean;
|
|
31
|
+
calendarProps?: TextFieldCalendarProps;
|
|
32
|
+
timePickerFormat?: '12h' | '24h';
|
|
33
|
+
colorPicker?: boolean | number;
|
|
34
|
+
colorPickerMode?: 'free' | 'predefined';
|
|
35
|
+
predefinedColors?: string[];
|
|
36
|
+
type?: string;
|
|
37
|
+
mask?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
iconLeft?: React.ReactNode;
|
|
40
|
+
iconRight?: React.ReactNode;
|
|
41
|
+
inputProps?: Record<string, any>;
|
|
42
|
+
inputSize?: 'medium' | 'large';
|
|
43
|
+
onFocus?: any;
|
|
44
|
+
onBlur?: any;
|
|
45
|
+
color?: 'primary' | 'secondary' | undefined;
|
|
46
|
+
rows?: string | number;
|
|
47
|
+
rowsMax?: string | number;
|
|
48
|
+
rowsMin?: string | number;
|
|
49
|
+
onChange?(e: React.ChangeEvent<any> | string, id?: string): void;
|
|
50
|
+
mode?: string;
|
|
51
|
+
decimalScale?: number;
|
|
52
|
+
fixedDecimalScale?: boolean;
|
|
53
|
+
allowNegative?: boolean;
|
|
54
|
+
prefix?: string;
|
|
55
|
+
suffix?: string;
|
|
56
|
+
defaultValue?: string | number;
|
|
57
|
+
isNumericString?: boolean;
|
|
58
|
+
format?: string;
|
|
59
|
+
allowEmptyFormatting?: boolean;
|
|
60
|
+
isAllowed?: (values: NumberFormatValues) => boolean;
|
|
61
|
+
locale?: string;
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Placement } from 'popper.js';
|
|
3
|
+
type TooltipBoxTrigger = 'click' | 'hover' | 'focus';
|
|
4
|
+
type TooltipBoxTriggerValue = TooltipBoxTrigger | TooltipBoxTrigger[] | `${TooltipBoxTrigger} ${TooltipBoxTrigger}` | `${TooltipBoxTrigger} ${TooltipBoxTrigger} ${TooltipBoxTrigger}`;
|
|
5
|
+
export type TooltipBoxTipPosition = 'none' | 'top-left' | 'top-center' | 'top-right' | 'left' | 'right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
6
|
+
export interface TooltipBoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
className?: string;
|
|
8
|
+
copy?: React.ReactNode;
|
|
9
|
+
tip?: TooltipBoxTipPosition;
|
|
10
|
+
type?: 'dark' | 'light';
|
|
11
|
+
offset?: number | string;
|
|
12
|
+
children: React.ReactElement;
|
|
13
|
+
placement?: Placement;
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
zIndex?: number;
|
|
18
|
+
trigger?: TooltipBoxTriggerValue;
|
|
19
|
+
}
|
|
20
|
+
declare const TooltipBox: React.FC<TooltipBoxProps>;
|
|
21
|
+
export default TooltipBox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TooltipBox } from './TooltipBox';
|
package/lib/src/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './assets/styles/global/styles.scss';
|
|
2
1
|
export { makeStyles, useTheme, ThemeProvider, withStyles, StylesProvider, createGenerateClassName, } from '@material-ui/core/styles';
|
|
3
2
|
export type { Theme } from '@material-ui/core/styles';
|
|
4
3
|
export { useMediaQuery, FormControlLabel, Tooltip, CircularProgress, Table, TableBody, TableCell, TableContainer, TableHead, TablePagination, TableRow, TableSortLabel, Toolbar, Typography, Paper, } from '@material-ui/core';
|
|
@@ -12,6 +11,7 @@ export { default as AppProvider } from './components/AppProvider/AppProvider';
|
|
|
12
11
|
export { default as Avatar } from './components/Avatar/Avatar';
|
|
13
12
|
export { default as Box } from './components/Box/Box';
|
|
14
13
|
export { default as Button } from './components/Button/Button';
|
|
14
|
+
export { default as ButtonGroup } from './components/ButtonGroup/ButtonGroup';
|
|
15
15
|
export { default as Breadcrumb } from './components/Breadcrumb/Breadcrumb';
|
|
16
16
|
export { default as Calendar } from './components/Calendar/Calendar';
|
|
17
17
|
export { default as Card } from './components/Card/Card';
|
|
@@ -19,6 +19,7 @@ export { default as Checkbox } from './components/Checkbox/Checkbox';
|
|
|
19
19
|
export { default as Choice } from './components/Choice/Choice';
|
|
20
20
|
export { default as ChoiceItem } from './components/ChoiceItem/ChoiceItem';
|
|
21
21
|
export { default as CollapsibleItem } from './components/CollapsibleItem/CollapsibleItem';
|
|
22
|
+
export { default as DatePicker, type DatePickerProps, type DatePickerValue } from './components/DatePicker';
|
|
22
23
|
export { default as Col } from './components/Grid/components/Col/Col';
|
|
23
24
|
export { default as DataTable } from './components/DataTable/DataTable';
|
|
24
25
|
export { default as Drawer } from './components/Drawer/Drawer';
|
|
@@ -28,7 +29,10 @@ export { default as FileUpload, type FileUploadItemProps } from './components/Fi
|
|
|
28
29
|
export { Gallery } from './components/Gallery/Gallery';
|
|
29
30
|
export { default as Heading } from './components/Heading/Heading';
|
|
30
31
|
export { default as Icon } from './components/Icon/Icon';
|
|
32
|
+
export { default as IconButton } from './components/IconButton/IconButton';
|
|
31
33
|
export { default as InputFile } from './components/InputFile/InputFile';
|
|
34
|
+
export { default as InputDuration } from './components/InputDuration';
|
|
35
|
+
export { default as NumberStepper } from './components/NumberStepper';
|
|
32
36
|
export { default as Label } from './components/Label/Label';
|
|
33
37
|
export { default as Labelled } from './components/Labelled/Labelled';
|
|
34
38
|
export { default as Link } from './components/Link/Link';
|
|
@@ -36,6 +40,7 @@ export { default as Loader } from './components/Loader/Loader';
|
|
|
36
40
|
export { default as Modal } from './components/Modal/Modal';
|
|
37
41
|
export { default as MultiTextField } from './components/MultiTextField/MultiTextField';
|
|
38
42
|
export { default as MultiSelect } from './components/MultiSelect/MultiSelect';
|
|
43
|
+
export { default as MultiselectGroup } from './components/MultiselectGroup/MultiselectGroup';
|
|
39
44
|
export { default as Navigation } from './components/Navigation/Navigation';
|
|
40
45
|
export { default as Image } from './components/Image/Image';
|
|
41
46
|
export { default as OutsideClickDetector } from './components/OutsideClickDetector/OutsideClickDetector';
|
|
@@ -50,6 +55,7 @@ export { default as Select } from './components/Select/Select';
|
|
|
50
55
|
export { default as Skeleton } from './components/Skeleton/Skeleton';
|
|
51
56
|
export { default as Slider } from './components/Slider/Slider';
|
|
52
57
|
export { default as Switch } from './components/Switch/Switch';
|
|
58
|
+
export { default as TooltipBox } from './components/TooltipBox/TooltipBox';
|
|
53
59
|
export { default as Text } from './components/Text/Text';
|
|
54
60
|
export { default as TableList } from './components/TableList/TableList';
|
|
55
61
|
export { default as TableListCell } from './components/TableList/components/Cell/Cell';
|
|
@@ -60,10 +66,11 @@ export { default as TableListRow } from './components/TableList/components/Table
|
|
|
60
66
|
export { default as TopBar } from './components/TopBar/TopBar';
|
|
61
67
|
export { default as Tabs } from './components/Tabs/Tabs';
|
|
62
68
|
export { default as Tag } from './components/Tag/Tag';
|
|
63
|
-
export { default as TextField } from './components/TextField
|
|
69
|
+
export { default as TextField } from './components/TextField';
|
|
64
70
|
export { default as UnstyledLink } from './components/UnstyledLink/UnstyledLink';
|
|
65
71
|
export { default as SpinnerCube } from './components/SpinnerCube/SpinnerCube';
|
|
66
72
|
export { default as StatusInline } from './components/StatusInline/StatusInline';
|
|
73
|
+
export type { IIconButtonProps, IconButtonSize, IconButtonVariant } from './components/IconButton/IconButton';
|
|
67
74
|
export type { IStepType } from './components/ProgressIndicator/ProgressIndicator';
|
|
68
75
|
export type { ThemeAgile } from './Theme';
|
|
69
76
|
export { default as defaultTheme, themeObject } from './Theme';
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agilekit/ui",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.32",
|
|
4
4
|
"description": "Agile's product component library",
|
|
5
5
|
"author": "Michael de Lima Alves <michaelalves@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "lib/index",
|
|
8
|
+
"style": "lib/index.css",
|
|
8
9
|
"types": "lib/src/index.d.ts",
|
|
9
|
-
"
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"*.css",
|
|
12
|
+
"*.scss"
|
|
13
|
+
],
|
|
10
14
|
"files": [
|
|
11
15
|
"/lib",
|
|
12
16
|
"/src/assets",
|
|
13
17
|
"/src/components/utils"
|
|
14
18
|
],
|
|
15
|
-
"sideEffects": [
|
|
16
|
-
"**/*.css",
|
|
17
|
-
"**/*.scss"
|
|
18
|
-
],
|
|
19
19
|
"directories": {
|
|
20
20
|
"lib": "lib",
|
|
21
21
|
"test": "__tests__"
|
|
@@ -66,11 +66,12 @@
|
|
|
66
66
|
"react-color": "^2.19.3",
|
|
67
67
|
"react-dom": "18.2.0",
|
|
68
68
|
"react-multi-select-component": "^4.2.3",
|
|
69
|
-
"react-router-dom": "^5.1.2",
|
|
70
69
|
"react-scripts": "^3.4.3",
|
|
71
70
|
"react-select": "^5.4.0"
|
|
72
71
|
},
|
|
73
72
|
"devDependencies": {
|
|
73
|
+
"@mdi/js": "^7.4.47",
|
|
74
|
+
"@mdi/react": "^1.6.1",
|
|
74
75
|
"@babel/core": "^7.21.3",
|
|
75
76
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
76
77
|
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
@@ -119,10 +120,12 @@
|
|
|
119
120
|
"jest": "^29.5.0",
|
|
120
121
|
"jest-axe": "^7.0.1",
|
|
121
122
|
"jest-environment-jsdom": "^29.5.0",
|
|
123
|
+
"mini-css-extract-plugin": "^2.10.0",
|
|
122
124
|
"postcss-loader": "^7.1.0",
|
|
123
125
|
"prettier": "^2.8.4",
|
|
124
126
|
"react-docgen-typescript-loader": "^3.7.2",
|
|
125
127
|
"react-hook-form": "^7.57.0",
|
|
128
|
+
"react-router-dom": "^5.1.2",
|
|
126
129
|
"react-input-mask": "^2.0.4",
|
|
127
130
|
"react-number-format": "^4.9.1",
|
|
128
131
|
"sass-loader": "^13.2.0",
|