@autobest-ui/components 2.2.1 → 2.4.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 (378) hide show
  1. package/esm/accordion/Item.js +6 -23
  2. package/esm/accordion/index.js +8 -36
  3. package/esm/accordion/style/index.css +1 -0
  4. package/esm/affix/PortalAffix.js +7 -11
  5. package/esm/affix/index.js +30 -70
  6. package/esm/affix/style/index.css +1 -1
  7. package/esm/base.css +1 -1
  8. package/esm/carousel/index.js +45 -141
  9. package/esm/checkbox/index.js +12 -37
  10. package/esm/checkbox/style/index.css +1 -1
  11. package/esm/collapse/index.js +11 -49
  12. package/esm/confirm/index.d.ts +8 -0
  13. package/esm/confirm/index.js +23 -31
  14. package/esm/confirm/style/index.css +1 -1
  15. package/esm/date-picker/DateEnum.js +0 -3
  16. package/esm/date-picker/calendar/Day.js +62 -78
  17. package/esm/date-picker/calendar/MonthYear.js +20 -53
  18. package/esm/date-picker/calendar/grid/index.js +7 -12
  19. package/esm/date-picker/calendar/index.js +4 -31
  20. package/esm/date-picker/index.js +11 -51
  21. package/esm/date-picker/style/index.css +1 -1
  22. package/esm/date-picker/utils.js +6 -11
  23. package/esm/drawer/Child.js +10 -20
  24. package/esm/drawer/index.js +22 -71
  25. package/esm/drawer/style/index.css +1 -1
  26. package/esm/ellipsis/index.js +9 -17
  27. package/esm/ellipsis/style/index.css +1 -1
  28. package/esm/guide/index.js +25 -63
  29. package/esm/guide/style/index.css +1 -1
  30. package/esm/index.d.ts +1 -1
  31. package/esm/input-number/ControlArrow.js +0 -2
  32. package/esm/input-number/constants.js +2 -2
  33. package/esm/input-number/index.js +26 -106
  34. package/esm/input-number/style/index.css +1 -1
  35. package/esm/lazy-image/index.js +10 -55
  36. package/esm/lazy-image/style/index.css +1 -1
  37. package/esm/link-list/index.js +11 -35
  38. package/esm/link-list/style/index.css +1 -1
  39. package/esm/loading/index.js +15 -42
  40. package/esm/loading/style/index.css +1 -1
  41. package/esm/loading-bar/style/index.css +1 -1
  42. package/esm/loading-container/index.js +3 -6
  43. package/esm/loading-container/style/index.css +1 -1
  44. package/esm/loading-icon/index.js +0 -2
  45. package/esm/loading-icon/style/index.css +1 -1
  46. package/esm/mask/index.js +6 -9
  47. package/esm/mask/style/index.css +1 -1
  48. package/esm/message/index.d.ts +17 -6
  49. package/esm/message/index.js +68 -96
  50. package/esm/message/renderMessage.d.ts +17 -0
  51. package/esm/message/renderMessage.js +137 -0
  52. package/esm/message/style/index.css +1 -1
  53. package/esm/modal/Title.js +5 -12
  54. package/esm/modal/getPopupLocation.js +5 -7
  55. package/esm/modal/index.js +44 -125
  56. package/esm/modal/style/index.css +1 -1
  57. package/esm/move/index.js +32 -132
  58. package/esm/move/range.js +6 -12
  59. package/esm/move/utils.js +3 -10
  60. package/esm/popover/index.js +9 -28
  61. package/esm/popover/style/index.css +1 -1
  62. package/esm/portal/index.js +1 -22
  63. package/esm/script/index.js +19 -59
  64. package/esm/select/index.js +28 -106
  65. package/esm/select/style/index.css +1 -1
  66. package/esm/show-more/index.js +40 -103
  67. package/esm/skeleton/Item.js +1 -3
  68. package/esm/skeleton/index.js +5 -11
  69. package/esm/skeleton/style/index.css +1 -1
  70. package/esm/style.css +1 -33
  71. package/esm/table/body/BodyRow.js +11 -28
  72. package/esm/table/body/CheckIcon.js +10 -18
  73. package/esm/table/body/index.js +8 -12
  74. package/esm/table/header/CheckIcon.js +3 -11
  75. package/esm/table/header/HeaderCell.js +12 -33
  76. package/esm/table/header/HeaderRow.js +6 -17
  77. package/esm/table/index.js +30 -100
  78. package/esm/table/style/index.css +1 -1
  79. package/esm/tabs/index.js +35 -118
  80. package/esm/tabs/style/index.css +1 -1
  81. package/esm/tooltip/index.js +0 -4
  82. package/esm/tooltip/style/index.css +1 -1
  83. package/esm/trigger/align.js +6 -6
  84. package/esm/trigger/bottomAlign.js +33 -45
  85. package/esm/trigger/constants.js +0 -1
  86. package/esm/trigger/getPopupLocation.js +48 -68
  87. package/esm/trigger/index.js +52 -187
  88. package/esm/trigger/leftAlign.js +33 -47
  89. package/esm/trigger/ref.js +2 -7
  90. package/esm/trigger/rightAlign.js +33 -45
  91. package/esm/trigger/topAlign.js +33 -45
  92. package/esm/trigger/utils.js +28 -45
  93. package/lib/accordion/Item.js +6 -27
  94. package/lib/accordion/index.js +8 -41
  95. package/lib/accordion/style/index.css +1 -0
  96. package/lib/affix/PortalAffix.js +7 -17
  97. package/lib/affix/index.js +30 -75
  98. package/lib/affix/style/index.css +1 -1
  99. package/lib/base.css +1 -1
  100. package/lib/carousel/index.js +45 -146
  101. package/lib/checkbox/index.js +12 -41
  102. package/lib/checkbox/style/index.css +1 -1
  103. package/lib/collapse/index.js +11 -53
  104. package/lib/confirm/index.d.ts +8 -0
  105. package/lib/confirm/index.js +23 -38
  106. package/lib/confirm/style/index.css +1 -1
  107. package/lib/date-picker/DateEnum.js +0 -3
  108. package/lib/date-picker/calendar/Day.js +62 -87
  109. package/lib/date-picker/calendar/MonthYear.js +20 -62
  110. package/lib/date-picker/calendar/grid/index.js +7 -16
  111. package/lib/date-picker/calendar/index.js +4 -37
  112. package/lib/date-picker/index.js +9 -58
  113. package/lib/date-picker/style/index.css +1 -1
  114. package/lib/date-picker/utils.js +6 -26
  115. package/lib/drawer/Child.js +10 -25
  116. package/lib/drawer/index.js +22 -78
  117. package/lib/drawer/style/index.css +1 -1
  118. package/lib/ellipsis/index.js +9 -23
  119. package/lib/ellipsis/style/index.css +1 -1
  120. package/lib/guide/index.js +25 -71
  121. package/lib/guide/style/index.css +1 -1
  122. package/lib/index.d.ts +1 -1
  123. package/lib/index.js +0 -29
  124. package/lib/input-number/ControlArrow.js +0 -4
  125. package/lib/input-number/constants.js +2 -2
  126. package/lib/input-number/index.js +26 -114
  127. package/lib/input-number/style/index.css +1 -1
  128. package/lib/lazy-image/index.js +10 -58
  129. package/lib/lazy-image/style/index.css +1 -1
  130. package/lib/link-list/index.js +11 -40
  131. package/lib/link-list/style/index.css +1 -1
  132. package/lib/loading/index.js +13 -48
  133. package/lib/loading/style/index.css +1 -1
  134. package/lib/loading-bar/index.js +0 -5
  135. package/lib/loading-bar/style/index.css +1 -1
  136. package/lib/loading-container/index.js +3 -11
  137. package/lib/loading-container/style/index.css +1 -1
  138. package/lib/loading-icon/index.js +0 -7
  139. package/lib/loading-icon/style/index.css +1 -1
  140. package/lib/mask/index.js +6 -17
  141. package/lib/mask/style/index.css +1 -1
  142. package/lib/message/index.d.ts +17 -6
  143. package/lib/message/index.js +67 -104
  144. package/lib/message/renderMessage.d.ts +17 -0
  145. package/lib/message/renderMessage.js +144 -0
  146. package/lib/message/style/index.css +1 -1
  147. package/lib/modal/Affix.js +0 -4
  148. package/lib/modal/Title.js +5 -15
  149. package/lib/modal/getPopupLocation.js +5 -9
  150. package/lib/modal/index.js +44 -135
  151. package/lib/modal/style/index.css +1 -1
  152. package/lib/move/index.js +32 -144
  153. package/lib/move/range.js +6 -14
  154. package/lib/move/utils.js +3 -12
  155. package/lib/popover/index.js +9 -33
  156. package/lib/popover/style/index.css +1 -1
  157. package/lib/portal/index.js +1 -25
  158. package/lib/script/index.js +19 -61
  159. package/lib/select/index.js +28 -113
  160. package/lib/select/style/index.css +1 -1
  161. package/lib/show-more/index.js +40 -110
  162. package/lib/skeleton/Item.js +1 -8
  163. package/lib/skeleton/index.js +5 -16
  164. package/lib/skeleton/style/index.css +1 -1
  165. package/lib/style.css +1 -33
  166. package/lib/table/body/BodyRow.js +11 -33
  167. package/lib/table/body/CheckIcon.js +10 -22
  168. package/lib/table/body/index.js +8 -17
  169. package/lib/table/header/CheckIcon.js +3 -15
  170. package/lib/table/header/HeaderCell.js +12 -37
  171. package/lib/table/header/HeaderRow.js +6 -22
  172. package/lib/table/index.js +30 -107
  173. package/lib/table/style/index.css +1 -1
  174. package/lib/tabs/index.js +35 -122
  175. package/lib/tabs/style/index.css +1 -1
  176. package/lib/tooltip/index.js +0 -9
  177. package/lib/tooltip/style/index.css +1 -1
  178. package/lib/trigger/align.js +0 -4
  179. package/lib/trigger/bottomAlign.js +33 -48
  180. package/lib/trigger/constants.js +0 -2
  181. package/lib/trigger/getPopupLocation.js +48 -74
  182. package/lib/trigger/index.js +52 -198
  183. package/lib/trigger/leftAlign.js +33 -50
  184. package/lib/trigger/ref.js +2 -12
  185. package/lib/trigger/rightAlign.js +33 -48
  186. package/lib/trigger/topAlign.js +33 -48
  187. package/lib/trigger/utils.js +28 -53
  188. package/package.json +9 -3
  189. package/esm/accordion/style/index.d.ts +0 -1
  190. package/esm/accordion/style/index.js +0 -5
  191. package/esm/affix/style/index.d.ts +0 -1
  192. package/esm/affix/style/index.js +0 -5
  193. package/esm/affix/style/index.scss +0 -35
  194. package/esm/base.scss +0 -42
  195. package/esm/carousel/style/index.d.ts +0 -1
  196. package/esm/carousel/style/index.js +0 -5
  197. package/esm/carousel/style/index.scss +0 -37
  198. package/esm/checkbox/style/index.d.ts +0 -1
  199. package/esm/checkbox/style/index.js +0 -5
  200. package/esm/checkbox/style/index.scss +0 -118
  201. package/esm/collapse/style/index.d.ts +0 -1
  202. package/esm/collapse/style/index.js +0 -5
  203. package/esm/collapse/style/index.scss +0 -43
  204. package/esm/confirm/style/index.d.ts +0 -1
  205. package/esm/confirm/style/index.js +0 -7
  206. package/esm/confirm/style/index.scss +0 -44
  207. package/esm/date-picker/calendar/grid/index.scss +0 -90
  208. package/esm/date-picker/calendar/index.scss +0 -58
  209. package/esm/date-picker/style/index.d.ts +0 -1
  210. package/esm/date-picker/style/index.js +0 -11
  211. package/esm/date-picker/style/index.scss +0 -24
  212. package/esm/drawer/style/index.d.ts +0 -1
  213. package/esm/drawer/style/index.js +0 -7
  214. package/esm/drawer/style/index.scss +0 -44
  215. package/esm/ellipsis/style/index.d.ts +0 -1
  216. package/esm/ellipsis/style/index.js +0 -5
  217. package/esm/ellipsis/style/index.scss +0 -35
  218. package/esm/guide/style/index.d.ts +0 -1
  219. package/esm/guide/style/index.js +0 -7
  220. package/esm/guide/style/index.scss +0 -18
  221. package/esm/input-number/style/index.d.ts +0 -1
  222. package/esm/input-number/style/index.js +0 -5
  223. package/esm/input-number/style/index.scss +0 -70
  224. package/esm/lazy-image/style/index.d.ts +0 -1
  225. package/esm/lazy-image/style/index.js +0 -5
  226. package/esm/lazy-image/style/index.scss +0 -25
  227. package/esm/link-list/style/index.d.ts +0 -1
  228. package/esm/link-list/style/index.js +0 -7
  229. package/esm/link-list/style/index.scss +0 -125
  230. package/esm/loading/style/index.d.ts +0 -1
  231. package/esm/loading/style/index.js +0 -7
  232. package/esm/loading/style/index.scss +0 -21
  233. package/esm/loading-bar/style/index.d.ts +0 -1
  234. package/esm/loading-bar/style/index.js +0 -5
  235. package/esm/loading-bar/style/index.scss +0 -62
  236. package/esm/loading-container/style/index.d.ts +0 -1
  237. package/esm/loading-container/style/index.js +0 -7
  238. package/esm/loading-container/style/index.scss +0 -28
  239. package/esm/loading-icon/style/index.d.ts +0 -1
  240. package/esm/loading-icon/style/index.js +0 -5
  241. package/esm/loading-icon/style/index.scss +0 -24
  242. package/esm/mask/style/index.d.ts +0 -1
  243. package/esm/mask/style/index.js +0 -5
  244. package/esm/mask/style/index.scss +0 -35
  245. package/esm/message/style/index.d.ts +0 -1
  246. package/esm/message/style/index.js +0 -5
  247. package/esm/message/style/index.scss +0 -71
  248. package/esm/modal/style/index.d.ts +0 -1
  249. package/esm/modal/style/index.js +0 -7
  250. package/esm/modal/style/index.scss +0 -112
  251. package/esm/move/style/index.d.ts +0 -1
  252. package/esm/move/style/index.js +0 -5
  253. package/esm/move/style/index.scss +0 -7
  254. package/esm/popover/style/index.d.ts +0 -1
  255. package/esm/popover/style/index.js +0 -7
  256. package/esm/popover/style/index.scss +0 -60
  257. package/esm/portal/style/index.d.ts +0 -1
  258. package/esm/portal/style/index.js +0 -5
  259. package/esm/portal/style/index.scss +0 -0
  260. package/esm/script/style/index.d.ts +0 -1
  261. package/esm/script/style/index.js +0 -1
  262. package/esm/script/style/index.scss +0 -0
  263. package/esm/select/style/index.d.ts +0 -1
  264. package/esm/select/style/index.js +0 -7
  265. package/esm/select/style/index.scss +0 -126
  266. package/esm/show-more/style/index.d.ts +0 -1
  267. package/esm/show-more/style/index.js +0 -5
  268. package/esm/show-more/style/index.scss +0 -23
  269. package/esm/skeleton/style/index.d.ts +0 -1
  270. package/esm/skeleton/style/index.js +0 -5
  271. package/esm/skeleton/style/index.scss +0 -27
  272. package/esm/table/style/index.d.ts +0 -1
  273. package/esm/table/style/index.js +0 -9
  274. package/esm/table/style/index.scss +0 -45
  275. package/esm/tabs/style/index.d.ts +0 -1
  276. package/esm/tabs/style/index.js +0 -5
  277. package/esm/tabs/style/index.scss +0 -62
  278. package/esm/tooltip/style/index.d.ts +0 -1
  279. package/esm/tooltip/style/index.js +0 -7
  280. package/esm/tooltip/style/index.scss +0 -62
  281. package/esm/trigger/style/index.d.ts +0 -1
  282. package/esm/trigger/style/index.js +0 -5
  283. package/esm/trigger/style/index.scss +0 -79
  284. package/lib/accordion/style/index.d.ts +0 -1
  285. package/lib/accordion/style/index.js +0 -7
  286. package/lib/affix/style/index.d.ts +0 -1
  287. package/lib/affix/style/index.js +0 -7
  288. package/lib/affix/style/index.scss +0 -35
  289. package/lib/base.scss +0 -42
  290. package/lib/carousel/style/index.d.ts +0 -1
  291. package/lib/carousel/style/index.js +0 -7
  292. package/lib/carousel/style/index.scss +0 -37
  293. package/lib/checkbox/style/index.d.ts +0 -1
  294. package/lib/checkbox/style/index.js +0 -7
  295. package/lib/checkbox/style/index.scss +0 -118
  296. package/lib/collapse/style/index.d.ts +0 -1
  297. package/lib/collapse/style/index.js +0 -7
  298. package/lib/collapse/style/index.scss +0 -43
  299. package/lib/confirm/style/index.d.ts +0 -1
  300. package/lib/confirm/style/index.js +0 -9
  301. package/lib/confirm/style/index.scss +0 -44
  302. package/lib/date-picker/calendar/grid/index.scss +0 -90
  303. package/lib/date-picker/calendar/index.scss +0 -58
  304. package/lib/date-picker/style/index.d.ts +0 -1
  305. package/lib/date-picker/style/index.js +0 -13
  306. package/lib/date-picker/style/index.scss +0 -24
  307. package/lib/drawer/style/index.d.ts +0 -1
  308. package/lib/drawer/style/index.js +0 -9
  309. package/lib/drawer/style/index.scss +0 -44
  310. package/lib/ellipsis/style/index.d.ts +0 -1
  311. package/lib/ellipsis/style/index.js +0 -7
  312. package/lib/ellipsis/style/index.scss +0 -35
  313. package/lib/guide/style/index.d.ts +0 -1
  314. package/lib/guide/style/index.js +0 -9
  315. package/lib/guide/style/index.scss +0 -18
  316. package/lib/input-number/style/index.d.ts +0 -1
  317. package/lib/input-number/style/index.js +0 -7
  318. package/lib/input-number/style/index.scss +0 -70
  319. package/lib/lazy-image/style/index.d.ts +0 -1
  320. package/lib/lazy-image/style/index.js +0 -7
  321. package/lib/lazy-image/style/index.scss +0 -25
  322. package/lib/link-list/style/index.d.ts +0 -1
  323. package/lib/link-list/style/index.js +0 -9
  324. package/lib/link-list/style/index.scss +0 -125
  325. package/lib/loading/style/index.d.ts +0 -1
  326. package/lib/loading/style/index.js +0 -9
  327. package/lib/loading/style/index.scss +0 -21
  328. package/lib/loading-bar/style/index.d.ts +0 -1
  329. package/lib/loading-bar/style/index.js +0 -7
  330. package/lib/loading-bar/style/index.scss +0 -62
  331. package/lib/loading-container/style/index.d.ts +0 -1
  332. package/lib/loading-container/style/index.js +0 -9
  333. package/lib/loading-container/style/index.scss +0 -28
  334. package/lib/loading-icon/style/index.d.ts +0 -1
  335. package/lib/loading-icon/style/index.js +0 -7
  336. package/lib/loading-icon/style/index.scss +0 -24
  337. package/lib/mask/style/index.d.ts +0 -1
  338. package/lib/mask/style/index.js +0 -7
  339. package/lib/mask/style/index.scss +0 -35
  340. package/lib/message/style/index.d.ts +0 -1
  341. package/lib/message/style/index.js +0 -7
  342. package/lib/message/style/index.scss +0 -71
  343. package/lib/modal/style/index.d.ts +0 -1
  344. package/lib/modal/style/index.js +0 -9
  345. package/lib/modal/style/index.scss +0 -112
  346. package/lib/move/style/index.d.ts +0 -1
  347. package/lib/move/style/index.js +0 -7
  348. package/lib/move/style/index.scss +0 -7
  349. package/lib/popover/style/index.d.ts +0 -1
  350. package/lib/popover/style/index.js +0 -9
  351. package/lib/popover/style/index.scss +0 -60
  352. package/lib/portal/style/index.d.ts +0 -1
  353. package/lib/portal/style/index.js +0 -7
  354. package/lib/portal/style/index.scss +0 -0
  355. package/lib/script/style/index.d.ts +0 -1
  356. package/lib/script/style/index.js +0 -1
  357. package/lib/script/style/index.scss +0 -0
  358. package/lib/select/style/index.d.ts +0 -1
  359. package/lib/select/style/index.js +0 -9
  360. package/lib/select/style/index.scss +0 -126
  361. package/lib/show-more/style/index.d.ts +0 -1
  362. package/lib/show-more/style/index.js +0 -7
  363. package/lib/show-more/style/index.scss +0 -23
  364. package/lib/skeleton/style/index.d.ts +0 -1
  365. package/lib/skeleton/style/index.js +0 -7
  366. package/lib/skeleton/style/index.scss +0 -27
  367. package/lib/table/style/index.d.ts +0 -1
  368. package/lib/table/style/index.js +0 -11
  369. package/lib/table/style/index.scss +0 -45
  370. package/lib/tabs/style/index.d.ts +0 -1
  371. package/lib/tabs/style/index.js +0 -7
  372. package/lib/tabs/style/index.scss +0 -62
  373. package/lib/tooltip/style/index.d.ts +0 -1
  374. package/lib/tooltip/style/index.js +0 -9
  375. package/lib/tooltip/style/index.scss +0 -62
  376. package/lib/trigger/style/index.d.ts +0 -1
  377. package/lib/trigger/style/index.js +0 -7
  378. package/lib/trigger/style/index.scss +0 -79
