element-ps 2.0.16 → 2.0.19

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 (360) hide show
  1. package/dist/index.full.js +7 -42
  2. package/dist/index.full.min.js +5 -5
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +5 -5
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +7 -42
  7. package/es/components/affix/index.mjs +2 -2
  8. package/es/components/affix/src/affix.mjs +19 -82
  9. package/es/components/affix/src/affix.mjs.map +1 -1
  10. package/es/components/affix/src/affix2.mjs +82 -19
  11. package/es/components/affix/src/affix2.mjs.map +1 -1
  12. package/es/components/autocomplete/index.mjs +2 -2
  13. package/es/components/autocomplete/src/autocomplete.mjs +58 -94
  14. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  15. package/es/components/autocomplete/src/autocomplete2.mjs +94 -58
  16. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  17. package/es/components/avatar/index.mjs +2 -2
  18. package/es/components/avatar/src/avatar.mjs +29 -61
  19. package/es/components/avatar/src/avatar.mjs.map +1 -1
  20. package/es/components/avatar/src/avatar2.mjs +61 -29
  21. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  22. package/es/components/badge/index.mjs +2 -2
  23. package/es/components/badge/src/badge.mjs +17 -54
  24. package/es/components/badge/src/badge.mjs.map +1 -1
  25. package/es/components/badge/src/badge2.mjs +54 -17
  26. package/es/components/badge/src/badge2.mjs.map +1 -1
  27. package/es/components/breadcrumb/index.mjs +4 -4
  28. package/es/components/breadcrumb/src/breadcrumb-item.mjs +46 -11
  29. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  30. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -46
  31. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  32. package/es/components/breadcrumb/src/breadcrumb.mjs +37 -12
  33. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  34. package/es/components/breadcrumb/src/breadcrumb2.mjs +12 -37
  35. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  36. package/es/components/calendar/index.mjs +2 -2
  37. package/es/components/calendar/src/calendar.mjs +9 -188
  38. package/es/components/calendar/src/calendar.mjs.map +1 -1
  39. package/es/components/calendar/src/calendar2.mjs +188 -9
  40. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  41. package/es/components/card/index.mjs +2 -2
  42. package/es/components/card/src/card.mjs +15 -35
  43. package/es/components/card/src/card.mjs.map +1 -1
  44. package/es/components/card/src/card2.mjs +35 -15
  45. package/es/components/card/src/card2.mjs.map +1 -1
  46. package/es/components/carousel/index.mjs +2 -2
  47. package/es/components/carousel/src/carousel-item.mjs +148 -7
  48. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  49. package/es/components/carousel/src/carousel-item2.mjs +7 -148
  50. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  51. package/es/components/cascader-panel/src/config.mjs +1 -1
  52. package/es/components/cascader-panel/src/index.mjs +1 -1
  53. package/es/components/cascader-panel/src/menu.mjs +1 -1
  54. package/es/components/cascader-panel/src/node.mjs +200 -120
  55. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  56. package/es/components/cascader-panel/src/node2.mjs +120 -200
  57. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  58. package/es/components/cascader-panel/src/store.mjs +1 -1
  59. package/es/components/check-tag/index.mjs +2 -2
  60. package/es/components/check-tag/src/check-tag.mjs +7 -20
  61. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  62. package/es/components/check-tag/src/check-tag2.mjs +20 -7
  63. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  64. package/es/components/collapse/index.mjs +2 -2
  65. package/es/components/collapse/src/collapse-item.mjs +12 -91
  66. package/es/components/collapse/src/collapse-item.mjs.map +1 -1
  67. package/es/components/collapse/src/collapse-item2.mjs +91 -12
  68. package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
  69. package/es/components/dropdown/index.d.ts +0 -6
  70. package/es/components/dropdown/index.mjs +2 -2
  71. package/es/components/dropdown/src/dropdown-item-impl.mjs +4 -15
  72. package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -1
  73. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +0 -2
  74. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  75. package/es/components/dropdown/src/dropdown-menu.mjs +4 -27
  76. package/es/components/dropdown/src/dropdown-menu.mjs.map +1 -1
  77. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +0 -3
  78. package/es/components/dropdown/src/dropdown.mjs +100 -109
  79. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  80. package/es/components/dropdown/src/dropdown2.mjs +109 -100
  81. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  82. package/es/components/empty/index.mjs +2 -2
  83. package/es/components/empty/src/empty.mjs +11 -56
  84. package/es/components/empty/src/empty.mjs.map +1 -1
  85. package/es/components/empty/src/empty2.mjs +56 -11
  86. package/es/components/empty/src/empty2.mjs.map +1 -1
  87. package/es/components/image/index.mjs +2 -2
  88. package/es/components/image/src/image.mjs +46 -170
  89. package/es/components/image/src/image.mjs.map +1 -1
  90. package/es/components/image/src/image2.mjs +170 -46
  91. package/es/components/image/src/image2.mjs.map +1 -1
  92. package/es/components/image-viewer/index.mjs +2 -2
  93. package/es/components/image-viewer/src/image-viewer.mjs +31 -210
  94. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  95. package/es/components/image-viewer/src/image-viewer2.mjs +210 -31
  96. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  97. package/es/components/index.mjs +29 -29
  98. package/es/components/input-number/index.mjs +2 -2
  99. package/es/components/input-number/src/input-number.mjs +171 -46
  100. package/es/components/input-number/src/input-number.mjs.map +1 -1
  101. package/es/components/input-number/src/input-number2.mjs +46 -171
  102. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  103. package/es/components/menu/src/menu-item.mjs +1 -1
  104. package/es/components/page-header/index.mjs +2 -2
  105. package/es/components/page-header/src/page-header.mjs +14 -55
  106. package/es/components/page-header/src/page-header.mjs.map +1 -1
  107. package/es/components/page-header/src/page-header2.mjs +55 -14
  108. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  109. package/es/components/popconfirm/index.mjs +2 -2
  110. package/es/components/popconfirm/src/popconfirm.mjs +20 -53
  111. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  112. package/es/components/popconfirm/src/popconfirm2.mjs +53 -20
  113. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  114. package/es/components/popover/src/popover.mjs +1 -1
  115. package/es/components/popper/index.mjs +2 -2
  116. package/es/components/popper/src/popper.mjs +27 -20
  117. package/es/components/popper/src/popper.mjs.map +1 -1
  118. package/es/components/popper/src/popper2.mjs +20 -27
  119. package/es/components/popper/src/popper2.mjs.map +1 -1
  120. package/es/components/progress/index.mjs +2 -2
  121. package/es/components/progress/src/progress.mjs +230 -57
  122. package/es/components/progress/src/progress.mjs.map +1 -1
  123. package/es/components/progress/src/progress2.mjs +57 -230
  124. package/es/components/progress/src/progress2.mjs.map +1 -1
  125. package/es/components/rate/index.mjs +2 -2
  126. package/es/components/rate/src/rate.mjs +169 -84
  127. package/es/components/rate/src/rate.mjs.map +1 -1
  128. package/es/components/rate/src/rate2.mjs +84 -169
  129. package/es/components/rate/src/rate2.mjs.map +1 -1
  130. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -9
  131. package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -1
  132. package/es/components/scrollbar/index.mjs +3 -3
  133. package/es/components/scrollbar/src/bar.mjs +35 -22
  134. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  135. package/es/components/scrollbar/src/bar2.mjs +22 -35
  136. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  137. package/es/components/scrollbar/src/scrollbar.mjs +112 -42
  138. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  139. package/es/components/scrollbar/src/scrollbar2.mjs +42 -112
  140. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  141. package/es/components/scrollbar/src/thumb.mjs +11 -59
  142. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  143. package/es/components/scrollbar/src/thumb2.mjs +59 -11
  144. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  145. package/es/components/skeleton/index.mjs +2 -2
  146. package/es/components/skeleton/src/skeleton.mjs +22 -49
  147. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  148. package/es/components/skeleton/src/skeleton2.mjs +49 -22
  149. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  150. package/es/components/tabs/index.mjs +3 -3
  151. package/es/components/tabs/src/tab-bar.mjs +7 -76
  152. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  153. package/es/components/tabs/src/tab-bar2.mjs +76 -7
  154. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  155. package/es/components/tabs/src/tab-nav.mjs +1 -1
  156. package/es/components/tabs/src/tab-pane.mjs +14 -60
  157. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  158. package/es/components/tabs/src/tab-pane2.mjs +60 -14
  159. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  160. package/es/components/tooltip-v2/index.mjs +1 -1
  161. package/es/components/tooltip-v2/src/arrow.mjs +22 -38
  162. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  163. package/es/components/tooltip-v2/src/arrow2.mjs +38 -22
  164. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  165. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  166. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  167. package/es/components/upload/index.mjs +4 -4
  168. package/es/components/upload/src/upload-content.mjs +1 -1
  169. package/es/components/upload/src/upload-content2.mjs +1 -1
  170. package/es/components/upload/src/upload-dragger.mjs +11 -32
  171. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  172. package/es/components/upload/src/upload-dragger2.mjs +32 -11
  173. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  174. package/es/components/upload/src/upload-list.mjs +155 -26
  175. package/es/components/upload/src/upload-list.mjs.map +1 -1
  176. package/es/components/upload/src/upload-list2.mjs +26 -155
  177. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  178. package/es/components/upload/src/upload.mjs +106 -99
  179. package/es/components/upload/src/upload.mjs.map +1 -1
  180. package/es/components/upload/src/upload2.mjs +99 -106
  181. package/es/components/upload/src/upload2.mjs.map +1 -1
  182. package/es/index.mjs +29 -29
  183. package/lib/components/affix/index.js +2 -2
  184. package/lib/components/affix/src/affix.js +19 -82
  185. package/lib/components/affix/src/affix.js.map +1 -1
  186. package/lib/components/affix/src/affix2.js +82 -19
  187. package/lib/components/affix/src/affix2.js.map +1 -1
  188. package/lib/components/autocomplete/index.js +2 -2
  189. package/lib/components/autocomplete/src/autocomplete.js +58 -94
  190. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  191. package/lib/components/autocomplete/src/autocomplete2.js +94 -58
  192. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  193. package/lib/components/avatar/index.js +2 -2
  194. package/lib/components/avatar/src/avatar.js +29 -61
  195. package/lib/components/avatar/src/avatar.js.map +1 -1
  196. package/lib/components/avatar/src/avatar2.js +61 -29
  197. package/lib/components/avatar/src/avatar2.js.map +1 -1
  198. package/lib/components/badge/index.js +2 -2
  199. package/lib/components/badge/src/badge.js +17 -54
  200. package/lib/components/badge/src/badge.js.map +1 -1
  201. package/lib/components/badge/src/badge2.js +54 -17
  202. package/lib/components/badge/src/badge2.js.map +1 -1
  203. package/lib/components/breadcrumb/index.js +4 -4
  204. package/lib/components/breadcrumb/src/breadcrumb-item.js +46 -11
  205. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  206. package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -46
  207. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  208. package/lib/components/breadcrumb/src/breadcrumb.js +37 -12
  209. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  210. package/lib/components/breadcrumb/src/breadcrumb2.js +12 -37
  211. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  212. package/lib/components/calendar/index.js +2 -2
  213. package/lib/components/calendar/src/calendar.js +9 -192
  214. package/lib/components/calendar/src/calendar.js.map +1 -1
  215. package/lib/components/calendar/src/calendar2.js +192 -9
  216. package/lib/components/calendar/src/calendar2.js.map +1 -1
  217. package/lib/components/card/index.js +2 -2
  218. package/lib/components/card/src/card.js +15 -35
  219. package/lib/components/card/src/card.js.map +1 -1
  220. package/lib/components/card/src/card2.js +35 -15
  221. package/lib/components/card/src/card2.js.map +1 -1
  222. package/lib/components/carousel/index.js +2 -2
  223. package/lib/components/carousel/src/carousel-item.js +148 -7
  224. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  225. package/lib/components/carousel/src/carousel-item2.js +7 -148
  226. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  227. package/lib/components/cascader-panel/src/config.js +1 -1
  228. package/lib/components/cascader-panel/src/index.js +1 -1
  229. package/lib/components/cascader-panel/src/menu.js +1 -1
  230. package/lib/components/cascader-panel/src/node.js +200 -121
  231. package/lib/components/cascader-panel/src/node.js.map +1 -1
  232. package/lib/components/cascader-panel/src/node2.js +121 -200
  233. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  234. package/lib/components/cascader-panel/src/store.js +1 -1
  235. package/lib/components/check-tag/index.js +2 -2
  236. package/lib/components/check-tag/src/check-tag.js +7 -20
  237. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  238. package/lib/components/check-tag/src/check-tag2.js +20 -7
  239. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  240. package/lib/components/collapse/index.js +2 -2
  241. package/lib/components/collapse/src/collapse-item.js +12 -91
  242. package/lib/components/collapse/src/collapse-item.js.map +1 -1
  243. package/lib/components/collapse/src/collapse-item2.js +91 -12
  244. package/lib/components/collapse/src/collapse-item2.js.map +1 -1
  245. package/lib/components/dropdown/index.d.ts +0 -6
  246. package/lib/components/dropdown/index.js +2 -2
  247. package/lib/components/dropdown/src/dropdown-item-impl.js +4 -15
  248. package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -1
  249. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +0 -2
  250. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  251. package/lib/components/dropdown/src/dropdown-menu.js +3 -26
  252. package/lib/components/dropdown/src/dropdown-menu.js.map +1 -1
  253. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +0 -3
  254. package/lib/components/dropdown/src/dropdown.js +109 -109
  255. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  256. package/lib/components/dropdown/src/dropdown2.js +109 -109
  257. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  258. package/lib/components/empty/index.js +2 -2
  259. package/lib/components/empty/src/empty.js +11 -56
  260. package/lib/components/empty/src/empty.js.map +1 -1
  261. package/lib/components/empty/src/empty2.js +56 -11
  262. package/lib/components/empty/src/empty2.js.map +1 -1
  263. package/lib/components/image/index.js +2 -2
  264. package/lib/components/image/src/image.js +46 -170
  265. package/lib/components/image/src/image.js.map +1 -1
  266. package/lib/components/image/src/image2.js +170 -46
  267. package/lib/components/image/src/image2.js.map +1 -1
  268. package/lib/components/image-viewer/index.js +2 -2
  269. package/lib/components/image-viewer/src/image-viewer.js +31 -210
  270. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  271. package/lib/components/image-viewer/src/image-viewer2.js +210 -31
  272. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  273. package/lib/components/index.js +29 -29
  274. package/lib/components/input-number/index.js +2 -2
  275. package/lib/components/input-number/src/input-number.js +171 -46
  276. package/lib/components/input-number/src/input-number.js.map +1 -1
  277. package/lib/components/input-number/src/input-number2.js +46 -171
  278. package/lib/components/input-number/src/input-number2.js.map +1 -1
  279. package/lib/components/menu/src/menu-item.js +1 -1
  280. package/lib/components/page-header/index.js +2 -2
  281. package/lib/components/page-header/src/page-header.js +14 -55
  282. package/lib/components/page-header/src/page-header.js.map +1 -1
  283. package/lib/components/page-header/src/page-header2.js +55 -14
  284. package/lib/components/page-header/src/page-header2.js.map +1 -1
  285. package/lib/components/popconfirm/index.js +2 -2
  286. package/lib/components/popconfirm/src/popconfirm.js +20 -53
  287. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  288. package/lib/components/popconfirm/src/popconfirm2.js +53 -20
  289. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  290. package/lib/components/popover/src/popover.js +1 -1
  291. package/lib/components/popper/index.js +2 -2
  292. package/lib/components/popper/src/popper.js +27 -21
  293. package/lib/components/popper/src/popper.js.map +1 -1
  294. package/lib/components/popper/src/popper2.js +21 -27
  295. package/lib/components/popper/src/popper2.js.map +1 -1
  296. package/lib/components/progress/index.js +2 -2
  297. package/lib/components/progress/src/progress.js +230 -57
  298. package/lib/components/progress/src/progress.js.map +1 -1
  299. package/lib/components/progress/src/progress2.js +57 -230
  300. package/lib/components/progress/src/progress2.js.map +1 -1
  301. package/lib/components/rate/index.js +2 -2
  302. package/lib/components/rate/src/rate.js +169 -84
  303. package/lib/components/rate/src/rate.js.map +1 -1
  304. package/lib/components/rate/src/rate2.js +84 -169
  305. package/lib/components/rate/src/rate2.js.map +1 -1
  306. package/lib/components/roving-focus-group/src/roving-focus-item.js +0 -8
  307. package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -1
  308. package/lib/components/scrollbar/index.js +3 -3
  309. package/lib/components/scrollbar/src/bar.js +35 -22
  310. package/lib/components/scrollbar/src/bar.js.map +1 -1
  311. package/lib/components/scrollbar/src/bar2.js +22 -35
  312. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  313. package/lib/components/scrollbar/src/scrollbar.js +112 -42
  314. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  315. package/lib/components/scrollbar/src/scrollbar2.js +42 -112
  316. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  317. package/lib/components/scrollbar/src/thumb.js +11 -59
  318. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  319. package/lib/components/scrollbar/src/thumb2.js +59 -11
  320. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  321. package/lib/components/skeleton/index.js +2 -2
  322. package/lib/components/skeleton/src/skeleton.js +22 -49
  323. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  324. package/lib/components/skeleton/src/skeleton2.js +49 -22
  325. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  326. package/lib/components/tabs/index.js +3 -3
  327. package/lib/components/tabs/src/tab-bar.js +7 -76
  328. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  329. package/lib/components/tabs/src/tab-bar2.js +76 -7
  330. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  331. package/lib/components/tabs/src/tab-nav.js +1 -1
  332. package/lib/components/tabs/src/tab-pane.js +14 -60
  333. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  334. package/lib/components/tabs/src/tab-pane2.js +60 -14
  335. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  336. package/lib/components/tooltip-v2/index.js +1 -1
  337. package/lib/components/tooltip-v2/src/arrow.js +23 -38
  338. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  339. package/lib/components/tooltip-v2/src/arrow2.js +38 -23
  340. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  341. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  342. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  343. package/lib/components/upload/index.js +4 -4
  344. package/lib/components/upload/src/upload-content.js +1 -1
  345. package/lib/components/upload/src/upload-content2.js +1 -1
  346. package/lib/components/upload/src/upload-dragger.js +12 -32
  347. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  348. package/lib/components/upload/src/upload-dragger2.js +32 -12
  349. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  350. package/lib/components/upload/src/upload-list.js +155 -27
  351. package/lib/components/upload/src/upload-list.js.map +1 -1
  352. package/lib/components/upload/src/upload-list2.js +27 -155
  353. package/lib/components/upload/src/upload-list2.js.map +1 -1
  354. package/lib/components/upload/src/upload.js +109 -99
  355. package/lib/components/upload/src/upload.js.map +1 -1
  356. package/lib/components/upload/src/upload2.js +99 -109
  357. package/lib/components/upload/src/upload2.js.map +1 -1
  358. package/lib/index.js +29 -29
  359. package/package.json +5 -3
  360. package/web-types.json +1 -1
