@douyinfe/semi-ui 2.1.0-beta.1 → 2.1.0-beta.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.
Files changed (42) hide show
  1. package/dist/css/semi.css +1 -13
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +73 -197
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/es/button/index.d.ts +1 -0
  8. package/lib/es/button/index.js +2 -1
  9. package/lib/es/cascader/index.d.ts +0 -1
  10. package/lib/es/cascader/index.js +3 -15
  11. package/lib/es/datePicker/index.d.ts +1 -1
  12. package/lib/es/datePicker/yearAndMonth.js +1 -1
  13. package/lib/es/iconButton/index.d.ts +1 -0
  14. package/lib/es/iconButton/index.js +1 -0
  15. package/lib/es/navigation/index.d.ts +1 -1
  16. package/lib/es/popconfirm/index.d.ts +1 -5
  17. package/lib/es/popconfirm/index.js +4 -10
  18. package/lib/es/popover/index.d.ts +1 -3
  19. package/lib/es/popover/index.js +8 -4
  20. package/lib/es/radio/context.d.ts +1 -1
  21. package/lib/es/radio/radio.d.ts +2 -2
  22. package/lib/es/radio/radioGroup.d.ts +4 -4
  23. package/lib/es/select/index.js +9 -16
  24. package/lib/es/select/option.js +2 -2
  25. package/lib/es/select/utils.d.ts +1 -1
  26. package/lib/es/select/utils.js +4 -10
  27. package/lib/es/table/interface.d.ts +2 -1
  28. package/lib/es/tabs/TabBar.d.ts +2 -4
  29. package/lib/es/tabs/TabBar.js +4 -12
  30. package/lib/es/tabs/TabPane.d.ts +1 -2
  31. package/lib/es/tabs/TabPane.js +2 -3
  32. package/lib/es/tabs/index.d.ts +2 -4
  33. package/lib/es/tabs/index.js +14 -83
  34. package/lib/es/tabs/interface.d.ts +1 -6
  35. package/lib/es/tagInput/index.d.ts +0 -3
  36. package/lib/es/tagInput/index.js +1 -6
  37. package/lib/es/toast/index.d.ts +1 -1
  38. package/lib/es/tooltip/index.d.ts +0 -3
  39. package/lib/es/tooltip/index.js +0 -3
  40. package/lib/es/tree/interface.d.ts +2 -2
  41. package/lib/es/treeSelect/index.d.ts +11 -2
  42. package/package.json +8 -8
