@douyinfe/semi-ui 2.30.0 → 2.30.2
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/umd/semi-ui.js +21 -10
- 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/dropdown/dropdownItem.js +4 -3
- package/lib/cjs/form/baseForm.js +9 -4
- package/lib/cjs/modal/confirm.d.ts +303 -26
- package/lib/cjs/modal/confirm.js +7 -2
- package/lib/cjs/tag/index.js +2 -1
- package/lib/es/dropdown/dropdownItem.js +4 -3
- package/lib/es/form/baseForm.js +9 -4
- package/lib/es/modal/confirm.d.ts +303 -26
- package/lib/es/modal/confirm.js +6 -2
- package/lib/es/tag/index.js +2 -1
- package/package.json +9 -9
|
@@ -43,11 +43,12 @@ class DropdownItem extends _baseComponent.default {
|
|
|
43
43
|
const {
|
|
44
44
|
showTick: contextShowTick
|
|
45
45
|
} = this.context;
|
|
46
|
+
const realShowTick = contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick;
|
|
46
47
|
const itemclass = (0, _classnames.default)(className, {
|
|
47
48
|
[`${prefixCls}-item`]: true,
|
|
48
49
|
[`${prefixCls}-item-disabled`]: disabled,
|
|
49
50
|
[`${prefixCls}-item-hover`]: hover,
|
|
50
|
-
[`${prefixCls}-item-withTick`]:
|
|
51
|
+
[`${prefixCls}-item-withTick`]: realShowTick,
|
|
51
52
|
[`${prefixCls}-item-${type}`]: type,
|
|
52
53
|
[`${prefixCls}-item-active`]: active
|
|
53
54
|
});
|
|
@@ -62,11 +63,11 @@ class DropdownItem extends _baseComponent.default {
|
|
|
62
63
|
let tick = null;
|
|
63
64
|
|
|
64
65
|
switch (true) {
|
|
65
|
-
case
|
|
66
|
+
case realShowTick && active:
|
|
66
67
|
tick = /*#__PURE__*/_react.default.createElement(_semiIcons.IconTick, null);
|
|
67
68
|
break;
|
|
68
69
|
|
|
69
|
-
case
|
|
70
|
+
case realShowTick && !active:
|
|
70
71
|
tick = /*#__PURE__*/_react.default.createElement(_semiIcons.IconTick, {
|
|
71
72
|
style: {
|
|
72
73
|
color: 'transparent'
|
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;
|
|
158
163
|
cancelText?: string;
|
|
159
|
-
|
|
160
|
-
|
|
164
|
+
okText?: string;
|
|
165
|
+
closeIcon?: React.ReactNode;
|
|
166
|
+
bodyStyle?: React.CSSProperties;
|
|
161
167
|
closable?: boolean;
|
|
168
|
+
keepDOM?: 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) {
|
package/lib/cjs/tag/index.js
CHANGED
|
@@ -178,11 +178,12 @@ class Tag extends _react.Component {
|
|
|
178
178
|
|
|
179
179
|
const a11yProps = {
|
|
180
180
|
role: 'button',
|
|
181
|
-
tabIndex: tabIndex
|
|
181
|
+
tabIndex: tabIndex || 0,
|
|
182
182
|
onKeyDown: this.handleKeyDown
|
|
183
183
|
};
|
|
184
184
|
const baseProps = Object.assign(Object.assign({}, attr), {
|
|
185
185
|
onClick,
|
|
186
|
+
tabIndex: tabIndex,
|
|
186
187
|
className: (0, _classnames.default)(prefixCls, {
|
|
187
188
|
[`${prefixCls}-default`]: size === 'default',
|
|
188
189
|
[`${prefixCls}-small`]: size === 'small',
|
|
@@ -26,11 +26,12 @@ class DropdownItem extends BaseComponent {
|
|
|
26
26
|
const {
|
|
27
27
|
showTick: contextShowTick
|
|
28
28
|
} = this.context;
|
|
29
|
+
const realShowTick = contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick;
|
|
29
30
|
const itemclass = cls(className, {
|
|
30
31
|
[`${prefixCls}-item`]: true,
|
|
31
32
|
[`${prefixCls}-item-disabled`]: disabled,
|
|
32
33
|
[`${prefixCls}-item-hover`]: hover,
|
|
33
|
-
[`${prefixCls}-item-withTick`]:
|
|
34
|
+
[`${prefixCls}-item-withTick`]: realShowTick,
|
|
34
35
|
[`${prefixCls}-item-${type}`]: type,
|
|
35
36
|
[`${prefixCls}-item-active`]: active
|
|
36
37
|
});
|
|
@@ -45,11 +46,11 @@ class DropdownItem extends BaseComponent {
|
|
|
45
46
|
let tick = null;
|
|
46
47
|
|
|
47
48
|
switch (true) {
|
|
48
|
-
case
|
|
49
|
+
case realShowTick && active:
|
|
49
50
|
tick = /*#__PURE__*/React.createElement(IconTick, null);
|
|
50
51
|
break;
|
|
51
52
|
|
|
52
|
-
case
|
|
53
|
+
case realShowTick && !active:
|
|
53
54
|
tick = /*#__PURE__*/React.createElement(IconTick, {
|
|
54
55
|
style: {
|
|
55
56
|
color: 'transparent'
|
package/lib/es/form/baseForm.js
CHANGED
|
@@ -105,7 +105,11 @@ class Form extends BaseComponent {
|
|
|
105
105
|
const {
|
|
106
106
|
formId
|
|
107
107
|
} = this.state;
|
|
108
|
-
|
|
108
|
+
const {
|
|
109
|
+
id
|
|
110
|
+
} = this.props;
|
|
111
|
+
const xId = id ? id : formId;
|
|
112
|
+
return document.querySelectorAll(`form[x-form-id="${xId}"] .${cssClasses.PREFIX}-field-error-message`);
|
|
109
113
|
},
|
|
110
114
|
getFieldDOM: field => document.querySelector(`.${cssClasses.PREFIX}-field[x-field-id="${field}"]`)
|
|
111
115
|
});
|
|
@@ -180,9 +184,10 @@ class Form extends BaseComponent {
|
|
|
180
184
|
allowEmpty,
|
|
181
185
|
autoScrollToError,
|
|
182
186
|
showValidateIcon,
|
|
183
|
-
extraTextPosition
|
|
187
|
+
extraTextPosition,
|
|
188
|
+
id
|
|
184
189
|
} = _a,
|
|
185
|
-
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"]);
|
|
190
|
+
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"]);
|
|
186
191
|
|
|
187
192
|
const formCls = classNames(prefix, className, {
|
|
188
193
|
[prefix + '-vertical']: layout === 'vertical',
|
|
@@ -195,7 +200,7 @@ class Form extends BaseComponent {
|
|
|
195
200
|
onReset: this.reset,
|
|
196
201
|
onSubmit: this.submit,
|
|
197
202
|
className: formCls,
|
|
198
|
-
"x-form-id": formId
|
|
203
|
+
"x-form-id": id ? id : formId
|
|
199
204
|
}), this.content);
|
|
200
205
|
const withRowForm = /*#__PURE__*/React.createElement(Row, null, formContent);
|
|
201
206
|
return /*#__PURE__*/React.createElement(FormUpdaterContext.Provider, {
|