@element-plus/nightly 0.0.20240508 → 0.0.20240510

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 (346) hide show
  1. package/dist/index.full.js +4 -4
  2. package/dist/index.full.min.js +5 -5
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +5 -5
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +4 -4
  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/autocomplete/src/autocomplete.mjs +1 -1
  244. package/es/components/cascader/src/cascader.mjs +1 -1
  245. package/es/components/check-tag/index.mjs +2 -2
  246. package/es/components/check-tag/src/check-tag.mjs +35 -17
  247. package/es/components/check-tag/src/check-tag.mjs.map +1 -1
  248. package/es/components/check-tag/src/check-tag2.mjs +17 -35
  249. package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
  250. package/es/components/color-picker/index.mjs +2 -2
  251. package/es/components/color-picker/src/color-picker.mjs +46 -412
  252. package/es/components/color-picker/src/color-picker.mjs.map +1 -1
  253. package/es/components/color-picker/src/color-picker2.mjs +412 -46
  254. package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
  255. package/es/components/color-picker/src/components/predefine.mjs +1 -1
  256. package/es/components/dropdown/src/dropdown2.mjs +1 -1
  257. package/es/components/index.mjs +7 -7
  258. package/es/components/popconfirm/index.mjs +2 -2
  259. package/es/components/popconfirm/src/popconfirm.mjs +47 -110
  260. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  261. package/es/components/popconfirm/src/popconfirm2.mjs +110 -47
  262. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  263. package/es/components/popover/src/popover.mjs +1 -1
  264. package/es/components/radio/index.mjs +2 -2
  265. package/es/components/radio/src/radio-group.mjs +39 -77
  266. package/es/components/radio/src/radio-group.mjs.map +1 -1
  267. package/es/components/radio/src/radio-group2.mjs +77 -39
  268. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  269. package/es/components/result/index.mjs +2 -2
  270. package/es/components/result/src/result.mjs +63 -29
  271. package/es/components/result/src/result.mjs.map +1 -1
  272. package/es/components/result/src/result2.mjs +29 -63
  273. package/es/components/result/src/result2.mjs.map +1 -1
  274. package/es/components/select/src/select.mjs +1 -1
  275. package/es/components/select-v2/src/defaults.mjs +1 -1
  276. package/es/components/table/src/store/watcher.mjs +2 -2
  277. package/es/components/table/src/store/watcher.mjs.map +1 -1
  278. package/es/components/timeline/index.mjs +2 -2
  279. package/es/components/timeline/src/timeline-item.mjs +42 -72
  280. package/es/components/timeline/src/timeline-item.mjs.map +1 -1
  281. package/es/components/timeline/src/timeline-item2.mjs +72 -42
  282. package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
  283. package/es/components/tooltip/index.mjs +1 -1
  284. package/es/components/tooltip/src/content.mjs +32 -177
  285. package/es/components/tooltip/src/content.mjs.map +1 -1
  286. package/es/components/tooltip/src/content2.mjs +177 -32
  287. package/es/components/tooltip/src/content2.mjs.map +1 -1
  288. package/es/components/tooltip/src/tooltip.mjs +1 -1
  289. package/es/components/tooltip/src/tooltip2.mjs +1 -1
  290. package/es/index.mjs +7 -7
  291. package/es/version.d.ts +1 -1
  292. package/es/version.mjs +1 -1
  293. package/es/version.mjs.map +1 -1
  294. package/lib/components/autocomplete/src/autocomplete.js +1 -1
  295. package/lib/components/cascader/src/cascader.js +1 -1
  296. package/lib/components/check-tag/index.js +2 -2
  297. package/lib/components/check-tag/src/check-tag.js +35 -18
  298. package/lib/components/check-tag/src/check-tag.js.map +1 -1
  299. package/lib/components/check-tag/src/check-tag2.js +18 -35
  300. package/lib/components/check-tag/src/check-tag2.js.map +1 -1
  301. package/lib/components/color-picker/index.js +2 -2
  302. package/lib/components/color-picker/src/color-picker.js +46 -410
  303. package/lib/components/color-picker/src/color-picker.js.map +1 -1
  304. package/lib/components/color-picker/src/color-picker2.js +410 -46
  305. package/lib/components/color-picker/src/color-picker2.js.map +1 -1
  306. package/lib/components/color-picker/src/components/predefine.js +1 -1
  307. package/lib/components/dropdown/src/dropdown2.js +1 -1
  308. package/lib/components/index.js +7 -7
  309. package/lib/components/popconfirm/index.js +2 -2
  310. package/lib/components/popconfirm/src/popconfirm.js +48 -110
  311. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  312. package/lib/components/popconfirm/src/popconfirm2.js +110 -48
  313. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  314. package/lib/components/popover/src/popover.js +1 -1
  315. package/lib/components/radio/index.js +2 -2
  316. package/lib/components/radio/src/radio-group.js +40 -77
  317. package/lib/components/radio/src/radio-group.js.map +1 -1
  318. package/lib/components/radio/src/radio-group2.js +77 -40
  319. package/lib/components/radio/src/radio-group2.js.map +1 -1
  320. package/lib/components/result/index.js +2 -2
  321. package/lib/components/result/src/result.js +63 -31
  322. package/lib/components/result/src/result.js.map +1 -1
  323. package/lib/components/result/src/result2.js +31 -63
  324. package/lib/components/result/src/result2.js.map +1 -1
  325. package/lib/components/select/src/select.js +1 -1
  326. package/lib/components/select-v2/src/defaults.js +1 -1
  327. package/lib/components/table/src/store/watcher.js +2 -2
  328. package/lib/components/table/src/store/watcher.js.map +1 -1
  329. package/lib/components/timeline/index.js +2 -2
  330. package/lib/components/timeline/src/timeline-item.js +42 -72
  331. package/lib/components/timeline/src/timeline-item.js.map +1 -1
  332. package/lib/components/timeline/src/timeline-item2.js +72 -42
  333. package/lib/components/timeline/src/timeline-item2.js.map +1 -1
  334. package/lib/components/tooltip/index.js +1 -1
  335. package/lib/components/tooltip/src/content.js +32 -177
  336. package/lib/components/tooltip/src/content.js.map +1 -1
  337. package/lib/components/tooltip/src/content2.js +177 -32
  338. package/lib/components/tooltip/src/content2.js.map +1 -1
  339. package/lib/components/tooltip/src/tooltip.js +1 -1
  340. package/lib/components/tooltip/src/tooltip2.js +1 -1
  341. package/lib/index.js +7 -7
  342. package/lib/version.d.ts +1 -1
  343. package/lib/version.js +1 -1
  344. package/lib/version.js.map +1 -1
  345. package/package.json +2 -2
  346. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","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":["useNamespace","useId","ref","useFormItem","useFormItemInputId","UPDATE_MODEL_EVENT","nextTick","onMounted","computed","provide","radioGroupKey","reactive","toRefs","watch","debugWarn","useDeprecated"],"mappings":";;;;;;;;;;;;;;;;;;;;uCAmCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,UAAUC,aAAM,EAAA,CAAA;AACtB,IAAA,MAAM,gBAAgBC,OAAoB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAE,aAAaC,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAA,EAAS,OAAS,EAAA,mBAAA,EAAA,GAAwBC,+BAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,CAAC,KAAyC,KAAA;AAC5D,MAAA,IAAA,CAAKC,0BAAoB,KAAK,CAAA,CAAA;AAC9B,MAAAC,YAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,KAAK,CAAC,CAAA,CAAA;AAAA,KACtC,CAAA;AAEA,IAAAC,aAAA,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,GAAOC,aAAS,MAAM;AAC1B,MAAO,OAAA,KAAA,CAAM,QAAQ,OAAQ,CAAA,KAAA,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAAC,WAAA,CACEC,yBACAC,YAAS,CAAA;AAAA,MACP,GAAGC,WAAO,KAAK,CAAA;AAAA,MACf,WAAA;AAAA,MACA,IAAA;AAAA,KACD,CACH,CAAA,CAAA;AAEA,IACEC,SAAA,CAAA,MAAM,KAAM,CAAA,UAAA,EACZ,MAAM;AACJ,MAAA,IAAI,MAAM,aAAe,EAAA;AACvB,QAAU,QAAA,IAAA,IAAA,GAAS,SAAU,QAAO,CAAQ,QAAA,CAAA,QAAU,OAAI,CAAA,CAAA,GAAA,KAAAC,eAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA,OAC5D;AAAA,KAEJ,CAAA,CAAA;AAEA,IACEC,qBAAA,CAAA;AAAA,MACE,IAAM,EAAA,OAAA;AAAA,MACN,WAAa,EAAA,YAAA;AAAA,MACb,OAAS,EAAA,OAAA;AAAA,MACT,KAAO,EAAA,gBAAA;AAAA,MACP,GAAK,EAAA,qDAAA;AAAA,OAEPP,YAAS,CAAA,MAAM,CAAC,CAAC,KAAA,CAAM,KAAK,CAC9B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"radio-group.js","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":["buildProps","useSizeProp","useAriaProps","radioEmits"],"mappings":";;;;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;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,GAAGC,oBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAGC;;;;;"}
