@element-plus/nightly 0.0.20240328 → 0.0.20240329
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.
- package/attributes.json +1 -1
- package/dist/index.full.js +44 -16
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +44 -16
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/badge/index.d.ts +3 -0
- package/es/components/badge/src/badge.d.ts +1 -0
- package/es/components/badge/src/badge.mjs +2 -1
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +3 -0
- package/es/components/badge/src/badge2.mjs +3 -2
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +2 -0
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/index.mjs +2 -2
- package/es/components/input-number/src/input-number2.mjs +17 -13
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +3 -0
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +149 -67
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +67 -149
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +25 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -25
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +64 -11
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +11 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/arrow.mjs +22 -37
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +37 -22
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +17 -80
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +80 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tour/src/content.mjs +44 -69
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +69 -44
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/tree/index.d.ts +16 -0
- package/es/components/tree/src/model/node.d.ts +2 -0
- package/es/components/tree/src/model/node.mjs +13 -0
- package/es/components/tree/src/model/node.mjs.map +1 -1
- package/es/components/tree/src/model/useDragNode.mjs +6 -0
- package/es/components/tree/src/model/useDragNode.mjs.map +1 -1
- package/es/components/tree/src/tree-node.mjs +1 -0
- package/es/components/tree/src/tree-node.mjs.map +1 -1
- package/es/components/tree/src/tree.vue.d.ts +8 -0
- package/es/index.mjs +2 -2
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/badge/index.d.ts +3 -0
- package/lib/components/badge/src/badge.d.ts +1 -0
- package/lib/components/badge/src/badge.js +2 -1
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +3 -0
- package/lib/components/badge/src/badge2.js +2 -1
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +2 -0
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/index.js +2 -2
- package/lib/components/input-number/src/input-number2.js +16 -12
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +3 -0
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +148 -68
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +68 -148
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +28 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -28
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +64 -11
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +11 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/arrow.js +23 -37
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +37 -23
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +17 -80
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +80 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tour/src/content.js +45 -69
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +69 -45
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/tree/index.d.ts +16 -0
- package/lib/components/tree/src/model/node.d.ts +2 -0
- package/lib/components/tree/src/model/node.js +13 -0
- package/lib/components/tree/src/model/node.js.map +1 -1
- package/lib/components/tree/src/model/useDragNode.js +6 -0
- package/lib/components/tree/src/model/useDragNode.js.map +1 -1
- package/lib/components/tree/src/tree-node.js +1 -0
- package/lib/components/tree/src/tree-node.js.map +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +8 -0
- package/lib/index.js +2 -2
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar.js","sources":["../../../../../../packages/components/scrollbar/src/bar.
|
|
1
|
+
{"version":3,"file":"bar.js","sources":["../../../../../../packages/components/scrollbar/src/bar.vue"],"sourcesContent":["<template>\n <thumb :move=\"moveX\" :ratio=\"ratioX\" :size=\"sizeWidth\" :always=\"always\" />\n <thumb\n :move=\"moveY\"\n :ratio=\"ratioY\"\n :size=\"sizeHeight\"\n vertical\n :always=\"always\"\n />\n</template>\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport { GAP } from './util'\nimport Thumb from './thumb.vue'\nimport { barProps } from './bar'\nimport { scrollbarContextKey } from './constants'\n\nconst props = defineProps(barProps)\n\nconst scrollbar = inject(scrollbarContextKey)\n\nconst moveX = ref(0)\nconst moveY = ref(0)\nconst sizeWidth = ref('')\nconst sizeHeight = ref('')\nconst ratioY = ref(1)\nconst ratioX = ref(1)\n\nconst handleScroll = (wrap: HTMLDivElement) => {\n if (wrap) {\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n moveY.value = ((wrap.scrollTop * 100) / offsetHeight) * ratioY.value\n moveX.value = ((wrap.scrollLeft * 100) / offsetWidth) * ratioX.value\n }\n}\n\nconst update = () => {\n const wrap = scrollbar?.wrapElement\n if (!wrap) return\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\ndefineExpose({\n handleScroll,\n update,\n})\n</script>\n"],"names":["inject","scrollbarContextKey","ref","GAP"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAM,MAAA,SAAA,GAAYA,WAAOC,6BAAmB,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQC,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,KAAA,GAAQA,QAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,SAAA,GAAYA,QAAI,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,UAAA,GAAaA,QAAI,EAAE,CAAA,CAAA;AACzB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAASA,QAAI,CAAC,CAAA,CAAA;AAEpB,IAAM,MAAA,YAAA,GAAe,CAAC,IAAyB,KAAA;AAC7C,MAAA,IAAI,IAAM,EAAA;AACR,QAAM,MAAA,YAAA,GAAe,KAAK,YAAe,GAAAC,QAAA,CAAA;AACzC,QAAM,MAAA,WAAA,GAAc,KAAK,WAAc,GAAAA,QAAA,CAAA;AAEvC,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,SAAY,GAAA,GAAA,GAAO,eAAgB,MAAO,CAAA,KAAA,CAAA;AAC/D,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,UAAa,GAAA,GAAA,GAAO,cAAe,MAAO,CAAA,KAAA,CAAA;AAAA,OACjE;AAAA,KACF,CAAA;AAEA,IAAA,MAAM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72 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
var thumb = require('./thumb2.js');
|
|
8
|
-
var bar = require('./bar.js');
|
|
9
|
-
var constants = require('./constants.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
11
7
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const sizeWidth = vue.ref("");
|
|
21
|
-
const sizeHeight = vue.ref("");
|
|
22
|
-
const ratioY = vue.ref(1);
|
|
23
|
-
const ratioX = vue.ref(1);
|
|
24
|
-
const handleScroll = (wrap) => {
|
|
25
|
-
if (wrap) {
|
|
26
|
-
const offsetHeight = wrap.offsetHeight - util.GAP;
|
|
27
|
-
const offsetWidth = wrap.offsetWidth - util.GAP;
|
|
28
|
-
moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
|
|
29
|
-
moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
const update = () => {
|
|
33
|
-
const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement;
|
|
34
|
-
if (!wrap)
|
|
35
|
-
return;
|
|
36
|
-
const offsetHeight = wrap.offsetHeight - util.GAP;
|
|
37
|
-
const offsetWidth = wrap.offsetWidth - util.GAP;
|
|
38
|
-
const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
|
|
39
|
-
const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
|
|
40
|
-
const height = Math.max(originalHeight, props.minSize);
|
|
41
|
-
const width = Math.max(originalWidth, props.minSize);
|
|
42
|
-
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
|
43
|
-
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
|
44
|
-
sizeHeight.value = height + util.GAP < offsetHeight ? `${height}px` : "";
|
|
45
|
-
sizeWidth.value = width + util.GAP < offsetWidth ? `${width}px` : "";
|
|
46
|
-
};
|
|
47
|
-
expose({
|
|
48
|
-
handleScroll,
|
|
49
|
-
update
|
|
50
|
-
});
|
|
51
|
-
return (_ctx, _cache) => {
|
|
52
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
53
|
-
vue.createVNode(thumb["default"], {
|
|
54
|
-
move: moveX.value,
|
|
55
|
-
ratio: ratioX.value,
|
|
56
|
-
size: sizeWidth.value,
|
|
57
|
-
always: _ctx.always
|
|
58
|
-
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
59
|
-
vue.createVNode(thumb["default"], {
|
|
60
|
-
move: moveY.value,
|
|
61
|
-
ratio: ratioY.value,
|
|
62
|
-
size: sizeHeight.value,
|
|
63
|
-
vertical: "",
|
|
64
|
-
always: _ctx.always
|
|
65
|
-
}, null, 8, ["move", "ratio", "size", "always"])
|
|
66
|
-
], 64);
|
|
67
|
-
};
|
|
8
|
+
const barProps = runtime.buildProps({
|
|
9
|
+
always: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: true
|
|
12
|
+
},
|
|
13
|
+
minSize: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: true
|
|
68
16
|
}
|
|
69
17
|
});
|
|
70
|
-
var Bar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "bar.vue"]]);
|
|
71
18
|
|
|
72
|
-
exports
|
|
19
|
+
exports.barProps = barProps;
|
|
73
20
|
//# sourceMappingURL=bar2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar2.js","sources":["../../../../../../packages/components/scrollbar/src/bar.
|
|
1
|
+
{"version":3,"file":"bar2.js","sources":["../../../../../../packages/components/scrollbar/src/bar.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type Bar from './bar.vue'\n\nexport const barProps = buildProps({\n always: {\n type: Boolean,\n default: true,\n },\n minSize: {\n type: Number,\n required: true,\n },\n} as const)\nexport type BarProps = ExtractPropTypes<typeof barProps>\n\nexport type BarInstance = InstanceType<typeof Bar>\n"],"names":["buildProps"],"mappings":";;;;;;;AACY,MAAC,QAAQ,GAAGA,kBAAU,CAAC;AACnC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -6,7 +6,7 @@ var vue = require('vue');
|
|
|
6
6
|
var core = require('@vueuse/core');
|
|
7
7
|
require('../../../utils/index.js');
|
|
8
8
|
require('../../../hooks/index.js');
|
|
9
|
-
var bar = require('./
|
|
9
|
+
var bar = require('./bar.js');
|
|
10
10
|
var constants = require('./constants.js');
|
|
11
11
|
var scrollbar = require('./scrollbar.js');
|
|
12
12
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
@@ -9,7 +9,7 @@ var content = require('./content.js');
|
|
|
9
9
|
var trigger = require('./trigger.js');
|
|
10
10
|
var index = require('../../../hooks/use-model-toggle/index.js');
|
|
11
11
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
12
|
-
var popper = require('../../popper/src/
|
|
12
|
+
var popper = require('../../popper/src/popper.js');
|
|
13
13
|
var arrow = require('../../popper/src/arrow.js');
|
|
14
14
|
|
|
15
15
|
const {
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var tooltip$1 = require('./src/tooltip2.js');
|
|
7
|
-
var arrow = require('./src/
|
|
7
|
+
var arrow = require('./src/arrow.js');
|
|
8
8
|
var content = require('./src/content.js');
|
|
9
|
-
var root = require('./src/
|
|
9
|
+
var root = require('./src/root.js');
|
|
10
10
|
var tooltip = require('./src/tooltip.js');
|
|
11
11
|
var trigger = require('./src/trigger.js');
|
|
12
12
|
var constants = require('./src/constants.js');
|
|
@@ -2,46 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var common = require('./common.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
8
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const tooltipV2ArrowProps = runtime.buildProps({
|
|
10
|
+
width: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 10
|
|
13
|
+
},
|
|
14
|
+
height: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 10
|
|
18
17
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
|
30
|
-
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
|
31
|
-
...style || {}
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
return (_ctx, _cache) => {
|
|
35
|
-
return vue.openBlock(), vue.createElementBlock("span", {
|
|
36
|
-
ref_key: "arrowRef",
|
|
37
|
-
ref: arrowRef,
|
|
38
|
-
style: vue.normalizeStyle(vue.unref(arrowStyle)),
|
|
39
|
-
class: vue.normalizeClass(vue.unref(ns).e("arrow"))
|
|
40
|
-
}, null, 6);
|
|
41
|
-
};
|
|
18
|
+
style: {
|
|
19
|
+
type: runtime.definePropType(Object),
|
|
20
|
+
default: null
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const tooltipV2ArrowSpecialProps = runtime.buildProps({
|
|
24
|
+
side: {
|
|
25
|
+
type: runtime.definePropType(String),
|
|
26
|
+
values: common.tooltipV2Sides,
|
|
27
|
+
required: true
|
|
42
28
|
}
|
|
43
29
|
});
|
|
44
|
-
var TooltipV2Arrow = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "arrow.vue"]]);
|
|
45
30
|
|
|
46
|
-
exports
|
|
31
|
+
exports.tooltipV2ArrowProps = tooltipV2ArrowProps;
|
|
32
|
+
exports.tooltipV2ArrowSpecialProps = tooltipV2ArrowSpecialProps;
|
|
47
33
|
//# sourceMappingURL=arrow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.js","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow.js","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":["buildProps","definePropType","tooltipV2Sides"],"mappings":";;;;;;;;AAEY,MAAC,mBAAmB,GAAGA,kBAAU,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,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAGD,kBAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAEC,qBAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;;"}
|
|
@@ -2,32 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var constants = require('./constants.js');
|
|
7
|
+
var arrow = require('./arrow.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
8
9
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
type: Number,
|
|
12
|
-
default: 10
|
|
13
|
-
},
|
|
14
|
-
height: {
|
|
15
|
-
type: Number,
|
|
16
|
-
default: 10
|
|
17
|
-
},
|
|
18
|
-
style: {
|
|
19
|
-
type: runtime.definePropType(Object),
|
|
20
|
-
default: null
|
|
21
|
-
}
|
|
10
|
+
const __default__ = vue.defineComponent({
|
|
11
|
+
name: "ElTooltipV2Arrow"
|
|
22
12
|
});
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
+
...__default__,
|
|
15
|
+
props: {
|
|
16
|
+
...arrow.tooltipV2ArrowProps,
|
|
17
|
+
...arrow.tooltipV2ArrowSpecialProps
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const { ns } = vue.inject(constants.tooltipV2RootKey);
|
|
22
|
+
const { arrowRef } = vue.inject(constants.tooltipV2ContentKey);
|
|
23
|
+
const arrowStyle = vue.computed(() => {
|
|
24
|
+
const { style, width, height } = props;
|
|
25
|
+
const namespace = ns.namespace.value;
|
|
26
|
+
return {
|
|
27
|
+
[`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
|
|
28
|
+
[`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
|
|
29
|
+
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
|
30
|
+
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
|
31
|
+
...style || {}
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
36
|
+
ref_key: "arrowRef",
|
|
37
|
+
ref: arrowRef,
|
|
38
|
+
style: vue.normalizeStyle(vue.unref(arrowStyle)),
|
|
39
|
+
class: vue.normalizeClass(vue.unref(ns).e("arrow"))
|
|
40
|
+
}, null, 6);
|
|
41
|
+
};
|
|
28
42
|
}
|
|
29
43
|
});
|
|
44
|
+
var TooltipV2Arrow = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "arrow.vue"]]);
|
|
30
45
|
|
|
31
|
-
exports
|
|
32
|
-
exports.tooltipV2ArrowSpecialProps = tooltipV2ArrowSpecialProps;
|
|
46
|
+
exports["default"] = TooltipV2Arrow;
|
|
33
47
|
//# sourceMappingURL=arrow2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow2.js","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow2.js","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":["inject","tooltipV2RootKey","tooltipV2ContentKey","computed"],"mappings":";;;;;;;;;uCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAOA,IAAM,MAAA,EAAE,EAAO,EAAA,GAAAA,UAAA,CAAOC,0BAAgB,CAAA,CAAA;AACtC,IAAM,MAAA,EAAE,QAAa,EAAA,GAAAD,UAAA,CAAOE,6BAAmB,CAAA,CAAA;AAE/C,IAAM,MAAA,UAAA,GAAaC,aAAwB,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;;;;;;;;;;;;;;;"}
|
|
@@ -2,89 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
|
-
require('../../../hooks/index.js');
|
|
8
5
|
require('../../../utils/index.js');
|
|
9
|
-
var
|
|
10
|
-
var root = require('./root2.js');
|
|
11
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
-
var types = require('../../../utils/types.js');
|
|
13
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
14
|
-
var index$1 = require('../../../hooks/use-id/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
15
7
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
(_a = props["onUpdate:open"]) == null ? void 0 : _a.call(props, open2);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
const isOpenDelayed = vue.computed(() => types.isNumber(props.delayDuration) && props.delayDuration > 0);
|
|
35
|
-
const { start: onDelayedOpen, stop: clearTimer } = core.useTimeoutFn(() => {
|
|
36
|
-
open.value = true;
|
|
37
|
-
}, vue.computed(() => props.delayDuration), {
|
|
38
|
-
immediate: false
|
|
39
|
-
});
|
|
40
|
-
const ns = index.useNamespace("tooltip-v2");
|
|
41
|
-
const contentId = index$1.useId();
|
|
42
|
-
const onNormalOpen = () => {
|
|
43
|
-
clearTimer();
|
|
44
|
-
open.value = true;
|
|
45
|
-
};
|
|
46
|
-
const onDelayOpen = () => {
|
|
47
|
-
vue.unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen();
|
|
48
|
-
};
|
|
49
|
-
const onOpen = onNormalOpen;
|
|
50
|
-
const onClose = () => {
|
|
51
|
-
clearTimer();
|
|
52
|
-
open.value = false;
|
|
53
|
-
};
|
|
54
|
-
const onChange = (open2) => {
|
|
55
|
-
var _a;
|
|
56
|
-
if (open2) {
|
|
57
|
-
document.dispatchEvent(new CustomEvent(constants.TOOLTIP_V2_OPEN));
|
|
58
|
-
onOpen();
|
|
59
|
-
}
|
|
60
|
-
(_a = props.onOpenChange) == null ? void 0 : _a.call(props, open2);
|
|
61
|
-
};
|
|
62
|
-
vue.watch(open, onChange);
|
|
63
|
-
vue.onMounted(() => {
|
|
64
|
-
document.addEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
|
65
|
-
});
|
|
66
|
-
vue.onBeforeUnmount(() => {
|
|
67
|
-
clearTimer();
|
|
68
|
-
document.removeEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
|
69
|
-
});
|
|
70
|
-
vue.provide(constants.tooltipV2RootKey, {
|
|
71
|
-
contentId,
|
|
72
|
-
triggerRef,
|
|
73
|
-
ns,
|
|
74
|
-
onClose,
|
|
75
|
-
onDelayOpen,
|
|
76
|
-
onOpen
|
|
77
|
-
});
|
|
78
|
-
expose({
|
|
79
|
-
onOpen,
|
|
80
|
-
onClose
|
|
81
|
-
});
|
|
82
|
-
return (_ctx, _cache) => {
|
|
83
|
-
return vue.renderSlot(_ctx.$slots, "default", { open: vue.unref(open) });
|
|
84
|
-
};
|
|
8
|
+
const tooltipV2RootProps = runtime.buildProps({
|
|
9
|
+
delayDuration: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 300
|
|
12
|
+
},
|
|
13
|
+
defaultOpen: Boolean,
|
|
14
|
+
open: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
onOpenChange: {
|
|
19
|
+
type: runtime.definePropType(Function)
|
|
20
|
+
},
|
|
21
|
+
"onUpdate:open": {
|
|
22
|
+
type: runtime.definePropType(Function)
|
|
85
23
|
}
|
|
86
24
|
});
|
|
87
|
-
var TooltipV2Root = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "root.vue"]]);
|
|
88
25
|
|
|
89
|
-
exports
|
|
26
|
+
exports.tooltipV2RootProps = tooltipV2RootProps;
|
|
90
27
|
//# sourceMappingURL=root.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root.js","sources":["../../../../../../packages/components/tooltip-v2/src/root.
|
|
1
|
+
{"version":3,"file":"root.js","sources":["../../../../../../packages/components/tooltip-v2/src/root.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\n\ntype StateUpdater = (state: boolean) => void\n\nexport const tooltipV2RootProps = buildProps({\n delayDuration: {\n type: Number,\n default: 300,\n },\n defaultOpen: Boolean,\n open: {\n type: Boolean,\n default: undefined,\n },\n onOpenChange: {\n type: definePropType<StateUpdater>(Function),\n },\n 'onUpdate:open': {\n type: definePropType<StateUpdater>(Function),\n },\n} as const)\n\nexport type TooltipV2RootProps = ExtractPropTypes<typeof tooltipV2RootProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEC,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,CAAC;;;;"}
|
|
@@ -2,26 +2,89 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var core = require('@vueuse/core');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
5
8
|
require('../../../utils/index.js');
|
|
6
|
-
var
|
|
9
|
+
var constants = require('./constants.js');
|
|
10
|
+
var root = require('./root.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var types = require('../../../utils/types.js');
|
|
13
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
14
|
+
var index$1 = require('../../../hooks/use-id/index.js');
|
|
7
15
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const __default__ = vue.defineComponent({
|
|
17
|
+
name: "ElTooltipV2Root"
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: root.tooltipV2RootProps,
|
|
22
|
+
setup(__props, { expose }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const _open = vue.ref(props.defaultOpen);
|
|
25
|
+
const triggerRef = vue.ref(null);
|
|
26
|
+
const open = vue.computed({
|
|
27
|
+
get: () => types.isPropAbsent(props.open) ? _open.value : props.open,
|
|
28
|
+
set: (open2) => {
|
|
29
|
+
var _a;
|
|
30
|
+
_open.value = open2;
|
|
31
|
+
(_a = props["onUpdate:open"]) == null ? void 0 : _a.call(props, open2);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const isOpenDelayed = vue.computed(() => types.isNumber(props.delayDuration) && props.delayDuration > 0);
|
|
35
|
+
const { start: onDelayedOpen, stop: clearTimer } = core.useTimeoutFn(() => {
|
|
36
|
+
open.value = true;
|
|
37
|
+
}, vue.computed(() => props.delayDuration), {
|
|
38
|
+
immediate: false
|
|
39
|
+
});
|
|
40
|
+
const ns = index.useNamespace("tooltip-v2");
|
|
41
|
+
const contentId = index$1.useId();
|
|
42
|
+
const onNormalOpen = () => {
|
|
43
|
+
clearTimer();
|
|
44
|
+
open.value = true;
|
|
45
|
+
};
|
|
46
|
+
const onDelayOpen = () => {
|
|
47
|
+
vue.unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen();
|
|
48
|
+
};
|
|
49
|
+
const onOpen = onNormalOpen;
|
|
50
|
+
const onClose = () => {
|
|
51
|
+
clearTimer();
|
|
52
|
+
open.value = false;
|
|
53
|
+
};
|
|
54
|
+
const onChange = (open2) => {
|
|
55
|
+
var _a;
|
|
56
|
+
if (open2) {
|
|
57
|
+
document.dispatchEvent(new CustomEvent(constants.TOOLTIP_V2_OPEN));
|
|
58
|
+
onOpen();
|
|
59
|
+
}
|
|
60
|
+
(_a = props.onOpenChange) == null ? void 0 : _a.call(props, open2);
|
|
61
|
+
};
|
|
62
|
+
vue.watch(open, onChange);
|
|
63
|
+
vue.onMounted(() => {
|
|
64
|
+
document.addEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
|
65
|
+
});
|
|
66
|
+
vue.onBeforeUnmount(() => {
|
|
67
|
+
clearTimer();
|
|
68
|
+
document.removeEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
|
69
|
+
});
|
|
70
|
+
vue.provide(constants.tooltipV2RootKey, {
|
|
71
|
+
contentId,
|
|
72
|
+
triggerRef,
|
|
73
|
+
ns,
|
|
74
|
+
onClose,
|
|
75
|
+
onDelayOpen,
|
|
76
|
+
onOpen
|
|
77
|
+
});
|
|
78
|
+
expose({
|
|
79
|
+
onOpen,
|
|
80
|
+
onClose
|
|
81
|
+
});
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return vue.renderSlot(_ctx.$slots, "default", { open: vue.unref(open) });
|
|
84
|
+
};
|
|
23
85
|
}
|
|
24
86
|
});
|
|
87
|
+
var TooltipV2Root = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "root.vue"]]);
|
|
25
88
|
|
|
26
|
-
exports
|
|
89
|
+
exports["default"] = TooltipV2Root;
|
|
27
90
|
//# sourceMappingURL=root2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root2.js","sources":["../../../../../../packages/components/tooltip-v2/src/root.
|
|
1
|
+
{"version":3,"file":"root2.js","sources":["../../../../../../packages/components/tooltip-v2/src/root.vue"],"sourcesContent":["<template>\n <slot :open=\"open\" />\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { isNumber, isPropAbsent } from '@element-plus/utils'\nimport { TOOLTIP_V2_OPEN, tooltipV2RootKey } from './constants'\nimport { tooltipV2RootProps } from './root'\n\ndefineOptions({\n name: 'ElTooltipV2Root',\n})\n\nconst props = defineProps(tooltipV2RootProps)\n\n/**\n * internal open state, when no model value was provided, use this as indicator instead\n */\nconst _open = ref(props.defaultOpen)\nconst triggerRef = ref<HTMLElement | null>(null)\n\nconst open = computed<boolean>({\n get: () => (isPropAbsent(props.open) ? _open.value : props.open),\n set: (open) => {\n _open.value = open\n props['onUpdate:open']?.(open)\n },\n})\n\nconst isOpenDelayed = computed(\n () => isNumber(props.delayDuration) && props.delayDuration > 0\n)\n\nconst { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(\n () => {\n open.value = true\n },\n computed(() => props.delayDuration),\n {\n immediate: false,\n }\n)\n\nconst ns = useNamespace('tooltip-v2')\n\nconst contentId = useId()\n\nconst onNormalOpen = () => {\n clearTimer()\n open.value = true\n}\n\nconst onDelayOpen = () => {\n unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen()\n}\n\nconst onOpen = onNormalOpen\n\nconst onClose = () => {\n clearTimer()\n open.value = false\n}\n\nconst onChange = (open: boolean) => {\n if (open) {\n document.dispatchEvent(new CustomEvent(TOOLTIP_V2_OPEN))\n onOpen()\n }\n\n props.onOpenChange?.(open)\n}\n\nwatch(open, onChange)\n\nonMounted(() => {\n // Keeps only 1 tooltip open at a time\n document.addEventListener(TOOLTIP_V2_OPEN, onClose)\n})\n\nonBeforeUnmount(() => {\n clearTimer()\n document.removeEventListener(TOOLTIP_V2_OPEN, onClose)\n})\n\nprovide(tooltipV2RootKey, {\n contentId,\n triggerRef,\n ns,\n\n onClose,\n onDelayOpen,\n onOpen,\n})\n\ndefineExpose({\n /**\n * @description open tooltip programmatically\n */\n onOpen,\n\n /**\n * @description close tooltip programmatically\n */\n onClose,\n})\n</script>\n"],"names":["ref","computed","isPropAbsent","isNumber","useTimeoutFn","unref","TOOLTIP_V2_OPEN","watch","onMounted","onBeforeUnmount","provide","tooltipV2RootKey"],"mappings":";;;;;;;;;;;;;;;uCAoBc,CAAA;AAAA,EAC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,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('../../../utils/index.js');
|
|
6
|
-
var root = require('./
|
|
6
|
+
var root = require('./root.js');
|
|
7
7
|
var trigger = require('./trigger.js');
|
|
8
|
-
var arrow = require('./
|
|
8
|
+
var arrow = require('./arrow.js');
|
|
9
9
|
var content = require('./content.js');
|
|
10
10
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
11
11
|
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
var lodashUnified = require('lodash-unified');
|
|
7
|
-
var arrow = require('./
|
|
7
|
+
var arrow = require('./arrow.js');
|
|
8
8
|
var content = require('./content.js');
|
|
9
|
-
var root = require('./
|
|
9
|
+
var root = require('./root.js');
|
|
10
10
|
var tooltip = require('./tooltip.js');
|
|
11
11
|
var trigger = require('./trigger.js');
|
|
12
|
-
var root$1 = require('./
|
|
13
|
-
var arrow$1 = require('./
|
|
12
|
+
var root$1 = require('./root2.js');
|
|
13
|
+
var arrow$1 = require('./arrow2.js');
|
|
14
14
|
var content$1 = require('./content2.js');
|
|
15
15
|
var trigger$1 = require('./trigger2.js');
|
|
16
16
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|