@@ -20419,9 +20419,6 @@ class foundation_Tooltip extends foundation {
20419
20419
  this._adapter.insertPortal(content, position);
20420
20420
 
20421
20421
  if (trigger === 'custom') {
20422
- // eslint-disable-next-line
20423
- this._adapter.registerClickOutsideHandler(() => {});
20424
-
20425
20422
  this._togglePortalVisible(true);
20426
20423
  }
20427
20424
  /**
@@ -20544,12 +20541,12 @@ class foundation_Tooltip extends foundation {
20544
20541
  }
20545
20542
 
20546
20543
  _bindEvent() {
20547
- const trigger = this.getProp('trigger'); // get trigger type
20544
+ const types = this.getProp('trigger'); // get trigger type
20548
20545
 
20549
20546
  const {
20550
20547
  triggerEventSet,
20551
20548
  portalEventSet
20552
- } = this._generateEvent(trigger);
20549
+ } = this._generateEvent(types);
20553
20550
 
20554
20551
  this._bindTriggerEvent(triggerEventSet);
20555
20552
 
@@ -23662,7 +23659,6 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
23662
23659
  popupEl = external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default.a.findDOMNode(popupEl);
23663
23660
 
23664
23661
  if (el && !el.contains(e.target) && popupEl && !popupEl.contains(e.target) || this.props.clickTriggerToHide) {
23665
- this.props.onClickOutSide(e);
23666
23662
  cb();
23667
23663
  }
23668
23664
  };
@@ -23861,7 +23857,6 @@ tooltip_Tooltip.propTypes = {
23861
23857
  content: prop_types_default.a.node,
23862
23858
  prefixCls: prop_types_default.a.string,
23863
23859
  onVisibleChange: prop_types_default.a.func,
23864
- onClickOutSide: prop_types_default.a.func,
23865
23860
  spacing: prop_types_default.a.number,
23866
23861
  showArrow: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.node]),
23867
23862
  zIndex: prop_types_default.a.number,
@@ -23887,7 +23882,6 @@ tooltip_Tooltip.defaultProps = {
23887
23882
  mouseEnterDelay: numbers.MOUSE_ENTER_DELAY,
23888
23883
  mouseLeaveDelay: numbers.MOUSE_LEAVE_DELAY,
23889
23884
  onVisibleChange: lodash_es_noop,
23890
- onClickOutSide: lodash_es_noop,
23891
23885
  spacing: numbers.SPACING,
23892
23886
  showArrow: true,
23893
23887
  arrowBounding: numbers.ARROW_BOUNDING
@@ -26162,6 +26156,7 @@ const IconUpload_IconComponent = convertIcon(IconUpload_SvgComponent, 'upload');
26162
26156
 
26163
26157
 
26164
26158
 
26159
+
26165
26160
 
26166
26161
 
26167
26162
  // CONCATENATED MODULE: ../semi-icons/lib/es/index.js
@@ -26863,11 +26858,17 @@ var popover_rest = undefined && undefined.__rest || function (s, e) {
26863
26858
 
26864
26859
 
26865
26860
 
26866
-
26867
26861
  const popover_positionSet = popover_constants_strings.POSITION_SET;
26868
26862
  const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
26869
26863
 
26870
26864
  class popover_Popover extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
26865
+ constructor(props) {
26866
+ super(props);
26867
+ this.state = {
26868
+ popConfirmVisible: false
26869
+ };
26870
+ }
26871
+
26871
26872
  renderPopCard() {
26872
26873
  const {
26873
26874
  content,
@@ -26943,7 +26944,6 @@ popover_Popover.propTypes = {
26943
26944
  trigger: prop_types_default.a.oneOf(popover_triggerSet).isRequired,
26944
26945
  contentClassName: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
26945
26946
  onVisibleChange: prop_types_default.a.func,
26946
- onClickOutSide: prop_types_default.a.func,
26947
26947
  style: prop_types_default.a.object,
26948
26948
  spacing: prop_types_default.a.number,
26949
26949
  zIndex: prop_types_default.a.number,
@@ -26967,8 +26967,7 @@ popover_Popover.defaultProps = {
26967
26967
  cancelText: 'No',
26968
26968
  okText: 'Yes',
26969
26969
  position: 'bottom',
26970
- prefixCls: popover_constants_cssClasses.PREFIX,
26971
- onClickOutSide: lodash_es_noop
26970
+ prefixCls: popover_constants_cssClasses.PREFIX
26972
26971
  };
26973
26972
  /* harmony default export */ var popover_0 = (popover_Popover);
26974
26973
  // CONCATENATED MODULE: ./typography/util.tsx
@@ -31452,14 +31451,14 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
31452
31451
  style: style
31453
31452
  }, showTick ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31454
31453
  className: selectedIconClassName
31455
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, Object(isString["a" /* default */])(children) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31454
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTick, null)) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
31456
31455
  className: "".concat(prefixCls, "-text")
31457
31456
  }, this.renderOptionContent({
31458
31457
  children,
31459
31458
  config,
31460
31459
  inputValue,
31461
31460
  prefixCls
31462
- })) : children);
31461
+ })));
31463
31462
  }
31464
31463
 
31465
31464
  }
@@ -32653,6 +32652,7 @@ iconButton_IconButton.propTypes = {
32653
32652
  loading: prop_types_default.a.bool,
32654
32653
  prefixCls: prop_types_default.a.string,
32655
32654
  icon: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.string, prop_types_default.a.node]),
32655
+ iconType: prop_types_default.a.element,
32656
32656
  iconSize: prop_types_default.a.oneOf(iconSizes),
32657
32657
  noHorizontalPadding: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string, prop_types_default.a.array]),
32658
32658
  children: prop_types_default.a.node,
