@element-plus/nightly 0.0.20240508 → 0.0.20240509

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 (548) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/nb-no.js +1 -1
  152. package/dist/locale/nb-no.min.js +1 -1
  153. package/dist/locale/nb-no.min.mjs +1 -1
  154. package/dist/locale/nb-no.mjs +1 -1
  155. package/dist/locale/nl.js +1 -1
  156. package/dist/locale/nl.min.js +1 -1
  157. package/dist/locale/nl.min.mjs +1 -1
  158. package/dist/locale/nl.mjs +1 -1
  159. package/dist/locale/pa.js +1 -1
  160. package/dist/locale/pa.min.js +1 -1
  161. package/dist/locale/pa.min.mjs +1 -1
  162. package/dist/locale/pa.mjs +1 -1
  163. package/dist/locale/pl.js +1 -1
  164. package/dist/locale/pl.min.js +1 -1
  165. package/dist/locale/pl.min.mjs +1 -1
  166. package/dist/locale/pl.mjs +1 -1
  167. package/dist/locale/pt-br.js +1 -1
  168. package/dist/locale/pt-br.min.js +1 -1
  169. package/dist/locale/pt-br.min.mjs +1 -1
  170. package/dist/locale/pt-br.mjs +1 -1
  171. package/dist/locale/pt.js +1 -1
  172. package/dist/locale/pt.min.js +1 -1
  173. package/dist/locale/pt.min.mjs +1 -1
  174. package/dist/locale/pt.mjs +1 -1
  175. package/dist/locale/ro.js +1 -1
  176. package/dist/locale/ro.min.js +1 -1
  177. package/dist/locale/ro.min.mjs +1 -1
  178. package/dist/locale/ro.mjs +1 -1
  179. package/dist/locale/ru.js +1 -1
  180. package/dist/locale/ru.min.js +1 -1
  181. package/dist/locale/ru.min.mjs +1 -1
  182. package/dist/locale/ru.mjs +1 -1
  183. package/dist/locale/sk.js +1 -1
  184. package/dist/locale/sk.min.js +1 -1
  185. package/dist/locale/sk.min.mjs +1 -1
  186. package/dist/locale/sk.mjs +1 -1
  187. package/dist/locale/sl.js +1 -1
  188. package/dist/locale/sl.min.js +1 -1
  189. package/dist/locale/sl.min.mjs +1 -1
  190. package/dist/locale/sl.mjs +1 -1
  191. package/dist/locale/sr.js +1 -1
  192. package/dist/locale/sr.min.js +1 -1
  193. package/dist/locale/sr.min.mjs +1 -1
  194. package/dist/locale/sr.mjs +1 -1
  195. package/dist/locale/sv.js +1 -1
  196. package/dist/locale/sv.min.js +1 -1
  197. package/dist/locale/sv.min.mjs +1 -1
  198. package/dist/locale/sv.mjs +1 -1
  199. package/dist/locale/sw.js +1 -1
  200. package/dist/locale/sw.min.js +1 -1
  201. package/dist/locale/sw.min.mjs +1 -1
  202. package/dist/locale/sw.mjs +1 -1
  203. package/dist/locale/ta.js +1 -1
  204. package/dist/locale/ta.min.js +1 -1
  205. package/dist/locale/ta.min.mjs +1 -1
  206. package/dist/locale/ta.mjs +1 -1
  207. package/dist/locale/th.js +1 -1
  208. package/dist/locale/th.min.js +1 -1
  209. package/dist/locale/th.min.mjs +1 -1
  210. package/dist/locale/th.mjs +1 -1
  211. package/dist/locale/tk.js +1 -1
  212. package/dist/locale/tk.min.js +1 -1
  213. package/dist/locale/tk.min.mjs +1 -1
  214. package/dist/locale/tk.mjs +1 -1
  215. package/dist/locale/tr.js +1 -1
  216. package/dist/locale/tr.min.js +1 -1
  217. package/dist/locale/tr.min.mjs +1 -1
  218. package/dist/locale/tr.mjs +1 -1
  219. package/dist/locale/ug-cn.js +1 -1
  220. package/dist/locale/ug-cn.min.js +1 -1
  221. package/dist/locale/ug-cn.min.mjs +1 -1
  222. package/dist/locale/ug-cn.mjs +1 -1
  223. package/dist/locale/uk.js +1 -1
  224. package/dist/locale/uk.min.js +1 -1
  225. package/dist/locale/uk.min.mjs +1 -1
  226. package/dist/locale/uk.mjs +1 -1
  227. package/dist/locale/uz-uz.js +1 -1
  228. package/dist/locale/uz-uz.min.js +1 -1
  229. package/dist/locale/uz-uz.min.mjs +1 -1
  230. package/dist/locale/uz-uz.mjs +1 -1
  231. package/dist/locale/vi.js +1 -1
  232. package/dist/locale/vi.min.js +1 -1
  233. package/dist/locale/vi.min.mjs +1 -1
  234. package/dist/locale/vi.mjs +1 -1
  235. package/dist/locale/zh-cn.js +1 -1
  236. package/dist/locale/zh-cn.min.js +1 -1
  237. package/dist/locale/zh-cn.min.mjs +1 -1
  238. package/dist/locale/zh-cn.mjs +1 -1
  239. package/dist/locale/zh-tw.js +1 -1
  240. package/dist/locale/zh-tw.min.js +1 -1
  241. package/dist/locale/zh-tw.min.mjs +1 -1
  242. package/dist/locale/zh-tw.mjs +1 -1
  243. package/es/components/alert/index.d.ts +4 -4
  244. package/es/components/alert/src/alert.d.ts +1 -1
  245. package/es/components/alert/src/alert.vue.d.ts +4 -4
  246. package/es/components/autocomplete/index.d.ts +65 -65
  247. package/es/components/autocomplete/src/autocomplete.mjs +1 -1
  248. package/es/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
  249. package/es/components/button/index.d.ts +5 -5
  250. package/es/components/button/src/button.d.ts +1 -1
  251. package/es/components/button/src/button.vue.d.ts +5 -5
  252. package/es/components/button/src/use-button.d.ts +1 -1
  253. package/es/components/calendar/index.d.ts +5 -5
  254. package/es/components/calendar/src/calendar.vue.d.ts +5 -5
  255. package/es/components/card/index.mjs +2 -2
  256. package/es/components/card/src/card.mjs +43 -21
  257. package/es/components/card/src/card.mjs.map +1 -1
  258. package/es/components/card/src/card2.mjs +21 -43
  259. package/es/components/card/src/card2.mjs.map +1 -1
  260. package/es/components/carousel/index.d.ts +1 -1
  261. package/es/components/carousel/src/carousel.vue.d.ts +1 -1
  262. package/es/components/cascader/index.d.ts +130 -130
  263. package/es/components/cascader/src/cascader.mjs +1 -1
  264. package/es/components/cascader/src/cascader.vue.d.ts +65 -65
  265. package/es/components/color-picker/index.d.ts +38 -38
  266. package/es/components/color-picker/index.mjs +2 -2
  267. package/es/components/color-picker/src/color-picker.mjs +46 -412
  268. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  269. package/es/components/color-picker/src/color-picker.vue.d.ts +38 -38
  270. package/es/components/color-picker/src/color-picker2.mjs +412 -46
  271. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  272. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  273. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
  274. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
  275. package/es/components/date-picker/src/panel-utils.d.ts +34 -34
  276. package/es/components/dialog/index.d.ts +1 -1
  277. package/es/components/dialog/src/dialog.vue.d.ts +1 -1
  278. package/es/components/drawer/index.d.ts +1 -1
  279. package/es/components/drawer/src/drawer.vue.d.ts +1 -1
  280. package/es/components/dropdown/index.d.ts +14 -14
  281. package/es/components/dropdown/index.mjs +2 -2
  282. package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
  283. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  284. package/es/components/dropdown/src/dropdown-item.mjs +1 -1
  285. package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
  286. package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
  287. package/es/components/dropdown/src/dropdown.mjs +97 -306
  288. package/es/components/dropdown/src/dropdown.mjs.map +1 -1
  289. package/es/components/dropdown/src/dropdown.vue.d.ts +12 -12
  290. package/es/components/dropdown/src/dropdown2.mjs +306 -97
  291. package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
  292. package/es/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  293. package/es/components/form/index.d.ts +12 -12
  294. package/es/components/form/src/form-item.d.ts +1 -1
  295. package/es/components/form/src/form-item.vue.d.ts +5 -5
  296. package/es/components/image/index.d.ts +1 -1
  297. package/es/components/image/src/image.vue.d.ts +1 -1
  298. package/es/components/index.mjs +9 -9
  299. package/es/components/input/index.d.ts +12 -12
  300. package/es/components/input/src/input.vue.d.ts +12 -12
  301. package/es/components/input-number/index.d.ts +45 -45
  302. package/es/components/input-number/src/input-number.vue.d.ts +45 -45
  303. package/es/components/message/src/message.d.ts +1 -1
  304. package/es/components/message/src/message.vue.d.ts +4 -4
  305. package/es/components/message-box/src/index.vue.d.ts +1 -1
  306. package/es/components/notification/src/notification.d.ts +1 -1
  307. package/es/components/notification/src/notification.vue.d.ts +4 -4
  308. package/es/components/pagination/src/components/jumper.vue.d.ts +12 -12
  309. package/es/components/pagination/src/components/sizes.vue.d.ts +27 -27
  310. package/es/components/popconfirm/index.d.ts +23 -23
  311. package/es/components/popconfirm/index.mjs +2 -2
  312. package/es/components/popconfirm/src/popconfirm.mjs +47 -110
  313. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  314. package/es/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
  315. package/es/components/popconfirm/src/popconfirm2.mjs +110 -47
  316. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  317. package/es/components/popover/index.d.ts +18 -18
  318. package/es/components/popover/src/popover.mjs +2 -2
  319. package/es/components/popover/src/popover.vue.d.ts +18 -18
  320. package/es/components/popper/index.mjs +2 -2
  321. package/es/components/popper/src/content.mjs +137 -93
  322. package/es/components/popper/src/content.mjs.map +1 -1
  323. package/es/components/popper/src/content.vue.d.ts +6 -6
  324. package/es/components/popper/src/content2.mjs +93 -137
  325. package/es/components/popper/src/content2.mjs.map +1 -1
  326. package/es/components/radio/index.mjs +2 -2
  327. package/es/components/radio/src/radio-group.mjs +39 -77
  328. package/es/components/radio/src/radio-group.mjs.map +1 -1
  329. package/es/components/radio/src/radio-group2.mjs +77 -39
  330. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  331. package/es/components/result/index.d.ts +4 -4
  332. package/es/components/result/src/result.d.ts +1 -1
  333. package/es/components/result/src/result.vue.d.ts +4 -4
  334. package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
  335. package/es/components/select/index.d.ts +27 -27
  336. package/es/components/select/src/select.mjs +1 -1
  337. package/es/components/select/src/select.vue.d.ts +27 -27
  338. package/es/components/select/src/useSelect.d.ts +25 -25
  339. package/es/components/select-v2/index.d.ts +54 -54
  340. package/es/components/select-v2/src/defaults.mjs +1 -1
  341. package/es/components/select-v2/src/option-item.vue.d.ts +1 -1
  342. package/es/components/select-v2/src/select.vue.d.ts +27 -27
  343. package/es/components/select-v2/src/useSelect.d.ts +25 -25
  344. package/es/components/slider/index.d.ts +75 -75
  345. package/es/components/slider/src/button.vue.d.ts +6 -6
  346. package/es/components/slider/src/composables/use-slide.d.ts +24 -24
  347. package/es/components/slider/src/slider.vue.d.ts +75 -75
  348. package/es/components/steps/index.d.ts +16 -16
  349. package/es/components/steps/src/item.d.ts +1 -1
  350. package/es/components/steps/src/item.vue.d.ts +4 -4
  351. package/es/components/steps/src/steps.d.ts +2 -2
  352. package/es/components/steps/src/steps.vue.d.ts +8 -8
  353. package/es/components/table/index.d.ts +1 -1
  354. package/es/components/table/src/filter-panel.vue.d.ts +12 -12
  355. package/es/components/table/src/table.vue.d.ts +1 -1
  356. package/es/components/tag/index.d.ts +1 -1
  357. package/es/components/tag/src/tag.vue.d.ts +1 -1
  358. package/es/components/time-picker/src/common/picker.vue.d.ts +34 -34
  359. package/es/components/time-select/index.d.ts +114 -114
  360. package/es/components/time-select/src/time-select.vue.d.ts +57 -57
  361. package/es/components/timeline/index.mjs +2 -2
  362. package/es/components/timeline/src/timeline-item.mjs +42 -72
  363. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  364. package/es/components/timeline/src/timeline-item2.mjs +72 -42
  365. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  366. package/es/components/tooltip/index.d.ts +6 -6
  367. package/es/components/tooltip/index.mjs +1 -1
  368. package/es/components/tooltip/src/content.mjs +32 -177
  369. package/es/components/tooltip/src/content.mjs.map +1 -1
  370. package/es/components/tooltip/src/content.vue.d.ts +6 -6
  371. package/es/components/tooltip/src/content2.mjs +177 -32
  372. package/es/components/tooltip/src/content2.mjs.map +1 -1
  373. package/es/components/tooltip/src/tooltip.mjs +1 -1
  374. package/es/components/tooltip/src/tooltip.vue.d.ts +6 -6
  375. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  376. package/es/components/tooltip-v2/index.d.ts +4 -4
  377. package/es/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
  378. package/es/components/tour/index.d.ts +11 -11
  379. package/es/components/tour/src/content.vue.d.ts +1 -1
  380. package/es/components/tour/src/step.vue.d.ts +5 -5
  381. package/es/components/tour/src/tour.vue.d.ts +1 -1
  382. package/es/components/transfer/index.d.ts +65 -65
  383. package/es/components/transfer/src/transfer-panel.vue.d.ts +12 -12
  384. package/es/components/transfer/src/transfer.vue.d.ts +65 -65
  385. package/es/components/tree-v2/index.d.ts +1 -1
  386. package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
  387. package/es/components/tree-v2/src/tree.vue.d.ts +1 -1
  388. package/es/components/upload/index.d.ts +5 -5
  389. package/es/components/upload/src/upload-content.vue.d.ts +1 -1
  390. package/es/components/upload/src/upload.vue.d.ts +5 -5
  391. package/es/index.mjs +9 -9
  392. package/es/version.d.ts +1 -1
  393. package/es/version.mjs +1 -1
  394. package/es/version.mjs.map +1 -1
  395. package/lib/components/alert/index.d.ts +4 -4
  396. package/lib/components/alert/src/alert.d.ts +1 -1
  397. package/lib/components/alert/src/alert.vue.d.ts +4 -4
  398. package/lib/components/autocomplete/index.d.ts +65 -65
  399. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  400. package/lib/components/autocomplete/src/autocomplete.vue.d.ts +65 -65
  401. package/lib/components/button/index.d.ts +5 -5
  402. package/lib/components/button/src/button.d.ts +1 -1
  403. package/lib/components/button/src/button.vue.d.ts +5 -5
  404. package/lib/components/button/src/use-button.d.ts +1 -1
  405. package/lib/components/calendar/index.d.ts +5 -5
  406. package/lib/components/calendar/src/calendar.vue.d.ts +5 -5
  407. package/lib/components/card/index.js +2 -2
  408. package/lib/components/card/src/card.js +43 -21
  409. package/lib/components/card/src/card.js.map +1 -1
  410. package/lib/components/card/src/card2.js +21 -43
  411. package/lib/components/card/src/card2.js.map +1 -1
  412. package/lib/components/carousel/index.d.ts +1 -1
  413. package/lib/components/carousel/src/carousel.vue.d.ts +1 -1
  414. package/lib/components/cascader/index.d.ts +130 -130
  415. package/lib/components/cascader/src/cascader.js +1 -1
  416. package/lib/components/cascader/src/cascader.vue.d.ts +65 -65
  417. package/lib/components/color-picker/index.d.ts +38 -38
  418. package/lib/components/color-picker/index.js +2 -2
  419. package/lib/components/color-picker/src/color-picker.js +46 -410
  420. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  421. package/lib/components/color-picker/src/color-picker.vue.d.ts +38 -38
  422. package/lib/components/color-picker/src/color-picker2.js +410 -46
  423. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  424. package/lib/components/color-picker/src/components/predefine.js +1 -1
  425. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +17 -17
  426. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +17 -17
  427. package/lib/components/date-picker/src/panel-utils.d.ts +34 -34
  428. package/lib/components/dialog/index.d.ts +1 -1
  429. package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
  430. package/lib/components/drawer/index.d.ts +1 -1
  431. package/lib/components/drawer/src/drawer.vue.d.ts +1 -1
  432. package/lib/components/dropdown/index.d.ts +14 -14
  433. package/lib/components/dropdown/index.js +2 -2
  434. package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
  435. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  436. package/lib/components/dropdown/src/dropdown-item.js +1 -1
  437. package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
  438. package/lib/components/dropdown/src/dropdown-menu.js +1 -1
  439. package/lib/components/dropdown/src/dropdown.js +106 -306
  440. package/lib/components/dropdown/src/dropdown.js.map +1 -1
  441. package/lib/components/dropdown/src/dropdown.vue.d.ts +12 -12
  442. package/lib/components/dropdown/src/dropdown2.js +306 -106
  443. package/lib/components/dropdown/src/dropdown2.js.map +1 -1
  444. package/lib/components/focus-trap/src/focus-trap.vue.d.ts +1 -1
  445. package/lib/components/form/index.d.ts +12 -12
  446. package/lib/components/form/src/form-item.d.ts +1 -1
  447. package/lib/components/form/src/form-item.vue.d.ts +5 -5
  448. package/lib/components/image/index.d.ts +1 -1
  449. package/lib/components/image/src/image.vue.d.ts +1 -1
  450. package/lib/components/index.js +9 -9
  451. package/lib/components/input/index.d.ts +12 -12
  452. package/lib/components/input/src/input.vue.d.ts +12 -12
  453. package/lib/components/input-number/index.d.ts +45 -45
  454. package/lib/components/input-number/src/input-number.vue.d.ts +45 -45
  455. package/lib/components/message/src/message.d.ts +1 -1
  456. package/lib/components/message/src/message.vue.d.ts +4 -4
  457. package/lib/components/message-box/src/index.vue.d.ts +1 -1
  458. package/lib/components/notification/src/notification.d.ts +1 -1
  459. package/lib/components/notification/src/notification.vue.d.ts +4 -4
  460. package/lib/components/pagination/src/components/jumper.vue.d.ts +12 -12
  461. package/lib/components/pagination/src/components/sizes.vue.d.ts +27 -27
  462. package/lib/components/popconfirm/index.d.ts +23 -23
  463. package/lib/components/popconfirm/index.js +2 -2
  464. package/lib/components/popconfirm/src/popconfirm.js +48 -110
  465. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  466. package/lib/components/popconfirm/src/popconfirm.vue.d.ts +23 -23
  467. package/lib/components/popconfirm/src/popconfirm2.js +110 -48
  468. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  469. package/lib/components/popover/index.d.ts +18 -18
  470. package/lib/components/popover/src/popover.js +2 -2
  471. package/lib/components/popover/src/popover.vue.d.ts +18 -18
  472. package/lib/components/popper/index.js +2 -2
  473. package/lib/components/popper/src/content.js +137 -98
  474. package/lib/components/popper/src/content.js.map +1 -1
  475. package/lib/components/popper/src/content.vue.d.ts +6 -6
  476. package/lib/components/popper/src/content2.js +98 -137
  477. package/lib/components/popper/src/content2.js.map +1 -1
  478. package/lib/components/radio/index.js +2 -2
  479. package/lib/components/radio/src/radio-group.js +40 -77
  480. package/lib/components/radio/src/radio-group.js.map +1 -1
  481. package/lib/components/radio/src/radio-group2.js +77 -40
  482. package/lib/components/radio/src/radio-group2.js.map +1 -1
  483. package/lib/components/result/index.d.ts +4 -4
  484. package/lib/components/result/src/result.d.ts +1 -1
  485. package/lib/components/result/src/result.vue.d.ts +4 -4
  486. package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
  487. package/lib/components/select/index.d.ts +27 -27
  488. package/lib/components/select/src/select.js +1 -1
  489. package/lib/components/select/src/select.vue.d.ts +27 -27
  490. package/lib/components/select/src/useSelect.d.ts +25 -25
  491. package/lib/components/select-v2/index.d.ts +54 -54
  492. package/lib/components/select-v2/src/defaults.js +1 -1
  493. package/lib/components/select-v2/src/option-item.vue.d.ts +1 -1
  494. package/lib/components/select-v2/src/select.vue.d.ts +27 -27
  495. package/lib/components/select-v2/src/useSelect.d.ts +25 -25
  496. package/lib/components/slider/index.d.ts +75 -75
  497. package/lib/components/slider/src/button.vue.d.ts +6 -6
  498. package/lib/components/slider/src/composables/use-slide.d.ts +24 -24
  499. package/lib/components/slider/src/slider.vue.d.ts +75 -75
  500. package/lib/components/steps/index.d.ts +16 -16
  501. package/lib/components/steps/src/item.d.ts +1 -1
  502. package/lib/components/steps/src/item.vue.d.ts +4 -4
  503. package/lib/components/steps/src/steps.d.ts +2 -2
  504. package/lib/components/steps/src/steps.vue.d.ts +8 -8
  505. package/lib/components/table/index.d.ts +1 -1
  506. package/lib/components/table/src/filter-panel.vue.d.ts +12 -12
  507. package/lib/components/table/src/table.vue.d.ts +1 -1
  508. package/lib/components/tag/index.d.ts +1 -1
  509. package/lib/components/tag/src/tag.vue.d.ts +1 -1
  510. package/lib/components/time-picker/src/common/picker.vue.d.ts +34 -34
  511. package/lib/components/time-select/index.d.ts +114 -114
  512. package/lib/components/time-select/src/time-select.vue.d.ts +57 -57
  513. package/lib/components/timeline/index.js +2 -2
  514. package/lib/components/timeline/src/timeline-item.js +42 -72
  515. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  516. package/lib/components/timeline/src/timeline-item2.js +72 -42
  517. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  518. package/lib/components/tooltip/index.d.ts +6 -6
  519. package/lib/components/tooltip/index.js +1 -1
  520. package/lib/components/tooltip/src/content.js +32 -177
  521. package/lib/components/tooltip/src/content.js.map +1 -1
  522. package/lib/components/tooltip/src/content.vue.d.ts +6 -6
  523. package/lib/components/tooltip/src/content2.js +177 -32
  524. package/lib/components/tooltip/src/content2.js.map +1 -1
  525. package/lib/components/tooltip/src/tooltip.js +1 -1
  526. package/lib/components/tooltip/src/tooltip.vue.d.ts +6 -6
  527. package/lib/components/tooltip/src/tooltip2.js +1 -1
  528. package/lib/components/tooltip-v2/index.d.ts +4 -4
  529. package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +4 -4
  530. package/lib/components/tour/index.d.ts +11 -11
  531. package/lib/components/tour/src/content.vue.d.ts +1 -1
  532. package/lib/components/tour/src/step.vue.d.ts +5 -5
  533. package/lib/components/tour/src/tour.vue.d.ts +1 -1
  534. package/lib/components/transfer/index.d.ts +65 -65
  535. package/lib/components/transfer/src/transfer-panel.vue.d.ts +12 -12
  536. package/lib/components/transfer/src/transfer.vue.d.ts +65 -65
  537. package/lib/components/tree-v2/index.d.ts +1 -1
  538. package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
  539. package/lib/components/tree-v2/src/tree.vue.d.ts +1 -1
  540. package/lib/components/upload/index.d.ts +5 -5
  541. package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
  542. package/lib/components/upload/src/upload.vue.d.ts +5 -5
  543. package/lib/index.js +9 -9
  544. package/lib/version.d.ts +1 -1
  545. package/lib/version.js +1 -1
  546. package/lib/version.js.map +1 -1
  547. package/package.json +1 -1
  548. package/web-types.json +1 -1
