@element-plus/nightly 0.0.20240424 → 0.0.20240425

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 (370) hide show
  1. package/README.md +5 -0
  2. package/attributes.json +1 -1
  3. package/dist/index.full.js +31 -21
  4. package/dist/index.full.min.js +12 -12
  5. package/dist/index.full.min.js.map +1 -1
  6. package/dist/index.full.min.mjs +12 -12
  7. package/dist/index.full.min.mjs.map +1 -1
  8. package/dist/index.full.mjs +23 -22
  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-eg.js +1 -1
  14. package/dist/locale/ar-eg.min.js +1 -1
  15. package/dist/locale/ar-eg.min.mjs +1 -1
  16. package/dist/locale/ar-eg.mjs +1 -1
  17. package/dist/locale/ar.js +1 -1
  18. package/dist/locale/ar.min.js +1 -1
  19. package/dist/locale/ar.min.mjs +1 -1
  20. package/dist/locale/ar.mjs +1 -1
  21. package/dist/locale/az.js +1 -1
  22. package/dist/locale/az.min.js +1 -1
  23. package/dist/locale/az.min.mjs +1 -1
  24. package/dist/locale/az.mjs +1 -1
  25. package/dist/locale/bg.js +1 -1
  26. package/dist/locale/bg.min.js +1 -1
  27. package/dist/locale/bg.min.mjs +1 -1
  28. package/dist/locale/bg.mjs +1 -1
  29. package/dist/locale/bn.js +1 -1
  30. package/dist/locale/bn.min.js +1 -1
  31. package/dist/locale/bn.min.mjs +1 -1
  32. package/dist/locale/bn.mjs +1 -1
  33. package/dist/locale/ca.js +1 -1
  34. package/dist/locale/ca.min.js +1 -1
  35. package/dist/locale/ca.min.mjs +1 -1
  36. package/dist/locale/ca.mjs +1 -1
  37. package/dist/locale/ckb.js +1 -1
  38. package/dist/locale/ckb.min.js +1 -1
  39. package/dist/locale/ckb.min.mjs +1 -1
  40. package/dist/locale/ckb.mjs +1 -1
  41. package/dist/locale/cs.js +1 -1
  42. package/dist/locale/cs.min.js +1 -1
  43. package/dist/locale/cs.min.mjs +1 -1
  44. package/dist/locale/cs.mjs +1 -1
  45. package/dist/locale/da.js +1 -1
  46. package/dist/locale/da.min.js +1 -1
  47. package/dist/locale/da.min.mjs +1 -1
  48. package/dist/locale/da.mjs +1 -1
  49. package/dist/locale/de.js +1 -1
  50. package/dist/locale/de.min.js +1 -1
  51. package/dist/locale/de.min.mjs +1 -1
  52. package/dist/locale/de.mjs +1 -1
  53. package/dist/locale/el.js +1 -1
  54. package/dist/locale/el.min.js +1 -1
  55. package/dist/locale/el.min.mjs +1 -1
  56. package/dist/locale/el.mjs +1 -1
  57. package/dist/locale/en.js +1 -1
  58. package/dist/locale/en.min.js +1 -1
  59. package/dist/locale/en.min.mjs +1 -1
  60. package/dist/locale/en.mjs +1 -1
  61. package/dist/locale/eo.js +1 -1
  62. package/dist/locale/eo.min.js +1 -1
  63. package/dist/locale/eo.min.mjs +1 -1
  64. package/dist/locale/eo.mjs +1 -1
  65. package/dist/locale/es.js +1 -1
  66. package/dist/locale/es.min.js +1 -1
  67. package/dist/locale/es.min.mjs +1 -1
  68. package/dist/locale/es.mjs +1 -1
  69. package/dist/locale/et.js +1 -1
  70. package/dist/locale/et.min.js +1 -1
  71. package/dist/locale/et.min.mjs +1 -1
  72. package/dist/locale/et.mjs +1 -1
  73. package/dist/locale/eu.js +1 -1
  74. package/dist/locale/eu.min.js +1 -1
  75. package/dist/locale/eu.min.mjs +1 -1
  76. package/dist/locale/eu.mjs +1 -1
  77. package/dist/locale/fa.js +1 -1
  78. package/dist/locale/fa.min.js +1 -1
  79. package/dist/locale/fa.min.mjs +1 -1
  80. package/dist/locale/fa.mjs +1 -1
  81. package/dist/locale/fi.js +1 -1
  82. package/dist/locale/fi.min.js +1 -1
  83. package/dist/locale/fi.min.mjs +1 -1
  84. package/dist/locale/fi.mjs +1 -1
  85. package/dist/locale/fr.js +1 -1
  86. package/dist/locale/fr.min.js +1 -1
  87. package/dist/locale/fr.min.mjs +1 -1
  88. package/dist/locale/fr.mjs +1 -1
  89. package/dist/locale/he.js +1 -1
  90. package/dist/locale/he.min.js +1 -1
  91. package/dist/locale/he.min.mjs +1 -1
  92. package/dist/locale/he.mjs +1 -1
  93. package/dist/locale/hr.js +1 -1
  94. package/dist/locale/hr.min.js +1 -1
  95. package/dist/locale/hr.min.mjs +1 -1
  96. package/dist/locale/hr.mjs +1 -1
  97. package/dist/locale/hu.js +1 -1
  98. package/dist/locale/hu.min.js +1 -1
  99. package/dist/locale/hu.min.mjs +1 -1
  100. package/dist/locale/hu.mjs +1 -1
  101. package/dist/locale/hy-am.js +1 -1
  102. package/dist/locale/hy-am.min.js +1 -1
  103. package/dist/locale/hy-am.min.mjs +1 -1
  104. package/dist/locale/hy-am.mjs +1 -1
  105. package/dist/locale/id.js +1 -1
  106. package/dist/locale/id.min.js +1 -1
  107. package/dist/locale/id.min.mjs +1 -1
  108. package/dist/locale/id.mjs +1 -1
  109. package/dist/locale/it.js +1 -1
  110. package/dist/locale/it.min.js +1 -1
  111. package/dist/locale/it.min.mjs +1 -1
  112. package/dist/locale/it.mjs +1 -1
  113. package/dist/locale/ja.js +1 -1
  114. package/dist/locale/ja.min.js +1 -1
  115. package/dist/locale/ja.min.mjs +1 -1
  116. package/dist/locale/ja.mjs +1 -1
  117. package/dist/locale/kk.js +1 -1
  118. package/dist/locale/kk.min.js +1 -1
  119. package/dist/locale/kk.min.mjs +1 -1
  120. package/dist/locale/kk.mjs +1 -1
  121. package/dist/locale/km.js +1 -1
  122. package/dist/locale/km.min.js +1 -1
  123. package/dist/locale/km.min.mjs +1 -1
  124. package/dist/locale/km.mjs +1 -1
  125. package/dist/locale/ko.js +1 -1
  126. package/dist/locale/ko.min.js +1 -1
  127. package/dist/locale/ko.min.mjs +1 -1
  128. package/dist/locale/ko.mjs +1 -1
  129. package/dist/locale/ku.js +1 -1
  130. package/dist/locale/ku.min.js +1 -1
  131. package/dist/locale/ku.min.mjs +1 -1
  132. package/dist/locale/ku.mjs +1 -1
  133. package/dist/locale/ky.js +1 -1
  134. package/dist/locale/ky.min.js +1 -1
  135. package/dist/locale/ky.min.mjs +1 -1
  136. package/dist/locale/ky.mjs +1 -1
  137. package/dist/locale/lt.js +1 -1
  138. package/dist/locale/lt.min.js +1 -1
  139. package/dist/locale/lt.min.mjs +1 -1
  140. package/dist/locale/lt.mjs +1 -1
  141. package/dist/locale/lv.js +1 -1
  142. package/dist/locale/lv.min.js +1 -1
  143. package/dist/locale/lv.min.mjs +1 -1
  144. package/dist/locale/lv.mjs +1 -1
  145. package/dist/locale/mg.js +1 -1
  146. package/dist/locale/mg.min.js +1 -1
  147. package/dist/locale/mg.min.mjs +1 -1
  148. package/dist/locale/mg.mjs +1 -1
  149. package/dist/locale/mn.js +1 -1
  150. package/dist/locale/mn.min.js +1 -1
  151. package/dist/locale/mn.min.mjs +1 -1
  152. package/dist/locale/mn.mjs +1 -1
  153. package/dist/locale/nb-no.js +1 -1
  154. package/dist/locale/nb-no.min.js +1 -1
  155. package/dist/locale/nb-no.min.mjs +1 -1
  156. package/dist/locale/nb-no.mjs +1 -1
  157. package/dist/locale/nl.js +1 -1
  158. package/dist/locale/nl.min.js +1 -1
  159. package/dist/locale/nl.min.mjs +1 -1
  160. package/dist/locale/nl.mjs +1 -1
  161. package/dist/locale/pa.js +1 -1
  162. package/dist/locale/pa.min.js +1 -1
  163. package/dist/locale/pa.min.mjs +1 -1
  164. package/dist/locale/pa.mjs +1 -1
  165. package/dist/locale/pl.js +1 -1
  166. package/dist/locale/pl.min.js +1 -1
  167. package/dist/locale/pl.min.mjs +1 -1
  168. package/dist/locale/pl.mjs +1 -1
  169. package/dist/locale/pt-br.js +1 -1
  170. package/dist/locale/pt-br.min.js +1 -1
  171. package/dist/locale/pt-br.min.mjs +1 -1
  172. package/dist/locale/pt-br.mjs +1 -1
  173. package/dist/locale/pt.js +1 -1
  174. package/dist/locale/pt.min.js +1 -1
  175. package/dist/locale/pt.min.mjs +1 -1
  176. package/dist/locale/pt.mjs +1 -1
  177. package/dist/locale/ro.js +1 -1
  178. package/dist/locale/ro.min.js +1 -1
  179. package/dist/locale/ro.min.mjs +1 -1
  180. package/dist/locale/ro.mjs +1 -1
  181. package/dist/locale/ru.js +1 -1
  182. package/dist/locale/ru.min.js +1 -1
  183. package/dist/locale/ru.min.mjs +1 -1
  184. package/dist/locale/ru.mjs +1 -1
  185. package/dist/locale/sk.js +1 -1
  186. package/dist/locale/sk.min.js +1 -1
  187. package/dist/locale/sk.min.mjs +1 -1
  188. package/dist/locale/sk.mjs +1 -1
  189. package/dist/locale/sl.js +1 -1
  190. package/dist/locale/sl.min.js +1 -1
  191. package/dist/locale/sl.min.mjs +1 -1
  192. package/dist/locale/sl.mjs +1 -1
  193. package/dist/locale/sr.js +1 -1
  194. package/dist/locale/sr.min.js +1 -1
  195. package/dist/locale/sr.min.mjs +1 -1
  196. package/dist/locale/sr.mjs +1 -1
  197. package/dist/locale/sv.js +1 -1
  198. package/dist/locale/sv.min.js +1 -1
  199. package/dist/locale/sv.min.mjs +1 -1
  200. package/dist/locale/sv.mjs +1 -1
  201. package/dist/locale/sw.js +1 -1
  202. package/dist/locale/sw.min.js +1 -1
  203. package/dist/locale/sw.min.mjs +1 -1
  204. package/dist/locale/sw.mjs +1 -1
  205. package/dist/locale/ta.js +1 -1
  206. package/dist/locale/ta.min.js +1 -1
  207. package/dist/locale/ta.min.mjs +1 -1
  208. package/dist/locale/ta.mjs +1 -1
  209. package/dist/locale/th.js +1 -1
  210. package/dist/locale/th.min.js +1 -1
  211. package/dist/locale/th.min.mjs +1 -1
  212. package/dist/locale/th.mjs +1 -1
  213. package/dist/locale/tk.js +1 -1
  214. package/dist/locale/tk.min.js +1 -1
  215. package/dist/locale/tk.min.mjs +1 -1
  216. package/dist/locale/tk.mjs +1 -1
  217. package/dist/locale/tr.js +1 -1
  218. package/dist/locale/tr.min.js +1 -1
  219. package/dist/locale/tr.min.mjs +1 -1
  220. package/dist/locale/tr.mjs +1 -1
  221. package/dist/locale/ug-cn.js +1 -1
  222. package/dist/locale/ug-cn.min.js +1 -1
  223. package/dist/locale/ug-cn.min.mjs +1 -1
  224. package/dist/locale/ug-cn.mjs +1 -1
  225. package/dist/locale/uk.js +1 -1
  226. package/dist/locale/uk.min.js +1 -1
  227. package/dist/locale/uk.min.mjs +1 -1
  228. package/dist/locale/uk.mjs +1 -1
  229. package/dist/locale/uz-uz.js +1 -1
  230. package/dist/locale/uz-uz.min.js +1 -1
  231. package/dist/locale/uz-uz.min.mjs +1 -1
  232. package/dist/locale/uz-uz.mjs +1 -1
  233. package/dist/locale/vi.js +1 -1
  234. package/dist/locale/vi.min.js +1 -1
  235. package/dist/locale/vi.min.mjs +1 -1
  236. package/dist/locale/vi.mjs +1 -1
  237. package/dist/locale/zh-cn.js +1 -1
  238. package/dist/locale/zh-cn.min.js +1 -1
  239. package/dist/locale/zh-cn.min.mjs +1 -1
  240. package/dist/locale/zh-cn.mjs +1 -1
  241. package/dist/locale/zh-tw.js +1 -1
  242. package/dist/locale/zh-tw.min.js +1 -1
  243. package/dist/locale/zh-tw.min.mjs +1 -1
  244. package/dist/locale/zh-tw.mjs +1 -1
  245. package/es/components/affix/src/affix2.mjs +1 -1
  246. package/es/components/affix/src/affix2.mjs.map +1 -1
  247. package/es/components/carousel/index.mjs +2 -2
  248. package/es/components/carousel/src/carousel-item.mjs +70 -8
  249. package/es/components/carousel/src/carousel-item.mjs.map +1 -1
  250. package/es/components/carousel/src/carousel-item2.mjs +8 -70
  251. package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
  252. package/es/components/descriptions/index.d.ts +1 -0
  253. package/es/components/descriptions/index.mjs +1 -0
  254. package/es/components/descriptions/index.mjs.map +1 -1
  255. package/es/components/descriptions/src/description-item.d.ts +1 -1
  256. package/es/components/descriptions/src/description-item.mjs +1 -1
  257. package/es/components/descriptions/src/description-item.mjs.map +1 -1
  258. package/es/components/divider/index.mjs +2 -2
  259. package/es/components/divider/src/divider.mjs +17 -35
  260. package/es/components/divider/src/divider.mjs.map +1 -1
  261. package/es/components/divider/src/divider2.mjs +35 -17
  262. package/es/components/divider/src/divider2.mjs.map +1 -1
  263. package/es/components/form/index.mjs +1 -1
  264. package/es/components/form/src/form.d.ts +1 -2
  265. package/es/components/form/src/form.mjs +1 -1
  266. package/es/components/form/src/form.mjs.map +1 -1
  267. package/es/components/index.mjs +8 -4
  268. package/es/components/index.mjs.map +1 -1
  269. package/es/components/rate/index.mjs +2 -2
  270. package/es/components/rate/src/rate.mjs +269 -90
  271. package/es/components/rate/src/rate.mjs.map +1 -1
  272. package/es/components/rate/src/rate2.mjs +90 -269
  273. package/es/components/rate/src/rate2.mjs.map +1 -1
  274. package/es/components/scrollbar/src/bar.mjs +64 -11
  275. package/es/components/scrollbar/src/bar.mjs.map +1 -1
  276. package/es/components/scrollbar/src/bar2.mjs +11 -64
  277. package/es/components/scrollbar/src/bar2.mjs.map +1 -1
  278. package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
  279. package/es/components/select/src/option-group.mjs +17 -13
  280. package/es/components/select/src/option-group.mjs.map +1 -1
  281. package/es/components/space/index.mjs +1 -1
  282. package/es/components/space/src/item.d.ts +1 -1
  283. package/es/components/space/src/item.mjs +1 -1
  284. package/es/components/space/src/item.mjs.map +1 -1
  285. package/es/components/table/src/table/defaults.d.ts +1 -1
  286. package/es/components/table/src/table/defaults.mjs.map +1 -1
  287. package/es/components/table/src/table.vue.d.ts +8 -8
  288. package/es/components/tooltip-v2/index.mjs +1 -1
  289. package/es/components/tooltip-v2/src/arrow.mjs +37 -22
  290. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  291. package/es/components/tooltip-v2/src/arrow2.mjs +22 -37
  292. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  293. package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
  294. package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
  295. package/es/components/tour/index.d.ts +2 -0
  296. package/es/components/tour/index.mjs +2 -0
  297. package/es/components/tour/index.mjs.map +1 -1
  298. package/es/components/tour/src/content.d.ts +2 -0
  299. package/es/components/tour/src/content.mjs +1 -1
  300. package/es/components/tour/src/content.mjs.map +1 -1
  301. package/es/index.mjs +8 -4
  302. package/es/index.mjs.map +1 -1
  303. package/es/version.d.ts +1 -1
  304. package/es/version.mjs +1 -1
  305. package/es/version.mjs.map +1 -1
  306. package/lib/components/affix/src/affix2.js +1 -1
  307. package/lib/components/affix/src/affix2.js.map +1 -1
  308. package/lib/components/carousel/index.js +2 -2
  309. package/lib/components/carousel/src/carousel-item.js +70 -8
  310. package/lib/components/carousel/src/carousel-item.js.map +1 -1
  311. package/lib/components/carousel/src/carousel-item2.js +8 -70
  312. package/lib/components/carousel/src/carousel-item2.js.map +1 -1
  313. package/lib/components/descriptions/index.d.ts +1 -0
  314. package/lib/components/descriptions/index.js +1 -0
  315. package/lib/components/descriptions/index.js.map +1 -1
  316. package/lib/components/descriptions/src/description-item.d.ts +1 -1
  317. package/lib/components/descriptions/src/description-item.js +1 -0
  318. package/lib/components/descriptions/src/description-item.js.map +1 -1
  319. package/lib/components/divider/index.js +2 -2
  320. package/lib/components/divider/src/divider.js +17 -35
  321. package/lib/components/divider/src/divider.js.map +1 -1
  322. package/lib/components/divider/src/divider2.js +35 -17
  323. package/lib/components/divider/src/divider2.js.map +1 -1
  324. package/lib/components/form/index.js +1 -0
  325. package/lib/components/form/index.js.map +1 -1
  326. package/lib/components/form/src/form.d.ts +1 -2
  327. package/lib/components/form/src/form.js +1 -0
  328. package/lib/components/form/src/form.js.map +1 -1
  329. package/lib/components/index.js +18 -5
  330. package/lib/components/index.js.map +1 -1
  331. package/lib/components/rate/index.js +2 -2
  332. package/lib/components/rate/src/rate.js +268 -90
  333. package/lib/components/rate/src/rate.js.map +1 -1
  334. package/lib/components/rate/src/rate2.js +90 -268
  335. package/lib/components/rate/src/rate2.js.map +1 -1
  336. package/lib/components/scrollbar/src/bar.js +64 -11
  337. package/lib/components/scrollbar/src/bar.js.map +1 -1
  338. package/lib/components/scrollbar/src/bar2.js +11 -64
  339. package/lib/components/scrollbar/src/bar2.js.map +1 -1
  340. package/lib/components/scrollbar/src/scrollbar2.js +1 -1
  341. package/lib/components/select/src/option-group.js +17 -13
  342. package/lib/components/select/src/option-group.js.map +1 -1
  343. package/lib/components/space/index.js +2 -1
  344. package/lib/components/space/index.js.map +1 -1
  345. package/lib/components/space/src/item.d.ts +1 -1
  346. package/lib/components/space/src/item.js +1 -0
  347. package/lib/components/space/src/item.js.map +1 -1
  348. package/lib/components/table/src/table/defaults.d.ts +1 -1
  349. package/lib/components/table/src/table/defaults.js.map +1 -1
  350. package/lib/components/table/src/table.vue.d.ts +8 -8
  351. package/lib/components/tooltip-v2/index.js +1 -1
  352. package/lib/components/tooltip-v2/src/arrow.js +37 -23
  353. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  354. package/lib/components/tooltip-v2/src/arrow2.js +23 -37
  355. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  356. package/lib/components/tooltip-v2/src/tooltip.js +1 -1
  357. package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
  358. package/lib/components/tour/index.d.ts +2 -0
  359. package/lib/components/tour/index.js +11 -3
  360. package/lib/components/tour/index.js.map +1 -1
  361. package/lib/components/tour/src/content.d.ts +2 -0
  362. package/lib/components/tour/src/content.js +2 -0
  363. package/lib/components/tour/src/content.js.map +1 -1
  364. package/lib/index.js +18 -5
  365. package/lib/index.js.map +1 -1
  366. package/lib/version.d.ts +1 -1
  367. package/lib/version.js +1 -1
  368. package/lib/version.js.map +1 -1
  369. package/package.json +2 -2
  370. package/web-types.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? addUnit(props.offset) : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n if (props.position === 'top') {\n if (props.target) {\n const difference =\n targetRect.bottom.value - props.offset - rootHeight.value\n fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootTop.value\n }\n } else if (props.target) {\n const difference =\n windowHeight.value -\n targetRect.top.value -\n props.offset -\n rootHeight.value\n fixed.value =\n windowHeight.value - props.offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - props.offset < rootBottom.value\n }\n}\n\nconst handleScroll = () => {\n updateRoot()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit('change', val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot,\n})\n</script>\n"],"names":["useNamespace","shallowRef","useWindowSize","useElementBounding","ref","computed","addUnit","watch","onMounted","throwError","getScrollContainer","useEventListener","watchEffect"],"mappings":";;;;;;;;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,SAASC,cAAwB,EAAA,CAAA;AACvC,IAAA,MAAM,OAAOA,cAA2B,EAAA,CAAA;AACxC,IAAA,MAAM,kBAAkBA,cAAiC,EAAA,CAAA;AACzD,IAAM,MAAA,EAAE,MAAQ,EAAA,YAAA,EAAA,GAAiBC,kBAAc,EAAA,CAAA;AAC/C,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA,UAAA;AAAA,MACR,KAAO,EAAA,SAAA;AAAA,MACP,GAAK,EAAA,OAAA;AAAA,MACL,MAAQ,EAAA,UAAA;AAAA,MACR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AAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAEA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"affix2.js","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useEventListener,\n useWindowSize,\n} from '@vueuse/core'\nimport { addUnit, getScrollContainer, throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { affixEmits, affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElAffix'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(affixProps)\nconst emit = defineEmits(affixEmits)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root, { windowScroll: false })\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? addUnit(props.offset) : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nconst update = () => {\n if (!scrollContainer.value) return\n\n scrollTop.value =\n scrollContainer.value instanceof Window\n ? document.documentElement.scrollTop\n : scrollContainer.value.scrollTop || 0\n\n if (props.position === 'top') {\n if (props.target) {\n const difference =\n targetRect.bottom.value - props.offset - rootHeight.value\n fixed.value = props.offset > rootTop.value && targetRect.bottom.value > 0\n transform.value = difference < 0 ? difference : 0\n } else {\n fixed.value = props.offset > rootTop.value\n }\n } else if (props.target) {\n const difference =\n windowHeight.value -\n targetRect.top.value -\n props.offset -\n rootHeight.value\n fixed.value =\n windowHeight.value - props.offset < rootBottom.value &&\n windowHeight.value > targetRect.top.value\n transform.value = difference < 0 ? -difference : 0\n } else {\n fixed.value = windowHeight.value - props.offset < rootBottom.value\n }\n}\n\nconst handleScroll = () => {\n updateRoot()\n emit('scroll', {\n scrollTop: scrollTop.value,\n fixed: fixed.value,\n })\n}\n\nwatch(fixed, (val) => emit('change', val))\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target does not exist: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\nuseEventListener(scrollContainer, 'scroll', handleScroll)\nwatchEffect(update)\n\ndefineExpose({\n /** @description update affix status */\n update,\n /** @description update rootRect info */\n updateRoot,\n})\n</script>\n"],"names":["useNamespace","shallowRef","useWindowSize","useElementBounding","ref","computed","addUnit","watch","onMounted","throwError","getScrollContainer","useEventListener","watchEffect"],"mappings":";;;;;;;;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAKA,mBAAa,OAAO,CAAA,CAAA;AAE/B,IAAA,MAAM,SAASC,cAAwB,EAAA,CAAA;AACvC,IAAA,MAAM,OAAOA,cAA2B,EA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AAA,QAAA,CAAA,eAAA,CAAA;AACA,OAAA;AACA,MAAW,eAAA,CAAA,KAAA,GAAAC,yBAAA,CAAA,IAAA,CAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AAAA,MACZ,UAAA,EAAA,CAAA;AAED,KAAiB,CAAA,CAAA;AACjB,IAAAC,qBAAkB,CAAA,eAAA,EAAA,QAAA,EAAA,YAAA,CAAA,CAAA;AAElB,IAAaC,eAAA,CAAA,MAAA,CAAA,CAAA;AAAA,IAEX,MAAA,CAAA;AAAA,MAEA,MAAA;AAAA,MACD,UAAA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
