element-pe 2.2.85 → 2.2.87

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 (442) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +0 -6
  3. package/dist/index.full.min.js +1 -1
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +1 -1
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +0 -6
  8. package/es/components/alert/index.mjs +2 -2
  9. package/es/components/alert/src/alert.mjs +38 -103
  10. package/es/components/alert/src/alert.mjs.map +1 -1
  11. package/es/components/alert/src/alert2.mjs +103 -38
  12. package/es/components/alert/src/alert2.mjs.map +1 -1
  13. package/es/components/badge/index.mjs +2 -2
  14. package/es/components/badge/src/badge.mjs +59 -17
  15. package/es/components/badge/src/badge.mjs.map +1 -1
  16. package/es/components/badge/src/badge2.mjs +17 -59
  17. package/es/components/badge/src/badge2.mjs.map +1 -1
  18. package/es/components/breadcrumb/index.mjs +4 -4
  19. package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -56
  20. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  21. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -11
  22. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  23. package/es/components/breadcrumb/src/breadcrumb.mjs +36 -11
  24. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  25. package/es/components/breadcrumb/src/breadcrumb2.mjs +11 -36
  26. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  27. package/es/components/button/index.mjs +2 -2
  28. package/es/components/button/src/button-group.mjs +1 -1
  29. package/es/components/button/src/button.mjs +57 -76
  30. package/es/components/button/src/button.mjs.map +1 -1
  31. package/es/components/button/src/button2.mjs +76 -57
  32. package/es/components/button/src/button2.mjs.map +1 -1
  33. package/es/components/calendar/src/calendar.mjs +1 -1
  34. package/es/components/calendar/src/date-table.mjs +33 -87
  35. package/es/components/calendar/src/date-table.mjs.map +1 -1
  36. package/es/components/calendar/src/date-table2.mjs +87 -33
  37. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  38. package/es/components/calendar/src/use-date-table.mjs +1 -1
  39. package/es/components/card/index.mjs +2 -2
  40. package/es/components/card/src/card.mjs +17 -35
  41. package/es/components/card/src/card.mjs.map +1 -1
  42. package/es/components/card/src/card2.mjs +35 -17
  43. package/es/components/card/src/card2.mjs.map +1 -1
  44. package/es/components/cascader/src/cascader.mjs +1 -1
  45. package/es/components/collection/index.mjs +1 -1
  46. package/es/components/collection/src/collection.mjs +10 -66
  47. package/es/components/collection/src/collection.mjs.map +1 -1
  48. package/es/components/collection/src/collection2.mjs +66 -10
  49. package/es/components/collection/src/collection2.mjs.map +1 -1
  50. package/es/components/descriptions/src/description.mjs +1 -1
  51. package/es/components/descriptions/src/descriptions-row.mjs +7 -64
  52. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  53. package/es/components/descriptions/src/descriptions-row2.mjs +64 -7
  54. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  55. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
  56. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  57. package/es/components/dropdown/src/dropdown.mjs +1 -1
  58. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  59. package/es/components/form/index.mjs +4 -4
  60. package/es/components/form/src/form-item.mjs +46 -328
  61. package/es/components/form/src/form-item.mjs.map +1 -1
  62. package/es/components/form/src/form-item2.mjs +328 -46
  63. package/es/components/form/src/form-item2.mjs.map +1 -1
  64. package/es/components/form/src/form.mjs +58 -150
  65. package/es/components/form/src/form.mjs.map +1 -1
  66. package/es/components/form/src/form2.mjs +150 -58
  67. package/es/components/form/src/form2.mjs.map +1 -1
  68. package/es/components/index.mjs +29 -29
  69. package/es/components/input/index.mjs +2 -2
  70. package/es/components/input/src/input.mjs +114 -468
  71. package/es/components/input/src/input.mjs.map +1 -1
  72. package/es/components/input/src/input2.mjs +468 -114
  73. package/es/components/input/src/input2.mjs.map +1 -1
  74. package/es/components/input-number/index.mjs +2 -2
  75. package/es/components/input-number/src/input-number.mjs +335 -69
  76. package/es/components/input-number/src/input-number.mjs.map +1 -1
  77. package/es/components/input-number/src/input-number2.mjs +69 -335
  78. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  79. package/es/components/pagination/src/components/next.mjs +19 -38
  80. package/es/components/pagination/src/components/next.mjs.map +1 -1
  81. package/es/components/pagination/src/components/next2.mjs +38 -19
  82. package/es/components/pagination/src/components/next2.mjs.map +1 -1
  83. package/es/components/pagination/src/components/prev.mjs +18 -38
  84. package/es/components/pagination/src/components/prev.mjs.map +1 -1
  85. package/es/components/pagination/src/components/prev2.mjs +38 -18
  86. package/es/components/pagination/src/components/prev2.mjs.map +1 -1
  87. package/es/components/pagination/src/components/total.mjs +28 -7
  88. package/es/components/pagination/src/components/total.mjs.map +1 -1
  89. package/es/components/pagination/src/components/total2.mjs +7 -28
  90. package/es/components/pagination/src/components/total2.mjs.map +1 -1
  91. package/es/components/pagination/src/pagination.mjs +3 -3
  92. package/es/components/popconfirm/index.mjs +2 -2
  93. package/es/components/popconfirm/src/popconfirm.mjs +47 -110
  94. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  95. package/es/components/popconfirm/src/popconfirm2.mjs +110 -47
  96. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  97. package/es/components/popover/index.mjs +2 -2
  98. package/es/components/popover/src/popover.mjs +111 -66
  99. package/es/components/popover/src/popover.mjs.map +1 -1
  100. package/es/components/popover/src/popover2.mjs +66 -111
  101. package/es/components/popover/src/popover2.mjs.map +1 -1
  102. package/es/components/radio/index.mjs +6 -6
  103. package/es/components/radio/src/radio-button.mjs +9 -67
  104. package/es/components/radio/src/radio-button.mjs.map +1 -1
  105. package/es/components/radio/src/radio-button2.mjs +67 -9
  106. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  107. package/es/components/radio/src/radio-group.mjs +42 -70
  108. package/es/components/radio/src/radio-group.mjs.map +1 -1
  109. package/es/components/radio/src/radio-group2.mjs +70 -42
  110. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  111. package/es/components/radio/src/radio.mjs +35 -76
  112. package/es/components/radio/src/radio.mjs.map +1 -1
  113. package/es/components/radio/src/radio2.mjs +76 -35
  114. package/es/components/radio/src/radio2.mjs.map +1 -1
  115. package/es/components/resizable-columns/index.mjs +4 -4
  116. package/es/components/resizable-columns/src/resizable-column.mjs +145 -8
  117. package/es/components/resizable-columns/src/resizable-column.mjs.map +1 -1
  118. package/es/components/resizable-columns/src/resizable-column2.mjs +8 -145
  119. package/es/components/resizable-columns/src/resizable-column2.mjs.map +1 -1
  120. package/es/components/resizable-columns/src/resizable-columns.mjs +248 -21
  121. package/es/components/resizable-columns/src/resizable-columns.mjs.map +1 -1
  122. package/es/components/resizable-columns/src/resizable-columns2.mjs +21 -254
  123. package/es/components/resizable-columns/src/resizable-columns2.mjs.map +1 -1
  124. package/es/components/result/index.mjs +2 -2
  125. package/es/components/result/src/result.mjs +63 -29
  126. package/es/components/result/src/result.mjs.map +1 -1
  127. package/es/components/result/src/result2.mjs +29 -63
  128. package/es/components/result/src/result2.mjs.map +1 -1
  129. package/es/components/roving-focus-group/index.mjs +3 -3
  130. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  131. package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
  132. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  133. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
  134. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  135. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  136. package/es/components/row/index.mjs +2 -2
  137. package/es/components/row/src/row.mjs +45 -29
  138. package/es/components/row/src/row.mjs.map +1 -1
  139. package/es/components/row/src/row2.mjs +29 -45
  140. package/es/components/row/src/row2.mjs.map +1 -1
  141. package/es/components/select/src/select.mjs +1 -1
  142. package/es/components/skeleton/index.mjs +2 -2
  143. package/es/components/skeleton/src/skeleton.mjs +22 -49
  144. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  145. package/es/components/skeleton/src/skeleton2.mjs +49 -22
  146. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  147. package/es/components/slider/index.mjs +2 -2
  148. package/es/components/slider/src/slider.mjs +96 -237
  149. package/es/components/slider/src/slider.mjs.map +1 -1
  150. package/es/components/slider/src/slider2.mjs +237 -96
  151. package/es/components/slider/src/slider2.mjs.map +1 -1
  152. package/es/components/steps/index.mjs +4 -4
  153. package/es/components/steps/src/item.mjs +193 -19
  154. package/es/components/steps/src/item.mjs.map +1 -1
  155. package/es/components/steps/src/item2.mjs +19 -193
  156. package/es/components/steps/src/item2.mjs.map +1 -1
  157. package/es/components/steps/src/steps.mjs +39 -36
  158. package/es/components/steps/src/steps.mjs.map +1 -1
  159. package/es/components/steps/src/steps2.mjs +36 -39
  160. package/es/components/steps/src/steps2.mjs.map +1 -1
  161. package/es/components/switch/index.mjs +2 -2
  162. package/es/components/switch/src/switch.mjs +99 -267
  163. package/es/components/switch/src/switch.mjs.map +1 -1
  164. package/es/components/switch/src/switch2.mjs +267 -99
  165. package/es/components/switch/src/switch2.mjs.map +1 -1
  166. package/es/components/tabs/index.mjs +1 -1
  167. package/es/components/tabs/src/tab-bar.mjs +7 -75
  168. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  169. package/es/components/tabs/src/tab-bar2.mjs +75 -7
  170. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  171. package/es/components/tabs/src/tab-nav.mjs +1 -1
  172. package/es/components/tag/index.mjs +2 -2
  173. package/es/components/tag/src/tag.mjs +98 -33
  174. package/es/components/tag/src/tag.mjs.map +1 -1
  175. package/es/components/tag/src/tag2.mjs +33 -98
  176. package/es/components/tag/src/tag2.mjs.map +1 -1
  177. package/es/components/text/index.mjs +2 -2
  178. package/es/components/text/src/text.mjs +35 -22
  179. package/es/components/text/src/text.mjs.map +1 -1
  180. package/es/components/text/src/text2.mjs +22 -35
  181. package/es/components/text/src/text2.mjs.map +1 -1
  182. package/es/components/time-select/index.mjs +1 -1
  183. package/es/components/time-select/src/time-select.mjs +132 -55
  184. package/es/components/time-select/src/time-select.mjs.map +1 -1
  185. package/es/components/time-select/src/time-select2.mjs +55 -132
  186. package/es/components/time-select/src/time-select2.mjs.map +1 -1
  187. package/es/components/tooltip-v2/index.mjs +5 -5
  188. package/es/components/tooltip-v2/src/arrow.mjs +22 -37
  189. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  190. package/es/components/tooltip-v2/src/arrow2.mjs +37 -22
  191. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  192. package/es/components/tooltip-v2/src/content.mjs +114 -50
  193. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  194. package/es/components/tooltip-v2/src/content2.mjs +50 -114
  195. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  196. package/es/components/tooltip-v2/src/tooltip.mjs +21 -78
  197. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  198. package/es/components/tooltip-v2/src/tooltip2.mjs +78 -21
  199. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  200. package/es/components/tooltip-v2/src/trigger.mjs +91 -12
  201. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  202. package/es/components/tooltip-v2/src/trigger2.mjs +12 -91
  203. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  204. package/es/components/transfer/index.mjs +2 -2
  205. package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
  206. package/es/components/transfer/src/transfer-panel2.mjs +1 -1
  207. package/es/components/transfer/src/transfer.mjs +162 -69
  208. package/es/components/transfer/src/transfer.mjs.map +1 -1
  209. package/es/components/transfer/src/transfer2.mjs +69 -162
  210. package/es/components/transfer/src/transfer2.mjs.map +1 -1
  211. package/es/components/upload/index.mjs +1 -1
  212. package/es/components/upload/src/upload-list.mjs +26 -179
  213. package/es/components/upload/src/upload-list.mjs.map +1 -1
  214. package/es/components/upload/src/upload-list2.mjs +179 -26
  215. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  216. package/es/components/upload/src/upload2.mjs +1 -1
  217. package/es/components/visual-hidden/index.mjs +3 -3
  218. package/es/components/visual-hidden/src/visual-hidden.mjs +7 -35
  219. package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
  220. package/es/components/visual-hidden/src/visual-hidden2.mjs +35 -7
  221. package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
  222. package/es/index.mjs +29 -29
  223. package/lib/components/alert/index.js +2 -2
  224. package/lib/components/alert/src/alert.js +39 -102
  225. package/lib/components/alert/src/alert.js.map +1 -1
  226. package/lib/components/alert/src/alert2.js +102 -39
  227. package/lib/components/alert/src/alert2.js.map +1 -1
  228. package/lib/components/badge/index.js +2 -2
  229. package/lib/components/badge/src/badge.js +59 -17
  230. package/lib/components/badge/src/badge.js.map +1 -1
  231. package/lib/components/badge/src/badge2.js +17 -59
  232. package/lib/components/badge/src/badge2.js.map +1 -1
  233. package/lib/components/breadcrumb/index.js +4 -4
  234. package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -56
  235. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  236. package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -11
  237. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  238. package/lib/components/breadcrumb/src/breadcrumb.js +36 -11
  239. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  240. package/lib/components/breadcrumb/src/breadcrumb2.js +11 -36
  241. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  242. package/lib/components/button/index.js +2 -2
  243. package/lib/components/button/src/button-group.js +1 -1
  244. package/lib/components/button/src/button.js +60 -76
  245. package/lib/components/button/src/button.js.map +1 -1
  246. package/lib/components/button/src/button2.js +76 -60
  247. package/lib/components/button/src/button2.js.map +1 -1
  248. package/lib/components/calendar/src/calendar.js +1 -1
  249. package/lib/components/calendar/src/date-table.js +37 -87
  250. package/lib/components/calendar/src/date-table.js.map +1 -1
  251. package/lib/components/calendar/src/date-table2.js +87 -37
  252. package/lib/components/calendar/src/date-table2.js.map +1 -1
  253. package/lib/components/calendar/src/use-date-table.js +1 -1
  254. package/lib/components/card/index.js +2 -2
  255. package/lib/components/card/src/card.js +17 -35
  256. package/lib/components/card/src/card.js.map +1 -1
  257. package/lib/components/card/src/card2.js +35 -17
  258. package/lib/components/card/src/card2.js.map +1 -1
  259. package/lib/components/cascader/src/cascader.js +1 -1
  260. package/lib/components/collection/index.js +1 -1
  261. package/lib/components/collection/src/collection.js +9 -66
  262. package/lib/components/collection/src/collection.js.map +1 -1
  263. package/lib/components/collection/src/collection2.js +66 -9
  264. package/lib/components/collection/src/collection2.js.map +1 -1
  265. package/lib/components/descriptions/src/description.js +1 -1
  266. package/lib/components/descriptions/src/descriptions-row.js +7 -64
  267. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  268. package/lib/components/descriptions/src/descriptions-row2.js +64 -7
  269. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  270. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
  271. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  272. package/lib/components/dropdown/src/dropdown.js +1 -1
  273. package/lib/components/dropdown/src/dropdown2.js +1 -1
  274. package/lib/components/form/index.js +4 -4
  275. package/lib/components/form/src/form-item.js +47 -332
  276. package/lib/components/form/src/form-item.js.map +1 -1
  277. package/lib/components/form/src/form-item2.js +332 -47
  278. package/lib/components/form/src/form-item2.js.map +1 -1
  279. package/lib/components/form/src/form.js +58 -149
  280. package/lib/components/form/src/form.js.map +1 -1
  281. package/lib/components/form/src/form2.js +149 -58
  282. package/lib/components/form/src/form2.js.map +1 -1
  283. package/lib/components/index.js +29 -29
  284. package/lib/components/input/index.js +2 -2
  285. package/lib/components/input/src/input.js +114 -467
  286. package/lib/components/input/src/input.js.map +1 -1
  287. package/lib/components/input/src/input2.js +467 -114
  288. package/lib/components/input/src/input2.js.map +1 -1
  289. package/lib/components/input-number/index.js +2 -2
  290. package/lib/components/input-number/src/input-number.js +333 -68
  291. package/lib/components/input-number/src/input-number.js.map +1 -1
  292. package/lib/components/input-number/src/input-number2.js +68 -333
  293. package/lib/components/input-number/src/input-number2.js.map +1 -1
  294. package/lib/components/pagination/src/components/next.js +19 -38
  295. package/lib/components/pagination/src/components/next.js.map +1 -1
  296. package/lib/components/pagination/src/components/next2.js +38 -19
  297. package/lib/components/pagination/src/components/next2.js.map +1 -1
  298. package/lib/components/pagination/src/components/prev.js +19 -38
  299. package/lib/components/pagination/src/components/prev.js.map +1 -1
  300. package/lib/components/pagination/src/components/prev2.js +38 -19
  301. package/lib/components/pagination/src/components/prev2.js.map +1 -1
  302. package/lib/components/pagination/src/components/total.js +28 -7
  303. package/lib/components/pagination/src/components/total.js.map +1 -1
  304. package/lib/components/pagination/src/components/total2.js +7 -28
  305. package/lib/components/pagination/src/components/total2.js.map +1 -1
  306. package/lib/components/pagination/src/pagination.js +3 -3
  307. package/lib/components/popconfirm/index.js +2 -2
  308. package/lib/components/popconfirm/src/popconfirm.js +48 -110
  309. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  310. package/lib/components/popconfirm/src/popconfirm2.js +110 -48
  311. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  312. package/lib/components/popover/index.js +2 -2
  313. package/lib/components/popover/src/popover.js +111 -67
  314. package/lib/components/popover/src/popover.js.map +1 -1
  315. package/lib/components/popover/src/popover2.js +67 -111
  316. package/lib/components/popover/src/popover2.js.map +1 -1
  317. package/lib/components/radio/index.js +6 -6
  318. package/lib/components/radio/src/radio-button.js +9 -67
  319. package/lib/components/radio/src/radio-button.js.map +1 -1
  320. package/lib/components/radio/src/radio-button2.js +67 -9
  321. package/lib/components/radio/src/radio-button2.js.map +1 -1
  322. package/lib/components/radio/src/radio-group.js +43 -70
  323. package/lib/components/radio/src/radio-group.js.map +1 -1
  324. package/lib/components/radio/src/radio-group2.js +70 -43
  325. package/lib/components/radio/src/radio-group2.js.map +1 -1
  326. package/lib/components/radio/src/radio.js +37 -76
  327. package/lib/components/radio/src/radio.js.map +1 -1
  328. package/lib/components/radio/src/radio2.js +76 -37
  329. package/lib/components/radio/src/radio2.js.map +1 -1
  330. package/lib/components/resizable-columns/index.js +4 -4
  331. package/lib/components/resizable-columns/src/resizable-column.js +145 -8
  332. package/lib/components/resizable-columns/src/resizable-column.js.map +1 -1
  333. package/lib/components/resizable-columns/src/resizable-column2.js +8 -145
  334. package/lib/components/resizable-columns/src/resizable-column2.js.map +1 -1
  335. package/lib/components/resizable-columns/src/resizable-columns.js +248 -21
  336. package/lib/components/resizable-columns/src/resizable-columns.js.map +1 -1
  337. package/lib/components/resizable-columns/src/resizable-columns2.js +21 -254
  338. package/lib/components/resizable-columns/src/resizable-columns2.js.map +1 -1
  339. package/lib/components/result/index.js +2 -2
  340. package/lib/components/result/src/result.js +63 -31
  341. package/lib/components/result/src/result.js.map +1 -1
  342. package/lib/components/result/src/result2.js +31 -63
  343. package/lib/components/result/src/result2.js.map +1 -1
  344. package/lib/components/roving-focus-group/index.js +2 -2
  345. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  346. package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
  347. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  348. package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
  349. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  350. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  351. package/lib/components/row/index.js +2 -2
  352. package/lib/components/row/src/row.js +45 -31
  353. package/lib/components/row/src/row.js.map +1 -1
  354. package/lib/components/row/src/row2.js +31 -45
  355. package/lib/components/row/src/row2.js.map +1 -1
  356. package/lib/components/select/src/select.js +1 -1
  357. package/lib/components/skeleton/index.js +2 -2
  358. package/lib/components/skeleton/src/skeleton.js +22 -49
  359. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  360. package/lib/components/skeleton/src/skeleton2.js +49 -22
  361. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  362. package/lib/components/slider/index.js +2 -2
  363. package/lib/components/slider/src/slider.js +97 -237
  364. package/lib/components/slider/src/slider.js.map +1 -1
  365. package/lib/components/slider/src/slider2.js +237 -97
  366. package/lib/components/slider/src/slider2.js.map +1 -1
  367. package/lib/components/steps/index.js +4 -4
  368. package/lib/components/steps/src/item.js +193 -19
  369. package/lib/components/steps/src/item.js.map +1 -1
  370. package/lib/components/steps/src/item2.js +19 -193
  371. package/lib/components/steps/src/item2.js.map +1 -1
  372. package/lib/components/steps/src/steps.js +39 -37
  373. package/lib/components/steps/src/steps.js.map +1 -1
  374. package/lib/components/steps/src/steps2.js +37 -39
  375. package/lib/components/steps/src/steps2.js.map +1 -1
  376. package/lib/components/switch/index.js +2 -2
  377. package/lib/components/switch/src/switch.js +99 -266
  378. package/lib/components/switch/src/switch.js.map +1 -1
  379. package/lib/components/switch/src/switch2.js +266 -99
  380. package/lib/components/switch/src/switch2.js.map +1 -1
  381. package/lib/components/tabs/index.js +1 -1
  382. package/lib/components/tabs/src/tab-bar.js +7 -75
  383. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  384. package/lib/components/tabs/src/tab-bar2.js +75 -7
  385. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  386. package/lib/components/tabs/src/tab-nav.js +1 -1
  387. package/lib/components/tag/index.js +2 -2
  388. package/lib/components/tag/src/tag.js +98 -34
  389. package/lib/components/tag/src/tag.js.map +1 -1
  390. package/lib/components/tag/src/tag2.js +34 -98
  391. package/lib/components/tag/src/tag2.js.map +1 -1
  392. package/lib/components/text/index.js +2 -2
  393. package/lib/components/text/src/text.js +35 -22
  394. package/lib/components/text/src/text.js.map +1 -1
  395. package/lib/components/text/src/text2.js +22 -35
  396. package/lib/components/text/src/text2.js.map +1 -1
  397. package/lib/components/time-select/index.js +1 -1
  398. package/lib/components/time-select/src/time-select.js +137 -55
  399. package/lib/components/time-select/src/time-select.js.map +1 -1
  400. package/lib/components/time-select/src/time-select2.js +55 -137
  401. package/lib/components/time-select/src/time-select2.js.map +1 -1
  402. package/lib/components/tooltip-v2/index.js +5 -5
  403. package/lib/components/tooltip-v2/src/arrow.js +23 -37
  404. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  405. package/lib/components/tooltip-v2/src/arrow2.js +37 -23
  406. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  407. package/lib/components/tooltip-v2/src/content.js +114 -50
  408. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  409. package/lib/components/tooltip-v2/src/content2.js +50 -114
  410. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  411. package/lib/components/tooltip-v2/src/tooltip.js +21 -78
  412. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  413. package/lib/components/tooltip-v2/src/tooltip2.js +78 -21
  414. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  415. package/lib/components/tooltip-v2/src/trigger.js +91 -12
  416. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  417. package/lib/components/tooltip-v2/src/trigger2.js +12 -91
  418. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  419. package/lib/components/transfer/index.js +2 -2
  420. package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
  421. package/lib/components/transfer/src/transfer-panel2.js +1 -1
  422. package/lib/components/transfer/src/transfer.js +162 -73
  423. package/lib/components/transfer/src/transfer.js.map +1 -1
  424. package/lib/components/transfer/src/transfer2.js +73 -162
  425. package/lib/components/transfer/src/transfer2.js.map +1 -1
  426. package/lib/components/upload/index.js +1 -1
  427. package/lib/components/upload/src/upload-list.js +27 -179
  428. package/lib/components/upload/src/upload-list.js.map +1 -1
  429. package/lib/components/upload/src/upload-list2.js +179 -27
  430. package/lib/components/upload/src/upload-list2.js.map +1 -1
  431. package/lib/components/upload/src/upload2.js +1 -1
  432. package/lib/components/visual-hidden/index.js +2 -2
  433. package/lib/components/visual-hidden/src/visual-hidden.js +7 -35
  434. package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
  435. package/lib/components/visual-hidden/src/visual-hidden2.js +35 -7
  436. package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
  437. package/lib/index.js +29 -29
  438. package/package.json +1 -1
  439. package/theme-chalk/el-resizable-columns.css +1 -1
  440. package/theme-chalk/index.css +1 -1
  441. package/theme-chalk/src/resizable-columns.scss +2 -2
  442. package/web-types.json +1 -1
