@element-plus/nightly 0.0.20240108 → 0.0.20240109

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 (364) hide show
  1. package/dist/index.full.js +2 -2
  2. package/dist/index.full.min.js +2 -2
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +2 -2
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +2 -2
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar-eg.js +1 -1
  12. package/dist/locale/ar-eg.min.js +1 -1
  13. package/dist/locale/ar-eg.min.mjs +1 -1
  14. package/dist/locale/ar-eg.mjs +1 -1
  15. package/dist/locale/ar.js +1 -1
  16. package/dist/locale/ar.min.js +1 -1
  17. package/dist/locale/ar.min.mjs +1 -1
  18. package/dist/locale/ar.mjs +1 -1
  19. package/dist/locale/az.js +1 -1
  20. package/dist/locale/az.min.js +1 -1
  21. package/dist/locale/az.min.mjs +1 -1
  22. package/dist/locale/az.mjs +1 -1
  23. package/dist/locale/bg.js +1 -1
  24. package/dist/locale/bg.min.js +1 -1
  25. package/dist/locale/bg.min.mjs +1 -1
  26. package/dist/locale/bg.mjs +1 -1
  27. package/dist/locale/bn.js +1 -1
  28. package/dist/locale/bn.min.js +1 -1
  29. package/dist/locale/bn.min.mjs +1 -1
  30. package/dist/locale/bn.mjs +1 -1
  31. package/dist/locale/ca.js +1 -1
  32. package/dist/locale/ca.min.js +1 -1
  33. package/dist/locale/ca.min.mjs +1 -1
  34. package/dist/locale/ca.mjs +1 -1
  35. package/dist/locale/ckb.js +1 -1
  36. package/dist/locale/ckb.min.js +1 -1
  37. package/dist/locale/ckb.min.mjs +1 -1
  38. package/dist/locale/ckb.mjs +1 -1
  39. package/dist/locale/cs.js +1 -1
  40. package/dist/locale/cs.min.js +1 -1
  41. package/dist/locale/cs.min.mjs +1 -1
  42. package/dist/locale/cs.mjs +1 -1
  43. package/dist/locale/da.js +1 -1
  44. package/dist/locale/da.min.js +1 -1
  45. package/dist/locale/da.min.mjs +1 -1
  46. package/dist/locale/da.mjs +1 -1
  47. package/dist/locale/de.js +1 -1
  48. package/dist/locale/de.min.js +1 -1
  49. package/dist/locale/de.min.mjs +1 -1
  50. package/dist/locale/de.mjs +1 -1
  51. package/dist/locale/el.js +1 -1
  52. package/dist/locale/el.min.js +1 -1
  53. package/dist/locale/el.min.mjs +1 -1
  54. package/dist/locale/el.mjs +1 -1
  55. package/dist/locale/en.js +1 -1
  56. package/dist/locale/en.min.js +1 -1
  57. package/dist/locale/en.min.mjs +1 -1
  58. package/dist/locale/en.mjs +1 -1
  59. package/dist/locale/eo.js +1 -1
  60. package/dist/locale/eo.min.js +1 -1
  61. package/dist/locale/eo.min.mjs +1 -1
  62. package/dist/locale/eo.mjs +1 -1
  63. package/dist/locale/es.js +1 -1
  64. package/dist/locale/es.min.js +1 -1
  65. package/dist/locale/es.min.mjs +1 -1
  66. package/dist/locale/es.mjs +1 -1
  67. package/dist/locale/et.js +1 -1
  68. package/dist/locale/et.min.js +1 -1
  69. package/dist/locale/et.min.mjs +1 -1
  70. package/dist/locale/et.mjs +1 -1
  71. package/dist/locale/eu.js +1 -1
  72. package/dist/locale/eu.min.js +1 -1
  73. package/dist/locale/eu.min.mjs +1 -1
  74. package/dist/locale/eu.mjs +1 -1
  75. package/dist/locale/fa.js +1 -1
  76. package/dist/locale/fa.min.js +1 -1
  77. package/dist/locale/fa.min.mjs +1 -1
  78. package/dist/locale/fa.mjs +1 -1
  79. package/dist/locale/fi.js +1 -1
  80. package/dist/locale/fi.min.js +1 -1
  81. package/dist/locale/fi.min.mjs +1 -1
  82. package/dist/locale/fi.mjs +1 -1
  83. package/dist/locale/fr.js +1 -1
  84. package/dist/locale/fr.min.js +1 -1
  85. package/dist/locale/fr.min.mjs +1 -1
  86. package/dist/locale/fr.mjs +1 -1
  87. package/dist/locale/he.js +1 -1
  88. package/dist/locale/he.min.js +1 -1
  89. package/dist/locale/he.min.mjs +1 -1
  90. package/dist/locale/he.mjs +1 -1
  91. package/dist/locale/hr.js +1 -1
  92. package/dist/locale/hr.min.js +1 -1
  93. package/dist/locale/hr.min.mjs +1 -1
  94. package/dist/locale/hr.mjs +1 -1
  95. package/dist/locale/hu.js +1 -1
  96. package/dist/locale/hu.min.js +1 -1
  97. package/dist/locale/hu.min.mjs +1 -1
  98. package/dist/locale/hu.mjs +1 -1
  99. package/dist/locale/hy-am.js +1 -1
  100. package/dist/locale/hy-am.min.js +1 -1
  101. package/dist/locale/hy-am.min.mjs +1 -1
  102. package/dist/locale/hy-am.mjs +1 -1
  103. package/dist/locale/id.js +1 -1
  104. package/dist/locale/id.min.js +1 -1
  105. package/dist/locale/id.min.mjs +1 -1
  106. package/dist/locale/id.mjs +1 -1
  107. package/dist/locale/it.js +1 -1
  108. package/dist/locale/it.min.js +1 -1
  109. package/dist/locale/it.min.mjs +1 -1
  110. package/dist/locale/it.mjs +1 -1
  111. package/dist/locale/ja.js +1 -1
  112. package/dist/locale/ja.min.js +1 -1
  113. package/dist/locale/ja.min.mjs +1 -1
  114. package/dist/locale/ja.mjs +1 -1
  115. package/dist/locale/kk.js +1 -1
  116. package/dist/locale/kk.min.js +1 -1
  117. package/dist/locale/kk.min.mjs +1 -1
  118. package/dist/locale/kk.mjs +1 -1
  119. package/dist/locale/km.js +1 -1
  120. package/dist/locale/km.min.js +1 -1
  121. package/dist/locale/km.min.mjs +1 -1
  122. package/dist/locale/km.mjs +1 -1
  123. package/dist/locale/ko.js +1 -1
  124. package/dist/locale/ko.min.js +1 -1
  125. package/dist/locale/ko.min.mjs +1 -1
  126. package/dist/locale/ko.mjs +1 -1
  127. package/dist/locale/ku.js +1 -1
  128. package/dist/locale/ku.min.js +1 -1
  129. package/dist/locale/ku.min.mjs +1 -1
  130. package/dist/locale/ku.mjs +1 -1
  131. package/dist/locale/ky.js +1 -1
  132. package/dist/locale/ky.min.js +1 -1
  133. package/dist/locale/ky.min.mjs +1 -1
  134. package/dist/locale/ky.mjs +1 -1
  135. package/dist/locale/lt.js +1 -1
  136. package/dist/locale/lt.min.js +1 -1
  137. package/dist/locale/lt.min.mjs +1 -1
  138. package/dist/locale/lt.mjs +1 -1
  139. package/dist/locale/lv.js +1 -1
  140. package/dist/locale/lv.min.js +1 -1
  141. package/dist/locale/lv.min.mjs +1 -1
  142. package/dist/locale/lv.mjs +1 -1
  143. package/dist/locale/mg.js +1 -1
  144. package/dist/locale/mg.min.js +1 -1
  145. package/dist/locale/mg.min.mjs +1 -1
  146. package/dist/locale/mg.mjs +1 -1
  147. package/dist/locale/mn.js +1 -1
  148. package/dist/locale/mn.min.js +1 -1
  149. package/dist/locale/mn.min.mjs +1 -1
  150. package/dist/locale/mn.mjs +1 -1
  151. package/dist/locale/nb-no.js +1 -1
  152. package/dist/locale/nb-no.min.js +1 -1
  153. package/dist/locale/nb-no.min.mjs +1 -1
  154. package/dist/locale/nb-no.mjs +1 -1
  155. package/dist/locale/nl.js +1 -1
  156. package/dist/locale/nl.min.js +1 -1
  157. package/dist/locale/nl.min.mjs +1 -1
  158. package/dist/locale/nl.mjs +1 -1
  159. package/dist/locale/pa.js +1 -1
  160. package/dist/locale/pa.min.js +1 -1
  161. package/dist/locale/pa.min.mjs +1 -1
  162. package/dist/locale/pa.mjs +1 -1
  163. package/dist/locale/pl.js +1 -1
  164. package/dist/locale/pl.min.js +1 -1
  165. package/dist/locale/pl.min.mjs +1 -1
  166. package/dist/locale/pl.mjs +1 -1
  167. package/dist/locale/pt-br.js +1 -1
  168. package/dist/locale/pt-br.min.js +1 -1
  169. package/dist/locale/pt-br.min.mjs +1 -1
  170. package/dist/locale/pt-br.mjs +1 -1
  171. package/dist/locale/pt.js +1 -1
  172. package/dist/locale/pt.min.js +1 -1
  173. package/dist/locale/pt.min.mjs +1 -1
  174. package/dist/locale/pt.mjs +1 -1
  175. package/dist/locale/ro.js +1 -1
  176. package/dist/locale/ro.min.js +1 -1
  177. package/dist/locale/ro.min.mjs +1 -1
  178. package/dist/locale/ro.mjs +1 -1
  179. package/dist/locale/ru.js +1 -1
  180. package/dist/locale/ru.min.js +1 -1
  181. package/dist/locale/ru.min.mjs +1 -1
  182. package/dist/locale/ru.mjs +1 -1
  183. package/dist/locale/sk.js +1 -1
  184. package/dist/locale/sk.min.js +1 -1
  185. package/dist/locale/sk.min.mjs +1 -1
  186. package/dist/locale/sk.mjs +1 -1
  187. package/dist/locale/sl.js +1 -1
  188. package/dist/locale/sl.min.js +1 -1
  189. package/dist/locale/sl.min.mjs +1 -1
  190. package/dist/locale/sl.mjs +1 -1
  191. package/dist/locale/sr.js +1 -1
  192. package/dist/locale/sr.min.js +1 -1
  193. package/dist/locale/sr.min.mjs +1 -1
  194. package/dist/locale/sr.mjs +1 -1
  195. package/dist/locale/sv.js +1 -1
  196. package/dist/locale/sv.min.js +1 -1
  197. package/dist/locale/sv.min.mjs +1 -1
  198. package/dist/locale/sv.mjs +1 -1
  199. package/dist/locale/sw.js +1 -1
  200. package/dist/locale/sw.min.js +1 -1
  201. package/dist/locale/sw.min.mjs +1 -1
  202. package/dist/locale/sw.mjs +1 -1
  203. package/dist/locale/ta.js +1 -1
  204. package/dist/locale/ta.min.js +1 -1
  205. package/dist/locale/ta.min.mjs +1 -1
  206. package/dist/locale/ta.mjs +1 -1
  207. package/dist/locale/th.js +1 -1
  208. package/dist/locale/th.min.js +1 -1
  209. package/dist/locale/th.min.mjs +1 -1
  210. package/dist/locale/th.mjs +1 -1
  211. package/dist/locale/tk.js +1 -1
  212. package/dist/locale/tk.min.js +1 -1
  213. package/dist/locale/tk.min.mjs +1 -1
  214. package/dist/locale/tk.mjs +1 -1
  215. package/dist/locale/tr.js +1 -1
  216. package/dist/locale/tr.min.js +1 -1
  217. package/dist/locale/tr.min.mjs +1 -1
  218. package/dist/locale/tr.mjs +1 -1
  219. package/dist/locale/ug-cn.js +1 -1
  220. package/dist/locale/ug-cn.min.js +1 -1
  221. package/dist/locale/ug-cn.min.mjs +1 -1
  222. package/dist/locale/ug-cn.mjs +1 -1
  223. package/dist/locale/uk.js +1 -1
  224. package/dist/locale/uk.min.js +1 -1
  225. package/dist/locale/uk.min.mjs +1 -1
  226. package/dist/locale/uk.mjs +1 -1
  227. package/dist/locale/uz-uz.js +1 -1
  228. package/dist/locale/uz-uz.min.js +1 -1
  229. package/dist/locale/uz-uz.min.mjs +1 -1
  230. package/dist/locale/uz-uz.mjs +1 -1
  231. package/dist/locale/vi.js +1 -1
  232. package/dist/locale/vi.min.js +1 -1
  233. package/dist/locale/vi.min.mjs +1 -1
  234. package/dist/locale/vi.mjs +1 -1
  235. package/dist/locale/zh-cn.js +1 -1
  236. package/dist/locale/zh-cn.min.js +1 -1
  237. package/dist/locale/zh-cn.min.mjs +1 -1
  238. package/dist/locale/zh-cn.mjs +1 -1
  239. package/dist/locale/zh-tw.js +1 -1
  240. package/dist/locale/zh-tw.min.js +1 -1
  241. package/dist/locale/zh-tw.min.mjs +1 -1
  242. package/dist/locale/zh-tw.mjs +1 -1
  243. package/es/components/badge/index.mjs +2 -2
  244. package/es/components/badge/src/badge.mjs +17 -55
  245. package/es/components/badge/src/badge.mjs.map +1 -1
  246. package/es/components/badge/src/badge2.mjs +55 -17
  247. package/es/components/badge/src/badge2.mjs.map +1 -1
  248. package/es/components/checkbox/index.d.ts +18 -18
  249. package/es/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
  250. package/es/components/checkbox/src/checkbox.d.ts +2 -2
  251. package/es/components/checkbox/src/checkbox.vue.d.ts +6 -6
  252. package/es/components/dialog/index.d.ts +1 -1
  253. package/es/components/dialog/src/dialog-content.vue.d.ts +1 -1
  254. package/es/components/dialog/src/dialog.vue.d.ts +1 -1
  255. package/es/components/dropdown/index.d.ts +2 -2
  256. package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  257. package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  258. package/es/components/empty/index.mjs +2 -2
  259. package/es/components/empty/src/empty.mjs +11 -55
  260. package/es/components/empty/src/empty.mjs.map +1 -1
  261. package/es/components/empty/src/empty2.mjs +55 -11
  262. package/es/components/empty/src/empty2.mjs.map +1 -1
  263. package/es/components/index.mjs +2 -2
  264. package/es/components/pagination/src/components/sizes.vue.d.ts +6 -6
  265. package/es/components/radio/index.d.ts +12 -12
  266. package/es/components/radio/src/radio-button.d.ts +1 -1
  267. package/es/components/radio/src/radio-button.vue.d.ts +4 -4
  268. package/es/components/radio/src/radio.d.ts +2 -2
  269. package/es/components/radio/src/radio.vue.d.ts +4 -4
  270. package/es/components/select/index.d.ts +6 -6
  271. package/es/components/select/src/option.vue.d.ts +2 -2
  272. package/es/components/select/src/select.vue.d.ts +2 -2
  273. package/es/components/time-picker/src/common/picker.vue.d.ts +1 -1
  274. package/es/components/time-select/index.d.ts +20 -20
  275. package/es/components/time-select/src/time-select.vue.d.ts +10 -10
  276. package/es/components/tooltip-v2/index.mjs +2 -2
  277. package/es/components/tooltip-v2/src/arrow.mjs +22 -37
  278. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  279. package/es/components/tooltip-v2/src/arrow2.mjs +37 -22
  280. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  281. package/es/components/tooltip-v2/src/content.mjs +112 -50
  282. package/es/components/tooltip-v2/src/content.mjs.map +1 -1
  283. package/es/components/tooltip-v2/src/content2.mjs +50 -112
  284. package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
  285. package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
  286. package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
  287. package/es/components/tour/src/mask.mjs +19 -78
  288. package/es/components/tour/src/mask.mjs.map +1 -1
  289. package/es/components/tour/src/mask2.mjs +78 -19
  290. package/es/components/tour/src/mask2.mjs.map +1 -1
  291. package/es/components/tour/src/tour2.mjs +1 -1
  292. package/es/components/transfer/index.d.ts +60 -60
  293. package/es/components/transfer/src/transfer-panel.vue.d.ts +12 -12
  294. package/es/components/transfer/src/transfer.vue.d.ts +60 -60
  295. package/es/components/tree-select/src/tree-select-option.d.ts +8 -8
  296. package/es/components/tree-v2/index.d.ts +12 -12
  297. package/es/components/tree-v2/src/tree-node.vue.d.ts +12 -12
  298. package/es/components/tree-v2/src/tree.vue.d.ts +12 -12
  299. package/es/index.mjs +2 -2
  300. package/es/version.d.ts +1 -1
  301. package/es/version.mjs +1 -1
  302. package/es/version.mjs.map +1 -1
  303. package/lib/components/badge/index.js +2 -2
  304. package/lib/components/badge/src/badge.js +17 -55
  305. package/lib/components/badge/src/badge.js.map +1 -1
  306. package/lib/components/badge/src/badge2.js +55 -17
  307. package/lib/components/badge/src/badge2.js.map +1 -1
  308. package/lib/components/checkbox/index.d.ts +18 -18
  309. package/lib/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
  310. package/lib/components/checkbox/src/checkbox.d.ts +2 -2
  311. package/lib/components/checkbox/src/checkbox.vue.d.ts +6 -6
  312. package/lib/components/dialog/index.d.ts +1 -1
  313. package/lib/components/dialog/src/dialog-content.vue.d.ts +1 -1
  314. package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
  315. package/lib/components/dropdown/index.d.ts +2 -2
  316. package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +1 -1
  317. package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
  318. package/lib/components/empty/index.js +2 -2
  319. package/lib/components/empty/src/empty.js +11 -55
  320. package/lib/components/empty/src/empty.js.map +1 -1
  321. package/lib/components/empty/src/empty2.js +55 -11
  322. package/lib/components/empty/src/empty2.js.map +1 -1
  323. package/lib/components/index.js +2 -2
  324. package/lib/components/pagination/src/components/sizes.vue.d.ts +6 -6
  325. package/lib/components/radio/index.d.ts +12 -12
  326. package/lib/components/radio/src/radio-button.d.ts +1 -1
  327. package/lib/components/radio/src/radio-button.vue.d.ts +4 -4
  328. package/lib/components/radio/src/radio.d.ts +2 -2
  329. package/lib/components/radio/src/radio.vue.d.ts +4 -4
  330. package/lib/components/select/index.d.ts +6 -6
  331. package/lib/components/select/src/option.vue.d.ts +2 -2
  332. package/lib/components/select/src/select.vue.d.ts +2 -2
  333. package/lib/components/time-picker/src/common/picker.vue.d.ts +1 -1
  334. package/lib/components/time-select/index.d.ts +20 -20
  335. package/lib/components/time-select/src/time-select.vue.d.ts +10 -10
  336. package/lib/components/tooltip-v2/index.js +2 -2
  337. package/lib/components/tooltip-v2/src/arrow.js +23 -37
  338. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  339. package/lib/components/tooltip-v2/src/arrow2.js +37 -23
  340. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  341. package/lib/components/tooltip-v2/src/content.js +112 -50
  342. package/lib/components/tooltip-v2/src/content.js.map +1 -1
  343. package/lib/components/tooltip-v2/src/content2.js +50 -112
  344. package/lib/components/tooltip-v2/src/content2.js.map +1 -1
  345. package/lib/components/tooltip-v2/src/tooltip.js +2 -2
  346. package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
  347. package/lib/components/tour/src/mask.js +19 -78
  348. package/lib/components/tour/src/mask.js.map +1 -1
  349. package/lib/components/tour/src/mask2.js +78 -19
  350. package/lib/components/tour/src/mask2.js.map +1 -1
  351. package/lib/components/tour/src/tour2.js +1 -1
  352. package/lib/components/transfer/index.d.ts +60 -60
  353. package/lib/components/transfer/src/transfer-panel.vue.d.ts +12 -12
  354. package/lib/components/transfer/src/transfer.vue.d.ts +60 -60
  355. package/lib/components/tree-select/src/tree-select-option.d.ts +8 -8
  356. package/lib/components/tree-v2/index.d.ts +12 -12
  357. package/lib/components/tree-v2/src/tree-node.vue.d.ts +12 -12
  358. package/lib/components/tree-v2/src/tree.vue.d.ts +12 -12
  359. package/lib/index.js +2 -2
  360. package/lib/version.d.ts +1 -1
  361. package/lib/version.js +1 -1
  362. package/lib/version.js.map +1 -1
  363. package/package.json +1 -1
  364. package/web-types.json +1 -1
