element-ps 2.0.32 → 2.0.35

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 +74 -406
  2. package/dist/index.full.min.js +5 -5
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +5 -5
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +74 -406
  7. package/es/components/alert/index.mjs +2 -2
  8. package/es/components/alert/src/alert.mjs +33 -83
  9. package/es/components/alert/src/alert.mjs.map +1 -1
  10. package/es/components/alert/src/alert2.mjs +83 -33
  11. package/es/components/alert/src/alert2.mjs.map +1 -1
  12. package/es/components/backtop/index.mjs +2 -2
  13. package/es/components/backtop/src/backtop.mjs +59 -18
  14. package/es/components/backtop/src/backtop.mjs.map +1 -1
  15. package/es/components/backtop/src/backtop2.mjs +18 -59
  16. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  17. package/es/components/breadcrumb/index.mjs +2 -2
  18. package/es/components/breadcrumb/src/breadcrumb-item.mjs +46 -11
  19. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  20. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +11 -46
  21. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  22. package/es/components/button/index.mjs +3 -3
  23. package/es/components/button/src/button-group.mjs +30 -5
  24. package/es/components/button/src/button-group.mjs.map +1 -1
  25. package/es/components/button/src/button-group2.mjs +5 -30
  26. package/es/components/button/src/button-group2.mjs.map +1 -1
  27. package/es/components/button/src/button.mjs +96 -48
  28. package/es/components/button/src/button.mjs.map +1 -1
  29. package/es/components/button/src/button2.mjs +48 -96
  30. package/es/components/button/src/button2.mjs.map +1 -1
  31. package/es/components/calendar/index.mjs +2 -2
  32. package/es/components/calendar/src/calendar.mjs +9 -188
  33. package/es/components/calendar/src/calendar.mjs.map +1 -1
  34. package/es/components/calendar/src/calendar2.mjs +188 -9
  35. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  36. package/es/components/cascader/src/index.mjs +1 -1
  37. package/es/components/empty/index.mjs +2 -2
  38. package/es/components/empty/src/empty.mjs +11 -56
  39. package/es/components/empty/src/empty.mjs.map +1 -1
  40. package/es/components/empty/src/empty2.mjs +56 -11
  41. package/es/components/empty/src/empty2.mjs.map +1 -1
  42. package/es/components/form/src/form-item2.mjs +2 -8
  43. package/es/components/form/src/form-item2.mjs.map +1 -1
  44. package/es/components/image/index.mjs +2 -2
  45. package/es/components/image/src/image.mjs +50 -127
  46. package/es/components/image/src/image.mjs.map +1 -1
  47. package/es/components/image/src/image2.mjs +127 -50
  48. package/es/components/image/src/image2.mjs.map +1 -1
  49. package/es/components/image-viewer/index.mjs +2 -2
  50. package/es/components/image-viewer/src/image-viewer.mjs +210 -31
  51. package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
  52. package/es/components/image-viewer/src/image-viewer2.mjs +31 -210
  53. package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
  54. package/es/components/index.mjs +24 -24
  55. package/es/components/input/index.mjs +2 -2
  56. package/es/components/input/src/input.mjs +295 -85
  57. package/es/components/input/src/input.mjs.map +1 -1
  58. package/es/components/input/src/input2.mjs +85 -295
  59. package/es/components/input/src/input2.mjs.map +1 -1
  60. package/es/components/link/index.mjs +2 -2
  61. package/es/components/link/src/link.mjs +19 -43
  62. package/es/components/link/src/link.mjs.map +1 -1
  63. package/es/components/link/src/link2.mjs +43 -19
  64. package/es/components/link/src/link2.mjs.map +1 -1
  65. package/es/components/menu/index.d.ts +6 -16
  66. package/es/components/menu/src/menu-item.mjs +8 -35
  67. package/es/components/menu/src/menu-item.mjs.map +1 -1
  68. package/es/components/menu/src/menu-item.vue.d.ts +10 -15
  69. package/es/components/menu/src/menu.mjs +2 -1
  70. package/es/components/menu/src/menu.mjs.map +1 -1
  71. package/es/components/popconfirm/index.mjs +2 -2
  72. package/es/components/popconfirm/src/popconfirm.mjs +20 -53
  73. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  74. package/es/components/popconfirm/src/popconfirm2.mjs +53 -20
  75. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  76. package/es/components/popper/index.mjs +2 -2
  77. package/es/components/popper/src/arrow.mjs +31 -7
  78. package/es/components/popper/src/arrow.mjs.map +1 -1
  79. package/es/components/popper/src/arrow2.mjs +7 -31
  80. package/es/components/popper/src/arrow2.mjs.map +1 -1
  81. package/es/components/radio/index.mjs +6 -6
  82. package/es/components/radio/src/radio-button.mjs +9 -80
  83. package/es/components/radio/src/radio-button.mjs.map +1 -1
  84. package/es/components/radio/src/radio-button2.mjs +80 -9
  85. package/es/components/radio/src/radio-button2.mjs.map +1 -1
  86. package/es/components/radio/src/radio-group.mjs +37 -18
  87. package/es/components/radio/src/radio-group.mjs.map +1 -1
  88. package/es/components/radio/src/radio-group2.mjs +18 -37
  89. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  90. package/es/components/radio/src/radio.mjs +74 -62
  91. package/es/components/radio/src/radio.mjs.map +1 -1
  92. package/es/components/radio/src/radio2.mjs +62 -74
  93. package/es/components/radio/src/radio2.mjs.map +1 -1
  94. package/es/components/rate/index.mjs +2 -2
  95. package/es/components/rate/src/rate.mjs +84 -169
  96. package/es/components/rate/src/rate.mjs.map +1 -1
  97. package/es/components/rate/src/rate2.mjs +169 -84
  98. package/es/components/rate/src/rate2.mjs.map +1 -1
  99. package/es/components/result/index.mjs +2 -2
  100. package/es/components/result/src/result.mjs +73 -28
  101. package/es/components/result/src/result.mjs.map +1 -1
  102. package/es/components/result/src/result2.mjs +28 -73
  103. package/es/components/result/src/result2.mjs.map +1 -1
  104. package/es/components/roving-focus-group/index.mjs +3 -3
  105. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  106. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  107. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  108. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  109. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  110. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  111. package/es/components/scrollbar/index.mjs +2 -2
  112. package/es/components/scrollbar/src/bar.mjs +22 -35
  113. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  114. package/es/components/scrollbar/src/bar2.mjs +35 -22
  115. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  116. package/es/components/scrollbar/src/scrollbar.mjs +112 -42
  117. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  118. package/es/components/scrollbar/src/scrollbar2.mjs +42 -112
  119. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  120. package/es/components/select/src/select.mjs +1 -1
  121. package/es/components/skeleton/index.mjs +2 -2
  122. package/es/components/skeleton/src/skeleton.mjs +49 -22
  123. package/es/components/skeleton/src/skeleton.mjs.map +1 -1
  124. package/es/components/skeleton/src/skeleton2.mjs +22 -49
  125. package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
  126. package/es/components/switch/index.mjs +2 -2
  127. package/es/components/switch/src/switch.mjs +81 -176
  128. package/es/components/switch/src/switch.mjs.map +1 -1
  129. package/es/components/switch/src/switch2.mjs +176 -81
  130. package/es/components/switch/src/switch2.mjs.map +1 -1
  131. package/es/components/tabs/index.mjs +2 -2
  132. package/es/components/tabs/src/tab-pane.mjs +61 -15
  133. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  134. package/es/components/tabs/src/tab-pane2.mjs +15 -61
  135. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  136. package/es/components/tag/index.mjs +2 -2
  137. package/es/components/tag/src/tag.mjs +33 -81
  138. package/es/components/tag/src/tag.mjs.map +1 -1
  139. package/es/components/tag/src/tag2.mjs +81 -33
  140. package/es/components/tag/src/tag2.mjs.map +1 -1
  141. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  142. package/es/components/tooltip-v2/index.mjs +5 -5
  143. package/es/components/tooltip-v2/src/content.mjs +113 -50
  144. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  145. package/es/components/tooltip-v2/src/content2.mjs +50 -113
  146. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  147. package/es/components/tooltip-v2/src/root.mjs +17 -81
  148. package/es/components/tooltip-v2/src/root.mjs.map +1 -1
  149. package/es/components/tooltip-v2/src/root2.mjs +81 -17
  150. package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
  151. package/es/components/tooltip-v2/src/tooltip.mjs +21 -74
  152. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  153. package/es/components/tooltip-v2/src/tooltip2.mjs +74 -21
  154. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  155. package/es/components/tooltip-v2/src/trigger.mjs +11 -89
  156. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  157. package/es/components/tooltip-v2/src/trigger2.mjs +89 -11
  158. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  159. package/es/components/upload/index.mjs +1 -1
  160. package/es/components/upload/src/upload-list.mjs +155 -26
  161. package/es/components/upload/src/upload-list.mjs.map +1 -1
  162. package/es/components/upload/src/upload-list2.mjs +26 -155
  163. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  164. package/es/components/upload/src/upload2.mjs +1 -1
  165. package/es/index.mjs +24 -24
  166. package/lib/components/alert/index.js +2 -2
  167. package/lib/components/alert/src/alert.js +33 -82
  168. package/lib/components/alert/src/alert.js.map +1 -1
  169. package/lib/components/alert/src/alert2.js +82 -33
  170. package/lib/components/alert/src/alert2.js.map +1 -1
  171. package/lib/components/backtop/index.js +2 -2
  172. package/lib/components/backtop/src/backtop.js +59 -18
  173. package/lib/components/backtop/src/backtop.js.map +1 -1
  174. package/lib/components/backtop/src/backtop2.js +18 -59
  175. package/lib/components/backtop/src/backtop2.js.map +1 -1
  176. package/lib/components/breadcrumb/index.js +2 -2
  177. package/lib/components/breadcrumb/src/breadcrumb-item.js +46 -11
  178. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  179. package/lib/components/breadcrumb/src/breadcrumb-item2.js +11 -46
  180. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  181. package/lib/components/button/index.js +3 -3
  182. package/lib/components/button/src/button-group.js +30 -5
  183. package/lib/components/button/src/button-group.js.map +1 -1
  184. package/lib/components/button/src/button-group2.js +5 -30
  185. package/lib/components/button/src/button-group2.js.map +1 -1
  186. package/lib/components/button/src/button.js +96 -50
  187. package/lib/components/button/src/button.js.map +1 -1
  188. package/lib/components/button/src/button2.js +50 -96
  189. package/lib/components/button/src/button2.js.map +1 -1
  190. package/lib/components/calendar/index.js +2 -2
  191. package/lib/components/calendar/src/calendar.js +9 -192
  192. package/lib/components/calendar/src/calendar.js.map +1 -1
  193. package/lib/components/calendar/src/calendar2.js +192 -9
  194. package/lib/components/calendar/src/calendar2.js.map +1 -1
  195. package/lib/components/cascader/src/index.js +1 -1
  196. package/lib/components/empty/index.js +2 -2
  197. package/lib/components/empty/src/empty.js +11 -56
  198. package/lib/components/empty/src/empty.js.map +1 -1
  199. package/lib/components/empty/src/empty2.js +56 -11
  200. package/lib/components/empty/src/empty2.js.map +1 -1
  201. package/lib/components/form/src/form-item2.js +1 -7
  202. package/lib/components/form/src/form-item2.js.map +1 -1
  203. package/lib/components/image/index.js +2 -2
  204. package/lib/components/image/src/image.js +50 -127
  205. package/lib/components/image/src/image.js.map +1 -1
  206. package/lib/components/image/src/image2.js +127 -50
  207. package/lib/components/image/src/image2.js.map +1 -1
  208. package/lib/components/image-viewer/index.js +2 -2
  209. package/lib/components/image-viewer/src/image-viewer.js +210 -31
  210. package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
  211. package/lib/components/image-viewer/src/image-viewer2.js +31 -210
  212. package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
  213. package/lib/components/index.js +24 -24
  214. package/lib/components/input/index.js +2 -2
  215. package/lib/components/input/src/input.js +294 -84
  216. package/lib/components/input/src/input.js.map +1 -1
  217. package/lib/components/input/src/input2.js +84 -294
  218. package/lib/components/input/src/input2.js.map +1 -1
  219. package/lib/components/link/index.js +2 -2
  220. package/lib/components/link/src/link.js +19 -43
  221. package/lib/components/link/src/link.js.map +1 -1
  222. package/lib/components/link/src/link2.js +43 -19
  223. package/lib/components/link/src/link2.js.map +1 -1
  224. package/lib/components/menu/index.d.ts +6 -16
  225. package/lib/components/menu/src/menu-item.js +6 -33
  226. package/lib/components/menu/src/menu-item.js.map +1 -1
  227. package/lib/components/menu/src/menu-item.vue.d.ts +10 -15
  228. package/lib/components/menu/src/menu.js +2 -1
  229. package/lib/components/menu/src/menu.js.map +1 -1
  230. package/lib/components/popconfirm/index.js +2 -2
  231. package/lib/components/popconfirm/src/popconfirm.js +20 -53
  232. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  233. package/lib/components/popconfirm/src/popconfirm2.js +53 -20
  234. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  235. package/lib/components/popper/index.js +2 -2
  236. package/lib/components/popper/src/arrow.js +31 -7
  237. package/lib/components/popper/src/arrow.js.map +1 -1
  238. package/lib/components/popper/src/arrow2.js +7 -31
  239. package/lib/components/popper/src/arrow2.js.map +1 -1
  240. package/lib/components/radio/index.js +6 -6
  241. package/lib/components/radio/src/radio-button.js +9 -80
  242. package/lib/components/radio/src/radio-button.js.map +1 -1
  243. package/lib/components/radio/src/radio-button2.js +80 -9
  244. package/lib/components/radio/src/radio-button2.js.map +1 -1
  245. package/lib/components/radio/src/radio-group.js +37 -18
  246. package/lib/components/radio/src/radio-group.js.map +1 -1
  247. package/lib/components/radio/src/radio-group2.js +18 -37
  248. package/lib/components/radio/src/radio-group2.js.map +1 -1
  249. package/lib/components/radio/src/radio.js +73 -64
  250. package/lib/components/radio/src/radio.js.map +1 -1
  251. package/lib/components/radio/src/radio2.js +64 -73
  252. package/lib/components/radio/src/radio2.js.map +1 -1
  253. package/lib/components/rate/index.js +2 -2
  254. package/lib/components/rate/src/rate.js +84 -169
  255. package/lib/components/rate/src/rate.js.map +1 -1
  256. package/lib/components/rate/src/rate2.js +169 -84
  257. package/lib/components/rate/src/rate2.js.map +1 -1
  258. package/lib/components/result/index.js +2 -2
  259. package/lib/components/result/src/result.js +73 -30
  260. package/lib/components/result/src/result.js.map +1 -1
  261. package/lib/components/result/src/result2.js +30 -73
  262. package/lib/components/result/src/result2.js.map +1 -1
  263. package/lib/components/roving-focus-group/index.js +2 -2
  264. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  265. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  266. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  267. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  268. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  269. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  270. package/lib/components/scrollbar/index.js +2 -2
  271. package/lib/components/scrollbar/src/bar.js +22 -35
  272. package/lib/components/scrollbar/src/bar.js.map +1 -1
  273. package/lib/components/scrollbar/src/bar2.js +35 -22
  274. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  275. package/lib/components/scrollbar/src/scrollbar.js +112 -42
  276. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  277. package/lib/components/scrollbar/src/scrollbar2.js +42 -112
  278. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  279. package/lib/components/select/src/select.js +1 -1
  280. package/lib/components/skeleton/index.js +2 -2
  281. package/lib/components/skeleton/src/skeleton.js +49 -22
  282. package/lib/components/skeleton/src/skeleton.js.map +1 -1
  283. package/lib/components/skeleton/src/skeleton2.js +22 -49
  284. package/lib/components/skeleton/src/skeleton2.js.map +1 -1
  285. package/lib/components/switch/index.js +2 -2
  286. package/lib/components/switch/src/switch.js +81 -176
  287. package/lib/components/switch/src/switch.js.map +1 -1
  288. package/lib/components/switch/src/switch2.js +176 -81
  289. package/lib/components/switch/src/switch2.js.map +1 -1
  290. package/lib/components/tabs/index.js +2 -2
  291. package/lib/components/tabs/src/tab-pane.js +61 -15
  292. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  293. package/lib/components/tabs/src/tab-pane2.js +15 -61
  294. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  295. package/lib/components/tag/index.js +2 -2
  296. package/lib/components/tag/src/tag.js +34 -81
  297. package/lib/components/tag/src/tag.js.map +1 -1
  298. package/lib/components/tag/src/tag2.js +81 -34
  299. package/lib/components/tag/src/tag2.js.map +1 -1
  300. package/lib/components/tooltip/src/tooltip2.js +1 -1
  301. package/lib/components/tooltip-v2/index.js +5 -5
  302. package/lib/components/tooltip-v2/src/content.js +113 -50
  303. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  304. package/lib/components/tooltip-v2/src/content2.js +50 -113
  305. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  306. package/lib/components/tooltip-v2/src/root.js +17 -81
  307. package/lib/components/tooltip-v2/src/root.js.map +1 -1
  308. package/lib/components/tooltip-v2/src/root2.js +81 -17
  309. package/lib/components/tooltip-v2/src/root2.js.map +1 -1
  310. package/lib/components/tooltip-v2/src/tooltip.js +21 -74
  311. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  312. package/lib/components/tooltip-v2/src/tooltip2.js +74 -21
  313. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  314. package/lib/components/tooltip-v2/src/trigger.js +11 -89
  315. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  316. package/lib/components/tooltip-v2/src/trigger2.js +89 -11
  317. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  318. package/lib/components/upload/index.js +1 -1
  319. package/lib/components/upload/src/upload-list.js +155 -27
  320. package/lib/components/upload/src/upload-list.js.map +1 -1
  321. package/lib/components/upload/src/upload-list2.js +27 -155
  322. package/lib/components/upload/src/upload-list2.js.map +1 -1
  323. package/lib/components/upload/src/upload2.js +1 -1
  324. package/lib/index.js +24 -24
  325. package/package.json +1 -1
  326. package/web-types.json +1 -1
