element-ps 2.0.36 → 2.0.37

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 (326) hide show
  1. package/dist/index.full.js +3 -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 +3 -1
  7. package/es/components/alert/index.mjs +2 -2
  8. package/es/components/alert/src/alert.mjs +83 -33
  9. package/es/components/alert/src/alert.mjs.map +1 -1
  10. package/es/components/alert/src/alert2.mjs +33 -83
  11. package/es/components/alert/src/alert2.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/button/index.mjs +2 -2
  28. package/es/components/button/src/button-group.mjs +1 -1
  29. package/es/components/button/src/button.mjs +96 -48
  30. package/es/components/button/src/button.mjs.map +1 -1
  31. package/es/components/button/src/button2.mjs +48 -96
  32. package/es/components/button/src/button2.mjs.map +1 -1
  33. package/es/components/calendar/index.mjs +2 -2
  34. package/es/components/calendar/src/calendar.mjs +188 -9
  35. package/es/components/calendar/src/calendar.mjs.map +1 -1
  36. package/es/components/calendar/src/calendar2.mjs +9 -188
  37. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  38. package/es/components/card/index.mjs +2 -2
  39. package/es/components/card/src/card.mjs +35 -15
  40. package/es/components/card/src/card.mjs.map +1 -1
  41. package/es/components/card/src/card2.mjs +15 -35
  42. package/es/components/card/src/card2.mjs.map +1 -1
  43. package/es/components/carousel/index.mjs +2 -2
  44. package/es/components/carousel/src/carousel.mjs +43 -201
  45. package/es/components/carousel/src/carousel.mjs.map +1 -1
  46. package/es/components/carousel/src/carousel2.mjs +201 -43
  47. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  48. package/es/components/collection/index.mjs +1 -1
  49. package/es/components/collection/src/collection.mjs +30 -10
  50. package/es/components/collection/src/collection.mjs.map +1 -1
  51. package/es/components/collection/src/collection2.mjs +10 -30
  52. package/es/components/collection/src/collection2.mjs.map +1 -1
  53. package/es/components/dialog/src/dialog-content.mjs +34 -79
  54. package/es/components/dialog/src/dialog-content.mjs.map +1 -1
  55. package/es/components/dialog/src/dialog-content2.mjs +79 -34
  56. package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
  57. package/es/components/dialog/src/dialog.mjs +1 -1
  58. package/es/components/dialog/src/dialog2.mjs +1 -1
  59. package/es/components/divider/index.mjs +2 -2
  60. package/es/components/divider/src/divider.mjs +34 -17
  61. package/es/components/divider/src/divider.mjs.map +1 -1
  62. package/es/components/divider/src/divider2.mjs +17 -34
  63. package/es/components/divider/src/divider2.mjs.map +1 -1
  64. package/es/components/drawer/index.mjs +2 -2
  65. package/es/components/drawer/src/drawer.mjs +117 -23
  66. package/es/components/drawer/src/drawer.mjs.map +1 -1
  67. package/es/components/drawer/src/drawer2.mjs +23 -117
  68. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  69. package/es/components/dropdown/index.mjs +2 -2
  70. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  71. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  72. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  73. package/es/components/dropdown/src/dropdown.mjs +100 -109
  74. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  75. package/es/components/dropdown/src/dropdown2.mjs +109 -100
  76. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  77. package/es/components/empty/index.mjs +2 -2
  78. package/es/components/empty/src/empty.mjs +11 -56
  79. package/es/components/empty/src/empty.mjs.map +1 -1
  80. package/es/components/empty/src/empty2.mjs +56 -11
  81. package/es/components/empty/src/empty2.mjs.map +1 -1
  82. package/es/components/form/index.mjs +4 -4
  83. package/es/components/form/src/form-item.mjs +171 -46
  84. package/es/components/form/src/form-item.mjs.map +1 -1
  85. package/es/components/form/src/form-item2.mjs +46 -171
  86. package/es/components/form/src/form-item2.mjs.map +1 -1
  87. package/es/components/form/src/form.mjs +45 -40
  88. package/es/components/form/src/form.mjs.map +1 -1
  89. package/es/components/form/src/form2.mjs +40 -45
  90. package/es/components/form/src/form2.mjs.map +1 -1
  91. package/es/components/icon/index.mjs +2 -2
  92. package/es/components/icon/src/icon.mjs +35 -8
  93. package/es/components/icon/src/icon.mjs.map +1 -1
  94. package/es/components/icon/src/icon2.mjs +8 -35
  95. package/es/components/icon/src/icon2.mjs.map +1 -1
  96. package/es/components/image/index.mjs +2 -2
  97. package/es/components/image/src/image.mjs +50 -127
  98. package/es/components/image/src/image.mjs.map +1 -1
  99. package/es/components/image/src/image2.mjs +127 -50
  100. package/es/components/image/src/image2.mjs.map +1 -1
  101. package/es/components/image-viewer/index.mjs +2 -2
  102. package/es/components/image-viewer/src/image-viewer.mjs +31 -210
  103. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  104. package/es/components/image-viewer/src/image-viewer2.mjs +210 -31
  105. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  106. package/es/components/index.mjs +27 -27
  107. package/es/components/menu/index.mjs +2 -2
  108. package/es/components/menu/src/menu-item-group.mjs +35 -4
  109. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  110. package/es/components/menu/src/menu-item-group2.mjs +4 -35
  111. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  112. package/es/components/page-header/index.mjs +2 -2
  113. package/es/components/page-header/src/page-header.mjs +14 -55
  114. package/es/components/page-header/src/page-header.mjs.map +1 -1
  115. package/es/components/page-header/src/page-header2.mjs +55 -14
  116. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  117. package/es/components/popconfirm/src/popconfirm.mjs +1 -1
  118. package/es/components/popconfirm/src/popconfirm2.mjs +4 -2
  119. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  120. package/es/components/popover/src/popover.mjs +1 -1
  121. package/es/components/popper/index.mjs +4 -4
  122. package/es/components/popper/src/arrow.mjs +31 -7
  123. package/es/components/popper/src/arrow.mjs.map +1 -1
  124. package/es/components/popper/src/arrow2.mjs +7 -31
  125. package/es/components/popper/src/arrow2.mjs.map +1 -1
  126. package/es/components/popper/src/content.mjs +64 -52
  127. package/es/components/popper/src/content.mjs.map +1 -1
  128. package/es/components/popper/src/content2.mjs +52 -64
  129. package/es/components/popper/src/content2.mjs.map +1 -1
  130. package/es/components/rate/index.mjs +2 -2
  131. package/es/components/rate/src/rate.mjs +84 -169
  132. package/es/components/rate/src/rate.mjs.map +1 -1
  133. package/es/components/rate/src/rate2.mjs +169 -84
  134. package/es/components/rate/src/rate2.mjs.map +1 -1
  135. package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
  136. package/es/components/tabs/index.mjs +1 -1
  137. package/es/components/tabs/src/tab-bar.mjs +76 -7
  138. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  139. package/es/components/tabs/src/tab-bar2.mjs +7 -76
  140. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  141. package/es/components/tabs/src/tab-nav.mjs +1 -1
  142. package/es/components/tooltip/src/tooltip.mjs +1 -1
  143. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  144. package/es/components/tooltip-v2/index.mjs +2 -2
  145. package/es/components/tooltip-v2/src/arrow.mjs +22 -38
  146. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  147. package/es/components/tooltip-v2/src/arrow2.mjs +38 -22
  148. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  149. package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
  150. package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
  151. package/es/components/tooltip-v2/src/trigger.mjs +11 -89
  152. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  153. package/es/components/tooltip-v2/src/trigger2.mjs +89 -11
  154. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  155. package/es/components/upload/index.mjs +2 -2
  156. package/es/components/upload/src/upload-content.mjs +46 -15
  157. package/es/components/upload/src/upload-content.mjs.map +1 -1
  158. package/es/components/upload/src/upload-content2.mjs +15 -46
  159. package/es/components/upload/src/upload-content2.mjs.map +1 -1
  160. package/es/components/upload/src/upload-dragger.mjs +32 -11
  161. package/es/components/upload/src/upload-dragger.mjs.map +1 -1
  162. package/es/components/upload/src/upload-dragger2.mjs +11 -32
  163. package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
  164. package/es/components/upload/src/upload2.mjs +1 -1
  165. package/es/index.mjs +27 -27
  166. package/lib/components/alert/index.js +2 -2
  167. package/lib/components/alert/src/alert.js +82 -33
  168. package/lib/components/alert/src/alert.js.map +1 -1
  169. package/lib/components/alert/src/alert2.js +33 -82
  170. package/lib/components/alert/src/alert2.js.map +1 -1
  171. package/lib/components/autocomplete/index.js +2 -2
  172. package/lib/components/autocomplete/src/autocomplete.js +58 -94
  173. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  174. package/lib/components/autocomplete/src/autocomplete2.js +94 -58
  175. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  176. package/lib/components/avatar/index.js +2 -2
  177. package/lib/components/avatar/src/avatar.js +29 -61
  178. package/lib/components/avatar/src/avatar.js.map +1 -1
  179. package/lib/components/avatar/src/avatar2.js +61 -29
  180. package/lib/components/avatar/src/avatar2.js.map +1 -1
  181. package/lib/components/badge/index.js +2 -2
  182. package/lib/components/badge/src/badge.js +17 -54
  183. package/lib/components/badge/src/badge.js.map +1 -1
  184. package/lib/components/badge/src/badge2.js +54 -17
  185. package/lib/components/badge/src/badge2.js.map +1 -1
  186. package/lib/components/button/index.js +2 -2
  187. package/lib/components/button/src/button-group.js +1 -1
  188. package/lib/components/button/src/button.js +96 -50
  189. package/lib/components/button/src/button.js.map +1 -1
  190. package/lib/components/button/src/button2.js +50 -96
  191. package/lib/components/button/src/button2.js.map +1 -1
  192. package/lib/components/calendar/index.js +2 -2
  193. package/lib/components/calendar/src/calendar.js +192 -9
  194. package/lib/components/calendar/src/calendar.js.map +1 -1
  195. package/lib/components/calendar/src/calendar2.js +9 -192
  196. package/lib/components/calendar/src/calendar2.js.map +1 -1
  197. package/lib/components/card/index.js +2 -2
  198. package/lib/components/card/src/card.js +35 -15
  199. package/lib/components/card/src/card.js.map +1 -1
  200. package/lib/components/card/src/card2.js +15 -35
  201. package/lib/components/card/src/card2.js.map +1 -1
  202. package/lib/components/carousel/index.js +2 -2
  203. package/lib/components/carousel/src/carousel.js +43 -201
  204. package/lib/components/carousel/src/carousel.js.map +1 -1
  205. package/lib/components/carousel/src/carousel2.js +201 -43
  206. package/lib/components/carousel/src/carousel2.js.map +1 -1
  207. package/lib/components/collection/index.js +1 -1
  208. package/lib/components/collection/src/collection.js +30 -9
  209. package/lib/components/collection/src/collection.js.map +1 -1
  210. package/lib/components/collection/src/collection2.js +9 -30
  211. package/lib/components/collection/src/collection2.js.map +1 -1
  212. package/lib/components/dialog/src/dialog-content.js +33 -78
  213. package/lib/components/dialog/src/dialog-content.js.map +1 -1
  214. package/lib/components/dialog/src/dialog-content2.js +78 -33
  215. package/lib/components/dialog/src/dialog-content2.js.map +1 -1
  216. package/lib/components/dialog/src/dialog.js +1 -1
  217. package/lib/components/dialog/src/dialog2.js +1 -1
  218. package/lib/components/divider/index.js +2 -2
  219. package/lib/components/divider/src/divider.js +34 -17
  220. package/lib/components/divider/src/divider.js.map +1 -1
  221. package/lib/components/divider/src/divider2.js +17 -34
  222. package/lib/components/divider/src/divider2.js.map +1 -1
  223. package/lib/components/drawer/index.js +2 -2
  224. package/lib/components/drawer/src/drawer.js +117 -23
  225. package/lib/components/drawer/src/drawer.js.map +1 -1
  226. package/lib/components/drawer/src/drawer2.js +23 -117
  227. package/lib/components/drawer/src/drawer2.js.map +1 -1
  228. package/lib/components/dropdown/index.js +2 -2
  229. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  230. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  231. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  232. package/lib/components/dropdown/src/dropdown.js +109 -109
  233. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  234. package/lib/components/dropdown/src/dropdown2.js +109 -109
  235. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  236. package/lib/components/empty/index.js +2 -2
  237. package/lib/components/empty/src/empty.js +11 -56
  238. package/lib/components/empty/src/empty.js.map +1 -1
  239. package/lib/components/empty/src/empty2.js +56 -11
  240. package/lib/components/empty/src/empty2.js.map +1 -1
  241. package/lib/components/form/index.js +4 -4
  242. package/lib/components/form/src/form-item.js +171 -47
  243. package/lib/components/form/src/form-item.js.map +1 -1
  244. package/lib/components/form/src/form-item2.js +47 -171
  245. package/lib/components/form/src/form-item2.js.map +1 -1
  246. package/lib/components/form/src/form.js +45 -40
  247. package/lib/components/form/src/form.js.map +1 -1
  248. package/lib/components/form/src/form2.js +40 -45
  249. package/lib/components/form/src/form2.js.map +1 -1
  250. package/lib/components/icon/index.js +2 -2
  251. package/lib/components/icon/src/icon.js +35 -8
  252. package/lib/components/icon/src/icon.js.map +1 -1
  253. package/lib/components/icon/src/icon2.js +8 -35
  254. package/lib/components/icon/src/icon2.js.map +1 -1
  255. package/lib/components/image/index.js +2 -2
  256. package/lib/components/image/src/image.js +50 -127
  257. package/lib/components/image/src/image.js.map +1 -1
  258. package/lib/components/image/src/image2.js +127 -50
  259. package/lib/components/image/src/image2.js.map +1 -1
  260. package/lib/components/image-viewer/index.js +2 -2
  261. package/lib/components/image-viewer/src/image-viewer.js +31 -210
  262. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  263. package/lib/components/image-viewer/src/image-viewer2.js +210 -31
  264. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  265. package/lib/components/index.js +27 -27
  266. package/lib/components/menu/index.js +2 -2
  267. package/lib/components/menu/src/menu-item-group.js +35 -4
  268. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  269. package/lib/components/menu/src/menu-item-group2.js +4 -35
  270. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  271. package/lib/components/page-header/index.js +2 -2
  272. package/lib/components/page-header/src/page-header.js +14 -55
  273. package/lib/components/page-header/src/page-header.js.map +1 -1
  274. package/lib/components/page-header/src/page-header2.js +55 -14
  275. package/lib/components/page-header/src/page-header2.js.map +1 -1
  276. package/lib/components/popconfirm/src/popconfirm.js +1 -1
  277. package/lib/components/popconfirm/src/popconfirm2.js +3 -1
  278. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  279. package/lib/components/popover/src/popover.js +1 -1
  280. package/lib/components/popper/index.js +4 -4
  281. package/lib/components/popper/src/arrow.js +31 -7
  282. package/lib/components/popper/src/arrow.js.map +1 -1
  283. package/lib/components/popper/src/arrow2.js +7 -31
  284. package/lib/components/popper/src/arrow2.js.map +1 -1
  285. package/lib/components/popper/src/content.js +65 -52
  286. package/lib/components/popper/src/content.js.map +1 -1
  287. package/lib/components/popper/src/content2.js +52 -65
  288. package/lib/components/popper/src/content2.js.map +1 -1
  289. package/lib/components/rate/index.js +2 -2
  290. package/lib/components/rate/src/rate.js +84 -169
  291. package/lib/components/rate/src/rate.js.map +1 -1
  292. package/lib/components/rate/src/rate2.js +169 -84
  293. package/lib/components/rate/src/rate2.js.map +1 -1
  294. package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
  295. package/lib/components/tabs/index.js +1 -1
  296. package/lib/components/tabs/src/tab-bar.js +76 -7
  297. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  298. package/lib/components/tabs/src/tab-bar2.js +7 -76
  299. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  300. package/lib/components/tabs/src/tab-nav.js +1 -1
  301. package/lib/components/tooltip/src/tooltip.js +1 -1
  302. package/lib/components/tooltip/src/tooltip2.js +1 -1
  303. package/lib/components/tooltip-v2/index.js +2 -2
  304. package/lib/components/tooltip-v2/src/arrow.js +23 -38
  305. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  306. package/lib/components/tooltip-v2/src/arrow2.js +38 -23
  307. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  308. package/lib/components/tooltip-v2/src/tooltip.js +2 -2
  309. package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
  310. package/lib/components/tooltip-v2/src/trigger.js +11 -89
  311. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  312. package/lib/components/tooltip-v2/src/trigger2.js +89 -11
  313. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  314. package/lib/components/upload/index.js +2 -2
  315. package/lib/components/upload/src/upload-content.js +46 -15
  316. package/lib/components/upload/src/upload-content.js.map +1 -1
  317. package/lib/components/upload/src/upload-content2.js +15 -46
  318. package/lib/components/upload/src/upload-content2.js.map +1 -1
  319. package/lib/components/upload/src/upload-dragger.js +32 -12
  320. package/lib/components/upload/src/upload-dragger.js.map +1 -1
  321. package/lib/components/upload/src/upload-dragger2.js +12 -32
  322. package/lib/components/upload/src/upload-dragger2.js.map +1 -1
  323. package/lib/components/upload/src/upload2.js +1 -1
  324. package/lib/index.js +27 -27
  325. package/package.json +1 -1
  326. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"collection.js","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":["defineComponent","_renderSlot"],"mappings":";;;;;;;AAOA,MAAK,YAAaA,mBAAa,CAAA;AAAA,EAC7B,YAAc,EAAA,KAAA;AAChB,CAAC,CAAA,CAAA;;SARCC,cAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