@@ -2,46 +2,96 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- require('../../time-picker/index.js');
7
- var utils = require('../../time-picker/src/utils.js');
8
- var runtime = require('../../../utils/vue/props/runtime.js');
9
- var shared = require('@vue/shared');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var dateTable = require('./date-table.js');
8
+ var useDateTable = require('./use-date-table.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
10
11
 
11
- const getPrevMonthLastDays = (date, count) => {
12
- const lastDay = date.subtract(1, "month").endOf("month").date();
13
- return utils.rangeArr(count).map((_, index) => lastDay - (count - index - 1));
14
- };
15
- const getMonthDays = (date) => {
16
- const days = date.daysInMonth();
17
- return utils.rangeArr(days).map((_, index) => index + 1);
18
- };
19
- const toNestedArr = (days) => utils.rangeArr(days.length / 7).map((index) => {
20
- const start = index * 7;
21
- return days.slice(start, start + 7);
12
+ const _hoisted_1 = { key: 0 };
13
+ const _hoisted_2 = ["onClick"];
14
+ const __default__ = vue.defineComponent({
15
+ name: "DateTable"
22
16
  });
23
- const dateTableProps = runtime.buildProps({
24
- selectedDay: {
25
- type: runtime.definePropType(Object)
26
- },
27
- range: {
28
- type: runtime.definePropType(Array)
29
- },
30
- date: {
31
- type: runtime.definePropType(Object),
32
- required: true
33
- },
34
- hideHeader: {
35
- type: Boolean
17
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
+ ...__default__,
19
+ props: dateTable.dateTableProps,
20
+ emits: dateTable.dateTableEmits,
21
+ setup(__props, { expose, emit }) {
22
+ const props = __props;
23
+ const {
24
+ isInRange,
25
+ now,
26
+ rows,
27
+ weekDays,
28
+ getFormattedDate,
29
+ handlePickDay,
30
+ getSlotData
31
+ } = useDateTable.useDateTable(props, emit);
32
+ const nsTable = index.useNamespace("calendar-table");
33
+ const nsDay = index.useNamespace("calendar-day");
34
+ const getCellClass = ({ text, type }) => {
35
+ const classes = [type];
36
+ if (type === "current") {
37
+ const date = getFormattedDate(text, type);
38
+ if (date.isSame(props.selectedDay, "day")) {
39
+ classes.push(nsDay.is("selected"));
40
+ }
41
+ if (date.isSame(now, "day")) {
42
+ classes.push(nsDay.is("today"));
43
+ }
44
+ }
45
+ return classes;
46
+ };
47
+ expose({
48
+ getFormattedDate
49
+ });
50
+ return (_ctx, _cache) => {
51
+ return vue.openBlock(), vue.createElementBlock("table", {
52
+ class: vue.normalizeClass([vue.unref(nsTable).b(), vue.unref(nsTable).is("range", vue.unref(isInRange))]),
53
+ cellspacing: "0",
54
+ cellpadding: "0"
55
+ }, [
56
+ !_ctx.hideHeader ? (vue.openBlock(), vue.createElementBlock("thead", _hoisted_1, [
57
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(weekDays), (day) => {
58
+ return vue.openBlock(), vue.createElementBlock("th", { key: day }, vue.toDisplayString(day), 1);
59
+ }), 128))
60
+ ])) : vue.createCommentVNode("v-if", true),
61
+ vue.createElementVNode("tbody", null, [
62
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(rows), (row, index) => {
63
+ return vue.openBlock(), vue.createElementBlock("tr", {
64
+ key: index,
65
+ class: vue.normalizeClass({
66
+ [vue.unref(nsTable).e("row")]: true,
67
+ [vue.unref(nsTable).em("row", "hide-border")]: index === 0 && _ctx.hideHeader
68
+ })
69
+ }, [
70
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(row, (cell, key) => {
71
+ return vue.openBlock(), vue.createElementBlock("td", {
72
+ key,
73
+ class: vue.normalizeClass(getCellClass(cell)),
74
+ onClick: ($event) => vue.unref(handlePickDay)(cell)
75
+ }, [
76
+ vue.createElementVNode("div", {
77
+ class: vue.normalizeClass(vue.unref(nsDay).b())
78
+ }, [
79
+ vue.renderSlot(_ctx.$slots, "date-cell", {
80
+ data: vue.unref(getSlotData)(cell)
81
+ }, () => [
82
+ vue.createElementVNode("span", null, vue.toDisplayString(cell.text), 1)
83
+ ])
84
+ ], 2)
85
+ ], 10, _hoisted_2);
86
+ }), 128))
87
+ ], 2);
88
+ }), 128))
89
+ ])
90
+ ], 2);
91
+ };
36
92
  }