6
  var carousel$1 = require('./src/carousel2.js');
7
- var carouselItem$1 = require('./src/carousel-item2.js');
7
+ var carouselItem$1 = require('./src/carousel-item.js');
8
8
  var carousel = require('./src/carousel.js');
9
- var carouselItem = require('./src/carousel-item.js');
9
+ var carouselItem = require('./src/carousel-item2.js');
10
10
  var constants = require('./src/constants.js');
11
11
  var install = require('../../utils/vue/install.js');
12
12
 
@@ -2,16 +2,78 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var carouselItem = require('./carousel-item2.js');
8
+ var useCarouselItem = require('./use-carousel-item.js');
9
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
+ var index = require('../../../hooks/use-namespace/index.js');
7
11
 
8
- const carouselItemProps = runtime.buildProps({
9
- name: { type: String, default: "" },
10
- label: {
11
- type: [String, Number],
12
- default: ""
12
+ const COMPONENT_NAME = "ElCarouselItem";
13
+ const __default__ = vue.defineComponent({
14
+ name: "ElCarouselItem"
15
+ });
16
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
+ ...__default__,
18
+ props: carouselItem.carouselItemProps,
19
+ setup(__props) {
20
+ const props = __props;
21
+ const ns = index.useNamespace("carousel");
22
+ const {
23
+ carouselItemRef,
24
+ active,
25
+ animating,
26
+ hover,
27
+ inStage,
28
+ isVertical,
29
+ translate,
30
+ isCardType,
31
+ scale,
32
+ ready,
33
+ handleItemClick
34
+ } = useCarouselItem.useCarouselItem(props, COMPONENT_NAME);
35
+ const itemKls = vue.computed(() => [
36
+ ns.e("item"),
37
+ ns.is("active", active.value),
38
+ ns.is("in-stage", inStage.value),
39
+ ns.is("hover", hover.value),
40
+ ns.is("animating", animating.value),
41
+ {
42
+ [ns.em("item", "card")]: isCardType.value,
43
+ [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
44
+ }
45
+ ]);
46
+ const itemStyle = vue.computed(() => {
47
+ const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
48
+ const _translate = `${translateType}(${vue.unref(translate)}px)`;
49
+ const _scale = `scale(${vue.unref(scale)})`;
50
+ const transform = [_translate, _scale].join(" ");
51
+ return {
52
+ transform
53
+ };
54
+ });
55
+ return (_ctx, _cache) => {
56
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
57
+ ref_key: "carouselItemRef",
58
+ ref: carouselItemRef,
59
+ class: vue.normalizeClass(vue.unref(itemKls)),
60
+ style: vue.normalizeStyle(vue.unref(itemStyle)),
61
+ onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
62
+ }, [
63
+ vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
64
+ key: 0,
65
+ class: vue.normalizeClass(vue.unref(ns).e("mask"))
66
+ }, null, 2)), [
67
+ [vue.vShow, !vue.unref(active)]
68
+ ]) : vue.createCommentVNode("v-if", true),
69
+ vue.renderSlot(_ctx.$slots, "default")
70
+ ], 6)), [
71
+ [vue.vShow, vue.unref(ready)]
72
+ ]);
73
+ };
13
74
  }