package/lib/tabs/index.js CHANGED
@@ -1,18 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _utils = require("@autobest-ui/utils");
15
-
16
11
  var __extends = void 0 && (void 0).__extends || function () {
17
12
  var _extendStatics = function extendStatics(d, b) {
18
13
  _extendStatics = Object.setPrototypeOf || {
@@ -24,30 +19,23 @@ var __extends = void 0 && (void 0).__extends || function () {
24
19
  if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
25
20
  }
26
21
  };
27
-
28
22
  return _extendStatics(d, b);
29
23
  };
30
-
31
24
  return function (d, b) {
32
25
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
-
34
26
  _extendStatics(d, b);
35
-
36
27
  function __() {
37
28
  this.constructor = d;
38
29
  }
39
-
40
30
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
41
31
  };
42
32
  }();
43
-
44
33
  var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
45
34
  function adopt(value) {
46
35
  return value instanceof P ? value : new P(function (resolve) {
47
36
  resolve(value);
48
37
  });
49
38
  }
50
-
51
39
  return new (P || (P = Promise))(function (resolve, reject) {
52
40
  function fulfilled(value) {
53
41
  try {
@@ -56,7 +44,6 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P
56
44
  reject(e);
57
45
  }
58
46
  }
59
-
60
47
  function rejected(value) {
61
48
  try {
62
49
  step(generator["throw"](value));
@@ -64,29 +51,26 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P
64
51
  reject(e);
65
52
  }
66
53
  }
67
-
68
54
  function step(result) {
69
55
  result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
70
56
  }
71
-
72
57
  step((generator = generator.apply(thisArg, _arguments || [])).next());
73
58
  });