@@ -33668,7 +33668,8 @@ class button_Button extends external_root_React_commonjs2_react_commonjs_react_a
33668
33668
  render() {
33669
33669
  const props = assign_default()({}, this.props);
33670
33670
 
33671
- const hasIcon = Boolean(props.icon);
33671
+ const hasIcon = Boolean(props.icon || props.iconType); // TODO: iconType needs to be confirmed
33672
+
33672
33673
  const isLoading = Boolean(props.loading);
33673
33674
  const isDisabled = Boolean(props.disabled);
33674
33675
 
@@ -41192,7 +41193,6 @@ function max_max(array) {
41192
41193
 
41193
41194
 
41194
41195
 
41195
-
41196
41196
  /**
41197
41197
  * Part of the utils function implementation process reference
41198
41198
  * https://github.com/react-component/tree/blob/master/src/util.tsx
@@ -41695,9 +41695,7 @@ function normalizeKeyList(keyList, keyEntities) {
41695
41695
  res.push(key);
41696
41696
  });
41697
41697
  } else {
41698
- var _context8;
41699
-
41700
- res = filter_default()(_context8 = from_default()(keyList)).call(_context8, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
41698
+ res = filter_default()(keyList).call(keyList, key => keyEntities[key] && !treeUtil_isValid(keyEntities[key].children));
41701
41699
  }
41702
41700
 
41703
41701
  return res;
@@ -41706,9 +41704,9 @@ function getMotionKeys(eventKey, expandedKeys, keyEntities) {
41706
41704
  const res = [];
41707
41705
 
41708
41706
  const getChild = itemKey => {
41709
- var _context9;
41707
+ var _context8;
41710
41708
 
41711
- keyEntities[itemKey].children && for_each_default()(_context9 = keyEntities[itemKey].children).call(_context9, item => {
41709
+ keyEntities[itemKey].children && for_each_default()(_context8 = keyEntities[itemKey].children).call(_context8, item => {
41712
41710
  const {
41713
41711
  key
41714
41712
  } = item;
@@ -41824,7 +41822,7 @@ function calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedK
41824
41822
  };
41825
41823
  }
41826
41824
  function filterTreeData(info) {
41827
- var _context10, _context11;
41825
+ var _context9, _context10;
41828
41826
 
41829
41827
  const {
41830
41828
  showFilteredOnly,
@@ -41836,7 +41834,7 @@ function filterTreeData(info) {
41836
41834
  prevExpandedKeys
41837
41835
  } = info;
41838
41836
  let filteredOptsKeys = [];
41839
- filteredOptsKeys = map_default()(_context10 = filter_default()(_context11 = values_default()(keyEntities)).call(_context11, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context10, item => item.key);
41837
+ filteredOptsKeys = map_default()(_context9 = filter_default()(_context10 = values_default()(keyEntities)).call(_context10, item => treeUtil_filter(inputValue, item.data, filterTreeNode, filterProps))).call(_context9, item => item.key);
41840
41838
  let expandedOptsKeys = findAncestorKeys(filteredOptsKeys, keyEntities, false);
41841
41839
 
41842
41840
  if (prevExpandedKeys.length) {
@@ -41877,9 +41875,9 @@ function updateKeys(keySet, keyEntities) {
41877
41875
  return filter_default()(keyArr).call(keyArr, key => key in keyEntities);
41878
41876
  }
41879
41877
  function calcDisabledKeys(keyEntities) {
41880
- var _context12;
41878
+ var _context11;
41881
41879
 
41882
- const disabledKeys = filter_default()(_context12 = keys_default()(keyEntities)).call(_context12, key => keyEntities[key].data.disabled);
41880
+ const disabledKeys = filter_default()(_context11 = keys_default()(keyEntities)).call(_context11, key => keyEntities[key].data.disabled);
41883
41881
 
41884
41882
  const {
41885
41883
  checkedKeys
@@ -44363,8 +44361,6 @@ class foundation_TagInputFoundation extends foundation {
44363
44361
 
44364
44362
  this._onRemove(newTagList, removedTag, length - 1);
44365
44363
  }
44366
-
44367
- this._adapter.notifyKeyDown(e);
44368
44364
  };
44369
44365
  }
44370
44366
 
@@ -44624,9 +44620,6 @@ class tagInput_TagInput extends baseComponent_BaseComponent {
44624
44620
  },
44625
44621
  notifyTagRemove: (v, idx) => {
44626
44622
  this.props.onRemove(v, idx);
44627
- },
44628
- notifyKeyDown: e => {
44629
- this.props.onKeyDown(e);
44630
44623
  }
44631
44624
  });
44632
44625
  }
@@ -44875,7 +44868,6 @@ tagInput_TagInput.propTypes = {
44875
44868
  onInputExceed: prop_types_default.a.func,
44876
44869
  onAdd: prop_types_default.a.func,
44877
44870
  onRemove: prop_types_default.a.func,
44878
- onKeyDown: prop_types_default.a.func,
44879
44871
  size: prop_types_default.a.oneOf(tagInput_constants_strings.SIZE_SET),
44880
44872
  validateStatus: prop_types_default.a.oneOf(tagInput_constants_strings.STATUS),
44881
44873
  prefix: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.node]),
@@ -44898,8 +44890,7 @@ tagInput_TagInput.defaultProps = {
44898
44890
  onExceed: lodash_es_noop,
44899
44891
  onInputExceed: lodash_es_noop,
44900
44892
  onAdd: lodash_es_noop,
44901
- onRemove: lodash_es_noop,
44902
- onKeyDown: lodash_es_noop
44893
+ onRemove: lodash_es_noop
44903
44894
  };
44904
44895
  /* harmony default export */ var tagInput_0 = (tagInput_TagInput);
44905
44896
  // CONCATENATED MODULE: ./cascader/index.tsx
@@ -44930,7 +44921,6 @@ tagInput_TagInput.defaultProps = {
44930
44921
 
44931
44922
 
44932
44923
 
44933
-
44934
44924
 
44935
44925
 
44936
44926
  const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
@@ -45179,27 +45169,15 @@ class cascader_Cascader extends baseComponent_BaseComponent {
45179
45169
  this.renderCustomTrigger = () => {
45180
45170
  const {
45181
45171
  disabled,
45182
- triggerRender,
45183
- multiple,
45184
- autoMergeValue
45172
+ triggerRender
45185
45173
  } = this.props;
45186
45174
  const {
45187
45175
  selectedKeys,
45188
45176
  inputValue,
45189
- inputPlaceHolder,
45190
- mergedCheckedKeys,
45191
- checkedKeys
45177
+ inputPlaceHolder
45192
45178
  } = this.state;
45193
- let realValue;
45194
-
45195
- if (multiple) {
45196
- realValue = autoMergeValue ? mergedCheckedKeys : checkedKeys;
45197
- } else {
45198
- realValue = [...selectedKeys][0];
45199
- }
45200
-
45201
45179
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, {
45202
- value: realValue,
45180
+ value: [...selectedKeys][0],
45203
45181
  inputValue: inputValue,
45204
45182
  onChange: this.handleInputChange,
45205
45183
  onClear: this.handleClear,
@@ -57085,7 +57063,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
57085
57063
  className: prefix
57086
57064
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
57087
57065
  noHorizontalPadding: false,
57088
- icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
57066
+ iconType: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
57089
57067
  size: iconSize
57090
57068
  }),
57091
57069
  size: buttonSize,
@@ -69921,14 +69899,12 @@ class foundation_SelectFoundation extends foundation {
69921
69899
  let optionNotExist = {
69922
69900
  value: propValue,
69923
69901
  label: propValue,
69924
- _notExist: true,
69925
- _scrollIndex: -1
69902
+ _notExist: true
69926
69903
  };
69927
69904
 
69928
69905
  if (onChangeWithObject) {
69929
69906
  optionNotExist = assign_default()(assign_default()({}, propValue), {
69930
- _notExist: true,
69931
- _scrollIndex: -1
69907
+ _notExist: true
69932
69908
  });
69933
69909
  }
69934
69910
 
@@ -69987,9 +69963,7 @@ class foundation_SelectFoundation extends foundation {
69987
69963
  onChangeWithObject ? optionNotExist = assign_default()(assign_default()({}, propValue[i]), {
69988
69964
  _notExist: true
69989
69965
  }) : null;
69990
- selections.set(optionNotExist.label, assign_default()(assign_default()({}, optionNotExist), {
69991
- _scrollIndex: -1
69992
- }));
69966
+ selections.set(optionNotExist.label, optionNotExist);
69993
69967
  }
69994
69968
  }
69995
69969
  });
@@ -70174,7 +70148,7 @@ class foundation_SelectFoundation extends foundation {
70174
70148
  this._adapter.notifyMaxLimit(assign_default()({
70175
70149
  value,
70176
70150
  label
70177
- }, lodash_es_omit(rest, '_scrollIndex')));
70151
+ }, rest));
70178
70152
 
