@element-plus/nightly 0.0.20220117 → 0.0.20220118

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 (663) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/dist/index.full.js +2196 -3407
  4. package/dist/index.full.min.js +8 -10
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +8 -10
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +2189 -3403
  9. package/dist/locale/af.js +1 -1
  10. package/dist/locale/af.min.js +1 -1
  11. package/dist/locale/af.min.mjs +1 -1
  12. package/dist/locale/af.mjs +1 -1
  13. package/dist/locale/ar.js +1 -1
  14. package/dist/locale/ar.min.js +1 -1
  15. package/dist/locale/ar.min.mjs +1 -1
  16. package/dist/locale/ar.mjs +1 -1
  17. package/dist/locale/bg.js +1 -1
  18. package/dist/locale/bg.min.js +1 -1
  19. package/dist/locale/bg.min.mjs +1 -1
  20. package/dist/locale/bg.mjs +1 -1
  21. package/dist/locale/bn.js +1 -1
  22. package/dist/locale/bn.min.js +1 -1
  23. package/dist/locale/bn.min.mjs +1 -1
  24. package/dist/locale/bn.mjs +1 -1
  25. package/dist/locale/ca.js +1 -1
  26. package/dist/locale/ca.min.js +1 -1
  27. package/dist/locale/ca.min.mjs +1 -1
  28. package/dist/locale/ca.mjs +1 -1
  29. package/dist/locale/cs.js +1 -1
  30. package/dist/locale/cs.min.js +1 -1
  31. package/dist/locale/cs.min.mjs +1 -1
  32. package/dist/locale/cs.mjs +1 -1
  33. package/dist/locale/da.js +1 -1
  34. package/dist/locale/da.min.js +1 -1
  35. package/dist/locale/da.min.mjs +1 -1
  36. package/dist/locale/da.mjs +1 -1
  37. package/dist/locale/de.js +1 -1
  38. package/dist/locale/de.min.js +1 -1
  39. package/dist/locale/de.min.mjs +1 -1
  40. package/dist/locale/de.mjs +1 -1
  41. package/dist/locale/el.js +1 -1
  42. package/dist/locale/el.min.js +1 -1
  43. package/dist/locale/el.min.mjs +1 -1
  44. package/dist/locale/el.mjs +1 -1
  45. package/dist/locale/en.js +1 -1
  46. package/dist/locale/en.min.js +1 -1
  47. package/dist/locale/en.min.mjs +1 -1
  48. package/dist/locale/en.mjs +1 -1
  49. package/dist/locale/eo.js +1 -1
  50. package/dist/locale/eo.min.js +1 -1
  51. package/dist/locale/eo.min.mjs +1 -1
  52. package/dist/locale/eo.mjs +1 -1
  53. package/dist/locale/es.js +1 -1
  54. package/dist/locale/es.min.js +1 -1
  55. package/dist/locale/es.min.mjs +1 -1
  56. package/dist/locale/es.mjs +1 -1
  57. package/dist/locale/et.js +1 -1
  58. package/dist/locale/et.min.js +1 -1
  59. package/dist/locale/et.min.mjs +1 -1
  60. package/dist/locale/et.mjs +1 -1
  61. package/dist/locale/eu.js +1 -1
  62. package/dist/locale/eu.min.js +1 -1
  63. package/dist/locale/eu.min.mjs +1 -1
  64. package/dist/locale/eu.mjs +1 -1
  65. package/dist/locale/fa.js +1 -1
  66. package/dist/locale/fa.min.js +1 -1
  67. package/dist/locale/fa.min.mjs +1 -1
  68. package/dist/locale/fa.mjs +1 -1
  69. package/dist/locale/fi.js +1 -1
  70. package/dist/locale/fi.min.js +1 -1
  71. package/dist/locale/fi.min.mjs +1 -1
  72. package/dist/locale/fi.mjs +1 -1
  73. package/dist/locale/fr.js +1 -1
  74. package/dist/locale/fr.min.js +1 -1
  75. package/dist/locale/fr.min.mjs +1 -1
  76. package/dist/locale/fr.mjs +1 -1
  77. package/dist/locale/he.js +1 -1
  78. package/dist/locale/he.min.js +1 -1
  79. package/dist/locale/he.min.mjs +1 -1
  80. package/dist/locale/he.mjs +1 -1
  81. package/dist/locale/hr.js +1 -1
  82. package/dist/locale/hr.min.js +1 -1
  83. package/dist/locale/hr.min.mjs +1 -1
  84. package/dist/locale/hr.mjs +1 -1
  85. package/dist/locale/hu.js +1 -1
  86. package/dist/locale/hu.min.js +1 -1
  87. package/dist/locale/hu.min.mjs +1 -1
  88. package/dist/locale/hu.mjs +1 -1
  89. package/dist/locale/hy-am.js +1 -1
  90. package/dist/locale/hy-am.min.js +1 -1
  91. package/dist/locale/hy-am.min.mjs +1 -1
  92. package/dist/locale/hy-am.mjs +1 -1
  93. package/dist/locale/id.js +1 -1
  94. package/dist/locale/id.min.js +1 -1
  95. package/dist/locale/id.min.mjs +1 -1
  96. package/dist/locale/id.mjs +1 -1
  97. package/dist/locale/it.js +1 -1
  98. package/dist/locale/it.min.js +1 -1
  99. package/dist/locale/it.min.mjs +1 -1
  100. package/dist/locale/it.mjs +1 -1
  101. package/dist/locale/ja.js +1 -1
  102. package/dist/locale/ja.min.js +1 -1
  103. package/dist/locale/ja.min.mjs +1 -1
  104. package/dist/locale/ja.mjs +1 -1
  105. package/dist/locale/kk.js +1 -1
  106. package/dist/locale/kk.min.js +1 -1
  107. package/dist/locale/kk.min.mjs +1 -1
  108. package/dist/locale/kk.mjs +1 -1
  109. package/dist/locale/km.js +1 -1
  110. package/dist/locale/km.min.js +1 -1
  111. package/dist/locale/km.min.mjs +1 -1
  112. package/dist/locale/km.mjs +1 -1
  113. package/dist/locale/ko.js +1 -1
  114. package/dist/locale/ko.min.js +1 -1
  115. package/dist/locale/ko.min.mjs +1 -1
  116. package/dist/locale/ko.mjs +1 -1
  117. package/dist/locale/ku.js +1 -1
  118. package/dist/locale/ku.min.js +1 -1
  119. package/dist/locale/ku.min.mjs +1 -1
  120. package/dist/locale/ku.mjs +1 -1
  121. package/dist/locale/ky.js +1 -1
  122. package/dist/locale/ky.min.js +1 -1
  123. package/dist/locale/ky.min.mjs +1 -1
  124. package/dist/locale/ky.mjs +1 -1
  125. package/dist/locale/lt.js +1 -1
  126. package/dist/locale/lt.min.js +1 -1
  127. package/dist/locale/lt.min.mjs +1 -1
  128. package/dist/locale/lt.mjs +1 -1
  129. package/dist/locale/lv.js +1 -1
  130. package/dist/locale/lv.min.js +1 -1
  131. package/dist/locale/lv.min.mjs +1 -1
  132. package/dist/locale/lv.mjs +1 -1
  133. package/dist/locale/mn.js +1 -1
  134. package/dist/locale/mn.min.js +1 -1
  135. package/dist/locale/mn.min.mjs +1 -1
  136. package/dist/locale/mn.mjs +1 -1
  137. package/dist/locale/nb-no.js +1 -1
  138. package/dist/locale/nb-no.min.js +1 -1
  139. package/dist/locale/nb-no.min.mjs +1 -1
  140. package/dist/locale/nb-no.mjs +1 -1
  141. package/dist/locale/nl.js +1 -1
  142. package/dist/locale/nl.min.js +1 -1
  143. package/dist/locale/nl.min.mjs +1 -1
  144. package/dist/locale/nl.mjs +1 -1
  145. package/dist/locale/pa.js +1 -1
  146. package/dist/locale/pa.min.js +1 -1
  147. package/dist/locale/pa.min.mjs +1 -1
  148. package/dist/locale/pa.mjs +1 -1
  149. package/dist/locale/pl.js +1 -1
  150. package/dist/locale/pl.min.js +1 -1
  151. package/dist/locale/pl.min.mjs +1 -1
  152. package/dist/locale/pl.mjs +1 -1
  153. package/dist/locale/pt-br.js +1 -1
  154. package/dist/locale/pt-br.min.js +1 -1
  155. package/dist/locale/pt-br.min.mjs +1 -1
  156. package/dist/locale/pt-br.mjs +1 -1
  157. package/dist/locale/pt.js +1 -1
  158. package/dist/locale/pt.min.js +1 -1
  159. package/dist/locale/pt.min.mjs +1 -1
  160. package/dist/locale/pt.mjs +1 -1
  161. package/dist/locale/ro.js +1 -1
  162. package/dist/locale/ro.min.js +1 -1
  163. package/dist/locale/ro.min.mjs +1 -1
  164. package/dist/locale/ro.mjs +1 -1
  165. package/dist/locale/ru.js +1 -1
  166. package/dist/locale/ru.min.js +1 -1
  167. package/dist/locale/ru.min.mjs +1 -1
  168. package/dist/locale/ru.mjs +1 -1
  169. package/dist/locale/sk.js +1 -1
  170. package/dist/locale/sk.min.js +1 -1
  171. package/dist/locale/sk.min.mjs +1 -1
  172. package/dist/locale/sk.mjs +1 -1
  173. package/dist/locale/sl.js +1 -1
  174. package/dist/locale/sl.min.js +1 -1
  175. package/dist/locale/sl.min.mjs +1 -1
  176. package/dist/locale/sl.mjs +1 -1
  177. package/dist/locale/sr.js +1 -1
  178. package/dist/locale/sr.min.js +1 -1
  179. package/dist/locale/sr.min.mjs +1 -1
  180. package/dist/locale/sr.mjs +1 -1
  181. package/dist/locale/sv.js +1 -1
  182. package/dist/locale/sv.min.js +1 -1
  183. package/dist/locale/sv.min.mjs +1 -1
  184. package/dist/locale/sv.mjs +1 -1
  185. package/dist/locale/ta.js +1 -1
  186. package/dist/locale/ta.min.js +1 -1
  187. package/dist/locale/ta.min.mjs +1 -1
  188. package/dist/locale/ta.mjs +1 -1
  189. package/dist/locale/th.js +1 -1
  190. package/dist/locale/th.min.js +1 -1
  191. package/dist/locale/th.min.mjs +1 -1
  192. package/dist/locale/th.mjs +1 -1
  193. package/dist/locale/tk.js +1 -1
  194. package/dist/locale/tk.min.js +1 -1
  195. package/dist/locale/tk.min.mjs +1 -1
  196. package/dist/locale/tk.mjs +1 -1
  197. package/dist/locale/tr.js +1 -1
  198. package/dist/locale/tr.min.js +1 -1
  199. package/dist/locale/tr.min.mjs +1 -1
  200. package/dist/locale/tr.mjs +1 -1
  201. package/dist/locale/ug-cn.js +1 -1
  202. package/dist/locale/ug-cn.min.js +1 -1
  203. package/dist/locale/ug-cn.min.mjs +1 -1
  204. package/dist/locale/ug-cn.mjs +1 -1
  205. package/dist/locale/uk.js +1 -1
  206. package/dist/locale/uk.min.js +1 -1
  207. package/dist/locale/uk.min.mjs +1 -1
  208. package/dist/locale/uk.mjs +1 -1
  209. package/dist/locale/uz-uz.js +1 -1
  210. package/dist/locale/uz-uz.min.js +1 -1
  211. package/dist/locale/uz-uz.min.mjs +1 -1
  212. package/dist/locale/uz-uz.mjs +1 -1
  213. package/dist/locale/vi.js +1 -1
  214. package/dist/locale/vi.min.js +1 -1
  215. package/dist/locale/vi.min.mjs +1 -1
  216. package/dist/locale/vi.mjs +1 -1
  217. package/dist/locale/zh-cn.js +1 -1
  218. package/dist/locale/zh-cn.min.js +1 -1
  219. package/dist/locale/zh-cn.min.mjs +1 -1
  220. package/dist/locale/zh-cn.mjs +1 -1
  221. package/dist/locale/zh-tw.js +1 -1
  222. package/dist/locale/zh-tw.min.js +1 -1
  223. package/dist/locale/zh-tw.min.mjs +1 -1
  224. package/dist/locale/zh-tw.mjs +1 -1
  225. package/es/components/alert/index.d.ts +5 -5
  226. package/es/components/alert/src/alert.d.ts +1 -1
  227. package/es/components/alert/src/alert.vue.d.ts +5 -5
  228. package/es/components/avatar/index.d.ts +1 -1
  229. package/es/components/avatar/src/avatar.d.ts +3 -1
  230. package/es/components/avatar/src/avatar.mjs +1 -1
  231. package/es/components/avatar/src/avatar.mjs.map +1 -1
  232. package/es/components/avatar/src/avatar.vue.d.ts +1 -1
  233. package/es/components/avatar/src/avatar.vue_vue_type_script_lang.mjs +13 -8
  234. package/es/components/avatar/src/avatar.vue_vue_type_script_lang.mjs.map +1 -1
  235. package/es/components/avatar/src/avatar.vue_vue_type_template_id_46e3f365_lang.mjs.map +1 -1
  236. package/es/components/button/index.d.ts +6 -0
  237. package/es/components/button/src/button-group.vue.d.ts +2 -0
  238. package/es/components/button/src/button.vue.d.ts +2 -0
  239. package/es/components/card/index.d.ts +13 -1
  240. package/es/components/card/src/card.d.ts +2 -0
  241. package/es/components/card/src/card.mjs.map +1 -1
  242. package/es/components/card/src/card.vue.d.ts +13 -1
  243. package/es/components/card/src/card.vue_vue_type_script_lang.mjs +9 -1
  244. package/es/components/card/src/card.vue_vue_type_script_lang.mjs.map +1 -1
  245. package/es/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.mjs +8 -9
  246. package/es/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.mjs.map +1 -1
  247. package/es/components/cascader/index.d.ts +38 -34
  248. package/es/components/cascader/src/index.vue.d.ts +19 -17
  249. package/es/components/check-tag/index.d.ts +21 -9
  250. package/es/components/check-tag/index.mjs +3 -2
  251. package/es/components/check-tag/index.mjs.map +1 -1
  252. package/es/components/check-tag/src/check-tag.d.ts +12 -0
  253. package/es/components/check-tag/src/check-tag.mjs +16 -0
  254. package/es/components/check-tag/src/check-tag.mjs.map +1 -0
  255. package/es/components/check-tag/src/check-tag.vue.d.ts +29 -0
  256. package/es/components/check-tag/src/check-tag.vue_vue_type_script_lang.mjs +25 -0
  257. package/es/components/check-tag/src/check-tag.vue_vue_type_script_lang.mjs.map +1 -0
  258. package/es/components/check-tag/src/{index.vue_vue_type_template_id_58558910_lang.mjs → check-tag.vue_vue_type_template_id_d949910a_lang.mjs} +2 -5
  259. package/es/components/check-tag/src/check-tag.vue_vue_type_template_id_d949910a_lang.mjs.map +1 -0
  260. package/es/components/check-tag/src/check-tag2.mjs +7 -0
  261. package/es/components/check-tag/src/check-tag2.mjs.map +1 -0
  262. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +2 -1
  263. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.mjs +10 -1
  264. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.mjs.map +1 -1
  265. package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_template_id_78e07aa7_lang.mjs.map +1 -1
  266. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -1
  267. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.mjs +12 -1
  268. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.mjs.map +1 -1
  269. package/es/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_template_id_62b45ab2_lang.mjs.map +1 -1
  270. package/es/components/descriptions/index.d.ts +4 -4
  271. package/es/components/descriptions/src/index.vue.d.ts +4 -4
  272. package/es/components/divider/index.d.ts +14 -1
  273. package/es/components/divider/src/divider.d.ts +2 -0
  274. package/es/components/divider/src/divider.mjs.map +1 -1
  275. package/es/components/divider/src/divider.vue.d.ts +15 -1
  276. package/es/components/divider/src/divider.vue_vue_type_script_lang.mjs +16 -2
  277. package/es/components/divider/src/divider.vue_vue_type_script_lang.mjs.map +1 -1
  278. package/es/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.mjs +3 -3
  279. package/es/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.mjs.map +1 -1
  280. package/es/components/dropdown/index.d.ts +13 -11
  281. package/es/components/dropdown/src/dropdown.vue.d.ts +13 -11
  282. package/es/components/empty/index.d.ts +11 -0
  283. package/es/components/empty/src/empty.d.ts +2 -0
  284. package/es/components/empty/src/empty.mjs.map +1 -1
  285. package/es/components/empty/src/empty.vue.d.ts +11 -0
  286. package/es/components/empty/src/empty.vue_vue_type_script_lang.mjs +3 -0
  287. package/es/components/empty/src/empty.vue_vue_type_script_lang.mjs.map +1 -1
  288. package/es/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.mjs +20 -19
  289. package/es/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.mjs.map +1 -1
  290. package/es/components/icon/index.d.ts +11 -0
  291. package/es/components/icon/src/icon.d.ts +2 -0
  292. package/es/components/icon/src/icon.mjs.map +1 -1
  293. package/es/components/icon/src/icon.vue.d.ts +11 -0
  294. package/es/components/icon/src/icon.vue_vue_type_script_lang.mjs +14 -15
  295. package/es/components/icon/src/icon.vue_vue_type_script_lang.mjs.map +1 -1
  296. package/es/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.mjs +1 -1
  297. package/es/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.mjs.map +1 -1
  298. package/es/components/image/src/image.vue_vue_type_script_lang.mjs +14 -3
  299. package/es/components/image/src/image.vue_vue_type_script_lang.mjs.map +1 -1
  300. package/es/components/image/src/image.vue_vue_type_template_id_34467287_lang.mjs.map +1 -1
  301. package/es/components/index.mjs +2 -0
  302. package/es/components/index.mjs.map +1 -1
  303. package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs +1 -1
  304. package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs.map +1 -1
  305. package/es/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.mjs.map +1 -1
  306. package/es/components/link/index.d.ts +11 -0
  307. package/es/components/link/src/link.d.ts +2 -0
  308. package/es/components/link/src/link.mjs.map +1 -1
  309. package/es/components/link/src/link.vue.d.ts +11 -0
  310. package/es/components/link/src/link.vue_vue_type_script_lang.mjs +4 -0
  311. package/es/components/link/src/link.vue_vue_type_script_lang.mjs.map +1 -1
  312. package/es/components/link/src/link.vue_vue_type_template_id_6a422645_lang.mjs +7 -8
  313. package/es/components/link/src/link.vue_vue_type_template_id_6a422645_lang.mjs.map +1 -1
  314. package/es/components/menu/index.d.ts +2 -2
  315. package/es/components/menu/src/menu.d.ts +2 -2
  316. package/es/components/pagination/index.d.ts +2 -2
  317. package/es/components/pagination/src/pagination.d.ts +2 -2
  318. package/es/components/popover/index.d.ts +32 -26
  319. package/es/components/popover/src/index.vue.d.ts +16 -13
  320. package/es/components/popover/src/index.vue_vue_type_script_lang.mjs +6 -1
  321. package/es/components/popover/src/index.vue_vue_type_script_lang.mjs.map +1 -1
  322. package/es/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.mjs.map +1 -1
  323. package/es/components/rate/index.d.ts +11 -0
  324. package/es/components/rate/src/rate.d.ts +2 -0
  325. package/es/components/rate/src/rate.mjs +1 -1
  326. package/es/components/rate/src/rate.mjs.map +1 -1
  327. package/es/components/rate/src/rate.vue.d.ts +11 -0
  328. package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs +7 -5
  329. package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs.map +1 -1
  330. package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs +7 -7
  331. package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs.map +1 -1
  332. package/es/components/result/index.d.ts +11 -0
  333. package/es/components/result/src/result.d.ts +2 -0
  334. package/es/components/result/src/result.mjs.map +1 -1
  335. package/es/components/result/src/result.vue.d.ts +11 -0
  336. package/es/components/result/src/result.vue_vue_type_script_lang.mjs +4 -0
  337. package/es/components/result/src/result.vue_vue_type_script_lang.mjs.map +1 -1
  338. package/es/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.mjs +24 -25
  339. package/es/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.mjs.map +1 -1
  340. package/es/components/row/index.d.ts +3 -3
  341. package/es/components/row/src/row.d.ts +7 -6
  342. package/es/components/row/src/row.mjs +9 -6
  343. package/es/components/row/src/row.mjs.map +1 -1
  344. package/es/components/scrollbar/index.d.ts +2 -2
  345. package/es/components/scrollbar/src/bar.vue_vue_type_script_lang.mjs +11 -4
  346. package/es/components/scrollbar/src/bar.vue_vue_type_script_lang.mjs.map +1 -1
  347. package/es/components/scrollbar/src/bar.vue_vue_type_template_id_2f63f10a_lang.mjs.map +1 -1
  348. package/es/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  349. package/es/components/select/index.d.ts +15 -13
  350. package/es/components/select/src/select.vue.d.ts +15 -13
  351. package/es/components/select/src/useSelect.d.ts +13 -11
  352. package/es/components/select-v2/index.d.ts +38 -28
  353. package/es/components/select-v2/src/defaults.d.ts +4 -1
  354. package/es/components/select-v2/src/defaults.mjs +4 -1
  355. package/es/components/select-v2/src/defaults.mjs.map +1 -1
  356. package/es/components/select-v2/src/select.vue.d.ts +19 -14
  357. package/es/components/select-v2/src/useSelect.d.ts +13 -11
  358. package/es/components/select-v2/src/useSelect.mjs +1 -1
  359. package/es/components/select-v2/src/useSelect.mjs.map +1 -1
  360. package/es/components/space/index.d.ts +2 -2
  361. package/es/components/space/src/space.d.ts +2 -2
  362. package/es/components/steps/index.d.ts +2 -2
  363. package/es/components/steps/src/index.vue.d.ts +2 -2
  364. package/es/components/switch/index.d.ts +11 -0
  365. package/es/components/switch/src/switch.vue.d.ts +11 -0
  366. package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs +5 -3
  367. package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs.map +1 -1
  368. package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs +21 -21
  369. package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs.map +1 -1
  370. package/es/components/table/index.d.ts +2 -2
  371. package/es/components/table/src/filter-panel.vue.d.ts +13 -11
  372. package/es/components/table/src/store/index.mjs +1 -1
  373. package/es/components/table/src/store/index.mjs.map +1 -1
  374. package/es/components/table/src/store/watcher.mjs +0 -5
  375. package/es/components/table/src/store/watcher.mjs.map +1 -1
  376. package/es/components/table/src/table.vue.d.ts +2 -2
  377. package/es/components/table/src/util.mjs +1 -1
  378. package/es/components/table/src/util.mjs.map +1 -1
  379. package/es/components/tag/index.d.ts +3 -3
  380. package/es/components/tag/src/tag.d.ts +1 -1
  381. package/es/components/tag/src/tag.vue.d.ts +3 -3
  382. package/es/components/time-picker/src/common/picker.vue.d.ts +16 -12
  383. package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs +12 -1
  384. package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs.map +1 -1
  385. package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs +5 -4
  386. package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs.map +1 -1
  387. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -1
  388. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.mjs +10 -10
  389. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.mjs.map +1 -1
  390. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.mjs +1 -1
  391. package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.mjs.map +1 -1
  392. package/es/components/timeline/index.d.ts +78 -106
  393. package/es/components/timeline/index.mjs +7 -7
  394. package/es/components/timeline/index.mjs.map +1 -1
  395. package/es/components/timeline/src/timeline-item.d.ts +15 -0
  396. package/es/components/timeline/src/timeline-item.mjs +43 -0
  397. package/es/components/timeline/src/timeline-item.mjs.map +1 -0
  398. package/es/components/timeline/src/timeline-item.vue.d.ts +54 -0
  399. package/es/components/timeline/src/timeline-item.vue_vue_type_script_lang.mjs +22 -0
  400. package/es/components/timeline/src/timeline-item.vue_vue_type_script_lang.mjs.map +1 -0
  401. package/es/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.mjs +60 -0
  402. package/es/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.mjs.map +1 -0
  403. package/es/components/timeline/src/timeline-item2.mjs +7 -0
  404. package/es/components/timeline/src/timeline-item2.mjs.map +1 -0
  405. package/es/components/timeline/src/{index.vue.d.ts → timeline.d.ts} +3 -2
  406. package/es/components/timeline/src/timeline.mjs +17 -0
  407. package/es/components/timeline/src/timeline.mjs.map +1 -0
  408. package/es/components/tooltip/index.d.ts +5 -4
  409. package/es/components/tooltip/src/content.vue.d.ts +4 -4
  410. package/es/components/tooltip/src/tooltip.vue.d.ts +5 -4
  411. package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs +1 -0
  412. package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs.map +1 -1
  413. package/es/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.mjs.map +1 -1
  414. package/es/components/virtual-list/src/builders/build-list.d.ts +2 -2
  415. package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +2 -2
  416. package/es/components/virtual-list/src/components/fixed-size-list.d.ts +2 -2
  417. package/es/hooks/use-namespace/index.d.ts +2 -0
  418. package/es/hooks/use-namespace/index.mjs +16 -11
  419. package/es/hooks/use-namespace/index.mjs.map +1 -1
  420. package/es/index.mjs +2 -0
  421. package/es/index.mjs.map +1 -1
  422. package/es/version.d.ts +1 -1
  423. package/es/version.mjs +1 -1
  424. package/es/version.mjs.map +1 -1
  425. package/lib/components/alert/index.d.ts +5 -5
  426. package/lib/components/alert/src/alert.d.ts +1 -1
  427. package/lib/components/alert/src/alert.vue.d.ts +5 -5
  428. package/lib/components/avatar/index.d.ts +1 -1
  429. package/lib/components/avatar/src/avatar.d.ts +3 -1
  430. package/lib/components/avatar/src/avatar.js +1 -1
  431. package/lib/components/avatar/src/avatar.js.map +1 -1
  432. package/lib/components/avatar/src/avatar.vue.d.ts +1 -1
  433. package/lib/components/avatar/src/avatar.vue_vue_type_script_lang.js +13 -8
  434. package/lib/components/avatar/src/avatar.vue_vue_type_script_lang.js.map +1 -1
  435. package/lib/components/avatar/src/avatar.vue_vue_type_template_id_46e3f365_lang.js.map +1 -1
  436. package/lib/components/button/index.d.ts +6 -0
  437. package/lib/components/button/src/button-group.vue.d.ts +2 -0
  438. package/lib/components/button/src/button.vue.d.ts +2 -0
  439. package/lib/components/card/index.d.ts +13 -1
  440. package/lib/components/card/src/card.d.ts +2 -0
  441. package/lib/components/card/src/card.js.map +1 -1
  442. package/lib/components/card/src/card.vue.d.ts +13 -1
  443. package/lib/components/card/src/card.vue_vue_type_script_lang.js +9 -1
  444. package/lib/components/card/src/card.vue_vue_type_script_lang.js.map +1 -1
  445. package/lib/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.js +8 -9
  446. package/lib/components/card/src/card.vue_vue_type_template_id_7a6bdf05_lang.js.map +1 -1
  447. package/lib/components/cascader/index.d.ts +38 -34
  448. package/lib/components/cascader/src/index.vue.d.ts +19 -17
  449. package/lib/components/check-tag/index.d.ts +21 -9
  450. package/lib/components/check-tag/index.js +6 -3
  451. package/lib/components/check-tag/index.js.map +1 -1
  452. package/lib/components/check-tag/src/check-tag.d.ts +12 -0
  453. package/lib/components/check-tag/src/check-tag.js +21 -0
  454. package/lib/components/check-tag/src/check-tag.js.map +1 -0
  455. package/lib/components/check-tag/src/check-tag.vue.d.ts +29 -0
  456. package/lib/components/check-tag/src/{index.vue_vue_type_script_lang.js → check-tag.vue_vue_type_script_lang.js} +8 -10
  457. package/lib/components/check-tag/src/check-tag.vue_vue_type_script_lang.js.map +1 -0
  458. package/lib/components/check-tag/src/{index.vue_vue_type_template_id_58558910_lang.js → check-tag.vue_vue_type_template_id_d949910a_lang.js} +2 -5
  459. package/lib/components/check-tag/src/check-tag.vue_vue_type_template_id_d949910a_lang.js.map +1 -0
  460. package/lib/components/check-tag/src/check-tag2.js +12 -0
  461. package/lib/components/check-tag/src/check-tag2.js.map +1 -0
  462. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +2 -1
  463. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.js +10 -1
  464. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_script_lang.js.map +1 -1
  465. package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue_vue_type_template_id_78e07aa7_lang.js.map +1 -1
  466. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +2 -1
  467. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.js +12 -1
  468. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_script_lang.js.map +1 -1
  469. package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue_vue_type_template_id_62b45ab2_lang.js.map +1 -1
  470. package/lib/components/descriptions/index.d.ts +4 -4
  471. package/lib/components/descriptions/src/index.vue.d.ts +4 -4
  472. package/lib/components/divider/index.d.ts +14 -1
  473. package/lib/components/divider/src/divider.d.ts +2 -0
  474. package/lib/components/divider/src/divider.js.map +1 -1
  475. package/lib/components/divider/src/divider.vue.d.ts +15 -1
  476. package/lib/components/divider/src/divider.vue_vue_type_script_lang.js +15 -1
  477. package/lib/components/divider/src/divider.vue_vue_type_script_lang.js.map +1 -1
  478. package/lib/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.js +3 -3
  479. package/lib/components/divider/src/divider.vue_vue_type_template_id_6ddd3543_lang.js.map +1 -1
  480. package/lib/components/dropdown/index.d.ts +13 -11
  481. package/lib/components/dropdown/src/dropdown.vue.d.ts +13 -11
  482. package/lib/components/empty/index.d.ts +11 -0
  483. package/lib/components/empty/src/empty.d.ts +2 -0
  484. package/lib/components/empty/src/empty.js.map +1 -1
  485. package/lib/components/empty/src/empty.vue.d.ts +11 -0
  486. package/lib/components/empty/src/empty.vue_vue_type_script_lang.js +3 -0
  487. package/lib/components/empty/src/empty.vue_vue_type_script_lang.js.map +1 -1
  488. package/lib/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.js +19 -18
  489. package/lib/components/empty/src/empty.vue_vue_type_template_id_10d211eb_lang.js.map +1 -1
  490. package/lib/components/icon/index.d.ts +11 -0
  491. package/lib/components/icon/src/icon.d.ts +2 -0
  492. package/lib/components/icon/src/icon.js.map +1 -1
  493. package/lib/components/icon/src/icon.vue.d.ts +11 -0
  494. package/lib/components/icon/src/icon.vue_vue_type_script_lang.js +13 -14
  495. package/lib/components/icon/src/icon.vue_vue_type_script_lang.js.map +1 -1
  496. package/lib/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.js +1 -1
  497. package/lib/components/icon/src/icon.vue_vue_type_template_id_89b755b6_lang.js.map +1 -1
  498. package/lib/components/image/src/image.vue_vue_type_script_lang.js +14 -3
  499. package/lib/components/image/src/image.vue_vue_type_script_lang.js.map +1 -1
  500. package/lib/components/image/src/image.vue_vue_type_template_id_34467287_lang.js.map +1 -1
  501. package/lib/components/index.js +5 -0
  502. package/lib/components/index.js.map +1 -1
  503. package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js +1 -1
  504. package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js.map +1 -1
  505. package/lib/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.js.map +1 -1
  506. package/lib/components/link/index.d.ts +11 -0
  507. package/lib/components/link/src/link.d.ts +2 -0
  508. package/lib/components/link/src/link.js.map +1 -1
  509. package/lib/components/link/src/link.vue.d.ts +11 -0
  510. package/lib/components/link/src/link.vue_vue_type_script_lang.js +4 -0
  511. package/lib/components/link/src/link.vue_vue_type_script_lang.js.map +1 -1
  512. package/lib/components/link/src/link.vue_vue_type_template_id_6a422645_lang.js +7 -8
  513. package/lib/components/link/src/link.vue_vue_type_template_id_6a422645_lang.js.map +1 -1
  514. package/lib/components/menu/index.d.ts +2 -2
  515. package/lib/components/menu/src/menu.d.ts +2 -2
  516. package/lib/components/pagination/index.d.ts +2 -2
  517. package/lib/components/pagination/src/pagination.d.ts +2 -2
  518. package/lib/components/popover/index.d.ts +32 -26
  519. package/lib/components/popover/src/index.vue.d.ts +16 -13
  520. package/lib/components/popover/src/index.vue_vue_type_script_lang.js +6 -1
  521. package/lib/components/popover/src/index.vue_vue_type_script_lang.js.map +1 -1
  522. package/lib/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.js.map +1 -1
  523. package/lib/components/rate/index.d.ts +11 -0
  524. package/lib/components/rate/src/rate.d.ts +2 -0
  525. package/lib/components/rate/src/rate.js +1 -1
  526. package/lib/components/rate/src/rate.js.map +1 -1
  527. package/lib/components/rate/src/rate.vue.d.ts +11 -0
  528. package/lib/components/rate/src/rate.vue_vue_type_script_lang.js +7 -5
  529. package/lib/components/rate/src/rate.vue_vue_type_script_lang.js.map +1 -1
  530. package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js +7 -7
  531. package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js.map +1 -1
  532. package/lib/components/result/index.d.ts +11 -0
  533. package/lib/components/result/src/result.d.ts +2 -0
  534. package/lib/components/result/src/result.js.map +1 -1
  535. package/lib/components/result/src/result.vue.d.ts +11 -0
  536. package/lib/components/result/src/result.vue_vue_type_script_lang.js +4 -0
  537. package/lib/components/result/src/result.vue_vue_type_script_lang.js.map +1 -1
  538. package/lib/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.js +23 -24
  539. package/lib/components/result/src/result.vue_vue_type_template_id_263c10e5_lang.js.map +1 -1
  540. package/lib/components/row/index.d.ts +3 -3
  541. package/lib/components/row/src/row.d.ts +7 -6
  542. package/lib/components/row/src/row.js +9 -6
  543. package/lib/components/row/src/row.js.map +1 -1
  544. package/lib/components/scrollbar/index.d.ts +2 -2
  545. package/lib/components/scrollbar/src/bar.vue_vue_type_script_lang.js +10 -3
  546. package/lib/components/scrollbar/src/bar.vue_vue_type_script_lang.js.map +1 -1
  547. package/lib/components/scrollbar/src/bar.vue_vue_type_template_id_2f63f10a_lang.js.map +1 -1
  548. package/lib/components/scrollbar/src/scrollbar.vue.d.ts +2 -2
  549. package/lib/components/select/index.d.ts +15 -13
  550. package/lib/components/select/src/select.vue.d.ts +15 -13
  551. package/lib/components/select/src/useSelect.d.ts +13 -11
  552. package/lib/components/select-v2/index.d.ts +38 -28
  553. package/lib/components/select-v2/src/defaults.d.ts +4 -1
  554. package/lib/components/select-v2/src/defaults.js +4 -1
  555. package/lib/components/select-v2/src/defaults.js.map +1 -1
  556. package/lib/components/select-v2/src/select.vue.d.ts +19 -14
  557. package/lib/components/select-v2/src/useSelect.d.ts +13 -11
  558. package/lib/components/select-v2/src/useSelect.js +1 -1
  559. package/lib/components/select-v2/src/useSelect.js.map +1 -1
  560. package/lib/components/space/index.d.ts +2 -2
  561. package/lib/components/space/src/space.d.ts +2 -2
  562. package/lib/components/steps/index.d.ts +2 -2
  563. package/lib/components/steps/src/index.vue.d.ts +2 -2
  564. package/lib/components/switch/index.d.ts +11 -0
  565. package/lib/components/switch/src/switch.vue.d.ts +11 -0
  566. package/lib/components/switch/src/switch.vue_vue_type_script_lang.js +5 -3
  567. package/lib/components/switch/src/switch.vue_vue_type_script_lang.js.map +1 -1
  568. package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js +21 -21
  569. package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js.map +1 -1
  570. package/lib/components/table/index.d.ts +2 -2
  571. package/lib/components/table/src/filter-panel.vue.d.ts +13 -11
  572. package/lib/components/table/src/store/index.js +1 -1
  573. package/lib/components/table/src/store/index.js.map +1 -1
  574. package/lib/components/table/src/store/watcher.js +0 -5
  575. package/lib/components/table/src/store/watcher.js.map +1 -1
  576. package/lib/components/table/src/table.vue.d.ts +2 -2
  577. package/lib/components/table/src/util.js +1 -1
  578. package/lib/components/table/src/util.js.map +1 -1
  579. package/lib/components/tag/index.d.ts +3 -3
  580. package/lib/components/tag/src/tag.d.ts +1 -1
  581. package/lib/components/tag/src/tag.vue.d.ts +3 -3
  582. package/lib/components/time-picker/src/common/picker.vue.d.ts +16 -12
  583. package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js +12 -1
  584. package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js.map +1 -1
  585. package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js +5 -4
  586. package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js.map +1 -1
  587. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +1 -1
  588. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.js +10 -10
  589. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_script_lang.js.map +1 -1
  590. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.js +1 -1
  591. package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue_vue_type_template_id_4fb3c576_lang.js.map +1 -1
  592. package/lib/components/timeline/index.d.ts +78 -106
  593. package/lib/components/timeline/index.js +8 -7
  594. package/lib/components/timeline/index.js.map +1 -1
  595. package/lib/components/timeline/src/timeline-item.d.ts +15 -0
  596. package/lib/components/timeline/src/timeline-item.js +47 -0
  597. package/lib/components/timeline/src/timeline-item.js.map +1 -0
  598. package/lib/components/timeline/src/timeline-item.vue.d.ts +54 -0
  599. package/lib/components/timeline/src/timeline-item.vue_vue_type_script_lang.js +26 -0
  600. package/lib/components/timeline/src/timeline-item.vue_vue_type_script_lang.js.map +1 -0
  601. package/lib/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.js +64 -0
  602. package/lib/components/timeline/src/timeline-item.vue_vue_type_template_id_1db6c36b_lang.js.map +1 -0
  603. package/lib/components/timeline/src/timeline-item2.js +12 -0
  604. package/lib/components/timeline/src/timeline-item2.js.map +1 -0
  605. package/lib/components/timeline/src/{index.vue.d.ts → timeline.d.ts} +3 -2
  606. package/lib/components/timeline/src/timeline.js +21 -0
  607. package/lib/components/timeline/src/timeline.js.map +1 -0
  608. package/lib/components/tooltip/index.d.ts +5 -4
  609. package/lib/components/tooltip/src/content.vue.d.ts +4 -4
  610. package/lib/components/tooltip/src/tooltip.vue.d.ts +5 -4
  611. package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js +1 -0
  612. package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js.map +1 -1
  613. package/lib/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.js.map +1 -1
  614. package/lib/components/virtual-list/src/builders/build-list.d.ts +2 -2
  615. package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +2 -2
  616. package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +2 -2
  617. package/lib/hooks/use-namespace/index.d.ts +2 -0
  618. package/lib/hooks/use-namespace/index.js +16 -15
  619. package/lib/hooks/use-namespace/index.js.map +1 -1
  620. package/lib/index.js +5 -0
  621. package/lib/index.js.map +1 -1
  622. package/lib/version.d.ts +1 -1
  623. package/lib/version.js +1 -1
  624. package/lib/version.js.map +1 -1
  625. package/package.json +2 -2
  626. package/tags.json +1 -1
  627. package/theme-chalk/el-popper.css +1 -1
  628. package/theme-chalk/index.css +1 -1
  629. package/theme-chalk/src/popper.scss +1 -1
  630. package/web-types.json +1 -1
  631. package/es/components/check-tag/src/index.mjs +0 -7
  632. package/es/components/check-tag/src/index.mjs.map +0 -1
  633. package/es/components/check-tag/src/index.vue.d.ts +0 -26
  634. package/es/components/check-tag/src/index.vue_vue_type_script_lang.mjs +0 -26
  635. package/es/components/check-tag/src/index.vue_vue_type_script_lang.mjs.map +0 -1
  636. package/es/components/check-tag/src/index.vue_vue_type_template_id_58558910_lang.mjs.map +0 -1
  637. package/es/components/timeline/src/index.mjs +0 -5
  638. package/es/components/timeline/src/index.mjs.map +0 -1
  639. package/es/components/timeline/src/index.vue_vue_type_script_lang.mjs +0 -17
  640. package/es/components/timeline/src/index.vue_vue_type_script_lang.mjs.map +0 -1
  641. package/es/components/timeline/src/item.mjs +0 -7
  642. package/es/components/timeline/src/item.mjs.map +0 -1
  643. package/es/components/timeline/src/item.vue.d.ts +0 -70
  644. package/es/components/timeline/src/item.vue_vue_type_script_lang.mjs +0 -53
  645. package/es/components/timeline/src/item.vue_vue_type_script_lang.mjs.map +0 -1
  646. package/es/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.mjs +0 -59
  647. package/es/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.mjs.map +0 -1
  648. package/lib/components/check-tag/src/index.js +0 -13
  649. package/lib/components/check-tag/src/index.js.map +0 -1
  650. package/lib/components/check-tag/src/index.vue.d.ts +0 -26
  651. package/lib/components/check-tag/src/index.vue_vue_type_script_lang.js.map +0 -1
  652. package/lib/components/check-tag/src/index.vue_vue_type_template_id_58558910_lang.js.map +0 -1
  653. package/lib/components/timeline/src/index.js +0 -10
  654. package/lib/components/timeline/src/index.js.map +0 -1
  655. package/lib/components/timeline/src/index.vue_vue_type_script_lang.js +0 -21
  656. package/lib/components/timeline/src/index.vue_vue_type_script_lang.js.map +0 -1
  657. package/lib/components/timeline/src/item.js +0 -12
  658. package/lib/components/timeline/src/item.js.map +0 -1
  659. package/lib/components/timeline/src/item.vue.d.ts +0 -70
  660. package/lib/components/timeline/src/item.vue_vue_type_script_lang.js +0 -57
  661. package/lib/components/timeline/src/item.vue_vue_type_script_lang.js.map +0 -1
  662. package/lib/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.js +0 -63
  663. package/lib/components/timeline/src/item.vue_vue_type_template_id_174d5b12_lang.js.map +0 -1