@@ -1,43 +1,28 @@
1
- import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
2
- import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
3
- import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow2.mjs';
4
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { tooltipV2Sides } from './common.mjs';
3
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
5
4
 
6
- const __default__ = defineComponent({
7
- name: "ElTooltipV2Arrow"
8
- });
9
- const _sfc_main = /* @__PURE__ */ defineComponent({
10
- ...__default__,
11
- props: {
12
- ...tooltipV2ArrowProps,
13
- ...tooltipV2ArrowSpecialProps
5
+ const tooltipV2ArrowProps = buildProps({
6
+ width: {
7
+ type: Number,
8
+ default: 10
9
+ },
10
+ height: {
11
+ type: Number,
12
+ default: 10
14
13
  },
15
- setup(__props) {
16
- const props = __props;
17
- const { ns } = inject(tooltipV2RootKey);
18
- const { arrowRef } = inject(tooltipV2ContentKey);
19
- const arrowStyle = computed(() => {
20
- const { style, width, height } = props;
21
- const namespace = ns.namespace.value;
22
- return {
23
- [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
24
- [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
25
- [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
26
- [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
27
- ...style || {}
28
- };
29
- });
30
- return (_ctx, _cache) => {
31
- return openBlock(), createElementBlock("span", {
32
- ref_key: "arrowRef",
33
- ref: arrowRef,
34
- style: normalizeStyle(unref(arrowStyle)),
35
- class: normalizeClass(unref(ns).e("arrow"))
36
- }, null, 6);
37
- };
14
+ style: {
15
+ type: definePropType(Object),
16
+ default: null
17
+ }
18
+ });
19
+ const tooltipV2ArrowSpecialProps = buildProps({
20
+ side: {
21
+ type: definePropType(String),
22
+ values: tooltipV2Sides,
23
+ required: true
38
24
  }
39
25
  });
40
- var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
41
26
 
42
- export { TooltipV2Arrow as default };
27
+ export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
43
28
  //# sourceMappingURL=arrow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;mCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAOA,IAAM,MAAA,EAAE,EAAO,EAAA,GAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AACtC,IAAM,MAAA,EAAE,QAAa,EAAA,GAAA,MAAA,CAAO,mBAAmB,CAAA,CAAA;AAE/C,IAAM,MAAA,UAAA,GAAa,SAAwB,MAAM;AAC/C,MAAM,MAAA,EAAE,KAAO,EAAA,KAAA,EAAO,MAAW,EAAA,GAAA,KAAA,CAAA;AACjC,MAAM,MAAA,SAAA,GAAY,GAAG,SAAU,CAAA,KAAA,CAAA;AAE/B,MAAO,OAAA;AAAA,QACL,CAAC,CAAK,EAAA,EAAA,SAAA,CAAA,uBAAA,CAAA,GAAqC,CAAG,EAAA,KAAA,CAAA,EAAA,CAAA;AAAA,QAC9C,CAAC,CAAK,EAAA,EAAA,SAAA,CAAA,wBAAA,CAAA,GAAsC,CAAG,EAAA,MAAA,CAAA,EAAA,CAAA;AAAA,QAC/C,CAAC,CAAA,EAAA,EAAK,SAA4C,CAAA,8BAAA,CAAA,GAAA,CAAA,EAAG,KAAQ,GAAA,CAAA,CAAA,EAAA,CAAA;AAAA,QAC7D,CAAC,CAAA,EAAA,EAAK,SAA2C,CAAA,6BAAA,CAAA,GAAA,KAAA,GAAQ,CAAI,GAAA,CAAA;AAAA,QAC7D,GAAI,SAAS,EAAC;AAAA,OAChB,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { tooltipV2Sides } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TooltipV2Sides } from './common'\n\nexport const tooltipV2ArrowProps = buildProps({\n width: {\n type: Number,\n default: 10,\n },\n height: {\n type: Number,\n default: 10,\n },\n style: {\n type: definePropType<CSSProperties | null>(Object),\n default: null,\n },\n} as const)\n\nexport const tooltipV2ArrowSpecialProps = buildProps({\n side: {\n type: definePropType<TooltipV2Sides>(String),\n values: tooltipV2Sides,\n required: true,\n },\n} as const)\n\nexport type TooltipV2ArrowProps = ExtractPropTypes<typeof tooltipV2ArrowProps>\n"],"names":[],"mappings":";;;;AAEY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAG,UAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
@@ -1,28 +1,43 @@
1
- import '../../../utils/index.mjs';
2
- import { tooltipV2Sides } from './common.mjs';
3
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
2
+ import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
3
+ import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow.mjs';
4
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
4
5
 
5
- const tooltipV2ArrowProps = buildProps({
6
- width: {
7
- type: Number,
8
- default: 10
9
- },
10
- height: {
11
- type: Number,
12
- default: 10
13
- },
14
- style: {
15
- type: definePropType(Object),
16
- default: null
17
- }
6
+ const __default__ = defineComponent({
7
+ name: "ElTooltipV2Arrow"
18
8
  });
19
- const tooltipV2ArrowSpecialProps = buildProps({
20
- side: {
21
- type: definePropType(String),
22
- values: tooltipV2Sides,
23
- required: true
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...__default__,
11
+ props: {
12
+ ...tooltipV2ArrowProps,
13
+ ...tooltipV2ArrowSpecialProps
14
+ },
15
+ setup(__props) {
16
+ const props = __props;
17
+ const { ns } = inject(tooltipV2RootKey);
18
+ const { arrowRef } = inject(tooltipV2ContentKey);
19
+ const arrowStyle = computed(() => {
20
+ const { style, width, height } = props;
21
+ const namespace = ns.namespace.value;
22
+ return {
23
+ [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
24
+ [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
25
+ [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
26
+ [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
27
+ ...style || {}
28
+ };
29
+ });
30
+ return (_ctx, _cache) => {
31
+ return openBlock(), createElementBlock("span", {
32
+ ref_key: "arrowRef",
33
+ ref: arrowRef,
34
+ style: normalizeStyle(unref(arrowStyle)),
35
+ class: normalizeClass(unref(ns).e("arrow"))
36
+ }, null, 6);
37
+ };
24
38
  }
25
39
  });
40
+ var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
26
41
 
27
- export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
42
+ export { TooltipV2Arrow as default };
28
43
  //# sourceMappingURL=arrow2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { tooltipV2Sides } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TooltipV2Sides } from './common'\n\nexport const tooltipV2ArrowProps = buildProps({\n width: {\n type: Number,\n default: 10,\n },\n height: {\n type: Number,\n default: 10,\n },\n style: {\n type: definePropType<CSSProperties | null>(Object),\n default: null,\n },\n} as const)\n\nexport const tooltipV2ArrowSpecialProps = buildProps({\n side: {\n type: definePropType<TooltipV2Sides>(String),\n values: tooltipV2Sides,\n required: true,\n },\n} as const)\n\nexport type TooltipV2ArrowProps = ExtractPropTypes<typeof tooltipV2ArrowProps>\n"],"names":[],"mappings":";;;;AAEY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAG,UAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;mCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAOA,IAAM,MAAA,EAAE,EAAO,EAAA,GAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AACtC,IAAM,MAAA,EAAE,QAAa,EAAA,GAAA,MAAA,CAAO,mBAAmB,CAAA,CAAA;AAE/C,IAAM,MAAA,UAAA,GAAa,SAAwB,MAAM;AAC/C,MAAM,MAAA,EAAE,KAAO,EAAA,KAAA,EAAO,MAAW,EAAA,GAAA,KAAA,CAAA;AACjC,MAAM,MAAA,SAAA,GAAY,GAAG,SAAU,CAAA,KAAA,CAAA;AAE/B,MAAO,OAAA;AAAA,QACL,CAAC,CAAK,EAAA,EAAA,SAAA,CAAA,uBAAA,CAAA,GAAqC,CAAG,EAAA,KAAA,CAAA,EAAA,CAAA;AAAA,QAC9C,CAAC,CAAK,EAAA,EAAA,SAAA,CAAA,wBAAA,CAAA,GAAsC,CAAG,EAAA,MAAA,CAAA,EAAA,CAAA;AAAA,QAC/C,CAAC,CAAA,EAAA,EAAK,SAA4C,CAAA,8BAAA,CAAA,GAAA,CAAA,EAAG,KAAQ,GAAA,CAAA,CAAA,EAAA,CAAA;AAAA,QAC7D,CAAC,CAAA,EAAA,EAAK,SAA2C,CAAA,6BAAA,CAAA,GAAA,KAAA,GAAQ,CAAI,GAAA,CAAA;AAAA,QAC7D,GAAI,SAAS,EAAC;AAAA,OAChB,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;"}
@@ -1,55 +1,117 @@
1
- import '../../../utils/index.mjs';
2
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
1
+ import { defineComponent, inject, ref, computed, unref, watch, onMounted, provide, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot, createVNode, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
2
+ import { offset } from '@floating-ui/dom';
3
+ import '../../../hooks/index.mjs';
4
+ import '../../visual-hidden/index.mjs';
5
+ import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
6
+ import { tooltipV2ContentProps } from './content2.mjs';
7
+ import { tooltipV2CommonProps } from './common.mjs';
8
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
+ import { useFloating, arrowMiddleware } from '../../../hooks/use-floating/index.mjs';
10
+ import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
11
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
+ import ElVisuallyHidden from '../../visual-hidden/src/visual-hidden2.mjs';
3
13
 
4
- const tooltipV2Strategies = ["absolute", "fixed"];
5
- const tooltipV2Placements = [
6
- "top-start",
7
- "top-end",
8
- "top",
9
- "bottom-start",
10
- "bottom-end",
11
- "bottom",
12
- "left-start",
13
- "left-end",
14
- "left",
15
- "right-start",
16
- "right-end",
17
- "right"
18
- ];
19
- const tooltipV2ContentProps = buildProps({
20
- ariaLabel: String,
21
- arrowPadding: {
22
- type: definePropType(Number),
23
- default: 5
24
- },
25
- effect: {
26
- type: String,
27
- default: ""
28
- },
29
- contentClass: String,
30
- placement: {
31
- type: definePropType(String),
32
- values: tooltipV2Placements,
33
- default: "bottom"
34
- },
35
- reference: {
36
- type: definePropType(Object),
37
- default: null
38
- },
39
- offset: {
40
- type: Number,
41
- default: 8
42
- },
43
- strategy: {
44
- type: definePropType(String),
45
- values: tooltipV2Strategies,
46
- default: "absolute"
47
- },
48
- showArrow: {
49
- type: Boolean,
50
- default: false
14
+ const _hoisted_1 = ["data-side"];
15
+ const __default__ = defineComponent({
16
+ name: "ElTooltipV2Content"
17
+ });
18
+ const _sfc_main = /* @__PURE__ */ defineComponent({
19
+ ...__default__,
20
+ props: { ...tooltipV2ContentProps, ...tooltipV2CommonProps },
21
+ setup(__props) {
22
+ const props = __props;
23
+ const { triggerRef, contentId } = inject(tooltipV2RootKey);
24
+ const placement = ref(props.placement);
25
+ const strategy = ref(props.strategy);
26
+ const arrowRef = ref(null);
27
+ const { referenceRef, contentRef, middlewareData, x, y, update } = useFloating({
28
+ placement,
29
+ strategy,
30
+ middleware: computed(() => {
31
+ const middleware = [offset(props.offset)];
32
+ if (props.showArrow) {
33
+ middleware.push(arrowMiddleware({
34
+ arrowRef
35
+ }));
36
+ }
37
+ return middleware;
38
+ })
39
+ });
40
+ const zIndex = useZIndex().nextZIndex();
41
+ const ns = useNamespace("tooltip-v2");
42
+ const side = computed(() => {
43
+ return placement.value.split("-")[0];
44
+ });
45
+ const contentStyle = computed(() => {
46
+ return {
47
+ position: unref(strategy),
48
+ top: `${unref(y) || 0}px`,
49
+ left: `${unref(x) || 0}px`,
50
+ zIndex
51
+ };
52
+ });
53
+ const arrowStyle = computed(() => {
54
+ if (!props.showArrow)
55
+ return {};
56
+ const { arrow } = unref(middlewareData);
57
+ return {
58
+ [`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow == null ? void 0 : arrow.x}px` || "",
59
+ [`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow == null ? void 0 : arrow.y}px` || ""
60
+ };
61
+ });
62
+ const contentClass = computed(() => [
63
+ ns.e("content"),
64
+ ns.is("dark", props.effect === "dark"),
65
+ ns.is(unref(strategy)),
66
+ props.contentClass
67
+ ]);
68
+ watch(arrowRef, () => update());
69
+ watch(() => props.placement, (val) => placement.value = val);
70
+ onMounted(() => {
71
+ watch(() => props.reference || triggerRef.value, (el) => {
72
+ referenceRef.value = el || void 0;
73
+ }, {
74
+ immediate: true
75
+ });
76
+ });
77
+ provide(tooltipV2ContentKey, { arrowRef });
78
+ return (_ctx, _cache) => {
79
+ return openBlock(), createElementBlock("div", {
80
+ ref_key: "contentRef",
81
+ ref: contentRef,
82
+ style: normalizeStyle(unref(contentStyle)),
83
+ "data-tooltip-v2-root": ""
84
+ }, [
85
+ !_ctx.nowrap ? (openBlock(), createElementBlock("div", {
86
+ key: 0,
87
+ "data-side": unref(side),
88
+ class: normalizeClass(unref(contentClass))
89
+ }, [
90
+ renderSlot(_ctx.$slots, "default", {
91
+ contentStyle: unref(contentStyle),
92
+ contentClass: unref(contentClass)
93
+ }),
94
+ createVNode(unref(ElVisuallyHidden), {
95
+ id: unref(contentId),
96
+ role: "tooltip"
97
+ }, {
98
+ default: withCtx(() => [
99
+ _ctx.ariaLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
100
+ createTextVNode(toDisplayString(_ctx.ariaLabel), 1)
101
+ ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 })
102
+ ]),
103
+ _: 3
104
+ }, 8, ["id"]),
105
+ renderSlot(_ctx.$slots, "arrow", {
106
+ style: normalizeStyle(unref(arrowStyle)),
107
+ side: unref(side)
108
+ })
109
+ ], 10, _hoisted_1)) : createCommentVNode("v-if", true)
110
+ ], 4);
111
+ };
51
112
  }
52
113
  });
114
+ var TooltipV2Content = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
53
115
 
54
- export { tooltipV2ContentProps };
116
+ export { TooltipV2Content as default };
55
117
  //# sourceMappingURL=content.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nconst tooltipV2Strategies = ['absolute', 'fixed'] as const\n\nconst tooltipV2Placements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tooltipV2ContentProps = buildProps({\n ariaLabel: String,\n arrowPadding: {\n type: definePropType<number>(Number),\n default: 5,\n },\n effect: {\n type: String,\n default: '',\n },\n contentClass: String,\n /**\n * Placement of tooltip content relative to reference element (when absent it refers to trigger)\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tooltipV2Placements,\n default: 'bottom',\n },\n /**\n * Reference element for tooltip content to set its position\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n offset: {\n type: Number,\n default: 8,\n },\n strategy: {\n type: definePropType<Strategy>(String),\n values: tooltipV2Strategies,\n default: 'absolute',\n },\n showArrow: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type TooltipV2ContentProps = ExtractPropTypes<\n typeof tooltipV2ContentProps\n>\n"],"names":[],"mappings":";;;AACA,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAClD,MAAM,mBAAmB,GAAG;AAC5B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,mBAAmB;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,mBAAmB;AAC/B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/content.vue"],"sourcesContent":["<template>\n <div ref=\"contentRef\" :style=\"contentStyle\" data-tooltip-v2-root>\n <div v-if=\"!nowrap\" :data-side=\"side\" :class=\"contentClass\">\n <slot :content-style=\"contentStyle\" :content-class=\"contentClass\" />\n <el-visually-hidden :id=\"contentId\" role=\"tooltip\">\n <template v-if=\"ariaLabel\">\n {{ ariaLabel }}\n </template>\n <slot v-else />\n </el-visually-hidden>\n <slot name=\"arrow\" :style=\"arrowStyle\" :side=\"side\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, onMounted, provide, ref, unref, watch } from 'vue'\nimport { offset } from '@floating-ui/dom'\nimport {\n arrowMiddleware,\n useFloating,\n useNamespace,\n useZIndex,\n} from '@element-plus/hooks'\nimport ElVisuallyHidden from '@element-plus/components/visual-hidden'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ContentProps } from './content'\nimport { tooltipV2CommonProps } from './common'\n\nimport type { CSSProperties } from 'vue'\nimport type { Middleware } from '@floating-ui/dom'\n\ndefineOptions({\n name: 'ElTooltipV2Content',\n})\n\nconst props = defineProps({ ...tooltipV2ContentProps, ...tooltipV2CommonProps })\n\nconst { triggerRef, contentId } = inject(tooltipV2RootKey)!\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nconst { referenceRef, contentRef, middlewareData, x, y, update } = useFloating({\n placement,\n strategy,\n middleware: computed(() => {\n const middleware: Middleware[] = [offset(props.offset)]\n\n if (props.showArrow) {\n middleware.push(\n arrowMiddleware({\n arrowRef,\n })\n )\n }\n\n return middleware\n }),\n})\n\nconst zIndex = useZIndex().nextZIndex()\n\nconst ns = useNamespace('tooltip-v2')\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst contentStyle = computed<CSSProperties>(() => {\n return {\n position: unref(strategy),\n top: `${unref(y) || 0}px`,\n left: `${unref(x) || 0}px`,\n zIndex,\n }\n})\n\nconst arrowStyle = computed<CSSProperties>(() => {\n if (!props.showArrow) return {}\n\n const { arrow } = unref(middlewareData)\n\n return {\n [`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow?.x}px` || '',\n [`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow?.y}px` || '',\n }\n})\n\nconst contentClass = computed(() => [\n ns.e('content'),\n ns.is('dark', props.effect === 'dark'),\n ns.is(unref(strategy)),\n props.contentClass,\n])\n\nwatch(arrowRef, () => update())\n\nwatch(\n () => props.placement,\n (val) => (placement.value = val)\n)\n\nonMounted(() => {\n watch(\n () => props.reference || triggerRef.value,\n (el) => {\n referenceRef.value = el || undefined\n },\n {\n immediate: true,\n }\n )\n})\n\nprovide(tooltipV2ContentKey, { arrowRef })\n</script>\n"],"names":[],"mappings":"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"}
@@ -1,117 +1,55 @@
1
- import { defineComponent, inject, ref, computed, unref, watch, onMounted, provide, openBlock, createElementBlock, normalizeStyle, normalizeClass, renderSlot, createVNode, withCtx, Fragment, createTextVNode, toDisplayString, createCommentVNode } from 'vue';
2
- import { offset } from '@floating-ui/dom';
3
- import '../../../hooks/index.mjs';
4
- import '../../visual-hidden/index.mjs';
5
- import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
6
- import { tooltipV2ContentProps } from './content.mjs';
7
- import { tooltipV2CommonProps } from './common.mjs';
8
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
- import { useFloating, arrowMiddleware } from '../../../hooks/use-floating/index.mjs';
10
- import { useZIndex } from '../../../hooks/use-z-index/index.mjs';
11
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
- import ElVisuallyHidden from '../../visual-hidden/src/visual-hidden2.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
13
3
 
14
- const _hoisted_1 = ["data-side"];
15
- const __default__ = defineComponent({
16
- name: "ElTooltipV2Content"
17
- });
18
- const _sfc_main = /* @__PURE__ */ defineComponent({
19
- ...__default__,
20
- props: { ...tooltipV2ContentProps, ...tooltipV2CommonProps },
21
- setup(__props) {
22
- const props = __props;
23
- const { triggerRef, contentId } = inject(tooltipV2RootKey);
24
- const placement = ref(props.placement);
25
- const strategy = ref(props.strategy);
26
- const arrowRef = ref(null);
27
- const { referenceRef, contentRef, middlewareData, x, y, update } = useFloating({
28
- placement,
29
- strategy,
30
- middleware: computed(() => {
31
- const middleware = [offset(props.offset)];
32
- if (props.showArrow) {
33
- middleware.push(arrowMiddleware({
34
- arrowRef
35
- }));
36
- }
37
- return middleware;
38
- })
39
- });
40
- const zIndex = useZIndex().nextZIndex();
41
- const ns = useNamespace("tooltip-v2");
42
- const side = computed(() => {
43
- return placement.value.split("-")[0];
44
- });
45
- const contentStyle = computed(() => {
46
- return {
47
- position: unref(strategy),
48
- top: `${unref(y) || 0}px`,
49
- left: `${unref(x) || 0}px`,
50
- zIndex
51
- };
52
- });
53
- const arrowStyle = computed(() => {
54
- if (!props.showArrow)
55
- return {};
56
- const { arrow } = unref(middlewareData);
57
- return {
58
- [`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow == null ? void 0 : arrow.x}px` || "",
59
- [`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow == null ? void 0 : arrow.y}px` || ""
60
- };
61
- });
62
- const contentClass = computed(() => [
63
- ns.e("content"),
64
- ns.is("dark", props.effect === "dark"),
65
- ns.is(unref(strategy)),
66
- props.contentClass
67
- ]);
68
- watch(arrowRef, () => update());
69
- watch(() => props.placement, (val) => placement.value = val);
70
- onMounted(() => {
71
- watch(() => props.reference || triggerRef.value, (el) => {
72
- referenceRef.value = el || void 0;
73
- }, {
74
- immediate: true
75
- });
76
- });
77
- provide(tooltipV2ContentKey, { arrowRef });
78
- return (_ctx, _cache) => {
79
- return openBlock(), createElementBlock("div", {
80
- ref_key: "contentRef",
81
- ref: contentRef,
82
- style: normalizeStyle(unref(contentStyle)),
83
- "data-tooltip-v2-root": ""
84
- }, [
85
- !_ctx.nowrap ? (openBlock(), createElementBlock("div", {
86
- key: 0,
87
- "data-side": unref(side),
88
- class: normalizeClass(unref(contentClass))
89
- }, [
90
- renderSlot(_ctx.$slots, "default", {
91
- contentStyle: unref(contentStyle),
92
- contentClass: unref(contentClass)
93
- }),
94
- createVNode(unref(ElVisuallyHidden), {
95
- id: unref(contentId),
96
- role: "tooltip"
97
- }, {
98
- default: withCtx(() => [
99
- _ctx.ariaLabel ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
100
- createTextVNode(toDisplayString(_ctx.ariaLabel), 1)
101
- ], 64)) : renderSlot(_ctx.$slots, "default", { key: 1 })
102
- ]),
103
- _: 3
104
- }, 8, ["id"]),
105
- renderSlot(_ctx.$slots, "arrow", {
106
- style: normalizeStyle(unref(arrowStyle)),
107
- side: unref(side)
108
- })
109
- ], 10, _hoisted_1)) : createCommentVNode("v-if", true)
110
- ], 4);
111
- };
4
+ const tooltipV2Strategies = ["absolute", "fixed"];
5
+ const tooltipV2Placements = [
6
+ "top-start",
7
+ "top-end",
8
+ "top",
9
+ "bottom-start",
10
+ "bottom-end",
11
+ "bottom",
12
+ "left-start",
13
+ "left-end",
14
+ "left",
15
+ "right-start",
16
+ "right-end",
17
+ "right"
18
+ ];
19
+ const tooltipV2ContentProps = buildProps({
20
+ ariaLabel: String,
21
+ arrowPadding: {
22
+ type: definePropType(Number),
23
+ default: 5
24
+ },
25
+ effect: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ contentClass: String,
30
+ placement: {
31
+ type: definePropType(String),
32
+ values: tooltipV2Placements,
33
+ default: "bottom"
34
+ },
35
+ reference: {
36
+ type: definePropType(Object),
37
+ default: null
38
+ },
39
+ offset: {
40
+ type: Number,
41
+ default: 8
42
+ },
43
+ strategy: {
44
+ type: definePropType(String),
45
+ values: tooltipV2Strategies,
46
+ default: "absolute"
47
+ },
48
+ showArrow: {
49
+ type: Boolean,
50
+ default: false
112
51
  }
113
52
  });
114
- var TooltipV2Content = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
115
53
 
116
- export { TooltipV2Content as default };
54
+ export { tooltipV2ContentProps };
117
55
  //# sourceMappingURL=content2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/content.vue"],"sourcesContent":["<template>\n <div ref=\"contentRef\" :style=\"contentStyle\" data-tooltip-v2-root>\n <div v-if=\"!nowrap\" :data-side=\"side\" :class=\"contentClass\">\n <slot :content-style=\"contentStyle\" :content-class=\"contentClass\" />\n <el-visually-hidden :id=\"contentId\" role=\"tooltip\">\n <template v-if=\"ariaLabel\">\n {{ ariaLabel }}\n </template>\n <slot v-else />\n </el-visually-hidden>\n <slot name=\"arrow\" :style=\"arrowStyle\" :side=\"side\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, onMounted, provide, ref, unref, watch } from 'vue'\nimport { offset } from '@floating-ui/dom'\nimport {\n arrowMiddleware,\n useFloating,\n useNamespace,\n useZIndex,\n} from '@element-plus/hooks'\nimport ElVisuallyHidden from '@element-plus/components/visual-hidden'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ContentProps } from './content'\nimport { tooltipV2CommonProps } from './common'\n\nimport type { CSSProperties } from 'vue'\nimport type { Middleware } from '@floating-ui/dom'\n\ndefineOptions({\n name: 'ElTooltipV2Content',\n})\n\nconst props = defineProps({ ...tooltipV2ContentProps, ...tooltipV2CommonProps })\n\nconst { triggerRef, contentId } = inject(tooltipV2RootKey)!\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nconst { referenceRef, contentRef, middlewareData, x, y, update } = useFloating({\n placement,\n strategy,\n middleware: computed(() => {\n const middleware: Middleware[] = [offset(props.offset)]\n\n if (props.showArrow) {\n middleware.push(\n arrowMiddleware({\n arrowRef,\n })\n )\n }\n\n return middleware\n }),\n})\n\nconst zIndex = useZIndex().nextZIndex()\n\nconst ns = useNamespace('tooltip-v2')\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst contentStyle = computed<CSSProperties>(() => {\n return {\n position: unref(strategy),\n top: `${unref(y) || 0}px`,\n left: `${unref(x) || 0}px`,\n zIndex,\n }\n})\n\nconst arrowStyle = computed<CSSProperties>(() => {\n if (!props.showArrow) return {}\n\n const { arrow } = unref(middlewareData)\n\n return {\n [`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow?.x}px` || '',\n [`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow?.y}px` || '',\n }\n})\n\nconst contentClass = computed(() => [\n ns.e('content'),\n ns.is('dark', props.effect === 'dark'),\n ns.is(unref(strategy)),\n props.contentClass,\n])\n\nwatch(arrowRef, () => update())\n\nwatch(\n () => props.placement,\n (val) => (placement.value = val)\n)\n\nonMounted(() => {\n watch(\n () => props.reference || triggerRef.value,\n (el) => {\n referenceRef.value = el || undefined\n },\n {\n immediate: true,\n }\n )\n})\n\nprovide(tooltipV2ContentKey, { arrowRef })\n</script>\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nconst tooltipV2Strategies = ['absolute', 'fixed'] as const\n\nconst tooltipV2Placements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tooltipV2ContentProps = buildProps({\n ariaLabel: String,\n arrowPadding: {\n type: definePropType<number>(Number),\n default: 5,\n },\n effect: {\n type: String,\n default: '',\n },\n contentClass: String,\n /**\n * Placement of tooltip content relative to reference element (when absent it refers to trigger)\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tooltipV2Placements,\n default: 'bottom',\n },\n /**\n * Reference element for tooltip content to set its position\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n offset: {\n type: Number,\n default: 8,\n },\n strategy: {\n type: definePropType<Strategy>(String),\n values: tooltipV2Strategies,\n default: 'absolute',\n },\n showArrow: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type TooltipV2ContentProps = ExtractPropTypes<\n typeof tooltipV2ContentProps\n>\n"],"names":[],"mappings":";;;AACA,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAClD,MAAM,mBAAmB,GAAG;AAC5B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,mBAAmB;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,mBAAmB;AAC/B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
@@ -1,8 +1,8 @@
1
1
  import '../../../utils/index.mjs';
2
2
  import { tooltipV2RootProps } from './root.mjs';
3
3
  import { tooltipV2TriggerProps } from './trigger.mjs';
4
- import { tooltipV2ArrowProps } from './arrow2.mjs';
5
- import { tooltipV2ContentProps } from './content.mjs';
4
+ import { tooltipV2ArrowProps } from './arrow.mjs';
5
+ import { tooltipV2ContentProps } from './content2.mjs';
6
6
  import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
7
7
 
8
8
  const tooltipV2Props = buildProps({
@@ -1,13 +1,13 @@
1
1
  import { defineComponent, toRefs, reactive, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, createVNode, mergeProps, renderSlot, Teleport, Transition, createCommentVNode, createElementBlock, Fragment } from 'vue';
2
2
  import { pick } from 'lodash-unified';
3
- import { tooltipV2ArrowProps } from './arrow2.mjs';
4
- import { tooltipV2ContentProps } from './content.mjs';
3
+ import { tooltipV2ArrowProps } from './arrow.mjs';
4
+ import { tooltipV2ContentProps } from './content2.mjs';
5
5
  import { tooltipV2RootProps } from './root.mjs';
6
6
  import { tooltipV2Props } from './tooltip.mjs';
7
7
  import { tooltipV2TriggerProps } from './trigger.mjs';
8
8
  import TooltipV2Root from './root2.mjs';
9
- import TooltipV2Arrow from './arrow.mjs';
10
- import TooltipV2Content from './content2.mjs';
9
+ import TooltipV2Arrow from './arrow2.mjs';
10
+ import TooltipV2Content from './content.mjs';
11
11
  import TooltipV2Trigger from './trigger2.mjs';
12
12
  import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
13
13