@@ -2,48 +2,85 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
5
+ var vue = require('vue');
6
+ require('../../form/index.js');
7
+ require('../../../constants/index.js');
6
8
  require('../../../hooks/index.js');
7
- var radio = require('./radio.js');
8
- var runtime = require('../../../utils/vue/props/runtime.js');
9
- var index = require('../../../hooks/use-size/index.js');
10
- var index$1 = require('../../../hooks/use-aria/index.js');
9
+ require('../../../utils/index.js');
10
+ var radioGroup = require('./radio-group.js');
11
+ var constants = require('./constants.js');
12
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
13
+ var index = require('../../../hooks/use-namespace/index.js');
14
+ var index$1 = require('../../../hooks/use-id/index.js');
15
+ var useFormItem = require('../../form/src/hooks/use-form-item.js');
16
+ var event = require('../../../constants/event.js');
17
+ var error = require('../../../utils/error.js');
18
+ var index$2 = require('../../../hooks/use-deprecated/index.js');
11
19
 
12
- const radioGroupProps = runtime.buildProps({
13
- id: {
14
- type: String,
15
- default: void 0
16
- },
17
- size: index.useSizeProp,
18
- disabled: Boolean,
19
- modelValue: {
20
- type: [String, Number, Boolean],
21
- default: void 0
22
- },
23
- fill: {
24
- type: String,
25
- default: ""
26
- },
27
- label: {
28
- type: String,
29
- default: void 0
30
- },
31
- textColor: {
32
- type: String,
33
- default: ""
34
- },
35
- name: {
36
- type: String,
37
- default: void 0
38
- },
39
- validateEvent: {
40
- type: Boolean,
41
- default: true
42
- },
43
- ...index$1.useAriaProps(["ariaLabel"])
20
+ const _hoisted_1 = ["id", "aria-label", "aria-labelledby"];
21
+ const __default__ = vue.defineComponent({
22
+ name: "ElRadioGroup"
23
+ });
24
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
+ ...__default__,
26
+ props: radioGroup.radioGroupProps,
27
+ emits: radioGroup.radioGroupEmits,
28
+ setup(__props, { emit }) {
29
+ const props = __props;
30
+ const ns = index.useNamespace("radio");
31
+ const radioId = index$1.useId();
32
+ const radioGroupRef = vue.ref();
33
+ const { formItem } = useFormItem.useFormItem();
34
+ const { inputId: groupId, isLabeledByFormItem } = useFormItem.useFormItemInputId(props, {
35
+ formItemContext: formItem
36
+ });
37
+ const changeEvent = (value) => {
38
+ emit(event.UPDATE_MODEL_EVENT, value);
39
+ vue.nextTick(() => emit("change", value));
40
+ };
41
+ vue.onMounted(() => {
42
+ const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
43
+ const firstLabel = radios[0];
44
+ if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
45
+ firstLabel.tabIndex = 0;
46
+ }
47
+ });
48
+ const name = vue.computed(() => {
49
+ return props.name || radioId.value;
50
+ });
51
+ vue.provide(constants.radioGroupKey, vue.reactive({
52
+ ...vue.toRefs(props),
53
+ changeEvent,
54
+ name
55
+ }));
56
+ vue.watch(() => props.modelValue, () => {
57
+ if (props.validateEvent) {
58
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
59
+ }
60
+ });
61
+ index$2.useDeprecated({
62
+ from: "label",
63
+ replacement: "aria-label",
64
+ version: "2.8.0",
65
+ scope: "el-radio-group",
66
+ ref: "https://element-plus.org/en-US/component/radio.html"
67
+ }, vue.computed(() => !!props.label));
68
+ return (_ctx, _cache) => {
69
+ return vue.openBlock(), vue.createElementBlock("div", {
70
+ id: vue.unref(groupId),
71
+ ref_key: "radioGroupRef",
72
+ ref: radioGroupRef,
73
+ class: vue.normalizeClass(vue.unref(ns).b("group")),
74
+ role: "radiogroup",
75
+ "aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.label || _ctx.ariaLabel || "radio-group" : void 0,
76
+ "aria-labelledby": vue.unref(isLabeledByFormItem) ? vue.unref(formItem).labelId : void 0
77
+ }, [
78
+ vue.renderSlot(_ctx.$slots, "default")
79
+ ], 10, _hoisted_1);
80
+ };
81
+ }
44
82
  });
