@element-plus/nightly 0.0.20250108 → 0.0.20250111
Sign up to get free protection for your applications and to get access to all the features.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +54 -30
- package/dist/index.full.min.js +19 -19
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +19 -19
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +54 -31
- 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/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.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/no.js +190 -0
- package/dist/locale/no.min.js +2 -0
- package/dist/locale/no.min.js.map +1 -0
- package/dist/locale/no.min.mjs +2 -0
- package/dist/locale/no.min.mjs.map +1 -0
- package/dist/locale/no.mjs +182 -0
- 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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +118 -25
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +25 -118
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +89 -36
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +36 -89
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +1 -1
- package/es/components/anchor/src/anchor-link.mjs +5 -81
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +81 -5
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +364 -79
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +79 -364
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +77 -56
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +56 -77
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +4 -4
- package/es/components/carousel/src/carousel-item.mjs +69 -7
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +7 -69
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +61 -204
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +204 -61
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -38
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +38 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +4 -4
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group.mjs +29 -71
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +71 -29
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.mjs +119 -59
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +59 -119
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +4 -4
- package/es/components/collapse/src/collapse-item.mjs +90 -18
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +18 -90
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/collapse/src/collapse.mjs +16 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -16
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.mjs +2 -0
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +52 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -52
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/image/src/image.d.ts +2 -0
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +5 -1
- package/es/components/image/src/image2.mjs +4 -1
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +28 -28
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +34 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -34
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +58 -7
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +7 -58
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +36 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -36
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/scrollbar/index.mjs +3 -3
- package/es/components/scrollbar/src/bar2.mjs +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.mjs +129 -11
- package/es/components/scrollbar/src/thumb.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb2.mjs +11 -129
- package/es/components/scrollbar/src/thumb2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +4 -4
- package/es/components/skeleton/src/skeleton-item.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +21 -48
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +48 -21
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -69
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +69 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +7 -95
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +95 -7
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +67 -21
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +21 -62
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-picker/index.mjs +1 -1
- package/es/components/time-picker/src/common/picker-range-trigger.mjs +2 -2
- package/es/components/time-picker/src/common/picker-range-trigger.mjs.map +1 -1
- package/es/components/time-picker/src/common/props.d.ts +25 -0
- package/es/components/time-picker/src/common/props.mjs +3 -2
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-select/src/time-select.d.ts +1 -0
- package/es/components/time-select/src/time-select.mjs +4 -0
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +3 -0
- package/es/components/time-select/src/time-select2.mjs +12 -4
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +4 -4
- package/es/components/tooltip-v2/src/arrow.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content.mjs +110 -48
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +48 -110
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +79 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -79
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +4 -4
- package/es/components/tooltip-v2/src/tooltip2.mjs +8 -8
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/mask.mjs +75 -18
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +18 -75
- package/es/components/tour/src/mask2.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 +2 -2
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +196 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -196
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +27 -210
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +210 -27
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +28 -28
- package/es/locale/lang/no.d.ts +179 -0
- package/es/locale/lang/no.mjs +181 -0
- package/es/locale/lang/no.mjs.map +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +118 -26
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +26 -118
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +88 -37
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +37 -88
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/anchor/index.js +1 -1
- package/lib/components/anchor/src/anchor-link.js +5 -81
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +81 -5
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +363 -79
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +79 -363
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +77 -59
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +59 -77
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/carousel/index.js +4 -4
- package/lib/components/carousel/src/carousel-item.js +69 -7
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +7 -69
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +62 -204
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +204 -62
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -38
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +38 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/checkbox/index.js +4 -4
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox-group.js +30 -71
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +71 -30
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.js +119 -60
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +60 -119
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/collapse/index.js +4 -4
- package/lib/components/collapse/src/collapse-item.js +90 -18
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +18 -90
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/collapse/src/collapse.js +18 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -18
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.js +2 -0
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +52 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -52
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/image/src/image.d.ts +2 -0
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +5 -1
- package/lib/components/image/src/image2.js +4 -1
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +28 -27
- package/lib/components/index.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +34 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -34
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +58 -7
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +7 -58
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +36 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -36
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/scrollbar/index.js +3 -3
- package/lib/components/scrollbar/src/bar2.js +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +56 -170
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +170 -56
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.js +129 -11
- package/lib/components/scrollbar/src/thumb.js.map +1 -1
- package/lib/components/scrollbar/src/thumb2.js +11 -129
- package/lib/components/scrollbar/src/thumb2.js.map +1 -1
- package/lib/components/skeleton/index.js +4 -4
- package/lib/components/skeleton/src/skeleton-item.js +17 -22
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +22 -17
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +21 -48
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +48 -21
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -69
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +69 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +7 -95
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +95 -7
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +67 -21
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +21 -62
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-picker/index.js +1 -0
- package/lib/components/time-picker/index.js.map +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js +1 -1
- package/lib/components/time-picker/src/common/picker-range-trigger.js.map +1 -1
- package/lib/components/time-picker/src/common/props.d.ts +25 -0
- package/lib/components/time-picker/src/common/props.js +3 -1
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-select/src/time-select.d.ts +1 -0
- package/lib/components/time-select/src/time-select.js +4 -0
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +3 -0
- package/lib/components/time-select/src/time-select2.js +12 -4
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip-v2/index.js +4 -4
- package/lib/components/tooltip-v2/src/arrow.js +37 -22
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +22 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/content.js +110 -48
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +48 -110
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +79 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -79
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +4 -4
- package/lib/components/tooltip-v2/src/tooltip2.js +8 -8
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/mask.js +75 -18
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +18 -75
- package/lib/components/tour/src/mask2.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 +2 -2
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +194 -31
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +31 -194
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +27 -210
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +210 -27
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +28 -27
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/no.d.ts +179 -0
- package/lib/locale/lang/no.js +185 -0
- package/lib/locale/lang/no.js.map +1 -0
- 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/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/dialog.scss +1 -0
- package/web-types.json +1 -1
@@ -1,16 +1,93 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, inject, watch, onBeforeUnmount, openBlock, createBlock, unref, withCtx, renderSlot, createElementBlock, mergeProps } from 'vue';
|
2
|
+
import { tooltipV2RootKey } from './constants.mjs';
|
3
|
+
import ForwardRef from './forward-ref.mjs';
|
4
|
+
import { tooltipV2TriggerProps } from './trigger.mjs';
|
5
|
+
import { tooltipV2CommonProps } from './common.mjs';
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
+
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
2
8
|
|
3
|
-
const
|
4
|
-
|
5
|
-
};
|
6
|
-
const tooltipV2TriggerProps = buildProps({
|
7
|
-
onBlur: EventHandler,
|
8
|
-
onClick: EventHandler,
|
9
|
-
onFocus: EventHandler,
|
10
|
-
onMouseDown: EventHandler,
|
11
|
-
onMouseEnter: EventHandler,
|
12
|
-
onMouseLeave: EventHandler
|
9
|
+
const __default__ = defineComponent({
|
10
|
+
name: "ElTooltipV2Trigger"
|
13
11
|
});
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
|
+
...__default__,
|
14
|
+
props: {
|
15
|
+
...tooltipV2CommonProps,
|
16
|
+
...tooltipV2TriggerProps
|
17
|
+
},
|
18
|
+
setup(__props) {
|
19
|
+
const props = __props;
|
20
|
+
const { onClose, onOpen, onDelayOpen, triggerRef, contentId } = inject(tooltipV2RootKey);
|
21
|
+
let isMousedown = false;
|
22
|
+
const setTriggerRef = (el) => {
|
23
|
+
triggerRef.value = el;
|
24
|
+
};
|
25
|
+
const onMouseup = () => {
|
26
|
+
isMousedown = false;
|
27
|
+
};
|
28
|
+
const onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen);
|
29
|
+
const onMouseleave = composeEventHandlers(props.onMouseLeave, onClose);
|
30
|
+
const onMousedown = composeEventHandlers(props.onMouseDown, () => {
|
31
|
+
onClose();
|
32
|
+
isMousedown = true;
|
33
|
+
document.addEventListener("mouseup", onMouseup, { once: true });
|
34
|
+
});
|
35
|
+
const onFocus = composeEventHandlers(props.onFocus, () => {
|
36
|
+
if (!isMousedown)
|
37
|
+
onOpen();
|
38
|
+
});
|
39
|
+
const onBlur = composeEventHandlers(props.onBlur, onClose);
|
40
|
+
const onClick = composeEventHandlers(props.onClick, (e) => {
|
41
|
+
if (e.detail === 0)
|
42
|
+
onClose();
|
43
|
+
});
|
44
|
+
const events = {
|
45
|
+
blur: onBlur,
|
46
|
+
click: onClick,
|
47
|
+
focus: onFocus,
|
48
|
+
mousedown: onMousedown,
|
49
|
+
mouseenter: onMouseenter,
|
50
|
+
mouseleave: onMouseleave
|
51
|
+
};
|
52
|
+
const setEvents = (el, events2, type) => {
|
53
|
+
if (el) {
|
54
|
+
Object.entries(events2).forEach(([name, handler]) => {
|
55
|
+
el[type](name, handler);
|
56
|
+
});
|
57
|
+
}
|
58
|
+
};
|
59
|
+
watch(triggerRef, (triggerEl, previousTriggerEl) => {
|
60
|
+
setEvents(triggerEl, events, "addEventListener");
|
61
|
+
setEvents(previousTriggerEl, events, "removeEventListener");
|
62
|
+
if (triggerEl) {
|
63
|
+
triggerEl.setAttribute("aria-describedby", contentId.value);
|
64
|
+
}
|
65
|
+
});
|
66
|
+
onBeforeUnmount(() => {
|
67
|
+
setEvents(triggerRef.value, events, "removeEventListener");
|
68
|
+
document.removeEventListener("mouseup", onMouseup);
|
69
|
+
});
|
70
|
+
return (_ctx, _cache) => {
|
71
|
+
return _ctx.nowrap ? (openBlock(), createBlock(unref(ForwardRef), {
|
72
|
+
key: 0,
|
73
|
+
"set-ref": setTriggerRef,
|
74
|
+
"only-child": ""
|
75
|
+
}, {
|
76
|
+
default: withCtx(() => [
|
77
|
+
renderSlot(_ctx.$slots, "default")
|
78
|
+
]),
|
79
|
+
_: 3
|
80
|
+
})) : (openBlock(), createElementBlock("button", mergeProps({
|
81
|
+
key: 1,
|
82
|
+
ref_key: "triggerRef",
|
83
|
+
ref: triggerRef
|
84
|
+
}, _ctx.$attrs), [
|
85
|
+
renderSlot(_ctx.$slots, "default")
|
86
|
+
], 16));
|
87
|
+
};
|
88
|
+
}
|
89
|
+
});
|
90
|
+
var TooltipV2Trigger = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "trigger.vue"]]);
|
14
91
|
|
15
|
-
export {
|
92
|
+
export { TooltipV2Trigger as default };
|
16
93
|
//# sourceMappingURL=trigger2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/trigger.
|
1
|
+
{"version":3,"file":"trigger2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/trigger.vue"],"sourcesContent":["<template>\n <forward-ref v-if=\"nowrap\" :set-ref=\"setTriggerRef\" only-child>\n <slot />\n </forward-ref>\n <button v-else ref=\"triggerRef\" v-bind=\"$attrs\">\n <slot />\n </button>\n</template>\n\n<script setup lang=\"ts\">\nimport { inject, onBeforeUnmount, watch } from 'vue'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { tooltipV2RootKey } from './constants'\nimport ForwardRef from './forward-ref'\nimport { tooltipV2TriggerProps } from './trigger'\nimport { tooltipV2CommonProps } from './common'\n\ndefineOptions({\n name: 'ElTooltipV2Trigger',\n})\n\nconst props = defineProps({\n ...tooltipV2CommonProps,\n ...tooltipV2TriggerProps,\n})\n\n/**\n * onOpen opens the tooltip instantly, onTrigger acts a lil bit differently,\n * it will check if delayDuration is set to greater than 0 and based on that result,\n * if true, it opens the tooltip after delayDuration, otherwise it opens it instantly.\n */\nconst { onClose, onOpen, onDelayOpen, triggerRef, contentId } =\n inject(tooltipV2RootKey)!\n\nlet isMousedown = false\n\nconst setTriggerRef = (el: HTMLElement | null) => {\n triggerRef.value = el\n}\n\nconst onMouseup = () => {\n isMousedown = false\n}\n\nconst onMouseenter = composeEventHandlers(props.onMouseEnter, onDelayOpen)\n\nconst onMouseleave = composeEventHandlers(props.onMouseLeave, onClose)\n\nconst onMousedown = composeEventHandlers(props.onMouseDown, () => {\n onClose()\n isMousedown = true\n document.addEventListener('mouseup', onMouseup, { once: true })\n})\n\nconst onFocus = composeEventHandlers(props.onFocus, () => {\n if (!isMousedown) onOpen()\n})\n\nconst onBlur = composeEventHandlers(props.onBlur, onClose)\n\nconst onClick = composeEventHandlers(props.onClick, (e) => {\n if ((e as MouseEvent).detail === 0) onClose()\n})\n\nconst events = {\n blur: onBlur,\n click: onClick,\n focus: onFocus,\n mousedown: onMousedown,\n mouseenter: onMouseenter,\n mouseleave: onMouseleave,\n}\n\nconst setEvents = <T extends (e: Event) => void>(\n el: HTMLElement | null | undefined,\n events: Record<string, T>,\n type: 'addEventListener' | 'removeEventListener'\n) => {\n if (el) {\n Object.entries(events).forEach(([name, handler]) => {\n el[type](name, handler)\n })\n }\n}\n\nwatch(triggerRef, (triggerEl, previousTriggerEl) => {\n setEvents(triggerEl, events, 'addEventListener')\n setEvents(previousTriggerEl, events, 'removeEventListener')\n\n if (triggerEl) {\n triggerEl.setAttribute('aria-describedby', contentId.value)\n }\n})\n\nonBeforeUnmount(() => {\n setEvents(triggerRef.value, events, 'removeEventListener')\n document.removeEventListener('mouseup', onMouseup)\n})\n</script>\n"],"names":["events"],"mappings":";;;;;;;;mCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAYA,IAAM,MAAA,EAAE,SAAS,MAAQ,EAAA,WAAA,EAAa,YAAY,SAAU,EAAA,GAC1D,OAAO,gBAAgB,CAAA,CAAA;AAEzB,IAAA,IAAI,WAAc,GAAA,KAAA,CAAA;AAElB,IAAM,MAAA,aAAA,GAAgB,CAAC,EAA2B,KAAA;AAChD,MAAA,UAAA,CAAW,KAAQ,GAAA,EAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA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AG,IAAA,EAAA,EAAA;AAAmB,QACxB,MAAC,CAAA,OAAA,CAAA,OAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,KAAA;AAAA,UACH,EAAA,CAAA,IAAA,CAAA,CAAA,IAAA,EAAA,OAAA,CAAA,CAAA;AAAA,SACF,CAAA,CAAA;AAEA,OAAM;AACJ,KAAU,CAAA;AACV,IAAU,KAAA,CAAA,UAAA,EAAA,CAAA,SAAA,EAAA,iBAAgD,KAAA;AAE1D,MAAA,SAAe,CAAA,SAAA,EAAA,MAAA,EAAA,kBAAA,CAAA,CAAA;AACb,MAAU,SAAA,CAAA,iBAAiC,EAAA,MAAA,EAAA,qBAAe,CAAA,CAAA;AAAA,MAC5D,IAAA,SAAA,EAAA;AAAA,QACD,SAAA,CAAA,YAAA,CAAA,kBAAA,EAAA,SAAA,CAAA,KAAA,CAAA,CAAA;AAED,OAAA;AACE,KAAU,CAAA,CAAA;AACV,IAAS,eAAA,CAAA,MAAA;AAAwC,MAClD,SAAA,CAAA,UAAA,CAAA,KAAA,EAAA,MAAA,EAAA,qBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,7 +2,7 @@ import Tour from './src/tour2.mjs';
|
|
2
2
|
import TourStep from './src/step2.mjs';
|
3
3
|
export { tourEmits, tourProps } from './src/tour.mjs';
|
4
4
|
export { tourStepEmits, tourStepProps } from './src/step.mjs';
|
5
|
-
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/
|
5
|
+
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/content2.mjs';
|
6
6
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
7
7
|
|
8
8
|
const ElTour = withInstall(Tour, {
|
@@ -1,48 +1,72 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, ref, watch, toRef, computed, inject, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass, createVNode, withCtx, renderSlot, createCommentVNode } from 'vue';
|
2
|
+
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
3
|
+
import { tourContentProps, tourContentEmits } from './content2.mjs';
|
4
|
+
import { useFloating, tourKey } from './helper.mjs';
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
2
6
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
7
|
+
const __default__ = defineComponent({
|
8
|
+
name: "ElTourContent"
|
9
|
+
});
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
|
+
...__default__,
|
12
|
+
props: tourContentProps,
|
13
|
+
emits: tourContentEmits,
|
14
|
+
setup(__props, { emit }) {
|
15
|
+
const props = __props;
|
16
|
+
const placement = ref(props.placement);
|
17
|
+
const strategy = ref(props.strategy);
|
18
|
+
const contentRef = ref(null);
|
19
|
+
const arrowRef = ref(null);
|
20
|
+
watch(() => props.placement, () => {
|
21
|
+
placement.value = props.placement;
|
22
|
+
});
|
23
|
+
const { contentStyle, arrowStyle } = useFloating(toRef(props, "reference"), contentRef, arrowRef, placement, strategy, toRef(props, "offset"), toRef(props, "zIndex"), toRef(props, "showArrow"));
|
24
|
+
const side = computed(() => {
|
25
|
+
return placement.value.split("-")[0];
|
26
|
+
});
|
27
|
+
const { ns } = inject(tourKey);
|
28
|
+
const onCloseRequested = () => {
|
29
|
+
emit("close");
|
30
|
+
};
|
31
|
+
const onFocusoutPrevented = (event) => {
|
32
|
+
if (event.detail.focusReason === "pointer") {
|
33
|
+
event.preventDefault();
|
34
|
+
}
|
35
|
+
};
|
36
|
+
return (_ctx, _cache) => {
|
37
|
+
return openBlock(), createElementBlock("div", {
|
38
|
+
ref_key: "contentRef",
|
39
|
+
ref: contentRef,
|
40
|
+
style: normalizeStyle(unref(contentStyle)),
|
41
|
+
class: normalizeClass(unref(ns).e("content")),
|
42
|
+
"data-side": unref(side),
|
43
|
+
tabindex: "-1"
|
44
|
+
}, [
|
45
|
+
createVNode(unref(ElFocusTrap), {
|
46
|
+
loop: "",
|
47
|
+
trapped: "",
|
48
|
+
"focus-start-el": "container",
|
49
|
+
"focus-trap-el": contentRef.value || void 0,
|
50
|
+
onReleaseRequested: onCloseRequested,
|
51
|
+
onFocusoutPrevented
|
52
|
+
}, {
|
53
|
+
default: withCtx(() => [
|
54
|
+
renderSlot(_ctx.$slots, "default")
|
55
|
+
]),
|
56
|
+
_: 3
|
57
|
+
}, 8, ["focus-trap-el"]),
|
58
|
+
_ctx.showArrow ? (openBlock(), createElementBlock("span", {
|
59
|
+
key: 0,
|
60
|
+
ref_key: "arrowRef",
|
61
|
+
ref: arrowRef,
|
62
|
+
style: normalizeStyle(unref(arrowStyle)),
|
63
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
64
|
+
}, null, 6)) : createCommentVNode("v-if", true)
|
65
|
+
], 14, ["data-side"]);
|
66
|
+
};
|
41
67
|
}
|
42
68
|
});
|
43
|
-
|
44
|
-
close: () => true
|
45
|
-
};
|
69
|
+
var ElTourContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
46
70
|
|
47
|
-
export {
|
71
|
+
export { ElTourContent as default };
|
48
72
|
//# sourceMappingURL=content.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tour/src/content.
|
1
|
+
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tour/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n :style=\"contentStyle\"\n :class=\"ns.e('content')\"\n :data-side=\"side\"\n tabindex=\"-1\"\n >\n <el-focus-trap\n loop\n trapped\n focus-start-el=\"container\"\n :focus-trap-el=\"contentRef || undefined\"\n @release-requested=\"onCloseRequested\"\n @focusout-prevented=\"onFocusoutPrevented\"\n >\n <slot />\n </el-focus-trap>\n <span\n v-if=\"showArrow\"\n ref=\"arrowRef\"\n :style=\"arrowStyle\"\n :class=\"ns.e('arrow')\"\n />\n </div>\n</template>\n<script setup lang=\"ts\">\nimport { computed, inject, ref, toRef, watch } from 'vue'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { tourContentEmits, tourContentProps } from './content'\nimport { tourKey, useFloating } from './helper'\n\ndefineOptions({\n name: 'ElTourContent',\n})\n\nconst props = defineProps(tourContentProps)\nconst emit = defineEmits(tourContentEmits)\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst contentRef = ref<HTMLElement | null>(null)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nwatch(\n () => props.placement,\n () => {\n placement.value = props.placement\n }\n)\n\nconst { contentStyle, arrowStyle } = useFloating(\n toRef(props, 'reference'),\n contentRef,\n arrowRef,\n placement,\n strategy,\n toRef(props, 'offset'),\n toRef(props, 'zIndex'),\n toRef(props, 'showArrow')\n)\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst { ns } = inject(tourKey)!\n\nconst onCloseRequested = () => {\n emit('close')\n}\n\nconst onFocusoutPrevented = (event: CustomEvent) => {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_unref","_normalizeClass","_createVNode"],"mappings":";;;;;;mCAgCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;A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AAED,QAAA,GAAQ,EAAA,UAAO;AAEf,QAAA,qBAA+B,CAAAC,KAAA,CAAA,YAAA,CAAA,CAAA;AAC7B,QAAA,KAAY,EAAAC,cAAA,CAAAD,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA;AAAA,QACd,WAAA,EAAAA,KAAA,CAAA,IAAA,CAAA;AAEA,QAAM,QAAA,EAAA,IAAA;AACJ,OAAI,EAAA;AACF,QAAAE,WAAqB,CAAAF,KAAA,CAAA,WAAA,CAAA,EAAA;AAAA,UACvB,IAAA,EAAA,EAAA;AAAA,UACF,OAAA,EAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,72 +1,48 @@
|
|
1
|
-
import {
|
2
|
-
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
3
|
-
import { tourContentProps, tourContentEmits } from './content.mjs';
|
4
|
-
import { useFloating, tourKey } from './helper.mjs';
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
6
2
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
createVNode(unref(ElFocusTrap), {
|
46
|
-
loop: "",
|
47
|
-
trapped: "",
|
48
|
-
"focus-start-el": "container",
|
49
|
-
"focus-trap-el": contentRef.value || void 0,
|
50
|
-
onReleaseRequested: onCloseRequested,
|
51
|
-
onFocusoutPrevented
|
52
|
-
}, {
|
53
|
-
default: withCtx(() => [
|
54
|
-
renderSlot(_ctx.$slots, "default")
|
55
|
-
]),
|
56
|
-
_: 3
|
57
|
-
}, 8, ["focus-trap-el"]),
|
58
|
-
_ctx.showArrow ? (openBlock(), createElementBlock("span", {
|
59
|
-
key: 0,
|
60
|
-
ref_key: "arrowRef",
|
61
|
-
ref: arrowRef,
|
62
|
-
style: normalizeStyle(unref(arrowStyle)),
|
63
|
-
class: normalizeClass(unref(ns).e("arrow"))
|
64
|
-
}, null, 6)) : createCommentVNode("v-if", true)
|
65
|
-
], 14, ["data-side"]);
|
66
|
-
};
|
3
|
+
const tourStrategies = ["absolute", "fixed"];
|
4
|
+
const tourPlacements = [
|
5
|
+
"top-start",
|
6
|
+
"top-end",
|
7
|
+
"top",
|
8
|
+
"bottom-start",
|
9
|
+
"bottom-end",
|
10
|
+
"bottom",
|
11
|
+
"left-start",
|
12
|
+
"left-end",
|
13
|
+
"left",
|
14
|
+
"right-start",
|
15
|
+
"right-end",
|
16
|
+
"right"
|
17
|
+
];
|
18
|
+
const tourContentProps = buildProps({
|
19
|
+
placement: {
|
20
|
+
type: definePropType(String),
|
21
|
+
values: tourPlacements,
|
22
|
+
default: "bottom"
|
23
|
+
},
|
24
|
+
reference: {
|
25
|
+
type: definePropType(Object),
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
strategy: {
|
29
|
+
type: definePropType(String),
|
30
|
+
values: tourStrategies,
|
31
|
+
default: "absolute"
|
32
|
+
},
|
33
|
+
offset: {
|
34
|
+
type: Number,
|
35
|
+
default: 10
|
36
|
+
},
|
37
|
+
showArrow: Boolean,
|
38
|
+
zIndex: {
|
39
|
+
type: Number,
|
40
|
+
default: 2001
|
67
41
|
}
|
68
42
|
});
|
69
|
-
|
43
|
+
const tourContentEmits = {
|
44
|
+
close: () => true
|
45
|
+
};
|
70
46
|
|
71
|
-
export {
|
47
|
+
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies };
|
72
48
|
//# sourceMappingURL=content2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.
|
1
|
+
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tour/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nexport const tourStrategies = ['absolute', 'fixed'] as const\n\nexport const tourPlacements = [\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 tourContentProps = buildProps({\n /**\n * @description position of the guide card relative to the target element\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tourPlacements,\n default: 'bottom',\n },\n /**\n * @description the reference dom\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n /**\n * @description position strategy of the content\n */\n strategy: {\n type: definePropType<Strategy>(String),\n values: tourStrategies,\n default: 'absolute',\n },\n /**\n * @description offset of the arrow\n */\n offset: {\n type: Number,\n default: 10,\n },\n /**\n * @description @description whether to show the arrow\n */\n showArrow: Boolean,\n /**\n * @description content's zIndex\n */\n zIndex: {\n type: Number,\n default: 2001,\n },\n})\n\nexport type TourContentProps = ExtractPropTypes<typeof tourContentProps>\n\nexport const tourContentEmits = {\n close: () => true,\n}\nexport type TourContentEmits = typeof tourContentEmits\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE;AACxC,MAAC,cAAc,GAAG;AAC9B,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,EAAE;AACU,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,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,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB;;;;"}
|
@@ -1,23 +1,80 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, inject, computed, toRef, openBlock, createElementBlock, mergeProps, unref, createElementVNode, normalizeClass, normalizeStyle, createCommentVNode } from 'vue';
|
2
|
+
import { maskProps } from './mask2.mjs';
|
3
|
+
import { tourKey } from './helper.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';
|
2
6
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
7
|
+
const __default__ = defineComponent({
|
8
|
+
name: "ElTourMask",
|
9
|
+
inheritAttrs: false
|
10
|
+
});
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...__default__,
|
13
|
+
props: maskProps,
|
14
|
+
setup(__props) {
|
15
|
+
const props = __props;
|
16
|
+
const { ns } = inject(tourKey);
|
17
|
+
const radius = computed(() => {
|
18
|
+
var _a, _b;
|
19
|
+
return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
|
20
|
+
});
|
21
|
+
const roundInfo = computed(() => {
|
22
|
+
const v = radius.value;
|
23
|
+
const baseInfo = `a${v},${v} 0 0 1`;
|
24
|
+
return {
|
25
|
+
topRight: `${baseInfo} ${v},${v}`,
|
26
|
+
bottomRight: `${baseInfo} ${-v},${v}`,
|
27
|
+
bottomLeft: `${baseInfo} ${-v},${-v}`,
|
28
|
+
topLeft: `${baseInfo} ${v},${-v}`
|
29
|
+
};
|
30
|
+
});
|
31
|
+
const path = computed(() => {
|
32
|
+
const width = window.innerWidth;
|
33
|
+
const height = window.innerHeight;
|
34
|
+
const info = roundInfo.value;
|
35
|
+
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
|
36
|
+
const _radius = radius.value;
|
37
|
+
return props.pos ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${props.pos.width - _radius * 2} ${info.topRight} v${props.pos.height - _radius * 2} ${info.bottomRight} h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${-props.pos.height + _radius * 2} ${info.topLeft} z` : _path;
|
38
|
+
});
|
39
|
+
const pathStyle = computed(() => {
|
40
|
+
return {
|
41
|
+
fill: props.fill,
|
42
|
+
pointerEvents: "auto",
|
43
|
+
cursor: "auto"
|
44
|
+
};
|
45
|
+
});
|
46
|
+
useLockscreen(toRef(props, "visible"), {
|
47
|
+
ns
|
48
|
+
});
|
49
|
+
return (_ctx, _cache) => {
|
50
|
+
return _ctx.visible ? (openBlock(), createElementBlock("div", mergeProps({
|
51
|
+
key: 0,
|
52
|
+
class: unref(ns).e("mask"),
|
53
|
+
style: {
|
54
|
+
position: "fixed",
|
55
|
+
left: 0,
|
56
|
+
right: 0,
|
57
|
+
top: 0,
|
58
|
+
bottom: 0,
|
59
|
+
zIndex: _ctx.zIndex,
|
60
|
+
pointerEvents: _ctx.pos && _ctx.targetAreaClickable ? "none" : "auto"
|
61
|
+
}
|
62
|
+
}, _ctx.$attrs), [
|
63
|
+
(openBlock(), createElementBlock("svg", { style: {
|
64
|
+
width: "100%",
|
65
|
+
height: "100%"
|
66
|
+
} }, [
|
67
|
+
createElementVNode("path", {
|
68
|
+
class: normalizeClass(unref(ns).e("hollow")),
|
69
|
+
style: normalizeStyle(unref(pathStyle)),
|
70
|
+
d: unref(path)
|
71
|
+
}, null, 14, ["d"])
|
72
|
+
]))
|
73
|
+
], 16)) : createCommentVNode("v-if", true);
|
74
|
+
};
|
19
75
|
}
|
20
76
|
});
|
77
|
+
var ElTourMask = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "mask.vue"]]);
|
21
78
|
|
22
|
-
export {
|
79
|
+
export { ElTourMask as default };
|
23
80
|
//# sourceMappingURL=mask.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.
|
1
|
+
{"version":3,"file":"mask.mjs","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div\n v-if=\"visible\"\n :class=\"ns.e('mask')\"\n :style=\"({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex,\n pointerEvents: pos && targetAreaClickable ? 'none' : 'auto',\n } as any)\"\n v-bind=\"$attrs\"\n >\n <svg\n :style=\"{\n width: '100%',\n height: '100%',\n }\"\n >\n <path :class=\"ns.e('hollow')\" :style=\"pathStyle\" :d=\"path\" />\n </svg>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, toRef } from 'vue'\nimport { useLockscreen } from '@element-plus/hooks'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTourMask',\n inheritAttrs: false,\n})\n\nconst props = defineProps(maskProps)\n\nconst { ns } = inject(tourKey)!\nconst radius = computed(() => props.pos?.radius ?? 2)\nconst roundInfo = computed(() => {\n const v = radius.value\n const baseInfo = `a${v},${v} 0 0 1`\n return {\n topRight: `${baseInfo} ${v},${v}`,\n bottomRight: `${baseInfo} ${-v},${v}`,\n bottomLeft: `${baseInfo} ${-v},${-v}`,\n topLeft: `${baseInfo} ${v},${-v}`,\n }\n})\n\nconst path = computed(() => {\n const width = window.innerWidth\n const height = window.innerHeight\n const info = roundInfo.value\n const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`\n const _radius = radius.value\n return props.pos\n ? `${_path} M${props.pos.left + _radius},${props.pos.top} h${\n props.pos.width - _radius * 2\n } ${info.topRight} v${props.pos.height - _radius * 2} ${\n info.bottomRight\n } h${-props.pos.width + _radius * 2} ${info.bottomLeft} v${\n -props.pos.height + _radius * 2\n } ${info.topLeft} z`\n : _path\n})\n\nconst pathStyle = computed<CSSProperties>(() => {\n return {\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n }\n})\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":[],"mappings":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAAS,QAAS,CAAA,MAAM;AAC9B,MAAM,IAAA,EAAA,EAAA,EAAA,CAAA;AACJ,MAAA,UAAU,GAAO,CAAA,EAAA,GAAA,KAAA,C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