@element-plus/nightly 0.0.20250101 → 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 +20 -32
- 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 +20 -32
- 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 +1 -1
- package/es/components/anchor/src/anchor-link.mjs +5 -81
- package/es/components/anchor/src/anchor-link.mjs.map +1 -1
- package/es/components/anchor/src/anchor-link2.mjs +81 -5
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -1
- package/es/components/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/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 +4 -4
- package/es/components/carousel/src/carousel-item.mjs +69 -7
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +7 -69
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +61 -204
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +204 -61
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +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/checkbox/index.mjs +2 -2
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox.mjs +59 -119
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +119 -59
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +402 -40
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +40 -402
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +126 -26
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +26 -126
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- 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/index.mjs +29 -29
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +24 -49
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +49 -24
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/menu/index.mjs +4 -4
- 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/menu/src/menu-item.mjs +14 -96
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +96 -14
- package/es/components/menu/src/menu-item2.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/pagination.mjs +1 -1
- 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/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +53 -207
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +207 -53
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +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/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/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 +4 -4
- 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/skeleton.mjs +21 -48
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +48 -21
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/steps/index.mjs +4 -4
- 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/steps/src/steps.mjs +35 -38
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +38 -35
- package/es/components/steps/src/steps2.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/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/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +79 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -79
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +10 -47
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +47 -10
- package/es/components/upload/src/upload-dragger2.mjs.map +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/index.mjs +29 -29
- 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 +1 -1
- package/lib/components/anchor/src/anchor-link.js +5 -81
- package/lib/components/anchor/src/anchor-link.js.map +1 -1
- package/lib/components/anchor/src/anchor-link2.js +81 -5
- package/lib/components/anchor/src/anchor-link2.js.map +1 -1
- package/lib/components/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/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 +4 -4
- package/lib/components/carousel/src/carousel-item.js +69 -7
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +7 -69
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +62 -204
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +204 -62
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +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/checkbox/index.js +2 -2
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox.js +60 -119
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +119 -60
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +400 -40
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +40 -400
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +126 -26
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +26 -126
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- 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/index.js +29 -29
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +25 -49
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +49 -25
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/menu/index.js +4 -4
- 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/menu/src/menu-item.js +15 -96
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +96 -15
- package/lib/components/menu/src/menu-item2.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/pagination.js +1 -1
- 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/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +53 -207
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +207 -53
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +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/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/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 +4 -4
- 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/skeleton.js +21 -48
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +48 -21
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/steps/index.js +4 -4
- 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/steps/src/steps.js +36 -38
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +38 -36
- package/lib/components/steps/src/steps2.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/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/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +79 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -79
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +11 -47
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +47 -11
- package/lib/components/upload/src/upload-dragger2.js.map +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/index.js +29 -29
- 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
@@ -2,117 +2,55 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
7
|
-
var visualHidden = require('../../visual-hidden/src/visual-hidden2.js');
|
8
|
-
var constants = require('./constants.js');
|
9
|
-
var content = require('./content2.js');
|
10
|
-
var common = require('./common.js');
|
11
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
12
|
-
var index = require('../../../hooks/use-floating/index.js');
|
13
|
-
var index$1 = require('../../../hooks/use-z-index/index.js');
|
14
|
-
var index$2 = require('../../../hooks/use-namespace/index.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
6
|
+
var index = require('../../../hooks/use-aria/index.js');
|
15
7
|
|
16
|
-
const
|
17
|
-
|
8
|
+
const tooltipV2Strategies = ["absolute", "fixed"];
|
9
|
+
const tooltipV2Placements = [
|
10
|
+
"top-start",
|
11
|
+
"top-end",
|
12
|
+
"top",
|
13
|
+
"bottom-start",
|
14
|
+
"bottom-end",
|
15
|
+
"bottom",
|
16
|
+
"left-start",
|
17
|
+
"left-end",
|
18
|
+
"left",
|
19
|
+
"right-start",
|
20
|
+
"right-end",
|
21
|
+
"right"
|
22
|
+
];
|
23
|
+
const tooltipV2ContentProps = runtime.buildProps({
|
24
|
+
arrowPadding: {
|
25
|
+
type: runtime.definePropType(Number),
|
26
|
+
default: 5
|
27
|
+
},
|
28
|
+
effect: {
|
29
|
+
type: runtime.definePropType(String),
|
30
|
+
default: "light"
|
31
|
+
},
|
32
|
+
contentClass: String,
|
33
|
+
placement: {
|
34
|
+
type: runtime.definePropType(String),
|
35
|
+
values: tooltipV2Placements,
|
36
|
+
default: "bottom"
|
37
|
+
},
|
38
|
+
reference: {
|
39
|
+
type: runtime.definePropType(Object),
|
40
|
+
default: null
|
41
|
+
},
|
42
|
+
offset: {
|
43
|
+
type: Number,
|
44
|
+
default: 8
|
45
|
+
},
|
46
|
+
strategy: {
|
47
|
+
type: runtime.definePropType(String),
|
48
|
+
values: tooltipV2Strategies,
|
49
|
+
default: "absolute"
|
50
|
+
},
|
51
|
+
showArrow: Boolean,
|
52
|
+
...index.useAriaProps(["ariaLabel"])
|
18
53
|
});
|
19
|
-
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
20
|
-
...__default__,
|
21
|
-
props: { ...content.tooltipV2ContentProps, ...common.tooltipV2CommonProps },
|
22
|
-
setup(__props) {
|
23
|
-
const props = __props;
|
24
|
-
const { triggerRef, contentId } = vue.inject(constants.tooltipV2RootKey);
|
25
|
-
const placement = vue.ref(props.placement);
|
26
|
-
const strategy = vue.ref(props.strategy);
|
27
|
-
const arrowRef = vue.ref(null);
|
28
|
-
const { referenceRef, contentRef, middlewareData, x, y, update } = index.useFloating({
|
29
|
-
placement,
|
30
|
-
strategy,
|
31
|
-
middleware: vue.computed(() => {
|
32
|
-
const middleware = [dom.offset(props.offset)];
|
33
|
-
if (props.showArrow) {
|
34
|
-
middleware.push(index.arrowMiddleware({
|
35
|
-
arrowRef
|
36
|
-
}));
|
37
|
-
}
|
38
|
-
return middleware;
|
39
|
-
})
|
40
|
-
});
|
41
|
-
const zIndex = index$1.useZIndex().nextZIndex();
|
42
|
-
const ns = index$2.useNamespace("tooltip-v2");
|
43
|
-
const side = vue.computed(() => {
|
44
|
-
return placement.value.split("-")[0];
|
45
|
-
});
|
46
|
-
const contentStyle = vue.computed(() => {
|
47
|
-
return {
|
48
|
-
position: vue.unref(strategy),
|
49
|
-
top: `${vue.unref(y) || 0}px`,
|
50
|
-
left: `${vue.unref(x) || 0}px`,
|
51
|
-
zIndex
|
52
|
-
};
|
53
|
-
});
|
54
|
-
const arrowStyle = vue.computed(() => {
|
55
|
-
if (!props.showArrow)
|
56
|
-
return {};
|
57
|
-
const { arrow } = vue.unref(middlewareData);
|
58
|
-
return {
|
59
|
-
[`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow == null ? void 0 : arrow.x}px` || "",
|
60
|
-
[`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow == null ? void 0 : arrow.y}px` || ""
|
61
|
-
};
|
62
|
-
});
|
63
|
-
const contentClass = vue.computed(() => [
|
64
|
-
ns.e("content"),
|
65
|
-
ns.is("dark", props.effect === "dark"),
|
66
|
-
ns.is(vue.unref(strategy)),
|
67
|
-
props.contentClass
|
68
|
-
]);
|
69
|
-
vue.watch(arrowRef, () => update());
|
70
|
-
vue.watch(() => props.placement, (val) => placement.value = val);
|
71
|
-
vue.onMounted(() => {
|
72
|
-
vue.watch(() => props.reference || triggerRef.value, (el) => {
|
73
|
-
referenceRef.value = el || void 0;
|
74
|
-
}, {
|
75
|
-
immediate: true
|
76
|
-
});
|
77
|
-
});
|
78
|
-
vue.provide(constants.tooltipV2ContentKey, { arrowRef });
|
79
|
-
return (_ctx, _cache) => {
|
80
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
81
|
-
ref_key: "contentRef",
|
82
|
-
ref: contentRef,
|
83
|
-
style: vue.normalizeStyle(vue.unref(contentStyle)),
|
84
|
-
"data-tooltip-v2-root": ""
|
85
|
-
}, [
|
86
|
-
!_ctx.nowrap ? (vue.openBlock(), vue.createElementBlock("div", {
|
87
|
-
key: 0,
|
88
|
-
"data-side": vue.unref(side),
|
89
|
-
class: vue.normalizeClass(vue.unref(contentClass))
|
90
|
-
}, [
|
91
|
-
vue.renderSlot(_ctx.$slots, "default", {
|
92
|
-
contentStyle: vue.unref(contentStyle),
|
93
|
-
contentClass: vue.unref(contentClass)
|
94
|
-
}),
|
95
|
-
vue.createVNode(vue.unref(visualHidden["default"]), {
|
96
|
-
id: vue.unref(contentId),
|
97
|
-
role: "tooltip"
|
98
|
-
}, {
|
99
|
-
default: vue.withCtx(() => [
|
100
|
-
_ctx.ariaLabel ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
101
|
-
vue.createTextVNode(vue.toDisplayString(_ctx.ariaLabel), 1)
|
102
|
-
], 64)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
|
103
|
-
]),
|
104
|
-
_: 3
|
105
|
-
}, 8, ["id"]),
|
106
|
-
vue.renderSlot(_ctx.$slots, "arrow", {
|
107
|
-
style: vue.normalizeStyle(vue.unref(arrowStyle)),
|
108
|
-
side: vue.unref(side)
|
109
|
-
})
|
110
|
-
], 10, ["data-side"])) : vue.createCommentVNode("v-if", true)
|
111
|
-
], 4);
|
112
|
-
};
|
113
|
-
}
|
114
|
-
});
|
115
|
-
var TooltipV2Content = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "content.vue"]]);
|
116
54
|
|
117
|
-
exports
|
55
|
+
exports.tooltipV2ContentProps = tooltipV2ContentProps;
|
118
56
|
//# sourceMappingURL=content.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content.js","sources":["../../../../../../packages/components/tooltip-v2/src/content.
|
1
|
+
{"version":3,"file":"content.js","sources":["../../../../../../packages/components/tooltip-v2/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\n\nimport type { PopperEffect } from '@element-plus/components/popper'\nimport type { ExtractPropTypes } from 'vue'\nimport type { Placement, Strategy, VirtualElement } from '@floating-ui/dom'\n\nconst tooltipV2Strategies = ['absolute', 'fixed'] as const\n\nconst tooltipV2Placements = [\n 'top-start',\n 'top-end',\n 'top',\n 'bottom-start',\n 'bottom-end',\n 'bottom',\n 'left-start',\n 'left-end',\n 'left',\n 'right-start',\n 'right-end',\n 'right',\n] as const\n\nexport const tooltipV2ContentProps = buildProps({\n arrowPadding: {\n type: definePropType<number>(Number),\n default: 5,\n },\n effect: {\n type: definePropType<PopperEffect>(String),\n default: 'light',\n },\n contentClass: String,\n /**\n * Placement of tooltip content relative to reference element (when absent it refers to trigger)\n */\n placement: {\n type: definePropType<Placement>(String),\n values: tooltipV2Placements,\n default: 'bottom',\n },\n /**\n * Reference element for tooltip content to set its position\n */\n reference: {\n type: definePropType<HTMLElement | VirtualElement | null>(Object),\n default: null,\n },\n offset: {\n type: Number,\n default: 8,\n },\n strategy: {\n type: definePropType<Strategy>(String),\n values: tooltipV2Strategies,\n default: 'absolute',\n },\n showArrow: Boolean,\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type TooltipV2ContentProps = ExtractPropTypes<\n typeof tooltipV2ContentProps\n>\n"],"names":["buildProps","definePropType","useAriaProps"],"mappings":";;;;;;;AAEA,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AAClD,MAAM,mBAAmB,GAAG;AAC5B,EAAE,WAAW;AACb,EAAE,SAAS;AACX,EAAE,KAAK;AACP,EAAE,cAAc;AAChB,EAAE,YAAY;AACd,EAAE,QAAQ;AACV,EAAE,YAAY;AACd,EAAE,UAAU;AACZ,EAAE,MAAM;AACR,EAAE,aAAa;AACf,EAAE,WAAW;AACb,EAAE,OAAO;AACT,CAAC,CAAC;AACU,MAAC,qBAAqB,GAAGA,kBAAU,CAAC;AAChD,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,mBAAmB;AAC/B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,mBAAmB;AAC/B,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,GAAGC,kBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;;;;"}
|
@@ -2,55 +2,117 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var dom = require('@floating-ui/dom');
|
7
|
+
var visualHidden = require('../../visual-hidden/src/visual-hidden.js');
|
8
|
+
var constants = require('./constants.js');
|
9
|
+
var content = require('./content.js');
|
10
|
+
var common = require('./common.js');
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
12
|
+
var index = require('../../../hooks/use-floating/index.js');
|
13
|
+
var index$1 = require('../../../hooks/use-z-index/index.js');
|
14
|
+
var index$2 = require('../../../hooks/use-namespace/index.js');
|
7
15
|
|
8
|
-
const
|
9
|
-
|
10
|
-
"top-start",
|
11
|
-
"top-end",
|
12
|
-
"top",
|
13
|
-
"bottom-start",
|
14
|
-
"bottom-end",
|
15
|
-
"bottom",
|
16
|
-
"left-start",
|
17
|
-
"left-end",
|
18
|
-
"left",
|
19
|
-
"right-start",
|
20
|
-
"right-end",
|
21
|
-
"right"
|
22
|
-
];
|
23
|
-
const tooltipV2ContentProps = runtime.buildProps({
|
24
|
-
arrowPadding: {
|
25
|
-
type: runtime.definePropType(Number),
|
26
|
-
default: 5
|
27
|
-
},
|
28
|
-
effect: {
|
29
|
-
type: runtime.definePropType(String),
|
30
|
-
default: "light"
|
31
|
-
},
|
32
|
-
contentClass: String,
|
33
|
-
placement: {
|
34
|
-
type: runtime.definePropType(String),
|
35
|
-
values: tooltipV2Placements,
|
36
|
-
default: "bottom"
|
37
|
-
},
|
38
|
-
reference: {
|
39
|
-
type: runtime.definePropType(Object),
|
40
|
-
default: null
|
41
|
-
},
|
42
|
-
offset: {
|
43
|
-
type: Number,
|
44
|
-
default: 8
|
45
|
-
},
|
46
|
-
strategy: {
|
47
|
-
type: runtime.definePropType(String),
|
48
|
-
values: tooltipV2Strategies,
|
49
|
-
default: "absolute"
|
50
|
-
},
|
51
|
-
showArrow: Boolean,
|
52
|
-
...index.useAriaProps(["ariaLabel"])
|
16
|
+
const __default__ = vue.defineComponent({
|
17
|
+
name: "ElTooltipV2Content"
|
53
18
|
});
|
19
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
20
|
+
...__default__,
|
21
|
+
props: { ...content.tooltipV2ContentProps, ...common.tooltipV2CommonProps },
|
22
|
+
setup(__props) {
|
23
|
+
const props = __props;
|
24
|
+
const { triggerRef, contentId } = vue.inject(constants.tooltipV2RootKey);
|
25
|
+
const placement = vue.ref(props.placement);
|
26
|
+
const strategy = vue.ref(props.strategy);
|
27
|
+
const arrowRef = vue.ref(null);
|
28
|
+
const { referenceRef, contentRef, middlewareData, x, y, update } = index.useFloating({
|
29
|
+
placement,
|
30
|
+
strategy,
|
31
|
+
middleware: vue.computed(() => {
|
32
|
+
const middleware = [dom.offset(props.offset)];
|
33
|
+
if (props.showArrow) {
|
34
|
+
middleware.push(index.arrowMiddleware({
|
35
|
+
arrowRef
|
36
|
+
}));
|
37
|
+
}
|
38
|
+
return middleware;
|
39
|
+
})
|
40
|
+
});
|
41
|
+
const zIndex = index$1.useZIndex().nextZIndex();
|
42
|
+
const ns = index$2.useNamespace("tooltip-v2");
|
43
|
+
const side = vue.computed(() => {
|
44
|
+
return placement.value.split("-")[0];
|
45
|
+
});
|
46
|
+
const contentStyle = vue.computed(() => {
|
47
|
+
return {
|
48
|
+
position: vue.unref(strategy),
|
49
|
+
top: `${vue.unref(y) || 0}px`,
|
50
|
+
left: `${vue.unref(x) || 0}px`,
|
51
|
+
zIndex
|
52
|
+
};
|
53
|
+
});
|
54
|
+
const arrowStyle = vue.computed(() => {
|
55
|
+
if (!props.showArrow)
|
56
|
+
return {};
|
57
|
+
const { arrow } = vue.unref(middlewareData);
|
58
|
+
return {
|
59
|
+
[`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow == null ? void 0 : arrow.x}px` || "",
|
60
|
+
[`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow == null ? void 0 : arrow.y}px` || ""
|
61
|
+
};
|
62
|
+
});
|
63
|
+
const contentClass = vue.computed(() => [
|
64
|
+
ns.e("content"),
|
65
|
+
ns.is("dark", props.effect === "dark"),
|
66
|
+
ns.is(vue.unref(strategy)),
|
67
|
+
props.contentClass
|
68
|
+
]);
|
69
|
+
vue.watch(arrowRef, () => update());
|
70
|
+
vue.watch(() => props.placement, (val) => placement.value = val);
|
71
|
+
vue.onMounted(() => {
|
72
|
+
vue.watch(() => props.reference || triggerRef.value, (el) => {
|
73
|
+
referenceRef.value = el || void 0;
|
74
|
+
}, {
|
75
|
+
immediate: true
|
76
|
+
});
|
77
|
+
});
|
78
|
+
vue.provide(constants.tooltipV2ContentKey, { arrowRef });
|
79
|
+
return (_ctx, _cache) => {
|
80
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
81
|
+
ref_key: "contentRef",
|
82
|
+
ref: contentRef,
|
83
|
+
style: vue.normalizeStyle(vue.unref(contentStyle)),
|
84
|
+
"data-tooltip-v2-root": ""
|
85
|
+
}, [
|
86
|
+
!_ctx.nowrap ? (vue.openBlock(), vue.createElementBlock("div", {
|
87
|
+
key: 0,
|
88
|
+
"data-side": vue.unref(side),
|
89
|
+
class: vue.normalizeClass(vue.unref(contentClass))
|
90
|
+
}, [
|
91
|
+
vue.renderSlot(_ctx.$slots, "default", {
|
92
|
+
contentStyle: vue.unref(contentStyle),
|
93
|
+
contentClass: vue.unref(contentClass)
|
94
|
+
}),
|
95
|
+
vue.createVNode(vue.unref(visualHidden["default"]), {
|
96
|
+
id: vue.unref(contentId),
|
97
|
+
role: "tooltip"
|
98
|
+
}, {
|
99
|
+
default: vue.withCtx(() => [
|
100
|
+
_ctx.ariaLabel ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
101
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.ariaLabel), 1)
|
102
|
+
], 64)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
|
103
|
+
]),
|
104
|
+
_: 3
|
105
|
+
}, 8, ["id"]),
|
106
|
+
vue.renderSlot(_ctx.$slots, "arrow", {
|
107
|
+
style: vue.normalizeStyle(vue.unref(arrowStyle)),
|
108
|
+
side: vue.unref(side)
|
109
|
+
})
|
110
|
+
], 10, ["data-side"])) : vue.createCommentVNode("v-if", true)
|
111
|
+
], 4);
|
112
|
+
};
|
113
|
+
}
|
114
|
+
});
|
115
|
+
var TooltipV2Content = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "content.vue"]]);
|
54
116
|
|
55
|
-
exports
|
117
|
+
exports["default"] = TooltipV2Content;
|
56
118
|
//# sourceMappingURL=content2.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"content2.js","sources":["../../../../../../packages/components/tooltip-v2/src/content.
|
1
|
+
{"version":3,"file":"content2.js","sources":["../../../../../../packages/components/tooltip-v2/src/content.vue"],"sourcesContent":["<template>\n <div ref=\"contentRef\" :style=\"contentStyle\" data-tooltip-v2-root>\n <div v-if=\"!nowrap\" :data-side=\"side\" :class=\"contentClass\">\n <slot :content-style=\"contentStyle\" :content-class=\"contentClass\" />\n <el-visually-hidden :id=\"contentId\" role=\"tooltip\">\n <template v-if=\"ariaLabel\">\n {{ ariaLabel }}\n </template>\n <slot v-else />\n </el-visually-hidden>\n <slot name=\"arrow\" :style=\"arrowStyle\" :side=\"side\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, onMounted, provide, ref, unref, watch } from 'vue'\nimport { offset } from '@floating-ui/dom'\nimport {\n arrowMiddleware,\n useFloating,\n useNamespace,\n useZIndex,\n} from '@element-plus/hooks'\nimport ElVisuallyHidden from '@element-plus/components/visual-hidden'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ContentProps } from './content'\nimport { tooltipV2CommonProps } from './common'\n\nimport type { CSSProperties } from 'vue'\nimport type { Middleware } from '@floating-ui/dom'\n\ndefineOptions({\n name: 'ElTooltipV2Content',\n})\n\nconst props = defineProps({ ...tooltipV2ContentProps, ...tooltipV2CommonProps })\n\nconst { triggerRef, contentId } = inject(tooltipV2RootKey)!\n\nconst placement = ref(props.placement)\nconst strategy = ref(props.strategy)\nconst arrowRef = ref<HTMLElement | null>(null)\n\nconst { referenceRef, contentRef, middlewareData, x, y, update } = useFloating({\n placement,\n strategy,\n middleware: computed(() => {\n const middleware: Middleware[] = [offset(props.offset)]\n\n if (props.showArrow) {\n middleware.push(\n arrowMiddleware({\n arrowRef,\n })\n )\n }\n\n return middleware\n }),\n})\n\nconst zIndex = useZIndex().nextZIndex()\n\nconst ns = useNamespace('tooltip-v2')\n\nconst side = computed(() => {\n return placement.value.split('-')[0]\n})\n\nconst contentStyle = computed<CSSProperties>(() => {\n return {\n position: unref(strategy),\n top: `${unref(y) || 0}px`,\n left: `${unref(x) || 0}px`,\n zIndex,\n }\n})\n\nconst arrowStyle = computed<CSSProperties>(() => {\n if (!props.showArrow) return {}\n\n const { arrow } = unref(middlewareData)\n\n return {\n [`--${ns.namespace.value}-tooltip-v2-arrow-x`]: `${arrow?.x}px` || '',\n [`--${ns.namespace.value}-tooltip-v2-arrow-y`]: `${arrow?.y}px` || '',\n }\n})\n\nconst contentClass = computed(() => [\n ns.e('content'),\n ns.is('dark', props.effect === 'dark'),\n ns.is(unref(strategy)),\n props.contentClass,\n])\n\nwatch(arrowRef, () => update())\n\nwatch(\n () => props.placement,\n (val) => (placement.value = val)\n)\n\nonMounted(() => {\n watch(\n () => props.reference || triggerRef.value,\n (el) => {\n referenceRef.value = el || undefined\n },\n {\n immediate: true,\n }\n )\n})\n\nprovide(tooltipV2ContentKey, { arrowRef })\n</script>\n"],"names":["inject","tooltipV2RootKey","ref","useFloating","computed","offset","arrowMiddleware","useZIndex","useNamespace","unref","watch","onMounted","provide","tooltipV2ContentKey","_openBlock","_createElementBlock","_normalizeStyle","_unref"],"mappings":";;;;;;;;;;;;;;;uCAgCc,CAAA;AAAA,EACZ,IAAM,EAAA,oBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,EAAE,UAAA,EAAY,SAAU,EAAA,GAAIA,WAAOC,0BAAgB,CAAA,CAAA;AAEzD,IAAM,MAAA,SAAA,GAAYC,OAAI,CAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACrC,IAAM,MAAA,QAAA,GAAWA,OAAI,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AACnC,I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,QAAA,SAAgB,EAAA,IAAA;AACd,OAAA,CAAA,CAAA;AAAA,KACE,CAAA,CAAA;AAAoC,IAAAE,WAC5B,CAAAC,6BAAA,EAAA,EAAA,QAAA,EAAA,CAAA,CAAA;AACN,IAAA,OAAA,CAAA,IAAA,EAAA;AAA2B,MAC7B,OAAAC,aAAA,EAAA,EAAAC,sBAAA,CAAA,KAAA,EAAA;AAAA,QACA,OAAA,EAAA,YAAA;AAAA,QAAA,GACa,EAAA,UAAA;AAAA,QACb,KAAA,EAAAC,kBAAA,CAAAC,SAAA,CAAA,YAAA,CAAA,CAAA;AAAA,QACF,sBAAA,EAAA,EAAA;AAAA,OACD,EAAA;AAED,QAAQ,CAAA,IAAA,CAAA,MAAA,IAAAH,aAAuB,EAAA,EAAAC,sBAAU,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,25 +2,87 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
5
|
+
var vue = require('vue');
|
6
|
+
var core = require('@vueuse/core');
|
7
|
+
var constants = require('./constants.js');
|
8
|
+
var root = require('./root2.js');
|
9
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
+
var types = require('../../../utils/types.js');
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
12
|
+
var index$1 = require('../../../hooks/use-id/index.js');
|
6
13
|
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
14
|
+
const __default__ = vue.defineComponent({
|
15
|
+
name: "ElTooltipV2Root"
|
16
|
+
});
|
17
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
18
|
+
...__default__,
|
19
|
+
props: root.tooltipV2RootProps,
|
20
|
+
setup(__props, { expose }) {
|
21
|
+
const props = __props;
|
22
|
+
const _open = vue.ref(props.defaultOpen);
|
23
|
+
const triggerRef = vue.ref(null);
|
24
|
+
const open = vue.computed({
|
25
|
+
get: () => types.isPropAbsent(props.open) ? _open.value : props.open,
|
26
|
+
set: (open2) => {
|
27
|
+
var _a;
|
28
|
+
_open.value = open2;
|
29
|
+
(_a = props["onUpdate:open"]) == null ? void 0 : _a.call(props, open2);
|
30
|
+
}
|
31
|
+
});
|
32
|
+
const isOpenDelayed = vue.computed(() => types.isNumber(props.delayDuration) && props.delayDuration > 0);
|
33
|
+
const { start: onDelayedOpen, stop: clearTimer } = core.useTimeoutFn(() => {
|
34
|
+
open.value = true;
|
35
|
+
}, vue.computed(() => props.delayDuration), {
|
36
|
+
immediate: false
|
37
|
+
});
|
38
|
+
const ns = index.useNamespace("tooltip-v2");
|
39
|
+
const contentId = index$1.useId();
|
40
|
+
const onNormalOpen = () => {
|
41
|
+
clearTimer();
|
42
|
+
open.value = true;
|
43
|
+
};
|
44
|
+
const onDelayOpen = () => {
|
45
|
+
vue.unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen();
|
46
|
+
};
|
47
|
+
const onOpen = onNormalOpen;
|
48
|
+
const onClose = () => {
|
49
|
+
clearTimer();
|
50
|
+
open.value = false;
|
51
|
+
};
|
52
|
+
const onChange = (open2) => {
|
53
|
+
var _a;
|
54
|
+
if (open2) {
|
55
|
+
document.dispatchEvent(new CustomEvent(constants.TOOLTIP_V2_OPEN));
|
56
|
+
onOpen();
|
57
|
+
}
|
58
|
+
(_a = props.onOpenChange) == null ? void 0 : _a.call(props, open2);
|
59
|
+
};
|
60
|
+
vue.watch(open, onChange);
|
61
|
+
vue.onMounted(() => {
|
62
|
+
document.addEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
63
|
+
});
|
64
|
+
vue.onBeforeUnmount(() => {
|
65
|
+
clearTimer();
|
66
|
+
document.removeEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
67
|
+
});
|
68
|
+
vue.provide(constants.tooltipV2RootKey, {
|
69
|
+
contentId,
|
70
|
+
triggerRef,
|
71
|
+
ns,
|
72
|
+
onClose,
|
73
|
+
onDelayOpen,
|
74
|
+
onOpen
|
75
|
+
});
|
76
|
+
expose({
|
77
|
+
onOpen,
|
78
|
+
onClose
|
79
|
+
});
|
80
|
+
return (_ctx, _cache) => {
|
81
|
+
return vue.renderSlot(_ctx.$slots, "default", { open: vue.unref(open) });
|
82
|
+
};
|
22
83
|
}
|
23
84
|
});
|
85
|
+
var TooltipV2Root = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "root.vue"]]);
|
24
86
|
|
25
|
-
exports
|
87
|
+
exports["default"] = TooltipV2Root;
|
26
88
|
//# sourceMappingURL=root.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"root.js","sources":["../../../../../../packages/components/tooltip-v2/src/root.
|
1
|
+
{"version":3,"file":"root.js","sources":["../../../../../../packages/components/tooltip-v2/src/root.vue"],"sourcesContent":["<template>\n <slot :open=\"open\" />\n</template>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n unref,\n watch,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { isNumber, isPropAbsent } from '@element-plus/utils'\nimport { TOOLTIP_V2_OPEN, tooltipV2RootKey } from './constants'\nimport { tooltipV2RootProps } from './root'\n\ndefineOptions({\n name: 'ElTooltipV2Root',\n})\n\nconst props = defineProps(tooltipV2RootProps)\n\n/**\n * internal open state, when no model value was provided, use this as indicator instead\n */\nconst _open = ref(props.defaultOpen)\nconst triggerRef = ref<HTMLElement | null>(null)\n\nconst open = computed<boolean>({\n get: () => (isPropAbsent(props.open) ? _open.value : props.open),\n set: (open) => {\n _open.value = open\n props['onUpdate:open']?.(open)\n },\n})\n\nconst isOpenDelayed = computed(\n () => isNumber(props.delayDuration) && props.delayDuration > 0\n)\n\nconst { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(\n () => {\n open.value = true\n },\n computed(() => props.delayDuration),\n {\n immediate: false,\n }\n)\n\nconst ns = useNamespace('tooltip-v2')\n\nconst contentId = useId()\n\nconst onNormalOpen = () => {\n clearTimer()\n open.value = true\n}\n\nconst onDelayOpen = () => {\n unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen()\n}\n\nconst onOpen = onNormalOpen\n\nconst onClose = () => {\n clearTimer()\n open.value = false\n}\n\nconst onChange = (open: boolean) => {\n if (open) {\n document.dispatchEvent(new CustomEvent(TOOLTIP_V2_OPEN))\n onOpen()\n }\n\n props.onOpenChange?.(open)\n}\n\nwatch(open, onChange)\n\nonMounted(() => {\n // Keeps only 1 tooltip open at a time\n document.addEventListener(TOOLTIP_V2_OPEN, onClose)\n})\n\nonBeforeUnmount(() => {\n clearTimer()\n document.removeEventListener(TOOLTIP_V2_OPEN, onClose)\n})\n\nprovide(tooltipV2RootKey, {\n contentId,\n triggerRef,\n ns,\n\n onClose,\n onDelayOpen,\n onOpen,\n})\n\ndefineExpose({\n /**\n * @description open tooltip programmatically\n */\n onOpen,\n\n /**\n * @description close tooltip programmatically\n */\n onClose,\n})\n</script>\n"],"names":["ref","computed","isPropAbsent","open","isNumber","useTimeoutFn","useNamespace","useId","unref","TOOLTIP_V2_OPEN","watch","onMounted","onBeforeUnmount","provide","tooltipV2RootKey","_renderSlot","_unref","_export_sfc"],"mappings":";;;;;;;;;;;;;uCAoBc,CAAA;AAAA,EACZ,IAAM,EAAA,iBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAOA,IAAM,MAAA,KAAA,GAAQA,OAAI,CAAA,KAAA,CAAM,WAAW,CAAA,CAAA;AACnC,IAAM,MAAA,UAAA,GAAaA,QAAwB,IAAI,CAAA,CAAA;AAE/C,IAAA,MAAM,OAAOC,YAAkB,CAAA;AAAA,MAC7B,GAAA,EAAK,MAAOC,kBAAa,CAAA,KAAA,CAAM,I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AAA,EAAA,CAAA,CAAA,QAAA,EAAA,UAAA,CAAA,CAAA,CAAA;;;;"}
|
@@ -2,87 +2,25 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var
|
6
|
-
var core = require('@vueuse/core');
|
7
|
-
var constants = require('./constants.js');
|
8
|
-
var root = require('./root.js');
|
9
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
10
|
-
var types = require('../../../utils/types.js');
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
12
|
-
var index$1 = require('../../../hooks/use-id/index.js');
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
13
6
|
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
(_a = props["onUpdate:open"]) == null ? void 0 : _a.call(props, open2);
|
30
|
-
}
|
31
|
-
});
|
32
|
-
const isOpenDelayed = vue.computed(() => types.isNumber(props.delayDuration) && props.delayDuration > 0);
|
33
|
-
const { start: onDelayedOpen, stop: clearTimer } = core.useTimeoutFn(() => {
|
34
|
-
open.value = true;
|
35
|
-
}, vue.computed(() => props.delayDuration), {
|
36
|
-
immediate: false
|
37
|
-
});
|
38
|
-
const ns = index.useNamespace("tooltip-v2");
|
39
|
-
const contentId = index$1.useId();
|
40
|
-
const onNormalOpen = () => {
|
41
|
-
clearTimer();
|
42
|
-
open.value = true;
|
43
|
-
};
|
44
|
-
const onDelayOpen = () => {
|
45
|
-
vue.unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen();
|
46
|
-
};
|
47
|
-
const onOpen = onNormalOpen;
|
48
|
-
const onClose = () => {
|
49
|
-
clearTimer();
|
50
|
-
open.value = false;
|
51
|
-
};
|
52
|
-
const onChange = (open2) => {
|
53
|
-
var _a;
|
54
|
-
if (open2) {
|
55
|
-
document.dispatchEvent(new CustomEvent(constants.TOOLTIP_V2_OPEN));
|
56
|
-
onOpen();
|
57
|
-
}
|
58
|
-
(_a = props.onOpenChange) == null ? void 0 : _a.call(props, open2);
|
59
|
-
};
|
60
|
-
vue.watch(open, onChange);
|
61
|
-
vue.onMounted(() => {
|
62
|
-
document.addEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
63
|
-
});
|
64
|
-
vue.onBeforeUnmount(() => {
|
65
|
-
clearTimer();
|
66
|
-
document.removeEventListener(constants.TOOLTIP_V2_OPEN, onClose);
|
67
|
-
});
|
68
|
-
vue.provide(constants.tooltipV2RootKey, {
|
69
|
-
contentId,
|
70
|
-
triggerRef,
|
71
|
-
ns,
|
72
|
-
onClose,
|
73
|
-
onDelayOpen,
|
74
|
-
onOpen
|
75
|
-
});
|
76
|
-
expose({
|
77
|
-
onOpen,
|
78
|
-
onClose
|
79
|
-
});
|
80
|
-
return (_ctx, _cache) => {
|
81
|
-
return vue.renderSlot(_ctx.$slots, "default", { open: vue.unref(open) });
|
82
|
-
};
|
7
|
+
const tooltipV2RootProps = runtime.buildProps({
|
8
|
+
delayDuration: {
|
9
|
+
type: Number,
|
10
|
+
default: 300
|
11
|
+
},
|
12
|
+
defaultOpen: Boolean,
|
13
|
+
open: {
|
14
|
+
type: Boolean,
|
15
|
+
default: void 0
|
16
|
+
},
|
17
|
+
onOpenChange: {
|
18
|
+
type: runtime.definePropType(Function)
|
19
|
+
},
|
20
|
+
"onUpdate:open": {
|
21
|
+
type: runtime.definePropType(Function)
|
83
22
|
}
|
84
23
|
});
|
85
|
-
var TooltipV2Root = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "root.vue"]]);
|
86
24
|
|
87
|
-
exports
|
25
|
+
exports.tooltipV2RootProps = tooltipV2RootProps;
|
88
26
|
//# sourceMappingURL=root2.js.map
|