45
- const radioGroupEmits = radio.radioEmits;
83
+ var RadioGroup = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-group.vue"]]);
46
84
 
47
- exports.radioGroupEmits = radioGroupEmits;
48
- exports.radioGroupProps = radioGroupProps;
85
+ exports["default"] = RadioGroup;
49
86
  //# sourceMappingURL=radio-group2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group2.js","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":["buildProps","useSizeProp","useAriaProps","radioEmits"],"mappings":";;;;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;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,GAAGC,oBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAGC;;;;;"}
1
+ {"version":3,"file":"radio-group2.js","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":["useNamespace","useId","ref","useFormItem","useFormItemInputId","UPDATE_MODEL_EVENT","nextTick","onMounted","computed","provide","radioGroupKey","reactive","toRefs","watch","debugWarn","useDeprecated"],"mappings":";;;;;;;;;;;;;;;;;;;;uCAmCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,UAAUC,aAAM,EAAA,CAAA;AACtB,IAAA,MAAM,gBAAgBC,OAAoB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAE,aAAaC,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAA,EAAS,OAAS,EAAA,mBAAA,EAAA,GAAwBC,+BAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,CAAC,KAAyC,KAAA;AAC5D,MAAA,IAAA,CAAKC,0BAAoB,KAAK,CAAA,CAAA;AAC9B,MAAAC,YAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,KAAK,CAAC,CAAA,CAAA;AAAA,KACtC,CAAA;AAEA,IAAAC,aAAA,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,GAAOC,aAAS,MAAM;AAC1B,MAAO,OAAA,KAAA,CAAM,QAAQ,OAAQ,CAAA,KAAA,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAAC,WAAA,CACEC,yBACAC,YAAS,CAAA;AAAA,MACP,GAAGC,WAAO,KAAK,CAAA;AAAA,MACf,WAAA;AAAA,MACA,IAAA;AAAA,KACD,CACH,CAAA,CAAA;AAEA,IACEC,SAAA,CAAA,MAAM,KAAM,CAAA,UAAA,EACZ,MAAM;AACJ,MAAA,IAAI,MAAM,aAAe,EAAA;AACvB,QAAU,QAAA,IAAA,IAAA,GAAS,SAAU,QAAO,CAAQ,QAAA,CAAA,QAAU,OAAI,CAAA,CAAA,GAAA,KAAAC,eAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAAA,OAC5D;AAAA,KAEJ,CAAA,CAAA;AAEA,IACEC,qBAAA,CAAA;AAAA,MACE,IAAM,EAAA,OAAA;AAAA,MACN,WAAa,EAAA,YAAA;AAAA,MACb,OAAS,EAAA,OAAA;AAAA,MACT,KAAO,EAAA,gBAAA;AAAA,MACP,GAAK,EAAA,qDAAA;AAAA,OAEPP,YAAS,CAAA,MAAM,CAAC,CAAC,KAAA,CAAM,KAAK,CAC9B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var result$1 = require('./src/result2.js');
7
- var result = require('./src/result.js');
6
+ var result$1 = require('./src/result.js');
7
+ var result = require('./src/result2.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElResult = install.withInstall(result$1["default"]);
@@ -2,39 +2,71 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var iconsVue = require('@element-plus/icons-vue');
7
- var runtime = require('../../../utils/vue/props/runtime.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var result = require('./result2.js');
8
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
+ var index = require('../../../hooks/use-namespace/index.js');
8
10
 
9
- const IconMap = {
10
- success: "icon-success",
11
- warning: "icon-warning",
12
- error: "icon-error",
13
- info: "icon-info"
14
- };
15
- const IconComponentMap = {
16
- [IconMap.success]: iconsVue.CircleCheckFilled,
17
- [IconMap.warning]: iconsVue.WarningFilled,
18
- [IconMap.error]: iconsVue.CircleCloseFilled,
19
- [IconMap.info]: iconsVue.InfoFilled
20
- };
21
- const resultProps = runtime.buildProps({
22
- title: {
23
- type: String,
24
- default: ""
25
- },
26
- subTitle: {
27
- type: String,
28
- default: ""
29
- },
30
- icon: {
31
- type: String,
32
- values: ["success", "warning", "info", "error"],
33
- default: "info"
11
+ const __default__ = vue.defineComponent({
12
+ name: "ElResult"
13
+ });
14
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
+ ...__default__,
16
+ props: result.resultProps,
17
+ setup(__props) {
18
+ const props = __props;
19
+ const ns = index.useNamespace("result");
20
+ const resultIcon = vue.computed(() => {
21
+ const icon = props.icon;
22
+ const iconClass = icon && result.IconMap[icon] ? result.IconMap[icon] : "icon-info";
23
+ const iconComponent = result.IconComponentMap[iconClass] || result.IconComponentMap["icon-info"];
24
+ return {
25
+ class: iconClass,
26
+ component: iconComponent
27
+ };
28
+ });
29
+ return (_ctx, _cache) => {
30
+ return vue.openBlock(), vue.createElementBlock("div", {
31
+ class: vue.normalizeClass(vue.unref(ns).b())
32
+ }, [
33
+ vue.createElementVNode("div", {
34
+ class: vue.normalizeClass(vue.unref(ns).e("icon"))
35
+ }, [
36
+ vue.renderSlot(_ctx.$slots, "icon", {}, () => [
37
+ vue.unref(resultIcon).component ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(resultIcon).component), {
38
+ key: 0,
39
+ class: vue.normalizeClass(vue.unref(resultIcon).class)
40
+ }, null, 8, ["class"])) : vue.createCommentVNode("v-if", true)
41
+ ])
42
+ ], 2),
43
+ _ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("div", {
44
+ key: 0,
45
+ class: vue.normalizeClass(vue.unref(ns).e("title"))
46
+ }, [
47
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
48
+ vue.createElementVNode("p", null, vue.toDisplayString(_ctx.title), 1)
49
+ ])
50
+ ], 2)) : vue.createCommentVNode("v-if", true),
51
+ _ctx.subTitle || _ctx.$slots["sub-title"] ? (vue.openBlock(), vue.createElementBlock("div", {
52
+ key: 1,
53
+ class: vue.normalizeClass(vue.unref(ns).e("subtitle"))
54
+ }, [
55
+ vue.renderSlot(_ctx.$slots, "sub-title", {}, () => [
56
+ vue.createElementVNode("p", null, vue.toDisplayString(_ctx.subTitle), 1)
57
+ ])
58
+ ], 2)) : vue.createCommentVNode("v-if", true),
59
+ _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", {
60
+ key: 2,
61
+ class: vue.normalizeClass(vue.unref(ns).e("extra"))
62
+ }, [
63
+ vue.renderSlot(_ctx.$slots, "extra")
64
+ ], 2)) : vue.createCommentVNode("v-if", true)
65
+ ], 2);
66
+ };
34
67
  }
