@douyinfe/semi-ui 2.44.1 → 2.45.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.
@@ -18642,13 +18642,21 @@ class foundation_Tooltip extends foundation {
18642
18642
  const containerRect = (isEmpty_default()(props.containerRect) ? props.containerRect : this._adapter.getPopupContainerRect()) || Object.assign({}, defaultRect);
18643
18643
  const wrapperRect = (isEmpty_default()(props.wrapperRect) ? props.wrapperRect : this._adapter.getWrapperBounding()) || Object.assign({}, defaultRect);
18644
18644
  const position = props.position != null ? props.position : this.getProp('position');
18645
- const SPACING = spacing != null ? spacing : this.getProp('spacing');
18645
+ const RAW_SPACING = spacing != null ? spacing : this.getProp('spacing');
18646
18646
  const {
18647
18647
  arrowPointAtCenter,
18648
18648
  showArrow,
18649
18649
  arrowBounding
18650
18650
  } = this.getProps();
18651
18651
  const pointAtCenter = showArrow && arrowPointAtCenter;
18652
+ let SPACING = RAW_SPACING;
18653
+ let ANO_SPACING = 0;
18654
+ if (typeof RAW_SPACING !== 'number') {
18655
+ // extended spacing api with {x: number, y: number}, the axes of the spacing is determined based on the position
18656
+ const isTopOrBottom = position.includes('top') || position.includes('bottom');
18657
+ SPACING = isTopOrBottom ? RAW_SPACING.y : RAW_SPACING.x;
18658
+ ANO_SPACING = isTopOrBottom ? RAW_SPACING.x : RAW_SPACING.y;
18659
+ }
18652
18660
  const horizontalArrowWidth = get_default()(arrowBounding, 'width', 24);
18653
18661
  const verticalArrowHeight = get_default()(arrowBounding, 'width', 24);
18654
18662
  const arrowOffsetY = get_default()(arrowBounding, 'offsetY', 0);
@@ -18677,7 +18685,7 @@ class foundation_Tooltip extends foundation {
18677
18685
  case 'top':
18678
18686
  // left = middleX;
18679
18687
  // top = triggerRect.top - SPACING;
18680
- left = isWidthOverFlow ? isTriggerNearLeft ? containerRect.left + wrapperRect.width / 2 : containerRect.right - wrapperRect.width / 2 + offsetWidth : middleX;
18688
+ left = isWidthOverFlow ? isTriggerNearLeft ? containerRect.left + wrapperRect.width / 2 : containerRect.right - wrapperRect.width / 2 + offsetWidth : middleX + ANO_SPACING;
18681
18689
  top = isHeightOverFlow ? containerRect.bottom + offsetHeight : triggerRect.top - SPACING;
18682
18690
  translateX = -0.5;
18683
18691
  translateY = -1;
@@ -18685,14 +18693,14 @@ class foundation_Tooltip extends foundation {
18685
18693
  case 'topLeft':
18686
18694
  // left = pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left;
18687
18695
  // top = triggerRect.top - SPACING;
18688
- left = isWidthOverFlow ? isWrapperWidthOverflow ? containerRect.left : containerRect.right - wrapperRect.width : pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left;
18696
+ left = isWidthOverFlow ? isWrapperWidthOverflow ? containerRect.left : containerRect.right - wrapperRect.width : pointAtCenter ? middleX - offsetXWithArrow + ANO_SPACING : triggerRect.left + ANO_SPACING;
18689
18697
  top = isHeightOverFlow ? containerRect.bottom + offsetHeight : triggerRect.top - SPACING;
18690
18698
  translateY = -1;
18691
18699
  break;
18692
18700
  case 'topRight':
18693
18701
  // left = pointAtCenter ? middleX + offsetXWithArrow : triggerRect.right;
18694
18702
  // top = triggerRect.top - SPACING;
18695
- left = isWidthOverFlow ? containerRect.right + offsetWidth : pointAtCenter ? middleX + offsetXWithArrow : triggerRect.right;
18703
+ left = isWidthOverFlow ? containerRect.right + offsetWidth : pointAtCenter ? middleX + offsetXWithArrow + ANO_SPACING : triggerRect.right + ANO_SPACING;
18696
18704
  top = isHeightOverFlow ? containerRect.bottom + offsetHeight : triggerRect.top - SPACING;
18697
18705
  translateY = -1;
18698
18706
  translateX = -1;
@@ -18702,7 +18710,7 @@ class foundation_Tooltip extends foundation {
18702
18710
  // top = middleY;
18703
18711
  // left = isWidthOverFlow? containerRect.right - SPACING : triggerRect.left - SPACING;
18704
18712
  left = isWidthOverFlow ? containerRect.right + offsetWidth - SPACING + offsetXWithArrow : triggerRect.left - SPACING;
18705
- top = isHeightOverFlow ? isTriggerNearTop ? containerRect.top + wrapperRect.height / 2 : containerRect.bottom - wrapperRect.height / 2 + offsetHeight : middleY;
18713
+ top = isHeightOverFlow ? isTriggerNearTop ? containerRect.top + wrapperRect.height / 2 : containerRect.bottom - wrapperRect.height / 2 + offsetHeight : middleY + ANO_SPACING;
18706
18714
  translateX = -1;
18707
18715
  translateY = -0.5;
18708
18716
  break;
@@ -18710,34 +18718,34 @@ class foundation_Tooltip extends foundation {
18710
18718
  // left = triggerRect.left - SPACING;
18711
18719
  // top = pointAtCenter ? middleY - offsetYWithArrow : triggerRect.top;
18712
18720
  left = isWidthOverFlow ? containerRect.right + offsetWidth - SPACING + offsetXWithArrow : triggerRect.left - SPACING;
18713
- top = isHeightOverFlow ? containerRect.top : pointAtCenter ? middleY - offsetYWithArrow : triggerRect.top;
18721
+ top = isHeightOverFlow ? containerRect.top : pointAtCenter ? middleY - offsetYWithArrow + ANO_SPACING : triggerRect.top + ANO_SPACING;
18714
18722
  translateX = -1;
18715
18723
  break;
18716
18724
  case 'leftBottom':
18717
18725
  // left = triggerRect.left - SPACING;
18718
18726
  // top = pointAtCenter ? middleY + offsetYWithArrow : triggerRect.bottom;
18719
18727
  left = isWidthOverFlow ? containerRect.right + offsetWidth - SPACING + offsetXWithArrow : triggerRect.left - SPACING;
18720
- top = isHeightOverFlow ? containerRect.bottom + offsetHeight : pointAtCenter ? middleY + offsetYWithArrow : triggerRect.bottom;
18728
+ top = isHeightOverFlow ? containerRect.bottom + offsetHeight : pointAtCenter ? middleY + offsetYWithArrow + ANO_SPACING : triggerRect.bottom + ANO_SPACING;
18721
18729
  translateX = -1;
18722
18730
  translateY = -1;
18723
18731
  break;
18724
18732
  case 'bottom':
18725
18733
  // left = middleX;
18726
18734
  // top = triggerRect.top + triggerRect.height + SPACING;
18727
- left = isWidthOverFlow ? isTriggerNearLeft ? containerRect.left + wrapperRect.width / 2 : containerRect.right - wrapperRect.width / 2 + offsetWidth : middleX;
18735
+ left = isWidthOverFlow ? isTriggerNearLeft ? containerRect.left + wrapperRect.width / 2 : containerRect.right - wrapperRect.width / 2 + offsetWidth : middleX + ANO_SPACING;
18728
18736
  top = isHeightOverFlow ? containerRect.top + offsetYWithArrow - SPACING : triggerRect.top + triggerRect.height + SPACING;
18729
18737
  translateX = -0.5;
18730
18738
  break;
18731
18739
  case 'bottomLeft':
18732
18740
  // left = pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left;
18733
18741
  // top = triggerRect.bottom + SPACING;
18734
- left = isWidthOverFlow ? isWrapperWidthOverflow ? containerRect.left : containerRect.right - wrapperRect.width : pointAtCenter ? middleX - offsetXWithArrow : triggerRect.left;
18742
+ left = isWidthOverFlow ? isWrapperWidthOverflow ? containerRect.left : containerRect.right - wrapperRect.width : pointAtCenter ? middleX - offsetXWithArrow + ANO_SPACING : triggerRect.left + ANO_SPACING;
18735
18743
  top = isHeightOverFlow ? containerRect.top + offsetYWithArrow - SPACING : triggerRect.top + triggerRect.height + SPACING;
18736
18744
  break;
18737
18745
  case 'bottomRight':
18738
18746
  // left = pointAtCenter ? middleX + offsetXWithArrow : triggerRect.right;
18739
18747
  // top = triggerRect.bottom + SPACING;
18740
- left = isWidthOverFlow ? containerRect.right + offsetWidth : pointAtCenter ? middleX + offsetXWithArrow : triggerRect.right;
18748
+ left = isWidthOverFlow ? containerRect.right + offsetWidth : pointAtCenter ? middleX + offsetXWithArrow + ANO_SPACING : triggerRect.right + ANO_SPACING;
18741
18749
  top = isHeightOverFlow ? containerRect.top + offsetYWithArrow - SPACING : triggerRect.top + triggerRect.height + SPACING;
18742
18750
  translateX = -1;
18743
18751
  break;
@@ -18745,20 +18753,20 @@ class foundation_Tooltip extends foundation {
18745
18753
  // left = triggerRect.right + SPACING;
18746
18754
  // top = middleY;
18747
18755
  left = isWidthOverFlow ? containerRect.left - SPACING + offsetXWithArrow : triggerRect.right + SPACING;
18748
- top = isHeightOverFlow ? isTriggerNearTop ? containerRect.top + wrapperRect.height / 2 : containerRect.bottom - wrapperRect.height / 2 + offsetHeight : middleY;
18756
+ top = isHeightOverFlow ? isTriggerNearTop ? containerRect.top + wrapperRect.height / 2 : containerRect.bottom - wrapperRect.height / 2 + offsetHeight : middleY + ANO_SPACING;
18749
18757
  translateY = -0.5;
18750
18758
  break;
18751
18759
  case 'rightTop':
18752
18760
  // left = triggerRect.right + SPACING;
18753
18761
  // top = pointAtCenter ? middleY - offsetYWithArrow : triggerRect.top;
18754
18762
  left = isWidthOverFlow ? containerRect.left - SPACING + offsetXWithArrow : triggerRect.right + SPACING;
18755
- top = isHeightOverFlow ? containerRect.top : pointAtCenter ? middleY - offsetYWithArrow : triggerRect.top;
18763
+ top = isHeightOverFlow ? containerRect.top : pointAtCenter ? middleY - offsetYWithArrow + ANO_SPACING : triggerRect.top + ANO_SPACING;
18756
18764
  break;
18757
18765
  case 'rightBottom':
18758
18766
  // left = triggerRect.right + SPACING;
18759
18767
  // top = pointAtCenter ? middleY + offsetYWithArrow : triggerRect.bottom;
18760
18768
  left = isWidthOverFlow ? containerRect.left - SPACING + offsetXWithArrow : triggerRect.right + SPACING;
18761
- top = isHeightOverFlow ? containerRect.bottom + offsetHeight : pointAtCenter ? middleY + offsetYWithArrow : triggerRect.bottom;
18769
+ top = isHeightOverFlow ? containerRect.bottom + offsetHeight : pointAtCenter ? middleY + offsetYWithArrow + ANO_SPACING : triggerRect.bottom + ANO_SPACING;
18762
18770
  translateY = -1;
18763
18771
  break;
18764
18772
  case 'leftTopOver':
@@ -18891,7 +18899,6 @@ class foundation_Tooltip extends foundation {
18891
18899
  innerHeight
18892
18900
  } = window;
18893
18901
  const {
18894
- spacing,
18895
18902
  margin
18896
18903
  } = this.getProps();
18897
18904
  const marginLeft = typeof margin === 'number' ? margin : margin.marginLeft;
@@ -18900,6 +18907,15 @@ class foundation_Tooltip extends foundation {
18900
18907
  const marginBottom = typeof margin === 'number' ? margin : margin.marginBottom;
18901
18908
  let isHeightOverFlow = false;
18902
18909
  let isWidthOverFlow = false;
18910
+ const raw_spacing = this.getProp('spacing');
18911
+ let spacing = raw_spacing;
18912
+ let ano_spacing = 0;
18913
+ if (typeof raw_spacing !== 'number') {
18914
+ // extended spacing api with {x: number, y: number}, the axes of the spacing is determined based on the position
18915
+ const isTopOrBottom = position.includes('top') || position.includes('bottom');
18916
+ spacing = isTopOrBottom ? raw_spacing.y : raw_spacing.x;
18917
+ ano_spacing = isTopOrBottom ? raw_spacing.x : raw_spacing.y;
18918
+ }
18903
18919
  if (wrapperRect.width > 0 && wrapperRect.height > 0) {
18904
18920
  // let clientLeft = left + translateX * wrapperRect.width - containerRect.scrollLeft;
18905
18921
  // let clientTop = top + translateY * wrapperRect.height - containerRect.scrollTop;
@@ -18930,10 +18946,10 @@ class foundation_Tooltip extends foundation {
18930
18946
  const shouldViewReverseRight = restClientRight - marginRight < wrapperRect.width + spacing && clientLeft - marginLeft > wrapperRect.width + spacing;
18931
18947
  const shouldViewReverseTopOver = restClientTop - marginBottom < wrapperRect.height + spacing && clientBottom - marginTop > wrapperRect.height + spacing;
18932
18948
  const shouldViewReverseBottomOver = clientBottom - marginTop < wrapperRect.height + spacing && restClientTop - marginBottom > wrapperRect.height + spacing;
18933
- const shouldViewReverseTopSide = restClientTop < wrapperRect.height && clientBottom > wrapperRect.height;
18934
- const shouldViewReverseBottomSide = clientBottom < wrapperRect.height && restClientTop > wrapperRect.height;
18935
- const shouldViewReverseLeftSide = restClientLeft < wrapperRect.width && clientRight > wrapperRect.width;
18936
- const shouldViewReverseRightSide = clientRight < wrapperRect.width && restClientLeft > wrapperRect.width;
18949
+ const shouldViewReverseTopSide = restClientTop < wrapperRect.height + ano_spacing && clientBottom > wrapperRect.height + ano_spacing;
18950
+ const shouldViewReverseBottomSide = clientBottom < wrapperRect.height + ano_spacing && restClientTop > wrapperRect.height + ano_spacing;
18951
+ const shouldViewReverseLeftSide = restClientLeft < wrapperRect.width + ano_spacing && clientRight > wrapperRect.width + ano_spacing;
18952
+ const shouldViewReverseRightSide = clientRight < wrapperRect.width + ano_spacing && restClientLeft > wrapperRect.width + ano_spacing;
18937
18953
  const shouldReverseTopOver = restClientTop < wrapperRect.height + spacing && clientBottom > wrapperRect.height + spacing;
18938
18954
  const shouldReverseBottomOver = clientBottom < wrapperRect.height + spacing && restClientTop > wrapperRect.height + spacing;
18939
18955
  const shouldReverseLeftOver = restClientLeft < wrapperRect.width && clientRight > wrapperRect.width;
@@ -18956,10 +18972,10 @@ class foundation_Tooltip extends foundation {
18956
18972
  const shouldContainerReverseRight = this.isReverse(restClientRightInContainer - marginRight, clientLeftInContainer - marginLeft, wrapperRect.width + spacing);
18957
18973
  const shouldContainerReverseTopOver = this.isReverse(restClientTopInContainer - marginBottom, clientBottomInContainer - marginTop, wrapperRect.height + spacing);
18958
18974
  const shouldContainerReverseBottomOver = this.isReverse(clientBottomInContainer - marginTop, restClientTopInContainer - marginBottom, wrapperRect.height + spacing);
18959
- const shouldContainerReverseTopSide = this.isReverse(restClientTopInContainer, clientBottomInContainer, wrapperRect.height);
18960
- const shouldContainerReverseBottomSide = this.isReverse(clientBottomInContainer, restClientTopInContainer, wrapperRect.height);
18961
- const shouldContainerReverseLeftSide = this.isReverse(restClientLeftInContainer, clientRightInContainer, wrapperRect.width);
18962
- const shouldContainerReverseRightSide = this.isReverse(clientRightInContainer, restClientLeftInContainer, wrapperRect.width);
18975
+ const shouldContainerReverseTopSide = this.isReverse(restClientTopInContainer, clientBottomInContainer, wrapperRect.height + ano_spacing);
18976
+ const shouldContainerReverseBottomSide = this.isReverse(clientBottomInContainer, restClientTopInContainer, wrapperRect.height + ano_spacing);
18977
+ const shouldContainerReverseLeftSide = this.isReverse(restClientLeftInContainer, clientRightInContainer, wrapperRect.width + ano_spacing);
18978
+ const shouldContainerReverseRightSide = this.isReverse(clientRightInContainer, restClientLeftInContainer, wrapperRect.width + ano_spacing);
18963
18979
  const halfHeight = triggerRect.height / 2;
18964
18980
  const halfWidth = triggerRect.width / 2;
18965
18981
  // 视口, 原空间与反向空间是否都不足判断
@@ -18968,20 +18984,20 @@ class foundation_Tooltip extends foundation {
18968
18984
  const isViewXOverFlow = this.isOverFlow(clientLeft - marginLeft, restClientRight - marginRight, wrapperRect.width + spacing);
18969
18985
  const isViewYOverFlowSide = this.isOverFlow(clientBottom - marginTop, restClientTop - marginBottom, wrapperRect.height + spacing);
18970
18986
  const isViewXOverFlowSide = this.isOverFlow(clientRight - marginLeft, restClientLeft - marginRight, wrapperRect.width + spacing);
18971
- const isViewYOverFlowSideHalf = this.isHalfOverFlow(clientBottom - halfHeight, restClientTop - halfHeight, wrapperRect.height / 2);
18972
- const isViewXOverFlowSideHalf = this.isHalfOverFlow(clientRight - halfWidth, restClientLeft - halfWidth, wrapperRect.width / 2);
18973
- const isViewYEnoughSideHalf = this.isHalfAllEnough(clientBottom - halfHeight, restClientTop - halfHeight, wrapperRect.height / 2);
18974
- const isViewXEnoughSideHalf = this.isHalfAllEnough(clientRight - halfWidth, restClientLeft - halfWidth, wrapperRect.width / 2);
18987
+ const isViewYOverFlowSideHalf = this.isHalfOverFlow(clientBottom - halfHeight, restClientTop - halfHeight, (wrapperRect.height + ano_spacing) / 2);
18988
+ const isViewXOverFlowSideHalf = this.isHalfOverFlow(clientRight - halfWidth, restClientLeft - halfWidth, (wrapperRect.width + ano_spacing) / 2);
18989
+ const isViewYEnoughSideHalf = this.isHalfAllEnough(clientBottom - halfHeight, restClientTop - halfHeight, (wrapperRect.height + ano_spacing) / 2);
18990
+ const isViewXEnoughSideHalf = this.isHalfAllEnough(clientRight - halfWidth, restClientLeft - halfWidth, (wrapperRect.width + ano_spacing) / 2);
18975
18991
  // 容器, 原空间与反向空间是否都不足判断
18976
18992
  // container, whether the original space and the reverse space are insufficient to judge
18977
18993
  const isContainerYOverFlow = this.isOverFlow(clientTopInContainer - marginTop, restClientBottomInContainer - marginBottom, wrapperRect.height + spacing);
18978
18994
  const isContainerXOverFlow = this.isOverFlow(clientLeftInContainer - marginLeft, restClientRightInContainer - marginRight, wrapperRect.width + spacing);
18979
18995
  const isContainerYOverFlowSide = this.isOverFlow(clientBottomInContainer - marginTop, restClientTopInContainer - marginBottom, wrapperRect.height + spacing);
18980
18996
  const isContainerXOverFlowSide = this.isOverFlow(clientRightInContainer - marginLeft, restClientLeftInContainer - marginRight, wrapperRect.width + spacing);
18981
- const isContainerYOverFlowSideHalf = this.isHalfOverFlow(clientBottomInContainer - halfHeight, restClientTopInContainer - halfHeight, wrapperRect.height / 2);
18982
- const isContainerXOverFlowSideHalf = this.isHalfOverFlow(clientRightInContainer - halfWidth, restClientLeftInContainer - halfWidth, wrapperRect.width / 2);
18983
- const isContainerYEnoughSideHalf = this.isHalfAllEnough(clientBottomInContainer - halfHeight, restClientTopInContainer - halfHeight, wrapperRect.height / 2);
18984
- const isContainerXEnoughSideHalf = this.isHalfAllEnough(clientRightInContainer - halfWidth, restClientLeftInContainer - halfWidth, wrapperRect.width / 2);
18997
+ const isContainerYOverFlowSideHalf = this.isHalfOverFlow(clientBottomInContainer - halfHeight, restClientTopInContainer - halfHeight, (wrapperRect.height + ano_spacing) / 2);
18998
+ const isContainerXOverFlowSideHalf = this.isHalfOverFlow(clientRightInContainer - halfWidth, restClientLeftInContainer - halfWidth, (wrapperRect.width + ano_spacing) / 2);
18999
+ const isContainerYEnoughSideHalf = this.isHalfAllEnough(clientBottomInContainer - halfHeight, restClientTopInContainer - halfHeight, (wrapperRect.height + ano_spacing) / 2);
19000
+ const isContainerXEnoughSideHalf = this.isHalfAllEnough(clientRightInContainer - halfWidth, restClientLeftInContainer - halfWidth, (wrapperRect.width + ano_spacing) / 2);
18985
19001
  // 综合 viewport + container 判断微调,即视口 + 容器都放置不行时才能考虑位置调整
18986
19002
  // Comprehensive viewport + container judgment fine-tuning, that is, the position adjustment can only be considered when the viewport + container cannot be placed.
18987
19003
  const shouldReverseTop = this.getReverse(isViewYOverFlow, isContainerYOverFlow, shouldViewReverseTop, shouldContainerReverseTop);
@@ -20680,7 +20696,7 @@ Tooltip.propTypes = {
20680
20696
  prefixCls: (prop_types_default()).string,
20681
20697
  onVisibleChange: (prop_types_default()).func,
20682
20698
  onClickOutSide: (prop_types_default()).func,
20683
- spacing: (prop_types_default()).number,
20699
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
20684
20700
  margin: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
20685
20701
  showArrow: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).node]),
20686
20702
  zIndex: (prop_types_default()).number,
@@ -22362,6 +22378,7 @@ var popover_rest = undefined && undefined.__rest || function (s, e) {
22362
22378
 
22363
22379
 
22364
22380
 
22381
+
22365
22382
  const popover_positionSet = popover_constants_strings.POSITION_SET;
22366
22383
  const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
22367
22384
  class Popover extends (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent {
@@ -22434,7 +22451,7 @@ class Popover extends (external_root_React_commonjs2_react_commonjs_react_amd_re
22434
22451
  arrowStyle
22435
22452
  };
22436
22453
  const arrow = showArrow ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(popover_Arrow, Object.assign({}, arrowProps)) : false;
22437
- if (typeof spacing !== 'number') {
22454
+ if (isNullOrUndefined(spacing)) {
22438
22455
  spacing = showArrow ? constants_numbers.SPACING_WITH_ARROW : constants_numbers.SPACING;
22439
22456
  }
22440
22457
  const role = trigger === 'click' || trigger === 'custom' ? 'dialog' : 'tooltip';
@@ -22471,7 +22488,7 @@ Popover.propTypes = {
22471
22488
  onVisibleChange: (prop_types_default()).func,
22472
22489
  onClickOutSide: (prop_types_default()).func,
22473
22490
  style: (prop_types_default()).object,
22474
- spacing: (prop_types_default()).number,
22491
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
22475
22492
  zIndex: (prop_types_default()).number,
22476
22493
  showArrow: (prop_types_default()).bool,
22477
22494
  arrowStyle: prop_types_default().shape({
@@ -60646,7 +60663,7 @@ DatePicker.propTypes = {
60646
60663
  validateStatus: prop_types_default().oneOf(datePicker_constants_strings.STATUS),
60647
60664
  renderDate: (prop_types_default()).func,
60648
60665
  renderFullDate: (prop_types_default()).func,
60649
- spacing: (prop_types_default()).number,
60666
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
60650
60667
  startDateOffset: (prop_types_default()).func,
60651
60668
  endDateOffset: (prop_types_default()).func,
60652
60669
  autoSwitchDate: (prop_types_default()).bool,
@@ -62944,7 +62961,7 @@ Dropdown.propTypes = {
62944
62961
  position: prop_types_default().oneOf(dropdown_positionSet),
62945
62962
  rePosKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
62946
62963
  render: (prop_types_default()).node,
62947
- spacing: (prop_types_default()).number,
62964
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
62948
62965
  showTick: (prop_types_default()).bool,
62949
62966
  style: (prop_types_default()).object,
62950
62967
  trigger: prop_types_default().oneOf(dropdown_triggerSet),
@@ -64099,11 +64116,13 @@ class TextAreaFoundation extends foundation {
64099
64116
  constructor(adapter) {
64100
64117
  super(Object.assign(Object.assign({}, TextAreaFoundation.textAreaDefaultAdapter), adapter));
64101
64118
  this.resizeTextarea = cb => {
64119
+ var _a;
64102
64120
  const {
64103
64121
  height
64104
64122
  } = this.getStates();
64105
64123
  const {
64106
- rows
64124
+ rows,
64125
+ autosize
64107
64126
  } = this.getProps();
64108
64127
  const node = this._adapter.getRef();
64109
64128
  const nodeSizingData = util_getSizingData(node);
@@ -64111,10 +64130,8 @@ class TextAreaFoundation extends foundation {
64111
64130
  cb && cb();
64112
64131
  return;
64113
64132
  }
64114
- const newHeight = calculateNodeHeight(nodeSizingData, node.value || node.placeholder || 'x', rows
64115
- // maxRows,
64116
- );
64117
-
64133
+ const [minRows, maxRows] = autosize !== null && typeof autosize === 'object' ? [(_a = autosize === null || autosize === void 0 ? void 0 : autosize.minRows) !== null && _a !== void 0 ? _a : rows, autosize === null || autosize === void 0 ? void 0 : autosize.maxRows] : [rows];
64134
+ const newHeight = calculateNodeHeight(nodeSizingData, node.value || node.placeholder || 'x', minRows, maxRows);
64118
64135
  if (height !== newHeight) {
64119
64136
  this._adapter.notifyHeightUpdate(newHeight);
64120
64137
  node.style.height = `${newHeight}px`;
@@ -64301,6 +64318,8 @@ var input_textarea = __webpack_require__("d+AG");
64301
64318
 
64302
64319
 
64303
64320
 
64321
+
64322
+
64304
64323
  var textarea_rest = undefined && undefined.__rest || function (s, e) {
64305
64324
  var t = {};
64306
64325
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -64512,7 +64531,7 @@ class TextArea extends BaseComponent {
64512
64531
  const itemCls = classnames_default()(`${textarea_prefixCls}-textarea`, {
64513
64532
  [`${textarea_prefixCls}-textarea-disabled`]: disabled,
64514
64533
  [`${textarea_prefixCls}-textarea-readonly`]: readonly,
64515
- [`${textarea_prefixCls}-textarea-autosize`]: autosize,
64534
+ [`${textarea_prefixCls}-textarea-autosize`]: isObject_default()(autosize) ? isUndefined_default()(autosize === null || autosize === void 0 ? void 0 : autosize.maxRows) : autosize,
64516
64535
  [`${textarea_prefixCls}-textarea-showClear`]: showClear
64517
64536
  });
64518
64537
  const itemProps = Object.assign(Object.assign({}, omit_default()(rest, 'insetLabel', 'insetLabelId', 'getValueLength', 'onClear', 'showClear')), {
@@ -64544,7 +64563,7 @@ class TextArea extends BaseComponent {
64544
64563
  }
64545
64564
  }
64546
64565
  TextArea.propTypes = {
64547
- autosize: (prop_types_default()).bool,
64566
+ autosize: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).object]),
64548
64567
  borderless: (prop_types_default()).bool,
64549
64568
  placeholder: (prop_types_default()).string,
64550
64569
  value: (prop_types_default()).string,
@@ -67369,6 +67388,15 @@ class NotificationListFoundation extends foundation {
67369
67388
  // return id;
67370
67389
  }
67371
67390
 
67391
+ has(id) {
67392
+ return this._adapter.getNotices().some(notice => notice.id === id);
67393
+ }
67394
+ update(id, noticeOpts) {
67395
+ let notices = this._adapter.getNotices();
67396
+ notices = notices.map(notice => notice.id === id ? Object.assign(Object.assign({}, notice), noticeOpts) : notice);
67397
+ const updatedItems = notices.filter(notice => notice.id === id);
67398
+ this._adapter.updateNotices(notices, [], updatedItems);
67399
+ }
67372
67400
  removeNotice(id) {
67373
67401
  let notices = this._adapter.getNotices();
67374
67402
  // let notices = this._adapter.getNotices();
@@ -67817,12 +67845,17 @@ class NotificationList extends BaseComponent {
67817
67845
  super(props);
67818
67846
  _this = this;
67819
67847
  this.add = noticeOpts => this.foundation.addNotice(noticeOpts);
67848
+ this.has = id => this.foundation.has(id);
67820
67849
  this.remove = id => {
67821
67850
  this.foundation.removeNotice(String(id));
67822
67851
  };
67852
+ this.update = (id, opts) => {
67853
+ return this.foundation.update(id, opts);
67854
+ };
67823
67855
  this.destroyAll = () => this.foundation.destroyAll();
67824
67856
  this.renderNoticeInPosition = function (notices, position) {
67825
67857
  let removedItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
67858
+ let updatedItems = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
67826
67859
  const className = classnames_default()(notification_constants_cssClasses.LIST);
67827
67860
  // TODO notifyOnClose
67828
67861
  if (notices.length) {
@@ -67848,6 +67881,11 @@ class NotificationList extends BaseComponent {
67848
67881
  isAnimating
67849
67882
  } = _ref;
67850
67883
  return isRemoved && !isAnimating ? null : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(notification_notice, Object.assign({}, notice, {
67884
+ ref: notice => {
67885
+ if (notice && updatedItems.some(item => item.id === notice.props.id)) {
67886
+ notice.foundation.restartCloseTimer();
67887
+ }
67888
+ },
67851
67889
  className: classnames_default()({
67852
67890
  [notice.className]: Boolean(notice.className),
67853
67891
  [animationClassName]: true
@@ -67864,7 +67902,8 @@ class NotificationList extends BaseComponent {
67864
67902
  };
67865
67903
  this.state = {
67866
67904
  notices: [],
67867
- removedItems: []
67905
+ removedItems: [],
67906
+ updatedItems: []
67868
67907
  };
67869
67908
  this.noticeStorage = [];
67870
67909
  this.removeItemStorage = [];
@@ -67875,19 +67914,22 @@ class NotificationList extends BaseComponent {
67875
67914
  return Object.assign(Object.assign({}, super.adapter), {
67876
67915
  updateNotices: function (notices) {
67877
67916
  let removedItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
67917
+ let updatedItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
67878
67918
  _this2.noticeStorage = [...notices];
67879
67919
  _this2.removeItemStorage = [...removedItems];
67880
67920
  // setState is async sometimes and react often merges state, so use "this" , make sure other code always get right data.
67881
67921
  _this2.setState({
67882
67922
  notices,
67883
- removedItems
67923
+ removedItems,
67924
+ updatedItems
67884
67925
  });
67885
67926
  },
67886
67927
  getNotices: () => this.noticeStorage
67887
67928
  });
67888
67929
  }
67889
67930
  static addNotice(notice) {
67890
- const id = getUuid('notification');
67931
+ var _a;
67932
+ const id = (_a = notice.id) !== null && _a !== void 0 ? _a : getUuid('notification');
67891
67933
  if (!ref) {
67892
67934
  const {
67893
67935
  getPopupContainer
@@ -67913,9 +67955,13 @@ class NotificationList extends BaseComponent {
67913
67955
  }));
67914
67956
  });
67915
67957
  } else {
67916
- ref.add(Object.assign(Object.assign({}, notice), {
67917
- id
67918
- }));
67958
+ if (ref.has(`${id}`)) {
67959
+ ref.update(id, notice);
67960
+ } else {
67961
+ ref.add(Object.assign(Object.assign({}, notice), {
67962
+ id
67963
+ }));
67964
+ }
67919
67965
  }
67920
67966
  return id;
67921
67967
  }
@@ -67994,7 +68040,8 @@ class NotificationList extends BaseComponent {
67994
68040
  notices
67995
68041
  } = this.state;
67996
68042
  const {
67997
- removedItems
68043
+ removedItems,
68044
+ updatedItems
67998
68045
  } = this.state;
67999
68046
  notices = Array.from(new Set([...notices, ...removedItems]));
68000
68047
  const noticesInPosition = {
@@ -68014,7 +68061,7 @@ class NotificationList extends BaseComponent {
68014
68061
  const noticesList = Object.entries(noticesInPosition).map(obj => {
68015
68062
  const pos = obj[0];
68016
68063
  const noticesInPos = obj[1];
68017
- return this.renderNoticeInPosition(noticesInPos, pos, removedItems);
68064
+ return this.renderNoticeInPosition(noticesInPos, pos, removedItems, updatedItems);
68018
68065
  });
68019
68066
  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, noticesList);
68020
68067
  }
@@ -71773,7 +71820,7 @@ Select.propTypes = {
71773
71820
  autoAdjustOverflow: (prop_types_default()).bool,
71774
71821
  mouseEnterDelay: (prop_types_default()).number,
71775
71822
  mouseLeaveDelay: (prop_types_default()).number,
71776
- spacing: (prop_types_default()).number,
71823
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
71777
71824
  onBlur: (prop_types_default()).func,
71778
71825
  onFocus: (prop_types_default()).func,
71779
71826
  onClear: (prop_types_default()).func,
@@ -87171,9 +87218,6 @@ const createBaseToast = () => {
87171
87218
  const refFn = toast => {
87172
87219
  var _a;
87173
87220
  if (((_a = toast === null || toast === void 0 ? void 0 : toast.foundation) === null || _a === void 0 ? void 0 : _a._id) && updatedIds.includes(toast.foundation._id)) {
87174
- toast.foundation.setState({
87175
- duration: toast.props.duration
87176
- });
87177
87221
  toast.foundation.restartCloseTimer();
87178
87222
  }
87179
87223
  };