@paygreen/pgui 2.1.0 → 2.1.3
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/README.md +38 -22
- package/dist/cjs/index.js +50728 -2677
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/DataList/index.d.ts +8 -1
- package/dist/cjs/types/components/DayPicker/index.d.ts +3 -0
- package/dist/cjs/types/components/InputDayPicker/index.d.ts +16 -0
- package/dist/cjs/types/components/SearchInput/index.d.ts +11 -0
- package/dist/cjs/types/components/Select/index.d.ts +116 -0
- package/dist/cjs/types/components/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/layout/TopBar/index.d.ts +10 -0
- package/dist/cjs/types/layout/index.d.ts +1 -0
- package/dist/cjs/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
- package/dist/{esm/types/theme/components/Button.d.ts → cjs/types/theme/components/button.d.ts} +2 -7
- package/dist/cjs/types/theme/components/index.d.ts +4 -0
- package/dist/{esm/types/theme/components/Input.d.ts → cjs/types/theme/components/input.d.ts} +2 -1
- package/dist/{esm/types/theme/components/Tag.d.ts → cjs/types/theme/components/tag.d.ts} +2 -1
- package/dist/cjs/types/theme/externals/index.d.ts +1 -0
- package/dist/cjs/types/theme/externals/reactDayPicker.d.ts +2 -0
- package/dist/cjs/types/theme/externals-css.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/colors.d.ts +1 -0
- package/dist/cjs/types/theme/foundations/index.d.ts +87 -0
- package/dist/cjs/types/theme/index.d.ts +2 -1
- package/dist/cjs/types/theme/styles.d.ts +2 -0
- package/dist/cjs/types/theme/theme.d.ts +1 -0
- package/dist/cjs/types/utils/date.d.ts +1 -0
- package/dist/esm/index.js +50699 -2679
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/DataList/index.d.ts +8 -1
- package/dist/esm/types/components/DayPicker/index.d.ts +3 -0
- package/dist/esm/types/components/InputDayPicker/index.d.ts +16 -0
- package/dist/esm/types/components/SearchInput/index.d.ts +11 -0
- package/dist/esm/types/components/Select/index.d.ts +116 -0
- package/dist/esm/types/components/index.d.ts +4 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/layout/TopBar/index.d.ts +10 -0
- package/dist/esm/types/layout/index.d.ts +1 -0
- package/dist/esm/types/theme/components/{Badge.d.ts → badge.d.ts} +2 -1
- package/dist/{cjs/types/theme/components/Button.d.ts → esm/types/theme/components/button.d.ts} +2 -7
- package/dist/esm/types/theme/components/index.d.ts +4 -0
- package/dist/{cjs/types/theme/components/Input.d.ts → esm/types/theme/components/input.d.ts} +2 -1
- package/dist/{cjs/types/theme/components/Tag.d.ts → esm/types/theme/components/tag.d.ts} +2 -1
- package/dist/esm/types/theme/externals/index.d.ts +1 -0
- package/dist/esm/types/theme/externals/reactDayPicker.d.ts +2 -0
- package/dist/esm/types/theme/externals-css.d.ts +1 -0
- package/dist/esm/types/theme/foundations/colors.d.ts +1 -0
- package/dist/esm/types/theme/foundations/index.d.ts +87 -0
- package/dist/esm/types/theme/index.d.ts +2 -1
- package/dist/esm/types/theme/styles.d.ts +2 -0
- package/dist/esm/types/theme/theme.d.ts +1 -0
- package/dist/esm/types/utils/date.d.ts +1 -0
- package/dist/index.d.ts +170 -4
- package/package.json +14 -8
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { AccordionProps, FlexProps } from '@chakra-ui/react';
|
|
3
|
-
|
|
3
|
+
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
4
|
+
declare type DataListContextValue = {
|
|
5
|
+
setColumns: React.Dispatch<React.SetStateAction<DataListColumns>>;
|
|
6
|
+
columns: DataListColumns;
|
|
7
|
+
isHover: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const DataListContext: React.Context<DataListContextValue>;
|
|
4
10
|
export declare const DataListHeaderContext: React.Context<boolean>;
|
|
5
11
|
export declare type DataListCellProps = FlexProps & {
|
|
6
12
|
colName?: string;
|
|
@@ -33,3 +39,4 @@ export declare type DataListProps = AccordionProps & {
|
|
|
33
39
|
isHover?: boolean;
|
|
34
40
|
};
|
|
35
41
|
export declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { InputProps, PopoverProps } from '@chakra-ui/react';
|
|
3
|
+
import { DayPickerSingleProps, DaySelectionMode } from 'react-day-picker';
|
|
4
|
+
export declare type SingleDayPickerProps = {
|
|
5
|
+
mode?: DaySelectionMode;
|
|
6
|
+
} & DayPickerSingleProps;
|
|
7
|
+
export declare type InputDayPickerProps = {
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
popoverProps?: PopoverProps;
|
|
10
|
+
inputProps?: InputProps;
|
|
11
|
+
dayPickerProps?: SingleDayPickerProps;
|
|
12
|
+
dateFormat?: string;
|
|
13
|
+
value?: string | '';
|
|
14
|
+
onChange?: Dispatch<SetStateAction<string | undefined>>;
|
|
15
|
+
};
|
|
16
|
+
export declare const InputDayPicker: ({ isDisabled, popoverProps, inputProps, dayPickerProps, dateFormat, value, onChange, }: InputDayPickerProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputProps } from '@chakra-ui/react';
|
|
2
|
+
declare type CustomProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
onChange?(value?: string): void;
|
|
6
|
+
delay?: number;
|
|
7
|
+
clearLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
declare type SearchInputProps = Overwrite<InputProps, CustomProps>;
|
|
10
|
+
export declare const SearchInput: import("@chakra-ui/react").ComponentWithAs<"input", SearchInputProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { BoxProps } from '@chakra-ui/react';
|
|
3
|
+
import { GroupBase, Props } from 'react-select';
|
|
4
|
+
declare module 'react' {
|
|
5
|
+
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
6
|
+
}
|
|
7
|
+
export declare type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
|
|
8
|
+
isAsync?: boolean;
|
|
9
|
+
isCreatable?: boolean;
|
|
10
|
+
isError?: boolean;
|
|
11
|
+
size?: string;
|
|
12
|
+
formatCreateLabel?: (inputValue: string) => ReactNode;
|
|
13
|
+
loadOptions?: (input: unknown) => TODO;
|
|
14
|
+
defaultOptions?: unknown | boolean;
|
|
15
|
+
debounceDelay?: number;
|
|
16
|
+
variant?: 'unstyled' | 'filled' | 'outlined';
|
|
17
|
+
} & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
|
|
18
|
+
export declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
|
|
19
|
+
isAsync?: boolean | undefined;
|
|
20
|
+
isCreatable?: boolean | undefined;
|
|
21
|
+
isError?: boolean | undefined;
|
|
22
|
+
size?: string | undefined;
|
|
23
|
+
formatCreateLabel?: ((inputValue: string) => ReactNode) | undefined;
|
|
24
|
+
loadOptions?: ((input: unknown) => TODO) | undefined;
|
|
25
|
+
defaultOptions?: unknown | boolean;
|
|
26
|
+
debounceDelay?: number | undefined;
|
|
27
|
+
variant?: "unstyled" | "filled" | "outlined" | undefined;
|
|
28
|
+
} & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "autoFocus" | "name" | "value" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme"> & {
|
|
29
|
+
placeholder?: React.ReactNode;
|
|
30
|
+
tabIndex?: number | undefined;
|
|
31
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
32
|
+
isLoading?: boolean | undefined;
|
|
33
|
+
isDisabled?: boolean | undefined;
|
|
34
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
35
|
+
pageSize?: number | undefined;
|
|
36
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
37
|
+
blurInputOnSelect?: boolean | undefined;
|
|
38
|
+
captureMenuScroll?: boolean | undefined;
|
|
39
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
40
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
41
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
42
|
+
escapeClearsValue?: boolean | undefined;
|
|
43
|
+
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
44
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
45
|
+
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
46
|
+
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
47
|
+
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
48
|
+
isMulti?: IsMulti | undefined;
|
|
49
|
+
isRtl?: boolean | undefined;
|
|
50
|
+
isSearchable?: boolean | undefined;
|
|
51
|
+
loadingMessage?: ((obj: {
|
|
52
|
+
inputValue: string;
|
|
53
|
+
}) => React.ReactNode) | undefined;
|
|
54
|
+
minMenuHeight?: number | undefined;
|
|
55
|
+
maxMenuHeight?: number | undefined;
|
|
56
|
+
menuIsOpen?: boolean | undefined;
|
|
57
|
+
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
58
|
+
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
59
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
60
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
61
|
+
noOptionsMessage?: ((obj: {
|
|
62
|
+
inputValue: string;
|
|
63
|
+
}) => React.ReactNode) | undefined;
|
|
64
|
+
openMenuOnFocus?: boolean | undefined;
|
|
65
|
+
openMenuOnClick?: boolean | undefined;
|
|
66
|
+
options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
|
|
67
|
+
screenReaderStatus?: ((obj: {
|
|
68
|
+
count: number;
|
|
69
|
+
}) => string) | undefined;
|
|
70
|
+
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
71
|
+
tabSelectsValue?: boolean | undefined;
|
|
72
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "aria-label" | "form" | "autoFocus" | "name" | "value" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme"> & {
|
|
73
|
+
placeholder?: React.ReactNode;
|
|
74
|
+
tabIndex?: number | undefined;
|
|
75
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
76
|
+
isLoading?: boolean | undefined;
|
|
77
|
+
isDisabled?: boolean | undefined;
|
|
78
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
79
|
+
pageSize?: number | undefined;
|
|
80
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
81
|
+
blurInputOnSelect?: boolean | undefined;
|
|
82
|
+
captureMenuScroll?: boolean | undefined;
|
|
83
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
84
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
85
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
86
|
+
escapeClearsValue?: boolean | undefined;
|
|
87
|
+
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
88
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
89
|
+
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
90
|
+
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
91
|
+
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
92
|
+
isMulti?: IsMulti | undefined;
|
|
93
|
+
isRtl?: boolean | undefined;
|
|
94
|
+
isSearchable?: boolean | undefined;
|
|
95
|
+
loadingMessage?: ((obj: {
|
|
96
|
+
inputValue: string;
|
|
97
|
+
}) => React.ReactNode) | undefined;
|
|
98
|
+
minMenuHeight?: number | undefined;
|
|
99
|
+
maxMenuHeight?: number | undefined;
|
|
100
|
+
menuIsOpen?: boolean | undefined;
|
|
101
|
+
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
102
|
+
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
103
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
104
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
105
|
+
noOptionsMessage?: ((obj: {
|
|
106
|
+
inputValue: string;
|
|
107
|
+
}) => React.ReactNode) | undefined;
|
|
108
|
+
openMenuOnFocus?: boolean | undefined;
|
|
109
|
+
openMenuOnClick?: boolean | undefined;
|
|
110
|
+
options?: import("react-select").OptionsOrGroups<Option, Group> | undefined;
|
|
111
|
+
screenReaderStatus?: ((obj: {
|
|
112
|
+
count: number;
|
|
113
|
+
}) => string) | undefined;
|
|
114
|
+
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
115
|
+
tabSelectsValue?: boolean | undefined;
|
|
116
|
+
} & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactComponentElement } from 'react';
|
|
2
|
+
import { FlexProps, StackProps } from '@chakra-ui/react';
|
|
3
|
+
export declare type TopBarBackActionProps = {
|
|
4
|
+
backAction?: () => void;
|
|
5
|
+
rightInformation?: ReactComponentElement<any>;
|
|
6
|
+
} & FlexProps;
|
|
7
|
+
export declare const TopBar: ({ ...props }: StackProps) => JSX.Element;
|
|
8
|
+
export declare const TopBarFirstElement: ({ ...props }: FlexProps) => JSX.Element;
|
|
9
|
+
export declare const TopBarLastElement: ({ ...props }: StackProps) => JSX.Element;
|
|
10
|
+
export declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TopBar';
|
package/dist/{cjs/types/theme/components/Button.d.ts → esm/types/theme/components/button.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
declare const _default: {
|
|
2
2
|
baseStyle: {
|
|
3
3
|
borderRadius: string;
|
|
4
4
|
fontWeight: string;
|
|
@@ -91,9 +91,6 @@ export declare const Button: {
|
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
'@white': (props: any) => {
|
|
94
|
-
borderWidth: string;
|
|
95
|
-
borderStyle: string;
|
|
96
|
-
borderColor: string;
|
|
97
94
|
bg: string;
|
|
98
95
|
color: string;
|
|
99
96
|
_focus: {
|
|
@@ -111,9 +108,6 @@ export declare const Button: {
|
|
|
111
108
|
};
|
|
112
109
|
};
|
|
113
110
|
'@whiteNeutral': (props: any) => {
|
|
114
|
-
borderWidth: string;
|
|
115
|
-
borderStyle: string;
|
|
116
|
-
borderColor: string;
|
|
117
111
|
bg: string;
|
|
118
112
|
color: string;
|
|
119
113
|
_focus: {
|
|
@@ -138,3 +132,4 @@ export declare const Button: {
|
|
|
138
132
|
};
|
|
139
133
|
};
|
|
140
134
|
};
|
|
135
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { reactDayPicker } from './reactDayPicker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'react-day-picker/dist/style.css';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
declare const foundations: {
|
|
2
|
+
shadows: {
|
|
3
|
+
xs: string;
|
|
4
|
+
sm: string;
|
|
5
|
+
base: string;
|
|
6
|
+
md: string;
|
|
7
|
+
lg: string;
|
|
8
|
+
xl: string;
|
|
9
|
+
'2xl': string;
|
|
10
|
+
layout: string;
|
|
11
|
+
};
|
|
12
|
+
fonts: {
|
|
13
|
+
heading: string;
|
|
14
|
+
body: string;
|
|
15
|
+
mono: string;
|
|
16
|
+
};
|
|
17
|
+
fontSizes: {
|
|
18
|
+
'2xs': string;
|
|
19
|
+
};
|
|
20
|
+
colors: {
|
|
21
|
+
brand: {
|
|
22
|
+
50: string;
|
|
23
|
+
100: string;
|
|
24
|
+
200: string;
|
|
25
|
+
300: string;
|
|
26
|
+
400: string;
|
|
27
|
+
500: string;
|
|
28
|
+
600: string;
|
|
29
|
+
700: string;
|
|
30
|
+
800: string;
|
|
31
|
+
900: string;
|
|
32
|
+
};
|
|
33
|
+
gray: {
|
|
34
|
+
50: string;
|
|
35
|
+
100: string;
|
|
36
|
+
200: string;
|
|
37
|
+
300: string;
|
|
38
|
+
400: string;
|
|
39
|
+
500: string;
|
|
40
|
+
600: string;
|
|
41
|
+
700: string;
|
|
42
|
+
800: string;
|
|
43
|
+
900: string;
|
|
44
|
+
};
|
|
45
|
+
red: {
|
|
46
|
+
50: string;
|
|
47
|
+
100: string;
|
|
48
|
+
200: string;
|
|
49
|
+
300: string;
|
|
50
|
+
400: string;
|
|
51
|
+
500: string;
|
|
52
|
+
600: string;
|
|
53
|
+
700: string;
|
|
54
|
+
800: string;
|
|
55
|
+
900: string;
|
|
56
|
+
};
|
|
57
|
+
orange: {
|
|
58
|
+
50: string;
|
|
59
|
+
100: string;
|
|
60
|
+
200: string;
|
|
61
|
+
300: string;
|
|
62
|
+
400: string;
|
|
63
|
+
500: string;
|
|
64
|
+
600: string;
|
|
65
|
+
700: string;
|
|
66
|
+
800: string;
|
|
67
|
+
900: string;
|
|
68
|
+
};
|
|
69
|
+
green: {
|
|
70
|
+
50: string;
|
|
71
|
+
100: string;
|
|
72
|
+
200: string;
|
|
73
|
+
300: string;
|
|
74
|
+
400: string;
|
|
75
|
+
500: string;
|
|
76
|
+
600: string;
|
|
77
|
+
700: string;
|
|
78
|
+
800: string;
|
|
79
|
+
900: string;
|
|
80
|
+
};
|
|
81
|
+
gradients: {
|
|
82
|
+
primary: string;
|
|
83
|
+
};
|
|
84
|
+
background: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export default foundations;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import './externals-css';
|
|
2
|
+
export * from './theme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const theme: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dateFormat = "dd/MM/yyyy";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React, { FC, ReactNode, Dispatch, SetStateAction, ReactComponentElement } from 'react';
|
|
3
|
+
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
4
|
+
import { IconButtonProps, FlexProps, AccordionProps, FormControlProps, PopoverProps, InputProps, StackProps, BoxProps } from '@chakra-ui/react';
|
|
5
|
+
import { DayPickerProps, DaySelectionMode, DayPickerSingleProps } from 'react-day-picker';
|
|
6
|
+
import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
|
|
7
|
+
import * as react_select from 'react-select';
|
|
8
|
+
import { GroupBase, Props } from 'react-select';
|
|
9
|
+
import * as react_select_dist_declarations_src_filters from 'react-select/dist/declarations/src/filters';
|
|
10
|
+
import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
|
|
11
|
+
import * as react_select_dist_declarations_src_Select from 'react-select/dist/declarations/src/Select';
|
|
3
12
|
|
|
4
13
|
declare type ActionsButtonProps = Omit<IconButtonProps, 'aria-label'> & {
|
|
5
14
|
label: string;
|
|
6
15
|
};
|
|
7
16
|
declare const ActionsButton: FC<React.PropsWithChildren<ActionsButtonProps>>;
|
|
8
17
|
|
|
9
|
-
declare
|
|
18
|
+
declare type DataListColumns = Record<string, DataListCellProps>;
|
|
19
|
+
declare type DataListContextValue = {
|
|
20
|
+
setColumns: React.Dispatch<React.SetStateAction<DataListColumns>>;
|
|
21
|
+
columns: DataListColumns;
|
|
22
|
+
isHover: boolean;
|
|
23
|
+
};
|
|
24
|
+
declare const DataListContext: React.Context<DataListContextValue>;
|
|
10
25
|
declare const DataListHeaderContext: React.Context<boolean>;
|
|
11
26
|
declare type DataListCellProps = FlexProps & {
|
|
12
27
|
colName?: string;
|
|
@@ -40,6 +55,8 @@ declare type DataListProps = AccordionProps & {
|
|
|
40
55
|
};
|
|
41
56
|
declare const DataList: FC<React.PropsWithChildren<DataListProps>>;
|
|
42
57
|
|
|
58
|
+
declare const DayPicker: (props: DayPickerProps) => JSX.Element;
|
|
59
|
+
|
|
43
60
|
declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue' | 'label'> & {
|
|
44
61
|
children?: ReactNode;
|
|
45
62
|
errorMessage?: ReactNode;
|
|
@@ -51,6 +68,20 @@ declare type FormGroupProps = Omit<FormControlProps, 'onChange' | 'defaultValue'
|
|
|
51
68
|
};
|
|
52
69
|
declare const FormGroup: ({ children, errorMessage, helper, id, isRequired, label, showError, ...props }: FormGroupProps) => JSX.Element;
|
|
53
70
|
|
|
71
|
+
declare type SingleDayPickerProps = {
|
|
72
|
+
mode?: DaySelectionMode;
|
|
73
|
+
} & DayPickerSingleProps;
|
|
74
|
+
declare type InputDayPickerProps = {
|
|
75
|
+
isDisabled?: boolean;
|
|
76
|
+
popoverProps?: PopoverProps;
|
|
77
|
+
inputProps?: InputProps;
|
|
78
|
+
dayPickerProps?: SingleDayPickerProps;
|
|
79
|
+
dateFormat?: string;
|
|
80
|
+
value?: string | '';
|
|
81
|
+
onChange?: Dispatch<SetStateAction<string | undefined>>;
|
|
82
|
+
};
|
|
83
|
+
declare const InputDayPicker: ({ isDisabled, popoverProps, inputProps, dayPickerProps, dateFormat, value, onChange, }: InputDayPickerProps) => JSX.Element;
|
|
84
|
+
|
|
54
85
|
declare const getPaginationInfo: ({ page, pageSize, totalItems, }: {
|
|
55
86
|
page?: number | undefined;
|
|
56
87
|
pageSize?: number | undefined;
|
|
@@ -93,4 +124,139 @@ declare type PaginationProps = StackProps & {
|
|
|
93
124
|
};
|
|
94
125
|
declare const Pagination: ({ setPage, page, pageSize, totalItems, isLoadingPage, ...rest }: PaginationProps) => JSX.Element;
|
|
95
126
|
|
|
96
|
-
|
|
127
|
+
declare type CustomProps = {
|
|
128
|
+
value?: string;
|
|
129
|
+
defaultValue?: string;
|
|
130
|
+
onChange?(value?: string): void;
|
|
131
|
+
delay?: number;
|
|
132
|
+
clearLabel?: string;
|
|
133
|
+
};
|
|
134
|
+
declare type SearchInputProps = Overwrite<InputProps, CustomProps>;
|
|
135
|
+
declare const SearchInput: _chakra_ui_react.ComponentWithAs<"input", SearchInputProps>;
|
|
136
|
+
|
|
137
|
+
declare module 'react' {
|
|
138
|
+
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
139
|
+
}
|
|
140
|
+
declare type SelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = {
|
|
141
|
+
isAsync?: boolean;
|
|
142
|
+
isCreatable?: boolean;
|
|
143
|
+
isError?: boolean;
|
|
144
|
+
size?: string;
|
|
145
|
+
formatCreateLabel?: (inputValue: string) => ReactNode;
|
|
146
|
+
loadOptions?: (input: unknown) => TODO;
|
|
147
|
+
defaultOptions?: unknown | boolean;
|
|
148
|
+
debounceDelay?: number;
|
|
149
|
+
variant?: 'unstyled' | 'filled' | 'outlined';
|
|
150
|
+
} & Props<Option, IsMulti, Group> & Omit<BoxProps, 'defaultValue'>;
|
|
151
|
+
declare const Select: <Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: {
|
|
152
|
+
isAsync?: boolean | undefined;
|
|
153
|
+
isCreatable?: boolean | undefined;
|
|
154
|
+
isError?: boolean | undefined;
|
|
155
|
+
size?: string | undefined;
|
|
156
|
+
formatCreateLabel?: ((inputValue: string) => ReactNode) | undefined;
|
|
157
|
+
loadOptions?: ((input: unknown) => TODO) | undefined;
|
|
158
|
+
defaultOptions?: unknown | boolean;
|
|
159
|
+
debounceDelay?: number | undefined;
|
|
160
|
+
variant?: "unstyled" | "filled" | "outlined" | undefined;
|
|
161
|
+
} & Omit<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "autoFocus" | "name" | "value" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme"> & {
|
|
162
|
+
placeholder?: React.ReactNode;
|
|
163
|
+
tabIndex?: number | undefined;
|
|
164
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
165
|
+
isLoading?: boolean | undefined;
|
|
166
|
+
isDisabled?: boolean | undefined;
|
|
167
|
+
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
168
|
+
pageSize?: number | undefined;
|
|
169
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
170
|
+
blurInputOnSelect?: boolean | undefined;
|
|
171
|
+
captureMenuScroll?: boolean | undefined;
|
|
172
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
173
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
174
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
175
|
+
escapeClearsValue?: boolean | undefined;
|
|
176
|
+
filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
177
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
178
|
+
getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
|
|
179
|
+
getOptionValue?: react_select.GetOptionValue<Option> | undefined;
|
|
180
|
+
isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
|
|
181
|
+
isMulti?: IsMulti | undefined;
|
|
182
|
+
isRtl?: boolean | undefined;
|
|
183
|
+
isSearchable?: boolean | undefined;
|
|
184
|
+
loadingMessage?: ((obj: {
|
|
185
|
+
inputValue: string;
|
|
186
|
+
}) => React.ReactNode) | undefined;
|
|
187
|
+
minMenuHeight?: number | undefined;
|
|
188
|
+
maxMenuHeight?: number | undefined;
|
|
189
|
+
menuIsOpen?: boolean | undefined;
|
|
190
|
+
menuPlacement?: react_select.MenuPlacement | undefined;
|
|
191
|
+
menuPosition?: react_select.MenuPosition | undefined;
|
|
192
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
193
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
194
|
+
noOptionsMessage?: ((obj: {
|
|
195
|
+
inputValue: string;
|
|
196
|
+
}) => React.ReactNode) | undefined;
|
|
197
|
+
openMenuOnFocus?: boolean | undefined;
|
|
198
|
+
openMenuOnClick?: boolean | undefined;
|
|
199
|
+
options?: react_select.OptionsOrGroups<Option, Group> | undefined;
|
|
200
|
+
screenReaderStatus?: ((obj: {
|
|
201
|
+
count: number;
|
|
202
|
+
}) => string) | undefined;
|
|
203
|
+
styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
|
|
204
|
+
tabSelectsValue?: boolean | undefined;
|
|
205
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<react_select_dist_declarations_src_Select.Props<Option, IsMulti, Group>, "aria-label" | "form" | "autoFocus" | "name" | "value" | "className" | "id" | "aria-errormessage" | "aria-invalid" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme"> & {
|
|
206
|
+
placeholder?: React.ReactNode;
|
|
207
|
+
tabIndex?: number | undefined;
|
|
208
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
209
|
+
isLoading?: boolean | undefined;
|
|
210
|
+
isDisabled?: boolean | undefined;
|
|
211
|
+
components?: Partial<react_select_dist_declarations_src_components.SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
212
|
+
pageSize?: number | undefined;
|
|
213
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
214
|
+
blurInputOnSelect?: boolean | undefined;
|
|
215
|
+
captureMenuScroll?: boolean | undefined;
|
|
216
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
217
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
218
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
219
|
+
escapeClearsValue?: boolean | undefined;
|
|
220
|
+
filterOption?: ((option: react_select_dist_declarations_src_filters.FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
221
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
222
|
+
getOptionLabel?: react_select.GetOptionLabel<Option> | undefined;
|
|
223
|
+
getOptionValue?: react_select.GetOptionValue<Option> | undefined;
|
|
224
|
+
isOptionDisabled?: ((option: Option, selectValue: react_select.Options<Option>) => boolean) | undefined;
|
|
225
|
+
isMulti?: IsMulti | undefined;
|
|
226
|
+
isRtl?: boolean | undefined;
|
|
227
|
+
isSearchable?: boolean | undefined;
|
|
228
|
+
loadingMessage?: ((obj: {
|
|
229
|
+
inputValue: string;
|
|
230
|
+
}) => React.ReactNode) | undefined;
|
|
231
|
+
minMenuHeight?: number | undefined;
|
|
232
|
+
maxMenuHeight?: number | undefined;
|
|
233
|
+
menuIsOpen?: boolean | undefined;
|
|
234
|
+
menuPlacement?: react_select.MenuPlacement | undefined;
|
|
235
|
+
menuPosition?: react_select.MenuPosition | undefined;
|
|
236
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
237
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
238
|
+
noOptionsMessage?: ((obj: {
|
|
239
|
+
inputValue: string;
|
|
240
|
+
}) => React.ReactNode) | undefined;
|
|
241
|
+
openMenuOnFocus?: boolean | undefined;
|
|
242
|
+
openMenuOnClick?: boolean | undefined;
|
|
243
|
+
options?: react_select.OptionsOrGroups<Option, Group> | undefined;
|
|
244
|
+
screenReaderStatus?: ((obj: {
|
|
245
|
+
count: number;
|
|
246
|
+
}) => string) | undefined;
|
|
247
|
+
styles?: react_select.StylesConfig<Option, IsMulti, Group> | undefined;
|
|
248
|
+
tabSelectsValue?: boolean | undefined;
|
|
249
|
+
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<Option> & Omit<BoxProps, "defaultValue"> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
|
|
250
|
+
|
|
251
|
+
declare type TopBarBackActionProps = {
|
|
252
|
+
backAction?: () => void;
|
|
253
|
+
rightInformation?: ReactComponentElement<any>;
|
|
254
|
+
} & FlexProps;
|
|
255
|
+
declare const TopBar: ({ ...props }: StackProps) => JSX.Element;
|
|
256
|
+
declare const TopBarFirstElement: ({ ...props }: FlexProps) => JSX.Element;
|
|
257
|
+
declare const TopBarLastElement: ({ ...props }: StackProps) => JSX.Element;
|
|
258
|
+
declare const TopBarBackAction: ({ backAction, title, rightInformation, ...rest }: TopBarBackActionProps) => JSX.Element;
|
|
259
|
+
|
|
260
|
+
declare const theme: any;
|
|
261
|
+
|
|
262
|
+
export { ActionsButton, ActionsButtonProps, DataList, DataListAccordion, DataListAccordionButton, DataListAccordionIcon, DataListAccordionPanel, DataListCell, DataListCellProps, DataListContext, DataListFooter, DataListFooterProps, DataListHeader, DataListHeaderContext, DataListHeaderProps, DataListProps, DataListRow, DataListRowProps, DayPicker, FormGroup, FormGroupProps, InputDayPicker, InputDayPickerProps, Pagination, PaginationButtonFirstPage, PaginationButtonLastPage, PaginationButtonNextPage, PaginationButtonPrevPage, PaginationContext, PaginationContextValue, PaginationInfo, PaginationProps, SearchInput, Select, SelectProps, SingleDayPickerProps, TopBar, TopBarBackAction, TopBarBackActionProps, TopBarFirstElement, TopBarLastElement, getPaginationInfo, theme };
|