element-pe 2.2.67 → 2.2.69

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 (488) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +64 -54
  3. package/dist/index.full.min.js +2 -2
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +2 -2
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +64 -54
  8. package/es/components/affix/index.mjs +2 -2
  9. package/es/components/affix/src/affix.mjs +119 -26
  10. package/es/components/affix/src/affix.mjs.map +1 -1
  11. package/es/components/affix/src/affix2.mjs +26 -119
  12. package/es/components/affix/src/affix2.mjs.map +1 -1
  13. package/es/components/autocomplete/index.mjs +2 -2
  14. package/es/components/autocomplete/src/autocomplete.mjs +99 -379
  15. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  16. package/es/components/autocomplete/src/autocomplete2.mjs +379 -99
  17. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  18. package/es/components/avatar/index.mjs +2 -2
  19. package/es/components/avatar/src/avatar.mjs +35 -76
  20. package/es/components/avatar/src/avatar.mjs.map +1 -1
  21. package/es/components/avatar/src/avatar2.mjs +76 -35
  22. package/es/components/avatar/src/avatar2.mjs.map +1 -1
  23. package/es/components/backtop/index.mjs +2 -2
  24. package/es/components/backtop/src/backtop.mjs +61 -23
  25. package/es/components/backtop/src/backtop.mjs.map +1 -1
  26. package/es/components/backtop/src/backtop2.mjs +23 -61
  27. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  28. package/es/components/breadcrumb/index.mjs +2 -2
  29. package/es/components/breadcrumb/src/breadcrumb.mjs +11 -36
  30. package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
  31. package/es/components/breadcrumb/src/breadcrumb2.mjs +36 -11
  32. package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
  33. package/es/components/calendar/index.mjs +2 -2
  34. package/es/components/calendar/src/calendar.mjs +131 -18
  35. package/es/components/calendar/src/calendar.mjs.map +1 -1
  36. package/es/components/calendar/src/calendar2.mjs +18 -131
  37. package/es/components/calendar/src/calendar2.mjs.map +1 -1
  38. package/es/components/calendar/src/date-table.mjs +87 -33
  39. package/es/components/calendar/src/date-table.mjs.map +1 -1
  40. package/es/components/calendar/src/date-table2.mjs +33 -87
  41. package/es/components/calendar/src/date-table2.mjs.map +1 -1
  42. package/es/components/calendar/src/use-date-table.mjs +1 -1
  43. package/es/components/card/index.mjs +2 -2
  44. package/es/components/card/src/card.mjs +35 -16
  45. package/es/components/card/src/card.mjs.map +1 -1
  46. package/es/components/card/src/card2.mjs +16 -35
  47. package/es/components/card/src/card2.mjs.map +1 -1
  48. package/es/components/carousel/index.mjs +4 -4
  49. package/es/components/carousel/src/carousel-item.mjs +69 -8
  50. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  51. package/es/components/carousel/src/carousel-item2.mjs +8 -69
  52. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  53. package/es/components/carousel/src/carousel.mjs +56 -169
  54. package/es/components/carousel/src/carousel.mjs.map +1 -1
  55. package/es/components/carousel/src/carousel2.mjs +169 -56
  56. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  57. package/es/components/cascader/src/cascader.mjs +0 -1
  58. package/es/components/cascader/src/cascader.mjs.map +1 -1
  59. package/es/components/cascader-panel/src/index.mjs +1 -1
  60. package/es/components/cascader-panel/src/menu.mjs +1 -1
  61. package/es/components/cascader-panel/src/node.mjs +209 -116
  62. package/es/components/cascader-panel/src/node.mjs.map +1 -1
  63. package/es/components/cascader-panel/src/node2.mjs +116 -209
  64. package/es/components/cascader-panel/src/node2.mjs.map +1 -1
  65. package/es/components/cascader-panel/src/store.mjs +1 -1
  66. package/es/components/collection/index.mjs +1 -1
  67. package/es/components/collection/src/collection.mjs +10 -66
  68. package/es/components/collection/src/collection.mjs.map +1 -1
  69. package/es/components/collection/src/collection2.mjs +66 -10
  70. package/es/components/collection/src/collection2.mjs.map +1 -1
  71. package/es/components/countdown/index.mjs +2 -2
  72. package/es/components/countdown/src/countdown.mjs +76 -23
  73. package/es/components/countdown/src/countdown.mjs.map +1 -1
  74. package/es/components/countdown/src/countdown2.mjs +23 -76
  75. package/es/components/countdown/src/countdown2.mjs.map +1 -1
  76. package/es/components/descriptions/index.mjs +2 -2
  77. package/es/components/descriptions/src/description.mjs +120 -27
  78. package/es/components/descriptions/src/description.mjs.map +1 -1
  79. package/es/components/descriptions/src/description2.mjs +27 -120
  80. package/es/components/descriptions/src/description2.mjs.map +1 -1
  81. package/es/components/descriptions/src/descriptions-row.mjs +64 -7
  82. package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
  83. package/es/components/descriptions/src/descriptions-row2.mjs +7 -64
  84. package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
  85. package/es/components/dialog/index.mjs +2 -2
  86. package/es/components/dialog/src/dialog.mjs +73 -174
  87. package/es/components/dialog/src/dialog.mjs.map +1 -1
  88. package/es/components/dialog/src/dialog2.mjs +174 -73
  89. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  90. package/es/components/drawer/src/drawer.mjs +1 -1
  91. package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
  92. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  93. package/es/components/dropdown/src/dropdown.mjs +1 -1
  94. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  95. package/es/components/form/index.mjs +2 -2
  96. package/es/components/form/src/form.mjs +61 -150
  97. package/es/components/form/src/form.mjs.map +1 -1
  98. package/es/components/form/src/form2.mjs +150 -61
  99. package/es/components/form/src/form2.mjs.map +1 -1
  100. package/es/components/index.mjs +33 -33
  101. package/es/components/link/index.mjs +2 -2
  102. package/es/components/link/src/link.mjs +50 -21
  103. package/es/components/link/src/link.mjs.map +1 -1
  104. package/es/components/link/src/link2.mjs +21 -50
  105. package/es/components/link/src/link2.mjs.map +1 -1
  106. package/es/components/menu/index.mjs +2 -2
  107. package/es/components/menu/src/menu-item.mjs +14 -97
  108. package/es/components/menu/src/menu-item.mjs.map +1 -1
  109. package/es/components/menu/src/menu-item2.mjs +97 -14
  110. package/es/components/menu/src/menu-item2.mjs.map +1 -1
  111. package/es/components/notification/index.mjs +1 -1
  112. package/es/components/notification/src/notification.mjs +67 -151
  113. package/es/components/notification/src/notification.mjs.map +1 -1
  114. package/es/components/notification/src/notification2.mjs +151 -67
  115. package/es/components/notification/src/notification2.mjs.map +1 -1
  116. package/es/components/notification/src/notify.mjs +2 -2
  117. package/es/components/pagination/src/components/jumper.mjs +9 -60
  118. package/es/components/pagination/src/components/jumper.mjs.map +1 -1
  119. package/es/components/pagination/src/components/jumper2.mjs +60 -9
  120. package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
  121. package/es/components/pagination/src/components/sizes.mjs +22 -70
  122. package/es/components/pagination/src/components/sizes.mjs.map +1 -1
  123. package/es/components/pagination/src/components/sizes2.mjs +70 -22
  124. package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
  125. package/es/components/pagination/src/pagination.mjs +2 -2
  126. package/es/components/popover/index.mjs +2 -2
  127. package/es/components/popover/src/popover.mjs +111 -66
  128. package/es/components/popover/src/popover.mjs.map +1 -1
  129. package/es/components/popover/src/popover2.mjs +66 -111
  130. package/es/components/popover/src/popover2.mjs.map +1 -1
  131. package/es/components/popper/index.mjs +2 -2
  132. package/es/components/popper/src/arrow.mjs +39 -8
  133. package/es/components/popper/src/arrow.mjs.map +1 -1
  134. package/es/components/popper/src/arrow2.mjs +8 -39
  135. package/es/components/popper/src/arrow2.mjs.map +1 -1
  136. package/es/components/progress/index.mjs +2 -2
  137. package/es/components/progress/src/progress.mjs +204 -59
  138. package/es/components/progress/src/progress.mjs.map +1 -1
  139. package/es/components/progress/src/progress2.mjs +59 -204
  140. package/es/components/progress/src/progress2.mjs.map +1 -1
  141. package/es/components/radio/index.mjs +2 -2
  142. package/es/components/radio/src/radio-button.mjs +1 -1
  143. package/es/components/radio/src/radio-group.mjs +1 -1
  144. package/es/components/radio/src/radio.mjs +74 -35
  145. package/es/components/radio/src/radio.mjs.map +1 -1
  146. package/es/components/radio/src/radio2.mjs +35 -74
  147. package/es/components/radio/src/radio2.mjs.map +1 -1
  148. package/es/components/resizable-columns/index.d.ts +2 -2
  149. package/es/components/resizable-columns/index.mjs +4 -4
  150. package/es/components/resizable-columns/src/constants.d.ts +1 -2
  151. package/es/components/resizable-columns/src/constants.mjs.map +1 -1
  152. package/es/components/resizable-columns/src/resizable-column.mjs +7 -111
  153. package/es/components/resizable-columns/src/resizable-column.mjs.map +1 -1
  154. package/es/components/resizable-columns/src/resizable-column.vue.d.ts +1 -1
  155. package/es/components/resizable-columns/src/resizable-column2.mjs +114 -7
  156. package/es/components/resizable-columns/src/resizable-column2.mjs.map +1 -1
  157. package/es/components/resizable-columns/src/resizable-columns.mjs +237 -12
  158. package/es/components/resizable-columns/src/resizable-columns.mjs.map +1 -1
  159. package/es/components/resizable-columns/src/resizable-columns2.mjs +12 -229
  160. package/es/components/resizable-columns/src/resizable-columns2.mjs.map +1 -1
  161. package/es/components/roving-focus-group/index.mjs +3 -3
  162. package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
  163. package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -29
  164. package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
  165. package/es/components/roving-focus-group/src/roving-focus-group2.mjs +29 -27
  166. package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
  167. package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
  168. package/es/components/row/index.mjs +2 -2
  169. package/es/components/row/src/row.mjs +45 -30
  170. package/es/components/row/src/row.mjs.map +1 -1
  171. package/es/components/row/src/row2.mjs +30 -45
  172. package/es/components/row/src/row2.mjs.map +1 -1
  173. package/es/components/scrollbar/index.mjs +3 -3
  174. package/es/components/scrollbar/src/bar.mjs +1 -1
  175. package/es/components/scrollbar/src/scrollbar.mjs +46 -176
  176. package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
  177. package/es/components/scrollbar/src/scrollbar2.mjs +176 -46
  178. package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
  179. package/es/components/scrollbar/src/thumb.mjs +11 -134
  180. package/es/components/scrollbar/src/thumb.mjs.map +1 -1
  181. package/es/components/scrollbar/src/thumb2.mjs +134 -11
  182. package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
  183. package/es/components/statistic/index.mjs +2 -2
  184. package/es/components/statistic/src/statistic.mjs +70 -25
  185. package/es/components/statistic/src/statistic.mjs.map +1 -1
  186. package/es/components/statistic/src/statistic2.mjs +25 -70
  187. package/es/components/statistic/src/statistic2.mjs.map +1 -1
  188. package/es/components/switch/index.mjs +2 -2
  189. package/es/components/switch/src/switch.mjs +245 -93
  190. package/es/components/switch/src/switch.mjs.map +1 -1
  191. package/es/components/switch/src/switch2.mjs +93 -245
  192. package/es/components/switch/src/switch2.mjs.map +1 -1
  193. package/es/components/tabs/index.mjs +1 -1
  194. package/es/components/tabs/src/tab-bar.mjs +7 -75
  195. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  196. package/es/components/tabs/src/tab-bar2.mjs +75 -7
  197. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  198. package/es/components/tabs/src/tab-nav.mjs +1 -1
  199. package/es/components/teleport/index.mjs +2 -2
  200. package/es/components/teleport/src/teleport.mjs +44 -18
  201. package/es/components/teleport/src/teleport.mjs.map +1 -1
  202. package/es/components/teleport/src/teleport2.mjs +18 -44
  203. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  204. package/es/components/text/index.mjs +2 -2
  205. package/es/components/text/src/text.mjs +22 -35
  206. package/es/components/text/src/text.mjs.map +1 -1
  207. package/es/components/text/src/text2.mjs +35 -22
  208. package/es/components/text/src/text2.mjs.map +1 -1
  209. package/es/components/timeline/index.mjs +2 -2
  210. package/es/components/timeline/src/timeline-item.mjs +72 -42
  211. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  212. package/es/components/timeline/src/timeline-item2.mjs +42 -72
  213. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  214. package/es/components/tooltip/src/tooltip.mjs +1 -1
  215. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  216. package/es/components/tooltip-v2/index.mjs +2 -2
  217. package/es/components/tooltip-v2/src/arrow.mjs +22 -37
  218. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  219. package/es/components/tooltip-v2/src/arrow2.mjs +37 -22
  220. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  221. package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
  222. package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
  223. package/es/components/tooltip-v2/src/trigger.mjs +91 -12
  224. package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
  225. package/es/components/tooltip-v2/src/trigger2.mjs +12 -91
  226. package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
  227. package/es/components/upload/index.mjs +3 -3
  228. package/es/components/upload/src/upload-content.mjs +1 -1
  229. package/es/components/upload/src/upload-content2.mjs +1 -1
  230. package/es/components/upload/src/upload-list.mjs +177 -26
  231. package/es/components/upload/src/upload-list.mjs.map +1 -1
  232. package/es/components/upload/src/upload-list2.mjs +26 -177
  233. package/es/components/upload/src/upload-list2.mjs.map +1 -1
  234. package/es/components/upload/src/upload.mjs +105 -119
  235. package/es/components/upload/src/upload.mjs.map +1 -1
  236. package/es/components/upload/src/upload2.mjs +119 -105
  237. package/es/components/upload/src/upload2.mjs.map +1 -1
  238. package/es/components/upload/src/use-handlers.mjs +1 -1
  239. package/es/index.mjs +33 -33
  240. package/lib/components/affix/index.js +2 -2
  241. package/lib/components/affix/src/affix.js +119 -27
  242. package/lib/components/affix/src/affix.js.map +1 -1
  243. package/lib/components/affix/src/affix2.js +27 -119
  244. package/lib/components/affix/src/affix2.js.map +1 -1
  245. package/lib/components/autocomplete/index.js +2 -2
  246. package/lib/components/autocomplete/src/autocomplete.js +99 -378
  247. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  248. package/lib/components/autocomplete/src/autocomplete2.js +378 -99
  249. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  250. package/lib/components/avatar/index.js +2 -2
  251. package/lib/components/avatar/src/avatar.js +35 -75
  252. package/lib/components/avatar/src/avatar.js.map +1 -1
  253. package/lib/components/avatar/src/avatar2.js +75 -35
  254. package/lib/components/avatar/src/avatar2.js.map +1 -1
  255. package/lib/components/backtop/index.js +2 -2
  256. package/lib/components/backtop/src/backtop.js +61 -24
  257. package/lib/components/backtop/src/backtop.js.map +1 -1
  258. package/lib/components/backtop/src/backtop2.js +24 -61
  259. package/lib/components/backtop/src/backtop2.js.map +1 -1
  260. package/lib/components/breadcrumb/index.js +2 -2
  261. package/lib/components/breadcrumb/src/breadcrumb.js +11 -36
  262. package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
  263. package/lib/components/breadcrumb/src/breadcrumb2.js +36 -11
  264. package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
  265. package/lib/components/calendar/index.js +2 -2
  266. package/lib/components/calendar/src/calendar.js +131 -19
  267. package/lib/components/calendar/src/calendar.js.map +1 -1
  268. package/lib/components/calendar/src/calendar2.js +19 -131
  269. package/lib/components/calendar/src/calendar2.js.map +1 -1
  270. package/lib/components/calendar/src/date-table.js +87 -37
  271. package/lib/components/calendar/src/date-table.js.map +1 -1
  272. package/lib/components/calendar/src/date-table2.js +37 -87
  273. package/lib/components/calendar/src/date-table2.js.map +1 -1
  274. package/lib/components/calendar/src/use-date-table.js +1 -1
  275. package/lib/components/card/index.js +2 -2
  276. package/lib/components/card/src/card.js +35 -16
  277. package/lib/components/card/src/card.js.map +1 -1
  278. package/lib/components/card/src/card2.js +16 -35
  279. package/lib/components/card/src/card2.js.map +1 -1
  280. package/lib/components/carousel/index.js +4 -4
  281. package/lib/components/carousel/src/carousel-item.js +69 -8
  282. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  283. package/lib/components/carousel/src/carousel-item2.js +8 -69
  284. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  285. package/lib/components/carousel/src/carousel.js +57 -169
  286. package/lib/components/carousel/src/carousel.js.map +1 -1
  287. package/lib/components/carousel/src/carousel2.js +169 -57
  288. package/lib/components/carousel/src/carousel2.js.map +1 -1
  289. package/lib/components/cascader/src/cascader.js +0 -1
  290. package/lib/components/cascader/src/cascader.js.map +1 -1
  291. package/lib/components/cascader-panel/src/index.js +1 -1
  292. package/lib/components/cascader-panel/src/menu.js +1 -1
  293. package/lib/components/cascader-panel/src/node.js +209 -116
  294. package/lib/components/cascader-panel/src/node.js.map +1 -1
  295. package/lib/components/cascader-panel/src/node2.js +116 -209
  296. package/lib/components/cascader-panel/src/node2.js.map +1 -1
  297. package/lib/components/cascader-panel/src/store.js +1 -1
  298. package/lib/components/collection/index.js +1 -1
  299. package/lib/components/collection/src/collection.js +9 -66
  300. package/lib/components/collection/src/collection.js.map +1 -1
  301. package/lib/components/collection/src/collection2.js +66 -9
  302. package/lib/components/collection/src/collection2.js.map +1 -1
  303. package/lib/components/countdown/index.js +2 -2
  304. package/lib/components/countdown/src/countdown.js +76 -24
  305. package/lib/components/countdown/src/countdown.js.map +1 -1
  306. package/lib/components/countdown/src/countdown2.js +24 -76
  307. package/lib/components/countdown/src/countdown2.js.map +1 -1
  308. package/lib/components/descriptions/index.js +2 -2
  309. package/lib/components/descriptions/src/description.js +120 -27
  310. package/lib/components/descriptions/src/description.js.map +1 -1
  311. package/lib/components/descriptions/src/description2.js +27 -120
  312. package/lib/components/descriptions/src/description2.js.map +1 -1
  313. package/lib/components/descriptions/src/descriptions-row.js +64 -7
  314. package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
  315. package/lib/components/descriptions/src/descriptions-row2.js +7 -64
  316. package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
  317. package/lib/components/dialog/index.js +2 -2
  318. package/lib/components/dialog/src/dialog.js +74 -174
  319. package/lib/components/dialog/src/dialog.js.map +1 -1
  320. package/lib/components/dialog/src/dialog2.js +174 -74
  321. package/lib/components/dialog/src/dialog2.js.map +1 -1
  322. package/lib/components/drawer/src/drawer.js +1 -1
  323. package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
  324. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  325. package/lib/components/dropdown/src/dropdown.js +1 -1
  326. package/lib/components/dropdown/src/dropdown2.js +1 -1
  327. package/lib/components/form/index.js +2 -2
  328. package/lib/components/form/src/form.js +61 -149
  329. package/lib/components/form/src/form.js.map +1 -1
  330. package/lib/components/form/src/form2.js +149 -61
  331. package/lib/components/form/src/form2.js.map +1 -1
  332. package/lib/components/index.js +33 -33
  333. package/lib/components/link/index.js +2 -2
  334. package/lib/components/link/src/link.js +50 -22
  335. package/lib/components/link/src/link.js.map +1 -1
  336. package/lib/components/link/src/link2.js +22 -50
  337. package/lib/components/link/src/link2.js.map +1 -1
  338. package/lib/components/menu/index.js +2 -2
  339. package/lib/components/menu/src/menu-item.js +15 -97
  340. package/lib/components/menu/src/menu-item.js.map +1 -1
  341. package/lib/components/menu/src/menu-item2.js +97 -15
  342. package/lib/components/menu/src/menu-item2.js.map +1 -1
  343. package/lib/components/notification/index.js +1 -1
  344. package/lib/components/notification/src/notification.js +68 -150
  345. package/lib/components/notification/src/notification.js.map +1 -1
  346. package/lib/components/notification/src/notification2.js +150 -68
  347. package/lib/components/notification/src/notification2.js.map +1 -1
  348. package/lib/components/notification/src/notify.js +2 -2
  349. package/lib/components/pagination/src/components/jumper.js +9 -60
  350. package/lib/components/pagination/src/components/jumper.js.map +1 -1
  351. package/lib/components/pagination/src/components/jumper2.js +60 -9
  352. package/lib/components/pagination/src/components/jumper2.js.map +1 -1
  353. package/lib/components/pagination/src/components/sizes.js +22 -70
  354. package/lib/components/pagination/src/components/sizes.js.map +1 -1
  355. package/lib/components/pagination/src/components/sizes2.js +70 -22
  356. package/lib/components/pagination/src/components/sizes2.js.map +1 -1
  357. package/lib/components/pagination/src/pagination.js +2 -2
  358. package/lib/components/popover/index.js +2 -2
  359. package/lib/components/popover/src/popover.js +111 -67
  360. package/lib/components/popover/src/popover.js.map +1 -1
  361. package/lib/components/popover/src/popover2.js +67 -111
  362. package/lib/components/popover/src/popover2.js.map +1 -1
  363. package/lib/components/popper/index.js +2 -2
  364. package/lib/components/popper/src/arrow.js +39 -9
  365. package/lib/components/popper/src/arrow.js.map +1 -1
  366. package/lib/components/popper/src/arrow2.js +9 -39
  367. package/lib/components/popper/src/arrow2.js.map +1 -1
  368. package/lib/components/progress/index.js +2 -2
  369. package/lib/components/progress/src/progress.js +204 -59
  370. package/lib/components/progress/src/progress.js.map +1 -1
  371. package/lib/components/progress/src/progress2.js +59 -204
  372. package/lib/components/progress/src/progress2.js.map +1 -1
  373. package/lib/components/radio/index.js +2 -2
  374. package/lib/components/radio/src/radio-button.js +1 -1
  375. package/lib/components/radio/src/radio-group.js +1 -1
  376. package/lib/components/radio/src/radio.js +74 -37
  377. package/lib/components/radio/src/radio.js.map +1 -1
  378. package/lib/components/radio/src/radio2.js +37 -74
  379. package/lib/components/radio/src/radio2.js.map +1 -1
  380. package/lib/components/resizable-columns/index.d.ts +2 -2
  381. package/lib/components/resizable-columns/index.js +4 -4
  382. package/lib/components/resizable-columns/src/constants.d.ts +1 -2
  383. package/lib/components/resizable-columns/src/constants.js.map +1 -1
  384. package/lib/components/resizable-columns/src/resizable-column.js +7 -111
  385. package/lib/components/resizable-columns/src/resizable-column.js.map +1 -1
  386. package/lib/components/resizable-columns/src/resizable-column.vue.d.ts +1 -1
  387. package/lib/components/resizable-columns/src/resizable-column2.js +114 -7
  388. package/lib/components/resizable-columns/src/resizable-column2.js.map +1 -1
  389. package/lib/components/resizable-columns/src/resizable-columns.js +237 -12
  390. package/lib/components/resizable-columns/src/resizable-columns.js.map +1 -1
  391. package/lib/components/resizable-columns/src/resizable-columns2.js +12 -229
  392. package/lib/components/resizable-columns/src/resizable-columns2.js.map +1 -1
  393. package/lib/components/roving-focus-group/index.js +2 -2
  394. package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
  395. package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -33
  396. package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
  397. package/lib/components/roving-focus-group/src/roving-focus-group2.js +33 -27
  398. package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
  399. package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
  400. package/lib/components/row/index.js +2 -2
  401. package/lib/components/row/src/row.js +45 -32
  402. package/lib/components/row/src/row.js.map +1 -1
  403. package/lib/components/row/src/row2.js +32 -45
  404. package/lib/components/row/src/row2.js.map +1 -1
  405. package/lib/components/scrollbar/index.js +3 -3
  406. package/lib/components/scrollbar/src/bar.js +1 -1
  407. package/lib/components/scrollbar/src/scrollbar.js +47 -176
  408. package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
  409. package/lib/components/scrollbar/src/scrollbar2.js +176 -47
  410. package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
  411. package/lib/components/scrollbar/src/thumb.js +11 -134
  412. package/lib/components/scrollbar/src/thumb.js.map +1 -1
  413. package/lib/components/scrollbar/src/thumb2.js +134 -11
  414. package/lib/components/scrollbar/src/thumb2.js.map +1 -1
  415. package/lib/components/statistic/index.js +2 -2
  416. package/lib/components/statistic/src/statistic.js +70 -25
  417. package/lib/components/statistic/src/statistic.js.map +1 -1
  418. package/lib/components/statistic/src/statistic2.js +25 -70
  419. package/lib/components/statistic/src/statistic2.js.map +1 -1
  420. package/lib/components/switch/index.js +2 -2
  421. package/lib/components/switch/src/switch.js +244 -93
  422. package/lib/components/switch/src/switch.js.map +1 -1
  423. package/lib/components/switch/src/switch2.js +93 -244
  424. package/lib/components/switch/src/switch2.js.map +1 -1
  425. package/lib/components/tabs/index.js +1 -1
  426. package/lib/components/tabs/src/tab-bar.js +7 -75
  427. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  428. package/lib/components/tabs/src/tab-bar2.js +75 -7
  429. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  430. package/lib/components/tabs/src/tab-nav.js +1 -1
  431. package/lib/components/teleport/index.js +2 -2
  432. package/lib/components/teleport/src/teleport.js +44 -18
  433. package/lib/components/teleport/src/teleport.js.map +1 -1
  434. package/lib/components/teleport/src/teleport2.js +18 -44
  435. package/lib/components/teleport/src/teleport2.js.map +1 -1
  436. package/lib/components/text/index.js +2 -2
  437. package/lib/components/text/src/text.js +22 -35
  438. package/lib/components/text/src/text.js.map +1 -1
  439. package/lib/components/text/src/text2.js +35 -22
  440. package/lib/components/text/src/text2.js.map +1 -1
  441. package/lib/components/timeline/index.js +2 -2
  442. package/lib/components/timeline/src/timeline-item.js +72 -42
  443. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  444. package/lib/components/timeline/src/timeline-item2.js +42 -72
  445. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  446. package/lib/components/tooltip/src/tooltip.js +1 -1
  447. package/lib/components/tooltip/src/tooltip2.js +1 -1
  448. package/lib/components/tooltip-v2/index.js +2 -2
  449. package/lib/components/tooltip-v2/src/arrow.js +23 -37
  450. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  451. package/lib/components/tooltip-v2/src/arrow2.js +37 -23
  452. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  453. package/lib/components/tooltip-v2/src/tooltip.js +2 -2
  454. package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
  455. package/lib/components/tooltip-v2/src/trigger.js +91 -12
  456. package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
  457. package/lib/components/tooltip-v2/src/trigger2.js +12 -91
  458. package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
  459. package/lib/components/upload/index.js +3 -3
  460. package/lib/components/upload/src/upload-content.js +1 -1
  461. package/lib/components/upload/src/upload-content2.js +1 -1
  462. package/lib/components/upload/src/upload-list.js +177 -27
  463. package/lib/components/upload/src/upload-list.js.map +1 -1
  464. package/lib/components/upload/src/upload-list2.js +27 -177
  465. package/lib/components/upload/src/upload-list2.js.map +1 -1
  466. package/lib/components/upload/src/upload.js +108 -119
  467. package/lib/components/upload/src/upload.js.map +1 -1
  468. package/lib/components/upload/src/upload2.js +119 -108
  469. package/lib/components/upload/src/upload2.js.map +1 -1
  470. package/lib/components/upload/src/use-handlers.js +1 -1
  471. package/lib/index.js +33 -33
  472. package/package.json +1 -1
  473. package/theme-chalk/el-checkbox.css +1 -1
  474. package/theme-chalk/el-color-picker.css +1 -1
  475. package/theme-chalk/el-input.css +1 -1
  476. package/theme-chalk/el-radio.css +1 -1
  477. package/theme-chalk/el-rate.css +1 -1
  478. package/theme-chalk/el-select-v2.css +1 -1
  479. package/theme-chalk/el-switch.css +1 -1
  480. package/theme-chalk/index.css +1 -1
  481. package/theme-chalk/src/checkbox.scss +5 -0
  482. package/theme-chalk/src/color-picker.scss +4 -0
  483. package/theme-chalk/src/input.scss +30 -4
  484. package/theme-chalk/src/radio.scss +11 -0
  485. package/theme-chalk/src/rate.scss +1 -0
  486. package/theme-chalk/src/select-v2.scss +1 -0
  487. package/theme-chalk/src/switch.scss +1 -0
  488. package/web-types.json +1 -1
