@element-plus/nightly 0.0.20251023 → 0.0.20251025
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.full.js +6 -6
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +6 -6
- 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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +129 -24
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +24 -129
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +40 -207
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +207 -40
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +4 -4
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel.mjs +61 -212
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +212 -61
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/basic-date-table.mjs +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/basic-date-table.mjs.map +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +26 -127
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +127 -26
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/dialog/index.mjs +2 -2
- package/es/components/dialog/src/dialog.mjs +174 -74
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog2.mjs +74 -174
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +27 -198
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +198 -27
- 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-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/index.mjs +15 -15
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +73 -147
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +147 -73
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- 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 +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +5 -65
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +65 -5
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +83 -256
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +256 -83
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/select/src/useSelect.mjs +2 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +224 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -224
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +16 -85
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +85 -16
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +3 -2
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/mask.mjs +18 -76
- package/es/components/tour/src/mask.mjs.map +1 -1
- package/es/components/tour/src/mask2.mjs +76 -18
- package/es/components/tour/src/mask2.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/tour2.mjs +1 -1
- package/es/components/tree/index.mjs +2 -2
- package/es/components/tree/src/tree.mjs +17 -336
- package/es/components/tree/src/tree.mjs.map +1 -1
- package/es/components/tree/src/tree2.mjs +336 -17
- package/es/components/tree/src/tree2.mjs.map +1 -1
- package/es/index.mjs +15 -15
- 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 +129 -25
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +25 -129
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +40 -206
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +206 -40
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +4 -4
- package/lib/components/breadcrumb/src/breadcrumb-item.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel.js +62 -212
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +212 -62
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/basic-date-table.js +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/basic-date-table.js.map +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +26 -127
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +127 -26
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/dialog/index.js +2 -2
- package/lib/components/dialog/src/dialog.js +174 -76
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog2.js +76 -174
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +28 -198
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +198 -28
- 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-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/index.js +15 -15
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +74 -146
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +146 -74
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- 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 +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +5 -65
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +65 -5
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +83 -255
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +255 -83
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/select/src/useSelect.js +1 -1
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +223 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -223
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +16 -85
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +85 -16
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +3 -2
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/mask.js +18 -76
- package/lib/components/tour/src/mask.js.map +1 -1
- package/lib/components/tour/src/mask2.js +76 -18
- package/lib/components/tour/src/mask2.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/tour2.js +1 -1
- package/lib/components/tree/index.js +2 -2
- package/lib/components/tree/src/tree.js +17 -336
- package/lib/components/tree/src/tree.js.map +1 -1
- package/lib/components/tree/src/tree2.js +336 -17
- package/lib/components/tree/src/tree2.js.map +1 -1
- package/lib/index.js +15 -15
- 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/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-pane2.js","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
|
1
|
+
{"version":3,"file":"tab-pane2.js","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n ref=\"paneRef\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onBeforeUnmount,\n onBeforeUpdate,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst slots = useSlots()\n\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <el-tabs><el-tab-pane /></el-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst paneRef = ref<HTMLDivElement>()\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable ?? tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nconst isFocusInsidePane = () => {\n return paneRef.value?.contains(document.activeElement)\n}\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n getVnode: () => instance.vnode,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n isFocusInsidePane,\n})\n\ntabsRoot.registerPane(pane)\n\nonBeforeUnmount(() => {\n tabsRoot.unregisterPane(pane)\n})\n\nonBeforeUpdate(() => {\n if (slots.label) tabsRoot.nav$.value?.scheduleRender()\n})\n</script>\n"],"names":["getCurrentInstance","useSlots","inject","tabsRootContextKey","throwError","useNamespace","ref","index","computed","eagerComputed","watch","reactive"],"mappings":";;;;;;;;;;;;;uCAkCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;AAGA,IAAA,MAAM,WAAWA,sBAAmB,EAAA,CAAA;AACpC,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,QAAA,GAAWC,WAAOC,4BAAkB,CAAA,CAAA;AAC1C,IAAA,IAAI,CAAC,QAAA;AACH,MAAAC,gBAAA,CAAW,gBAAgB,4CA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;AAAA,KACd,CAAA;AAAyB,IACzBC,SAAA,CAAA,MAAA,EAAA,CAAA,GAAA,KAAA;AAAA,MACA,IAAA,GAAA;AAAA,QACA,MAAA,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,MAAA,IAAA,GAAAC,YAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,GAAA;AAAA,MACA,QAAA,EAAA,MAAA,QAAA,CAAA,KAAA;AAAA,MACD,KAAA;AAED,MAAA,KAAA;AAEA,MAAA,QAAA;AACE,MAAA,MAAA;AAA4B,aAC7BJ,OAAA;AAED,MAAA,UAAA;AACE,MAAA,iBAA0B;AAA2B,KACtD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,6 +8,7 @@ require('../../popper/index.js');
|
|
|
8
8
|
var index$2 = require('../../teleport/index.js');
|
|
9
9
|
var constants = require('./constants.js');
|
|
10
10
|
var content = require('./content.js');
|
|
11
|
+
var utils = require('./utils.js');
|
|
11
12
|
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
13
|
var index = require('../../../hooks/use-popper-container/index.js');
|
|
13
14
|
var arrays = require('../../../utils/arrays.js');
|
|
@@ -78,12 +79,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
79
|
return true;
|
|
79
80
|
};
|
|
80
81
|
const onContentEnter = event.composeEventHandlers(stopWhenControlled, () => {
|
|
81
|
-
if (props.enterable && vue.unref(trigger)
|
|
82
|
+
if (props.enterable && utils.isTriggerType(vue.unref(trigger), "hover")) {
|
|
82
83
|
onOpen();
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
const onContentLeave = event.composeEventHandlers(stopWhenControlled, () => {
|
|
86
|
-
if (vue.unref(trigger)
|
|
87
|
+
if (utils.isTriggerType(vue.unref(trigger), "hover")) {
|
|
87
88
|
onClose();
|
|
88
89
|
}
|
|
89
90
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.js","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'\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 && unref(trigger) === 'hover') {\n onOpen()\n }\n})\n\nconst onContentLeave = composeEventHandlers(stopWhenControlled, () => {\n if (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":["usePopperContainerId","useNamespace","ref","computedEager","inject","TOOLTIP_INJECTION_KEY","computed","onBeforeUnmount","unref","focusElement","composeEventHandlers","watch","onClickOutside","castArray","_openBlock","_createBlock","_unref","ElTeleport","_withCtx"],"mappings":";;;;;;;;;;;;;;;;;;uCA+Dc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,QAAS,EAAA,GAAIA,0BAAqB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAA,GAAKC,qBAAa,SAAS,CAAA,CAAA;AAEjC,IAAA,MAAM,aAAaC,OAA2B,EAAA,CAAA;AAC9C,IAAA,MAAM,gBAAmB,GAAAC,kBAAA,CAAc,MAAM;AAC7C,MAAI,IAAA,EAAA,CAAA;AACJ,MAAM,OAAA,CAAA,EAAA,GAAA,UAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,gBA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AAK,gBAAA,CAAAL,SAAA,CAAA,OAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,IAAA,KAAA;AAAA,YACA,gBAAgB,OAAK,IAAA,IAAA,KAAA,OAAA,CAAA;AAAA,WACvB,CAAA,CAAA;AAAA,UACF,IAAA,SAAA,EAAA;AAAA,YACF,OAAA,EAAA,CAAA;AAAA,WACA;AAAA,SACS,EAAA,EAAA,YAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAAA,OACT;AAAA,KACF,EAAA;AAEA,MAAA,KAAA,EAAA,MAAA;AAAA,KAAA,CACE;AAAY,IAAAG,SACN,CAAA,MAAA,KAAA,CAAA,OAAA,EAAA,MAAA;AACJ,MAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAAiC,MACnC,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,UAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KACF,CAAA,CAAA;AAEA,IAAa,MAAA,CAAA;AAAA,MAAA,UAAA;AAAA,MAAA,oBAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAIX,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAAA,OAAAG,aAAA,EAAA,EAAAC,eAAA,CAAAC,SAAA,CAAAC,kBAAA,CAAA,EAAA;AAAA,QAAA,QAAA,EAAA,CAAA,IAAA,CAAA,UAAA;AAAA,QAAA,EAAA,EAAAD,SAAA,CAAA,QAAA,CAAA;AAAA,OAIA,EAAA;AAAA,QACD,OAAA,EAAAE,WAAA,CAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"content2.js","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":["usePopperContainerId","useNamespace","ref","computedEager","inject","TOOLTIP_INJECTION_KEY","computed","onBeforeUnmount","unref","focusElement","composeEventHandlers","isTriggerType","watch","onClickOutside","castArray","_openBlock","_createBlock","_unref","ElTeleport","_withCtx"],"mappings":";;;;;;;;;;;;;;;;;;;uCAgEc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,QAAS,EAAA,GAAIA,0BAAqB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAA,GAAKC,qBAAa,SAAS,CAAA,CAAA;AAEjC,IAAA,MAAM,aAAaC,OAA2B,EAAA,CAAA;AAC9C,IAAA,MAAM,gBAAmB,GAAAC,kBAAA,CAAc,MAAM;AAC7C,MAAI,IAAA,EAAA,CAAA;AACJ,MAAM,OAAA,CAAA,EAAA,GAAA,UAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,gBAAA,CAAA;AAAA,KACJ,CAAA,CAAA;AAAA,IACA,IAAA,UAAA,CAAA;AAA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|
|
6
|
-
var step$1 = require('./src/
|
|
6
|
+
var step$1 = require('./src/step.js');
|
|
7
7
|
var tour = require('./src/tour.js');
|
|
8
|
-
var step = require('./src/
|
|
8
|
+
var step = require('./src/step2.js');
|
|
9
9
|
var content = require('./src/content2.js');
|
|
10
10
|
var install = require('../../utils/vue/install.js');
|
|
11
11
|
|
|
@@ -2,84 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
|
-
var mask = require('./mask2.js');
|
|
8
|
-
var helper = require('./helper.js');
|
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
-
var index = require('../../../hooks/use-lockscreen/index.js');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
11
6
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const baseInfo = `a${v},${v} 0 0 1`;
|
|
29
|
-
return {
|
|
30
|
-
topRight: `${baseInfo} ${v},${v}`,
|
|
31
|
-
bottomRight: `${baseInfo} ${-v},${v}`,
|
|
32
|
-
bottomLeft: `${baseInfo} ${-v},${-v}`,
|
|
33
|
-
topLeft: `${baseInfo} ${v},${-v}`
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
const { width: windowWidth, height: windowHeight } = core.useWindowSize();
|
|
37
|
-
const path = vue.computed(() => {
|
|
38
|
-
const width = windowWidth.value;
|
|
39
|
-
const height = windowHeight.value;
|
|
40
|
-
const info = roundInfo.value;
|
|
41
|
-
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
|
|
42
|
-
const _radius = radius.value;
|
|
43
|
-
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;
|
|
44
|
-
});
|
|
45
|
-
const maskStyle = vue.computed(() => ({
|
|
46
|
-
position: "fixed",
|
|
47
|
-
left: 0,
|
|
48
|
-
right: 0,
|
|
49
|
-
top: 0,
|
|
50
|
-
bottom: 0,
|
|
51
|
-
zIndex: props.zIndex,
|
|
52
|
-
pointerEvents: props.pos && props.targetAreaClickable ? "none" : "auto"
|
|
53
|
-
}));
|
|
54
|
-
const pathStyle = vue.computed(() => ({
|
|
55
|
-
fill: props.fill,
|
|
56
|
-
pointerEvents: "auto",
|
|
57
|
-
cursor: "auto"
|
|
58
|
-
}));
|
|
59
|
-
index.useLockscreen(vue.toRef(props, "visible"), {
|
|
60
|
-
ns
|
|
61
|
-
});
|
|
62
|
-
return (_ctx, _cache) => {
|
|
63
|
-
return _ctx.visible ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
64
|
-
key: 0,
|
|
65
|
-
class: vue.unref(ns).e("mask"),
|
|
66
|
-
style: vue.unref(maskStyle)
|
|
67
|
-
}, _ctx.$attrs), [
|
|
68
|
-
(vue.openBlock(), vue.createElementBlock("svg", { style: {
|
|
69
|
-
width: "100%",
|
|
70
|
-
height: "100%"
|
|
71
|
-
} }, [
|
|
72
|
-
vue.createElementVNode("path", {
|
|
73
|
-
class: vue.normalizeClass(vue.unref(ns).e("hollow")),
|
|
74
|
-
style: vue.normalizeStyle(vue.unref(pathStyle)),
|
|
75
|
-
d: vue.unref(path)
|
|
76
|
-
}, null, 14, ["d"])
|
|
77
|
-
]))
|
|
78
|
-
], 16)) : vue.createCommentVNode("v-if", true);
|
|
79
|
-
};
|
|
7
|
+
const maskProps = runtime.buildProps({
|
|
8
|
+
zIndex: {
|
|
9
|
+
type: Number,
|
|
10
|
+
default: 1001
|
|
11
|
+
},
|
|
12
|
+
visible: Boolean,
|
|
13
|
+
fill: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "rgba(0,0,0,0.5)"
|
|
16
|
+
},
|
|
17
|
+
pos: {
|
|
18
|
+
type: runtime.definePropType(Object)
|
|
19
|
+
},
|
|
20
|
+
targetAreaClickable: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: true
|
|
80
23
|
}
|
|
81
24
|
});
|
|
82
|
-
var ElTourMask = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "mask.vue"]]);
|
|
83
25
|
|
|
84
|
-
exports
|
|
26
|
+
exports.maskProps = maskProps;
|
|
85
27
|
//# sourceMappingURL=mask.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask.js","sources":["../../../../../../packages/components/tour/src/mask.
|
|
1
|
+
{"version":3,"file":"mask.js","sources":["../../../../../../packages/components/tour/src/mask.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type { PosInfo } from './types'\n\nexport const maskProps = buildProps({\n /**\n * @description mask's zIndex\n */\n zIndex: {\n type: Number,\n default: 1001,\n },\n /**\n * @description whether to show the mask\n */\n visible: Boolean,\n /**\n * @description mask's fill\n */\n fill: {\n type: String,\n default: 'rgba(0,0,0,0.5)',\n },\n /***\n * @description mask's transparent space position\n */\n pos: {\n type: definePropType<PosInfo | null>(Object),\n },\n /**\n * @description whether the target element can be clickable, when using mask\n */\n targetAreaClickable: {\n type: Boolean,\n default: true,\n },\n})\n\nexport type MaskProps = ExtractPropTypes<typeof maskProps>\nexport type MaskPropsPublic = __ExtractPublicPropTypes<typeof maskProps>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;AACY,MAAC,SAAS,GAAGA,kBAAU,CAAC;AACpC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,iBAAiB;AAC9B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE;AACvB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -2,26 +2,84 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var core = require('@vueuse/core');
|
|
7
|
+
var mask = require('./mask.js');
|
|
8
|
+
var helper = require('./helper.js');
|
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
10
|
+
var index = require('../../../hooks/use-lockscreen/index.js');
|
|
6
11
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
const __default__ = vue.defineComponent({
|
|
13
|
+
name: "ElTourMask",
|
|
14
|
+
inheritAttrs: false
|
|
15
|
+
});
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: mask.maskProps,
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const { ns } = vue.inject(helper.tourKey);
|
|
22
|
+
const radius = vue.computed(() => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
return (_b = (_a = props.pos) == null ? void 0 : _a.radius) != null ? _b : 2;
|
|
25
|
+
});
|
|
26
|
+
const roundInfo = vue.computed(() => {
|
|
27
|
+
const v = radius.value;
|
|
28
|
+
const baseInfo = `a${v},${v} 0 0 1`;
|
|
29
|
+
return {
|
|
30
|
+
topRight: `${baseInfo} ${v},${v}`,
|
|
31
|
+
bottomRight: `${baseInfo} ${-v},${v}`,
|
|
32
|
+
bottomLeft: `${baseInfo} ${-v},${-v}`,
|
|
33
|
+
topLeft: `${baseInfo} ${v},${-v}`
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
const { width: windowWidth, height: windowHeight } = core.useWindowSize();
|
|
37
|
+
const path = vue.computed(() => {
|
|
38
|
+
const width = windowWidth.value;
|
|
39
|
+
const height = windowHeight.value;
|
|
40
|
+
const info = roundInfo.value;
|
|
41
|
+
const _path = `M${width},0 L0,0 L0,${height} L${width},${height} L${width},0 Z`;
|
|
42
|
+
const _radius = radius.value;
|
|
43
|
+
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;
|
|
44
|
+
});
|
|
45
|
+
const maskStyle = vue.computed(() => ({
|
|
46
|
+
position: "fixed",
|
|
47
|
+
left: 0,
|
|
48
|
+
right: 0,
|
|
49
|
+
top: 0,
|
|
50
|
+
bottom: 0,
|
|
51
|
+
zIndex: props.zIndex,
|
|
52
|
+
pointerEvents: props.pos && props.targetAreaClickable ? "none" : "auto"
|
|
53
|
+
}));
|
|
54
|
+
const pathStyle = vue.computed(() => ({
|
|
55
|
+
fill: props.fill,
|
|
56
|
+
pointerEvents: "auto",
|
|
57
|
+
cursor: "auto"
|
|
58
|
+
}));
|
|
59
|
+
index.useLockscreen(vue.toRef(props, "visible"), {
|
|
60
|
+
ns
|
|
61
|
+
});
|
|
62
|
+
return (_ctx, _cache) => {
|
|
63
|
+
return _ctx.visible ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
64
|
+
key: 0,
|
|
65
|
+
class: vue.unref(ns).e("mask"),
|
|
66
|
+
style: vue.unref(maskStyle)
|
|
67
|
+
}, _ctx.$attrs), [
|
|
68
|
+
(vue.openBlock(), vue.createElementBlock("svg", { style: {
|
|
69
|
+
width: "100%",
|
|
70
|
+
height: "100%"
|
|
71
|
+
} }, [
|
|
72
|
+
vue.createElementVNode("path", {
|
|
73
|
+
class: vue.normalizeClass(vue.unref(ns).e("hollow")),
|
|
74
|
+
style: vue.normalizeStyle(vue.unref(pathStyle)),
|
|
75
|
+
d: vue.unref(path)
|
|
76
|
+
}, null, 14, ["d"])
|
|
77
|
+
]))
|
|
78
|
+
], 16)) : vue.createCommentVNode("v-if", true);
|
|
79
|
+
};
|
|
23
80
|
}
|
|
24
81
|
});
|
|
82
|
+
var ElTourMask = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "mask.vue"]]);
|
|
25
83
|
|
|
26
|
-
exports
|
|
84
|
+
exports["default"] = ElTourMask;
|
|
27
85
|
//# sourceMappingURL=mask2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask2.js","sources":["../../../../../../packages/components/tour/src/mask.
|
|
1
|
+
{"version":3,"file":"mask2.js","sources":["../../../../../../packages/components/tour/src/mask.vue"],"sourcesContent":["<template>\n <div v-if=\"visible\" :class=\"ns.e('mask')\" :style=\"maskStyle\" v-bind=\"$attrs\">\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 { useWindowSize } from '@vueuse/core'\nimport { maskProps } from './mask'\nimport { tourKey } from './helper'\n\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 { width: windowWidth, height: windowHeight } = useWindowSize()\n\nconst path = computed(() => {\n const width = windowWidth.value\n const height = windowHeight.value\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 maskStyle = computed<CSSProperties>(() => ({\n position: 'fixed',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n zIndex: props.zIndex,\n pointerEvents: props.pos && props.targetAreaClickable ? 'none' : 'auto',\n}))\n\nconst pathStyle = computed<CSSProperties>(() => ({\n fill: props.fill,\n pointerEvents: 'auto',\n cursor: 'auto',\n}))\n\nuseLockscreen(toRef(props, 'visible'), {\n ns,\n})\n</script>\n"],"names":["inject","tourKey","computed","useWindowSize"],"mappings":";;;;;;;;;;;uCAsBc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAAA,UAAA,CAAOC,cAAO,CAAA,CAAA;AAC7B,IAAA,MAAM,SAASC,YA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AAc,aAAA,EAAA,MAAa;AAAY,MACrC,MAAA,EAAA,MAAA;AAAA,KACD,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,53 +2,200 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var lodashUnified = require('lodash-unified');
|
|
7
|
+
var index$2 = require('../../button/index.js');
|
|
8
|
+
var index$1 = require('../../icon/index.js');
|
|
9
|
+
var step = require('./step2.js');
|
|
10
|
+
var helper = require('./helper.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var index = require('../../../hooks/use-locale/index.js');
|
|
7
13
|
var icon = require('../../../utils/vue/icon.js');
|
|
14
|
+
var event = require('../../../utils/dom/event.js');
|
|
15
|
+
var aria = require('../../../constants/aria.js');
|
|
8
16
|
|
|
9
|
-
const
|
|
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
|
-
|
|
17
|
+
const __default__ = vue.defineComponent({
|
|
18
|
+
name: "ElTourStep"
|
|
19
|
+
});
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: step.tourStepProps,
|
|
23
|
+
emits: step.tourStepEmits,
|
|
24
|
+
setup(__props, { emit }) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const { Close } = icon.CloseComponents;
|
|
27
|
+
const { t } = index.useLocale();
|
|
28
|
+
const {
|
|
29
|
+
currentStep,
|
|
30
|
+
current,
|
|
31
|
+
total,
|
|
32
|
+
showClose,
|
|
33
|
+
closeIcon,
|
|
34
|
+
mergedType,
|
|
35
|
+
ns,
|
|
36
|
+
slots: tourSlots,
|
|
37
|
+
updateModelValue,
|
|
38
|
+
onClose: tourOnClose,
|
|
39
|
+
onFinish: tourOnFinish,
|
|
40
|
+
onChange
|
|
41
|
+
} = vue.inject(helper.tourKey);
|
|
42
|
+
vue.watch(props, (val) => {
|
|
43
|
+
currentStep.value = val;
|
|
44
|
+
}, {
|
|
45
|
+
immediate: true
|
|
46
|
+
});
|
|
47
|
+
const mergedShowClose = vue.computed(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
return (_a = props.showClose) != null ? _a : showClose.value;
|
|
50
|
+
});
|
|
51
|
+
const mergedCloseIcon = vue.computed(() => {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
return (_b = (_a = props.closeIcon) != null ? _a : closeIcon.value) != null ? _b : Close;
|
|
54
|
+
});
|
|
55
|
+
const filterButtonProps = (btnProps) => {
|
|
56
|
+
if (!btnProps)
|
|
57
|
+
return;
|
|
58
|
+
return lodashUnified.omit(btnProps, ["children", "onClick"]);
|
|
59
|
+
};
|
|
60
|
+
const onPrev = () => {
|
|
61
|
+
var _a, _b;
|
|
62
|
+
current.value -= 1;
|
|
63
|
+
if ((_a = props.prevButtonProps) == null ? void 0 : _a.onClick) {
|
|
64
|
+
(_b = props.prevButtonProps) == null ? void 0 : _b.onClick();
|
|
65
|
+
}
|
|
66
|
+
onChange();
|
|
67
|
+
};
|
|
68
|
+
const onNext = () => {
|
|
69
|
+
var _a;
|
|
70
|
+
if (current.value >= total.value - 1) {
|
|
71
|
+
onFinish();
|
|
72
|
+
} else {
|
|
73
|
+
current.value += 1;
|
|
74
|
+
}
|
|
75
|
+
if ((_a = props.nextButtonProps) == null ? void 0 : _a.onClick) {
|
|
76
|
+
props.nextButtonProps.onClick();
|
|
77
|
+
}
|
|
78
|
+
onChange();
|
|
79
|
+
};
|
|
80
|
+
const onFinish = () => {
|
|
81
|
+
onClose();
|
|
82
|
+
tourOnFinish();
|
|
83
|
+
};
|
|
84
|
+
const onClose = () => {
|
|
85
|
+
updateModelValue(false);
|
|
86
|
+
tourOnClose();
|
|
87
|
+
emit("close");
|
|
88
|
+
};
|
|
89
|
+
const handleKeydown = (e) => {
|
|
90
|
+
const target = e.target;
|
|
91
|
+
if (target == null ? void 0 : target.isContentEditable)
|
|
92
|
+
return;
|
|
93
|
+
const code = event.getEventCode(e);
|
|
94
|
+
switch (code) {
|
|
95
|
+
case aria.EVENT_CODE.left:
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
current.value > 0 && onPrev();
|
|
98
|
+
break;
|
|
99
|
+
case aria.EVENT_CODE.right:
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
onNext();
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
vue.onMounted(() => {
|
|
106
|
+
window.addEventListener("keydown", handleKeydown);
|
|
107
|
+
});
|
|
108
|
+
vue.onBeforeUnmount(() => {
|
|
109
|
+
window.removeEventListener("keydown", handleKeydown);
|
|
110
|
+
});
|
|
111
|
+
return (_ctx, _cache) => {
|
|
112
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
113
|
+
vue.unref(mergedShowClose) ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
114
|
+
key: 0,
|
|
115
|
+
"aria-label": vue.unref(t)("el.tour.close"),
|
|
116
|
+
class: vue.normalizeClass(vue.unref(ns).e("closebtn")),
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: onClose
|
|
119
|
+
}, [
|
|
120
|
+
vue.createVNode(vue.unref(index$1.ElIcon), {
|
|
121
|
+
class: vue.normalizeClass(vue.unref(ns).e("close"))
|
|
122
|
+
}, {
|
|
123
|
+
default: vue.withCtx(() => [
|
|
124
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(mergedCloseIcon))))
|
|
125
|
+
]),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["class"])
|
|
128
|
+
], 10, ["aria-label"])) : vue.createCommentVNode("v-if", true),
|
|
129
|
+
vue.createElementVNode("header", {
|
|
130
|
+
class: vue.normalizeClass([vue.unref(ns).e("header"), { "show-close": vue.unref(showClose) }])
|
|
131
|
+
}, [
|
|
132
|
+
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
133
|
+
vue.createElementVNode("span", {
|
|
134
|
+
role: "heading",
|
|
135
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
136
|
+
}, vue.toDisplayString(_ctx.title), 3)
|
|
137
|
+
])
|
|
138
|
+
], 2),
|
|
139
|
+
vue.createElementVNode("div", {
|
|
140
|
+
class: vue.normalizeClass(vue.unref(ns).e("body"))
|
|
141
|
+
}, [
|
|
142
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
143
|
+
vue.createElementVNode("span", null, vue.toDisplayString(_ctx.description), 1)
|
|
144
|
+
])
|
|
145
|
+
], 2),
|
|
146
|
+
vue.createElementVNode("footer", {
|
|
147
|
+
class: vue.normalizeClass(vue.unref(ns).e("footer"))
|
|
148
|
+
}, [
|
|
149
|
+
vue.createElementVNode("div", {
|
|
150
|
+
class: vue.normalizeClass(vue.unref(ns).b("indicators"))
|
|
151
|
+
}, [
|
|
152
|
+
vue.unref(tourSlots).indicators ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(tourSlots).indicators), {
|
|
153
|
+
key: 0,
|
|
154
|
+
current: vue.unref(current),
|
|
155
|
+
total: vue.unref(total)
|
|
156
|
+
}, null, 8, ["current", "total"])) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(vue.unref(total), (item, index) => {
|
|
157
|
+
return vue.openBlock(), vue.createElementBlock("span", {
|
|
158
|
+
key: item,
|
|
159
|
+
class: vue.normalizeClass([vue.unref(ns).b("indicator"), vue.unref(ns).is("active", index === vue.unref(current))])
|
|
160
|
+
}, null, 2);
|
|
161
|
+
}), 128))
|
|
162
|
+
], 2),
|
|
163
|
+
vue.createElementVNode("div", {
|
|
164
|
+
class: vue.normalizeClass(vue.unref(ns).b("buttons"))
|
|
165
|
+
}, [
|
|
166
|
+
vue.unref(current) > 0 ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElButton), vue.mergeProps({
|
|
167
|
+
key: 0,
|
|
168
|
+
size: "small",
|
|
169
|
+
type: vue.unref(mergedType)
|
|
170
|
+
}, filterButtonProps(_ctx.prevButtonProps), { onClick: onPrev }), {
|
|
171
|
+
default: vue.withCtx(() => {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
return [
|
|
174
|
+
vue.createTextVNode(vue.toDisplayString((_b = (_a = _ctx.prevButtonProps) == null ? void 0 : _a.children) != null ? _b : vue.unref(t)("el.tour.previous")), 1)
|
|
175
|
+
];
|
|
176
|
+
}),
|
|
177
|
+
_: 1
|
|
178
|
+
}, 16, ["type"])) : vue.createCommentVNode("v-if", true),
|
|
179
|
+
vue.unref(current) <= vue.unref(total) - 1 ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.ElButton), vue.mergeProps({
|
|
180
|
+
key: 1,
|
|
181
|
+
size: "small",
|
|
182
|
+
type: vue.unref(mergedType) === "primary" ? "default" : "primary"
|
|
183
|
+
}, filterButtonProps(_ctx.nextButtonProps), { onClick: onNext }), {
|
|
184
|
+
default: vue.withCtx(() => {
|
|
185
|
+
var _a, _b;
|
|
186
|
+
return [
|
|
187
|
+
vue.createTextVNode(vue.toDisplayString((_b = (_a = _ctx.nextButtonProps) == null ? void 0 : _a.children) != null ? _b : vue.unref(current) === vue.unref(total) - 1 ? vue.unref(t)("el.tour.finish") : vue.unref(t)("el.tour.next")), 1)
|
|
188
|
+
];
|
|
189
|
+
}),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 16, ["type"])) : vue.createCommentVNode("v-if", true)
|
|
192
|
+
], 2)
|
|
193
|
+
], 2)
|
|
194
|
+
], 64);
|
|
195
|
+
};
|
|
46
196
|
}
|
|
47
197
|
});
|
|
48
|
-
|
|
49
|
-
close: () => true
|
|
50
|
-
};
|
|
198
|
+
var TourStep = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "step.vue"]]);
|
|
51
199
|
|
|
52
|
-
exports
|
|
53
|
-
exports.tourStepProps = tourStepProps;
|
|
200
|
+
exports["default"] = TourStep;
|
|
54
201
|
//# sourceMappingURL=step.js.map
|