14
75
  });
76
+ var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
15
77
 
16
- exports.carouselItemProps = carouselItemProps;
78
+ exports["default"] = CarouselItem;
17
79
  //# sourceMappingURL=carousel-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n name: { type: String, default: '' },\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"carousel-item.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"itemKls\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemKls = computed(() => [\n ns.e('item'),\n ns.is('active', active.value),\n ns.is('in-stage', inStage.value),\n ns.is('hover', hover.value),\n ns.is('animating', animating.value),\n {\n [ns.em('item', 'card')]: isCardType.value,\n [ns.em('item', 'card-vertical')]: isCardType.value && isVertical.value,\n },\n])\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"names":["useNamespace","useCarouselItem","computed","unref"],"mappings":";;;;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR;;;;;;AAGA,IAAM,MAAA,EAAA,GAAKA,mBAAa,UAAU,CAAA,CAAA;AAGlC,IAAM,MAAA;AAAA,MACJ,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,eAAA;AAAA,KACE,GAAAC,+BAAA,CAAgB,OAAO,cAAc,CAAA,CAAA;AAEzC,IAAM,MAAA,OAAA,GAAUC,aAAS,MAAM;AAAA,MAC7B,EAAA,CAAG,EAAE,MAAM,CAAA;AAAA,MACX,EAAG,CAAA,EAAA,CAAG,QAAU,EAAA,MAAA,CAAO,KAAK,CAAA;AAAA,MAC5B,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,OAAA,CAAQ,KAAK,CAAA;AAAA,MAC/B,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,KAAA,CAAM,KAAK,CAAA;AAAA,MAC1B,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,MAClC;AAAA,QACE,CAAC,EAAG,CAAA,EAAA,CAAG,MAAQ,EAAA,MAAM,IAAI,UAAW,CAAA,KAAA;AAAA,QACpC,CAAC,GAAG,EAAG,CAAA,MAAA,EAAQ,eAAe,CAAI,GAAA,UAAA,CAAW,SAAS,UAAW,CAAA,KAAA;AAAA,OACnE;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,SAAA,GAAYA,aAAwB,MAAM;AAC9C,MAAA,MAAM,aAAgB,GAAA,CAAA,SAAA,EAAYC,SAAM,CAAA,UAAU,IAAI,GAAM,GAAA,GAAA,CAAA,CAAA,CAAA;AAC5D,MAAA,MAAM,UAAa,GAAA,CAAA,EAAG,aAAiB,CAAA,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAA,CAAA,GAAA,CAAA,CAAA;AACtD,MAAM,MAAA,MAAA,GAAS,CAAS,MAAA,EAAAA,SAAA,CAAM,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AACnC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,78 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var carouselItem = require('./carousel-item.js');
