@douyinfe/semi-ui 2.20.3 → 2.21.0-beta.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.
@@ -27344,6 +27344,8 @@ class foundation_AutoCompleteFoundation extends foundation {
27344
27344
  default:
27345
27345
  break;
27346
27346
  }
27347
+
27348
+ this._adapter.notifyKeyDown(event);
27347
27349
  }
27348
27350
 
27349
27351
  _getEnableFocusIndex(offset) {
@@ -29008,6 +29010,9 @@ class autoComplete_AutoComplete extends baseComponent_BaseComponent {
29008
29010
  notifyBlur: event => {
29009
29011
  this.props.onBlur(event);
29010
29012
  },
29013
+ notifyKeyDown: e => {
29014
+ this.props.onKeyDown(e);
29015
+ },
29011
29016
  rePositionDropdown: () => {
29012
29017
  let {
29013
29018
  rePosKey
@@ -29230,6 +29235,7 @@ autoComplete_AutoComplete.propTypes = {
29230
29235
  onBlur: prop_types_default.a.func,
29231
29236
  onFocus: prop_types_default.a.func,
29232
29237
  onChange: prop_types_default.a.func,
29238
+ onKeyDown: prop_types_default.a.func,
29233
29239
  position: prop_types_default.a.oneOf(autoComplete_positionSet),
29234
29240
  placeholder: prop_types_default.a.string,
29235
29241
  prefix: prop_types_default.a.node,
@@ -29275,7 +29281,8 @@ autoComplete_AutoComplete.defaultProps = {
29275
29281
  maxHeight: 300,
29276
29282
  validateStatus: 'default',
29277
29283
  autoFocus: false,
29278
- emptyContent: null // onPressEnter: () => undefined,
29284
+ emptyContent: null,
29285
+ onKeyDown: noop_default.a // onPressEnter: () => undefined,
29279
29286
  // defaultOpen: false,
29280
29287
 
29281
29288
  };
@@ -37729,6 +37736,7 @@ class foundation_CarouselFoundation extends foundation {
37729
37736
  }
37730
37737
 
37731
37738
  next() {
37739
+ this.stop();
37732
37740
  const {
37733
37741
  activeIndex: stateActiveIndex
37734
37742
  } = this.getStates();
@@ -37743,9 +37751,12 @@ class foundation_CarouselFoundation extends foundation {
37743
37751
 
37744
37752
  this.handleNewActiveIndex(targetIndex);
37745
37753
  }
37754
+
37755
+ this.handleAutoPlay();
37746
37756
  }
37747
37757
 
37748
37758
  prev() {
37759
+ this.stop();
37749
37760
  const {
37750
37761
  activeIndex: stateActiveIndex
37751
37762
  } = this.getStates();
@@ -37760,6 +37771,8 @@ class foundation_CarouselFoundation extends foundation {
37760
37771
 
37761
37772
  this.handleNewActiveIndex(targetIndex);
37762
37773
  }
37774
+
37775
+ this.handleAutoPlay();
37763
37776
  }
37764
37777
 
37765
37778
  destroy() {
@@ -61336,7 +61349,7 @@ class dropdown_Dropdown extends baseComponent_BaseComponent {
61336
61349
 
61337
61350
  const childrenKeyDown = get_default()(children, 'props.onKeyDown');
61338
61351
 
61339
- childrenKeyDown && childrenKeyDown();
61352
+ childrenKeyDown && childrenKeyDown(e);
61340
61353
  }
61341
61354
  }) : children);
61342
61355
  }
@@ -70953,24 +70966,30 @@ class foundation_SelectFoundation extends foundation {
70953
70966
  }
70954
70967
 
70955
70968
  clearInput() {
70956
- this._adapter.updateInputValue('');
70969
+ const {
70970
+ inputValue
70971
+ } = this.getStates(); // only when input is not null, select should notifySearch and updateOptions
70957
70972
 
70958
- this._adapter.notifySearch(''); // reset options filter
70973
+ if (inputValue !== '') {
70974
+ this._adapter.updateInputValue('');
70959
70975
 
70976
+ this._adapter.notifySearch(''); // reset options filter
70960
70977
 
70961
- const {
70962
- options
70963
- } = this.getStates();
70964
- const {
70965
- remote
70966
- } = this.getProps();
70967
- let optionsAfterFilter = options;
70968
70978
 
70969
- if (!remote) {
70970
- optionsAfterFilter = this._filterOption(options, '');
70971
- }
70979
+ const {
70980
+ options
70981
+ } = this.getStates();
70982
+ const {
70983
+ remote
70984
+ } = this.getProps();
70985
+ let optionsAfterFilter = options;
70972
70986
 
70973
- this._adapter.updateOptions(optionsAfterFilter);
70987
+ if (!remote) {
70988
+ optionsAfterFilter = this._filterOption(options, '');
70989
+ }
70990
+
70991
+ this._adapter.updateOptions(optionsAfterFilter);
70992
+ }
70974
70993
  }
70975
70994
 
70976
70995
  focusInput() {
@@ -82865,7 +82884,8 @@ class HeadTable_HeadTable extends external_root_React_commonjs2_react_commonjs_r
82865
82884
  onDidUpdate,
82866
82885
  showHeader,
82867
82886
  anyColumnFixed,
82868
- bodyHasScrollBar
82887
+ bodyHasScrollBar,
82888
+ sticky
82869
82889
  } = this.props;
82870
82890
 
82871
82891
  if (!showHeader) {
@@ -82896,10 +82916,20 @@ class HeadTable_HeadTable extends external_root_React_commonjs2_react_commonjs_r
82896
82916
  components: components,
82897
82917
  onDidUpdate: onDidUpdate
82898
82918
  }));