1
+ {"version":3,"file":"collection.js","sources":["../../../../../../packages/components/collection/src/collection.ts"],"sourcesContent":["import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type {\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":["Collection","ref","CollectionItem"],"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,GAAGA,qBAAU;AACjB,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,KAAK,GAAG;AACZ,MAAM,MAAM,aAAa,GAAGC,OAAG,CAAC,IAAI,CAAC,CAAC;AACtC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,gBAAgB,GAAG;AAC3B,IAAI,GAAGC,yBAAc;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;;;;;"}
@@ -3,36 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var vue = require('vue');
6
- var collection = require('./collection.js');
7
- var collectionItem = require('./collection-item.js');
6
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
8
7
 
9
- const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
10
- const createCollectionWithScope = (name) => {
11
- const COLLECTION_NAME = `Ps${name}Collection`;
12
- const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
13
- const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
14
- const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
15
- const PsCollection = {
16
- ...collection["default"],
17
- name: COLLECTION_NAME,
18
- setup() {
19
- const collectionRef = vue.ref(null);
20
- }
21
- };
22
- const PsCollectionItem = {
23
- ...collectionItem["default"],
24
- name: COLLECTION_ITEM_NAME,
25
- setup(_, { attrs }) {
26
- }
27
- };
28
- return {
29
- COLLECTION_INJECTION_KEY,
30
- COLLECTION_ITEM_INJECTION_KEY,
31
- PsCollection,
32
- PsCollectionItem
33
- };
34
- };
8
+ const _sfc_main = vue.defineComponent({
9
+ inheritAttrs: false
10
+ });
11
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
12
+ return vue.renderSlot(_ctx.$slots, "default");
13
+ }
14
+ var Collection = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/collection/src/collection.vue"]]);
35
15
 
