gov-ui-core 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/Button/DropdownButton.d.ts +7 -5
- package/build/components/Input/Input.d.ts +2 -2
- package/build/components/Input/Select.d.ts +5 -8
- package/build/components/Input/styled.d.ts +4 -1
- package/build/index.js +1 -1
- package/build/pages/CreateTable.d.ts +0 -6
- package/build/utils/hookUtils.d.ts +13 -1
- package/build/utils/{utils.d.ts → index.d.ts} +8 -0
- package/package.json +2 -2
- package/scripts/start.js +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IButtonProps } from './';
|
|
3
|
+
export type OptionType = {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
onClick?: (value: OptionType) => void;
|
|
6
|
+
type?: string;
|
|
7
|
+
};
|
|
3
8
|
export interface IDropdownButtonProps extends IButtonProps {
|
|
4
|
-
options:
|
|
5
|
-
|
|
6
|
-
onClick: () => void;
|
|
7
|
-
divider?: boolean;
|
|
8
|
-
}[];
|
|
9
|
+
options: OptionType[];
|
|
10
|
+
optionSize?: 'small' | 'default' | 'medium' | 'large';
|
|
9
11
|
menuStyle?: any;
|
|
10
12
|
placement?: 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | undefined;
|
|
11
13
|
}
|
|
@@ -4,8 +4,8 @@ import { ChangeHandler } from 'react-hook-form';
|
|
|
4
4
|
export interface IInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'size'> {
|
|
5
5
|
error?: string | ErrorType | boolean;
|
|
6
6
|
errorStyle?: ErrorStyle;
|
|
7
|
-
prefix?:
|
|
8
|
-
suffix?:
|
|
7
|
+
prefix?: React.ReactNode;
|
|
8
|
+
suffix?: React.ReactNode;
|
|
9
9
|
selectDisabled?: boolean;
|
|
10
10
|
description?: React.ReactNode;
|
|
11
11
|
size?: 'small' | 'medium';
|
|
@@ -2,21 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import { ChangeHandler } from 'react-hook-form';
|
|
3
3
|
import { ErrorStyle, ErrorType } from './data';
|
|
4
4
|
type OptionItem = {
|
|
5
|
-
label
|
|
5
|
+
label?: React.ReactNode;
|
|
6
6
|
searchLabel?: string;
|
|
7
7
|
value?: any;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
groupItem?: boolean;
|
|
11
|
-
groupEnd?: boolean;
|
|
12
|
-
options?: OptionItem[];
|
|
8
|
+
type?: string;
|
|
9
|
+
children?: OptionItem[];
|
|
13
10
|
};
|
|
14
11
|
export interface ISelectProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'onChange' | 'size'> {
|
|
15
12
|
description?: React.ReactNode;
|
|
16
13
|
error?: string | ErrorType;
|
|
17
14
|
errorStyle?: ErrorStyle;
|
|
18
|
-
prefix?:
|
|
19
|
-
suffix?:
|
|
15
|
+
prefix?: React.ReactElement;
|
|
16
|
+
suffix?: React.ReactElement;
|
|
20
17
|
setValue?: any;
|
|
21
18
|
onChange?: (value: any) => void;
|
|
22
19
|
onChangeVisible?: (isShow: boolean) => void;
|
|
@@ -19,4 +19,7 @@ declare const ItemArea: import("styled-components").StyledComponent<"div", any,
|
|
|
19
19
|
declare const SearchArea: import("styled-components").StyledComponent<"div", any, {
|
|
20
20
|
listHeight?: number | undefined;
|
|
21
21
|
}, never>;
|
|
22
|
-
|
|
22
|
+
declare const OptionItemsBox: import("styled-components").StyledComponent<"div", any, {
|
|
23
|
+
isDropdownButton?: boolean | undefined;
|
|
24
|
+
}, never>;
|
|
25
|
+
export { InputBox, ErrorMessage, SuffixArea, SelectArea, ItemArea, SearchArea, OptionItemsBox, };
|