@autobest-ui/components 1.5.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 (160) 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.js +15 -13
  23. package/esm/input-number/index.d.ts +4 -4
  24. package/esm/input-number/index.js +27 -25
  25. package/esm/lazy-image/index.d.ts +3 -3
  26. package/esm/lazy-image/index.js +6 -4
  27. package/esm/link-list/index.js +24 -22
  28. package/esm/link-list/style/index.css +1 -1
  29. package/esm/loading/index.js +4 -4
  30. package/esm/loading-bar/index.d.ts +1 -0
  31. package/esm/loading-bar/index.js +3 -3
  32. package/esm/loading-container/index.js +6 -6
  33. package/esm/loading-icon/index.js +12 -12
  34. package/esm/mask/index.js +4 -4
  35. package/esm/message/index.js +14 -14
  36. package/esm/modal/Affix.d.ts +1 -0
  37. package/esm/modal/Affix.js +1 -1
  38. package/esm/modal/Title.js +9 -9
  39. package/esm/modal/getPopupLocation.js +1 -1
  40. package/esm/modal/index.d.ts +1 -1
  41. package/esm/modal/index.js +21 -19
  42. package/esm/modal/style/index.css +1 -1
  43. package/esm/move/index.d.ts +1 -1
  44. package/esm/move/index.js +14 -12
  45. package/esm/popover/index.js +9 -9
  46. package/esm/portal/index.js +5 -3
  47. package/esm/script/index.js +8 -6
  48. package/esm/select/index.d.ts +3 -3
  49. package/esm/select/index.js +34 -36
  50. package/esm/show-more/index.js +14 -12
  51. package/esm/skeleton/Item.js +3 -3
  52. package/esm/skeleton/index.js +11 -15
  53. package/esm/style.css +6 -6
  54. package/esm/table/body/BodyRow.js +8 -8
  55. package/esm/table/body/CheckIcon.js +7 -7
  56. package/esm/table/body/index.d.ts +1 -1
  57. package/esm/table/body/index.js +6 -6
  58. package/esm/table/header/CheckIcon.js +6 -6
  59. package/esm/table/header/HeaderCell.d.ts +1 -1
  60. package/esm/table/header/HeaderCell.js +10 -8
  61. package/esm/table/header/HeaderRow.d.ts +1 -0
  62. package/esm/table/header/HeaderRow.js +2 -2
  63. package/esm/table/index.d.ts +3 -7
  64. package/esm/table/index.js +20 -18
  65. package/esm/table/interface.js +1 -0
  66. package/esm/tabs/index.d.ts +1 -1
  67. package/esm/tabs/index.js +14 -12
  68. package/esm/tooltip/index.d.ts +1 -0
  69. package/esm/tooltip/index.js +1 -1
  70. package/esm/trigger/bottomAlign.js +2 -2
  71. package/esm/trigger/getPopupLocation.js +2 -1
  72. package/esm/trigger/index.d.ts +4 -4
  73. package/esm/trigger/index.js +24 -22
  74. package/esm/trigger/leftAlign.js +2 -2
  75. package/esm/trigger/rightAlign.js +2 -2
  76. package/esm/trigger/topAlign.js +2 -2
  77. package/esm/trigger/utils.js +2 -2
  78. package/lib/accordion/Item.d.ts +1 -1
  79. package/lib/accordion/Item.js +5 -3
  80. package/lib/accordion/index.d.ts +1 -1
  81. package/lib/accordion/index.js +5 -3
  82. package/lib/affix/PortalAffix.js +7 -7
  83. package/lib/affix/index.js +19 -17
  84. package/lib/carousel/index.js +16 -14
  85. package/lib/checkbox/index.js +19 -17
  86. package/lib/collapse/index.js +13 -11
  87. package/lib/confirm/index.d.ts +1 -1
  88. package/lib/confirm/index.js +14 -14
  89. package/lib/date-picker/calendar/Day.d.ts +1 -1
  90. package/lib/date-picker/calendar/Day.js +12 -12
  91. package/lib/date-picker/calendar/MonthYear.js +9 -9
  92. package/lib/date-picker/calendar/grid/index.js +18 -18
  93. package/lib/date-picker/calendar/index.js +8 -6
  94. package/lib/date-picker/calendar/types.js +5 -1
  95. package/lib/date-picker/index.js +15 -13
  96. package/lib/date-picker/utils.js +8 -8
  97. package/lib/drawer/Child.js +6 -6
  98. package/lib/drawer/index.js +11 -9
  99. package/lib/ellipsis/index.js +4 -4
  100. package/lib/guide/index.js +15 -13
  101. package/lib/index.js +54 -54
  102. package/lib/input-number/index.d.ts +4 -4
  103. package/lib/input-number/index.js +27 -25
  104. package/lib/lazy-image/index.d.ts +3 -3
  105. package/lib/lazy-image/index.js +6 -4
  106. package/lib/link-list/index.js +24 -22
  107. package/lib/link-list/style/index.css +1 -1
  108. package/lib/loading/index.js +4 -4
  109. package/lib/loading-bar/index.d.ts +1 -0
  110. package/lib/loading-bar/index.js +3 -3
  111. package/lib/loading-container/index.js +6 -6
  112. package/lib/loading-icon/index.js +12 -12
  113. package/lib/mask/index.js +4 -4
  114. package/lib/message/index.js +14 -14
  115. package/lib/modal/Affix.d.ts +1 -0
  116. package/lib/modal/Affix.js +1 -1
  117. package/lib/modal/Title.js +9 -9
  118. package/lib/modal/getPopupLocation.js +1 -1
  119. package/lib/modal/index.d.ts +1 -1
  120. package/lib/modal/index.js +22 -20
  121. package/lib/modal/style/index.css +1 -1
  122. package/lib/move/index.d.ts +1 -1
  123. package/lib/move/index.js +14 -12
  124. package/lib/popover/index.js +9 -9
  125. package/lib/portal/index.js +5 -3
  126. package/lib/script/index.js +8 -6
  127. package/lib/select/index.d.ts +3 -3
  128. package/lib/select/index.js +34 -36
  129. package/lib/show-more/index.js +14 -12
  130. package/lib/skeleton/Item.js +3 -3
  131. package/lib/skeleton/index.js +11 -15
  132. package/lib/style.css +6 -6
  133. package/lib/table/body/BodyRow.js +8 -8
  134. package/lib/table/body/CheckIcon.js +7 -7
  135. package/lib/table/body/index.d.ts +1 -1
  136. package/lib/table/body/index.js +6 -6
  137. package/lib/table/header/CheckIcon.js +6 -6
  138. package/lib/table/header/HeaderCell.d.ts +1 -1
  139. package/lib/table/header/HeaderCell.js +10 -8
  140. package/lib/table/header/HeaderRow.d.ts +1 -0
  141. package/lib/table/header/HeaderRow.js +2 -2
  142. package/lib/table/index.d.ts +3 -7
  143. package/lib/table/index.js +20 -18
  144. package/lib/table/interface.js +5 -1
  145. package/lib/tabs/index.d.ts +1 -1
  146. package/lib/tabs/index.js +14 -12
  147. package/lib/tooltip/index.d.ts +1 -0
  148. package/lib/tooltip/index.js +1 -1
  149. package/lib/trigger/align.js +24 -24
  150. package/lib/trigger/bottomAlign.js +3 -3
  151. package/lib/trigger/constants.js +1 -1
  152. package/lib/trigger/getPopupLocation.js +2 -1
  153. package/lib/trigger/index.d.ts +4 -4
  154. package/lib/trigger/index.js +25 -23
  155. package/lib/trigger/leftAlign.js +3 -3
  156. package/lib/trigger/ref.js +1 -1
  157. package/lib/trigger/rightAlign.js +3 -3
  158. package/lib/trigger/topAlign.js +3 -3
  159. package/lib/trigger/utils.js +4 -4
  160. package/package.json +2 -2