@@ -1,13 +1,82 @@
1
+ import { defineComponent, getCurrentInstance, inject, ref, watch, nextTick, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle } from 'vue';
2
+ import { useResizeObserver } from '@vueuse/core';
1
3
  import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
3
- import { mutable } from '../../../utils/typescript.mjs';
4
+ import '../../../tokens/index.mjs';
5
+ import '../../../hooks/index.mjs';
6
+ import { tabBarProps } from './tab-bar.mjs';
7
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
+ import { tabsRootContextKey } from '../../../tokens/tabs.mjs';
9
+ import { throwError } from '../../../utils/error.mjs';
10
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
11
+ import { capitalize } from '@vue/shared';
4
12
 
5
- const tabBarProps = buildProps({
6
- tabs: {
7
- type: definePropType(Array),
8
- default: () => mutable([])
13
+ const __default__ = {
14
+ name: "PsTabBar"
15
+ };
16
+ const _sfc_main = /* @__PURE__ */ defineComponent({
17
+ ...__default__,
18
+ props: tabBarProps,
19
+ setup(__props, { expose }) {
20
+ const props = __props;
21
+ const COMPONENT_NAME = "PsTabBar";
22
+ const instance = getCurrentInstance();
23
+ const rootTabs = inject(tabsRootContextKey);
24
+ if (!rootTabs)
25
+ throwError(COMPONENT_NAME, "<ps-tabs><ps-tab-bar /></ps-tabs>");
26
+ const ns = useNamespace("tabs");
27
+ const barRef = ref();
28
+ const barStyle = ref();
29
+ const getBarStyle = () => {
30
+ let offset = 0;
31
+ let tabSize = 0;
32
+ const sizeName = ["top", "bottom"].includes(rootTabs.props.tabPosition) ? "width" : "height";
33
+ const sizeDir = sizeName === "width" ? "x" : "y";
34
+ props.tabs.every((tab) => {
35
+ var _a, _b, _c, _d;
36
+ const $el = (_b = (_a = instance.parent) == null ? void 0 : _a.refs) == null ? void 0 : _b[`tab-${tab.paneName}`];
37
+ if (!$el)
38
+ return false;
39
+ if (!tab.active) {
40
+ return true;
41
+ }
42
+ tabSize = $el[`client${capitalize(sizeName)}`];
43
+ const position = sizeDir === "x" ? "left" : "top";
44
+ offset = $el.getBoundingClientRect()[position] - ((_d = (_c = $el.parentElement) == null ? void 0 : _c.getBoundingClientRect()[position]) != null ? _d : 0);
45
+ const tabStyles = window.getComputedStyle($el);
46
+ if (sizeName === "width") {
47
+ if (props.tabs.length > 1) {
48
+ tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight);
49
+ }
50
+ offset += Number.parseFloat(tabStyles.paddingLeft);
51
+ }
52
+ return false;
53
+ });
54
+ return {
55
+ [sizeName]: `${tabSize}px`,
56
+ transform: `translate${capitalize(sizeDir)}(${offset}px)`
57
+ };
58
+ };
59
+ const update = () => barStyle.value = getBarStyle();
60
+ watch(() => props.tabs, async () => {
61
+ await nextTick();
62
+ update();
63
+ }, { immediate: true });
64
+ useResizeObserver(barRef, () => update());
65
+ expose({
66
+ ref: barRef,
67
+ update
68
+ });
69
+ return (_ctx, _cache) => {
70
+ return openBlock(), createElementBlock("div", {
71
+ ref_key: "barRef",
72
+ ref: barRef,
73
+ class: normalizeClass([unref(ns).e("active-bar"), unref(ns).is(unref(rootTabs).props.tabPosition)]),
74
+ style: normalizeStyle(barStyle.value)
75
+ }, null, 6);
76
+ };
9
77
  }
10
78
  });
79
+ var TabBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tabs/src/tab-bar.vue"]]);
11
80
 
12
- export { tabBarProps };
81
+ export { TabBar as default };
13
82
  //# sourceMappingURL=tab-bar2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-bar2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-bar.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { TabsPaneContext } from '@element-ps/tokens'\nimport type TabBar from './tab-bar.vue'\n\nexport const tabBarProps = buildProps({\n tabs: {\n type: definePropType<TabsPaneContext[]>(Array),\n default: () => mutable([] as const),\n },\n} as const)\n\nexport type TabBarProps = ExtractPropTypes<typeof tabBarProps>\nexport type TabBarInstance = InstanceType<typeof TabBar>\n"],"names":[],"mappings":";;;;AACY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"tab-bar2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-bar.vue"],"sourcesContent":["<template>\n <div\n ref=\"barRef\"\n :class=\"[ns.e('active-bar'), ns.is(rootTabs.props.tabPosition)]\"\n :style=\"barStyle\"\n />\n</template>\n<script lang=\"ts\" setup>\nimport { getCurrentInstance, inject, nextTick, ref, watch } from 'vue'\nimport { useResizeObserver } from '@vueuse/core'\nimport { capitalize, throwError } from '@element-ps/utils'\nimport { tabsRootContextKey } from '@element-ps/tokens'\nimport { useNamespace } from '@element-ps/hooks'\nimport { tabBarProps } from './tab-bar'\n\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'PsTabBar'\ndefineOptions({\n name: 'PsTabBar',\n})\nconst props = defineProps(tabBarProps)\n\nconst instance = getCurrentInstance()!\nconst rootTabs = inject(tabsRootContextKey)\nif (!rootTabs) throwError(COMPONENT_NAME, '<ps-tabs><ps-tab-bar /></ps-tabs>')\n\nconst ns = useNamespace('tabs')\n\nconst barRef = ref<HTMLDivElement>()\nconst barStyle = ref<CSSProperties>()\n\nconst getBarStyle = (): CSSProperties => {\n let offset = 0\n let tabSize = 0\n\n const sizeName = ['top', 'bottom'].includes(rootTabs.props.tabPosition)\n ? 'width'\n : 'height'\n const sizeDir = sizeName === 'width' ? 'x' : 'y'\n\n props.tabs.every((tab) => {\n const $el = instance.parent?.refs?.[`tab-${tab.paneName}`] as HTMLElement\n if (!$el) return false\n\n if (!tab.active) {\n return true\n }\n\n tabSize = $el[`client${capitalize(sizeName)}`]\n const position = sizeDir === 'x' ? 'left' : 'top'\n offset =\n $el.getBoundingClientRect()[position] -\n ($el.parentElement?.getBoundingClientRect()[position] ?? 0)\n const tabStyles = window.getComputedStyle($el)\n\n if (sizeName === 'width') {\n if (props.tabs.length > 1) {\n tabSize -=\n Number.parseFloat(tabStyles.paddingLeft) +\n Number.parseFloat(tabStyles.paddingRight)\n }\n offset += Number.parseFloat(tabStyles.paddingLeft)\n }\n return false\n })\n\n return {\n [sizeName]: `${tabSize}px`,\n transform: `translate${capitalize(sizeDir)}(${offset}px)`,\n }\n}\n\nconst update = () => (barStyle.value = getBarStyle())\n\nwatch(\n () => props.tabs,\n async () => {\n await nextTick()\n update()\n },\n { immediate: true }\n)\nuseResizeObserver(barRef, () => update())\n\ndefineExpose({\n /** @description tab root html element */\n ref: barRef,\n /** @description method to manually update tab bar style */\n update,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAiBA,IAAA,MAAA,cAAA,GAAA,UAAA,CAAA;AAMA,IAAA,MAAA,WAAA,kBAAA,EAAA,CAAA;AACA,IAAA,MAAA,QAAA,GAAA,OAAA,kBAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA;AAAA,MAAA,UAAA,CAAA,gBAAA,mCAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,MAAA,CAAA,CAAA;AAEA,IAAA,MAAA,SAAA,GAAA,EAAA,CAAA;AACA,IAAA,MAAA,WAAA,GAAA,EAAA,CAAA;AAEA,IAAA,MAAA,cAAA,MAAA;AACA,MAAA,IAAA,MAAA,GAAA,CAAA,CAAA;AACA,MAAA,IAAA,OAAA,GAAA,CAAA,CAAA;AAEA,MAAA,MAAA,QAAA,GAAA,CAAA,KAAA,EAAA,QAAA,CAAA,CAAA,SAAA,QAAA,CAAA,KAAA,CAAA,WAAA,CAAA,GACA,OACA,GAAA,QAAA,CAAA;AACA,MAAA,MAAA,OAAA,GAAA,QAAA,KAAA,OAAA,GAAA,GAAA,GAAA,GAAA,CAAA;AAEA,MAAA,KAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,GAAA,KAAA;AACA,QAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AACA,QAAA,MAAA,GAAA,GAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,QAAA,CAAA,MAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,CAAA,IAAA,EAAA,GAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA;AAAA,QAAA,IAAA,CAAA,GAAA;AAEA,UAAA,OAAA,KAAA,CAAA;AACA,QAAA,IAAA,CAAA,GAAA,CAAA,MAAA,EAAA;AAAA,UACA,OAAA,IAAA,CAAA;AAEA,SAAA;AACA,QAAA,OAAA,GAAA,GAAA,CAAA,CAAA,MAAA,EAAA,UAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA,QACA,MAAA,6BAAA,MAAA,GAAA,KACA;AACA,QAAA,MAAA,GAAA,GAAA,CAAA,qBAAA,EAAA,CAAA,QAAA,CAAA,IAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,GAAA,CAAA,aAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,qBAAA,EAAA,CAAA,QAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,CAAA,CAAA,CAAA;AAEA,QAAA,kBAAA,MAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA;AACA,QAAA,IAAA,QAAA,KAAA,OAAA,EAAA;AACA,UACA,IAAA,KAAA,CAAA,IAAA,CAAA;AACA,YACA,OAAA,IAAA,MAAA,CAAA,UAAA,CAAA,SAAA,CAAA,WAAA,CAAA,GAAA,MAAA,CAAA,UAAA,CAAA,SAAA,CAAA,YAAA,CAAA,CAAA;AACA,WAAA;AAAA,UACA,MAAA,IAAA,MAAA,CAAA,UAAA,CAAA,SAAA,CAAA,WAAA,CAAA,CAAA;AACA,SAAA;AAAA,QACA,OAAA,KAAA,CAAA;AAEA,OAAA,CAAA,CAAA;AAAA,MAAA;AACA,QACA,CAAA,QAAA,GAAA,CAAA,EAAA,OAAA,CAAA,EAAA,CAAA;AAAA,QACA,SAAA,EAAA,CAAA,SAAA,EAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,MAAA,CAAA,GAAA,CAAA;AAAA,OACA,CAAA;AAEA,KAAA,CAAA;AAEA,IACA,MAAA,MAAA,GAAA,MAAA,QACA,CAAA,KAAA,GAAA,WAAA,EAAA,CAAA;AACA,IAAA,KAAA,CAAA,MAAA,KAAA,CAAA,IAAA,EAAA,YAAA;AACA,MAAA,MAAA,QAAA,EAAA,CAAA;AAAA,MAEA,MAAA,EAAA,CAAA;AAEA,KAAA,EAAA,EAAA,SAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAEA,IAAA,iBAAA,CAAA,MAAA,EAAA,MAAA,MAAA,EAAA,CAAA,CAAA;AAAA,IAAA,MAEA,CAAA;AAAA,MAEA,GAAA,EAAA,MAAA;AAAA,MACA,MAAA;;;;;;;;;;;;;;;;"}
@@ -7,7 +7,7 @@ import { PsIcon } from '../../icon/index.mjs';
7
7
  import { ArrowLeft, ArrowRight, Close } from '@element-plus/icons-vue';
8
8
  import '../../../tokens/index.mjs';
9
9
  import '../../../hooks/index.mjs';
10
- import TabBar from './tab-bar.mjs';
10
+ import TabBar from './tab-bar2.mjs';
11
11
  import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
12
12
  import { mutable } from '../../../utils/typescript.mjs';
13
13
  import { tabsRootContextKey } from '../../../tokens/tabs.mjs';
@@ -1,65 +1,19 @@
1
- import { defineComponent, getCurrentInstance, inject, ref, computed, watch, reactive, markRaw, unref, withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow, createCommentVNode } from 'vue';
2
- import { eagerComputed } from '@vueuse/core';
3
- import '../../../tokens/index.mjs';
4
1
  import '../../../utils/index.mjs';
5
- import '../../../hooks/index.mjs';
6
- import { tabPaneProps } from './tab-pane2.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { tabsRootContextKey } from '../../../tokens/tabs.mjs';
9
- import { throwError } from '../../../utils/error.mjs';
10
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
2
+ import { buildProps } from '../../../utils/vue/props.mjs';
11
3
 
12
- const _hoisted_1 = ["id", "aria-hidden", "aria-labelledby"];
13
- const __default__ = {
14
- name: "PsTabPane"
15
- };
16
- const _sfc_main = /* @__PURE__ */ defineComponent({
17
- ...__default__,
18
- props: tabPaneProps,
19
- setup(__props) {
20
- const props = __props;
21
- const COMPONENT_NAME = "PsTabPane";
22
- const instance = getCurrentInstance();
23
- const tabsRoot = inject(tabsRootContextKey);
24
- if (!tabsRoot)
25
- throwError(COMPONENT_NAME, "usage: <ps-tabs><ps-tab-pane /></ps-tabs/>");
26
- const ns = useNamespace("tab-pane");
27
- const index = ref();
28
- const isClosable = computed(() => props.closable || tabsRoot.props.closable);
29
- const active = eagerComputed(() => tabsRoot.currentName.value === (props.name || index.value));
30
- const loaded = ref(active.value);
31
- const paneName = computed(() => props.name || index.value);
32
- const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
33
- watch(active, (val) => {
34
- if (val)
35
- loaded.value = true;
36
- });
37
- tabsRoot.updatePaneState(reactive({
38
- uid: instance.uid,
39
- instance: markRaw(instance),
40
- props,
41
- paneName,
42
- active,
43
- index,
44
- isClosable
45
- }));
46
- return (_ctx, _cache) => {
47
- return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
48
- key: 0,
49
- id: `pane-${unref(paneName)}`,
50
- class: normalizeClass(unref(ns).b()),
51
- role: "tabpanel",
52
- "aria-hidden": !unref(active),
53
- "aria-labelledby": `tab-${unref(paneName)}`
54
- }, [
55
- renderSlot(_ctx.$slots, "default")
56
- ], 10, _hoisted_1)), [
57
- [vShow, unref(active)]
58
- ]) : createCommentVNode("v-if", true);
59
- };
60
- }
4
+ const tabPaneProps = buildProps({
5
+ label: {
6
+ type: String,
7
+ default: ""
8
+ },
9
+ name: {
10
+ type: [String, Number],
11
+ default: ""
12
+ },
13
+ closable: Boolean,
14
+ disabled: Boolean,
15
+ lazy: Boolean
61
16
  });