37
93
  });
38
- const dateTableEmits = {
39
- pick: (value) => shared.isObject(value)
40
- };
94
+ var DateTable = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\calendar\\src\\date-table.vue"]]);
41
95
 
42
- exports.dateTableEmits = dateTableEmits;
43
- exports.dateTableProps = dateTableProps;
44
- exports.getMonthDays = getMonthDays;
45
- exports.getPrevMonthLastDays = getPrevMonthLastDays;
46
- exports.toNestedArr = toNestedArr;
96
+ exports["default"] = DateTable;
47
97
  //# sourceMappingURL=date-table2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-table2.js","sources":["../../../../../../packages/components/calendar/src/date-table.ts"],"sourcesContent":["import { buildProps, definePropType, isObject } from '@element-plus/utils'\nimport { rangeArr } from '@element-plus/components/time-picker'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Dayjs } from 'dayjs'\n\nexport type CalendarDateCellType = 'next' | 'prev' | 'current'\nexport type CalendarDateCell = {\n text: number\n type: CalendarDateCellType\n}\n\nexport const getPrevMonthLastDays = (date: Dayjs, count: number) => {\n const lastDay = date.subtract(1, 'month').endOf('month').date()\n return rangeArr(count).map((_, index) => lastDay - (count - index - 1))\n}\n\nexport const getMonthDays = (date: Dayjs) => {\n const days = date.daysInMonth()\n return rangeArr(days).map((_, index) => index + 1)\n}\n\nexport const toNestedArr = (days: CalendarDateCell[]) =>\n rangeArr(days.length / 7).map((index) => {\n const start = index * 7\n return days.slice(start, start + 7)\n })\n\nexport const dateTableProps = buildProps({\n selectedDay: {\n type: definePropType<Dayjs>(Object),\n },\n range: {\n type: definePropType<[Dayjs, Dayjs]>(Array),\n },\n date: {\n type: definePropType<Dayjs>(Object),\n required: true,\n },\n hideHeader: {\n type: Boolean,\n },\n} as const)\nexport type DateTableProps = ExtractPropTypes<typeof dateTableProps>\n\nexport const dateTableEmits = {\n pick: (value: Dayjs) => isObject(value),\n}\nexport type DateTableEmits = typeof dateTableEmits\n"],"names":["rangeArr","buildProps","definePropType","isObject"],"mappings":";;;;;;;;;;AAEY,MAAC,oBAAoB,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK;AACrD,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClE,EAAE,OAAOA,cAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,OAAO,IAAI,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAK;AACtC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClC,EAAE,OAAOA,cAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC;AACrD,EAAE;AACU,MAAC,WAAW,GAAG,CAAC,IAAI,KAAKA,cAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK;AAC9E,EAAE,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;AAC1B,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;AACtC,CAAC,EAAE;AACS,MAAC,cAAc,GAAGC,kBAAU,CAAC;AACzC,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEA,sBAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,IAAI,EAAE,CAAC,KAAK,KAAKC,eAAQ,CAAC,KAAK,CAAC;AAClC;;;;;;;;"}
