@douyinfe/semi-ui 2.19.0-alpha.3 → 2.19.0-alpha.6
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/checkbox/checkbox.tsx +7 -7
- package/dist/css/semi.css +25 -91
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +72 -121
- 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/form/baseForm.tsx +1 -0
- package/lib/cjs/checkbox/checkbox.js +2 -8
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/baseForm.js +1 -0
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/popconfirm/index.d.ts +2 -4
- package/lib/cjs/popconfirm/index.js +31 -49
- package/lib/cjs/radio/radio.js +21 -13
- package/lib/cjs/radio/radioGroup.js +1 -1
- package/lib/cjs/tabs/TabBar.js +1 -5
- package/lib/cjs/transfer/index.js +2 -7
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/checkbox/checkbox.js +2 -8
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/baseForm.js +1 -0
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/popconfirm/index.d.ts +2 -4
- package/lib/es/popconfirm/index.js +31 -49
- package/lib/es/radio/radio.js +21 -13
- package/lib/es/radio/radioGroup.js +1 -1
- package/lib/es/tabs/TabBar.js +1 -5
- package/lib/es/transfer/index.js +2 -7
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +7 -7
- package/popconfirm/_story/popconfirm.stories.js +1 -37
- package/popconfirm/index.tsx +6 -14
- package/radio/_story/radio.stories.js +5 -5
- package/radio/radio.tsx +20 -19
- package/radio/radioGroup.tsx +1 -1
- package/tabs/TabBar.tsx +1 -7
- package/transfer/index.tsx +2 -7
package/dist/umd/semi-ui.js
CHANGED
|
@@ -49066,13 +49066,7 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
|
|
|
49066
49066
|
const name = inGroup && this.context.checkboxGroup.name;
|
|
49067
49067
|
const xSemiPropChildren = this.props['x-semi-children-alias'] || 'children';
|
|
49068
49068
|
|
|
49069
|
-
|
|
49070
|
-
return null;
|
|
49071
|
-
}
|
|
49072
|
-
|
|
49073
|
-
const renderContent = () => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
49074
|
-
className: "".concat(prefix, "-content")
|
|
49075
|
-
}, children ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
49069
|
+
const renderContent = () => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, children ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
49076
49070
|
id: addonId,
|
|
49077
49071
|
className: "".concat(prefix, "-addon"),
|
|
49078
49072
|
"x-semi-prop": xSemiPropChildren
|
|
@@ -49106,7 +49100,7 @@ class checkbox_Checkbox extends baseComponent_BaseComponent {
|
|
|
49106
49100
|
focusInner: focusVisible && !focusOuter,
|
|
49107
49101
|
onInputFocus: this.handleFocusVisible,
|
|
49108
49102
|
onInputBlur: this.handleBlur
|
|
49109
|
-
})), renderContent())
|
|
49103
|
+
})), props.isCardType ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", null, renderContent()) : renderContent())
|
|
49110
49104
|
);
|
|
49111
49105
|
}
|
|
49112
49106
|
|
|
@@ -82990,58 +82984,24 @@ const popconfirm_constants_numbers = {
|
|
|
82990
82984
|
DEFAULT_Z_INDEX: 1030
|
|
82991
82985
|
};
|
|
82992
82986
|
|
|
82993
|
-
// CONCATENATED MODULE: ../semi-foundation/utils/isObject.ts
|
|
82994
|
-
function isObject_isObject(obj) {
|
|
82995
|
-
return obj !== null && typeof obj === 'object';
|
|
82996
|
-
}
|
|
82997
|
-
// CONCATENATED MODULE: ../semi-foundation/utils/isPromise.ts
|
|
82998
|
-
|
|
82999
|
-
function isPromise(value) {
|
|
83000
|
-
return isObject_isObject(value) && typeof value.then === 'function';
|
|
83001
|
-
}
|
|
83002
82987
|
// CONCATENATED MODULE: ../semi-foundation/popconfirm/popconfirmFoundation.ts
|
|
83003
82988
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
83004
82989
|
|
|
83005
|
-
|
|
83006
82990
|
class popconfirmFoundation_PopConfirmFoundation extends foundation {
|
|
83007
82991
|
init() {}
|
|
83008
82992
|
|
|
83009
82993
|
destroy() {}
|
|
83010
82994
|
|
|
83011
82995
|
handleCancel(e) {
|
|
83012
|
-
|
|
83013
|
-
|
|
83014
|
-
if (isPromise(maybePromise)) {
|
|
83015
|
-
this._adapter.updateCancelLoading(true);
|
|
83016
|
-
|
|
83017
|
-
maybePromise.then(result => {
|
|
83018
|
-
this.handleVisibleChange(false);
|
|
82996
|
+
this._adapter.notifyCancel(e);
|
|
83019
82997
|
|
|
83020
|
-
|
|
83021
|
-
}, errors => {
|
|
83022
|
-
this._adapter.updateCancelLoading(false);
|
|
83023
|
-
});
|
|
83024
|
-
} else {
|
|
83025
|
-
this.handleVisibleChange(false);
|
|
83026
|
-
}
|
|
82998
|
+
this.handleVisibleChange(false);
|
|
83027
82999
|
}
|
|
83028
83000
|
|
|
83029
83001
|
handleConfirm(e) {
|
|
83030
|
-
|
|
83031
|
-
|
|
83032
|
-
if (isPromise(maybePromise)) {
|
|
83033
|
-
this._adapter.updateConfirmLoading(true);
|
|
83002
|
+
this._adapter.notifyConfirm(e);
|
|
83034
83003
|
|
|
83035
|
-
|
|
83036
|
-
this._adapter.updateConfirmLoading(false);
|
|
83037
|
-
|
|
83038
|
-
this.handleVisibleChange(false);
|
|
83039
|
-
}, errors => {
|
|
83040
|
-
this._adapter.updateConfirmLoading(false);
|
|
83041
|
-
});
|
|
83042
|
-
} else {
|
|
83043
|
-
this.handleVisibleChange(false);
|
|
83044
|
-
}
|
|
83004
|
+
this.handleVisibleChange(false);
|
|
83045
83005
|
}
|
|
83046
83006
|
|
|
83047
83007
|
handleClickOutSide(e) {
|
|
@@ -83107,8 +83067,6 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
83107
83067
|
this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
|
|
83108
83068
|
|
|
83109
83069
|
this.state = {
|
|
83110
|
-
cancelLoading: false,
|
|
83111
|
-
confirmLoading: false,
|
|
83112
83070
|
visible: props.defaultVisible || false
|
|
83113
83071
|
};
|
|
83114
83072
|
this.foundation = new popconfirmFoundation_PopConfirmFoundation(this.adapter);
|
|
@@ -83132,12 +83090,6 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
83132
83090
|
setVisible: visible => this.setState({
|
|
83133
83091
|
visible
|
|
83134
83092
|
}),
|
|
83135
|
-
updateConfirmLoading: loading => this.setState({
|
|
83136
|
-
confirmLoading: loading
|
|
83137
|
-
}),
|
|
83138
|
-
updateCancelLoading: loading => this.setState({
|
|
83139
|
-
cancelLoading: loading
|
|
83140
|
-
}),
|
|
83141
83093
|
notifyConfirm: e => this.props.onConfirm(e),
|
|
83142
83094
|
notifyCancel: e => this.props.onCancel(e),
|
|
83143
83095
|
notifyVisibleChange: visible => this.props.onVisibleChange(visible),
|
|
@@ -83154,21 +83106,15 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
83154
83106
|
cancelButtonProps,
|
|
83155
83107
|
okButtonProps
|
|
83156
83108
|
} = this.props;
|
|
83157
|
-
const {
|
|
83158
|
-
cancelLoading,
|
|
83159
|
-
confirmLoading
|
|
83160
|
-
} = this.state;
|
|
83161
83109
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
83162
83110
|
componentName: "Popconfirm"
|
|
83163
83111
|
}, (locale, localeCode) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, assign_default()({
|
|
83164
83112
|
type: cancelType,
|
|
83165
|
-
onClick: this.handleCancel
|
|
83166
|
-
loading: cancelLoading
|
|
83113
|
+
onClick: this.handleCancel
|
|
83167
83114
|
}, cancelButtonProps), cancelText || get_default()(locale, 'cancel')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, assign_default()({
|
|
83168
83115
|
type: okType,
|
|
83169
83116
|
theme: "solid",
|
|
83170
|
-
onClick: this.handleConfirm
|
|
83171
|
-
loading: confirmLoading
|
|
83117
|
+
onClick: this.handleConfirm
|
|
83172
83118
|
}, okButtonProps), okText || get_default()(locale, 'confirm'))));
|
|
83173
83119
|
}
|
|
83174
83120
|
|
|
@@ -83190,39 +83136,35 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
|
|
|
83190
83136
|
});
|
|
83191
83137
|
const showTitle = title !== null && typeof title !== 'undefined';
|
|
83192
83138
|
const showContent = content !== null || typeof content !== 'undefined';
|
|
83193
|
-
return (
|
|
83194
|
-
|
|
83195
|
-
|
|
83196
|
-
|
|
83197
|
-
|
|
83198
|
-
|
|
83199
|
-
|
|
83200
|
-
|
|
83201
|
-
|
|
83202
|
-
|
|
83203
|
-
|
|
83204
|
-
|
|
83205
|
-
|
|
83206
|
-
|
|
83207
|
-
|
|
83208
|
-
|
|
83209
|
-
|
|
83210
|
-
|
|
83211
|
-
|
|
83212
|
-
|
|
83213
|
-
|
|
83214
|
-
|
|
83215
|
-
|
|
83216
|
-
|
|
83217
|
-
|
|
83218
|
-
|
|
83219
|
-
|
|
83220
|
-
|
|
83221
|
-
|
|
83222
|
-
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83223
|
-
className: "".concat(prefixCls, "-footer")
|
|
83224
|
-
}, this.renderControls())))
|
|
83225
|
-
);
|
|
83139
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83140
|
+
className: popCardCls,
|
|
83141
|
+
onClick: this.stopImmediatePropagation,
|
|
83142
|
+
style: style
|
|
83143
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83144
|
+
className: "".concat(prefixCls, "-inner")
|
|
83145
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83146
|
+
className: "".concat(prefixCls, "-header")
|
|
83147
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("i", {
|
|
83148
|
+
className: "".concat(prefixCls, "-header-icon"),
|
|
83149
|
+
"x-semi-prop": "icon"
|
|
83150
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(icon) ? icon : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83151
|
+
className: "".concat(prefixCls, "-header-body")
|
|
83152
|
+
}, showTitle ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83153
|
+
className: "".concat(prefixCls, "-header-title"),
|
|
83154
|
+
"x-semi-prop": "title"
|
|
83155
|
+
}, title) : null, showContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83156
|
+
className: "".concat(prefixCls, "-header-content"),
|
|
83157
|
+
"x-semi-prop": "content"
|
|
83158
|
+
}, content) : null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
|
|
83159
|
+
className: "".concat(prefixCls, "-btn-close"),
|
|
83160
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
|
|
83161
|
+
size: "small",
|
|
83162
|
+
theme: 'borderless',
|
|
83163
|
+
type: cancelType,
|
|
83164
|
+
onClick: this.handleCancel
|
|
83165
|
+
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
83166
|
+
className: "".concat(prefixCls, "-footer")
|
|
83167
|
+
}, this.renderControls())));
|
|
83226
83168
|
}
|
|
83227
83169
|
|
|
83228
83170
|
render() {
|
|
@@ -84218,16 +84160,26 @@ class radio_Radio extends baseComponent_BaseComponent {
|
|
|
84218
84160
|
["".concat(prefix, "-focus")]: focusVisible && isButtonRadio
|
|
84219
84161
|
}, addonClassName);
|
|
84220
84162
|
|
|
84221
|
-
const renderContent = () =>
|
|
84222
|
-
|
|
84223
|
-
|
|
84224
|
-
|
|
84225
|
-
|
|
84226
|
-
|
|
84227
|
-
|
|
84228
|
-
|
|
84229
|
-
|
|
84230
|
-
|
|
84163
|
+
const renderContent = () => {
|
|
84164
|
+
if (!children && !extra) {
|
|
84165
|
+
return null;
|
|
84166
|
+
}
|
|
84167
|
+
|
|
84168
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
84169
|
+
className: classnames_default()(["".concat(prefix, "-content"), {
|
|
84170
|
+
["".concat(prefix, "-isCardRadioGroup_content")]: isCardRadioGroup
|
|
84171
|
+
}])
|
|
84172
|
+
}, children ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
84173
|
+
className: addonCls,
|
|
84174
|
+
style: addonStyle,
|
|
84175
|
+
id: addonId,
|
|
84176
|
+
"x-semi-prop": "children"
|
|
84177
|
+
}, children) : null, extra && !isButtonRadio ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
84178
|
+
className: "".concat(prefix, "-extra"),
|
|
84179
|
+
id: extraId,
|
|
84180
|
+
"x-semi-prop": "extra"
|
|
84181
|
+
}, extra) : null);
|
|
84182
|
+
};
|
|
84231
84183
|
|
|
84232
84184
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("label", {
|
|
84233
84185
|
style: style,
|
|
@@ -84248,9 +84200,7 @@ class radio_Radio extends baseComponent_BaseComponent {
|
|
|
84248
84200
|
focusInner: focusVisible && !focusOuter,
|
|
84249
84201
|
onInputFocus: this.handleFocusVisible,
|
|
84250
84202
|
onInputBlur: this.handleBlur
|
|
84251
|
-
})),
|
|
84252
|
-
className: "".concat(prefix, "-isCardRadioGroup_content")
|
|
84253
|
-
}, renderContent()) : renderContent());
|
|
84203
|
+
})), renderContent());
|
|
84254
84204
|
}
|
|
84255
84205
|
|
|
84256
84206
|
}
|
|
@@ -84313,7 +84263,7 @@ class radioGroup_RadioGroup extends baseComponent_BaseComponent {
|
|
|
84313
84263
|
this.getFormatName = () => this.props.name || 'default';
|
|
84314
84264
|
|
|
84315
84265
|
this.state = {
|
|
84316
|
-
value:
|
|
84266
|
+
value: props.value || props.defaultValue
|
|
84317
84267
|
};
|
|
84318
84268
|
this.foundation = new radioGroupFoundation_RadioGroupFoundation(this.adapter);
|
|
84319
84269
|
}
|
|
@@ -96727,11 +96677,7 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
96727
96677
|
var _context5, _context6;
|
|
96728
96678
|
|
|
96729
96679
|
if (isEmpty_default()(items)) {
|
|
96730
|
-
return
|
|
96731
|
-
disabled: true,
|
|
96732
|
-
icon: icon,
|
|
96733
|
-
theme: "borderless"
|
|
96734
|
-
});
|
|
96680
|
+
return null;
|
|
96735
96681
|
}
|
|
96736
96682
|
|
|
96737
96683
|
const {
|
|
@@ -104636,6 +104582,15 @@ treeSelect_TreeSelect.defaultProps = {
|
|
|
104636
104582
|
var core_js_stable_url = __webpack_require__("QjT4");
|
|
104637
104583
|
var url_default = /*#__PURE__*/__webpack_require__.n(core_js_stable_url);
|
|
104638
104584
|
|
|
104585
|
+
// CONCATENATED MODULE: ../semi-foundation/utils/isObject.ts
|
|
104586
|
+
function isObject_isObject(obj) {
|
|
104587
|
+
return obj !== null && typeof obj === 'object';
|
|
104588
|
+
}
|
|
104589
|
+
// CONCATENATED MODULE: ../semi-foundation/utils/isPromise.ts
|
|
104590
|
+
|
|
104591
|
+
function isPromise(value) {
|
|
104592
|
+
return isObject_isObject(value) && typeof value.then === 'function';
|
|
104593
|
+
}
|
|
104639
104594
|
// CONCATENATED MODULE: ../semi-foundation/upload/constants.ts
|
|
104640
104595
|
|
|
104641
104596
|
const upload_constants_PREFIX = "".concat(BASE_CLASS_PREFIX, "-upload");
|
|
@@ -107797,8 +107752,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
107797
107752
|
const noMatch = inSearchMode && searchResult.size === 0;
|
|
107798
107753
|
const emptySearch = emptyContent.search ? emptyContent.search : locale.emptySearch;
|
|
107799
107754
|
const emptyLeft = emptyContent.left ? emptyContent.left : locale.emptyLeft;
|
|
107800
|
-
const
|
|
107801
|
-
const emptySearchCom = this.renderEmpty('left', emptySearch);
|
|
107755
|
+
const emptyCom = this.renderEmpty('left', inputValue ? emptySearch : emptyLeft);
|
|
107802
107756
|
const loadingCom = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(spin_0, null);
|
|
107803
107757
|
let content = null;
|
|
107804
107758
|
|
|
@@ -107808,11 +107762,7 @@ class transfer_Transfer extends baseComponent_BaseComponent {
|
|
|
107808
107762
|
break;
|
|
107809
107763
|
|
|
107810
107764
|
case noMatch:
|
|
107811
|
-
content =
|
|
107812
|
-
break;
|
|
107813
|
-
|
|
107814
|
-
case data.length === 0:
|
|
107815
|
-
content = emptyDataCom;
|
|
107765
|
+
content = emptyCom;
|
|
107816
107766
|
break;
|
|
107817
107767
|
|
|
107818
107768
|
case type === transfer_constants_strings.TYPE_TREE_TO_LIST:
|
|
@@ -110444,6 +110394,7 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
110444
110394
|
|
|
110445
110395
|
componentWillUnmount() {
|
|
110446
110396
|
this.foundation.destroy();
|
|
110397
|
+
this.formApi = null;
|
|
110447
110398
|
}
|
|
110448
110399
|
|
|
110449
110400
|
get adapter() {
|