70179
70153
  return;
70180
70154
  } else {
@@ -70675,7 +70649,6 @@ class foundation_SelectFoundation extends foundation {
70675
70649
  delete option._parentGroup;
70676
70650
  delete option._show;
70677
70651
  delete option._selected;
70678
- delete option._scrollIndex;
70679
70652
 
70680
70653
  if ('_keyInOptionList' in option) {
70681
70654
  option.key = option._keyInOptionList;
@@ -71012,7 +70985,7 @@ var utils_rest = undefined && undefined.__rest || function (s, e) {
71012
70985
 
71013
70986
 
71014
70987
 
71015
- const generateOption = (child, parent, index) => {
70988
+ const generateOption = (child, parent) => {
71016
70989
  const childProps = child.props;
71017
70990
 
71018
70991
  if (!child || !childProps) {
@@ -71024,8 +70997,7 @@ const generateOption = (child, parent, index) => {
71024
70997
  // Drop-down menu rendering priority label value, children, value in turn downgrade
71025
70998
  label: childProps.label || childProps.children || childProps.value,
71026
70999
  _show: true,
71027
- _selected: false,
71028
- _scrollIndex: index
71000
+ _selected: false
71029
71001
  }, childProps), {
71030
71002
  _parentGroup: parent
71031
71003
  });
@@ -71048,13 +71020,11 @@ const getOptionsFromGroup = selectChildren => {
71048
71020
  const childNodes = filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(selectChildren)).call(_context, childNode => childNode && childNode.props);
71049
71021
 
71050
71022
  let type = '';
71051
- let optionIndex = -1;
71052
71023
 
71053
71024
  for_each_default()(childNodes).call(childNodes, child => {
71054
71025
  if (child.type.isSelectOption) {
71055
71026
  type = 'option';
71056
- optionIndex++;
71057
- const option = generateOption(child, undefined, optionIndex);
71027
+ const option = generateOption(child);
71058
71028
  emptyGroup.children.push(option);
71059
71029
  options.push(option);
71060
71030
  } else if (child.type.isSelectOptionGroup) {
@@ -71069,10 +71039,7 @@ const getOptionsFromGroup = selectChildren => {
71069
71039
 
71070
71040
  children = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children);
71071
71041
 
71072
- const childrenOption = map_default()(children).call(children, option => {
71073
- optionIndex++;
71074
- return generateOption(option, restGroupProps, optionIndex);
71075
- });
71042
+ const childrenOption = map_default()(children).call(children, option => generateOption(option, restGroupProps));
71076
71043
 
71077
71044
  const group = assign_default()(assign_default()({}, child.props), {
71078
71045
  children: childrenOption,
@@ -71337,10 +71304,9 @@ class select_Select extends baseComponent_BaseComponent {
71337
71304
  } = _this.props;
71338
71305
 
71339
71306
  if (optionList && optionList.length) {
71340
- options = map_default()(optionList).call(optionList, (itemOpt, index) => assign_default()({
71307
+ options = map_default()(optionList).call(optionList, itemOpt => assign_default()({
71341
71308
  _show: true,
71342
- _selected: false,
71343
- _scrollIndex: index
71309
+ _selected: false
71344
71310
  }, itemOpt));
71345
71311
  optionGroups[0] = {
71346
71312
  children: options,
@@ -71915,21 +71881,15 @@ class select_Select extends baseComponent_BaseComponent {
71915
71881
  }
71916
71882
 
71917
71883
  if (virtualize) {
71918
- let minItemIndex = -1;
71919
-
71920
- for_each_default()(selections).call(selections, item => {
71921
- const itemIndex = Object(lodash_es_get["a" /* default */])(item, '_scrollIndex');
71922
- /* When the itemIndex is legal */
71884
+ let minKey;
71923
71885
 
71924
- if (lodash_es_isNumber(itemIndex) && itemIndex >= 0) {
71925
- minItemIndex = minItemIndex !== -1 && minItemIndex < itemIndex ? minItemIndex : itemIndex;
71926
- }
71886
+ for_each_default()(selections).call(selections, (v, k) => {
71887
+ const tempKey = Number(String(k).match(/option-(.*)/)[1]);
71888
+ minKey = typeof minKey === 'number' && minKey < tempKey ? minKey : tempKey;
71927
71889
  });
71928
71890
 
71929
- if (minItemIndex !== -1) {
71930
- try {
71931
- this.virtualizeListRef.current.scrollToItem(minItemIndex, 'center');
71932
- } catch (error) {}
71891
+ if (minKey) {
71892
+ this.virtualizeListRef.current.scrollToItem(minKey, 'center');
71933
71893
  }
71934
71894
  } else {
71935
71895
  this.foundation.updateScrollTop();
@@ -72697,10 +72657,6 @@ class popconfirmFoundation_PopConfirmFoundation extends foundation {
72697
72657
  this.handleVisibleChange(false);
72698
72658
  }
72699
72659
 
72700
- handleClickOutSide(e) {
72701
- this._adapter.notifyClickOutSide(e);
72702
- }
72703
-
72704
72660
  handleVisibleChange(visible) {
72705
72661
  if (!this._isControlledComponent('visible')) {
72706
72662
  this._adapter.setVisible(visible);
@@ -72754,8 +72710,6 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72754
72710
 
72755
72711
  this.handleVisibleChange = visible => this.foundation.handleVisibleChange(visible);
72756
72712
 
72757
- this.handleClickOutSide = e => this.foundation.handleClickOutSide(e);
72758
-
72759
72713
  this.stopImmediatePropagation = e => e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation();
72760
72714
 
72761
72715
  this.state = {
@@ -72784,8 +72738,7 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72784
72738
  }),
72785
72739
  notifyConfirm: e => this.props.onConfirm(e),
72786
72740
  notifyCancel: e => this.props.onCancel(e),
72787
- notifyVisibleChange: visible => this.props.onVisibleChange(visible),
72788
- notifyClickOutSide: e => this.props.onClickOutSide(e)
72741
+ notifyVisibleChange: visible => this.props.onVisibleChange(visible)
72789
72742
  });
72790
72743
  }
72791
72744
 
@@ -72884,8 +72837,7 @@ class popconfirm_Popconfirm extends baseComponent_BaseComponent {
72884
72837
  const popContent = this.renderConfirmPopCard();
72885
72838
  const popProps = {
72886
72839
  onVisibleChange: this.handleVisibleChange,
72887
- className: popconfirm_constants_cssClasses.POPOVER,
72888
- onClickOutSide: this.handleClickOutSide
72840
+ className: popconfirm_constants_cssClasses.POPOVER
72889
72841
  };
72890
72842
 
72891
72843
  if (this.isControlled('visible')) {
@@ -72916,14 +72868,13 @@ popconfirm_Popconfirm.propTypes = {
72916
72868
  cancelType: prop_types_default.a.string,
72917
72869
  onCancel: prop_types_default.a.func,
72918
72870
  onConfirm: prop_types_default.a.func,
72919
- onClickOutSide: prop_types_default.a.func,
72871
+ zIndex: prop_types_default.a.number,
72920
72872
  onVisibleChange: prop_types_default.a.func,
72921
72873
  visible: prop_types_default.a.bool,
72922
72874
  defaultVisible: prop_types_default.a.bool,
72923
72875
  okButtonProps: prop_types_default.a.object,
72924
72876
  cancelButtonProps: prop_types_default.a.object,
72925
72877
  stopPropagation: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.string]),
72926
- zIndex: prop_types_default.a.number,
72927
72878
  // private
72928
72879
  trigger: prop_types_default.a.string,
72929
72880
  position: prop_types_default.a.string
@@ -72942,8 +72893,7 @@ popconfirm_Popconfirm.defaultProps = {
72942
72893
  prefixCls: popconfirm_constants_cssClasses.PREFIX,
72943
72894
  zIndex: popconfirm_constants_numbers.DEFAULT_Z_INDEX,
72944
72895
  onCancel: lodash_es_noop,
72945
- onConfirm: lodash_es_noop,
72946
- onClickOutSide: lodash_es_noop
72896
+ onConfirm: lodash_es_noop
72947
72897
  };
72948
72898
  // CONCATENATED MODULE: ../semi-foundation/progress/constants.ts
72949
72899
 
@@ -85646,11 +85596,15 @@ class foundation_TabsFoundation extends foundation {
85646
85596
  handleTabPanesChange() {
85647
85597
  this._adapter.collectPane();
85648
85598
 
85649
- this._adapter.collectActiveKey();
85650
- }
85599
+ let activeKey = this.getState('activeKey');
85600
+
85601
+ if (typeof activeKey === 'undefined') {
85602
+ activeKey = this._adapter.getDefaultActiveKeyFromChildren();
85603
+ }
85651
85604
 
85652
- handleTabDelete(tabKey) {
85653
- this._adapter.notifyTabDelete(tabKey);
85605
+ if (typeof activeKey !== 'undefined') {
85606
+ this.handleNewActiveKey(activeKey);
85607
+ }
85654
85608
  }
85655
85609
 
85656
85610
  }
@@ -85713,15 +85667,9 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
85713
85667
 
85714
85668
  this.renderTabItem = panel => {
85715
85669
  const {
85716
- size,
85717
- type,
85718
- deleteTabItem
85670
+ size
85719
85671
  } = this.props;
85720
85672
  const panelIcon = panel.icon ? this.renderIcon(panel.icon) : null;
85721
- const closableIcon = type === 'card' && panel.closable ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
85722
- className: "".concat(tabs_constants_cssClasses.TABS_TAB, "-icon-close"),
85723
- onClick: e => deleteTabItem(panel.itemKey, e)
85724
- }) : null;
85725
85673
  let events = {};
85726
85674
  const key = panel.itemKey;
85727
85675
 
@@ -85744,7 +85692,7 @@ class TabBar_TabBar extends external_root_React_commonjs2_react_commonjs_react_a
85744
85692
  }, events, {
85745
85693
  className: className,
85746
85694
  key: this._getItemKey(key)
85747
- }), panelIcon, panel.tab, closableIcon);
85695
+ }), panelIcon, panel.tab);
85748
85696
  };
85749
85697
 
85750
85698
  this.renderTabComponents = list => map_default()(list).call(list, panel => this.renderTabItem(panel));
@@ -85946,9 +85894,7 @@ TabBar_TabBar.propTypes = {
85946
85894
  style: prop_types_default.a.object,
85947
85895
  tabBarExtraContent: prop_types_default.a.node,
85948
85896
  tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
85949
- type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
85950
- closable: prop_types_default.a.bool,
85951
- deleteTabItem: prop_types_default.a.func
85897
+ type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
85952
85898
  };
85953
85899
  /* harmony default export */ var tabs_TabBar = (TabBar_TabBar);
85954
85900
  // CONCATENATED MODULE: ./tabs/tabs-context.ts
@@ -86194,8 +86140,7 @@ TabPane_TabPane.propTypes = {
86194
86140
  disabled: prop_types_default.a.bool,
86195
86141
  itemKey: prop_types_default.a.string,
86196
86142
  tab: prop_types_default.a.node,
86197
- icon: prop_types_default.a.node,
86198
- closable: prop_types_default.a.bool
86143
+ icon: prop_types_default.a.node
86199
86144
  };
86200
86145
  /* harmony default export */ var tabs_TabPane = (TabPane_TabPane);
86201
86146
  // CONCATENATED MODULE: ./tabs/index.tsx
@@ -86209,7 +86154,6 @@ TabPane_TabPane.propTypes = {
86209
86154
 
86210
86155
 
86211
86156
 
86212
-
86213
86157
  var tabs_rest = undefined && undefined.__rest || function (s, e) {
86214
86158
  var t = {};
86215
86159
 
@@ -86289,11 +86233,6 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86289
86233
  });
86290
86234
  };
86291
86235
 
86292
- this.deleteTabItem = (tabKey, event) => {
86293
- event.stopPropagation();
86294
- this.foundation.handleTabDelete(tabKey);
86295
- };
86296
-
86297
86236
  this.foundation = new tabs_foundation(this.adapter);
86298
86237
  this.state = {
86299
86238
  activeKey: this.foundation.getDefaultActiveKey(),
@@ -86326,15 +86265,13 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86326
86265
  tab,
86327
86266
  icon,
86328
86267
  disabled,
86329
- itemKey,
86330
- closable
86268
+ itemKey
86331
86269
  } = child.props;
86332
86270
  return {
86333
86271
  tab,
86334
86272
  icon,
86335
86273
  disabled,
86336
- itemKey,
86337
- closable
86274
+ itemKey
86338
86275
  };
86339
86276
  }
86340
86277
 
@@ -86345,61 +86282,6 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86345
86282
  panes
86346
86283
  });
86347
86284
  },
86348
- collectActiveKey: () => {
86349
- let panes = [];
86350
- const {
86351
- tabList,
86352
- children,
86353
- activeKey: propsActiveKey
86354
- } = this.props;
86355
-
86356
- if (typeof propsActiveKey !== 'undefined') {
86357
- return;
86358
- }
86359
-
86360
- const {
86361
- activeKey
86362
- } = this.state;
86363
-
86364
- if (is_array_default()(tabList) && tabList.length) {
86365
- panes = tabList;
86366
- } else {
86367
- var _context3;
86368
-
86369
- panes = map_default()(_context3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children).call(_context3, children, child => {
86370
- if (child) {
86371
- const {
86372
- tab,
86373
- icon,
86374
- disabled,
86375
- itemKey,
86376
- closable
86377
- } = child.props;
86378
- return {
86379
- tab,
86380
- icon,
86381
- disabled,
86382
- itemKey,
86383
- closable
86384
- };
86385
- }
86386
-
86387
- return undefined;
86388
- });
86389
- }
86390
-
86391
- if (find_index_default()(panes).call(panes, p => p.itemKey === activeKey) === -1) {
86392
- if (panes.length > 0) {
86393
- this.setState({
86394
- activeKey: panes[0].itemKey
86395
- });
86396
- } else {
86397
- this.setState({
86398
- activeKey: ''
86399
- });
86400
- }
86401
- }
86402
- },
86403
86285
  notifyTabClick: (activeKey, event) => {
86404
86286
  this.props.onTabClick(activeKey, event);
86405
86287
  },
@@ -86412,14 +86294,14 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86412
86294
  });
86413
86295
  },
86414
86296
  getDefaultActiveKeyFromChildren: () => {
86415
- var _context4;
86297
+ var _context3;
86416
86298
 
86417
86299
  const {
86418
86300
  tabList,
86419
86301
  children
86420
86302
  } = this.props;
86421
86303
  let activeKey = '';
86422
- const list = tabList ? tabList : map_default()(_context4 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context4, child => child.props);
86304
+ const list = tabList ? tabList : map_default()(_context3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(children)).call(_context3, child => child.props);
86423
86305
 
86424
86306
  for_each_default()(list).call(list, item => {
86425
86307
  if (item && !activeKey && !item.disabled) {
@@ -86428,9 +86310,6 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86428
86310
  });
86429
86311
 
86430
86312
  return activeKey;
86431
- },
86432
- notifyTabDelete: tabKey => {
86433
- this.props.onTabClose && this.props.onTabClose(tabKey);
86434
86313
  }
86435
86314
  });
86436
86315
  }
