@element-plus/nightly 0.0.20241231 → 0.0.20250102
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.full.js +28 -44
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +28 -44
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/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/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +42 -192
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +192 -42
- 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 +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +29 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -29
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +134 -16
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +16 -134
- package/es/components/calendar/src/calendar2.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/cascader/src/cascader.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +38 -14
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +14 -38
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +22 -79
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +79 -22
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/descriptions/src/description.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +16 -34
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +34 -16
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +2 -2
- package/es/components/dropdown/src/dropdown.mjs +298 -102
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +102 -298
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +64 -232
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +232 -64
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +28 -28
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +34 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -34
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/message/index.mjs +1 -1
- package/es/components/message/src/message.mjs +91 -145
- package/es/components/message/src/message.mjs.map +1 -1
- package/es/components/message/src/message2.mjs +145 -91
- package/es/components/message/src/message2.mjs.map +1 -1
- package/es/components/message/src/method.mjs +2 -2
- package/es/components/page-header/src/page-header2.mjs +9 -13
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +58 -7
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +7 -58
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/next.mjs +18 -35
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +35 -18
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +45 -114
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +114 -45
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/popper/src/trigger.mjs +127 -31
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +31 -127
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group2.mjs +1 -1
- package/es/components/radio/src/radio.mjs +73 -32
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +32 -73
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +83 -258
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +258 -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/row/index.mjs +2 -2
- package/es/components/row/src/row.mjs +44 -28
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row2.mjs +28 -44
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +33 -167
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +167 -33
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select/src/select.vue.d.ts +4 -2
- package/es/components/select/src/select2.mjs +10 -2
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +0 -13
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/select-v2/src/select.mjs +10 -2
- package/es/components/select-v2/src/select.mjs.map +1 -1
- package/es/components/select-v2/src/select.types.d.ts +0 -1
- package/es/components/select-v2/src/select.vue.d.ts +4 -5
- package/es/components/select-v2/src/useSelect.d.ts +0 -5
- package/es/components/select-v2/src/useSelect.mjs +0 -13
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +19 -190
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +190 -19
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +95 -7
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +7 -95
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +27 -99
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +99 -27
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.mjs +166 -30
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +30 -166
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +79 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -79
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +68 -153
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +153 -68
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +28 -173
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +173 -28
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -6
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +6 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +27 -210
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +210 -27
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +28 -28
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +42 -191
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +191 -42
- 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 +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +29 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -29
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +134 -17
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +17 -134
- package/lib/components/calendar/src/calendar2.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/cascader/src/cascader.js +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +38 -15
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +15 -38
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +23 -79
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +79 -23
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/descriptions/src/description.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +6 -63
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +63 -6
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +16 -34
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +34 -16
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +2 -2
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +2 -2
- package/lib/components/dropdown/src/dropdown.js +298 -111
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +111 -298
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +64 -231
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +231 -64
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +28 -28
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +34 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -34
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/message/index.js +1 -1
- package/lib/components/message/src/message.js +93 -144
- package/lib/components/message/src/message.js.map +1 -1
- package/lib/components/message/src/message2.js +144 -93
- package/lib/components/message/src/message2.js.map +1 -1
- package/lib/components/message/src/method.js +2 -2
- package/lib/components/page-header/src/page-header2.js +8 -12
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +58 -7
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +7 -58
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/next.js +18 -35
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +35 -18
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +46 -114
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +114 -46
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/popper/src/trigger.js +127 -32
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +32 -127
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group2.js +1 -1
- package/lib/components/radio/src/radio.js +73 -34
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +34 -73
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +83 -257
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +257 -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 +31 -27
- 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 +27 -31
- 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/row/index.js +2 -2
- package/lib/components/row/src/row.js +44 -30
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row2.js +30 -44
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +34 -167
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +167 -34
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select/src/select.vue.d.ts +4 -2
- package/lib/components/select/src/select2.js +10 -2
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +0 -13
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/select-v2/src/select.js +10 -2
- package/lib/components/select-v2/src/select.js.map +1 -1
- package/lib/components/select-v2/src/select.types.d.ts +0 -1
- package/lib/components/select-v2/src/select.vue.d.ts +4 -5
- package/lib/components/select-v2/src/useSelect.d.ts +0 -5
- package/lib/components/select-v2/src/useSelect.js +0 -13
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +19 -190
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +190 -19
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +95 -7
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +7 -95
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +28 -99
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +99 -28
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.js +166 -34
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +34 -166
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content2.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +79 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -79
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +68 -152
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +152 -68
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-list.js +29 -173
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +173 -29
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -6
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +6 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +27 -210
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +210 -27
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +28 -28
- 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-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/select.scss +3 -2
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popper.js","sources":["../../../../../../packages/components/popper/src/popper.
|
1
|
+
{"version":3,"file":"popper.js","sources":["../../../../../../packages/components/popper/src/popper.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref } from 'vue'\nimport { POPPER_INJECTION_KEY } from './constants'\nimport { popperProps } from './popper'\n\nimport type { Instance as PopperInstance } from '@popperjs/core'\nimport type { ElPopperInjectionContext } from './constants'\n\ndefineOptions({\n name: 'ElPopper',\n inheritAttrs: false,\n})\nconst props = defineProps(popperProps)\n\nconst triggerRef = ref<HTMLElement>()\nconst popperInstanceRef = ref<PopperInstance>()\nconst contentRef = ref<HTMLElement>()\nconst referenceRef = ref<HTMLElement>()\nconst role = computed(() => props.role)\n\nconst popperProvides = {\n /**\n * @description trigger element\n */\n triggerRef,\n /**\n * @description popperjs instance\n */\n popperInstanceRef,\n /**\n * @description popper content element\n */\n contentRef,\n /**\n * @description popper reference element\n */\n referenceRef,\n /**\n * @description role determines how aria attributes are distributed\n */\n role,\n} as ElPopperInjectionContext\n\ndefineExpose(popperProvides)\n\nprovide(POPPER_INJECTION_KEY, popperProvides)\n</script>\n"],"names":["ref","computed","provide","POPPER_INJECTION_KEY","_renderSlot","_export_sfc"],"mappings":";;;;;;;;;uCAYc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAGA,IAAA,MAAM,aAAaA,OAAiB,EAAA,CAAA;AACpC,IAAA,MAAM,oBAAoBA,OAAoB,EAAA,CAAA;AAC9C,IAAA,MAAM,aAAaA,OAAiB,EAAA,CAAA;AACpC,IAAA,MAAM,eAAeA,OAAiB,EAAA,CAAA;AACtC,IAAA,MAAM,IAAO,GAAAC,YAAA,CAAS,MAAM,KAAA,CAAM,IAAI,CAAA,CAAA;AAEtC,IAAA,MAAM,cAAiB,GAAA;AAAA,MAAA,UAAA;AAAA,MAAA,iBAAA;AAAA,MAAA,UAAA;AAAA,MAIrB,YAAA;AAAA,MAAA,IAAA;AAAA,KAAA,CAAA;AAAA,IAAA,MAAA,CAAA,cAAA,CAAA,CAAA;AAAA,IAIAC,WAAA,CAAAC,8BAAA,EAAA,cAAA,CAAA,CAAA;AAAA,IAAA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MAAA,OAAAC,cAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAIA;AAAA,CAAA,CAAA,CAAA;AAAA,aAAA,gBAAAC,iCAAA,CAAA,SAAA,EAAA,CAAA,CAAA,QAAA,EAAA,YAAA,CAAA,CAAA,CAAA;;;;"}
|
@@ -2,40 +2,33 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var constants = require('./constants.js');
|
7
|
-
var popper = require('./popper.js');
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
9
6
|
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
}
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
role
|
30
|
-
};
|
31
|
-
expose(popperProvides);
|
32
|
-
vue.provide(constants.POPPER_INJECTION_KEY, popperProvides);
|
33
|
-
return (_ctx, _cache) => {
|
34
|
-
return vue.renderSlot(_ctx.$slots, "default");
|
35
|
-
};
|
7
|
+
const Effect = {
|
8
|
+
LIGHT: "light",
|
9
|
+
DARK: "dark"
|
10
|
+
};
|
11
|
+
const roleTypes = [
|
12
|
+
"dialog",
|
13
|
+
"grid",
|
14
|
+
"group",
|
15
|
+
"listbox",
|
16
|
+
"menu",
|
17
|
+
"navigation",
|
18
|
+
"tooltip",
|
19
|
+
"tree"
|
20
|
+
];
|
21
|
+
const popperProps = runtime.buildProps({
|
22
|
+
role: {
|
23
|
+
type: String,
|
24
|
+
values: roleTypes,
|
25
|
+
default: "tooltip"
|
36
26
|
}
|
37
27
|
});
|
38
|
-
|
28
|
+
const usePopperProps = popperProps;
|
39
29
|
|
40
|
-
exports
|
30
|
+
exports.Effect = Effect;
|
31
|
+
exports.popperProps = popperProps;
|
32
|
+
exports.roleTypes = roleTypes;
|
33
|
+
exports.usePopperProps = usePopperProps;
|
41
34
|
//# sourceMappingURL=popper2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popper2.js","sources":["../../../../../../packages/components/popper/src/popper.
|
1
|
+
{"version":3,"file":"popper2.js","sources":["../../../../../../packages/components/popper/src/popper.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Popper from './popper.vue'\n\nconst effects = ['light', 'dark'] as const\nconst triggers = ['click', 'contextmenu', 'hover', 'focus'] as const\n\nexport const Effect = {\n LIGHT: 'light',\n DARK: 'dark',\n} as const\n\nexport const roleTypes = [\n 'dialog',\n 'grid',\n 'group',\n 'listbox',\n 'menu',\n 'navigation',\n 'tooltip',\n 'tree',\n] as const\n\nexport type PopperEffect =\n | typeof effects[number]\n | (string & NonNullable<unknown>)\nexport type PopperTrigger = typeof triggers[number]\n\nexport const popperProps = buildProps({\n role: {\n type: String,\n values: roleTypes,\n default: 'tooltip',\n },\n} as const)\n\nexport type PopperProps = ExtractPropTypes<typeof popperProps>\n\nexport type PopperInstance = InstanceType<typeof Popper>\n\n/** @deprecated use `popperProps` instead, and it will be deprecated in the next major version */\nexport const usePopperProps = popperProps\n\n/** @deprecated use `PopperProps` instead, and it will be deprecated in the next major version */\nexport type UsePopperProps = PopperProps\n"],"names":["buildProps"],"mappings":";;;;;;AAGY,MAAC,MAAM,GAAG;AACtB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE;AACU,MAAC,SAAS,GAAG;AACzB,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,YAAY;AACd,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE;AACU,MAAC,WAAW,GAAGA,kBAAU,CAAC;AACtC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;;;;;;;"}
|
@@ -2,39 +2,134 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var lodashUnified = require('lodash-unified');
|
7
|
+
var core = require('@vueuse/core');
|
8
|
+
var constants = require('./constants.js');
|
9
|
+
var trigger = require('./trigger2.js');
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
11
|
+
var index = require('../../../hooks/use-forward-ref/index.js');
|
12
|
+
var aria = require('../../../utils/dom/aria.js');
|
13
|
+
var onlyChild = require('../../slot/src/only-child.js');
|
14
|
+
var types = require('../../../utils/types.js');
|
6
15
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
},
|
11
|
-
virtualTriggering: Boolean,
|
12
|
-
onMouseenter: {
|
13
|
-
type: runtime.definePropType(Function)
|
14
|
-
},
|
15
|
-
onMouseleave: {
|
16
|
-
type: runtime.definePropType(Function)
|
17
|
-
},
|
18
|
-
onClick: {
|
19
|
-
type: runtime.definePropType(Function)
|
20
|
-
},
|
21
|
-
onKeydown: {
|
22
|
-
type: runtime.definePropType(Function)
|
23
|
-
},
|
24
|
-
onFocus: {
|
25
|
-
type: runtime.definePropType(Function)
|
26
|
-
},
|
27
|
-
onBlur: {
|
28
|
-
type: runtime.definePropType(Function)
|
29
|
-
},
|
30
|
-
onContextmenu: {
|
31
|
-
type: runtime.definePropType(Function)
|
32
|
-
},
|
33
|
-
id: String,
|
34
|
-
open: Boolean
|
16
|
+
const __default__ = vue.defineComponent({
|
17
|
+
name: "ElPopperTrigger",
|
18
|
+
inheritAttrs: false
|
35
19
|
});
|
36
|
-
const
|
20
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
21
|
+
...__default__,
|
22
|
+
props: trigger.popperTriggerProps,
|
23
|
+
setup(__props, { expose }) {
|
24
|
+
const props = __props;
|
25
|
+
const { role, triggerRef } = vue.inject(constants.POPPER_INJECTION_KEY, void 0);
|
26
|
+
index.useForwardRef(triggerRef);
|
27
|
+
const ariaControls = vue.computed(() => {
|
28
|
+
return ariaHaspopup.value ? props.id : void 0;
|
29
|
+
});
|
30
|
+
const ariaDescribedby = vue.computed(() => {
|
31
|
+
if (role && role.value === "tooltip") {
|
32
|
+
return props.open && props.id ? props.id : void 0;
|
33
|
+
}
|
34
|
+
return void 0;
|
35
|
+
});
|
36
|
+
const ariaHaspopup = vue.computed(() => {
|
37
|
+
if (role && role.value !== "tooltip") {
|
38
|
+
return role.value;
|
39
|
+
}
|
40
|
+
return void 0;
|
41
|
+
});
|
42
|
+
const ariaExpanded = vue.computed(() => {
|
43
|
+
return ariaHaspopup.value ? `${props.open}` : void 0;
|
44
|
+
});
|
45
|
+
let virtualTriggerAriaStopWatch = void 0;
|
46
|
+
const TRIGGER_ELE_EVENTS = [
|
47
|
+
"onMouseenter",
|
48
|
+
"onMouseleave",
|
49
|
+
"onClick",
|
50
|
+
"onKeydown",
|
51
|
+
"onFocus",
|
52
|
+
"onBlur",
|
53
|
+
"onContextmenu"
|
54
|
+
];
|
55
|
+
vue.onMounted(() => {
|
56
|
+
vue.watch(() => props.virtualRef, (virtualEl) => {
|
57
|
+
if (virtualEl) {
|
58
|
+
triggerRef.value = core.unrefElement(virtualEl);
|
59
|
+
}
|
60
|
+
}, {
|
61
|
+
immediate: true
|
62
|
+
});
|
63
|
+
vue.watch(triggerRef, (el, prevEl) => {
|
64
|
+
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
65
|
+
virtualTriggerAriaStopWatch = void 0;
|
66
|
+
if (types.isElement(el)) {
|
67
|
+
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
68
|
+
var _a;
|
69
|
+
const handler = props[eventName];
|
70
|
+
if (handler) {
|
71
|
+
el.addEventListener(eventName.slice(2).toLowerCase(), handler);
|
72
|
+
(_a = prevEl == null ? void 0 : prevEl.removeEventListener) == null ? void 0 : _a.call(prevEl, eventName.slice(2).toLowerCase(), handler);
|
73
|
+
}
|
74
|
+
});
|
75
|
+
if (aria.isFocusable(el)) {
|
76
|
+
virtualTriggerAriaStopWatch = vue.watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => {
|
77
|
+
[
|
78
|
+
"aria-controls",
|
79
|
+
"aria-describedby",
|
80
|
+
"aria-haspopup",
|
81
|
+
"aria-expanded"
|
82
|
+
].forEach((key, idx) => {
|
83
|
+
lodashUnified.isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
84
|
+
});
|
85
|
+
}, { immediate: true });
|
86
|
+
}
|
87
|
+
}
|
88
|
+
if (types.isElement(prevEl) && aria.isFocusable(prevEl)) {
|
89
|
+
[
|
90
|
+
"aria-controls",
|
91
|
+
"aria-describedby",
|
92
|
+
"aria-haspopup",
|
93
|
+
"aria-expanded"
|
94
|
+
].forEach((key) => prevEl.removeAttribute(key));
|
95
|
+
}
|
96
|
+
}, {
|
97
|
+
immediate: true
|
98
|
+
});
|
99
|
+
});
|
100
|
+
vue.onBeforeUnmount(() => {
|
101
|
+
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
102
|
+
virtualTriggerAriaStopWatch = void 0;
|
103
|
+
if (triggerRef.value && types.isElement(triggerRef.value)) {
|
104
|
+
const el = triggerRef.value;
|
105
|
+
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
106
|
+
const handler = props[eventName];
|
107
|
+
if (handler) {
|
108
|
+
el.removeEventListener(eventName.slice(2).toLowerCase(), handler);
|
109
|
+
}
|
110
|
+
});
|
111
|
+
triggerRef.value = void 0;
|
112
|
+
}
|
113
|
+
});
|
114
|
+
expose({
|
115
|
+
triggerRef
|
116
|
+
});
|
117
|
+
return (_ctx, _cache) => {
|
118
|
+
return !_ctx.virtualTriggering ? (vue.openBlock(), vue.createBlock(vue.unref(onlyChild.OnlyChild), vue.mergeProps({ key: 0 }, _ctx.$attrs, {
|
119
|
+
"aria-controls": vue.unref(ariaControls),
|
120
|
+
"aria-describedby": vue.unref(ariaDescribedby),
|
121
|
+
"aria-expanded": vue.unref(ariaExpanded),
|
122
|
+
"aria-haspopup": vue.unref(ariaHaspopup)
|
123
|
+
}), {
|
124
|
+
default: vue.withCtx(() => [
|
125
|
+
vue.renderSlot(_ctx.$slots, "default")
|
126
|
+
]),
|
127
|
+
_: 3
|
128
|
+
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])) : vue.createCommentVNode("v-if", true);
|
129
|
+
};
|
130
|
+
}
|
131
|
+
});
|
132
|
+
var ElPopperTrigger = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "trigger.vue"]]);
|
37
133
|
|
38
|
-
exports
|
39
|
-
exports.usePopperTriggerProps = usePopperTriggerProps;
|
134
|
+
exports["default"] = ElPopperTrigger;
|
40
135
|
//# sourceMappingURL=trigger.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger.js","sources":["../../../../../../packages/components/popper/src/trigger.
|
1
|
+
{"version":3,"file":"trigger.js","sources":["../../../../../../packages/components/popper/src/trigger.vue"],"sourcesContent":["<template>\n <el-only-child\n v-if=\"!virtualTriggering\"\n v-bind=\"$attrs\"\n :aria-controls=\"ariaControls\"\n :aria-describedby=\"ariaDescribedby\"\n :aria-expanded=\"ariaExpanded\"\n :aria-haspopup=\"ariaHaspopup\"\n >\n <slot />\n </el-only-child>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, onMounted, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { unrefElement } from '@vueuse/core'\nimport { ElOnlyChild } from '@element-plus/components/slot'\nimport { useForwardRef } from '@element-plus/hooks'\nimport { isElement, isFocusable } from '@element-plus/utils'\nimport { POPPER_INJECTION_KEY } from './constants'\nimport { popperTriggerProps } from './trigger'\n\nimport type { WatchStopHandle } from 'vue'\n\ndefineOptions({\n name: 'ElPopperTrigger',\n inheritAttrs: false,\n})\n\nconst props = defineProps(popperTriggerProps)\n\nconst { role, triggerRef } = inject(POPPER_INJECTION_KEY, undefined)!\n\nuseForwardRef(triggerRef)\n\nconst ariaControls = computed<string | undefined>(() => {\n return ariaHaspopup.value ? props.id : undefined\n})\n\nconst ariaDescribedby = computed<string | undefined>(() => {\n if (role && role.value === 'tooltip') {\n return props.open && props.id ? props.id : undefined\n }\n return undefined\n})\n\nconst ariaHaspopup = computed<string | undefined>(() => {\n if (role && role.value !== 'tooltip') {\n return role.value\n }\n return undefined\n})\n\nconst ariaExpanded = computed<string | undefined>(() => {\n return ariaHaspopup.value ? `${props.open}` : undefined\n})\n\nlet virtualTriggerAriaStopWatch: WatchStopHandle | undefined = undefined\n\nconst TRIGGER_ELE_EVENTS = [\n 'onMouseenter',\n 'onMouseleave',\n 'onClick',\n 'onKeydown',\n 'onFocus',\n 'onBlur',\n 'onContextmenu',\n] as const\n\nonMounted(() => {\n watch(\n () => props.virtualRef,\n (virtualEl) => {\n if (virtualEl) {\n triggerRef.value = unrefElement(virtualEl as HTMLElement)\n }\n },\n {\n immediate: true,\n }\n )\n\n watch(\n triggerRef,\n (el, prevEl) => {\n virtualTriggerAriaStopWatch?.()\n virtualTriggerAriaStopWatch = undefined\n if (isElement(el)) {\n TRIGGER_ELE_EVENTS.forEach((eventName) => {\n const handler = props[eventName]\n if (handler) {\n ;(el as HTMLElement).addEventListener(\n eventName.slice(2).toLowerCase(),\n handler\n )\n ;(prevEl as HTMLElement)?.removeEventListener?.(\n eventName.slice(2).toLowerCase(),\n handler\n )\n }\n })\n if (isFocusable(el as HTMLElement)) {\n virtualTriggerAriaStopWatch = watch(\n [ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded],\n (watches) => {\n ;[\n 'aria-controls',\n 'aria-describedby',\n 'aria-haspopup',\n 'aria-expanded',\n ].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 }\n if (isElement(prevEl) && isFocusable(prevEl as HTMLElement)) {\n ;[\n 'aria-controls',\n 'aria-describedby',\n 'aria-haspopup',\n 'aria-expanded',\n ].forEach((key) => prevEl.removeAttribute(key))\n }\n },\n {\n immediate: true,\n }\n )\n})\n\nonBeforeUnmount(() => {\n virtualTriggerAriaStopWatch?.()\n virtualTriggerAriaStopWatch = undefined\n if (triggerRef.value && isElement(triggerRef.value)) {\n const el = triggerRef.value as HTMLElement\n TRIGGER_ELE_EVENTS.forEach((eventName) => {\n const handler = props[eventName]\n if (handler) {\n el.removeEventListener(eventName.slice(2).toLowerCase(), handler)\n }\n })\n triggerRef.value = undefined\n }\n})\n\ndefineExpose({\n /**\n * @description trigger element\n */\n triggerRef,\n})\n</script>\n"],"names":["inject","POPPER_INJECTION_KEY","useForwardRef","computed","onMounted","watch","unrefElement","isElement","isFocusable","isNil","onBeforeUnmount","_openBlock","_createBlock","_unref","ElOnlyChild","_mergeProps","_withCtx","_renderSlot","_createCommentVNode","_export_sfc"],"mappings":";;;;;;;;;;;;;;;uCAyBc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAA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|
5
|
-
var
|
6
|
-
var lodashUnified = require('lodash-unified');
|
7
|
-
var core = require('@vueuse/core');
|
8
|
-
var constants = require('./constants.js');
|
9
|
-
var trigger = require('./trigger.js');
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
11
|
-
var index = require('../../../hooks/use-forward-ref/index.js');
|
12
|
-
var aria = require('../../../utils/dom/aria.js');
|
13
|
-
var onlyChild = require('../../slot/src/only-child.js');
|
14
|
-
var types = require('../../../utils/types.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
15
6
|
|
16
|
-
const
|
17
|
-
|
18
|
-
|
7
|
+
const popperTriggerProps = runtime.buildProps({
|
8
|
+
virtualRef: {
|
9
|
+
type: runtime.definePropType(Object)
|
10
|
+
},
|
11
|
+
virtualTriggering: Boolean,
|
12
|
+
onMouseenter: {
|
13
|
+
type: runtime.definePropType(Function)
|
14
|
+
},
|
15
|
+
onMouseleave: {
|
16
|
+
type: runtime.definePropType(Function)
|
17
|
+
},
|
18
|
+
onClick: {
|
19
|
+
type: runtime.definePropType(Function)
|
20
|
+
},
|
21
|
+
onKeydown: {
|
22
|
+
type: runtime.definePropType(Function)
|
23
|
+
},
|
24
|
+
onFocus: {
|
25
|
+
type: runtime.definePropType(Function)
|
26
|
+
},
|
27
|
+
onBlur: {
|
28
|
+
type: runtime.definePropType(Function)
|
29
|
+
},
|
30
|
+
onContextmenu: {
|
31
|
+
type: runtime.definePropType(Function)
|
32
|
+
},
|
33
|
+
id: String,
|
34
|
+
open: Boolean
|
19
35
|
});
|
20
|
-
const
|
21
|
-
...__default__,
|
22
|
-
props: trigger.popperTriggerProps,
|
23
|
-
setup(__props, { expose }) {
|
24
|
-
const props = __props;
|
25
|
-
const { role, triggerRef } = vue.inject(constants.POPPER_INJECTION_KEY, void 0);
|
26
|
-
index.useForwardRef(triggerRef);
|
27
|
-
const ariaControls = vue.computed(() => {
|
28
|
-
return ariaHaspopup.value ? props.id : void 0;
|
29
|
-
});
|
30
|
-
const ariaDescribedby = vue.computed(() => {
|
31
|
-
if (role && role.value === "tooltip") {
|
32
|
-
return props.open && props.id ? props.id : void 0;
|
33
|
-
}
|
34
|
-
return void 0;
|
35
|
-
});
|
36
|
-
const ariaHaspopup = vue.computed(() => {
|
37
|
-
if (role && role.value !== "tooltip") {
|
38
|
-
return role.value;
|
39
|
-
}
|
40
|
-
return void 0;
|
41
|
-
});
|
42
|
-
const ariaExpanded = vue.computed(() => {
|
43
|
-
return ariaHaspopup.value ? `${props.open}` : void 0;
|
44
|
-
});
|
45
|
-
let virtualTriggerAriaStopWatch = void 0;
|
46
|
-
const TRIGGER_ELE_EVENTS = [
|
47
|
-
"onMouseenter",
|
48
|
-
"onMouseleave",
|
49
|
-
"onClick",
|
50
|
-
"onKeydown",
|
51
|
-
"onFocus",
|
52
|
-
"onBlur",
|
53
|
-
"onContextmenu"
|
54
|
-
];
|
55
|
-
vue.onMounted(() => {
|
56
|
-
vue.watch(() => props.virtualRef, (virtualEl) => {
|
57
|
-
if (virtualEl) {
|
58
|
-
triggerRef.value = core.unrefElement(virtualEl);
|
59
|
-
}
|
60
|
-
}, {
|
61
|
-
immediate: true
|
62
|
-
});
|
63
|
-
vue.watch(triggerRef, (el, prevEl) => {
|
64
|
-
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
65
|
-
virtualTriggerAriaStopWatch = void 0;
|
66
|
-
if (types.isElement(el)) {
|
67
|
-
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
68
|
-
var _a;
|
69
|
-
const handler = props[eventName];
|
70
|
-
if (handler) {
|
71
|
-
el.addEventListener(eventName.slice(2).toLowerCase(), handler);
|
72
|
-
(_a = prevEl == null ? void 0 : prevEl.removeEventListener) == null ? void 0 : _a.call(prevEl, eventName.slice(2).toLowerCase(), handler);
|
73
|
-
}
|
74
|
-
});
|
75
|
-
if (aria.isFocusable(el)) {
|
76
|
-
virtualTriggerAriaStopWatch = vue.watch([ariaControls, ariaDescribedby, ariaHaspopup, ariaExpanded], (watches) => {
|
77
|
-
[
|
78
|
-
"aria-controls",
|
79
|
-
"aria-describedby",
|
80
|
-
"aria-haspopup",
|
81
|
-
"aria-expanded"
|
82
|
-
].forEach((key, idx) => {
|
83
|
-
lodashUnified.isNil(watches[idx]) ? el.removeAttribute(key) : el.setAttribute(key, watches[idx]);
|
84
|
-
});
|
85
|
-
}, { immediate: true });
|
86
|
-
}
|
87
|
-
}
|
88
|
-
if (types.isElement(prevEl) && aria.isFocusable(prevEl)) {
|
89
|
-
[
|
90
|
-
"aria-controls",
|
91
|
-
"aria-describedby",
|
92
|
-
"aria-haspopup",
|
93
|
-
"aria-expanded"
|
94
|
-
].forEach((key) => prevEl.removeAttribute(key));
|
95
|
-
}
|
96
|
-
}, {
|
97
|
-
immediate: true
|
98
|
-
});
|
99
|
-
});
|
100
|
-
vue.onBeforeUnmount(() => {
|
101
|
-
virtualTriggerAriaStopWatch == null ? void 0 : virtualTriggerAriaStopWatch();
|
102
|
-
virtualTriggerAriaStopWatch = void 0;
|
103
|
-
if (triggerRef.value && types.isElement(triggerRef.value)) {
|
104
|
-
const el = triggerRef.value;
|
105
|
-
TRIGGER_ELE_EVENTS.forEach((eventName) => {
|
106
|
-
const handler = props[eventName];
|
107
|
-
if (handler) {
|
108
|
-
el.removeEventListener(eventName.slice(2).toLowerCase(), handler);
|
109
|
-
}
|
110
|
-
});
|
111
|
-
triggerRef.value = void 0;
|
112
|
-
}
|
113
|
-
});
|
114
|
-
expose({
|
115
|
-
triggerRef
|
116
|
-
});
|
117
|
-
return (_ctx, _cache) => {
|
118
|
-
return !_ctx.virtualTriggering ? (vue.openBlock(), vue.createBlock(vue.unref(onlyChild.OnlyChild), vue.mergeProps({ key: 0 }, _ctx.$attrs, {
|
119
|
-
"aria-controls": vue.unref(ariaControls),
|
120
|
-
"aria-describedby": vue.unref(ariaDescribedby),
|
121
|
-
"aria-expanded": vue.unref(ariaExpanded),
|
122
|
-
"aria-haspopup": vue.unref(ariaHaspopup)
|
123
|
-
}), {
|
124
|
-
default: vue.withCtx(() => [
|
125
|
-
vue.renderSlot(_ctx.$slots, "default")
|
126
|
-
]),
|
127
|
-
_: 3
|
128
|
-
}, 16, ["aria-controls", "aria-describedby", "aria-expanded", "aria-haspopup"])) : vue.createCommentVNode("v-if", true);
|
129
|
-
};
|
130
|
-
}
|
131
|
-
});
|
132
|
-
var ElPopperTrigger = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "trigger.vue"]]);
|
36
|
+
const usePopperTriggerProps = popperTriggerProps;
|
133
37
|
|
134
|
-
exports
|
38
|
+
exports.popperTriggerProps = popperTriggerProps;
|
39
|
+
exports.usePopperTriggerProps = usePopperTriggerProps;
|
135
40
|
//# sourceMappingURL=trigger2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trigger2.js","sources":["../../../../../../packages/components/popper/src/trigger.
|
1
|
+
{"version":3,"file":"trigger2.js","sources":["../../../../../../packages/components/popper/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { Measurable } from './constants'\nimport type Trigger from './trigger.vue'\n\nexport const popperTriggerProps = buildProps({\n virtualRef: {\n type: definePropType<Measurable>(Object),\n },\n virtualTriggering: Boolean,\n onMouseenter: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onMouseleave: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onClick: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onKeydown: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onFocus: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onBlur: {\n type: definePropType<(e: Event) => void>(Function),\n },\n onContextmenu: {\n type: definePropType<(e: Event) => void>(Function),\n },\n id: String,\n open: Boolean,\n} as const)\n\nexport type PopperTriggerProps = typeof popperTriggerProps\n\nexport type PopperTriggerInstance = InstanceType<typeof Trigger>\n\n/** @deprecated use `popperTriggerProps` instead, and it will be deprecated in the next major version */\nexport const usePopperTriggerProps = popperTriggerProps\n\n/** @deprecated use `PopperTriggerInstance` instead, and it will be deprecated in the next major version */\nexport type ElPopperArrowTrigger = PopperTriggerInstance\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;AACY,MAAC,kBAAkB,GAAGA,kBAAU,CAAC;AAC7C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,iBAAiB,EAAE,OAAO;AAC5B,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,IAAI,EAAE,OAAO;AACf,CAAC,EAAE;AACS,MAAC,qBAAqB,GAAG;;;;;"}
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var radio$1 = require('./src/
|
5
|
+
var radio$1 = require('./src/radio.js');
|
6
6
|
var radioButton$1 = require('./src/radio-button2.js');
|
7
7
|
var radioGroup$1 = require('./src/radio-group.js');
|
8
|
-
var radio = require('./src/
|
8
|
+
var radio = require('./src/radio2.js');
|
9
9
|
var radioGroup = require('./src/radio-group2.js');
|
10
10
|
var radioButton = require('./src/radio-button.js');
|
11
11
|
var constants = require('./src/constants.js');
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var radio = require('./
|
5
|
+
var radio = require('./radio2.js');
|
6
6
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
7
7
|
var index = require('../../../hooks/use-size/index.js');
|
8
8
|
var index$1 = require('../../../hooks/use-aria/index.js');
|