@douyinfe/semi-foundation 2.19.0-alpha.8 → 2.19.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 (350) hide show
  1. package/anchor/anchor.scss +1 -8
  2. package/anchor/rtl.scss +0 -1
  3. package/anchor/variables.scss +1 -0
  4. package/calendar/eventUtil.ts +8 -7
  5. package/calendar/foundation.ts +14 -14
  6. package/datePicker/monthsGridFoundation.ts +10 -3
  7. package/dropdown/foundation.ts +2 -1
  8. package/dropdown/menuFoundation.ts +2 -1
  9. package/getBabelConfig.js +0 -12
  10. package/lib/cjs/anchor/anchor.css +1 -10
  11. package/lib/cjs/anchor/anchor.scss +1 -8
  12. package/lib/cjs/anchor/constants.js +1 -4
  13. package/lib/cjs/anchor/foundation.js +5 -12
  14. package/lib/cjs/anchor/linkFoundation.js +4 -9
  15. package/lib/cjs/anchor/rtl.scss +0 -1
  16. package/lib/cjs/anchor/variables.scss +1 -0
  17. package/lib/cjs/autoComplete/constants.js +1 -4
  18. package/lib/cjs/autoComplete/foundation.js +14 -33
  19. package/lib/cjs/autoComplete/optionFoundation.js +4 -9
  20. package/lib/cjs/avatar/constants.js +1 -4
  21. package/lib/cjs/avatar/foundation.js +4 -9
  22. package/lib/cjs/backtop/constants.js +1 -4
  23. package/lib/cjs/backtop/foundation.js +4 -9
  24. package/lib/cjs/badge/constants.js +1 -4
  25. package/lib/cjs/banner/constants.js +1 -4
  26. package/lib/cjs/banner/foundation.js +4 -9
  27. package/lib/cjs/base/constants.js +2 -6
  28. package/lib/cjs/base/env.js +1 -4
  29. package/lib/cjs/base/foundation.js +5 -10
  30. package/lib/cjs/base/index.js +3 -6
  31. package/lib/cjs/breadcrumb/constants.js +1 -4
  32. package/lib/cjs/breadcrumb/foundation.js +6 -13
  33. package/lib/cjs/breadcrumb/itemFoundation.js +4 -9
  34. package/lib/cjs/button/constants.js +1 -4
  35. package/lib/cjs/calendar/constants.js +1 -4
  36. package/lib/cjs/calendar/eventUtil.d.ts +3 -3
  37. package/lib/cjs/calendar/eventUtil.js +28 -53
  38. package/lib/cjs/calendar/foundation.js +63 -85
  39. package/lib/cjs/card/constants.js +1 -4
  40. package/lib/cjs/carousel/constants.js +1 -4
  41. package/lib/cjs/carousel/foundation.js +5 -12
  42. package/lib/cjs/cascader/constants.js +1 -4
  43. package/lib/cjs/cascader/foundation.js +55 -100
  44. package/lib/cjs/cascader/util.js +9 -30
  45. package/lib/cjs/checkbox/checkboxFoundation.js +6 -13
  46. package/lib/cjs/checkbox/checkboxGroupFoundation.js +9 -18
  47. package/lib/cjs/checkbox/constants.js +1 -4
  48. package/lib/cjs/collapse/constants.js +1 -4
  49. package/lib/cjs/collapse/foundation.js +9 -20
  50. package/lib/cjs/collapsible/constants.js +1 -4
  51. package/lib/cjs/datePicker/_utils/formatter.js +3 -12
  52. package/lib/cjs/datePicker/_utils/getDayOfWeek.js +1 -4
  53. package/lib/cjs/datePicker/_utils/getDefaultFormatToken.js +1 -4
  54. package/lib/cjs/datePicker/_utils/getDefaultPickerDate.js +5 -10
  55. package/lib/cjs/datePicker/_utils/getFullDateOffset.js +3 -6
  56. package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +2 -11
  57. package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +1 -4
  58. package/lib/cjs/datePicker/_utils/getMonthTable.js +2 -11
  59. package/lib/cjs/datePicker/_utils/getMonthsInYear.js +3 -16
  60. package/lib/cjs/datePicker/_utils/getYears.js +2 -9
  61. package/lib/cjs/datePicker/_utils/index.js +16 -30
  62. package/lib/cjs/datePicker/_utils/isAfter.js +3 -6
  63. package/lib/cjs/datePicker/_utils/isBefore.js +3 -6
  64. package/lib/cjs/datePicker/_utils/isBetween.js +3 -6
  65. package/lib/cjs/datePicker/_utils/isDate.js +1 -4
  66. package/lib/cjs/datePicker/_utils/isSameDay.js +3 -6
  67. package/lib/cjs/datePicker/_utils/isTimestamp.js +3 -6
  68. package/lib/cjs/datePicker/_utils/isUnixTimestamp.js +3 -6
  69. package/lib/cjs/datePicker/_utils/isValidDate.js +1 -4
  70. package/lib/cjs/datePicker/_utils/isWithinInterval.js +3 -6
  71. package/lib/cjs/datePicker/_utils/parser.js +1 -4
  72. package/lib/cjs/datePicker/constants.js +3 -10
  73. package/lib/cjs/datePicker/foundation.js +42 -85
  74. package/lib/cjs/datePicker/inputFoundation.js +7 -20
  75. package/lib/cjs/datePicker/monthFoundation.js +5 -12
  76. package/lib/cjs/datePicker/monthsGridFoundation.js +47 -68
  77. package/lib/cjs/datePicker/yearAndMonthFoundation.js +4 -9
  78. package/lib/cjs/descriptions/constants.js +1 -4
  79. package/lib/cjs/divider/constants.js +1 -4
  80. package/lib/cjs/dropdown/constants.js +1 -4
  81. package/lib/cjs/dropdown/foundation.js +7 -15
  82. package/lib/cjs/dropdown/menuFoundation.js +11 -31
  83. package/lib/cjs/empty/constants.js +1 -4
  84. package/lib/cjs/form/constants.js +1 -4
  85. package/lib/cjs/form/foundation.js +64 -104
  86. package/lib/cjs/form/interface.js +1 -3
  87. package/lib/cjs/form/utils.js +14 -29
  88. package/lib/cjs/grid/constants.js +1 -4
  89. package/lib/cjs/icons/constants.js +1 -4
  90. package/lib/cjs/input/constants.js +1 -4
  91. package/lib/cjs/input/foundation.js +7 -18
  92. package/lib/cjs/input/textareaFoundation.js +6 -13
  93. package/lib/cjs/input/util/calculateNodeHeight.js +3 -17
  94. package/lib/cjs/input/util/getSizingData.js +5 -10
  95. package/lib/cjs/inputNumber/constants.js +4 -11
  96. package/lib/cjs/inputNumber/foundation.js +11 -30
  97. package/lib/cjs/layout/constants.js +1 -4
  98. package/lib/cjs/list/constants.js +1 -4
  99. package/lib/cjs/modal/constants.js +1 -4
  100. package/lib/cjs/modal/modalContentFoundation.js +4 -9
  101. package/lib/cjs/modal/modalFoundation.js +4 -9
  102. package/lib/cjs/navigation/NavItem.js +6 -21
  103. package/lib/cjs/navigation/constants.js +1 -4
  104. package/lib/cjs/navigation/foundation.js +22 -37
  105. package/lib/cjs/navigation/itemFoundation.js +4 -9
  106. package/lib/cjs/navigation/subNavFoundation.js +10 -21
  107. package/lib/cjs/notification/constants.js +1 -4
  108. package/lib/cjs/notification/notificationFoundation.js +5 -12
  109. package/lib/cjs/notification/notificationListFoundation.js +4 -9
  110. package/lib/cjs/overflowList/constants.js +3 -10
  111. package/lib/cjs/overflowList/foundation.js +12 -29
  112. package/lib/cjs/pagination/constants.js +1 -4
  113. package/lib/cjs/pagination/foundation.js +18 -37
  114. package/lib/cjs/popconfirm/constants.js +1 -4
  115. package/lib/cjs/popconfirm/popconfirm.css +1 -7
  116. package/lib/cjs/popconfirm/popconfirm.scss +1 -11
  117. package/lib/cjs/popconfirm/popconfirmFoundation.js +3 -6
  118. package/lib/cjs/popover/constants.js +2 -9
  119. package/lib/cjs/progress/constants.js +1 -4
  120. package/lib/cjs/radio/constants.js +1 -4
  121. package/lib/cjs/radio/radioFoundation.js +3 -6
  122. package/lib/cjs/radio/radioGroupFoundation.js +6 -11
  123. package/lib/cjs/radio/radioInnerFoundation.js +5 -10
  124. package/lib/cjs/rating/constants.js +1 -4
  125. package/lib/cjs/rating/foundation.js +7 -20
  126. package/lib/cjs/scrollList/constants.js +1 -4
  127. package/lib/cjs/scrollList/foundation.js +3 -6
  128. package/lib/cjs/scrollList/itemFoundation.js +8 -21
  129. package/lib/cjs/scrollList/scrollTo.js +1 -4
  130. package/lib/cjs/select/constants.js +1 -4
  131. package/lib/cjs/select/foundation.js +56 -98
  132. package/lib/cjs/select/optionFoundation.js +4 -9
  133. package/lib/cjs/sideSheet/constants.js +1 -4
  134. package/lib/cjs/sideSheet/sideSheet.css +1 -0
  135. package/lib/cjs/sideSheet/sideSheet.scss +1 -0
  136. package/lib/cjs/sideSheet/sideSheetFoundation.js +6 -15
  137. package/lib/cjs/skeleton/constants.js +1 -4
  138. package/lib/cjs/slider/constants.js +1 -4
  139. package/lib/cjs/slider/foundation.js +32 -33
  140. package/lib/cjs/space/constants.js +1 -4
  141. package/lib/cjs/spin/constants.js +1 -4
  142. package/lib/cjs/spin/foundation.js +5 -12
  143. package/lib/cjs/steps/constants.js +1 -4
  144. package/lib/cjs/switch/constants.js +1 -4
  145. package/lib/cjs/switch/foundation.js +4 -9
  146. package/lib/cjs/table/bodyFoundation.js +9 -22
  147. package/lib/cjs/table/cellFoundation.js +3 -6
  148. package/lib/cjs/table/constants.js +1 -4
  149. package/lib/cjs/table/foundation.js +76 -117
  150. package/lib/cjs/table/mixin.scss +2 -2
  151. package/lib/cjs/table/rtl.scss +8 -8
  152. package/lib/cjs/table/table.scss +16 -16
  153. package/lib/cjs/table/tableRowFoundation.js +3 -6
  154. package/lib/cjs/table/tableSelectionCellFoundation.js +3 -6
  155. package/lib/cjs/table/utils.js +42 -71
  156. package/lib/cjs/table/variables.scss +0 -3
  157. package/lib/cjs/tabs/constants.js +1 -4
  158. package/lib/cjs/tabs/foundation.js +8 -23
  159. package/lib/cjs/tag/constants.js +1 -4
  160. package/lib/cjs/tagInput/constants.js +1 -4
  161. package/lib/cjs/tagInput/foundation.js +12 -31
  162. package/lib/cjs/tagInput/utils/getSplitedArray.js +3 -6
  163. package/lib/cjs/timePicker/ComboxFoundation.js +10 -29
  164. package/lib/cjs/timePicker/constants.js +1 -4
  165. package/lib/cjs/timePicker/foundation.js +26 -45
  166. package/lib/cjs/timePicker/inputFoundation.js +4 -9
  167. package/lib/cjs/timePicker/utils/index.js +7 -14
  168. package/lib/cjs/timePicker/utils/localeDate.js +2 -9
  169. package/lib/cjs/timeline/constants.js +1 -4
  170. package/lib/cjs/toast/constants.js +1 -4
  171. package/lib/cjs/toast/toastFoundation.js +5 -12
  172. package/lib/cjs/toast/toastListFoundation.js +5 -12
  173. package/lib/cjs/tooltip/constants.js +1 -4
  174. package/lib/cjs/tooltip/foundation.js +29 -56
  175. package/lib/cjs/transfer/constants.js +1 -4
  176. package/lib/cjs/transfer/foundation.js +24 -47
  177. package/lib/cjs/transfer/transferUtils.js +16 -45
  178. package/lib/cjs/tree/constants.js +1 -4
  179. package/lib/cjs/tree/foundation.js +41 -76
  180. package/lib/cjs/tree/tree.css +3 -0
  181. package/lib/cjs/tree/tree.scss +4 -0
  182. package/lib/cjs/tree/treeUtil.d.ts +1 -1
  183. package/lib/cjs/tree/treeUtil.js +60 -107
  184. package/lib/cjs/treeSelect/constants.js +1 -4
  185. package/lib/cjs/treeSelect/foundation.js +49 -82
  186. package/lib/cjs/typography/constants.js +1 -4
  187. package/lib/cjs/upload/constants.d.ts +1 -1
  188. package/lib/cjs/upload/constants.js +1 -4
  189. package/lib/cjs/upload/foundation.js +56 -112
  190. package/lib/cjs/upload/utils.js +13 -32
  191. package/lib/cjs/utils/Event.js +9 -23
  192. package/lib/cjs/utils/FocusHandle.js +6 -15
  193. package/lib/cjs/utils/Logger.js +1 -4
  194. package/lib/cjs/utils/Store.js +5 -20
  195. package/lib/cjs/utils/a11y.js +8 -13
  196. package/lib/cjs/utils/array.js +6 -15
  197. package/lib/cjs/utils/arrayMove.js +3 -12
  198. package/lib/cjs/utils/classnames.js +6 -15
  199. package/lib/cjs/utils/date-fns-extra.js +7 -18
  200. package/lib/cjs/utils/dom.js +5 -12
  201. package/lib/cjs/utils/function.js +1 -4
  202. package/lib/cjs/utils/getDataAttr.js +2 -13
  203. package/lib/cjs/utils/getHighlight.js +7 -22
  204. package/lib/cjs/utils/getMotionObjFromProps.js +4 -9
  205. package/lib/cjs/utils/index.js +5 -15
  206. package/lib/cjs/utils/isBothNaN.js +1 -4
  207. package/lib/cjs/utils/isElement.js +1 -4
  208. package/lib/cjs/utils/isEnterPress.js +3 -6
  209. package/lib/cjs/utils/isEscPress.js +3 -6
  210. package/lib/cjs/utils/isNullOrUndefined.js +1 -4
  211. package/lib/cjs/utils/isNumber.js +1 -4
  212. package/lib/cjs/utils/isObject.js +1 -4
  213. package/lib/cjs/utils/isPromise.js +3 -6
  214. package/lib/cjs/utils/isString.js +1 -4
  215. package/lib/cjs/utils/keyCode.js +1 -4
  216. package/lib/cjs/utils/log.js +3 -6
  217. package/lib/cjs/utils/number.js +1 -4
  218. package/lib/cjs/utils/object.js +10 -27
  219. package/lib/cjs/utils/set.js +4 -9
  220. package/lib/cjs/utils/shallowEqualObjects.js +3 -10
  221. package/lib/cjs/utils/touchPolyfill.js +5 -12
  222. package/lib/cjs/utils/type.js +1 -3
  223. package/lib/cjs/utils/uuid.js +3 -14
  224. package/lib/cjs/utils/warning.js +1 -4
  225. package/lib/es/anchor/anchor.css +1 -10
  226. package/lib/es/anchor/anchor.scss +1 -8
  227. package/lib/es/anchor/foundation.js +2 -4
  228. package/lib/es/anchor/linkFoundation.js +1 -2
  229. package/lib/es/anchor/rtl.scss +0 -1
  230. package/lib/es/anchor/variables.scss +1 -0
  231. package/lib/es/autoComplete/foundation.js +11 -26
  232. package/lib/es/autoComplete/optionFoundation.js +1 -2
  233. package/lib/es/avatar/foundation.js +1 -2
  234. package/lib/es/backtop/foundation.js +1 -2
  235. package/lib/es/banner/foundation.js +1 -2
  236. package/lib/es/base/foundation.js +2 -3
  237. package/lib/es/breadcrumb/foundation.js +3 -6
  238. package/lib/es/breadcrumb/itemFoundation.js +1 -2
  239. package/lib/es/calendar/eventUtil.d.ts +3 -3
  240. package/lib/es/calendar/eventUtil.js +27 -56
  241. package/lib/es/calendar/foundation.js +60 -90
  242. package/lib/es/carousel/foundation.js +2 -4
  243. package/lib/es/cascader/foundation.js +49 -94
  244. package/lib/es/cascader/util.js +6 -21
  245. package/lib/es/checkbox/checkboxFoundation.js +3 -6
  246. package/lib/es/checkbox/checkboxGroupFoundation.js +6 -9
  247. package/lib/es/collapse/foundation.js +6 -10
  248. package/lib/es/datePicker/_utils/formatter.js +2 -5
  249. package/lib/es/datePicker/_utils/getDefaultPickerDate.js +2 -3
  250. package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -4
  251. package/lib/es/datePicker/_utils/getMonthTable.js +1 -5
  252. package/lib/es/datePicker/_utils/getMonthsInYear.js +2 -9
  253. package/lib/es/datePicker/_utils/getYears.js +1 -3
  254. package/lib/es/datePicker/constants.js +2 -7
  255. package/lib/es/datePicker/foundation.js +39 -70
  256. package/lib/es/datePicker/inputFoundation.js +4 -11
  257. package/lib/es/datePicker/monthFoundation.js +2 -4
  258. package/lib/es/datePicker/monthsGridFoundation.js +40 -55
  259. package/lib/es/datePicker/yearAndMonthFoundation.js +1 -2
  260. package/lib/es/dropdown/foundation.js +4 -7
  261. package/lib/es/dropdown/menuFoundation.js +8 -21
  262. package/lib/es/form/foundation.js +59 -91
  263. package/lib/es/form/utils.js +11 -19
  264. package/lib/es/input/foundation.js +4 -9
  265. package/lib/es/input/textareaFoundation.js +3 -5
  266. package/lib/es/input/util/calculateNodeHeight.js +2 -10
  267. package/lib/es/input/util/getSizingData.js +2 -5
  268. package/lib/es/inputNumber/constants.js +3 -8
  269. package/lib/es/inputNumber/foundation.js +8 -18
  270. package/lib/es/modal/modalContentFoundation.js +1 -2
  271. package/lib/es/modal/modalFoundation.js +1 -2
  272. package/lib/es/navigation/NavItem.js +5 -11
  273. package/lib/es/navigation/foundation.js +19 -25
  274. package/lib/es/navigation/itemFoundation.js +1 -3
  275. package/lib/es/navigation/subNavFoundation.js +7 -13
  276. package/lib/es/notification/notificationFoundation.js +2 -4
  277. package/lib/es/notification/notificationListFoundation.js +1 -3
  278. package/lib/es/overflowList/constants.js +2 -3
  279. package/lib/es/overflowList/foundation.js +9 -23
  280. package/lib/es/pagination/foundation.js +15 -28
  281. package/lib/es/popconfirm/popconfirm.css +1 -7
  282. package/lib/es/popconfirm/popconfirm.scss +1 -11
  283. package/lib/es/popover/constants.js +1 -2
  284. package/lib/es/radio/radioGroupFoundation.js +3 -4
  285. package/lib/es/radio/radioInnerFoundation.js +2 -3
  286. package/lib/es/rating/foundation.js +4 -13
  287. package/lib/es/scrollList/itemFoundation.js +5 -13
  288. package/lib/es/select/foundation.js +50 -88
  289. package/lib/es/select/optionFoundation.js +1 -2
  290. package/lib/es/sideSheet/sideSheet.css +1 -0
  291. package/lib/es/sideSheet/sideSheet.scss +1 -0
  292. package/lib/es/sideSheet/sideSheetFoundation.js +3 -7
  293. package/lib/es/slider/foundation.js +29 -25
  294. package/lib/es/spin/foundation.js +2 -4
  295. package/lib/es/switch/foundation.js +1 -2
  296. package/lib/es/table/bodyFoundation.js +6 -11
  297. package/lib/es/table/foundation.js +67 -93
  298. package/lib/es/table/mixin.scss +2 -2
  299. package/lib/es/table/rtl.scss +8 -8
  300. package/lib/es/table/table.scss +16 -16
  301. package/lib/es/table/utils.js +33 -51
  302. package/lib/es/table/variables.scss +0 -3
  303. package/lib/es/tabs/foundation.js +5 -18
  304. package/lib/es/tagInput/foundation.js +9 -21
  305. package/lib/es/timePicker/ComboxFoundation.js +7 -16
  306. package/lib/es/timePicker/foundation.js +23 -37
  307. package/lib/es/timePicker/inputFoundation.js +1 -2
  308. package/lib/es/timePicker/utils/index.js +4 -6
  309. package/lib/es/timePicker/utils/localeDate.js +1 -2
  310. package/lib/es/toast/toastFoundation.js +2 -4
  311. package/lib/es/toast/toastListFoundation.js +2 -4
  312. package/lib/es/tooltip/foundation.js +26 -46
  313. package/lib/es/transfer/foundation.js +21 -43
  314. package/lib/es/transfer/transferUtils.js +13 -33
  315. package/lib/es/tree/foundation.js +38 -70
  316. package/lib/es/tree/tree.css +3 -0
  317. package/lib/es/tree/tree.scss +4 -0
  318. package/lib/es/tree/treeUtil.d.ts +1 -1
  319. package/lib/es/tree/treeUtil.js +57 -109
  320. package/lib/es/treeSelect/foundation.js +45 -73
  321. package/lib/es/upload/constants.d.ts +1 -1
  322. package/lib/es/upload/foundation.js +52 -118
  323. package/lib/es/upload/utils.js +12 -25
  324. package/lib/es/utils/Event.js +5 -12
  325. package/lib/es/utils/FocusHandle.js +3 -7
  326. package/lib/es/utils/Store.js +4 -12
  327. package/lib/es/utils/a11y.js +5 -6
  328. package/lib/es/utils/array.js +3 -5
  329. package/lib/es/utils/arrayMove.js +2 -6
  330. package/lib/es/utils/classnames.js +3 -6
  331. package/lib/es/utils/date-fns-extra.js +6 -14
  332. package/lib/es/utils/dom.js +1 -2
  333. package/lib/es/utils/getDataAttr.js +1 -5
  334. package/lib/es/utils/getHighlight.js +4 -14
  335. package/lib/es/utils/getMotionObjFromProps.js +1 -2
  336. package/lib/es/utils/object.js +7 -15
  337. package/lib/es/utils/set.js +1 -2
  338. package/lib/es/utils/shallowEqualObjects.js +2 -5
  339. package/lib/es/utils/touchPolyfill.js +2 -6
  340. package/lib/es/utils/uuid.js +2 -7
  341. package/package.json +2 -4
  342. package/popconfirm/popconfirm.scss +1 -11
  343. package/select/foundation.ts +2 -2
  344. package/sideSheet/sideSheet.scss +1 -0
  345. package/slider/foundation.ts +15 -8
  346. package/table/mixin.scss +2 -2
  347. package/table/rtl.scss +8 -8
  348. package/table/table.scss +16 -16
  349. package/table/variables.scss +0 -3
  350. package/tree/tree.scss +4 -0