@@ -86446,12 +86325,12 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86446
86325
  }
86447
86326
 
86448
86327
  componentDidUpdate(prevProps) {
86449
- var _context5, _context6;
86328
+ var _context4, _context5;
86450
86329
 
86451
86330
  // Panes state acts on tab bar, no need to compare TabPane children
86452
- const prevChildrenProps = map_default()(_context5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context5, child => lodash_es_pick(child.props, panePickKeys));
86331
+ const prevChildrenProps = map_default()(_context4 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context4, child => lodash_es_pick(child.props, panePickKeys));
86453
86332
 
86454
- const nowChildrenProps = map_default()(_context6 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context6, child => lodash_es_pick(child.props, panePickKeys));
86333
+ const nowChildrenProps = map_default()(_context5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context5, child => lodash_es_pick(child.props, panePickKeys));
86455
86334
 
86456
86335
  const isTabListType = this.props.tabList || prevProps.tabList;
86457
86336
 
@@ -86469,7 +86348,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86469
86348
  }
86470
86349
 
86471
86350
  render() {
86472
- var _context7, _context8;
86351
+ var _context6, _context7;
86473
86352
 
86474
86353
  const _a = this.props,
86475
86354
  {
@@ -86497,11 +86376,11 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86497
86376
  } = this.state;
86498
86377
  const tabWrapperCls = classnames_default()(className, {
86499
86378
  [tabs_constants_cssClasses.TABS]: true,
86500
- [concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context7, tabPosition)]: tabPosition
86379
+ [concat_default()(_context6 = "".concat(tabs_constants_cssClasses.TABS, "-")).call(_context6, tabPosition)]: tabPosition
86501
86380
  });
