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
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Alert from './src/alert.mjs';
3
- export { alertEffects, alertProps } from './src/alert2.mjs';
2
+ import Alert from './src/alert2.mjs';
3
+ export { alertEffects, alertProps } from './src/alert.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const PsAlert = withInstall(Alert);
@@ -1,89 +1,39 @@
1
- import { defineComponent, useSlots, ref, computed, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, resolveDynamicComponent, createCommentVNode, createElementBlock, renderSlot, createTextVNode, toDisplayString, Fragment, createVNode, vShow } from 'vue';
2
- import { PsIcon } from '../../icon/index.mjs';
3
1
  import '../../../utils/index.mjs';
4
- import '../../../hooks/index.mjs';
5
- import { alertProps } from './alert2.mjs';
6
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
- import { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
2
+ import { buildProps } from '../../../utils/vue/props.mjs';
3
+ import { keysOf } from '../../../utils/objects.mjs';
4
+ import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
9
5
 
10
- const __default__ = {
11
- name: "PsAlert"
12
- };
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- ...__default__,
15
- props: alertProps,
16
- setup(__props) {
17
- const props = __props;
18
- const { Close } = TypeComponents;
19
- const slots = useSlots();
20
- const ns = useNamespace("alert");
21
- const visible = ref(true);
22
- const iconComponent = computed(() => TypeComponentsMap[props.type] || TypeComponentsMap["info"]);
23
- const isBigIcon = computed(() => props.description || { [ns.is("big")]: slots.default });
24
- const isBoldTitle = computed(() => props.description || { [ns.is("bold")]: slots.default });
25
- return (_ctx, _cache) => {
26
- return openBlock(), createBlock(Transition, {
27
- name: unref(ns).b("fade")
28
- }, {
29
- default: withCtx(() => [
30
- withDirectives(createElementVNode("div", {
31
- class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
32
- role: "alert"
33
- }, [
34
- _ctx.showIcon && unref(iconComponent) ? (openBlock(), createBlock(unref(PsIcon), {
35
- key: 0,
36
- class: normalizeClass([unref(ns).e("icon"), unref(isBigIcon)])
37
- }, {
38
- default: withCtx(() => [
39
- (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
40
- ]),
41
- _: 1
42
- }, 8, ["class"])) : createCommentVNode("v-if", true),
43
- createElementVNode("div", {
44
- class: normalizeClass(unref(ns).e("content"))
45
- }, [
46
- _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
47
- key: 0,
48
- class: normalizeClass([unref(ns).e("title"), unref(isBoldTitle)])
49
- }, [
50
- renderSlot(_ctx.$slots, "title", {}, () => [
51
- createTextVNode(toDisplayString(_ctx.title), 1)
52
- ])
53
- ], 2)) : createCommentVNode("v-if", true),
54
- _ctx.$slots.default || _ctx.description ? (openBlock(), createElementBlock("p", {
55
- key: 1,
56
- class: normalizeClass(unref(ns).e("description"))
57
- }, [
58
- renderSlot(_ctx.$slots, "default", {}, () => [
59
- createTextVNode(toDisplayString(_ctx.description), 1)
60
- ])
61
- ], 2)) : createCommentVNode("v-if", true),
62
- _ctx.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
63
- _ctx.closeText ? (openBlock(), createElementBlock("div", {
64
- key: 0,
65
- class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")])
66
- }, toDisplayString(_ctx.closeText), 3)) : (openBlock(), createBlock(unref(PsIcon), {
67
- key: 1,
68
- class: normalizeClass(unref(ns).e("close-btn"))
69
- }, {
70
- default: withCtx(() => [
71
- createVNode(unref(Close))
72
- ]),
73
- _: 1
74
- }, 8, ["class"]))
75
- ], 2112)) : createCommentVNode("v-if", true)
76
- ], 2)
77
- ], 2), [
78
- [vShow, visible.value]
79
- ])
80
- ]),
81
- _: 3
82
- }, 8, ["name"]);
83
- };
6
+ const alertEffects = ["light", "dark"];
7
+ const alertProps = buildProps({
8
+ title: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ description: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ type: {
17
+ type: String,
18
+ values: keysOf(TypeComponentsMap),
19
+ default: "info"
20
+ },
21
+ closable: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ closeText: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ showIcon: Boolean,
30
+ center: Boolean,
31
+ effect: {
32
+ type: String,
33
+ values: alertEffects,
34
+ default: "light"
84
35
  }
85
36
  });