1
+ {"version":3,"file":"date-table2.js","sources":["../../../../../../packages/components/calendar/src/date-table.vue"],"sourcesContent":["<template>\n <table\n :class=\"[nsTable.b(), nsTable.is('range', isInRange)]\"\n cellspacing=\"0\"\n cellpadding=\"0\"\n >\n <thead v-if=\"!hideHeader\">\n <th v-for=\"day in weekDays\" :key=\"day\">{{ day }}</th>\n </thead>\n\n <tbody>\n <tr\n v-for=\"(row, index) in rows\"\n :key=\"index\"\n :class=\"{\n [nsTable.e('row')]: true,\n [nsTable.em('row', 'hide-border')]: index === 0 && hideHeader,\n }\"\n >\n <td\n v-for=\"(cell, key) in row\"\n :key=\"key\"\n :class=\"getCellClass(cell)\"\n @click=\"handlePickDay(cell)\"\n >\n <div :class=\"nsDay.b()\">\n <slot name=\"date-cell\" :data=\"getSlotData(cell)\">\n <span>{{ cell.text }}</span>\n </slot>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { dateTableEmits, dateTableProps } from './date-table'\nimport { useDateTable } from './use-date-table'\n\nimport type { CalendarDateCell } from './date-table'\n\ndefineOptions({\n name: 'DateTable',\n})\n\nconst props = defineProps(dateTableProps)\nconst emit = defineEmits(dateTableEmits)\n\nconst {\n isInRange,\n now,\n rows,\n weekDays,\n getFormattedDate,\n handlePickDay,\n getSlotData,\n} = useDateTable(props, emit)\n\nconst nsTable = useNamespace('calendar-table')\nconst nsDay = useNamespace('calendar-day')\n\nconst getCellClass = ({ text, type }: CalendarDateCell) => {\n const classes: string[] = [type]\n if (type === 'current') {\n const date = getFormattedDate(text, type)\n if (date.isSame(props.selectedDay, 'day')) {\n classes.push(nsDay.is('selected'))\n }\n if (date.isSame(now, 'day')) {\n classes.push(nsDay.is('today'))\n }\n }\n return classes\n}\n\ndefineExpose({\n /** @description toggle date panel */\n getFormattedDate,\n})\n</script>\n"],"names":["useDateTable","useNamespace"],"mappings":";;;;;;;;;;;;;uCA2Cc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,GAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MACA,gBAAA;AAAA,MACA,aAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAAA,yBAAA,CAAa,OAAO,IAAI,CAAA,CAAA;AAE5B,IAAM,MAAA,OAAA,GAAUC,mBAAa,gBAAgB,CAAA,CAAA;AAC7C,IAAM,MAAA,KAAA,GAAQA,mBAAa,cAAc,CAAA,CAAA;AAEzC,IAAA,MAAM,YAAe,GAAA,CAAC,EAAE,IAAA,EAAM,IAA6B,EAAA,KAAA;AACzD,MAAM,MAAA,OAAA,GAAoB,CAAC,IAAI,CAAA,CAAA;AAC/B,MAAA,IAAI,SAAS,SAAW,EAAA;AACtB,QAAM,MAAA,IAAA,GAAO,gBAAiB,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AACxC,QAAA,IAAI,IAAK,CAAA,MAAA,CAAO,KAAM,CAAA,WAAA,EAAa,KAAK,CAAG,EAAA;AACzC,UAAA,OAAA,CAAQ,IAAK,CAAA,KAAA,CAAM,EAAG,CAAA,UAAU,CAAC,CAAA,CAAA;AAAA,SACnC;AACA,QAAA,IAAI,IAAK,CAAA,MAAA,CAAO,GAAK,EAAA,KAAK,CAAG,EAAA;AAC3B,UAAA,OAAA,CAAQ,IAAK,CAAA,KAAA,CAAM,EAAG,CAAA,OAAO,CAAC,CAAA,CAAA;AAAA,SAChC;AAAA,OACF;AACA,MAAO,OAAA,OAAA,CAAA;AAAA,KACT,CAAA;AAEA,IAAa,MAAA,CAAA;AAAA,MAEX,gBAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,7 +8,7 @@ var localeData = require('dayjs/plugin/localeData.js');
8
8
  require('../../../hooks/index.js');
9
9
  require('../../time-picker/index.js');
10
10
  require('../../../constants/index.js');
11
- var dateTable = require('./date-table2.js');
11
+ var dateTable = require('./date-table.js');
12
12
  var index = require('../../../hooks/use-locale/index.js');
13
13
  var utils = require('../../time-picker/src/utils.js');
14
14
  var date = require('../../../constants/date.js');
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var card$1 = require('./src/card.js');
7
- var card = require('./src/card2.js');
6
+ var card$1 = require('./src/card2.js');
7
+ var card = require('./src/card.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElCard = install.withInstall(card$1["default"]);
@@ -2,43 +2,25 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var card = require('./card2.js');
8
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
10
7
 
11
- const __default__ = vue.defineComponent({
12
- name: "ElCard"
13
- });
14
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
- ...__default__,
16
- props: card.cardProps,
17
- setup(__props) {
18
- const ns = index.useNamespace("card");
19
- return (_ctx, _cache) => {
20
- return vue.openBlock(), vue.createElementBlock("div", {
21
- class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).is(`${_ctx.shadow}-shadow`)])
22
- }, [
23
- _ctx.$slots.header || _ctx.header ? (vue.openBlock(), vue.createElementBlock("div", {
24
- key: 0,
25
- class: vue.normalizeClass(vue.unref(ns).e("header"))
26
- }, [
27
- vue.renderSlot(_ctx.$slots, "header", {}, () => [
28
- vue.createTextVNode(vue.toDisplayString(_ctx.header), 1)
29
- ])
30
- ], 2)) : vue.createCommentVNode("v-if", true),
31
- vue.createElementVNode("div", {
32
- class: vue.normalizeClass([vue.unref(ns).e("body"), _ctx.bodyClass]),
33
- style: vue.normalizeStyle(_ctx.bodyStyle)
34
- }, [
35
- vue.renderSlot(_ctx.$slots, "default")
36
- ], 6)
37
- ], 2);
38
- };
8
+ const cardProps = runtime.buildProps({
9
+ header: {
10
+ type: String,
11
+ default: ""
12
+ },
13
+ bodyStyle: {
14
+ type: runtime.definePropType([String, Object, Array]),
15
+ default: ""
16
+ },
17
+ bodyClass: String,
18
+ shadow: {
19
+ type: String,
20
+ values: ["always", "hover", "never"],
21
+ default: "always"
39
22
  }
40
23
  });