8
- var useCarouselItem = require('./use-carousel-item.js');
9
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
10
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
11
7
 
12
- const COMPONENT_NAME = "ElCarouselItem";
13
- const __default__ = vue.defineComponent({
14
- name: "ElCarouselItem"
15
- });
16
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
17
- ...__default__,
18
- props: carouselItem.carouselItemProps,
19
- setup(__props) {
20
- const props = __props;
21
- const ns = index.useNamespace("carousel");
22
- const {
23
- carouselItemRef,
24
- active,
25
- animating,
26
- hover,
27
- inStage,
28
- isVertical,
29
- translate,
30
- isCardType,
31
- scale,
32
- ready,
33
- handleItemClick
34
- } = useCarouselItem.useCarouselItem(props, COMPONENT_NAME);
35
- const itemKls = vue.computed(() => [
36
- ns.e("item"),
37
- ns.is("active", active.value),
38
- ns.is("in-stage", inStage.value),
39
- ns.is("hover", hover.value),
40
- ns.is("animating", animating.value),
41
- {
42
- [ns.em("item", "card")]: isCardType.value,
43
- [ns.em("item", "card-vertical")]: isCardType.value && isVertical.value
44
- }
45
- ]);
46
- const itemStyle = vue.computed(() => {
47
- const translateType = `translate${vue.unref(isVertical) ? "Y" : "X"}`;
48
- const _translate = `${translateType}(${vue.unref(translate)}px)`;
49
- const _scale = `scale(${vue.unref(scale)})`;
50
- const transform = [_translate, _scale].join(" ");
51
- return {
52
- transform
53
- };
54
- });
55
- return (_ctx, _cache) => {
56
- return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
57
- ref_key: "carouselItemRef",
58
- ref: carouselItemRef,
59
- class: vue.normalizeClass(vue.unref(itemKls)),
60
- style: vue.normalizeStyle(vue.unref(itemStyle)),
61
- onClick: _cache[0] || (_cache[0] = (...args) => vue.unref(handleItemClick) && vue.unref(handleItemClick)(...args))
62
- }, [
63
- vue.unref(isCardType) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
64
- key: 0,
65
- class: vue.normalizeClass(vue.unref(ns).e("mask"))
66
- }, null, 2)), [
67
- [vue.vShow, !vue.unref(active)]
68
- ]) : vue.createCommentVNode("v-if", true),
69
- vue.renderSlot(_ctx.$slots, "default")
70
- ], 6)), [
71
- [vue.vShow, vue.unref(ready)]
72
- ]);
73
- };
8
+ const carouselItemProps = runtime.buildProps({
9
+ name: { type: String, default: "" },
10
+ label: {
11
+ type: [String, Number],
12
+ default: ""
74
13
  }
75
14
  });
