element-ps 2.0.37 → 2.0.38

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 (456) hide show
  1. package/dist/index.full.js +5 -1
  2. package/dist/index.full.min.js +1 -1
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +1 -1
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +5 -1
  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/alert/index.mjs +2 -2
  13. package/es/components/alert/src/alert.mjs +33 -83
  14. package/es/components/alert/src/alert.mjs.map +1 -1
  15. package/es/components/alert/src/alert2.mjs +83 -33
  16. package/es/components/alert/src/alert2.mjs.map +1 -1
  17. package/es/components/autocomplete/index.d.ts +5 -5
  18. package/es/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  19. package/es/components/backtop/index.mjs +2 -2
  20. package/es/components/backtop/src/backtop.mjs +59 -18
  21. package/es/components/backtop/src/backtop.mjs.map +1 -1
  22. package/es/components/backtop/src/backtop2.mjs +18 -59
  23. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  24. package/es/components/badge/index.mjs +2 -2
  25. package/es/components/badge/src/badge.mjs +54 -17
  26. package/es/components/badge/src/badge.mjs.map +1 -1
  27. package/es/components/badge/src/badge2.mjs +17 -54
  28. package/es/components/badge/src/badge2.mjs.map +1 -1
  29. package/es/components/breadcrumb/index.mjs +2 -2
  30. package/es/components/breadcrumb/src/breadcrumb.mjs +12 -37
  31. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  32. package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -12
  33. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  34. package/es/components/button/index.mjs +2 -2
  35. package/es/components/button/src/button-group.mjs +1 -1
  36. package/es/components/button/src/button.mjs +48 -96
  37. package/es/components/button/src/button.mjs.map +1 -1
  38. package/es/components/button/src/button2.mjs +96 -48
  39. package/es/components/button/src/button2.mjs.map +1 -1
  40. package/es/components/calendar/index.mjs +2 -2
  41. package/es/components/calendar/src/calendar.mjs +9 -188
  42. package/es/components/calendar/src/calendar.mjs.map +1 -1
  43. package/es/components/calendar/src/calendar2.mjs +188 -9
  44. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  45. package/es/components/carousel/index.mjs +2 -2
  46. package/es/components/carousel/src/carousel.mjs +201 -43
  47. package/es/components/carousel/src/carousel.mjs.map +1 -1
  48. package/es/components/carousel/src/carousel2.mjs +43 -201
  49. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  50. package/es/components/cascader-panel/src/config.mjs +1 -1
  51. package/es/components/cascader-panel/src/index.mjs +1 -1
  52. package/es/components/cascader-panel/src/menu.mjs +1 -1
  53. package/es/components/cascader-panel/src/node.mjs +120 -200
  54. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  55. package/es/components/cascader-panel/src/node2.mjs +200 -120
  56. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  57. package/es/components/cascader-panel/src/store.mjs +1 -1
  58. package/es/components/check-tag/index.mjs +2 -2
  59. package/es/components/check-tag/src/check-tag.mjs +7 -20
  60. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  61. package/es/components/check-tag/src/check-tag2.mjs +20 -7
  62. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  63. package/es/components/collapse/index.mjs +2 -2
  64. package/es/components/collapse/src/collapse.mjs +61 -14
  65. package/es/components/collapse/src/collapse.mjs.map +1 -1
  66. package/es/components/collapse/src/collapse2.mjs +14 -61
  67. package/es/components/collapse/src/collapse2.mjs.map +1 -1
  68. package/es/components/collection/index.mjs +1 -1
  69. package/es/components/collection/src/collection.mjs +10 -30
  70. package/es/components/collection/src/collection.mjs.map +1 -1
  71. package/es/components/collection/src/collection2.mjs +30 -10
  72. package/es/components/collection/src/collection2.mjs.map +1 -1
  73. package/es/components/divider/index.mjs +2 -2
  74. package/es/components/divider/src/divider.mjs +17 -34
  75. package/es/components/divider/src/divider.mjs.map +1 -1
  76. package/es/components/divider/src/divider2.mjs +34 -17
  77. package/es/components/divider/src/divider2.mjs.map +1 -1
  78. package/es/components/drawer/index.mjs +2 -2
  79. package/es/components/drawer/src/drawer.mjs +23 -117
  80. package/es/components/drawer/src/drawer.mjs.map +1 -1
  81. package/es/components/drawer/src/drawer2.mjs +117 -23
  82. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  83. package/es/components/dropdown/index.d.ts +3 -3
  84. package/es/components/dropdown/index.mjs +2 -2
  85. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  86. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  87. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  88. package/es/components/dropdown/src/dropdown.d.ts +1 -1
  89. package/es/components/dropdown/src/dropdown.mjs +109 -100
  90. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  91. package/es/components/dropdown/src/dropdown.vue.d.ts +3 -3
  92. package/es/components/dropdown/src/dropdown2.mjs +100 -109
  93. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  94. package/es/components/empty/index.mjs +2 -2
  95. package/es/components/empty/src/empty.mjs +56 -11
  96. package/es/components/empty/src/empty.mjs.map +1 -1
  97. package/es/components/empty/src/empty2.mjs +11 -56
  98. package/es/components/empty/src/empty2.mjs.map +1 -1
  99. package/es/components/form/index.mjs +4 -4
  100. package/es/components/form/src/form-item.mjs +46 -171
  101. package/es/components/form/src/form-item.mjs.map +1 -1
  102. package/es/components/form/src/form-item2.mjs +171 -46
  103. package/es/components/form/src/form-item2.mjs.map +1 -1
  104. package/es/components/form/src/form.mjs +40 -45
  105. package/es/components/form/src/form.mjs.map +1 -1
  106. package/es/components/form/src/form2.mjs +45 -40
  107. package/es/components/form/src/form2.mjs.map +1 -1
  108. package/es/components/icon/index.mjs +2 -2
  109. package/es/components/icon/src/icon.mjs +8 -35
  110. package/es/components/icon/src/icon.mjs.map +1 -1
  111. package/es/components/icon/src/icon2.mjs +35 -8
  112. package/es/components/icon/src/icon2.mjs.map +1 -1
  113. package/es/components/image-viewer/index.mjs +2 -2
  114. package/es/components/image-viewer/src/image-viewer.mjs +210 -31
  115. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  116. package/es/components/image-viewer/src/image-viewer2.mjs +31 -210
  117. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  118. package/es/components/index.mjs +33 -33
  119. package/es/components/link/index.mjs +2 -2
  120. package/es/components/link/src/link.mjs +43 -19
  121. package/es/components/link/src/link.mjs.map +1 -1
  122. package/es/components/link/src/link2.mjs +19 -43
  123. package/es/components/link/src/link2.mjs.map +1 -1
  124. package/es/components/menu/index.d.ts +3 -3
  125. package/es/components/menu/index.mjs +4 -4
  126. package/es/components/menu/src/menu-item-group.mjs +4 -35
  127. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  128. package/es/components/menu/src/menu-item-group2.mjs +35 -4
  129. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  130. package/es/components/menu/src/menu-item.mjs +74 -15
  131. package/es/components/menu/src/menu-item.mjs.map +1 -1
  132. package/es/components/menu/src/menu-item2.mjs +15 -74
  133. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  134. package/es/components/menu/src/menu.d.ts +4 -4
  135. package/es/components/popconfirm/src/popconfirm.mjs +1 -1
  136. package/es/components/popover/index.d.ts +6 -6
  137. package/es/components/popover/src/index.vue.d.ts +3 -3
  138. package/es/components/popover/src/popover.d.ts +1 -1
  139. package/es/components/popover/src/popover.mjs +1 -1
  140. package/es/components/popper/index.mjs +4 -4
  141. package/es/components/popper/src/arrow.mjs +7 -31
  142. package/es/components/popper/src/arrow.mjs.map +1 -1
  143. package/es/components/popper/src/arrow2.mjs +31 -7
  144. package/es/components/popper/src/arrow2.mjs.map +1 -1
  145. package/es/components/popper/src/trigger.mjs +28 -17
  146. package/es/components/popper/src/trigger.mjs.map +1 -1
  147. package/es/components/popper/src/trigger2.mjs +17 -28
  148. package/es/components/popper/src/trigger2.mjs.map +1 -1
  149. package/es/components/radio/index.mjs +2 -2
  150. package/es/components/radio/src/radio-button.mjs +1 -1
  151. package/es/components/radio/src/radio-button2.mjs +1 -1
  152. package/es/components/radio/src/radio.mjs +74 -62
  153. package/es/components/radio/src/radio.mjs.map +1 -1
  154. package/es/components/radio/src/radio2.mjs +62 -74
  155. package/es/components/radio/src/radio2.mjs.map +1 -1
  156. package/es/components/result/index.mjs +2 -2
  157. package/es/components/result/src/result.mjs +73 -28
  158. package/es/components/result/src/result.mjs.map +1 -1
  159. package/es/components/result/src/result2.mjs +28 -73
  160. package/es/components/result/src/result2.mjs.map +1 -1
  161. package/es/components/roving-focus-group/index.mjs +3 -3
  162. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  163. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  164. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  165. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  166. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  167. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  168. package/es/components/select/index.d.ts +5 -5
  169. package/es/components/select/src/select.vue.d.ts +5 -5
  170. package/es/components/select/src/useSelect.d.ts +5 -5
  171. package/es/components/select-v2/index.d.ts +10 -10
  172. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  173. package/es/components/select-v2/src/select.vue.d.ts +5 -5
  174. package/es/components/select-v2/src/useSelect.d.ts +5 -5
  175. package/es/components/skeleton/index.mjs +4 -4
  176. package/es/components/skeleton/src/skeleton-item.mjs +18 -23
  177. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  178. package/es/components/skeleton/src/skeleton-item2.mjs +23 -18
  179. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  180. package/es/components/skeleton/src/skeleton.mjs +49 -22
  181. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  182. package/es/components/skeleton/src/skeleton2.mjs +22 -49
  183. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  184. package/es/components/table/index.d.ts +1 -1
  185. package/es/components/table/src/filter-panel.vue.d.ts +5 -5
  186. package/es/components/table/src/store/helper.mjs +5 -1
  187. package/es/components/table/src/store/helper.mjs.map +1 -1
  188. package/es/components/table/src/table.vue.d.ts +1 -1
  189. package/es/components/tabs/index.mjs +1 -1
  190. package/es/components/tabs/src/tab-bar.mjs +7 -76
  191. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  192. package/es/components/tabs/src/tab-bar2.mjs +76 -7
  193. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  194. package/es/components/tabs/src/tab-nav.mjs +1 -1
  195. package/es/components/teleport/index.mjs +2 -2
  196. package/es/components/teleport/src/teleport.mjs +18 -43
  197. package/es/components/teleport/src/teleport.mjs.map +1 -1
  198. package/es/components/teleport/src/teleport2.mjs +43 -18
  199. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  200. package/es/components/time-picker/src/common/picker.vue.d.ts +5 -5
  201. package/es/components/timeline/index.mjs +2 -2
  202. package/es/components/timeline/src/timeline-item.mjs +73 -39
  203. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  204. package/es/components/timeline/src/timeline-item2.mjs +39 -73
  205. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  206. package/es/components/tooltip/index.d.ts +3 -3
  207. package/es/components/tooltip/src/tooltip.d.ts +1 -1
  208. package/es/components/tooltip/src/tooltip.mjs +1 -1
  209. package/es/components/tooltip/src/tooltip.vue.d.ts +3 -3
  210. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  211. package/es/components/tooltip/src/trigger.mjs +1 -1
  212. package/es/components/tooltip/src/trigger.vue.d.ts +3 -3
  213. package/es/components/tooltip-v2/index.mjs +1 -1
  214. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  215. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  216. package/es/components/tooltip-v2/src/trigger.mjs +89 -11
  217. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  218. package/es/components/tooltip-v2/src/trigger2.mjs +11 -89
  219. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  220. package/es/components/upload/index.mjs +3 -3
  221. package/es/components/upload/src/upload-content.mjs +15 -46
  222. package/es/components/upload/src/upload-content.mjs.map +1 -1
  223. package/es/components/upload/src/upload-content2.mjs +46 -15
  224. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  225. package/es/components/upload/src/upload-list.mjs +1 -1
  226. package/es/components/upload/src/upload.mjs +99 -106
  227. package/es/components/upload/src/upload.mjs.map +1 -1
  228. package/es/components/upload/src/upload2.mjs +106 -99
  229. package/es/components/upload/src/upload2.mjs.map +1 -1
  230. package/es/index.mjs +33 -33
  231. package/lib/components/affix/index.js +2 -2
  232. package/lib/components/affix/src/affix.js +19 -82
  233. package/lib/components/affix/src/affix.js.map +1 -1
  234. package/lib/components/affix/src/affix2.js +82 -19
  235. package/lib/components/affix/src/affix2.js.map +1 -1
  236. package/lib/components/alert/index.js +2 -2
  237. package/lib/components/alert/src/alert.js +33 -82
  238. package/lib/components/alert/src/alert.js.map +1 -1
  239. package/lib/components/alert/src/alert2.js +82 -33
  240. package/lib/components/alert/src/alert2.js.map +1 -1
  241. package/lib/components/autocomplete/index.d.ts +5 -5
  242. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +5 -5
  243. package/lib/components/backtop/index.js +2 -2
  244. package/lib/components/backtop/src/backtop.js +59 -18
  245. package/lib/components/backtop/src/backtop.js.map +1 -1
  246. package/lib/components/backtop/src/backtop2.js +18 -59
  247. package/lib/components/backtop/src/backtop2.js.map +1 -1
  248. package/lib/components/badge/index.js +2 -2
  249. package/lib/components/badge/src/badge.js +54 -17
  250. package/lib/components/badge/src/badge.js.map +1 -1
  251. package/lib/components/badge/src/badge2.js +17 -54
  252. package/lib/components/badge/src/badge2.js.map +1 -1
  253. package/lib/components/breadcrumb/index.js +2 -2
  254. package/lib/components/breadcrumb/src/breadcrumb.js +12 -37
  255. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  256. package/lib/components/breadcrumb/src/breadcrumb2.js +37 -12
  257. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  258. package/lib/components/button/index.js +2 -2
  259. package/lib/components/button/src/button-group.js +1 -1
  260. package/lib/components/button/src/button.js +50 -96
  261. package/lib/components/button/src/button.js.map +1 -1
  262. package/lib/components/button/src/button2.js +96 -50
  263. package/lib/components/button/src/button2.js.map +1 -1
  264. package/lib/components/calendar/index.js +2 -2
  265. package/lib/components/calendar/src/calendar.js +9 -192
  266. package/lib/components/calendar/src/calendar.js.map +1 -1
  267. package/lib/components/calendar/src/calendar2.js +192 -9
  268. package/lib/components/calendar/src/calendar2.js.map +1 -1
  269. package/lib/components/carousel/index.js +2 -2
  270. package/lib/components/carousel/src/carousel.js +201 -43
  271. package/lib/components/carousel/src/carousel.js.map +1 -1
  272. package/lib/components/carousel/src/carousel2.js +43 -201
  273. package/lib/components/carousel/src/carousel2.js.map +1 -1
  274. package/lib/components/cascader-panel/src/config.js +1 -1
  275. package/lib/components/cascader-panel/src/index.js +1 -1
  276. package/lib/components/cascader-panel/src/menu.js +1 -1
  277. package/lib/components/cascader-panel/src/node.js +121 -200
  278. package/lib/components/cascader-panel/src/node.js.map +1 -1
  279. package/lib/components/cascader-panel/src/node2.js +200 -121
  280. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  281. package/lib/components/cascader-panel/src/store.js +1 -1
  282. package/lib/components/check-tag/index.js +2 -2
  283. package/lib/components/check-tag/src/check-tag.js +7 -20
  284. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  285. package/lib/components/check-tag/src/check-tag2.js +20 -7
  286. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  287. package/lib/components/collapse/index.js +2 -2
  288. package/lib/components/collapse/src/collapse.js +61 -16
  289. package/lib/components/collapse/src/collapse.js.map +1 -1
  290. package/lib/components/collapse/src/collapse2.js +16 -61
  291. package/lib/components/collapse/src/collapse2.js.map +1 -1
  292. package/lib/components/collection/index.js +1 -1
  293. package/lib/components/collection/src/collection.js +9 -30
  294. package/lib/components/collection/src/collection.js.map +1 -1
  295. package/lib/components/collection/src/collection2.js +30 -9
  296. package/lib/components/collection/src/collection2.js.map +1 -1
  297. package/lib/components/divider/index.js +2 -2
  298. package/lib/components/divider/src/divider.js +17 -34
  299. package/lib/components/divider/src/divider.js.map +1 -1
  300. package/lib/components/divider/src/divider2.js +34 -17
  301. package/lib/components/divider/src/divider2.js.map +1 -1
  302. package/lib/components/drawer/index.js +2 -2
  303. package/lib/components/drawer/src/drawer.js +23 -117
  304. package/lib/components/drawer/src/drawer.js.map +1 -1
  305. package/lib/components/drawer/src/drawer2.js +117 -23
  306. package/lib/components/drawer/src/drawer2.js.map +1 -1
  307. package/lib/components/dropdown/index.d.ts +3 -3
  308. package/lib/components/dropdown/index.js +2 -2
  309. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  310. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  311. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  312. package/lib/components/dropdown/src/dropdown.d.ts +1 -1
  313. package/lib/components/dropdown/src/dropdown.js +109 -109
  314. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  315. package/lib/components/dropdown/src/dropdown.vue.d.ts +3 -3
  316. package/lib/components/dropdown/src/dropdown2.js +109 -109
  317. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  318. package/lib/components/empty/index.js +2 -2
  319. package/lib/components/empty/src/empty.js +56 -11
  320. package/lib/components/empty/src/empty.js.map +1 -1
  321. package/lib/components/empty/src/empty2.js +11 -56
  322. package/lib/components/empty/src/empty2.js.map +1 -1
  323. package/lib/components/form/index.js +4 -4
  324. package/lib/components/form/src/form-item.js +47 -171
  325. package/lib/components/form/src/form-item.js.map +1 -1
  326. package/lib/components/form/src/form-item2.js +171 -47
  327. package/lib/components/form/src/form-item2.js.map +1 -1
  328. package/lib/components/form/src/form.js +40 -45
  329. package/lib/components/form/src/form.js.map +1 -1
  330. package/lib/components/form/src/form2.js +45 -40
  331. package/lib/components/form/src/form2.js.map +1 -1
  332. package/lib/components/icon/index.js +2 -2
  333. package/lib/components/icon/src/icon.js +8 -35
  334. package/lib/components/icon/src/icon.js.map +1 -1
  335. package/lib/components/icon/src/icon2.js +35 -8
  336. package/lib/components/icon/src/icon2.js.map +1 -1
  337. package/lib/components/image-viewer/index.js +2 -2
  338. package/lib/components/image-viewer/src/image-viewer.js +210 -31
  339. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  340. package/lib/components/image-viewer/src/image-viewer2.js +31 -210
  341. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  342. package/lib/components/index.js +33 -33
  343. package/lib/components/link/index.js +2 -2
  344. package/lib/components/link/src/link.js +43 -19
  345. package/lib/components/link/src/link.js.map +1 -1
  346. package/lib/components/link/src/link2.js +19 -43
  347. package/lib/components/link/src/link2.js.map +1 -1
  348. package/lib/components/menu/index.d.ts +3 -3
  349. package/lib/components/menu/index.js +4 -4
  350. package/lib/components/menu/src/menu-item-group.js +4 -35
  351. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  352. package/lib/components/menu/src/menu-item-group2.js +35 -4
  353. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  354. package/lib/components/menu/src/menu-item.js +74 -16
  355. package/lib/components/menu/src/menu-item.js.map +1 -1
  356. package/lib/components/menu/src/menu-item2.js +16 -74
  357. package/lib/components/menu/src/menu-item2.js.map +1 -1
  358. package/lib/components/menu/src/menu.d.ts +4 -4
  359. package/lib/components/popconfirm/src/popconfirm.js +1 -1
  360. package/lib/components/popover/index.d.ts +6 -6
  361. package/lib/components/popover/src/index.vue.d.ts +3 -3
  362. package/lib/components/popover/src/popover.d.ts +1 -1
  363. package/lib/components/popover/src/popover.js +1 -1
  364. package/lib/components/popper/index.js +4 -4
  365. package/lib/components/popper/src/arrow.js +7 -31
  366. package/lib/components/popper/src/arrow.js.map +1 -1
  367. package/lib/components/popper/src/arrow2.js +31 -7
  368. package/lib/components/popper/src/arrow2.js.map +1 -1
  369. package/lib/components/popper/src/trigger.js +28 -17
  370. package/lib/components/popper/src/trigger.js.map +1 -1
  371. package/lib/components/popper/src/trigger2.js +17 -28
  372. package/lib/components/popper/src/trigger2.js.map +1 -1
  373. package/lib/components/radio/index.js +2 -2
  374. package/lib/components/radio/src/radio-button.js +1 -1
  375. package/lib/components/radio/src/radio-button2.js +1 -1
  376. package/lib/components/radio/src/radio.js +73 -64
  377. package/lib/components/radio/src/radio.js.map +1 -1
  378. package/lib/components/radio/src/radio2.js +64 -73
  379. package/lib/components/radio/src/radio2.js.map +1 -1
  380. package/lib/components/result/index.js +2 -2
  381. package/lib/components/result/src/result.js +73 -30
  382. package/lib/components/result/src/result.js.map +1 -1
  383. package/lib/components/result/src/result2.js +30 -73
  384. package/lib/components/result/src/result2.js.map +1 -1
  385. package/lib/components/roving-focus-group/index.js +2 -2
  386. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  387. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  388. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  389. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  390. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  391. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  392. package/lib/components/select/index.d.ts +5 -5
  393. package/lib/components/select/src/select.vue.d.ts +5 -5
  394. package/lib/components/select/src/useSelect.d.ts +5 -5
  395. package/lib/components/select-v2/index.d.ts +10 -10
  396. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  397. package/lib/components/select-v2/src/select.vue.d.ts +5 -5
  398. package/lib/components/select-v2/src/useSelect.d.ts +5 -5
  399. package/lib/components/skeleton/index.js +4 -4
  400. package/lib/components/skeleton/src/skeleton-item.js +18 -23
  401. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  402. package/lib/components/skeleton/src/skeleton-item2.js +23 -18
  403. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  404. package/lib/components/skeleton/src/skeleton.js +49 -22
  405. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  406. package/lib/components/skeleton/src/skeleton2.js +22 -49
  407. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  408. package/lib/components/table/index.d.ts +1 -1
  409. package/lib/components/table/src/filter-panel.vue.d.ts +5 -5
  410. package/lib/components/table/src/store/helper.js +5 -1
  411. package/lib/components/table/src/store/helper.js.map +1 -1
  412. package/lib/components/table/src/table.vue.d.ts +1 -1
  413. package/lib/components/tabs/index.js +1 -1
  414. package/lib/components/tabs/src/tab-bar.js +7 -76
  415. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  416. package/lib/components/tabs/src/tab-bar2.js +76 -7
  417. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  418. package/lib/components/tabs/src/tab-nav.js +1 -1
  419. package/lib/components/teleport/index.js +2 -2
  420. package/lib/components/teleport/src/teleport.js +18 -43
  421. package/lib/components/teleport/src/teleport.js.map +1 -1
  422. package/lib/components/teleport/src/teleport2.js +43 -18
  423. package/lib/components/teleport/src/teleport2.js.map +1 -1
  424. package/lib/components/time-picker/src/common/picker.vue.d.ts +5 -5
  425. package/lib/components/timeline/index.js +2 -2
  426. package/lib/components/timeline/src/timeline-item.js +73 -39
  427. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  428. package/lib/components/timeline/src/timeline-item2.js +39 -73
  429. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  430. package/lib/components/tooltip/index.d.ts +3 -3
  431. package/lib/components/tooltip/src/tooltip.d.ts +1 -1
  432. package/lib/components/tooltip/src/tooltip.js +1 -1
  433. package/lib/components/tooltip/src/tooltip.vue.d.ts +3 -3
  434. package/lib/components/tooltip/src/tooltip2.js +1 -1
  435. package/lib/components/tooltip/src/trigger.js +1 -1
  436. package/lib/components/tooltip/src/trigger.vue.d.ts +3 -3
  437. package/lib/components/tooltip-v2/index.js +1 -1
  438. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  439. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  440. package/lib/components/tooltip-v2/src/trigger.js +89 -11
  441. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  442. package/lib/components/tooltip-v2/src/trigger2.js +11 -89
  443. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  444. package/lib/components/upload/index.js +3 -3
  445. package/lib/components/upload/src/upload-content.js +15 -46
  446. package/lib/components/upload/src/upload-content.js.map +1 -1
  447. package/lib/components/upload/src/upload-content2.js +46 -15
  448. package/lib/components/upload/src/upload-content2.js.map +1 -1
  449. package/lib/components/upload/src/upload-list.js +1 -1
  450. package/lib/components/upload/src/upload.js +99 -109
  451. package/lib/components/upload/src/upload.js.map +1 -1
  452. package/lib/components/upload/src/upload2.js +109 -99
  453. package/lib/components/upload/src/upload2.js.map +1 -1
  454. package/lib/index.js +33 -33
  455. package/package.json +1 -1
  456. package/web-types.json +1 -1