62
- var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tabs/src/tab-pane.vue"]]);
63
17
 
64
- export { TabPane as default };
18
+ export { tabPaneProps };
65
19
  //# sourceMappingURL=tab-pane.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n markRaw,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { tabsRootContextKey } from '@element-ps/tokens'\nimport { throwError } from '@element-ps/utils'\nimport { useNamespace } from '@element-ps/hooks'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'PsTabPane'\ndefineOptions({\n name: 'PsTabPane',\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <ps-tabs><ps-tab-pane /></ps-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable || tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name || index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name || index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\ntabsRoot.updatePaneState(\n reactive({\n uid: instance.uid,\n instance: markRaw(instance),\n props,\n paneName,\n active,\n index,\n isClosable,\n })\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AAMA,IAAA,MAAA,WAAA,kBAAA,EAAA,CAAA;AACA,IAAA,MAAA,QAAA,GAAA,OAAA,kBAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA;AACA,MAAA,UAAA,CAAA,gBAAA,4CAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,UAAA,CAAA,CAAA;AAEA,IAAA,MAAA,QAAA,GAAA,EAAA,CAAA;AACA,IAAA,MAAA,aAAA,QAAA,CAAA,MAAA,MAAA,QAAA,IAAA,QAAA,CAAA,MAAA,QAAA,CAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,cACA,MAAA,QAAA,CAAA,YAAA,KAAA,MAAA,KAAA,CAAA,IAAA,IAAA,KAAA,CAAA,KACA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,GAAA,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,WAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,MAAA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,cAAA,GAAA,cACA,MAAA,CAAA,MAAA,IAAA,IAAA,MAAA,CAAA,KAAA,IAAA,MAAA,CAAA,KACA,CAAA,CAAA;AAEA,IAAA,KAAA,CAAA,MAAA,EAAA,CAAA,GAAA,KAAA;AACA,MAAA,IAAA,GAAA;AAAA,QAAA,MAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,QAAA,CAAA,gBACA,QAAA,CAAA;AAAA,MACA,KAAA,QAAA,CAAA,GAAA;AAAA,MACA,QAAA,EAAA,QAAA,QAAA,CAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,KACA,CACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\nexport const tabPaneProps = buildProps({\n label: {\n type: String,\n default: '',\n },\n name: {\n type: [String, Number],\n default: '',\n },\n closable: Boolean,\n disabled: Boolean,\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane>\n"],"names":[],"mappings":";;;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,OAAO;AACf,CAAC;;;;"}
