element-pe 2.2.56 → 2.2.57

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 (533) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +111 -38
  3. package/dist/index.full.min.js +21 -21
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +22 -22
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +111 -38
  8. package/dist/locale/fa.js +20 -20
  9. package/dist/locale/fa.min.js +1 -1
  10. package/dist/locale/fa.min.js.map +1 -1
  11. package/dist/locale/fa.min.mjs +1 -1
  12. package/dist/locale/fa.min.mjs.map +1 -1
  13. package/dist/locale/fa.mjs +20 -20
  14. package/es/components/alert/index.mjs +2 -2
  15. package/es/components/alert/src/alert.mjs +103 -38
  16. package/es/components/alert/src/alert.mjs.map +1 -1
  17. package/es/components/alert/src/alert2.mjs +38 -103
  18. package/es/components/alert/src/alert2.mjs.map +1 -1
  19. package/es/components/autocomplete/index.mjs +2 -2
  20. package/es/components/autocomplete/src/autocomplete.mjs +362 -82
  21. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  22. package/es/components/autocomplete/src/autocomplete2.mjs +82 -362
  23. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  24. package/es/components/avatar/src/avatar.mjs +1 -1
  25. package/es/components/avatar/src/avatar.mjs.map +1 -1
  26. package/es/components/carousel/index.d.ts +10 -0
  27. package/es/components/carousel/index.mjs +2 -2
  28. package/es/components/carousel/src/carousel-item.vue.d.ts +1 -0
  29. package/es/components/carousel/src/carousel-item2.mjs +7 -1
  30. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  31. package/es/components/carousel/src/carousel.mjs +169 -56
  32. package/es/components/carousel/src/carousel.mjs.map +1 -1
  33. package/es/components/carousel/src/carousel.vue.d.ts +8 -0
  34. package/es/components/carousel/src/carousel2.mjs +56 -164
  35. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  36. package/es/components/carousel/src/constants.d.ts +1 -0
  37. package/es/components/carousel/src/constants.mjs.map +1 -1
  38. package/es/components/carousel/src/use-carousel-item.d.ts +1 -0
  39. package/es/components/carousel/src/use-carousel-item.mjs +7 -5
  40. package/es/components/carousel/src/use-carousel-item.mjs.map +1 -1
  41. package/es/components/carousel/src/use-carousel.d.ts +8 -0
  42. package/es/components/carousel/src/use-carousel.mjs +21 -1
  43. package/es/components/carousel/src/use-carousel.mjs.map +1 -1
  44. package/es/components/cascader/index.d.ts +16 -16
  45. package/es/components/cascader/src/cascader.vue.d.ts +8 -8
  46. package/es/components/check-tag/index.d.ts +1 -0
  47. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  48. package/es/components/check-tag/src/check-tag.vue.d.ts +1 -0
  49. package/es/components/check-tag/src/check-tag2.mjs +3 -2
  50. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  51. package/es/components/checkbox/index.mjs +2 -2
  52. package/es/components/checkbox/src/checkbox-button.mjs +1 -1
  53. package/es/components/checkbox/src/checkbox.mjs +117 -49
  54. package/es/components/checkbox/src/checkbox.mjs.map +1 -1
  55. package/es/components/checkbox/src/checkbox2.mjs +49 -117
  56. package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
  57. package/es/components/collapse/index.mjs +2 -2
  58. package/es/components/collapse/src/collapse-item.mjs +14 -96
  59. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  60. package/es/components/collapse/src/collapse-item2.mjs +96 -14
  61. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  62. package/es/components/descriptions/index.mjs +2 -2
  63. package/es/components/descriptions/src/description.mjs +120 -27
  64. package/es/components/descriptions/src/description.mjs.map +1 -1
  65. package/es/components/descriptions/src/description2.mjs +27 -120
  66. package/es/components/descriptions/src/description2.mjs.map +1 -1
  67. package/es/components/descriptions/src/descriptions-row.mjs +7 -64
  68. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  69. package/es/components/descriptions/src/descriptions-row2.mjs +64 -7
  70. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  71. package/es/components/dropdown/index.mjs +2 -2
  72. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
  73. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  74. package/es/components/dropdown/src/dropdown-menu.mjs +2 -2
  75. package/es/components/dropdown/src/dropdown.mjs +105 -310
  76. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  77. package/es/components/dropdown/src/dropdown2.mjs +310 -105
  78. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  79. package/es/components/empty/src/empty.mjs.map +1 -1
  80. package/es/components/icon/index.mjs +2 -2
  81. package/es/components/icon/src/icon.mjs +8 -36
  82. package/es/components/icon/src/icon.mjs.map +1 -1
  83. package/es/components/icon/src/icon2.mjs +36 -8
  84. package/es/components/icon/src/icon2.mjs.map +1 -1
  85. package/es/components/image/index.mjs +2 -2
  86. package/es/components/image/src/image.mjs +65 -226
  87. package/es/components/image/src/image.mjs.map +1 -1
  88. package/es/components/image/src/image2.mjs +226 -65
  89. package/es/components/image/src/image2.mjs.map +1 -1
  90. package/es/components/index.mjs +26 -26
  91. package/es/components/input-number/index.mjs +2 -2
  92. package/es/components/input-number/src/input-number.mjs +318 -58
  93. package/es/components/input-number/src/input-number.mjs.map +1 -1
  94. package/es/components/input-number/src/input-number2.mjs +58 -315
  95. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  96. package/es/components/loading/src/service.mjs +2 -2
  97. package/es/components/loading/src/service.mjs.map +1 -1
  98. package/es/components/menu/index.mjs +4 -4
  99. package/es/components/menu/src/menu-item-group.mjs +4 -35
  100. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  101. package/es/components/menu/src/menu-item-group2.mjs +35 -4
  102. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  103. package/es/components/menu/src/menu-item.mjs +14 -97
  104. package/es/components/menu/src/menu-item.mjs.map +1 -1
  105. package/es/components/menu/src/menu-item2.mjs +97 -14
  106. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  107. package/es/components/menu/src/menu.mjs +1 -1
  108. package/es/components/menu/src/menu.mjs.map +1 -1
  109. package/es/components/notification/index.mjs +1 -1
  110. package/es/components/notification/src/notification.mjs +149 -69
  111. package/es/components/notification/src/notification.mjs.map +1 -1
  112. package/es/components/notification/src/notification2.mjs +69 -149
  113. package/es/components/notification/src/notification2.mjs.map +1 -1
  114. package/es/components/notification/src/notify.mjs +2 -2
  115. package/es/components/page-header/src/page-header.mjs.map +1 -1
  116. package/es/components/pagination/src/components/next.mjs +38 -19
  117. package/es/components/pagination/src/components/next.mjs.map +1 -1
  118. package/es/components/pagination/src/components/next2.mjs +19 -38
  119. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  120. package/es/components/pagination/src/components/pager.mjs +17 -216
  121. package/es/components/pagination/src/components/pager.mjs.map +1 -1
  122. package/es/components/pagination/src/components/pager2.mjs +216 -17
  123. package/es/components/pagination/src/components/pager2.mjs.map +1 -1
  124. package/es/components/pagination/src/components/total.mjs +7 -28
  125. package/es/components/pagination/src/components/total.mjs.map +1 -1
  126. package/es/components/pagination/src/components/total2.mjs +28 -7
  127. package/es/components/pagination/src/components/total2.mjs.map +1 -1
  128. package/es/components/pagination/src/pagination.mjs +3 -3
  129. package/es/components/popover/src/popover.mjs +1 -1
  130. package/es/components/popper/index.mjs +2 -2
  131. package/es/components/popper/src/popper.mjs +32 -25
  132. package/es/components/popper/src/popper.mjs.map +1 -1
  133. package/es/components/popper/src/popper2.mjs +25 -32
  134. package/es/components/popper/src/popper2.mjs.map +1 -1
  135. package/es/components/progress/src/progress.mjs.map +1 -1
  136. package/es/components/radio/index.mjs +2 -2
  137. package/es/components/radio/src/radio-group.mjs +36 -70
  138. package/es/components/radio/src/radio-group.mjs.map +1 -1
  139. package/es/components/radio/src/radio-group2.mjs +70 -36
  140. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  141. package/es/components/result/index.mjs +2 -2
  142. package/es/components/result/src/result.mjs +29 -63
  143. package/es/components/result/src/result.mjs.map +1 -1
  144. package/es/components/result/src/result2.mjs +63 -29
  145. package/es/components/result/src/result2.mjs.map +1 -1
  146. package/es/components/roving-focus-group/index.mjs +3 -3
  147. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  148. package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
  149. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  150. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
  151. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  152. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  153. package/es/components/row/index.mjs +2 -2
  154. package/es/components/row/src/row.mjs +30 -45
  155. package/es/components/row/src/row.mjs.map +1 -1
  156. package/es/components/row/src/row2.mjs +45 -30
  157. package/es/components/row/src/row2.mjs.map +1 -1
  158. package/es/components/scrollbar/index.mjs +3 -3
  159. package/es/components/scrollbar/src/bar2.mjs +1 -1
  160. package/es/components/scrollbar/src/scrollbar.mjs +46 -176
  161. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  162. package/es/components/scrollbar/src/scrollbar2.mjs +176 -46
  163. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  164. package/es/components/scrollbar/src/thumb.mjs +11 -134
  165. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  166. package/es/components/scrollbar/src/thumb2.mjs +134 -11
  167. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  168. package/es/components/select/src/useSelect.mjs +4 -0
  169. package/es/components/select/src/useSelect.mjs.map +1 -1
  170. package/es/components/select-v2/src/useSelect.mjs +1 -1
  171. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  172. package/es/components/skeleton/index.mjs +2 -2
  173. package/es/components/skeleton/src/skeleton-item.mjs +23 -18
  174. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  175. package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
  176. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  177. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  178. package/es/components/skeleton/src/skeleton2.mjs +1 -1
  179. package/es/components/slider/src/button.mjs +21 -93
  180. package/es/components/slider/src/button.mjs.map +1 -1
  181. package/es/components/slider/src/button2.mjs +93 -21
  182. package/es/components/slider/src/button2.mjs.map +1 -1
  183. package/es/components/slider/src/slider.mjs +1 -1
  184. package/es/components/statistic/index.mjs +2 -2
  185. package/es/components/statistic/src/statistic.mjs +70 -25
  186. package/es/components/statistic/src/statistic.mjs.map +1 -1
  187. package/es/components/statistic/src/statistic2.mjs +25 -70
  188. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  189. package/es/components/steps/index.d.ts +2 -0
  190. package/es/components/steps/index.mjs +2 -2
  191. package/es/components/steps/src/item.mjs +193 -19
  192. package/es/components/steps/src/item.mjs.map +1 -1
  193. package/es/components/steps/src/item.vue.d.ts +1 -0
  194. package/es/components/steps/src/item2.mjs +19 -190
  195. package/es/components/steps/src/item2.mjs.map +1 -1
  196. package/es/components/table/src/table-header/event-helper.mjs +6 -2
  197. package/es/components/table/src/table-header/event-helper.mjs.map +1 -1
  198. package/es/components/table-v2/src/renderers/cell.mjs +1 -1
  199. package/es/components/table-v2/src/renderers/cell.mjs.map +1 -1
  200. package/es/components/tag/index.d.ts +8 -8
  201. package/es/components/tag/src/tag.d.ts +2 -2
  202. package/es/components/tag/src/tag.mjs +2 -2
  203. package/es/components/tag/src/tag.mjs.map +1 -1
  204. package/es/components/tag/src/tag.vue.d.ts +8 -8
  205. package/es/components/tag/src/tag2.mjs +3 -3
  206. package/es/components/tag/src/tag2.mjs.map +1 -1
  207. package/es/components/text/index.mjs +2 -2
  208. package/es/components/text/src/text.mjs +22 -35
  209. package/es/components/text/src/text.mjs.map +1 -1
  210. package/es/components/text/src/text2.mjs +35 -22
  211. package/es/components/text/src/text2.mjs.map +1 -1
  212. package/es/components/time-select/src/time-select.mjs.map +1 -1
  213. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  214. package/es/components/timeline/index.d.ts +38 -0
  215. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  216. package/es/components/timeline/src/timeline-item.vue.d.ts +19 -0
  217. package/es/components/timeline/src/timeline-item2.mjs +9 -7
  218. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  219. package/es/components/tooltip/src/tooltip.mjs +1 -1
  220. package/es/components/tooltip-v2/index.mjs +4 -4
  221. package/es/components/tooltip-v2/src/arrow.mjs +22 -37
  222. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  223. package/es/components/tooltip-v2/src/arrow2.mjs +37 -22
  224. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  225. package/es/components/tooltip-v2/src/content2.mjs +1 -1
  226. package/es/components/tooltip-v2/src/root.mjs +17 -82
  227. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  228. package/es/components/tooltip-v2/src/root2.mjs +82 -17
  229. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  230. package/es/components/tooltip-v2/src/tooltip.mjs +78 -21
  231. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  232. package/es/components/tooltip-v2/src/tooltip2.mjs +21 -78
  233. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  234. package/es/components/transfer/index.mjs +2 -2
  235. package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
  236. package/es/components/transfer/src/transfer-panel.mjs +1 -1
  237. package/es/components/transfer/src/transfer.mjs +69 -162
  238. package/es/components/transfer/src/transfer.mjs.map +1 -1
  239. package/es/components/transfer/src/transfer2.mjs +162 -69
  240. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  241. package/es/components/tree/index.d.ts +2 -2
  242. package/es/components/tree/src/model/useDragNode.mjs +2 -2
  243. package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
  244. package/es/components/tree/src/tree.type.d.ts +1 -1
  245. package/es/components/tree/src/tree.vue.d.ts +1 -1
  246. package/es/components/tree-select/src/tree-select.mjs.map +1 -1
  247. package/es/components/tree-select/src/tree.mjs +20 -3
  248. package/es/components/tree-select/src/tree.mjs.map +1 -1
  249. package/es/components/upload/index.mjs +2 -2
  250. package/es/components/upload/src/upload-content.mjs +182 -33
  251. package/es/components/upload/src/upload-content.mjs.map +1 -1
  252. package/es/components/upload/src/upload-content2.mjs +33 -178
  253. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  254. package/es/components/upload/src/upload-list.mjs +26 -177
  255. package/es/components/upload/src/upload-list.mjs.map +1 -1
  256. package/es/components/upload/src/upload-list2.mjs +177 -26
  257. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  258. package/es/components/upload/src/upload2.mjs +2 -2
  259. package/es/components/visual-hidden/index.mjs +3 -3
  260. package/es/components/visual-hidden/src/visual-hidden.mjs +7 -35
  261. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  262. package/es/components/visual-hidden/src/visual-hidden2.mjs +35 -7
  263. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  264. package/es/index.mjs +26 -26
  265. package/es/locale/lang/fa.mjs +20 -20
  266. package/es/locale/lang/fa.mjs.map +1 -1
  267. package/es/utils/types.mjs +1 -1
  268. package/es/utils/types.mjs.map +1 -1
  269. package/lib/components/alert/index.js +2 -2
  270. package/lib/components/alert/src/alert.js +102 -39
  271. package/lib/components/alert/src/alert.js.map +1 -1
  272. package/lib/components/alert/src/alert2.js +39 -102
  273. package/lib/components/alert/src/alert2.js.map +1 -1
  274. package/lib/components/autocomplete/index.js +2 -2
  275. package/lib/components/autocomplete/src/autocomplete.js +361 -82
  276. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  277. package/lib/components/autocomplete/src/autocomplete2.js +82 -361
  278. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  279. package/lib/components/avatar/src/avatar.js +1 -1
  280. package/lib/components/avatar/src/avatar.js.map +1 -1
  281. package/lib/components/carousel/index.d.ts +10 -0
  282. package/lib/components/carousel/index.js +2 -2
  283. package/lib/components/carousel/src/carousel-item.vue.d.ts +1 -0
  284. package/lib/components/carousel/src/carousel-item2.js +7 -1
  285. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  286. package/lib/components/carousel/src/carousel.js +169 -57
  287. package/lib/components/carousel/src/carousel.js.map +1 -1
  288. package/lib/components/carousel/src/carousel.vue.d.ts +8 -0
  289. package/lib/components/carousel/src/carousel2.js +57 -164
  290. package/lib/components/carousel/src/carousel2.js.map +1 -1
  291. package/lib/components/carousel/src/constants.d.ts +1 -0
  292. package/lib/components/carousel/src/constants.js.map +1 -1
  293. package/lib/components/carousel/src/use-carousel-item.d.ts +1 -0
  294. package/lib/components/carousel/src/use-carousel-item.js +7 -5
  295. package/lib/components/carousel/src/use-carousel-item.js.map +1 -1
  296. package/lib/components/carousel/src/use-carousel.d.ts +8 -0
  297. package/lib/components/carousel/src/use-carousel.js +21 -1
  298. package/lib/components/carousel/src/use-carousel.js.map +1 -1
  299. package/lib/components/cascader/index.d.ts +16 -16
  300. package/lib/components/cascader/src/cascader.vue.d.ts +8 -8
  301. package/lib/components/check-tag/index.d.ts +1 -0
  302. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  303. package/lib/components/check-tag/src/check-tag.vue.d.ts +1 -0
  304. package/lib/components/check-tag/src/check-tag2.js +2 -1
  305. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  306. package/lib/components/checkbox/index.js +2 -2
  307. package/lib/components/checkbox/src/checkbox-button.js +1 -1
  308. package/lib/components/checkbox/src/checkbox.js +117 -50
  309. package/lib/components/checkbox/src/checkbox.js.map +1 -1
  310. package/lib/components/checkbox/src/checkbox2.js +50 -117
  311. package/lib/components/checkbox/src/checkbox2.js.map +1 -1
  312. package/lib/components/collapse/index.js +2 -2
  313. package/lib/components/collapse/src/collapse-item.js +14 -96
  314. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  315. package/lib/components/collapse/src/collapse-item2.js +96 -14
  316. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  317. package/lib/components/descriptions/index.js +2 -2
  318. package/lib/components/descriptions/src/description.js +120 -27
  319. package/lib/components/descriptions/src/description.js.map +1 -1
  320. package/lib/components/descriptions/src/description2.js +27 -120
  321. package/lib/components/descriptions/src/description2.js.map +1 -1
  322. package/lib/components/descriptions/src/descriptions-row.js +7 -64
  323. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  324. package/lib/components/descriptions/src/descriptions-row2.js +64 -7
  325. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  326. package/lib/components/dropdown/index.js +2 -2
  327. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
  328. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  329. package/lib/components/dropdown/src/dropdown-menu.js +2 -2
  330. package/lib/components/dropdown/src/dropdown.js +114 -310
  331. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  332. package/lib/components/dropdown/src/dropdown2.js +310 -114
  333. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  334. package/lib/components/empty/src/empty.js.map +1 -1
  335. package/lib/components/icon/index.js +2 -2
  336. package/lib/components/icon/src/icon.js +8 -36
  337. package/lib/components/icon/src/icon.js.map +1 -1
  338. package/lib/components/icon/src/icon2.js +36 -8
  339. package/lib/components/icon/src/icon2.js.map +1 -1
  340. package/lib/components/image/index.js +2 -2
  341. package/lib/components/image/src/image.js +65 -225
  342. package/lib/components/image/src/image.js.map +1 -1
  343. package/lib/components/image/src/image2.js +225 -65
  344. package/lib/components/image/src/image2.js.map +1 -1
  345. package/lib/components/index.js +26 -26
  346. package/lib/components/input-number/index.js +2 -2
  347. package/lib/components/input-number/src/input-number.js +316 -57
  348. package/lib/components/input-number/src/input-number.js.map +1 -1
  349. package/lib/components/input-number/src/input-number2.js +57 -313
  350. package/lib/components/input-number/src/input-number2.js.map +1 -1
  351. package/lib/components/loading/src/service.js +2 -2
  352. package/lib/components/loading/src/service.js.map +1 -1
  353. package/lib/components/menu/index.js +4 -4
  354. package/lib/components/menu/src/menu-item-group.js +4 -35
  355. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  356. package/lib/components/menu/src/menu-item-group2.js +35 -4
  357. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  358. package/lib/components/menu/src/menu-item.js +15 -97
  359. package/lib/components/menu/src/menu-item.js.map +1 -1
  360. package/lib/components/menu/src/menu-item2.js +97 -15
  361. package/lib/components/menu/src/menu-item2.js.map +1 -1
  362. package/lib/components/menu/src/menu.js +1 -1
  363. package/lib/components/menu/src/menu.js.map +1 -1
  364. package/lib/components/notification/index.js +1 -1
  365. package/lib/components/notification/src/notification.js +148 -70
  366. package/lib/components/notification/src/notification.js.map +1 -1
  367. package/lib/components/notification/src/notification2.js +70 -148
  368. package/lib/components/notification/src/notification2.js.map +1 -1
  369. package/lib/components/notification/src/notify.js +2 -2
  370. package/lib/components/page-header/src/page-header.js.map +1 -1
  371. package/lib/components/pagination/src/components/next.js +38 -19
  372. package/lib/components/pagination/src/components/next.js.map +1 -1
  373. package/lib/components/pagination/src/components/next2.js +19 -38
  374. package/lib/components/pagination/src/components/next2.js.map +1 -1
  375. package/lib/components/pagination/src/components/pager.js +17 -216
  376. package/lib/components/pagination/src/components/pager.js.map +1 -1
  377. package/lib/components/pagination/src/components/pager2.js +216 -17
  378. package/lib/components/pagination/src/components/pager2.js.map +1 -1
  379. package/lib/components/pagination/src/components/total.js +7 -28
  380. package/lib/components/pagination/src/components/total.js.map +1 -1
  381. package/lib/components/pagination/src/components/total2.js +28 -7
  382. package/lib/components/pagination/src/components/total2.js.map +1 -1
  383. package/lib/components/pagination/src/pagination.js +3 -3
  384. package/lib/components/popover/src/popover.js +1 -1
  385. package/lib/components/popper/index.js +2 -2
  386. package/lib/components/popper/src/popper.js +32 -28
  387. package/lib/components/popper/src/popper.js.map +1 -1
  388. package/lib/components/popper/src/popper2.js +28 -32
  389. package/lib/components/popper/src/popper2.js.map +1 -1
  390. package/lib/components/progress/src/progress.js.map +1 -1
  391. package/lib/components/radio/index.js +2 -2
  392. package/lib/components/radio/src/radio-group.js +37 -70
  393. package/lib/components/radio/src/radio-group.js.map +1 -1
  394. package/lib/components/radio/src/radio-group2.js +70 -37
  395. package/lib/components/radio/src/radio-group2.js.map +1 -1
  396. package/lib/components/result/index.js +2 -2
  397. package/lib/components/result/src/result.js +31 -63
  398. package/lib/components/result/src/result.js.map +1 -1
  399. package/lib/components/result/src/result2.js +63 -31
  400. package/lib/components/result/src/result2.js.map +1 -1
  401. package/lib/components/roving-focus-group/index.js +2 -2
  402. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  403. package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
  404. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  405. package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
  406. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  407. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  408. package/lib/components/row/index.js +2 -2
  409. package/lib/components/row/src/row.js +32 -45
  410. package/lib/components/row/src/row.js.map +1 -1
  411. package/lib/components/row/src/row2.js +45 -32
  412. package/lib/components/row/src/row2.js.map +1 -1
  413. package/lib/components/scrollbar/index.js +3 -3
  414. package/lib/components/scrollbar/src/bar2.js +1 -1
  415. package/lib/components/scrollbar/src/scrollbar.js +47 -176
  416. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  417. package/lib/components/scrollbar/src/scrollbar2.js +176 -47
  418. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  419. package/lib/components/scrollbar/src/thumb.js +11 -134
  420. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  421. package/lib/components/scrollbar/src/thumb2.js +134 -11
  422. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  423. package/lib/components/select/src/useSelect.js +4 -0
  424. package/lib/components/select/src/useSelect.js.map +1 -1
  425. package/lib/components/select-v2/src/useSelect.js +1 -1
  426. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  427. package/lib/components/skeleton/index.js +2 -2
  428. package/lib/components/skeleton/src/skeleton-item.js +23 -18
  429. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  430. package/lib/components/skeleton/src/skeleton-item2.js +18 -23
  431. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  432. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  433. package/lib/components/skeleton/src/skeleton2.js +1 -1
  434. package/lib/components/slider/src/button.js +22 -93
  435. package/lib/components/slider/src/button.js.map +1 -1
  436. package/lib/components/slider/src/button2.js +93 -22
  437. package/lib/components/slider/src/button2.js.map +1 -1
  438. package/lib/components/slider/src/slider.js +1 -1
  439. package/lib/components/statistic/index.js +2 -2
  440. package/lib/components/statistic/src/statistic.js +70 -25
  441. package/lib/components/statistic/src/statistic.js.map +1 -1
  442. package/lib/components/statistic/src/statistic2.js +25 -70
  443. package/lib/components/statistic/src/statistic2.js.map +1 -1
  444. package/lib/components/steps/index.d.ts +2 -0
  445. package/lib/components/steps/index.js +2 -2
  446. package/lib/components/steps/src/item.js +193 -19
  447. package/lib/components/steps/src/item.js.map +1 -1
  448. package/lib/components/steps/src/item.vue.d.ts +1 -0
  449. package/lib/components/steps/src/item2.js +19 -190
  450. package/lib/components/steps/src/item2.js.map +1 -1
  451. package/lib/components/table/src/table-header/event-helper.js +6 -2
  452. package/lib/components/table/src/table-header/event-helper.js.map +1 -1
  453. package/lib/components/table-v2/src/renderers/cell.js +1 -1
  454. package/lib/components/table-v2/src/renderers/cell.js.map +1 -1
  455. package/lib/components/tag/index.d.ts +8 -8
  456. package/lib/components/tag/src/tag.d.ts +2 -2
  457. package/lib/components/tag/src/tag.js +2 -2
  458. package/lib/components/tag/src/tag.js.map +1 -1
  459. package/lib/components/tag/src/tag.vue.d.ts +8 -8
  460. package/lib/components/tag/src/tag2.js +3 -3
  461. package/lib/components/tag/src/tag2.js.map +1 -1
  462. package/lib/components/text/index.js +2 -2
  463. package/lib/components/text/src/text.js +22 -35
  464. package/lib/components/text/src/text.js.map +1 -1
  465. package/lib/components/text/src/text2.js +35 -22
  466. package/lib/components/text/src/text2.js.map +1 -1
  467. package/lib/components/time-select/src/time-select.js.map +1 -1
  468. package/lib/components/time-select/src/time-select2.js.map +1 -1
  469. package/lib/components/timeline/index.d.ts +38 -0
  470. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  471. package/lib/components/timeline/src/timeline-item.vue.d.ts +19 -0
  472. package/lib/components/timeline/src/timeline-item2.js +8 -6
  473. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  474. package/lib/components/tooltip/src/tooltip.js +1 -1
  475. package/lib/components/tooltip-v2/index.js +4 -4
  476. package/lib/components/tooltip-v2/src/arrow.js +23 -37
  477. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  478. package/lib/components/tooltip-v2/src/arrow2.js +37 -23
  479. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  480. package/lib/components/tooltip-v2/src/content2.js +1 -1
  481. package/lib/components/tooltip-v2/src/root.js +17 -82
  482. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  483. package/lib/components/tooltip-v2/src/root2.js +82 -17
  484. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  485. package/lib/components/tooltip-v2/src/tooltip.js +78 -21
  486. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  487. package/lib/components/tooltip-v2/src/tooltip2.js +21 -78
  488. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  489. package/lib/components/transfer/index.js +2 -2
  490. package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
  491. package/lib/components/transfer/src/transfer-panel.js +1 -1
  492. package/lib/components/transfer/src/transfer.js +73 -162
  493. package/lib/components/transfer/src/transfer.js.map +1 -1
  494. package/lib/components/transfer/src/transfer2.js +162 -73
  495. package/lib/components/transfer/src/transfer2.js.map +1 -1
  496. package/lib/components/tree/index.d.ts +2 -2
  497. package/lib/components/tree/src/model/useDragNode.js +2 -2
  498. package/lib/components/tree/src/model/useDragNode.js.map +1 -1
  499. package/lib/components/tree/src/tree.type.d.ts +1 -1
  500. package/lib/components/tree/src/tree.vue.d.ts +1 -1
  501. package/lib/components/tree-select/src/tree-select.js.map +1 -1
  502. package/lib/components/tree-select/src/tree.js +20 -3
  503. package/lib/components/tree-select/src/tree.js.map +1 -1
  504. package/lib/components/upload/index.js +2 -2
  505. package/lib/components/upload/src/upload-content.js +180 -31
  506. package/lib/components/upload/src/upload-content.js.map +1 -1
  507. package/lib/components/upload/src/upload-content2.js +31 -176
  508. package/lib/components/upload/src/upload-content2.js.map +1 -1
  509. package/lib/components/upload/src/upload-list.js +27 -177
  510. package/lib/components/upload/src/upload-list.js.map +1 -1
  511. package/lib/components/upload/src/upload-list2.js +177 -27
  512. package/lib/components/upload/src/upload-list2.js.map +1 -1
  513. package/lib/components/upload/src/upload2.js +2 -2
  514. package/lib/components/visual-hidden/index.js +2 -2
  515. package/lib/components/visual-hidden/src/visual-hidden.js +7 -35
  516. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  517. package/lib/components/visual-hidden/src/visual-hidden2.js +35 -7
  518. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  519. package/lib/index.js +26 -26
  520. package/lib/locale/lang/fa.js +20 -20
  521. package/lib/locale/lang/fa.js.map +1 -1
  522. package/lib/utils/types.js +1 -1
  523. package/lib/utils/types.js.map +1 -1
  524. package/package.json +1 -1
  525. package/theme-chalk/el-carousel-item.css +1 -1
  526. package/theme-chalk/el-carousel.css +1 -1
  527. package/theme-chalk/index.css +1 -1
  528. package/theme-chalk/src/carousel-item.scss +8 -0
  529. package/theme-chalk/src/carousel.scss +9 -2
  530. package/theme-chalk/src/image.scss +6 -6
  531. package/theme-chalk/src/progress.scss +10 -1
  532. package/theme-chalk/src/text.scss +1 -1
  533. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"input-number.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type InputNumber from './input-number.vue'\n\nexport const inputNumberProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description incremental step\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether input value can only be multiple of step\n */\n stepStrictly: Boolean,\n /**\n * @description the maximum allowed value\n */\n max: {\n type: Number,\n default: Number.POSITIVE_INFINITY,\n },\n /**\n * @description the minimum allowed value\n */\n min: {\n type: Number,\n default: Number.NEGATIVE_INFINITY,\n },\n /**\n * @description binding value\n */\n modelValue: Number,\n /**\n * @description same as `readonly` in native input\n */\n readonly: Boolean,\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description size of the component\n */\n size: useSizeProp,\n /**\n * @description whether to enable the control buttons\n */\n controls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description position of the control buttons\n */\n controlsPosition: {\n type: String,\n default: '',\n values: ['', 'right'],\n },\n /**\n * @description value should be set when input box is cleared\n */\n valueOnClear: {\n type: [String, Number, null],\n validator: (val: 'min' | 'max' | number | null) =>\n val === null || isNumber(val) || ['min', 'max'].includes(val),\n default: null,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description same as `label` in native input\n */\n label: String,\n /**\n * @description same as `placeholder` in native input\n */\n placeholder: String,\n /**\n * @description precision of input value\n */\n precision: {\n type: Number,\n validator: (val: number) =>\n val >= 0 && val === Number.parseInt(`${val}`, 10),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>\n\nexport const inputNumberEmits = {\n [CHANGE_EVENT]: (cur: number | undefined, prev: number | undefined) =>\n prev !== cur,\n blur: (e: FocusEvent) => e instanceof FocusEvent,\n focus: (e: FocusEvent) => e instanceof FocusEvent,\n [INPUT_EVENT]: (val: number | null | undefined) =>\n isNumber(val) || isNil(val),\n [UPDATE_MODEL_EVENT]: (val: number | undefined) =>\n isNumber(val) || isNil(val),\n}\nexport type InputNumberEmits = typeof inputNumberEmits\n\nexport type InputNumberInstance = InstanceType<typeof InputNumber>\n"],"names":[],"mappings":";;;;;;;;;AAQY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM,CAAC,iBAAiB;AACrC,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM,CAAC,iBAAiB;AACrC,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC;AACzB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC;AAChC,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK,GAAG,KAAK,IAAI,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;AACrF,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,IAAI,GAAG,KAAK,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC;AACzE,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,IAAI,KAAK,GAAG;AAC7C,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,UAAU;AACtC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,UAAU;AACvC,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACrD,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AAC5D;;;;"}