@@ -1,69 +1,22 @@
1
- import { defineComponent, ref, watch, provide, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
2
1
  import '../../../utils/index.mjs';
3
2
  import '../../../constants/index.mjs';
4
- import '../../../hooks/index.mjs';
5
- import '../../../tokens/index.mjs';
6
- import { collapseProps, collapseEmits } from './collapse.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
- import { castArray } from 'lodash-unified';
3
+ import { isNumber } from '@vueuse/core';
4
+ import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
5
+ import { mutable } from '../../../utils/typescript.mjs';
10
6
  import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
11
- import { collapseContextKey } from '../../../tokens/collapse.mjs';
12
7
 
13
- const __default__ = {
14
- name: "PsCollapse"
15
- };
16
- const _sfc_main = /* @__PURE__ */ defineComponent({
17
- ...__default__,
18
- props: collapseProps,
19
- emits: collapseEmits,
20
- setup(__props, { expose, emit }) {
21
- const props = __props;
22
- const ns = useNamespace("collapse");
23
- const activeNames = ref(castArray(props.modelValue));
24
- const setActiveNames = (_activeNames) => {
25
- activeNames.value = _activeNames;
26
- const value = props.accordion ? activeNames.value[0] : activeNames.value;
27
- emit(UPDATE_MODEL_EVENT, value);
28
- emit(CHANGE_EVENT, value);
29
- };
30
- const handleItemClick = (name) => {
31
- if (props.accordion) {
32
- setActiveNames([
33
- (activeNames.value[0] || activeNames.value[0] === 0) && activeNames.value[0] === name ? "" : name
34
- ]);
35
- } else {
36
- const _activeNames = [...activeNames.value];
37
- const index = _activeNames.indexOf(name);
38
- if (index > -1) {
39
- _activeNames.splice(index, 1);
40
- } else {
41
- _activeNames.push(name);
42
- }
43
- setActiveNames(_activeNames);
44
- }
45
- };
46
- watch(() => props.modelValue, () => activeNames.value = castArray(props.modelValue), { deep: true });
47
- provide(collapseContextKey, {
48
- activeNames,
49
- handleItemClick
50
- });
51
- expose({
52
- activeNames,
53
- setActiveNames
54
- });
55
- return (_ctx, _cache) => {
56
- return openBlock(), createElementBlock("div", {
57
- class: normalizeClass(unref(ns).b()),
58
- role: "tablist",
59
- "aria-multiselectable": "true"
60
- }, [
61
- renderSlot(_ctx.$slots, "default")
62
- ], 2);
63
- };
8
+ const emitChangeFn = (value) => typeof isNumber(value);
9
+ const collapseProps = buildProps({
10
+ accordion: Boolean,
11
+ modelValue: {
12
+ type: definePropType([Array, String, Number]),
13
+ default: () => mutable([])
64
14
  }
65
15
  });
66
- var Collapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/collapse/src/collapse.vue"]]);
16
+ const collapseEmits = {
17
+ [UPDATE_MODEL_EVENT]: emitChangeFn,
18
+ [CHANGE_EVENT]: emitChangeFn
19
+ };
67
20
 
68
- export { Collapse as default };
21
+ export { collapseEmits, collapseProps, emitChangeFn };
69
22
  //# sourceMappingURL=collapse2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\" role=\"tablist\" aria-multiselectable=\"true\">\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { provide, ref, watch } from 'vue'\nimport { ensureArray } from '@element-ps/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-ps/constants'\nimport { useNamespace } from '@element-ps/hooks'\nimport { collapseContextKey } from '@element-ps/tokens'\nimport { collapseEmits, collapseProps } from './collapse'\nimport type { CollapseActiveName } from './collapse'\n\ndefineOptions({\n name: 'PsCollapse',\n})\nconst props = defineProps(collapseProps)\nconst emit = defineEmits(collapseEmits)\n\nconst ns = useNamespace('collapse')\nconst activeNames = ref(ensureArray(props.modelValue))\n\nconst setActiveNames = (_activeNames: CollapseActiveName[]) => {\n activeNames.value = _activeNames\n const value = props.accordion ? activeNames.value[0] : activeNames.value\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n}\n\nconst handleItemClick = (name: CollapseActiveName) => {\n if (props.accordion) {\n setActiveNames([\n (activeNames.value[0] || activeNames.value[0] === 0) &&\n activeNames.value[0] === name\n ? ''\n : name,\n ])\n } else {\n const _activeNames = [...activeNames.value]\n const index = _activeNames.indexOf(name)\n\n if (index > -1) {\n _activeNames.splice(index, 1)\n } else {\n _activeNames.push(name)\n }\n setActiveNames(_activeNames)\n }\n}\n\nwatch(\n () => props.modelValue,\n () => (activeNames.value = ensureArray(props.modelValue)),\n { deep: true }\n)\n\nprovide(collapseContextKey, {\n activeNames,\n handleItemClick,\n})\n\ndefineExpose({\n /** @description active names */\n activeNames,\n /** @description set active names */\n setActiveNames,\n})\n</script>\n"],"names":["ensureArray"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,IAAA,MAAA,EAAA,GAAA,aAAA,UAAA,CAAA,CAAA;AACA,IAAA,MAAA,WAAA,GAAA,GAAA,CAAAA,SAAA,CAAA,KAAA,CAAA,UAAA,CAAA,CAAA,CAAA;AAEA,IAAA,MAAA,cAAA,GAAA,CAAA,YAAA,KAAA;AACA,MAAA,WAAA,CAAA,KAAA,GAAA,YAAA,CAAA;AACA,MAAA,MAAA,QAAA,KAAA,CAAA,SAAA,GAAA,WAAA,CAAA,KAAA,CAAA,KAAA,WAAA,CAAA,KAAA,CAAA;AACA,MAAA,IAAA,CAAA,oBAAA,KAAA,CAAA,CAAA;AACA,MAAA,IAAA,CAAA,cAAA,KAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAEA,IAAA,MAAA,eAAA,GAAA,CAAA,IAAA,KAAA;AACA,MAAA,IAAA,MAAA,SAAA,EAAA;AACA,QAAA,cAAA,CAAA;AAAA,UACA,CAAA,WAAA,CAAA,KAAA,CAAA,CAAA,CAAA,IAAA,WAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA,CAAA,KACA,WAAA,CAAA,KAAA,CAAA,CAAA,CAAA,KAAA,IAAA,GACA,EACA,GAAA,IAAA;AAAA,SACA,CAAA,CAAA;AAAA,OACA,MAAA;AACA,QAAA,MAAA,YAAA,GAAA,CAAA,GAAA,WAAA,CAAA,KAAA,CAAA,CAAA;AACA,QAAA,MAAA,KAAA,GAAA,YAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA;AAEA,QAAA,IAAA,QAAA,CAAA,CAAA,EAAA;AACA,UAAA,YAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA,CAAA;AAAA,SACA,MAAA;AACA,UAAA,YAAA,CAAA,KAAA,IAAA,CAAA,CAAA;AAAA,SACA;AACA,QAAA,cAAA,CAAA,YAAA,CAAA,CAAA;AAAA,OACA;AAAA,KACA,CAAA;AAEA,IAAA,KAAA,CACA,MAAA,KAAA,CAAA,UACA,EAAA,MAAA,WAAA,CAAA,KAAA,GAAAA,SAAA,CAAA,KAAA,CAAA,UAAA,CAAA,EACA,EAAA,IAAA,EAAA,MACA,CAAA,CAAA;AAEA,IAAA,OAAA,CAAA,kBAAA,EAAA;AAAA,MACA,WAAA;AAAA,MACA,eAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MAEA,WAAA;AAAA,MAEA,cAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapse2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isNumber,\n isString,\n mutable,\n} from '@element-ps/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-ps/constants'\nimport type { ExtractPropTypes } from 'vue'\nimport type Collapse from './collapse.vue'\nimport type { Arrayable } from '@element-ps/utils'\n\nexport type CollapseActiveName = string | number\nexport type CollapseModelValue = Arrayable<CollapseActiveName>\n\nexport const emitChangeFn = (value: CollapseModelValue) =>\n typeof isNumber(value) || isString(value) || Array.isArray(value)\n\nexport const collapseProps = buildProps({\n accordion: Boolean,\n modelValue: {\n type: definePropType<CollapseModelValue>([Array, String, Number]),\n default: () => mutable([] as const),\n },\n} as const)\nexport type CollapseProps = ExtractPropTypes<typeof collapseProps>\n\nexport const collapseEmits = {\n [UPDATE_MODEL_EVENT]: emitChangeFn,\n [CHANGE_EVENT]: emitChangeFn,\n}\nexport type CollapseEmits = typeof collapseEmits\n\nexport type CollapseInstance = InstanceType<typeof Collapse>\n"],"names":[],"mappings":";;;;;;;AAOY,MAAC,YAAY,GAAG,CAAC,KAAK,KAAK,OAAO,QAAQ,CAAC,KAAK,EAAE;AAClD,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,EAAE,CAAC;AAC9B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,YAAY;AACpC,EAAE,CAAC,YAAY,GAAG,YAAY;AAC9B;;;;"}
@@ -1,3 +1,3 @@
1
- export { COLLECTION_ITEM_SIGN, createCollectionWithScope } from './src/collection.mjs';
1
+ export { COLLECTION_ITEM_SIGN, createCollectionWithScope } from './src/collection2.mjs';
2
2
  import './src/tokens.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1,33 +1,13 @@
1
- import { ref } from 'vue';
2
- import Collection from './collection2.mjs';
3
- import CollectionItem from './collection-item.mjs';
1
+ import { defineComponent, renderSlot } from 'vue';
2
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
3
 
5
- const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
6
- const createCollectionWithScope = (name) => {
7
- const COLLECTION_NAME = `Ps${name}Collection`;
8
- const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
9
- const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
10
- const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
11
- const PsCollection = {
12
- ...Collection,
13
- name: COLLECTION_NAME,
14
- setup() {
15
- const collectionRef = ref(null);
16
- }
17
- };
18
- const PsCollectionItem = {
19
- ...CollectionItem,
20
- name: COLLECTION_ITEM_NAME,
21
- setup(_, { attrs }) {
22
- }
23
- };
24
- return {
25
- COLLECTION_INJECTION_KEY,
26
- COLLECTION_ITEM_INJECTION_KEY,
27
- PsCollection,
28
- PsCollectionItem
29
- };
30
- };
4
+ const _sfc_main = defineComponent({
5
+ inheritAttrs: false
6
+ });
7
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
8
+ return renderSlot(_ctx.$slots, "default");
9
+ }
10
+ var Collection = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/collection/src/collection.vue"]]);
31
11
 
32
- export { COLLECTION_ITEM_SIGN, createCollectionWithScope };
12
+ export { Collection as default };
33
13
  //# sourceMappingURL=collection.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection.mjs","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 {\n PsCollectionInjectionContext,\n PsCollectionItemInjectionContext,\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 = `Ps${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey<PsCollectionInjectionContext> =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey<PsCollectionItemInjectionContext> =\n Symbol(COLLECTION_ITEM_NAME)\n\n const PsCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref<HTMLElement | null>(null)\n /*const itemMap: PsCollectionInjectionContext['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 const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n return orderedItems\n }*/\n\n /*provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })*/\n },\n }\n\n const PsCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_, { attrs }) {\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 collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n collectionInjection.itemMap.delete(collectionItemEl)\n })*/\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n PsCollection,\n PsCollectionItem,\n }\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,oBAAoB,GAAG,CAAC,uBAAuB,EAAE;AAClD,MAAC,yBAAyB,GAAG,CAAC,IAAI,KAAK;AACnD,EAAE,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,EAAE,MAAM,oBAAoB,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;AACxD,EAAE,MAAM,wBAAwB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC3D,EAAE,MAAM,6BAA6B,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACrE,EAAE,MAAM,YAAY,GAAG;AACvB,IAAI,GAAG,UAAU;AACjB,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,KAAK,GAAG;AACZ,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACtC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,gBAAgB,GAAG;AAC3B,IAAI,GAAG,cAAc;AACrB,IAAI,IAAI,EAAE,oBAAoB;AAC9B,IAAI,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;AACxB,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,wBAAwB;AAC5B,IAAI,6BAA6B;AACjC,IAAI,YAAY;AAChB,IAAI,gBAAgB;AACpB,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"collection.mjs","sources":["../../../../../../packages/components/collection/src/collection.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n inheritAttrs: false,\n})\n</script>\n"],"names":["_renderSlot"],"mappings":";;;AAOA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,YAAc,EAAA,KAAA;AAChB,CAAC,CAAA,CAAA;;SARCA,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
@@ -1,13 +1,33 @@
1
- import { defineComponent, renderSlot } from 'vue';
2
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
1
+ import { ref } from 'vue';
2
+ import Collection from './collection.mjs';
3
+ import CollectionItem from './collection-item.mjs';
3
4
 
4
- const _sfc_main = defineComponent({
5
- inheritAttrs: false
6
- });
7
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
8
- return renderSlot(_ctx.$slots, "default");
9
- }
10
- var Collection = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/collection/src/collection.vue"]]);
5
+ const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
6
+ const createCollectionWithScope = (name) => {
7
+ const COLLECTION_NAME = `Ps${name}Collection`;
8
+ const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
9
+ const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
10
+ const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
11
+ const PsCollection = {
12
+ ...Collection,
13
+ name: COLLECTION_NAME,
14
+ setup() {
15
+ const collectionRef = ref(null);
16
+ }
17
+ };
18
+ const PsCollectionItem = {
19
+ ...CollectionItem,
20
+ name: COLLECTION_ITEM_NAME,
21
+ setup(_, { attrs }) {
22
+ }
23
+ };
24
+ return {
25
+ COLLECTION_INJECTION_KEY,
26
+ COLLECTION_ITEM_INJECTION_KEY,
27
+ PsCollection,
28
+ PsCollectionItem
29
+ };
30
+ };
11
31
 
12
- export { Collection as default };
32
+ export { COLLECTION_ITEM_SIGN, createCollectionWithScope };
13
33
  //# sourceMappingURL=collection2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection2.mjs","sources":["../../../../../../packages/components/collection/src/collection.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n inheritAttrs: false,\n})\n</script>\n"],"names":["_renderSlot"],"mappings":";;;AAOA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,YAAc,EAAA,KAAA;AAChB,CAAC,CAAA,CAAA;;SARCA,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"collection2.mjs","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 {\n PsCollectionInjectionContext,\n PsCollectionItemInjectionContext,\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 = `Ps${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey<PsCollectionInjectionContext> =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey<PsCollectionItemInjectionContext> =\n Symbol(COLLECTION_ITEM_NAME)\n\n const PsCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref<HTMLElement | null>(null)\n /*const itemMap: PsCollectionInjectionContext['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 const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n return orderedItems\n }*/\n\n /*provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })*/\n },\n }\n\n const PsCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_, { attrs }) {\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 collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n collectionInjection.itemMap.delete(collectionItemEl)\n })*/\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n PsCollection,\n PsCollectionItem,\n }\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,oBAAoB,GAAG,CAAC,uBAAuB,EAAE;AAClD,MAAC,yBAAyB,GAAG,CAAC,IAAI,KAAK;AACnD,EAAE,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,EAAE,MAAM,oBAAoB,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;AACxD,EAAE,MAAM,wBAAwB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC3D,EAAE,MAAM,6BAA6B,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACrE,EAAE,MAAM,YAAY,GAAG;AACvB,IAAI,GAAG,UAAU;AACjB,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,KAAK,GAAG;AACZ,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;AACtC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,gBAAgB,GAAG;AAC3B,IAAI,GAAG,cAAc;AACrB,IAAI,IAAI,EAAE,oBAAoB;AAC9B,IAAI,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;AACxB,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,wBAAwB;AAC5B,IAAI,6BAA6B;AACjC,IAAI,YAAY;AAChB,IAAI,gBAAgB;AACpB,GAAG,CAAC;AACJ;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Divider from './src/divider.mjs';
3
- export { dividerProps } from './src/divider2.mjs';
2
+ import Divider from './src/divider2.mjs';
3
+ export { dividerProps } from './src/divider.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const PsDivider = withInstall(Divider);
@@ -1,39 +1,22 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, createCommentVNode } from 'vue';
2
- import '../../../hooks/index.mjs';
3
- import { dividerProps } from './divider2.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
6
3
 
7
- const __default__ = {
8
- name: "PsDivider"
9
- };
10
- const _sfc_main = /* @__PURE__ */ defineComponent({
11
- ...__default__,
12
- props: dividerProps,
13
- setup(__props) {
14
- const props = __props;
15
- const ns = useNamespace("divider");
16
- const dividerStyle = computed(() => {
17
- return {
18
- "--el-border-style": props.borderStyle
19
- };
20
- });
21
- return (_ctx, _cache) => {
22
- return openBlock(), createElementBlock("div", {
23
- class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.direction)]),
24
- style: normalizeStyle(unref(dividerStyle))
25
- }, [
26
- _ctx.$slots.default && _ctx.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
27
- key: 0,
28
- class: normalizeClass([unref(ns).e("text"), unref(ns).is(_ctx.contentPosition)])
29
- }, [
30
- renderSlot(_ctx.$slots, "default")
31
- ], 2)) : createCommentVNode("v-if", true)
32
- ], 6);
33
- };
4
+ const dividerProps = buildProps({
5
+ direction: {
6
+ type: String,
7
+ values: ["horizontal", "vertical"],
8
+ default: "horizontal"
9
+ },
10
+ contentPosition: {
11
+ type: String,
12
+ values: ["left", "center", "right"],
13
+ default: "center"
14
+ },
15
+ borderStyle: {
16
+ type: definePropType(String),
17
+ default: "solid"
34
18
  }
35
19
  });
