@douyinfe/semi-ui 2.60.0-beta.0 → 2.60.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.
@@ -23411,7 +23411,7 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
23411
23411
  className: `${base_prefixCls}-icon`,
23412
23412
  "x-semi-prop": "icon"
23413
23413
  }, isSemiIcon(icon) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(icon, {
23414
- realSize: iconSize
23414
+ size: iconSize
23415
23415
  }) : icon);
23416
23416
  }
23417
23417
  renderContent() {
@@ -23613,7 +23613,8 @@ Text.propTypes = {
23613
23613
  style: (prop_types_default()).object,
23614
23614
  className: (prop_types_default()).string,
23615
23615
  code: (prop_types_default()).bool,
23616
- component: (prop_types_default()).string
23616
+ component: (prop_types_default()).string,
23617
+ weight: (prop_types_default()).number
23617
23618
  };
23618
23619
  Text.defaultProps = {
23619
23620
  copyable: false,
@@ -26357,7 +26358,7 @@ class AutoComplete extends BaseComponent {
26357
26358
  const innerProps = {
26358
26359
  disabled,
26359
26360
  placeholder,
26360
- autofocus: autoFocus,
26361
+ autoFocus: autoFocus,
26361
26362
  onChange: this.onSearch,
26362
26363
  onClear: this.onInputClear,
26363
26364
  'aria-label': this.props['aria-label'],
@@ -26992,6 +26993,14 @@ class Avatar extends BaseComponent {
26992
26993
  hoverContent,
26993
26994
  focusVisible
26994
26995
  } = this.state;
26996
+ let customStyle = {};
26997
+ if (!avatar_constants_strings.SIZE.includes(size)) {
26998
+ customStyle = {
26999
+ width: size,
27000
+ height: size
27001
+ };
27002
+ }
27003
+ customStyle = Object.assign(Object.assign({}, customStyle), style);
26995
27004
  const shouldWrap = bottomSlot || topSlot || border;
26996
27005
  const mouseEvent = {
26997
27006
  onClick: onClick,
@@ -27012,7 +27021,7 @@ class Avatar extends BaseComponent {
27012
27021
  "x-semi-prop": "hoverContent"
27013
27022
  }, hoverContent) : null;
27014
27023
  let avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", Object.assign({}, others, {
27015
- style: shouldWrap ? {} : style,
27024
+ style: shouldWrap ? {} : customStyle,
27016
27025
  className: avatarCls
27017
27026
  }, shouldWrap ? {} : mouseEvent, {
27018
27027
  role: 'listitem',
@@ -27026,7 +27035,7 @@ class Avatar extends BaseComponent {
27026
27035
  avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
27027
27036
  style: Object.assign({
27028
27037
  position: "relative"
27029
- }, style)
27038
+ }, customStyle)
27030
27039
  }, avatar, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
27031
27040
  style: borderStyle,
27032
27041
  className: classnames_default()([`${avatar_prefixCls}-additionalBorder`, `${avatar_prefixCls}-additionalBorder-${size}`, {
@@ -27043,7 +27052,7 @@ class Avatar extends BaseComponent {
27043
27052
  if (shouldWrap) {
27044
27053
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", Object.assign({
27045
27054
  className: classnames_default()([`${avatar_prefixCls}-wrapper`]),
27046
- style: style
27055
+ style: customStyle
27047
27056
  }, mouseEvent), avatar, topSlot && ["extra-small", "small", "default", "medium", "large", "extra-large"].includes(size) && shape === "circle" && this.renderTopSlot(), bottomSlot && ["extra-small", "small", "default", "medium", "large", "extra-large"].includes(size) && this.renderBottomSlot());
27048
27057
  } else {
27049
27058
  return avatar;
@@ -90112,6 +90121,9 @@ class TreeSelectFoundation extends foundation {
90112
90121
  } = this.getStates();
90113
90122
  inputValue && this._adapter.updateInputValue('');
90114
90123
  };
90124
+ this.onClickSingleTriggerSearchItem = e => {
90125
+ this.focusInput(true);
90126
+ };
90115
90127
  }
90116
90128
  init() {
90117
90129
  const {
@@ -91142,7 +91154,8 @@ class TreeSelect extends BaseComponent {
91142
91154
  [`${treeSelect_prefixcls}-selection-TriggerSearchItem-disabled`]: disabled
91143
91155
  });
91144
91156
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
91145
- className: spanCls
91157
+ className: spanCls,
91158
+ onClick: this.foundation.onClickSingleTriggerSearchItem
91146
91159
  }, renderText ? renderText : placeholder);
91147
91160
  };
91148
91161
  /**
@@ -91152,7 +91165,7 @@ class TreeSelect extends BaseComponent {
91152
91165
  const {
91153
91166
  inputValue
91154
91167
  } = this.state;
91155
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, !inputValue && this.renderSingleTriggerSearchItem(), this.renderInput());
91168
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, this.renderInput(), !inputValue && this.renderSingleTriggerSearchItem());
91156
91169
  };
91157
91170
  this.renderSelectContent = () => {
91158
91171
  const {