@autobest-ui/components 1.3.0 → 2.0.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 (183) hide show
  1. package/esm/accordion/Item.d.ts +1 -1
  2. package/esm/accordion/Item.js +5 -3
  3. package/esm/accordion/index.d.ts +1 -1
  4. package/esm/accordion/index.js +5 -3
  5. package/esm/affix/PortalAffix.js +7 -7
  6. package/esm/affix/index.js +19 -17
  7. package/esm/carousel/index.js +16 -14
  8. package/esm/checkbox/index.js +19 -17
  9. package/esm/collapse/index.js +13 -11
  10. package/esm/confirm/index.d.ts +1 -1
  11. package/esm/confirm/index.js +14 -14
  12. package/esm/date-picker/calendar/Day.d.ts +1 -1
  13. package/esm/date-picker/calendar/Day.js +11 -11
  14. package/esm/date-picker/calendar/MonthYear.js +8 -8
  15. package/esm/date-picker/calendar/grid/index.js +18 -18
  16. package/esm/date-picker/calendar/index.js +7 -5
  17. package/esm/date-picker/calendar/types.js +1 -0
  18. package/esm/date-picker/index.js +15 -13
  19. package/esm/drawer/Child.js +6 -6
  20. package/esm/drawer/index.js +11 -9
  21. package/esm/ellipsis/index.js +4 -4
  22. package/esm/guide/index.d.ts +4 -5
  23. package/esm/guide/index.js +19 -19
  24. package/esm/index.d.ts +0 -1
  25. package/esm/index.js +0 -1
  26. package/esm/input-number/index.d.ts +4 -4
  27. package/esm/input-number/index.js +27 -25
  28. package/esm/lazy-image/index.d.ts +3 -3
  29. package/esm/lazy-image/index.js +6 -4
  30. package/esm/link-list/index.js +24 -22
  31. package/esm/link-list/style/index.css +1 -1
  32. package/esm/loading/index.d.ts +7 -2
  33. package/esm/loading/index.js +20 -26
  34. package/esm/loading/style/index.css +1 -1
  35. package/esm/loading/style/index.scss +0 -10
  36. package/esm/loading-bar/index.d.ts +1 -0
  37. package/esm/loading-bar/index.js +3 -3
  38. package/esm/loading-container/index.js +6 -6
  39. package/esm/loading-icon/index.js +12 -12
  40. package/esm/mask/index.js +4 -4
  41. package/esm/message/index.js +14 -14
  42. package/esm/modal/Affix.d.ts +1 -0
  43. package/esm/modal/Affix.js +1 -1
  44. package/esm/modal/Title.js +9 -9
  45. package/esm/modal/getPopupLocation.js +1 -1
  46. package/esm/modal/index.d.ts +1 -1
  47. package/esm/modal/index.js +21 -19
  48. package/esm/modal/style/index.css +1 -1
  49. package/esm/move/index.d.ts +1 -1
  50. package/esm/move/index.js +14 -12
  51. package/esm/popover/index.js +9 -9
  52. package/esm/portal/index.js +5 -3
  53. package/esm/script/index.js +8 -6
  54. package/esm/select/index.d.ts +3 -3
  55. package/esm/select/index.js +34 -36
  56. package/esm/show-more/index.js +14 -12
  57. package/esm/skeleton/Item.js +3 -3
  58. package/esm/skeleton/index.js +11 -15
  59. package/esm/style.css +9 -10
  60. package/esm/table/body/BodyRow.js +8 -8
  61. package/esm/table/body/CheckIcon.js +7 -7
  62. package/esm/table/body/index.d.ts +1 -1
  63. package/esm/table/body/index.js +6 -6
  64. package/esm/table/header/CheckIcon.js +6 -6
  65. package/esm/table/header/HeaderCell.d.ts +1 -1
  66. package/esm/table/header/HeaderCell.js +10 -8
  67. package/esm/table/header/HeaderRow.d.ts +1 -0
  68. package/esm/table/header/HeaderRow.js +2 -2
  69. package/esm/table/index.d.ts +3 -7
  70. package/esm/table/index.js +20 -18
  71. package/esm/table/interface.js +1 -0
  72. package/esm/tabs/index.d.ts +1 -1
  73. package/esm/tabs/index.js +14 -12
  74. package/esm/tooltip/index.d.ts +1 -0
  75. package/esm/tooltip/index.js +1 -1
  76. package/esm/trigger/bottomAlign.js +2 -2
  77. package/esm/trigger/getPopupLocation.js +2 -1
  78. package/esm/trigger/index.d.ts +4 -4
  79. package/esm/trigger/index.js +24 -22
  80. package/esm/trigger/leftAlign.js +2 -2
  81. package/esm/trigger/rightAlign.js +2 -2
  82. package/esm/trigger/topAlign.js +2 -2
  83. package/esm/trigger/utils.js +2 -2
  84. package/lib/accordion/Item.d.ts +1 -1
  85. package/lib/accordion/Item.js +5 -3
  86. package/lib/accordion/index.d.ts +1 -1
  87. package/lib/accordion/index.js +5 -3
  88. package/lib/affix/PortalAffix.js +7 -7
  89. package/lib/affix/index.js +19 -17
  90. package/lib/carousel/index.js +16 -14
  91. package/lib/checkbox/index.js +19 -17
  92. package/lib/collapse/index.js +13 -11
  93. package/lib/confirm/index.d.ts +1 -1
  94. package/lib/confirm/index.js +14 -14
  95. package/lib/date-picker/calendar/Day.d.ts +1 -1
  96. package/lib/date-picker/calendar/Day.js +12 -12
  97. package/lib/date-picker/calendar/MonthYear.js +9 -9
  98. package/lib/date-picker/calendar/grid/index.js +18 -18
  99. package/lib/date-picker/calendar/index.js +8 -6
  100. package/lib/date-picker/calendar/types.js +5 -1
  101. package/lib/date-picker/index.js +15 -13
  102. package/lib/date-picker/utils.js +8 -8
  103. package/lib/drawer/Child.js +6 -6
  104. package/lib/drawer/index.js +11 -9
  105. package/lib/ellipsis/index.js +4 -4
  106. package/lib/guide/index.d.ts +4 -5
  107. package/lib/guide/index.js +19 -20
  108. package/lib/index.d.ts +0 -1
  109. package/lib/index.js +54 -62
  110. package/lib/input-number/index.d.ts +4 -4
  111. package/lib/input-number/index.js +27 -25
  112. package/lib/lazy-image/index.d.ts +3 -3
  113. package/lib/lazy-image/index.js +6 -4
  114. package/lib/link-list/index.js +24 -22
  115. package/lib/link-list/style/index.css +1 -1
  116. package/lib/loading/index.d.ts +7 -2
  117. package/lib/loading/index.js +20 -27
  118. package/lib/loading/style/index.css +1 -1
  119. package/lib/loading/style/index.scss +0 -10
  120. package/lib/loading-bar/index.d.ts +1 -0
  121. package/lib/loading-bar/index.js +3 -3
  122. package/lib/loading-container/index.js +6 -6
  123. package/lib/loading-icon/index.js +12 -12
  124. package/lib/mask/index.js +4 -4
  125. package/lib/message/index.js +14 -14
  126. package/lib/modal/Affix.d.ts +1 -0
  127. package/lib/modal/Affix.js +1 -1
  128. package/lib/modal/Title.js +9 -9
  129. package/lib/modal/getPopupLocation.js +1 -1
  130. package/lib/modal/index.d.ts +1 -1
  131. package/lib/modal/index.js +22 -20
  132. package/lib/modal/style/index.css +1 -1
  133. package/lib/move/index.d.ts +1 -1
  134. package/lib/move/index.js +14 -12
  135. package/lib/popover/index.js +9 -9
  136. package/lib/portal/index.js +5 -3
  137. package/lib/script/index.js +8 -6
  138. package/lib/select/index.d.ts +3 -3
  139. package/lib/select/index.js +34 -36
  140. package/lib/show-more/index.js +14 -12
  141. package/lib/skeleton/Item.js +3 -3
  142. package/lib/skeleton/index.js +11 -15
  143. package/lib/style.css +9 -10
  144. package/lib/table/body/BodyRow.js +8 -8
  145. package/lib/table/body/CheckIcon.js +7 -7
  146. package/lib/table/body/index.d.ts +1 -1
  147. package/lib/table/body/index.js +6 -6
  148. package/lib/table/header/CheckIcon.js +6 -6
  149. package/lib/table/header/HeaderCell.d.ts +1 -1
  150. package/lib/table/header/HeaderCell.js +10 -8
  151. package/lib/table/header/HeaderRow.d.ts +1 -0
  152. package/lib/table/header/HeaderRow.js +2 -2
  153. package/lib/table/index.d.ts +3 -7
  154. package/lib/table/index.js +20 -18
  155. package/lib/table/interface.js +5 -1
  156. package/lib/tabs/index.d.ts +1 -1
  157. package/lib/tabs/index.js +14 -12
  158. package/lib/tooltip/index.d.ts +1 -0
  159. package/lib/tooltip/index.js +1 -1
  160. package/lib/trigger/align.js +24 -24
  161. package/lib/trigger/bottomAlign.js +3 -3
  162. package/lib/trigger/constants.js +1 -1
  163. package/lib/trigger/getPopupLocation.js +2 -1
  164. package/lib/trigger/index.d.ts +4 -4
  165. package/lib/trigger/index.js +25 -23
  166. package/lib/trigger/leftAlign.js +3 -3
  167. package/lib/trigger/ref.js +1 -1
  168. package/lib/trigger/rightAlign.js +3 -3
  169. package/lib/trigger/topAlign.js +3 -3
  170. package/lib/trigger/utils.js +4 -4
  171. package/package.json +1 -1
  172. package/esm/use-config/index.d.ts +0 -5
  173. package/esm/use-config/index.js +0 -13
  174. package/esm/use-config/style/index.css +0 -0
  175. package/esm/use-config/style/index.d.ts +0 -1
  176. package/esm/use-config/style/index.js +0 -1
  177. package/esm/use-config/style/index.scss +0 -0
  178. package/lib/use-config/index.d.ts +0 -5
  179. package/lib/use-config/index.js +0 -21
  180. package/lib/use-config/style/index.css +0 -0
  181. package/lib/use-config/style/index.d.ts +0 -1
  182. package/lib/use-config/style/index.js +0 -1
  183. package/lib/use-config/style/index.scss +0 -0