@@ -2,92 +2,43 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index$1 = require('../../icon/index.js');
7
5
  require('../../../utils/index.js');
8
- require('../../../hooks/index.js');
9
- var alert = require('./alert2.js');
10
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
6
+ var props = require('../../../utils/vue/props.js');
7
+ var objects = require('../../../utils/objects.js');
11
8
  var icon = require('../../../utils/vue/icon.js');
12
- var index = require('../../../hooks/use-namespace/index.js');
13
9
 
14
- const __default__ = {
15
- name: "PsAlert"
16
- };
17
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
- ...__default__,
19
- props: alert.alertProps,
20
- setup(__props) {
21
- const props = __props;
22
- const { Close } = icon.TypeComponents;
23
- const slots = vue.useSlots();
24
- const ns = index.useNamespace("alert");
25
- const visible = vue.ref(true);
26
- const iconComponent = vue.computed(() => icon.TypeComponentsMap[props.type] || icon.TypeComponentsMap["info"]);
27
- const isBigIcon = vue.computed(() => props.description || { [ns.is("big")]: slots.default });
28
- const isBoldTitle = vue.computed(() => props.description || { [ns.is("bold")]: slots.default });
29
- return (_ctx, _cache) => {
30
- return vue.openBlock(), vue.createBlock(vue.Transition, {
31
- name: vue.unref(ns).b("fade")
32
- }, {
33
- default: vue.withCtx(() => [
34
- vue.withDirectives(vue.createElementVNode("div", {
35
- class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.type), vue.unref(ns).is("center", _ctx.center), vue.unref(ns).is(_ctx.effect)]),
36
- role: "alert"
37
- }, [
38
- _ctx.showIcon && vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), {
39
- key: 0,
40
- class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(isBigIcon)])
41
- }, {
42
- default: vue.withCtx(() => [
43
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
44
- ]),
45
- _: 1
46
- }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
47
- vue.createElementVNode("div", {
48
- class: vue.normalizeClass(vue.unref(ns).e("content"))
49
- }, [
50
- _ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
51
- key: 0,
52
- class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(isBoldTitle)])
53
- }, [
54
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
55
- vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
56
- ])
57
- ], 2)) : vue.createCommentVNode("v-if", true),
58
- _ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
59
- key: 1,
60
- class: vue.normalizeClass(vue.unref(ns).e("description"))
61
- }, [
62
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
63
- vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
64
- ])
65
- ], 2)) : vue.createCommentVNode("v-if", true),
66
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
67
- _ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
68
- key: 0,
69
- class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")])
70
- }, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), {
71
- key: 1,
72
- class: vue.normalizeClass(vue.unref(ns).e("close-btn"))
73
- }, {
74
- default: vue.withCtx(() => [
75
- vue.createVNode(vue.unref(Close))
76
- ]),
77
- _: 1
78
- }, 8, ["class"]))
79
- ], 2112)) : vue.createCommentVNode("v-if", true)
80
- ], 2)
81
- ], 2), [
82
- [vue.vShow, visible.value]
83
- ])
84
- ]),
85
- _: 3
86
- }, 8, ["name"]);
87
- };
10
+ const alertEffects = ["light", "dark"];
11
+ const alertProps = props.buildProps({
12
+ title: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ description: {
17
+ type: String,
18
+ default: ""
19
+ },
20
+ type: {
21
+ type: String,
22
+ values: objects.keysOf(icon.TypeComponentsMap),
23
+ default: "info"
24
+ },
25
+ closable: {
26
+ type: Boolean,
27
+ default: true
28
+ },
29
+ closeText: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ showIcon: Boolean,
34
+ center: Boolean,
35
+ effect: {
36
+ type: String,
37
+ values: alertEffects,
38
+ default: "light"
88
39
  }
89
40
  });
