doui-react 2.0.9 → 2.0.10
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/es/form/component/utils.d.ts +10 -10
- package/es/form/style/index.js +1 -1
- package/es/input/component/text-area.d.ts +1 -1
- package/es/input/component/text-area.js +6 -2
- package/es/radio/component/abstract-box.d.ts +29 -29
- package/es/tabs/component/utils.d.ts +8 -8
- package/lib/form/component/utils.d.ts +10 -10
- package/lib/form/style/index.js +1 -1
- package/lib/input/component/text-area.d.ts +1 -1
- package/lib/input/component/text-area.js +6 -2
- package/lib/radio/component/abstract-box.d.ts +29 -29
- package/lib/tabs/component/utils.d.ts +8 -8
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ export declare function getFormItemProps(props: any): {
|
|
|
24
24
|
pointAtCenter?: boolean | undefined;
|
|
25
25
|
};
|
|
26
26
|
autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
|
|
27
|
-
getPopupContainer: (
|
|
27
|
+
getPopupContainer: typeof import("../../api").getPopupContainer;
|
|
28
28
|
children?: import("react").ReactNode;
|
|
29
29
|
destroyTooltipOnHide?: boolean | {
|
|
30
30
|
keepParent?: boolean | undefined;
|
|
@@ -38,26 +38,26 @@ export declare function getFormItemProps(props: any): {
|
|
|
38
38
|
defaultVisible?: boolean | undefined;
|
|
39
39
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
40
40
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
41
|
+
id?: string | undefined;
|
|
41
42
|
prefixCls?: string | undefined;
|
|
43
|
+
zIndex?: number | undefined;
|
|
44
|
+
animation?: string | undefined;
|
|
45
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
46
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
+
transitionName?: string | undefined;
|
|
48
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
49
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
42
50
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
43
51
|
fresh?: boolean | undefined;
|
|
44
52
|
mouseLeaveDelay?: number | undefined;
|
|
45
53
|
mouseEnterDelay?: number | undefined;
|
|
46
54
|
forceRender?: boolean | undefined;
|
|
47
55
|
popupVisible?: boolean | undefined;
|
|
48
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
49
|
-
transitionName?: string | undefined;
|
|
50
|
-
animation?: string | undefined;
|
|
51
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
52
56
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
53
57
|
overlayClassName?: string | undefined;
|
|
54
58
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
55
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
56
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
57
59
|
arrowContent?: import("react").ReactNode;
|
|
58
|
-
id?: string | undefined;
|
|
59
60
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
60
|
-
zIndex?: number | undefined;
|
|
61
61
|
icon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
62
|
} | undefined;
|
|
63
63
|
initialValue: any;
|
|
@@ -85,7 +85,7 @@ export declare function transformPathToName(path?: NamePath): string | undefined
|
|
|
85
85
|
export declare function transformKeyToPath(params?: Record<string, any>): Record<string, any>;
|
|
86
86
|
export declare function parseFormFailedError(error: ValidateErrorEntity): Record<string, string>;
|
|
87
87
|
export declare function noStyle(item: FormItemProps): boolean;
|
|
88
|
-
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams):
|
|
88
|
+
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams): ((values: FormValues, params: import("..").OptionsParams) => import("../../api").FunctionReturn<SelectOptions>) | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) | import("../../api").FunctionReturn<SelectOptions> | undefined;
|
|
89
89
|
interface FocusFirstInputParams extends CommonParams {
|
|
90
90
|
focusFirstOnMount: FormProps['focusFirstOnMount'];
|
|
91
91
|
}
|
package/es/form/style/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var style = {
|
|
|
7
7
|
wrapper: function wrapper(_ref) {
|
|
8
8
|
var labelWidth = _ref.labelWidth,
|
|
9
9
|
formItemMarginBottom = _ref.formItemMarginBottom;
|
|
10
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), transformValueWithStyleUnit(formItemMarginBottom), transformValueWithStyleUnit(labelWidth));
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-label {\n padding-left: 10px;\n }\n\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), transformValueWithStyleUnit(formItemMarginBottom), transformValueWithStyleUnit(labelWidth));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
export default style;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputProps } from '../type';
|
|
2
|
-
export declare function Textarea({ resize, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Textarea({ resize, maxLength, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["resize"];
|
|
3
|
+
var _excluded = ["resize", "maxLength"];
|
|
4
4
|
import { Input } from 'antd';
|
|
5
5
|
import style from "../style";
|
|
6
6
|
import { useInputValidate } from "./utils";
|
|
@@ -8,8 +8,12 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
|
8
8
|
export function Textarea(_ref) {
|
|
9
9
|
var _ref$resize = _ref.resize,
|
|
10
10
|
resize = _ref$resize === void 0 ? true : _ref$resize,
|
|
11
|
+
_ref$maxLength = _ref.maxLength,
|
|
12
|
+
maxLength = _ref$maxLength === void 0 ? 1000 : _ref$maxLength,
|
|
11
13
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
-
var params = useInputValidate(
|
|
14
|
+
var params = useInputValidate(_objectSpread({
|
|
15
|
+
maxLength: maxLength
|
|
16
|
+
}, props));
|
|
13
17
|
return _jsx(Input.TextArea, _objectSpread({
|
|
14
18
|
css: style.textArea(resize)
|
|
15
19
|
}, params));
|
|
@@ -36,26 +36,26 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
36
36
|
defaultVisible?: boolean | undefined;
|
|
37
37
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
38
38
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
39
|
+
id?: string | undefined;
|
|
39
40
|
prefixCls?: string | undefined;
|
|
41
|
+
zIndex?: number | undefined;
|
|
42
|
+
animation?: string | undefined;
|
|
43
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
44
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
45
|
+
transitionName?: string | undefined;
|
|
46
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
47
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
40
48
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
41
49
|
fresh?: boolean | undefined;
|
|
42
50
|
mouseLeaveDelay?: number | undefined;
|
|
43
51
|
mouseEnterDelay?: number | undefined;
|
|
44
52
|
forceRender?: boolean | undefined;
|
|
45
53
|
popupVisible?: boolean | undefined;
|
|
46
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
-
transitionName?: string | undefined;
|
|
48
|
-
animation?: string | undefined;
|
|
49
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
50
54
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
51
55
|
overlayClassName?: string | undefined;
|
|
52
56
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
53
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
54
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
55
57
|
arrowContent?: import("react").ReactNode;
|
|
56
|
-
id?: string | undefined;
|
|
57
58
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
58
|
-
zIndex?: number | undefined;
|
|
59
59
|
};
|
|
60
60
|
boxProps: {
|
|
61
61
|
onChange(e: CheckboxChangeEvent): void;
|
|
@@ -65,18 +65,12 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
65
65
|
value?: any;
|
|
66
66
|
boxTooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
67
67
|
inGroup?: boolean | undefined;
|
|
68
|
-
prefixCls?: string | undefined;
|
|
69
|
-
disabled?: boolean | undefined;
|
|
70
|
-
className?: string | undefined;
|
|
71
|
-
style?: import("react").CSSProperties | undefined;
|
|
72
|
-
id?: string | undefined;
|
|
73
|
-
rootClassName?: string | undefined;
|
|
74
|
-
checked?: boolean | undefined;
|
|
75
68
|
name?: string | undefined;
|
|
76
|
-
required?: boolean | undefined;
|
|
77
|
-
type?: string | undefined;
|
|
78
69
|
defaultChecked?: boolean | undefined;
|
|
79
70
|
autoFocus?: boolean | undefined;
|
|
71
|
+
className?: string | undefined;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
style?: import("react").CSSProperties | undefined;
|
|
80
74
|
tabIndex?: number | undefined;
|
|
81
75
|
title?: string | undefined;
|
|
82
76
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
@@ -84,20 +78,25 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
84
78
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
85
79
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
86
80
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
81
|
+
prefixCls?: string | undefined;
|
|
82
|
+
disabled?: boolean | undefined;
|
|
83
|
+
rootClassName?: string | undefined;
|
|
84
|
+
required?: boolean | undefined;
|
|
85
|
+
type?: string | undefined;
|
|
86
|
+
checked?: boolean | undefined;
|
|
87
87
|
indeterminate?: boolean | undefined;
|
|
88
88
|
skipGroup?: boolean | undefined;
|
|
89
|
+
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
89
90
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
90
|
-
color?: string | undefined;
|
|
91
|
-
rows?: number | false | undefined;
|
|
92
91
|
suppressContentEditableWarning?: boolean | undefined;
|
|
93
92
|
suppressHydrationWarning?: boolean | undefined;
|
|
94
93
|
accessKey?: string | undefined;
|
|
95
|
-
autoCapitalize?: (string & {}) | "
|
|
96
|
-
contentEditable?:
|
|
94
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
95
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
97
96
|
contextMenu?: string | undefined;
|
|
98
97
|
dir?: string | undefined;
|
|
99
98
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
100
|
-
enterKeyHint?: "
|
|
99
|
+
enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
101
100
|
hidden?: boolean | undefined;
|
|
102
101
|
lang?: string | undefined;
|
|
103
102
|
nonce?: string | undefined;
|
|
@@ -119,6 +118,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
119
118
|
vocab?: string | undefined;
|
|
120
119
|
autoCorrect?: string | undefined;
|
|
121
120
|
autoSave?: string | undefined;
|
|
121
|
+
color?: string | undefined;
|
|
122
122
|
itemProp?: string | undefined;
|
|
123
123
|
itemScope?: boolean | undefined;
|
|
124
124
|
itemType?: string | undefined;
|
|
@@ -127,13 +127,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
127
127
|
results?: number | undefined;
|
|
128
128
|
security?: string | undefined;
|
|
129
129
|
unselectable?: "off" | "on" | undefined;
|
|
130
|
-
inputMode?: "
|
|
130
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
131
131
|
is?: string | undefined;
|
|
132
132
|
exportparts?: string | undefined;
|
|
133
133
|
part?: string | undefined;
|
|
134
134
|
"aria-activedescendant"?: string | undefined;
|
|
135
135
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
136
|
-
"aria-autocomplete"?: "
|
|
136
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
137
137
|
"aria-braillelabel"?: string | undefined;
|
|
138
138
|
"aria-brailleroledescription"?: string | undefined;
|
|
139
139
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -143,17 +143,17 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
143
143
|
"aria-colindextext"?: string | undefined;
|
|
144
144
|
"aria-colspan"?: number | undefined;
|
|
145
145
|
"aria-controls"?: string | undefined;
|
|
146
|
-
"aria-current"?: boolean | "
|
|
146
|
+
"aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" | "time" | undefined;
|
|
147
147
|
"aria-describedby"?: string | undefined;
|
|
148
148
|
"aria-description"?: string | undefined;
|
|
149
149
|
"aria-details"?: string | undefined;
|
|
150
150
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
151
|
-
"aria-dropeffect"?: "
|
|
151
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
152
152
|
"aria-errormessage"?: string | undefined;
|
|
153
153
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
154
154
|
"aria-flowto"?: string | undefined;
|
|
155
155
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
156
|
-
"aria-haspopup"?: boolean | "
|
|
156
|
+
"aria-haspopup"?: boolean | "grid" | "true" | "false" | "dialog" | "listbox" | "menu" | "tree" | undefined;
|
|
157
157
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
158
158
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
159
159
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -170,7 +170,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
170
170
|
"aria-posinset"?: number | undefined;
|
|
171
171
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
172
172
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
173
|
-
"aria-relevant"?: "
|
|
173
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
174
174
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
175
175
|
"aria-roledescription"?: string | undefined;
|
|
176
176
|
"aria-rowcount"?: number | undefined;
|
|
@@ -208,7 +208,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
208
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
209
209
|
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
210
210
|
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
212
211
|
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
213
212
|
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
214
213
|
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -339,6 +338,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
339
338
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
340
339
|
direction?: import("antd/es/config-provider").DirectionType;
|
|
341
340
|
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
341
|
+
rows?: number | false | undefined;
|
|
342
342
|
autoShowTooltip?: boolean | undefined;
|
|
343
343
|
refs?: import("../../api").Refs | undefined;
|
|
344
344
|
ref: import("../../api").Refs | undefined;
|
|
@@ -6,19 +6,19 @@ export declare function getRenderTabBar({ type, items, size, tabBarGutter, tabBa
|
|
|
6
6
|
export declare function generateTabItems({ items }: TabsProps): {
|
|
7
7
|
label: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
8
|
key: string;
|
|
9
|
-
|
|
10
|
-
disabled?: boolean | undefined;
|
|
9
|
+
children?: import("react").ReactNode;
|
|
11
10
|
className?: string | undefined;
|
|
11
|
+
id?: string | undefined;
|
|
12
12
|
style?: import("react").CSSProperties | undefined;
|
|
13
|
-
|
|
13
|
+
prefixCls?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
forceRender?: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
destroyInactiveTabPane?: boolean | undefined;
|
|
17
|
-
animated?: boolean | undefined;
|
|
16
|
+
icon?: import("react").ReactNode;
|
|
18
17
|
closable?: boolean | undefined;
|
|
19
18
|
closeIcon?: import("react").ReactNode;
|
|
20
|
-
icon?: import("react").ReactNode;
|
|
21
|
-
tabKey?: string | undefined;
|
|
22
19
|
active?: boolean | undefined;
|
|
20
|
+
destroyInactiveTabPane?: boolean | undefined;
|
|
21
|
+
animated?: boolean | undefined;
|
|
22
|
+
tabKey?: string | undefined;
|
|
23
23
|
}[];
|
|
24
24
|
export {};
|
|
@@ -24,7 +24,7 @@ export declare function getFormItemProps(props: any): {
|
|
|
24
24
|
pointAtCenter?: boolean | undefined;
|
|
25
25
|
};
|
|
26
26
|
autoAdjustOverflow?: boolean | import("antd/es/tooltip").AdjustOverflow | undefined;
|
|
27
|
-
getPopupContainer: (
|
|
27
|
+
getPopupContainer: typeof import("../../api").getPopupContainer;
|
|
28
28
|
children?: import("react").ReactNode;
|
|
29
29
|
destroyTooltipOnHide?: boolean | {
|
|
30
30
|
keepParent?: boolean | undefined;
|
|
@@ -38,26 +38,26 @@ export declare function getFormItemProps(props: any): {
|
|
|
38
38
|
defaultVisible?: boolean | undefined;
|
|
39
39
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
40
40
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
41
|
+
id?: string | undefined;
|
|
41
42
|
prefixCls?: string | undefined;
|
|
43
|
+
zIndex?: number | undefined;
|
|
44
|
+
animation?: string | undefined;
|
|
45
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
46
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
+
transitionName?: string | undefined;
|
|
48
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
49
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
42
50
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
43
51
|
fresh?: boolean | undefined;
|
|
44
52
|
mouseLeaveDelay?: number | undefined;
|
|
45
53
|
mouseEnterDelay?: number | undefined;
|
|
46
54
|
forceRender?: boolean | undefined;
|
|
47
55
|
popupVisible?: boolean | undefined;
|
|
48
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
49
|
-
transitionName?: string | undefined;
|
|
50
|
-
animation?: string | undefined;
|
|
51
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
52
56
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
53
57
|
overlayClassName?: string | undefined;
|
|
54
58
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
55
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
56
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
57
59
|
arrowContent?: import("react").ReactNode;
|
|
58
|
-
id?: string | undefined;
|
|
59
60
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
60
|
-
zIndex?: number | undefined;
|
|
61
61
|
icon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
62
|
} | undefined;
|
|
63
63
|
initialValue: any;
|
|
@@ -85,7 +85,7 @@ export declare function transformPathToName(path?: NamePath): string | undefined
|
|
|
85
85
|
export declare function transformKeyToPath(params?: Record<string, any>): Record<string, any>;
|
|
86
86
|
export declare function parseFormFailedError(error: ValidateErrorEntity): Record<string, string>;
|
|
87
87
|
export declare function noStyle(item: FormItemProps): boolean;
|
|
88
|
-
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams):
|
|
88
|
+
export declare function transformOptions(item: FormItemProps, values: FormValues, params: CommonParams): ((values: FormValues, params: import("..").OptionsParams) => import("../../api").FunctionReturn<SelectOptions>) | ((search?: string) => import("../../api").FunctionReturn<SelectOptions>) | import("../../api").FunctionReturn<SelectOptions> | undefined;
|
|
89
89
|
interface FocusFirstInputParams extends CommonParams {
|
|
90
90
|
focusFirstOnMount: FormProps['focusFirstOnMount'];
|
|
91
91
|
}
|
package/lib/form/style/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var style = {
|
|
|
26
26
|
wrapper: function wrapper(_ref) {
|
|
27
27
|
var labelWidth = _ref.labelWidth,
|
|
28
28
|
formItemMarginBottom = _ref.formItemMarginBottom;
|
|
29
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), (0, _api.transformValueWithStyleUnit)(formItemMarginBottom), (0, _api.transformValueWithStyleUnit)(labelWidth));
|
|
29
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ant-form-item {\n margin-bottom: ", ";\n }\n\n .ant-form-item-label {\n width: ", ";\n }\n\n .ant-form-item-with-help .ant-form-item-explain {\n line-height: 1.1;\n padding: 4px 0;\n\n .ant-form-item-explain-error + .ant-form-item-explain-error {\n margin-top: 2px;\n }\n }\n\n &.ant-form-horizontal {\n .ant-form-item-label {\n padding-left: 10px;\n }\n\n .ant-form-item-required::before {\n position: absolute;\n left: -10px;\n }\n }\n\n &.ant-form-vertical {\n .ant-form-item-label {\n padding-bottom: 5px;\n }\n }\n "])), (0, _api.transformValueWithStyleUnit)(formItemMarginBottom), (0, _api.transformValueWithStyleUnit)(labelWidth));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
var _default = exports.default = style;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { InputProps } from '../type';
|
|
2
|
-
export declare function Textarea({ resize, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function Textarea({ resize, maxLength, ...props }: InputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -11,12 +11,16 @@ var _antd = require("antd");
|
|
|
11
11
|
var _style = _interopRequireDefault(require("../style"));
|
|
12
12
|
var _utils = require("./utils");
|
|
13
13
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
14
|
-
var _excluded = ["resize"];
|
|
14
|
+
var _excluded = ["resize", "maxLength"];
|
|
15
15
|
function Textarea(_ref) {
|
|
16
16
|
var _ref$resize = _ref.resize,
|
|
17
17
|
resize = _ref$resize === void 0 ? true : _ref$resize,
|
|
18
|
+
_ref$maxLength = _ref.maxLength,
|
|
19
|
+
maxLength = _ref$maxLength === void 0 ? 1000 : _ref$maxLength,
|
|
18
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
19
|
-
var params = (0, _utils.useInputValidate)(
|
|
21
|
+
var params = (0, _utils.useInputValidate)((0, _objectSpread2.default)({
|
|
22
|
+
maxLength: maxLength
|
|
23
|
+
}, props));
|
|
20
24
|
return (0, _jsxRuntime.jsx)(_antd.Input.TextArea, (0, _objectSpread2.default)({
|
|
21
25
|
css: _style.default.textArea(resize)
|
|
22
26
|
}, params));
|
|
@@ -36,26 +36,26 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
36
36
|
defaultVisible?: boolean | undefined;
|
|
37
37
|
onVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
38
38
|
afterVisibleChange?: ((visible: boolean) => void) | undefined;
|
|
39
|
+
id?: string | undefined;
|
|
39
40
|
prefixCls?: string | undefined;
|
|
41
|
+
zIndex?: number | undefined;
|
|
42
|
+
animation?: string | undefined;
|
|
43
|
+
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
44
|
+
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
45
|
+
transitionName?: string | undefined;
|
|
46
|
+
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
47
|
+
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
40
48
|
onPopupAlign?: ((element: HTMLElement, align: import("@rc-component/trigger").AlignType) => void) | undefined;
|
|
41
49
|
fresh?: boolean | undefined;
|
|
42
50
|
mouseLeaveDelay?: number | undefined;
|
|
43
51
|
mouseEnterDelay?: number | undefined;
|
|
44
52
|
forceRender?: boolean | undefined;
|
|
45
53
|
popupVisible?: boolean | undefined;
|
|
46
|
-
trigger?: import("@rc-component/trigger").ActionType | import("@rc-component/trigger").ActionType[] | undefined;
|
|
47
|
-
transitionName?: string | undefined;
|
|
48
|
-
animation?: string | undefined;
|
|
49
|
-
motion?: import("rc-motion").CSSMotionProps | undefined;
|
|
50
54
|
overlayStyle?: import("react").CSSProperties | undefined;
|
|
51
55
|
overlayClassName?: string | undefined;
|
|
52
56
|
getTooltipContainer?: ((node: HTMLElement) => HTMLElement) | undefined;
|
|
53
|
-
align?: import("@rc-component/trigger").AlignType | undefined;
|
|
54
|
-
showArrow?: boolean | import("@rc-component/trigger").ArrowType | undefined;
|
|
55
57
|
arrowContent?: import("react").ReactNode;
|
|
56
|
-
id?: string | undefined;
|
|
57
58
|
overlayInnerStyle?: import("react").CSSProperties | undefined;
|
|
58
|
-
zIndex?: number | undefined;
|
|
59
59
|
};
|
|
60
60
|
boxProps: {
|
|
61
61
|
onChange(e: CheckboxChangeEvent): void;
|
|
@@ -65,18 +65,12 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
65
65
|
value?: any;
|
|
66
66
|
boxTooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
67
67
|
inGroup?: boolean | undefined;
|
|
68
|
-
prefixCls?: string | undefined;
|
|
69
|
-
disabled?: boolean | undefined;
|
|
70
|
-
className?: string | undefined;
|
|
71
|
-
style?: import("react").CSSProperties | undefined;
|
|
72
|
-
id?: string | undefined;
|
|
73
|
-
rootClassName?: string | undefined;
|
|
74
|
-
checked?: boolean | undefined;
|
|
75
68
|
name?: string | undefined;
|
|
76
|
-
required?: boolean | undefined;
|
|
77
|
-
type?: string | undefined;
|
|
78
69
|
defaultChecked?: boolean | undefined;
|
|
79
70
|
autoFocus?: boolean | undefined;
|
|
71
|
+
className?: string | undefined;
|
|
72
|
+
id?: string | undefined;
|
|
73
|
+
style?: import("react").CSSProperties | undefined;
|
|
80
74
|
tabIndex?: number | undefined;
|
|
81
75
|
title?: string | undefined;
|
|
82
76
|
onKeyDown?: import("react").KeyboardEventHandler<HTMLElement> | undefined;
|
|
@@ -84,20 +78,25 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
84
78
|
onClick?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
85
79
|
onMouseEnter?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
86
80
|
onMouseLeave?: import("react").MouseEventHandler<HTMLElement> | undefined;
|
|
81
|
+
prefixCls?: string | undefined;
|
|
82
|
+
disabled?: boolean | undefined;
|
|
83
|
+
rootClassName?: string | undefined;
|
|
84
|
+
required?: boolean | undefined;
|
|
85
|
+
type?: string | undefined;
|
|
86
|
+
checked?: boolean | undefined;
|
|
87
87
|
indeterminate?: boolean | undefined;
|
|
88
88
|
skipGroup?: boolean | undefined;
|
|
89
|
+
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
89
90
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
90
|
-
color?: string | undefined;
|
|
91
|
-
rows?: number | false | undefined;
|
|
92
91
|
suppressContentEditableWarning?: boolean | undefined;
|
|
93
92
|
suppressHydrationWarning?: boolean | undefined;
|
|
94
93
|
accessKey?: string | undefined;
|
|
95
|
-
autoCapitalize?: (string & {}) | "
|
|
96
|
-
contentEditable?:
|
|
94
|
+
autoCapitalize?: (string & {}) | "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined;
|
|
95
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
97
96
|
contextMenu?: string | undefined;
|
|
98
97
|
dir?: string | undefined;
|
|
99
98
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
100
|
-
enterKeyHint?: "
|
|
99
|
+
enterKeyHint?: "done" | "enter" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
101
100
|
hidden?: boolean | undefined;
|
|
102
101
|
lang?: string | undefined;
|
|
103
102
|
nonce?: string | undefined;
|
|
@@ -119,6 +118,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
119
118
|
vocab?: string | undefined;
|
|
120
119
|
autoCorrect?: string | undefined;
|
|
121
120
|
autoSave?: string | undefined;
|
|
121
|
+
color?: string | undefined;
|
|
122
122
|
itemProp?: string | undefined;
|
|
123
123
|
itemScope?: boolean | undefined;
|
|
124
124
|
itemType?: string | undefined;
|
|
@@ -127,13 +127,13 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
127
127
|
results?: number | undefined;
|
|
128
128
|
security?: string | undefined;
|
|
129
129
|
unselectable?: "off" | "on" | undefined;
|
|
130
|
-
inputMode?: "
|
|
130
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
131
131
|
is?: string | undefined;
|
|
132
132
|
exportparts?: string | undefined;
|
|
133
133
|
part?: string | undefined;
|
|
134
134
|
"aria-activedescendant"?: string | undefined;
|
|
135
135
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
136
|
-
"aria-autocomplete"?: "
|
|
136
|
+
"aria-autocomplete"?: "inline" | "none" | "list" | "both" | undefined;
|
|
137
137
|
"aria-braillelabel"?: string | undefined;
|
|
138
138
|
"aria-brailleroledescription"?: string | undefined;
|
|
139
139
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
@@ -143,17 +143,17 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
143
143
|
"aria-colindextext"?: string | undefined;
|
|
144
144
|
"aria-colspan"?: number | undefined;
|
|
145
145
|
"aria-controls"?: string | undefined;
|
|
146
|
-
"aria-current"?: boolean | "
|
|
146
|
+
"aria-current"?: boolean | "page" | "true" | "false" | "step" | "location" | "date" | "time" | undefined;
|
|
147
147
|
"aria-describedby"?: string | undefined;
|
|
148
148
|
"aria-description"?: string | undefined;
|
|
149
149
|
"aria-details"?: string | undefined;
|
|
150
150
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
151
|
-
"aria-dropeffect"?: "
|
|
151
|
+
"aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
152
152
|
"aria-errormessage"?: string | undefined;
|
|
153
153
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
154
154
|
"aria-flowto"?: string | undefined;
|
|
155
155
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
156
|
-
"aria-haspopup"?: boolean | "
|
|
156
|
+
"aria-haspopup"?: boolean | "grid" | "true" | "false" | "dialog" | "listbox" | "menu" | "tree" | undefined;
|
|
157
157
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
158
158
|
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
159
159
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -170,7 +170,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
170
170
|
"aria-posinset"?: number | undefined;
|
|
171
171
|
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
172
172
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
173
|
-
"aria-relevant"?: "
|
|
173
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
174
174
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
175
175
|
"aria-roledescription"?: string | undefined;
|
|
176
176
|
"aria-rowcount"?: number | undefined;
|
|
@@ -208,7 +208,6 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
208
208
|
onInputCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
209
209
|
onReset?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
210
210
|
onResetCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
211
|
-
onSubmit?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
212
211
|
onSubmitCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
213
212
|
onInvalid?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
214
213
|
onInvalidCapture?: import("react").FormEventHandler<HTMLElement> | undefined;
|
|
@@ -339,6 +338,7 @@ export declare function useAbstractBox({ refs, boxTooltip, value, onChange, inGr
|
|
|
339
338
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
340
339
|
direction?: import("antd/es/config-provider").DirectionType;
|
|
341
340
|
tooltip?: import("react").ReactNode | import("antd").TooltipProps;
|
|
341
|
+
rows?: number | false | undefined;
|
|
342
342
|
autoShowTooltip?: boolean | undefined;
|
|
343
343
|
refs?: import("../../api").Refs | undefined;
|
|
344
344
|
ref: import("../../api").Refs | undefined;
|
|
@@ -6,19 +6,19 @@ export declare function getRenderTabBar({ type, items, size, tabBarGutter, tabBa
|
|
|
6
6
|
export declare function generateTabItems({ items }: TabsProps): {
|
|
7
7
|
label: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
8
|
key: string;
|
|
9
|
-
|
|
10
|
-
disabled?: boolean | undefined;
|
|
9
|
+
children?: import("react").ReactNode;
|
|
11
10
|
className?: string | undefined;
|
|
11
|
+
id?: string | undefined;
|
|
12
12
|
style?: import("react").CSSProperties | undefined;
|
|
13
|
-
|
|
13
|
+
prefixCls?: string | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
14
15
|
forceRender?: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
destroyInactiveTabPane?: boolean | undefined;
|
|
17
|
-
animated?: boolean | undefined;
|
|
16
|
+
icon?: import("react").ReactNode;
|
|
18
17
|
closable?: boolean | undefined;
|
|
19
18
|
closeIcon?: import("react").ReactNode;
|
|
20
|
-
icon?: import("react").ReactNode;
|
|
21
|
-
tabKey?: string | undefined;
|
|
22
19
|
active?: boolean | undefined;
|
|
20
|
+
destroyInactiveTabPane?: boolean | undefined;
|
|
21
|
+
animated?: boolean | undefined;
|
|
22
|
+
tabKey?: string | undefined;
|
|
23
23
|
}[];
|
|
24
24
|
export {};
|