@@ -1,143 +1,99 @@
1
- import { defineComponent, inject, ref, provide, onMounted, watch, unref, onBeforeUnmount, openBlock, createElementBlock, mergeProps, createVNode, withCtx, renderSlot } from 'vue';
2
- import { NOOP } from '@vue/shared';
3
- import { isNil } from 'lodash-unified';
4
- import '../../focus-trap/index.mjs';
5
- import '../../form/index.mjs';
1
+ import { placements } from '@popperjs/core';
6
2
  import '../../../utils/index.mjs';
7
- import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
8
- import { popperContentProps, popperContentEmits } from './content.mjs';
9
- import './composables/index.mjs';
10
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
11
- import { usePopperContentFocusTrap } from './composables/use-focus-trap.mjs';
12
- import { usePopperContent } from './composables/use-content.mjs';
13
- import { usePopperContentDOM } from './composables/use-content-dom.mjs';
14
- import { formItemContextKey } from '../../form/src/constants.mjs';
15
- import { isElement } from '../../../utils/types.mjs';
16
- import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
+ import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
17
6
 
18
- const __default__ = defineComponent({
19
- name: "ElPopperContent"
20
- });
21
- const _sfc_main = /* @__PURE__ */ defineComponent({
22
- ...__default__,
23
- props: popperContentProps,
24
- emits: popperContentEmits,
25
- setup(__props, { expose, emit }) {
26
- const props = __props;
27
- const {
28
- focusStartRef,
29
- trapped,
30
- onFocusAfterReleased,
31
- onFocusAfterTrapped,
32
- onFocusInTrap,
33
- onFocusoutPrevented,
34
- onReleaseRequested
35
- } = usePopperContentFocusTrap(props, emit);
36
- const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
37
- const {
38
- ariaModal,
39
- arrowStyle,
40
- contentAttrs,
41
- contentClass,
42
- contentStyle,
43
- updateZIndex
44
- } = usePopperContentDOM(props, {
45
- styles,
46
- attributes,
47
- role
48
- });
49
- const formItemContext = inject(formItemContextKey, void 0);
50
- const arrowOffset = ref();
51
- provide(POPPER_CONTENT_INJECTION_KEY, {
52
- arrowStyle,
53
- arrowRef,
54
- arrowOffset
55
- });
56
- if (formItemContext && (formItemContext.addInputId || formItemContext.removeInputId)) {
57
- provide(formItemContextKey, {
58
- ...formItemContext,
59
- addInputId: NOOP,
60
- removeInputId: NOOP
61
- });
62
- }
63
- let triggerTargetAriaStopWatch = void 0;
64
- const updatePopper = (shouldUpdateZIndex = true) => {
65
- update();
66
- shouldUpdateZIndex && updateZIndex();
67
- };
68
- const togglePopperAlive = () => {
69
- updatePopper(false);
70
- if (props.visible && props.focusOnShow) {
71
- trapped.value = true;
72
- } else if (props.visible === false) {
73
- trapped.value = false;
74
- }
75
- };
76
- onMounted(() => {
77
- watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
78
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
79
- triggerTargetAriaStopWatch = void 0;
80
- const el = unref(triggerTargetEl || contentRef.value);
81
- const prevEl = unref(prevTriggerTargetEl || contentRef.value);
82
- if (isElement(el)) {
83
- triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
84
- ;
85
- ["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
86
- isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
87
- });
88
- }, { immediate: true });
89
- }
90
- if (prevEl !== el && isElement(prevEl)) {
91
- ;
92
- ["role", "aria-label", "aria-modal", "id"].forEach((key) => {
93
- prevEl.removeAttribute(key);
94
- });
95
- }
96
- }, { immediate: true });
97
- watch(() => props.visible, togglePopperAlive, { immediate: true });
98
- });
99
- onBeforeUnmount(() => {
100
- triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
101
- triggerTargetAriaStopWatch = void 0;
102
- });
103
- expose({
104
- popperContentRef: contentRef,
105
- popperInstanceRef: instanceRef,
106
- updatePopper,
107
- contentStyle
108
- });
109
- return (_ctx, _cache) => {
110
- return openBlock(), createElementBlock("div", mergeProps({
111
- ref_key: "contentRef",
112
- ref: contentRef
113
- }, unref(contentAttrs), {
114
- style: unref(contentStyle),
115
- class: unref(contentClass),
116
- tabindex: "-1",
117
- onMouseenter: _cache[0] || (_cache[0] = (e) => _ctx.$emit("mouseenter", e)),
118
- onMouseleave: _cache[1] || (_cache[1] = (e) => _ctx.$emit("mouseleave", e))
119
- }), [
120
- createVNode(unref(ElFocusTrap), {
121
- trapped: unref(trapped),
122
- "trap-on-focus-in": true,
123
- "focus-trap-el": unref(contentRef),
124
- "focus-start-el": unref(focusStartRef),
125
- onFocusAfterTrapped: unref(onFocusAfterTrapped),
126
- onFocusAfterReleased: unref(onFocusAfterReleased),
127
- onFocusin: unref(onFocusInTrap),
128
- onFocusoutPrevented: unref(onFocusoutPrevented),
129
- onReleaseRequested: unref(onReleaseRequested)
130
- }, {
131
- default: withCtx(() => [
132
- renderSlot(_ctx.$slots, "default")
133
- ]),
134
- _: 3
135
- }, 8, ["trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
136
- ], 16);
137
- };
7
+ const POSITIONING_STRATEGIES = ["fixed", "absolute"];
8
+ const popperCoreConfigProps = buildProps({
9
+ boundariesPadding: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ fallbackPlacements: {
14
+ type: definePropType(Array),
15
+ default: void 0
16
+ },
17
+ gpuAcceleration: {
18
+ type: Boolean,
19
+ default: true
20
+ },
21
+ offset: {
22
+ type: Number,
23
+ default: 12
24
+ },
25
+ placement: {
26
+ type: String,
27
+ values: placements,
28
+ default: "bottom"
29
+ },
30
+ popperOptions: {
31
+ type: definePropType(Object),
32
+ default: () => ({})
33
+ },
34
+ strategy: {
35
+ type: String,
36
+ values: POSITIONING_STRATEGIES,
37
+ default: "absolute"
138
38
  }
139
39
  });
140
- var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
40
+ const popperContentProps = buildProps({
41
+ ...popperCoreConfigProps,
42
+ id: String,
43
+ style: {
44
+ type: definePropType([String, Array, Object])
45
+ },
46
+ className: {
47
+ type: definePropType([String, Array, Object])
48
+ },
49
+ effect: {
50
+ type: String,
51
+ default: "dark"
52
+ },
53
+ visible: Boolean,
54
+ enterable: {
55
+ type: Boolean,
56
+ default: true
57
+ },
58
+ pure: Boolean,
59
+ focusOnShow: {
60
+ type: Boolean,
61
+ default: false
62
+ },
63
+ trapping: {
64
+ type: Boolean,
65
+ default: false
66
+ },
67
+ popperClass: {
68
+ type: definePropType([String, Array, Object])
69
+ },
70
+ popperStyle: {
71
+ type: definePropType([String, Array, Object])
72
+ },
73
+ referenceEl: {
74
+ type: definePropType(Object)
75
+ },
76
+ triggerTargetEl: {
77
+ type: definePropType(Object)
78
+ },
79
+ stopPopperMouseEvent: {
80
+ type: Boolean,
81
+ default: true
82
+ },
83
+ virtualTriggering: Boolean,
84
+ zIndex: Number,
85
+ ...useAriaProps(["ariaLabel"])
86
+ });
87
+ const popperContentEmits = {
88
+ mouseenter: (evt) => evt instanceof MouseEvent,
89
+ mouseleave: (evt) => evt instanceof MouseEvent,
90
+ focus: () => true,
91
+ blur: () => true,
92
+ close: () => true
93
+ };
94
+ const usePopperCoreConfigProps = popperCoreConfigProps;
95
+ const usePopperContentProps = popperContentProps;
96
+ const usePopperContentEmits = popperContentEmits;
141
97
 
142
- export { ElPopperContent as default };
98
+ export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps };
143
99
  //# sourceMappingURL=content2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { NOOP } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { isElement } from '@element-plus/utils'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\nconst arrowOffset = ref<number>()\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n arrowOffset,\n})\n\nif (\n formItemContext &&\n (formItemContext.addInputId || formItemContext.removeInputId)\n) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n update()\n shouldUpdateZIndex && updateZIndex()\n}\n\nconst togglePopperAlive = () => {\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nonMounted(() => {\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || contentRef.value)\n const prevEl = unref(prevTriggerTargetEl || contentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef: contentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef: instanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;mCAmDc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAM,MAAA;AAAA,MACJ,aAAA;AAAA,MACA,OAAA;AAAA,MAEA,oBAAA;AAAA,MACA,mBAAA;AAAA,MACA,aAAA;AAAA,MACA,mBAAA;AAAA,MACA,kBAAA;AAAA,KACE,GAAA,yBAAA,CAA0B,OAAO,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,EAAE,YAAY,QAAU,EAAA,UAAA,EAAY,QAAQ,WAAa,EAAA,IAAA,EAAM,MACnE,EAAA,GAAA,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAExB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KAAA,GACE,oBAAoB,KAAO,EAAA;AAAA,MAC7B,MAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,eAAA,GAAkB,MAAO,CAAA,kBAAA,EAAoB,KAAS,CAAA,CAAA,CAAA;AAC5D,IAAA,MAAM,cAAc,GAAY,EAAA,CAAA;AAEhC,IAAA,OAAA,CAAQ,4BAA8B,EAAA;AAAA,MACpC,UAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAA,IACE,eACC,KAAA,eAAA,CAAgB,UAAc,IAAA,eAAA,CAAgB,aAC/C,CAAA,EAAA;AAEA,MAAA,OAAA,CAAQ,kBAAoB,EAAA;AAAA,QAC1B,GAAG,eAAA;AAAA,QACH,UAAY,E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sources":["../../../../../../packages/components/popper/src/content.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { Options, Placement } from '@popperjs/core'\nimport type { Measurable } from './constants'\nimport type Content from './content.vue'\n\ntype ClassObjectType = Record<string, boolean>\ntype ClassType = string | ClassObjectType | ClassType[]\n\nconst POSITIONING_STRATEGIES = ['fixed', 'absolute'] as const\n\nexport interface CreatePopperInstanceParams {\n referenceEl: Measurable\n popperContentEl: HTMLElement\n arrowEl: HTMLElement | undefined\n}\n\nexport const popperCoreConfigProps = buildProps({\n boundariesPadding: {\n type: Number,\n default: 0,\n },\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: undefined,\n },\n gpuAcceleration: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the Tooltip\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of Tooltip\n */\n placement: {\n type: String,\n values: placements,\n default: 'bottom',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}),\n },\n strategy: {\n type: String,\n values: POSITIONING_STRATEGIES,\n default: 'absolute',\n },\n} as const)\nexport type PopperCoreConfigProps = ExtractPropTypes<\n typeof popperCoreConfigProps\n>\n\nexport const popperContentProps = buildProps({\n ...popperCoreConfigProps,\n id: String,\n style: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n className: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n effect: {\n type: String,\n default: 'dark',\n },\n visible: Boolean,\n enterable: {\n type: Boolean,\n default: true,\n },\n pure: Boolean,\n focusOnShow: {\n type: Boolean,\n default: false,\n },\n trapping: {\n type: Boolean,\n default: false,\n },\n popperClass: {\n type: definePropType<ClassType>([String, Array, Object]),\n },\n popperStyle: {\n type: definePropType<StyleValue>([String, Array, Object]),\n },\n referenceEl: {\n type: definePropType<HTMLElement>(Object),\n },\n triggerTargetEl: {\n type: definePropType<HTMLElement>(Object),\n },\n stopPopperMouseEvent: {\n type: Boolean,\n default: true,\n },\n virtualTriggering: Boolean,\n zIndex: Number,\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type PopperContentProps = ExtractPropTypes<typeof popperContentProps>\n\nexport const popperContentEmits = {\n mouseenter: (evt: MouseEvent) => evt instanceof MouseEvent,\n mouseleave: (evt: MouseEvent) => evt instanceof MouseEvent,\n focus: () => true,\n blur: () => true,\n close: () => true,\n}\nexport type PopperContentEmits = typeof popperContentEmits\n\nexport type PopperContentInstance = InstanceType<typeof Content>\n\n/** @deprecated use `popperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport const usePopperCoreConfigProps = popperCoreConfigProps\n\n/** @deprecated use `popperContentProps` instead, and it will be deprecated in the next major version */\nexport const usePopperContentProps = popperContentProps\n\n/** @deprecated use `popperContentEmits` instead, and it will be deprecated in the next major version */\nexport const usePopperContentEmits = popperContentEmits\n\n/** @deprecated use `PopperCoreConfigProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperCoreConfigProps = PopperCoreConfigProps\n\n/** @deprecated use `PopperContentProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperContentProps = PopperContentProps\n\n/** @deprecated use `PopperContentInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowContent = PopperContentInstance\n"],"names":[],"mappings":";;;;;;AAGA,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,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E,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACjD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,iBAAiB,EAAE,OAAO;AAC5B,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG;AAClC,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,UAAU,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAChD,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE;AACU,MAAC,wBAAwB,GAAG,sBAAsB;AAClD,MAAC,qBAAqB,GAAG,mBAAmB;AAC5C,MAAC,qBAAqB,GAAG;;;;"}
@@ -1,9 +1,9 @@
1
1
  import '../../utils/index.mjs';
2
2
  import Radio from './src/radio2.mjs';
3
3
  import RadioButton from './src/radio-button2.mjs';
4
- import RadioGroup from './src/radio-group.mjs';
4
+ import RadioGroup from './src/radio-group2.mjs';
5
5
  export { radioEmits, radioProps, radioPropsBase } from './src/radio.mjs';
6
- export { radioGroupEmits, radioGroupProps } from './src/radio-group2.mjs';
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';
9
9
  import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
@@ -1,82 +1,44 @@
1
- import { defineComponent, ref, nextTick, onMounted, computed, provide, reactive, toRefs, watch, openBlock, createElementBlock, unref, normalizeClass, renderSlot } from 'vue';
2
- import '../../form/index.mjs';
3
- import '../../../constants/index.mjs';
4
- import '../../../hooks/index.mjs';
5
1
  import '../../../utils/index.mjs';
6
- import { radioGroupProps, radioGroupEmits } from './radio-group2.mjs';
7
- import { radioGroupKey } from './constants.mjs';
8
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
10
- import { useId } from '../../../hooks/use-id/index.mjs';
11
- import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
12
- import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
13
- import { debugWarn } from '../../../utils/error.mjs';
14
- import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
2
+ import '../../../hooks/index.mjs';
3
+ import { radioEmits } from './radio.mjs';
4
+ import { buildProps } from '../../../utils/vue/props/runtime.mjs';
5
+ import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
+ import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
15
7
 
16
- const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
17
- const __default__ = defineComponent({
18
- name: "ElRadioGroup"
19
- });
20
- const _sfc_main = /* @__PURE__ */ defineComponent({
21
- ...__default__,
22
- props: radioGroupProps,
23
- emits: radioGroupEmits,
24
- setup(__props, { emit }) {
25
- const props = __props;
26
- const ns = useNamespace("radio");
27
- const radioId = useId();
28
- const radioGroupRef = ref();
29
- const { formItem } = useFormItem();
30
- const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
31
- formItemContext: formItem
32
- });
33
- const changeEvent = (value) => {
34
- emit(UPDATE_MODEL_EVENT, value);
35
- nextTick(() => emit("change", value));
36
- };
37
- onMounted(() => {
38
- const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
39
- const firstLabel = radios[0];
40
- if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
41
- firstLabel.tabIndex = 0;
42
- }
43
- });
44
- const name = computed(() => {
45
- return props.name || radioId.value;
46
- });
47
- provide(radioGroupKey, reactive({
48
- ...toRefs(props),
49
- changeEvent,
50
- name
51
- }));
52
- watch(() => props.modelValue, () => {
53
- if (props.validateEvent) {
54
- formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
55
- }
56
- });
57
- useDeprecated({
58
- from: "label",
59
- replacement: "aria-label",
60
- version: "2.8.0",
61
- scope: "el-radio-group",
62
- ref: "https://element-plus.org/en-US/component/radio.html"
63
- }, computed(() => !!props.label));
64
- return (_ctx, _cache) => {
65
- return openBlock(), createElementBlock("div", {
66
- id: unref(groupId),
67
- ref_key: "radioGroupRef",
68
- ref: radioGroupRef,
69
- class: normalizeClass(unref(ns).b("group")),
70
- role: "radiogroup",
71
- "aria-label": !unref(isLabeledByFormItem) ? _ctx.label || _ctx.ariaLabel || "radio-group" : void 0,
72
- "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
73
- }, [
74
- renderSlot(_ctx.$slots, "default")
75
- ], 10, _hoisted_1);
76
- };
77
- }
8
+ const radioGroupProps = buildProps({
9
+ id: {
10
+ type: String,
11
+ default: void 0
12
+ },
13
+ size: useSizeProp,
14
+ disabled: Boolean,
15
+ modelValue: {
16
+ type: [String, Number, Boolean],
17
+ default: void 0
18
+ },
19
+ fill: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ label: {
24
+ type: String,
25
+ default: void 0
26
+ },
27
+ textColor: {
28
+ type: String,
29
+ default: ""
30
+ },
31
+ name: {
32
+ type: String,
33
+ default: void 0
34
+ },
35
+ validateEvent: {
36
+ type: Boolean,
37
+ default: true
38
+ },
39
+ ...useAriaProps(["ariaLabel"])
78
40
  });