90
- var Alert = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/alert/src/alert.vue"]]);
91
41
 
92
- exports["default"] = Alert;
42
+ exports.alertEffects = alertEffects;
43
+ exports.alertProps = alertProps;
93
44
  //# sourceMappingURL=alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.js","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <ps-icon\n v-if=\"showIcon && iconComponent\"\n :class=\"[ns.e('icon'), isBigIcon]\"\n >\n <component :is=\"iconComponent\" />\n </ps-icon>\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), isBoldTitle]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"$slots.default || description\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n >\n {{ closeText }}\n </div>\n <ps-icon v-else :class=\"ns.e('close-btn')\">\n <Close />\n </ps-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-ps/utils'\nimport { useNamespace } from '@element-ps/hooks'\nimport { alertProps } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'PsAlert',\n})\n\nconst props = defineProps(alertProps)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\n// state\nconst visible = ref(true)\n\n// computed\nconst iconComponent = computed(\n () => TypeComponentsMap[props.type] || TypeComponentsMap['info']\n)\nconst isBigIcon = computed(\n () => props.description || { [ns.is('big')]: slots.default }\n)\nconst isBoldTitle = computed(\n () => props.description || { [ns.is('bold')]: slots.default }\n)\n\n</script>\n"],"names":["TypeComponents","useSlots","useNamespace","ref","computed","TypeComponentsMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+CA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAAA,mBAAA,CAAA;AAOA,IAAA,MAAA,QAAAC,YAAA,EAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAAC,mBAAA,OAAA,CAAA,CAAA;AAGA,IAAA,MAAA,OAAA,GAAAC,QAAA,IAAA,CAAA,CAAA;AAGA,IAAA,MAAA,gBAAAC,YACA,CAAA,MAAAC,uBAAA,KAAA,CAAA,IAAA,CAAA,IAAAA,uBAAA,MACA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAAD,YAAA,CACA,MAAA,KAAA,CAAA,WAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,KAAA,CAAA,GAAA,KAAA,CAAA,OAAA,EACA,CAAA,CAAA;AACA,IAAA,MAAA,WAAA,GAAAA,YAAA,CACA,MAAA,KAAA,CAAA,WAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,MAAA,CAAA,GAAA,KAAA,CAAA,OAAA,EACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"alert.js","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Alert from './alert.vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n closable: {\n type: Boolean,\n default: true,\n },\n closeText: {\n type: String,\n default: '',\n },\n showIcon: Boolean,\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\n\nexport type AlertInstance = InstanceType<typeof Alert>\n"],"names":["buildProps","keysOf","TypeComponentsMap"],"mappings":";;;;;;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAGA,gBAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,cAAM,CAACC,sBAAiB,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;;"}
