@autobest-ui/components 1.4.0 → 2.0.1

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 +14 -15
  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 +14 -15
  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 +3 -3
  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
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -13,10 +13,10 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
- var _calendar = _interopRequireDefault(require("./calendar"));
17
-
18
16
  var _popover = _interopRequireDefault(require("../popover"));
19
17
 
18
+ var _calendar = _interopRequireDefault(require("./calendar"));
19
+
20
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
21
 
22
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -29,7 +29,7 @@ var __extends = void 0 && (void 0).__extends || function () {
29
29
  d.__proto__ = b;
30
30
  } || function (d, b) {
31
31
  for (var p in b) {
32
- if (b.hasOwnProperty(p)) d[p] = b[p];
32
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
33
33
  }
34
34
  };
35
35
 
@@ -37,6 +37,8 @@ var __extends = void 0 && (void 0).__extends || function () {
37
37
  };
38
38
 
39
39
  return function (d, b) {
40
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
41
+
40
42
  _extendStatics(d, b);
41
43
 
42
44
  function __() {
@@ -73,7 +75,7 @@ function (_super) {
73
75
  var _this = _super.call(this, props) || this;
74
76
 
75
77
  _this.prefixCls = 'ab-date-picker';
76
- _this.calendarRef = (0, _react.createRef)();
78
+ _this.calendarRef = /*#__PURE__*/(0, _react.createRef)();
77
79
  _this.popoverTriggered = false;
78
80
 
79
81
  _this.onCalendarSelect = function (date) {
@@ -158,7 +160,7 @@ function (_super) {
158
160
  delete copyProps.prefix;
159
161
  delete copyProps.allowTextInput;
160
162
  delete copyProps.parseDateFromString;
161
- return _react.default.createElement(_calendar.default, __assign({}, copyProps, {
163
+ return /*#__PURE__*/_react.default.createElement(_calendar.default, __assign({}, copyProps, {
162
164
  ref: _this.calendarRef,
163
165
  onSelect: _this.onCalendarSelect,
164
166
  className: copyProps.calendarClassName,
@@ -205,32 +207,32 @@ function (_super) {
205
207
  var _b = this.state,
206
208
  calendarVisible = _b.calendarVisible,
207
209
  inputValue = _b.inputValue;
208
- return _react.default.createElement(_popover.default, {
210
+ return /*#__PURE__*/_react.default.createElement(_popover.default, {
209
211
  tip: this.renderTip(),
210
212
  visible: calendarVisible,
211
213
  hiddenClose: true,
212
214
  trigger: "click",
213
215
  onVisibleChange: this.onPopoverVisibleChange,
214
216
  placement: "Bottom"
215
- }, _react.default.createElement("label", {
217
+ }, /*#__PURE__*/_react.default.createElement("label", {
216
218
  className: (0, _classnames.default)(cls, className)
217
- }, prefix, _react.default.createElement("input", {
219
+ }, prefix, /*#__PURE__*/_react.default.createElement("input", {
218
220
  disabled: disabled,
219
- className: cls + "-input",
221
+ className: "".concat(cls, "-input"),
220
222
  type: "text",
221
223
  value: inputValue,
222
224
  onFocus: this.onInputFocus,
223
225
  onChange: this.onInputChange
224
- }), iconVisible && _react.default.createElement("span", {
225
- className: cls + "-icon"
226
- }, _react.default.createElement("svg", {
226
+ }), iconVisible && /*#__PURE__*/_react.default.createElement("span", {
227
+ className: "".concat(cls, "-icon")
228
+ }, /*#__PURE__*/_react.default.createElement("svg", {
227
229
  viewBox: "0 0 1024 1024",
228
230
  version: "1.1",
229
231
  width: "0.16rem",
230
232
  height: "0.18rem",
231
233
  fill: "currentColor",
232
234
  xmlns: "http://www.w3.org/2000/svg"
233
- }, _react.default.createElement("path", {
235
+ }, /*#__PURE__*/_react.default.createElement("path", {
234
236
  d: "M928 128H832V64h-64v64H256V64H192v64H96l-32 32v768l32 32h832l32-32v-768l-32-32zM896 896H128V320h768v576z m0-640H128V192h768v64zM256 512H192v64h64V512z m-64 128h64v64H192v-64z m64 128H192v64h64v-64z m128-256h64v64H384V512z m64 128H384v64h64v-64z m-64 128h64v64H384v-64z m64-384H384v64h64V384z m128 128h64v64H576V512z m64 128H576v64h64v-64z m-64 128h64v64H576v-64z m64-384H576v64h64V384z m128 128h64v64h-64V512z m64 128h-64v64h64v-64z m-64-256h64v64h-64V384z"
235
237
  })))));
236
238
  };
@@ -3,20 +3,20 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.compareDate = compareDate;
6
7
  exports.getDateValue = getDateValue;
7
8
  exports.getDayAdd = getDayAdd;
9
+ exports.getDaysInMonth = getDaysInMonth;
10
+ exports.getEndWeekInMonth = getEndWeekInMonth;
8
11
  exports.getMonthAdd = getMonthAdd;
9
- exports.getYearAdd = getYearAdd;
10
- exports.compareDate = compareDate;
11
- exports.isOutOfDate = isOutOfDate;
12
- exports.getMonthStart = getMonthStart;
13
12
  exports.getMonthEnd = getMonthEnd;
14
- exports.getYearStart = getYearStart;
15
- exports.getYearEnd = getYearEnd;
16
13
  exports.getMonthFullName = getMonthFullName;
14
+ exports.getMonthStart = getMonthStart;
17
15
  exports.getStartWeekInMonth = getStartWeekInMonth;
18
- exports.getEndWeekInMonth = getEndWeekInMonth;
19
- exports.getDaysInMonth = getDaysInMonth;
16
+ exports.getYearAdd = getYearAdd;
17
+ exports.getYearEnd = getYearEnd;
18
+ exports.getYearStart = getYearStart;
19
+ exports.isOutOfDate = isOutOfDate;
20
20
 
21
21
  var _DateEnum = require("./DateEnum");
22
22
 
@@ -64,7 +64,7 @@ function Child(_a, ref) {
64
64
  exiting: {},
65
65
  exited: {}
66
66
  };
67
- return _react.default.createElement(_reactTransitionGroup.Transition, {
67
+ return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.Transition, {
68
68
  in: visible,
69
69
  timeout: 200,
70
70
  appear: true,
@@ -74,17 +74,17 @@ function Child(_a, ref) {
74
74
  var _a;
75
75
 
76
76
  var nextStyles = state !== 'exited' ? contentStyle : {};
77
- return _react.default.createElement("div", {
77
+ return /*#__PURE__*/_react.default.createElement("div", {
78
78
  style: __assign(__assign({}, nextStyles), transitionStyles[state]),
79
79
  ref: ref,
80
- className: (0, _classnames.default)(cls, className, (_a = {}, _a[cls + "-tf-" + placement] = state === 'exited' || state === 'exiting', _a))
81
- }, closable ? _react.default.createElement("span", {
82
- className: cls + "-times",
80
+ className: (0, _classnames.default)(cls, className, (_a = {}, _a["".concat(cls, "-tf-").concat(placement)] = state === 'exited' || state === 'exiting', _a))
81
+ }, closable ? /*#__PURE__*/_react.default.createElement("span", {
82
+ className: "".concat(cls, "-times"),
83
83
  onClick: onCancel
84
84
  }, "\xD7") : null, children);
85
85
  });
86
86
  }
87
87
 
88
- var _default = _react.default.forwardRef(Child);
88
+ var _default = /*#__PURE__*/_react.default.forwardRef(Child);
89
89
 
90
90
  exports.default = _default;
@@ -27,7 +27,7 @@ var __extends = void 0 && (void 0).__extends || function () {
27
27
  d.__proto__ = b;
28
28
  } || function (d, b) {
29
29
  for (var p in b) {
30
- if (b.hasOwnProperty(p)) d[p] = b[p];
30
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
31
31
  }
32
32
  };
33
33
 
@@ -35,6 +35,8 @@ var __extends = void 0 && (void 0).__extends || function () {
35
35
  };
36
36
 
37
37
  return function (d, b) {
38
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
39
+
38
40
  _extendStatics(d, b);
39
41
 
40
42
  function __() {
@@ -83,7 +85,7 @@ function (_super) {
83
85
  var _this = _super.call(this, props) || this;
84
86
 
85
87
  _this.prefixCls = 'ab-drawer';
86
- _this.childRef = _react.default.createRef();
88
+ _this.childRef = /*#__PURE__*/_react.default.createRef();
87
89
 
88
90
  _this.onClose = function () {
89
91
  var _a = _this.props,
@@ -119,7 +121,7 @@ function (_super) {
119
121
  var scrollSize = (0, _utils.getScrollBarSize)();
120
122
 
121
123
  if ((0, _utils.hasVerticalScrollbar)(scrollSize)) {
122
- currentDocument.style.paddingRight = scrollSize + "px";
124
+ currentDocument.style.paddingRight = "".concat(scrollSize, "px");
123
125
  }
124
126
  }
125
127
  };
@@ -182,9 +184,9 @@ function (_super) {
182
184
  showMask = _b.showMask;
183
185
 
184
186
  if (showMask) {
185
- return _react.default.createElement(_mask.default, {
187
+ return /*#__PURE__*/_react.default.createElement(_mask.default, {
186
188
  onClose: this.onClose,
187
- className: (0, _classnames.default)((_a = {}, _a[this.prefixCls + "-hidden"] = this.state.isHidden, _a)),
189
+ className: (0, _classnames.default)((_a = {}, _a["".concat(this.prefixCls, "-hidden")] = this.state.isHidden, _a)),
188
190
  visible: visible,
189
191
  timeout: 300
190
192
  });
@@ -202,9 +204,9 @@ function (_super) {
202
204
  className = _b.className,
203
205
  extraProps = __rest(_b, ["visible", "children", "className"]);
204
206
 
205
- return _react.default.createElement(_Child.default, __assign({}, extraProps, {
207
+ return /*#__PURE__*/_react.default.createElement(_Child.default, __assign({}, extraProps, {
206
208
  visible: visible,
207
- className: (0, _classnames.default)(className, (_a = {}, _a[this.prefixCls + "-hidden"] = this.state.isHidden, _a)),
209
+ className: (0, _classnames.default)(className, (_a = {}, _a["".concat(this.prefixCls, "-hidden")] = this.state.isHidden, _a)),
208
210
  prefixCls: this.prefixCls,
209
211
  onCancel: this.onCancel,
210
212
  onEnter: this.onEnter,
@@ -219,11 +221,11 @@ function (_super) {
219
221
  isInsertNode = _a.isInsertNode;
220
222
 
221
223
  if (isInsertNode) {
222
- return _react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderChild());
224
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderChild());
223
225
  }
224
226
 
225
227
  if (visible || this.childRef.current) {
226
- return _react.default.createElement(_portal.default, null, _react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderChild()));
228
+ return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, this.renderMask(), this.renderChild()));
227
229
  }
228
230
 
229
231
  return null;
@@ -42,7 +42,7 @@ function Ellipsis(props) {
42
42
  title = props.title,
43
43
  _d = props.mobileLines,
44
44
  mobileLines = _d === void 0 ? 0 : _d;
45
- var wrapCls = (0, _classnames.default)(cls, className, (_a = {}, _a[cls + "-line" + lines] = lines > 0, _a), (_b = {}, _b[cls + "-m-line" + mobileLines] = mobileLines > 0, _b));
45
+ var wrapCls = (0, _classnames.default)(cls, className, (_a = {}, _a["".concat(cls, "-line").concat(lines)] = lines > 0, _a), (_b = {}, _b["".concat(cls, "-m-line").concat(mobileLines)] = mobileLines > 0, _b));
46
46
  var style = maxHeight ? {
47
47
  maxHeight: maxHeight
48
48
  } : null;
@@ -52,19 +52,19 @@ function Ellipsis(props) {
52
52
 
53
53
  if (!(0, _reactIs.isFragment)(children) && (0, _reactIs.isElement)(children)) {
54
54
  var child = children;
55
- return _react.default.cloneElement(child, __assign(__assign({}, titleParam), {
55
+ return /*#__PURE__*/_react.default.cloneElement(child, __assign(__assign({}, titleParam), {
56
56
  className: (0, _classnames.default)(wrapCls, child.props.className),
57
57
  style: __assign(__assign({}, style), child.props.style)
58
58
  }));
59
59
  }
60
60
 
61
- return _react.default.createElement("span", __assign({
61
+ return /*#__PURE__*/_react.default.createElement("span", __assign({
62
62
  className: wrapCls
63
63
  }, titleParam, {
64
64
  style: style
65
65
  }), children);
66
66
  }
67
67
 
68
- var _default = _react.default.memo(Ellipsis);
68
+ var _default = /*#__PURE__*/_react.default.memo(Ellipsis);
69
69
 
70
70
  exports.default = _default;
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
2
  export interface GuideProps {
3
+ /**
4
+ * 图片路径
5
+ */
6
+ imgSrc: string;
3
7
  /**
4
8
  * 是否显示遮罩层
5
9
  */
@@ -12,10 +16,6 @@ export interface GuideProps {
12
16
  * 是否显示带箭头的图片,图片默认显示在子元素上方,水平居中
13
17
  */
14
18
  loadablePointer?: boolean;
15
- /**
16
- * 图片路径
17
- */
18
- img?: string;
19
19
  /**
20
20
  * 图片默认显示在子元素上方,水平居中
21
21
  */
@@ -43,7 +43,6 @@ declare class Guide extends React.Component<GuideProps, GuideStates> {
43
43
  imgRef: React.RefObject<HTMLImageElement>;
44
44
  static defaultProps: {
45
45
  loadablePointer: boolean;
46
- img: string;
47
46
  position: string;
48
47
  translateX: number;
49
48
  translateY: number;
@@ -17,8 +17,6 @@ var _utils = require("@autobest-ui/utils");
17
17
 
18
18
  var _portal = _interopRequireDefault(require("../portal"));
19
19
 
20
- var _useConfig = _interopRequireDefault(require("../use-config"));
21
-
22
20
  var _mask = _interopRequireDefault(require("../mask"));
23
21
 
24
22
  var __extends = void 0 && (void 0).__extends || function () {
@@ -29,7 +27,7 @@ var __extends = void 0 && (void 0).__extends || function () {
29
27
  d.__proto__ = b;
30
28
  } || function (d, b) {
31
29
  for (var p in b) {
32
- if (b.hasOwnProperty(p)) d[p] = b[p];
30
+ if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
33
31
  }
34
32
  };
35
33
 
@@ -37,6 +35,8 @@ var __extends = void 0 && (void 0).__extends || function () {
37
35
  };
38
36
 
39
37
  return function (d, b) {
38
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
39
+
40
40
  _extendStatics(d, b);
41
41
 
42
42
  function __() {
@@ -57,7 +57,7 @@ function (_super) {
57
57
 
58
58
  _this.prefixCls = 'ab-guide';
59
59
  _this.timer = null;
60
- _this.imgRef = _react.default.createRef(); // eslint-disable-next-line react/no-find-dom-node
60
+ _this.imgRef = /*#__PURE__*/_react.default.createRef(); // eslint-disable-next-line react/no-find-dom-node
61
61
 
62
62
  _this.getElement = function () {
63
63
  return (0, _reactDom.findDOMNode)(_this);
@@ -116,7 +116,7 @@ function (_super) {
116
116
 
117
117
  var _a = this.props,
118
118
  loadablePointer = _a.loadablePointer,
119
- img = _a.img,
119
+ imgSrc = _a.imgSrc,
120
120
  position = _a.position,
121
121
  visible = _a.visible,
122
122
  translateX = _a.translateX,
@@ -124,7 +124,7 @@ function (_super) {
124
124
 
125
125
  if (loadablePointer && visible) {
126
126
  var image_1 = new Image();
127
- image_1.src = img;
127
+ image_1.src = imgSrc;
128
128
 
129
129
  image_1.onload = function () {
130
130
  var element = _this.getElement();
@@ -137,12 +137,12 @@ function (_super) {
137
137
 
138
138
  var imgWidth = image_1.width;
139
139
  var imgHeight = image_1.height;
140
- var imgTop = top_1 - imgHeight + translateY + "px";
140
+ var imgTop = "".concat(top_1 - imgHeight + translateY, "px");
141
141
 
142
142
  if (position === 'left') {
143
143
  _this.setState({
144
144
  top: imgTop,
145
- left: left + translateX + "px"
145
+ left: "".concat(left + translateX, "px")
146
146
  });
147
147
 
148
148
  return;
@@ -151,7 +151,7 @@ function (_super) {
151
151
  if (position === 'right') {
152
152
  _this.setState({
153
153
  top: imgTop,
154
- left: left + width - imgWidth + translateX + "px"
154
+ left: "".concat(left + width - imgWidth + translateX, "px")
155
155
  });
156
156
 
157
157
  return;
@@ -160,7 +160,7 @@ function (_super) {
160
160
 
161
161
  _this.setState({
162
162
  top: imgTop,
163
- left: left + width / 2 - imgWidth / 2 + translateX + "px"
163
+ left: "".concat(left + width / 2 - imgWidth / 2 + translateX, "px")
164
164
  });
165
165
  }
166
166
  };
@@ -171,7 +171,7 @@ function (_super) {
171
171
  var _a = this.props,
172
172
  visible = _a.visible,
173
173
  loadablePointer = _a.loadablePointer,
174
- img = _a.img;
174
+ imgSrc = _a.imgSrc;
175
175
  var _b = this.state,
176
176
  top = _b.top,
177
177
  left = _b.left;
@@ -183,15 +183,15 @@ function (_super) {
183
183
  };
184
184
 
185
185
  if (visible || this.imgRef.current) {
186
- return _react.default.createElement(_portal.default, null, _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_mask.default, {
187
- className: cls + "-mask",
186
+ return /*#__PURE__*/_react.default.createElement(_portal.default, null, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_mask.default, {
187
+ className: "".concat(cls, "-mask"),
188
188
  visible: visible,
189
189
  timeout: 400,
190
190
  onClose: this.onClose
191
- }), loadablePointer ? _react.default.createElement("img", {
191
+ }), loadablePointer ? /*#__PURE__*/_react.default.createElement("img", {
192
192
  style: style,
193
- className: cls + "-icon",
194
- src: img,
193
+ className: "".concat(cls, "-icon"),
194
+ src: imgSrc,
195
195
  alt: "selection pointer",
196
196
  ref: this.imgRef
197
197
  }) : null));
@@ -205,17 +205,17 @@ function (_super) {
205
205
  var _a = this.props,
206
206
  children = _a.children,
207
207
  visible = _a.visible;
208
- var className = visible ? cls + "-content" : null;
208
+ var className = visible ? "".concat(cls, "-content") : null;
209
209
 
210
210
  if (typeof children === 'function') {
211
- return _react.default.createElement(_react.default.Fragment, null, children({
211
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children({
212
212
  className: className
213
213
  }), this.renderMask());
214
214
  }
215
215
 
216
216
  var child = _react.default.Children.only(children);
217
217
 
218
- return _react.default.createElement(_react.default.Fragment, null, _react.default.cloneElement(child, {
218
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.cloneElement(child, {
219
219
  className: (0, _classnames.default)(className, child.props.className)
220
220
  }), this.renderMask());
221
221
  }; // 默认值
@@ -223,7 +223,6 @@ function (_super) {
223
223
 
224
224
  Guide.defaultProps = {
225
225
  loadablePointer: false,
226
- img: _useConfig.default.assetCommonUiUrl + "/images/vehicle_pointer.png",
227
226
  position: 'center',
228
227
  translateX: 0,
229
228
  translateY: 0,
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { default as UseConfig } from './use-config';
2
1
  export type { AccordionProps } from './accordion';
3
2
  export { default as Accordion } from './accordion';
4
3
  export type { EllipsisProps, EllipsisLinesType } from './ellipsis';