@douyinfe/semi-ui 2.27.0-beta.0 → 2.27.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 +52 -33
- 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/select/index.js +14 -2
- package/lib/cjs/tabs/TabBar.js +3 -1
- package/lib/cjs/tooltip/index.js +1 -1
- package/lib/cjs/transfer/index.js +29 -29
- package/lib/es/select/index.js +14 -2
- package/lib/es/tabs/TabBar.js +3 -1
- package/lib/es/tooltip/index.js +1 -1
- package/lib/es/transfer/index.js +29 -29
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -20369,7 +20369,7 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
|
|
|
20369
20369
|
el = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(el);
|
|
20370
20370
|
popupEl = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(popupEl);
|
|
20371
20371
|
|
|
20372
|
-
if (el && !el.contains(e.target) && popupEl && !popupEl.contains(e.target) || this.props.clickTriggerToHide) {
|
|
20372
|
+
if (el && !el.contains(e.target) && popupEl && !popupEl.contains(e.target) || this.props.clickTriggerToHide && el && el.contains(e.target)) {
|
|
20373
20373
|
this.props.onClickOutSide(e);
|
|
20374
20374
|
cb();
|
|
20375
20375
|
}
|
|
@@ -71547,6 +71547,11 @@ class foundation_SelectFoundation extends foundation {
|
|
|
71547
71547
|
|
|
71548
71548
|
handlePopoverClose() {
|
|
71549
71549
|
this._adapter.emit('popoverClose');
|
|
71550
|
+
} // need to remove focus style of option when user hover slot
|
|
71551
|
+
|
|
71552
|
+
|
|
71553
|
+
handleSlotMouseEnter() {
|
|
71554
|
+
this._adapter.updateFocusIndex(-1);
|
|
71550
71555
|
}
|
|
71551
71556
|
|
|
71552
71557
|
}
|
|
@@ -72765,7 +72770,10 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72765
72770
|
style: style,
|
|
72766
72771
|
ref: this.setOptionContainerEl,
|
|
72767
72772
|
onKeyDown: e => this.foundation.handleContainerKeyDown(e)
|
|
72768
|
-
}, outerTopSlot
|
|
72773
|
+
}, outerTopSlot ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
72774
|
+
className: "".concat(select_prefixcls, "-option-list-outer-top-slot"),
|
|
72775
|
+
onMouseEnter: () => this.foundation.handleSlotMouseEnter()
|
|
72776
|
+
}, outerTopSlot) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
72769
72777
|
style: {
|
|
72770
72778
|
maxHeight: "".concat(maxHeight, "px")
|
|
72771
72779
|
},
|
|
@@ -72773,7 +72781,16 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
72773
72781
|
role: "listbox",
|
|
72774
72782
|
"aria-multiselectable": multiple,
|
|
72775
72783
|
onScroll: e => this.foundation.handleListScroll(e)
|
|
72776
|
-
}, innerTopSlot
|
|
72784
|
+
}, innerTopSlot ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
72785
|
+
className: "".concat(select_prefixcls, "-option-list-inner-top-slot"),
|
|
72786
|
+
onMouseEnter: () => this.foundation.handleSlotMouseEnter()
|
|
72787
|
+
}, innerTopSlot) : null, loading ? this.renderLoading() : isEmpty ? this.renderEmpty() : listContent, innerBottomSlot ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
72788
|
+
className: "".concat(select_prefixcls, "-option-list-inner-bottom-slot"),
|
|
72789
|
+
onMouseEnter: () => this.foundation.handleSlotMouseEnter()
|
|
72790
|
+
}, innerBottomSlot) : null), outerBottomSlot ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
72791
|
+
className: "".concat(select_prefixcls, "-option-list-outer-bottom-slot"),
|
|
72792
|
+
onMouseEnter: () => this.foundation.handleSlotMouseEnter()
|
|
72793
|
+
}, outerBottomSlot) : null)
|
|
72777
72794
|
);
|
|
72778
72795
|
}
|
|
72779
72796
|
|
|
@@ -87336,7 +87353,9 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
87336
87353
|
render: disabled ? null : menu,
|
|
87337
87354
|
showTick: true,
|
|
87338
87355
|
style: dropdownStyle,
|
|
87339
|
-
trigger: 'hover'
|
|
87356
|
+
trigger: 'hover',
|
|
87357
|
+
disableFocusListener // prevent the panel from popping up again after clicking
|
|
87358
|
+
: true
|
|
87340
87359
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
87341
87360
|
role: "presentation",
|
|
87342
87361
|
className: arrowCls,
|
|
@@ -97688,7 +97707,7 @@ var transfer = __webpack_require__("mo0a");
|
|
|
97688
97707
|
|
|
97689
97708
|
|
|
97690
97709
|
|
|
97691
|
-
const
|
|
97710
|
+
const transfer_prefixCls = transfer_constants_cssClasses.PREFIX; // SortableItem & SortableList should not be assigned inside of the render function
|
|
97692
97711
|
|
|
97693
97712
|
const transfer_SortableItem = sortableElement(props => props.item.node);
|
|
97694
97713
|
const transfer_SortableList = sortableContainer(_ref => {
|
|
@@ -97696,7 +97715,7 @@ const transfer_SortableList = sortableContainer(_ref => {
|
|
|
97696
97715
|
items
|
|
97697
97716
|
} = _ref;
|
|
97698
97717
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
97699
|
-
className: "".concat(
|
|
97718
|
+
className: "".concat(transfer_prefixCls, "-right-list"),
|
|
97700
97719
|
role: "list",
|
|
97701
97720
|
"aria-label": "Selected list"
|
|
97702
97721
|
}, items.map((item, index) =>
|
|
@@ -97848,7 +97867,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
97848
97867
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
97849
97868
|
role: "search",
|
|
97850
97869
|
"aria-label": "Transfer filter",
|
|
97851
|
-
className: "".concat(
|
|
97870
|
+
className: "".concat(transfer_prefixCls, "-filter")
|
|
97852
97871
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(input_0, Object.assign({
|
|
97853
97872
|
prefix: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconSearch, null),
|
|
97854
97873
|
placeholder: locale.placeholder,
|
|
@@ -97871,20 +97890,20 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
97871
97890
|
showButton
|
|
97872
97891
|
} = headerConfig;
|
|
97873
97892
|
const headerCls = classnames_default()({
|
|
97874
|
-
["".concat(
|
|
97875
|
-
["".concat(
|
|
97876
|
-
["".concat(
|
|
97893
|
+
["".concat(transfer_prefixCls, "-header")]: true,
|
|
97894
|
+
["".concat(transfer_prefixCls, "-right-header")]: type === 'right',
|
|
97895
|
+
["".concat(transfer_prefixCls, "-left-header")]: type === 'left'
|
|
97877
97896
|
});
|
|
97878
97897
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
97879
97898
|
className: headerCls
|
|
97880
97899
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
97881
|
-
className: "".concat(
|
|
97900
|
+
className: "".concat(transfer_prefixCls, "-header-total")
|
|
97882
97901
|
}, totalContent), showButton ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
|
|
97883
97902
|
theme: "borderless",
|
|
97884
97903
|
disabled: disabled,
|
|
97885
97904
|
type: "tertiary",
|
|
97886
97905
|
size: "small",
|
|
97887
|
-
className: "".concat(
|
|
97906
|
+
className: "".concat(transfer_prefixCls, "-header-all"),
|
|
97888
97907
|
onClick: onAllClick
|
|
97889
97908
|
}, allContent) : null);
|
|
97890
97909
|
}
|
|
@@ -97907,8 +97926,8 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
97907
97926
|
}
|
|
97908
97927
|
|
|
97909
97928
|
const leftItemCls = classnames_default()({
|
|
97910
|
-
["".concat(
|
|
97911
|
-
["".concat(
|
|
97929
|
+
["".concat(transfer_prefixCls, "-item")]: true,
|
|
97930
|
+
["".concat(transfer_prefixCls, "-item-disabled")]: item.disabled
|
|
97912
97931
|
});
|
|
97913
97932
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(checkbox_checkbox_0, {
|
|
97914
97933
|
key: index,
|
|
@@ -98013,12 +98032,12 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98013
98032
|
}
|
|
98014
98033
|
|
|
98015
98034
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("section", {
|
|
98016
|
-
className: "".concat(
|
|
98035
|
+
className: "".concat(transfer_prefixCls, "-left")
|
|
98017
98036
|
}, inputCom, content);
|
|
98018
98037
|
}
|
|
98019
98038
|
|
|
98020
98039
|
renderGroupTitle(group, index) {
|
|
98021
|
-
const groupCls = classnames_default()("".concat(
|
|
98040
|
+
const groupCls = classnames_default()("".concat(transfer_prefixCls, "-group-title"));
|
|
98022
98041
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
98023
98042
|
className: groupCls,
|
|
98024
98043
|
key: "title-".concat(index)
|
|
@@ -98086,7 +98105,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98086
98105
|
}
|
|
98087
98106
|
});
|
|
98088
98107
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
98089
|
-
className: "".concat(
|
|
98108
|
+
className: "".concat(transfer_prefixCls, "-left-list"),
|
|
98090
98109
|
role: "list",
|
|
98091
98110
|
"aria-label": "Option list"
|
|
98092
98111
|
}, content);
|
|
@@ -98103,9 +98122,9 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98103
98122
|
const onRemove = () => this.foundation.handleSelectOrRemove(item);
|
|
98104
98123
|
|
|
98105
98124
|
const rightItemCls = classnames_default()({
|
|
98106
|
-
["".concat(
|
|
98107
|
-
["".concat(
|
|
98108
|
-
["".concat(
|
|
98125
|
+
["".concat(transfer_prefixCls, "-item")]: true,
|
|
98126
|
+
["".concat(transfer_prefixCls, "-right-item")]: true,
|
|
98127
|
+
["".concat(transfer_prefixCls, "-right-item-draggable")]: draggable
|
|
98109
98128
|
});
|
|
98110
98129
|
const shouldShowPath = type === transfer_constants_strings.TYPE_TREE_TO_LIST && showPath === true;
|
|
98111
98130
|
const label = shouldShowPath ? this.foundation._generatePath(item) : item.label;
|
|
@@ -98120,7 +98139,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98120
98139
|
const DragHandle = sortableHandle(() => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconHandle, {
|
|
98121
98140
|
role: "button",
|
|
98122
98141
|
"aria-label": "Drag and sort",
|
|
98123
|
-
className: "".concat(
|
|
98142
|
+
className: "".concat(transfer_prefixCls, "-right-item-drag-handler")
|
|
98124
98143
|
}));
|
|
98125
98144
|
return (
|
|
98126
98145
|
/*#__PURE__*/
|
|
@@ -98130,12 +98149,12 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98130
98149
|
className: rightItemCls,
|
|
98131
98150
|
key: item.key
|
|
98132
98151
|
}, draggable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(DragHandle, null) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
98133
|
-
className: "".concat(
|
|
98152
|
+
className: "".concat(transfer_prefixCls, "-right-item-text")
|
|
98134
98153
|
}, label), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
|
|
98135
98154
|
onClick: onRemove,
|
|
98136
98155
|
"aria-disabled": item.disabled,
|
|
98137
|
-
className: classnames_default()("".concat(
|
|
98138
|
-
["".concat(
|
|
98156
|
+
className: classnames_default()("".concat(transfer_prefixCls, "-item-close-icon"), {
|
|
98157
|
+
["".concat(transfer_prefixCls, "-item-close-icon-disabled")]: item.disabled
|
|
98139
98158
|
})
|
|
98140
98159
|
}))
|
|
98141
98160
|
);
|
|
@@ -98143,9 +98162,9 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98143
98162
|
|
|
98144
98163
|
renderEmpty(type, emptyText) {
|
|
98145
98164
|
const emptyCls = classnames_default()({
|
|
98146
|
-
["".concat(
|
|
98147
|
-
["".concat(
|
|
98148
|
-
["".concat(
|
|
98165
|
+
["".concat(transfer_prefixCls, "-empty")]: true,
|
|
98166
|
+
["".concat(transfer_prefixCls, "-right-empty")]: type === 'right',
|
|
98167
|
+
["".concat(transfer_prefixCls, "-left-empty")]: type === 'left'
|
|
98149
98168
|
});
|
|
98150
98169
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
98151
98170
|
"aria-label": "empty",
|
|
@@ -98161,7 +98180,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98161
98180
|
|
|
98162
98181
|
const sortList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(transfer_SortableList, {
|
|
98163
98182
|
useDragHandle: true,
|
|
98164
|
-
helperClass: "".concat(
|
|
98183
|
+
helperClass: "".concat(transfer_prefixCls, "-right-item-drag-item-move"),
|
|
98165
98184
|
onSortEnd: this.onSortEnd,
|
|
98166
98185
|
items: sortableListItems
|
|
98167
98186
|
});
|
|
@@ -98202,7 +98221,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98202
98221
|
};
|
|
98203
98222
|
const headerCom = this.renderHeader(headerConfig);
|
|
98204
98223
|
const emptyCom = this.renderEmpty('right', emptyContent.right ? emptyContent.right : locale.emptyRight);
|
|
98205
|
-
const panelCls = "".concat(
|
|
98224
|
+
const panelCls = "".concat(transfer_prefixCls, "-right");
|
|
98206
98225
|
let content = null;
|
|
98207
98226
|
|
|
98208
98227
|
switch (true) {
|
|
@@ -98213,7 +98232,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98213
98232
|
|
|
98214
98233
|
case selectedData.length && !draggable:
|
|
98215
98234
|
const list = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
98216
|
-
className: "".concat(
|
|
98235
|
+
className: "".concat(transfer_prefixCls, "-right-list"),
|
|
98217
98236
|
role: "list",
|
|
98218
98237
|
"aria-label": "Selected list"
|
|
98219
98238
|
}, selectedData.map(item => this.renderRightItem(Object.assign({}, item))));
|
|
@@ -98241,9 +98260,9 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
98241
98260
|
renderSelectedPanel,
|
|
98242
98261
|
renderSourcePanel
|
|
98243
98262
|
} = this.props;
|
|
98244
|
-
const transferCls = classnames_default()(
|
|
98245
|
-
["".concat(
|
|
98246
|
-
["".concat(
|
|
98263
|
+
const transferCls = classnames_default()(transfer_prefixCls, className, {
|
|
98264
|
+
["".concat(transfer_prefixCls, "-disabled")]: disabled,
|
|
98265
|
+
["".concat(transfer_prefixCls, "-custom-panel")]: renderSelectedPanel && renderSourcePanel
|
|
98247
98266
|
});
|
|
98248
98267
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
98249
98268
|
componentName: "Transfer"
|