35
68
  });
69
+ var Result = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "result.vue"]]);
36
70
 
37
- exports.IconComponentMap = IconComponentMap;
38
- exports.IconMap = IconMap;
39
- exports.resultProps = resultProps;
71
+ exports["default"] = Result;
40
72
  //# sourceMappingURL=result.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"result.js","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result>\n"],"names":["CircleCheckFilled","WarningFilled","CircleCloseFilled","InfoFilled","buildProps"],"mappings":";;;;;;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGA,0BAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGC,sBAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAGC,0BAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAGC,mBAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAGC,kBAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;;;"}
1
+ {"version":3,"file":"result.js","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots['sub-title']\" :class=\"ns.e('subtitle')\">\n <slot name=\"sub-title\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { IconComponentMap, IconMap, resultProps } from './result'\n\ndefineOptions({\n name: 'ElResult',\n})\n\nconst props = defineProps(resultProps)\n\nconst ns = useNamespace('result')\n\nconst resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n})\n</script>\n"],"names":["useNamespace","computed","IconMap","IconComponentMap"],"mappings":";;;;;;;;;;uCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,UAAA,GAAaC,aAAS,MAAM;AAChC,MAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA;AACnB,MAAA,MAAM,SAAY,GAAA,IAAA,IAAQC,cAAQ,CAAA,IAAA,CAAA,GAAQA,eAAQ,IAAQ,CAAA,GAAA,WAAA,CAAA;AAC1D,MAAM,MAAA,aAAA,GACJC,uBAAiB,CAAA,SAAA,CAAA,IAAcA,uBAAiB,CAAA,WAAA,CAAA,CAAA;AAElD,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,SAAA;AAAA,QACP,SAAW,EAAA,aAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,71 +2,39 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var result = require('./result.js');
8
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var iconsVue = require('@element-plus/icons-vue');
7
+ var runtime = require('../../../utils/vue/props/runtime.js');
10
8
 