package/esm/tabs/index.js CHANGED
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -181,7 +183,7 @@ function (_super) {
181
183
 
182
184
  _this.prefixCls = 'ab-tabs';
183
185
  _this.resizeHandler = null;
184
- _this.ulRef = React.createRef();
186
+ _this.ulRef = /*#__PURE__*/React.createRef();
185
187
  /**
186
188
  * 处理value在使用data-value后,将number转成string问题
187
189
  * @param value
@@ -231,13 +233,13 @@ function (_super) {
231
233
  var barStyles = {};
232
234
 
233
235
  if (placement === 'top' || placement === 'bottom') {
234
- barStyles.width = offsetAndSize.width + "px";
236
+ barStyles.width = "".concat(offsetAndSize.width, "px");
235
237
  barStyles.height = barSize;
236
- barStyles.transform = "translate(" + offsetAndSize.offsetLeft + "px, 0)";
238
+ barStyles.transform = "translate(".concat(offsetAndSize.offsetLeft, "px, 0)");
237
239
  } else if (placement === 'left' || placement === 'right') {
238
- barStyles.height = offsetAndSize.height + "px";
240
+ barStyles.height = "".concat(offsetAndSize.height, "px");
239
241
  barStyles.width = barSize;
240
- barStyles.transform = "translate(0, " + offsetAndSize.offsetTop + "px)";
242
+ barStyles.transform = "translate(0, ".concat(offsetAndSize.offsetTop, "px)");
241
243
  }
242
244
 
243
245
  _this.setState({
@@ -375,20 +377,20 @@ function (_super) {
375
377
  var _b = this.state,
376
378
  activeValue = _b.activeValue,
377
379
  barStyles = _b.barStyles;
378
- return React.createElement("div", {
379
- className: classNames(cls, className, cls + "-" + placement),
380
+ return /*#__PURE__*/React.createElement("div", {
381
+ className: classNames(cls, className, "".concat(cls, "-").concat(placement)),
380
382
  ref: this.ulRef
381
383
  }, options.map(function (item) {
382
384
  var _a;
383
385
 
384
- return React.createElement("div", {
386
+ return /*#__PURE__*/React.createElement("div", {
385
387
  key: item.value,
386
- className: classNames(cls + "-item", item.className, (_a = {}, _a[cls + "-active"] = activeValue === item.value, _a[cls + "-disabled"] = item.disabled, _a)),
388
+ className: classNames("".concat(cls, "-item"), item.className, (_a = {}, _a["".concat(cls, "-active")] = activeValue === item.value, _a["".concat(cls, "-disabled")] = item.disabled, _a)),
387
389
  "data-value": item.value,
388
390
  onClick: _this.onChange
389
391
  }, item.name);
390
- }), React.createElement("div", {
391
- className: cls + "-bar",
392
+ }), /*#__PURE__*/React.createElement("div", {
393
+ className: "".concat(cls, "-bar"),
392
394
  style: barStyles
393
395
  }));
394
396
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PopoverProps, PopoverPlacement, PopoverTriggerType } from '../popover';
2
3
  export declare type TooltipProps = PopoverProps;
3
4
  export declare type TooltipPlacement = PopoverPlacement;
@@ -18,7 +18,7 @@ import React from 'react';
18
18
  import Popover from '../popover';
19
19
  var cls = 'ab-tooltip';
20
20
  export default function Tooltip(props) {
21
- return React.createElement(Popover, __assign({}, props, {
21
+ return /*#__PURE__*/React.createElement(Popover, __assign({}, props, {
22
22
  prefixCls: cls
23
23
  }), props.children);
24
24
  }
@@ -30,11 +30,11 @@ function getBottomCommon(_a) {
30
30
  height: popInfo.height,
31
31
  top: top + rootInfo.height + rootToPopupSpacing,
32
32
  arrowStyle: hiddenArrow ? {} : {
33
- left: arrowLeft + "px",
33
+ left: "".concat(arrowLeft, "px"),
34
34
  top: '-4px',
35
35
  transform: 'translateX(-50%) rotate(-135deg)'
36
36
  },
37
- transformOrigin: isTransformHorizontalDirection ? 'center top' : arrowLeft + "px top"
37
+ transformOrigin: isTransformHorizontalDirection ? 'center top' : "".concat(arrowLeft, "px top")
38
38
  };
39
39
  }
40
40
 
@@ -99,9 +99,10 @@ export default function getPopupLocation(placement, rootEl, popupEl, initTransla
99
99
  }),
100
100
  methodStr = _a.methodStr,
101
101
  isVertical = _a.isVertical; // 拼装方法名
102
+ // eslint-disable-next-line import/namespace
102
103
 
103
104
 
104
- var currentMethod = alignUtil["get" + methodStr + "LocationInfo"]; // 执行方法
105
+ var currentMethod = alignUtil["get".concat(methodStr, "LocationInfo")]; // 执行方法
105
106
 
106
107
  var result = currentMethod(params);
107
108
 
@@ -139,7 +139,7 @@ declare class Trigger extends React.Component<TriggerProps, TriggerStates> {
139
139
  componentWillUnmount(): void;
140
140
  clearPopupTimer: (popupEl?: HTMLElement) => void;
141
141
  forceAlign: (popupEl?: HTMLElement) => void;
142
- getRootDomNode: () => HTMLElement;
142
+ getRootDomNode: () => HTMLElement | null;
143
143
  getPopupDomNode(): HTMLDivElement;
144
144
  getMaskDomNode(): HTMLDivElement;
145
145
  clearOutsideHandler(ignoreDelayTimer?: boolean): void;
@@ -158,7 +158,7 @@ declare class Trigger extends React.Component<TriggerProps, TriggerStates> {
158
158
  */
159
159
  triggerPopup: (nextVisible: boolean) => void;
160
160
  onPopupMouseDown: () => void;
161
- onClick: (event: React.MouseEvent<Element, MouseEvent> | React.TouchEvent<Element>) => void;
161
+ onClick: (event: React.TouchEvent | React.MouseEvent) => void;
162
162
  onMouseEnter: () => void;
163
163
  onMouseLeave: () => void;
164
164
  onPopupMouseEnter: () => void;
@@ -166,13 +166,13 @@ declare class Trigger extends React.Component<TriggerProps, TriggerStates> {
166
166
  onExited: () => void;
167
167
  isCurrentTrigger: (eventName: string, trigger: string) => boolean;
168
168
  isOutsideControl: () => boolean;
169
- onPreventThrough: (event: React.TouchEvent<Element>) => void;
169
+ onPreventThrough: (event: React.TouchEvent) => void;
170
170
  renderMask(): JSX.Element;
171
171
  renderPopupContent(): JSX.Element;
172
172
  /**
173
173
  * 扩充children属性,根据trigger绑定不同事件
174
174
  */
175
- renderChildComponent(): React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
175
+ renderChildComponent(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
176
176
  renderPopupComponent(): JSX.Element;
177
177
  render(): JSX.Element;
178
178
  }
@@ -6,7 +6,7 @@ var __extends = this && this.__extends || function () {
6
6
  d.__proto__ = b;
7
7
  } || function (d, b) {
8
8
  for (var p in b) {
9
- if (b.hasOwnProperty(p)) d[p] = b[p];
9
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
10
10
  }
11
11
  };
12
12
 
@@ -14,6 +14,8 @@ var __extends = this && this.__extends || function () {
14
14
  };
15
15
 
16
16
  return function (d, b) {
17
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18
+
17
19
  _extendStatics(d, b);
18
20
 
19
21
  function __() {
@@ -45,8 +47,8 @@ import { findDOMNode } from 'react-dom';
45
47
  import classNames from 'classnames';
46
48
  import { getElementSize, getStyleValue, isTouchScreen, isEmptyObject, throttleWithRAF, contains, addEventListener } from '@autobest-ui/utils';
47
49
  import { CSSTransition } from 'react-transition-group';
48
- import { supportRef, composeRef } from './ref';
49
50
  import Portal from '../portal';
51
+ import { supportRef, composeRef } from './ref';
50
52
  import getPopupLocation from './getPopupLocation';
51
53
 
52
54
  function noop() {}
@@ -60,9 +62,9 @@ function (_super) {
60
62
  var _this = _super.call(this, props) || this;
61
63
 
62
64
  _this.prefixCls = 'ab-trigger';
63
- _this.popupRef = React.createRef();
64
- _this.maskRef = React.createRef();
65
- _this.triggerRef = React.createRef();
65
+ _this.popupRef = /*#__PURE__*/React.createRef();
66
+ _this.maskRef = /*#__PURE__*/React.createRef();
67
+ _this.triggerRef = /*#__PURE__*/React.createRef();
66
68
 
67
69
  _this.isClickToHide = function () {
68
70
  return _this.props.trigger.indexOf('click') !== -1;
@@ -104,7 +106,7 @@ function (_super) {
104
106
  isInsertNode = _a.isInsertNode;
105
107
 
106
108
  if (maxHeight) {
107
- popupEl.style.maxHeight = maxHeight + "px";
109
+ popupEl.style.maxHeight = "".concat(maxHeight, "px");
108
110
  popupEl.style.overflowY = 'auto';
109
111
  }
110
112
 
@@ -112,11 +114,11 @@ function (_super) {
112
114
  var rootWidth = getElementSize(rootEl).width;
113
115
 
114
116
  if (isMinRootWidth) {
115
- popupEl.style.minWidth = rootWidth + "px";
117
+ popupEl.style.minWidth = "".concat(rootWidth, "px");
116
118
  }
117
119
 
118
120
  if (isMaxRootWidth) {
119
- popupEl.style.maxWidth = rootWidth + "px";
121
+ popupEl.style.maxWidth = "".concat(rootWidth, "px");
120
122
  popupEl.style.overflowX = 'auto';
121
123
  }
122
124
  } // 计算Popup元素应该显示的位置
@@ -143,15 +145,15 @@ function (_super) {
143
145
  }
144
146
 
145
147
  popupEl.style.transformOrigin = transformOrigin;
146
- popupEl.style.left = left + "px";
147
- popupEl.style.top = top + "px";
148
+ popupEl.style.left = "".concat(left, "px");
149
+ popupEl.style.top = "".concat(top, "px");
148
150
 
149
151
  if (popupMaxHeightByCalc) {
150
- popupEl.style.maxHeight = popupMaxWidthByCalc + "px";
152
+ popupEl.style.maxHeight = "".concat(popupMaxWidthByCalc, "px");
151
153
  }
152
154
 
153
155
  if (popupMaxWidthByCalc) {
154
- popupEl.style.maxWidth = popupMaxWidthByCalc + "px";
156
+ popupEl.style.maxWidth = "".concat(popupMaxWidthByCalc, "px");
155
157
  popupEl.style.overflowX = 'auto';
156
158
  } else if (!isMaxRootWidth) {
157
159
  popupEl.style.maxWidth = '';
@@ -517,8 +519,8 @@ function (_super) {
517
519
 
518
520
  if (showMask) {
519
521
  var cls = this.prefixCls;
520
- return React.createElement("div", {
521
- className: classNames(cls + "-mask", (_a = {}, _a[cls + "-mask-show"] = visible, _a)),
522
+ return /*#__PURE__*/React.createElement("div", {
523
+ className: classNames("".concat(cls, "-mask"), (_a = {}, _a["".concat(cls, "-mask-show")] = visible, _a)),
522
524
  ref: this.maskRef,
523
525
  onTouchEnd: this.onPreventThrough
524
526
  });
@@ -540,7 +542,7 @@ function (_super) {
540
542
  visible = _c.visible,
541
543
  isUserOperated = _c.isUserOperated,
542
544
  trigger = _c.trigger;
543
- var wrapClass = classNames(cls + "-wrap", wrapClassName, (_a = {}, _a[cls + "-hidden"] = isInsertNode && !isUserOperated && !visible, _a)); // hover 下,对popup增加相应的事件,延迟隐藏,可以在弹框中停留
545
+ var wrapClass = classNames("".concat(cls, "-wrap"), wrapClassName, (_a = {}, _a["".concat(cls, "-hidden")] = isInsertNode && !isUserOperated && !visible, _a)); // hover 下,对popup增加相应的事件,延迟隐藏,可以在弹框中停留
544
546
 
545
547
  var mouseProps = {};
546
548
 
@@ -551,14 +553,14 @@ function (_super) {
551
553
 
552
554
  mouseProps.onMouseDown = this.onPopupMouseDown;
553
555
  mouseProps.onTouchStart = this.onPopupMouseDown;
554
- return React.createElement(CSSTransition, {
556
+ return /*#__PURE__*/React.createElement(CSSTransition, {
555
557
  "in": visible,
556
558
  onEnter: this.forceAlign,
557
559
  timeout: 200,
558
- classNames: cls + "-fade" + (isTransformHorizontalDirection ? '-hr' : ''),
560
+ classNames: "".concat(cls, "-fade").concat(isTransformHorizontalDirection ? '-hr' : ''),
559
561
  onExited: this.onExited,
560
562
  appear: true
561
- }, React.createElement("div", __assign({}, mouseProps, {
563
+ }, /*#__PURE__*/React.createElement("div", __assign({}, mouseProps, {
562
564
  className: wrapClass,
563
565
  ref: this.popupRef
564
566
  }), typeof popup === 'function' ? popup() : popup));
@@ -600,23 +602,23 @@ function (_super) {
600
602
  } // 对当前children元素添加额外属性
601
603
 
602
604
 
603
- return React.cloneElement(child, cloneProps);
605
+ return /*#__PURE__*/React.cloneElement(child, cloneProps);
604
606
  };
605
607
 
606
608
  Trigger.prototype.renderPopupComponent = function () {
607
609
  if (this.props.isInsertNode) {
608
- return React.createElement(React.Fragment, null, this.renderMask(), this.renderPopupContent());
610
+ return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderMask(), this.renderPopupContent());
609
611
  }
610
612
 
611
613
  if (this.state.visible || this.popupRef.current) {
612
- return React.createElement(Portal, null, React.createElement(React.Fragment, null, this.renderMask(), this.renderPopupContent()));
614
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(React.Fragment, null, this.renderMask(), this.renderPopupContent()));
613
615
  }
614
616
 
615
617
  return null;
616
618
  };
617
619
 
618
620
  Trigger.prototype.render = function () {
619
- return React.createElement(React.Fragment, null, this.renderChildComponent(), this.renderPopupComponent());
621
+ return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderChildComponent(), this.renderPopupComponent());
620
622
  };
621
623
 
622
624
  Trigger.defaultProps = {
@@ -30,11 +30,11 @@ function getLeftCommon(_a) {
30
30
  height: popInfo.height,
31
31
  left: left - (rootToPopupSpacing + popInfo.width),
32
32
  arrowStyle: hiddenArrow ? {} : {
33
- top: arrowTop + "px",
33
+ top: "".concat(arrowTop, "px"),
34
34
  right: '-4px',
35
35
  transform: 'translateY(-50%) rotate(-45deg)'
36
36
  },
37
- transformOrigin: isTransformHorizontalDirection ? 'right center' : "right " + arrowTop + "px"
37
+ transformOrigin: isTransformHorizontalDirection ? 'right center' : "right ".concat(arrowTop, "px")
38
38
  };
39
39
  }
40
40
  /* 具体方位 */
@@ -30,11 +30,11 @@ function getRightCommon(_a) {
30
30
  height: popInfo.height,
31
31
  left: left + rootToPopupSpacing + rootInfo.width,
32
32
  arrowStyle: hiddenArrow ? {} : {
33
- top: arrowTop + "px",
33
+ top: "".concat(arrowTop, "px"),
34
34
  left: '-4px',
35
35
  transform: 'translateY(-50%) rotate(-225deg)'
36
36
  },
37
- transformOrigin: isTransformHorizontalDirection ? 'left center' : "left " + arrowTop + "px"
37
+ transformOrigin: isTransformHorizontalDirection ? 'left center' : "left ".concat(arrowTop, "px")
38
38
  };
39
39
  }
40
40
 
@@ -29,12 +29,12 @@ function getTopCommon(_a) {
29
29
  width: popInfo.width,
30
30
  height: popInfo.height,
31
31
  arrowStyle: hiddenArrow ? {} : {
32
- left: arrowLeft + "px",
32
+ left: "".concat(arrowLeft, "px"),
33
33
  bottom: '-4px',
34
34
  transform: 'translateX(-50%) rotate(45deg)'
35
35
  },
36
36
  top: top - (rootToPopupSpacing + popInfo.height),
37
- transformOrigin: isTransformHorizontalDirection ? 'center bottom' : arrowLeft + "px bottom"
37
+ transformOrigin: isTransformHorizontalDirection ? 'center bottom' : "".concat(arrowLeft, "px bottom")
38
38
  };
39
39
  }
40
40
 
@@ -167,7 +167,7 @@ export function getLocationMethodByPlacement(_a) {
167
167
  availHeight: availSize.height
168
168
  });
169
169
  return {
170
- methodStr: useTopLocation ? "Top" + splitArr[1] : "Bottom" + splitArr[1],
170
+ methodStr: useTopLocation ? "Top".concat(splitArr[1]) : "Bottom".concat(splitArr[1]),
171
171
  isVertical: true
172
172
  };
173
173
  } // 判断悬浮框最终位置
@@ -181,7 +181,7 @@ export function getLocationMethodByPlacement(_a) {
181
181
  availWidth: availSize.width
182
182
  });
183
183
  return {
184
- methodStr: useLeftLocation ? "Left" + splitArr[1] : "Right" + splitArr[1],
184
+ methodStr: useLeftLocation ? "Left".concat(splitArr[1]) : "Right".concat(splitArr[1]),
185
185
  isVertical: false
186
186
  };
187
187
  }
@@ -16,7 +16,7 @@ export interface AccordionItemProps extends BaseAccordionItemProps, Pick<Collaps
16
16
  onTitleClick?: () => void;
17
17
  }
18
18
  declare class AccordionItem extends React.Component<AccordionItemProps, null> {
19
- getTitle: () => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)>) | (new (props: any) => React.Component<any, any, any>)>;
19
+ getTitle: () => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
20
20
  render(): JSX.Element;
21
21
  }
22
22
  export default AccordionItem;
@@ -19,7 +19,7 @@ var __extends = void 0 && (void 0).__extends || function () {
19
19
  d.__proto__ = b;
20
20
  } || function (d, b) {
21
21
  for (var p in b) {
22
- if (b.hasOwnProperty(p)) d[p] = b[p];
22
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
23
23
  }
24
24
  };
25
25
 
@@ -27,6 +27,8 @@ var __extends = void 0 && (void 0).__extends || function () {
27
27
  };
28
28
 
29
29
  return function (d, b) {
30
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
31
+
30
32
  _extendStatics(d, b);
31
33
 
32
34
  function __() {
@@ -56,7 +58,7 @@ function (_super) {
56
58
 
57
59
  var child = _react.default.Children.only(title);
58
60
 
59
- return _react.default.cloneElement(child, {
61
+ return /*#__PURE__*/_react.default.cloneElement(child, {
60
62
  onClick: onTitleClick
61
63
  });
62
64
  };
@@ -69,7 +71,7 @@ function (_super) {
69
71
  appear = _a.appear,
70
72
  children = _a.children,
71
73
  visible = _a.visible;
72
- return _react.default.createElement("li", null, _react.default.createElement(_collapse.default, {
74
+ return /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_collapse.default, {
73
75
  title: this.getTitle(),
74
76
  visible: visible,
75
77
  appear: appear
@@ -42,7 +42,7 @@ declare class Accordion extends React.Component<AccordionProps, AccordionState>
42
42
  * 展开下拉链接列表
43
43
  * @param name
44
44
  */
45
- onVisibleChange: (name: string | number) => void;
45
+ onVisibleChange: (name: React.ReactText) => void;
46
46
  render(): JSX.Element;
47
47
  }
48
48
  export default Accordion;
@@ -23,7 +23,7 @@ var __extends = void 0 && (void 0).__extends || function () {
23
23
  d.__proto__ = b;
24
24
  } || function (d, b) {
25
25
  for (var p in b) {
26
- if (b.hasOwnProperty(p)) d[p] = b[p];
26
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
27
27
  }
28
28
  };
29
29
 
@@ -31,6 +31,8 @@ var __extends = void 0 && (void 0).__extends || function () {
31
31
  };
32
32
 
33
33
  return function (d, b) {
34
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
35
+
34
36
  _extendStatics(d, b);
35
37
 
36
38
  function __() {
@@ -126,11 +128,11 @@ function (_super) {
126
128
  className = _a.className,
127
129
  children = _a.children;
128
130
  var visibleNames = this.state.visibleNames;
129
- return _react.default.createElement("ul", {
131
+ return /*#__PURE__*/_react.default.createElement("ul", {
130
132
  className: (0, _classnames.default)(cls, className)
131
133
  }, _react.default.Children.map(children, function (child) {
132
134
  var name = child.props.name;
133
- return _react.default.cloneElement(child, {
135
+ return /*#__PURE__*/_react.default.cloneElement(child, {
134
136
  key: name,
135
137
  onTitleClick: function onTitleClick() {
136
138
  _this.onVisibleChange(name);
@@ -31,26 +31,26 @@ function PortalAffix(_a, ref) {
31
31
  };
32
32
 
33
33
  if (fadeEffect) {
34
- return _react.default.createElement(_portal.default, null, _react.default.createElement(_reactTransitionGroup.CSSTransition, {
34
+ return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
35
35
  in: visible,
36
36
  timeout: 200,
37
- classNames: cls + "-fade",
37
+ classNames: "".concat(cls, "-fade"),
38
38
  appear: true
39
- }, _react.default.createElement("div", {
39
+ }, /*#__PURE__*/_react.default.createElement("div", {
40
40
  style: style,
41
41
  ref: ref,
42
- className: (0, _classnames.default)(className, cls + "-custom")
42
+ className: (0, _classnames.default)(className, "".concat(cls, "-custom"))
43
43
  }, children)));
44
44
  }
45
45
 
46
46
  style.display = visible ? '' : 'none';
47
- return _react.default.createElement(_portal.default, null, _react.default.createElement("div", {
47
+ return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement("div", {
48
48
  style: style,
49
49
  ref: ref,
50
- className: (0, _classnames.default)(className, cls + "-custom")
50
+ className: (0, _classnames.default)(className, "".concat(cls, "-custom"))
51
51
  }, children));
52
52
  }
53
53
 
54
- var _default = _react.default.forwardRef(PortalAffix);
54
+ var _default = /*#__PURE__*/_react.default.forwardRef(PortalAffix);
55
55
 
56
56
  exports.default = _default;
@@ -23,7 +23,7 @@ var __extends = void 0 && (void 0).__extends || function () {
23
23
  d.__proto__ = b;
24
24
  } || function (d, b) {
25
25
  for (var p in b) {
26
- if (b.hasOwnProperty(p)) d[p] = b[p];
26
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
27
27
  }
28
28
  };
29
29
 
@@ -31,6 +31,8 @@ var __extends = void 0 && (void 0).__extends || function () {
31
31
  };
32
32
 
33
33
  return function (d, b) {
34
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
35
+
34
36
  _extendStatics(d, b);
35
37
 
36
38
  function __() {
@@ -67,8 +69,8 @@ function (_super) {
67
69
 
68
70
  _this.prefixCls = 'ab-affix';
69
71
  _this.resizeHandler = null;
70
- _this.wrapRef = _react.default.createRef();
71
- _this.customRef = _react.default.createRef();
72
+ _this.wrapRef = /*#__PURE__*/_react.default.createRef();
73
+ _this.customRef = /*#__PURE__*/_react.default.createRef();
72
74
 
73
75
  _this.onHandlerScroll = function (isResize) {
74
76
  var _a = _this.props,
@@ -126,30 +128,30 @@ function (_super) {
126
128
  } else if ((!_this.isFixed || isResize) && currentFixed) {
127
129
  _this.isFixed = true;
128
130
  var documentWidth = document.body.offsetWidth;
129
- var allWidthLeft = ignoreHorizontalFixed ? "-" + scrollLeft + "px" : '0px';
131
+ var allWidthLeft = ignoreHorizontalFixed ? "-".concat(scrollLeft, "px") : '0px';
130
132
 
131
133
  if (renderAffix || fadeEffect) {
132
134
  _this.setState({
133
135
  visible: true,
134
- left: allWidth ? allWidthLeft : positionInfo.left + "px",
135
- top: offsetTop + "px",
136
- width: allWidth ? documentWidth + "px" : ''
136
+ left: allWidth ? allWidthLeft : "".concat(positionInfo.left, "px"),
137
+ top: "".concat(offsetTop, "px"),
138
+ width: allWidth ? "".concat(documentWidth, "px") : ''
137
139
  });
138
140
  } else {
139
141
  element.style.position = 'fixed';
140
- element.style.top = offsetTop + "px";
141
- element.style.left = allWidth ? allWidthLeft : positionInfo.left + "px";
142
- element.style.width = allWidth ? documentWidth + "px" : positionInfo.width + "px";
143
- parentElement.style.width = positionInfo.width + "px";
144
- parentElement.style.height = positionInfo.height + "px";
142
+ element.style.top = "".concat(offsetTop, "px");
143
+ element.style.left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
144
+ element.style.width = allWidth ? "".concat(documentWidth, "px") : "".concat(positionInfo.width, "px");
145
+ parentElement.style.width = "".concat(positionInfo.width, "px");
146
+ parentElement.style.height = "".concat(positionInfo.height, "px");
145
147
  }
146
148
 
147
149
  onChange(true);
148
150
  } else if (_this.isFixed && currentFixed && ignoreHorizontalFixed) {
149
- var allWidthLeft = "-" + scrollLeft + "px";
151
+ var allWidthLeft = "-".concat(scrollLeft, "px");
150
152
 
151
153
  if (renderAffix || fadeEffect) {
152
- var left = allWidth ? allWidthLeft : positionInfo.left + "px";
154
+ var left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
153
155
 
154
156
  if (left !== _this.state.left) {
155
157
  _this.setState({
@@ -157,7 +159,7 @@ function (_super) {
157
159
  });
158
160
  }
159
161
  } else {
160
- element.style.left = allWidth ? allWidthLeft : positionInfo.left + "px";
162
+ element.style.left = allWidth ? allWidthLeft : "".concat(positionInfo.left, "px");
161
163
  }
162
164
  }
163
165
 
@@ -219,7 +221,7 @@ function (_super) {
219
221
  width = _b.width;
220
222
 
221
223
  if ((fadeEffect || renderAffix) && (visible || this.customRef.current)) {
222
- return _react.default.createElement(_PortalAffix.default, {
224
+ return /*#__PURE__*/_react.default.createElement(_PortalAffix.default, {
223
225
  top: top,
224
226
  width: width,
225
227
  left: left,
@@ -239,7 +241,7 @@ function (_super) {
239
241
  className = _a.className,
240
242
  children = _a.children; // 这里需要两层div 包裹,最外层的是在固定时,防止页面抖动
241
243
 
242
- return _react.default.createElement("div", null, _react.default.createElement("div", {
244
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
243
245
  ref: this.wrapRef,
244
246
  className: (0, _classnames.default)(this.prefixCls, className)
245
247
  }, children), this.renderContent());