@douyinfe/semi-ui 2.44.0-beta.0 → 2.45.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.
Files changed (55) hide show
  1. package/dist/css/semi.css +21 -11
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +129 -71
  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/cjs/calendar/monthCalendar.js +5 -1
  8. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  9. package/lib/cjs/datePicker/datePicker.js +1 -1
  10. package/lib/cjs/dropdown/index.d.ts +1 -1
  11. package/lib/cjs/dropdown/index.js +1 -1
  12. package/lib/cjs/form/arrayField.d.ts +1 -1
  13. package/lib/cjs/form/arrayField.js +2 -2
  14. package/lib/cjs/form/baseForm.d.ts +1 -1
  15. package/lib/cjs/form/field.d.ts +1 -1
  16. package/lib/cjs/input/textarea.d.ts +5 -1
  17. package/lib/cjs/input/textarea.js +4 -2
  18. package/lib/cjs/notification/index.d.ts +9 -7
  19. package/lib/cjs/notification/index.js +27 -8
  20. package/lib/cjs/popover/index.d.ts +5 -2
  21. package/lib/cjs/popover/index.js +3 -2
  22. package/lib/cjs/select/index.d.ts +2 -2
  23. package/lib/cjs/select/index.js +2 -2
  24. package/lib/cjs/steps/basicStep.js +1 -0
  25. package/lib/cjs/steps/fillStep.js +2 -1
  26. package/lib/cjs/toast/index.js +0 -3
  27. package/lib/cjs/tooltip/index.d.ts +5 -2
  28. package/lib/cjs/tooltip/index.js +1 -1
  29. package/lib/cjs/tree/index.js +5 -3
  30. package/lib/cjs/treeSelect/index.js +7 -5
  31. package/lib/es/calendar/monthCalendar.js +5 -1
  32. package/lib/es/datePicker/datePicker.d.ts +1 -1
  33. package/lib/es/datePicker/datePicker.js +1 -1
  34. package/lib/es/dropdown/index.d.ts +1 -1
  35. package/lib/es/dropdown/index.js +1 -1
  36. package/lib/es/form/arrayField.d.ts +1 -1
  37. package/lib/es/form/arrayField.js +2 -2
  38. package/lib/es/form/baseForm.d.ts +1 -1
  39. package/lib/es/form/field.d.ts +1 -1
  40. package/lib/es/input/textarea.d.ts +5 -1
  41. package/lib/es/input/textarea.js +4 -2
  42. package/lib/es/notification/index.d.ts +9 -7
  43. package/lib/es/notification/index.js +27 -8
  44. package/lib/es/popover/index.d.ts +5 -2
  45. package/lib/es/popover/index.js +3 -2
  46. package/lib/es/select/index.d.ts +2 -2
  47. package/lib/es/select/index.js +2 -2
  48. package/lib/es/steps/basicStep.js +1 -0
  49. package/lib/es/steps/fillStep.js +2 -1
  50. package/lib/es/toast/index.js +0 -3
  51. package/lib/es/tooltip/index.d.ts +5 -2
  52. package/lib/es/tooltip/index.js +1 -1
  53. package/lib/es/tree/index.js +5 -3
  54. package/lib/es/treeSelect/index.js +7 -5
  55. package/package.json +8 -8
@@ -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({
@@ -33059,7 +33076,11 @@ const filterEvents = (events, start, end) => {
33059
33076
  const item = events.get(day);
33060
33077
  const date = new Date(day);
33061
33078
  if (isDateInRange(date, start, end)) {
33062
- res.set(day, item);
33079
+ if (res.has(day)) {
33080
+ res.set(day, [...res.get(day), ...item]);
33081
+ } else {
33082
+ res.set(day, item);
33083
+ }
33063
33084
  } else if (isBefore(end, date)) {
33064
33085
  // do nothing
33065
33086
  } else {
@@ -33391,13 +33412,13 @@ class CalendarFoundation extends foundation {
33391
33412
  }
33392
33413
  convertMapToArray(weekMap, weekStart) {
33393
33414
  const eventArray = [];
33415
+ const map = new Map();
33394
33416
  for (const entry of weekMap.entries()) {
33395
33417
  const [key, value] = entry;
33396
- const map = new Map();
33397
33418
  map.set(key, value);
33398
- const weekEvents = this._parseWeeklyEvents(map, weekStart);
33399
- eventArray.push(...weekEvents);
33400
33419
  }
33420
+ const weekEvents = this._parseWeeklyEvents(map, weekStart);
33421
+ eventArray.push(...weekEvents);
33401
33422
  return eventArray;
33402
33423
  }
33403
33424
  getParseMonthlyEvents(itemLimit) {
@@ -34293,6 +34314,9 @@ class monthCalendar extends BaseComponent {
34293
34314
  }))));
34294
34315
  };