11
- const __default__ = vue.defineComponent({
12
- name: "ElResult"
13
- });
14
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
- ...__default__,
16
- props: result.resultProps,
17
- setup(__props) {
18
- const props = __props;
19
- const ns = index.useNamespace("result");
20
- const resultIcon = vue.computed(() => {
21
- const icon = props.icon;
22
- const iconClass = icon && result.IconMap[icon] ? result.IconMap[icon] : "icon-info";
23
- const iconComponent = result.IconComponentMap[iconClass] || result.IconComponentMap["icon-info"];
24
- return {
25
- class: iconClass,
26
- component: iconComponent
27
- };
28
- });
29
- return (_ctx, _cache) => {
30
- return vue.openBlock(), vue.createElementBlock("div", {
31
- class: vue.normalizeClass(vue.unref(ns).b())
32
- }, [
33
- vue.createElementVNode("div", {
34
- class: vue.normalizeClass(vue.unref(ns).e("icon"))
35
- }, [
36
- vue.renderSlot(_ctx.$slots, "icon", {}, () => [
37
- vue.unref(resultIcon).component ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(resultIcon).component), {
38
- key: 0,
39
- class: vue.normalizeClass(vue.unref(resultIcon).class)
40
- }, null, 8, ["class"])) : vue.createCommentVNode("v-if", true)
41
- ])
42
- ], 2),
43
- _ctx.title || _ctx.$slots.title ? (vue.openBlock(), vue.createElementBlock("div", {
44
- key: 0,
45
- class: vue.normalizeClass(vue.unref(ns).e("title"))
46
- }, [
47
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
48
- vue.createElementVNode("p", null, vue.toDisplayString(_ctx.title), 1)
49
- ])
50
- ], 2)) : vue.createCommentVNode("v-if", true),
51
- _ctx.subTitle || _ctx.$slots["sub-title"] ? (vue.openBlock(), vue.createElementBlock("div", {
52
- key: 1,
53
- class: vue.normalizeClass(vue.unref(ns).e("subtitle"))
54
- }, [
55
- vue.renderSlot(_ctx.$slots, "sub-title", {}, () => [
56
- vue.createElementVNode("p", null, vue.toDisplayString(_ctx.subTitle), 1)
57
- ])
58
- ], 2)) : vue.createCommentVNode("v-if", true),
59
- _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", {
60
- key: 2,
61
- class: vue.normalizeClass(vue.unref(ns).e("extra"))
62
- }, [
63
- vue.renderSlot(_ctx.$slots, "extra")
64
- ], 2)) : vue.createCommentVNode("v-if", true)
65
- ], 2);
66
- };
9
+ const IconMap = {
10
+ success: "icon-success",
11
+ warning: "icon-warning",
12
+ error: "icon-error",
13
+ info: "icon-info"
14
+ };
15
+ const IconComponentMap = {
16
+ [IconMap.success]: iconsVue.CircleCheckFilled,
17
+ [IconMap.warning]: iconsVue.WarningFilled,
18
+ [IconMap.error]: iconsVue.CircleCloseFilled,
19
+ [IconMap.info]: iconsVue.InfoFilled
20
+ };
21
+ const resultProps = runtime.buildProps({
22
+ title: {
23
+ type: String,
24
+ default: ""
25
+ },
26
+ subTitle: {
27
+ type: String,
28
+ default: ""
29
+ },
30
+ icon: {
31
+ type: String,
32
+ values: ["success", "warning", "info", "error"],
33
+ default: "info"
67
34
  }
68
35
  });
