@douyinfe/semi-ui 2.30.0 → 2.30.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/umd/semi-ui.js +21 -10
- 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/dropdown/dropdownItem.js +4 -3
- package/lib/cjs/form/baseForm.js +9 -4
- package/lib/cjs/modal/confirm.d.ts +303 -26
- package/lib/cjs/modal/confirm.js +7 -2
- package/lib/cjs/tag/index.js +2 -1
- package/lib/es/dropdown/dropdownItem.js +4 -3
- package/lib/es/form/baseForm.js +9 -4
- package/lib/es/modal/confirm.d.ts +303 -26
- package/lib/es/modal/confirm.js +6 -2
- package/lib/es/tag/index.js +2 -1
- package/package.json +9 -9
package/dist/umd/semi-ui.js
CHANGED
|
@@ -41357,11 +41357,12 @@ class tag_Tag extends external_root_React_commonjs2_react_commonjs_react_amd_rea
|
|
|
41357
41357
|
|
|
41358
41358
|
const a11yProps = {
|
|
41359
41359
|
role: 'button',
|
|
41360
|
-
tabIndex: tabIndex
|
|
41360
|
+
tabIndex: tabIndex || 0,
|
|
41361
41361
|
onKeyDown: this.handleKeyDown
|
|
41362
41362
|
};
|
|
41363
41363
|
const baseProps = Object.assign(Object.assign({}, attr), {
|
|
41364
41364
|
onClick,
|
|
41365
|
+
tabIndex: tabIndex,
|
|
41365
41366
|
className: classnames_default()(tag_prefixCls, {
|
|
41366
41367
|
[`${tag_prefixCls}-default`]: size === 'default',
|
|
41367
41368
|
[`${tag_prefixCls}-small`]: size === 'small',
|
|
@@ -60158,6 +60159,7 @@ const ConfirmModal = props => {
|
|
|
60158
60159
|
|
|
60159
60160
|
|
|
60160
60161
|
|
|
60162
|
+
|
|
60161
60163
|
function confirm_confirm(props) {
|
|
60162
60164
|
// create a dom in adapter?
|
|
60163
60165
|
const div = document.createElement('div');
|
|
@@ -60236,8 +60238,11 @@ function withWarning(props) {
|
|
|
60236
60238
|
function withError(props) {
|
|
60237
60239
|
return Object.assign({
|
|
60238
60240
|
type: 'error',
|
|
60239
|
-
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconAlertCircle, null)
|
|
60240
|
-
|
|
60241
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconAlertCircle, null),
|
|
60242
|
+
okButtonProps: Object.assign({
|
|
60243
|
+
type: 'danger'
|
|
60244
|
+
}, props.okButtonProps)
|
|
60245
|
+
}, omit_default()(props, ['okButtonProps']));
|
|
60241
60246
|
}
|
|
60242
60247
|
function withConfirm(props) {
|
|
60243
60248
|
return Object.assign({
|
|
@@ -61014,11 +61019,12 @@ class dropdownItem_DropdownItem extends baseComponent_BaseComponent {
|
|
|
61014
61019
|
const {
|
|
61015
61020
|
showTick: contextShowTick
|
|
61016
61021
|
} = this.context;
|
|
61022
|
+
const realShowTick = contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick;
|
|
61017
61023
|
const itemclass = classnames_default()(className, {
|
|
61018
61024
|
[`${dropdownItem_prefixCls}-item`]: true,
|
|
61019
61025
|
[`${dropdownItem_prefixCls}-item-disabled`]: disabled,
|
|
61020
61026
|
[`${dropdownItem_prefixCls}-item-hover`]: hover,
|
|
61021
|
-
[`${dropdownItem_prefixCls}-item-withTick`]:
|
|
61027
|
+
[`${dropdownItem_prefixCls}-item-withTick`]: realShowTick,
|
|
61022
61028
|
[`${dropdownItem_prefixCls}-item-${type}`]: type,
|
|
61023
61029
|
[`${dropdownItem_prefixCls}-item-active`]: active
|
|
61024
61030
|
});
|
|
@@ -61033,11 +61039,11 @@ class dropdownItem_DropdownItem extends baseComponent_BaseComponent {
|
|
|
61033
61039
|
let tick = null;
|
|
61034
61040
|
|
|
61035
61041
|
switch (true) {
|
|
61036
|
-
case
|
|
61042
|
+
case realShowTick && active:
|
|
61037
61043
|
tick = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null);
|
|
61038
61044
|
break;
|
|
61039
61045
|
|
|
61040
|
-
case
|
|
61046
|
+
case realShowTick && !active:
|
|
61041
61047
|
tick = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, {
|
|
61042
61048
|
style: {
|
|
61043
61049
|
color: 'transparent'
|
|
@@ -101255,7 +101261,11 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
101255
101261
|
const {
|
|
101256
101262
|
formId
|
|
101257
101263
|
} = this.state;
|
|
101258
|
-
|
|
101264
|
+
const {
|
|
101265
|
+
id
|
|
101266
|
+
} = this.props;
|
|
101267
|
+
const xId = id ? id : formId;
|
|
101268
|
+
return document.querySelectorAll(`form[x-form-id="${xId}"] .${form_constants_cssClasses.PREFIX}-field-error-message`);
|
|
101259
101269
|
},
|
|
101260
101270
|
getFieldDOM: field => document.querySelector(`.${form_constants_cssClasses.PREFIX}-field[x-field-id="${field}"]`)
|
|
101261
101271
|
});
|
|
@@ -101330,9 +101340,10 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
101330
101340
|
allowEmpty,
|
|
101331
101341
|
autoScrollToError,
|
|
101332
101342
|
showValidateIcon,
|
|
101333
|
-
extraTextPosition
|
|
101343
|
+
extraTextPosition,
|
|
101344
|
+
id
|
|
101334
101345
|
} = _a,
|
|
101335
|
-
rest = baseForm_rest(_a, ["children", "getFormApi", "onChange", "onSubmit", "onSubmitFail", "onValueChange", "component", "render", "validateFields", "initValues", "layout", "style", "className", "labelPosition", "labelWidth", "labelAlign", "labelCol", "wrapperCol", "allowEmpty", "autoScrollToError", "showValidateIcon", "extraTextPosition"]);
|
|
101346
|
+
rest = baseForm_rest(_a, ["children", "getFormApi", "onChange", "onSubmit", "onSubmitFail", "onValueChange", "component", "render", "validateFields", "initValues", "layout", "style", "className", "labelPosition", "labelWidth", "labelAlign", "labelCol", "wrapperCol", "allowEmpty", "autoScrollToError", "showValidateIcon", "extraTextPosition", "id"]);
|
|
101336
101347
|
|
|
101337
101348
|
const formCls = classnames_default()(baseForm_prefix, className, {
|
|
101338
101349
|
[baseForm_prefix + '-vertical']: layout === 'vertical',
|
|
@@ -101345,7 +101356,7 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
101345
101356
|
onReset: this.reset,
|
|
101346
101357
|
onSubmit: this.submit,
|
|
101347
101358
|
className: formCls,
|
|
101348
|
-
"x-form-id": formId
|
|
101359
|
+
"x-form-id": id ? id : formId
|
|
101349
101360
|
}), this.content);
|
|
101350
101361
|
const withRowForm = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(grid_row, null, formContent);
|
|
101351
101362
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(FormUpdaterContext.Provider, {
|