76
- var CarouselItem = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "carousel-item.vue"]]);
77
15
 
78
- exports["default"] = CarouselItem;
16
+ exports.carouselItemProps = carouselItemProps;
79
17
  //# sourceMappingURL=carousel-item2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.vue"],"sourcesContent":["<template>\n <div\n v-show=\"ready\"\n ref=\"carouselItemRef\"\n :class=\"itemKls\"\n :style=\"itemStyle\"\n @click=\"handleItemClick\"\n >\n <div v-if=\"isCardType\" v-show=\"!active\" :class=\"ns.e('mask')\" />\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, unref } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { carouselItemProps } from './carousel-item'\nimport { useCarouselItem } from './use-carousel-item'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElCarouselItem',\n})\n\nconst props = defineProps(carouselItemProps)\nconst ns = useNamespace('carousel')\nconst COMPONENT_NAME = 'ElCarouselItem'\n// inject\nconst {\n carouselItemRef,\n active,\n animating,\n hover,\n inStage,\n isVertical,\n translate,\n isCardType,\n scale,\n ready,\n handleItemClick,\n} = useCarouselItem(props, COMPONENT_NAME)\n\nconst itemKls = computed(() => [\n ns.e('item'),\n ns.is('active', active.value),\n ns.is('in-stage', inStage.value),\n ns.is('hover', hover.value),\n ns.is('animating', animating.value),\n {\n [ns.em('item', 'card')]: isCardType.value,\n [ns.em('item', 'card-vertical')]: isCardType.value && isVertical.value,\n },\n])\n\nconst itemStyle = computed<CSSProperties>(() => {\n const translateType = `translate${unref(isVertical) ? 'Y' : 'X'}`\n const _translate = `${translateType}(${unref(translate)}px)`\n const _scale = `scale(${unref(scale)})`\n const transform = [_translate, _scale].join(' ')\n\n return {\n transform,\n }\n})\n</script>\n"],"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EAAG,aAAiB,CAAA,CAAA,EAAAA,SAAA,CAAM,SAAS,CAAA,CAAA,GAAA,CAAA,CAAA;AACtD,MAAM,MAAA,MAAA,GAAS,CAAS,MAAA,EAAAA,SAAA,CAAM,KAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AACnC,MAAA,MAAM,YAAY,CAAC,UAAA,EAAY,MAAM,CAAA,CAAE,KAAK,GAAG,CAAA,CAAA;AAE/C,MAAO,OAAA;AAAA,QACL,SAAA;AAAA,OACF,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"carousel-item2.js","sources":["../../../../../../packages/components/carousel/src/carousel-item.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const carouselItemProps = buildProps({\n name: { type: String, default: '' },\n label: {\n type: [String, Number],\n default: '',\n },\n} as const)\n\nexport type CarouselItemProps = ExtractPropTypes<typeof carouselItemProps>\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;AACrC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC;;;;"}
