@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
@@ -4,10 +4,10 @@ var cls = 'ab-dp-cg';
4
4
 
5
5
  var renderArrow = function renderArrow(prefixCls, direction, onClick) {
6
6
  var enabled = !!onClick;
7
- return React.createElement("span", {
8
- className: prefixCls + "-arrow",
7
+ return /*#__PURE__*/React.createElement("span", {
8
+ className: "".concat(prefixCls, "-arrow"),
9
9
  onClick: onClick
10
- }, React.createElement("svg", {
10
+ }, /*#__PURE__*/React.createElement("svg", {
11
11
  style: direction,
12
12
  viewBox: "0 0 1024 1024",
13
13
  version: "1.1",
@@ -15,7 +15,7 @@ var renderArrow = function renderArrow(prefixCls, direction, onClick) {
15
15
  height: "0.28rem",
16
16
  fill: enabled ? '#333' : '#808080',
17
17
  xmlns: "http://www.w3.org/2000/svg"
18
- }, React.createElement("path", {
18
+ }, /*#__PURE__*/React.createElement("path", {
19
19
  d: "M525.339326 186.172452L801.789086 462.622212c12.496698 12.496698 32.758136 12.496698 45.254834 0 12.497405-12.497405 12.496698-32.758136 0-45.254834l-331.014362-331.014362c-12.496698-12.496698-32.757429-12.497405-45.254834 0l-341.795619 339.143969c-12.496698 12.496698-12.496698 32.758136 0 45.254834 12.496698 12.496698 32.758136 12.496698 45.254834 0l287.10586-284.454209L461.372325 925.726242c0 17.673427 14.32669 32.000117 32.000118 32.000117 17.67272-0.000707 31.99941-14.327398 32.000117-32.000117l-0.032527-739.553083z"
20
20
  })));
21
21
  };
@@ -31,29 +31,29 @@ var CalendarGrid = function CalendarGrid(_a) {
31
31
  headList = _a.headList,
32
32
  list = _a.list,
33
33
  bottomElement = _a.bottomElement;
34
- return React.createElement("div", {
34
+ return /*#__PURE__*/React.createElement("div", {
35
35
  className: classNames(className, cls)
36
- }, React.createElement("div", {
37
- className: cls + "-title"
38
- }, React.createElement("strong", {
39
- className: classNames((_b = {}, _b[cls + "-clickable"] = !!onClickTitle, _b)),
36
+ }, /*#__PURE__*/React.createElement("div", {
37
+ className: "".concat(cls, "-title")
38
+ }, /*#__PURE__*/React.createElement("strong", {
39
+ className: classNames((_b = {}, _b["".concat(cls, "-clickable")] = !!onClickTitle, _b)),
40
40
  onClick: onClickTitle
41
41
  }, title), renderArrow(cls, {}, onPrev), renderArrow(cls, {
42
42
  transform: 'rotate(180deg)'
43
- }, onNext)), React.createElement("ul", {
44
- className: cls + "-head"
43
+ }, onNext)), /*#__PURE__*/React.createElement("ul", {
44
+ className: "".concat(cls, "-head")
45
45
  }, headList.map(function (item, index) {
46
- return React.createElement("li", {
47
- key: index + " " + item
46
+ return /*#__PURE__*/React.createElement("li", {
47
+ key: "".concat(index, " ").concat(item)
48
48
  }, item);
49
- })), React.createElement("ul", {
50
- className: cls + "-content"
49
+ })), /*#__PURE__*/React.createElement("ul", {
50
+ className: "".concat(cls, "-content")
51
51
  }, list.map(function (item, index) {
52
52
  var _a, _b, _c;
53
53
 
54
- return React.createElement("li", {
55
- key: index + " " + item.name,
56
- className: classNames((_a = {}, _a[cls + "-dis"] = item.disabled, _a), (_b = {}, _b[cls + "-selected"] = item.selected, _b), (_c = {}, _c[cls + "-today"] = item.isToday, _c), item.className),
54
+ return /*#__PURE__*/React.createElement("li", {
55
+ key: "".concat(index, " ").concat(item.name),
56
+ className: classNames((_a = {}, _a["".concat(cls, "-dis")] = item.disabled, _a), (_b = {}, _b["".concat(cls, "-selected")] = item.selected, _b), (_c = {}, _c["".concat(cls, "-today")] = item.isToday, _c), item.className),
57
57
  onClick: item.onClick
58
58
  }, item.name);
59
59
  })), bottomElement);
@@ -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 __() {
@@ -42,9 +44,9 @@ var __assign = this && this.__assign || function () {
42
44
 
43
45
  import React from 'react';
44
46
  import classNames from 'classnames';
47
+ import { getMonthStart, isOutOfDate } from '../utils';
45
48
  import DayCalendar from './Day';
46
49
  import MonthYearCalendar from './MonthYear';
47
- import { getMonthStart, isOutOfDate } from '../utils';
48
50
 
49
51
  var Calendar =
50
52
  /** @class */
@@ -104,14 +106,14 @@ function (_super) {
104
106
  monthPickerVisible = _a.monthPickerVisible,
105
107
  yearPickerVisible = _a.yearPickerVisible,
106
108
  className = _a.className;
107
- return React.createElement("div", {
109
+ return /*#__PURE__*/React.createElement("div", {
108
110
  className: classNames(cls, className)
109
- }, React.createElement(DayCalendar, __assign({
111
+ }, /*#__PURE__*/React.createElement(DayCalendar, __assign({
110
112
  prefixCls: cls
111
113
  }, this.props, this.state, {
112
114
  onChangeNavigatedDate: this.onChangeNavigatedDate,
113
115
  onChangeSelectedDate: this.onChangeSelectedDate
114
- })), (monthPickerVisible || yearPickerVisible) && React.createElement(MonthYearCalendar, __assign({
116
+ })), (monthPickerVisible || yearPickerVisible) && /*#__PURE__*/React.createElement(MonthYearCalendar, __assign({
115
117
  prefixCls: cls
116
118
  }, this.props, this.state, {
117
119
  onChangeNavigatedDate: this.onChangeNavigatedDate
@@ -0,0 +1 @@
1
+ export {};
@@ -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 __() {
@@ -42,8 +44,8 @@ var __assign = this && this.__assign || function () {
42
44
 
43
45
  import React, { createRef } from 'react';
44
46
  import classNames from 'classnames';
45
- import Calendar from './calendar';
46
- import Popover from '../popover'; // TODO: 移动端
47
+ import Popover from '../popover';
48
+ import Calendar from './calendar'; // TODO: 移动端
47
49
 
48
50
  var DatePicker =
49
51
  /** @class */
@@ -54,7 +56,7 @@ function (_super) {
54
56
  var _this = _super.call(this, props) || this;
55
57
 
56
58
  _this.prefixCls = 'ab-date-picker';
57
- _this.calendarRef = createRef();
59
+ _this.calendarRef = /*#__PURE__*/createRef();
58
60
  _this.popoverTriggered = false;
59
61
 
60
62
  _this.onCalendarSelect = function (date) {
@@ -139,7 +141,7 @@ function (_super) {
139
141
  delete copyProps.prefix;
140
142
  delete copyProps.allowTextInput;
141
143
  delete copyProps.parseDateFromString;
142
- return React.createElement(Calendar, __assign({}, copyProps, {
144
+ return /*#__PURE__*/React.createElement(Calendar, __assign({}, copyProps, {
143
145
  ref: _this.calendarRef,
144
146
  onSelect: _this.onCalendarSelect,
145
147
  className: copyProps.calendarClassName,
@@ -186,32 +188,32 @@ function (_super) {
186
188
  var _b = this.state,
187
189
  calendarVisible = _b.calendarVisible,
188
190
  inputValue = _b.inputValue;
189
- return React.createElement(Popover, {
191
+ return /*#__PURE__*/React.createElement(Popover, {
190
192
  tip: this.renderTip(),
191
193
  visible: calendarVisible,
192
194
  hiddenClose: true,
193
195
  trigger: "click",
194
196
  onVisibleChange: this.onPopoverVisibleChange,
195
197
  placement: "Bottom"
196
- }, React.createElement("label", {
198
+ }, /*#__PURE__*/React.createElement("label", {
197
199
  className: classNames(cls, className)
198
- }, prefix, React.createElement("input", {
200
+ }, prefix, /*#__PURE__*/React.createElement("input", {
199
201
  disabled: disabled,
200
- className: cls + "-input",
202
+ className: "".concat(cls, "-input"),
201
203
  type: "text",
202
204
  value: inputValue,
203
205
  onFocus: this.onInputFocus,
204
206
  onChange: this.onInputChange
205
- }), iconVisible && React.createElement("span", {
206
- className: cls + "-icon"
207
- }, React.createElement("svg", {
207
+ }), iconVisible && /*#__PURE__*/React.createElement("span", {
208
+ className: "".concat(cls, "-icon")
209
+ }, /*#__PURE__*/React.createElement("svg", {
208
210
  viewBox: "0 0 1024 1024",
209
211
  version: "1.1",
210
212
  width: "0.16rem",
211
213
  height: "0.18rem",
212
214
  fill: "currentColor",
213
215
  xmlns: "http://www.w3.org/2000/svg"
214
- }, React.createElement("path", {
216
+ }, /*#__PURE__*/React.createElement("path", {
215
217
  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"
216
218
  })))));
217
219
  };
@@ -53,7 +53,7 @@ function Child(_a, ref) {
53
53
  exiting: {},
54
54
  exited: {}
55
55
  };
56
- return React.createElement(Transition, {
56
+ return /*#__PURE__*/React.createElement(Transition, {
57
57
  "in": visible,
58
58
  timeout: 200,
59
59
  appear: true,
@@ -63,15 +63,15 @@ function Child(_a, ref) {
63
63
  var _a;
64
64
 
65
65
  var nextStyles = state !== 'exited' ? contentStyle : {};
66
- return React.createElement("div", {
66
+ return /*#__PURE__*/React.createElement("div", {
67
67
  style: __assign(__assign({}, nextStyles), transitionStyles[state]),
68
68
  ref: ref,
69
- className: classNames(cls, className, (_a = {}, _a[cls + "-tf-" + placement] = state === 'exited' || state === 'exiting', _a))
70
- }, closable ? React.createElement("span", {
71
- className: cls + "-times",
69
+ className: classNames(cls, className, (_a = {}, _a["".concat(cls, "-tf-").concat(placement)] = state === 'exited' || state === 'exiting', _a))
70
+ }, closable ? /*#__PURE__*/React.createElement("span", {
71
+ className: "".concat(cls, "-times"),
72
72
  onClick: onCancel
73
73
  }, "\xD7") : null, children);
74
74
  });
75
75
  }
76
76
 
77
- export default React.forwardRef(Child);
77
+ export default /*#__PURE__*/React.forwardRef(Child);
@@ -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 __() {
@@ -69,7 +71,7 @@ function (_super) {
69
71
  var _this = _super.call(this, props) || this;
70
72
 
71
73
  _this.prefixCls = 'ab-drawer';
72
- _this.childRef = React.createRef();
74
+ _this.childRef = /*#__PURE__*/React.createRef();
73
75
 
74
76
  _this.onClose = function () {
75
77
  var _a = _this.props,
@@ -105,7 +107,7 @@ function (_super) {
105
107
  var scrollSize = getScrollBarSize();
106
108
 
107
109
  if (hasVerticalScrollbar(scrollSize)) {
108
- currentDocument.style.paddingRight = scrollSize + "px";
110
+ currentDocument.style.paddingRight = "".concat(scrollSize, "px");
109
111
  }
110
112
  }
111
113
  };
@@ -168,9 +170,9 @@ function (_super) {
168
170
  showMask = _b.showMask;
169
171
 
170
172
  if (showMask) {
171
- return React.createElement(Mask, {
173
+ return /*#__PURE__*/React.createElement(Mask, {
172
174
  onClose: this.onClose,
173
- className: classNames((_a = {}, _a[this.prefixCls + "-hidden"] = this.state.isHidden, _a)),
175
+ className: classNames((_a = {}, _a["".concat(this.prefixCls, "-hidden")] = this.state.isHidden, _a)),
174
176
  visible: visible,
175
177
  timeout: 300
176
178
  });
@@ -188,9 +190,9 @@ function (_super) {
188
190
  className = _b.className,
189
191
  extraProps = __rest(_b, ["visible", "children", "className"]);
190
192
 
191
- return React.createElement(Child, __assign({}, extraProps, {
193
+ return /*#__PURE__*/React.createElement(Child, __assign({}, extraProps, {
192
194
  visible: visible,
193
- className: classNames(className, (_a = {}, _a[this.prefixCls + "-hidden"] = this.state.isHidden, _a)),
195
+ className: classNames(className, (_a = {}, _a["".concat(this.prefixCls, "-hidden")] = this.state.isHidden, _a)),
194
196
  prefixCls: this.prefixCls,
195
197
  onCancel: this.onCancel,
196
198
  onEnter: this.onEnter,
@@ -205,11 +207,11 @@ function (_super) {
205
207
  isInsertNode = _a.isInsertNode;
206
208
 
207
209
  if (isInsertNode) {
208
- return React.createElement(React.Fragment, null, this.renderMask(), this.renderChild());
210
+ return /*#__PURE__*/React.createElement(React.Fragment, null, this.renderMask(), this.renderChild());
209
211
  }
210
212
 
211
213
  if (visible || this.childRef.current) {
212
- return React.createElement(Portal, null, React.createElement(React.Fragment, null, this.renderMask(), this.renderChild()));
214
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(React.Fragment, null, this.renderMask(), this.renderChild()));
213
215
  }
214
216
 
215
217
  return null;
@@ -30,7 +30,7 @@ function Ellipsis(props) {
30
30
  title = props.title,
31
31
  _d = props.mobileLines,
32
32
  mobileLines = _d === void 0 ? 0 : _d;
33
- var wrapCls = classNames(cls, className, (_a = {}, _a[cls + "-line" + lines] = lines > 0, _a), (_b = {}, _b[cls + "-m-line" + mobileLines] = mobileLines > 0, _b));
33
+ var wrapCls = classNames(cls, className, (_a = {}, _a["".concat(cls, "-line").concat(lines)] = lines > 0, _a), (_b = {}, _b["".concat(cls, "-m-line").concat(mobileLines)] = mobileLines > 0, _b));
34
34
  var style = maxHeight ? {
35
35
  maxHeight: maxHeight
36
36
  } : null;
@@ -40,17 +40,17 @@ function Ellipsis(props) {
40
40
 
41
41
  if (!isFragment(children) && isElement(children)) {
42
42
  var child = children;
43
- return React.cloneElement(child, __assign(__assign({}, titleParam), {
43
+ return /*#__PURE__*/React.cloneElement(child, __assign(__assign({}, titleParam), {
44
44
  className: classNames(wrapCls, child.props.className),
45
45
  style: __assign(__assign({}, style), child.props.style)
46
46
  }));
47
47
  }
48
48
 
49
- return React.createElement("span", __assign({
49
+ return /*#__PURE__*/React.createElement("span", __assign({
50
50
  className: wrapCls
51
51
  }, titleParam, {
52
52
  style: style
53
53
  }), children);
54
54
  }
55
55
 
56
- export default React.memo(Ellipsis);
56
+ export default /*#__PURE__*/React.memo(Ellipsis);
@@ -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;
@@ -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,7 +31,6 @@ import classNames from 'classnames';
29
31
  import { findDOMNode } from 'react-dom';
30
32
  import { getOffsetAndSize } from '@autobest-ui/utils';
31
33
  import Portal from '../portal';
32
- import UseConfig from '../use-config';
33
34
  import Mask from '../mask';
34
35
 
35
36
  var Guide =
@@ -42,7 +43,7 @@ function (_super) {
42
43
 
43
44
  _this.prefixCls = 'ab-guide';
44
45
  _this.timer = null;
45
- _this.imgRef = React.createRef(); // eslint-disable-next-line react/no-find-dom-node
46
+ _this.imgRef = /*#__PURE__*/React.createRef(); // eslint-disable-next-line react/no-find-dom-node
46
47
 
47
48
  _this.getElement = function () {
48
49
  return findDOMNode(_this);
@@ -101,7 +102,7 @@ function (_super) {
101
102
 
102
103
  var _a = this.props,
103
104
  loadablePointer = _a.loadablePointer,
104
- img = _a.img,
105
+ imgSrc = _a.imgSrc,
105
106
  position = _a.position,
106
107
  visible = _a.visible,
107
108
  translateX = _a.translateX,
@@ -109,7 +110,7 @@ function (_super) {
109
110
 
110
111
  if (loadablePointer && visible) {
111
112
  var image_1 = new Image();
112
- image_1.src = img;
113
+ image_1.src = imgSrc;
113
114
 
114
115
  image_1.onload = function () {
115
116
  var element = _this.getElement();
@@ -122,12 +123,12 @@ function (_super) {
122
123
 
123
124
  var imgWidth = image_1.width;
124
125
  var imgHeight = image_1.height;
125
- var imgTop = top_1 - imgHeight + translateY + "px";
126
+ var imgTop = "".concat(top_1 - imgHeight + translateY, "px");
126
127
 
127
128
  if (position === 'left') {
128
129
  _this.setState({
129
130
  top: imgTop,
130
- left: left + translateX + "px"
131
+ left: "".concat(left + translateX, "px")
131
132
  });
132
133
 
133
134
  return;
@@ -136,7 +137,7 @@ function (_super) {
136
137
  if (position === 'right') {
137
138
  _this.setState({
138
139
  top: imgTop,
139
- left: left + width - imgWidth + translateX + "px"
140
+ left: "".concat(left + width - imgWidth + translateX, "px")
140
141
  });
141
142
 
142
143
  return;
@@ -145,7 +146,7 @@ function (_super) {
145
146
 
146
147
  _this.setState({
147
148
  top: imgTop,
148
- left: left + width / 2 - imgWidth / 2 + translateX + "px"
149
+ left: "".concat(left + width / 2 - imgWidth / 2 + translateX, "px")
149
150
  });
150
151
  }
151
152
  };
@@ -156,7 +157,7 @@ function (_super) {
156
157
  var _a = this.props,
157
158
  visible = _a.visible,
158
159
  loadablePointer = _a.loadablePointer,
159
- img = _a.img;
160
+ imgSrc = _a.imgSrc;
160
161
  var _b = this.state,
161
162
  top = _b.top,
162
163
  left = _b.left;
@@ -168,15 +169,15 @@ function (_super) {
168
169
  };
169
170
 
170
171
  if (visible || this.imgRef.current) {
171
- return React.createElement(Portal, null, React.createElement(React.Fragment, null, React.createElement(Mask, {
172
- className: cls + "-mask",
172
+ return /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Mask, {
173
+ className: "".concat(cls, "-mask"),
173
174
  visible: visible,
174
175
  timeout: 400,
175
176
  onClose: this.onClose
176
- }), loadablePointer ? React.createElement("img", {
177
+ }), loadablePointer ? /*#__PURE__*/React.createElement("img", {
177
178
  style: style,
178
- className: cls + "-icon",
179
- src: img,
179
+ className: "".concat(cls, "-icon"),
180
+ src: imgSrc,
180
181
  alt: "selection pointer",
181
182
  ref: this.imgRef
182
183
  }) : null));
@@ -190,16 +191,16 @@ function (_super) {
190
191
  var _a = this.props,
191
192
  children = _a.children,
192
193
  visible = _a.visible;
193
- var className = visible ? cls + "-content" : null;
194
+ var className = visible ? "".concat(cls, "-content") : null;
194
195
 
195
196
  if (typeof children === 'function') {
196
- return React.createElement(React.Fragment, null, children({
197
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children({
197
198
  className: className
198
199
  }), this.renderMask());
199
200
  }
200
201
 
201
202
  var child = React.Children.only(children);
202
- return React.createElement(React.Fragment, null, React.cloneElement(child, {
203
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(child, {
203
204
  className: classNames(className, child.props.className)
204
205
  }), this.renderMask());
205
206
  }; // 默认值
@@ -207,7 +208,6 @@ function (_super) {
207
208
 
208
209
  Guide.defaultProps = {
209
210
  loadablePointer: false,
210
- img: UseConfig.assetCommonUiUrl + "/images/vehicle_pointer.png",
211
211
  position: 'center',
212
212
  translateX: 0,
213
213
  translateY: 0,
package/esm/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';
package/esm/index.js CHANGED
@@ -1,4 +1,3 @@
1
- export { default as UseConfig } from './use-config';
2
1
  export { default as Accordion } from './accordion';
3
2
  export { default as Ellipsis } from './ellipsis';
4
3
  export { default as Affix } from './affix';
@@ -106,8 +106,8 @@ declare class InputNumber extends React.Component<InputNumberProps, InputNumberS
106
106
  onBlur: (e: any) => void;
107
107
  onMouseEnter: () => void;
108
108
  onMouseLeave: () => void;
109
- onMouseMove: (ev: React.MouseEvent<Element, MouseEvent>) => void;
110
- onMouseDown: (ev: React.MouseEvent<Element, MouseEvent>) => void;
109
+ onMouseMove: (ev: React.MouseEvent) => void;
110
+ onMouseDown: (ev: React.MouseEvent) => void;
111
111
  onMouseUp: () => void;
112
112
  addMouseMoveListener: () => void;
113
113
  addMouseUpListener: () => void;
@@ -116,11 +116,11 @@ declare class InputNumber extends React.Component<InputNumberProps, InputNumberS
116
116
  addBtnEl: HTMLDivElement;
117
117
  subBtnEl: HTMLDivElement;
118
118
  };
119
- getMouseElement: (ev: React.MouseEvent<Element, MouseEvent>) => {
119
+ getMouseElement: (ev: React.MouseEvent) => {
120
120
  isAdd: boolean;
121
121
  isSub: boolean;
122
122
  };
123
- isInside: (ev: React.MouseEvent<Element, MouseEvent>, locationInfo: LocationInfo) => boolean;
123
+ isInside: (ev: React.MouseEvent, locationInfo: LocationInfo) => boolean;
124
124
  getLocationInfo: () => void;
125
125
  getCurrentValue: (value: string) => number;
126
126
  getPadDigitalValue: (value: string) => string;