@@ -10,6 +10,7 @@ import '../../../hooks/index.mjs';
10
10
  import { rateProps, rateEmits } from './rate.mjs';
11
11
  import { elFormKey } from '../../../tokens/form.mjs';
12
12
  import { useSize } from '../../../hooks/use-common-props/index.mjs';
13
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
13
14
 
14
15
  function getValueFromMap(value, map) {
15
16
  const isExcludedObject = (val) => isObject(val);
@@ -33,11 +34,11 @@ var script = defineComponent({
33
34
  setup(props, { emit }) {
34
35
  const elForm = inject(elFormKey, {});
35
36
  const rateSize = useSize();
37
+ const ns = useNamespace("rate");
36
38
  const currentValue = ref(props.modelValue);
37
39
  const hoverIndex = ref(-1);
38
40
  const pointerAtLeftHalf = ref(true);
39
- const prefix = "el-rate";
40
- const rateKls = computed(() => [prefix, `${prefix}--${rateSize.value}`]);
41
+ const rateKls = computed(() => [ns.b(), ns.m(rateSize.value)]);
41
42
  const rateDisabled = computed(() => props.disabled || elForm.disabled);
42
43
  const text = computed(() => {
43
44
  let result = "";
@@ -147,10 +148,10 @@ var script = defineComponent({
147
148
  }
148
149
  if (props.allowHalf) {
149
150
  let target = event.target;
150
- if (hasClass(target, "el-rate__item")) {
151
- target = target.querySelector(".el-rate__icon");
151
+ if (hasClass(target, ns.e("item"))) {
152
+ target = target.querySelector(`.${ns.e("icon")}`);
152
153
  }
153
- if (target.clientWidth === 0 || hasClass(target, "el-rate__decimal")) {
154
+ if (target.clientWidth === 0 || hasClass(target, ns.e("decimal"))) {
154
155
  target = target.parentNode;
155
156
  }
156
157
  pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth;
@@ -178,6 +179,7 @@ var script = defineComponent({
178
179
  emit(UPDATE_MODEL_EVENT, 0);
179
180
  }
180
181
  return {
182
+ ns,
181
183
  hoverIndex,
182
184
  currentValue,
183
185
  rateDisabled,
@@ -1 +1 @@
1
- {"version":3,"file":"rate.vue_vue_type_script_lang.mjs","sources":["../../../../../../packages/components/rate/src/rate.vue"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n class=\"el-rate__item\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[{ hover: hoverIndex === item }]\"\n class=\"el-rate__icon\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n class=\"el-rate__icon el-rate__decimal\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n class=\"el-rate__text\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n\n const rateSize = useSize()\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const prefix = 'el-rate'\n const rateKls = computed(() => [prefix, `${prefix}--${rateSize.value}`])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n let target = event.target as HTMLElement\n if (hasClass(target, 'el-rate__item')) {\n target = target.querySelector('.el-rate__icon')!\n }\n if (target.clientWidth === 0 || hasClass(target, 'el-rate__decimal')) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"rate.vue_vue_type_script_lang.mjs","sources":["../../../../../../packages/components/rate/src/rate.vue"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n :class=\"ns.e('item')\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[ns.e('icon'), { hover: hoverIndex === item }]\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n :class=\"[ns.e('icon'), ns.e('decimal')]\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n :class=\"ns.e('text')\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useNamespace, useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n const rateSize = useSize()\n const ns = useNamespace('rate')\n\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const rateKls = computed(() => [ns.b(), ns.m(rateSize.value)])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n // TODO: use cache via computed https://github.com/element-plus/element-plus/pull/5456#discussion_r786472092\n let target = event.target as HTMLElement\n if (hasClass(target, ns.e('item'))) {\n target = target.querySelector(`.${ns.e('icon')}`)!\n }\n if (target.clientWidth === 0 || hasClass(target, ns.e('decimal'))) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n ns,\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":[],"mappings":"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"}
@@ -17,14 +17,14 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
17
17
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.max, (item, key) => {
18
18
  return openBlock(), createElementBlock("span", {
19
19
  key,
20
- class: "el-rate__item",
20
+ class: normalizeClass(_ctx.ns.e("item")),
21
21
  style: normalizeStyle({ cursor: _ctx.rateDisabled ? "auto" : "pointer" }),
22
22
  onMousemove: ($event) => _ctx.setCurrentValue(item, $event),
23
23
  onMouseleave: _cache[0] || (_cache[0] = (...args) => _ctx.resetCurrentValue && _ctx.resetCurrentValue(...args)),
24
24
  onClick: ($event) => _ctx.selectValue(item)
25
25
  }, [
26
26
  createVNode(_component_el_icon, {
27
- class: normalizeClass([[{ hover: _ctx.hoverIndex === item }], "el-rate__icon"]),
27
+ class: normalizeClass([_ctx.ns.e("icon"), { hover: _ctx.hoverIndex === item }]),
28
28
  style: normalizeStyle(_ctx.getIconStyle(item))
29
29
  }, {
30
30
  default: withCtx(() => [
@@ -32,23 +32,23 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
32
32
  _ctx.showDecimalIcon(item) ? (openBlock(), createBlock(_component_el_icon, {
33
33
  key: 0,
34
34
  style: normalizeStyle(_ctx.decimalStyle),
35
- class: "el-rate__icon el-rate__decimal"
35
+ class: normalizeClass([_ctx.ns.e("icon"), _ctx.ns.e("decimal")])
36
36
  }, {
37
37
  default: withCtx(() => [
38
38
  (openBlock(), createBlock(resolveDynamicComponent(_ctx.decimalIconComponent)))
39
39
  ]),
40
40
  _: 1
41
- }, 8, ["style"])) : createCommentVNode("v-if", true)
41
+ }, 8, ["style", "class"])) : createCommentVNode("v-if", true)
42
42
  ]),
43
43
  _: 2
44
44
  }, 1032, ["class", "style"])
45
- ], 44, _hoisted_2);
45
+ ], 46, _hoisted_2);
46
46
  }), 128)),
47
47
  _ctx.showText || _ctx.showScore ? (openBlock(), createElementBlock("span", {
48
48
  key: 0,
49
- class: "el-rate__text",
49
+ class: normalizeClass(_ctx.ns.e("text")),
50
50
  style: normalizeStyle({ color: _ctx.textColor })
51
- }, toDisplayString(_ctx.text), 5)) : createCommentVNode("v-if", true)
51
+ }, toDisplayString(_ctx.text), 7)) : createCommentVNode("v-if", true)
52
52
  ], 42, _hoisted_1);
