@element-plus/nightly 0.0.20251210 → 0.0.20251211
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/dist/index.css +1 -1
- package/dist/index.full.js +22 -8
- package/dist/index.full.min.js +7 -7
- 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 +22 -8
- 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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.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 +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.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/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +40 -213
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +213 -40
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete2.mjs +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +347 -49
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +49 -347
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +6 -2
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.d.ts +1 -0
- package/es/components/dialog/src/use-dialog.mjs +5 -1
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +2 -2
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +69 -234
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +234 -69
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +51 -484
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +484 -51
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +18 -18
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +484 -125
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +125 -484
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +25 -71
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +71 -25
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +2 -2
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +103 -15
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +15 -103
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +35 -18
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +18 -35
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +16 -210
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +210 -16
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +72 -26
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +26 -72
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/index.mjs +2 -2
- package/es/components/popover/src/popover.mjs +66 -112
- package/es/components/popover/src/popover.mjs.map +1 -1
- package/es/components/popover/src/popover2.mjs +112 -66
- package/es/components/popover/src/popover2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +207 -53
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +53 -207
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +54 -86
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +86 -54
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +86 -255
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +255 -86
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +10 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -10
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +230 -75
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +75 -230
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/filter-panel.mjs +1 -1
- package/es/components/time-picker/src/common/props.mjs +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +33 -72
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +72 -33
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +29 -203
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +203 -29
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tour/index.mjs +3 -3
- package/es/components/tour/src/content.mjs +43 -67
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +67 -43
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +192 -44
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step2.mjs +44 -192
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs +10 -4
- package/es/components/tree/src/model/useNodeExpandEventBroadcast.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +27 -226
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +226 -27
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +18 -18
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +40 -212
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +212 -40
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +2 -2
- package/lib/components/autocomplete/src/autocomplete2.js +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +346 -49
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +49 -346
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +6 -2
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.d.ts +1 -0
- package/lib/components/dialog/src/use-dialog.js +5 -1
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +2 -2
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +69 -233
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +233 -69
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +52 -484
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +484 -52
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +18 -18
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +480 -122
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +122 -480
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +26 -71
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +71 -26
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/mention/src/mention.js +2 -2
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +103 -16
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +16 -103
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +35 -18
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +18 -35
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +16 -210
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +210 -16
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +72 -26
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +26 -72
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/index.js +2 -2
- package/lib/components/popover/src/popover.js +67 -112
- package/lib/components/popover/src/popover.js.map +1 -1
- package/lib/components/popover/src/popover2.js +112 -67
- package/lib/components/popover/src/popover2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +207 -53
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +53 -207
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +56 -86
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +86 -56
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +86 -254
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +254 -86
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +10 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -10
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +229 -75
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +75 -229
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/filter-panel.js +1 -1
- package/lib/components/time-picker/src/common/props.js +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +33 -72
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +72 -33
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +29 -203
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +203 -29
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tour/index.js +3 -3
- package/lib/components/tour/src/content.js +46 -67
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +67 -46
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +191 -44
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step2.js +44 -191
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/tree/src/model/useNodeExpandEventBroadcast.js +9 -3
- package/lib/components/tree/src/model/useNodeExpandEventBroadcast.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +27 -226
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +226 -27
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +18 -18
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +3 -3
- package/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/dialog.scss +6 -0
- package/web-types.json +1 -1
|
@@ -1,33 +1,207 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent, ref, inject, computed, onBeforeUnmount, unref, watch, openBlock, createBlock, withCtx, Transition, withDirectives, createVNode, mergeProps, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
2
|
+
import { computedEager, onClickOutside } from '@vueuse/core';
|
|
3
|
+
import '../../popper/index.mjs';
|
|
4
|
+
import { ElTeleport } from '../../teleport/index.mjs';
|
|
5
|
+
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
6
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
7
|
+
import { isTriggerType } from './utils.mjs';
|
|
8
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
|
+
import { usePopperContainerId } from '../../../hooks/use-popper-container/index.mjs';
|
|
10
|
+
import { castArray } from '../../../utils/arrays.mjs';
|
|
11
|
+
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
12
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
13
|
+
import { focusElement } from '../../../utils/dom/aria.mjs';
|
|
14
|
+
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
6
15
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
appendTo: {
|
|
11
|
-
type: teleportProps.to.type
|
|
12
|
-
},
|
|
13
|
-
content: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
},
|
|
17
|
-
rawContent: Boolean,
|
|
18
|
-
persistent: Boolean,
|
|
19
|
-
visible: {
|
|
20
|
-
type: definePropType(Boolean),
|
|
21
|
-
default: null
|
|
22
|
-
},
|
|
23
|
-
transition: String,
|
|
24
|
-
teleported: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: true
|
|
27
|
-
},
|
|
28
|
-
disabled: Boolean,
|
|
29
|
-
...useAriaProps(["ariaLabel"])
|
|
16
|
+
const __default__ = defineComponent({
|
|
17
|
+
name: "ElTooltipContent",
|
|
18
|
+
inheritAttrs: false
|
|
30
19
|
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: useTooltipContentProps,
|
|
23
|
+
setup(__props, { expose }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const { selector } = usePopperContainerId();
|
|
26
|
+
const ns = useNamespace("tooltip");
|
|
27
|
+
const contentRef = ref();
|
|
28
|
+
const popperContentRef = computedEager(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
31
|
+
});
|
|
32
|
+
let stopHandle;
|
|
33
|
+
const {
|
|
34
|
+
controlled,
|
|
35
|
+
id,
|
|
36
|
+
open,
|
|
37
|
+
trigger,
|
|
38
|
+
onClose,
|
|
39
|
+
onOpen,
|
|
40
|
+
onShow,
|
|
41
|
+
onHide,
|
|
42
|
+
onBeforeShow,
|
|
43
|
+
onBeforeHide
|
|
44
|
+
} = inject(TOOLTIP_INJECTION_KEY, void 0);
|
|
45
|
+
const transitionClass = computed(() => {
|
|
46
|
+
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
47
|
+
});
|
|
48
|
+
const persistentRef = computed(() => {
|
|
49
|
+
if (process.env.NODE_ENV === "test") {
|
|
50
|
+
if (!process.env.RUN_TEST_WITH_PERSISTENT) {
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return props.persistent;
|
|
55
|
+
});
|
|
56
|
+
onBeforeUnmount(() => {
|
|
57
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
58
|
+
});
|
|
59
|
+
const shouldRender = computed(() => {
|
|
60
|
+
return unref(persistentRef) ? true : unref(open);
|
|
61
|
+
});
|
|
62
|
+
const shouldShow = computed(() => {
|
|
63
|
+
return props.disabled ? false : unref(open);
|
|
64
|
+
});
|
|
65
|
+
const appendTo = computed(() => {
|
|
66
|
+
return props.appendTo || selector.value;
|
|
67
|
+
});
|
|
68
|
+
const contentStyle = computed(() => {
|
|
69
|
+
var _a;
|
|
70
|
+
return (_a = props.style) != null ? _a : {};
|
|
71
|
+
});
|
|
72
|
+
const ariaHidden = ref(true);
|
|
73
|
+
const onTransitionLeave = () => {
|
|
74
|
+
onHide();
|
|
75
|
+
isFocusInsideContent() && focusElement(document.body, { preventScroll: true });
|
|
76
|
+
ariaHidden.value = true;
|
|
77
|
+
};
|
|
78
|
+
const stopWhenControlled = () => {
|
|
79
|
+
if (unref(controlled))
|
|
80
|
+
return true;
|
|
81
|
+
};
|
|
82
|
+
const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
|
|
83
|
+
if (props.enterable && isTriggerType(unref(trigger), "hover")) {
|
|
84
|
+
onOpen();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
|
|
88
|
+
if (isTriggerType(unref(trigger), "hover")) {
|
|
89
|
+
onClose();
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
const onBeforeEnter = () => {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
95
|
+
onBeforeShow == null ? void 0 : onBeforeShow();
|
|
96
|
+
};
|
|
97
|
+
const onBeforeLeave = () => {
|
|
98
|
+
onBeforeHide == null ? void 0 : onBeforeHide();
|
|
99
|
+
};
|
|
100
|
+
const onAfterShow = () => {
|
|
101
|
+
onShow();
|
|
102
|
+
};
|
|
103
|
+
const onBlur = () => {
|
|
104
|
+
if (!props.virtualTriggering) {
|
|
105
|
+
onClose();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const isFocusInsideContent = (event) => {
|
|
109
|
+
var _a;
|
|
110
|
+
const popperContent = (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
111
|
+
const activeElement = (event == null ? void 0 : event.relatedTarget) || document.activeElement;
|
|
112
|
+
return popperContent == null ? void 0 : popperContent.contains(activeElement);
|
|
113
|
+
};
|
|
114
|
+
watch(() => unref(open), (val) => {
|
|
115
|
+
if (!val) {
|
|
116
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
117
|
+
} else {
|
|
118
|
+
ariaHidden.value = false;
|
|
119
|
+
stopHandle = onClickOutside(popperContentRef, () => {
|
|
120
|
+
if (unref(controlled))
|
|
121
|
+
return;
|
|
122
|
+
const needClose = castArray(unref(trigger)).every((item) => {
|
|
123
|
+
return item !== "hover" && item !== "focus";
|
|
124
|
+
});
|
|
125
|
+
if (needClose) {
|
|
126
|
+
onClose();
|
|
127
|
+
}
|
|
128
|
+
}, { detectIframe: true });
|
|
129
|
+
}
|
|
130
|
+
}, {
|
|
131
|
+
flush: "post"
|
|
132
|
+
});
|
|
133
|
+
watch(() => props.content, () => {
|
|
134
|
+
var _a, _b;
|
|
135
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
136
|
+
});
|
|
137
|
+
expose({
|
|
138
|
+
contentRef,
|
|
139
|
+
isFocusInsideContent
|
|
140
|
+
});
|
|
141
|
+
return (_ctx, _cache) => {
|
|
142
|
+
return openBlock(), createBlock(unref(ElTeleport), {
|
|
143
|
+
disabled: !_ctx.teleported,
|
|
144
|
+
to: unref(appendTo)
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [
|
|
147
|
+
unref(shouldRender) || !ariaHidden.value ? (openBlock(), createBlock(Transition, {
|
|
148
|
+
key: 0,
|
|
149
|
+
name: unref(transitionClass),
|
|
150
|
+
appear: !unref(persistentRef),
|
|
151
|
+
onAfterLeave: onTransitionLeave,
|
|
152
|
+
onBeforeEnter,
|
|
153
|
+
onAfterEnter: onAfterShow,
|
|
154
|
+
onBeforeLeave,
|
|
155
|
+
persisted: ""
|
|
156
|
+
}, {
|
|
157
|
+
default: withCtx(() => [
|
|
158
|
+
withDirectives(createVNode(unref(ElPopperContent), mergeProps({
|
|
159
|
+
id: unref(id),
|
|
160
|
+
ref_key: "contentRef",
|
|
161
|
+
ref: contentRef
|
|
162
|
+
}, _ctx.$attrs, {
|
|
163
|
+
"aria-label": _ctx.ariaLabel,
|
|
164
|
+
"aria-hidden": ariaHidden.value,
|
|
165
|
+
"boundaries-padding": _ctx.boundariesPadding,
|
|
166
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
167
|
+
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
168
|
+
offset: _ctx.offset,
|
|
169
|
+
placement: _ctx.placement,
|
|
170
|
+
"popper-options": _ctx.popperOptions,
|
|
171
|
+
"arrow-offset": _ctx.arrowOffset,
|
|
172
|
+
strategy: _ctx.strategy,
|
|
173
|
+
effect: _ctx.effect,
|
|
174
|
+
enterable: _ctx.enterable,
|
|
175
|
+
pure: _ctx.pure,
|
|
176
|
+
"popper-class": _ctx.popperClass,
|
|
177
|
+
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
178
|
+
"reference-el": _ctx.referenceEl,
|
|
179
|
+
"trigger-target-el": _ctx.triggerTargetEl,
|
|
180
|
+
visible: unref(shouldShow),
|
|
181
|
+
"z-index": _ctx.zIndex,
|
|
182
|
+
loop: _ctx.loop,
|
|
183
|
+
onMouseenter: unref(onContentEnter),
|
|
184
|
+
onMouseleave: unref(onContentLeave),
|
|
185
|
+
onBlur,
|
|
186
|
+
onClose: unref(onClose)
|
|
187
|
+
}), {
|
|
188
|
+
default: withCtx(() => [
|
|
189
|
+
renderSlot(_ctx.$slots, "default")
|
|
190
|
+
]),
|
|
191
|
+
_: 3
|
|
192
|
+
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "arrow-offset", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "loop", "onMouseenter", "onMouseleave", "onClose"]), [
|
|
193
|
+
[vShow, unref(shouldShow)]
|
|
194
|
+
])
|
|
195
|
+
]),
|
|
196
|
+
_: 3
|
|
197
|
+
}, 8, ["name", "appear"])) : createCommentVNode("v-if", true)
|
|
198
|
+
]),
|
|
199
|
+
_: 3
|
|
200
|
+
}, 8, ["disabled", "to"]);
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
31
205
|
|
|
32
|
-
export {
|
|
206
|
+
export { ElTooltipContent as default };
|
|
33
207
|
//# sourceMappingURL=content2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperContentProps } from '@element-plus/components/popper'\nimport { useAriaProps, useDelayedToggleProps } from '@element-plus/hooks'\nimport { teleportProps } from '@element-plus/components/teleport'\n\nimport type TooltipContent from './content.vue'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const useTooltipContentProps = buildProps({\n ...useDelayedToggleProps,\n ...popperContentProps,\n /**\n * @description which element the tooltip CONTENT appends to\n */\n appendTo: {\n type: teleportProps.to.type,\n },\n /**\n * @description display content, can be overridden by `slot#content`\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * @description whether `content` is treated as HTML string\n */\n rawContent: Boolean,\n /**\n * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: Boolean,\n // because model toggle prop is generated dynamically\n // so the typing cannot be evaluated by typescript as type:\n // [name]: { type: Boolean, default: null }\n // so we need to declare that again for type checking.\n /**\n * @description visibility of Tooltip\n */\n visible: {\n type: definePropType<boolean | null>(Boolean),\n default: null,\n },\n /**\n * @description animation name\n */\n transition: String,\n /**\n * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type ElTooltipContentProps = ExtractPropTypes<\n typeof useTooltipContentProps\n>\nexport type ElTooltipContentPropsPublic = __ExtractPublicPropTypes<\n typeof useTooltipContentProps\n>\n\nexport type TooltipContentInstance = InstanceType<typeof TooltipContent> &\n unknown\n"],"names":[],"mappings":";;;;;;AAIY,MAAC,sBAAsB,GAAG,UAAU,CAAC;AACjD,EAAE,GAAG,qBAAqB;AAC1B,EAAE,GAAG,kBAAkB;AACvB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,aAAa,CAAC,EAAE,CAAC,IAAI;AAC/B,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC;AACjC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip/src/content.vue"],"sourcesContent":["<template>\n <el-teleport :disabled=\"!teleported\" :to=\"appendTo\">\n <transition\n v-if=\"shouldRender || !ariaHidden\"\n :name=\"transitionClass\"\n :appear=\"!persistentRef\"\n @after-leave=\"onTransitionLeave\"\n @before-enter=\"onBeforeEnter\"\n @after-enter=\"onAfterShow\"\n @before-leave=\"onBeforeLeave\"\n >\n <el-popper-content\n v-show=\"shouldShow\"\n :id=\"id\"\n ref=\"contentRef\"\n v-bind=\"$attrs\"\n :aria-label=\"ariaLabel\"\n :aria-hidden=\"ariaHidden\"\n :boundaries-padding=\"boundariesPadding\"\n :fallback-placements=\"fallbackPlacements\"\n :gpu-acceleration=\"gpuAcceleration\"\n :offset=\"offset\"\n :placement=\"placement\"\n :popper-options=\"popperOptions\"\n :arrow-offset=\"arrowOffset\"\n :strategy=\"strategy\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :pure=\"pure\"\n :popper-class=\"popperClass\"\n :popper-style=\"[popperStyle!, contentStyle]\"\n :reference-el=\"referenceEl\"\n :trigger-target-el=\"triggerTargetEl\"\n :visible=\"shouldShow\"\n :z-index=\"zIndex\"\n :loop=\"loop\"\n @mouseenter=\"onContentEnter\"\n @mouseleave=\"onContentLeave\"\n @blur=\"onBlur\"\n @close=\"onClose\"\n >\n <slot />\n </el-popper-content>\n </transition>\n </el-teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, ref, unref, watch } from 'vue'\nimport { computedEager, onClickOutside } from '@vueuse/core'\nimport { useNamespace, usePopperContainerId } from '@element-plus/hooks'\nimport {\n castArray,\n composeEventHandlers,\n focusElement,\n} from '@element-plus/utils'\nimport { ElPopperContent } from '@element-plus/components/popper'\nimport ElTeleport from '@element-plus/components/teleport'\nimport { TOOLTIP_INJECTION_KEY } from './constants'\nimport { useTooltipContentProps } from './content'\nimport { isTriggerType } from './utils'\n\nimport type { PopperContentInstance } from '@element-plus/components/popper'\n\ndefineOptions({\n name: 'ElTooltipContent',\n inheritAttrs: false,\n})\n\nconst props = defineProps(useTooltipContentProps)\n\nconst { selector } = usePopperContainerId()\nconst ns = useNamespace('tooltip')\n\nconst contentRef = ref<PopperContentInstance>()\nconst popperContentRef = computedEager(() => contentRef.value?.popperContentRef)\nlet stopHandle: ReturnType<typeof onClickOutside>\nconst {\n controlled,\n id,\n open,\n trigger,\n onClose,\n onOpen,\n onShow,\n onHide,\n onBeforeShow,\n onBeforeHide,\n} = inject(TOOLTIP_INJECTION_KEY, undefined)!\nconst transitionClass = computed(() => {\n return props.transition || `${ns.namespace.value}-fade-in-linear`\n})\nconst persistentRef = computed(() => {\n // For testing, we would always want the content to be rendered\n // to the DOM, so we need to return true here.\n if (process.env.NODE_ENV === 'test') {\n if (!process.env.RUN_TEST_WITH_PERSISTENT) {\n return true\n }\n }\n return props.persistent\n})\n\nonBeforeUnmount(() => {\n stopHandle?.()\n})\n\nconst shouldRender = computed(() => {\n return unref(persistentRef) ? true : unref(open)\n})\n\nconst shouldShow = computed(() => {\n return props.disabled ? false : unref(open)\n})\n\nconst appendTo = computed(() => {\n return props.appendTo || selector.value\n})\n\nconst contentStyle = computed(() => props.style ?? {})\n\nconst ariaHidden = ref(true)\n\nconst onTransitionLeave = () => {\n onHide()\n isFocusInsideContent() && focusElement(document.body, { preventScroll: true })\n ariaHidden.value = true\n}\n\nconst stopWhenControlled = () => {\n if (unref(controlled)) return true\n}\n\nconst onContentEnter = composeEventHandlers(stopWhenControlled, () => {\n if (props.enterable && isTriggerType(unref(trigger), 'hover')) {\n onOpen()\n }\n})\n\nconst onContentLeave = composeEventHandlers(stopWhenControlled, () => {\n if (isTriggerType(unref(trigger), 'hover')) {\n onClose()\n }\n})\n\nconst onBeforeEnter = () => {\n contentRef.value?.updatePopper?.()\n onBeforeShow?.()\n}\n\nconst onBeforeLeave = () => {\n onBeforeHide?.()\n}\n\nconst onAfterShow = () => {\n onShow()\n}\n\nconst onBlur = () => {\n if (!props.virtualTriggering) {\n onClose()\n }\n}\n\nconst isFocusInsideContent = (event?: FocusEvent) => {\n const popperContent: HTMLElement | undefined =\n contentRef.value?.popperContentRef\n const activeElement = (event?.relatedTarget as Node) || document.activeElement\n\n return popperContent?.contains(activeElement)\n}\n\nwatch(\n () => unref(open),\n (val) => {\n if (!val) {\n stopHandle?.()\n } else {\n ariaHidden.value = false\n stopHandle = onClickOutside(\n popperContentRef,\n () => {\n if (unref(controlled)) return\n const needClose = castArray(unref(trigger)).every((item) => {\n return item !== 'hover' && item !== 'focus'\n })\n if (needClose) {\n onClose()\n }\n },\n { detectIframe: true }\n )\n }\n },\n {\n flush: 'post',\n }\n)\n\nwatch(\n () => props.content,\n () => {\n contentRef.value?.updatePopper?.()\n }\n)\n\ndefineExpose({\n /**\n * @description el-popper-content component instance\n */\n contentRef,\n /**\n * @description validate current focus event is trigger inside el-popper-content\n */\n isFocusInsideContent,\n})\n</script>\n"],"names":["_openBlock","_createBlock","_unref","_withCtx"],"mappings":";;;;;;;;;;;;;;;mCAgEc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,oBAAqB,EAAA,CAAA;AAC1C,IAAM,MA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A,IAIX,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAAA,OAAAA,SAAA,EAAA,EAAAC,WAAA,CAAAC,KAAA,CAAA,UAAA,CAAA,EAAA;AAAA,QAAA,QAAA,EAAA,CAAA,IAAA,CAAA,UAAA;AAAA,QAAA,EAAA,EAAAA,KAAA,CAAA,QAAA,CAAA;AAAA,OAIA,EAAA;AAAA,QACD,OAAA,EAAAC,OAAA,CAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useTooltipContentProps } from './
|
|
1
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
2
2
|
import { useTooltipTriggerProps } from './trigger.mjs';
|
|
3
|
-
import { popperProps } from '../../popper/src/
|
|
3
|
+
import { popperProps } from '../../popper/src/popper2.mjs';
|
|
4
4
|
import { popperArrowProps } from '../../popper/src/arrow.mjs';
|
|
5
5
|
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
|
6
6
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
@@ -3,7 +3,7 @@ import { ElPopper } from '../../popper/index.mjs';
|
|
|
3
3
|
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
4
4
|
import { useTooltipProps, tooltipEmits, useTooltipModelToggle } from './tooltip.mjs';
|
|
5
5
|
import ElTooltipTrigger from './trigger2.mjs';
|
|
6
|
-
import ElTooltipContent from './
|
|
6
|
+
import ElTooltipContent from './content2.mjs';
|
|
7
7
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
8
|
import { usePopperContainer } from '../../../hooks/use-popper-container/index.mjs';
|
|
9
9
|
import { useDelayedToggle } from '../../../hooks/use-delayed-toggle/index.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Tour from './src/tour.mjs';
|
|
2
|
-
import TourStep from './src/
|
|
2
|
+
import TourStep from './src/step.mjs';
|
|
3
3
|
export { tourEmits, tourProps } from './src/tour2.mjs';
|
|
4
|
-
export { tourStepEmits, tourStepProps } from './src/
|
|
5
|
-
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/
|
|
4
|
+
export { tourStepEmits, tourStepProps } from './src/step2.mjs';
|
|
5
|
+
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/content.mjs';
|
|
6
6
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
7
7
|
|
|
8
8
|
const ElTour = withInstall(Tour, {
|
|
@@ -1,72 +1,48 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
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=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.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } 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 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>\nexport type TourContentPropsPublic = __ExtractPublicPropTypes<\n typeof tourContentProps\n>\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,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 './content.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=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.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\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":";;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,SAAA,GAAY,GAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAW,GAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACnC,IAAM,MAAA,UAAA,GAAa,IAAwB,IAAI,CAAA,CAAA;AAC/C,IAAM,MAAA,QAAA,GAAW,IAAwB,IAAI,CAAA,CAAA;AAE7C,IAAA,KAAA,CAAA,MAAA,KAAA,CAAA,SAAA,EAAA,MAAA;AAAA,MACE,SAAY,CAAA,KAAA,GAAA,KAAA,CAAA,SAAA,CAAA;AAAA,KAAA,CACZ,CAAM;AACJ,IAAA,MAAA,EAAA,cAAkB,UAAM,EAAA,GAAA,WAAA,CAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,QAAA,CAAA,EAAA,KAAA,CAAA,KAAA,EAAA,WAAA,CAAA,CAAA,CAAA;AAAA,IAC1B,MAAA,IAAA,GAAA,QAAA,CAAA,MAAA;AAAA,MACF,OAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAEA,KAAM,CAAA,CAAA;AAA+B,IACnC,MAAA,EAAM,OAAO,MAAW,CAAA,OAAA,CAAA,CAAA;AAAA,IACxB,MAAA,gBAAA,GAAA,MAAA;AAAA,MACA,IAAA,CAAA,OAAA,CAAA,CAAA;AAAA,KACA,CAAA;AAAA,IACA,MAAA,mBAAA,G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