36
- var Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/divider/src/divider.vue"]]);
37
20
 
38
- export { Divider as default };
21
+ export { dividerProps };
39
22
  //# sourceMappingURL=divider.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.mjs","sources":["../../../../../../packages/components/divider/src/divider.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.m(direction)]\" :style=\"dividerStyle\">\n <div\n v-if=\"$slots.default && direction !== 'vertical'\"\n :class=\"[ns.e('text'), ns.is(contentPosition)]\"\n >\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-ps/hooks'\nimport { dividerProps } from './divider'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'PsDivider',\n})\nconst props = defineProps(dividerProps)\nconst ns = useNamespace('divider')\nconst dividerStyle = computed(() => {\n return {\n '--el-border-style': props.borderStyle,\n } as CSSProperties\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqBA,IAAA,MAAA,EAAA,GAAA,aAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAA,SAAA,MAAA;AACA,MAAA,OAAA;AAAA,QACA,qBAAA,KAAA,CAAA,WAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"divider.mjs","sources":["../../../../../../packages/components/divider/src/divider.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n borderStyle: {\n type: definePropType<BorderStyle>(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes<typeof dividerProps>\n\nexport type DividerInstance = InstanceType<typeof Divider>\n"],"names":[],"mappings":";;;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;AACvC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
@@ -1,22 +1,39 @@
1
- import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
1
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, createCommentVNode } from 'vue';
2
+ import '../../../hooks/index.mjs';
3
+ import { dividerProps } from './divider.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
5
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
6
 