@@ -1,19 +1,65 @@
1
+ import { defineComponent, getCurrentInstance, inject, ref, computed, watch, reactive, markRaw, unref, withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow, createCommentVNode } from 'vue';
2
+ import { eagerComputed } from '@vueuse/core';
3
+ import '../../../tokens/index.mjs';
1
4
  import '../../../utils/index.mjs';
2
- import { buildProps } from '../../../utils/vue/props.mjs';
5
+ import '../../../hooks/index.mjs';
6
+ import { tabPaneProps } from './tab-pane.mjs';
7
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
+ import { tabsRootContextKey } from '../../../tokens/tabs.mjs';
9
+ import { throwError } from '../../../utils/error.mjs';
10
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
11
 
4
- const tabPaneProps = buildProps({
5
- label: {
6
- type: String,
7
- default: ""
8
- },
9
- name: {
10
- type: [String, Number],
11
- default: ""
12
- },
13
- closable: Boolean,
14
- disabled: Boolean,
15
- lazy: Boolean
12
+ const _hoisted_1 = ["id", "aria-hidden", "aria-labelledby"];
13
+ const __default__ = {
14
+ name: "PsTabPane"
15
+ };
16
+ const _sfc_main = /* @__PURE__ */ defineComponent({
17
+ ...__default__,
18
+ props: tabPaneProps,
19
+ setup(__props) {
20
+ const props = __props;
21
+ const COMPONENT_NAME = "PsTabPane";
22
+ const instance = getCurrentInstance();
23
+ const tabsRoot = inject(tabsRootContextKey);
24
+ if (!tabsRoot)
25
+ throwError(COMPONENT_NAME, "usage: <ps-tabs><ps-tab-pane /></ps-tabs/>");
26
+ const ns = useNamespace("tab-pane");
27
+ const index = ref();
28
+ const isClosable = computed(() => props.closable || tabsRoot.props.closable);
29
+ const active = eagerComputed(() => tabsRoot.currentName.value === (props.name || index.value));
30
+ const loaded = ref(active.value);
31
+ const paneName = computed(() => props.name || index.value);
32
+ const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
33
+ watch(active, (val) => {
34
+ if (val)
35
+ loaded.value = true;
36
+ });
37
+ tabsRoot.updatePaneState(reactive({
38
+ uid: instance.uid,
39
+ instance: markRaw(instance),
40
+ props,
41
+ paneName,
42
+ active,
43
+ index,
44
+ isClosable
45
+ }));
46
+ return (_ctx, _cache) => {
47
+ return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
48
+ key: 0,
49
+ id: `pane-${unref(paneName)}`,
50
+ class: normalizeClass(unref(ns).b()),
51
+ role: "tabpanel",
52
+ "aria-hidden": !unref(active),
53
+ "aria-labelledby": `tab-${unref(paneName)}`
54
+ }, [
55
+ renderSlot(_ctx.$slots, "default")
56
+ ], 10, _hoisted_1)), [
57
+ [vShow, unref(active)]
58
+ ]) : createCommentVNode("v-if", true);
59
+ };
60
+ }
16
61
  });