36
- exports.COLLECTION_ITEM_SIGN = COLLECTION_ITEM_SIGN;
37
- exports.createCollectionWithScope = createCollectionWithScope;
16
+ exports["default"] = Collection;
38
17
  //# sourceMappingURL=collection2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collection2.js","sources":["../../../../../../packages/components/collection/src/collection.ts"],"sourcesContent":["import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey } from 'vue'\nimport type {\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":["Collection","ref","CollectionItem"],"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,GAAGA,qBAAU;AACjB,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,KAAK,GAAG;AACZ,MAAM,MAAM,aAAa,GAAGC,OAAG,CAAC,IAAI,CAAC,CAAC;AACtC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,gBAAgB,GAAG;AAC3B,IAAI,GAAGC,yBAAc;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":"collection2.js","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":["defineComponent","_renderSlot"],"mappings":";;;;;;;AAOA,MAAK,YAAaA,mBAAa,CAAA;AAAA,EAC7B,YAAc,EAAA,KAAA;AAChB,CAAC,CAAA,CAAA;;SARCC,cAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
@@ -2,88 +2,43 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index = require('../../icon/index.js');
7
5
  require('../../../utils/index.js');
8
- require('../../../tokens/index.js');
9
- var dialogContent = require('./dialog-content2.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
6
+ var props = require('../../../utils/vue/props.js');
11
7
  var icon = require('../../../utils/vue/icon.js');
12
- var dialog = require('../../../tokens/dialog.js');
13
8
 
14
- const _hoisted_1 = ["aria-label", "widget"];
15
- const _hoisted_2 = ["widget"];
16
- const _hoisted_3 = ["widget"];
17
- const _hoisted_4 = ["widget"];
18
- const __default__ = { name: "PsDialogContent" };
19
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
- ...__default__,
21
- props: dialogContent.dialogContentProps,
22
- setup(__props) {
23
- const { Close } = icon.CloseComponents;
24
- const { dialogRef, headerRef, ns, style } = vue.inject(dialog.dialogInjectionKey);
25
- return (_ctx, _cache) => {
26
- return vue.openBlock(), vue.createElementBlock("div", {
27
- ref_key: "dialogRef",
28
- ref: dialogRef,
29
- class: vue.normalizeClass([
30
- vue.unref(ns).b(),
31
- vue.unref(ns).is("fullscreen", _ctx.fullscreen),
32
- vue.unref(ns).is("draggable", _ctx.draggable),
33
- { [vue.unref(ns).m("center")]: _ctx.center },
34
- _ctx.customClass
35
- ]),
36
- "aria-modal": "true",
37
- role: "dialog",
38
- "aria-label": _ctx.title || "dialog",
39
- style: vue.normalizeStyle(vue.unref(style)),
40
- widget: _ctx.widget
41
- }, [
42
- vue.createElementVNode("div", {
43
- ref_key: "headerRef",
44
- ref: headerRef,
45
- class: vue.normalizeClass(vue.unref(ns).e("header")),
46
- widget: _ctx.widget ? "dialog:title:" + _ctx.widget.split(":")[1] : void 0
47
- }, [
48
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
49
- vue.createElementVNode("span", {
50
- class: vue.normalizeClass(vue.unref(ns).e("title"))
51
- }, vue.toDisplayString(_ctx.title), 3)
52
- ])
53
- ], 10, _hoisted_2),
54
- vue.createElementVNode("div", {
55
- class: vue.normalizeClass(vue.unref(ns).e("body")),
56
- widget: _ctx.widget ? "dialog:default:" + _ctx.widget.split(":")[1] : void 0
57
- }, [
58
- vue.renderSlot(_ctx.$slots, "default")
59
- ], 10, _hoisted_3),
60
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
61
- key: 0,
62
- class: vue.normalizeClass(vue.unref(ns).e("footer")),
63
- widget: _ctx.widget ? "dialog:footer:" + _ctx.widget.split(":")[1] : void 0
64
- }, [
65
- vue.renderSlot(_ctx.$slots, "footer")
66
- ], 10, _hoisted_4)) : vue.createCommentVNode("v-if", true),
67
- _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
68
- key: 1,
69
- "aria-label": "close",
70
- class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
71
- type: "button"
72
- }, [
73
- vue.createVNode(vue.unref(index.PsIcon), {
74
- class: vue.normalizeClass(vue.unref(ns).e("close"))
75
- }, {
76
- default: vue.withCtx(() => [
77
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon || vue.unref(Close))))
78
- ]),
79
- _: 1
80
- }, 8, ["class"])
81
- ], 2)) : vue.createCommentVNode("v-if", true)
82
- ], 14, _hoisted_1);
83
- };
9
+ const dialogContentProps = props.buildProps({
10
+ center: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ closeIcon: {
15
+ type: icon.iconPropType,
16
+ default: ""
17
+ },
18
+ customClass: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ draggable: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+ fullscreen: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ showClose: {
31
+ type: Boolean,
32
+ default: true
33
+ },
34
+ title: {
35
+ type: String,
36
+ default: ""
37
+ },
38
+ widget: {
39
+ type: String
84
40
  }
85
41
  });