4
- const dividerProps = buildProps({
5
- direction: {
6
- type: String,
7
- values: ["horizontal", "vertical"],
8
- default: "horizontal"
9
- },
10
- contentPosition: {
11
- type: String,
12
- values: ["left", "center", "right"],
13
- default: "center"
14
- },
15
- borderStyle: {
16
- type: definePropType(String),
17
- default: "solid"
7
+ const __default__ = {
8
+ name: "PsDivider"
9
+ };
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...__default__,
12
+ props: dividerProps,
13
+ setup(__props) {
14
+ const props = __props;
15
+ const ns = useNamespace("divider");
16
+ const dividerStyle = computed(() => {
17
+ return {
18
+ "--el-border-style": props.borderStyle
19
+ };
20
+ });
21
+ return (_ctx, _cache) => {
22
+ return openBlock(), createElementBlock("div", {
23
+ class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.direction)]),
24
+ style: normalizeStyle(unref(dividerStyle))
25
+ }, [
26
+ _ctx.$slots.default && _ctx.direction !== "vertical" ? (openBlock(), createElementBlock("div", {
27
+ key: 0,
28
+ class: normalizeClass([unref(ns).e("text"), unref(ns).is(_ctx.contentPosition)])
29
+ }, [
30
+ renderSlot(_ctx.$slots, "default")
31
+ ], 2)) : createCommentVNode("v-if", true)
32
+ ], 6);
33
+ };
18
34
  }