82919
+ const headTableCls = classnames_default()("".concat(prefixCls, "-header"), {
82920
+ ["".concat(prefixCls, "-header-sticky")]: sticky
82921
+ });
82922
+
82923
+ const stickyTop = get_default()(sticky, 'top', 0);
82924
+
82925
+ if (typeof stickyTop === 'number') {
82926
+ headStyle.top = stickyTop;
82927
+ }
82928
+
82899
82929
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
82900
82930
  key: "headTable",
82901
82931
  style: headStyle,
82902
- className: "".concat(prefixCls, "-header"),
82932
+ className: headTableCls,
82903
82933
  ref: forwardedRef,
82904
82934
  onScroll: handleBodyScroll
82905
82935
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Table, {
@@ -85869,7 +85899,8 @@ class Table_Table extends baseComponent_BaseComponent {
85869
85899
  rowSelection,
85870
85900
  dataSource,
85871
85901
  bodyHasScrollBar,
85872
- disabledRowKeysSet
85902
+ disabledRowKeysSet,
85903
+ sticky
85873
85904
  } = props;
85874
85905
 
85875
85906
  const selectedRowKeysSet = get_default()(rowSelection, 'selectedRowKeysSet', new Set());
@@ -85888,7 +85919,8 @@ class Table_Table extends baseComponent_BaseComponent {
85888
85919
  selectedRowKeysSet: selectedRowKeysSet,
85889
85920
  onHeaderRow: onHeaderRow,
85890
85921
  dataSource: dataSource,
85891
- bodyHasScrollBar: bodyHasScrollBar
85922
+ bodyHasScrollBar: bodyHasScrollBar,
85923
+ sticky: sticky
85892
85924
  }) : null;
85893
85925
  const bodyTable = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(table_Body, Object.assign({}, omit_default()(props, ['rowSelection', 'headWidths']), {
85894
85926
  key: "body",
@@ -86207,13 +86239,18 @@ class Table_Table extends baseComponent_BaseComponent {
86207
86239
  isAnyColumnFixed: columns => some_default()(this.getColumns(columns || this.props.columns, this.props.children), column => Boolean(column.fixed)),
86208
86240
  useFixedHeader: () => {
86209
86241
  const {
86210
- scroll
86242
+ scroll,
86243
+ sticky
86211
86244
  } = this.props;
86212
86245
 
86213
86246
  if (get_default()(scroll, 'y')) {
86214
86247
  return true;
86215
86248
  }
86216
86249
 
86250
+ if (sticky) {
86251
+ return true;
86252
+ }
86253
+
86217
86254
  return false;
86218
86255
  },
86219
86256
  setHeadWidths: function (headWidths) {
@@ -96962,6 +96999,15 @@ class upload_Upload extends baseComponent_BaseComponent {
96962
96999
  } = this.state;
96963
97000
  this.foundation.startUpload(fileList);
96964
97001
  };
97002
+ /**
97003
+ * ref method
97004
+ * manual open file select dialog
97005
+ */
97006
+
97007
+
97008
+ this.openFileDialog = () => {
97009
+ this.onClick();
97010
+ };
96965
97011
 
96966
97012
  this.renderFile = (file, index, locale) => {
96967
97013
  const {