86
- var PsDialogContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/dialog/src/dialog-content.vue"]]);
87
42
 
88
- exports["default"] = PsDialogContent;
43
+ exports.dialogContentProps = dialogContentProps;
89
44
  //# sourceMappingURL=dialog-content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-content.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div\n ref=\"dialogRef\"\n :class=\"[\n ns.b(),\n ns.is('fullscreen', fullscreen),\n ns.is('draggable', draggable),\n { [ns.m('center')]: center },\n customClass,\n ]\"\n aria-modal=\"true\"\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n :style=\"style\"\n :widget=\"widget\"\n >\n <div ref=\"headerRef\"\n :class=\"ns.e('header')\"\n :widget=\"widget ? 'dialog:title:' + widget.split(':')[1] : undefined\"\n >\n <slot name=\"title\">\n <span :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </div>\n <div :class=\"ns.e('body')\"\n :widget=\"widget ? 'dialog:default:' + widget.split(':')[1] : undefined\">\n <slot />\n </div>\n <div v-if=\"$slots.footer\" :class=\"ns.e('footer')\"\n :widget=\"widget ? 'dialog:footer:' + widget.split(':')[1] : undefined\"\n >\n <slot name=\"footer\" />\n </div>\n <button\n v-if=\"showClose\"\n aria-label=\"close\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n >\n <ps-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </ps-icon>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { CloseComponents } from '@element-ps/utils'\nimport { dialogInjectionKey } from '@element-ps/tokens'\nimport { dialogContentProps } from './dialog-content'\n\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'PsDialogContent' })\ndefineProps(dialogContentProps)\n\nconst { dialogRef, headerRef, ns, style } = inject(dialogInjectionKey)!\n// const { focusTrapRef, onKeydown } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\n// const composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n</script>\n"],"names":["CloseComponents","inject","dialogInjectionKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuDA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAAA,oBAAA,CAAA;AAKA,IAAA,MAAA,EAAA,SAAA,EAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAAC,WAAAC,yBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog-content.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-ps/utils'\n\nexport const dialogContentProps = buildProps({\n center: {\n type: Boolean,\n default: false,\n },\n closeIcon: {\n type: iconPropType,\n default: '',\n },\n customClass: {\n type: String,\n default: '',\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n widget: {\n type: String,\n },\n} as const)\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,kBAAkB,GAAGA,gBAAU,CAAC;AAC7C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,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,GAAG;AACH,CAAC;;;;"}