@@ -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 __() {
@@ -56,15 +58,15 @@ function (_super) {
56
58
 
57
59
  var hrefTarget = this.props.hrefTarget;
58
60
  var cls = this.prefixCls;
59
- return item.url ? React.createElement("a", {
61
+ return item.url ? /*#__PURE__*/React.createElement("a", {
60
62
  href: item.url,
61
- className: item.isHidden ? cls + "-hidden" : undefined,
63
+ className: item.isHidden ? "".concat(cls, "-hidden") : undefined,
62
64
  key: item.url,
63
65
  target: hrefTarget
64
- }, item.name + " ") : React.createElement("span", {
66
+ }, "".concat(item.name, " ")) : /*#__PURE__*/React.createElement("span", {
65
67
  key: item.name,
66
- className: classNames((_a = {}, _a[cls + "-hidden"] = item.isHidden, _a))
67
- }, item.name + " ");
68
+ className: classNames((_a = {}, _a["".concat(cls, "-hidden")] = item.isHidden, _a))
69
+ }, "".concat(item.name, " "));
68
70
  };
69
71
 
70
72
  LinkList.prototype.renderItem = function (item) {
@@ -75,21 +77,21 @@ function (_super) {
75
77
 
76
78
  var subInfo = item.subInfo;
77
79
  var cls = this.prefixCls;
78
- return React.createElement(Popover, {
80
+ return /*#__PURE__*/React.createElement(Popover, {
79
81
  key: item.name,
80
- tip: React.createElement(React.Fragment, null, React.createElement("strong", {
81
- className: cls + "-sub-title"
82
+ tip: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("strong", {
83
+ className: "".concat(cls, "-sub-title")
82
84
  }, subInfo.title, ": "), subInfo.list.map(function (subItem, index) {
83
- return React.createElement("a", {
85
+ return /*#__PURE__*/React.createElement("a", {
84
86
  href: subItem.url,
85
87
  key: index,
86
- className: cls + "-sub-link"
87
- }, subItem.name + " ");
88
+ className: "".concat(cls, "-sub-link")
89
+ }, "".concat(subItem.name, " "));
88
90
  })),
89
91
  isInsertNode: true,
90
92
  placement: "BottomLeft",
91
93
  trigger: "click",
92
- wrapClassName: cls + "-wrap-popover",
94
+ wrapClassName: "".concat(cls, "-wrap-popover"),
93
95
  mouseEnterDelay: 0.1
94
96
  }, this.renderItemContent(item));
95
97
  };
@@ -124,17 +126,17 @@ function (_super) {
124
126
  extraTopElement = _c.extraTopElement,
125
127
  extraBottomElement = _c.extraBottomElement,
126
128
  columnCount = _c.columnCount;
127
- return React.createElement("div", {
129
+ return /*#__PURE__*/React.createElement("div", {
128
130
  className: classNames(cls, className)
129
- }, title ? React.createElement("div", {
130
- className: classNames(cls + "-title", (_a = {}, _a[cls + "-divider"] = !visible, _a)),
131
+ }, title ? /*#__PURE__*/React.createElement("div", {
132
+ className: classNames("".concat(cls, "-title"), (_a = {}, _a["".concat(cls, "-divider")] = !visible, _a)),
131
133
  onClick: this.onVisibleChange
132
- }, title, React.createElement("span", {
133
- className: cls + "-icon"
134
- }, visible ? '-' : '+')) : null, React.createElement("div", {
135
- className: classNames(cls + "-body", (_b = {}, _b[cls + "-active"] = visible, _b))
136
- }, extraTopElement, React.createElement("div", {
137
- className: classNames(cls + "-content", cls + "-col" + columnCount)
134
+ }, title, /*#__PURE__*/React.createElement("span", {
135
+ className: "".concat(cls, "-icon")
136
+ }, visible ? '-' : '+')) : null, /*#__PURE__*/React.createElement("div", {
137
+ className: classNames("".concat(cls, "-body"), (_b = {}, _b["".concat(cls, "-active")] = visible, _b))
138
+ }, extraTopElement, /*#__PURE__*/React.createElement("div", {
139
+ className: classNames("".concat(cls, "-content"), "".concat(cls, "-col").concat(columnCount))
138
140
  }, this.renderContent()), extraBottomElement));
139
141
  };
140
142
 
@@ -1 +1 @@
1
- .ab-link-list-title{font-size:.16rem;margin:0 0;padding:0 0 .12rem 0;display:flex;justify-content:space-between;align-items:center}.ab-link-list-icon{display:none}.ab-link-list-content{flex-wrap:wrap;width:auto;margin-right:-.15rem}.ab-link-list-content.ab-link-list-col2>a,.ab-link-list-content.ab-link-list-col2>span{min-width:calc(100% / 2 - .15rem);max-width:calc(100% / 2 - .15rem)}.ab-link-list-content.ab-link-list-col4>a,.ab-link-list-content.ab-link-list-col4>span{min-width:calc(100% / 4 - .15rem);max-width:calc(100% / 4 - .15rem)}.ab-link-list-content.ab-link-list-col5>a,.ab-link-list-content.ab-link-list-col5>span{min-width:calc(100% / 5 - .15rem);max-width:calc(100% / 5 - .15rem)}.ab-link-list-content.ab-link-list-col6>a,.ab-link-list-content.ab-link-list-col6>span{min-width:calc(100% / 6 - .15rem);max-width:calc(100% / 6 - .15rem)}.ab-link-list-content.ab-link-list-col8>a,.ab-link-list-content.ab-link-list-col8>span{min-width:calc(100% / 8 - .15rem);max-width:calc(100% / 8 - .15rem)}.ab-link-list-content>a,.ab-link-list-content>span{cursor:pointer;border:.5px solid #d0d0d0;margin-bottom:8px;display:inline-block;justify-content:space-between;align-items:center;width:100%;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.085rem .15rem .085rem .12rem;color:#333;margin-right:.15rem}.ab-link-list-content>a:after,.ab-link-list-content>span:after{content:'>';position:absolute;right:.1rem;top:50%;transform:translateY(-50%);color:grey;font-size:.12rem}.ab-link-list-content>a:hover,.ab-link-list-content>span:hover{text-decoration:underline;color:#f97601}.ab-link-list-content>.ab-link-list-hidden{display:none}.ab-link-list-wrap-popover.ab-popover-wrap{max-width:3.5rem;min-width:3rem}.ab-link-list-sub-title{display:block;padding-bottom:.06rem;font-size:.12rem}.ab-link-list-sub-link{text-decoration:underline;color:#333;font-size:.12rem;padding:0 .05rem .05rem 0;display:inline-block}@media only screen and (max-width:767px){.ab-link-list-divider{border-bottom:1px solid #d0d0d0}.ab-link-list-body{height:0;width:0;overflow:hidden}.ab-link-list-body.ab-link-list-active{height:auto;width:auto}.ab-link-list-content>a,.ab-link-list-content>span{min-width:calc(50% - .15rem)!important;max-width:calc(50% - .15rem)!important}.ab-link-list-icon{font-weight:700;font-size:.22rem;cursor:pointer;width:.2rem;height:.2rem;display:flex;align-items:center;justify-content:center}}
1
+ .ab-link-list-title{font-size:.16rem;margin:0 0;padding:0 0 .12rem 0;display:flex;justify-content:space-between;align-items:center}.ab-link-list-icon{display:none}.ab-link-list-content{flex-wrap:wrap;width:auto;margin-right:-.15rem}.ab-link-list-content.ab-link-list-col2>a,.ab-link-list-content.ab-link-list-col2>span{min-width:calc(100% / 2 - .15rem);max-width:calc(100% / 2 - .15rem)}.ab-link-list-content.ab-link-list-col4>a,.ab-link-list-content.ab-link-list-col4>span{min-width:calc(100% / 4 - .15rem);max-width:calc(100% / 4 - .15rem)}.ab-link-list-content.ab-link-list-col5>a,.ab-link-list-content.ab-link-list-col5>span{min-width:calc(100% / 5 - .15rem);max-width:calc(100% / 5 - .15rem)}.ab-link-list-content.ab-link-list-col6>a,.ab-link-list-content.ab-link-list-col6>span{min-width:calc(100% / 6 - .15rem);max-width:calc(100% / 6 - .15rem)}.ab-link-list-content.ab-link-list-col8>a,.ab-link-list-content.ab-link-list-col8>span{min-width:calc(100% / 8 - .15rem);max-width:calc(100% / 8 - .15rem)}.ab-link-list-content>a,.ab-link-list-content>span{cursor:pointer;border:.5px solid #d0d0d0;margin-bottom:8px;display:inline-block;justify-content:space-between;align-items:center;width:100%;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.085rem .15rem .085rem .12rem;color:#333;margin-right:.15rem}.ab-link-list-content>a:after,.ab-link-list-content>span:after{content:">";position:absolute;right:.1rem;top:50%;transform:translateY(-50%);color:grey;font-size:.12rem}.ab-link-list-content>a:hover,.ab-link-list-content>span:hover{text-decoration:underline;color:#f97601}.ab-link-list-content>.ab-link-list-hidden{display:none}.ab-link-list-wrap-popover.ab-popover-wrap{max-width:3.5rem;min-width:3rem}.ab-link-list-sub-title{display:block;padding-bottom:.06rem;font-size:.12rem}.ab-link-list-sub-link{text-decoration:underline;color:#333;font-size:.12rem;padding:0 .05rem .05rem 0;display:inline-block}@media only screen and (max-width:767px){.ab-link-list-divider{border-bottom:1px solid #d0d0d0}.ab-link-list-body{height:0;width:0;overflow:hidden}.ab-link-list-body.ab-link-list-active{height:auto;width:auto}.ab-link-list-content>a,.ab-link-list-content>span{min-width:calc(50% - .15rem)!important;max-width:calc(50% - .15rem)!important}.ab-link-list-icon{font-weight:700;font-size:.22rem;cursor:pointer;width:.2rem;height:.2rem;display:flex;align-items:center;justify-content:center}}
@@ -27,10 +27,10 @@ var prevCustomIcon = null;
27
27
  var cls = 'ab-loading';
28
28
 
29
29
  function getLoadingContainer(customIcon, className) {
30
- return React.createElement("div", {
31
- className: classNames(cls + "-wrap", className)
32
- }, customIcon || React.createElement(LoadingIcon, {
33
- className: cls + "-content"
30
+ return /*#__PURE__*/React.createElement("div", {
31
+ className: classNames("".concat(cls, "-wrap"), className)
32
+ }, customIcon || /*#__PURE__*/React.createElement(LoadingIcon, {
33
+ className: "".concat(cls, "-content")
34
34
  }));
35
35
  } // openIds 容器
36
36
 
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export default function LoadingBar(): JSX.Element;
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import Portal from '../portal';
3
3
  var cls = 'ab-loading-bar';
4
4
  export default function LoadingBar() {
5
- return React.createElement(Portal, null, React.createElement("div", {
5
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement("div", {
6
6
  className: cls
7
- }, React.createElement("span", {
8
- className: cls + "-bar"
7
+ }, /*#__PURE__*/React.createElement("span", {
8
+ className: "".concat(cls, "-bar")
9
9
  })));
10
10
  }
@@ -10,12 +10,12 @@ function LoadingContainer(props) {
10
10
  loading = _b === void 0 ? false : _b,
11
11
  className = props.className,
12
12
  children = props.children;
13
- return React.createElement("div", {
14
- className: classNames(className, cls, (_a = {}, _a[cls + "-active"] = loading, _a))
15
- }, children, loading && React.createElement("div", {
16
- className: cls + "-icon-box"
17
- }, React.createElement(LoadingIcon, {
18
- className: cls + "-icon"
13
+ return /*#__PURE__*/React.createElement("div", {
14
+ className: classNames(className, cls, (_a = {}, _a["".concat(cls, "-active")] = loading, _a))
15
+ }, children, loading && /*#__PURE__*/React.createElement("div", {
16
+ className: "".concat(cls, "-icon-box")
17
+ }, /*#__PURE__*/React.createElement(LoadingIcon, {
18
+ className: "".concat(cls, "-icon")
19
19
  })));
20
20
  }
21
21
 
@@ -4,50 +4,50 @@ var cls = 'ab-svg-loading';
4
4
 
5
5
  var LoadingIcon = function LoadingIcon(props) {
6
6
  var className = props.className;
7
- return React.createElement("span", {
7
+ return /*#__PURE__*/React.createElement("span", {
8
8
  className: classNames(className, cls)
9
- }, React.createElement("svg", {
9
+ }, /*#__PURE__*/React.createElement("svg", {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  width: "24",
12
12
  height: "24",
13
13
  viewBox: "0 0 24 24",
14
- className: cls + "-icon"
15
- }, React.createElement("circle", {
14
+ className: "".concat(cls, "-icon")
15
+ }, /*#__PURE__*/React.createElement("circle", {
16
16
  cx: "12",
17
17
  cy: "2",
18
18
  r: "2",
19
19
  fill: "#202020"
20
- }), React.createElement("circle", {
20
+ }), /*#__PURE__*/React.createElement("circle", {
21
21
  cx: "19",
22
22
  cy: "5",
23
23
  r: "2",
24
24
  fill: "#404040"
25
- }), React.createElement("circle", {
25
+ }), /*#__PURE__*/React.createElement("circle", {
26
26
  cx: "22",
27
27
  cy: "12",
28
28
  r: "2",
29
29
  fill: "#606060"
30
- }), React.createElement("circle", {
30
+ }), /*#__PURE__*/React.createElement("circle", {
31
31
  cx: "19",
32
32
  cy: "19",
33
33
  r: "2",
34
34
  fill: "gray"
35
- }), React.createElement("circle", {
35
+ }), /*#__PURE__*/React.createElement("circle", {
36
36
  cx: "12",
37
37
  cy: "22",
38
38
  r: "2",
39
39
  fill: "#b0b0b0"
40
- }), React.createElement("circle", {
40
+ }), /*#__PURE__*/React.createElement("circle", {
41
41
  cx: "5",
42
42
  cy: "19",
43
43
  r: "2",
44
44
  fill: "#d0d0d0"
45
- }), React.createElement("circle", {
45
+ }), /*#__PURE__*/React.createElement("circle", {
46
46
  cx: "2",
47
47
  cy: "12",
48
48
  r: "2",
49
49
  fill: "#f0f0f0"
50
- }), React.createElement("circle", {
50
+ }), /*#__PURE__*/React.createElement("circle", {
51
51
  cx: "5",
52
52
  cy: "5",
53
53
  r: "2",
@@ -55,4 +55,4 @@ var LoadingIcon = function LoadingIcon(props) {
55
55
  })));
56
56
  };
57
57
 
58
- export default React.memo(LoadingIcon);
58
+ export default /*#__PURE__*/React.memo(LoadingIcon);
package/esm/mask/index.js CHANGED
@@ -19,12 +19,12 @@ function Mask(_a, ref) {
19
19
  onClose(event);
20
20
  }
21
21
  }, [onClose]);
22
- return React.createElement(CSSTransition, {
22
+ return /*#__PURE__*/React.createElement(CSSTransition, {
23
23
  "in": visible,
24
24
  timeout: timeout,
25
- classNames: prefixCls + "-fade",
25
+ classNames: "".concat(prefixCls, "-fade"),
26
26
  appear: true
27
- }, React.createElement("div", {
27
+ }, /*#__PURE__*/React.createElement("div", {
28
28
  className: classNames(prefixCls, className),
29
29
  onMouseDown: onChangeVisible,
30
30
  onTouchStart: onChangeVisible,
@@ -32,4 +32,4 @@ function Mask(_a, ref) {
32
32
  }));
33
33
  }
34
34
 
35
- export default React.memo(React.forwardRef(Mask));
35
+ export default /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Mask));
@@ -41,7 +41,7 @@ export default function Message(config) {
41
41
 
42
42
  if (!container) {
43
43
  container = document.createElement('div');
44
- container.setAttribute('class', classNames(currentConfig.className, prefixCls + "-container"));
44
+ container.setAttribute('class', classNames(currentConfig.className, "".concat(prefixCls, "-container")));
45
45
  document.body.appendChild(container);
46
46
  }
47
47
 
@@ -49,9 +49,9 @@ export default function Message(config) {
49
49
  close(items[0].id);
50
50
  }
51
51
 
52
- function close(id) {
52
+ function close(currentId) {
53
53
  var index = items.findIndex(function (item) {
54
- return item.id === id;
54
+ return item.id === currentId;
55
55
  });
56
56
 
57
57
  if (index >= 0) {
@@ -63,14 +63,14 @@ export default function Message(config) {
63
63
  render();
64
64
  }
65
65
 
66
- function _onExited(id) {
67
- currentConfig.onDestroy(id);
66
+ function _onExited(currentId) {
67
+ currentConfig.onDestroy(currentId);
68
68
  } // 渲染组件
69
69
 
70
70
 
71
71
  function render() {
72
72
  var cls = prefixCls;
73
- ReactDOM.render(React.createElement(TransitionGroup, {
73
+ ReactDOM.render( /*#__PURE__*/React.createElement(TransitionGroup, {
74
74
  component: null
75
75
  }, items.map(function (item) {
76
76
  var _a = item.currentConfig,
@@ -82,19 +82,19 @@ export default function Message(config) {
82
82
  width: width,
83
83
  height: height
84
84
  };
85
- return React.createElement(CSSTransition, {
85
+ return /*#__PURE__*/React.createElement(CSSTransition, {
86
86
  key: item.id,
87
87
  timeout: 300,
88
- classNames: cls + "-fade",
88
+ classNames: "".concat(cls, "-fade"),
89
89
  onExited: function onExited() {
90
90
  _onExited(item.id);
91
91
  },
92
92
  appear: true
93
- }, React.createElement("div", {
94
- className: classNames(cls + "-content", contentClassName),
93
+ }, /*#__PURE__*/React.createElement("div", {
94
+ className: classNames("".concat(cls, "-content"), contentClassName),
95
95
  style: style
96
- }, content, React.createElement("div", {
97
- className: cls + "-close",
96
+ }, content, /*#__PURE__*/React.createElement("div", {
97
+ className: "".concat(cls, "-close"),
98
98
  onClick: function onClick() {
99
99
  close(item.id);
100
100
  }
@@ -115,8 +115,8 @@ export default function Message(config) {
115
115
  }, currentConfig.expires);
116
116
 
117
117
  function destroy() {
118
- items.forEach(function (item) {
119
- clearTimeout(item.timer);
118
+ items.forEach(function (child) {
119
+ clearTimeout(child.timer);
120
120
  });
121
121
  items = [];
122
122
  render();
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PortalProps } from '../portal';
2
3
  export declare type AffixProps = Required<Omit<PortalProps, 'didUpdate'>>;
3
4
  export default function Affix(props: AffixProps): JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import Portal from '../portal';
3
3
  export default function Affix(props) {
4
- return React.createElement(Portal, {
4
+ return /*#__PURE__*/React.createElement(Portal, {
5
5
  getContainer: props.getContainer
6
6
  }, props.children);
7
7
  }
@@ -6,11 +6,11 @@ function Times(_a) {
6
6
  closable = _a.closable;
7
7
 
8
8
  if (closable) {
9
- return React.createElement("span", {
10
- className: prefixCls + "-times",
9
+ return /*#__PURE__*/React.createElement("span", {
10
+ className: "".concat(prefixCls, "-times"),
11
11
  onMouseDown: onClose,
12
12
  onTouchStart: onClose
13
- }, React.createElement("svg", {
13
+ }, /*#__PURE__*/React.createElement("svg", {
14
14
  viewBox: "64 64 896 896",
15
15
  className: "",
16
16
  "data-icon": "close",
@@ -19,7 +19,7 @@ function Times(_a) {
19
19
  fill: "currentColor",
20
20
  "aria-hidden": "true",
21
21
  focusable: "false"
22
- }, React.createElement("path", {
22
+ }, /*#__PURE__*/React.createElement("path", {
23
23
  d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"
24
24
  })));
25
25
  }
@@ -34,20 +34,20 @@ function Title(_a) {
34
34
  onClose = _a.onClose;
35
35
 
36
36
  if (title) {
37
- return React.createElement("div", {
38
- className: prefixCls + "-title"
39
- }, title, React.createElement(Times, {
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ className: "".concat(prefixCls, "-title")
39
+ }, title, /*#__PURE__*/React.createElement(Times, {
40
40
  prefixCls: prefixCls,
41
41
  closable: closable,
42
42
  onClose: onClose
43
43
  }));
44
44
  }
45
45
 
46
- return React.createElement(Times, {
46
+ return /*#__PURE__*/React.createElement(Times, {
47
47
  prefixCls: prefixCls,
48
48
  closable: closable,
49
49
  onClose: onClose
50
50
  });
51
51
  }
52
52
 
53
- export default React.memo(Title);
53
+ export default /*#__PURE__*/React.memo(Title);
@@ -7,7 +7,7 @@ export default function getPopupLocation(_a) {
7
7
  var clientSize = getAvailSize(true);
8
8
  var popupSize = getElementSize(element);
9
9
  var doubleLimit = popupLimitSpacing * 2;
10
- var height = popupSize.height > clientSize.height - doubleLimit ? clientSize.height - doubleLimit + "px" : '';
10
+ var height = popupSize.height > clientSize.height - doubleLimit ? "".concat(clientSize.height - doubleLimit, "px") : '';
11
11
 
12
12
  if (placement === 'top') {
13
13
  return {
@@ -77,7 +77,7 @@ interface ModalStates {
77
77
  cacheVisible: boolean;
78
78
  }
79
79
  declare class Modal extends React.Component<ModalProps, ModalStates> {
80
- static Affix: React.ComponentType<Required<Pick<import("../portal").PortalProps, "children" | "getContainer">>>;
80
+ static Affix: React.ComponentType<Required<Omit<import("../portal").PortalProps, "didUpdate">>>;
81
81
  static cacheOpenedIds: number[];
82
82
  openId: number;
83
83
  prefixCls: string;
@@ -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 __() {
@@ -29,9 +31,9 @@ import { CSSTransition } from 'react-transition-group';
29
31
  import classNames from 'classnames';
30
32
  import { addEventListener, hasVerticalScrollbar, isTouchScreen, getElementSize, getStyle, contains, getStyleValue, getScrollBarSize } from '@autobest-ui/utils';
31
33
  import Portal from '../portal';
34
+ import Mask from '../mask';
32
35
  import Title from './Title';
33
36
  import Affix from './Affix';
34
- import Mask from '../mask';
35
37
  import getPopupLocation from './getPopupLocation';
36
38
 
37
39
  function getId() {
@@ -53,8 +55,8 @@ function (_super) {
53
55
  _this.openId = getId();
54
56
  _this.prefixCls = 'ab-modal';
55
57
  _this.scrollBarSize = 0;
56
- _this.popupRef = React.createRef();
57
- _this.maskRef = React.createRef();
58
+ _this.popupRef = /*#__PURE__*/React.createRef();
59
+ _this.maskRef = /*#__PURE__*/React.createRef();
58
60
  /**
59
61
  * 全局事件回调
60
62
  * @param event
@@ -139,11 +141,11 @@ function (_super) {
139
141
  currentDocument.style.overflow = 'hidden';
140
142
 
141
143
  if (hasVerticalScrollbar(_this.scrollBarSize)) {
142
- currentDocument.style.paddingRight = _this.scrollBarSize + "px";
144
+ currentDocument.style.paddingRight = "".concat(_this.scrollBarSize, "px");
143
145
 
144
146
  if (element && element.parentNode) {
145
147
  var parentNode = element.parentNode;
146
- parentNode.style.paddingRight = _this.scrollBarSize + "px";
148
+ parentNode.style.paddingRight = "".concat(_this.scrollBarSize, "px");
147
149
  }
148
150
  }
149
151
  }
@@ -178,9 +180,9 @@ function (_super) {
178
180
  var popupHeight = height || _this.props.height;
179
181
 
180
182
  if (!popupHeight || popupHeight === 'auto') {
181
- lastChild.style.maxHeight = "calc(100vh - .3rem - " + (placement === 'top' && top ? top : '0px') + " - " + firstChildHeight + "px)";
183
+ lastChild.style.maxHeight = "calc(100vh - .3rem - ".concat(placement === 'top' && top ? top : '0px', " - ").concat(firstChildHeight, "px)");
182
184
  } else {
183
- lastChild.style.maxHeight = "calc(100% - " + firstChildHeight + "px)";
185
+ lastChild.style.maxHeight = "calc(100% - ".concat(firstChildHeight, "px)");
184
186
  }
185
187
  });
186
188
  }
@@ -365,27 +367,27 @@ function (_super) {
365
367
  title = _b.title,
366
368
  placement = _b.placement,
367
369
  top = _b.top;
368
- var maxHeight = "calc(100vh - .3rem - " + (placement === 'top' && top ? top : '0px') + ")";
369
- return React.createElement("div", {
370
- className: classNames(cls, className, (_a = {}, _a[cls + "-center"] = placement === 'center', _a[this.prefixCls + "-hidden"] = !visible && !this.state.isUserOperated, _a))
371
- }, React.createElement(CSSTransition, {
370
+ var maxHeight = "calc(100vh - .3rem - ".concat(placement === 'top' && top ? top : '0px', ")");
371
+ return /*#__PURE__*/React.createElement("div", {
372
+ className: classNames(cls, className, (_a = {}, _a["".concat(cls, "-center")] = placement === 'center', _a["".concat(this.prefixCls, "-hidden")] = !visible && !this.state.isUserOperated, _a))
373
+ }, /*#__PURE__*/React.createElement(CSSTransition, {
372
374
  "in": visible,
373
375
  timeout: 300,
374
- classNames: cls + "-fade",
376
+ classNames: "".concat(cls, "-fade"),
375
377
  onEnter: this.onEnter,
376
378
  onEntered: this.onEntered,
377
379
  onExited: this.onExited,
378
380
  appear: true
379
381
  }, function (state) {
380
- return React.createElement("div", {
381
- className: cls + "-content",
382
+ return /*#__PURE__*/React.createElement("div", {
383
+ className: "".concat(cls, "-content"),
382
384
  style: state !== 'exited' ? {
383
385
  width: width,
384
386
  height: height,
385
387
  maxHeight: maxHeight
386
388
  } : undefined,
387
389
  ref: _this.popupRef
388
- }, React.createElement(Title, {
390
+ }, /*#__PURE__*/React.createElement(Title, {
389
391
  prefixCls: cls,
390
392
  closable: closable,
391
393
  onClose: _this.onClose,
@@ -400,16 +402,16 @@ function (_super) {
400
402
  var visible = this.props.visible; // 插入元素,不使用传送门, 和当前元素同级
401
403
 
402
404
  if (this.props.isInsertNode) {
403
- return React.createElement(React.Fragment, null, React.createElement(Mask, {
405
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
404
406
  visible: visible,
405
- className: classNames((_a = {}, _a[this.prefixCls + "-hidden"] = !visible && !this.state.isUserOperated, _a)),
407
+ className: classNames((_a = {}, _a["".concat(this.prefixCls, "-hidden")] = !visible && !this.state.isUserOperated, _a)),
406
408
  timeout: 500,
407
409
  ref: this.maskRef
408
410
  }), this.renderPopup());
409
411
  }
410
412
 
411
413
  if (visible || this.popupRef.current) {
412
- return React.createElement(Portal, null, React.createElement(React.Fragment, null, React.createElement(Mask, {
414
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
413
415
  visible: visible,
414
416
  timeout: 500,
415
417
  ref: this.maskRef
@@ -1 +1 @@
1
- .ab-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:101;overflow:auto;outline:0}.ab-modal.ab-modal-center{text-align:center}.ab-modal.ab-modal-center:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:''}.ab-modal.ab-modal-center .ab-modal-content{top:0;text-align:left;display:inline-block;vertical-align:middle}.ab-modal-content{position:relative;background-color:#fff;max-width:calc(100vw - .3rem);margin-left:auto;margin-right:auto;overflow:auto;-webkit-overflow-scrolling:touch;transition:transform .3s,opacity .3s cubic-bezier(.7,.3,.1,1);z-index:101}.ab-modal-title{position:relative;width:100%}.ab-modal-title .ab-modal-times{top:50%;transform:translateY(-50%)}.ab-modal-times{position:absolute;top:.12rem;right:.12rem;font-size:.15rem;color:#b0b0b0;cursor:pointer}.ab-modal-times svg{display:block}.ab-modal-times:hover{color:#333}.ab-modal-hidden{display:none}@media only screen and (max-width:767px){.ab-modal-content{width:calc(100vw - .3rem)}}.ab-modal-fade-appear,.ab-modal-fade-enter{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-appear-active,.ab-modal-fade-enter-active{transform:translateZ(0);opacity:1}.ab-modal-fade-enter-done{transform:translateZ(0);opacity:1}.ab-modal-fade-exit{transform:translateZ(0);opacity:1}.ab-modal-fade-exit-active{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-exit-done{display:none}
1
+ .ab-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:101;overflow:auto;outline:0}.ab-modal.ab-modal-center{text-align:center}.ab-modal.ab-modal-center:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:""}.ab-modal.ab-modal-center .ab-modal-content{top:0;text-align:left;display:inline-block;vertical-align:middle}.ab-modal-content{position:relative;background-color:#fff;max-width:calc(100vw - .3rem);margin-left:auto;margin-right:auto;overflow:auto;-webkit-overflow-scrolling:touch;transition:transform .3s,opacity .3s cubic-bezier(.7,.3,.1,1);z-index:101}.ab-modal-title{position:relative;width:100%}.ab-modal-title .ab-modal-times{top:50%;transform:translateY(-50%)}.ab-modal-times{position:absolute;top:.12rem;right:.12rem;font-size:.15rem;color:#b0b0b0;cursor:pointer}.ab-modal-times svg{display:block}.ab-modal-times:hover{color:#333}.ab-modal-hidden{display:none}@media only screen and (max-width:767px){.ab-modal-content{width:calc(100vw - .3rem)}}.ab-modal-fade-appear,.ab-modal-fade-enter{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-appear-active,.ab-modal-fade-enter-active{transform:translateZ(0);opacity:1}.ab-modal-fade-enter-done{transform:translateZ(0);opacity:1}.ab-modal-fade-exit{transform:translateZ(0);opacity:1}.ab-modal-fade-exit-active{transform:translate3d(0,-30px,0);opacity:0}.ab-modal-fade-exit-done{display:none}
@@ -107,6 +107,6 @@ declare class Move extends React.Component<MoveProps> {
107
107
  setElementInfo(element: any): void;
108
108
  onTransitionEnd: () => void;
109
109
  getDomNode(): HTMLElement;
110
- render(): 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>)>;
110
+ render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
111
111
  }
112
112
  export default Move;
package/esm/move/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 __() {
@@ -83,7 +85,7 @@ function (_super) {
83
85
  _this.isTouchScale = false; // 强制刷新元素位置
84
86
 
85
87
  _this.isForceUpdatePlacement = false;
86
- _this.moveRef = React.createRef();
88
+ _this.moveRef = /*#__PURE__*/React.createRef();
87
89
  _this.updateTimer = null;
88
90
 
89
91
  _this.refreshInfo = function (el, prevProps) {
@@ -353,34 +355,34 @@ function (_super) {
353
355
  }
354
356
 
355
357
  this.updateTimer = setTimeout(function () {
356
- var element = _this.getDomNode();
358
+ var currentElement = _this.getDomNode();
357
359
 
358
- if (!element) {
360
+ if (!currentElement) {
359
361
  return;
360
362
  }
361
363
 
362
- _this.refreshInfo(element, prevProps);
364
+ _this.refreshInfo(currentElement, prevProps);
363
365
 
364
366
  var isTouch = isTouchScreen();
365
367
 
366
368
  if (!_this.startHandler) {
367
369
  var eventType = isTouch ? 'touchstart' : 'mousedown';
368
- _this.startHandler = addEventListener(element, eventType, function (ev) {
369
- return _this.onStart(ev, element);
370
+ _this.startHandler = addEventListener(currentElement, eventType, function (ev) {
371
+ return _this.onStart(ev, currentElement);
370
372
  });
371
373
  } // 不支持Touch的设备监听滚动
372
374
 
373
375
 
374
376
  if (_this.props.scalable && !isTouch && !_this.mousewheelHandler) {
375
- _this.mousewheelHandler = addEventListener(element, 'wheel', function (ev) {
376
- return _this.onMousewheel(ev, element);
377
+ _this.mousewheelHandler = addEventListener(currentElement, 'wheel', function (ev) {
378
+ return _this.onMousewheel(ev, currentElement);
377
379
  });
378
380
  } // 加入 resize 监听
379
381
 
380
382
 
381
383
  if (_this.props.monitorWindowResize && !_this.resizeHandler) {
382
384
  _this.resizeHandler = addEventListener(window, 'resize', throttleWithRAF(function () {
383
- return _this.refreshInfo(element, prevProps);
385
+ return _this.refreshInfo(currentElement, prevProps);
384
386
  }));
385
387
  }
386
388
  }, 0);
@@ -440,7 +442,7 @@ function (_super) {
440
442
  };
441
443
 
442
444
  Move.prototype.setElementInfo = function (element) {
443
- element.style.transform = "translate(" + this.currentObj.left + "px, " + this.currentObj.top + "px) scale(" + this.currentScaleSize + ")";
445
+ element.style.transform = "translate(".concat(this.currentObj.left, "px, ").concat(this.currentObj.top, "px) scale(").concat(this.currentScaleSize, ")");
444
446
  };
445
447
 
446
448
  Move.prototype.getDomNode = function () {
@@ -456,7 +458,7 @@ function (_super) {
456
458
  var child = React.Children.only(children);
457
459
 
458
460
  if (ReactIs.isElement(child) && !ReactIs.isFragment(child)) {
459
- return React.cloneElement(child, {
461
+ return /*#__PURE__*/React.cloneElement(child, {
460
462
  ref: this.moveRef,
461
463
  onTransitionEnd: this.onTransitionEnd,
462
464
  className: classNames(this.prefixCls, child.props.className)