86
- var Alert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/alert/src/alert.vue"]]);
87
37
 
88
- export { Alert as default };
38
+ export { alertEffects, alertProps };
89
39
  //# sourceMappingURL=alert.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;AA+CA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAA,cAAA,CAAA;AAOA,IAAA,MAAA,QAAA,QAAA,EAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,OAAA,CAAA,CAAA;AAGA,IAAA,MAAA,OAAA,GAAA,IAAA,IAAA,CAAA,CAAA;AAGA,IAAA,MAAA,gBAAA,QACA,CAAA,MAAA,kBAAA,KAAA,CAAA,IAAA,CAAA,IAAA,kBAAA,MACA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAA,QAAA,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,GAAA,QAAA,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.mjs","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":[],"mappings":";;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAG,UAAU,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,EAAE,MAAM,CAAC,iBAAiB,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,39 +1,89 @@
1
+ import { defineComponent, useSlots, ref, computed, openBlock, createBlock, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, resolveDynamicComponent, createCommentVNode, createElementBlock, renderSlot, createTextVNode, toDisplayString, Fragment, createVNode, vShow } from 'vue';
2
+ import { PsIcon } from '../../icon/index.mjs';
1
3
  import '../../../utils/index.mjs';
2
- import { buildProps } from '../../../utils/vue/props.mjs';
3
- import { keysOf } from '../../../utils/objects.mjs';
4
- import { TypeComponentsMap } from '../../../utils/vue/icon.mjs';
4
+ import '../../../hooks/index.mjs';
5
+ import { alertProps } from './alert.mjs';
6
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
7
+ import { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';
8
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
5
9
 
6
- const alertEffects = ["light", "dark"];
7
- const alertProps = buildProps({
8
- title: {
9
- type: String,
10
- default: ""
11
- },
12
- description: {
13
- type: String,
14
- default: ""
15
- },
16
- type: {
17
- type: String,
18
- values: keysOf(TypeComponentsMap),
19
- default: "info"
20
- },
21
- closable: {
22
- type: Boolean,
23
- default: true
24
- },
25
- closeText: {
26
- type: String,
27
- default: ""
28
- },
29
- showIcon: Boolean,
30
- center: Boolean,
31
- effect: {
32
- type: String,
33
- values: alertEffects,
34
- default: "light"
10
+ const __default__ = {
11
+ name: "PsAlert"
12
+ };
13
+ const _sfc_main = /* @__PURE__ */ defineComponent({
14
+ ...__default__,
15
+ props: alertProps,
16
+ setup(__props) {
17
+ const props = __props;
18
+ const { Close } = TypeComponents;
19
+ const slots = useSlots();
20
+ const ns = useNamespace("alert");
21
+ const visible = ref(true);
22
+ const iconComponent = computed(() => TypeComponentsMap[props.type] || TypeComponentsMap["info"]);
23
+ const isBigIcon = computed(() => props.description || { [ns.is("big")]: slots.default });
24
+ const isBoldTitle = computed(() => props.description || { [ns.is("bold")]: slots.default });
25
+ return (_ctx, _cache) => {
26
+ return openBlock(), createBlock(Transition, {
27
+ name: unref(ns).b("fade")
28
+ }, {
29
+ default: withCtx(() => [
30
+ withDirectives(createElementVNode("div", {
31
+ class: normalizeClass([unref(ns).b(), unref(ns).m(_ctx.type), unref(ns).is("center", _ctx.center), unref(ns).is(_ctx.effect)]),
32
+ role: "alert"
33
+ }, [
34
+ _ctx.showIcon && unref(iconComponent) ? (openBlock(), createBlock(unref(PsIcon), {
35
+ key: 0,
36
+ class: normalizeClass([unref(ns).e("icon"), unref(isBigIcon)])
37
+ }, {
38
+ default: withCtx(() => [
39
+ (openBlock(), createBlock(resolveDynamicComponent(unref(iconComponent))))
40
+ ]),
41
+ _: 1
42
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
43
+ createElementVNode("div", {
44
+ class: normalizeClass(unref(ns).e("content"))
45
+ }, [
46
+ _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("span", {
47
+ key: 0,
48
+ class: normalizeClass([unref(ns).e("title"), unref(isBoldTitle)])
49
+ }, [
50
+ renderSlot(_ctx.$slots, "title", {}, () => [
51
+ createTextVNode(toDisplayString(_ctx.title), 1)
52
+ ])
53
+ ], 2)) : createCommentVNode("v-if", true),
54
+ _ctx.$slots.default || _ctx.description ? (openBlock(), createElementBlock("p", {
55
+ key: 1,
56
+ class: normalizeClass(unref(ns).e("description"))
57
+ }, [
58
+ renderSlot(_ctx.$slots, "default", {}, () => [
59
+ createTextVNode(toDisplayString(_ctx.description), 1)
60
+ ])
61
+ ], 2)) : createCommentVNode("v-if", true),
62
+ _ctx.closable ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
63
+ _ctx.closeText ? (openBlock(), createElementBlock("div", {
64
+ key: 0,
65
+ class: normalizeClass([unref(ns).e("close-btn"), unref(ns).is("customed")])
66
+ }, toDisplayString(_ctx.closeText), 3)) : (openBlock(), createBlock(unref(PsIcon), {
67
+ key: 1,
68
+ class: normalizeClass(unref(ns).e("close-btn"))
69
+ }, {
70
+ default: withCtx(() => [
71
+ createVNode(unref(Close))
72
+ ]),
73
+ _: 1
74
+ }, 8, ["class"]))
75
+ ], 2112)) : createCommentVNode("v-if", true)
76
+ ], 2)
77
+ ], 2), [
78
+ [vShow, visible.value]
79
+ ])
80
+ ]),
81
+ _: 3
82
+ }, 8, ["name"]);
83
+ };
35
84
  }
36
85
  });
86
+ var Alert = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/alert/src/alert.vue"]]);
37
87
 
38
- export { alertEffects, alertProps };
88
+ export { Alert as default };
39
89
  //# sourceMappingURL=alert2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert2.mjs","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":[],"mappings":";;;;;AACY,MAAC,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE;AAClC,MAAC,UAAU,GAAG,UAAU,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,EAAE,MAAM,CAAC,iBAAiB,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.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;AA+CA,IAAA,MAAA,EAAA,KAAA,EAAA,GAAA,cAAA,CAAA;AAOA,IAAA,MAAA,QAAA,QAAA,EAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,OAAA,CAAA,CAAA;AAGA,IAAA,MAAA,OAAA,GAAA,IAAA,IAAA,CAAA,CAAA;AAGA,IAAA,MAAA,gBAAA,QACA,CAAA,MAAA,kBAAA,KAAA,CAAA,IAAA,CAAA,IAAA,kBAAA,MACA,CAAA,CAAA,CAAA;AACA,IAAA,MAAA,SAAA,GAAA,QAAA,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,GAAA,QAAA,CACA,MAAA,KAAA,CAAA,WAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,MAAA,CAAA,GAAA,KAAA,CAAA,OAAA,EACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Backtop from './src/backtop2.mjs';
3
- export { backtopProps } from './src/backtop.mjs';
2
+ import Backtop from './src/backtop.mjs';
3
+ export { backtopProps } from './src/backtop2.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const PsBacktop = withInstall(Backtop);
@@ -1,21 +1,62 @@
1
- const backtopProps = {
2
- visibilityHeight: {
3
- type: Number,
4
- default: 200
5
- },
6
- target: {
7
- type: String,
8
- default: ""
9
- },
10
- right: {
11
- type: Number,
12
- default: 40
13
- },
14
- bottom: {
15
- type: Number,
16
- default: 40
17
- }
1
+ import { defineComponent, shallowRef, ref, computed, onMounted, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, renderSlot, createVNode, withCtx } from 'vue';
2
+ import { PsIcon } from '../../icon/index.mjs';
3
+ import '../../../utils/index.mjs';
4
+ import { CaretTop } from '@element-plus/icons-vue';
5
+ import '../../../hooks/index.mjs';
6
+ import { backtopProps } from './backtop2.mjs';
7
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
+ import { throwError } from '../../../utils/error.mjs';
10
+
11
+ const __default__ = {
12
+ name: "PsBacktop"
18
13
  };
14
+ const _sfc_main = /* @__PURE__ */ defineComponent({
15
+ ...__default__,
16
+ props: backtopProps,
17
+ setup(__props) {
18
+ const props = __props;
19
+ const COMPONENT_NAME = "PsBacktop";
20
+ const ns = useNamespace("backtop");
21
+ const el = shallowRef();
22
+ const container = shallowRef();
23
+ const visible = ref(false);
24
+ const backTopStyle = computed(() => ({
25
+ right: `${props.right}px`,
26
+ bottom: `${props.bottom}px`
27
+ }));
28
+ onMounted(() => {
29
+ var _a;
30
+ container.value = document;
31
+ el.value = document.documentElement;
32
+ if (props.target) {
33
+ el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
34
+ if (!el.value) {
35
+ throwError(COMPONENT_NAME, `target is not existed: ${props.target}`);
36
+ }
37
+ container.value = el.value;
38
+ }
39
+ });
40
+ return (_ctx, _cache) => {
41
+ return openBlock(), createElementBlock("div", {
42
+ style: normalizeStyle(unref(backTopStyle)),
43
+ class: normalizeClass(unref(ns).b())
44
+ }, [
45
+ renderSlot(_ctx.$slots, "default", {}, () => [
46
+ createVNode(unref(PsIcon), {
47
+ class: normalizeClass(unref(ns).e("icon"))
48
+ }, {
49
+ default: withCtx(() => [
50
+ createVNode(unref(CaretTop))
51
+ ]),
52
+ _: 1
53
+ }, 8, ["class"])
54
+ ])
55
+ ], 6);
56
+ };
57
+ }
58
+ });
59
+ var Backtop = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/backtop/src/backtop.vue"]]);
19
60
 
20
- export { backtopProps };
61
+ export { Backtop as default };
21
62
  //# sourceMappingURL=backtop.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"backtop.mjs","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.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AAQA,IAAA,MAAA,EAAA,GAAA,aAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAA,UAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAA,UAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAA,IAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAA,SAAA,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,IAAA,SAAA,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,UACA,UAAA,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,62 +1,21 @@
1
- import { defineComponent, shallowRef, ref, computed, onMounted, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, renderSlot, createVNode, withCtx } from 'vue';
2
- import { PsIcon } from '../../icon/index.mjs';
3
- import '../../../utils/index.mjs';
4
- import { CaretTop } from '@element-plus/icons-vue';
5
- import '../../../hooks/index.mjs';
6
- import { backtopProps } from './backtop.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
- import { throwError } from '../../../utils/error.mjs';
10
-
11
- const __default__ = {
12
- name: "PsBacktop"
13
- };
14
- const _sfc_main = /* @__PURE__ */ defineComponent({
15
- ...__default__,
16
- props: backtopProps,
17
- setup(__props) {
18
- const props = __props;
19
- const COMPONENT_NAME = "PsBacktop";
20
- const ns = useNamespace("backtop");
21
- const el = shallowRef();
22
- const container = shallowRef();
23
- const visible = ref(false);
24
- const backTopStyle = computed(() => ({
25
- right: `${props.right}px`,
26
- bottom: `${props.bottom}px`
27
- }));
28
- onMounted(() => {
29
- var _a;
30
- container.value = document;
31
- el.value = document.documentElement;
32
- if (props.target) {
33
- el.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
34
- if (!el.value) {
35
- throwError(COMPONENT_NAME, `target is not existed: ${props.target}`);
36
- }
37
- container.value = el.value;
38
- }
39
- });
40
- return (_ctx, _cache) => {
41
- return openBlock(), createElementBlock("div", {
42
- style: normalizeStyle(unref(backTopStyle)),
43
- class: normalizeClass(unref(ns).b())
44
- }, [
45
- renderSlot(_ctx.$slots, "default", {}, () => [
46
- createVNode(unref(PsIcon), {
47
- class: normalizeClass(unref(ns).e("icon"))
48
- }, {
49
- default: withCtx(() => [
50
- createVNode(unref(CaretTop))
51
- ]),
52
- _: 1
53
- }, 8, ["class"])
54
- ])
55
- ], 6);
56
- };
1
+ const backtopProps = {
2
+ visibilityHeight: {
3
+ type: Number,
4
+ default: 200
5
+ },
6
+ target: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ right: {
11
+ type: Number,
12
+ default: 40
13
+ },
14
+ bottom: {
15
+ type: Number,
16
+ default: 40
57
17
  }
58
- });
59
- var Backtop = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/backtop/src/backtop.vue"]]);
18
+ };
60
19
 
61
- export { Backtop as default };
20
+ export { backtopProps };
62
21
  //# sourceMappingURL=backtop2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"backtop2.mjs","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":[],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,cAAA,GAAA,WAAA,CAAA;AAQA,IAAA,MAAA,EAAA,GAAA,aAAA,SAAA,CAAA,CAAA;AACA,IAAA,MAAA,KAAA,UAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAA,UAAA,EAAA,CAAA;AACA,IAAA,MAAA,OAAA,GAAA,IAAA,KAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAA,SAAA,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,IAAA,SAAA,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,UACA,UAAA,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.mjs","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,8 +1,8 @@
1
1
  import '../../utils/index.mjs';
2
2
  import Breadcrumb from './src/breadcrumb.mjs';
3
- import BreadcrumbItem from './src/breadcrumb-item2.mjs';
3
+ import BreadcrumbItem from './src/breadcrumb-item.mjs';
4
4
  export { breadcrumbProps } from './src/breadcrumb2.mjs';
5
- export { breadcrumbItemProps } from './src/breadcrumb-item.mjs';
5
+ export { breadcrumbItemProps } from './src/breadcrumb-item2.mjs';
6
6
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
7
7
 
8
8
  const PsBreadcrumb = withInstall(Breadcrumb, {
@@ -1,16 +1,51 @@
1
- import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
1
+ import { defineComponent, inject, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, toDisplayString } from 'vue';
2
+ import { PsIcon } from '../../icon/index.mjs';
3
+ import '../../../tokens/index.mjs';
4
+ import '../../../hooks/index.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { breadcrumbKey } from '../../../tokens/breadcrumb.mjs';
7
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
8
 
4
- const breadcrumbItemProps = buildProps({
5
- to: {
6
- type: definePropType([String, Object]),
7
- default: ""
8
- },
9
- replace: {
10
- type: Boolean,
11
- default: false
9
+ const __default__ = {
10
+ name: "PsBreadcrumbItem"
11
+ };
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ setup(__props) {
15
+ const breadcrumbInjection = inject(breadcrumbKey, {});
16
+ const ns = useNamespace("breadcrumb");
17
+ const { separator, separatorIcon } = breadcrumbInjection;
18
+ const link = ref();
19
+ return (_ctx, _cache) => {
20
+ return openBlock(), createElementBlock("span", {
21
+ class: normalizeClass(unref(ns).e("item"))
22
+ }, [
23
+ createElementVNode("span", {
24
+ ref_key: "link",
25
+ ref: link,
26
+ class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
27
+ role: "link"
28
+ }, [
29
+ renderSlot(_ctx.$slots, "default")
30
+ ], 2),
31
+ unref(separatorIcon) ? (openBlock(), createBlock(unref(PsIcon), {
32
+ key: 0,
33
+ class: normalizeClass(unref(ns).e("separator"))
34
+ }, {
35
+ default: withCtx(() => [
36
+ (openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon))))
37
+ ]),
38
+ _: 1
39
+ }, 8, ["class"])) : (openBlock(), createElementBlock("span", {
40
+ key: 1,
41
+ class: normalizeClass(unref(ns).e("separator")),
42
+ role: "presentation"
43
+ }, toDisplayString(unref(separator)), 3))
44
+ ], 2);
45
+ };
12
46
  }
13
47
  });
48
+ var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
14
49
 
15
- export { breadcrumbItemProps };
50
+ export { BreadcrumbItem as default };
16
51
  //# sourceMappingURL=breadcrumb-item.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item.mjs","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":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,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.mjs","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":[],"mappings":";;;;;;;;;;;;;;AA6BA,IAAA,MAAA,mBAAA,GAAA,MAAA,CAAA,aAAA,EAAA,EAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,YAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,WAAA,aAAA,EAAA,GAAA,mBAAA,CAAA;AAEA,IAAA,MAAA,OAAA,GAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}