79
- var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
41
+ const radioGroupEmits = radioEmits;
80
42
 
81
- export { RadioGroup as default };
43
+ export { radioGroupEmits, radioGroupProps };
82
44
  //# sourceMappingURL=radio-group.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.vue"],"sourcesContent":["<template>\n <div\n :id=\"groupId\"\n ref=\"radioGroupRef\"\n :class=\"ns.b('group')\"\n role=\"radiogroup\"\n :aria-label=\"\n !isLabeledByFormItem ? label || ariaLabel || 'radio-group' : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n watch,\n} from 'vue'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useDeprecated, useId, useNamespace } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { radioGroupEmits, radioGroupProps } from './radio-group'\nimport { radioGroupKey } from './constants'\n\nimport type { RadioGroupProps } from './radio-group'\n\ndefineOptions({\n name: 'ElRadioGroup',\n})\n\nconst props = defineProps(radioGroupProps)\nconst emit = defineEmits(radioGroupEmits)\n\nconst ns = useNamespace('radio')\nconst radioId = useId()\nconst radioGroupRef = ref<HTMLDivElement>()\nconst { formItem } = useFormItem()\nconst { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst changeEvent = (value: RadioGroupProps['modelValue']) => {\n emit(UPDATE_MODEL_EVENT, value)\n nextTick(() => emit('change', value))\n}\n\nonMounted(() => {\n const radios =\n radioGroupRef.value!.querySelectorAll<HTMLInputElement>('[type=radio]')\n const firstLabel = radios[0]\n if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {\n firstLabel.tabIndex = 0\n }\n})\n\nconst name = computed(() => {\n return props.name || radioId.value\n})\n\nprovide(\n radioGroupKey,\n reactive({\n ...toRefs(props),\n changeEvent,\n name,\n })\n)\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n)\n\nuseDeprecated(\n {\n from: 'label',\n replacement: 'aria-label',\n version: '2.8.0',\n scope: 'el-radio-group',\n ref: 'https://element-plus.org/en-US/component/radio.html',\n },\n computed(() => !!props.label)\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;mCAmCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,UAAU,KAAM,EAAA,CAAA;AACtB,IAAA,MAAM,gBAAgB,GAAoB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAA,EAAS,OAAS,EAAA,mBAAA,EAAA,GAAwB,mBAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,CAAC,KAAyC,KAAA;AAC5D,MAAA,IAAA,CAAK,oBAAoB,KAAK,CAAA,CAAA;AAC9B,MAAA,QAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,KAAK,CAAC,CAAA,CAAA;AAAA,KACtC,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,M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Content":["import { buildProps } from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\nimport type { ExtractPropTypes } from '@vue/runtime-core'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description the size of radio buttons or bordered radios\n */\n size: useSizeProp,\n /**\n * @description whether the nesting radios are disabled\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description border and background color when button is active\n */\n fill: {\n type: String,\n default: '',\n },\n /**\n * @deprecated same as `aria-label` in RadioGroup\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description font color when button is active\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType<typeof RadioGroup>\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;;;;"}