74
59
  };
75
-
76
60
  var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
77
61
  var _ = {
78
- label: 0,
79
- sent: function sent() {
80
- if (t[0] & 1) throw t[1];
81
- return t[1];
62
+ label: 0,
63
+ sent: function sent() {
64
+ if (t[0] & 1) throw t[1];
65
+ return t[1];
66
+ },
67
+ trys: [],
68
+ ops: []
82
69
  },
83
- trys: [],
84
- ops: []
85
- },
86
- f,
87
- y,
88
- t,
89
- g;
70
+ f,
71
+ y,
72
+ t,
73
+ g;
90
74
  return g = {
91
75
  next: verb(0),
92
76
  "throw": verb(1),
@@ -94,79 +78,60 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
94
78
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
95
79
  return this;
96
80
  }), g;
97
-
98
81
  function verb(n) {
99
82
  return function (v) {
100
83
  return step([n, v]);
101
84
  };
102
85
  }
103
-
104
86
  function step(op) {
105
87
  if (f) throw new TypeError("Generator is already executing.");
106
-
107
88
  while (_) {
108
89
  try {
109
90
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
110
91
  if (y = 0, t) op = [op[0] & 2, t.value];
111
-
112
92
  switch (op[0]) {
113
93
  case 0:
114
94
  case 1:
115
95
  t = op;
116
96
  break;
117
-
118
97
  case 4:
119
98
  _.label++;
120
99
  return {
121
100
  value: op[1],
122
101
  done: false
123
102
  };
124
-
125
103
  case 5:
126
104
  _.label++;
127
105
  y = op[1];
128
106
  op = [0];
129
107
  continue;
130
-
131
108
  case 7:
132
109
  op = _.ops.pop();
133
-
134
110
  _.trys.pop();
135
-
136
111
  continue;
137
-
138
112
  default:
139
113
  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
140
114
  _ = 0;
141
115
  continue;
142
116
  }
143
-
144
117
  if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
145
118
  _.label = op[1];
146
119
  break;
147
120
  }
148
-
149
121
  if (op[0] === 6 && _.label < t[1]) {
150
122
  _.label = t[1];
151
123
  t = op;
152
124
  break;
153
125
  }
154
-
155
126
  if (t && _.label < t[2]) {
156
127
  _.label = t[2];
157
-
158
128
  _.ops.push(op);
159
-
160
129
  break;
161
130
  }
162
-
163
131
  if (t[2]) _.ops.pop();
164
-
165
132
  _.trys.pop();
166
-
167
133
  continue;
168
134
  }
169
-
170
135
  op = body.call(thisArg, _);
171
136
  } catch (e) {
172
137
  op = [6, e];
@@ -175,7 +140,6 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
175
140
  f = t = 0;
176
141
  }