34295
34316
  this.renderEvents = events => {
34317
+ const {
34318
+ itemLimit
34319
+ } = this.state;
34296
34320
  if (!events) {
34297
34321
  return undefined;
34298
34322
  }
@@ -34309,11 +34333,12 @@ class monthCalendar extends BaseComponent {
34309
34333
  width: monthCalendar_toPercent(width),
34310
34334
  top: `${topInd}em`
34311
34335
  };
34312
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
34336
+ if (topInd < itemLimit) return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
34313
34337
  className: `${calendar_constants_cssClasses.PREFIX}-event-item ${calendar_constants_cssClasses.PREFIX}-event-month`,
34314
34338
  key: key || `${ind}-monthevent`,
34315
34339
  style: style
34316
34340
  }, children);
34341
+ return null;
34317
34342
  });
34318
34343
  return list;
34319
34344
  };
@@ -60638,7 +60663,7 @@ DatePicker.propTypes = {
60638
60663
  validateStatus: prop_types_default().oneOf(datePicker_constants_strings.STATUS),
60639
60664
  renderDate: (prop_types_default()).func,
60640
60665
  renderFullDate: (prop_types_default()).func,
60641
- spacing: (prop_types_default()).number,
60666
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
60642
60667
  startDateOffset: (prop_types_default()).func,
60643
60668
  endDateOffset: (prop_types_default()).func,
60644
60669
  autoSwitchDate: (prop_types_default()).bool,
@@ -62936,7 +62961,7 @@ Dropdown.propTypes = {
62936
62961
  position: prop_types_default().oneOf(dropdown_positionSet),
62937
62962
  rePosKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
62938
62963
  render: (prop_types_default()).node,
62939
- spacing: (prop_types_default()).number,
62964
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
62940
62965
  showTick: (prop_types_default()).bool,
62941
62966
  style: (prop_types_default()).object,
62942
62967
  trigger: prop_types_default().oneOf(dropdown_triggerSet),
@@ -64091,11 +64116,13 @@ class TextAreaFoundation extends foundation {
64091
64116
  constructor(adapter) {
64092
64117
  super(Object.assign(Object.assign({}, TextAreaFoundation.textAreaDefaultAdapter), adapter));
64093
64118
  this.resizeTextarea = cb => {
64119
+ var _a;
64094
64120
  const {
64095
64121
  height
64096
64122
  } = this.getStates();
64097
64123
  const {
64098
- rows
64124
+ rows,
64125
+ autosize
64099
64126
  } = this.getProps();
64100
64127
  const node = this._adapter.getRef();
64101
64128
  const nodeSizingData = util_getSizingData(node);
@@ -64103,10 +64130,8 @@ class TextAreaFoundation extends foundation {
64103
64130
  cb && cb();
64104
64131
  return;
64105
64132
  }
64106
- const newHeight = calculateNodeHeight(nodeSizingData, node.value || node.placeholder || 'x', rows
64107
- // maxRows,
64108
- );
64109
-
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);
64110
64135
  if (height !== newHeight) {
64111
64136
  this._adapter.notifyHeightUpdate(newHeight);
64112
64137
  node.style.height = `${newHeight}px`;
@@ -64293,6 +64318,8 @@ var input_textarea = __webpack_require__("d+AG");
64293
64318
 
64294
64319
 
64295
64320
 
64321
+
64322
+
64296
64323
  var textarea_rest = undefined && undefined.__rest || function (s, e) {
64297
64324
  var t = {};
64298
64325
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
@@ -64504,7 +64531,7 @@ class TextArea extends BaseComponent {
64504
64531
  const itemCls = classnames_default()(`${textarea_prefixCls}-textarea`, {
64505
64532
  [`${textarea_prefixCls}-textarea-disabled`]: disabled,
64506
64533
  [`${textarea_prefixCls}-textarea-readonly`]: readonly,
64507
- [`${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,
64508
64535
  [`${textarea_prefixCls}-textarea-showClear`]: showClear
64509
64536
  });
64510
64537
  const itemProps = Object.assign(Object.assign({}, omit_default()(rest, 'insetLabel', 'insetLabelId', 'getValueLength', 'onClear', 'showClear')), {
@@ -64536,7 +64563,7 @@ class TextArea extends BaseComponent {
64536
64563
  }
64537
64564
  }
64538
64565
  TextArea.propTypes = {
64539
- autosize: (prop_types_default()).bool,
64566
+ autosize: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).object]),
64540
64567
  borderless: (prop_types_default()).bool,
64541
64568
  placeholder: (prop_types_default()).string,
64542
64569
  value: (prop_types_default()).string,
@@ -67361,6 +67388,15 @@ class NotificationListFoundation extends foundation {
67361
67388
  // return id;
67362
67389
  }
67363
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
+ }
67364
67400
  removeNotice(id) {
67365
67401
  let notices = this._adapter.getNotices();
67366
67402
  // let notices = this._adapter.getNotices();
@@ -67809,12 +67845,17 @@ class NotificationList extends BaseComponent {
67809
67845
  super(props);
67810
67846
  _this = this;
67811
67847
  this.add = noticeOpts => this.foundation.addNotice(noticeOpts);
67848
+ this.has = id => this.foundation.has(id);
67812
67849
  this.remove = id => {
67813
67850
  this.foundation.removeNotice(String(id));
67814
67851
  };
67852
+ this.update = (id, opts) => {
67853
+ return this.foundation.update(id, opts);
67854
+ };
67815
67855
  this.destroyAll = () => this.foundation.destroyAll();
67816
67856
  this.renderNoticeInPosition = function (notices, position) {
67817
67857
  let removedItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
67858
+ let updatedItems = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
67818
67859
  const className = classnames_default()(notification_constants_cssClasses.LIST);
67819
67860
  // TODO notifyOnClose
67820
67861
  if (notices.length) {
@@ -67840,6 +67881,11 @@ class NotificationList extends BaseComponent {
67840
67881
  isAnimating
67841
67882
  } = _ref;
67842
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
+ },
67843
67889
  className: classnames_default()({
67844
67890
  [notice.className]: Boolean(notice.className),
67845
67891
  [animationClassName]: true
@@ -67856,7 +67902,8 @@ class NotificationList extends BaseComponent {
67856
67902
  };
67857
67903
  this.state = {
67858
67904
  notices: [],
67859
- removedItems: []
67905
+ removedItems: [],
67906
+ updatedItems: []
67860
67907
  };
67861
67908
  this.noticeStorage = [];
67862
67909
  this.removeItemStorage = [];
@@ -67867,19 +67914,22 @@ class NotificationList extends BaseComponent {
67867
67914
  return Object.assign(Object.assign({}, super.adapter), {
67868
67915
  updateNotices: function (notices) {
67869
67916
  let removedItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
67917
+ let updatedItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
67870
67918
  _this2.noticeStorage = [...notices];
67871
67919
  _this2.removeItemStorage = [...removedItems];
67872
67920
  // setState is async sometimes and react often merges state, so use "this" , make sure other code always get right data.
67873
67921
  _this2.setState({
67874
67922
  notices,
67875
- removedItems
67923
+ removedItems,
67924
+ updatedItems
67876
67925
  });
67877
67926
  },
67878
67927
  getNotices: () => this.noticeStorage
67879
67928
  });
67880
67929
  }
67881
67930
  static addNotice(notice) {
67882
- const id = getUuid('notification');
67931
+ var _a;
67932
+ const id = (_a = notice.id) !== null && _a !== void 0 ? _a : getUuid('notification');
67883
67933
  if (!ref) {
67884
67934
  const {
67885
67935
  getPopupContainer
@@ -67905,9 +67955,13 @@ class NotificationList extends BaseComponent {
67905
67955
  }));
67906
67956
  });
67907
67957
  } else {
67908
- ref.add(Object.assign(Object.assign({}, notice), {
67909
- id
67910
- }));
67958
+ if (ref.has(`${id}`)) {
67959
+ ref.update(id, notice);
67960
+ } else {
67961
+ ref.add(Object.assign(Object.assign({}, notice), {
67962
+ id
67963
+ }));
67964
+ }
67911
67965
  }
67912
67966
  return id;
67913
67967
  }
@@ -67986,7 +68040,8 @@ class NotificationList extends BaseComponent {
67986
68040
  notices
67987
68041
  } = this.state;
67988
68042
  const {
67989
- removedItems
68043
+ removedItems,
68044
+ updatedItems
67990
68045
  } = this.state;
67991
68046
  notices = Array.from(new Set([...notices, ...removedItems]));
67992
68047
  const noticesInPosition = {
@@ -68006,7 +68061,7 @@ class NotificationList extends BaseComponent {
68006
68061
  const noticesList = Object.entries(noticesInPosition).map(obj => {
68007
68062
  const pos = obj[0];
68008
68063
  const noticesInPos = obj[1];
68009
- return this.renderNoticeInPosition(noticesInPos, pos, removedItems);
68064
+ return this.renderNoticeInPosition(noticesInPos, pos, removedItems, updatedItems);
68010
68065
  });
68011
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);
68012
68067
  }
@@ -71044,7 +71099,7 @@ class Select extends BaseComponent {
71044
71099
  }, locale.createText), option.value)));
71045
71100
  return defaultCreateItem;
71046
71101
  }
71047
- const customCreateItem = renderCreateItem(option.value, isFocused);
71102
+ const customCreateItem = renderCreateItem(option.value, isFocused, style);
71048
71103
  return (
71049
71104
  /*#__PURE__*/
71050
71105
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus
@@ -71765,7 +71820,7 @@ Select.propTypes = {
71765
71820
  autoAdjustOverflow: (prop_types_default()).bool,
71766
71821
  mouseEnterDelay: (prop_types_default()).number,
71767
71822
  mouseLeaveDelay: (prop_types_default()).number,
71768
- spacing: (prop_types_default()).number,
71823
+ spacing: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).object]),
71769
71824
  onBlur: (prop_types_default()).func,
71770
71825
  onFocus: (prop_types_default()).func,
71771
71826
  onClear: (prop_types_default()).func,
@@ -76843,6 +76898,7 @@ const BasicStep = props => {
76843
76898
  [`${prefixCls}-active`]: active,
76844
76899
  [`${prefixCls}-done`]: done,
76845
76900
  [`${prefixCls}-hover`]: onChange || props.onClick,
76901
+ [`${prefixCls}-clickable`]: onChange || onClick,
76846
76902
  [`${prefixCls}-${status}-hover`]: onChange || props.onClick
76847
76903
  }, className);
76848
76904
  const handleClick = e => {
@@ -76981,7 +77037,8 @@ const FillStep = props => {
76981
77037
  [prefixCls]: true,
76982
77038
  [`${prefixCls}-${status}`]: Boolean(status),
76983
77039
  [`${prefixCls}-${status}-hover`]: Boolean(status) && (onChange || onClick),
76984
- [`${prefixCls}-clickable`]: onClick
77040
+ [`${prefixCls}-${status}-active`]: Boolean(status) && (onChange || onClick),
77041
+ [`${prefixCls}-clickable`]: onChange || onClick
76985
77042
  }, className),
76986
77043
  style: style,
76987
77044
  onClick: e => {
@@ -87161,9 +87218,6 @@ const createBaseToast = () => {
87161
87218
  const refFn = toast => {
87162
87219
  var _a;
87163
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)) {
87164
- toast.foundation.setState({
87165
- duration: toast.props.duration
87166
- });
87167
87221
  toast.foundation.restartCloseTimer();
87168
87222
  }
87169
87223
  };
@@ -88860,8 +88914,10 @@ class Tree extends BaseComponent {
88860
88914
  const treeDataHasChange = prevProps && prevProps.treeData !== props.treeData;
88861
88915
  return firstInProps || treeDataHasChange;
88862
88916
  };
88917
+ const needUpdateTreeData = needUpdate('treeData');
88918
+ const needUpdateSimpleJson = needUpdate('treeDataSimpleJson');
88863
88919
  // Update the data of tree in state
88864
- if (needUpdate('treeData') || props.draggable && needUpdateData()) {
88920
+ if (needUpdateTreeData || props.draggable && needUpdateData()) {
88865
88921
  treeData = props.treeData;
88866
88922
  newState.treeData = treeData;
88867
88923
  const entitiesMap = convertDataToEntities(treeData);
@@ -88869,7 +88925,7 @@ class Tree extends BaseComponent {
88869
88925
  keyEntities = newState.keyEntities;
88870
88926
  newState.cachedKeyValuePairs = Object.assign({}, entitiesMap.valueEntities);
88871
88927
  valueEntities = newState.cachedKeyValuePairs;
88872
- } else if (needUpdate('treeDataSimpleJson')) {
88928
+ } else if (needUpdateSimpleJson) {
88873
88929
  // Convert treeDataSimpleJson to treeData
88874
88930
  treeData = convertJsonToData(props.treeDataSimpleJson);
88875
88931
  newState.treeData = treeData;
@@ -88886,7 +88942,7 @@ class Tree extends BaseComponent {
88886
88942
  newState.motionType = null;
88887
88943
  }
88888
88944
  }
88889
- const dataUpdated = needUpdate('treeDataSimpleJson') || needUpdate('treeData');
88945
+ const dataUpdated = needUpdateSimpleJson || needUpdateTreeData;
88890
88946
  const expandAllWhenDataChange = dataUpdated && props.expandAll;
88891
88947
  if (!isSeaching) {
88892
88948
  // Update expandedKeys
@@ -91040,8 +91096,10 @@ class TreeSelect extends BaseComponent {
91040
91096
  const newState = {
91041
91097
  prevProps: props
91042
91098
  };
91099
+ const needUpdateTreeData = needUpdate('treeData');
91100
+ const needUpdateExpandedKeys = needUpdate('expandedKeys');
91043
91101
  // TreeNode
91044
- if (needUpdate('treeData')) {
91102
+ if (needUpdateTreeData) {
91045
91103
  treeData = props.treeData;
91046
91104
  newState.treeData = treeData;
91047
91105
  const entitiesMap = convertDataToEntities(treeData);
@@ -91057,9 +91115,9 @@ class TreeSelect extends BaseComponent {
91057
91115
  newState.motionType = null;
91058
91116
  }
91059
91117
  }
91060
- const expandAllWhenDataChange = needUpdate('treeData') && props.expandAll;
91118
+ const expandAllWhenDataChange = needUpdateTreeData && props.expandAll;
91061
91119
  // expandedKeys
91062
- if (needUpdate('expandedKeys') || prevProps && needUpdate('autoExpandParent')) {
91120
+ if (needUpdateExpandedKeys || prevProps && needUpdate('autoExpandParent')) {
91063
91121
  newState.expandedKeys = calcExpandedKeys(props.expandedKeys, keyEntities, props.autoExpandParent || !prevProps);
91064
91122
  // only show animation when treeData does not change
91065
91123
  if (prevProps && props.motion && !treeData) {
@@ -91080,7 +91138,7 @@ class TreeSelect extends BaseComponent {
91080
91138
  newState.expandedKeys = calcExpandedKeysForValues(normalizeValue(props.value, withObject), keyEntities, props.multiple, valueEntities);
91081
91139
  }
91082
91140
  // flattenNodes
91083
- if (treeData || needUpdate('expandedKeys')) {
91141
+ if (treeData || needUpdateExpandedKeys) {
91084
91142
  const flattenNodes = flattenTreeData(treeData || prevState.treeData, newState.expandedKeys || prevState.expandedKeys);
91085
91143
  newState.flattenNodes = flattenNodes;
91086
91144
  }
@@ -91132,7 +91190,7 @@ class TreeSelect extends BaseComponent {
91132
91190
  newState.loadedKeys = new Set(props.loadedKeys);
91133
91191
  }
91134
91192
  // ================== rePosKey ==================
91135
- if (needUpdate('treeData') || needUpdate('value')) {
91193
+ if (needUpdateTreeData || needUpdate('value')) {
91136
91194
  newState.rePosKey = rePosKey + 1;
91137
91195
  }
91138
91196
  // ================ disableStrictly =================
@@ -98528,13 +98586,13 @@ class ArrayFieldComponent extends external_root_React_commonjs2_react_commonjs_r
98528
98586
  keys
98529
98587
  });
98530
98588
  }
98531
- addWithInitValue(lineObject) {
98589
+ addWithInitValue(rowVal) {
98532
98590
  const updater = this.context;
98533
98591
  const {
98534
98592
  field
98535
98593
  } = this.props;
98536
98594
  const newArrayFieldVal = updater.getValue(field) ? updater.getValue(field).slice() : [];
98537
- newArrayFieldVal.push(lineObject);
98595
+ newArrayFieldVal.push(rowVal);
98538
98596
  updater.updateStateValue(field, newArrayFieldVal, {});
98539
98597
  updater.updateArrayField(field, {
98540
98598
  updateKey: new Date().valueOf()