69
- var Result = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "result.vue"]]);
70
36
 
71
- exports["default"] = Result;
37
+ exports.IconComponentMap = IconComponentMap;
38
+ exports.IconMap = IconMap;
39
+ exports.resultProps = resultProps;
72
40
  //# sourceMappingURL=result2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"result2.js","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots['sub-title']\" :class=\"ns.e('subtitle')\">\n <slot name=\"sub-title\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { IconComponentMap, IconMap, resultProps } from './result'\n\ndefineOptions({\n name: 'ElResult',\n})\n\nconst props = defineProps(resultProps)\n\nconst ns = useNamespace('result')\n\nconst resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n})\n</script>\n"],"names":["useNamespace","computed","IconMap","IconComponentMap"],"mappings":";;;;;;;;;;uCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAKA,mBAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,UAAA,GAAaC,aAAS,MAAM;AAChC,MAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA;AACnB,MAAA,MAAM,SAAY,GAAA,IAAA,IAAQC,cAAQ,CAAA,IAAA,CAAA,GAAQA,eAAQ,IAAQ,CAAA,GAAA,WAAA,CAAA;AAC1D,MAAM,MAAA,aAAA,GACJC,uBAAiB,CAAA,SAAA,CAAA,IAAcA,uBAAiB,CAAA,WAAA,CAAA,CAAA;AAElD,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,SAAA;AAAA,QACP,SAAW,EAAA,aAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"result2.js","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result>\n"],"names":["CircleCheckFilled","WarningFilled","CircleCloseFilled","InfoFilled","buildProps"],"mappings":";;;;;;;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGA,0BAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAGC,sBAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAGC,0BAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAGC,mBAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAGC,kBAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;;;"}
