@douyinfe/semi-ui 2.45.3-alpha.0 → 2.45.3-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/umd/semi-ui.js +36 -30
- 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/buttonGroup.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/cascader/index.d.ts +2 -0
- package/lib/cjs/cascader/index.js +14 -0
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +2 -2
- package/lib/cjs/form/field.d.ts +2 -2
- package/lib/cjs/modal/confirm.d.ts +9 -9
- package/lib/cjs/popover/index.d.ts +1 -1
- package/lib/cjs/select/index.d.ts +1 -1
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/typography/base.d.ts +2 -1
- package/lib/cjs/typography/base.js +5 -16
- package/lib/cjs/typography/interface.d.ts +1 -2
- package/lib/cjs/typography/title.d.ts +1 -1
- 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/buttonGroup.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/cascader/index.d.ts +2 -0
- package/lib/es/cascader/index.js +14 -0
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +2 -2
- package/lib/es/form/field.d.ts +2 -2
- package/lib/es/modal/confirm.d.ts +9 -9
- package/lib/es/popover/index.d.ts +1 -1
- package/lib/es/select/index.d.ts +1 -1
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/typography/base.d.ts +2 -1
- package/lib/es/typography/base.js +5 -16
- package/lib/es/typography/interface.d.ts +1 -2
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +8 -8
|
@@ -148,18 +148,18 @@ export declare function withError(props: ModalReactProps): {
|
|
|
148
148
|
header?: React.ReactNode;
|
|
149
149
|
title?: React.ReactNode;
|
|
150
150
|
direction?: any;
|
|
151
|
+
motion?: boolean;
|
|
151
152
|
mask?: boolean;
|
|
152
153
|
visible?: boolean;
|
|
153
154
|
zIndex?: number;
|
|
154
155
|
size?: import("@douyinfe/semi-foundation/lib/es/modal/modalFoundation").Size;
|
|
155
|
-
|
|
156
|
+
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
156
157
|
width?: string | number;
|
|
157
158
|
height?: string | number;
|
|
158
159
|
content?: React.ReactNode;
|
|
159
|
-
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
160
|
-
onCancel?: (e: React.MouseEvent<Element, MouseEvent>) => void | Promise<any>;
|
|
161
160
|
closeOnEsc?: boolean;
|
|
162
161
|
preventScroll?: boolean;
|
|
162
|
+
icon: string | number | boolean | React.ReactFragment | JSX.Element;
|
|
163
163
|
afterClose?: () => void;
|
|
164
164
|
keepDOM?: boolean;
|
|
165
165
|
cancelText?: string;
|
|
@@ -205,6 +205,8 @@ export declare function withError(props: ModalReactProps): {
|
|
|
205
205
|
form?: string;
|
|
206
206
|
slot?: string;
|
|
207
207
|
title?: string;
|
|
208
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
209
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
208
210
|
prefix?: string;
|
|
209
211
|
dangerouslySetInnerHTML?: {
|
|
210
212
|
__html: string | TrustedHTML;
|
|
@@ -359,9 +361,7 @@ export declare function withError(props: ModalReactProps): {
|
|
|
359
361
|
onScrollCapture?: React.UIEventHandler<HTMLButtonElement>;
|
|
360
362
|
onWheel?: React.WheelEventHandler<HTMLButtonElement>;
|
|
361
363
|
onWheelCapture?: React.WheelEventHandler<HTMLButtonElement>;
|
|
362
|
-
onAnimationStart?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
363
364
|
onAnimationStartCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
364
|
-
onAnimationEnd?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
365
365
|
onAnimationEndCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
366
366
|
onAnimationIteration?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
367
367
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLButtonElement>;
|
|
@@ -376,7 +376,6 @@ export declare function withError(props: ModalReactProps): {
|
|
|
376
376
|
accessKey?: string;
|
|
377
377
|
autoFocus?: boolean;
|
|
378
378
|
name?: string;
|
|
379
|
-
content?: string;
|
|
380
379
|
formAction?: string;
|
|
381
380
|
formEncType?: string;
|
|
382
381
|
formMethod?: string;
|
|
@@ -389,9 +388,10 @@ export declare function withError(props: ModalReactProps): {
|
|
|
389
388
|
translate?: "no" | "yes";
|
|
390
389
|
role?: React.AriaRole;
|
|
391
390
|
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
392
|
-
inputMode?: "search" | "
|
|
391
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal";
|
|
393
392
|
nonce?: string;
|
|
394
393
|
tabIndex?: number;
|
|
394
|
+
content?: string;
|
|
395
395
|
'aria-expanded'?: boolean | "true" | "false";
|
|
396
396
|
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false";
|
|
397
397
|
'aria-controls'?: string;
|
|
@@ -422,13 +422,13 @@ export declare function withError(props: ModalReactProps): {
|
|
|
422
422
|
is?: string;
|
|
423
423
|
'aria-activedescendant'?: string;
|
|
424
424
|
'aria-atomic'?: boolean | "true" | "false";
|
|
425
|
-
'aria-autocomplete'?: "
|
|
425
|
+
'aria-autocomplete'?: "both" | "none" | "list" | "inline";
|
|
426
426
|
'aria-busy'?: boolean | "true" | "false";
|
|
427
427
|
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
428
428
|
'aria-colcount'?: number;
|
|
429
429
|
'aria-colindex'?: number;
|
|
430
430
|
'aria-colspan'?: number;
|
|
431
|
-
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "
|
|
431
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "date" | "location" | "page" | "step";
|
|
432
432
|
'aria-details'?: string;
|
|
433
433
|
'aria-disabled'?: boolean | "true" | "false";
|
|
434
434
|
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
@@ -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" | "right" | "top" | "
|
|
61
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottom" | "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/es/select/index.d.ts
CHANGED
|
@@ -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" | "right" | "top" | "
|
|
203
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottom" | "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/es/table/Table.d.ts
CHANGED
|
@@ -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" | "right" | "top" | "
|
|
311
|
+
popoverPosition?: "left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottom" | "bottomLeft" | "bottomRight" | "leftTopOver" | "rightTopOver" | "leftBottomOver" | "rightBottomOver";
|
|
312
312
|
hideOnSinglePage?: boolean;
|
|
313
313
|
hoverShowPageSelect?: boolean;
|
|
314
314
|
disabled?: boolean;
|
|
@@ -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" | "right" | "top" | "
|
|
94
|
+
position: PropTypes.Requireable<"left" | "right" | "top" | "topLeft" | "topRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | "bottom" | "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>;
|
|
@@ -132,6 +132,7 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
132
132
|
shouldTruncated: (rows: number) => boolean;
|
|
133
133
|
showTooltip: () => boolean | ShowTooltip | {
|
|
134
134
|
type: string;
|
|
135
|
+
opts: {};
|
|
135
136
|
};
|
|
136
137
|
getEllipsisState(): boolean;
|
|
137
138
|
/**
|
|
@@ -190,7 +191,7 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
190
191
|
renderCopy(): JSX.Element;
|
|
191
192
|
renderIcon(): JSX.Element;
|
|
192
193
|
renderContent(): JSX.Element;
|
|
193
|
-
renderTipWrapper():
|
|
194
|
+
renderTipWrapper(): JSX.Element;
|
|
194
195
|
render(): JSX.Element;
|
|
195
196
|
}
|
|
196
197
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _isFunction from "lodash/isFunction";
|
|
2
1
|
import _isNull from "lodash/isNull";
|
|
3
2
|
import _isString from "lodash/isString";
|
|
4
3
|
import _merge from "lodash/merge";
|
|
@@ -94,7 +93,6 @@ export default class Base extends Component {
|
|
|
94
93
|
return updateOverflow;
|
|
95
94
|
};
|
|
96
95
|
this.showTooltip = () => {
|
|
97
|
-
var _a, _b;
|
|
98
96
|
const {
|
|
99
97
|
isOverflowed,
|
|
100
98
|
isTruncated,
|
|
@@ -112,7 +110,8 @@ export default class Base extends Component {
|
|
|
112
110
|
return show;
|
|
113
111
|
}
|
|
114
112
|
const defaultOpts = {
|
|
115
|
-
type: 'tooltip'
|
|
113
|
+
type: 'tooltip',
|
|
114
|
+
opts: {}
|
|
116
115
|
};
|
|
117
116
|
if (typeof showTooltip === 'object') {
|
|
118
117
|
if (showTooltip.type && showTooltip.type.toLowerCase() === 'popover') {
|
|
@@ -121,14 +120,7 @@ export default class Base extends Component {
|
|
|
121
120
|
// style: { width: '240px' },
|
|
122
121
|
showArrow: true
|
|
123
122
|
}
|
|
124
|
-
}, showTooltip
|
|
125
|
-
opts: {
|
|
126
|
-
className: cls({
|
|
127
|
-
[`${prefixCls}-ellipsis-popover`]: true,
|
|
128
|
-
[(_a = showTooltip === null || showTooltip === void 0 ? void 0 : showTooltip.opts) === null || _a === void 0 ? void 0 : _a.className]: Boolean((_b = showTooltip === null || showTooltip === void 0 ? void 0 : showTooltip.opts) === null || _b === void 0 ? void 0 : _b.className)
|
|
129
|
-
})
|
|
130
|
-
}
|
|
131
|
-
});
|
|
123
|
+
}, showTooltip);
|
|
132
124
|
}
|
|
133
125
|
return Object.assign(Object.assign({}, defaultOpts), showTooltip);
|
|
134
126
|
}
|
|
@@ -530,12 +522,9 @@ export default class Base extends Component {
|
|
|
530
522
|
if (showTooltip) {
|
|
531
523
|
const {
|
|
532
524
|
type,
|
|
533
|
-
opts
|
|
534
|
-
renderTooltip
|
|
525
|
+
opts
|
|
535
526
|
} = showTooltip;
|
|
536
|
-
if (
|
|
537
|
-
return renderTooltip(children, content);
|
|
538
|
-
} else if (type.toLowerCase() === 'popover') {
|
|
527
|
+
if (type.toLowerCase() === 'popover') {
|
|
539
528
|
return /*#__PURE__*/React.createElement(Popover, Object.assign({
|
|
540
529
|
content: children,
|
|
541
530
|
position: "top"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { PopoverProps } from '../popover';
|
|
3
3
|
import { TooltipProps } from '../tooltip';
|
|
4
4
|
import { ArrayElement } from '../_base/base';
|
|
@@ -7,7 +7,6 @@ export type EllipsisPos = 'end' | 'middle';
|
|
|
7
7
|
export type ShowTooltip = {
|
|
8
8
|
type?: string;
|
|
9
9
|
opts?: Partial<PopoverProps> & Partial<TooltipProps>;
|
|
10
|
-
renderTooltip?: (content: TooltipProps['content'], children: ReactNode) => ReactNode;
|
|
11
10
|
};
|
|
12
11
|
export type Ellipsis = {
|
|
13
12
|
collapseText?: string;
|
|
@@ -64,7 +64,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
64
64
|
style: PropTypes.Requireable<object>;
|
|
65
65
|
className: PropTypes.Requireable<string>;
|
|
66
66
|
component: PropTypes.Requireable<string>;
|
|
67
|
-
weight: PropTypes.Requireable<NonNullable<number | "default" | "bold" | "
|
|
67
|
+
weight: PropTypes.Requireable<NonNullable<number | "default" | "bold" | "light" | "regular" | "medium" | "semibold">>;
|
|
68
68
|
};
|
|
69
69
|
static defaultProps: {
|
|
70
70
|
copyable: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.45.3-alpha.
|
|
3
|
+
"version": "2.45.3-alpha.1",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.45.3-alpha.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.45.3-alpha.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.45.3-alpha.
|
|
26
|
-
"@douyinfe/semi-icons": "2.45.3-alpha.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.45.3-alpha.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.45.3-alpha.
|
|
23
|
+
"@douyinfe/semi-animation": "2.45.3-alpha.1",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.45.3-alpha.1",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.45.3-alpha.1",
|
|
26
|
+
"@douyinfe/semi-icons": "2.45.3-alpha.1",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.45.3-alpha.1",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.45.3-alpha.1",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "b8f3f83731e2b875db1796ff906d01c3cab8c7c9",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|