41
- var Card = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\card\\src\\card.vue"]]);
42
24
 
43
- exports["default"] = Card;
25
+ exports.cardProps = cardProps;
44
26
  //# sourceMappingURL=card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is(`${shadow}-shadow`)]\">\n <div v-if=\"$slots.header || header\" :class=\"ns.e('header')\">\n <slot name=\"header\">{{ header }}</slot>\n </div>\n <div :class=\"[ns.e('body'), bodyClass]\" :style=\"bodyStyle\">\n <slot />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { cardProps } from './card'\n\ndefineOptions({\n name: 'ElCard',\n})\n\ndefineProps(cardProps)\n\nconst ns = useNamespace('card')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;uCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"card.js","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'always',\n },\n} as const)\nexport type CardProps = ExtractPropTypes<typeof cardProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC;;;;"}
@@ -2,25 +2,43 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var card = require('./card.js');
8
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
+ var index = require('../../../hooks/use-namespace/index.js');
7
10
 
8
- const cardProps = runtime.buildProps({
9
- header: {
10
- type: String,
11
- default: ""
12
- },
13
- bodyStyle: {
14
- type: runtime.definePropType([String, Object, Array]),
15
- default: ""
16
- },
17
- bodyClass: String,
18
- shadow: {
19
- type: String,
20
- values: ["always", "hover", "never"],
21
- default: "always"
11
+ const __default__ = vue.defineComponent({
12
+ name: "ElCard"
13
+ });
14
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
+ ...__default__,
16
+ props: card.cardProps,
17
+ setup(__props) {
18
+ const ns = index.useNamespace("card");
19
+ return (_ctx, _cache) => {
20
+ return vue.openBlock(), vue.createElementBlock("div", {
21
+ class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).is(`${_ctx.shadow}-shadow`)])
22
+ }, [
23
+ _ctx.$slots.header || _ctx.header ? (vue.openBlock(), vue.createElementBlock("div", {
24
+ key: 0,
25
+ class: vue.normalizeClass(vue.unref(ns).e("header"))
26
+ }, [
27
+ vue.renderSlot(_ctx.$slots, "header", {}, () => [
28
+ vue.createTextVNode(vue.toDisplayString(_ctx.header), 1)
29
+ ])
30
+ ], 2)) : vue.createCommentVNode("v-if", true),
31
+ vue.createElementVNode("div", {
32
+ class: vue.normalizeClass([vue.unref(ns).e("body"), _ctx.bodyClass]),
33
+ style: vue.normalizeStyle(_ctx.bodyStyle)
34
+ }, [
35
+ vue.renderSlot(_ctx.$slots, "default")
36
+ ], 6)
37
+ ], 2);
38
+ };
22
39
  }
