@douyinfe/semi-ui 2.30.1 → 2.31.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +66 -51
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +203 -71
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_base/base.d.ts +3 -3
- package/lib/cjs/anchor/index.d.ts +1 -1
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/cascader/index.js +2 -1
- package/lib/cjs/checkbox/checkbox.d.ts +1 -1
- package/lib/cjs/checkbox/checkboxGroup.d.ts +1 -1
- package/lib/cjs/descriptions/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.js +9 -4
- package/lib/cjs/layout/index.d.ts +1 -1
- package/lib/cjs/modal/confirm.d.ts +303 -26
- package/lib/cjs/modal/confirm.js +7 -2
- package/lib/cjs/popover/index.d.ts +1 -0
- package/lib/cjs/progress/index.d.ts +3 -3
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/table/Body/index.js +4 -8
- package/lib/cjs/table/Table.js +7 -4
- package/lib/cjs/table/TableCell.js +30 -7
- package/lib/cjs/table/TableContextProvider.d.ts +1 -1
- package/lib/cjs/table/TableContextProvider.js +5 -3
- package/lib/cjs/table/TableHeaderRow.js +28 -9
- package/lib/cjs/table/index.d.ts +3 -0
- package/lib/cjs/table/index.js +11 -3
- package/lib/cjs/table/interface.d.ts +1 -0
- package/lib/cjs/table/table-context.d.ts +2 -0
- package/lib/cjs/tabs/interface.d.ts +1 -1
- package/lib/cjs/tag/index.js +6 -3
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/tagInput/index.js +1 -3
- package/lib/cjs/tooltip/index.d.ts +4 -0
- package/lib/cjs/tooltip/index.js +21 -6
- package/lib/cjs/typography/copyable.d.ts +3 -0
- package/lib/cjs/typography/copyable.js +30 -9
- package/lib/es/_base/base.d.ts +3 -3
- package/lib/es/anchor/index.d.ts +1 -1
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/cascader/index.js +2 -1
- package/lib/es/checkbox/checkbox.d.ts +1 -1
- package/lib/es/checkbox/checkboxGroup.d.ts +1 -1
- package/lib/es/descriptions/index.d.ts +1 -1
- package/lib/es/form/baseForm.js +9 -4
- package/lib/es/layout/index.d.ts +1 -1
- package/lib/es/modal/confirm.d.ts +303 -26
- package/lib/es/modal/confirm.js +6 -2
- package/lib/es/popover/index.d.ts +1 -0
- package/lib/es/progress/index.d.ts +3 -3
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/table/Body/index.js +4 -7
- package/lib/es/table/Table.js +7 -4
- package/lib/es/table/TableCell.js +31 -8
- package/lib/es/table/TableContextProvider.d.ts +1 -1
- package/lib/es/table/TableContextProvider.js +5 -3
- package/lib/es/table/TableHeaderRow.js +29 -10
- package/lib/es/table/index.d.ts +3 -0
- package/lib/es/table/index.js +10 -3
- package/lib/es/table/interface.d.ts +1 -0
- package/lib/es/table/table-context.d.ts +2 -0
- package/lib/es/tabs/interface.d.ts +1 -1
- package/lib/es/tag/index.js +9 -3
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/tagInput/index.js +1 -3
- package/lib/es/tooltip/index.d.ts +4 -0
- package/lib/es/tooltip/index.js +21 -6
- package/lib/es/typography/copyable.d.ts +3 -0
- package/lib/es/typography/copyable.js +28 -9
- package/package.json +9 -9
package/lib/cjs/_base/base.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export interface MotionChildrenProps {
|
|
|
25
25
|
animationFillMode?: string;
|
|
26
26
|
};
|
|
27
27
|
animateEvents?: {
|
|
28
|
-
onAnimationIteration?: React.AnimationEventHandler<any
|
|
29
|
-
onAnimationStart?: React.AnimationEventHandler<any
|
|
30
|
-
onAnimationEnd?: React.AnimationEventHandler<any
|
|
28
|
+
onAnimationIteration?: React.AnimationEventHandler<any>;
|
|
29
|
+
onAnimationStart?: React.AnimationEventHandler<any>;
|
|
30
|
+
onAnimationEnd?: React.AnimationEventHandler<any>;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
@@ -11,7 +11,7 @@ export type { LinkProps } from './link';
|
|
|
11
11
|
export interface AnchorProps {
|
|
12
12
|
autoCollapse?: boolean;
|
|
13
13
|
className?: string;
|
|
14
|
-
children?: ReactNode
|
|
14
|
+
children?: ReactNode;
|
|
15
15
|
defaultAnchor?: string;
|
|
16
16
|
getContainer?: () => HTMLElement | Window;
|
|
17
17
|
maxHeight?: string | number;
|
|
@@ -27,7 +27,7 @@ export interface AutoCompleteProps<T extends AutoCompleteItems> {
|
|
|
27
27
|
autoFocus?: boolean;
|
|
28
28
|
className?: string;
|
|
29
29
|
clearIcon?: ReactNode;
|
|
30
|
-
children?: ReactNode
|
|
30
|
+
children?: ReactNode;
|
|
31
31
|
data?: T[];
|
|
32
32
|
disabled?: boolean;
|
|
33
33
|
defaultOpen?: boolean;
|
|
@@ -10,7 +10,7 @@ export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonE
|
|
|
10
10
|
id?: string;
|
|
11
11
|
block?: boolean;
|
|
12
12
|
circle?: boolean;
|
|
13
|
-
children?: ReactNode
|
|
13
|
+
children?: ReactNode;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
className?: string;
|
|
16
16
|
icon?: React.ReactNode;
|
|
@@ -937,7 +937,8 @@ class Cascader extends _baseComponent.default {
|
|
|
937
937
|
onChange: this.handleInputChange
|
|
938
938
|
};
|
|
939
939
|
const wrappercls = (0, _classnames.default)({
|
|
940
|
-
[`${prefixcls}-search-wrapper`]: true
|
|
940
|
+
[`${prefixcls}-search-wrapper`]: true,
|
|
941
|
+
[`${prefixcls}-search-wrapper-${size}`]: size !== 'default'
|
|
941
942
|
});
|
|
942
943
|
const displayText = this.renderDisplayText();
|
|
943
944
|
const spanCls = (0, _classnames.default)({
|
|
@@ -18,7 +18,7 @@ export interface CheckboxProps extends BaseCheckboxProps {
|
|
|
18
18
|
'aria-invalid'?: React.AriaAttributes['aria-invalid'];
|
|
19
19
|
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
|
|
20
20
|
'aria-required'?: React.AriaAttributes['aria-required'];
|
|
21
|
-
children?: React.ReactNode
|
|
21
|
+
children?: React.ReactNode;
|
|
22
22
|
onChange?: (e: CheckboxEvent) => any;
|
|
23
23
|
style?: React.CSSProperties;
|
|
24
24
|
onMouseEnter?: React.MouseEventHandler<HTMLSpanElement>;
|
|
@@ -17,7 +17,7 @@ export declare type CheckboxGroupProps = {
|
|
|
17
17
|
options?: any[];
|
|
18
18
|
value?: any[];
|
|
19
19
|
onChange?: (value: any[]) => void;
|
|
20
|
-
children?: React.ReactNode
|
|
20
|
+
children?: React.ReactNode;
|
|
21
21
|
prefixCls?: string;
|
|
22
22
|
direction?: CheckboxDirection;
|
|
23
23
|
style?: React.CSSProperties;
|
|
@@ -16,7 +16,7 @@ export interface DescriptionsProps {
|
|
|
16
16
|
size?: DescriptionsSize;
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
18
|
className?: string;
|
|
19
|
-
children?: React.ReactNode
|
|
19
|
+
children?: React.ReactNode;
|
|
20
20
|
data?: Data[];
|
|
21
21
|
}
|
|
22
22
|
declare class Descriptions extends PureComponent<DescriptionsProps> {
|
package/lib/cjs/form/baseForm.js
CHANGED
|
@@ -133,7 +133,11 @@ class Form extends _baseComponent.default {
|
|
|
133
133
|
const {
|
|
134
134
|
formId
|
|
135
135
|
} = this.state;
|
|
136
|
-
|
|
136
|
+
const {
|
|
137
|
+
id
|
|
138
|
+
} = this.props;
|
|
139
|
+
const xId = id ? id : formId;
|
|
140
|
+
return document.querySelectorAll(`form[x-form-id="${xId}"] .${_constants.cssClasses.PREFIX}-field-error-message`);
|
|
137
141
|
},
|
|
138
142
|
getFieldDOM: field => document.querySelector(`.${_constants.cssClasses.PREFIX}-field[x-field-id="${field}"]`)
|
|
139
143
|
});
|
|
@@ -208,9 +212,10 @@ class Form extends _baseComponent.default {
|
|
|
208
212
|
allowEmpty,
|
|
209
213
|
autoScrollToError,
|
|
210
214
|
showValidateIcon,
|
|
211
|
-
extraTextPosition
|
|
215
|
+
extraTextPosition,
|
|
216
|
+
id
|
|
212
217
|
} = _a,
|
|
213
|
-
rest = __rest(_a, ["children", "getFormApi", "onChange", "onSubmit", "onSubmitFail", "onValueChange", "component", "render", "validateFields", "initValues", "layout", "style", "className", "labelPosition", "labelWidth", "labelAlign", "labelCol", "wrapperCol", "allowEmpty", "autoScrollToError", "showValidateIcon", "extraTextPosition"]);
|
|
218
|
+
rest = __rest(_a, ["children", "getFormApi", "onChange", "onSubmit", "onSubmitFail", "onValueChange", "component", "render", "validateFields", "initValues", "layout", "style", "className", "labelPosition", "labelWidth", "labelAlign", "labelCol", "wrapperCol", "allowEmpty", "autoScrollToError", "showValidateIcon", "extraTextPosition", "id"]);
|
|
214
219
|
|
|
215
220
|
const formCls = (0, _classnames.default)(prefix, className, {
|
|
216
221
|
[prefix + '-vertical']: layout === 'vertical',
|
|
@@ -224,7 +229,7 @@ class Form extends _baseComponent.default {
|
|
|
224
229
|
onReset: this.reset,
|
|
225
230
|
onSubmit: this.submit,
|
|
226
231
|
className: formCls,
|
|
227
|
-
"x-form-id": formId
|
|
232
|
+
"x-form-id": id ? id : formId
|
|
228
233
|
}), this.content);
|
|
229
234
|
|
|
230
235
|
const withRowForm = /*#__PURE__*/_react.default.createElement(_row.default, null, formContent);
|
|
@@ -140,47 +140,324 @@ export declare function withWarning(props: ModalReactProps): {
|
|
|
140
140
|
type: "warning";
|
|
141
141
|
};
|
|
142
142
|
export declare function withError(props: ModalReactProps): {
|
|
143
|
-
|
|
143
|
+
title?: React.ReactNode;
|
|
144
144
|
children?: React.ReactNode;
|
|
145
|
-
|
|
146
|
-
bodyStyle?: React.CSSProperties;
|
|
147
|
-
maskStyle?: React.CSSProperties;
|
|
145
|
+
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
148
146
|
style?: React.CSSProperties;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
content?: React.ReactNode;
|
|
147
|
+
className?: string;
|
|
148
|
+
motion?: boolean;
|
|
149
|
+
getPopupContainer?: () => HTMLElement;
|
|
153
150
|
footer?: React.ReactNode;
|
|
154
151
|
header?: React.ReactNode;
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
direction?: any;
|
|
153
|
+
width?: string | number;
|
|
154
|
+
height?: string | number;
|
|
155
|
+
mask?: boolean;
|
|
156
|
+
visible?: boolean;
|
|
157
|
+
content?: React.ReactNode;
|
|
158
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
159
|
+
zIndex?: number;
|
|
160
|
+
closeOnEsc?: boolean;
|
|
161
|
+
preventScroll?: boolean;
|
|
157
162
|
afterClose?: () => void;
|
|
163
|
+
keepDOM?: boolean;
|
|
158
164
|
cancelText?: string;
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
okText?: string;
|
|
166
|
+
closeIcon?: React.ReactNode;
|
|
167
|
+
bodyStyle?: React.CSSProperties;
|
|
161
168
|
closable?: boolean;
|
|
169
|
+
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
170
|
+
maskClosable?: boolean;
|
|
171
|
+
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
172
|
+
centered?: boolean;
|
|
162
173
|
confirmLoading?: boolean;
|
|
163
174
|
cancelLoading?: boolean;
|
|
164
175
|
hasCancel?: boolean;
|
|
165
|
-
|
|
166
|
-
mask?: boolean;
|
|
167
|
-
maskClosable?: boolean;
|
|
176
|
+
maskStyle?: React.CSSProperties;
|
|
168
177
|
maskFixed?: boolean;
|
|
169
|
-
motion?: boolean;
|
|
170
|
-
okText?: string;
|
|
171
178
|
okType?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").OKType;
|
|
172
|
-
|
|
173
|
-
width?: string | number;
|
|
174
|
-
zIndex?: number;
|
|
175
|
-
getPopupContainer?: () => HTMLElement;
|
|
176
|
-
closeOnEsc?: boolean;
|
|
177
|
-
size?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").Size;
|
|
179
|
+
onOk?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
178
180
|
lazyRender?: boolean;
|
|
179
|
-
keepDOM?: boolean;
|
|
180
|
-
direction?: any;
|
|
181
181
|
fullScreen?: boolean;
|
|
182
|
-
preventScroll?: boolean;
|
|
183
182
|
type: "error";
|
|
183
|
+
okButtonProps: {
|
|
184
|
+
id?: string;
|
|
185
|
+
block?: boolean;
|
|
186
|
+
circle?: boolean;
|
|
187
|
+
children?: React.ReactNode;
|
|
188
|
+
disabled?: boolean;
|
|
189
|
+
className?: string;
|
|
190
|
+
icon?: React.ReactNode;
|
|
191
|
+
iconPosition?: "left" | "right";
|
|
192
|
+
loading?: boolean;
|
|
193
|
+
htmlType?: import("../button").HtmlType;
|
|
194
|
+
size?: import("../button").Size;
|
|
195
|
+
style?: React.CSSProperties;
|
|
196
|
+
theme?: import("../button").Theme;
|
|
197
|
+
type: import("../button").Type;
|
|
198
|
+
prefixCls?: string;
|
|
199
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
200
|
+
onMouseDown?: React.MouseEventHandler<HTMLButtonElement>;
|
|
201
|
+
onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;
|
|
202
|
+
onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;
|
|
203
|
+
'aria-label'?: string;
|
|
204
|
+
title?: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
value?: string | number | readonly string[];
|
|
207
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
form?: string;
|
|
210
|
+
slot?: string;
|
|
211
|
+
hidden?: boolean;
|
|
212
|
+
color?: string;
|
|
213
|
+
onChange?: React.FormEventHandler<HTMLButtonElement>;
|
|
214
|
+
defaultChecked?: boolean;
|
|
215
|
+
defaultValue?: string | number | readonly string[];
|
|
216
|
+
suppressContentEditableWarning?: boolean;
|
|
217
|
+
suppressHydrationWarning?: boolean;
|
|
218
|
+
accessKey?: string;
|
|
219
|
+
autoFocus?: boolean;
|
|
220
|
+
formAction?: string;
|
|
221
|
+
formEncType?: string;
|
|
222
|
+
formMethod?: string;
|
|
223
|
+
formNoValidate?: boolean;
|
|
224
|
+
formTarget?: string;
|
|
225
|
+
dir?: string;
|
|
226
|
+
draggable?: boolean | "false" | "true";
|
|
227
|
+
lang?: string;
|
|
228
|
+
translate?: "no" | "yes";
|
|
229
|
+
prefix?: string;
|
|
230
|
+
contentEditable?: "inherit" | (boolean | "false" | "true");
|
|
231
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
232
|
+
tabIndex?: number;
|
|
233
|
+
role?: React.AriaRole;
|
|
234
|
+
onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
|
|
235
|
+
onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;
|
|
236
|
+
onFocus?: React.FocusEventHandler<HTMLButtonElement>;
|
|
237
|
+
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
238
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
239
|
+
'aria-expanded'?: boolean | "false" | "true";
|
|
240
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree";
|
|
241
|
+
'aria-controls'?: string;
|
|
242
|
+
'aria-describedby'?: string;
|
|
243
|
+
contextMenu?: string;
|
|
244
|
+
placeholder?: string;
|
|
245
|
+
spellCheck?: boolean | "false" | "true";
|
|
246
|
+
radioGroup?: string;
|
|
247
|
+
about?: string;
|
|
248
|
+
datatype?: string;
|
|
249
|
+
inlist?: any;
|
|
250
|
+
property?: string;
|
|
251
|
+
resource?: string;
|
|
252
|
+
typeof?: string;
|
|
253
|
+
vocab?: string;
|
|
254
|
+
autoCapitalize?: string;
|
|
255
|
+
autoCorrect?: string;
|
|
256
|
+
autoSave?: string;
|
|
257
|
+
itemProp?: string;
|
|
258
|
+
itemScope?: boolean;
|
|
259
|
+
itemType?: string;
|
|
260
|
+
itemID?: string;
|
|
261
|
+
itemRef?: string;
|
|
262
|
+
results?: number;
|
|
263
|
+
security?: string;
|
|
264
|
+
unselectable?: "on" | "off";
|
|
265
|
+
is?: string;
|
|
266
|
+
'aria-activedescendant'?: string;
|
|
267
|
+
'aria-atomic'?: boolean | "false" | "true";
|
|
268
|
+
'aria-autocomplete'?: "both" | "none" | "inline" | "list";
|
|
269
|
+
'aria-busy'?: boolean | "false" | "true";
|
|
270
|
+
'aria-checked'?: boolean | "mixed" | "false" | "true";
|
|
271
|
+
'aria-colcount'?: number;
|
|
272
|
+
'aria-colindex'?: number;
|
|
273
|
+
'aria-colspan'?: number;
|
|
274
|
+
'aria-current'?: boolean | "time" | "page" | "false" | "true" | "location" | "step" | "date";
|
|
275
|
+
'aria-details'?: string;
|
|
276
|
+
'aria-disabled'?: boolean | "false" | "true";
|
|
277
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
278
|
+
'aria-errormessage'?: string;
|
|
279
|
+
'aria-flowto'?: string;
|
|
280
|
+
'aria-grabbed'?: boolean | "false" | "true";
|
|
281
|
+
'aria-hidden'?: boolean | "false" | "true";
|
|
282
|
+
'aria-invalid'?: boolean | "false" | "true" | "grammar" | "spelling";
|
|
283
|
+
'aria-keyshortcuts'?: string;
|
|
284
|
+
'aria-labelledby'?: string;
|
|
285
|
+
'aria-level'?: number;
|
|
286
|
+
'aria-live'?: "off" | "assertive" | "polite";
|
|
287
|
+
'aria-modal'?: boolean | "false" | "true";
|
|
288
|
+
'aria-multiline'?: boolean | "false" | "true";
|
|
289
|
+
'aria-multiselectable'?: boolean | "false" | "true";
|
|
290
|
+
'aria-orientation'?: "horizontal" | "vertical";
|
|
291
|
+
'aria-owns'?: string;
|
|
292
|
+
'aria-placeholder'?: string;
|
|
293
|
+
'aria-posinset'?: number;
|
|
294
|
+
'aria-pressed'?: boolean | "mixed" | "false" | "true";
|
|
295
|
+
'aria-readonly'?: boolean | "false" | "true";
|
|
296
|
+
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
297
|
+
'aria-required'?: boolean | "false" | "true";
|
|
298
|
+
'aria-roledescription'?: string;
|
|
299
|
+
'aria-rowcount'?: number;
|
|
300
|
+
'aria-rowindex'?: number;
|
|
301
|
+
'aria-rowspan'?: number;
|
|
302
|
+
'aria-selected'?: boolean | "false" | "true";
|
|
303
|
+
'aria-setsize'?: number;
|
|
304
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other";
|
|
305
|
+
'aria-valuemax'?: number;
|
|
306
|
+
'aria-valuemin'?: number;
|
|
307
|
+
'aria-valuenow'?: number;
|
|
308
|
+
'aria-valuetext'?: string;
|
|
309
|
+
dangerouslySetInnerHTML?: {
|
|
310
|
+
__html: string;
|
|
311
|
+
};
|
|
312
|
+
onCopy?: React.ClipboardEventHandler<HTMLButtonElement>;
|
|
313
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLButtonElement>;
|
|
314
|
+
onCut?: React.ClipboardEventHandler<HTMLButtonElement>;
|
|
315
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLButtonElement>;
|
|
316
|
+
onPaste?: React.ClipboardEventHandler<HTMLButtonElement>;
|
|
317
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLButtonElement>;
|
|
318
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
319
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
320
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
321
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
322
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
323
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
324
|
+
onFocusCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
325
|
+
onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
326
|
+
onChangeCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
327
|
+
onBeforeInput?: React.FormEventHandler<HTMLButtonElement>;
|
|
328
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
329
|
+
onInput?: React.FormEventHandler<HTMLButtonElement>;
|
|
330
|
+
onInputCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
331
|
+
onReset?: React.FormEventHandler<HTMLButtonElement>;
|
|
332
|
+
onResetCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
333
|
+
onSubmit?: React.FormEventHandler<HTMLButtonElement>;
|
|
334
|
+
onSubmitCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
335
|
+
onInvalid?: React.FormEventHandler<HTMLButtonElement>;
|
|
336
|
+
onInvalidCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
337
|
+
onLoad?: React.ReactEventHandler<HTMLButtonElement>;
|
|
338
|
+
onLoadCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
339
|
+
onError?: React.ReactEventHandler<HTMLButtonElement>;
|
|
340
|
+
onErrorCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
341
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
342
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
343
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
344
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
345
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
346
|
+
onAbort?: React.ReactEventHandler<HTMLButtonElement>;
|
|
347
|
+
onAbortCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
348
|
+
onCanPlay?: React.ReactEventHandler<HTMLButtonElement>;
|
|
349
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
350
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLButtonElement>;
|
|
351
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
352
|
+
onDurationChange?: React.ReactEventHandler<HTMLButtonElement>;
|
|
353
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
354
|
+
onEmptied?: React.ReactEventHandler<HTMLButtonElement>;
|
|
355
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
356
|
+
onEncrypted?: React.ReactEventHandler<HTMLButtonElement>;
|
|
357
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
358
|
+
onEnded?: React.ReactEventHandler<HTMLButtonElement>;
|
|
359
|
+
onEndedCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
360
|
+
onLoadedData?: React.ReactEventHandler<HTMLButtonElement>;
|
|
361
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
362
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLButtonElement>;
|
|
363
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
364
|
+
onLoadStart?: React.ReactEventHandler<HTMLButtonElement>;
|
|
365
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
366
|
+
onPause?: React.ReactEventHandler<HTMLButtonElement>;
|
|
367
|
+
onPauseCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
368
|
+
onPlay?: React.ReactEventHandler<HTMLButtonElement>;
|
|
369
|
+
onPlayCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
370
|
+
onPlaying?: React.ReactEventHandler<HTMLButtonElement>;
|
|
371
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
372
|
+
onProgress?: React.ReactEventHandler<HTMLButtonElement>;
|
|
373
|
+
onProgressCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
374
|
+
onRateChange?: React.ReactEventHandler<HTMLButtonElement>;
|
|
375
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
376
|
+
onSeeked?: React.ReactEventHandler<HTMLButtonElement>;
|
|
377
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
378
|
+
onSeeking?: React.ReactEventHandler<HTMLButtonElement>;
|
|
379
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
380
|
+
onStalled?: React.ReactEventHandler<HTMLButtonElement>;
|
|
381
|
+
onStalledCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
382
|
+
onSuspend?: React.ReactEventHandler<HTMLButtonElement>;
|
|
383
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
384
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLButtonElement>;
|
|
385
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
386
|
+
onVolumeChange?: React.ReactEventHandler<HTMLButtonElement>;
|
|
387
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
388
|
+
onWaiting?: React.ReactEventHandler<HTMLButtonElement>;
|
|
389
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
390
|
+
onAuxClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
391
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
392
|
+
onClickCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
393
|
+
onContextMenu?: React.MouseEventHandler<HTMLButtonElement>;
|
|
394
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
395
|
+
onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
396
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
397
|
+
onDrag?: React.DragEventHandler<HTMLButtonElement>;
|
|
398
|
+
onDragCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
399
|
+
onDragEnd?: React.DragEventHandler<HTMLButtonElement>;
|
|
400
|
+
onDragEndCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
401
|
+
onDragEnter?: React.DragEventHandler<HTMLButtonElement>;
|
|
402
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
403
|
+
onDragExit?: React.DragEventHandler<HTMLButtonElement>;
|
|
404
|
+
onDragExitCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
405
|
+
onDragLeave?: React.DragEventHandler<HTMLButtonElement>;
|
|
406
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
407
|
+
onDragOver?: React.DragEventHandler<HTMLButtonElement>;
|
|
408
|
+
onDragOverCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
409
|
+
onDragStart?: React.DragEventHandler<HTMLButtonElement>;
|
|
410
|
+
onDragStartCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
411
|
+
onDrop?: React.DragEventHandler<HTMLButtonElement>;
|
|
412
|
+
onDropCapture?: React.DragEventHandler<HTMLButtonElement>;
|
|
413
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
414
|
+
onMouseMove?: React.MouseEventHandler<HTMLButtonElement>;
|
|
415
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
416
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
417
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
418
|
+
onMouseUp?: React.MouseEventHandler<HTMLButtonElement>;
|
|
419
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
420
|
+
onSelect?: React.ReactEventHandler<HTMLButtonElement>;
|
|
421
|
+
onSelectCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
422
|
+
onTouchCancel?: React.TouchEventHandler<HTMLButtonElement>;
|
|
423
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLButtonElement>;
|
|
424
|
+
onTouchEnd?: React.TouchEventHandler<HTMLButtonElement>;
|
|
425
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLButtonElement>;
|
|
426
|
+
onTouchMove?: React.TouchEventHandler<HTMLButtonElement>;
|
|
427
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLButtonElement>;
|
|
428
|
+
onTouchStart?: React.TouchEventHandler<HTMLButtonElement>;
|
|
429
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLButtonElement>;
|
|
430
|
+
onPointerDown?: React.PointerEventHandler<HTMLButtonElement>;
|
|
431
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
432
|
+
onPointerMove?: React.PointerEventHandler<HTMLButtonElement>;
|
|
433
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
434
|
+
onPointerUp?: React.PointerEventHandler<HTMLButtonElement>;
|
|
435
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
436
|
+
onPointerCancel?: React.PointerEventHandler<HTMLButtonElement>;
|
|
437
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
438
|
+
onPointerEnter?: React.PointerEventHandler<HTMLButtonElement>;
|
|
439
|
+
onPointerEnterCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
440
|
+
onPointerLeave?: React.PointerEventHandler<HTMLButtonElement>;
|
|
441
|
+
onPointerLeaveCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
442
|
+
onPointerOver?: React.PointerEventHandler<HTMLButtonElement>;
|
|
443
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
444
|
+
onPointerOut?: React.PointerEventHandler<HTMLButtonElement>;
|
|
445
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
446
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
447
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
448
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
449
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLButtonElement>;
|
|
450
|
+
onScroll?: React.UIEventHandler<HTMLButtonElement>;
|
|
451
|
+
onScrollCapture?: React.UIEventHandler<HTMLButtonElement>;
|
|
452
|
+
onWheel?: React.WheelEventHandler<HTMLButtonElement>;
|
|
453
|
+
onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>;
|
|
454
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
455
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
456
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
457
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
458
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
459
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
460
|
+
};
|
|
184
461
|
};
|
|
185
462
|
export declare function withConfirm(props: ModalReactProps): {
|
|
186
463
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
package/lib/cjs/modal/confirm.js
CHANGED
|
@@ -10,6 +10,8 @@ exports.withInfo = withInfo;
|
|
|
10
10
|
exports.withSuccess = withSuccess;
|
|
11
11
|
exports.withWarning = withWarning;
|
|
12
12
|
|
|
13
|
+
var _omit2 = _interopRequireDefault(require("lodash/omit"));
|
|
14
|
+
|
|
13
15
|
var _react = _interopRequireDefault(require("react"));
|
|
14
16
|
|
|
15
17
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
@@ -109,8 +111,11 @@ function withWarning(props) {
|
|
|
109
111
|
function withError(props) {
|
|
110
112
|
return Object.assign({
|
|
111
113
|
type: 'error',
|
|
112
|
-
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconAlertCircle, null)
|
|
113
|
-
|
|
114
|
+
icon: /*#__PURE__*/_react.default.createElement(_semiIcons.IconAlertCircle, null),
|
|
115
|
+
okButtonProps: Object.assign({
|
|
116
|
+
type: 'danger'
|
|
117
|
+
}, props.okButtonProps)
|
|
118
|
+
}, (0, _omit2.default)(props, ['okButtonProps']));
|
|
114
119
|
}
|
|
115
120
|
|
|
116
121
|
function withConfirm(props) {
|
|
@@ -5,9 +5,9 @@ import { Animation } from '@douyinfe/semi-animation';
|
|
|
5
5
|
import { Motion } from '../_base/base';
|
|
6
6
|
import { StrokeArr } from '@douyinfe/semi-foundation/lib/cjs/progress/generates';
|
|
7
7
|
export interface ProgressProps {
|
|
8
|
-
'aria-label'?: string
|
|
9
|
-
'aria-labelledby'?: string
|
|
10
|
-
'aria-valuetext'?: string
|
|
8
|
+
'aria-label'?: string;
|
|
9
|
+
'aria-labelledby'?: string;
|
|
10
|
+
'aria-valuetext'?: string;
|
|
11
11
|
className?: string;
|
|
12
12
|
direction?: 'horizontal' | 'vertical';
|
|
13
13
|
format?: (percent: number) => React.ReactNode;
|
package/lib/cjs/radio/radio.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare type RadioType = typeof strings.TYPE_DEFAULT | typeof strings.TYP
|
|
|
12
12
|
export declare type RadioProps = {
|
|
13
13
|
autoFocus?: boolean;
|
|
14
14
|
checked?: boolean;
|
|
15
|
-
children?: React.ReactNode
|
|
15
|
+
children?: React.ReactNode;
|
|
16
16
|
defaultChecked?: boolean;
|
|
17
17
|
value?: string | number;
|
|
18
18
|
disabled?: boolean;
|
|
@@ -49,8 +49,6 @@ var _SectionRow = _interopRequireDefault(require("./SectionRow"));
|
|
|
49
49
|
|
|
50
50
|
var _TableHeader = _interopRequireDefault(require("../TableHeader"));
|
|
51
51
|
|
|
52
|
-
var _context = _interopRequireDefault(require("../../configProvider/context"));
|
|
53
|
-
|
|
54
52
|
var _tableContext = _interopRequireDefault(require("../table-context"));
|
|
55
53
|
|
|
56
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -814,12 +812,10 @@ class Body extends _baseComponent.default {
|
|
|
814
812
|
const {
|
|
815
813
|
virtualized
|
|
816
814
|
} = this.props;
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
return virtualized ? this.renderVirtualizedBody(direction) : this.renderBody(direction);
|
|
822
|
-
});
|
|
815
|
+
const {
|
|
816
|
+
direction
|
|
817
|
+
} = this.context;
|
|
818
|
+
return virtualized ? this.renderVirtualizedBody(direction) : this.renderBody(direction);
|
|
823
819
|
}
|
|
824
820
|
|
|
825
821
|
}
|
package/lib/cjs/table/Table.js
CHANGED
|
@@ -317,8 +317,9 @@ class Table extends _baseComponent.default {
|
|
|
317
317
|
const node = this.bodyWrapRef.current;
|
|
318
318
|
|
|
319
319
|
if (node && node.children && node.children.length) {
|
|
320
|
-
const scrollToLeft = node.scrollLeft === 0;
|
|
321
|
-
|
|
320
|
+
const scrollToLeft = node.scrollLeft === 0; // why use Math.abs? @see https://bugzilla.mozilla.org/show_bug.cgi?id=1447743
|
|
321
|
+
|
|
322
|
+
const scrollToRight = Math.abs(node.scrollLeft) + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width;
|
|
322
323
|
|
|
323
324
|
if (scrollToLeft && scrollToRight) {
|
|
324
325
|
this.setScrollPosition('both');
|
|
@@ -1500,11 +1501,13 @@ class Table extends _baseComponent.default {
|
|
|
1500
1501
|
});
|
|
1501
1502
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1502
1503
|
ref: this.rootWrapRef,
|
|
1503
|
-
className: (0, _classnames.default)(className, `${prefixCls}-wrapper`),
|
|
1504
|
+
className: (0, _classnames.default)(className, `${prefixCls}-wrapper`, `${prefixCls}-wrapper-${props.direction}`),
|
|
1504
1505
|
"data-column-fixed": anyColumnFixed,
|
|
1505
1506
|
style: wrapStyle,
|
|
1506
1507
|
id: id
|
|
1507
|
-
}, /*#__PURE__*/_react.default.createElement(_TableContextProvider.default, Object.assign({}, tableContextValue
|
|
1508
|
+
}, /*#__PURE__*/_react.default.createElement(_TableContextProvider.default, Object.assign({}, tableContextValue, {
|
|
1509
|
+
direction: props.direction
|
|
1510
|
+
}), /*#__PURE__*/_react.default.createElement(_spin.default, {
|
|
1508
1511
|
spinning: loading,
|
|
1509
1512
|
size: "large"
|
|
1510
1513
|
}, /*#__PURE__*/_react.default.createElement("div", {
|