@@ -2,43 +2,88 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var vue = require('vue');
6
+ var index = require('../../icon/index.js');
5
7
  require('../../../utils/index.js');
6
- var props = require('../../../utils/vue/props.js');
8
+ require('../../../tokens/index.js');
9
+ var dialogContent = require('./dialog-content.js');
10
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
7
11
  var icon = require('../../../utils/vue/icon.js');
12
+ var dialog = require('../../../tokens/dialog.js');
8
13
 
9
- const dialogContentProps = props.buildProps({
10
- center: {
11
- type: Boolean,
12
- default: false
13
- },
14
- closeIcon: {
15
- type: icon.iconPropType,
16
- default: ""
17
- },
18
- customClass: {
19
- type: String,
20
- default: ""
21
- },
22
- draggable: {
23
- type: Boolean,
24
- default: false
25
- },
26
- fullscreen: {
27
- type: Boolean,
28
- default: false
29
- },
30
- showClose: {
31
- type: Boolean,
32
- default: true
33
- },
34
- title: {
35
- type: String,
36
- default: ""
37
- },
38
- widget: {
39
- type: String
14
+ const _hoisted_1 = ["aria-label", "widget"];
15
+ const _hoisted_2 = ["widget"];
16
+ const _hoisted_3 = ["widget"];
17
+ const _hoisted_4 = ["widget"];
18
+ const __default__ = { name: "PsDialogContent" };
19
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
20
+ ...__default__,
21
+ props: dialogContent.dialogContentProps,
22
+ setup(__props) {
23
+ const { Close } = icon.CloseComponents;
24
+ const { dialogRef, headerRef, ns, style } = vue.inject(dialog.dialogInjectionKey);
25
+ return (_ctx, _cache) => {
26
+ return vue.openBlock(), vue.createElementBlock("div", {
27
+ ref_key: "dialogRef",
28
+ ref: dialogRef,
29
+ class: vue.normalizeClass([
30
+ vue.unref(ns).b(),
31
+ vue.unref(ns).is("fullscreen", _ctx.fullscreen),
32
+ vue.unref(ns).is("draggable", _ctx.draggable),
33
+ { [vue.unref(ns).m("center")]: _ctx.center },
34
+ _ctx.customClass
35
+ ]),
36
+ "aria-modal": "true",
37
+ role: "dialog",
38
+ "aria-label": _ctx.title || "dialog",
39
+ style: vue.normalizeStyle(vue.unref(style)),
40
+ widget: _ctx.widget
41
+ }, [
42
+ vue.createElementVNode("div", {
43
+ ref_key: "headerRef",
44
+ ref: headerRef,
45
+ class: vue.normalizeClass(vue.unref(ns).e("header")),
46
+ widget: _ctx.widget ? "dialog:title:" + _ctx.widget.split(":")[1] : void 0
47
+ }, [
48
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
49
+ vue.createElementVNode("span", {
50
+ class: vue.normalizeClass(vue.unref(ns).e("title"))
51
+ }, vue.toDisplayString(_ctx.title), 3)
52
+ ])
53
+ ], 10, _hoisted_2),
54
+ vue.createElementVNode("div", {
55
+ class: vue.normalizeClass(vue.unref(ns).e("body")),
56
+ widget: _ctx.widget ? "dialog:default:" + _ctx.widget.split(":")[1] : void 0
57
+ }, [
58
+ vue.renderSlot(_ctx.$slots, "default")
59
+ ], 10, _hoisted_3),
60
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", {
61
+ key: 0,
62
+ class: vue.normalizeClass(vue.unref(ns).e("footer")),
63
+ widget: _ctx.widget ? "dialog:footer:" + _ctx.widget.split(":")[1] : void 0
64
+ }, [
65
+ vue.renderSlot(_ctx.$slots, "footer")
66
+ ], 10, _hoisted_4)) : vue.createCommentVNode("v-if", true),
67
+ _ctx.showClose ? (vue.openBlock(), vue.createElementBlock("button", {
68
+ key: 1,
69
+ "aria-label": "close",
70
+ class: vue.normalizeClass(vue.unref(ns).e("headerbtn")),
71
+ type: "button"
72
+ }, [
73
+ vue.createVNode(vue.unref(index.PsIcon), {
74
+ class: vue.normalizeClass(vue.unref(ns).e("close"))
75
+ }, {
76
+ default: vue.withCtx(() => [
77
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.closeIcon || vue.unref(Close))))
78
+ ]),
79
+ _: 1
80
+ }, 8, ["class"])
81
+ ], 2)) : vue.createCommentVNode("v-if", true)
82
+ ], 14, _hoisted_1);
83
+ };
40
84
  }
