@douyinfe/semi-ui 2.53.3 → 2.54.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +29 -20
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +201 -67
- 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/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/button/index.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/cascader/index.d.ts +3 -0
- package/lib/cjs/cascader/index.js +11 -4
- package/lib/cjs/collapsible/index.d.ts +1 -0
- package/lib/cjs/collapsible/index.js +4 -3
- package/lib/cjs/datePicker/datePicker.d.ts +2 -2
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/datePicker/quickControl.d.ts +1 -1
- package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/cjs/descriptions/descriptions-context.d.ts +2 -0
- package/lib/cjs/descriptions/index.d.ts +17 -4
- package/lib/cjs/descriptions/index.js +52 -16
- package/lib/cjs/descriptions/item.d.ts +1 -0
- package/lib/cjs/descriptions/item.js +20 -13
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/image/interface.d.ts +1 -0
- package/lib/cjs/image/previewInner.js +6 -0
- package/lib/cjs/modal/Modal.d.ts +4 -4
- package/lib/cjs/modal/Modal.js +12 -11
- package/lib/cjs/modal/confirm.d.ts +100 -100
- package/lib/cjs/overflowList/index.d.ts +1 -1
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/slider/index.js +4 -2
- package/lib/cjs/table/Column.d.ts +1 -1
- package/lib/cjs/table/ColumnShape.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +2 -2
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/toast/index.js +3 -0
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/base.js +6 -4
- package/lib/cjs/upload/index.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/button/index.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/cascader/index.d.ts +3 -0
- package/lib/es/cascader/index.js +11 -4
- package/lib/es/collapsible/index.d.ts +1 -0
- package/lib/es/collapsible/index.js +4 -3
- package/lib/es/datePicker/datePicker.d.ts +2 -2
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/datePicker/quickControl.d.ts +1 -1
- package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
- package/lib/es/descriptions/descriptions-context.d.ts +2 -0
- package/lib/es/descriptions/index.d.ts +17 -4
- package/lib/es/descriptions/index.js +52 -14
- package/lib/es/descriptions/item.d.ts +1 -0
- package/lib/es/descriptions/item.js +20 -13
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/image/interface.d.ts +1 -0
- package/lib/es/image/previewInner.js +6 -0
- package/lib/es/modal/Modal.d.ts +4 -4
- package/lib/es/modal/Modal.js +12 -11
- package/lib/es/modal/confirm.d.ts +100 -100
- package/lib/es/overflowList/index.d.ts +1 -1
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/slider/index.js +4 -2
- package/lib/es/table/Column.d.ts +1 -1
- package/lib/es/table/ColumnShape.d.ts +1 -1
- package/lib/es/table/Table.d.ts +2 -2
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/toast/index.js +3 -0
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/base.js +6 -4
- package/lib/es/upload/index.d.ts +3 -3
- package/package.json +8 -8
|
@@ -153,12 +153,12 @@ export declare function withError(props: ModalReactProps): {
|
|
|
153
153
|
footer?: React.ReactNode;
|
|
154
154
|
header?: React.ReactNode;
|
|
155
155
|
direction?: any;
|
|
156
|
-
mask?: boolean;
|
|
157
|
-
visible?: boolean;
|
|
158
|
-
zIndex?: number;
|
|
159
156
|
width?: string | number;
|
|
160
157
|
height?: string | number;
|
|
158
|
+
visible?: boolean;
|
|
161
159
|
content?: React.ReactNode;
|
|
160
|
+
mask?: boolean;
|
|
161
|
+
zIndex?: number;
|
|
162
162
|
closeOnEsc?: boolean;
|
|
163
163
|
preventScroll?: boolean;
|
|
164
164
|
afterClose?: () => void;
|
|
@@ -166,6 +166,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
166
166
|
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
167
167
|
closable?: boolean;
|
|
168
168
|
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
169
|
+
lazyRender?: boolean;
|
|
169
170
|
bodyStyle?: React.CSSProperties;
|
|
170
171
|
cancelButtonProps?: import("../button").BaseButtonProps;
|
|
171
172
|
cancelText?: string;
|
|
@@ -180,7 +181,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
180
181
|
okType?: import("@douyinfe/semi-foundation/lib/cjs/modal/modalFoundation").OKType;
|
|
181
182
|
onOk?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
182
183
|
closeIcon?: React.ReactNode;
|
|
183
|
-
lazyRender?: boolean;
|
|
184
184
|
fullScreen?: boolean;
|
|
185
185
|
footerFill?: boolean;
|
|
186
186
|
type: "error";
|
|
@@ -212,7 +212,103 @@ export declare function withError(props: ModalReactProps): {
|
|
|
212
212
|
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
213
213
|
form?: string;
|
|
214
214
|
slot?: string;
|
|
215
|
+
contextMenu?: string;
|
|
216
|
+
defaultValue?: string | number | readonly string[];
|
|
217
|
+
accessKey?: string;
|
|
218
|
+
dir?: string;
|
|
219
|
+
draggable?: boolean | "true" | "false";
|
|
220
|
+
hidden?: boolean;
|
|
221
|
+
lang?: string;
|
|
222
|
+
translate?: "yes" | "no";
|
|
215
223
|
prefix?: string;
|
|
224
|
+
role?: React.AriaRole;
|
|
225
|
+
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
226
|
+
inputMode?: "search" | "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
227
|
+
nonce?: string;
|
|
228
|
+
tabIndex?: number;
|
|
229
|
+
color?: string;
|
|
230
|
+
content?: string;
|
|
231
|
+
onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
|
|
232
|
+
onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;
|
|
233
|
+
onFocus?: React.FocusEventHandler<HTMLButtonElement>;
|
|
234
|
+
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
235
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
236
|
+
onContextMenu?: React.MouseEventHandler<HTMLButtonElement>;
|
|
237
|
+
'aria-expanded'?: boolean | "true" | "false";
|
|
238
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree";
|
|
239
|
+
'aria-controls'?: string;
|
|
240
|
+
'aria-describedby'?: string;
|
|
241
|
+
defaultChecked?: boolean;
|
|
242
|
+
suppressContentEditableWarning?: boolean;
|
|
243
|
+
suppressHydrationWarning?: boolean;
|
|
244
|
+
autoFocus?: boolean;
|
|
245
|
+
placeholder?: string;
|
|
246
|
+
spellCheck?: boolean | "true" | "false";
|
|
247
|
+
radioGroup?: string;
|
|
248
|
+
about?: string;
|
|
249
|
+
datatype?: string;
|
|
250
|
+
inlist?: any;
|
|
251
|
+
property?: string;
|
|
252
|
+
rel?: string;
|
|
253
|
+
resource?: string;
|
|
254
|
+
rev?: string;
|
|
255
|
+
typeof?: string;
|
|
256
|
+
vocab?: string;
|
|
257
|
+
autoCapitalize?: string;
|
|
258
|
+
autoCorrect?: string;
|
|
259
|
+
autoSave?: string;
|
|
260
|
+
itemProp?: string;
|
|
261
|
+
itemScope?: boolean;
|
|
262
|
+
itemType?: string;
|
|
263
|
+
itemID?: string;
|
|
264
|
+
itemRef?: string;
|
|
265
|
+
results?: number;
|
|
266
|
+
security?: string;
|
|
267
|
+
unselectable?: "on" | "off";
|
|
268
|
+
is?: string;
|
|
269
|
+
'aria-activedescendant'?: string;
|
|
270
|
+
'aria-atomic'?: boolean | "true" | "false";
|
|
271
|
+
'aria-autocomplete'?: "both" | "none" | "inline" | "list";
|
|
272
|
+
'aria-busy'?: boolean | "true" | "false";
|
|
273
|
+
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
274
|
+
'aria-colcount'?: number;
|
|
275
|
+
'aria-colindex'?: number;
|
|
276
|
+
'aria-colspan'?: number;
|
|
277
|
+
'aria-current'?: boolean | "time" | "location" | "true" | "false" | "page" | "step" | "date";
|
|
278
|
+
'aria-details'?: string;
|
|
279
|
+
'aria-disabled'?: boolean | "true" | "false";
|
|
280
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
281
|
+
'aria-errormessage'?: string;
|
|
282
|
+
'aria-flowto'?: string;
|
|
283
|
+
'aria-grabbed'?: boolean | "true" | "false";
|
|
284
|
+
'aria-hidden'?: boolean | "true" | "false";
|
|
285
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
286
|
+
'aria-keyshortcuts'?: string;
|
|
287
|
+
'aria-labelledby'?: string;
|
|
288
|
+
'aria-level'?: number;
|
|
289
|
+
'aria-live'?: "off" | "assertive" | "polite";
|
|
290
|
+
'aria-modal'?: boolean | "true" | "false";
|
|
291
|
+
'aria-multiline'?: boolean | "true" | "false";
|
|
292
|
+
'aria-multiselectable'?: boolean | "true" | "false";
|
|
293
|
+
'aria-orientation'?: "horizontal" | "vertical";
|
|
294
|
+
'aria-owns'?: string;
|
|
295
|
+
'aria-placeholder'?: string;
|
|
296
|
+
'aria-posinset'?: number;
|
|
297
|
+
'aria-pressed'?: boolean | "true" | "false" | "mixed";
|
|
298
|
+
'aria-readonly'?: boolean | "true" | "false";
|
|
299
|
+
'aria-relevant'?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
300
|
+
'aria-required'?: boolean | "true" | "false";
|
|
301
|
+
'aria-roledescription'?: string;
|
|
302
|
+
'aria-rowcount'?: number;
|
|
303
|
+
'aria-rowindex'?: number;
|
|
304
|
+
'aria-rowspan'?: number;
|
|
305
|
+
'aria-selected'?: boolean | "true" | "false";
|
|
306
|
+
'aria-setsize'?: number;
|
|
307
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other";
|
|
308
|
+
'aria-valuemax'?: number;
|
|
309
|
+
'aria-valuemin'?: number;
|
|
310
|
+
'aria-valuenow'?: number;
|
|
311
|
+
'aria-valuetext'?: string;
|
|
216
312
|
dangerouslySetInnerHTML?: {
|
|
217
313
|
__html: string | TrustedHTML;
|
|
218
314
|
};
|
|
@@ -228,9 +324,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
228
324
|
onCompositionStartCapture?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
229
325
|
onCompositionUpdate?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
230
326
|
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLButtonElement>;
|
|
231
|
-
onFocus?: React.FocusEventHandler<HTMLButtonElement>;
|
|
232
327
|
onFocusCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
233
|
-
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
234
328
|
onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
|
|
235
329
|
onChange?: React.FormEventHandler<HTMLButtonElement>;
|
|
236
330
|
onChangeCapture?: React.FormEventHandler<HTMLButtonElement>;
|
|
@@ -248,7 +342,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
248
342
|
onLoadCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
249
343
|
onError?: React.ReactEventHandler<HTMLButtonElement>;
|
|
250
344
|
onErrorCapture?: React.ReactEventHandler<HTMLButtonElement>;
|
|
251
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
252
345
|
onKeyDownCapture?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
253
346
|
onKeyPress?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
254
347
|
onKeyPressCapture?: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
@@ -303,7 +396,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
303
396
|
onAuxClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
304
397
|
onAuxClickCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
305
398
|
onClickCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
306
|
-
onContextMenu?: React.MouseEventHandler<HTMLButtonElement>;
|
|
307
399
|
onContextMenuCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
308
400
|
onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
309
401
|
onDoubleClickCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -326,9 +418,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
326
418
|
onMouseDownCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
327
419
|
onMouseMove?: React.MouseEventHandler<HTMLButtonElement>;
|
|
328
420
|
onMouseMoveCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
329
|
-
onMouseOut?: React.MouseEventHandler<HTMLButtonElement>;
|
|
330
421
|
onMouseOutCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
331
|
-
onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;
|
|
332
422
|
onMouseOverCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
333
423
|
onMouseUp?: React.MouseEventHandler<HTMLButtonElement>;
|
|
334
424
|
onMouseUpCapture?: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -372,96 +462,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
372
462
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
373
463
|
onTransitionEnd?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
374
464
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement>;
|
|
375
|
-
hidden?: boolean;
|
|
376
|
-
color?: string;
|
|
377
|
-
defaultChecked?: boolean;
|
|
378
|
-
defaultValue?: string | number | readonly string[];
|
|
379
|
-
suppressContentEditableWarning?: boolean;
|
|
380
|
-
suppressHydrationWarning?: boolean;
|
|
381
|
-
accessKey?: string;
|
|
382
|
-
autoFocus?: boolean;
|
|
383
|
-
contextMenu?: string;
|
|
384
|
-
dir?: string;
|
|
385
|
-
draggable?: boolean | "true" | "false";
|
|
386
|
-
lang?: string;
|
|
387
|
-
translate?: "no" | "yes";
|
|
388
|
-
role?: React.AriaRole;
|
|
389
|
-
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
390
|
-
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
391
|
-
nonce?: string;
|
|
392
|
-
tabIndex?: number;
|
|
393
|
-
content?: string;
|
|
394
|
-
'aria-expanded'?: boolean | "true" | "false";
|
|
395
|
-
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false";
|
|
396
|
-
'aria-controls'?: string;
|
|
397
|
-
'aria-describedby'?: string;
|
|
398
|
-
placeholder?: string;
|
|
399
|
-
spellCheck?: boolean | "true" | "false";
|
|
400
|
-
radioGroup?: string;
|
|
401
|
-
about?: string;
|
|
402
|
-
datatype?: string;
|
|
403
|
-
inlist?: any;
|
|
404
|
-
property?: string;
|
|
405
|
-
rel?: string;
|
|
406
|
-
resource?: string;
|
|
407
|
-
rev?: string;
|
|
408
|
-
typeof?: string;
|
|
409
|
-
vocab?: string;
|
|
410
|
-
autoCapitalize?: string;
|
|
411
|
-
autoCorrect?: string;
|
|
412
|
-
autoSave?: string;
|
|
413
|
-
itemProp?: string;
|
|
414
|
-
itemScope?: boolean;
|
|
415
|
-
itemType?: string;
|
|
416
|
-
itemID?: string;
|
|
417
|
-
itemRef?: string;
|
|
418
|
-
results?: number;
|
|
419
|
-
security?: string;
|
|
420
|
-
unselectable?: "on" | "off";
|
|
421
|
-
is?: string;
|
|
422
|
-
'aria-activedescendant'?: string;
|
|
423
|
-
'aria-atomic'?: boolean | "true" | "false";
|
|
424
|
-
'aria-autocomplete'?: "both" | "none" | "list" | "inline";
|
|
425
|
-
'aria-busy'?: boolean | "true" | "false";
|
|
426
|
-
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
427
|
-
'aria-colcount'?: number;
|
|
428
|
-
'aria-colindex'?: number;
|
|
429
|
-
'aria-colspan'?: number;
|
|
430
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "location" | "page" | "step";
|
|
431
|
-
'aria-details'?: string;
|
|
432
|
-
'aria-disabled'?: boolean | "true" | "false";
|
|
433
|
-
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
434
|
-
'aria-errormessage'?: string;
|
|
435
|
-
'aria-flowto'?: string;
|
|
436
|
-
'aria-grabbed'?: boolean | "true" | "false";
|
|
437
|
-
'aria-hidden'?: boolean | "true" | "false";
|
|
438
|
-
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
439
|
-
'aria-keyshortcuts'?: string;
|
|
440
|
-
'aria-labelledby'?: string;
|
|
441
|
-
'aria-level'?: number;
|
|
442
|
-
'aria-live'?: "off" | "assertive" | "polite";
|
|
443
|
-
'aria-modal'?: boolean | "true" | "false";
|
|
444
|
-
'aria-multiline'?: boolean | "true" | "false";
|
|
445
|
-
'aria-multiselectable'?: boolean | "true" | "false";
|
|
446
|
-
'aria-orientation'?: "horizontal" | "vertical";
|
|
447
|
-
'aria-owns'?: string;
|
|
448
|
-
'aria-placeholder'?: string;
|
|
449
|
-
'aria-posinset'?: number;
|
|
450
|
-
'aria-pressed'?: boolean | "true" | "false" | "mixed";
|
|
451
|
-
'aria-readonly'?: boolean | "true" | "false";
|
|
452
|
-
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
453
|
-
'aria-required'?: boolean | "true" | "false";
|
|
454
|
-
'aria-roledescription'?: string;
|
|
455
|
-
'aria-rowcount'?: number;
|
|
456
|
-
'aria-rowindex'?: number;
|
|
457
|
-
'aria-rowspan'?: number;
|
|
458
|
-
'aria-selected'?: boolean | "true" | "false";
|
|
459
|
-
'aria-setsize'?: number;
|
|
460
|
-
'aria-sort'?: "none" | "ascending" | "descending" | "other";
|
|
461
|
-
'aria-valuemax'?: number;
|
|
462
|
-
'aria-valuemin'?: number;
|
|
463
|
-
'aria-valuenow'?: number;
|
|
464
|
-
'aria-valuetext'?: string;
|
|
465
465
|
formAction?: string;
|
|
466
466
|
formEncType?: string;
|
|
467
467
|
formMethod?: string;
|
|
@@ -81,7 +81,7 @@ declare class OverflowList extends BaseComponent<OverflowListProps, OverflowList
|
|
|
81
81
|
className: string;
|
|
82
82
|
style: {
|
|
83
83
|
maxWidth: string;
|
|
84
|
-
visibility: "
|
|
84
|
+
visibility: "visible" | "hidden";
|
|
85
85
|
accentColor?: import("csstype").Property.AccentColor;
|
|
86
86
|
alignContent?: import("csstype").Property.AlignContent;
|
|
87
87
|
alignItems?: import("csstype").Property.AlignItems;
|
|
@@ -58,7 +58,7 @@ declare class Popover extends React.PureComponent<PopoverProps, PopoverState> {
|
|
|
58
58
|
visible: PropTypes.Requireable<boolean>;
|
|
59
59
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
60
60
|
motion: PropTypes.Requireable<boolean>;
|
|
61
|
-
position: PropTypes.Requireable<"left" | "
|
|
61
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
62
62
|
margin: PropTypes.Requireable<NonNullable<number | object>>;
|
|
63
63
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
64
64
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
package/lib/cjs/radio/radio.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ declare class Radio extends BaseComponent<RadioProps, RadioState> {
|
|
|
82
82
|
prefixCls?: string;
|
|
83
83
|
name?: string;
|
|
84
84
|
onChange?: (e: RadioChangeEvent) => void;
|
|
85
|
-
buttonSize?: "small" | "
|
|
85
|
+
buttonSize?: "small" | "large" | "middle";
|
|
86
86
|
isCardRadio?: boolean;
|
|
87
87
|
isPureCardRadio?: boolean;
|
|
88
88
|
};
|
|
@@ -48,7 +48,7 @@ declare class RadioGroup extends BaseComponent<RadioGroupProps, RadioGroupState>
|
|
|
48
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
49
49
|
name: PropTypes.Requireable<string>;
|
|
50
50
|
options: PropTypes.Requireable<any[]>;
|
|
51
|
-
buttonSize: PropTypes.Requireable<"small" | "
|
|
51
|
+
buttonSize: PropTypes.Requireable<"small" | "large" | "middle">;
|
|
52
52
|
type: PropTypes.Requireable<"default" | "button" | "card" | "pureCard">;
|
|
53
53
|
value: PropTypes.Requireable<any>;
|
|
54
54
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -200,7 +200,7 @@ declare class Select extends BaseComponent<SelectProps, SelectState> {
|
|
|
200
200
|
expandRestTagsOnClick: PropTypes.Requireable<boolean>;
|
|
201
201
|
onDropdownVisibleChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
202
202
|
zIndex: PropTypes.Requireable<number>;
|
|
203
|
-
position: PropTypes.Requireable<"left" | "
|
|
203
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
204
204
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
205
205
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
206
206
|
dropdownClassName: PropTypes.Requireable<string>;
|
package/lib/cjs/slider/index.js
CHANGED
|
@@ -392,11 +392,13 @@ class Slider extends _baseComponent.default {
|
|
|
392
392
|
var _this = this;
|
|
393
393
|
return Object.assign(Object.assign({}, super.adapter), {
|
|
394
394
|
getSliderLengths: () => {
|
|
395
|
+
var _a;
|
|
395
396
|
if (this.sliderEl && this.sliderEl.current) {
|
|
396
397
|
const rect = this.sliderEl.current.getBoundingClientRect();
|
|
398
|
+
const offsetParentRect = (_a = this.sliderEl.current.offsetParent) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
397
399
|
const offset = {
|
|
398
|
-
x: this.sliderEl.current.offsetLeft,
|
|
399
|
-
y: this.sliderEl.current.offsetTop
|
|
400
|
+
x: offsetParentRect ? rect.left - offsetParentRect.left : this.sliderEl.current.offsetLeft,
|
|
401
|
+
y: offsetParentRect ? rect.top - offsetParentRect.top : this.sliderEl.current.offsetTop
|
|
400
402
|
};
|
|
401
403
|
return {
|
|
402
404
|
sliderX: offset.x,
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ColumnProps } from './interface';
|
|
3
3
|
export default class Column extends React.PureComponent<ColumnProps> {
|
|
4
4
|
static propTypes: {
|
|
5
|
-
align: import("prop-types").Requireable<"
|
|
5
|
+
align: import("prop-types").Requireable<"left" | "right" | "center">;
|
|
6
6
|
className: import("prop-types").Requireable<string>;
|
|
7
7
|
colSpan: import("prop-types").Requireable<number>;
|
|
8
8
|
dataIndex: import("prop-types").Requireable<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
declare const _default: {
|
|
3
|
-
align: PropTypes.Requireable<"
|
|
3
|
+
align: PropTypes.Requireable<"left" | "right" | "center">;
|
|
4
4
|
className: PropTypes.Requireable<string>;
|
|
5
5
|
colSpan: PropTypes.Requireable<number>;
|
|
6
6
|
dataIndex: PropTypes.Requireable<string>;
|
package/lib/cjs/table/Table.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
63
63
|
size: PropTypes.Requireable<"default" | "small" | "middle">;
|
|
64
64
|
tableLayout: PropTypes.Requireable<"" | "fixed" | "auto">;
|
|
65
65
|
columns: PropTypes.Requireable<PropTypes.InferProps<{
|
|
66
|
-
align: PropTypes.Requireable<"
|
|
66
|
+
align: PropTypes.Requireable<"left" | "right" | "center">;
|
|
67
67
|
className: PropTypes.Requireable<string>;
|
|
68
68
|
colSpan: PropTypes.Requireable<number>;
|
|
69
69
|
dataIndex: PropTypes.Requireable<string>;
|
|
@@ -308,7 +308,7 @@ declare class Table<RecordType extends Record<string, any>> extends BaseComponen
|
|
|
308
308
|
showSizeChanger?: boolean;
|
|
309
309
|
showQuickJumper?: boolean;
|
|
310
310
|
popoverZIndex?: number;
|
|
311
|
-
popoverPosition?: "left" | "
|
|
311
|
+
popoverPosition?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
312
312
|
hideOnSinglePage?: boolean;
|
|
313
313
|
hoverShowPageSelect?: boolean;
|
|
314
314
|
disabled?: boolean;
|
package/lib/cjs/table/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare class Table<RecordType extends Record<string, any> = Data> extends React
|
|
|
19
19
|
size: PropTypes.Requireable<"default" | "small" | "middle">;
|
|
20
20
|
tableLayout: PropTypes.Requireable<"" | "fixed" | "auto">;
|
|
21
21
|
columns: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
-
align: PropTypes.Requireable<"
|
|
22
|
+
align: PropTypes.Requireable<"left" | "right" | "center">;
|
|
23
23
|
className: PropTypes.Requireable<string>;
|
|
24
24
|
colSpan: PropTypes.Requireable<number>;
|
|
25
25
|
dataIndex: PropTypes.Requireable<string>;
|
package/lib/cjs/toast/index.js
CHANGED
|
@@ -185,6 +185,9 @@ const createBaseToast = () => {
|
|
|
185
185
|
ToastList.defaultOpts[pos] = opts[pos];
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
|
+
if (typeof opts.theme === 'string' && _constants.strings.themes.includes(opts.theme)) {
|
|
189
|
+
ToastList.defaultOpts.theme = opts.theme;
|
|
190
|
+
}
|
|
188
191
|
if (typeof opts.zIndex === 'number') {
|
|
189
192
|
ToastList.defaultOpts.zIndex = opts.zIndex;
|
|
190
193
|
}
|
|
@@ -91,7 +91,7 @@ export default class Tooltip extends BaseComponent<TooltipProps, TooltipState> {
|
|
|
91
91
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
92
92
|
motion: PropTypes.Requireable<boolean>;
|
|
93
93
|
autoAdjustOverflow: PropTypes.Requireable<boolean>;
|
|
94
|
-
position: PropTypes.Requireable<"left" | "
|
|
94
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
95
95
|
getPopupContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
96
96
|
mouseEnterDelay: PropTypes.Requireable<number>;
|
|
97
97
|
mouseLeaveDelay: PropTypes.Requireable<number>;
|
|
@@ -147,7 +147,9 @@ class Base extends _react.Component {
|
|
|
147
147
|
expandable,
|
|
148
148
|
expandText
|
|
149
149
|
} = this.getEllipsisOpt();
|
|
150
|
-
const
|
|
150
|
+
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
151
|
+
// If the css is truncated, use isOverflowed to judge. If the css is truncated, use isTruncated to judge.
|
|
152
|
+
const overflowed = !expanded && (canUseCSSEllipsis ? isOverflowed : isTruncated);
|
|
151
153
|
const noExpandText = !expandable && (0, _isUndefined2.default)(expandText);
|
|
152
154
|
const show = noExpandText && overflowed && showTooltip;
|
|
153
155
|
if (!show) {
|
|
@@ -429,11 +431,11 @@ class Base extends _react.Component {
|
|
|
429
431
|
copied: false,
|
|
430
432
|
// ellipsis
|
|
431
433
|
// if text is overflow in container
|
|
432
|
-
isOverflowed:
|
|
434
|
+
isOverflowed: false,
|
|
433
435
|
ellipsisContent: props.children,
|
|
434
436
|
expanded: false,
|
|
435
437
|
// if text is truncated with js
|
|
436
|
-
isTruncated:
|
|
438
|
+
isTruncated: false,
|
|
437
439
|
prevChildren: null
|
|
438
440
|
};
|
|
439
441
|
this.wrapperRef = /*#__PURE__*/_react.default.createRef();
|
|
@@ -454,7 +456,7 @@ class Base extends _react.Component {
|
|
|
454
456
|
newState.prevChildren = props.children;
|
|
455
457
|
if (props.ellipsis && prevChildren !== props.children) {
|
|
456
458
|
// reset ellipsis state if children update
|
|
457
|
-
newState.isOverflowed =
|
|
459
|
+
newState.isOverflowed = false;
|
|
458
460
|
newState.ellipsisContent = props.children;
|
|
459
461
|
newState.expanded = false;
|
|
460
462
|
newState.isTruncated = true;
|
|
@@ -6,9 +6,9 @@ import BaseComponent from '../_base/baseComponent';
|
|
|
6
6
|
import type { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError } from './interface';
|
|
7
7
|
import { Locale } from '../locale/interface';
|
|
8
8
|
import '@douyinfe/semi-foundation/lib/cjs/upload/upload.css';
|
|
9
|
-
import type { CustomFile, UploadAdapter, BeforeUploadObjectResult, AfterUploadResult } from '@douyinfe/semi-foundation/lib/cjs/upload/foundation';
|
|
9
|
+
import type { CustomFile, UploadAdapter, BeforeUploadObjectResult, AfterUploadResult, FileItemStatus } from '@douyinfe/semi-foundation/lib/cjs/upload/foundation';
|
|
10
10
|
import type { ValidateStatus } from '../_base/baseComponent';
|
|
11
|
-
export type { FileItem, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError, BeforeUploadObjectResult, AfterUploadResult, };
|
|
11
|
+
export type { FileItem, FileItemStatus, RenderFileItemProps, UploadListType, PromptPositionType, BeforeUploadProps, AfterUploadProps, OnChangeProps, customRequestArgs, CustomError, BeforeUploadObjectResult, AfterUploadResult, };
|
|
12
12
|
export interface UploadProps {
|
|
13
13
|
accept?: string;
|
|
14
14
|
action: string;
|
|
@@ -150,7 +150,7 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
150
150
|
style: PropTypes.Requireable<object>;
|
|
151
151
|
timeout: PropTypes.Requireable<number>;
|
|
152
152
|
transformFile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
153
|
-
uploadTrigger: PropTypes.Requireable<"
|
|
153
|
+
uploadTrigger: PropTypes.Requireable<"custom" | "auto">;
|
|
154
154
|
validateMessage: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
155
155
|
validateStatus: PropTypes.Requireable<"default" | "error" | "warning" | "success">;
|
|
156
156
|
withCredentials: PropTypes.Requireable<boolean>;
|
package/lib/es/anchor/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ declare class Anchor extends BaseComponent<AnchorProps, AnchorState> {
|
|
|
49
49
|
offsetTop: PropTypes.Requireable<number>;
|
|
50
50
|
targetOffset: PropTypes.Requireable<number>;
|
|
51
51
|
showTooltip: PropTypes.Requireable<boolean>;
|
|
52
|
-
position: PropTypes.Requireable<"left" | "
|
|
52
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver">;
|
|
53
53
|
maxWidth: PropTypes.Requireable<NonNullable<string | number>>;
|
|
54
54
|
maxHeight: PropTypes.Requireable<NonNullable<string | number>>;
|
|
55
55
|
getContainer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -116,7 +116,7 @@ declare class AutoComplete<T extends AutoCompleteItems> extends BaseComponent<Au
|
|
|
116
116
|
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
117
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
118
|
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
119
|
-
position: PropTypes.Requireable<"left" | "
|
|
119
|
+
position: PropTypes.Requireable<"left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver">;
|
|
120
120
|
placeholder: PropTypes.Requireable<string>;
|
|
121
121
|
prefix: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
122
122
|
onChangeWithObject: PropTypes.Requireable<boolean>;
|
|
@@ -54,7 +54,7 @@ export default class Button extends PureComponent<ButtonProps> {
|
|
|
54
54
|
onMouseDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
55
55
|
circle: PropTypes.Requireable<boolean>;
|
|
56
56
|
loading: PropTypes.Requireable<boolean>;
|
|
57
|
-
htmlType: PropTypes.Requireable<"button" | "
|
|
57
|
+
htmlType: PropTypes.Requireable<"button" | "reset" | "submit">;
|
|
58
58
|
theme: PropTypes.Requireable<"solid" | "light" | "borderless">;
|
|
59
59
|
className: PropTypes.Requireable<string>;
|
|
60
60
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
package/lib/es/button/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare class Button extends React.PureComponent<ButtonProps> {
|
|
|
29
29
|
onClick: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
30
30
|
onMouseDown: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
31
31
|
circle: import("prop-types").Requireable<boolean>;
|
|
32
|
-
htmlType: import("prop-types").Requireable<"button" | "
|
|
32
|
+
htmlType: import("prop-types").Requireable<"button" | "reset" | "submit">;
|
|
33
33
|
'aria-label': import("prop-types").Requireable<string>;
|
|
34
34
|
};
|
|
35
35
|
static elementType: string;
|
|
@@ -5,7 +5,7 @@ declare class CarouselIndicator extends React.PureComponent<CarouselIndicatorPro
|
|
|
5
5
|
static propTypes: {
|
|
6
6
|
activeKey: PropTypes.Requireable<number>;
|
|
7
7
|
className: PropTypes.Requireable<string>;
|
|
8
|
-
position: PropTypes.Requireable<"
|
|
8
|
+
position: PropTypes.Requireable<"left" | "right" | "center">;
|
|
9
9
|
size: PropTypes.Requireable<"small" | "medium">;
|
|
10
10
|
style: PropTypes.Requireable<object>;
|
|
11
11
|
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
@@ -19,7 +19,7 @@ declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
|
|
|
19
19
|
autoPlay: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
20
20
|
className: PropTypes.Requireable<string>;
|
|
21
21
|
defaultActiveIndex: PropTypes.Requireable<number>;
|
|
22
|
-
indicatorPosition: PropTypes.Requireable<"
|
|
22
|
+
indicatorPosition: PropTypes.Requireable<"left" | "right" | "center">;
|
|
23
23
|
indicatorSize: PropTypes.Requireable<"small" | "medium">;
|
|
24
24
|
indicatorType: PropTypes.Requireable<"line" | "dot" | "columnar">;
|
|
25
25
|
theme: PropTypes.Requireable<"dark" | "light" | "primary">;
|
|
@@ -59,6 +59,7 @@ export interface CascaderProps extends BasicCascaderProps {
|
|
|
59
59
|
onFocus?: (e: MouseEvent) => void;
|
|
60
60
|
validateStatus?: ValidateStatus;
|
|
61
61
|
position?: Position;
|
|
62
|
+
searchPosition?: string;
|
|
62
63
|
}
|
|
63
64
|
export interface CascaderState extends BasicCascaderInnerData {
|
|
64
65
|
keyEntities: Entities;
|
|
@@ -143,6 +144,7 @@ declare class Cascader extends BaseComponent<CascaderProps, CascaderState> {
|
|
|
143
144
|
enableLeafClick: PropTypes.Requireable<boolean>;
|
|
144
145
|
preventScroll: PropTypes.Requireable<boolean>;
|
|
145
146
|
position: PropTypes.Requireable<string>;
|
|
147
|
+
searchPosition: PropTypes.Requireable<string>;
|
|
146
148
|
};
|
|
147
149
|
static defaultProps: any;
|
|
148
150
|
options: any;
|
|
@@ -161,6 +163,7 @@ declare class Cascader extends BaseComponent<CascaderProps, CascaderState> {
|
|
|
161
163
|
componentDidMount(): void;
|
|
162
164
|
componentWillUnmount(): void;
|
|
163
165
|
componentDidUpdate(prevProps: CascaderProps): void;
|
|
166
|
+
search: (value: string) => void;
|
|
164
167
|
handleInputChange: (value: string) => void;
|
|
165
168
|
handleTagRemoveInTrigger: (pos: string) => void;
|
|
166
169
|
handleTagClose: (tagChildren: React.ReactNode, e: React.MouseEvent<HTMLElement>, tagKey: string | number) => void;
|
package/lib/es/cascader/index.js
CHANGED
|
@@ -31,6 +31,10 @@ const resetkey = 0;
|
|
|
31
31
|
class Cascader extends BaseComponent {
|
|
32
32
|
constructor(props) {
|
|
33
33
|
super(props);
|
|
34
|
+
// ref method
|
|
35
|
+
this.search = value => {
|
|
36
|
+
this.handleInputChange(value);
|
|
37
|
+
};
|
|
34
38
|
this.handleInputChange = value => {
|
|
35
39
|
this.foundation.handleInputChange(value);
|
|
36
40
|
};
|
|
@@ -217,12 +221,13 @@ class Cascader extends BaseComponent {
|
|
|
217
221
|
const {
|
|
218
222
|
placeholder,
|
|
219
223
|
filterTreeNode,
|
|
220
|
-
multiple
|
|
224
|
+
multiple,
|
|
225
|
+
searchPosition
|
|
221
226
|
} = this.props;
|
|
222
227
|
const {
|
|
223
228
|
checkedKeys
|
|
224
229
|
} = this.state;
|
|
225
|
-
const searchable = Boolean(filterTreeNode);
|
|
230
|
+
const searchable = Boolean(filterTreeNode) && searchPosition === strings.SEARCH_POSITION_TRIGGER;
|
|
226
231
|
if (!searchable) {
|
|
227
232
|
if (multiple) {
|
|
228
233
|
if (checkedKeys.size === 0) {
|
|
@@ -982,7 +987,8 @@ Cascader.propTypes = {
|
|
|
982
987
|
leafOnly: PropTypes.bool,
|
|
983
988
|
enableLeafClick: PropTypes.bool,
|
|
984
989
|
preventScroll: PropTypes.bool,
|
|
985
|
-
position: PropTypes.string
|
|
990
|
+
position: PropTypes.string,
|
|
991
|
+
searchPosition: PropTypes.string
|
|
986
992
|
};
|
|
987
993
|
Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponentName__, {
|
|
988
994
|
borderless: false,
|
|
@@ -1013,6 +1019,7 @@ Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponent
|
|
|
1013
1019
|
onDropdownVisibleChange: _noop,
|
|
1014
1020
|
onListScroll: _noop,
|
|
1015
1021
|
enableLeafClick: false,
|
|
1016
|
-
'aria-label': 'Cascader'
|
|
1022
|
+
'aria-label': 'Cascader',
|
|
1023
|
+
searchPosition: strings.SEARCH_POSITION_TRIGGER
|
|
1017
1024
|
});
|
|
1018
1025
|
export default Cascader;
|