@@ -1,210 +1,65 @@
1
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, normalizeStyle, renderSlot, toDisplayString, createCommentVNode, createBlock, withCtx, resolveDynamicComponent } from 'vue';
2
- import { ElIcon } from '../../icon/index.mjs';
3
- import { WarningFilled, CircleCheck, CircleClose, Check, Close } from '@element-plus/icons-vue';
4
- import '../../../hooks/index.mjs';
5
1
  import '../../../utils/index.mjs';
6
- import { progressProps } from './progress.mjs';
7
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
8
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
9
- import { isString, isFunction } from '@vue/shared';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
10
3
 
11
- const _hoisted_1 = ["aria-valuenow"];
12
- const _hoisted_2 = { viewBox: "0 0 100 100" };
13
- const _hoisted_3 = ["d", "stroke", "stroke-width"];
14
- const _hoisted_4 = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"];
15
- const _hoisted_5 = { key: 0 };
16
- const __default__ = defineComponent({
17
- name: "ElProgress"
18
- });
19
- const _sfc_main = /* @__PURE__ */ defineComponent({
20
- ...__default__,
21
- props: progressProps,
22
- setup(__props) {
23
- const props = __props;
24
- const STATUS_COLOR_MAP = {
25
- success: "#13ce66",
26
- exception: "#ff4949",
27
- warning: "#e6a23c",
28
- default: "#20a0ff"
29
- };
30
- const ns = useNamespace("progress");
31
- const barStyle = computed(() => ({
32
- width: `${props.percentage}%`,
33
- animationDuration: `${props.duration}s`,
34
- backgroundColor: getCurrentColor(props.percentage)
35
- }));
36
- const relativeStrokeWidth = computed(() => (props.strokeWidth / props.width * 100).toFixed(1));
37
- const radius = computed(() => {
38
- if (["circle", "dashboard"].includes(props.type)) {
39
- return Number.parseInt(`${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`, 10);
40
- }
41
- return 0;
42
- });
43
- const trackPath = computed(() => {
44
- const r = radius.value;
45
- const isDashboard = props.type === "dashboard";
46
- return `
47
- M 50 50
48
- m 0 ${isDashboard ? "" : "-"}${r}
49
- a ${r} ${r} 0 1 1 0 ${isDashboard ? "-" : ""}${r * 2}
50
- a ${r} ${r} 0 1 1 0 ${isDashboard ? "" : "-"}${r * 2}
51
- `;
52
- });
53
- const perimeter = computed(() => 2 * Math.PI * radius.value);
54
- const rate = computed(() => props.type === "dashboard" ? 0.75 : 1);
55
- const strokeDashoffset = computed(() => {
56
- const offset = -1 * perimeter.value * (1 - rate.value) / 2;
57
- return `${offset}px`;
58
- });
59
- const trailPathStyle = computed(() => ({
60
- strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,
61
- strokeDashoffset: strokeDashoffset.value
62
- }));
63
- const circlePathStyle = computed(() => ({
64
- strokeDasharray: `${perimeter.value * rate.value * (props.percentage / 100)}px, ${perimeter.value}px`,
65
- strokeDashoffset: strokeDashoffset.value,
66
- transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
67
- }));
68
- const stroke = computed(() => {
69
- let ret;
70
- if (props.color) {
71
- ret = getCurrentColor(props.percentage);
72
- } else {
73
- ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default;
74
- }
75
- return ret;
76
- });
77
- const statusIcon = computed(() => {
78
- if (props.status === "warning") {
79
- return WarningFilled;
80
- }
81
- if (props.type === "line") {
82
- return props.status === "success" ? CircleCheck : CircleClose;
83
- } else {
84
- return props.status === "success" ? Check : Close;
85
- }
86
- });
87
- const progressTextSize = computed(() => {
88
- return props.type === "line" ? 12 + props.strokeWidth * 0.4 : props.width * 0.111111 + 2;
89
- });
90
- const content = computed(() => props.format(props.percentage));
91
- function getColors(color) {
92
- const span = 100 / color.length;
93
- const seriesColors = color.map((seriesColor, index) => {
94
- if (isString(seriesColor)) {
95
- return {
96
- color: seriesColor,
97
- percentage: (index + 1) * span
98
- };
99
- }
100
- return seriesColor;
101
- });
102
- return seriesColors.sort((a, b) => a.percentage - b.percentage);
103
- }
104
- const getCurrentColor = (percentage) => {
105
- var _a;
106
- const { color } = props;
107
- if (isFunction(color)) {
108
- return color(percentage);
109
- } else if (isString(color)) {
110
- return color;
111
- } else {
112
- const colors = getColors(color);
113
- for (const color2 of colors) {
114
- if (color2.percentage > percentage)
115
- return color2.color;
116
- }
117
- return (_a = colors[colors.length - 1]) == null ? void 0 : _a.color;
118
- }
119
- };
120
- return (_ctx, _cache) => {
121
- return openBlock(), createElementBlock("div", {
122
- class: normalizeClass([
123
- unref(ns).b(),
124
- unref(ns).m(_ctx.type),
125
- unref(ns).is(_ctx.status),
126
- {
127
- [unref(ns).m("without-text")]: !_ctx.showText,
128
- [unref(ns).m("text-inside")]: _ctx.textInside
129
- }
130
- ]),
131
- role: "progressbar",
132
- "aria-valuenow": _ctx.percentage,
133
- "aria-valuemin": "0",
134
- "aria-valuemax": "100"
135
- }, [
136
- _ctx.type === "line" ? (openBlock(), createElementBlock("div", {
137
- key: 0,
138
- class: normalizeClass(unref(ns).b("bar"))
139
- }, [
140
- createElementVNode("div", {
141
- class: normalizeClass(unref(ns).be("bar", "outer")),
142
- style: normalizeStyle({ height: `${_ctx.strokeWidth}px` })
143
- }, [
144
- createElementVNode("div", {
145
- class: normalizeClass([
146
- unref(ns).be("bar", "inner"),
147
- { [unref(ns).bem("bar", "inner", "indeterminate")]: _ctx.indeterminate },
148
- { [unref(ns).bem("bar", "inner", "striped")]: _ctx.striped },
149
- { [unref(ns).bem("bar", "inner", "striped-flow")]: _ctx.stripedFlow }
150
- ]),
151
- style: normalizeStyle(unref(barStyle))
152
- }, [
153
- (_ctx.showText || _ctx.$slots.default) && _ctx.textInside ? (openBlock(), createElementBlock("div", {
154
- key: 0,
155
- class: normalizeClass(unref(ns).be("bar", "innerText"))
156
- }, [
157
- renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
158
- createElementVNode("span", null, toDisplayString(unref(content)), 1)
159
- ])
160
- ], 2)) : createCommentVNode("v-if", true)
161
- ], 6)
162
- ], 6)
163
- ], 2)) : (openBlock(), createElementBlock("div", {
164
- key: 1,
165
- class: normalizeClass(unref(ns).b("circle")),
166
- style: normalizeStyle({ height: `${_ctx.width}px`, width: `${_ctx.width}px` })
167
- }, [
168
- (openBlock(), createElementBlock("svg", _hoisted_2, [
169
- createElementVNode("path", {
170
- class: normalizeClass(unref(ns).be("circle", "track")),
171
- d: unref(trackPath),
172
- stroke: `var(${unref(ns).cssVarName("fill-color-light")}, #e5e9f2)`,
173
- "stroke-width": unref(relativeStrokeWidth),
174
- fill: "none",
175
- style: normalizeStyle(unref(trailPathStyle))
176
- }, null, 14, _hoisted_3),
177
- createElementVNode("path", {
178
- class: normalizeClass(unref(ns).be("circle", "path")),
179
- d: unref(trackPath),
180
- stroke: unref(stroke),
181
- fill: "none",
182
- opacity: _ctx.percentage ? 1 : 0,
183
- "stroke-linecap": _ctx.strokeLinecap,
184
- "stroke-width": unref(relativeStrokeWidth),
185
- style: normalizeStyle(unref(circlePathStyle))
186
- }, null, 14, _hoisted_4)
187
- ]))
188
- ], 6)),
189
- (_ctx.showText || _ctx.$slots.default) && !_ctx.textInside ? (openBlock(), createElementBlock("div", {
190
- key: 2,
191
- class: normalizeClass(unref(ns).e("text")),
192
- style: normalizeStyle({ fontSize: `${unref(progressTextSize)}px` })
193
- }, [
194
- renderSlot(_ctx.$slots, "default", { percentage: _ctx.percentage }, () => [
195
- !_ctx.status ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(unref(content)), 1)) : (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
196
- default: withCtx(() => [
197
- (openBlock(), createBlock(resolveDynamicComponent(unref(statusIcon))))
198
- ]),
199
- _: 1
200
- }))
201
- ])
202
- ], 6)) : createCommentVNode("v-if", true)
203
- ], 10, _hoisted_1);
204
- };
4
+ const progressProps = buildProps({
5
+ type: {
6
+ type: String,
7
+ default: "line",
8
+ values: ["line", "circle", "dashboard"]
9
+ },
10
+ percentage: {
11
+ type: Number,
12
+ default: 0,
13
+ validator: (val) => val >= 0 && val <= 100
14
+ },
15
+ status: {
16
+ type: String,
17
+ default: "",
18
+ values: ["", "success", "exception", "warning"]
19
+ },
20
+ indeterminate: {
21
+ type: Boolean,
22
+ default: false
23
+ },
24
+ duration: {
25
+ type: Number,
26
+ default: 3
27
+ },
28
+ strokeWidth: {
29
+ type: Number,
30
+ default: 6
31
+ },
32
+ strokeLinecap: {
33
+ type: definePropType(String),
34
+ default: "round"
35
+ },
36
+ textInside: {
37
+ type: Boolean,
38
+ default: false
39
+ },
40
+ width: {
41
+ type: Number,
42
+ default: 126
43
+ },
44
+ showText: {
45
+ type: Boolean,
46
+ default: true
47
+ },
48
+ color: {
49
+ type: definePropType([
50
+ String,
51
+ Array,
52
+ Function
53
+ ]),
54
+ default: ""
55
+ },
56
+ striped: Boolean,
57
+ stripedFlow: Boolean,
58
+ format: {
59
+ type: definePropType(Function),
60
+ default: (percentage) => `${percentage}%`
205
61
  }
206
62
  });
