@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
|
@@ -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/es/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/es/modal/modalFoundation").OKType;
|
|
172
|
-
|
|
173
|
-
width?: string | number;
|
|
174
|
-
zIndex?: number;
|
|
175
|
-
getPopupContainer?: () => HTMLElement;
|
|
176
|
-
closeOnEsc?: boolean;
|
|
177
|
-
size?: import("@douyinfe/semi-foundation/lib/es/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/es/modal/confirm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _omit from "lodash/omit";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ReactDOM from 'react-dom';
|
|
3
4
|
import { destroyFns } from './Modal';
|
|
@@ -82,8 +83,11 @@ export function withWarning(props) {
|
|
|
82
83
|
export function withError(props) {
|
|
83
84
|
return Object.assign({
|
|
84
85
|
type: 'error',
|
|
85
|
-
icon: /*#__PURE__*/React.createElement(IconAlertCircle, null)
|
|
86
|
-
|
|
86
|
+
icon: /*#__PURE__*/React.createElement(IconAlertCircle, null),
|
|
87
|
+
okButtonProps: Object.assign({
|
|
88
|
+
type: 'danger'
|
|
89
|
+
}, props.okButtonProps)
|
|
90
|
+
}, _omit(props, ['okButtonProps']));
|
|
87
91
|
}
|
|
88
92
|
export function withConfirm(props) {
|
|
89
93
|
return Object.assign({
|
|
@@ -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/es/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/es/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;
|
|
@@ -38,7 +38,6 @@ import BaseRow from './BaseRow';
|
|
|
38
38
|
import ExpandedRow from './ExpandedRow';
|
|
39
39
|
import SectionRow from './SectionRow';
|
|
40
40
|
import TableHeader from '../TableHeader';
|
|
41
|
-
import ConfigContext from '../../configProvider/context';
|
|
42
41
|
import TableContext from '../table-context';
|
|
43
42
|
|
|
44
43
|
class Body extends BaseComponent {
|
|
@@ -804,12 +803,10 @@ class Body extends BaseComponent {
|
|
|
804
803
|
const {
|
|
805
804
|
virtualized
|
|
806
805
|
} = this.props;
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
return virtualized ? this.renderVirtualizedBody(direction) : this.renderBody(direction);
|
|
812
|
-
});
|
|
806
|
+
const {
|
|
807
|
+
direction
|
|
808
|
+
} = this.context;
|
|
809
|
+
return virtualized ? this.renderVirtualizedBody(direction) : this.renderBody(direction);
|
|
813
810
|
}
|
|
814
811
|
|
|
815
812
|
}
|
package/lib/es/table/Table.js
CHANGED
|
@@ -269,8 +269,9 @@ class Table extends BaseComponent {
|
|
|
269
269
|
const node = this.bodyWrapRef.current;
|
|
270
270
|
|
|
271
271
|
if (node && node.children && node.children.length) {
|
|
272
|
-
const scrollToLeft = node.scrollLeft === 0;
|
|
273
|
-
|
|
272
|
+
const scrollToLeft = node.scrollLeft === 0; // why use Math.abs? @see https://bugzilla.mozilla.org/show_bug.cgi?id=1447743
|
|
273
|
+
|
|
274
|
+
const scrollToRight = Math.abs(node.scrollLeft) + 1 >= node.children[0].getBoundingClientRect().width - node.getBoundingClientRect().width;
|
|
274
275
|
|
|
275
276
|
if (scrollToLeft && scrollToRight) {
|
|
276
277
|
this.setScrollPosition('both');
|
|
@@ -1461,11 +1462,13 @@ class Table extends BaseComponent {
|
|
|
1461
1462
|
});
|
|
1462
1463
|
return /*#__PURE__*/React.createElement("div", {
|
|
1463
1464
|
ref: this.rootWrapRef,
|
|
1464
|
-
className: classnames(className, `${prefixCls}-wrapper`),
|
|
1465
|
+
className: classnames(className, `${prefixCls}-wrapper`, `${prefixCls}-wrapper-${props.direction}`),
|
|
1465
1466
|
"data-column-fixed": anyColumnFixed,
|
|
1466
1467
|
style: wrapStyle,
|
|
1467
1468
|
id: id
|
|
1468
|
-
}, /*#__PURE__*/React.createElement(TableContextProvider, Object.assign({}, tableContextValue
|
|
1469
|
+
}, /*#__PURE__*/React.createElement(TableContextProvider, Object.assign({}, tableContextValue, {
|
|
1470
|
+
direction: props.direction
|
|
1471
|
+
}), /*#__PURE__*/React.createElement(Spin, {
|
|
1469
1472
|
spinning: loading,
|
|
1470
1473
|
size: "large"
|
|
1471
1474
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -13,7 +13,7 @@ import classnames from 'classnames';
|
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
import { cssClasses, numbers } from '@douyinfe/semi-foundation/lib/es/table/constants';
|
|
15
15
|
import TableCellFoundation from '@douyinfe/semi-foundation/lib/es/table/cellFoundation';
|
|
16
|
-
import { isSelectionColumn, isExpandedColumn } from '@douyinfe/semi-foundation/lib/es/table/utils';
|
|
16
|
+
import { isSelectionColumn, isExpandedColumn, getRTLAlign } from '@douyinfe/semi-foundation/lib/es/table/utils';
|
|
17
17
|
import BaseComponent from '../_base/baseComponent';
|
|
18
18
|
import Context from './table-context';
|
|
19
19
|
import { amendTableWidth } from './utils';
|
|
@@ -121,13 +121,17 @@ export default class TableCell extends BaseComponent {
|
|
|
121
121
|
} = this.props;
|
|
122
122
|
let tdProps = {};
|
|
123
123
|
let customCellProps = {};
|
|
124
|
+
const {
|
|
125
|
+
direction
|
|
126
|
+
} = this.context;
|
|
127
|
+
const isRTL = direction === 'rtl';
|
|
124
128
|
const fixedLeftFlag = fixedLeft || typeof fixedLeft === 'number';
|
|
125
129
|
const fixedRightFlag = fixedRight || typeof fixedRight === 'number';
|
|
126
130
|
|
|
127
131
|
if (fixedLeftFlag) {
|
|
128
|
-
_set(tdProps, 'style.left', typeof fixedLeft === 'number' ? fixedLeft : 0);
|
|
132
|
+
_set(tdProps, isRTL ? 'style.right' : 'style.left', typeof fixedLeft === 'number' ? fixedLeft : 0);
|
|
129
133
|
} else if (fixedRightFlag) {
|
|
130
|
-
_set(tdProps, 'style.right', typeof fixedRight === 'number' ? fixedRight : 0);
|
|
134
|
+
_set(tdProps, isRTL ? 'style.left' : 'style.right', typeof fixedRight === 'number' ? fixedRight : 0);
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
if (width != null) {
|
|
@@ -147,8 +151,9 @@ export default class TableCell extends BaseComponent {
|
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
if (column.align) {
|
|
154
|
+
const textAlign = getRTLAlign(column.align, direction);
|
|
150
155
|
tdProps.style = Object.assign(Object.assign({}, tdProps.style), {
|
|
151
|
-
textAlign
|
|
156
|
+
textAlign
|
|
152
157
|
});
|
|
153
158
|
}
|
|
154
159
|
|
|
@@ -286,6 +291,10 @@ export default class TableCell extends BaseComponent {
|
|
|
286
291
|
firstFixedRight,
|
|
287
292
|
colIndex
|
|
288
293
|
} = this.props;
|
|
294
|
+
const {
|
|
295
|
+
direction
|
|
296
|
+
} = this.context;
|
|
297
|
+
const isRTL = direction === 'rtl';
|
|
289
298
|
const {
|
|
290
299
|
className
|
|
291
300
|
} = column;
|
|
@@ -316,11 +325,25 @@ export default class TableCell extends BaseComponent {
|
|
|
316
325
|
}
|
|
317
326
|
|
|
318
327
|
const inner = this.renderInner(text, indentText, realExpandIcon);
|
|
328
|
+
let isFixedLeft, isFixedLeftLast, isFixedRight, isFixedRightFirst;
|
|
329
|
+
|
|
330
|
+
if (isRTL) {
|
|
331
|
+
isFixedLeft = fixedRightFlag;
|
|
332
|
+
isFixedLeftLast = firstFixedRight;
|
|
333
|
+
isFixedRight = fixedLeftFlag;
|
|
334
|
+
isFixedRightFirst = lastFixedLeft;
|
|
335
|
+
} else {
|
|
336
|
+
isFixedLeft = fixedLeftFlag;
|
|
337
|
+
isFixedLeftLast = lastFixedLeft;
|
|
338
|
+
isFixedRight = fixedRightFlag;
|
|
339
|
+
isFixedRightFirst = firstFixedRight;
|
|
340
|
+
}
|
|
341
|
+
|
|
319
342
|
const columnCls = classnames(className, `${prefixCls}-row-cell`, _get(customCellProps, 'className'), {
|
|
320
|
-
[`${prefixCls}-cell-fixed-left`]:
|
|
321
|
-
[`${prefixCls}-cell-fixed-left-last`]:
|
|
322
|
-
[`${prefixCls}-cell-fixed-right`]:
|
|
323
|
-
[`${prefixCls}-cell-fixed-right-first`]:
|
|
343
|
+
[`${prefixCls}-cell-fixed-left`]: isFixedLeft,
|
|
344
|
+
[`${prefixCls}-cell-fixed-left-last`]: isFixedLeftLast,
|
|
345
|
+
[`${prefixCls}-cell-fixed-right`]: isFixedRight,
|
|
346
|
+
[`${prefixCls}-cell-fixed-right-first`]: isFixedRightFirst
|
|
324
347
|
});
|
|
325
348
|
return /*#__PURE__*/React.createElement(BodyCell, Object.assign({
|
|
326
349
|
role: "gridcell",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TableContextProps } from './table-context';
|
|
2
|
-
declare const TableContextProvider: ({ children, anyColumnFixed, flattenedColumns, tableWidth, headWidths, setHeadWidths, getHeadWidths, getCellWidths, handleRowExpanded, renderExpandIcon, renderSelection, getVirtualizedListRef, setBodyHasScrollbar, }: TableContextProps) => JSX.Element;
|
|
2
|
+
declare const TableContextProvider: ({ children, anyColumnFixed, flattenedColumns, tableWidth, headWidths, setHeadWidths, getHeadWidths, getCellWidths, handleRowExpanded, renderExpandIcon, renderSelection, getVirtualizedListRef, setBodyHasScrollbar, direction }: TableContextProps) => JSX.Element;
|
|
3
3
|
export default TableContextProvider;
|
|
@@ -15,7 +15,8 @@ const TableContextProvider = _ref => {
|
|
|
15
15
|
renderExpandIcon,
|
|
16
16
|
renderSelection,
|
|
17
17
|
getVirtualizedListRef,
|
|
18
|
-
setBodyHasScrollbar
|
|
18
|
+
setBodyHasScrollbar,
|
|
19
|
+
direction
|
|
19
20
|
} = _ref;
|
|
20
21
|
const tableContextValue = useMemo(() => ({
|
|
21
22
|
anyColumnFixed,
|
|
@@ -29,8 +30,9 @@ const TableContextProvider = _ref => {
|
|
|
29
30
|
tableWidth,
|
|
30
31
|
handleRowExpanded,
|
|
31
32
|
getVirtualizedListRef,
|
|
32
|
-
setBodyHasScrollbar
|
|
33
|
-
|
|
33
|
+
setBodyHasScrollbar,
|
|
34
|
+
direction
|
|
35
|
+
}), [anyColumnFixed, flattenedColumns, renderExpandIcon, renderSelection, setHeadWidths, getHeadWidths, getCellWidths, headWidths, tableWidth, handleRowExpanded, getVirtualizedListRef, setBodyHasScrollbar, direction]);
|
|
34
36
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
35
37
|
value: tableContextValue
|
|
36
38
|
}, children);
|
|
@@ -22,7 +22,7 @@ import React from 'react';
|
|
|
22
22
|
import classnames from 'classnames';
|
|
23
23
|
import PropTypes from 'prop-types';
|
|
24
24
|
import { cssClasses } from '@douyinfe/semi-foundation/lib/es/table/constants';
|
|
25
|
-
import { arrayAdd, isFirstFixedRight, isLastLeftFixed, isFixedLeft, isFixedRight, sliceColumnsByLevel } from '@douyinfe/semi-foundation/lib/es/table/utils';
|
|
25
|
+
import { arrayAdd, isFirstFixedRight, isLastLeftFixed, isFixedLeft, isFixedRight, sliceColumnsByLevel, getRTLAlign } from '@douyinfe/semi-foundation/lib/es/table/utils';
|
|
26
26
|
import BaseComponent from '../_base/baseComponent';
|
|
27
27
|
import TableContext from './table-context';
|
|
28
28
|
export default class TableHeaderRow extends BaseComponent {
|
|
@@ -81,8 +81,10 @@ export default class TableHeaderRow extends BaseComponent {
|
|
|
81
81
|
columns
|
|
82
82
|
} = this.props;
|
|
83
83
|
const {
|
|
84
|
-
getCellWidths
|
|
84
|
+
getCellWidths,
|
|
85
|
+
direction
|
|
85
86
|
} = this.context;
|
|
87
|
+
const isRTL = direction === 'rtl';
|
|
86
88
|
const slicedColumns = sliceColumnsByLevel(columns, index);
|
|
87
89
|
const headWidths = getCellWidths(slicedColumns);
|
|
88
90
|
|
|
@@ -104,20 +106,35 @@ export default class TableHeaderRow extends BaseComponent {
|
|
|
104
106
|
let cellStyle = Object.assign({}, customProps.style);
|
|
105
107
|
|
|
106
108
|
if (column.align) {
|
|
109
|
+
const textAlign = getRTLAlign(column.align, direction);
|
|
107
110
|
cellStyle = Object.assign(Object.assign({}, cellStyle), {
|
|
108
|
-
textAlign
|
|
111
|
+
textAlign
|
|
109
112
|
});
|
|
110
113
|
customProps.className = classnames(customProps.className, column.className, {
|
|
111
|
-
[`${prefixCls}-align-${
|
|
114
|
+
[`${prefixCls}-align-${textAlign}`]: Boolean(textAlign)
|
|
112
115
|
});
|
|
113
116
|
}
|
|
114
117
|
|
|
118
|
+
let fixedLeft, fixedRight, fixedLeftLast, fixedRightFirst;
|
|
119
|
+
|
|
120
|
+
if (isRTL) {
|
|
121
|
+
fixedLeft = isFixedRight(column);
|
|
122
|
+
fixedRight = isFixedLeft(column);
|
|
123
|
+
fixedLeftLast = isFirstFixedRight(slicedColumns, column);
|
|
124
|
+
fixedRightFirst = isLastLeftFixed(slicedColumns, column);
|
|
125
|
+
} else {
|
|
126
|
+
fixedLeft = isFixedLeft(column);
|
|
127
|
+
fixedRight = isFixedRight(column);
|
|
128
|
+
fixedLeftLast = isLastLeftFixed(slicedColumns, column);
|
|
129
|
+
fixedRightFirst = isFirstFixedRight(slicedColumns, column);
|
|
130
|
+
}
|
|
131
|
+
|
|
115
132
|
customProps.className = classnames(`${prefixCls}-row-head`, column.className, customProps.className, // `${prefixCls}-fixed-columns`,
|
|
116
133
|
{
|
|
117
|
-
[`${prefixCls}-cell-fixed-left`]:
|
|
118
|
-
[`${prefixCls}-cell-fixed-left-last`]:
|
|
119
|
-
[`${prefixCls}-cell-fixed-right`]:
|
|
120
|
-
[`${prefixCls}-cell-fixed-right-first`]:
|
|
134
|
+
[`${prefixCls}-cell-fixed-left`]: fixedLeft,
|
|
135
|
+
[`${prefixCls}-cell-fixed-left-last`]: fixedLeftLast,
|
|
136
|
+
[`${prefixCls}-cell-fixed-right`]: fixedRight,
|
|
137
|
+
[`${prefixCls}-cell-fixed-right-first`]: fixedRightFirst
|
|
121
138
|
});
|
|
122
139
|
|
|
123
140
|
if (headWidths.length && slicedColumns.length) {
|
|
@@ -125,14 +142,16 @@ export default class TableHeaderRow extends BaseComponent {
|
|
|
125
142
|
|
|
126
143
|
if (indexOfSlicedColumns > -1) {
|
|
127
144
|
if (isFixedLeft(column)) {
|
|
145
|
+
const xPositionKey = isRTL ? 'right' : 'left';
|
|
128
146
|
cellStyle = Object.assign(Object.assign({}, cellStyle), {
|
|
129
147
|
position: 'sticky',
|
|
130
|
-
|
|
148
|
+
[xPositionKey]: arrayAdd(headWidths, 0, indexOfSlicedColumns)
|
|
131
149
|
});
|
|
132
150
|
} else if (isFixedRight(column)) {
|
|
151
|
+
const xPositionKey = isRTL ? 'left' : 'right';
|
|
133
152
|
cellStyle = Object.assign(Object.assign({}, cellStyle), {
|
|
134
153
|
position: 'sticky',
|
|
135
|
-
|
|
154
|
+
[xPositionKey]: arrayAdd(headWidths, indexOfSlicedColumns + 1)
|
|
136
155
|
});
|
|
137
156
|
}
|
|
138
157
|
}
|