@douyinfe/semi-ui 2.52.3 → 2.53.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/umd/semi-ui.js +804 -273
- 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/_utils/index.d.ts +2 -0
- package/lib/cjs/_utils/index.js +77 -0
- package/lib/cjs/_utils/semi-global.d.ts +46 -0
- package/lib/cjs/_utils/semi-global.js +13 -0
- package/lib/cjs/autoComplete/index.d.ts +2 -25
- package/lib/cjs/autoComplete/index.js +4 -2
- package/lib/cjs/avatar/index.d.ts +2 -10
- package/lib/cjs/avatar/index.js +4 -2
- package/lib/cjs/backtop/index.d.ts +2 -5
- package/lib/cjs/backtop/index.js +4 -2
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +3 -1
- package/lib/cjs/button/index.js +3 -0
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/cascader/index.d.ts +2 -31
- package/lib/cjs/cascader/index.js +3 -2
- package/lib/cjs/collapse/index.d.ts +2 -7
- package/lib/cjs/collapse/index.js +4 -2
- package/lib/cjs/collapsible/index.d.ts +3 -9
- package/lib/cjs/collapsible/index.js +4 -2
- package/lib/cjs/configProvider/index.d.ts +2 -1
- package/lib/cjs/configProvider/index.js +5 -2
- package/lib/cjs/datePicker/datePicker.d.ts +2 -44
- package/lib/cjs/datePicker/datePicker.js +4 -2
- package/lib/cjs/dropdown/index.d.ts +2 -12
- package/lib/cjs/dropdown/index.js +4 -2
- package/lib/cjs/form/arrayField.js +3 -3
- package/lib/cjs/modal/Modal.d.ts +2 -20
- package/lib/cjs/modal/Modal.js +3 -2
- package/lib/cjs/modal/confirm.d.ts +14 -14
- package/lib/cjs/navigation/index.d.ts +2 -15
- package/lib/cjs/navigation/index.js +4 -2
- package/lib/cjs/notification/notice.d.ts +2 -12
- package/lib/cjs/notification/notice.js +3 -2
- package/lib/cjs/overflowList/index.d.ts +2 -9
- package/lib/cjs/overflowList/index.js +3 -2
- package/lib/cjs/popconfirm/index.d.ts +2 -15
- package/lib/cjs/popconfirm/index.js +4 -2
- package/lib/cjs/popover/index.d.ts +2 -23
- package/lib/cjs/popover/index.js +4 -2
- package/lib/cjs/resizeObserver/index.d.ts +14 -1
- package/lib/cjs/resizeObserver/index.js +66 -31
- package/lib/cjs/select/index.d.ts +1 -0
- package/lib/cjs/select/index.js +3 -2
- package/lib/cjs/sideSheet/index.d.ts +1 -0
- package/lib/cjs/sideSheet/index.js +20 -18
- package/lib/cjs/tabs/index.d.ts +1 -0
- package/lib/cjs/tabs/index.js +4 -2
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/cjs/timePicker/index.d.ts +2 -34
- package/lib/cjs/timePicker/index.js +3 -1
- package/lib/cjs/toast/toast.d.ts +2 -11
- package/lib/cjs/toast/toast.js +3 -2
- package/lib/cjs/tooltip/index.d.ts +2 -32
- package/lib/cjs/tooltip/index.js +3 -2
- package/lib/cjs/typography/base.d.ts +7 -4
- package/lib/cjs/typography/base.js +127 -64
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/paragraph.d.ts +1 -1
- package/lib/cjs/typography/text.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/_utils/index.d.ts +2 -0
- package/lib/es/_utils/index.js +75 -0
- package/lib/es/_utils/semi-global.d.ts +46 -0
- package/lib/es/_utils/semi-global.js +6 -0
- package/lib/es/autoComplete/index.d.ts +2 -25
- package/lib/es/autoComplete/index.js +4 -2
- package/lib/es/avatar/index.d.ts +2 -10
- package/lib/es/avatar/index.js +4 -2
- package/lib/es/backtop/index.d.ts +2 -5
- package/lib/es/backtop/index.js +4 -2
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/index.d.ts +3 -1
- package/lib/es/button/index.js +3 -0
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/cascader/index.d.ts +2 -31
- package/lib/es/cascader/index.js +4 -3
- package/lib/es/collapse/index.d.ts +2 -7
- package/lib/es/collapse/index.js +4 -2
- package/lib/es/collapsible/index.d.ts +3 -9
- package/lib/es/collapsible/index.js +4 -2
- package/lib/es/configProvider/index.d.ts +2 -1
- package/lib/es/configProvider/index.js +5 -2
- package/lib/es/datePicker/datePicker.d.ts +2 -44
- package/lib/es/datePicker/datePicker.js +4 -2
- package/lib/es/dropdown/index.d.ts +2 -12
- package/lib/es/dropdown/index.js +4 -2
- package/lib/es/form/arrayField.js +3 -3
- package/lib/es/modal/Modal.d.ts +2 -20
- package/lib/es/modal/Modal.js +4 -3
- package/lib/es/modal/confirm.d.ts +14 -14
- package/lib/es/navigation/index.d.ts +2 -15
- package/lib/es/navigation/index.js +4 -2
- package/lib/es/notification/notice.d.ts +2 -12
- package/lib/es/notification/notice.js +4 -3
- package/lib/es/overflowList/index.d.ts +2 -9
- package/lib/es/overflowList/index.js +4 -3
- package/lib/es/popconfirm/index.d.ts +2 -15
- package/lib/es/popconfirm/index.js +4 -2
- package/lib/es/popover/index.d.ts +2 -23
- package/lib/es/popover/index.js +4 -2
- package/lib/es/resizeObserver/index.d.ts +14 -1
- package/lib/es/resizeObserver/index.js +64 -30
- package/lib/es/select/index.d.ts +1 -0
- package/lib/es/select/index.js +4 -3
- package/lib/es/sideSheet/index.d.ts +1 -0
- package/lib/es/sideSheet/index.js +21 -19
- package/lib/es/tabs/index.d.ts +1 -0
- package/lib/es/tabs/index.js +4 -2
- package/lib/es/tagInput/index.d.ts +1 -1
- package/lib/es/timePicker/index.d.ts +2 -34
- package/lib/es/timePicker/index.js +3 -1
- package/lib/es/toast/toast.d.ts +2 -11
- package/lib/es/toast/toast.js +4 -3
- package/lib/es/tooltip/index.d.ts +2 -32
- package/lib/es/tooltip/index.js +4 -3
- package/lib/es/typography/base.d.ts +7 -4
- package/lib/es/typography/base.js +128 -65
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +9 -8
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Ellipsis, ShowTooltip, TypographyBaseSize, TypographyBaseType } from './interface';
|
|
3
|
+
import type { Ellipsis, ShowTooltip, TypographyBaseSize, TypographyBaseType } from './interface';
|
|
4
4
|
import { CopyableConfig, LinkType } from './title';
|
|
5
5
|
import { BaseProps } from '../_base/baseComponent';
|
|
6
|
+
import { ResizeEntry } from '../resizeObserver';
|
|
6
7
|
export interface BaseTypographyProps extends BaseProps {
|
|
7
8
|
copyable?: CopyableConfig | boolean;
|
|
8
9
|
delete?: boolean;
|
|
@@ -85,7 +86,7 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
85
86
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
86
87
|
strong: PropTypes.Requireable<boolean>;
|
|
87
88
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
88
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
89
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "danger" | "tertiary" | "quaternary">;
|
|
89
90
|
style: PropTypes.Requireable<object>;
|
|
90
91
|
className: PropTypes.Requireable<string>;
|
|
91
92
|
icon: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
@@ -115,12 +116,13 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
115
116
|
rafId: ReturnType<typeof requestAnimationFrame>;
|
|
116
117
|
expandStr: string;
|
|
117
118
|
collapseStr: string;
|
|
119
|
+
observerTakingEffect: boolean;
|
|
118
120
|
constructor(props: BaseTypographyProps);
|
|
119
121
|
componentDidMount(): void;
|
|
120
122
|
static getDerivedStateFromProps(props: BaseTypographyProps, prevState: BaseTypographyState): Partial<BaseTypographyState>;
|
|
121
123
|
componentDidUpdate(prevProps: BaseTypographyProps): void;
|
|
122
124
|
componentWillUnmount(): void;
|
|
123
|
-
onResize: () => void
|
|
125
|
+
onResize: (entries?: ResizeEntry[]) => Promise<void>;
|
|
124
126
|
canUseCSSEllipsis: () => boolean;
|
|
125
127
|
/**
|
|
126
128
|
* whether truncated
|
|
@@ -133,7 +135,8 @@ export default class Base extends Component<BaseTypographyProps, BaseTypographyS
|
|
|
133
135
|
showTooltip: () => boolean | ShowTooltip | {
|
|
134
136
|
type: string;
|
|
135
137
|
};
|
|
136
|
-
|
|
138
|
+
onHover: () => any;
|
|
139
|
+
getEllipsisState: () => Promise<void>;
|
|
137
140
|
/**
|
|
138
141
|
* Triggered when the fold button is clicked to save the latest expanded state
|
|
139
142
|
* @param {Event} e
|
|
@@ -4,6 +4,33 @@ import _isString from "lodash/isString";
|
|
|
4
4
|
import _merge from "lodash/merge";
|
|
5
5
|
import _omit from "lodash/omit";
|
|
6
6
|
import _isUndefined from "lodash/isUndefined";
|
|
7
|
+
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) {
|
|
9
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
10
|
+
resolve(value);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) {
|
|
15
|
+
try {
|
|
16
|
+
step(generator.next(value));
|
|
17
|
+
} catch (e) {
|
|
18
|
+
reject(e);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function rejected(value) {
|
|
22
|
+
try {
|
|
23
|
+
step(generator["throw"](value));
|
|
24
|
+
} catch (e) {
|
|
25
|
+
reject(e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function step(result) {
|
|
29
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
30
|
+
}
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
7
34
|
var __rest = this && this.__rest || function (s, e) {
|
|
8
35
|
var t = {};
|
|
9
36
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -24,8 +51,8 @@ import getRenderText from './util';
|
|
|
24
51
|
import warning from '@douyinfe/semi-foundation/lib/es/utils/warning';
|
|
25
52
|
import isEnterPress from '@douyinfe/semi-foundation/lib/es/utils/isEnterPress';
|
|
26
53
|
import LocaleConsumer from '../locale/localeConsumer';
|
|
27
|
-
import { isSemiIcon } from '../_utils';
|
|
28
|
-
import ResizeObserver from '../resizeObserver';
|
|
54
|
+
import { isSemiIcon, runAfterTicks } from '../_utils';
|
|
55
|
+
import ResizeObserver, { ObserverProperty } from '../resizeObserver';
|
|
29
56
|
const prefixCls = cssClasses.PREFIX;
|
|
30
57
|
const ELLIPSIS_STR = '...';
|
|
31
58
|
const wrapperDecorations = (props, content) => {
|
|
@@ -59,12 +86,18 @@ const wrapperDecorations = (props, content) => {
|
|
|
59
86
|
export default class Base extends Component {
|
|
60
87
|
constructor(props) {
|
|
61
88
|
super(props);
|
|
62
|
-
this.
|
|
89
|
+
this.observerTakingEffect = false;
|
|
90
|
+
this.onResize = entries => __awaiter(this, void 0, void 0, function* () {
|
|
63
91
|
if (this.rafId) {
|
|
64
92
|
window.cancelAnimationFrame(this.rafId);
|
|
65
93
|
}
|
|
66
|
-
|
|
67
|
-
|
|
94
|
+
return new Promise(resolve => {
|
|
95
|
+
this.rafId = window.requestAnimationFrame(() => __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
yield this.getEllipsisState();
|
|
97
|
+
resolve();
|
|
98
|
+
}));
|
|
99
|
+
});
|
|
100
|
+
});
|
|
68
101
|
// if it needs to use js overflowed:
|
|
69
102
|
// 1. text is expandable 2. expandText need to be shown 3. has extra operation 4. text need to ellipse from mid
|
|
70
103
|
this.canUseCSSEllipsis = () => {
|
|
@@ -134,6 +167,80 @@ export default class Base extends Component {
|
|
|
134
167
|
}
|
|
135
168
|
return defaultOpts;
|
|
136
169
|
};
|
|
170
|
+
this.onHover = () => {
|
|
171
|
+
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
172
|
+
if (canUseCSSEllipsis) {
|
|
173
|
+
const {
|
|
174
|
+
rows,
|
|
175
|
+
suffix,
|
|
176
|
+
pos
|
|
177
|
+
} = this.getEllipsisOpt();
|
|
178
|
+
const updateOverflow = this.shouldTruncated(rows);
|
|
179
|
+
// isOverflowed needs to be updated to show tooltip when using css ellipsis
|
|
180
|
+
this.setState({
|
|
181
|
+
isOverflowed: updateOverflow,
|
|
182
|
+
isTruncated: false
|
|
183
|
+
});
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
this.getEllipsisState = () => __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
const {
|
|
189
|
+
rows,
|
|
190
|
+
suffix,
|
|
191
|
+
pos
|
|
192
|
+
} = this.getEllipsisOpt();
|
|
193
|
+
const {
|
|
194
|
+
children
|
|
195
|
+
} = this.props;
|
|
196
|
+
// wait until element mounted
|
|
197
|
+
if (!this.wrapperRef || !this.wrapperRef.current) {
|
|
198
|
+
yield this.onResize();
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const {
|
|
202
|
+
expanded
|
|
203
|
+
} = this.state;
|
|
204
|
+
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
205
|
+
if (canUseCSSEllipsis) {
|
|
206
|
+
// const updateOverflow = this.shouldTruncated(rows);
|
|
207
|
+
// // isOverflowed needs to be updated to show tooltip when using css ellipsis
|
|
208
|
+
// this.setState({
|
|
209
|
+
// isOverflowed: updateOverflow,
|
|
210
|
+
// isTruncated: false
|
|
211
|
+
// });
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
// If children is null, css/js truncated flag isTruncate is false
|
|
215
|
+
if (_isNull(children)) {
|
|
216
|
+
return new Promise(resolve => {
|
|
217
|
+
this.setState({
|
|
218
|
+
isTruncated: false,
|
|
219
|
+
isOverflowed: false
|
|
220
|
+
}, resolve);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
// Currently only text truncation is supported, if there is non-text,
|
|
224
|
+
// both css truncation and js truncation should throw a warning
|
|
225
|
+
warning('children' in this.props && typeof children !== 'string', "[Semi Typography] Only children with pure text could be used with ellipsis at this moment.");
|
|
226
|
+
if (!rows || rows < 0 || expanded) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const extraNode = {
|
|
230
|
+
expand: this.expandRef.current,
|
|
231
|
+
copy: this.copyRef && this.copyRef.current
|
|
232
|
+
};
|
|
233
|
+
const content = getRenderText(this.wrapperRef.current, rows,
|
|
234
|
+
// Perform type conversion on children to prevent component crash due to non-string type of children
|
|
235
|
+
String(children), extraNode, ELLIPSIS_STR, suffix, pos);
|
|
236
|
+
return new Promise(resolve => {
|
|
237
|
+
this.setState({
|
|
238
|
+
isOverflowed: false,
|
|
239
|
+
ellipsisContent: content,
|
|
240
|
+
isTruncated: children !== content
|
|
241
|
+
}, resolve);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
137
244
|
/**
|
|
138
245
|
* Triggered when the fold button is clicked to save the latest expanded state
|
|
139
246
|
* @param {Event} e
|
|
@@ -300,9 +407,13 @@ export default class Base extends Component {
|
|
|
300
407
|
ellipsisContent
|
|
301
408
|
} = this.state;
|
|
302
409
|
if (expanded || !isTruncated) {
|
|
303
|
-
return /*#__PURE__*/React.createElement(
|
|
410
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
411
|
+
onMouseEnter: this.onHover
|
|
412
|
+
}, children, suffix && suffix.length ? suffix : null);
|
|
304
413
|
}
|
|
305
|
-
return /*#__PURE__*/React.createElement("span",
|
|
414
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
415
|
+
onMouseEnter: this.onHover
|
|
416
|
+
}, ellipsisContent, suffix);
|
|
306
417
|
};
|
|
307
418
|
this.state = {
|
|
308
419
|
editable: false,
|
|
@@ -322,7 +433,8 @@ export default class Base extends Component {
|
|
|
322
433
|
}
|
|
323
434
|
componentDidMount() {
|
|
324
435
|
if (this.props.ellipsis) {
|
|
325
|
-
|
|
436
|
+
// runAfterTicks: make sure start observer on the next tick
|
|
437
|
+
this.onResize().then(() => runAfterTicks(() => this.observerTakingEffect = true, 1));
|
|
326
438
|
}
|
|
327
439
|
}
|
|
328
440
|
static getDerivedStateFromProps(props, prevState) {
|
|
@@ -354,61 +466,6 @@ export default class Base extends Component {
|
|
|
354
466
|
window.cancelAnimationFrame(this.rafId);
|
|
355
467
|
}
|
|
356
468
|
}
|
|
357
|
-
getEllipsisState() {
|
|
358
|
-
const {
|
|
359
|
-
rows,
|
|
360
|
-
suffix,
|
|
361
|
-
pos
|
|
362
|
-
} = this.getEllipsisOpt();
|
|
363
|
-
const {
|
|
364
|
-
children
|
|
365
|
-
} = this.props;
|
|
366
|
-
// wait until element mounted
|
|
367
|
-
if (!this.wrapperRef || !this.wrapperRef.current) {
|
|
368
|
-
this.onResize();
|
|
369
|
-
return false;
|
|
370
|
-
}
|
|
371
|
-
const {
|
|
372
|
-
expanded
|
|
373
|
-
} = this.state;
|
|
374
|
-
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
375
|
-
// If children is null, css/js truncated flag isTruncate is false
|
|
376
|
-
if (_isNull(children)) {
|
|
377
|
-
this.setState({
|
|
378
|
-
isTruncated: false,
|
|
379
|
-
isOverflowed: false
|
|
380
|
-
});
|
|
381
|
-
return undefined;
|
|
382
|
-
}
|
|
383
|
-
// Currently only text truncation is supported, if there is non-text,
|
|
384
|
-
// both css truncation and js truncation should throw a warning
|
|
385
|
-
warning('children' in this.props && typeof children !== 'string', "[Semi Typography] Only children with pure text could be used with ellipsis at this moment.");
|
|
386
|
-
if (!rows || rows < 0 || expanded) {
|
|
387
|
-
return undefined;
|
|
388
|
-
}
|
|
389
|
-
if (canUseCSSEllipsis) {
|
|
390
|
-
const updateOverflow = this.shouldTruncated(rows);
|
|
391
|
-
// isOverflowed needs to be updated to show tooltip when using css ellipsis
|
|
392
|
-
this.setState({
|
|
393
|
-
isOverflowed: updateOverflow,
|
|
394
|
-
isTruncated: false
|
|
395
|
-
});
|
|
396
|
-
return undefined;
|
|
397
|
-
}
|
|
398
|
-
const extraNode = {
|
|
399
|
-
expand: this.expandRef.current,
|
|
400
|
-
copy: this.copyRef && this.copyRef.current
|
|
401
|
-
};
|
|
402
|
-
const content = getRenderText(this.wrapperRef.current, rows,
|
|
403
|
-
// Perform type conversion on children to prevent component crash due to non-string type of children
|
|
404
|
-
String(children), extraNode, ELLIPSIS_STR, suffix, pos);
|
|
405
|
-
this.setState({
|
|
406
|
-
isOverflowed: false,
|
|
407
|
-
ellipsisContent: content,
|
|
408
|
-
isTruncated: children !== content
|
|
409
|
-
});
|
|
410
|
-
return undefined;
|
|
411
|
-
}
|
|
412
469
|
renderOperations() {
|
|
413
470
|
return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderExpandable(), this.renderCopy());
|
|
414
471
|
}
|
|
@@ -550,6 +607,7 @@ export default class Base extends Component {
|
|
|
550
607
|
}
|
|
551
608
|
}
|
|
552
609
|
render() {
|
|
610
|
+
var _this = this;
|
|
553
611
|
const content = /*#__PURE__*/React.createElement(LocaleConsumer, {
|
|
554
612
|
componentName: "Typography"
|
|
555
613
|
}, locale => {
|
|
@@ -559,8 +617,13 @@ export default class Base extends Component {
|
|
|
559
617
|
});
|
|
560
618
|
if (this.props.ellipsis) {
|
|
561
619
|
return /*#__PURE__*/React.createElement(ResizeObserver, {
|
|
562
|
-
onResize:
|
|
563
|
-
|
|
620
|
+
onResize: function () {
|
|
621
|
+
if (_this.observerTakingEffect) {
|
|
622
|
+
_this.onResize(...arguments);
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
observeParent: true,
|
|
626
|
+
observerProperty: ObserverProperty.Width
|
|
564
627
|
}, content);
|
|
565
628
|
}
|
|
566
629
|
return content;
|
|
@@ -38,7 +38,7 @@ export default class Numeral extends PureComponent<NumeralProps> {
|
|
|
38
38
|
underline: PropTypes.Requireable<boolean>;
|
|
39
39
|
link: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
40
40
|
strong: PropTypes.Requireable<boolean>;
|
|
41
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
41
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "danger" | "tertiary" | "quaternary">;
|
|
42
42
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
43
43
|
style: PropTypes.Requireable<object>;
|
|
44
44
|
className: PropTypes.Requireable<string>;
|
|
@@ -50,7 +50,7 @@ export default class Paragraph extends PureComponent<ParagraphProps> {
|
|
|
50
50
|
link: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
51
51
|
underline: PropTypes.Requireable<boolean>;
|
|
52
52
|
strong: PropTypes.Requireable<boolean>;
|
|
53
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
53
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "danger" | "tertiary" | "quaternary">;
|
|
54
54
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
55
55
|
spacing: PropTypes.Requireable<"normal" | "extended">;
|
|
56
56
|
style: PropTypes.Requireable<object>;
|
|
@@ -53,7 +53,7 @@ export default class Text extends PureComponent<TextProps> {
|
|
|
53
53
|
underline: PropTypes.Requireable<boolean>;
|
|
54
54
|
link: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
55
55
|
strong: PropTypes.Requireable<boolean>;
|
|
56
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
56
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "danger" | "tertiary" | "quaternary">;
|
|
57
57
|
size: PropTypes.Requireable<"small" | "normal">;
|
|
58
58
|
style: PropTypes.Requireable<object>;
|
|
59
59
|
className: PropTypes.Requireable<string>;
|
|
@@ -59,7 +59,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
59
59
|
link: PropTypes.Requireable<NonNullable<boolean | object>>;
|
|
60
60
|
underline: PropTypes.Requireable<boolean>;
|
|
61
61
|
strong: PropTypes.Requireable<boolean>;
|
|
62
|
-
type: PropTypes.Requireable<"warning" | "success" | "primary" | "
|
|
62
|
+
type: PropTypes.Requireable<"warning" | "success" | "primary" | "secondary" | "danger" | "tertiary" | "quaternary">;
|
|
63
63
|
heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 5 | 6>;
|
|
64
64
|
style: PropTypes.Requireable<object>;
|
|
65
65
|
className: PropTypes.Requireable<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.0",
|
|
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,17 +20,18 @@
|
|
|
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.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.
|
|
26
|
-
"@douyinfe/semi-icons": "2.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.
|
|
23
|
+
"@douyinfe/semi-animation": "2.53.0",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.53.0",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.53.0",
|
|
26
|
+
"@douyinfe/semi-icons": "2.53.0",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.53.0",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.53.0",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
32
32
|
"date-fns": "^2.29.3",
|
|
33
33
|
"date-fns-tz": "^1.3.8",
|
|
34
|
+
"fast-copy": "^3.0.1 ",
|
|
34
35
|
"lodash": "^4.17.21",
|
|
35
36
|
"prop-types": "^15.7.2",
|
|
36
37
|
"react-resizable": "^3.0.5",
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
],
|
|
75
76
|
"author": "",
|
|
76
77
|
"license": "MIT",
|
|
77
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "fee0675e56fb72e6ff06083c36d8c5564ca26eef",
|
|
78
79
|
"devDependencies": {
|
|
79
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
80
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|