53
53
  }
54
54
 
@@ -1 +1 @@
1
- {"version":3,"file":"rate.vue_vue_type_template_id_38c42df6_lang.mjs","sources":["../../../../../../packages/components/rate/src/rate.vue?vue&type=template&id=38c42df6&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n class=\"el-rate__item\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[{ hover: hoverIndex === item }]\"\n class=\"el-rate__icon\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n class=\"el-rate__icon el-rate__decimal\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n class=\"el-rate__text\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n\n const rateSize = useSize()\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const prefix = 'el-rate'\n const rateKls = computed(() => [prefix, `${prefix}--${rateSize.value}`])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n let target = event.target as HTMLElement\n if (hasClass(target, 'el-rate__item')) {\n target = target.querySelector('.el-rate__icon')!\n }\n if (target.clientWidth === 0 || hasClass(target, 'el-rate__decimal')) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":["_openBlock","_createVNode"],"mappings":";;;;;;;;;;IAEK,uBAAO;IACR;IACC,eAAa,EAAE;IACf;IACD,iBAAc;;;aAGNA,wCAAE;;;;QAIP;QACD;QACC;;QAEAC,WAAU;eACL,4BAAa,KAAK;;;UAGrB;;;;;;;;;;;;;;;;;;;;;;KAeG;;;;;"}
1
+ {"version":3,"file":"rate.vue_vue_type_template_id_38c42df6_lang.mjs","sources":["../../../../../../packages/components/rate/src/rate.vue?vue&type=template&id=38c42df6&lang.js"],"sourcesContent":["<template>\n <div\n :class=\"rateKls\"\n role=\"slider\"\n :aria-valuenow=\"currentValue\"\n :aria-valuetext=\"text\"\n aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n tabindex=\"0\"\n @keydown=\"handleKey\"\n >\n <span\n v-for=\"(item, key) in max\"\n :key=\"key\"\n :class=\"ns.e('item')\"\n :style=\"{ cursor: rateDisabled ? 'auto' : 'pointer' }\"\n @mousemove=\"setCurrentValue(item, $event)\"\n @mouseleave=\"resetCurrentValue\"\n @click=\"selectValue(item)\"\n >\n <el-icon\n :class=\"[ns.e('icon'), { hover: hoverIndex === item }]\"\n :style=\"getIconStyle(item)\"\n >\n <component :is=\"iconComponents[item - 1]\" />\n <el-icon\n v-if=\"showDecimalIcon(item)\"\n :style=\"decimalStyle\"\n :class=\"[ns.e('icon'), ns.e('decimal')]\"\n >\n <component :is=\"decimalIconComponent\" />\n </el-icon>\n </el-icon>\n </span>\n <span\n v-if=\"showText || showScore\"\n :class=\"ns.e('text')\"\n :style=\"{ color: textColor }\"\n >\n {{ text }}\n </span>\n </div>\n</template>\n<script lang=\"ts\">\nimport { defineComponent, inject, computed, ref, watch } from 'vue'\nimport { isObject, isArray } from '@vue/shared'\nimport { elFormKey } from '@element-plus/tokens'\nimport { hasClass } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\n\nimport { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { StarFilled, Star } from '@element-plus/icons-vue'\nimport { useNamespace, useSize } from '@element-plus/hooks'\nimport { rateProps, rateEmits } from './rate'\nimport type { ElFormContext } from '@element-plus/tokens'\n\nfunction getValueFromMap<T>(\n value: number,\n map: Record<string, T | { excluded?: boolean; value: T }>\n) {\n const isExcludedObject = (\n val: unknown\n ): val is { excluded?: boolean } & Record<any, unknown> => isObject(val)\n\n const matchedKeys = Object.keys(map)\n .map((key) => +key)\n .filter((key) => {\n const val = map[key]\n const excluded = isExcludedObject(val) ? val.excluded : false\n return excluded ? value < key : value <= key\n })\n .sort((a, b) => a - b)\n const matchedValue = map[matchedKeys[0]]\n return (isExcludedObject(matchedValue) && matchedValue.value) || matchedValue\n}\n\nexport default defineComponent({\n name: 'ElRate',\n components: {\n ElIcon,\n StarFilled,\n Star,\n },\n props: rateProps,\n emits: rateEmits,\n\n setup(props, { emit }) {\n const elForm = inject(elFormKey, {} as ElFormContext)\n const rateSize = useSize()\n const ns = useNamespace('rate')\n\n const currentValue = ref(props.modelValue)\n const hoverIndex = ref(-1)\n const pointerAtLeftHalf = ref(true)\n\n const rateKls = computed(() => [ns.b(), ns.m(rateSize.value)])\n\n const rateDisabled = computed(() => props.disabled || elForm.disabled)\n const text = computed(() => {\n let result = ''\n if (props.showScore) {\n result = props.scoreTemplate.replace(\n /\\{\\s*value\\s*\\}/,\n rateDisabled.value ? `${props.modelValue}` : `${currentValue.value}`\n )\n } else if (props.showText) {\n result = props.texts[Math.ceil(currentValue.value) - 1]\n }\n return result\n })\n const valueDecimal = computed(\n () => props.modelValue * 100 - Math.floor(props.modelValue) * 100\n )\n const colorMap = computed(() =>\n isArray(props.colors)\n ? {\n [props.lowThreshold]: props.colors[0],\n [props.highThreshold]: { value: props.colors[1], excluded: true },\n [props.max]: props.colors[2],\n }\n : props.colors\n )\n const activeColor = computed(() =>\n getValueFromMap(currentValue.value, colorMap.value)\n )\n const decimalStyle = computed(() => {\n let width = ''\n if (rateDisabled.value) {\n width = `${valueDecimal.value}%`\n } else if (props.allowHalf) {\n width = '50%'\n }\n return {\n color: activeColor.value,\n width,\n }\n })\n const componentMap = computed(() =>\n isArray(props.icons)\n ? {\n [props.lowThreshold]: props.icons[0],\n [props.highThreshold]: {\n value: props.icons[1],\n excluded: true,\n },\n [props.max]: props.icons[2],\n }\n : props.icons\n )\n const decimalIconComponent = computed(() =>\n getValueFromMap(props.modelValue, componentMap.value)\n )\n const voidComponent = computed(() =>\n rateDisabled.value ? props.disabledvoidIcon : props.voidIcon\n )\n const activeComponent = computed(() =>\n getValueFromMap(currentValue.value, componentMap.value)\n )\n const iconComponents = computed(() => {\n const result = Array(props.max)\n const threshold = currentValue.value\n result.fill(activeComponent.value, 0, threshold)\n result.fill(voidComponent.value, threshold, props.max)\n return result\n })\n\n function showDecimalIcon(item: number) {\n const showWhenDisabled =\n rateDisabled.value &&\n valueDecimal.value > 0 &&\n item - 1 < props.modelValue &&\n item > props.modelValue\n const showWhenAllowHalf =\n props.allowHalf &&\n pointerAtLeftHalf.value &&\n item - 0.5 <= currentValue.value &&\n item > currentValue.value\n return showWhenDisabled || showWhenAllowHalf\n }\n\n function getIconStyle(item: number) {\n const voidColor = rateDisabled.value\n ? props.disabledVoidColor\n : props.voidColor\n return {\n color: item <= currentValue.value ? activeColor.value : voidColor,\n }\n }\n\n function selectValue(value: number) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf && pointerAtLeftHalf.value) {\n emit(UPDATE_MODEL_EVENT, currentValue.value)\n if (props.modelValue !== currentValue.value) {\n emit('change', currentValue.value)\n }\n } else {\n emit(UPDATE_MODEL_EVENT, value)\n if (props.modelValue !== value) {\n emit('change', value)\n }\n }\n }\n\n function handleKey(e: KeyboardEvent) {\n if (rateDisabled.value) {\n return\n }\n let _currentValue = currentValue.value\n const code = e.code\n if (code === EVENT_CODE.up || code === EVENT_CODE.right) {\n if (props.allowHalf) {\n _currentValue += 0.5\n } else {\n _currentValue += 1\n }\n e.stopPropagation()\n e.preventDefault()\n } else if (code === EVENT_CODE.left || code === EVENT_CODE.down) {\n if (props.allowHalf) {\n _currentValue -= 0.5\n } else {\n _currentValue -= 1\n }\n e.stopPropagation()\n e.preventDefault()\n }\n _currentValue = _currentValue < 0 ? 0 : _currentValue\n _currentValue = _currentValue > props.max ? props.max : _currentValue\n emit(UPDATE_MODEL_EVENT, _currentValue)\n emit('change', _currentValue)\n return _currentValue\n }\n\n function setCurrentValue(value: number, event: MouseEvent) {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n // TODO: use cache via computed https://github.com/element-plus/element-plus/pull/5456#discussion_r786472092\n let target = event.target as HTMLElement\n if (hasClass(target, ns.e('item'))) {\n target = target.querySelector(`.${ns.e('icon')}`)!\n }\n if (target.clientWidth === 0 || hasClass(target, ns.e('decimal'))) {\n target = target.parentNode as HTMLElement\n }\n pointerAtLeftHalf.value = event.offsetX * 2 <= target.clientWidth\n currentValue.value = pointerAtLeftHalf.value ? value - 0.5 : value\n } else {\n currentValue.value = value\n }\n hoverIndex.value = value\n }\n\n function resetCurrentValue() {\n if (rateDisabled.value) {\n return\n }\n if (props.allowHalf) {\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n currentValue.value = props.modelValue\n hoverIndex.value = -1\n }\n\n watch(\n () => props.modelValue,\n (val) => {\n currentValue.value = val\n pointerAtLeftHalf.value =\n props.modelValue !== Math.floor(props.modelValue)\n }\n )\n\n if (!props.modelValue) {\n emit(UPDATE_MODEL_EVENT, 0)\n }\n\n return {\n ns,\n hoverIndex,\n currentValue,\n rateDisabled,\n text,\n decimalStyle,\n decimalIconComponent,\n iconComponents,\n rateKls,\n\n showDecimalIcon,\n getIconStyle,\n selectValue,\n handleKey,\n setCurrentValue,\n resetCurrentValue,\n }\n },\n})\n</script>\n"],"names":["_openBlock","_createVNode"],"mappings":";;;;;;;;;;IAEK,uBAAO;IACR;IACC,eAAa,EAAE;IACf;IACD,iBAAc;;;aAGNA,wCAAE;;;;QAIP;QACA,uBAAO;QACP;;QAEAC,WAAU;eACL,4BAAa;;;UAGhB,uBAAQ;;;;;qCAKmB;;;;;;oCAI1B;;;;;;;;;;;KAKE;;;;;"}
@@ -3,6 +3,17 @@ export declare const ElResult: import("../../utils/types").SFCWithInstall<import
3
3
  readonly subTitle: import("../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
4
4
  readonly icon: import("../../utils/props").BuildPropReturn<unknown, "info", unknown, "success" | "warning" | "info" | "error", unknown>;
5
5
  }, {
6
+ ns: {
7
+ namespace: import("vue").ComputedRef<string>;
8
+ b: (blockSuffix?: string) => string;
9
+ e: (element?: string | undefined) => string;
10
+ m: (modifier?: string | undefined) => string;
11
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
12
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
13
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
14
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
15
+ is: (name: string, state?: boolean) => string;
16
+ };
6
17
  resultIcon: import("vue").ComputedRef<{
7
18
  class: "icon-success" | "icon-warning" | "icon-error" | "icon-info";
8
19
  component: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
@@ -1,4 +1,5 @@
1
1
  import type { Component, ExtractPropTypes } from 'vue';
2
+ import type Result from './result.vue';
2
3
  export declare const IconMap: {
3
4
  readonly success: "icon-success";
4
5
  readonly warning: "icon-warning";
@@ -12,3 +13,4 @@ export declare const resultProps: {
12
13
  readonly icon: import("element-plus/es/utils/props").BuildPropReturn<unknown, "info", unknown, "success" | "warning" | "info" | "error", unknown>;
13
14
  };
14
15
  export declare type ResultProps = ExtractPropTypes<typeof resultProps>;
16
+ export declare type ResultInstance = InstanceType<typeof Result>;
@@ -1 +1 @@
1
- {"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport {\n WarningFilled,\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from '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 title: {\n type: String,\n default: '',\n },\n subTitle: {\n type: String,\n default: '',\n },\n icon: {\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n"],"names":[],"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,GAAG,iBAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAG,iBAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,UAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAG,UAAU,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,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.mjs","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils/props'\nimport {\n WarningFilled,\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\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 title: {\n type: String,\n default: '',\n },\n subTitle: {\n type: String,\n default: '',\n },\n icon: {\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":[],"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,GAAG,iBAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAG,iBAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,UAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAG,UAAU,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,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
@@ -3,6 +3,17 @@ declare const _default: import("vue").DefineComponent<{
3
3
  readonly subTitle: import("../../../utils/props").BuildPropReturn<StringConstructor, "", unknown, unknown, unknown>;
4
4
  readonly icon: import("../../../utils/props").BuildPropReturn<unknown, "info", unknown, "success" | "warning" | "info" | "error", unknown>;
5
5
  }, {
6
+ ns: {
7
+ namespace: import("vue").ComputedRef<string>;
8
+ b: (blockSuffix?: string) => string;
9
+ e: (element?: string | undefined) => string;
10
+ m: (modifier?: string | undefined) => string;
11
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
12
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
13
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
14
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
15
+ is: (name: string, state?: boolean) => string;
16
+ };
6
17
  resultIcon: import("vue").ComputedRef<{
7
18
  class: "icon-success" | "icon-warning" | "icon-error" | "icon-info";
8
19
  component: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
@@ -1,10 +1,13 @@
1
1
  import { defineComponent, computed } from 'vue';
2
+ import '../../../hooks/index.mjs';
2
3
  import { resultProps, IconMap, IconComponentMap } from './result.mjs';
4
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
5
 
4
6
  var script = defineComponent({
5
7
  name: "ElResult",
6
8
  props: resultProps,
7
9
  setup(props) {
10
+ const ns = useNamespace("result");
8
11
  const resultIcon = computed(() => {
9
12
  const icon = props.icon;
10
13
  const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
@@ -15,6 +18,7 @@ var script = defineComponent({
15
18
  };
16
19
  });
17
20
  return {
21
+ ns,
18
22
  resultIcon
19
23
  };
20
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"result.vue_vue_type_script_lang.mjs","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div class=\"el-result\">\n <div class=\"el-result__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=\"el-result__title\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots.subTitle\" class=\"el-result__subtitle\">\n <slot name=\"subTitle\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" class=\"el-result__extra\">\n <slot name=\"extra\"></slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { resultProps, IconComponentMap, IconMap } from './result'\n\nexport default defineComponent({\n name: 'ElResult',\n props: resultProps,\n setup(props) {\n const 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\n return {\n resultIcon,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;AA4BA,aAAe,eAAe,CAAC;;AAE/B,EAAE,KAAK,EAAE,WAAW;EAClB,MAAM,KAAK,EAAE;IACX,MAAM,UAAU;MACd,MAAM;MACN,MAAM,SAAS,GAAG,IAAI,IAAI;MAC1B,MAAM,aAAa,GAAG;MACtB,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,aAAa;;MAE1B,CAAC;WACI;gBACK;MACV;;;;;;"}
1
+ {"version":3,"file":"result.vue_vue_type_script_lang.mjs","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.subTitle\" :class=\"ns.e('subtitle')\">\n <slot name=\"subTitle\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\"></slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { resultProps, IconComponentMap, IconMap } from './result'\n\nexport default defineComponent({\n name: 'ElResult',\n props: resultProps,\n setup(props) {\n const ns = useNamespace('result')\n\n const 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\n return {\n ns,\n resultIcon,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;AA6BA,aAAe,eAAe,CAAC;;AAE/B,EAAE,KAAK,EAAE,WAAW;EAClB,MAAM,KAAK,EAAE;IACX,MAAM,EAAE,GAAG;IACX,MAAM;MACJ,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC;;MAExB,MAAM,aAAa,GAAG;MACtB,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE;QACX;;WAEG;QACH;gBACQ;MACV;;;;;;"}
@@ -1,43 +1,42 @@
1
- import { openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, normalizeClass, createCommentVNode, toDisplayString } from 'vue';
1
+ import { openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, toDisplayString } from 'vue';
2
2
 
3
- const _hoisted_1 = { class: "el-result" };
4
- const _hoisted_2 = { class: "el-result__icon" };
5
- const _hoisted_3 = {
6
- key: 0,
7
- class: "el-result__title"
8
- };
9
- const _hoisted_4 = {
10
- key: 1,
11
- class: "el-result__subtitle"
12
- };
13
- const _hoisted_5 = {
14
- key: 2,
15
- class: "el-result__extra"
16
- };
17
3
  function render(_ctx, _cache, $props, $setup, $data, $options) {
18
- return openBlock(), createElementBlock("div", _hoisted_1, [
19
- createElementVNode("div", _hoisted_2, [
4
+ return openBlock(), createElementBlock("div", {
5
+ class: normalizeClass(_ctx.ns.b())
6
+ }, [
7
+ createElementVNode("div", {
8
+ class: normalizeClass(_ctx.ns.e("icon"))
9
+ }, [
20
10
  renderSlot(_ctx.$slots, "icon", {}, () => [
21
11
  _ctx.resultIcon.component ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.resultIcon.component), {
22
12
  key: 0,
23
13
  class: normalizeClass(_ctx.resultIcon.class)
24
14
  }, null, 8, ["class"])) : createCommentVNode("v-if", true)
25
15
  ])
26
- ]),
27
- _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", _hoisted_3, [
16
+ ], 2),
17
+ _ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
18
+ key: 0,
19
+ class: normalizeClass(_ctx.ns.e("title"))
20
+ }, [
28
21
  renderSlot(_ctx.$slots, "title", {}, () => [
29
22
  createElementVNode("p", null, toDisplayString(_ctx.title), 1)
30
23
  ])
31
- ])) : createCommentVNode("v-if", true),
32
- _ctx.subTitle || _ctx.$slots.subTitle ? (openBlock(), createElementBlock("div", _hoisted_4, [
24
+ ], 2)) : createCommentVNode("v-if", true),
25
+ _ctx.subTitle || _ctx.$slots.subTitle ? (openBlock(), createElementBlock("div", {
26
+ key: 1,
27
+ class: normalizeClass(_ctx.ns.e("subtitle"))
28
+ }, [
33
29
  renderSlot(_ctx.$slots, "subTitle", {}, () => [
34
30
  createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
35
31
  ])
36
- ])) : createCommentVNode("v-if", true),
37
- _ctx.$slots.extra ? (openBlock(), createElementBlock("div", _hoisted_5, [
32
+ ], 2)) : createCommentVNode("v-if", true),
33
+ _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
34
+ key: 2,
35
+ class: normalizeClass(_ctx.ns.e("extra"))
36
+ }, [
38
37
  renderSlot(_ctx.$slots, "extra")
39
- ])) : createCommentVNode("v-if", true)
40
- ]);
38
+ ], 2)) : createCommentVNode("v-if", true)
39
+ ], 2);
41
40
  }