1
+ {"version":3,"file":"input-number.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :label=\"label\"\n :validate-event=\"false\"\n @wheel.prevent\n @keydown.up.prevent=\"increase\"\n @keydown.down.prevent=\"decrease\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref } from 'vue'\nimport { watch } from '../../config-provider'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport {\n debugWarn,\n isNumber,\n isString,\n isUndefined,\n throwError,\n} from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n if (max < min) {\n throwError('InputNumber', 'min should not be greater than max.')\n }\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(Math.round(newVal / step) * step, precision)\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n if (oldVal === newVal) return\n data.userInput = null\n emit(UPDATE_MODEL_EVENT, newVal!)\n emit(CHANGE_EVENT, newVal!, oldVal!)\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nwatch(\n () => props.modelValue,\n (value) => {\n const userInput = verifyValue(data.userInput)\n const newValue = verifyValue(value, true)\n if (!isNumber(userInput) && (!userInput || userInput !== newValue)) {\n if (data.userInput !== '') {\n data.currentValue = newValue\n data.userInput = null\n }\n }\n },\n { immediate: true }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute('aria-valuenow', String(data.currentValue))\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;mCA4Fc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQ,GAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAO,QAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AAEjC,IAAM,MAAA,WAAA,GAAc,QAClB,CAAA,MAAM,QAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,UAAc,IAAA,KAAA,CAAM,GAChE,CAAA,CAAA;AACA,IAAM,MAAA,WAAA,GAAc,QAClB,CAAA,MAAM,QAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,UAAc,IAAA,KAAA,CAAM,GAChE,CAAA,CAAA;AAEA,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAM,MAAA,aAAA,GAAgB,YAAa,CAAA,KAAA,CAAM,IAAI,CAAA,CAAA;AAC7C,MAAA,IAAI,CAAC,WAAA,CAAY,KAAM,CAAA,SAAS,CAAG,EAAA;AACjC,QAAI,IAAA,aAAA,GAAgB,MAAM,SAAW,EAAA;AACnC,UAAA,SAAA,CACE,eACA,8DACF,CAAA,CAAA;AAAA,SACF;AACA,QAAA,OAAO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,CAAA,GAAA,CAAA,CAAA,CAAA;AAChD,OAAA,MAAK;AACH,QAAI,UAAqB,gBAAiB,CAAA,eAAA,CAAA,CAAA;AAC1C,OAAI;AACF,MAAM,UAAA,CAAA,YAAA,CAAA,eAAA,EAAA,MAAA,CAAA,IAAA,CAAA,YAAA,CAAA,CAAA,CAAA;AAAA,MACR,UAAA,CAAA,YAAA,CAAA,eAAA,EAAA,MAAA,CAAA,mBAAA,CAAA,KAAA,CAAA,CAAA,CAAA;AACA,MAAA,IAAA,CAAA,wBAA6B,UAAA,IAAA,IAAA,EAAA;AAAA,QAC/B,IAAA,GAAA,GAAA,MAAA,CAAA,UAAA,CAAA,CAAA;AAAA,QACD,IAAA,MAAA,CAAA,KAAA,CAAA,GAAA,CAAA,EAAA;AACD,UAAA,GAAA,GAAgB,IAAA,CAAA;AACd,SAAM;AACN,QAAA,IAAA,CAAA,kBAAyB,EAAA,GAAA,CAAA,CAAA;AAAuC,OACjE;AACD,KAAa,CAAA,CAAA;AAAA,IAEX,SAAA,CAAA,MAAA;AAAA,MAEA,IAAA,EAAA,CAAA;AAAA,MACD,MAAA,UAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,324 +1,67 @@
1
- import { defineComponent, ref, reactive, computed, onMounted, onUpdated, openBlock, createElementBlock, normalizeClass, unref, withModifiers, withDirectives, withKeys, createVNode, withCtx, createBlock, createCommentVNode } from 'vue';
2
- import '../../config-provider/index.mjs';
3
1
  import { isNil } from 'lodash-unified';
4
- import { ElInput } from '../../input/index.mjs';
5
- import { ElIcon } from '../../icon/index.mjs';
6
- import '../../form/index.mjs';
7
- import '../../../directives/index.mjs';
8
2
  import '../../../hooks/index.mjs';
9
3
  import '../../../utils/index.mjs';
10
- import { ArrowDown, Minus, ArrowUp, Plus } from '@element-plus/icons-vue';
11
4
  import '../../../constants/index.mjs';
12
- import { inputNumberProps, inputNumberEmits } from './input-number.mjs';
13
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
14
- import { useLocale } from '../../../hooks/use-locale/index.mjs';
15
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
16
- import { useFormItem } from '../../form/src/hooks/use-form-item.mjs';
17
- import { isNumber, isUndefined } from '../../../utils/types.mjs';
18
- import { debugWarn } from '../../../utils/error.mjs';
19
- import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
20
- import { INPUT_EVENT, UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
21
- import { isString } from '@vue/shared';
22
- import { watch } from '../../config-provider/src/for-editor.mjs';
23
- import { vRepeatClick } from '../../../directives/repeat-click/index.mjs';
5
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
6
+ import { useSizeProp } from '../../../hooks/use-size/index.mjs';
7
+ import { isNumber } from '../../../utils/types.mjs';
8
+ import { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
24
9
 
25
- const _hoisted_1 = ["aria-label", "onKeydown"];
26
- const _hoisted_2 = ["aria-label", "onKeydown"];
27
- const __default__ = defineComponent({
28
- name: "ElInputNumber"
29
- });
30
- const _sfc_main = /* @__PURE__ */ defineComponent({
31
- ...__default__,
32
- props: inputNumberProps,
33
- emits: inputNumberEmits,
34
- setup(__props, { expose, emit }) {
35
- const props = __props;
36
- const { t } = useLocale();
37
- const ns = useNamespace("input-number");
38
- const input = ref();
39
- const data = reactive({
40
- currentValue: props.modelValue,
41
- userInput: null
42
- });
43
- const { formItem } = useFormItem();
44
- const minDisabled = computed(() => isNumber(props.modelValue) && props.modelValue <= props.min);
45
- const maxDisabled = computed(() => isNumber(props.modelValue) && props.modelValue >= props.max);
46
- const numPrecision = computed(() => {
47
- const stepPrecision = getPrecision(props.step);
48
- if (!isUndefined(props.precision)) {
49
- if (stepPrecision > props.precision) {
50
- debugWarn("InputNumber", "precision should not be less than the decimal places of step");
51
- }
52
- return props.precision;
53
- } else {
54
- return Math.max(getPrecision(props.modelValue), stepPrecision);
55
- }
56
- });
57
- const controlsAtRight = computed(() => {
58
- return props.controls && props.controlsPosition === "right";
59
- });
60
- const inputNumberSize = useFormSize();
61
- const inputNumberDisabled = useFormDisabled();
62
- const displayValue = computed(() => {
63
- if (data.userInput !== null) {
64
- return data.userInput;
65
- }
66
- let currentValue = data.currentValue;
67
- if (isNil(currentValue))
68
- return "";
69
- if (isNumber(currentValue)) {
70
- if (Number.isNaN(currentValue))
71
- return "";
72
- if (!isUndefined(props.precision)) {
73
- currentValue = currentValue.toFixed(props.precision);
74
- }
75
- }
76
- return currentValue;
77
- });
78
- const toPrecision = (num, pre) => {
79
- if (isUndefined(pre))
80
- pre = numPrecision.value;
81
- if (pre === 0)
82
- return Math.round(num);
83
- let snum = String(num);
84
- const pointPos = snum.indexOf(".");
85
- if (pointPos === -1)
86
- return num;
87
- const nums = snum.replace(".", "").split("");
88
- const datum = nums[pointPos + pre];
89
- if (!datum)
90
- return num;
91
- const length = snum.length;
92
- if (snum.charAt(length - 1) === "5") {
93
- snum = `${snum.slice(0, Math.max(0, length - 1))}6`;
94
- }
95
- return Number.parseFloat(Number(snum).toFixed(pre));
96
- };
97
- const getPrecision = (value) => {
98
- if (isNil(value))
99
- return 0;
100
- const valueString = value.toString();
101
- const dotPosition = valueString.indexOf(".");
102
- let precision = 0;
103
- if (dotPosition !== -1) {
104
- precision = valueString.length - dotPosition - 1;
105
- }
106
- return precision;
107
- };
108
- const ensurePrecision = (val, coefficient = 1) => {
109
- if (!isNumber(val))
110
- return data.currentValue;
111
- return toPrecision(val + props.step * coefficient);
112
- };
113
- const increase = () => {
114
- if (props.readonly || inputNumberDisabled.value || maxDisabled.value)
115
- return;
116
- const value = Number(displayValue.value) || 0;
117
- const newVal = ensurePrecision(value);
118
- setCurrentValue(newVal);
119
- emit(INPUT_EVENT, data.currentValue);
120
- };
121
- const decrease = () => {
122
- if (props.readonly || inputNumberDisabled.value || minDisabled.value)
123
- return;
124
- const value = Number(displayValue.value) || 0;
125
- const newVal = ensurePrecision(value, -1);
126
- setCurrentValue(newVal);
127
- emit(INPUT_EVENT, data.currentValue);
128
- };
129
- const verifyValue = (value, update) => {
130
- const { max, min, step, precision, stepStrictly, valueOnClear } = props;
131
- let newVal = Number(value);
132
- if (isNil(value) || Number.isNaN(newVal)) {
133
- return null;
134
- }
135
- if (value === "") {
136
- if (valueOnClear === null) {
137
- return null;
138
- }
139
- newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear;
140
- }
141
- if (stepStrictly) {
142
- newVal = toPrecision(Math.round(newVal / step) * step, precision);
143
- }
144
- if (!isUndefined(precision)) {
145
- newVal = toPrecision(newVal, precision);
146
- }
147
- if (newVal > max || newVal < min) {
148
- newVal = newVal > max ? max : min;
149
- update && emit(UPDATE_MODEL_EVENT, newVal);
150
- }
151
- return newVal;
152
- };
153
- const setCurrentValue = (value, emitChange = true) => {
154
- var _a;
155
- const oldVal = data.currentValue;
156
- const newVal = verifyValue(value);
157
- if (!emitChange) {
158
- emit(UPDATE_MODEL_EVENT, newVal);
159
- return;
160
- }
161
- if (oldVal === newVal)
162
- return;
163
- data.userInput = null;
164
- emit(UPDATE_MODEL_EVENT, newVal);
165
- emit(CHANGE_EVENT, newVal, oldVal);
166
- if (props.validateEvent) {
167
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
168
- }
169
- data.currentValue = newVal;
170
- };
171
- const handleInput = (value) => {
172
- data.userInput = value;
173
- const newVal = value === "" ? null : Number(value);
174
- emit(INPUT_EVENT, newVal);
175
- setCurrentValue(newVal, false);
176
- };
177
- const handleInputChange = (value) => {
178
- const newVal = value !== "" ? Number(value) : "";
179
- if (isNumber(newVal) && !Number.isNaN(newVal) || value === "") {
180
- setCurrentValue(newVal);
181
- }
182
- data.userInput = null;
183
- };
184
- const focus = () => {
185
- var _a, _b;
186
- (_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
187
- };
188
- const blur = () => {
189
- var _a, _b;
190
- (_b = (_a = input.value) == null ? void 0 : _a.blur) == null ? void 0 : _b.call(_a);
191
- };
192
- const handleFocus = (event) => {
193
- emit("focus", event);
194
- };
195
- const handleBlur = (event) => {
196
- var _a;
197
- emit("blur", event);
198
- if (props.validateEvent) {
199
- (_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "blur").catch((err) => debugWarn(err));
200
- }
201
- };
202
- watch(() => props.modelValue, (value) => {
203
- const userInput = verifyValue(data.userInput);
204
- const newValue = verifyValue(value, true);
205
- if (!isNumber(userInput) && (!userInput || userInput !== newValue)) {
206
- if (data.userInput !== "") {
207
- data.currentValue = newValue;
208
- data.userInput = null;
209
- }
210
- }
211
- }, { immediate: true });
212
- onMounted(() => {
213
- var _a;
214
- const { min, max, modelValue } = props;
215
- const innerInput = (_a = input.value) == null ? void 0 : _a.input;
216
- innerInput.setAttribute("role", "spinbutton");
217
- if (Number.isFinite(max)) {
218
- innerInput.setAttribute("aria-valuemax", String(max));
219
- } else {
220
- innerInput.removeAttribute("aria-valuemax");
221
- }
222
- if (Number.isFinite(min)) {
223
- innerInput.setAttribute("aria-valuemin", String(min));
224
- } else {
225
- innerInput.removeAttribute("aria-valuemin");
226
- }
227
- innerInput.setAttribute("aria-valuenow", String(data.currentValue));
228
- innerInput.setAttribute("aria-disabled", String(inputNumberDisabled.value));
229
- if (!isNumber(modelValue) && modelValue != null) {
230
- let val = Number(modelValue);
231
- if (Number.isNaN(val)) {
232
- val = null;
233
- }
234
- emit(UPDATE_MODEL_EVENT, val);
235
- }
236
- });
237
- onUpdated(() => {
238
- var _a;
239
- const innerInput = (_a = input.value) == null ? void 0 : _a.input;
240
- innerInput == null ? void 0 : innerInput.setAttribute("aria-valuenow", `${data.currentValue}`);
241
- });
242
- expose({
243
- focus,
244
- blur
245
- });
246
- return (_ctx, _cache) => {
247
- return openBlock(), createElementBlock("div", {
248
- class: normalizeClass([
249
- unref(ns).b(),
250
- unref(ns).m(unref(inputNumberSize)),
251
- unref(ns).is("disabled", unref(inputNumberDisabled)),
252
- unref(ns).is("without-controls", !_ctx.controls),
253
- unref(ns).is("controls-right", unref(controlsAtRight))
254
- ]),
255
- onDragstart: _cache[1] || (_cache[1] = withModifiers(() => {
256
- }, ["prevent"]))
257
- }, [
258
- _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
259
- key: 0,
260
- role: "button",
261
- "aria-label": unref(t)("el.inputNumber.decrease"),
262
- class: normalizeClass([unref(ns).e("decrease"), unref(ns).is("disabled", unref(minDisabled))]),
263
- onKeydown: withKeys(decrease, ["enter"])
264
- }, [
265
- createVNode(unref(ElIcon), null, {
266
- default: withCtx(() => [
267
- unref(controlsAtRight) ? (openBlock(), createBlock(unref(ArrowDown), { key: 0 })) : (openBlock(), createBlock(unref(Minus), { key: 1 }))
268
- ]),
269
- _: 1
270
- })
271
- ], 42, _hoisted_1)), [
272
- [unref(vRepeatClick), decrease]
273
- ]) : createCommentVNode("v-if", true),
274
- _ctx.controls ? withDirectives((openBlock(), createElementBlock("span", {
275
- key: 1,
276
- role: "button",
277
- "aria-label": unref(t)("el.inputNumber.increase"),
278
- class: normalizeClass([unref(ns).e("increase"), unref(ns).is("disabled", unref(maxDisabled))]),
279
- onKeydown: withKeys(increase, ["enter"])
280
- }, [
281
- createVNode(unref(ElIcon), null, {
282
- default: withCtx(() => [
283
- unref(controlsAtRight) ? (openBlock(), createBlock(unref(ArrowUp), { key: 0 })) : (openBlock(), createBlock(unref(Plus), { key: 1 }))
284
- ]),
285
- _: 1
286
- })
287
- ], 42, _hoisted_2)), [
288
- [unref(vRepeatClick), increase]
289
- ]) : createCommentVNode("v-if", true),
290
- createVNode(unref(ElInput), {
291
- id: _ctx.id,
292
- ref_key: "input",
293
- ref: input,
294
- type: "number",
295
- step: _ctx.step,
296
- "model-value": unref(displayValue),
297
- placeholder: _ctx.placeholder,
298
- readonly: _ctx.readonly,
299
- disabled: unref(inputNumberDisabled),
300
- size: unref(inputNumberSize),
301
- max: _ctx.max,
302
- min: _ctx.min,
303
- name: _ctx.name,
304
- label: _ctx.label,
305
- "validate-event": false,
306
- onWheel: _cache[0] || (_cache[0] = withModifiers(() => {
307
- }, ["prevent"])),
308
- onKeydown: [
309
- withKeys(withModifiers(increase, ["prevent"]), ["up"]),
310
- withKeys(withModifiers(decrease, ["prevent"]), ["down"])
311
- ],
312
- onBlur: handleBlur,
313
- onFocus: handleFocus,
314
- onInput: handleInput,
315
- onChange: handleInputChange
316
- }, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
317
- ], 34);
318
- };
10
+ const inputNumberProps = buildProps({
11
+ id: {
12
+ type: String,
13
+ default: void 0
14
+ },
15
+ step: {
16
+ type: Number,
17
+ default: 1
18
+ },
19
+ stepStrictly: Boolean,
20
+ max: {
21
+ type: Number,
22
+ default: Number.POSITIVE_INFINITY
23
+ },
24
+ min: {
25
+ type: Number,
26
+ default: Number.NEGATIVE_INFINITY
27
+ },
28
+ modelValue: Number,
29
+ readonly: Boolean,
30
+ disabled: Boolean,
31
+ size: useSizeProp,
32
+ controls: {
33
+ type: Boolean,
34
+ default: true
35
+ },
36
+ controlsPosition: {
37
+ type: String,
38
+ default: "",
39
+ values: ["", "right"]
40
+ },
41
+ valueOnClear: {
42
+ type: [String, Number, null],
43
+ validator: (val) => val === null || isNumber(val) || ["min", "max"].includes(val),
44
+ default: null
45
+ },
46
+ name: String,
47
+ label: String,
48
+ placeholder: String,
49
+ precision: {
50
+ type: Number,
51
+ validator: (val) => val >= 0 && val === Number.parseInt(`${val}`, 10)
52
+ },
53
+ validateEvent: {
54
+ type: Boolean,
55
+ default: true
319
56
  }
320
57
  });
321
- var InputNumber = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\input-number\\src\\input-number.vue"]]);
58
+ const inputNumberEmits = {
59
+ [CHANGE_EVENT]: (cur, prev) => prev !== cur,
60
+ blur: (e) => e instanceof FocusEvent,
61
+ focus: (e) => e instanceof FocusEvent,
62
+ [INPUT_EVENT]: (val) => isNumber(val) || isNil(val),
63
+ [UPDATE_MODEL_EVENT]: (val) => isNumber(val) || isNil(val)
64
+ };
322
65
 
323
- export { InputNumber as default };
66
+ export { inputNumberEmits, inputNumberProps };
324
67
  //# sourceMappingURL=input-number2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-number2.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(inputNumberSize),\n ns.is('disabled', inputNumberDisabled),\n ns.is('without-controls', !controls),\n ns.is('controls-right', controlsAtRight),\n ]\"\n @dragstart.prevent\n >\n <span\n v-if=\"controls\"\n v-repeat-click=\"decrease\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.decrease')\"\n :class=\"[ns.e('decrease'), ns.is('disabled', minDisabled)]\"\n @keydown.enter=\"decrease\"\n >\n <el-icon>\n <arrow-down v-if=\"controlsAtRight\" />\n <minus v-else />\n </el-icon>\n </span>\n <span\n v-if=\"controls\"\n v-repeat-click=\"increase\"\n role=\"button\"\n :aria-label=\"t('el.inputNumber.increase')\"\n :class=\"[ns.e('increase'), ns.is('disabled', maxDisabled)]\"\n @keydown.enter=\"increase\"\n >\n <el-icon>\n <arrow-up v-if=\"controlsAtRight\" />\n <plus v-else />\n </el-icon>\n </span>\n <el-input\n :id=\"id\"\n ref=\"input\"\n type=\"number\"\n :step=\"step\"\n :model-value=\"displayValue\"\n :placeholder=\"placeholder\"\n :readonly=\"readonly\"\n :disabled=\"inputNumberDisabled\"\n :size=\"inputNumberSize\"\n :max=\"max\"\n :min=\"min\"\n :name=\"name\"\n :label=\"label\"\n :validate-event=\"false\"\n @wheel.prevent\n @keydown.up.prevent=\"increase\"\n @keydown.down.prevent=\"decrease\"\n @blur=\"handleBlur\"\n @focus=\"handleFocus\"\n @input=\"handleInput\"\n @change=\"handleInputChange\"\n />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, onMounted, onUpdated, reactive, ref } from 'vue'\nimport { watch } from '../../config-provider'\nimport { isNil } from 'lodash-unified'\nimport { ElInput } from '@element-plus/components/input'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormSize,\n} from '@element-plus/components/form'\nimport { vRepeatClick } from '@element-plus/directives'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { debugWarn, isNumber, isString, isUndefined } from '@element-plus/utils'\nimport { ArrowDown, ArrowUp, Minus, Plus } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { inputNumberEmits, inputNumberProps } from './input-number'\n\nimport type { InputInstance } from '@element-plus/components/input'\n\ndefineOptions({\n name: 'ElInputNumber',\n})\n\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('input-number')\nconst input = ref<InputInstance>()\n\ninterface Data {\n currentValue: number | null | undefined\n userInput: null | number | string\n}\nconst data = reactive<Data>({\n currentValue: props.modelValue,\n userInput: null,\n})\n\nconst { formItem } = useFormItem()\n\nconst minDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue <= props.min\n)\nconst maxDisabled = computed(\n () => isNumber(props.modelValue) && props.modelValue >= props.max\n)\n\nconst numPrecision = computed(() => {\n const stepPrecision = getPrecision(props.step)\n if (!isUndefined(props.precision)) {\n if (stepPrecision > props.precision) {\n debugWarn(\n 'InputNumber',\n 'precision should not be less than the decimal places of step'\n )\n }\n return props.precision\n } else {\n return Math.max(getPrecision(props.modelValue), stepPrecision)\n }\n})\nconst controlsAtRight = computed(() => {\n return props.controls && props.controlsPosition === 'right'\n})\n\nconst inputNumberSize = useFormSize()\nconst inputNumberDisabled = useFormDisabled()\n\nconst displayValue = computed(() => {\n if (data.userInput !== null) {\n return data.userInput\n }\n let currentValue: number | string | undefined | null = data.currentValue\n if (isNil(currentValue)) return ''\n if (isNumber(currentValue)) {\n if (Number.isNaN(currentValue)) return ''\n if (!isUndefined(props.precision)) {\n currentValue = currentValue.toFixed(props.precision)\n }\n }\n return currentValue\n})\nconst toPrecision = (num: number, pre?: number) => {\n if (isUndefined(pre)) pre = numPrecision.value\n if (pre === 0) return Math.round(num)\n let snum = String(num)\n const pointPos = snum.indexOf('.')\n if (pointPos === -1) return num\n const nums = snum.replace('.', '').split('')\n const datum = nums[pointPos + pre]\n if (!datum) return num\n const length = snum.length\n if (snum.charAt(length - 1) === '5') {\n snum = `${snum.slice(0, Math.max(0, length - 1))}6`\n }\n return Number.parseFloat(Number(snum).toFixed(pre))\n}\nconst getPrecision = (value: number | null | undefined) => {\n if (isNil(value)) return 0\n const valueString = value.toString()\n const dotPosition = valueString.indexOf('.')\n let precision = 0\n if (dotPosition !== -1) {\n precision = valueString.length - dotPosition - 1\n }\n return precision\n}\nconst ensurePrecision = (val: number, coefficient: 1 | -1 = 1) => {\n if (!isNumber(val)) return data.currentValue\n // Solve the accuracy problem of JS decimal calculation by converting the value to integer.\n return toPrecision(val + props.step * coefficient)\n}\nconst increase = () => {\n if (props.readonly || inputNumberDisabled.value || maxDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst decrease = () => {\n if (props.readonly || inputNumberDisabled.value || minDisabled.value) return\n const value = Number(displayValue.value) || 0\n const newVal = ensurePrecision(value, -1)\n setCurrentValue(newVal)\n emit(INPUT_EVENT, data.currentValue)\n}\nconst verifyValue = (\n value: number | string | null | undefined,\n update?: boolean\n): number | null | undefined => {\n const { max, min, step, precision, stepStrictly, valueOnClear } = props\n let newVal = Number(value)\n if (isNil(value) || Number.isNaN(newVal)) {\n return null\n }\n if (value === '') {\n if (valueOnClear === null) {\n return null\n }\n newVal = isString(valueOnClear) ? { min, max }[valueOnClear] : valueOnClear\n }\n if (stepStrictly) {\n newVal = toPrecision(Math.round(newVal / step) * step, precision)\n }\n if (!isUndefined(precision)) {\n newVal = toPrecision(newVal, precision)\n }\n if (newVal > max || newVal < min) {\n newVal = newVal > max ? max : min\n update && emit(UPDATE_MODEL_EVENT, newVal)\n }\n return newVal\n}\nconst setCurrentValue = (\n value: number | string | null | undefined,\n emitChange = true\n) => {\n const oldVal = data.currentValue\n const newVal = verifyValue(value)\n if (!emitChange) {\n emit(UPDATE_MODEL_EVENT, newVal!)\n return\n }\n if (oldVal === newVal) return\n data.userInput = null\n emit(UPDATE_MODEL_EVENT, newVal!)\n emit(CHANGE_EVENT, newVal!, oldVal!)\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n data.currentValue = newVal\n}\nconst handleInput = (value: string) => {\n data.userInput = value\n const newVal = value === '' ? null : Number(value)\n emit(INPUT_EVENT, newVal)\n setCurrentValue(newVal, false)\n}\nconst handleInputChange = (value: string) => {\n const newVal = value !== '' ? Number(value) : ''\n if ((isNumber(newVal) && !Number.isNaN(newVal)) || value === '') {\n setCurrentValue(newVal)\n }\n data.userInput = null\n}\n\nconst focus = () => {\n input.value?.focus?.()\n}\n\nconst blur = () => {\n input.value?.blur?.()\n}\n\nconst handleFocus = (event: MouseEvent | FocusEvent) => {\n emit('focus', event)\n}\n\nconst handleBlur = (event: MouseEvent | FocusEvent) => {\n emit('blur', event)\n if (props.validateEvent) {\n formItem?.validate?.('blur').catch((err) => debugWarn(err))\n }\n}\n\nwatch(\n () => props.modelValue,\n (value) => {\n const userInput = verifyValue(data.userInput)\n const newValue = verifyValue(value, true)\n if (!isNumber(userInput) && (!userInput || userInput !== newValue)) {\n if (data.userInput !== '') {\n data.currentValue = newValue\n data.userInput = null\n }\n }\n },\n { immediate: true }\n)\nonMounted(() => {\n const { min, max, modelValue } = props\n const innerInput = input.value?.input as HTMLInputElement\n innerInput.setAttribute('role', 'spinbutton')\n if (Number.isFinite(max)) {\n innerInput.setAttribute('aria-valuemax', String(max))\n } else {\n innerInput.removeAttribute('aria-valuemax')\n }\n if (Number.isFinite(min)) {\n innerInput.setAttribute('aria-valuemin', String(min))\n } else {\n innerInput.removeAttribute('aria-valuemin')\n }\n innerInput.setAttribute('aria-valuenow', String(data.currentValue))\n innerInput.setAttribute('aria-disabled', String(inputNumberDisabled.value))\n if (!isNumber(modelValue) && modelValue != null) {\n let val: number | null = Number(modelValue)\n if (Number.isNaN(val)) {\n val = null\n }\n emit(UPDATE_MODEL_EVENT, val!)\n }\n})\nonUpdated(() => {\n const innerInput = input.value?.input\n innerInput?.setAttribute('aria-valuenow', `${data.currentValue}`)\n})\ndefineExpose({\n /** @description get focus the input component */\n focus,\n /** @description remove focus the input component */\n blur,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;mCAsFc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,cAAc,CAAA,CAAA;AACtC,IAAA,MAAM,QAAQ,GAAmB,EAAA,CAAA;AAMjC,IAAA,MAAM,OAAO,QAAe,CAAA;AAAA,MAC1B,cAAc,KAAM,CAAA,UAAA;AAAA,MACpB,SAAW,EAAA,IAAA;AAAA,KACZ,CAAA,CAAA;AAED,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AAEjC,IAAM,MAAA,WAAA,GAAc,QAClB,CAAA,MAAM,QAAS,CAAA,KAAA,CAAM,UAAU,CAAK,IAAA,KAAA,CAAM,UAAc,IAAA,KAAA,CAAM,GAChE,CAAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"input-number2.mjs","sources":["../../../../../../packages/components/input-number/src/input-number.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type InputNumber from './input-number.vue'\n\nexport const inputNumberProps = buildProps({\n /**\n * @description same as `id` in native input\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description incremental step\n */\n step: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether input value can only be multiple of step\n */\n stepStrictly: Boolean,\n /**\n * @description the maximum allowed value\n */\n max: {\n type: Number,\n default: Number.POSITIVE_INFINITY,\n },\n /**\n * @description the minimum allowed value\n */\n min: {\n type: Number,\n default: Number.NEGATIVE_INFINITY,\n },\n /**\n * @description binding value\n */\n modelValue: Number,\n /**\n * @description same as `readonly` in native input\n */\n readonly: Boolean,\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description size of the component\n */\n size: useSizeProp,\n /**\n * @description whether to enable the control buttons\n */\n controls: {\n type: Boolean,\n default: true,\n },\n /**\n * @description position of the control buttons\n */\n controlsPosition: {\n type: String,\n default: '',\n values: ['', 'right'],\n },\n /**\n * @description value should be set when input box is cleared\n */\n valueOnClear: {\n type: [String, Number, null],\n validator: (val: 'min' | 'max' | number | null) =>\n val === null || isNumber(val) || ['min', 'max'].includes(val),\n default: null,\n },\n /**\n * @description same as `name` in native input\n */\n name: String,\n /**\n * @description same as `label` in native input\n */\n label: String,\n /**\n * @description same as `placeholder` in native input\n */\n placeholder: String,\n /**\n * @description precision of input value\n */\n precision: {\n type: Number,\n validator: (val: number) =>\n val >= 0 && val === Number.parseInt(`${val}`, 10),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>\n\nexport const inputNumberEmits = {\n [CHANGE_EVENT]: (cur: number | undefined, prev: number | undefined) =>\n prev !== cur,\n blur: (e: FocusEvent) => e instanceof FocusEvent,\n focus: (e: FocusEvent) => e instanceof FocusEvent,\n [INPUT_EVENT]: (val: number | null | undefined) =>\n isNumber(val) || isNil(val),\n [UPDATE_MODEL_EVENT]: (val: number | undefined) =>\n isNumber(val) || isNil(val),\n}\nexport type InputNumberEmits = typeof inputNumberEmits\n\nexport type InputNumberInstance = InstanceType<typeof InputNumber>\n"],"names":[],"mappings":";;;;;;;;;AAQY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM,CAAC,iBAAiB;AACrC,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM,CAAC,iBAAiB;AACrC,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,MAAM,EAAE,CAAC,EAAE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63
  };
64
64
  const addStyle = async (options, parent, instance) => {
65
- const { nextZIndex } = instance.vm.zIndex;
65
+ const { nextZIndex } = instance.vm.zIndex || instance.vm._.exposed.zIndex;
66
66
  const maskStyle = {};
67
67
  if (options.fullscreen) {
68
68
  instance.originalPosition.value = getStyle(document.body, "position");
@@ -86,7 +86,7 @@ const addStyle = async (options, parent, instance) => {
86
86
  }
87
87
  };
88
88
  const addClassList = (options, parent, instance) => {
89
- const ns = instance.vm.ns;
89
+ const ns = instance.vm.ns || instance.vm._.exposed.ns;
90
90
  if (!["absolute", "fixed", "sticky"].includes(instance.originalPosition.value)) {
91
91
  addClass(parent, ns.bm("parent", "relative"));
92
92
  } else {
@@ -1 +1 @@
1
- {"version":3,"file":"service.mjs","sources":["../../../../../../packages/components/loading/src/service.ts"],"sourcesContent":["// @ts-nocheck\nimport { nextTick } from 'vue'\nimport {\n addClass,\n getStyle,\n isClient,\n isString,\n removeClass,\n} from '@element-plus/utils'\nimport { createLoadingComponent } from './loading'\n\nimport type { UseNamespaceReturn, UseZIndexReturn } from '@element-plus/hooks'\nimport type { LoadingInstance } from './loading'\nimport type { LoadingOptionsResolved } from '..'\nimport type { LoadingOptions } from './types'\nimport type { CSSProperties } from 'vue'\n\nlet fullscreenInstance: LoadingInstance | undefined = undefined\n\nexport const Loading = function (\n options: LoadingOptions = {}\n): LoadingInstance {\n if (!isClient) return undefined as any\n\n const resolved = resolveOptions(options)\n\n if (resolved.fullscreen && fullscreenInstance) {\n return fullscreenInstance\n }\n\n const instance = createLoadingComponent({\n ...resolved,\n closed: () => {\n resolved.closed?.()\n if (resolved.fullscreen) fullscreenInstance = undefined\n },\n })\n\n addStyle(resolved, resolved.parent, instance)\n addClassList(resolved, resolved.parent, instance)\n\n resolved.parent.vLoadingAddClassList = () =>\n addClassList(resolved, resolved.parent, instance)\n\n /**\n * add loading-number to parent.\n * because if a fullscreen loading is triggered when somewhere\n * a v-loading.body was triggered before and it's parent is\n * document.body which with a margin , the fullscreen loading's\n * destroySelf function will remove 'el-loading-parent--relative',\n * and then the position of v-loading.body will be error.\n */\n let loadingNumber: string | null =\n resolved.parent.getAttribute('loading-number')\n if (!loadingNumber) {\n loadingNumber = '1'\n } else {\n loadingNumber = `${Number.parseInt(loadingNumber) + 1}`\n }\n resolved.parent.setAttribute('loading-number', loadingNumber)\n\n resolved.parent.appendChild(instance.$el)\n\n // after instance render, then modify visible to trigger transition\n nextTick(() => (instance.visible.value = resolved.visible))\n\n if (resolved.fullscreen) {\n fullscreenInstance = instance\n }\n return instance\n}\n\nconst resolveOptions = (options: LoadingOptions): LoadingOptionsResolved => {\n let target: HTMLElement\n if (isString(options.target)) {\n target =\n document.querySelector<HTMLElement>(options.target) ?? document.body\n } else {\n target = options.target || document.body\n }\n return {\n parent: target === document.body || options.body ? document.body : target,\n background: options.background || '',\n svg: options.svg || '',\n svgViewBox: options.svgViewBox || '',\n spinner: options.spinner || false,\n text: options.text || '',\n fullscreen: target === document.body && (options.fullscreen ?? true),\n lock: options.lock ?? false,\n customClass: options.customClass || '',\n visible: options.visible ?? true,\n target,\n }\n}\n\nconst addStyle = async (\n options: LoadingOptionsResolved,\n parent: HTMLElement,\n instance: LoadingInstance\n) => {\n const { nextZIndex } = (instance.vm as any).zIndex as UseZIndexReturn\n\n const maskStyle: CSSProperties = {}\n if (options.fullscreen) {\n instance.originalPosition.value = getStyle(document.body, 'position')\n instance.originalOverflow.value = getStyle(document.body, 'overflow')\n maskStyle.zIndex = nextZIndex()\n } else if (options.parent === document.body) {\n instance.originalPosition.value = getStyle(document.body, 'position')\n /**\n * await dom render when visible is true in init,\n * because some component's height maybe 0.\n * e.g. el-table.\n */\n await nextTick()\n for (const property of ['top', 'left']) {\n const scroll = property === 'top' ? 'scrollTop' : 'scrollLeft'\n maskStyle[property] = `${\n (options.target as HTMLElement).getBoundingClientRect()[property] +\n document.body[scroll] +\n document.documentElement[scroll] -\n Number.parseInt(getStyle(document.body, `margin-${property}`), 10)\n }px`\n }\n for (const property of ['height', 'width']) {\n maskStyle[property] = `${\n (options.target as HTMLElement).getBoundingClientRect()[property]\n }px`\n }\n } else {\n instance.originalPosition.value = getStyle(parent, 'position')\n }\n for (const [key, value] of Object.entries(maskStyle)) {\n instance.$el.style[key] = value\n }\n}\n\nconst addClassList = (\n options: LoadingOptions,\n parent: HTMLElement,\n instance: LoadingInstance\n) => {\n const ns = (instance.vm as any).ns as UseNamespaceReturn\n\n if (\n !['absolute', 'fixed', 'sticky'].includes(instance.originalPosition.value)\n ) {\n addClass(parent, ns.bm('parent', 'relative'))\n } else {\n removeClass(parent, ns.bm('parent', 'relative'))\n }\n if (options.fullscreen && options.lock) {\n addClass(parent, ns.bm('parent', 'hidden'))\n } else {\n removeClass(parent, ns.bm('parent', 'hidden'))\n }\n}\n"],"names":[],"mappings":";;;;;;;AASA,IAAI,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpB,MAAC,OAAO,GAAG,SAAS,OAAO,GAAG,EAAE,EAAE;AAC9C,EAAE,IAAI,CAAC,QAAQ;AACf,IAAI,OAAO,KAAK,CAAC,CAAC;AAClB,EAAE,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,EAAE,IAAI,QAAQ,CAAC,UAAU,IAAI,kBAAkB,EAAE;AACjD,IAAI,OAAO,kBAAkB,CAAC;AAC9B,GAAG;AACH,EAAE,MAAM,QAAQ,GAAG,sBAAsB,CAAC;AAC1C,IAAI,GAAG,QAAQ;AACf,IAAI,MAAM,EAAE,MAAM;AAClB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,CAAC,EAAE,GAAG,QAAQ,CAAC,MAAM,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAClE,MAAM,IAAI,QAAQ,CAAC,UAAU;AAC7B,QAAQ,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACpC,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,QAAQ,CAA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esContent":["// @ts-nocheck\nimport { nextTick } from 'vue'\nimport {\n addClass,\n getStyle,\n isClient,\n isString,\n removeClass,\n} from '@element-plus/utils'\nimport { createLoadingComponent } from './loading'\n\nimport type { UseNamespaceReturn, UseZIndexReturn } from '@element-plus/hooks'\nimport type { LoadingInstance } from './loading'\nimport type { LoadingOptionsResolved } from '..'\nimport type { LoadingOptions } from './types'\nimport type { CSSProperties } from 'vue'\n\nlet fullscreenInstance: LoadingInstance | undefined = undefined\n\nexport const Loading = function (\n options: LoadingOptions = {}\n): LoadingInstance {\n if (!isClient) return undefined as any\n\n const resolved = resolveOptions(options)\n\n if (resolved.fullscreen && fullscreenInstance) {\n return fullscreenInstance\n }\n\n const instance = createLoadingComponent({\n ...resolved,\n closed: () => {\n resolved.closed?.()\n if (resolved.fullscreen) fullscreenInstance = undefined\n },\n })\n\n addStyle(resolved, resolved.parent, instance)\n addClassList(resolved, resolved.parent, instance)\n\n resolved.parent.vLoadingAddClassList = () =>\n addClassList(resolved, resolved.parent, instance)\n\n /**\n * add loading-number to parent.\n * because if a fullscreen loading is triggered when somewhere\n * a v-loading.body was triggered before and it's parent is\n * document.body which with a margin , the fullscreen loading's\n * destroySelf function will remove 'el-loading-parent--relative',\n * and then the position of v-loading.body will be error.\n */\n let loadingNumber: string | null =\n resolved.parent.getAttribute('loading-number')\n if (!loadingNumber) {\n loadingNumber = '1'\n } else {\n loadingNumber = `${Number.parseInt(loadingNumber) + 1}`\n }\n resolved.parent.setAttribute('loading-number', loadingNumber)\n\n resolved.parent.appendChild(instance.$el)\n\n // after instance render, then modify visible to trigger transition\n nextTick(() => (instance.visible.value = resolved.visible))\n\n if (resolved.fullscreen) {\n fullscreenInstance = instance\n }\n return instance\n}\n\nconst resolveOptions = (options: LoadingOptions): LoadingOptionsResolved => {\n let target: HTMLElement\n if (isString(options.target)) {\n target =\n document.querySelector<HTMLElement>(options.target) ?? document.body\n } else {\n target = options.target || document.body\n }\n return {\n parent: target === document.body || options.body ? document.body : target,\n background: options.background || '',\n svg: options.svg || '',\n svgViewBox: options.svgViewBox || '',\n spinner: options.spinner || false,\n text: options.text || '',\n fullscreen: target === document.body && (options.fullscreen ?? true),\n lock: options.lock ?? false,\n customClass: options.customClass || '',\n visible: options.visible ?? true,\n target,\n }\n}\n\nconst addStyle = async (\n options: LoadingOptionsResolved,\n parent: HTMLElement,\n instance: LoadingInstance\n) => {\n // Compatible with the instance data format of vue@3.2.12 and earlier versions #12351\n const { nextZIndex } =\n ((instance.vm as any).zIndex as UseZIndexReturn) ||\n (instance.vm as any)._.exposed.zIndex\n\n const maskStyle: CSSProperties = {}\n if (options.fullscreen) {\n instance.originalPosition.value = getStyle(document.body, 'position')\n instance.originalOverflow.value = getStyle(document.body, 'overflow')\n maskStyle.zIndex = nextZIndex()\n } else if (options.parent === document.body) {\n instance.originalPosition.value = getStyle(document.body, 'position')\n /**\n * await dom render when visible is true in init,\n * because some component's height maybe 0.\n * e.g. el-table.\n */\n await nextTick()\n for (const property of ['top', 'left']) {\n const scroll = property === 'top' ? 'scrollTop' : 'scrollLeft'\n maskStyle[property] = `${\n (options.target as HTMLElement).getBoundingClientRect()[property] +\n document.body[scroll] +\n document.documentElement[scroll] -\n Number.parseInt(getStyle(document.body, `margin-${property}`), 10)\n }px`\n }\n for (const property of ['height', 'width']) {\n maskStyle[property] = `${\n (options.target as HTMLElement).getBoundingClientRect()[property]\n }px`\n }\n } else {\n instance.originalPosition.value = getStyle(parent, 'position')\n }\n for (const [key, value] of Object.entries(maskStyle)) {\n instance.$el.style[key] = value\n }\n}\n\nconst addClassList = (\n options: LoadingOptions,\n parent: HTMLElement,\n instance: LoadingInstance\n) => {\n // Compatible with the instance data format of vue@3.2.12 and earlier versions #12351\n const ns =\n ((instance.vm as any).ns as UseNamespaceReturn) ||\n (instance.vm as any)._.exposed.ns\n\n if (\n !['absolute', 'fixed', 'sticky'].includes(instance.originalPosition.value)\n ) {\n addClass(parent, ns.bm('parent', 'relative'))\n } else {\n removeClass(parent, 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AK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AACpC,GAAG;AACH,CAAC,CAAC;AACF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,KAAK;AACpD,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;AACxD,EAAE,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE;AAClF,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAClD,GAAG,MAAM;AACT,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AACrD,GAAG;AACH,EAAE,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,IAAI,EAAE;AAC1C,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAChD,GAAG,MAAM;AACT,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AACnD,GAAG;AACH,CAAC;;;;"}
@@ -1,12 +1,12 @@
1
1
  import '../../utils/index.mjs';
2
2
  import Menu from './src/menu.mjs';
3
3
  export { menuEmits, menuProps } from './src/menu.mjs';
4
- import MenuItem from './src/menu-item.mjs';
5
- import MenuItemGroup from './src/menu-item-group.mjs';
4
+ import MenuItem from './src/menu-item2.mjs';
5
+ import MenuItemGroup from './src/menu-item-group2.mjs';
6
6
  import SubMenu from './src/sub-menu.mjs';
7
7
  export { subMenuProps } from './src/sub-menu.mjs';
8
- export { menuItemEmits, menuItemProps } from './src/menu-item2.mjs';
9
- export { menuItemGroupProps } from './src/menu-item-group2.mjs';
8
+ export { menuItemEmits, menuItemProps } from './src/menu-item.mjs';
9
+ export { menuItemGroupProps } from './src/menu-item-group.mjs';
10
10
  import './src/types.mjs';
11
11
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
12
12
 
@@ -1,37 +1,6 @@
1
- import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, createTextVNode, toDisplayString, renderSlot } from 'vue';
2
- import '../../../hooks/index.mjs';
3
- import { menuItemGroupProps } from './menu-item-group2.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ const menuItemGroupProps = {
2
+ title: String
3
+ };
6
4
 
7
- const COMPONENT_NAME = "ElMenuItemGroup";
8
- const _sfc_main = defineComponent({
9
- name: COMPONENT_NAME,
10
- props: menuItemGroupProps,
11
- setup() {
12
- const ns = useNamespace("menu-item-group");
13
- return {
14
- ns
15
- };
16
- }
17
- });
18
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
19
- return openBlock(), createElementBlock("li", {
20
- class: normalizeClass(_ctx.ns.b())
21
- }, [
22
- createElementVNode("div", {
23
- class: normalizeClass(_ctx.ns.e("title"))
24
- }, [
25
- !_ctx.$slots.title ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
26
- createTextVNode(toDisplayString(_ctx.title), 1)
27
- ], 64)) : renderSlot(_ctx.$slots, "title", { key: 1 })
28
- ], 2),
29
- createElementVNode("ul", null, [
30
- renderSlot(_ctx.$slots, "default")
31
- ])
32
- ], 2);
33
- }
34
- var MenuItemGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\workspace\\element-pe\\packages\\components\\menu\\src\\menu-item-group.vue"]]);
35
-
36
- export { MenuItemGroup as default };
5
+ export { menuItemGroupProps };
37
6
  //# sourceMappingURL=menu-item-group.mjs.map