@@ -10,7 +10,7 @@ var iconsVue = require('@element-plus/icons-vue');
10
10
  require('../../tag/index.js');
11
11
  var runtime = require('../../../utils/vue/props/runtime.js');
12
12
  var index = require('../../../hooks/use-size/index.js');
13
- var content = require('../../tooltip/src/content2.js');
13
+ var content = require('../../tooltip/src/content.js');
14
14
  var icon = require('../../../utils/vue/icon.js');
15
15
  var tag = require('../../tag/src/tag.js');
16
16
  var index$1 = require('../../../hooks/use-empty-values/index.js');
@@ -11,7 +11,7 @@ require('../../tag/index.js');
11
11
  var useProps = require('./useProps.js');
12
12
  var runtime = require('../../../utils/vue/props/runtime.js');
13
13
  var icon = require('../../../utils/vue/icon.js');
14
- var content = require('../../tooltip/src/content2.js');
14
+ var content = require('../../tooltip/src/content.js');
15
15
  var index = require('../../../hooks/use-size/index.js');
16
16
  var tag = require('../../tag/src/tag.js');
17
17
  var index$1 = require('../../../hooks/use-empty-values/index.js');
@@ -110,8 +110,8 @@ function useWatcher() {
110
110
  const clearSelection = () => {
111
111
  isAllSelected.value = false;
112
112
  const oldSelection = selection.value;
113
+ selection.value = [];
113
114
  if (oldSelection.length) {
114
- selection.value = [];
115
115
  instance.emit("selection-change", []);
116
116
  }
117
117
  };
@@ -171,7 +171,7 @@ function useWatcher() {
171
171
  if (selectionChanged) {
172
172
  instance.emit("selection-change", selection.value ? selection.value.slice() : []);
173
173
  }
174
- instance.emit("select-all", selection.value);
174
+ instance.emit("select-all", (selection.value || []).slice());
175
175
  };
176
176
  const updateSelectionByRowKey = () => {
177
177
  const selectedMap = util.getKeysMap(selection.value, rowKey.value);