41
85
  });
86
+ var PsDialogContent = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/dialog/src/dialog-content.vue"]]);
42
87
 
43
- exports.dialogContentProps = dialogContentProps;
88
+ exports["default"] = PsDialogContent;
44
89
  //# sourceMappingURL=dialog-content2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-content2.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-ps/utils'\n\nexport const dialogContentProps = buildProps({\n center: {\n type: Boolean,\n default: false,\n },\n closeIcon: {\n type: iconPropType,\n default: '',\n },\n customClass: {\n type: String,\n default: '',\n },\n draggable: {\n type: Boolean,\n default: false,\n },\n fullscreen: {\n type: Boolean,\n default: false,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n title: {\n type: String,\n default: '',\n },\n widget: {\n type: String,\n },\n} as const)\n"],"names":["buildProps","iconPropType"],"mappings":";;;;;;;;AACY,MAAC,kBAAkB,GAAGA,gBAAU,CAAC;AAC7C,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,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,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"dialog-content2.js","sources":["../../../../../../packages/components/dialog/src/dialog-content.vue"],"sourcesContent":["<template>\n <div\n ref=\"dialogRef\"\n :class=\"[\n ns.b(),\n ns.is('fullscreen', fullscreen),\n ns.is('draggable', draggable),\n { [ns.m('center')]: center },\n customClass,\n ]\"\n aria-modal=\"true\"\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n :style=\"style\"\n :widget=\"widget\"\n >\n <div ref=\"headerRef\"\n :class=\"ns.e('header')\"\n :widget=\"widget ? 'dialog:title:' + widget.split(':')[1] : undefined\"\n >\n <slot name=\"title\">\n <span :class=\"ns.e('title')\">\n {{ title }}\n </span>\n </slot>\n </div>\n <div :class=\"ns.e('body')\"\n :widget=\"widget ? 'dialog:default:' + widget.split(':')[1] : undefined\">\n <slot />\n </div>\n <div v-if=\"$slots.footer\" :class=\"ns.e('footer')\"\n :widget=\"widget ? 'dialog:footer:' + widget.split(':')[1] : undefined\"\n >\n <slot name=\"footer\" />\n </div>\n <button\n v-if=\"showClose\"\n aria-label=\"close\"\n :class=\"ns.e('headerbtn')\"\n type=\"button\"\n >\n <ps-icon :class=\"ns.e('close')\">\n <component :is=\"closeIcon || Close\" />\n </ps-icon>\n </button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { CloseComponents } from '@element-ps/utils'\nimport { dialogInjectionKey } from '@element-ps/tokens'\nimport { dialogContentProps } from './dialog-content'\n\nconst { Close } = CloseComponents\n\ndefineOptions({ name: 'PsDialogContent' })\ndefineProps(dialogContentProps)\n\nconst { dialogRef, headerRef, ns, style } = inject(dialogInjectionKey)!\n// const { focusTrapRef, onKeydown } = inject(FOCUS_TRAP_INJECTION_KEY)!\n\n// const composedDialogRef = composeRefs(focusTrapRef, dialogRef)\n</script>\n"],"names":["CloseComponents","inject","dialogInjectionKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuDA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAAA,oBAAA,CAAA;AAKA,IAAA,MAAA,EAAA,SAAA,EAAA,SAAA,EAAA,EAAA,EAAA,KAAA,EAAA,GAAAC,WAAAC,yBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../../utils/index.js');