207
- var Progress = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\progress\\src\\progress.vue"]]);
208
63
 
209
- export { Progress as default };
64
+ export { progressProps };
210
65
  //# sourceMappingURL=progress2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress2.mjs","sources":["../../../../../../packages/components/progress/src/progress.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n ns.b(),\n ns.m(type),\n ns.is(status),\n {\n [ns.m('without-text')]: !showText,\n [ns.m('text-inside')]: textInside,\n },\n ]\"\n role=\"progressbar\"\n :aria-valuenow=\"percentage\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <div v-if=\"type === 'line'\" :class=\"ns.b('bar')\">\n <div\n :class=\"ns.be('bar', 'outer')\"\n :style=\"{ height: `${strokeWidth}px` }\"\n >\n <div\n :class=\"[\n ns.be('bar', 'inner'),\n { [ns.bem('bar', 'inner', 'indeterminate')]: indeterminate },\n { [ns.bem('bar', 'inner', 'striped')]: striped },\n { [ns.bem('bar', 'inner', 'striped-flow')]: stripedFlow },\n ]\"\n :style=\"barStyle\"\n >\n <div\n v-if=\"(showText || $slots.default) && textInside\"\n :class=\"ns.be('bar', 'innerText')\"\n >\n <slot :percentage=\"percentage\">\n <span>{{ content }}</span>\n </slot>\n </div>\n </div>\n </div>\n </div>\n <div\n v-else\n :class=\"ns.b('circle')\"\n :style=\"{ height: `${width}px`, width: `${width}px` }\"\n >\n <svg viewBox=\"0 0 100 100\">\n <path\n :class=\"ns.be('circle', 'track')\"\n :d=\"trackPath\"\n :stroke=\"`var(${ns.cssVarName('fill-color-light')}, #e5e9f2)`\"\n :stroke-width=\"relativeStrokeWidth\"\n fill=\"none\"\n :style=\"trailPathStyle\"\n />\n <path\n :class=\"ns.be('circle', 'path')\"\n :d=\"trackPath\"\n :stroke=\"stroke\"\n fill=\"none\"\n :opacity=\"percentage ? 1 : 0\"\n :stroke-linecap=\"strokeLinecap\"\n :stroke-width=\"relativeStrokeWidth\"\n :style=\"circlePathStyle\"\n />\n </svg>\n </div>\n <div\n v-if=\"(showText || $slots.default) && !textInside\"\n :class=\"ns.e('text')\"\n :style=\"{ fontSize: `${progressTextSize}px` }\"\n >\n <slot :percentage=\"percentage\">\n <span v-if=\"!status\">{{ content }}</span>\n <el-icon v-else><component :is=\"statusIcon\" /></el-icon>\n </slot>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport {\n Check,\n CircleCheck,\n CircleClose,\n Close,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isString } from '@element-plus/utils'\nimport { progressProps } from './progress'\nimport type { CSSProperties } from 'vue'\nimport type { ProgressColor } from './progress'\n\ndefineOptions({\n name: 'ElProgress',\n})\n\nconst STATUS_COLOR_MAP: Record<string, string> = {\n success: '#13ce66',\n exception: '#ff4949',\n warning: '#e6a23c',\n default: '#20a0ff',\n}\n\nconst props = defineProps(progressProps)\n\nconst ns = useNamespace('progress')\n\nconst barStyle = computed<CSSProperties>(() => ({\n width: `${props.percentage}%`,\n animationDuration: `${props.duration}s`,\n backgroundColor: getCurrentColor(props.percentage),\n}))\n\nconst relativeStrokeWidth = computed(() =>\n ((props.strokeWidth / props.width) * 100).toFixed(1)\n)\n\nconst radius = computed(() => {\n if (['circle', 'dashboard'].includes(props.type)) {\n return Number.parseInt(\n `${50 - Number.parseFloat(relativeStrokeWidth.value) / 2}`,\n 10\n )\n }\n return 0\n})\n\nconst trackPath = computed(() => {\n const r = radius.value\n const isDashboard = props.type === 'dashboard'\n return `\n M 50 50\n m 0 ${isDashboard ? '' : '-'}${r}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '-' : ''}${r * 2}\n a ${r} ${r} 0 1 1 0 ${isDashboard ? '' : '-'}${r * 2}\n `\n})\n\nconst perimeter = computed(() => 2 * Math.PI * radius.value)\n\nconst rate = computed(() => (props.type === 'dashboard' ? 0.75 : 1))\n\nconst strokeDashoffset = computed(() => {\n const offset = (-1 * perimeter.value * (1 - rate.value)) / 2\n return `${offset}px`\n})\n\nconst trailPathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${perimeter.value * rate.value}px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n}))\n\nconst circlePathStyle = computed<CSSProperties>(() => ({\n strokeDasharray: `${\n perimeter.value * rate.value * (props.percentage / 100)\n }px, ${perimeter.value}px`,\n strokeDashoffset: strokeDashoffset.value,\n transition:\n 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s',\n}))\n\nconst stroke = computed(() => {\n let ret: string\n if (props.color) {\n ret = getCurrentColor(props.percentage)\n } else {\n ret = STATUS_COLOR_MAP[props.status] || STATUS_COLOR_MAP.default\n }\n return ret\n})\n\nconst statusIcon = computed(() => {\n if (props.status === 'warning') {\n return WarningFilled\n }\n if (props.type === 'line') {\n return props.status === 'success' ? CircleCheck : CircleClose\n } else {\n return props.status === 'success' ? Check : Close\n }\n})\n\nconst progressTextSize = computed(() => {\n return props.type === 'line'\n ? 12 + props.strokeWidth * 0.4\n : props.width * 0.111111 + 2\n})\n\nconst content = computed(() => props.format(props.percentage))\n\nfunction getColors(color: ProgressColor[]) {\n const span = 100 / color.length\n const seriesColors = color.map((seriesColor, index) => {\n if (isString(seriesColor)) {\n return {\n color: seriesColor,\n percentage: (index + 1) * span,\n }\n }\n return seriesColor\n })\n return seriesColors.sort((a, b) => a.percentage - b.percentage)\n}\n\nconst getCurrentColor = (percentage: number) => {\n const { color } = props\n if (isFunction(color)) {\n return color(percentage)\n } else if (isString(color)) {\n return color\n } else {\n const colors = getColors(color)\n for (const color of colors) {\n if (color.percentage > percentage) return color.color\n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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"progress2.mjs","sources":["../../../../../../packages/components/progress/src/progress.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes, SVGAttributes } from 'vue'\nimport type Progress from './progress.vue'\n\nexport type ProgressColor = { color: string; percentage: number }\nexport type ProgressFn = (percentage: number) => string\n\nexport const progressProps = buildProps({\n /**\n * @description type of progress bar\n */\n type: {\n type: String,\n default: 'line',\n values: ['line', 'circle', 'dashboard'],\n },\n /**\n * @description percentage, required\n */\n percentage: {\n type: Number,\n default: 0,\n validator: (val: number): boolean => val >= 0 && val <= 100,\n },\n /**\n * @description the current status of progress bar\n */\n status: {\n type: String,\n default: '',\n values: ['', 'success', 'exception', 'warning'],\n },\n /**\n * @description set indeterminate progress\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * @description control the animation duration of indeterminate progress or striped flow progress\n */\n duration: {\n type: Number,\n default: 3,\n },\n /**\n * @description the width of progress bar\n */\n strokeWidth: {\n type: Number,\n default: 6,\n },\n /**\n * @description butt/circle/dashboard type shape at the end path\n */\n strokeLinecap: {\n type: definePropType<NonNullable<SVGAttributes['stroke-linecap']>>(String),\n default: 'round',\n },\n /**\n * @description whether to place the percentage inside progress bar, only works when `type` is 'line'\n */\n textInside: {\n type: Boolean,\n default: false,\n },\n /**\n * @description the canvas width of circle progress bar\n */\n width: {\n type: Number,\n default: 126,\n },\n /**\n * @description whether to show percentage\n */\n showText: {\n type: Boolean,\n default: true,\n },\n /**\n * @description background color of progress bar. Overrides `status` prop\n */\n color: {\n type: definePropType<string | ProgressColor[] | ProgressFn>([\n String,\n Array,\n Function,\n ]),\n default: '',\n },\n /**\n * @description stripe over the progress bar's color\n */\n striped: Boolean,\n /**\n * @description get the stripes to flow\n */\n stripedFlow: Boolean,\n /**\n * @description custom text format\n */\n format: {\n type: definePropType<ProgressFn>(Function),\n default: (percentage: number): string => `${percentage}%`,\n },\n} as const)\n\nexport type ProgressProps = ExtractPropTypes<typeof progressProps>\nexport type ProgressInstance = InstanceType<typeof Progress>\n"],"names":[],"mappings":";;;AACY,MAAC,aAAa,GAAG,UAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC;AAC3C,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,IAAI,SAAS,EAAE,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG;AAC9C,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,IAAI,MAAM,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC;AACnD,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC;AACzB,MAAM,MAAM;AACZ,MAAM,KAAK;AACX,MAAM,QAAQ;AACd,KAAK,CAAC;AACN,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,CAAC,UAAU,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;AAC7C,GAAG;AACH,CAAC;;;;"}