19
35
  });
36
+ var Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/divider/src/divider.vue"]]);
20
37
 
21
- export { dividerProps };
38
+ export { Divider as default };
22
39
  //# sourceMappingURL=divider2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider2.mjs","sources":["../../../../../../packages/components/divider/src/divider.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n borderStyle: {\n type: definePropType<BorderStyle>(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes<typeof dividerProps>\n\nexport type DividerInstance = InstanceType<typeof Divider>\n"],"names":[],"mappings":";;;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;AACvC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"divider2.mjs","sources":["../../../../../../packages/components/divider/src/divider.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.b(), ns.m(direction)]\" :style=\"dividerStyle\">\n <div\n v-if=\"$slots.default && direction !== 'vertical'\"\n :class=\"[ns.e('text'), ns.is(contentPosition)]\"\n >\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-ps/hooks'\nimport { dividerProps } from './divider'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'PsDivider',\n})\nconst props = defineProps(dividerProps)\nconst ns = useNamespace('divider')\nconst dividerStyle = computed(() => {\n return {\n '--el-border-style': props.borderStyle,\n } as CSSProperties\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqBA,IAAA,MAAA,EAAA,GAAA,aAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAA,SAAA,MAAA;AACA,MAAA,OAAA;AAAA,QACA,qBAAA,KAAA,CAAA,WAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Drawer from './src/drawer.mjs';
