@element-plus/nightly 0.0.20251202 → 0.0.20251204
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 +15 -3
- package/dist/index.full.min.js +9 -9
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +9 -9
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +15 -3
- 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/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +69 -7
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +7 -69
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +63 -111
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +111 -63
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +38 -89
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +89 -38
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/focus-trap/src/focus-trap.mjs +2 -0
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -35
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +35 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +13 -13
- 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/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +16 -97
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +97 -16
- package/es/components/page-header/src/page-header2.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/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 +2 -2
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/composables/use-content.mjs +4 -1
- package/es/components/popper/src/composables/use-content.mjs.map +1 -1
- package/es/components/popper/src/composables/use-focus-trap.mjs +4 -1
- package/es/components/popper/src/composables/use-focus-trap.mjs.map +1 -1
- package/es/components/popper/src/content.mjs +132 -89
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +89 -131
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +30 -62
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +62 -30
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/row/index.mjs +2 -2
- package/es/components/row/src/row.mjs +28 -44
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row2.mjs +44 -28
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/table/src/store/tree.mjs +1 -1
- package/es/components/table/src/store/tree.mjs.map +1 -1
- package/es/components/tabs/index.mjs +3 -3
- package/es/components/tabs/src/tab-bar.mjs +11 -92
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +92 -11
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- 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/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +4 -1
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +154 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -154
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +130 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -130
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/index.mjs +13 -13
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +69 -7
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +7 -69
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +1 -1
- package/lib/components/checkbox/src/checkbox.js +64 -111
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +111 -64
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +38 -88
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +88 -38
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/focus-trap/src/focus-trap.js +2 -0
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -35
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +35 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +13 -13
- 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/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +17 -97
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +97 -17
- package/lib/components/page-header/src/page-header2.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/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 +2 -2
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/composables/use-content.js +3 -0
- package/lib/components/popper/src/composables/use-content.js.map +1 -1
- package/lib/components/popper/src/composables/use-focus-trap.js +3 -0
- package/lib/components/popper/src/composables/use-focus-trap.js.map +1 -1
- package/lib/components/popper/src/content.js +132 -94
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +94 -131
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +32 -62
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +62 -32
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/row/index.js +2 -2
- package/lib/components/row/src/row.js +30 -44
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row2.js +44 -30
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/table/src/store/tree.js +1 -1
- package/lib/components/table/src/store/tree.js.map +1 -1
- package/lib/components/tabs/index.js +3 -3
- package/lib/components/tabs/src/tab-bar.js +11 -92
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +92 -11
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- 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/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +3 -0
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +153 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +69 -153
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +130 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -130
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/index.js +13 -13
- 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/theme-chalk/el-tabs.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/tabs.scss +8 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes.mjs","sources":["../../../../../../../packages/components/pagination/src/components/sizes.
|
|
1
|
+
{"version":3,"file":"sizes.mjs","sources":["../../../../../../../packages/components/pagination/src/components/sizes.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('sizes')\">\n <el-select\n :model-value=\"innerPageSize\"\n :disabled=\"disabled\"\n :popper-class=\"popperClass\"\n :popper-style=\"popperStyle\"\n :size=\"size\"\n :teleported=\"teleported\"\n :validate-event=\"false\"\n :append-to=\"appendSizeTo\"\n @change=\"handleChange\"\n >\n <el-option\n v-for=\"item in innerPageSizes\"\n :key=\"item\"\n :value=\"item\"\n :label=\"item + t('el.pagination.pagesize')\"\n />\n </el-select>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { ElOption, ElSelect } from '@element-plus/components/select'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { isArray } from '@element-plus/utils'\nimport { usePagination } from '../usePagination'\nimport { paginationSizesProps } from './sizes'\n\ndefineOptions({\n name: 'ElPaginationSizes',\n})\n\nconst props = defineProps(paginationSizesProps)\nconst emit = defineEmits(['page-size-change'])\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst pagination = usePagination()\nconst innerPageSize = ref<number>(props.pageSize!)\n\nwatch(\n () => props.pageSizes,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n if (isArray(newVal)) {\n const pageSize = newVal.includes(props.pageSize!)\n ? props.pageSize\n : props.pageSizes[0]\n emit('page-size-change', pageSize)\n }\n }\n)\n\nwatch(\n () => props.pageSize,\n (newVal) => {\n innerPageSize.value = newVal!\n }\n)\n\nconst innerPageSizes = computed(() => props.pageSizes)\nfunction handleChange(val: number) {\n if (val !== innerPageSize.value) {\n innerPageSize.value = val\n pagination.handleSizeChange?.(Number(val))\n }\n}\n</script>\n"],"names":["_openBlock","_createElementBlock","_normalizeClass","_unref"],"mappings":";;;;;;;;;;mCAgCc,CAAA;AAAA,E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GAAA,CAAA,CAAA,CAAA;AACrD,OAAA;AACE,KAAI;AACF,IAAA,OAAA,CAAA,IAAA,EAAA,MAAsB,KAAA;AACtB,MAAW,OAAAA,SAAA,EAAA,EAAAC,kBAA0B,CAAA,MAAI,EAAA;AAAA,QAC3C,KAAA,EAAAC,cAAA,CAAAC,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;AAAA,OACF,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,76 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { usePagination } from '../usePagination.mjs';
|
|
5
|
-
import { paginationSizesProps } from './sizes.mjs';
|
|
6
|
-
import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useLocale } from '../../../../hooks/use-locale/index.mjs';
|
|
8
|
-
import { useNamespace } from '../../../../hooks/use-namespace/index.mjs';
|
|
9
|
-
import { isArray } from '@vue/shared';
|
|
1
|
+
import { buildProps, definePropType } from '../../../../utils/vue/props/runtime.mjs';
|
|
2
|
+
import { mutable } from '../../../../utils/typescript.mjs';
|
|
3
|
+
import { componentSizes } from '../../../../constants/size.mjs';
|
|
10
4
|
|
|
11
|
-
const
|
|
12
|
-
|
|
5
|
+
const paginationSizesProps = buildProps({
|
|
6
|
+
pageSize: {
|
|
7
|
+
type: Number,
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
pageSizes: {
|
|
11
|
+
type: definePropType(Array),
|
|
12
|
+
default: () => mutable([10, 20, 30, 40, 50, 100])
|
|
13
|
+
},
|
|
14
|
+
popperClass: {
|
|
15
|
+
type: String
|
|
16
|
+
},
|
|
17
|
+
popperStyle: {
|
|
18
|
+
type: definePropType([String, Object])
|
|
19
|
+
},
|
|
20
|
+
disabled: Boolean,
|
|
21
|
+
teleported: Boolean,
|
|
22
|
+
size: {
|
|
23
|
+
type: String,
|
|
24
|
+
values: componentSizes
|
|
25
|
+
},
|
|
26
|
+
appendSizeTo: String
|
|
13
27
|
});
|
|
14
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
-
...__default__,
|
|
16
|
-
props: paginationSizesProps,
|
|
17
|
-
emits: ["page-size-change"],
|
|
18
|
-
setup(__props, { emit }) {
|
|
19
|
-
const props = __props;
|
|
20
|
-
const { t } = useLocale();
|
|
21
|
-
const ns = useNamespace("pagination");
|
|
22
|
-
const pagination = usePagination();
|
|
23
|
-
const innerPageSize = ref(props.pageSize);
|
|
24
|
-
watch(() => props.pageSizes, (newVal, oldVal) => {
|
|
25
|
-
if (isEqual(newVal, oldVal))
|
|
26
|
-
return;
|
|
27
|
-
if (isArray(newVal)) {
|
|
28
|
-
const pageSize = newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0];
|
|
29
|
-
emit("page-size-change", pageSize);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
watch(() => props.pageSize, (newVal) => {
|
|
33
|
-
innerPageSize.value = newVal;
|
|
34
|
-
});
|
|
35
|
-
const innerPageSizes = computed(() => props.pageSizes);
|
|
36
|
-
function handleChange(val) {
|
|
37
|
-
var _a;
|
|
38
|
-
if (val !== innerPageSize.value) {
|
|
39
|
-
innerPageSize.value = val;
|
|
40
|
-
(_a = pagination.handleSizeChange) == null ? void 0 : _a.call(pagination, Number(val));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return (_ctx, _cache) => {
|
|
44
|
-
return openBlock(), createElementBlock("span", {
|
|
45
|
-
class: normalizeClass(unref(ns).e("sizes"))
|
|
46
|
-
}, [
|
|
47
|
-
createVNode(unref(ElSelect), {
|
|
48
|
-
"model-value": innerPageSize.value,
|
|
49
|
-
disabled: _ctx.disabled,
|
|
50
|
-
"popper-class": _ctx.popperClass,
|
|
51
|
-
"popper-style": _ctx.popperStyle,
|
|
52
|
-
size: _ctx.size,
|
|
53
|
-
teleported: _ctx.teleported,
|
|
54
|
-
"validate-event": false,
|
|
55
|
-
"append-to": _ctx.appendSizeTo,
|
|
56
|
-
onChange: handleChange
|
|
57
|
-
}, {
|
|
58
|
-
default: withCtx(() => [
|
|
59
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(innerPageSizes), (item) => {
|
|
60
|
-
return openBlock(), createBlock(unref(ElOption), {
|
|
61
|
-
key: item,
|
|
62
|
-
value: item,
|
|
63
|
-
label: item + unref(t)("el.pagination.pagesize")
|
|
64
|
-
}, null, 8, ["value", "label"]);
|
|
65
|
-
}), 128))
|
|
66
|
-
]),
|
|
67
|
-
_: 1
|
|
68
|
-
}, 8, ["model-value", "disabled", "popper-class", "popper-style", "size", "teleported", "append-to"])
|
|
69
|
-
], 2);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
var Sizes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "sizes.vue"]]);
|
|
74
28
|
|
|
75
|
-
export {
|
|
29
|
+
export { paginationSizesProps };
|
|
76
30
|
//# sourceMappingURL=sizes2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sizes2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/sizes.
|
|
1
|
+
{"version":3,"file":"sizes2.mjs","sources":["../../../../../../../packages/components/pagination/src/components/sizes.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type {\n CSSProperties,\n ExtractPropTypes,\n __ExtractPublicPropTypes,\n} from 'vue'\nimport type Sizes from './sizes.vue'\n\nexport const paginationSizesProps = buildProps({\n pageSize: {\n type: Number,\n required: true,\n },\n pageSizes: {\n type: definePropType<number[]>(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n },\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n disabled: Boolean,\n teleported: Boolean,\n size: {\n type: String,\n values: componentSizes,\n },\n appendSizeTo: String,\n} as const)\n\nexport type PaginationSizesProps = ExtractPropTypes<typeof paginationSizesProps>\nexport type PaginationSizesPropsPublic = __ExtractPublicPropTypes<\n typeof paginationSizesProps\n>\n\nexport type SizesInstance = InstanceType<typeof Sizes> & unknown\n"],"names":[],"mappings":";;;;AAEY,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AACrD,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,GAAG;AACH,EAAE,YAAY,EAAE,MAAM;AACtB,CAAC;;;;"}
|
|
@@ -2,8 +2,8 @@ import { defineComponent, getCurrentInstance, computed, ref, watch, provide, h }
|
|
|
2
2
|
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue';
|
|
3
3
|
import { elPaginationKey } from './constants.mjs';
|
|
4
4
|
import Prev from './components/prev2.mjs';
|
|
5
|
-
import Next from './components/
|
|
6
|
-
import Sizes from './components/
|
|
5
|
+
import Next from './components/next.mjs';
|
|
6
|
+
import Sizes from './components/sizes.mjs';
|
|
7
7
|
import Jumper from './components/jumper2.mjs';
|
|
8
8
|
import Total from './components/total2.mjs';
|
|
9
9
|
import Pager from './components/pager2.mjs';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import Popper from './src/popper2.mjs';
|
|
2
2
|
export { default as ElPopperArrow } from './src/arrow2.mjs';
|
|
3
3
|
export { default as ElPopperTrigger } from './src/trigger2.mjs';
|
|
4
|
-
export { default as ElPopperContent } from './src/
|
|
4
|
+
export { default as ElPopperContent } from './src/content.mjs';
|
|
5
5
|
export { Effect, popperProps, roleTypes, usePopperProps } from './src/popper.mjs';
|
|
6
6
|
export { popperTriggerProps, usePopperTriggerProps } from './src/trigger.mjs';
|
|
7
|
-
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './src/
|
|
7
|
+
export { popperContentEmits, popperContentProps, popperCoreConfigProps, usePopperContentEmits, usePopperContentProps, usePopperCoreConfigProps } from './src/content2.mjs';
|
|
8
8
|
export { popperArrowProps, usePopperArrowProps } from './src/arrow.mjs';
|
|
9
9
|
export { POPPER_CONTENT_INJECTION_KEY, POPPER_INJECTION_KEY } from './src/constants.mjs';
|
|
10
10
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inject, ref, computed, unref, watch, onMounted } from 'vue';
|
|
1
|
+
import { inject, ref, computed, unref, watch, onMounted, onBeforeUnmount } from 'vue';
|
|
2
2
|
import { isUndefined } from 'lodash-unified';
|
|
3
3
|
import { POPPER_INJECTION_KEY } from '../constants.mjs';
|
|
4
4
|
import { buildPopperOptions, unwrapMeasurableEl } from '../utils.mjs';
|
|
@@ -52,6 +52,9 @@ const usePopperContent = (props) => {
|
|
|
52
52
|
update();
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
|
+
onBeforeUnmount(() => {
|
|
56
|
+
popperInstanceRef.value = void 0;
|
|
57
|
+
});
|
|
55
58
|
return {
|
|
56
59
|
attributes,
|
|
57
60
|
arrowRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-content.mjs","sources":["../../../../../../../packages/components/popper/src/composables/use-content.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"use-content.mjs","sources":["../../../../../../../packages/components/popper/src/composables/use-content.ts"],"sourcesContent":["import {\n computed,\n inject,\n onBeforeUnmount,\n onMounted,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { isUndefined } from 'lodash-unified'\nimport { usePopper } from '@element-plus/hooks'\nimport { POPPER_INJECTION_KEY } from '../constants'\nimport { buildPopperOptions, unwrapMeasurableEl } from '../utils'\n\nimport type { Modifier } from '@popperjs/core'\nimport type { PartialOptions } from '@element-plus/hooks'\nimport type { PopperContentProps } from '../content'\n\nconst DEFAULT_ARROW_OFFSET = 0\n\nexport const usePopperContent = (props: PopperContentProps) => {\n const { popperInstanceRef, contentRef, triggerRef, role } = inject(\n POPPER_INJECTION_KEY,\n undefined\n )!\n\n const arrowRef = ref<HTMLElement>()\n const arrowOffset = computed(() => props.arrowOffset)\n\n const eventListenerModifier = computed(() => {\n return {\n name: 'eventListeners',\n enabled: !!props.visible,\n } as Modifier<'eventListeners', any>\n })\n\n const arrowModifier = computed(() => {\n const arrowEl = unref(arrowRef)\n const offset = unref(arrowOffset) ?? DEFAULT_ARROW_OFFSET\n // Seems like the `phase` and `fn` is required by Modifier type\n // But on its documentation they didn't specify that.\n // Refer to https://popper.js.org/docs/v2/modifiers/arrow/\n return {\n name: 'arrow',\n enabled: !isUndefined(arrowEl),\n options: {\n element: arrowEl,\n padding: offset,\n },\n } as any\n })\n\n const options = computed<PartialOptions>(() => {\n return {\n onFirstUpdate: () => {\n update()\n },\n ...buildPopperOptions(props, [\n unref(arrowModifier),\n unref(eventListenerModifier),\n ]),\n }\n })\n\n const computedReference = computed(\n () => unwrapMeasurableEl(props.referenceEl) || unref(triggerRef)\n )\n\n const { attributes, state, styles, update, forceUpdate, instanceRef } =\n usePopper(computedReference, contentRef, options)\n\n watch(instanceRef, (instance) => (popperInstanceRef.value = instance), {\n flush: 'sync',\n })\n\n onMounted(() => {\n watch(\n () => unref(computedReference)?.getBoundingClientRect?.(),\n () => {\n update()\n }\n )\n })\n\n onBeforeUnmount(() => {\n popperInstanceRef.value = undefined\n })\n\n return {\n attributes,\n arrowRef,\n contentRef,\n instanceRef,\n state,\n styles,\n role,\n\n forceUpdate,\n update,\n }\n}\n\nexport type UsePopperContentReturn = ReturnType<typeof usePopperContent>\n"],"names":[],"mappings":";;;;;;AAaA,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACnB,MAAC,gBAAgB,GAAG,CAAC,KAAK,KAAK;AAC3C,EAAE,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC,CAAC;AACnG,EAAE,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC;AACzB,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC;AACxD,EAAE,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM;AAC/C,IAAI,OAAO;AACX,MAAM,IAAI,EAAE,gBAAgB;AAC5B,MAAM,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO;AAC9B,KAAK,CAAC;AACN,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM;AACvC,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,MAAM,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,oBAAoB,CAAC;AACjF,IAAI,OAAO;AACX,MAAM,IAAI,EAAE,OAAO;AACnB,MAAM,OAAO,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;AACpC,MAAM,OA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M,MAAM,EAAE,CAAC;AACf,KAAK,CAAC,CAAC;AACP,GAAG,CAAC,CAAC;AACL,EAAE,eAAe,CAAC,MAAM;AACxB,IAAI,iBAAiB,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;AACrC,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,UAAU;AACd,IAAI,QAAQ;AACZ,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,KAAK;AACT,IAAI,MAAM;AACV,IAAI,IAAI;AACR,IAAI,WAAW;AACf,IAAI,MAAM;AACV,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref } from 'vue';
|
|
1
|
+
import { ref, onBeforeUnmount } from 'vue';
|
|
2
2
|
|
|
3
3
|
const usePopperContentFocusTrap = (props, emit) => {
|
|
4
4
|
const trapped = ref(false);
|
|
@@ -33,6 +33,9 @@ const usePopperContentFocusTrap = (props, emit) => {
|
|
|
33
33
|
trapped.value = false;
|
|
34
34
|
emit("close");
|
|
35
35
|
};
|
|
36
|
+
onBeforeUnmount(() => {
|
|
37
|
+
focusStartRef.value = void 0;
|
|
38
|
+
});
|
|
36
39
|
return {
|
|
37
40
|
focusStartRef,
|
|
38
41
|
trapped,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-focus-trap.mjs","sources":["../../../../../../../packages/components/popper/src/composables/use-focus-trap.ts"],"sourcesContent":["import { ref } from 'vue'\n\nimport type { SetupContext } from 'vue'\nimport type { PopperContentEmits, PopperContentProps } from '../content'\n\nexport const usePopperContentFocusTrap = (\n props: PopperContentProps,\n emit: SetupContext<PopperContentEmits>['emit']\n) => {\n const trapped = ref(false)\n const focusStartRef = ref<'container' | 'first' | HTMLElement>()\n\n const onFocusAfterTrapped = () => {\n emit('focus')\n }\n\n const onFocusAfterReleased = (event: CustomEvent) => {\n if (event.detail?.focusReason !== 'pointer') {\n focusStartRef.value = 'first'\n emit('blur')\n }\n }\n\n const onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n }\n }\n\n const onFocusoutPrevented = (event: CustomEvent) => {\n if (!props.trapping) {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n trapped.value = false\n }\n }\n\n const onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n }\n\n return {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n }\n}\n\nexport type UsePopperContentFocusTrapReturn = ReturnType<\n typeof usePopperContentFocusTrap\n>\n"],"names":[],"mappings":";;AACY,MAAC,yBAAyB,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AAC1D,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC;AAC9B,EAAE,MAAM,mBAAmB,GAAG,MAAM;AACpC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,MAAM,oBAAoB,GAAG,CAAC,KAAK,KAAK;AAC1C,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,IAAI,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW,MAAM,SAAS,EAAE;AAC/E,MAAM,aAAa,CAAC,KAAK,GAAG,OAAO,CAAC;AACpC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC;AACnB,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK;AACnC,IAAI,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;AACzC,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE;AACxB,QAAQ,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;AAC3C,OAAO;AACP,MAAM,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,mBAAmB,GAAG,CAAC,KAAK,KAAK;AACzC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACzB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE;AAClD,QAAQ,KAAK,CAAC,cAAc,EAAE,CAAC;AAC/B,OAAO;AACP,MAAM,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AAC5B,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,kBAAkB,GAAG,MAAM;AACnC,IAAI,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,IAAI,OAAO;AACX,IAAI,oBAAoB;AACxB,IAAI,mBAAmB;AACvB,IAAI,aAAa;AACjB,IAAI,mBAAmB;AACvB,IAAI,kBAAkB;AACtB,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"use-focus-trap.mjs","sources":["../../../../../../../packages/components/popper/src/composables/use-focus-trap.ts"],"sourcesContent":["import { onBeforeUnmount, ref } from 'vue'\n\nimport type { SetupContext } from 'vue'\nimport type { PopperContentEmits, PopperContentProps } from '../content'\n\nexport const usePopperContentFocusTrap = (\n props: PopperContentProps,\n emit: SetupContext<PopperContentEmits>['emit']\n) => {\n const trapped = ref(false)\n const focusStartRef = ref<'container' | 'first' | HTMLElement>()\n\n const onFocusAfterTrapped = () => {\n emit('focus')\n }\n\n const onFocusAfterReleased = (event: CustomEvent) => {\n if (event.detail?.focusReason !== 'pointer') {\n focusStartRef.value = 'first'\n emit('blur')\n }\n }\n\n const onFocusInTrap = (event: FocusEvent) => {\n if (props.visible && !trapped.value) {\n if (event.target) {\n focusStartRef.value = event.target as typeof focusStartRef.value\n }\n trapped.value = true\n }\n }\n\n const onFocusoutPrevented = (event: CustomEvent) => {\n if (!props.trapping) {\n if (event.detail.focusReason === 'pointer') {\n event.preventDefault()\n }\n trapped.value = false\n }\n }\n\n const onReleaseRequested = () => {\n trapped.value = false\n emit('close')\n }\n\n onBeforeUnmount(() => {\n focusStartRef.value = undefined\n })\n\n return {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n }\n}\n\nexport type UsePopperContentFocusTrapReturn = ReturnType<\n typeof usePopperContentFocusTrap\n>\n"],"names":[],"mappings":";;AACY,MAAC,yBAAyB,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AAC1D,EAAE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC7B,EAAE,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC;AAC9B,EAAE,MAAM,mBAAmB,GAAG,MAAM;AACpC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,MAAM,oBAAoB,GAAG,CAAC,KAAK,KAAK;AAC1C,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,IAAI,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW,MAAM,SAAS,EAAE;AAC/E,MAAM,aAAa,CAAC,KAAK,GAAG,OAAO,CAAC;AACpC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC;AACnB,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,aAAa,GAAG,CAAC,KAAK,KAAK;AACnC,IAAI,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;AACzC,MAAM,IAAI,KAAK,CAAC,MAAM,EAAE;AACxB,QAAQ,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;AAC3C,OAAO;AACP,MAAM,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;AAC3B,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,mBAAmB,GAAG,CAAC,KAAK,KAAK;AACzC,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;AACzB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE;AAClD,QAAQ,KAAK,CAAC,cAAc,EAAE,CAAC;AAC/B,OAAO;AACP,MAAM,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AAC5B,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,kBAAkB,GAAG,MAAM;AACnC,IAAI,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;AAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,eAAe,CAAC,MAAM;AACxB,IAAI,aAAa,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;AACjC,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,IAAI,OAAO;AACX,IAAI,oBAAoB;AACxB,IAAI,mBAAmB;AACvB,IAAI,aAAa;AACjB,IAAI,mBAAmB;AACvB,IAAI,kBAAkB;AACtB,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -1,94 +1,137 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent, inject, provide, onMounted, watch, unref, onBeforeUnmount, openBlock, createElementBlock, mergeProps, createVNode, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { isNil } from 'lodash-unified';
|
|
3
|
+
import ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';
|
|
4
|
+
import { POPPER_CONTENT_INJECTION_KEY } from './constants.mjs';
|
|
5
|
+
import { popperContentProps, popperContentEmits } from './content2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { usePopperContentFocusTrap } from './composables/use-focus-trap.mjs';
|
|
8
|
+
import { usePopperContent } from './composables/use-content.mjs';
|
|
9
|
+
import { usePopperContentDOM } from './composables/use-content-dom.mjs';
|
|
10
|
+
import { formItemContextKey } from '../../form/src/constants.mjs';
|
|
11
|
+
import { NOOP } from '@vue/shared';
|
|
12
|
+
import { isElement } from '../../../utils/types.mjs';
|
|
5
13
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
boundariesPadding: {
|
|
9
|
-
type: Number,
|
|
10
|
-
default: 0
|
|
11
|
-
},
|
|
12
|
-
fallbackPlacements: {
|
|
13
|
-
type: definePropType(Array),
|
|
14
|
-
default: void 0
|
|
15
|
-
},
|
|
16
|
-
gpuAcceleration: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: true
|
|
19
|
-
},
|
|
20
|
-
offset: {
|
|
21
|
-
type: Number,
|
|
22
|
-
default: 12
|
|
23
|
-
},
|
|
24
|
-
placement: {
|
|
25
|
-
type: String,
|
|
26
|
-
values: placements,
|
|
27
|
-
default: "bottom"
|
|
28
|
-
},
|
|
29
|
-
popperOptions: {
|
|
30
|
-
type: definePropType(Object),
|
|
31
|
-
default: () => ({})
|
|
32
|
-
},
|
|
33
|
-
strategy: {
|
|
34
|
-
type: String,
|
|
35
|
-
values: POSITIONING_STRATEGIES,
|
|
36
|
-
default: "absolute"
|
|
37
|
-
}
|
|
14
|
+
const __default__ = defineComponent({
|
|
15
|
+
name: "ElPopperContent"
|
|
38
16
|
});
|
|
39
|
-
const
|
|
40
|
-
...
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
|
+
...__default__,
|
|
19
|
+
props: popperContentProps,
|
|
20
|
+
emits: popperContentEmits,
|
|
21
|
+
setup(__props, { expose, emit }) {
|
|
22
|
+
const props = __props;
|
|
23
|
+
const {
|
|
24
|
+
focusStartRef,
|
|
25
|
+
trapped,
|
|
26
|
+
onFocusAfterReleased,
|
|
27
|
+
onFocusAfterTrapped,
|
|
28
|
+
onFocusInTrap,
|
|
29
|
+
onFocusoutPrevented,
|
|
30
|
+
onReleaseRequested
|
|
31
|
+
} = usePopperContentFocusTrap(props, emit);
|
|
32
|
+
const { attributes, arrowRef, contentRef, styles, instanceRef, role, update } = usePopperContent(props);
|
|
33
|
+
const {
|
|
34
|
+
ariaModal,
|
|
35
|
+
arrowStyle,
|
|
36
|
+
contentAttrs,
|
|
37
|
+
contentClass,
|
|
38
|
+
contentStyle,
|
|
39
|
+
updateZIndex
|
|
40
|
+
} = usePopperContentDOM(props, {
|
|
41
|
+
styles,
|
|
42
|
+
attributes,
|
|
43
|
+
role
|
|
44
|
+
});
|
|
45
|
+
const formItemContext = inject(formItemContextKey, void 0);
|
|
46
|
+
provide(POPPER_CONTENT_INJECTION_KEY, {
|
|
47
|
+
arrowStyle,
|
|
48
|
+
arrowRef
|
|
49
|
+
});
|
|
50
|
+
if (formItemContext) {
|
|
51
|
+
provide(formItemContextKey, {
|
|
52
|
+
...formItemContext,
|
|
53
|
+
addInputId: NOOP,
|
|
54
|
+
removeInputId: NOOP
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
let triggerTargetAriaStopWatch = void 0;
|
|
58
|
+
const updatePopper = (shouldUpdateZIndex = true) => {
|
|
59
|
+
update();
|
|
60
|
+
shouldUpdateZIndex && updateZIndex();
|
|
61
|
+
};
|
|
62
|
+
const togglePopperAlive = () => {
|
|
63
|
+
updatePopper(false);
|
|
64
|
+
if (props.visible && props.focusOnShow) {
|
|
65
|
+
trapped.value = true;
|
|
66
|
+
} else if (props.visible === false) {
|
|
67
|
+
trapped.value = false;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
watch(() => props.triggerTargetEl, (triggerTargetEl, prevTriggerTargetEl) => {
|
|
72
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
|
73
|
+
triggerTargetAriaStopWatch = void 0;
|
|
74
|
+
const el = unref(triggerTargetEl || contentRef.value);
|
|
75
|
+
const prevEl = unref(prevTriggerTargetEl || contentRef.value);
|
|
76
|
+
if (isElement(el)) {
|
|
77
|
+
triggerTargetAriaStopWatch = watch([role, () => props.ariaLabel, ariaModal, () => props.id], (watches) => {
|
|
78
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key, idx) => {
|
|
79
|
+
isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
|
80
|
+
});
|
|
81
|
+
}, { immediate: true });
|
|
82
|
+
}
|
|
83
|
+
if (prevEl !== el && isElement(prevEl)) {
|
|
84
|
+
["role", "aria-label", "aria-modal", "id"].forEach((key) => {
|
|
85
|
+
prevEl.removeAttribute(key);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}, { immediate: true });
|
|
89
|
+
watch(() => props.visible, togglePopperAlive, { immediate: true });
|
|
90
|
+
});
|
|
91
|
+
onBeforeUnmount(() => {
|
|
92
|
+
triggerTargetAriaStopWatch == null ? void 0 : triggerTargetAriaStopWatch();
|
|
93
|
+
triggerTargetAriaStopWatch = void 0;
|
|
94
|
+
contentRef.value = void 0;
|
|
95
|
+
});
|
|
96
|
+
expose({
|
|
97
|
+
popperContentRef: contentRef,
|
|
98
|
+
popperInstanceRef: instanceRef,
|
|
99
|
+
updatePopper,
|
|
100
|
+
contentStyle
|
|
101
|
+
});
|
|
102
|
+
return (_ctx, _cache) => {
|
|
103
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
104
|
+
ref_key: "contentRef",
|
|
105
|
+
ref: contentRef
|
|
106
|
+
}, unref(contentAttrs), {
|
|
107
|
+
style: unref(contentStyle),
|
|
108
|
+
class: unref(contentClass),
|
|
109
|
+
tabindex: "-1",
|
|
110
|
+
onMouseenter: (e) => _ctx.$emit("mouseenter", e),
|
|
111
|
+
onMouseleave: (e) => _ctx.$emit("mouseleave", e)
|
|
112
|
+
}), [
|
|
113
|
+
createVNode(unref(ElFocusTrap), {
|
|
114
|
+
loop: _ctx.loop,
|
|
115
|
+
trapped: unref(trapped),
|
|
116
|
+
"trap-on-focus-in": true,
|
|
117
|
+
"focus-trap-el": unref(contentRef),
|
|
118
|
+
"focus-start-el": unref(focusStartRef),
|
|
119
|
+
onFocusAfterTrapped: unref(onFocusAfterTrapped),
|
|
120
|
+
onFocusAfterReleased: unref(onFocusAfterReleased),
|
|
121
|
+
onFocusin: unref(onFocusInTrap),
|
|
122
|
+
onFocusoutPrevented: unref(onFocusoutPrevented),
|
|
123
|
+
onReleaseRequested: unref(onReleaseRequested)
|
|
124
|
+
}, {
|
|
125
|
+
default: withCtx(() => [
|
|
126
|
+
renderSlot(_ctx.$slots, "default")
|
|
127
|
+
]),
|
|
128
|
+
_: 3
|
|
129
|
+
}, 8, ["loop", "trapped", "focus-trap-el", "focus-start-el", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusin", "onFocusoutPrevented", "onReleaseRequested"])
|
|
130
|
+
], 16, ["onMouseenter", "onMouseleave"]);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
81
133
|
});
|
|
82
|
-
|
|
83
|
-
mouseenter: (evt) => evt instanceof MouseEvent,
|
|
84
|
-
mouseleave: (evt) => evt instanceof MouseEvent,
|
|
85
|
-
focus: () => true,
|
|
86
|
-
blur: () => true,
|
|
87
|
-
close: () => true
|
|
88
|
-
};
|
|
89
|
-
const usePopperCoreConfigProps = popperCoreConfigProps;
|
|
90
|
-
const usePopperContentProps = popperContentProps;
|
|
91
|
-
const usePopperContentEmits = popperContentEmits;
|
|
134
|
+
var ElPopperContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
92
135
|
|
|
93
|
-
export {
|
|
136
|
+
export { ElPopperContent as default };
|
|
94
137
|
//# sourceMappingURL=content.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/popper/src/content.
|
|
1
|
+
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/popper/src/content.vue"],"sourcesContent":["<template>\n <div\n ref=\"contentRef\"\n v-bind=\"contentAttrs\"\n :style=\"contentStyle\"\n :class=\"contentClass\"\n tabindex=\"-1\"\n @mouseenter=\"(e) => $emit('mouseenter', e)\"\n @mouseleave=\"(e) => $emit('mouseleave', e)\"\n >\n <el-focus-trap\n :loop=\"loop\"\n :trapped=\"trapped\"\n :trap-on-focus-in=\"true\"\n :focus-trap-el=\"contentRef\"\n :focus-start-el=\"focusStartRef\"\n @focus-after-trapped=\"onFocusAfterTrapped\"\n @focus-after-released=\"onFocusAfterReleased\"\n @focusin=\"onFocusInTrap\"\n @focusout-prevented=\"onFocusoutPrevented\"\n @release-requested=\"onReleaseRequested\"\n >\n <slot />\n </el-focus-trap>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, onBeforeUnmount, onMounted, provide, unref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { NOOP, isElement } from '@element-plus/utils'\nimport ElFocusTrap from '@element-plus/components/focus-trap'\nimport { formItemContextKey } from '@element-plus/components/form'\nimport { POPPER_CONTENT_INJECTION_KEY } from './constants'\nimport { popperContentEmits, popperContentProps } from './content'\nimport {\n usePopperContent,\n usePopperContentDOM,\n usePopperContentFocusTrap,\n} from './composables'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperContent',\n})\n\nconst emit = defineEmits(popperContentEmits)\n\nconst props = defineProps(popperContentProps)\n\nconst {\n focusStartRef,\n trapped,\n\n onFocusAfterReleased,\n onFocusAfterTrapped,\n onFocusInTrap,\n onFocusoutPrevented,\n onReleaseRequested,\n} = usePopperContentFocusTrap(props, emit)\n\nconst { attributes, arrowRef, contentRef, styles, instanceRef, role, update } =\n usePopperContent(props)\n\nconst {\n ariaModal,\n arrowStyle,\n contentAttrs,\n contentClass,\n contentStyle,\n updateZIndex,\n} = usePopperContentDOM(props, {\n styles,\n attributes,\n role,\n})\n\nconst formItemContext = inject(formItemContextKey, undefined)\n\nprovide(POPPER_CONTENT_INJECTION_KEY, {\n arrowStyle,\n arrowRef,\n})\n\nif (formItemContext) {\n // disallow auto-id from inside popper content\n provide(formItemContextKey, {\n ...formItemContext,\n addInputId: NOOP,\n removeInputId: NOOP,\n })\n}\n\nlet triggerTargetAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst updatePopper = (shouldUpdateZIndex = true) => {\n update()\n shouldUpdateZIndex && updateZIndex()\n}\n\nconst togglePopperAlive = () => {\n updatePopper(false)\n if (props.visible && props.focusOnShow) {\n trapped.value = true\n } else if (props.visible === false) {\n trapped.value = false\n }\n}\n\nonMounted(() => {\n watch(\n () => props.triggerTargetEl,\n (triggerTargetEl, prevTriggerTargetEl) => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n\n const el = unref(triggerTargetEl || contentRef.value)\n const prevEl = unref(prevTriggerTargetEl || contentRef.value)\n\n if (isElement(el)) {\n triggerTargetAriaStopWatch = watch(\n [role, () => props.ariaLabel, ariaModal, () => props.id],\n (watches) => {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key, idx) => {\n isNil(watches[idx])\n ? el.removeAttribute(key)\n : el.setAttribute(key, watches[idx]!)\n })\n },\n { immediate: true }\n )\n }\n if (prevEl !== el && isElement(prevEl)) {\n ;['role', 'aria-label', 'aria-modal', 'id'].forEach((key) => {\n prevEl.removeAttribute(key)\n })\n }\n },\n { immediate: true }\n )\n\n watch(() => props.visible, togglePopperAlive, { immediate: true })\n})\n\nonBeforeUnmount(() => {\n triggerTargetAriaStopWatch?.()\n triggerTargetAriaStopWatch = undefined\n contentRef.value = undefined\n})\n\ndefineExpose({\n /**\n * @description popper content element\n */\n popperContentRef: contentRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef: instanceRef,\n /**\n * @description method for updating popper\n */\n updatePopper,\n\n /**\n * @description content style\n */\n contentStyle,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createVNode"],"mappings":";;;;;;;;;;;;;mCA2Cc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAMA,IAAM,MAAA;AAAA,MACJ,aAAA;AAAA,MACA,OAAA;AAAA,MAEA,oBAAA;AAAA,MACA,mBAAA;AAAA,MACA,aAAA;AAAA,MACA,mBAAA;AAAA,MACA,kBAAA;AAAA,KACF,GAAI,yBAA0B,CAAA,KAAA,EAAO,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,EAAE,UAAY,EAAA,QAAA,EAAU,UAAY,EAAA,MAAA,EAAQ,aAAa,IAAM,EAAA,MAAA,EACnE,GAAA,gBAAA,CAAiB,KAAK,CAAA,CAAA;AAExB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,UAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KACF,GAAI,oBAAoB,KAAO,EAAA;AAAA,MAC7B,MAAA;AAAA,MACA,UAAA;AAAA,MACA,IAAA;AAAA,KACD,CAAA,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