@@ -1,44 +1,82 @@
1
- import '../../../utils/index.mjs';
1
+ import { defineComponent, ref, nextTick, onMounted, computed, provide, reactive, toRefs, watch, openBlock, createElementBlock, unref, normalizeClass, renderSlot } from 'vue';
2
+ import '../../form/index.mjs';
3
+ import '../../../constants/index.mjs';
2
4
  import '../../../hooks/index.mjs';
3
- import { radioEmits } from './radio.mjs';
4
- import { buildProps } from '../../../utils/vue/props/runtime.mjs';
5
- import { useSizeProp } from '../../../hooks/use-size/index.mjs';
6
- import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
5
+ import '../../../utils/index.mjs';
6
+ import { radioGroupProps, radioGroupEmits } from './radio-group.mjs';
7
+ import { radioGroupKey } from './constants.mjs';
8
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
10
+ import { useId } from '../../../hooks/use-id/index.mjs';
11
+ import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
12
+ import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
13
+ import { debugWarn } from '../../../utils/error.mjs';
14
+ import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
7
15
 
8
- const radioGroupProps = buildProps({
9
- id: {
10
- type: String,
11
- default: void 0
12
- },
13
- size: useSizeProp,
14
- disabled: Boolean,
15
- modelValue: {
16
- type: [String, Number, Boolean],
17
- default: void 0
18
- },
19
- fill: {
20
- type: String,
21
- default: ""
22
- },
23
- label: {
24
- type: String,
25
- default: void 0
26
- },
27
- textColor: {
28
- type: String,
29
- default: ""
30
- },
31
- name: {
32
- type: String,
33
- default: void 0
34
- },
35
- validateEvent: {
36
- type: Boolean,
37
- default: true
38
- },
39
- ...useAriaProps(["ariaLabel"])
16
+ const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
17
+ const __default__ = defineComponent({
18
+ name: "ElRadioGroup"
19
+ });
20
+ const _sfc_main = /* @__PURE__ */ defineComponent({
21
+ ...__default__,
22
+ props: radioGroupProps,
23
+ emits: radioGroupEmits,
24
+ setup(__props, { emit }) {
25
+ const props = __props;
26
+ const ns = useNamespace("radio");
27
+ const radioId = useId();
28
+ const radioGroupRef = ref();
29
+ const { formItem } = useFormItem();
30
+ const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
31
+ formItemContext: formItem
32
+ });
33
+ const changeEvent = (value) => {
34
+ emit(UPDATE_MODEL_EVENT, value);
35
+ nextTick(() => emit("change", value));
36
+ };
37
+ onMounted(() => {
38
+ const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
39
+ const firstLabel = radios[0];
40
+ if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
41
+ firstLabel.tabIndex = 0;
42
+ }
43
+ });
44
+ const name = computed(() => {
45
+ return props.name || radioId.value;
46
+ });
47
+ provide(radioGroupKey, reactive({
48
+ ...toRefs(props),
49
+ changeEvent,
50
+ name
51
+ }));
52
+ watch(() => props.modelValue, () => {
53
+ if (props.validateEvent) {
54
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
55
+ }
56
+ });
57
+ useDeprecated({
58
+ from: "label",
59
+ replacement: "aria-label",
60
+ version: "2.8.0",
61
+ scope: "el-radio-group",
62
+ ref: "https://element-plus.org/en-US/component/radio.html"
63
+ }, computed(() => !!props.label));
64
+ return (_ctx, _cache) => {
65
+ return openBlock(), createElementBlock("div", {
66
+ id: unref(groupId),
67
+ ref_key: "radioGroupRef",
68
+ ref: radioGroupRef,
69
+ class: normalizeClass(unref(ns).b("group")),
70
+ role: "radiogroup",
71
+ "aria-label": !unref(isLabeledByFormItem) ? _ctx.label || _ctx.ariaLabel || "radio-group" : void 0,
72
+ "aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
73
+ }, [
74
+ renderSlot(_ctx.$slots, "default")
75
+ ], 10, _hoisted_1);
76
+ };
77
+ }
40
78
  });