42
41
 
43
42
  export { render };
@@ -1 +1 @@
1
- {"version":3,"file":"result.vue_vue_type_template_id_263c10e5_lang.mjs","sources":["../../../../../../packages/components/result/src/result.vue?vue&type=template&id=263c10e5&lang.js"],"sourcesContent":["<template>\n <div class=\"el-result\">\n <div class=\"el-result__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=\"el-result__title\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots.subTitle\" class=\"el-result__subtitle\">\n <slot name=\"subTitle\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" class=\"el-result__extra\">\n <slot name=\"extra\"></slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { resultProps, IconComponentMap, IconMap } from './result'\n\nexport default defineComponent({\n name: 'ElResult',\n props: resultProps,\n setup(props) {\n const 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\n return {\n resultIcon,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;qBACO,KAAK,EAAC;;;;EAUyB;;;;EAKM;;;;EAKf;;;;;;;;;;;;;;;KAVd,wBAAe,MAAM;;;0DAEtB;;;;qBAGa;;;;;;;"}
1
+ {"version":3,"file":"result.vue_vue_type_template_id_263c10e5_lang.mjs","sources":["../../../../../../packages/components/result/src/result.vue?vue&type=template&id=263c10e5&lang.js"],"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.subTitle\" :class=\"ns.e('subtitle')\">\n <slot name=\"subTitle\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\"></slot>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { resultProps, IconComponentMap, IconMap } from './result'\n\nexport default defineComponent({\n name: 'ElResult',\n props: resultProps,\n setup(props) {\n const ns = useNamespace('result')\n\n const 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\n return {\n ns,\n resultIcon,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;KAWe;sBAAX;;;;;YAEI;;;;gCAGyB;;;eAAiB;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  export declare const ElRow: import("../../utils/types").SFCWithInstall<import("vue").DefineComponent<{
2
2
  readonly tag: import("../../utils/props").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
3
3
  readonly gutter: import("../../utils/props").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
4
- readonly justify: import("../../utils/props").BuildPropReturn<StringConstructor, "start", unknown, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
4
+ readonly justify: import("../../utils/props").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
5
5
  readonly align: import("../../utils/props").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
6
6
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
7
  [key: string]: any;
@@ -12,12 +12,12 @@ export declare const ElRow: import("../../utils/types").SFCWithInstall<import("v
12
12
  readonly align?: unknown;
13
13
  } & {
14
14
  align: import("../../utils/props").BuildPropType<StringConstructor, "top" | "bottom" | "middle", unknown>;
15
- justify: import("../../utils/props").BuildPropType<StringConstructor, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
15
+ justify: import("../../utils/props").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
16
16
  tag: string;
17
17
  gutter: number;
18
18
  } & {}>, {
19
19
  align: import("../../utils/props").BuildPropType<StringConstructor, "top" | "bottom" | "middle", unknown>;
20
- justify: import("../../utils/props").BuildPropType<StringConstructor, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
20
+ justify: import("../../utils/props").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
21
21
  tag: string;
22
22
  gutter: number;
23
23
  }>> & Record<string, any>;
@@ -2,14 +2,14 @@ import type { ExtractPropTypes } from 'vue';
2
2
  export declare const rowProps: {
3
3
  readonly tag: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
4
4
  readonly gutter: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
5
- readonly justify: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "start", unknown, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
5
+ readonly justify: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
6
6
  readonly align: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
7
7
  };
8
8
  export declare type RowProps = ExtractPropTypes<typeof rowProps>;
9
- declare const _default: import("vue").DefineComponent<{
9
+ declare const Row: import("vue").DefineComponent<{
10
10
  readonly tag: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "div", unknown, unknown, unknown>;
11
11
  readonly gutter: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, 0, unknown, unknown, unknown>;
12
- readonly justify: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "start", unknown, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
12
+ readonly justify: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "start", unknown, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
13
13
  readonly align: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "top", unknown, "top" | "bottom" | "middle", unknown>;
14
14
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
15
15
  [key: string]: any;
@@ -20,13 +20,14 @@ declare const _default: import("vue").DefineComponent<{
20
20
  readonly align?: unknown;
21
21
  } & {
22
22
  align: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "top" | "bottom" | "middle", unknown>;
23
- justify: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
23
+ justify: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
24
24
  tag: string;
25
25
  gutter: number;
26
26
  } & {}>, {
27
27
  align: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "top" | "bottom" | "middle", unknown>;
28
- justify: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "space-around" | "space-between" | "center" | "end" | "start", unknown>;
28
+ justify: import("element-plus/es/utils/props").BuildPropType<StringConstructor, "center" | "space-around" | "space-between" | "end" | "start", unknown>;
29
29
  tag: string;
30
30
  gutter: number;
31
31
  }>;
32
- export default _default;
32
+ export default Row;
33
+ export declare type RowInstance = InstanceType<typeof Row>;
@@ -1,5 +1,7 @@
1
1
  import { defineComponent, computed, provide, h } from 'vue';
2
2
  import { buildProps } from '../../../utils/props.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
3
5
 
4
6
  const rowProps = buildProps({
5
7
  tag: {
@@ -21,30 +23,31 @@ const rowProps = buildProps({
21
23
  default: "top"
22
24
  }
23
25
  });
24
- var Row = defineComponent({
26
+ const Row = defineComponent({
25
27
  name: "ElRow",
26
28
  props: rowProps,
27
29
  setup(props, { slots }) {
30
+ const ns = useNamespace("row");
28
31
  const gutter = computed(() => props.gutter);
29
32
  provide("ElRow", {
30
33
  gutter
31
34
  });
32
35
  const style = computed(() => {
33
- const ret = {
36
+ const styles = {
34
37
  marginLeft: "",
35
38
  marginRight: ""
36
39
  };
37
40
  if (props.gutter) {
38
- ret.marginLeft = `-${props.gutter / 2}px`;
39
- ret.marginRight = ret.marginLeft;
41
+ styles.marginLeft = `-${props.gutter / 2}px`;
42
+ styles.marginRight = styles.marginLeft;
40
43
  }
41
- return ret;
44
+ return styles;
42
45
  });
43
46
  return () => {
44
47
  var _a;
45
48
  return h(props.tag, {
46
49
  class: [
47
- "el-row",
50
+ ns.b(),
48
51
  props.justify !== "start" ? `is-justify-${props.justify}` : "",
49
52
  props.align !== "top" ? `is-align-${props.align}` : ""
50
53
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"row.mjs","sources":["../../../../../../packages/components/row/src/row.ts"],"sourcesContent":["import { defineComponent, computed, h, provide } from 'vue'\nimport { buildProps } from '@element-plus/utils/props'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const rowProps = buildProps({\n tag: {\n type: String,\n default: 'div',\n },\n gutter: {\n type: Number,\n default: 0,\n },\n justify: {\n type: String,\n values: ['start', 'center', 'end', 'space-around', 'space-between'],\n default: 'start',\n },\n align: {\n type: String,\n values: ['top', 'middle', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type RowProps = ExtractPropTypes<typeof rowProps>\n\nexport default defineComponent({\n name: 'ElRow',\n props: rowProps,\n\n setup(props, { slots }) {\n const gutter = computed(() => props.gutter)\n provide('ElRow', {\n gutter,\n })\n\n const style = computed(() => {\n const ret = {\n marginLeft: '',\n marginRight: '',\n }\n if (props.gutter) {\n ret.marginLeft = `-${props.gutter / 2}px`\n ret.marginRight = ret.marginLeft\n }\n return ret\n })\n\n return () =>\n h(\n props.tag,\n {\n class: [\n 'el-row',\n props.justify !== 'start' ? `is-justify-${props.justify}` : '',\n props.align !== 'top' ? `is-align-${props.align}` : '',\n ],\n style: style.value,\n },\n slots.default?.()\n )\n },\n})\n"],"names":[],"mappings":";;;AAEY,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,eAAe,CAAC;AACvE,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC;AACvC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACH,UAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,KAAK,EAAE,QAAQ;AACjB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;AAChD,IAAI,OAAO,CAAC,OAAO,EAAE;AACrB,MAAM,MAAM;AACZ,KAAK,CAAC,CAAC;AACP,IAAI,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM;AACjC,MAAM,MAAM,GAAG,GAAG;AAClB,QAAQ,UAAU,EAAE,EAAE;AACtB,QAAQ,WAAW,EAAE,EAAE;AACvB,OAAO,CAAC;AACR,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE;AACxB,QAAQ,GAAG,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAClD,QAAQ,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC;AACzC,OAAO;AACP,MAAM,OAAO,GAAG,CAAC;AACjB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;AAC1B,QAAQ,KAAK,EAAE;AACf,UAAU,QAAQ;AAClB,UAAU,KAAK,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE;AACxE,UAAU,KAAK,CAAC,KAAK,KAAK,KAAK,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE;AAChE,SAAS;AACT,QAAQ,KAAK,EAAE,KAAK,CAAC,KAAK;AAC1B,OAAO,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"row.mjs","sources":["../../../../../../packages/components/row/src/row.ts"],"sourcesContent":["import { defineComponent, computed, h, provide } from 'vue'\nimport { buildProps } from '@element-plus/utils/props'\nimport { useNamespace } from '@element-plus/hooks'\nimport type { ExtractPropTypes, CSSProperties } from 'vue'\n\nexport const rowProps = buildProps({\n tag: {\n type: String,\n default: 'div',\n },\n gutter: {\n type: Number,\n default: 0,\n },\n justify: {\n type: String,\n values: ['start', 'center', 'end', 'space-around', 'space-between'],\n default: 'start',\n },\n align: {\n type: String,\n values: ['top', 'middle', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type RowProps = ExtractPropTypes<typeof rowProps>\n\nconst Row = defineComponent({\n name: 'ElRow',\n props: rowProps,\n\n setup(props, { slots }) {\n const ns = useNamespace('row')\n\n const gutter = computed(() => props.gutter)\n provide('ElRow', {\n gutter,\n })\n\n const style = computed(() => {\n const styles: CSSProperties = {\n marginLeft: '',\n marginRight: '',\n }\n if (props.gutter) {\n styles.marginLeft = `-${props.gutter / 2}px`\n styles.marginRight = styles.marginLeft\n }\n return styles\n })\n\n return () =>\n h(\n props.tag,\n {\n class: [\n ns.b(),\n props.justify !== 'start' ? `is-justify-${props.justify}` : '',\n props.align !== 'top' ? `is-align-${props.align}` : '',\n ],\n style: style.value,\n },\n slots.default?.()\n )\n },\n})\n\nexport default Row\nexport type RowInstance = InstanceType<typeof Row>\n"],"names":[],"mappings":";;;;;AAGY,MAAC,QAAQ,GAAG,UAAU,CAAC;AACnC,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,eAAe,CAAC;AACvE,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC;AACvC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACE,MAAC,GAAG,GAAG,eAAe,CAAC;AAC5B,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,KAAK,EAAE,QAAQ;AACjB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE;AAC1B,IAAI,MAAM,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AACnC,IAAI,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;AAChD,IAAI,OAAO,CAAC,OAAO,EAAE;AACrB,MAAM,MAAM;AACZ,KAAK,CAAC,CAAC;AACP,IAAI,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM;AACjC,MAAM,MAAM,MAAM,GAAG;AACrB,QAAQ,UAAU,EAAE,EAAE;AACtB,QAAQ,WAAW,EAAE,EAAE;AACvB,OAAO,CAAC;AACR,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE;AACxB,QAAQ,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AACrD,QAAQ,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/C,OAAO;AACP,MAAM,OAAO,MAAM,CAAC;AACpB,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;AAC1B,QAAQ,KAAK,EAAE;AACf,UAAU,EAAE,CAAC,CAAC,EAAE;AAChB,UAAU,KAAK,CAAC,OAAO,KAAK,OAAO,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE;AACxE,UAAU,KAAK,CAAC,KAAK,KAAK,KAAK,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE;AAChE,SAAS;AACT,QAAQ,KAAK,EAAE,KAAK,CAAC,KAAK;AAC1B,OAAO,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AACjE,KAAK,CAAC;AACN,GAAG;AACH,CAAC;;;;"}
@@ -44,8 +44,8 @@ export declare const ElScrollbar: import("../../utils/types").SFCWithInstall<imp
44
44
  readonly minSize?: unknown;
45
45
  } & {
46
46
  height: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
47
- always: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
48
47
  maxHeight: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
48
+ always: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
49
49
  native: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
50
50
  wrapStyle: import("vue").StyleValue;
51
51
  wrapClass: import("../../utils/props").BuildPropType<readonly [StringConstructor, ArrayConstructor], unknown, unknown>;
@@ -61,8 +61,8 @@ export declare const ElScrollbar: import("../../utils/types").SFCWithInstall<imp
61
61
  }) => any) | undefined;
62
62
  }, {
63
63
  height: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
64
- always: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
65
64
  maxHeight: import("../../utils/props").BuildPropType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
65
+ always: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
66
66
  native: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
67
67
  wrapStyle: import("vue").StyleValue;
68
68
  wrapClass: import("../../utils/props").BuildPropType<readonly [StringConstructor, ArrayConstructor], unknown, unknown>;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, inject, ref, computed, onBeforeUnmount, toRef } from 'vue';
2
- import { useEventListener } from '@vueuse/core';
2
+ import { isClient, useEventListener } from '@vueuse/core';
3
3
  import '../../../tokens/index.mjs';
4
4
  import { throwError } from '../../../utils/error.mjs';
5
5
  import { BAR_MAP, renderThumbStyle } from './util.mjs';
@@ -20,7 +20,7 @@ var script = defineComponent({
20
20
  const visible = ref(false);
21
21
  let cursorDown = false;
22
22
  let cursorLeave = false;
23
- let onselectstartStore = null;
23
+ let onselectstartStore = isClient ? document.onselectstart : null;
24
24
  const bar = computed(() => BAR_MAP[props.vertical ? "vertical" : "horizontal"]);
25
25
  const thumbStyle = computed(() => renderThumbStyle({
26
26
  size: props.size,
@@ -74,7 +74,7 @@ var script = defineComponent({
74
74
  barStore.value[bar.value.axis] = 0;
75
75
  document.removeEventListener("mousemove", mouseMoveDocumentHandler);
76
76
  document.removeEventListener("mouseup", mouseUpDocumentHandler);
77
- document.onselectstart = onselectstartStore;
77
+ restoreOnselectstart();
78
78
  if (cursorLeave)
79
79
  visible.value = false;
80
80
  };
@@ -86,7 +86,14 @@ var script = defineComponent({
86
86
  cursorLeave = true;
87
87
  visible.value = cursorDown;
88
88
  };
89
- onBeforeUnmount(() => document.removeEventListener("mouseup", mouseUpDocumentHandler));
89
+ onBeforeUnmount(() => {
90
+ restoreOnselectstart();
91
+ document.removeEventListener("mouseup", mouseUpDocumentHandler);
92
+ });
93
+ const restoreOnselectstart = () => {
94
+ if (document.onselectstart !== onselectstartStore)
95
+ document.onselectstart = onselectstartStore;
96
+ };
90
97
  useEventListener(toRef(scrollbar, "scrollbarElement"), "mousemove", mouseMoveScrollbarHandler);
91
98
  useEventListener(toRef(scrollbar, "scrollbarElement"), "mouseleave", mouseLeaveScrollbarHandler);
92
99
  return {