@@ -165,3 +165,4 @@ export declare const ElDescriptionsItem: import("@element-plus/nightly/es/utils"
165
165
  }>>;
166
166
  export default ElDescriptions;
167
167
  export * from './src/description';
168
+ export * from './src/description-item';
@@ -13,6 +13,7 @@ const ElDescriptions = install.withInstall(description$1["default"], {
13
13
  });
14
14
  const ElDescriptionsItem = install.withNoopInstall(descriptionItem["default"]);
15
15
 
16
+ exports.descriptionItemProps = descriptionItem.descriptionItemProps;
16
17
  exports.descriptionProps = description.descriptionProps;
17
18
  exports.ElDescriptions = ElDescriptions;
18
19
  exports.ElDescriptionsItem = ElDescriptionsItem;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/descriptions/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\n"],"names":["withInstall","Descriptions","DescriptionsItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAW,CAACC,wBAAY,EAAE;AACxD,oBAAEC,0BAAgB;AAClB,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGC,uBAAe,CAACD,0BAAgB;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/descriptions/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\nexport * from './src/description-item'\n"],"names":["withInstall","Descriptions","DescriptionsItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAW,CAACC,wBAAY,EAAE;AACxD,oBAAEC,0BAAgB;AAClB,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGC,uBAAe,CAACD,0BAAgB;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import type { ExtractPropTypes, Slot, VNode } from 'vue';