23
40
  });
41
+ var Card = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\card\\src\\card.vue"]]);
24
42
 
25
- exports.cardProps = cardProps;
43
+ exports["default"] = Card;
26
44
  //# sourceMappingURL=card2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card2.js","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\n\nexport const cardProps = buildProps({\n /**\n * @description title of the card. Also accepts a DOM passed by `slot#header`\n */\n header: {\n type: String,\n default: '',\n },\n /**\n * @description CSS style of card body\n */\n bodyStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description custom class name of card body\n */\n bodyClass: String,\n /**\n * @description when to show card shadows\n */\n shadow: {\n type: String,\n values: ['always', 'hover', 'never'],\n default: 'always',\n },\n} as const)\nexport type CardProps = ExtractPropTypes<typeof cardProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;AACxC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"card2.js","sources":["../../../../../../packages/components/card/src/card.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.is(`${shadow}-shadow`)]\">\n <div v-if=\"$slots.header || header\" :class=\"ns.e('header')\">\n <slot name=\"header\">{{ header }}</slot>\n </div>\n <div :class=\"[ns.e('body'), bodyClass]\" :style=\"bodyStyle\">\n <slot />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { cardProps } from './card'\n\ndefineOptions({\n name: 'ElCard',\n})\n\ndefineProps(cardProps)\n\nconst ns = useNamespace('card')\n</script>\n"],"names":["useNamespace"],"mappings":";;;;;;;;;;uCAcc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,MAAM,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -14,7 +14,7 @@ var config = require('../../cascader-panel/src/config.js');