@@ -2,43 +2,92 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var vue = require('vue');
6
+ var index$1 = require('../../icon/index.js');
5
7
  require('../../../utils/index.js');
6
- var props = require('../../../utils/vue/props.js');
7
- var objects = require('../../../utils/objects.js');
8
+ require('../../../hooks/index.js');
9
+ var alert = require('./alert.js');
10
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
8
11
  var icon = require('../../../utils/vue/icon.js');
12
+ var index = require('../../../hooks/use-namespace/index.js');
9
13
 
10
- const alertEffects = ["light", "dark"];
11
- const alertProps = props.buildProps({
12
- title: {
13
- type: String,
14
- default: ""
15
- },
16
- description: {
17
- type: String,
18
- default: ""
19
- },
20
- type: {
21
- type: String,
22
- values: objects.keysOf(icon.TypeComponentsMap),
23
- default: "info"
24
- },
25
- closable: {
26
- type: Boolean,
27
- default: true
28
- },
29
- closeText: {
30
- type: String,
31
- default: ""
32
- },
33
- showIcon: Boolean,
34
- center: Boolean,
35
- effect: {
36
- type: String,
37
- values: alertEffects,
38
- default: "light"
14
+ const __default__ = {
15
+ name: "PsAlert"
16
+ };
17
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
18
+ ...__default__,
19
+ props: alert.alertProps,
20
+ setup(__props) {
21
+ const props = __props;
22
+ const { Close } = icon.TypeComponents;
23
+ const slots = vue.useSlots();
24
+ const ns = index.useNamespace("alert");
25
+ const visible = vue.ref(true);
26
+ const iconComponent = vue.computed(() => icon.TypeComponentsMap[props.type] || icon.TypeComponentsMap["info"]);
27
+ const isBigIcon = vue.computed(() => props.description || { [ns.is("big")]: slots.default });
28
+ const isBoldTitle = vue.computed(() => props.description || { [ns.is("bold")]: slots.default });
29
+ return (_ctx, _cache) => {
30
+ return vue.openBlock(), vue.createBlock(vue.Transition, {
31
+ name: vue.unref(ns).b("fade")
32
+ }, {
33
+ default: vue.withCtx(() => [
34
+ vue.withDirectives(vue.createElementVNode("div", {
35
+ class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.type), vue.unref(ns).is("center", _ctx.center), vue.unref(ns).is(_ctx.effect)]),
36
+ role: "alert"
37
+ }, [
38
+ _ctx.showIcon && vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), {
39
+ key: 0,
40
+ class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(isBigIcon)])
41
+ }, {
42
+ default: vue.withCtx(() => [
43
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
44
+ ]),
45
+ _: 1
46
+ }, 8, ["class"])) : vue.createCommentVNode("v-if", true),
47
+ vue.createElementVNode("div", {
48
+ class: vue.normalizeClass(vue.unref(ns).e("content"))
49
+ }, [
50
+ _ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("span", {
51
+ key: 0,
52
+ class: vue.normalizeClass([vue.unref(ns).e("title"), vue.unref(isBoldTitle)])
53
+ }, [
54
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
55
+ vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
56
+ ])
57
+ ], 2)) : vue.createCommentVNode("v-if", true),
58
+ _ctx.$slots.default || _ctx.description ? (vue.openBlock(), vue.createElementBlock("p", {
59
+ key: 1,
60
+ class: vue.normalizeClass(vue.unref(ns).e("description"))
61
+ }, [
62
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
63
+ vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
64
+ ])
65
+ ], 2)) : vue.createCommentVNode("v-if", true),
66
+ _ctx.closable ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
67
+ _ctx.closeText ? (vue.openBlock(), vue.createElementBlock("div", {
68
+ key: 0,
69
+ class: vue.normalizeClass([vue.unref(ns).e("close-btn"), vue.unref(ns).is("customed")])
70
+ }, vue.toDisplayString(_ctx.closeText), 3)) : (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), {
71
+ key: 1,
72
+ class: vue.normalizeClass(vue.unref(ns).e("close-btn"))
73
+ }, {
74
+ default: vue.withCtx(() => [
75
+ vue.createVNode(vue.unref(Close))
76
+ ]),
77
+ _: 1
78
+ }, 8, ["class"]))
79
+ ], 2112)) : vue.createCommentVNode("v-if", true)
80
+ ], 2)
81
+ ], 2), [
82
+ [vue.vShow, visible.value]
83
+ ])
84
+ ]),
85
+ _: 3
86
+ }, 8, ["name"]);
87
+ };
39
88
  }
