@douyinfe/semi-ui 2.23.0 → 2.23.2
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 +48 -1
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +52 -90
- 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/button/Button.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +1 -1
- package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/cjs/carousel/index.d.ts +1 -1
- package/lib/cjs/datePicker/dateInput.d.ts +1 -1
- package/lib/cjs/datePicker/datePicker.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
- package/lib/cjs/input/index.d.ts +0 -2
- package/lib/cjs/input/index.js +1 -8
- package/lib/cjs/locale/source/vi_VN.js +1 -1
- package/lib/cjs/modal/Modal.js +6 -19
- package/lib/cjs/radio/radio.d.ts +1 -1
- package/lib/cjs/radio/radioGroup.d.ts +1 -1
- package/lib/cjs/sideSheet/index.js +6 -19
- package/lib/cjs/tagInput/index.js +4 -2
- package/lib/cjs/transfer/index.js +30 -25
- package/lib/cjs/typography/base.d.ts +1 -1
- package/lib/cjs/typography/numeral.d.ts +2 -2
- 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/cjs/upload/index.d.ts +1 -1
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/index.d.ts +1 -1
- package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
- package/lib/es/carousel/index.d.ts +1 -1
- package/lib/es/datePicker/dateInput.d.ts +1 -1
- package/lib/es/datePicker/datePicker.d.ts +1 -1
- package/lib/es/datePicker/monthsGrid.d.ts +1 -1
- package/lib/es/input/index.d.ts +0 -2
- package/lib/es/input/index.js +1 -8
- package/lib/es/locale/source/vi_VN.js +1 -1
- package/lib/es/modal/Modal.js +6 -19
- package/lib/es/radio/radio.d.ts +1 -1
- package/lib/es/radio/radioGroup.d.ts +1 -1
- package/lib/es/sideSheet/index.js +6 -19
- package/lib/es/tagInput/index.js +4 -2
- package/lib/es/transfer/index.js +30 -25
- package/lib/es/typography/base.d.ts +1 -1
- package/lib/es/typography/numeral.d.ts +2 -2
- 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/lib/es/upload/index.d.ts +1 -1
- package/package.json +7 -7
package/dist/umd/semi-ui.js
CHANGED
|
@@ -26936,10 +26936,6 @@ class foundation_InputFoundation extends foundation {
|
|
|
26936
26936
|
}
|
|
26937
26937
|
}
|
|
26938
26938
|
|
|
26939
|
-
setPaddingLeft(paddingLeft) {
|
|
26940
|
-
this._adapter.setPaddingLeft(paddingLeft);
|
|
26941
|
-
}
|
|
26942
|
-
|
|
26943
26939
|
isAllowClear() {
|
|
26944
26940
|
const {
|
|
26945
26941
|
value,
|
|
@@ -27088,7 +27084,6 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
27088
27084
|
cachedValue: null,
|
|
27089
27085
|
disabled: false,
|
|
27090
27086
|
props: {},
|
|
27091
|
-
paddingLeft: '',
|
|
27092
27087
|
isFocus: false,
|
|
27093
27088
|
isHovering: false,
|
|
27094
27089
|
eyeClosed: props.mode === 'password',
|
|
@@ -27139,9 +27134,6 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
27139
27134
|
notifyKeyUp: e => this.props.onKeyUp(e),
|
|
27140
27135
|
notifyEnterPress: e => this.props.onEnterPress(e),
|
|
27141
27136
|
notifyClear: e => this.props.onClear(e),
|
|
27142
|
-
setPaddingLeft: paddingLeft => this.setState({
|
|
27143
|
-
paddingLeft
|
|
27144
|
-
}),
|
|
27145
27137
|
setMinLength: minLength => this.setState({
|
|
27146
27138
|
minLength
|
|
27147
27139
|
}),
|
|
@@ -27364,7 +27356,6 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
27364
27356
|
|
|
27365
27357
|
const {
|
|
27366
27358
|
value,
|
|
27367
|
-
paddingLeft,
|
|
27368
27359
|
isFocus,
|
|
27369
27360
|
minLength: stateMinLength
|
|
27370
27361
|
} = this.state;
|
|
@@ -27399,9 +27390,7 @@ class input_Input extends baseComponent_BaseComponent {
|
|
|
27399
27390
|
});
|
|
27400
27391
|
const inputValue = value === null || value === undefined ? '' : value;
|
|
27401
27392
|
const inputProps = Object.assign(Object.assign({}, rest), {
|
|
27402
|
-
style:
|
|
27403
|
-
paddingLeft
|
|
27404
|
-
}, inputStyle),
|
|
27393
|
+
style: inputStyle,
|
|
27405
27394
|
autoFocus: autofocus,
|
|
27406
27395
|
className: inputCls,
|
|
27407
27396
|
disabled,
|
|
@@ -43518,8 +43507,8 @@ function sortableElement(WrappedComponent) {
|
|
|
43518
43507
|
|
|
43519
43508
|
|
|
43520
43509
|
|
|
43521
|
-
const
|
|
43522
|
-
const
|
|
43510
|
+
const SortableItem = sortableElement(props => props.item);
|
|
43511
|
+
const SortableList = sortableContainer(_ref => {
|
|
43523
43512
|
let {
|
|
43524
43513
|
items
|
|
43525
43514
|
} = _ref;
|
|
@@ -43531,7 +43520,7 @@ const tagInput_SortableList = sortableContainer(_ref => {
|
|
|
43531
43520
|
}, items.map((item, index) =>
|
|
43532
43521
|
/*#__PURE__*/
|
|
43533
43522
|
// @ts-ignore skip SortableItem type check
|
|
43534
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
43523
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SortableItem, {
|
|
43535
43524
|
key: item.key,
|
|
43536
43525
|
index: index,
|
|
43537
43526
|
item: item.item
|
|
@@ -43920,9 +43909,11 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
|
|
|
43920
43909
|
}));
|
|
43921
43910
|
|
|
43922
43911
|
if (active && draggable && sortableListItems.length > 0) {
|
|
43912
|
+
// helperClass:add styles to the helper(item being dragged) https://github.com/clauderic/react-sortable-hoc/issues/87
|
|
43923
43913
|
// @ts-ignore skip SortableItem type check
|
|
43924
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
43914
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SortableList, {
|
|
43925
43915
|
useDragHandle: true,
|
|
43916
|
+
helperClass: "".concat(tagInput_prefixCls, "-drag-item-move"),
|
|
43926
43917
|
items: sortableListItems,
|
|
43927
43918
|
onSortEnd: this.onSortEnd,
|
|
43928
43919
|
axis: "xy"
|
|
@@ -43982,8 +43973,8 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
|
|
|
43982
43973
|
["".concat(tagInput_prefixCls, "-error")]: validateStatus === 'error',
|
|
43983
43974
|
["".concat(tagInput_prefixCls, "-warning")]: validateStatus === 'warning'
|
|
43984
43975
|
});
|
|
43985
|
-
const inputCls = classnames_default()("".concat(tagInput_prefixCls, "-wrapper-input"));
|
|
43986
|
-
const wrapperCls = classnames_default()("".concat(tagInput_prefixCls, "-wrapper"));
|
|
43976
|
+
const inputCls = classnames_default()("".concat(tagInput_prefixCls, "-wrapper-input"), "".concat(tagInput_prefixCls, "-wrapper-input-").concat(size));
|
|
43977
|
+
const wrapperCls = classnames_default()("".concat(tagInput_prefixCls, "-wrapper"), "".concat(tagInput_prefixCls, "-wrapper-").concat(size));
|
|
43987
43978
|
return (
|
|
43988
43979
|
/*#__PURE__*/
|
|
43989
43980
|
// eslint-disable-next-line
|
|
@@ -59060,10 +59051,6 @@ class modalFoundation_ModalFoundation extends foundation {
|
|
|
59060
59051
|
this.toggleDisplayNone = (displayNone, callback) => {
|
|
59061
59052
|
this._adapter.toggleDisplayNone(displayNone, callback);
|
|
59062
59053
|
};
|
|
59063
|
-
|
|
59064
|
-
this.setShouldRender = shouldRender => {
|
|
59065
|
-
this._adapter.setShouldRender(shouldRender);
|
|
59066
|
-
};
|
|
59067
59054
|
}
|
|
59068
59055
|
|
|
59069
59056
|
destroy() {
|
|
@@ -60026,8 +60013,6 @@ class Modal_Modal extends baseComponent_BaseComponent {
|
|
|
60026
60013
|
visible
|
|
60027
60014
|
} = this.props;
|
|
60028
60015
|
this.foundation.toggleDisplayNone(!visible);
|
|
60029
|
-
const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered);
|
|
60030
|
-
this.foundation.setShouldRender(shouldRender);
|
|
60031
60016
|
};
|
|
60032
60017
|
|
|
60033
60018
|
this.renderFooter = () => {
|
|
@@ -60109,8 +60094,11 @@ class Modal_Modal extends baseComponent_BaseComponent {
|
|
|
60109
60094
|
const classList = classnames_default()(className, {
|
|
60110
60095
|
["".concat(modal_constants_cssClasses.DIALOG, "-displayNone")]: keepDOM && this.state.displayNone
|
|
60111
60096
|
});
|
|
60097
|
+
const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered) || this.props.motion && !this.state.displayNone
|
|
60098
|
+
/* When there is animation, we use displayNone to judge whether animation is ended and judge whether to unmount content */
|
|
60099
|
+
;
|
|
60112
60100
|
|
|
60113
|
-
if (
|
|
60101
|
+
if (shouldRender) {
|
|
60114
60102
|
this._haveRendered = true;
|
|
60115
60103
|
}
|
|
60116
60104
|
|
|
@@ -60141,7 +60129,7 @@ class Modal_Modal extends baseComponent_BaseComponent {
|
|
|
60141
60129
|
animationClassName: maskAnimationClassName,
|
|
60142
60130
|
animationEventsNeedBind: maskAnimationEventsNeedBind
|
|
60143
60131
|
} = _ref2;
|
|
60144
|
-
return
|
|
60132
|
+
return shouldRender ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ModalContent_ModalContent, Object.assign({}, restProps, {
|
|
60145
60133
|
contentExtraProps: animationEventsNeedBind,
|
|
60146
60134
|
maskExtraProps: maskAnimationEventsNeedBind,
|
|
60147
60135
|
isFullScreen: this.state.isFullScreen,
|
|
@@ -60161,8 +60149,7 @@ class Modal_Modal extends baseComponent_BaseComponent {
|
|
|
60161
60149
|
|
|
60162
60150
|
this.state = {
|
|
60163
60151
|
displayNone: !props.visible,
|
|
60164
|
-
isFullScreen: props.fullScreen
|
|
60165
|
-
shouldRender: this.props.visible || this.props.keepDOM && !this.props.lazyRender
|
|
60152
|
+
isFullScreen: props.fullScreen
|
|
60166
60153
|
};
|
|
60167
60154
|
this.foundation = new modalFoundation_ModalFoundation(this.adapter);
|
|
60168
60155
|
this.modalRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
|
|
@@ -60217,13 +60204,6 @@ class Modal_Modal extends baseComponent_BaseComponent {
|
|
|
60217
60204
|
isFullScreen
|
|
60218
60205
|
});
|
|
60219
60206
|
}
|
|
60220
|
-
},
|
|
60221
|
-
setShouldRender: shouldRender => {
|
|
60222
|
-
if (shouldRender !== this.state.shouldRender) {
|
|
60223
|
-
this.setState({
|
|
60224
|
-
shouldRender
|
|
60225
|
-
});
|
|
60226
|
-
}
|
|
60227
60207
|
}
|
|
60228
60208
|
});
|
|
60229
60209
|
}
|
|
@@ -60269,12 +60249,6 @@ class Modal_Modal extends baseComponent_BaseComponent {
|
|
|
60269
60249
|
this.foundation.beforeShow();
|
|
60270
60250
|
}
|
|
60271
60251
|
|
|
60272
|
-
const shouldRender = this.props.visible || this.props.keepDOM && (!this.props.lazyRender || this._haveRendered);
|
|
60273
|
-
|
|
60274
|
-
if (shouldRender === true && this.state.shouldRender === false) {
|
|
60275
|
-
this.foundation.setShouldRender(true);
|
|
60276
|
-
}
|
|
60277
|
-
|
|
60278
60252
|
if (!prevState.displayNone && this.state.displayNone) {
|
|
60279
60253
|
this.foundation.afterHide();
|
|
60280
60254
|
}
|
|
@@ -76248,10 +76222,6 @@ class sideSheetFoundation_SideSheetFoundation extends foundation {
|
|
|
76248
76222
|
}
|
|
76249
76223
|
}
|
|
76250
76224
|
|
|
76251
|
-
setShouldRender(shouldRender) {
|
|
76252
|
-
this._adapter.setShouldRender(shouldRender);
|
|
76253
|
-
}
|
|
76254
|
-
|
|
76255
76225
|
onVisibleChange(visible) {
|
|
76256
76226
|
this._adapter.notifyVisibleChange(visible);
|
|
76257
76227
|
}
|
|
@@ -76303,14 +76273,11 @@ class sideSheet_SideSheet extends baseComponent_BaseComponent {
|
|
|
76303
76273
|
};
|
|
76304
76274
|
|
|
76305
76275
|
this.updateState = () => {
|
|
76306
|
-
const shouldRender = this.props.visible || this.props.keepDOM;
|
|
76307
|
-
this.foundation.setShouldRender(shouldRender);
|
|
76308
76276
|
this.foundation.toggleDisplayNone(!this.props.visible);
|
|
76309
76277
|
};
|
|
76310
76278
|
|
|
76311
76279
|
this.state = {
|
|
76312
|
-
displayNone: !this.props.visible
|
|
76313
|
-
shouldRender: this.props.visible
|
|
76280
|
+
displayNone: !this.props.visible
|
|
76314
76281
|
};
|
|
76315
76282
|
this.foundation = new sideSheetFoundation_SideSheetFoundation(this.adapter);
|
|
76316
76283
|
}
|
|
@@ -76357,13 +76324,6 @@ class sideSheet_SideSheet extends baseComponent_BaseComponent {
|
|
|
76357
76324
|
displayNone: displayNone
|
|
76358
76325
|
});
|
|
76359
76326
|
}
|
|
76360
|
-
},
|
|
76361
|
-
setShouldRender: shouldRender => {
|
|
76362
|
-
if (shouldRender !== this.state.shouldRender) {
|
|
76363
|
-
this.setState({
|
|
76364
|
-
shouldRender
|
|
76365
|
-
});
|
|
76366
|
-
}
|
|
76367
76327
|
}
|
|
76368
76328
|
});
|
|
76369
76329
|
}
|
|
@@ -76399,12 +76359,6 @@ class sideSheet_SideSheet extends baseComponent_BaseComponent {
|
|
|
76399
76359
|
this.foundation.afterHide();
|
|
76400
76360
|
}
|
|
76401
76361
|
|
|
76402
|
-
const shouldRender = this.props.visible || this.props.keepDOM;
|
|
76403
|
-
|
|
76404
|
-
if (shouldRender === true && this.state.shouldRender === false) {
|
|
76405
|
-
this.foundation.setShouldRender(true);
|
|
76406
|
-
}
|
|
76407
|
-
|
|
76408
76362
|
if (prevState.displayNone !== this.state.displayNone) {
|
|
76409
76363
|
this.foundation.onVisibleChange(!this.state.displayNone);
|
|
76410
76364
|
}
|
|
@@ -76456,7 +76410,10 @@ class sideSheet_SideSheet extends baseComponent_BaseComponent {
|
|
|
76456
76410
|
width: sheetWidth,
|
|
76457
76411
|
height: sheetHeight,
|
|
76458
76412
|
onClose: this.handleCancel
|
|
76459
|
-
});
|
|
76413
|
+
});
|
|
76414
|
+
const shouldRender = this.props.visible || this.props.keepDOM || this.props.motion && !this.state.displayNone
|
|
76415
|
+
/* When there is animation, we use displayNone to judge whether animation is ended and judge whether to unmount content */
|
|
76416
|
+
; // Since user could change animate duration , we don't know which animation end first. So we call updateState func twice.
|
|
76460
76417
|
|
|
76461
76418
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(_cssAnimation, {
|
|
76462
76419
|
motion: this.props.motion,
|
|
@@ -76481,7 +76438,7 @@ class sideSheet_SideSheet extends baseComponent_BaseComponent {
|
|
|
76481
76438
|
animationStyle,
|
|
76482
76439
|
animationEventsNeedBind
|
|
76483
76440
|
} = _ref2;
|
|
76484
|
-
return
|
|
76441
|
+
return shouldRender ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SideSheetContent_SideSheetContent, Object.assign({}, contentProps, {
|
|
76485
76442
|
maskExtraProps: maskAnimationEventsNeedBind,
|
|
76486
76443
|
wrapperExtraProps: animationEventsNeedBind,
|
|
76487
76444
|
dialogClassName: animationClassName,
|
|
@@ -97243,7 +97200,30 @@ var transfer = __webpack_require__("mo0a");
|
|
|
97243
97200
|
|
|
97244
97201
|
|
|
97245
97202
|
|
|
97246
|
-
const transfer_prefixcls = transfer_constants_cssClasses.PREFIX;
|
|
97203
|
+
const transfer_prefixcls = transfer_constants_cssClasses.PREFIX; // SortableItem & SortableList should not be assigned inside of the render function
|
|
97204
|
+
|
|
97205
|
+
const transfer_SortableItem = sortableElement(props => props.item.node);
|
|
97206
|
+
const transfer_SortableList = sortableContainer(_ref => {
|
|
97207
|
+
let {
|
|
97208
|
+
items
|
|
97209
|
+
} = _ref;
|
|
97210
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
97211
|
+
className: "".concat(transfer_prefixcls, "-right-list"),
|
|
97212
|
+
role: "list",
|
|
97213
|
+
"aria-label": "Selected list"
|
|
97214
|
+
}, items.map((item, index) =>
|
|
97215
|
+
/*#__PURE__*/
|
|
97216
|
+
// @ts-ignore skip SortableItem type check
|
|
97217
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(transfer_SortableItem, {
|
|
97218
|
+
key: item.label,
|
|
97219
|
+
index: index,
|
|
97220
|
+
item: item
|
|
97221
|
+
}))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97222
|
+
// @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
|
|
97223
|
+
;
|
|
97224
|
+
}, {
|
|
97225
|
+
distance: 10
|
|
97226
|
+
});
|
|
97247
97227
|
|
|
97248
97228
|
class transfer_Transfer extends baseComponent_BaseComponent {
|
|
97249
97229
|
constructor(props) {
|
|
@@ -97686,34 +97666,16 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
97686
97666
|
}
|
|
97687
97667
|
|
|
97688
97668
|
renderRightSortableList(selectedData) {
|
|
97689
|
-
|
|
97690
|
-
|
|
97691
|
-
|
|
97692
|
-
|
|
97693
|
-
items
|
|
97694
|
-
} = _ref;
|
|
97695
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
97696
|
-
className: "".concat(transfer_prefixcls, "-right-list"),
|
|
97697
|
-
role: "list",
|
|
97698
|
-
"aria-label": "Selected list"
|
|
97699
|
-
}, items.map((item, index) =>
|
|
97700
|
-
/*#__PURE__*/
|
|
97701
|
-
// @ts-ignore skip SortableItem type check
|
|
97702
|
-
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SortableItem, {
|
|
97703
|
-
key: item.label,
|
|
97704
|
-
index: index,
|
|
97705
|
-
item: item
|
|
97706
|
-
}))) // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
97707
|
-
// @ts-ignore see reasons: https://github.com/clauderic/react-sortable-hoc/issues/206
|
|
97708
|
-
;
|
|
97709
|
-
}, {
|
|
97710
|
-
distance: 10
|
|
97711
|
-
}); // @ts-ignore skip SortableItem type check
|
|
97669
|
+
const sortableListItems = selectedData.map(item => Object.assign(Object.assign({}, item), {
|
|
97670
|
+
node: this.renderRightItem(item)
|
|
97671
|
+
})); // helperClass:add styles to the helper(item being dragged) https://github.com/clauderic/react-sortable-hoc/issues/87
|
|
97672
|
+
// @ts-ignore skip SortableItem type check
|
|
97712
97673
|
|
|
97713
|
-
const sortList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
97674
|
+
const sortList = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(transfer_SortableList, {
|
|
97714
97675
|
useDragHandle: true,
|
|
97676
|
+
helperClass: "".concat(transfer_prefixcls, "-right-item-drag-item-move"),
|
|
97715
97677
|
onSortEnd: this.onSortEnd,
|
|
97716
|
-
items:
|
|
97678
|
+
items: sortableListItems
|
|
97717
97679
|
});
|
|
97718
97680
|
return sortList;
|
|
97719
97681
|
}
|