14
14
  var index = require('../../../hooks/use-size/index.js');
15
15
  var size = require('../../../constants/size.js');
16
16
  var content = require('../../tooltip/src/content2.js');
17
- var tag = require('../../tag/src/tag.js');
17
+ var tag = require('../../tag/src/tag2.js');
18
18
  var event = require('../../../constants/event.js');
19
19
  var types = require('../../../utils/types.js');
20
20
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var collection = require('./src/collection.js');
5
+ var collection = require('./src/collection2.js');
6
6
  require('./src/tokens.js');
7
7
 
8
8
 
@@ -3,72 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var collection = require('./collection2.js');
7
- var collectionItem = require('./collection-item.js');
6
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
8
7
 
9
- const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
10
- const createCollectionWithScope = (name) => {
11
- const COLLECTION_NAME = `El${name}Collection`;
12
- const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
13
- const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
14
- const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
15
- const ElCollection = {
16
- ...collection["default"],
17
- name: COLLECTION_NAME,
18
- setup() {
19
- const collectionRef = vue.ref(null);
20
- const itemMap = /* @__PURE__ */ new Map();
21
- const getItems = () => {
22
- const collectionEl = vue.unref(collectionRef);
23
- if (!collectionEl)
24
- return [];
25
- const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
26
- const items = [...itemMap.values()];
27
- return items.sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
28
- };
29
- vue.provide(COLLECTION_INJECTION_KEY, {
30
- itemMap,
31
- getItems,
32
- collectionRef
33
- });
34
- }
35
- };
36
- const ElCollectionItem = {
37
- ...collectionItem["default"],
38
- name: COLLECTION_ITEM_NAME,
39
- setup(_, { attrs }) {
40
- const collectionItemRef = vue.ref(null);
41
- const collectionInjection = vue.inject(COLLECTION_INJECTION_KEY, void 0);
42
- vue.provide(COLLECTION_ITEM_INJECTION_KEY, {
43
- collectionItemRef
44
- });
45
- vue.onMounted(() => {
46
- const collectionItemEl = vue.unref(collectionItemRef);
47
- if (collectionItemEl) {
48
- if (collectionInjection) {
49
- collectionInjection.itemMap.set(collectionItemEl, {
50
- ref: collectionItemEl,
51
- ...attrs
52
- });
53
- }
54
- }
55
- });
56
- vue.onBeforeUnmount(() => {
57
- const collectionItemEl = vue.unref(collectionItemRef);
58
- if (collectionInjection) {
59
- collectionInjection.itemMap.delete(collectionItemEl);
60
- }
61
- });
62
- }
63
- };
64
- return {
65
- COLLECTION_INJECTION_KEY,
66
- COLLECTION_ITEM_INJECTION_KEY,
67
- ElCollection,
68
- ElCollectionItem
69
- };
70
- };
8
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
+ inheritAttrs: false
10
+ });
11
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
+ return vue.renderSlot(_ctx.$slots, "default");
13
+ }
14
+ var Collection = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "D:\\workspace\\element-pe\\packages\\components\\collection\\src\\collection.vue"]]);
71
15
 
72
- exports.COLLECTION_ITEM_SIGN = COLLECTION_ITEM_SIGN;
73
- exports.createCollectionWithScope = createCollectionWithScope;
16
+ exports["default"] = Collection;
74
17
  //# sourceMappingURL=collection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection.js","sources":["../../../../../../packages/components/collection/src/collection.ts"],"sourcesContent":["import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type { SetupContext } from '@vue/runtime-core'\nimport type {\n ElCollectionInjectionContext,\n ElCollectionItemInjectionContext,\n} from './tokens'\n\nexport const COLLECTION_ITEM_SIGN = `data-el-collection-item`\n\n// Make sure the first letter of name is capitalized\nexport const createCollectionWithScope = (name: string) => {\n const COLLECTION_NAME = `El${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey<ElCollectionInjectionContext> =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey<ElCollectionItemInjectionContext> =\n Symbol(COLLECTION_ITEM_NAME)\n\n const ElCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref<HTMLElement | null>(null)\n const itemMap: ElCollectionInjectionContext['itemMap'] = new Map()\n const getItems = () => {\n const collectionEl = unref(collectionRef)\n\n if (!collectionEl) return []\n const orderedNodes = Array.from(\n collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`)\n )\n\n const items = [...itemMap.values()]\n\n return items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n }\n\n provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })\n },\n }\n\n const ElCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_: unknown, { attrs }: SetupContext) {\n const collectionItemRef = ref<HTMLElement | null>(null)\n const collectionInjection = inject(COLLECTION_INJECTION_KEY, undefined)!\n\n provide(COLLECTION_ITEM_INJECTION_KEY, {\n collectionItemRef,\n })\n\n onMounted(() => {\n const collectionItemEl = unref(collectionItemRef)\n if (collectionItemEl) {\n if (collectionInjection) {\n collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n if (collectionInjection) {\n collectionInjection.itemMap.delete(collectionItemEl)\n }\n })\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n ElCollection,\n ElCollectionItem,\n }\n}\n"],"names":["Collection","ref","unref","provide","CollectionItem","inject","onMounted","onBeforeUnmount"],"mappings":"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"}