40
89
  });
90
+ var Alert = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/alert/src/alert.vue"]]);
41
91
 
42
- exports.alertEffects = alertEffects;
43
- exports.alertProps = alertProps;
92
+ exports["default"] = Alert;
44
93
  //# sourceMappingURL=alert2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Alert from './alert.vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n closable: {\n type: Boolean,\n default: true,\n },\n closeText: {\n type: String,\n default: '',\n },\n showIcon: Boolean,\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\n\nexport type AlertInstance = InstanceType<typeof Alert>\n"],"names":["buildProps","keysOf","TypeComponentsMap"],"mappings":";;;;;;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAGA,gBAAU,CAAC;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,cAAM,CAACC,sBAAiB,CAAC;AACrC,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,YAAY;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;;"}
1
+ {"version":3,"file":"alert2.js","sources":["../../../../../../packages/components/alert/src/alert.vue"],"sourcesContent":["<template>\n <transition :name=\"ns.b('fade')\">\n <div\n v-show=\"visible\"\n :class=\"[ns.b(), ns.m(type), ns.is('center', center), ns.is(effect)]\"\n role=\"alert\"\n >\n <ps-icon\n v-if=\"showIcon && iconComponent\"\n :class=\"[ns.e('icon'), isBigIcon]\"\n >\n <component :is=\"iconComponent\" />\n </ps-icon>\n <div :class=\"ns.e('content')\">\n <span\n v-if=\"title || $slots.title\"\n :class=\"[ns.e('title'), isBoldTitle]\"\n >\n <slot name=\"title\">{{ title }}</slot>\n </span>\n <p v-if=\"$slots.default || description\" :class=\"ns.e('description')\">\n <slot>\n {{ description }}\n </slot>\n </p>\n <template v-if=\"closable\">\n <div\n v-if=\"closeText\"\n :class=\"[ns.e('close-btn'), ns.is('customed')]\"\n >\n {{ closeText }}\n </div>\n <ps-icon v-else :class=\"ns.e('close-btn')\">\n <Close />\n </ps-icon>\n </template>\n </div>\n </div>\n </transition>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, ref, useSlots } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-ps/utils'\nimport { useNamespace } from '@element-ps/hooks'\nimport { alertProps } from './alert'\n\nconst { Close } = TypeComponents\n\ndefineOptions({\n name: 'PsAlert',\n})\n\nconst props = defineProps(alertProps)\nconst slots = useSlots()\n\nconst ns = useNamespace('alert')\n\n// state\nconst visible = ref(true)\n\n// computed\nconst iconComponent = computed(\n () => TypeComponentsMap[props.type] || TypeComponentsMap['info']\n)\nconst isBigIcon = computed(\n () => props.description || { [ns.is('big')]: slots.default }\n)\nconst isBoldTitle = computed(\n () => props.description || { [ns.is('bold')]: slots.default }\n)\n\n</script>\n"],"names":["TypeComponents","useSlots","useNamespace","ref","computed","TypeComponentsMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+CA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAAA,mBAAA,CAAA;AAOA,IAAA,MAAA,QAAAC,YAAA,EAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAAC,mBAAA,OAAA,CAAA,CAAA;AAGA,IAAA,MAAA,OAAA,GAAAC,QAAA,IAAA,CAAA,CAAA;AAGA,IAAA,MAAA,gBAAAC,YACA,CAAA,MAAAC,uBAAA,KAAA,CAAA,IAAA,CAAA,IAAAA,uBAAA,MACA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAAD,YAAA,CACA,MAAA,KAAA,CAAA,WAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,KAAA,CAAA,GAAA,KAAA,CAAA,OAAA,EACA,CAAA,CAAA;AACA,IAAA,MAAA,WAAA,GAAAA,YAAA,CACA,MAAA,KAAA,CAAA,WAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,MAAA,CAAA,GAAA,KAAA,CAAA,OAAA,EACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var backtop$1 = require('./src/backtop2.js');
7
- var backtop = require('./src/backtop.js');
6
+ var backtop$1 = require('./src/backtop.js');
7
+ var backtop = require('./src/backtop2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const PsBacktop = install.withInstall(backtop$1["default"]);
@@ -2,24 +2,65 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const backtopProps = {
6
- visibilityHeight: {
7
- type: Number,
8
- default: 200
9
- },
10
- target: {
11
- type: String,
12
- default: ""
13
- },
14
- right: {
15
- type: Number,
16
- default: 40
17
- },
18
- bottom: {
19
- type: Number,
20
- default: 40
21
- }
5
+ var vue = require('vue');
6
+ var index$1 = require('../../icon/index.js');
7
+ require('../../../utils/index.js');
8
+ var iconsVue = require('@element-plus/icons-vue');
9
+ require('../../../hooks/index.js');
10
+ var backtop = require('./backtop2.js');
11
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
+ var index = require('../../../hooks/use-namespace/index.js');
13
+ var error = require('../../../utils/error.js');
14
+
15
+ const __default__ = {
16
+ name: "PsBacktop"
22
17
  };
18
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
19
+ ...__default__,
20
+ props: backtop.backtopProps,
21
+ setup(__props) {
22
+ const props = __props;
23
+ const COMPONENT_NAME = "PsBacktop";
24
+ const ns = index.useNamespace("backtop");
25
+ const el = vue.shallowRef();
26
+ const container = vue.shallowRef();
27
+ const visible = vue.ref(false);
28
+ const backTopStyle = vue.computed(() => ({
29
+ right: `${props.right}px`,
30
+ bottom: `${props.bottom}px`
31
+ }));
32
+ vue.onMounted(() => {
33
+ var _a;
34
+ container.value = document;
35
+ el.value = document.documentElement;
36
+ if (props.target) {
37
+ el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
38
+ if (!el.value) {
39
+ error.throwError(COMPONENT_NAME, `target is not existed: ${props.target}`);
40
+ }
41
+ container.value = el.value;
42
+ }
43
+ });
44
+ return (_ctx, _cache) => {
45
+ return vue.openBlock(), vue.createElementBlock("div", {
46
+ style: vue.normalizeStyle(vue.unref(backTopStyle)),
47
+ class: vue.normalizeClass(vue.unref(ns).b())
48
+ }, [
49
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
50
+ vue.createVNode(vue.unref(index$1.PsIcon), {
51
+ class: vue.normalizeClass(vue.unref(ns).e("icon"))
52
+ }, {
53
+ default: vue.withCtx(() => [
54
+ vue.createVNode(vue.unref(iconsVue.CaretTop))
55
+ ]),
56
+ _: 1
57
+ }, 8, ["class"])
58
+ ])
59
+ ], 6);
60
+ };
61
+ }
62
+ });
63
+ var Backtop = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/backtop/src/backtop.vue"]]);
23
64
 