2
- declare const descriptionItemProps: {
2
+ export declare const descriptionItemProps: {
3
3
  label: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
4
4
  span: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
5
5
  width: import("@element-plus/nightly/es/utils").EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
@@ -46,4 +46,5 @@ const DescriptionItem = vue.defineComponent({
46
46
  });
47
47
 
48
48
  exports["default"] = DescriptionItem;
49
+ exports.descriptionItemProps = descriptionItemProps;
49
50
  //# sourceMappingURL=description-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nconst descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\ntype DescriptionItemProps = ExtractPropTypes<typeof descriptionItemProps>\nexport type DescriptionItemVNode = VNode & {\n children: { [name: string]: Slot } | null\n props: Partial<DescriptionItemProps> | null\n}\n"],"names":["buildProps","defineComponent"],"mappings":";;;;;;;;AAEA,MAAM,oBAAoB,GAAGA,kBAAU,CAAC;AACxC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,CAAC,CAAC;AACE,MAAC,eAAe,GAAGC,mBAAe,CAAC;AACxC,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,CAAC;;;;"}
1
+ {"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nexport const descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\ntype DescriptionItemProps = ExtractPropTypes<typeof descriptionItemProps>\nexport type DescriptionItemVNode = VNode & {\n children: { [name: string]: Slot } | null\n props: Partial<DescriptionItemProps> | null\n}\n"],"names":["buildProps","defineComponent"],"mappings":";;;;;;;;AAEY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACE,MAAC,eAAe,GAAGC,mBAAe,CAAC;AACxC,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,CAAC;;;;;"}
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var divider$1 = require('./src/divider.js');
7
- var divider = require('./src/divider2.js');
6
+ var divider$1 = require('./src/divider2.js');
7
+ var divider = require('./src/divider.js');
8
8
  var install = require('../../utils/vue/install.js');
9
9
 
10
10
  const ElDivider = install.withInstall(divider$1["default"]);
@@ -2,43 +2,25 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var vue = require('vue');
6
- require('../../../hooks/index.js');
7
- var divider = require('./divider2.js');
8
- var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
- var index = require('../../../hooks/use-namespace/index.js');
5
+ require('../../../utils/index.js');
6
+ var runtime = require('../../../utils/vue/props/runtime.js');
10
7
 
11
- const __default__ = vue.defineComponent({
12
- name: "ElDivider"
13
- });
14
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
- ...__default__,
16
- props: divider.dividerProps,
17
- setup(__props) {
18
- const props = __props;
19
- const ns = index.useNamespace("divider");
20
- const dividerStyle = vue.computed(() => {
21
- return ns.cssVar({
22
- "border-style": props.borderStyle
23
- });
24
- });
25
- return (_ctx, _cache) => {
26
- return vue.openBlock(), vue.createElementBlock("div", {
27
- class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.direction)]),
28
- style: vue.normalizeStyle(vue.unref(dividerStyle)),
29
- role: "separator"
30
- }, [
31
- _ctx.$slots.default && _ctx.direction !== "vertical" ? (vue.openBlock(), vue.createElementBlock("div", {
32
- key: 0,
33
- class: vue.normalizeClass([vue.unref(ns).e("text"), vue.unref(ns).is(_ctx.contentPosition)])
34
- }, [
35
- vue.renderSlot(_ctx.$slots, "default")
36
- ], 2)) : vue.createCommentVNode("v-if", true)
37
- ], 6);
38
- };
8
+ const dividerProps = runtime.buildProps({
9
+ direction: {
10
+ type: String,
11
+ values: ["horizontal", "vertical"],
12
+ default: "horizontal"
13
+ },
14
+ contentPosition: {
15
+ type: String,
16
+ values: ["left", "center", "right"],
17
+ default: "center"
18
+ },
19
+ borderStyle: {
20
+ type: runtime.definePropType(String),
21
+ default: "solid"
39
22
  }
40
23
  });
41
- var Divider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "divider.vue"]]);
42
24
 
43
- exports["default"] = Divider;
25
+ exports.dividerProps = dividerProps;
44
26
  //# sourceMappingURL=divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sources":["../../../../../../packages/components/divider/src/divider.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), ns.m(direction)]\"\n :style=\"dividerStyle\"\n role=\"separator\"\n >\n <div\n v-if=\"$slots.default && direction !== 'vertical'\"\n :class=\"[ns.e('text'), ns.is(contentPosition)]\"\n >\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { dividerProps } from './divider'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElDivider',\n})\nconst props = defineProps(dividerProps)\nconst ns = useNamespace('divider')\nconst dividerStyle = computed(() => {\n return ns.cssVar({\n 'border-style': props.borderStyle,\n }) as CSSProperties\n})\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAM,MAAA,EAAA,GAAKA,mBAAa,SAAS,CAAA,CAAA;AACjC,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,OAAO,GAAG,MAAO,CAAA;AAAA,QACf,gBAAgB,KAAM,CAAA,WAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"divider.js","sources":["../../../../../../packages/components/divider/src/divider.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n /**\n * @description Set divider's direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Set the style of divider\n */\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n /**\n * @description the position of the customized content on the divider line\n */\n borderStyle: {\n type: definePropType<BorderStyle>(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes<typeof dividerProps>\n\nexport type DividerInstance = InstanceType<typeof Divider>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;AACvC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
@@ -2,25 +2,43 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../../utils/index.js');
6
- var runtime = require('../../../utils/vue/props/runtime.js');
5
+ var vue = require('vue');
6
+ require('../../../hooks/index.js');
7
+ var divider = require('./divider.js');
8
+ var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
9
+ var index = require('../../../hooks/use-namespace/index.js');
7
10
 