86502
86381
  const tabContentCls = classnames_default()({
86503
86382
  [tabs_constants_cssClasses.TABS_CONTENT]: true,
86504
- [concat_default()(_context8 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context8, tabPosition)]: tabPosition
86383
+ [concat_default()(_context7 = "".concat(tabs_constants_cssClasses.TABS_CONTENT, "-")).call(_context7, tabPosition)]: tabPosition
86505
86384
  });
86506
86385
  const tabBarProps = {
86507
86386
  activeKey,
@@ -86513,8 +86392,7 @@ class tabs_Tabs extends baseComponent_BaseComponent {
86513
86392
  style: tabBarStyle,
86514
86393
  tabBarExtraContent,
86515
86394
  tabPosition,
86516
- type,
86517
- deleteTabItem: this.deleteTabItem
86395
+ type
86518
86396
  };
86519
86397
  const tabBar = renderTabBar ? renderTabBar(tabBarProps, tabs_TabBar) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tabs_TabBar, assign_default()({}, tabBarProps));
86520
86398
  const content = keepDOM ? children : this.getActiveItem();
@@ -86559,8 +86437,7 @@ tabs_Tabs.propTypes = {
86559
86437
  tabList: prop_types_default.a.array,
86560
86438
  tabPaneMotion: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object, prop_types_default.a.func]),
86561
86439
  tabPosition: prop_types_default.a.oneOf(tabs_constants_strings.POSITION_MAP),
86562
- type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP),
86563
- onTabClose: prop_types_default.a.func
86440
+ type: prop_types_default.a.oneOf(tabs_constants_strings.TYPE_MAP)
86564
86441
  };
86565
86442
  tabs_Tabs.defaultProps = {
86566
86443
  children: [],
@@ -86572,8 +86449,7 @@ tabs_Tabs.defaultProps = {
86572
86449
  size: 'large',
86573
86450
  tabPaneMotion: true,
86574
86451
  tabPosition: 'top',
86575
- type: 'line',
86576
- onTabClose: () => undefined
86452
+ type: 'line'
86577
86453
  };
86578
86454
  /* harmony default export */ var tabs_0 = (tabs_Tabs);
86579
86455
  // EXTERNAL MODULE: ../semi-foundation/timeline/timeline.scss