24
- exports.backtopProps = backtopProps;
65
+ exports["default"] = Backtop;
25
66
  //# sourceMappingURL=backtop.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backtop.js","sources":["../../../../../../packages/components/backtop/src/backtop.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const backtopProps = {\n visibilityHeight: {\n type: Number,\n default: 200,\n },\n target: {\n type: String,\n default: '',\n },\n right: {\n type: Number,\n default: 40,\n },\n bottom: {\n type: Number,\n default: 40,\n },\n} as const\nexport type BacktopProps = ExtractPropTypes<typeof backtopProps>\n"],"names":[],"mappings":";;;;AAAY,MAAC,YAAY,GAAG;AAC5B,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH;;;;"}
1
+ {"version":3,"file":"backtop.js","sources":["../../../../../../packages/components/backtop/src/backtop.vue"],"sourcesContent":["<template>\n <div\n :style=\"backTopStyle\"\n :class=\"ns.b()\"\n >\n <slot>\n <ps-icon :class=\"ns.e('icon')\"><caret-top /></ps-icon>\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { throwError } from '@element-ps/utils'\nimport { CaretTop } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-ps/hooks'\n\nimport { backtopProps } from './backtop'\n\nconst COMPONENT_NAME = 'PsBacktop'\n\ndefineOptions({\n name: 'PsBacktop',\n})\n\nconst props = defineProps(backtopProps)\n\nconst ns = useNamespace('backtop')\nconst el = shallowRef<HTMLElement>()\nconst container = shallowRef<Document | HTMLElement>()\nconst visible = ref(false)\n\nconst backTopStyle = computed(() => ({\n right: `${props.right}px`,\n bottom: `${props.bottom}px`,\n}))\n\nonMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!el.value) {\n throwError(COMPONENT_NAME, `target is not existed: ${props.target}`)\n }\n container.value = el.value\n }\n})\n</script>\n"],"names":["useNamespace","shallowRef","ref","computed","onMounted","throwError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AAQA,IAAA,MAAA,EAAA,GAAAA,mBAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAAA,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAAC,QAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAAC,aAAA,OAAA;AAAA,MACA,KAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,EAAA,CAAA;AAAA,MACA,MAAA,EAAA,GAAA,KAAA,CAAA,MAAA,CAAA,EAAA,CAAA;AAAA,KACA,CAAA,CAAA,CAAA;AAEA,IAAAC,aAAA,CAAA,MAAA;AACA,MAAA,IAAA,EAAA,CAAA;AACA,MAAA,eAAA,GAAA,QAAA,CAAA;AAEA,MAAA,EAAA,CAAA,QAAA,QAAA,CAAA,eAAA,CAAA;AACA,MAAA,IAAA,KAAA,CAAA,MAAA,EAAA;AACA,QAAA,EAAA,CAAA,KAAA,GAAA,CAAA,EAAA,GAAA,QAAA,CAAA,aAAA,CAAA,KAAA,CAAA,MAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA;AACA,QAAA,IAAA,CAAA,EAAA,CAAA,KAAA,EAAA;AAAA,UACAC,gBAAA,CAAA,cAAA,EAAA,CAAA,uBAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACA,SAAA;AAAA,QACA,SAAA,CAAA,KAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,OACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,65 +2,24 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- var index$1 = require('../../icon/index.js');
7
- require('../../../utils/index.js');
8
- var iconsVue = require('@element-plus/icons-vue');
9
- require('../../../hooks/index.js');
10
- var backtop = require('./backtop.js');
11
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
12
- var index = require('../../../hooks/use-namespace/index.js');
13
- var error = require('../../../utils/error.js');
14
-
15
- const __default__ = {
16
- name: "PsBacktop"
17
- };
18
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
19
- ...__default__,
20
- props: backtop.backtopProps,
21
- setup(__props) {
22
- const props = __props;
23
- const COMPONENT_NAME = "PsBacktop";
24
- const ns = index.useNamespace("backtop");
25
- const el = vue.shallowRef();
26
- const container = vue.shallowRef();
27
- const visible = vue.ref(false);
28
- const backTopStyle = vue.computed(() => ({
29
- right: `${props.right}px`,
30
- bottom: `${props.bottom}px`
31
- }));
32
- vue.onMounted(() => {
33
- var _a;
34
- container.value = document;
35
- el.value = document.documentElement;
36
- if (props.target) {
37
- el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
38
- if (!el.value) {
39
- error.throwError(COMPONENT_NAME, `target is not existed: ${props.target}`);
40
- }
41
- container.value = el.value;
42
- }
43
- });
44
- return (_ctx, _cache) => {
45
- return vue.openBlock(), vue.createElementBlock("div", {
46
- style: vue.normalizeStyle(vue.unref(backTopStyle)),
47
- class: vue.normalizeClass(vue.unref(ns).b())
48
- }, [
49
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
50
- vue.createVNode(vue.unref(index$1.PsIcon), {
51
- class: vue.normalizeClass(vue.unref(ns).e("icon"))
52
- }, {
53
- default: vue.withCtx(() => [
54
- vue.createVNode(vue.unref(iconsVue.CaretTop))
55
- ]),
56
- _: 1
57
- }, 8, ["class"])
58
- ])
59
- ], 6);
60
- };
5
+ const backtopProps = {
6
+ visibilityHeight: {
7
+ type: Number,
8
+ default: 200
9
+ },
10
+ target: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ right: {
15
+ type: Number,
16
+ default: 40
17
+ },
18
+ bottom: {
19
+ type: Number,
20
+ default: 40
61
21
  }
62
- });
63
- var Backtop = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/backtop/src/backtop.vue"]]);
22
+ };
64
23
 