3
- export { drawerProps } from './src/drawer2.mjs';
2
+ import Drawer from './src/drawer2.mjs';
3
+ export { drawerProps } from './src/drawer.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const PsDrawer = withInstall(Drawer);
@@ -1,125 +1,31 @@
1
- import { defineComponent, ref, computed, resolveComponent, resolveDirective, openBlock, createBlock, Teleport, withDirectives, createVNode, withCtx, createElementBlock, normalizeClass, normalizeStyle, renderSlot, createElementVNode, toDisplayString, createCommentVNode, vShow } from 'vue';
2
- import { Close } from '@element-plus/icons-vue';
3
- import { PsOverlay } from '../../overlay/index.mjs';
1
+ import '../../../utils/index.mjs';
4
2
  import '../../dialog/index.mjs';
5
- import { PsIcon } from '../../icon/index.mjs';
6
- import '../../../directives/index.mjs';
7
- import '../../../hooks/index.mjs';
8
- import { drawerProps } from './drawer2.mjs';
9
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
10
- import TrapFocus from '../../../directives/trap-focus/index.mjs';
11
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
- import { useDialog } from '../../dialog/src/use-dialog.mjs';
3
+ import { buildProps } from '../../../utils/vue/props.mjs';
4
+ import { dialogProps } from '../../dialog/src/dialog.mjs';
13
5
 