@@ -1,8 +1,8 @@
1
1
  import '../../utils/index.mjs';
2
- import Radio from './src/radio2.mjs';
2
+ import Radio from './src/radio.mjs';
3
3
  import RadioButton from './src/radio-button2.mjs';
4
4
  import RadioGroup from './src/radio-group2.mjs';
5
- export { radioEmits, radioProps, radioPropsBase } from './src/radio.mjs';
5
+ export { radioEmits, radioProps, radioPropsBase } from './src/radio2.mjs';
6
6
  export { radioGroupEmits, radioGroupProps } from './src/radio-group.mjs';
7
7
  export { radioButtonProps } from './src/radio-button.mjs';
8
8
  export { radioGroupKey } from './src/constants.mjs';
@@ -1,5 +1,5 @@
1
1
  import '../../../utils/index.mjs';
2
- import { radioPropsBase } from './radio.mjs';
2
+ import { radioPropsBase } from './radio2.mjs';
3
3
  import { buildProps } from '../../../utils/vue/props/runtime.mjs';
4
4
 
5
5
  const radioButtonProps = buildProps({
@@ -1,6 +1,6 @@
1
1
  import '../../../utils/index.mjs';
2
2
  import '../../../hooks/index.mjs';
3
- import { radioEmits } from './radio.mjs';
3
+ import { radioEmits } from './radio2.mjs';
4
4
  import '../../../constants/index.mjs';
5
5
  import { buildProps } from '../../../utils/vue/props/runtime.mjs';
6
6
  import { useSizeProp } from '../../../hooks/use-size/index.mjs';
@@ -1,41 +1,80 @@
1
- import '../../../utils/index.mjs';
2
- import '../../../constants/index.mjs';
1
+ import { defineComponent, computed, nextTick, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, withDirectives, isRef, vModelRadio, withModifiers, renderSlot, createTextVNode, toDisplayString } from 'vue';
3
2
  import '../../../hooks/index.mjs';
4
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
5
- import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
- import { viewModes } from '../../../constants/size.mjs';
7
- import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
8
- import { isString } from '@vue/shared';
9
- import { isNumber, isBoolean } from '../../../utils/types.mjs';
3
+ import { radioProps, radioEmits } from './radio2.mjs';
4
+ import { useRadio } from './use-radio.mjs';
5
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
10
7
 
11
- const radioPropsBase = buildProps({
12
- size: useSizeProp,
13
- disabled: Boolean,
14
- viewMode: {
15
- type: String,
16
- values: viewModes
17
- },
18
- label: {
19
- type: [String, Number, Boolean],
20
- default: ""
21
- }
8
+ const _hoisted_1 = ["value", "name", "disabled"];
9
+ const __default__ = defineComponent({
10
+ name: "ElRadio"
22
11
  });
23
- const radioProps = buildProps({
24
- ...radioPropsBase,
25
- modelValue: {
26
- type: [String, Number, Boolean],
27
- default: ""
28
- },
29
- name: {
30
- type: String,
31
- default: ""
32
- },
33
- border: Boolean
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ ...__default__,
14
+ props: radioProps,
15
+ emits: radioEmits,
16
+ setup(__props, { emit }) {
17
+ const props = __props;
18
+ const ns = useNamespace("radio");
19
+ const { radioRef, radioGroup, focus, size, disabled, viewMode, modelValue } = useRadio(props, emit);
20
+ const radioDisabled = computed(() => disabled.value || !!viewMode.value);
21
+ function handleChange() {
22
+ nextTick(() => emit("change", modelValue.value));
23
+ }
24
+ return (_ctx, _cache) => {
25
+ var _a;
26
+ return openBlock(), createElementBlock("label", {
27
+ class: normalizeClass([
28
+ unref(ns).b(),
29
+ unref(ns).is("disabled", unref(disabled)),
30
+ unref(ns).is("view-mode", !!unref(viewMode)),
31
+ unref(ns).is("focus", unref(focus)),
32
+ unref(ns).is("bordered", _ctx.border),
33
+ unref(ns).is("checked", unref(modelValue) === _ctx.label),
34
+ unref(ns).m(unref(size))
35
+ ])
36
+ }, [
37
+ createElementVNode("span", {
38
+ class: normalizeClass([
39
+ unref(ns).e("input"),
40
+ unref(ns).is("disabled", unref(disabled)),
41
+ unref(ns).is("view-mode", !!unref(viewMode)),
42
+ unref(ns).is("checked", unref(modelValue) === _ctx.label)
43
+ ])
44
+ }, [
45
+ withDirectives(createElementVNode("input", {
46
+ ref_key: "radioRef",
47
+ ref: radioRef,
48
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
49
+ class: normalizeClass(unref(ns).e("original")),
50
+ value: _ctx.label,
51
+ name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
52
+ disabled: unref(radioDisabled),
53
+ type: "radio",
54
+ onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
55
+ onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
56
+ onChange: handleChange
57
+ }, null, 42, _hoisted_1), [
58
+ [vModelRadio, unref(modelValue)]
59
+ ]),
60
+ createElementVNode("span", {
61
+ class: normalizeClass(unref(ns).e("inner"))
62
+ }, null, 2)
63
+ ], 2),
64
+ createElementVNode("span", {
65
+ class: normalizeClass(unref(ns).e("label")),
66
+ onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
67
+ }, ["stop"]))
68
+ }, [
69
+ renderSlot(_ctx.$slots, "default", {}, () => [
70
+ createTextVNode(toDisplayString(_ctx.label), 1)
71
+ ])
72
+ ], 34)
73
+ ], 2);
74
+ };
75
+ }
34
76
  });
35
- const radioEmits = {
36
- [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
37
- [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
38
- };
77
+ var Radio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\radio\\src\\radio.vue"]]);
39
78
 
40
- export { radioEmits, radioProps, radioPropsBase };
79
+ export { Radio as default };
41
80
  //# sourceMappingURL=radio.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio.mjs","sources":["../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT, viewModes } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes } from 'vue'\nimport type Radio from './radio.vue'\n\nexport const radioPropsBase = buildProps({\n /**\n * @description size of the Radio\n */\n size: useSizeProp,\n /**\n * @description whether Radio is disabled\n */\n disabled: Boolean,\n /**\n * @description 浏览模式\n */\n viewMode: {\n type: String,\n values: viewModes\n },\n /**\n * @description the value of Radio\n */\n label: {\n type: [String, Number, Boolean],\n default: '',\n },\n})\n\nexport const radioProps = buildProps({\n ...radioPropsBase,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to add a border around Radio\n */\n border: Boolean,\n} as const)\n\nexport const radioEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type RadioProps = ExtractPropTypes<typeof radioProps>\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType<typeof Radio>\n"],"names":[],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,SAAS;AACrB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,GAAG,cAAc;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC3E;;;;"}
1
+ {"version":3,"file":"radio.mjs","sources":["../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b(),\n ns.is('disabled', disabled),\n ns.is('view-mode', !!viewMode),\n ns.is('focus', focus),\n ns.is('bordered', border),\n ns.is('checked', modelValue === label),\n ns.m(size),\n ]\"\n >\n <span\n :class=\"[\n ns.e('input'),\n ns.is('disabled', disabled),\n ns.is('view-mode', !!viewMode),\n ns.is('checked', modelValue === label),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.e('original')\"\n :value=\"label\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"radioDisabled\"\n type=\"radio\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @change=\"handleChange\"\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span :class=\"ns.e('label')\" @keydown.stop>\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { radioEmits, radioProps } from './radio'\nimport { useRadio } from './use-radio'\n\ndefineOptions({\n name: 'ElRadio',\n})\n\nconst props = defineProps(radioProps)\nconst emit = defineEmits(radioEmits)\n\nconst ns = useNamespace('radio')\nconst { radioRef, radioGroup, focus, size, disabled, viewMode, modelValue } = useRadio(\n props,\n emit\n)\n\nconst radioDisabled = computed(() => disabled.value || !!viewMode.value)\n\nfunction handleChange() {\n nextTick(() => emit('change', modelValue.value))\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;mCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,IAAA,EAAM,UAAU,QAAU,EAAA,UAAA,EAAA,GAAe,QAC5E,CAAA,KAAA,EACA,IACF,CAAA,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM,QAAA,CAAS,SAAS,CAAC,CAAC,SAAS,KAAK,CAAA,CAAA;AAEvE,IAAwB,SAAA,YAAA,GAAA;AACtB,MAAA,QAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,UAAA,CAAW,KAAK,CAAC,CAAA,CAAA;AAAA,KACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,80 +1,41 @@
1
- import { defineComponent, computed, nextTick, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, withDirectives, isRef, vModelRadio, withModifiers, renderSlot, createTextVNode, toDisplayString } from 'vue';
1
+ import '../../../utils/index.mjs';
2
+ import '../../../constants/index.mjs';
2
3
  import '../../../hooks/index.mjs';
3
- import { radioProps, radioEmits } from './radio.mjs';
4
- import { useRadio } from './use-radio.mjs';
5
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
6
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
4
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
5
+ import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
+ import { viewModes } from '../../../constants/size.mjs';
7
+ import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
8
+ import { isString } from '@vue/shared';
9
+ import { isNumber, isBoolean } from '../../../utils/types.mjs';
7
10
 
8
- const _hoisted_1 = ["value", "name", "disabled"];
9
- const __default__ = defineComponent({
10
- name: "ElRadio"
11
- });
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- ...__default__,
14
- props: radioProps,
15
- emits: radioEmits,
16
- setup(__props, { emit }) {
17
- const props = __props;
18
- const ns = useNamespace("radio");
19
- const { radioRef, radioGroup, focus, size, disabled, viewMode, modelValue } = useRadio(props, emit);
20
- const radioDisabled = computed(() => disabled.value || !!viewMode.value);
21
- function handleChange() {
22
- nextTick(() => emit("change", modelValue.value));
23
- }
24
- return (_ctx, _cache) => {
25
- var _a;
26
- return openBlock(), createElementBlock("label", {
27
- class: normalizeClass([
28
- unref(ns).b(),
29
- unref(ns).is("disabled", unref(disabled)),
30
- unref(ns).is("view-mode", !!unref(viewMode)),
31
- unref(ns).is("focus", unref(focus)),
32
- unref(ns).is("bordered", _ctx.border),
33
- unref(ns).is("checked", unref(modelValue) === _ctx.label),
34
- unref(ns).m(unref(size))
35
- ])
36
- }, [
37
- createElementVNode("span", {
38
- class: normalizeClass([
39
- unref(ns).e("input"),
40
- unref(ns).is("disabled", unref(disabled)),
41
- unref(ns).is("view-mode", !!unref(viewMode)),
42
- unref(ns).is("checked", unref(modelValue) === _ctx.label)
43
- ])
44
- }, [
45
- withDirectives(createElementVNode("input", {
46
- ref_key: "radioRef",
47
- ref: radioRef,
48
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null),
49
- class: normalizeClass(unref(ns).e("original")),
50
- value: _ctx.label,
51
- name: _ctx.name || ((_a = unref(radioGroup)) == null ? void 0 : _a.name),
52
- disabled: unref(radioDisabled),
53
- type: "radio",
54
- onFocus: _cache[1] || (_cache[1] = ($event) => focus.value = true),
55
- onBlur: _cache[2] || (_cache[2] = ($event) => focus.value = false),
56
- onChange: handleChange
57
- }, null, 42, _hoisted_1), [
58
- [vModelRadio, unref(modelValue)]
59
- ]),
60
- createElementVNode("span", {
61
- class: normalizeClass(unref(ns).e("inner"))
62
- }, null, 2)
63
- ], 2),
64
- createElementVNode("span", {
65
- class: normalizeClass(unref(ns).e("label")),
66
- onKeydown: _cache[3] || (_cache[3] = withModifiers(() => {
67
- }, ["stop"]))
68
- }, [
69
- renderSlot(_ctx.$slots, "default", {}, () => [
70
- createTextVNode(toDisplayString(_ctx.label), 1)
71
- ])
72
- ], 34)
73
- ], 2);
74
- };
11
+ const radioPropsBase = buildProps({
12
+ size: useSizeProp,
13
+ disabled: Boolean,
14
+ viewMode: {
15
+ type: String,
16
+ values: viewModes
17
+ },
18
+ label: {
19
+ type: [String, Number, Boolean],
20
+ default: ""
75
21
  }
76
22
  });
77
- var Radio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:\\workspace\\element-pe\\packages\\components\\radio\\src\\radio.vue"]]);
23
+ const radioProps = buildProps({
24
+ ...radioPropsBase,
25
+ modelValue: {
26
+ type: [String, Number, Boolean],
27
+ default: ""
28
+ },
29
+ name: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ border: Boolean
34
+ });
35
+ const radioEmits = {
36
+ [UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
37
+ [CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
38
+ };
78
39
 
79
- export { Radio as default };
40
+ export { radioEmits, radioProps, radioPropsBase };
80
41
  //# sourceMappingURL=radio2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio2.mjs","sources":["../../../../../../packages/components/radio/src/radio.vue"],"sourcesContent":["<template>\n <label\n :class=\"[\n ns.b(),\n ns.is('disabled', disabled),\n ns.is('view-mode', !!viewMode),\n ns.is('focus', focus),\n ns.is('bordered', border),\n ns.is('checked', modelValue === label),\n ns.m(size),\n ]\"\n >\n <span\n :class=\"[\n ns.e('input'),\n ns.is('disabled', disabled),\n ns.is('view-mode', !!viewMode),\n ns.is('checked', modelValue === label),\n ]\"\n >\n <input\n ref=\"radioRef\"\n v-model=\"modelValue\"\n :class=\"ns.e('original')\"\n :value=\"label\"\n :name=\"name || radioGroup?.name\"\n :disabled=\"radioDisabled\"\n type=\"radio\"\n @focus=\"focus = true\"\n @blur=\"focus = false\"\n @change=\"handleChange\"\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span :class=\"ns.e('label')\" @keydown.stop>\n <slot>\n {{ label }}\n </slot>\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { radioEmits, radioProps } from './radio'\nimport { useRadio } from './use-radio'\n\ndefineOptions({\n name: 'ElRadio',\n})\n\nconst props = defineProps(radioProps)\nconst emit = defineEmits(radioEmits)\n\nconst ns = useNamespace('radio')\nconst { radioRef, radioGroup, focus, size, disabled, viewMode, modelValue } = useRadio(\n props,\n emit\n)\n\nconst radioDisabled = computed(() => disabled.value || !!viewMode.value)\n\nfunction handleChange() {\n nextTick(() => emit('change', modelValue.value))\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;mCAgDc,CAAA;AAAA,EACZ,IAAM,EAAA,SAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,QAAU,EAAA,UAAA,EAAY,KAAO,EAAA,IAAA,EAAM,UAAU,QAAU,EAAA,UAAA,EAAA,GAAe,QAC5E,CAAA,KAAA,EACA,IACF,CAAA,CAAA;AAEA,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM,QAAA,CAAS,SAAS,CAAC,CAAC,SAAS,KAAK,CAAA,CAAA;AAEvE,IAAwB,SAAA,YAAA,GAAA;AACtB,MAAA,QAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,UAAA,CAAW,KAAK,CAAC,CAAA,CAAA;AAAA,KACjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"radio2.mjs","sources":["../../../../../../packages/components/radio/src/radio.ts"],"sourcesContent":["import { buildProps, isBoolean, isNumber, isString } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT, viewModes } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport type { ExtractPropTypes } from 'vue'\nimport type Radio from './radio.vue'\n\nexport const radioPropsBase = buildProps({\n /**\n * @description size of the Radio\n */\n size: useSizeProp,\n /**\n * @description whether Radio is disabled\n */\n disabled: Boolean,\n /**\n * @description 浏览模式\n */\n viewMode: {\n type: String,\n values: viewModes\n },\n /**\n * @description the value of Radio\n */\n label: {\n type: [String, Number, Boolean],\n default: '',\n },\n})\n\nexport const radioProps = buildProps({\n ...radioPropsBase,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to add a border around Radio\n */\n border: Boolean,\n} as const)\n\nexport const radioEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: string | number | boolean) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type RadioProps = ExtractPropTypes<typeof radioProps>\nexport type RadioEmits = typeof radioEmits\nexport type RadioInstance = InstanceType<typeof Radio>\n"],"names":[],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,SAAS;AACrB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACS,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,GAAG,cAAc;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,CAAC,EAAE;AACS,MAAC,UAAU,GAAG;AAC1B,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AAC3E;;;;"}