65
- exports["default"] = Backtop;
24
+ exports.backtopProps = backtopProps;
66
25
  //# sourceMappingURL=backtop2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backtop2.js","sources":["../../../../../../packages/components/backtop/src/backtop.vue"],"sourcesContent":["<template>\n <div\n :style=\"backTopStyle\"\n :class=\"ns.b()\"\n >\n <slot>\n <ps-icon :class=\"ns.e('icon')\"><caret-top /></ps-icon>\n </slot>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { throwError } from '@element-ps/utils'\nimport { CaretTop } from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-ps/hooks'\n\nimport { backtopProps } from './backtop'\n\nconst COMPONENT_NAME = 'PsBacktop'\n\ndefineOptions({\n name: 'PsBacktop',\n})\n\nconst props = defineProps(backtopProps)\n\nconst ns = useNamespace('backtop')\nconst el = shallowRef<HTMLElement>()\nconst container = shallowRef<Document | HTMLElement>()\nconst visible = ref(false)\n\nconst backTopStyle = computed(() => ({\n right: `${props.right}px`,\n bottom: `${props.bottom}px`,\n}))\n\nonMounted(() => {\n container.value = document\n el.value = document.documentElement\n\n if (props.target) {\n el.value = document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!el.value) {\n throwError(COMPONENT_NAME, `target is not existed: ${props.target}`)\n }\n container.value = el.value\n }\n})\n</script>\n"],"names":["useNamespace","shallowRef","ref","computed","onMounted","throwError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AAQA,IAAA,MAAA,EAAA,GAAAA,mBAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAAC,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAAA,cAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAAC,QAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAAC,aAAA,OAAA;AAAA,MACA,KAAA,EAAA,GAAA,KAAA,CAAA,KAAA,CAAA,EAAA,CAAA;AAAA,MACA,MAAA,EAAA,GAAA,KAAA,CAAA,MAAA,CAAA,EAAA,CAAA;AAAA,KACA,CAAA,CAAA,CAAA;AAEA,IAAAC,aAAA,CAAA,MAAA;AACA,MAAA,IAAA,EAAA,CAAA;AACA,MAAA,eAAA,GAAA,QAAA,CAAA;AAEA,MAAA,EAAA,CAAA,QAAA,QAAA,CAAA,eAAA,CAAA;AACA,MAAA,IAAA,KAAA,CAAA,MAAA,EAAA;AACA,QAAA,EAAA,CAAA,KAAA,GAAA,CAAA,EAAA,GAAA,QAAA,CAAA,aAAA,CAAA,KAAA,CAAA,MAAA,CAAA,KAAA,IAAA,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA;AACA,QAAA,IAAA,CAAA,EAAA,CAAA,KAAA,EAAA;AAAA,UACAC,gBAAA,CAAA,cAAA,EAAA,CAAA,uBAAA,EAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA;AACA,SAAA;AAAA,QACA,SAAA,CAAA,KAAA,GAAA,EAAA,CAAA,KAAA,CAAA;AAAA,OACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"backtop2.js","sources":["../../../../../../packages/components/backtop/src/backtop.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const backtopProps = {\n visibilityHeight: {\n type: Number,\n default: 200,\n },\n target: {\n type: String,\n default: '',\n },\n right: {\n type: Number,\n default: 40,\n },\n bottom: {\n type: Number,\n default: 40,\n },\n} as const\nexport type BacktopProps = ExtractPropTypes<typeof backtopProps>\n"],"names":[],"mappings":";;;;AAAY,MAAC,YAAY,GAAG;AAC5B,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH;;;;"}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
