@douyinfe/semi-ui 2.37.0-beta.0 → 2.37.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 +1 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +25 -6
- 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/cascader/index.js +1 -1
- package/lib/cjs/image/preview.js +4 -2
- package/lib/cjs/input/index.d.ts +1 -0
- package/lib/cjs/input/index.js +15 -1
- package/lib/cjs/pagination/index.js +1 -1
- package/lib/cjs/treeSelect/index.js +3 -1
- package/lib/es/cascader/index.js +1 -1
- package/lib/es/image/preview.js +4 -2
- package/lib/es/input/index.d.ts +1 -0
- package/lib/es/input/index.js +15 -1
- package/lib/es/pagination/index.js +1 -1
- package/lib/es/treeSelect/index.js +3 -1
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -27724,6 +27724,21 @@ class Input extends BaseComponent {
|
|
|
27724
27724
|
this.handleModeChange(mode);
|
|
27725
27725
|
}
|
|
27726
27726
|
}
|
|
27727
|
+
componentDidMount() {
|
|
27728
|
+
// autofocus is changed from the original support of input to the support of manually calling the focus method,
|
|
27729
|
+
// so that preventScroll can still take effect under the setting of autofocus
|
|
27730
|
+
this.foundation.init();
|
|
27731
|
+
const {
|
|
27732
|
+
disabled,
|
|
27733
|
+
autofocus,
|
|
27734
|
+
preventScroll
|
|
27735
|
+
} = this.props;
|
|
27736
|
+
if (!disabled && autofocus) {
|
|
27737
|
+
this.inputRef.current.focus({
|
|
27738
|
+
preventScroll
|
|
27739
|
+
});
|
|
27740
|
+
}
|
|
27741
|
+
}
|
|
27727
27742
|
renderPrepend() {
|
|
27728
27743
|
const {
|
|
27729
27744
|
addonBefore
|
|
@@ -27948,7 +27963,6 @@ class Input extends BaseComponent {
|
|
|
27948
27963
|
const inputValue = value === null || value === undefined ? '' : value;
|
|
27949
27964
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
27950
27965
|
style: inputStyle,
|
|
27951
|
-
autoFocus: autofocus,
|
|
27952
27966
|
className: inputCls,
|
|
27953
27967
|
disabled,
|
|
27954
27968
|
readOnly: readonly,
|
|
@@ -43286,7 +43300,7 @@ class Cascader extends BaseComponent {
|
|
|
43286
43300
|
const renderPlusNChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
43287
43301
|
className: plusNCls
|
|
43288
43302
|
}, "+", hiddenTag.length);
|
|
43289
|
-
return showRestTagsPopover
|
|
43303
|
+
return showRestTagsPopover ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(popover_0, Object.assign({
|
|
43290
43304
|
content: hiddenTag,
|
|
43291
43305
|
showArrow: true,
|
|
43292
43306
|
trigger: "hover",
|
|
@@ -69489,7 +69503,7 @@ class Pagination extends BaseComponent {
|
|
|
69489
69503
|
"aria-label": "Next",
|
|
69490
69504
|
onClick: e => !isDisabled && this.foundation.goNext(e),
|
|
69491
69505
|
className: nextClassName,
|
|
69492
|
-
"x-semi-prop": "
|
|
69506
|
+
"x-semi-prop": "nextText"
|
|
69493
69507
|
}, nextText || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(IconChevronRight, {
|
|
69494
69508
|
size: "large"
|
|
69495
69509
|
}));
|
|
@@ -87935,7 +87949,8 @@ class TreeSelect extends BaseComponent {
|
|
|
87935
87949
|
searchPosition,
|
|
87936
87950
|
searchAutoFocus,
|
|
87937
87951
|
multiple,
|
|
87938
|
-
disabled
|
|
87952
|
+
disabled,
|
|
87953
|
+
preventScroll
|
|
87939
87954
|
} = this.props;
|
|
87940
87955
|
const isDropdownPositionSearch = searchPosition === treeSelect_constants_strings.SEARCH_POSITION_DROPDOWN;
|
|
87941
87956
|
const inputcls = classnames_default()({
|
|
@@ -87948,6 +87963,7 @@ class TreeSelect extends BaseComponent {
|
|
|
87948
87963
|
const baseInputProps = {
|
|
87949
87964
|
value: inputValue,
|
|
87950
87965
|
className: inputcls,
|
|
87966
|
+
preventScroll,
|
|
87951
87967
|
onChange: value => this.search(value)
|
|
87952
87968
|
};
|
|
87953
87969
|
const inputDropdownProps = {
|
|
@@ -89322,6 +89338,7 @@ class UploadFoundation extends foundation {
|
|
|
89322
89338
|
newFileList[index].fileInstance = fileInstance;
|
|
89323
89339
|
newFileList[index].size = getFileSize(fileInstance.size);
|
|
89324
89340
|
newFileList[index].name = fileInstance.name;
|
|
89341
|
+
newFileList[index].url = this._createURL(fileInstance);
|
|
89325
89342
|
}
|
|
89326
89343
|
newFileList[index].shouldUpload = shouldUpload;
|
|
89327
89344
|
}
|
|
@@ -97678,6 +97695,7 @@ var preview_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
97678
97695
|
|
|
97679
97696
|
|
|
97680
97697
|
|
|
97698
|
+
|
|
97681
97699
|
const preview_prefixCls = image_constants_cssClasses.PREFIX;
|
|
97682
97700
|
class Preview extends BaseComponent {
|
|
97683
97701
|
get adapter() {
|
|
@@ -97799,10 +97817,11 @@ class Preview extends BaseComponent {
|
|
|
97799
97817
|
const _a = this.props,
|
|
97800
97818
|
{
|
|
97801
97819
|
src,
|
|
97820
|
+
className,
|
|
97802
97821
|
style,
|
|
97803
97822
|
lazyLoad
|
|
97804
97823
|
} = _a,
|
|
97805
|
-
restProps = preview_rest(_a, ["src", "style", "lazyLoad"]);
|
|
97824
|
+
restProps = preview_rest(_a, ["src", "className", "style", "lazyLoad"]);
|
|
97806
97825
|
const {
|
|
97807
97826
|
currentIndex,
|
|
97808
97827
|
visible
|
|
@@ -97829,7 +97848,7 @@ class Preview extends BaseComponent {
|
|
|
97829
97848
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
97830
97849
|
id: this.previewGroupId,
|
|
97831
97850
|
style: style,
|
|
97832
|
-
className: `${preview_prefixCls}-preview-group
|
|
97851
|
+
className: classnames_default()(`${preview_prefixCls}-preview-group`, className)
|
|
97833
97852
|
}, newChildren), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(PreviewInner, Object.assign({}, restProps, {
|
|
97834
97853
|
ref: this.previewRef,
|
|
97835
97854
|
src: finalSrcList,
|