41
- const radioGroupEmits = radioEmits;
79
+ var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
42
80
 
43
- export { radioGroupEmits, radioGroupProps };
81
+ export { RadioGroup as default };
44
82
  //# sourceMappingURL=radio-group2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group2.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\nimport type { ExtractPropTypes } from '@vue/runtime-core'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description the size of radio buttons or bordered radios\n */\n size: useSizeProp,\n /**\n * @description whether the nesting radios are disabled\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description border and background color when button is active\n */\n fill: {\n type: String,\n default: '',\n },\n /**\n * @deprecated same as `aria-label` in RadioGroup\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description font color when button is active\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType<typeof RadioGroup>\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;;;;"}
1
+ {"version":3,"file":"radio-group2.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.vue"],"sourcesContent":["<template>\n <div\n :id=\"groupId\"\n ref=\"radioGroupRef\"\n :class=\"ns.b('group')\"\n role=\"radiogroup\"\n :aria-label=\"\n !isLabeledByFormItem ? label || ariaLabel || 'radio-group' : undefined\n \"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n watch,\n} from 'vue'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useDeprecated, useId, useNamespace } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { radioGroupEmits, radioGroupProps } from './radio-group'\nimport { radioGroupKey } from './constants'\n\nimport type { RadioGroupProps } from './radio-group'\n\ndefineOptions({\n name: 'ElRadioGroup',\n})\n\nconst props = defineProps(radioGroupProps)\nconst emit = defineEmits(radioGroupEmits)\n\nconst ns = useNamespace('radio')\nconst radioId = useId()\nconst radioGroupRef = ref<HTMLDivElement>()\nconst { formItem } = useFormItem()\nconst { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst changeEvent = (value: RadioGroupProps['modelValue']) => {\n emit(UPDATE_MODEL_EVENT, value)\n nextTick(() => emit('change', value))\n}\n\nonMounted(() => {\n const radios =\n radioGroupRef.value!.querySelectorAll<HTMLInputElement>('[type=radio]')\n const firstLabel = radios[0]\n if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {\n firstLabel.tabIndex = 0\n }\n})\n\nconst name = computed(() => {\n return props.name || radioId.value\n})\n\nprovide(\n radioGroupKey,\n reactive({\n ...toRefs(props),\n changeEvent,\n name,\n })\n)\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n)\n\nuseDeprecated(\n {\n from: 'label',\n replacement: 'aria-label',\n version: '2.8.0',\n scope: 'el-radio-group',\n ref: 'https://element-plus.org/en-US/component/radio.html',\n },\n computed(() => !!props.label)\n)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;mCAmCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,UAAU,KAAM,EAAA,CAAA;AACtB,IAAA,MAAM,gBAAgB,GAAoB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAA,EAAS,OAAS,EAAA,mBAAA,EAAA,GAAwB,mBAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,CAAC,KAAyC,KAAA;AAC5D,MAAA,IAAA,CAAK,oBAAoB,KAAK,CAAA,CAAA;AAC9B,MAAA,QAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,KAAK,CAAC,CAAA,CAAA;AAAA,KACtC,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,MAAM,MACJ,GAAA,aAAA,CAAc,KAAO,CAAA,gBAAA,CAAmC,cAAc,CAAA,CAAA;AACxE,MAAA,MAAM,aAAa,MAAO,CAAA,CAAA,CAAA,CAAA;AAC1B,MAAI,IAAA,CAAC,KAAM,CAAA,IAAA,CAAK,MAAM,CAAA,CAAE,IAAK,CAAA,CAAC,KAAU,KAAA,KAAA,CAAM,OAAO,CAAA,IAAK,UAAY,EAAA;AACpE,QAAA,UAAA,CAAW,QAAW,GAAA,CAAA,CAAA;AAAA,OACxB;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,M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