62
+ var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tabs/src/tab-pane.vue"]]);
17
63
 
18
- export { tabPaneProps };
64
+ export { TabPane as default };
19
65
  //# sourceMappingURL=tab-pane2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-pane2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\nexport const tabPaneProps = buildProps({\n label: {\n type: String,\n default: '',\n },\n name: {\n type: [String, Number],\n default: '',\n },\n closable: Boolean,\n disabled: Boolean,\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane>\n"],"names":[],"mappings":";;;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,OAAO;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"tab-pane2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n markRaw,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { tabsRootContextKey } from '@element-ps/tokens'\nimport { throwError } from '@element-ps/utils'\nimport { useNamespace } from '@element-ps/hooks'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'PsTabPane'\ndefineOptions({\n name: 'PsTabPane',\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <ps-tabs><ps-tab-pane /></ps-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable || tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name || index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name || index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\ntabsRoot.updatePaneState(\n reactive({\n uid: instance.uid,\n instance: markRaw(instance),\n props,\n paneName,\n active,\n index,\n isClosable,\n })\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA6BA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AAMA,IAAA,MAAA,WAAA,kBAAA,EAAA,CAAA;AACA,IAAA,MAAA,QAAA,GAAA,OAAA,kBAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,QAAA;AACA,MAAA,UAAA,CAAA,gBAAA,4CAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,UAAA,CAAA,CAAA;AAEA,IAAA,MAAA,QAAA,GAAA,EAAA,CAAA;AACA,IAAA,MAAA,aAAA,QAAA,CAAA,MAAA,MAAA,QAAA,IAAA,QAAA,CAAA,MAAA,QAAA,CAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,cACA,MAAA,QAAA,CAAA,YAAA,KAAA,MAAA,KAAA,CAAA,IAAA,IAAA,KAAA,CAAA,KACA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,MAAA,GAAA,GAAA,CAAA,MAAA,CAAA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,WAAA,QAAA,CAAA,MAAA,KAAA,CAAA,IAAA,IAAA,MAAA,KAAA,CAAA,CAAA;AACA,IAAA,MAAA,cAAA,GAAA,cACA,MAAA,CAAA,MAAA,IAAA,IAAA,MAAA,CAAA,KAAA,IAAA,MAAA,CAAA,KACA,CAAA,CAAA;AAEA,IAAA,KAAA,CAAA,MAAA,EAAA,CAAA,GAAA,KAAA;AACA,MAAA,IAAA,GAAA;AAAA,QAAA,MAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,QAAA,CAAA,gBACA,QAAA,CAAA;AAAA,MACA,KAAA,QAAA,CAAA,GAAA;AAAA,MACA,QAAA,EAAA,QAAA,QAAA,CAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,KACA,CACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