@@ -1,11 +1,7 @@
1
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
2
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
3
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
4
-
5
1
  /* istanbul ignore next */
6
2
  class Store {
7
3
  constructor(initialState) {
8
- this._state = _Object$assign({}, initialState);
4
+ this._state = Object.assign({}, initialState);
9
5
  this._listeners = [];
10
6
  }
11
7
 
@@ -13,14 +9,10 @@ class Store {
13
9
  this._listeners.push(listener);
14
10
 
15
11
  const unsubscribe = () => {
16
- var _context;
17
-
18
- const index = _indexOfInstanceProperty(_context = this._listeners).call(_context, listener);
12
+ const index = this._listeners.indexOf(listener);
19
13
 
20
14
  if (index > -1) {
21
- var _context2;
22
-
23
- _spliceInstanceProperty(_context2 = this._listeners).call(_context2, index, 1);
15
+ this._listeners.splice(index, 1);
24
16
  }
25
17
  };
26
18
 
@@ -28,7 +20,7 @@ class Store {
28
20
  }
29
21
 
30
22
  setState(state) {
31
- _Object$assign(this._state, _Object$assign({}, state));
23
+ Object.assign(this._state, Object.assign({}, state));
32
24
 
33
25
  for (const listener of this._listeners) {
34
26
  if (typeof listener === 'function') {
@@ -1,5 +1,4 @@
1
1
  import _get from "lodash/get";
2
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
3
2
  export function handlePrevent(event) {
4
3
  event.stopPropagation();
5
4
  event.preventDefault();
@@ -34,7 +33,7 @@ export function setFocusToPreviousMenuItem(itemNodes, currentItem) {
34
33
  if (currentItem === itemNodes[0]) {
35
34
  newMenuItem = itemNodes[itemNodes.length - 1];
36
35
  } else {
37
- index = _indexOfInstanceProperty(itemNodes).call(itemNodes, currentItem);
36
+ index = itemNodes.indexOf(currentItem);
38
37
  newMenuItem = itemNodes[index - 1];
39
38
  }
40
39
 
@@ -49,7 +48,7 @@ export function setFocusToNextMenuitem(itemNodes, currentItem) {
49
48
  if (currentItem === itemNodes[itemNodes.length - 1]) {
50
49
  newMenuItem = itemNodes[0];
51
50
  } else {
52
- index = _indexOfInstanceProperty(itemNodes).call(itemNodes, currentItem);
51
+ index = itemNodes.indexOf(currentItem);
53
52
  newMenuItem = itemNodes[index + 1];
54
53
  }
55
54
 
@@ -65,17 +64,17 @@ export function findIndexByCharacter(itemList, curItem, firstCharList, char) {
65
64
 
66
65
  char = char.toLowerCase(); // Get start index for search based on position of currentItem
67
66
 
68
- start = _indexOfInstanceProperty(itemList).call(itemList, curItem) + 1;
67
+ start = itemList.indexOf(curItem) + 1;
69
68
 
70
69
  if (start >= itemList.length) {
71
70
  start = 0;
72
71
  } // Check remaining menu items in the menu
73
72
 
74
73
 
75
- index = _indexOfInstanceProperty(firstCharList).call(firstCharList, char, start); // If not found in remaining menu items, check from beginning
74
+ index = firstCharList.indexOf(char, start); // If not found in remaining menu items, check from beginning
76
75
 
77
76
  if (index === -1) {
78
- index = _indexOfInstanceProperty(firstCharList).call(firstCharList, char, 0);
77
+ index = firstCharList.indexOf(char, 0);
79
78
  }
80
79
 
81
80
  return index >= 0 ? index : -1;
@@ -1,5 +1,3 @@
1
- import _Set from "@babel/runtime-corejs3/core-js-stable/set";
2
- import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
3
1
  import { pullAll as setPullAll } from './set';
4
2
  /**
5
3
  * arrayA remove arrayB
@@ -16,10 +14,10 @@ import { pullAll as setPullAll } from './set';
16
14
 
17
15
  export function pullAll(arrayA, arrayB) {
18
16
  if (arrayA !== null && arrayA.length && arrayB !== null && arrayB.length) {
19
- const setA = new _Set(arrayA);
20
- const setB = new _Set(arrayB);
17
+ const setA = new Set(arrayA);
18
+ const setB = new Set(arrayB);
21
19
  const resultSet = setPullAll(setA, setB);
22
- return _Array$from(resultSet);
20
+ return Array.from(resultSet);
23
21
  }
24
22
 
25
23
  return arrayA;
@@ -1,9 +1,5 @@
1
- import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
2
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
3
1
  export default function arrayMove(array, from, to) {
4
- const newArray = _sliceInstanceProperty(array).call(array);
5
-
6
- _spliceInstanceProperty(newArray).call(newArray, to < 0 ? newArray.length + to : to, 0, _spliceInstanceProperty(newArray).call(newArray, from, 1)[0]);
7
-
2
+ const newArray = array.slice();
3
+ newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);
8
4
  return newArray;
9
5
  }
@@ -1,9 +1,6 @@
1
1
  import _map from "lodash/map";
2
2
  import _filter from "lodash/filter";
3
3
  import _split from "lodash/split";
4
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
5
- import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/index-of";
6
- import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
7
4
  import classnames from 'classnames';
8
5
 
9
6
  function addClass(rawCls) {
@@ -13,7 +10,7 @@ function addClass(rawCls) {
13
10
  srcClss[_key - 1] = arguments[_key];
14
11
  }
15
12
 
16
- const validClss = _filter(srcClss, cls => !_includesInstanceProperty(clss).call(clss, cls));
13
+ const validClss = _filter(srcClss, cls => !clss.includes(cls));
17
14
 
18
15
  return classnames(rawCls, ...validClss);
19
16
  }
@@ -26,10 +23,10 @@ function removeClass(rawCls) {
26
23
  }
27
24
 
28
25
  _map(srcClss, cls => {
29
- const index = _indexOfInstanceProperty(clss).call(clss, cls);
26
+ const index = clss.indexOf(cls);
30
27
 
31
28
  if (index > -1) {
32
- _spliceInstanceProperty(clss).call(clss, index, 1);
29
+ clss.splice(index, 1);
33
30
  }
34
31
  });
35
32
 
@@ -1,7 +1,3 @@
1
- import _parseInt from "@babel/runtime-corejs3/core-js-stable/parse-int";
2
- import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
3
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
4
-
5
1
  /* eslint-disable max-len */
6
2
 
7
3
  /* eslint-disable eqeqeq */
@@ -29,19 +25,15 @@ export const toIANA = tz => {
29
25
  return tz;
30
26
  }
31
27
 
32
- const symbol = _parseInt(matches[1] + 1, 10); // => -1 or 1
33
-
34
-
35
- const hourOffset = _parseInt(matches[2], 10);
36
-
37
- const minuteOffset = _parseInt(matches[3], 10);
28
+ const symbol = parseInt(matches[1] + 1, 10); // => -1 or 1
38
29
 
30
+ const hourOffset = parseInt(matches[2], 10);
31
+ const minuteOffset = parseInt(matches[3], 10);
39
32
  tz = symbol * (hourOffset + minuteOffset / 60);
40
33
  }
41
34
 
42
35
  if (typeof tz === 'number') {
43
- const found = _findInstanceProperty(IANAOffsetMap).call(IANAOffsetMap, item => item[0] === tz);
44
-
36
+ const found = IANAOffsetMap.find(item => item[0] === tz);
45
37
  return found && found[1][0];
46
38
  }
47
39
  };
@@ -63,7 +55,7 @@ const parse = (date, formatToken, options) => {
63
55
 
64
56
  if (options && options.timeZone != null && options.timeZone !== '') {
65
57
  const timeZone = toIANA(options.timeZone);
66
- options = _Object$assign(_Object$assign({}, options), {
58
+ options = Object.assign(Object.assign({}, options), {
67
59
  timeZone
68
60
  });
69
61
  }
@@ -84,7 +76,7 @@ const parse = (date, formatToken, options) => {
84
76
  const format = (date, formatToken, options) => {
85
77
  if (options && options.timeZone != null && options.timeZone !== '') {
86
78
  const timeZone = toIANA(options.timeZone);
87
- options = _Object$assign(_Object$assign({}, options), {
79
+ options = Object.assign(Object.assign({}, options), {
88
80
  timeZone
89
81
  });
90
82
  date = dateFnsUtcToZonedTime(date, timeZone, options);
@@ -1,4 +1,3 @@
1
- import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
2
1
  import isHTMLElement from './isElement';
3
2
  /**
4
3
  *
@@ -56,7 +55,7 @@ export function convertDOMRectToObject(domRect) {
56
55
  return domRect.toJSON();
57
56
  } else {
58
57
  const keys = ['left', 'top', 'right', 'bottom', 'width', 'height'];
59
- return _reduceInstanceProperty(keys).call(keys, (obj, key) => {
58
+ return keys.reduce((obj, key) => {
60
59
  obj[key] = domRect[key];
61
60
  return obj;
62
61
  }, {});
@@ -1,9 +1,5 @@
1
- import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
2
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
3
1
  export default function getDataAttr(props) {
4
- var _context;
5
-
6
- return _reduceInstanceProperty(_context = _Object$keys(props)).call(_context, (prev, key) => {
2
+ return Object.keys(props).reduce((prev, key) => {
7
3
  if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
8
4
  prev[key] = props[key];
9
5
  }
@@ -1,8 +1,4 @@
1
1
  import _isString from "lodash/isString";
2
- import _reduceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/reduce";
3
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
- import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
5
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
2
 
7
3
  const escapeRegExpFn = string => string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
8
4
  /**
@@ -13,16 +9,14 @@ const escapeRegExpFn = string => string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$
13
9
 
14
10
 
15
11
  const findChunks = _ref => {
16
- var _context;
17
-
18
12
  let {
19
13
  autoEscape,
20
14
  caseSensitive,
21
15
  searchWords,
22
16
  sourceString
23
17
  } = _ref;
24
- return _reduceInstanceProperty(_context = _filterInstanceProperty(searchWords).call(searchWords, searchWord => searchWord) // Remove empty words
25
- ).call(_context, (chunks, searchWord) => {
18
+ return searchWords.filter(searchWord => searchWord) // Remove empty words
19
+ .reduce((chunks, searchWord) => {
26
20
  if (autoEscape) {
27
21
  searchWord = escapeRegExpFn(searchWord);
28
22
  }
@@ -59,12 +53,10 @@ const findChunks = _ref => {
59
53
 
60
54
 
61
55
  const combineChunks = _ref2 => {
62
- var _context2;
63
-
64
56
  let {
65
57
  chunks
66
58
  } = _ref2;
67
- chunks = _reduceInstanceProperty(_context2 = _sortInstanceProperty(chunks).call(chunks, (first, second) => first.start - second.start)).call(_context2, (processedChunks, nextChunk) => {
59
+ chunks = chunks.sort((first, second) => first.start - second.start).reduce((processedChunks, nextChunk) => {
68
60
  // First chunk just goes straight in the array...
69
61
  if (processedChunks.length === 0) {
70
62
  return [nextChunk];
@@ -120,13 +112,11 @@ const fillInChunks = _ref3 => {
120
112
  append(0, totalLength, false);
121
113
  } else {
122
114
  let lastIndex = 0;
123
-
124
- _forEachInstanceProperty(chunksToHighlight).call(chunksToHighlight, chunk => {
115
+ chunksToHighlight.forEach(chunk => {
125
116
  append(lastIndex, chunk.start, false);
126
117
  append(chunk.start, chunk.end, true);
127
118
  lastIndex = chunk.end;
128
119
  });
129
-
130
120
  append(lastIndex, totalLength, false);
131
121
  }
132
122
 
@@ -1,6 +1,5 @@
1
1
  import _isObject from "lodash/isObject";
2
2
  import _cloneDeep from "lodash/cloneDeep";
3
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
4
3
  import warning from './warning';
5
4
  /**
6
5
  * get motion object from props
@@ -30,7 +29,7 @@ export default function getMotionObjFromProps(props) {
30
29
  if (_isObject(motionProp)) {
31
30
  motion = _cloneDeep(motionProp);
32
31
 
33
- for (const key of _Object$keys(motionProp)) {
32
+ for (const key of Object.keys(motionProp)) {
34
33
  const handler = motionProp[key];
35
34
 
36
35
  if (typeof handler === 'function') {
@@ -6,19 +6,13 @@ import _toPath from "lodash/toPath";
6
6
  import _has from "lodash/has";
7
7
  import _set from "lodash/set";
8
8
  import _get from "lodash/get";
9
- import _Number$isInteger from "@babel/runtime-corejs3/core-js-stable/number/is-integer";
10
- import _everyInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/every";
11
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
12
- import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
13
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
14
- import _Object$entries from "@babel/runtime-corejs3/core-js-stable/object/entries";
15
9
 
16
10
  const pathToArrayElem = path => {
17
11
  const pathArray = _toPath(path); // internal-issues:673
18
12
 
19
13
 
20
14
  const justNumber = _isNumber(path) && pathArray.length === 1;
21
- return justNumber ? false : _Number$isInteger(+pathArray[pathArray.length - 1]);
15
+ return justNumber ? false : Number.isInteger(+pathArray[pathArray.length - 1]);
22
16
  };
23
17
 
24
18
  function isEmptyObject(target) {
@@ -44,7 +38,7 @@ function isEmptyObject(target) {
44
38
  if (!valuesOfTarget.length) {
45
39
  return true; // like target: {}
46
40
  } else {
47
- return _everyInstanceProperty(valuesOfTarget).call(valuesOfTarget, item => typeof item === 'undefined');
41
+ return valuesOfTarget.every(item => typeof item === 'undefined');
48
42
  }
49
43
  }
50
44
  }
@@ -67,14 +61,14 @@ function cleanup(obj, path) {
67
61
  // eslint-disable-next-line
68
62
 
69
63
 
70
- if (_Array$isArray(target) && _everyInstanceProperty(target).call(target, e => e == null)) {
64
+ if (Array.isArray(target) && target.every(e => e == null)) {
71
65
  _unset(obj, path);
72
66
  } else if (isEmptyObject(target)) {
73
67
  _unset(obj, path);
74
68
  } // Recur
75
69
 
76
70
 
77
- cleanup(obj, _sliceInstanceProperty(path).call(path, 0, path.length - 1), pull);
71
+ cleanup(obj, path.slice(0, path.length - 1), pull);
78
72
  }
79
73
 
80
74
  export function empty(object) {
@@ -90,7 +84,7 @@ export function remove(object, path) {
90
84
 
91
85
  let pathArray = _toPath(path);
92
86
 
93
- pathArray = _sliceInstanceProperty(pathArray).call(pathArray, 0, pathArray.length - 1);
87
+ pathArray = pathArray.slice(0, pathArray.length - 1);
94
88
  cleanup(object, pathArray, false);
95
89
  }
96
90
  export function set(object, path, value, allowEmpty) {
@@ -108,7 +102,7 @@ export function set(object, path, value, allowEmpty) {
108
102
 
109
103
  let pathArray = _toPath(path);
110
104
 
111
- pathArray = _sliceInstanceProperty(pathArray).call(pathArray, 0, pathArray.length - 1);
105
+ pathArray = pathArray.slice(0, pathArray.length - 1);
112
106
  cleanup(object, pathArray, false);
113
107
  } else if (!pathToArrayElem(path) && get(object, path) !== undefined) {
114
108
  // Only delete the field if it needs to be deleted and its not a path to an array ( array leaf )
@@ -134,9 +128,7 @@ export function has(object, path) {
134
128
 
135
129
  export function forwardStatics(obj, srcObj) {
136
130
  if (obj && (typeof obj === 'function' || typeof obj === 'object') && srcObj && (typeof srcObj === 'function' || typeof srcObj === 'object')) {
137
- var _context;
138
-
139
- _forEachInstanceProperty(_context = _Object$entries(srcObj)).call(_context, _ref => {
131
+ Object.entries(srcObj).forEach(_ref => {
140
132
  let [key, value] = _ref;
141
133
  obj[key] = value;
142
134
  });
@@ -1,9 +1,8 @@
1
1
  import _isSet from "lodash/isSet";
2
- import _Set from "@babel/runtime-corejs3/core-js-stable/set";
3
2
 
4
3
  /* istanbul ignore next */
5
4
  export function copySet(setA) {
6
- return new _Set(setA);
5
+ return new Set(setA);
7
6
  }
8
7
  /**
9
8
  * Set deduplicate
@@ -1,4 +1,3 @@
1
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
1
  export default function shallowEqualObjects(objA, objB) {
3
2
  if (objA === objB) {
4
3
  return true;
@@ -8,10 +7,8 @@ export default function shallowEqualObjects(objA, objB) {
8
7
  return false;
9
8
  }
10
9
 
11
- const aKeys = _Object$keys(objA);
12
-
13
- const bKeys = _Object$keys(objB);
14
-
10
+ const aKeys = Object.keys(objA);
11
+ const bKeys = Object.keys(objB);
15
12
  const len = aKeys.length;
16
13
 
17
14
  if (bKeys.length !== len) {
@@ -1,18 +1,15 @@
1
- import _globalThis from "@babel/runtime-corejs3/core-js/global-this";
2
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
3
1
  import warning from './warning';
4
2
 
5
3
  const touchEventPolyfill = (touch, touchEvent) => {
6
4
  /* Touch is the first point of multi-touch. In order to minimize the change of slider code to support touch,
7
5
  some methods that will be used on touchEvent are mounted on the multi-touch Touch object.*/
8
6
  // polyfill for firefox
9
- if (!_globalThis.Touch || !(touch instanceof Touch)) {
7
+ if (!globalThis.Touch || !(touch instanceof Touch)) {
10
8
  return touch;
11
9
  }
12
10
 
13
11
  const keysNeedPolyfill = ['stopPropagation', 'preventDefault'];
14
-
15
- _forEachInstanceProperty(keysNeedPolyfill).call(keysNeedPolyfill, key => {
12
+ keysNeedPolyfill.forEach(key => {
16
13
  let value = touchEvent[key];
17
14
 
18
15
  if (value) {
@@ -30,7 +27,6 @@ const touchEventPolyfill = (touch, touchEvent) => {
30
27
  }
31
28
  }
32
29
  });
33
-
34
30
  return touch;
35
31
  };
36
32
 
@@ -1,8 +1,5 @@
1
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
2
1
  export default function getUuid(prefix) {
3
- var _context, _context2;
4
-
5
- return _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "".concat(prefix, "-")).call(_context2, new Date().getTime(), "-")).call(_context, Math.random());
2
+ return "".concat(prefix, "-").concat(new Date().getTime(), "-").concat(Math.random());
6
3
  } // https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
7
4
 
8
5
  function getUuidv4() {
@@ -25,8 +22,6 @@ function getUuidv4() {
25
22
 
26
23
 
27
24
  function getUuidShort() {
28
- var _context3;
29
-
30
25
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
31
26
  const {
32
27
  prefix = '',
@@ -41,7 +36,7 @@ function getUuidShort() {
41
36
  randomId += characters.charAt(random);
42
37
  }
43
38
 
44
- return prefix ? _concatInstanceProperty(_context3 = "".concat(prefix, "-")).call(_context3, randomId) : randomId;
39
+ return prefix ? "".concat(prefix, "-").concat(randomId) : randomId;
45
40
  }
46
41
 
47
42
  export { getUuid, getUuidv4, getUuidShort };
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.19.0-alpha.8",
3
+ "version": "2.19.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@babel/runtime-corejs3": "^7.15.4",
11
10
  "@douyinfe/semi-animation": "2.12.0",
12
11
  "async-validator": "^3.5.0",
13
12
  "classnames": "^2.2.6",
@@ -24,9 +23,8 @@
24
23
  "*.scss",
25
24
  "*.css"
26
25
  ],
27
- "gitHead": "fef0097c01c675980e383efb45f182a2a4f2a507",
26
+ "gitHead": "c0ef56c31a5c13adb050fbdb611e51da881f0cb8",
28
27
  "devDependencies": {
29
- "@babel/plugin-proposal-decorators": "^7.15.8",
30
28
  "@babel/plugin-transform-runtime": "^7.15.8",
31
29
  "@babel/preset-env": "^7.15.8",
32
30
  "@types/lodash": "^4.14.176",
@@ -51,20 +51,10 @@ $module: #{$prefix}-popconfirm;
51
51
  display: inline-flex;
52
52
  flex-direction: column;
53
53
  }
54
-
55
- &-content {
56
- color: $color-popconfirm_body-text;
57
-
58
- & > p {
59
- margin: $spacing-popconfirm_header_content_p-margin;
60
- padding: $spacing-popconfirm_header_content_p-padding;
61
- }
62
- }
63
54
  }
64
55
 
65
56
  &-body {
66
- // margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
67
- // margin-top: 8px;
57
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
68
58
 
69
59
  color: $color-popconfirm_body-text;
70
60
 
@@ -1025,8 +1025,8 @@ export default class SelectFoundation extends BaseFoundation<SelectAdapter> {
1025
1025
  const { filter, autoFocus } = this.getProps();
1026
1026
  const { isOpen, isFocus } = this.getStates();
1027
1027
  // Under normal circumstances, blur will be accompanied by clickOutsideHandler, so the notify of blur can be called uniformly in clickOutsideHandler
1028
- // But when autoFocus, because clickOutsideHandler is not register, you need to listen for the trigger's blur and trigger the notify callback
1029
- if (autoFocus && isFocus && !isOpen) {
1028
+ // But when autoFocus or the panel is close, because clickOutsideHandler is not register or unregister, you need to listen for the trigger's blur and trigger the notify callback
1029
+ if (isFocus && !isOpen) {
1030
1030
  this._notifyBlur(e);
1031
1031
  }
1032
1032
  }
@@ -100,6 +100,7 @@ $module: #{$prefix}-sidesheet;
100
100
  &-body {
101
101
  padding: $spacing-sideSheet_body-paddingY $spacing-sideSheet_body-paddingX;
102
102
  flex: 1;
103
+ overflow: auto;
103
104
  }
104
105
 
105
106
  &-content {
@@ -386,15 +386,22 @@ export default class SliderFoundation extends BaseFoundation<SliderAdapter> {
386
386
  * @memberof SliderFoundation
387
387
  */
388
388
  outPutValue = (inputValue: SliderProps['value']) => {
389
+ const checkHowManyDecimals = (num:number)=>{
390
+ const reg = /^\d+(\.\d+)?$/;
391
+ if (reg.test(String(num))){
392
+ return num.toString().split('.')[1]?.length ?? 0;
393
+ }
394
+ return 0;
395
+ };
389
396
  const step = this._adapter.getProp('step');
390
- let transWay = Math.round;
391
- if (step < 1 && step >= 0.1) {
392
- transWay = value => Math.round(value * 10) / 10;
393
- } else if (step < 0.1 && step >= 0.01) {
394
- transWay = value => Math.round(value * 100) / 100;
395
- } else if (step < 0.01 && step >= 0.001) {
396
- transWay = value => Math.round(value * 1000) / 1000;
397
- }
397
+ const transWay = (()=>{
398
+ const decimals = checkHowManyDecimals(step);
399
+ const multipler = Math.pow(10, decimals);
400
+ return (value: number)=>{
401
+ return Math.round(value * multipler) / multipler;
402
+ };
403
+ })();
404
+
398
405
  if (Array.isArray(inputValue)) {
399
406
  return [transWay(inputValue[0]), transWay(inputValue[1])];
400
407
  } else {
package/table/mixin.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  @mixin genResizing() {
2
- border-right: $border-table_resizer;
2
+ border-right: $width-table_resizer_border solid $color-table_resizer-bg-default;
3
3
 
4
4
  .react-resizable-handle {
5
5
 
@@ -7,4 +7,4 @@
7
7
  background-color: unset;
8
8
  }
9
9
  }
10
- }
10
+ }
package/table/rtl.scss CHANGED
@@ -19,7 +19,7 @@ $module: #{$prefix}-table;
19
19
 
20
20
  &.resizing {
21
21
  // rtl override mixin
22
- border-left: $border-table_resizer;
22
+ border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
23
23
  }
24
24
  }
25
25
 
@@ -28,7 +28,7 @@ $module: #{$prefix}-table;
28
28
  border-right: 1px solid $color-table_shadow-border-default;
29
29
 
30
30
  &.resizing {
31
- border-left: $border-table_resizer;
31
+ border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
32
32
  }
33
33
 
34
34
  &[x-type="column-scrollbar"] {
@@ -40,7 +40,7 @@ $module: #{$prefix}-table;
40
40
  }
41
41
 
42
42
  .resizing {
43
- border-left: $border-table_resizer;
43
+ border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
44
44
  }
45
45
 
46
46
  .react-resizable-handle {
@@ -57,7 +57,7 @@ $module: #{$prefix}-table;
57
57
 
58
58
  &.resizing {
59
59
  border-right: 0;
60
- border-left: $border-table_resizer;
60
+ border-left: $width-table_resizer_border solid $color-table_resizer-bg-default;
61
61
  }
62
62
  }
63
63
 
@@ -112,17 +112,17 @@ $module: #{$prefix}-table;
112
112
  &-bordered {
113
113
  .#{$module}-container {
114
114
  border-left: 0;
115
- border-right: $border-table;
115
+ border-right: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
116
116
  }
117
117
 
118
118
  .#{$module}-thead > .#{$module}-row > .#{$module}-row-head,
119
119
  .#{$module}-tbody > .#{$module}-row > .#{$module}-row-cell {
120
120
  border-right: 0;
121
- border-left: $border-table;
121
+ border-left: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
122
122
  }
123
123
 
124
124
  .#{$module}-placeholder {
125
- border-left: $border-table;
125
+ border-left: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
126
126
  border-right: 0;
127
127
  }
128
128
 
@@ -130,7 +130,7 @@ $module: #{$prefix}-table;
130
130
 
131
131
  &::-webkit-scrollbar {
132
132
  border-right: 0;
133
- border-left: $border-table;
133
+ border-left: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
134
134
  }
135
135
  }
136
136
  }