14
- const _sfc_main = defineComponent({
15
- name: "PsDrawer",
16
- components: {
17
- PsOverlay,
18
- PsIcon,
19
- Close
6
+ const drawerProps = buildProps({
7
+ ...dialogProps,
8
+ direction: {
9
+ type: String,
10
+ default: "rtl",
11
+ values: ["ltr", "rtl", "ttb", "btt"]
20
12
  },
21
- directives: {
22
- TrapFocus
13
+ size: {
14
+ type: [String, Number],
15
+ default: "30%"
23
16
  },
24
- props: drawerProps,
25
- setup(props, ctx) {
26
- const drawerRef = ref();
27
- const ns = useNamespace("drawer");
28
- const isHorizontal = computed(() => props.direction === "rtl" || props.direction === "ltr");
29
- const drawerSize = computed(() => typeof props.size === "number" ? `${props.size}px` : props.size);
30
- return {
31
- ...useDialog(props, ctx, drawerRef),
32
- drawerRef,
33
- isHorizontal,
34
- drawerSize,
35
- ns
36
- };
17
+ withHeader: {
18
+ type: Boolean,
19
+ default: true
20
+ },
21
+ modalFade: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ widget: {
26
+ type: String
37
27
  }
38
28
  });
39
- const _hoisted_1 = ["aria-labelledby", "aria-label", "widget"];
40
- const _hoisted_2 = ["id", "widget"];
41
- const _hoisted_3 = ["title"];
42
- const _hoisted_4 = ["aria-label"];
43
- const _hoisted_5 = ["widget"];
44
- const _hoisted_6 = ["widget"];
45
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
46
- const _component_close = resolveComponent("close");
47
- const _component_ps_icon = resolveComponent("ps-icon");
48
- const _component_ps_overlay = resolveComponent("ps-overlay");
49
- const _directive_trap_focus = resolveDirective("trap-focus");
50
- return openBlock(), createBlock(Teleport, {
51
- to: "body",
52
- disabled: !_ctx.appendToBody
53
- }, [
54
- withDirectives(createVNode(_component_ps_overlay, {
55
- mask: _ctx.modal,
56
- "overlay-class": (_ctx.modalClass || "") + (_ctx.widget ? ` ps--drawer-widget-class` : ""),
57
- "z-index": _ctx.zIndex
58
- }, {
59
- default: withCtx(() => [
60
- withDirectives((openBlock(), createElementBlock("div", {
61
- ref: "drawerRef",
62
- "aria-modal": "true",
63
- "aria-labelledby": _ctx.ns.e("title"),
64
- "aria-label": _ctx.title,
65
- class: normalizeClass([_ctx.ns.b(), _ctx.direction, _ctx.visible && "open", _ctx.customClass]),
66
- style: normalizeStyle(_ctx.isHorizontal ? "width: " + _ctx.drawerSize : "height: " + _ctx.drawerSize),
67
- role: "dialog",
68
- widget: _ctx.widget
69
- }, [
70
- _ctx.withHeader ? (openBlock(), createElementBlock("header", {
71
- key: 0,
72
- id: _ctx.ns.e("title"),
73
- class: normalizeClass(_ctx.ns.e("header")),
74
- widget: _ctx.widget ? "drawer:title:" + _ctx.widget.split(":")[1] : void 0
75
- }, [
76
- renderSlot(_ctx.$slots, "title", {}, () => [
77
- createElementVNode("span", {
78
- role: "heading",
79
- title: _ctx.title
80
- }, toDisplayString(_ctx.title), 9, _hoisted_3)
81
- ]),
82
- _ctx.showClose ? (openBlock(), createElementBlock("button", {
83
- key: 0,
84
- "aria-label": "close " + (_ctx.title || "drawer"),
85
- class: normalizeClass(_ctx.ns.e("close-btn")),
86
- type: "button"
87
- }, [
88
- createVNode(_component_ps_icon, {
89
- class: normalizeClass(_ctx.ns.e("close"))
90
- }, {
91
- default: withCtx(() => [
92
- createVNode(_component_close)
93
- ]),
94
- _: 1
95
- }, 8, ["class"])
96
- ], 10, _hoisted_4)) : createCommentVNode("v-if", true)
97
- ], 10, _hoisted_2)) : createCommentVNode("v-if", true),
98
- _ctx.rendered ? (openBlock(), createElementBlock("section", {
99
- key: 1,
100
- class: normalizeClass(_ctx.ns.e("body")),
101
- widget: _ctx.widget ? "drawer:default:" + _ctx.widget.split(":")[1] : void 0
102
- }, [
103
- renderSlot(_ctx.$slots, "default")
104
- ], 10, _hoisted_5)) : createCommentVNode("v-if", true),
105
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
106
- key: 2,
107
- class: normalizeClass(_ctx.ns.e("footer")),
108
- widget: _ctx.widget ? "drawer:footer:" + _ctx.widget.split(":")[1] : void 0
109
- }, [
110
- renderSlot(_ctx.$slots, "footer")
111
- ], 10, _hoisted_6)) : createCommentVNode("v-if", true)
112
- ], 14, _hoisted_1)), [
113
- [_directive_trap_focus]
114
- ])
115
- ]),
116
- _: 3
117
- }, 8, ["mask", "overlay-class", "z-index"]), [
118
- [vShow, _ctx.visible]
119
- ])
120
- ], 8, ["disabled"]);
121
- }
122
- var Drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/drawer/src/drawer.vue"]]);
123
29
 
124
- export { Drawer as default };
30
+ export { drawerProps };
125
31
  //# sourceMappingURL=drawer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.mjs","sources":["../../../../../../packages/components/drawer/src/drawer.vue"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <ps-overlay\n v-show=\"visible\"\n :mask=\"modal\"\n :overlay-class=\"(modalClass || '') + (widget ? ` ps--drawer-widget-class` : '')\"\n :z-index=\"zIndex\"\n >\n <div\n ref=\"drawerRef\"\n v-trap-focus\n aria-modal=\"true\"\n :aria-labelledby=\"ns.e('title')\"\n :aria-label=\"title\"\n :class=\"[ns.b(), direction, visible && 'open', customClass]\"\n :style=\"\n isHorizontal ? 'width: ' + drawerSize : 'height: ' + drawerSize\n \"\n role=\"dialog\"\n :widget=\"widget\"\n >\n <header v-if=\"withHeader\"\n :id=\"ns.e('title')\" :class=\"ns.e('header')\"\n :widget=\"widget ? 'drawer:title:' + widget.split(':')[1] : undefined\"\n >\n <slot name=\"title\">\n <span role=\"heading\" :title=\"title\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"'close ' + (title || 'drawer')\"\n :class=\"ns.e('close-btn')\"\n type=\"button\"\n >\n <ps-icon :class=\"ns.e('close')\"><close /></ps-icon>\n </button>\n </header>\n <template v-if=\"rendered\">\n <section :class=\"ns.e('body')\"\n :widget=\"widget ? 'drawer:default:' + widget.split(':')[1] : undefined\"\n >\n <slot />\n </section>\n </template>\n <div v-if=\"$slots.footer\"\n :class=\"ns.e('footer')\"\n :widget=\"widget ? 'drawer:footer:' + widget.split(':')[1] : undefined\"\n >\n <slot name=\"footer\" />\n </div>\n </div>\n </ps-overlay>\n </teleport>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue'\nimport { Close } from '@element-plus/icons-vue'\n\nimport { PsOverlay } from '@element-ps/components/overlay'\nimport { useDialog } from '@element-ps/components/dialog'\nimport PsIcon from '@element-ps/components/icon'\nimport { TrapFocus } from '@element-ps/directives'\nimport { useNamespace } from '@element-ps/hooks'\nimport { drawerProps } from './drawer'\n\nexport default defineComponent({\n name: 'PsDrawer',\n components: {\n PsOverlay,\n PsIcon,\n Close,\n },\n directives: {\n TrapFocus,\n },\n props: drawerProps,\n\n setup(props, ctx) {\n const drawerRef = ref<HTMLElement>()\n const ns = useNamespace('drawer')\n\n const isHorizontal = computed(\n () => props.direction === 'rtl' || props.direction === 'ltr'\n )\n const drawerSize = computed(() =>\n typeof props.size === 'number' ? `${props.size}px` : props.size\n )\n\n return {\n ...useDialog(props, ctx, drawerRef),\n drawerRef,\n isHorizontal,\n drawerSize,\n ns,\n }\n },\n})\n</script>\n"],"names":["_createBlock","_Teleport","_createVNode","_withDirectives","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_renderSlot","_createElementVNode","_toDisplayString","_createCommentVNode"],"mappings":"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"}
1
+ {"version":3,"file":"drawer.mjs","sources":["../../../../../../packages/components/drawer/src/drawer.ts"],"sourcesContent":["import { buildProps } from '@element-ps/utils'\nimport { dialogProps } from '@element-ps/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n widget: {\n type: String,\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>\n"],"names":[],"mappings":";;;;;AAEY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,GAAG,WAAW;AAChB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACxC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,CAAC;;;;"}