8
- const dividerProps = runtime.buildProps({
9
- direction: {
10
- type: String,
11
- values: ["horizontal", "vertical"],
12
- default: "horizontal"
13
- },
14
- contentPosition: {
15
- type: String,
16
- values: ["left", "center", "right"],
17
- default: "center"
18
- },
19
- borderStyle: {
20
- type: runtime.definePropType(String),
21
- default: "solid"
11
+ const __default__ = vue.defineComponent({
12
+ name: "ElDivider"
13
+ });
14
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
15
+ ...__default__,
16
+ props: divider.dividerProps,
17
+ setup(__props) {
18
+ const props = __props;
19
+ const ns = index.useNamespace("divider");
20
+ const dividerStyle = vue.computed(() => {
21
+ return ns.cssVar({
22
+ "border-style": props.borderStyle
23
+ });
24
+ });
25
+ return (_ctx, _cache) => {
26
+ return vue.openBlock(), vue.createElementBlock("div", {
27
+ class: vue.normalizeClass([vue.unref(ns).b(), vue.unref(ns).m(_ctx.direction)]),
28
+ style: vue.normalizeStyle(vue.unref(dividerStyle)),
29
+ role: "separator"
30
+ }, [
31
+ _ctx.$slots.default && _ctx.direction !== "vertical" ? (vue.openBlock(), vue.createElementBlock("div", {
32
+ key: 0,
33
+ class: vue.normalizeClass([vue.unref(ns).e("text"), vue.unref(ns).is(_ctx.contentPosition)])
34
+ }, [
35
+ vue.renderSlot(_ctx.$slots, "default")
36
+ ], 2)) : vue.createCommentVNode("v-if", true)
37
+ ], 6);
38
+ };
22
39
  }
23
40
  });
41
+ var Divider = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "divider.vue"]]);
24
42
 
25
- exports.dividerProps = dividerProps;
43
+ exports["default"] = Divider;
26
44
  //# sourceMappingURL=divider2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider2.js","sources":["../../../../../../packages/components/divider/src/divider.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Divider from './divider.vue'\n\nexport type BorderStyle = CSSStyleDeclaration['borderStyle']\n\nexport const dividerProps = buildProps({\n /**\n * @description Set divider's direction\n */\n direction: {\n type: String,\n values: ['horizontal', 'vertical'],\n default: 'horizontal',\n },\n /**\n * @description Set the style of divider\n */\n contentPosition: {\n type: String,\n values: ['left', 'center', 'right'],\n default: 'center',\n },\n /**\n * @description the position of the customized content on the divider line\n */\n borderStyle: {\n type: definePropType<BorderStyle>(String),\n default: 'solid',\n },\n} as const)\nexport type DividerProps = ExtractPropTypes<typeof dividerProps>\n\nexport type DividerInstance = InstanceType<typeof Divider>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,YAAY,GAAGA,kBAAU,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACtC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC;AACvC,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"divider2.js","sources":["../../../../../../packages/components/divider/src/divider.vue"],"sourcesContent":["<template>\n <div\n :class=\"[ns.b(), ns.m(direction)]\"\n :style=\"dividerStyle\"\n role=\"separator\"\n >\n <div\n v-if=\"$slots.default && direction !== 'vertical'\"\n :class=\"[ns.e('text'), ns.is(contentPosition)]\"\n >\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { dividerProps } from './divider'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElDivider',\n})\nconst props = defineProps(dividerProps)\nconst ns = useNamespace('divider')\nconst dividerStyle = computed(() => {\n return ns.cssVar({\n 'border-style': props.borderStyle,\n }) as CSSProperties\n})\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;;;uCAqBc,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAEA,IAAM,MAAA,EAAA,GAAKA,mBAAa,SAAS,CAAA,CAAA;AACjC,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,OAAO,GAAG,MAAO,CAAA;AAAA,QACf,gBAAgB,KAAM,CAAA,WAAA;AAAA,OACvB,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
@@ -20,6 +20,7 @@ const ElForm = install.withInstall(form$1["default"], {
20
20
  const ElFormItem = install.withNoopInstall(formItem$1["default"]);
21
21
 
22
22
  exports.formEmits = form.formEmits;
23
+ exports.formMetaProps = form.formMetaProps;
23
24
  exports.formProps = form.formProps;
24
25
  exports.formItemProps = formItem.formItemProps;
25
26
  exports.formItemValidateStates = formItem.formItemValidateStates;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType<typeof Form>\nexport type FormItemInstance = InstanceType<typeof FormItem>\n"],"names":["withInstall","Form","FormItem","withNoopInstall"],"mappings":";;;;;;;;;;;;;;;;AAGY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI,EAAE;AACxC,YAAEC,qBAAQ;AACV,CAAC,EAAE;AAES,MAAC,UAAU,GAAGC,uBAAe,CAACD,qBAAQ;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType<typeof Form>\nexport type FormItemInstance = InstanceType<typeof FormItem>\n"],"names":["withInstall","Form","FormItem","withNoopInstall"],"mappings":";;;;;;;;;;;;;;;;AAGY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI,EAAE;AACxC,YAAEC,qBAAQ;AACV,CAAC,EAAE;AAES,MAAC,UAAU,GAAGC,uBAAe,CAACD,qBAAQ;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import type { ExtractPropTypes } from 'vue';
2
2
  import type { FormItemProp } from './form-item';
3
- declare const formMetaProps: {
3
+ export declare const formMetaProps: {
4
4
  readonly size: {
5
5
  readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
6
6
  readonly required: false;
@@ -48,4 +48,3 @@ export declare const formEmits: {
48
48
  validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
49
49
  };
50
50
  export declare type FormEmits = typeof formEmits;
51
- export {};
@@ -62,5 +62,6 @@ const formEmits = {
62
62
  };
63
63
 
64
64
  exports.formEmits = formEmits;
65
+ exports.formMetaProps = formMetaProps;
65
66
  exports.formProps = formProps;
66
67
  //# sourceMappingURL=form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nconst formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":["buildProps","componentSizes","definePropType","isArray","isString","isBoolean"],"mappings":";;;;;;;;;;;AAQA,MAAM,aAAa,GAAGA,kBAAU,CAAC;AACjC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,CAAC,CAAC;AACS,MAAC,SAAS,GAAGD,kBAAU,CAAC;AACpC,EAAE,GAAG,aAAa;AAClB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEE,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE,OAAO;AAC/B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAACC,cAAO,CAAC,IAAI,CAAC,IAAIC,eAAQ,CAAC,IAAI,CAAC,KAAKC,eAAS,CAAC,OAAO,CAAC,IAAID,eAAQ,CAAC,OAAO,CAAC;AACpH;;;;;"}
1
+ {"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":["buildProps","componentSizes","definePropType","isArray","isString","isBoolean"],"mappings":";;;;;;;;;;;AAQY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,SAAS,GAAGD,kBAAU,CAAC;AACpC,EAAE,GAAG,aAAa;AAClB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEE,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EA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