177
142
  }
178
-
179
143
  if (op[0] & 5) throw op[1];
180
144
  return {
181
145
  value: op[0] ? op[1] : void 0,
@@ -183,15 +147,10 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
183
147
  };
184
148
  }
185
149
  };
186
-
187
- var Tabs =
188
- /** @class */
189
- function (_super) {
150
+ var Tabs = /** @class */function (_super) {
190
151
  __extends(Tabs, _super);
191
-
192
152
  function Tabs(props) {
193
153
  var _this = _super.call(this, props) || this;
194
-
195
154
  _this.prefixCls = 'ab-tabs';
196
155
  _this.resizeHandler = null;
197
156
  _this.ulRef = /*#__PURE__*/_react.default.createRef();
@@ -199,50 +158,39 @@ function (_super) {
199
158
  * 处理value在使用data-value后,将number转成string问题
200
159
  * @param value
201
160
  */
202
-
203
161
  _this.getValue = function (value) {
204
162
  if (!value) {
205
163
  return value;
206
164
  }
207
-
208
165
  var valueNumber = Number(value);
209
166
  return isNaN(valueNumber) ? value : valueNumber;
210
167
  };
211
168
  /**
212
169
  * 根据placement不同,设置bar的位置
213
170
  */
214
-
215
-
216
171
  _this.setBarStyles = function () {
217
172
  var activeValue = _this.state.activeValue;
218
173
  var element = _this.ulRef.current;
219
-
220
174
  if (!element || (0, _utils.isBlank)(activeValue)) {
221
175
  return;
222
176
  }
223
-
224
177
  var activeElement = Array.from(element.children).find(function (child) {
225
178
  if (!child || !child.dataset) {
226
179
  return null;
227
180
  }
228
-
229
181
  var value = _this.getValue(child.dataset.value);
230
-
231
182
  return value === activeValue;
232
183
  });
233
-
234
184
  if (!activeElement) {
235
185
  return;
236
186
  }
237
-
238
187
  var _a = _this.props,
239
- placement = _a.placement,
240
- barSize = _a.barSize,
241
- actualPositionValue = _a.actualPositionValue,
242
- actualDisplayValue = _a.actualDisplayValue;
188
+ placement = _a.placement,
189
+ barSize = _a.barSize,
190
+ actualPositionValue = _a.actualPositionValue,
191
+ actualDisplayValue = _a.actualDisplayValue;
243
192
  var offsetAndSize = (0, _utils.getActualOffsetAndSize)(activeElement, actualDisplayValue, actualPositionValue);
244
193
  var barStyles = {};
245
-
246
194
  if (placement === 'top' || placement === 'bottom') {
247
195
  barStyles.width = "".concat(offsetAndSize.width, "px");
248
196
  barStyles.height = barSize;
@@ -252,83 +200,59 @@ function (_super) {
252
200
  barStyles.width = barSize;
253
201
  barStyles.transform = "translate(0, ".concat(offsetAndSize.offsetTop, "px)");
254
202
  }
255
-
256
203
  _this.setState({
257
204
  barStyles: barStyles
258
205
  });
259
206
  };
260
-
261
207
  _this.onChange = function (ev) {
262
208
  return __awaiter(_this, void 0, void 0, function () {
263
209
  var dataset, value, findItem, _a, onBeforeChange, onAfterChange, _b;
264
-
265
210
  return __generator(this, function (_c) {
266
211
  switch (_c.label) {
267
212
  case 0:
268
213
  dataset = ev.currentTarget.dataset;
269
-
270
214
  if (!dataset) {
271
- return [2
272
- /*return*/
273
- ];
215
+ return [2 /*return*/];
274
216
  }
275
217
 
276
- value = this.getValue(dataset.value); // 相同将不触发change
277
-
218
+ value = this.getValue(dataset.value);
219
+ // 相同将不触发change
278
220
  if (value === this.state.activeValue) {
279
- return [2
280
- /*return*/
281
- ];
221
+ return [2 /*return*/];
282
222
  }
283
223
 
284
224
  findItem = this.props.options.find(function (item) {
285
225
  return item.value === value;
286
226
  });
287
-
288
227
  if (findItem && findItem.disabled) {
289
- return [2
290
- /*return*/
291
- ];
228
+ return [2 /*return*/];
292
229
  }
293
230
 
294
231
  _a = this.props, onBeforeChange = _a.onBeforeChange, onAfterChange = _a.onAfterChange;
295
232
  _b = onBeforeChange;
296
- if (!_b) return [3
297
- /*break*/
298
- , 2];
299
- return [4
300
- /*yield*/
301
- , onBeforeChange(value, ev)];
302
-
233
+ if (!_b) return [3 /*break*/, 2];
234
+ return [4 /*yield*/, onBeforeChange(value, ev)];
303
235
  case 1:
304
236
  _b = !_c.sent();
305
237
  _c.label = 2;
306
-
307
238
  case 2:
308
239
  // before change 拦截,返回false将不改变active value
309
240
  if (_b) {
310
- return [2
311
- /*return*/
312
- ];
241
+ return [2 /*return*/];
313
242
  }
314
243
 
315
244
  if (onAfterChange) {
316
245
  onAfterChange(value, ev);
317
- } // 如果外部控制,则不用再setstate
318
-
319
-
246
+ }
247
+ // 如果外部控制,则不用再setstate
320
248
  if ('activeValue' in this.props) {
321
- return [2
322
- /*return*/
323
- ];
249
+ return [2 /*return*/];
324
250
  }
325
251
 
326
252
  this.setState({
327
253
  activeValue: value
328
254
  });
329
- return [2
330
- /*return*/
331
- ];
255
+ return [2 /*return*/];
332
256
  }
333
257
  });
334
258
  });
@@ -339,29 +263,24 @@ function (_super) {
339
263
  };
340
264
  return _this;
341
265
  }
342
-
343
266
  Tabs.getDerivedStateFromProps = function (nextProps) {
344
267
  if ('activeValue' in nextProps) {
345
268
  return {
346
269
  activeValue: nextProps.activeValue
347
270
  };
348
271
  }
349
-
350
272
  return null;
351
273
  };
352
-
353
274
  Tabs.prototype.componentDidMount = function () {
354
275
  var _this = this;
355
-
356
- this.setBarStyles(); // 加入 resize 监听
357
-
276
+ this.setBarStyles();
277
+ // 加入 resize 监听
358
278
  if (!this.resizeHandler) {
359
279
  this.resizeHandler = (0, _utils.addEventListener)(window, 'resize', (0, _utils.throttleWithRAF)(function () {
360
280
  return _this.setBarStyles();
361
281
  }));
362
282
  }
363
283
  };
364
-
365
284
  Tabs.prototype.componentDidUpdate = function (prevProps, prevState) {
366
285
  // 等待activeValue更新后,在计算bar的样式,
367
286
  // 主要解决active后,active样式发生改变,bar也需要相应调整
@@ -369,31 +288,27 @@ function (_super) {
369
288
  this.setBarStyles();
370
289
  }
371
290
  };
372
-
373
291
  Tabs.prototype.componentWillUnmount = function () {
374
292
  if (this.resizeHandler) {
375
293
  this.resizeHandler.remove();
376
294
  this.resizeHandler = null;
377
295
  }
378
296
  };
379
-
380
297
  Tabs.prototype.render = function () {
381
298
  var _this = this;
382
-
383
299
  var cls = this.prefixCls;
384
300
  var _a = this.props,
385
- className = _a.className,
386
- options = _a.options,
387
- placement = _a.placement;
301
+ className = _a.className,
302
+ options = _a.options,
303
+ placement = _a.placement;
388
304
  var _b = this.state,
389
- activeValue = _b.activeValue,
390
- barStyles = _b.barStyles;
305
+ activeValue = _b.activeValue,
306
+ barStyles = _b.barStyles;
391
307
  return /*#__PURE__*/_react.default.createElement("div", {
392
308
  className: (0, _classnames.default)(cls, className, "".concat(cls, "-").concat(placement)),
393
309
  ref: this.ulRef
394
310
  }, options.map(function (item) {
395
311
  var _a;
396
-
397
312
  return /*#__PURE__*/_react.default.createElement("div", {
398
313
  key: item.value,
399
314
  className: (0, _classnames.default)("".concat(cls, "-item"), item.className, (_a = {}, _a["".concat(cls, "-active")] = activeValue === item.value, _a["".concat(cls, "-disabled")] = item.disabled, _a)),
@@ -405,7 +320,6 @@ function (_super) {
405
320
  style: barStyles
406
321
  }));
407
322
  };
408
-
409
323
  Tabs.defaultProps = {
410
324
  barSize: '1px',
411
325
  placement: 'top',
@@ -414,6 +328,5 @@ function (_super) {
414
328
  };
415
329
  return Tabs;
416
330
  }(_react.default.Component);
417
-
418
331
  var _default = Tabs;
419
332
  exports.default = _default;
@@ -1 +1 @@
1
- .ab-tabs{position:relative;display:flex}.ab-tabs-item{cursor:pointer}.ab-tabs-item.ab-tabs-active{font-weight:700}.ab-tabs-item.ab-tabs-disabled{cursor:not-allowed;opacity:.7}.ab-tabs-bar{position:absolute;background-color:#b22222;transition:all .25s;width:0;height:0;overflow:hidden;margin:0;padding:0}.ab-tabs-bottom,.ab-tabs-top{flex-direction:row}.ab-tabs-bottom>.ab-tabs-bar,.ab-tabs-top>.ab-tabs-bar{left:0}.ab-tabs-left,.ab-tabs-right{flex-direction:column}.ab-tabs-left>.ab-tabs-bar,.ab-tabs-right>.ab-tabs-bar{top:0}.ab-tabs-top>.ab-tabs-bar{bottom:0}.ab-tabs-bottom>.ab-tabs-bar{top:0}.ab-tabs-left>.ab-tabs-bar{right:0}.ab-tabs-right>.ab-tabs-bar{left:0}
1
+ .ab-tabs{position:relative;display:flex}.ab-tabs-item{cursor:pointer}.ab-tabs-item.ab-tabs-active{font-weight:700}.ab-tabs-item.ab-tabs-disabled{cursor:not-allowed;opacity:.7}.ab-tabs-bar{position:absolute;background-color:#b22222;transition:.25s;width:0;height:0;overflow:hidden;margin:0;padding:0}.ab-tabs-bottom,.ab-tabs-top{flex-direction:row}.ab-tabs-bottom>.ab-tabs-bar,.ab-tabs-top>.ab-tabs-bar{left:0}.ab-tabs-left,.ab-tabs-right{flex-direction:column}.ab-tabs-left>.ab-tabs-bar,.ab-tabs-right>.ab-tabs-bar{top:0}.ab-tabs-top>.ab-tabs-bar{bottom:0}.ab-tabs-bottom>.ab-tabs-bar{top:0}.ab-tabs-left>.ab-tabs-bar{right:0}.ab-tabs-right>.ab-tabs-bar{left:0}
@@ -1,34 +1,25 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = Tooltip;
9
-
10
8
  var _react = _interopRequireDefault(require("react"));
11
-
12
9
  var _popover = _interopRequireDefault(require("../popover"));
13
-
14
10
  var __assign = void 0 && (void 0).__assign || function () {
15
11
  __assign = Object.assign || function (t) {
16
12
  for (var s, i = 1, n = arguments.length; i < n; i++) {
17
13
  s = arguments[i];
18
-
19
14
  for (var p in s) {
20
15
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
21
16
  }
22
17
  }
23
-
24
18
  return t;
25
19
  };
26
-
27
20
  return __assign.apply(this, arguments);
28
21
  };
29
-
30
22
  var cls = 'ab-tooltip';
31
-
32
23
  function Tooltip(props) {
33
24
  return /*#__PURE__*/_react.default.createElement(_popover.default, __assign({}, props, {
34
25
  prefixCls: cls
@@ -1 +1 @@
1
- .ab-tooltip-wrap{background-clip:padding-box;padding:.08rem .11rem .05rem;min-width:210px;border-radius:4px;line-height:1.4;border:1px solid #906c00;box-shadow:1px 1px 5px -1px #000;background-color:#fffaec}.ab-tooltip-inner{position:relative;width:100%;overflow:hidden;font-size:.12rem}.ab-tooltip-inner-expand{padding-right:.1rem}.ab-tooltip-arrow{position:absolute;display:block;width:8px;height:8px;border-top-color:transparent;border-left-color:transparent;border-style:solid;box-shadow:3px 3px 7px rgba(0,0,0,.07);background-color:#fffaec;border-right-color:#906c00;border-bottom-color:#906c00;border-width:1px}.ab-tooltip-close{position:absolute;right:.02rem;top:.05rem;cursor:pointer;padding:0 .05rem;color:#bfbfbf;font-size:.2rem;line-height:1;z-index:2}.ab-tooltip-close:hover{color:#4a4a4a}@media only screen and (max-width:767px){.ab-tooltip-wrap{width:calc(100% - .3rem)}}
1
+ .ab-trigger-wrap{position:absolute;top:0;left:0;z-index:101}.ab-trigger-wrap.ab-trigger-hidden{display:none}.ab-trigger-mask{position:fixed;top:0;left:0;bottom:0;right:0;z-index:101;background-color:transparent;display:none}.ab-trigger-mask.ab-trigger-mask-show{display:block}.ab-trigger-fade-appear,.ab-trigger-fade-enter,.ab-trigger-fade-hr-appear,.ab-trigger-fade-hr-enter{opacity:0}.ab-trigger-fade-appear,.ab-trigger-fade-enter{transform:scale(.7)}.ab-trigger-fade-hr-appear,.ab-trigger-fade-hr-enter{opacity:0;transform:scaleY(.7)}.ab-trigger-fade-appear-active,.ab-trigger-fade-enter-active,.ab-trigger-fade-hr-appear-active,.ab-trigger-fade-hr-enter-active{opacity:1;transition:opacity .2s,transform .2s}.ab-trigger-fade-appear-active,.ab-trigger-fade-enter-active{transform:scale(1)}.ab-trigger-fade-hr-appear-active,.ab-trigger-fade-hr-enter-active{transform:scaleY(1)}.ab-trigger-fade-exit,.ab-trigger-fade-hr-exit{opacity:1}.ab-trigger-fade-exit-active,.ab-trigger-fade-hr-exit-active{opacity:0;transition:opacity .2s,transform .2s}.ab-trigger-fade-exit-active{transform:scale(.7)}.ab-trigger-fade-hr-exit-active{transform:scaleY(.7)}.ab-trigger-fade-exit-done,.ab-trigger-fade-hr-exit-done{display:none}.ab-tooltip-wrap{background-clip:padding-box;padding:.08rem .11rem .05rem;min-width:210px;border-radius:4px;line-height:1.4;border:1px solid #906c00;box-shadow:1px 1px 5px -1px #000;background-color:#fffaec}.ab-tooltip-inner{position:relative;width:100%;overflow:hidden;font-size:.12rem}.ab-tooltip-inner-expand{padding-right:.1rem}.ab-tooltip-arrow{position:absolute;display:block;width:8px;height:8px;border-style:solid;box-shadow:3px 3px 7px rgba(0,0,0,.07);background-color:#fffaec;border-color:transparent #906c00 #906c00 transparent;border-width:1px}.ab-tooltip-close{position:absolute;right:.02rem;top:.05rem;cursor:pointer;padding:0 .05rem;color:#bfbfbf;font-size:.2rem;line-height:1;z-index:2}.ab-tooltip-close:hover{color:#4a4a4a}@media only screen and (max-width:767px){.ab-tooltip-wrap{width:calc(100% - .3rem)}}
@@ -75,11 +75,7 @@ Object.defineProperty(exports, "getTopRightLocationInfo", {
75
75
  return _topAlign.getTopRightLocationInfo;
76
76
  }
77
77
  });
78
-
79
78
  var _leftAlign = require("./leftAlign");
80
-
81
79
  var _rightAlign = require("./rightAlign");
82
-
83
80
  var _topAlign = require("./topAlign");
84
-
85
81
  var _bottomAlign = require("./bottomAlign");
@@ -6,33 +6,27 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getBottomLeftLocationInfo = getBottomLeftLocationInfo;
7
7
  exports.getBottomLocationInfo = getBottomLocationInfo;
8
8
  exports.getBottomRightLocationInfo = getBottomRightLocationInfo;
9
-
10
9
  var _utils = require("./utils");
11
-
12
10
  var __assign = void 0 && (void 0).__assign || function () {
13
11
  __assign = Object.assign || function (t) {
14
12
  for (var s, i = 1, n = arguments.length; i < n; i++) {
15
13
  s = arguments[i];
16
-
17
14
  for (var p in s) {
18
15
  if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
19
16
  }
20
17
  }
21
-
22
18
  return t;
23
19
  };
24
-
25
20
  return __assign.apply(this, arguments);
26
21
  };
27
-
28
22
  function getBottomCommon(_a) {
29
23
  var top = _a.top,
30
- rootInfo = _a.rootInfo,
31
- popInfo = _a.popInfo,
32
- arrowLeft = _a.arrowLeft,
33
- hiddenArrow = _a.hiddenArrow,
34
- rootToPopupSpacing = _a.rootToPopupSpacing,
35
- isTransformHorizontalDirection = _a.isTransformHorizontalDirection;
24
+ rootInfo = _a.rootInfo,
25
+ popInfo = _a.popInfo,
26
+ arrowLeft = _a.arrowLeft,
27
+ hiddenArrow = _a.hiddenArrow,
28
+ rootToPopupSpacing = _a.rootToPopupSpacing,
29
+ isTransformHorizontalDirection = _a.isTransformHorizontalDirection;
36
30
  return {
37
31
  rootWidth: rootInfo.width,
38
32
  width: popInfo.width,
@@ -46,22 +40,19 @@ function getBottomCommon(_a) {
46
40
  transformOrigin: isTransformHorizontalDirection ? 'center top' : "".concat(arrowLeft, "px top")
47
41
  };
48
42
  }
49
-
50
43
  function getBottomLocationInfo(_a) {
51
44
  var rootInfo = _a.rootInfo,
52
- popInfo = _a.popInfo,
53
- _b = _a.translateX,
54
- translateX = _b === void 0 ? 0 : _b,
55
- rootToPopupSpacing = _a.rootToPopupSpacing,
56
- isTransformHorizontalDirection = _a.isTransformHorizontalDirection,
57
- hiddenArrow = _a.hiddenArrow,
58
- isInsertNode = _a.isInsertNode;
45
+ popInfo = _a.popInfo,
46
+ _b = _a.translateX,
47
+ translateX = _b === void 0 ? 0 : _b,
48
+ rootToPopupSpacing = _a.rootToPopupSpacing,
49
+ isTransformHorizontalDirection = _a.isTransformHorizontalDirection,
50
+ hiddenArrow = _a.hiddenArrow,
51
+ isInsertNode = _a.isInsertNode;
59
52
  var arrowLeft = (0, _utils.getArrowLeft)(popInfo.width / 2 - translateX, popInfo.width);
60
-
61
53
  var _c = (0, _utils.getAvailPosition)(rootInfo, isInsertNode),
62
- left = _c.left,
63
- top = _c.top;
64
-
54
+ left = _c.left,
55
+ top = _c.top;
65
56
  return __assign(__assign({}, getBottomCommon({
66
57
  top: top,
67
58
  rootInfo: rootInfo,
@@ -74,22 +65,19 @@ function getBottomLocationInfo(_a) {
74
65
  left: left + rootInfo.width / 2 - popInfo.width / 2 + translateX
75
66
  });
76
67
  }
77
-
78
68
  function getBottomLeftLocationInfo(_a) {
79
69
  var rootInfo = _a.rootInfo,
80
- popInfo = _a.popInfo,
81
- _b = _a.translateX,
82
- translateX = _b === void 0 ? 0 : _b,
83
- rootToPopupSpacing = _a.rootToPopupSpacing,
84
- isTransformHorizontalDirection = _a.isTransformHorizontalDirection,
85
- hiddenArrow = _a.hiddenArrow,
86
- isInsertNode = _a.isInsertNode;
70
+ popInfo = _a.popInfo,
71
+ _b = _a.translateX,
72
+ translateX = _b === void 0 ? 0 : _b,
73
+ rootToPopupSpacing = _a.rootToPopupSpacing,
74
+ isTransformHorizontalDirection = _a.isTransformHorizontalDirection,
75
+ hiddenArrow = _a.hiddenArrow,
76
+ isInsertNode = _a.isInsertNode;
87
77
  var arrowLeft = (0, _utils.getArrowLeft)(rootInfo.width / 2 - translateX, popInfo.width);
88
-
89
78
  var _c = (0, _utils.getAvailPosition)(rootInfo, isInsertNode),
90
- left = _c.left,
91
- top = _c.top;
92
-
79
+ left = _c.left,
80
+ top = _c.top;
93
81
  return __assign(__assign({}, getBottomCommon({
94
82
  top: top,
95
83
  rootInfo: rootInfo,
@@ -102,22 +90,19 @@ function getBottomLeftLocationInfo(_a) {
102
90
  left: left + translateX
103
91
  });
104
92
  }
105
-
106
93
  function getBottomRightLocationInfo(_a) {
107
94
  var rootInfo = _a.rootInfo,
108
- popInfo = _a.popInfo,
109
- _b = _a.translateX,
110
- translateX = _b === void 0 ? 0 : _b,
111
- rootToPopupSpacing = _a.rootToPopupSpacing,
112
- isTransformHorizontalDirection = _a.isTransformHorizontalDirection,
113
- hiddenArrow = _a.hiddenArrow,
114
- isInsertNode = _a.isInsertNode;
95
+ popInfo = _a.popInfo,
96
+ _b = _a.translateX,
97
+ translateX = _b === void 0 ? 0 : _b,
98
+ rootToPopupSpacing = _a.rootToPopupSpacing,
99
+ isTransformHorizontalDirection = _a.isTransformHorizontalDirection,
100
+ hiddenArrow = _a.hiddenArrow,
101
+ isInsertNode = _a.isInsertNode;
115
102
  var arrowLeft = (0, _utils.getArrowLeft)(popInfo.width - rootInfo.width / 2 - translateX, popInfo.width);
116
-
117
103
  var _c = (0, _utils.getAvailPosition)(rootInfo, isInsertNode),
118
- left = _c.left,
119
- top = _c.top;
120
-
104
+ left = _c.left,
105
+ top = _c.top;
121
106
  return __assign(__assign({}, getBottomCommon({
122
107
  top: top,
123
108
  rootInfo: rootInfo,
@@ -68,11 +68,9 @@ var LocationType = {
68
68
  }
69
69
  };
70
70
  exports.LocationType = LocationType;
71
-
72
71
  function getLocationInfo(placement) {
73
72
  if (!LocationType[placement]) {
74
73
  throw new TypeError('Support placement: Top, TopLeft, TopRight, Bottom, BottomLeft, BottomRight, Right, RightTop, RightBottom, Left, LeftTop, LeftBottom');
75
74
  }
76
-
77
75
  return LocationType[placement];
78
76
  }