6
  var breadcrumb$1 = require('./src/breadcrumb.js');
7
- var breadcrumbItem$1 = require('./src/breadcrumb-item2.js');
7
+ var breadcrumbItem$1 = require('./src/breadcrumb-item.js');
8
8
  var breadcrumb = require('./src/breadcrumb2.js');
9
- var breadcrumbItem = require('./src/breadcrumb-item.js');
9
+ var breadcrumbItem = require('./src/breadcrumb-item2.js');
10
10
  var install = require('../../utils/vue/install.js');
11
11
 
12
12
  const PsBreadcrumb = install.withInstall(breadcrumb$1["default"], {
@@ -2,19 +2,54 @@
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
+ var index$1 = require('../../icon/index.js');
7
+ require('../../../tokens/index.js');
8
+ require('../../../hooks/index.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var breadcrumb = require('../../../tokens/breadcrumb.js');
11
+ var index = require('../../../hooks/use-namespace/index.js');
7
12
 
8
- const breadcrumbItemProps = props.buildProps({
9
- to: {
10
- type: props.definePropType([String, Object]),
11
- default: ""
12
- },
13
- replace: {
14
- type: Boolean,
15
- default: false
13
+ const __default__ = {
14
+ name: "PsBreadcrumbItem"
15
+ };
16
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
+ ...__default__,
18
+ setup(__props) {
19
+ const breadcrumbInjection = vue.inject(breadcrumb.breadcrumbKey, {});
20
+ const ns = index.useNamespace("breadcrumb");
21
+ const { separator, separatorIcon } = breadcrumbInjection;
22
+ const link = vue.ref();
23
+ return (_ctx, _cache) => {
24
+ return vue.openBlock(), vue.createElementBlock("span", {
25
+ class: vue.normalizeClass(vue.unref(ns).e("item"))
26
+ }, [
27
+ vue.createElementVNode("span", {
28
+ ref_key: "link",
29
+ ref: link,
30
+ class: vue.normalizeClass([vue.unref(ns).e("inner"), vue.unref(ns).is("link", !!_ctx.to)]),
31
+ role: "link"
32
+ }, [
33
+ vue.renderSlot(_ctx.$slots, "default")
34
+ ], 2),
35
+ vue.unref(separatorIcon) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.PsIcon), {
36
+ key: 0,
37
+ class: vue.normalizeClass(vue.unref(ns).e("separator"))
38
+ }, {
39
+ default: vue.withCtx(() => [
40
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(separatorIcon))))
41
+ ]),
42
+ _: 1
43
+ }, 8, ["class"])) : (vue.openBlock(), vue.createElementBlock("span", {
44
+ key: 1,
45
+ class: vue.normalizeClass(vue.unref(ns).e("separator")),
46
+ role: "presentation"
47
+ }, vue.toDisplayString(vue.unref(separator)), 3))
48
+ ], 2);
49
+ };
16
50
  }
17
51
  });
52
+ var BreadcrumbItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
18
53
 
19
- exports.breadcrumbItemProps = breadcrumbItemProps;
54
+ exports["default"] = BreadcrumbItem;
20
55
  //# sourceMappingURL=breadcrumb-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type BreadcrumbItem from './breadcrumb-item.vue'\n\nexport const breadcrumbItemProps = buildProps({\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n\nexport type BreadcrumbItemInstance = InstanceType<typeof BreadcrumbItem>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,mBAAmB,GAAGA,gBAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAEC,oBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"breadcrumb-item.js","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n >\n <slot />\n </span>\n <ps-icon v-if=\"separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"separatorIcon\" />\n </ps-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport PsIcon from '@element-ps/components/icon'\nimport { breadcrumbKey } from '@element-ps/tokens'\nimport { useNamespace } from '@element-ps/hooks'\nimport type { BreadcrumbProps } from './breadcrumb'\n\ndefineOptions({\n name: 'PsBreadcrumbItem',\n})\n\nconst breadcrumbInjection = inject(breadcrumbKey, {} as BreadcrumbProps)!\n\nconst ns = useNamespace('breadcrumb')\n\nconst { separator, separatorIcon } = breadcrumbInjection\n\nconst link = ref<HTMLSpanElement>()\n</script>\n"],"names":["inject","breadcrumbKey","useNamespace","ref"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,IAAA,MAAA,mBAAA,GAAAA,UAAA,CAAAC,wBAAA,EAAA,EAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAAC,mBAAA,YAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,WAAA,aAAA,EAAA,GAAA,mBAAA,CAAA;AAEA,IAAA,MAAA,OAAAC,OAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}