2
  import TooltipV2 from './src/tooltip2.mjs';
3
- export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/arrow2.mjs';
3
+ export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/arrow.mjs';
4
4
  export { tooltipV2ContentProps } from './src/content2.mjs';
5
5
  export { tooltipV2RootProps } from './src/root.mjs';
6
6
  export { tooltipV2Props } from './src/tooltip.mjs';
@@ -1,44 +1,28 @@
1
- import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
2
- import '../../../tokens/index.mjs';
3
- import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow2.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { tooltipV2RootKey, tooltipV2ContentKey } from '../../../tokens/tooltip-v2.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { tooltipV2Sides } from './common.mjs';
3
+ import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
6
4
 
7
- const __default__ = {
8
- name: "PsTooltipV2Arrow"
9
- };
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...__default__,
12
- props: {
13
- ...tooltipV2ArrowProps,
14
- ...tooltipV2ArrowSpecialProps
5
+ const tooltipV2ArrowProps = buildProps({
6
+ width: {
7
+ type: Number,
8
+ default: 10
15
9
  },
16
- setup(__props) {
17
- const props = __props;
18
- const { ns } = inject(tooltipV2RootKey);
19
- const { arrowRef } = inject(tooltipV2ContentKey);
20
- const arrowStyle = computed(() => {
21
- const { style, width, height } = props;
22
- const namespace = ns.namespace.value;
23
- return {
24
- [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
25
- [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
26
- [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
27
- [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
28
- ...style || {}
29
- };
30
- });
31
- return (_ctx, _cache) => {
32
- return openBlock(), createElementBlock("span", {
33
- ref_key: "arrowRef",
34
- ref: arrowRef,
35
- style: normalizeStyle(unref(arrowStyle)),
36
- class: normalizeClass(unref(ns).e("arrow"))
37
- }, null, 6);
38
- };
10
+ height: {
11
+ type: Number,
12
+ default: 10
13
+ },
14
+ style: {
15
+ type: definePropType(Object),
16
+ default: null
17
+ }
18
+ });
19
+ const tooltipV2ArrowSpecialProps = buildProps({
20
+ side: {
21
+ type: definePropType(String),
22
+ values: tooltipV2Sides,
23
+ required: true
39
24
  }
40
25
  });
41
- var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tooltip-v2/src/arrow.vue"]]);
42
26
 
43
- export { TooltipV2Arrow as default };
27
+ export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
44
28
  //# sourceMappingURL=arrow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from '@element-ps/tokens'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'PsTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,EAAA,EAAA,EAAA,GAAA,MAAA,CAAA,gBAAA,CAAA,CAAA;AACA,IAAA,MAAA,EAAA,QAAA,EAAA,GAAA,MAAA,CAAA,mBAAA,CAAA,CAAA;AAEA,IAAA,MAAA,UAAA,GAAA,SAAA,MAAA;AACA,MAAA,MAAA,EAAA,KAAA,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,KAAA,CAAA;AACA,MAAA,MAAA,SAAA,GAAA,GAAA,SAAA,CAAA,KAAA,CAAA;AAEA,MAAA,OAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,qCAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,sCAAA,CAAA,EAAA,MAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,SAAA,CAAA,8BAAA,CAAA,GAAA,CAAA,EAAA,KAAA,GAAA,CAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,SAAA,CAAA,6BAAA,CAAA,GAAA,KAAA,GAAA,CAAA,GAAA,CAAA;AAAA,QAAA,GACA,SAAA,EAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport { tooltipV2Sides } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TooltipV2Sides } from './common'\n\nexport const tooltipV2ArrowProps = buildProps({\n width: {\n type: Number,\n default: 10,\n },\n height: {\n type: Number,\n default: 10,\n },\n style: {\n type: definePropType<CSSProperties | null>(Object),\n default: null,\n },\n} as const)\n\nexport const tooltipV2ArrowSpecialProps = buildProps({\n side: {\n type: definePropType<TooltipV2Sides>(String),\n values: tooltipV2Sides,\n required: true,\n },\n} as const)\n\nexport type TooltipV2ArrowProps = ExtractPropTypes<typeof tooltipV2ArrowProps>\n"],"names":[],"mappings":";;;;AAEY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAG,UAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
@@ -1,28 +1,44 @@
1
- import '../../../utils/index.mjs';
2
- import { tooltipV2Sides } from './common.mjs';
3
- import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
1
+ import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
2
+ import '../../../tokens/index.mjs';
3
+ import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { tooltipV2RootKey, tooltipV2ContentKey } from '../../../tokens/tooltip-v2.mjs';
4
6
 
5
- const tooltipV2ArrowProps = buildProps({
6
- width: {
7
- type: Number,
8
- default: 10
7
+ const __default__ = {
8
+ name: "PsTooltipV2Arrow"
9
+ };
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...__default__,
12
+ props: {
13
+ ...tooltipV2ArrowProps,
14
+ ...tooltipV2ArrowSpecialProps
9
15
  },
10
- height: {
11
- type: Number,
12
- default: 10
13
- },
14
- style: {
15
- type: definePropType(Object),
16
- default: null
17
- }
18
- });
19
- const tooltipV2ArrowSpecialProps = buildProps({
20
- side: {
21
- type: definePropType(String),
22
- values: tooltipV2Sides,
23
- required: true
16
+ setup(__props) {
17
+ const props = __props;
18
+ const { ns } = inject(tooltipV2RootKey);
19
+ const { arrowRef } = inject(tooltipV2ContentKey);
20
+ const arrowStyle = computed(() => {
21
+ const { style, width, height } = props;
22
+ const namespace = ns.namespace.value;
23
+ return {
24
+ [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
25
+ [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
26
+ [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
27
+ [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
28
+ ...style || {}
29
+ };
30
+ });
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createElementBlock("span", {
33
+ ref_key: "arrowRef",
34
+ ref: arrowRef,
35
+ style: normalizeStyle(unref(arrowStyle)),
36
+ class: normalizeClass(unref(ns).e("arrow"))
37
+ }, null, 6);
38
+ };
24
39
  }
25
40
  });
41
+ var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tooltip-v2/src/arrow.vue"]]);
26
42
 
27
- export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
43
+ export { TooltipV2Arrow as default };
28
44
  //# sourceMappingURL=arrow2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport { tooltipV2Sides } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TooltipV2Sides } from './common'\n\nexport const tooltipV2ArrowProps = buildProps({\n width: {\n type: Number,\n default: 10,\n },\n height: {\n type: Number,\n default: 10,\n },\n style: {\n type: definePropType<CSSProperties | null>(Object),\n default: null,\n },\n} as const)\n\nexport const tooltipV2ArrowSpecialProps = buildProps({\n side: {\n type: definePropType<TooltipV2Sides>(String),\n values: tooltipV2Sides,\n required: true,\n },\n} as const)\n\nexport type TooltipV2ArrowProps = ExtractPropTypes<typeof tooltipV2ArrowProps>\n"],"names":[],"mappings":";;;;AAEY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAG,UAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from '@element-ps/tokens'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'PsTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,EAAA,EAAA,EAAA,GAAA,MAAA,CAAA,gBAAA,CAAA,CAAA;AACA,IAAA,MAAA,EAAA,QAAA,EAAA,GAAA,MAAA,CAAA,mBAAA,CAAA,CAAA;AAEA,IAAA,MAAA,UAAA,GAAA,SAAA,MAAA;AACA,MAAA,MAAA,EAAA,KAAA,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,KAAA,CAAA;AACA,MAAA,MAAA,SAAA,GAAA,GAAA,SAAA,CAAA,KAAA,CAAA;AAEA,MAAA,OAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,qCAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,sCAAA,CAAA,EAAA,MAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,SAAA,CAAA,8BAAA,CAAA,GAAA,CAAA,EAAA,KAAA,GAAA,CAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,SAAA,CAAA,6BAAA,CAAA,GAAA,KAAA,GAAA,CAAA,GAAA,CAAA;AAAA,QAAA,GACA,SAAA,EAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import '../../../utils/index.mjs';
2
2
  import { tooltipV2RootProps } from './root.mjs';
3
3
  import { tooltipV2TriggerProps } from './trigger.mjs';
4
- import { tooltipV2ArrowProps } from './arrow2.mjs';
4
+ import { tooltipV2ArrowProps } from './arrow.mjs';
5
5
  import { tooltipV2ContentProps } from './content2.mjs';
6
6
  import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
7
7
 
@@ -1,12 +1,12 @@
1
1
  import { defineComponent, toRefs, reactive, openBlock, createBlock, normalizeProps, guardReactiveProps, unref, withCtx, createVNode, mergeProps, renderSlot, Teleport, Transition, createCommentVNode, createElementBlock, Fragment } from 'vue';
2
2
  import { pick } from 'lodash-unified';
3
- import { tooltipV2ArrowProps } from './arrow2.mjs';
3
+ import { tooltipV2ArrowProps } from './arrow.mjs';
4
4
  import { tooltipV2ContentProps } from './content2.mjs';
5
5
  import { tooltipV2RootProps } from './root.mjs';
6
6
  import { tooltipV2Props } from './tooltip.mjs';
7
7
  import { tooltipV2TriggerProps } from './trigger.mjs';
8
8
  import TooltipV2Root from './root2.mjs';
9
- import TooltipV2Arrow from './arrow.mjs';
9
+ import TooltipV2Arrow from './arrow2.mjs';
10
10
  import TooltipV2Content from './content.mjs';
11
11
  import TooltipV2Trigger from './trigger2.mjs';
12
12
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
@@ -1,9 +1,9 @@
1
1
  import '../../utils/index.mjs';
2
- import Upload from './src/upload.mjs';
3
- export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './src/upload2.mjs';
2
+ import Upload from './src/upload2.mjs';
3
+ export { genFileId, uploadBaseProps, uploadListTypes, uploadProps } from './src/upload.mjs';
4
4
  export { uploadContentProps } from './src/upload-content.mjs';
5
- export { uploadListEmits, uploadListProps } from './src/upload-list.mjs';
6
- export { uploadDraggerEmits, uploadDraggerProps } from './src/upload-dragger2.mjs';
5
+ export { uploadListEmits, uploadListProps } from './src/upload-list2.mjs';
6
+ export { uploadDraggerEmits, uploadDraggerProps } from './src/upload-dragger.mjs';
7
7
  import { withInstall } from '../../utils/vue/install.mjs';
8
8
 
9
9
  const PsUpload = withInstall(Upload);
@@ -1,6 +1,6 @@
1
1
  import { NOOP } from '@vue/shared';
2
2
  import '../../../utils/index.mjs';
3
- import { uploadBaseProps } from './upload2.mjs';
3
+ import { uploadBaseProps } from './upload.mjs';
4
4
  import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
5
5
  import { mutable } from '../../../utils/typescript.mjs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, shallowRef, openBlock, createElementBlock, normalizeClass, unref, createBlock, withCtx, renderSlot, createElementVNode } from 'vue';
2
2
  import '../../../hooks/index.mjs';
3
- import UploadDragger from './upload-dragger.mjs';
3
+ import UploadDragger from './upload-dragger2.mjs';
4
4
  import { uploadContentProps } from './upload-content.mjs';
5
5
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
6
  import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
@@ -1,37 +1,16 @@
1
- import { defineComponent, inject, ref, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
2
- import '../../../hooks/index.mjs';
3
- import '../../../tokens/index.mjs';
4
- import { throwError } from '../../../utils/error.mjs';
5
- import { uploadDraggerProps } from './upload-dragger2.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { uploadContextKey } from '../../../tokens/upload.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps } from '../../../utils/vue/props.mjs';
3
+ import { isArray } from '@vue/shared';
9
4
 
10
- const __default__ = {
11
- name: "PsUploadDrag"
12
- };
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- ...__default__,
15
- props: uploadDraggerProps,
16
- setup(__props) {
17
- const props = __props;
18
- const COMPONENT_NAME = "PsUploadDrag";
19
- const uploaderContext = inject(uploadContextKey);
20
- if (!uploaderContext) {
21
- throwError(COMPONENT_NAME, "usage: <ps-upload><ps-upload-dragger /></ps-upload>");
22
- }
23
- const ns = useNamespace("upload");
24
- const dragover = ref(false);
25
- return (_ctx, _cache) => {
26
- return openBlock(), createElementBlock("div", {
27
- class: normalizeClass([unref(ns).b("dragger"), unref(ns).is("dragover", dragover.value)])
28
- }, [
29
- renderSlot(_ctx.$slots, "default")
30
- ], 2);
31
- };
5
+ const uploadDraggerProps = buildProps({
6
+ disabled: {
7
+ type: Boolean,
8
+ default: false
32
9
  }
33
10
  });
34
- var UploadDragger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/upload/src/upload-dragger.vue"]]);
11
+ const uploadDraggerEmits = {
12
+ file: (file) => isArray(file)
13
+ };
35
14
 
36
- export { UploadDragger as default };
15
+ export { uploadDraggerEmits, uploadDraggerProps };
37
16
  //# sourceMappingURL=upload-dragger.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"upload-dragger.mjs","sources":["../../../../../../packages/components/upload/src/upload-dragger.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b('dragger'), ns.is('dragover', dragover)]\"\n >\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport { useNamespace } from '@element-ps/hooks'\n\nimport { uploadContextKey } from '@element-ps/tokens'\nimport { throwError } from '@element-ps/utils/error'\nimport { uploadDraggerProps } from './upload-dragger'\n\nconst COMPONENT_NAME = 'PsUploadDrag'\n\ndefineOptions({\n name: 'PsUploadDrag',\n})\n\nconst props = defineProps(uploadDraggerProps)\n\nconst uploaderContext = inject(uploadContextKey)\nif (!uploaderContext) {\n throwError(\n COMPONENT_NAME,\n 'usage: <ps-upload><ps-upload-dragger /></ps-upload>'\n )\n}\n\nconst ns = useNamespace('upload')\nconst dragover = ref(false)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAeA,IAAA,MAAA,cAAA,GAAA,cAAA,CAAA;AAQA,IAAA,MAAA,eAAA,GAAA,OAAA,gBAAA,CAAA,CAAA;AACA,IAAA,IAAA,CAAA,eAAA,EAAA;AACA,MAAA,UAAA,CACA,gBACA,qDACA,CAAA,CAAA;AAAA,KACA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,QAAA,CAAA,CAAA;AACA,IAAA,MAAA,QAAA,GAAA,IAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"upload-dragger.mjs","sources":["../../../../../../packages/components/upload/src/upload-dragger.ts"],"sourcesContent":["import { buildProps, isArray } from '@element-ps/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type UploadDragger from './upload-dragger.vue'\n\nexport const uploadDraggerProps = buildProps({\n disabled: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type UploadDraggerProps = ExtractPropTypes<typeof uploadDraggerProps>\n\nexport const uploadDraggerEmits = {\n file: (file: File[]) => isArray(file),\n}\nexport type UploadDraggerEmits = typeof uploadDraggerEmits\n\nexport type UploadDraggerInstance = InstanceType<typeof UploadDragger>\n"],"names":[],"mappings":";;;;AACY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,IAAI,EAAE,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC;AAC/B;;;;"}