6
- var dialogContent = require('./dialog-content2.js');
6
+ var dialogContent = require('./dialog-content.js');
7
7
  var props = require('../../../utils/vue/props.js');
8
8
 
9
9
  const dialogProps = props.buildProps({
@@ -6,7 +6,7 @@ var vue = require('vue');
6
6
  var index$2 = require('../../overlay/index.js');
7
7
  require('../../../hooks/index.js');
8
8
  require('../../../tokens/index.js');
9
- var dialogContent = require('./dialog-content.js');
9
+ var dialogContent = require('./dialog-content2.js');
10
10
  var dialog = require('./dialog.js');
11
11
  var useDialog = require('./use-dialog.js');
12
12
  var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var divider$1 = require('./src/divider2.js');
7
- var divider = require('./src/divider.js');
6
+ var divider$1 = require('./src/divider.js');
7
+ var divider = require('./src/divider2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const PsDivider = install.withInstall(divider$1["default"]);
@@ -2,25 +2,42 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var props = require('../../../utils/vue/props.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var divider = require('./divider2.js');
8
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
+ var index = require('../../../hooks/use-namespace/index.js');
7
10
 
8
- const dividerProps = props.buildProps({
9
- direction: {
10
- type: String,
11
- values: ["horizontal", "vertical"],
12
- default: "horizontal"
13
- },
14
- contentPosition: {
15
- type: String,
16
- values: ["left", "center", "right"],
17
- default: "center"
18
- },
19
- borderStyle: {
20
- type: props.definePropType(String),
21
- default: "solid"
11
+ const __default__ = {
12
+ name: "PsDivider"
13
+ };
14
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
+ ...__default__,
16
+ props: divider.dividerProps,
17
+ setup(__props) {
18
+ const props = __props;
19
+ const ns = index.useNamespace("divider");
20
+ const dividerStyle = vue.computed(() => {
21
+ return {
22
+ "--el-border-style": props.borderStyle
23
+ };
24
+ });
25
+ return (_ctx, _cache) => {
26
+ return vue.openBlock(), vue.createElementBlock("div", {
27
+ class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.direction)]),
28
+ style: vue.normalizeStyle(vue.unref(dividerStyle))
29
+ }, [
30
+ _ctx.$slots.default && _ctx.direction !== "vertical" ? (vue.openBlock(), vue.createElementBlock("div", {
31
+ key: 0,
32
+ class: vue.normalizeClass([vue.unref(ns).e("text"), vue.unref(ns).is(_ctx.contentPosition)])
33
+ }, [
34
+ vue.renderSlot(_ctx.$slots, "default")
35
+ ], 2)) : vue.createCommentVNode("v-if", true)
36
+ ], 6);
37
+ };
22
38
  }
23
39
  });
40
+ var Divider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/divider/src/divider.vue"]]);
24
41
 
25
- exports.dividerProps = dividerProps;
42
+ exports["default"] = Divider;
26
43
  //# sourceMappingURL=divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","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":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,YAAY,GAAGA,gBAAU,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,EAAEC,oBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"divider.js","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":["useNamespace","computed"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAA,MAAA,EAAA,GAAAA,mBAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAAC,aAAA,MAAA;AACA,MAAA,OAAA;AAAA,QACA,qBAAA,KAAA,CAAA,WAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -2,42 +2,25 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var divider = require('./divider.js');
8
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var props = require('../../../utils/vue/props.js');
10
7
 
11
- const __default__ = {
12
- name: "PsDivider"
13
- };
14
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
- ...__default__,
16
- props: divider.dividerProps,
17
- setup(__props) {
18
- const props = __props;
19
- const ns = index.useNamespace("divider");
20
- const dividerStyle = vue.computed(() => {
21
- return {
22
- "--el-border-style": props.borderStyle
23
- };
24
- });
25
- return (_ctx, _cache) => {
26
- return vue.openBlock(), vue.createElementBlock("div", {
27
- class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.direction)]),
28
- style: vue.normalizeStyle(vue.unref(dividerStyle))
29
- }, [
30
- _ctx.$slots.default && _ctx.direction !== "vertical" ? (vue.openBlock(), vue.createElementBlock("div", {
31
- key: 0,
32
- class: vue.normalizeClass([vue.unref(ns).e("text"), vue.unref(ns).is(_ctx.contentPosition)])
33
- }, [
34
- vue.renderSlot(_ctx.$slots, "default")
35
- ], 2)) : vue.createCommentVNode("v-if", true)
36
- ], 6);
37
- };
8
+ const dividerProps = props.buildProps({
9
+ direction: {
10
+ type: String,
11
+ values: ["horizontal", "vertical"],
12
+ default: "horizontal"
13
+ },
14
+ contentPosition: {
15
+ type: String,
16
+ values: ["left", "center", "right"],
17
+ default: "center"
18
+ },
19
+ borderStyle: {
20
+ type: props.definePropType(String),
21
+ default: "solid"
38
22
  }
39
23
  });
40
- var Divider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/divider/src/divider.vue"]]);
41
24
 
42
- exports["default"] = Divider;
25
+ exports.dividerProps = dividerProps;
43
26
  //# sourceMappingURL=divider2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider2.js","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":["useNamespace","computed"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAA,MAAA,EAAA,GAAAA,mBAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAAC,aAAA,MAAA;AACA,MAAA,OAAA;AAAA,QACA,qBAAA,KAAA,CAAA,WAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"divider2.js","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":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,YAAY,GAAGA,gBAAU,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,EAAEC,oBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var drawer$1 = require('./src/drawer2.js');
7
- var drawer = require('./src/drawer.js');
6
+ var drawer$1 = require('./src/drawer.js');
7
+ var drawer = require('./src/drawer2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const PsDrawer = install.withInstall(drawer$1["default"]);