1
+ {"version":3,"file":"collection.js","sources":["../../../../../../packages/components/collection/src/collection.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\" setup>\ndefineOptions({\n inheritAttrs: false,\n})\n</script>\n"],"names":["DO_defineComponent","_renderSlot"],"mappings":";;;;;;;kCAKcA,mBAAA,CAAA;AAAA,EACZ,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;SANEC,cAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
@@ -3,15 +3,72 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
6
+ var collection = require('./collection.js');
7
+ var collectionItem = require('./collection-item.js');
7
8
 
8
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
9
- inheritAttrs: false
10
- });
11
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
- return vue.renderSlot(_ctx.$slots, "default");
13
- }
14
- var Collection = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "D:\\workspace\\element-pe\\packages\\components\\collection\\src\\collection.vue"]]);
9
+ const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
10
+ const createCollectionWithScope = (name) => {
11
+ const COLLECTION_NAME = `El${name}Collection`;
12
+ const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
13
+ const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
14
+ const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
15
+ const ElCollection = {
16
+ ...collection["default"],
17
+ name: COLLECTION_NAME,
18
+ setup() {
19
+ const collectionRef = vue.ref(null);
20
+ const itemMap = /* @__PURE__ */ new Map();
21
+ const getItems = () => {
22
+ const collectionEl = vue.unref(collectionRef);
23
+ if (!collectionEl)
24
+ return [];
25
+ const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
26
+ const items = [...itemMap.values()];
27
+ return items.sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
28
+ };
29
+ vue.provide(COLLECTION_INJECTION_KEY, {
30
+ itemMap,
31
+ getItems,
32
+ collectionRef
33
+ });
34
+ }
35
+ };
36
+ const ElCollectionItem = {
37
+ ...collectionItem["default"],
38
+ name: COLLECTION_ITEM_NAME,
39
+ setup(_, { attrs }) {
40
+ const collectionItemRef = vue.ref(null);
41
+ const collectionInjection = vue.inject(COLLECTION_INJECTION_KEY, void 0);
42
+ vue.provide(COLLECTION_ITEM_INJECTION_KEY, {
43
+ collectionItemRef
44
+ });
45
+ vue.onMounted(() => {
46
+ const collectionItemEl = vue.unref(collectionItemRef);
47
+ if (collectionItemEl) {
48
+ if (collectionInjection) {
49
+ collectionInjection.itemMap.set(collectionItemEl, {
50
+ ref: collectionItemEl,
51
+ ...attrs
52
+ });
53
+ }
54
+ }
55
+ });
56
+ vue.onBeforeUnmount(() => {
57
+ const collectionItemEl = vue.unref(collectionItemRef);
58
+ if (collectionInjection) {
59
+ collectionInjection.itemMap.delete(collectionItemEl);
60
+ }
61
+ });
62
+ }
63
+ };
64
+ return {
65
+ COLLECTION_INJECTION_KEY,
66
+ COLLECTION_ITEM_INJECTION_KEY,
67
+ ElCollection,
68
+ ElCollectionItem
69
+ };
70
+ };
15
71
 
16
- exports["default"] = Collection;
72
+ exports.COLLECTION_ITEM_SIGN = COLLECTION_ITEM_SIGN;
73
+ exports.createCollectionWithScope = createCollectionWithScope;
17
74
  //# sourceMappingURL=collection2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection2.js","sources":["../../../../../../packages/components/collection/src/collection.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\" setup>\ndefineOptions({\n inheritAttrs: false,\n})\n</script>\n"],"names":["DO_defineComponent","_renderSlot"],"mappings":";;;;;;;kCAKcA,mBAAA,CAAA;AAAA,EACZ,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;SANEC,cAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"collection2.js","sources":["../../../../../../packages/components/collection/src/collection.ts"],"sourcesContent":["import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type { SetupContext } from '@vue/runtime-core'\nimport type {\n ElCollectionInjectionContext,\n ElCollectionItemInjectionContext,\n} from './tokens'\n\nexport const COLLECTION_ITEM_SIGN = `data-el-collection-item`\n\n// Make sure the first letter of name is capitalized\nexport const createCollectionWithScope = (name: string) => {\n const COLLECTION_NAME = `El${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey<ElCollectionInjectionContext> =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey<ElCollectionItemInjectionContext> =\n Symbol(COLLECTION_ITEM_NAME)\n\n const ElCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref<HTMLElement | null>(null)\n const itemMap: ElCollectionInjectionContext['itemMap'] = new Map()\n const getItems = () => {\n const collectionEl = unref(collectionRef)\n\n if (!collectionEl) return []\n const orderedNodes = Array.from(\n collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`)\n )\n\n const items = [...itemMap.values()]\n\n return items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n }\n\n provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })\n },\n }\n\n const ElCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_: unknown, { attrs }: SetupContext) {\n const collectionItemRef = ref<HTMLElement | null>(null)\n const collectionInjection = inject(COLLECTION_INJECTION_KEY, undefined)!\n\n provide(COLLECTION_ITEM_INJECTION_KEY, {\n collectionItemRef,\n })\n\n onMounted(() => {\n const collectionItemEl = unref(collectionItemRef)\n if (collectionItemEl) {\n if (collectionInjection) {\n collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n if (collectionInjection) {\n collectionInjection.itemMap.delete(collectionItemEl)\n }\n })\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n ElCollection,\n ElCollectionItem,\n }\n}\n"],"names":["Collection","ref","unref","provide","CollectionItem","inject","onMounted","onBeforeUnmount"],"mappings":"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"}
@@ -6,7 +6,7 @@ var vue = require('vue');
6
6
  require('../../../utils/index.js');
7
7
  require('../../../hooks/index.js');
8
8
  require('../../form/index.js');
9
- var descriptionsRow = require('./descriptions-row.js');
9
+ var descriptionsRow = require('./descriptions-row2.js');
10
10
  var token = require('./token.js');
11
11
  var description = require('./description2.js');
12
12
  var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');