@element-plus/nightly 0.0.20240927 → 0.0.20240928
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.full.js +4 -6
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +4 -6
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/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/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/autocomplete/src/autocomplete.mjs +1 -1
- package/es/components/badge/src/badge2.mjs +2 -4
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +85 -33
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +33 -85
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +15 -39
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +39 -15
- 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-group.mjs +30 -73
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +73 -30
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +28 -18
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +18 -28
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.mjs +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +127 -22
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +22 -127
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +2 -2
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +53 -11
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +11 -53
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form.mjs +153 -54
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +54 -153
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +36 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -36
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +19 -19
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +60 -345
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +345 -60
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +9 -59
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +59 -9
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +25 -71
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +71 -25
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +129 -31
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +31 -129
- 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 +6 -66
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button2.mjs +66 -6
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/scrollbar/src/bar.mjs +11 -64
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +64 -11
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +158 -30
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +30 -158
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +19 -191
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +191 -19
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -229
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +229 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +29 -183
- package/es/components/tooltip/src/content.mjs.map +1 -1
- package/es/components/tooltip/src/content2.mjs +183 -29
- package/es/components/tooltip/src/content2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip/src/trigger2.mjs +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +158 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -158
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/index.mjs +2 -2
- package/es/components/transfer/src/composables/use-checked-change.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +1 -1
- package/es/components/transfer/src/transfer.mjs +158 -69
- package/es/components/transfer/src/transfer.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +69 -158
- package/es/components/transfer/src/transfer2.mjs.map +1 -1
- package/es/components/upload/index.mjs +3 -3
- package/es/components/upload/src/upload-content.mjs +198 -33
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +33 -198
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-list.mjs +1 -1
- package/es/components/upload/src/upload.mjs +124 -98
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +98 -124
- package/es/components/upload/src/upload2.mjs.map +1 -1
- package/es/components/upload/src/use-handlers.mjs +1 -1
- package/es/index.mjs +19 -19
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.js +1 -1
- package/lib/components/badge/src/badge2.js +2 -4
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +85 -37
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +37 -85
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +16 -39
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +39 -16
- 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-group.js +31 -73
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +73 -31
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +28 -20
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +20 -28
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.js +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +127 -22
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +22 -127
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +2 -2
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +53 -11
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +11 -53
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form.js +152 -55
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +55 -152
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +36 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -36
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +19 -19
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +59 -343
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +343 -59
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +9 -59
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +59 -9
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +25 -71
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +71 -25
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +129 -32
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +32 -129
- 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 +6 -66
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button2.js +66 -6
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/scrollbar/src/bar.js +11 -64
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +64 -11
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +157 -30
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +30 -157
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +19 -191
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +191 -19
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -228
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +228 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +29 -183
- package/lib/components/tooltip/src/content.js.map +1 -1
- package/lib/components/tooltip/src/content2.js +183 -29
- package/lib/components/tooltip/src/content2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip/src/trigger2.js +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +157 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +69 -157
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/index.js +2 -2
- package/lib/components/transfer/src/composables/use-checked-change.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +1 -1
- package/lib/components/transfer/src/transfer.js +158 -73
- package/lib/components/transfer/src/transfer.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +73 -158
- package/lib/components/transfer/src/transfer2.js.map +1 -1
- package/lib/components/upload/index.js +3 -3
- package/lib/components/upload/src/upload-content.js +197 -32
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +32 -197
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-list.js +1 -1
- package/lib/components/upload/src/upload.js +124 -101
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload2.js +101 -124
- package/lib/components/upload/src/upload2.js.map +1 -1
- package/lib/components/upload/src/use-handlers.js +1 -1
- package/lib/index.js +19 -19
- 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-badge.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/badge.scss +4 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch2.mjs","sources":["../../../../../../packages/components/switch/src/switch.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n iconPropType,\n isBoolean,\n isNumber,\n isString,\n isValidComponentSize,\n} from '@element-plus/utils'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useAriaProps } from '@element-plus/hooks'\nimport type { ComponentSize } from '@element-plus/constants'\nimport type Switch from './switch.vue'\nimport type { ExtractPropTypes, PropType } from 'vue'\n\nexport const switchProps = buildProps({\n /**\n * @description binding value, it should be equivalent to either `active-value` or `inactive-value`, by default it's `boolean` type\n */\n modelValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description whether Switch is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Switch is in loading state\n */\n loading: Boolean,\n /**\n * @description size of Switch\n */\n size: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n /**\n * @description width of Switch\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether icon or text is displayed inside dot, only the first character will be rendered for text\n */\n inlinePrompt: Boolean,\n /**\n * @description component of the icon displayed in action when in `off` state\n */\n inactiveActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed in action when in `on` state\n */\n activeActionIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `on` state, overrides `active-text`\n */\n activeIcon: {\n type: iconPropType,\n },\n /**\n * @description component of the icon displayed when in `off` state, overrides `inactive-text`\n */\n inactiveIcon: {\n type: iconPropType,\n },\n /**\n * @description text displayed when in `on` state\n */\n activeText: {\n type: String,\n default: '',\n },\n /**\n * @description text displayed when in `off` state\n */\n inactiveText: {\n type: String,\n default: '',\n },\n /**\n * @description switch value when in `on` state\n */\n activeValue: {\n type: [Boolean, String, Number],\n default: true,\n },\n /**\n * @description switch value when in `off` state\n */\n inactiveValue: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description input name of Switch\n */\n name: {\n type: String,\n default: '',\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description before-change hook before the switch state changes. If `false` is returned or a `Promise` is returned and then is rejected, will stop switching\n */\n beforeChange: {\n type: definePropType<() => Promise<boolean> | boolean>(Function),\n },\n /**\n * @description id for input\n */\n id: String,\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\n\nexport const switchEmits = {\n [UPDATE_MODEL_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [CHANGE_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n [INPUT_EVENT]: (val: boolean | string | number) =>\n isBoolean(val) || isString(val) || isNumber(val),\n}\nexport type SwitchEmits = typeof switchEmits\n\nexport type SwitchInstance = InstanceType<typeof Switch>\n"],"names":[],"mappings":";;;;;;;;;;;AAeY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MA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;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC;AACjF,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC;AAC3E,EAAE,CAAC,WAAW,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC;AAC1E;;;;"}
|
|
1
|
+
{"version":3,"file":"switch2.mjs","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div :class=\"switchKls\" @click.prevent=\"switchValue\">\n <input\n :id=\"inputId\"\n ref=\"input\"\n :class=\"ns.e('input')\"\n type=\"checkbox\"\n role=\"switch\"\n :aria-checked=\"checked\"\n :aria-disabled=\"switchDisabled\"\n :aria-label=\"ariaLabel\"\n :name=\"name\"\n :true-value=\"activeValue\"\n :false-value=\"inactiveValue\"\n :disabled=\"switchDisabled\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @keydown.enter=\"switchValue\"\n />\n <span\n v-if=\"!inlinePrompt && (inactiveIcon || inactiveText)\"\n :class=\"labelLeftKls\"\n >\n <el-icon v-if=\"inactiveIcon\">\n <component :is=\"inactiveIcon\" />\n </el-icon>\n <span v-if=\"!inactiveIcon && inactiveText\" :aria-hidden=\"checked\">{{\n inactiveText\n }}</span>\n </span>\n <span ref=\"core\" :class=\"ns.e('core')\" :style=\"coreStyle\">\n <div v-if=\"inlinePrompt\" :class=\"ns.e('inner')\">\n <template v-if=\"activeIcon || inactiveIcon\">\n <el-icon :class=\"ns.is('icon')\">\n <component :is=\"checked ? activeIcon : inactiveIcon\" />\n </el-icon>\n </template>\n <template v-else-if=\"activeText || inactiveText\">\n <span :class=\"ns.is('text')\" :aria-hidden=\"!checked\">\n {{ checked ? activeText : inactiveText }}\n </span>\n </template>\n </div>\n <div :class=\"ns.e('action')\">\n <el-icon v-if=\"loading\" :class=\"ns.is('loading')\">\n <loading />\n </el-icon>\n <slot v-else-if=\"checked\" name=\"active-action\">\n <el-icon v-if=\"activeActionIcon\">\n <component :is=\"activeActionIcon\" />\n </el-icon>\n </slot>\n <slot v-else-if=\"!checked\" name=\"inactive-action\">\n <el-icon v-if=\"inactiveActionIcon\">\n <component :is=\"inactiveActionIcon\" />\n </el-icon>\n </slot>\n </div>\n </span>\n <span\n v-if=\"!inlinePrompt && (activeIcon || activeText)\"\n :class=\"labelRightKls\"\n >\n <el-icon v-if=\"activeIcon\">\n <component :is=\"activeIcon\" />\n </el-icon>\n <span v-if=\"!activeIcon && activeText\" :aria-hidden=\"!checked\">{{\n activeText\n }}</span>\n </span>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, nextTick, onMounted, ref, watch } from 'vue'\nimport {\n addUnit,\n debugWarn,\n isBoolean,\n isPromise,\n throwError,\n} from '@element-plus/utils'\nimport ElIcon from '@element-plus/components/icon'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { Loading } from '@element-plus/icons-vue'\nimport {\n CHANGE_EVENT,\n INPUT_EVENT,\n UPDATE_MODEL_EVENT,\n} from '@element-plus/constants'\nimport { useNamespace } from '@element-plus/hooks'\nimport { switchEmits, switchProps } from './switch'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'ElSwitch'\ndefineOptions({\n name: COMPONENT_NAME,\n})\n\nconst props = defineProps(switchProps)\nconst emit = defineEmits(switchEmits)\n\nconst { formItem } = useFormItem()\nconst switchSize = useFormSize()\nconst ns = useNamespace('switch')\n\nconst { inputId } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst switchDisabled = useFormDisabled(computed(() => props.loading))\nconst isControlled = ref(props.modelValue !== false)\nconst input = ref<HTMLInputElement>()\nconst core = ref<HTMLSpanElement>()\n\nconst switchKls = computed(() => [\n ns.b(),\n ns.m(switchSize.value),\n ns.is('disabled', switchDisabled.value),\n ns.is('checked', checked.value),\n])\n\nconst labelLeftKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'left'),\n ns.is('active', !checked.value),\n])\n\nconst labelRightKls = computed(() => [\n ns.e('label'),\n ns.em('label', 'right'),\n ns.is('active', checked.value),\n])\n\nconst coreStyle = computed<CSSProperties>(() => ({\n width: addUnit(props.width),\n}))\n\nwatch(\n () => props.modelValue,\n () => {\n isControlled.value = true\n }\n)\n\nconst actualValue = computed(() => {\n return isControlled.value ? props.modelValue : false\n})\n\nconst checked = computed(() => actualValue.value === props.activeValue)\n\nif (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {\n emit(UPDATE_MODEL_EVENT, props.inactiveValue)\n emit(CHANGE_EVENT, props.inactiveValue)\n emit(INPUT_EVENT, props.inactiveValue)\n}\n\nwatch(checked, (val) => {\n input.value!.checked = val\n\n if (props.validateEvent) {\n formItem?.validate?.('change').catch((err) => debugWarn(err))\n }\n})\n\nconst handleChange = () => {\n const val = checked.value ? props.inactiveValue : props.activeValue\n emit(UPDATE_MODEL_EVENT, val)\n emit(CHANGE_EVENT, val)\n emit(INPUT_EVENT, val)\n nextTick(() => {\n input.value!.checked = checked.value\n })\n}\n\nconst switchValue = () => {\n if (switchDisabled.value) return\n\n const { beforeChange } = props\n if (!beforeChange) {\n handleChange()\n return\n }\n\n const shouldChange = beforeChange()\n\n const isPromiseOrBool = [\n isPromise(shouldChange),\n isBoolean(shouldChange),\n ].includes(true)\n if (!isPromiseOrBool) {\n throwError(\n COMPONENT_NAME,\n 'beforeChange must return type `Promise<boolean>` or `boolean`'\n )\n }\n\n if (isPromise(shouldChange)) {\n shouldChange\n .then((result) => {\n if (result) {\n handleChange()\n }\n })\n .catch((e) => {\n debugWarn(COMPONENT_NAME, `some error occurred: ${e}`)\n })\n } else if (shouldChange) {\n handleChange()\n }\n}\n\nconst focus = (): void => {\n input.value?.focus?.()\n}\n\nonMounted(() => {\n input.value!.checked = checked.value\n})\n\ndefineExpose({\n /**\n * @description manual focus to the switch component\n **/\n focus,\n /**\n * @description whether Switch is checked\n */\n checked,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;mCAoGc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,aAAa,WAAY,EAAA,CAAA;AAC/B,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,EAAE,OAAY,EAAA,GAAA,kBAAA,CAAmB,KAAO,EAAA;AAAA,MAC5C,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,iBAAiB,eAAgB,CAAA,QAAA,CAAS,MAAM,KAAA,CAAM,OAAO,CAAC,CAAA,CAAA;AACpE,IAAA,MAAM,YAAe,GAAA,GAAA,CAAI,KAAM,CAAA,UAAA,KAAe,KAAK,CAAA,CAAA;AACnD,IAAA,MAAM,QAAQ,GAAsB,EAAA,CAAA;AACpC,IAAA,MAAM,OAAO,GAAqB,EAAA,CAAA;AAElC,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;AAAA,MAC/B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,UAAA,CAAW,KAAK,CAAA;AAAA,MACrB,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,cAAA,CAAe,KAAK,CAAA;AAAA,MACtC,EAAG,CAAA,EAAA,CAAG,SA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,7 +2,7 @@ import '../../utils/index.mjs';
|
|
|
2
2
|
import Tooltip from './src/tooltip2.mjs';
|
|
3
3
|
export { tooltipEmits, useTooltipModelToggle, useTooltipModelToggleEmits, useTooltipModelToggleProps, useTooltipProps } from './src/tooltip.mjs';
|
|
4
4
|
export { useTooltipTriggerProps } from './src/trigger.mjs';
|
|
5
|
-
export { useTooltipContentProps } from './src/
|
|
5
|
+
export { useTooltipContentProps } from './src/content.mjs';
|
|
6
6
|
export { TOOLTIP_INJECTION_KEY } from './src/constants.mjs';
|
|
7
7
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
8
8
|
|
|
@@ -1,189 +1,35 @@
|
|
|
1
|
-
import { defineComponent, ref, inject, computed, onBeforeUnmount, unref, watch, openBlock, createBlock, withCtx, createVNode, Transition, withDirectives, mergeProps, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
2
|
-
import { onClickOutside } from '@vueuse/core';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
1
|
import '../../../utils/index.mjs';
|
|
5
2
|
import '../../popper/index.mjs';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
-
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
13
|
-
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
+
import { useDelayedToggleProps } from '../../../hooks/use-delayed-toggle/index.mjs';
|
|
6
|
+
import { popperContentProps } from '../../popper/src/content.mjs';
|
|
7
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
|
14
8
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onBeforeHide
|
|
39
|
-
} = inject(TOOLTIP_INJECTION_KEY, void 0);
|
|
40
|
-
const transitionClass = computed(() => {
|
|
41
|
-
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
42
|
-
});
|
|
43
|
-
const persistentRef = computed(() => {
|
|
44
|
-
if (process.env.NODE_ENV === "test") {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
return props.persistent;
|
|
48
|
-
});
|
|
49
|
-
onBeforeUnmount(() => {
|
|
50
|
-
stopHandle == null ? void 0 : stopHandle();
|
|
51
|
-
});
|
|
52
|
-
const shouldRender = computed(() => {
|
|
53
|
-
return unref(persistentRef) ? true : unref(open);
|
|
54
|
-
});
|
|
55
|
-
const shouldShow = computed(() => {
|
|
56
|
-
return props.disabled ? false : unref(open);
|
|
57
|
-
});
|
|
58
|
-
const appendTo = computed(() => {
|
|
59
|
-
return props.appendTo || selector.value;
|
|
60
|
-
});
|
|
61
|
-
const contentStyle = computed(() => {
|
|
62
|
-
var _a;
|
|
63
|
-
return (_a = props.style) != null ? _a : {};
|
|
64
|
-
});
|
|
65
|
-
const ariaHidden = ref(true);
|
|
66
|
-
const onTransitionLeave = () => {
|
|
67
|
-
onHide();
|
|
68
|
-
ariaHidden.value = true;
|
|
69
|
-
};
|
|
70
|
-
const stopWhenControlled = () => {
|
|
71
|
-
if (unref(controlled))
|
|
72
|
-
return true;
|
|
73
|
-
};
|
|
74
|
-
const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
|
|
75
|
-
if (props.enterable && unref(trigger) === "hover") {
|
|
76
|
-
onOpen();
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
|
|
80
|
-
if (unref(trigger) === "hover") {
|
|
81
|
-
onClose();
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
const onBeforeEnter = () => {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
87
|
-
onBeforeShow == null ? void 0 : onBeforeShow();
|
|
88
|
-
};
|
|
89
|
-
const onBeforeLeave = () => {
|
|
90
|
-
onBeforeHide == null ? void 0 : onBeforeHide();
|
|
91
|
-
};
|
|
92
|
-
const onAfterShow = () => {
|
|
93
|
-
onShow();
|
|
94
|
-
stopHandle = onClickOutside(computed(() => {
|
|
95
|
-
var _a;
|
|
96
|
-
return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
97
|
-
}), () => {
|
|
98
|
-
if (unref(controlled))
|
|
99
|
-
return;
|
|
100
|
-
const $trigger = unref(trigger);
|
|
101
|
-
if ($trigger !== "hover") {
|
|
102
|
-
onClose();
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
const onBlur = () => {
|
|
107
|
-
if (!props.virtualTriggering) {
|
|
108
|
-
onClose();
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
watch(() => unref(open), (val) => {
|
|
112
|
-
if (!val) {
|
|
113
|
-
stopHandle == null ? void 0 : stopHandle();
|
|
114
|
-
} else {
|
|
115
|
-
ariaHidden.value = false;
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
flush: "post"
|
|
119
|
-
});
|
|
120
|
-
watch(() => props.content, () => {
|
|
121
|
-
var _a, _b;
|
|
122
|
-
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
123
|
-
});
|
|
124
|
-
expose({
|
|
125
|
-
contentRef
|
|
126
|
-
});
|
|
127
|
-
return (_ctx, _cache) => {
|
|
128
|
-
return openBlock(), createBlock(unref(ElTeleport), {
|
|
129
|
-
disabled: !_ctx.teleported,
|
|
130
|
-
to: unref(appendTo)
|
|
131
|
-
}, {
|
|
132
|
-
default: withCtx(() => [
|
|
133
|
-
createVNode(Transition, {
|
|
134
|
-
name: unref(transitionClass),
|
|
135
|
-
onAfterLeave: onTransitionLeave,
|
|
136
|
-
onBeforeEnter,
|
|
137
|
-
onAfterEnter: onAfterShow,
|
|
138
|
-
onBeforeLeave
|
|
139
|
-
}, {
|
|
140
|
-
default: withCtx(() => [
|
|
141
|
-
unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
|
|
142
|
-
key: 0,
|
|
143
|
-
id: unref(id),
|
|
144
|
-
ref_key: "contentRef",
|
|
145
|
-
ref: contentRef
|
|
146
|
-
}, _ctx.$attrs, {
|
|
147
|
-
"aria-label": _ctx.ariaLabel,
|
|
148
|
-
"aria-hidden": ariaHidden.value,
|
|
149
|
-
"boundaries-padding": _ctx.boundariesPadding,
|
|
150
|
-
"fallback-placements": _ctx.fallbackPlacements,
|
|
151
|
-
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
152
|
-
offset: _ctx.offset,
|
|
153
|
-
placement: _ctx.placement,
|
|
154
|
-
"popper-options": _ctx.popperOptions,
|
|
155
|
-
strategy: _ctx.strategy,
|
|
156
|
-
effect: _ctx.effect,
|
|
157
|
-
enterable: _ctx.enterable,
|
|
158
|
-
pure: _ctx.pure,
|
|
159
|
-
"popper-class": _ctx.popperClass,
|
|
160
|
-
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
161
|
-
"reference-el": _ctx.referenceEl,
|
|
162
|
-
"trigger-target-el": _ctx.triggerTargetEl,
|
|
163
|
-
visible: unref(shouldShow),
|
|
164
|
-
"z-index": _ctx.zIndex,
|
|
165
|
-
onMouseenter: unref(onContentEnter),
|
|
166
|
-
onMouseleave: unref(onContentLeave),
|
|
167
|
-
onBlur,
|
|
168
|
-
onClose: unref(onClose)
|
|
169
|
-
}), {
|
|
170
|
-
default: withCtx(() => [
|
|
171
|
-
renderSlot(_ctx.$slots, "default")
|
|
172
|
-
]),
|
|
173
|
-
_: 3
|
|
174
|
-
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
|
|
175
|
-
[vShow, unref(shouldShow)]
|
|
176
|
-
]) : createCommentVNode("v-if", true)
|
|
177
|
-
]),
|
|
178
|
-
_: 3
|
|
179
|
-
}, 8, ["name"])
|
|
180
|
-
]),
|
|
181
|
-
_: 3
|
|
182
|
-
}, 8, ["disabled", "to"]);
|
|
183
|
-
};
|
|
184
|
-
}
|
|
9
|
+
const useTooltipContentProps = buildProps({
|
|
10
|
+
...useDelayedToggleProps,
|
|
11
|
+
...popperContentProps,
|
|
12
|
+
appendTo: {
|
|
13
|
+
type: definePropType([String, Object])
|
|
14
|
+
},
|
|
15
|
+
content: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
rawContent: Boolean,
|
|
20
|
+
persistent: Boolean,
|
|
21
|
+
visible: {
|
|
22
|
+
type: definePropType(Boolean),
|
|
23
|
+
default: null
|
|
24
|
+
},
|
|
25
|
+
transition: String,
|
|
26
|
+
teleported: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true
|
|
29
|
+
},
|
|
30
|
+
disabled: Boolean,
|
|
31
|
+
...useAriaProps(["ariaLabel"])
|
|
185
32
|
});
|
|
186
|
-
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
187
33
|
|
|
188
|
-
export {
|
|
34
|
+
export { useTooltipContentProps };
|
|
189
35
|
//# sourceMappingURL=content.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip/src/content.
|
|
1
|
+
{"version":3,"file":"content.mjs","sources":["../../../../../../packages/components/tooltip/src/content.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperContentProps } from '@element-plus/components/popper'\nimport { useAriaProps, useDelayedToggleProps } from '@element-plus/hooks'\n\nimport type TooltipContent from './content.vue'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const useTooltipContentProps = buildProps({\n ...useDelayedToggleProps,\n ...popperContentProps,\n /**\n * @description which element the tooltip CONTENT appends to\n */\n appendTo: {\n type: definePropType<string | HTMLElement>([String, Object]),\n },\n /**\n * @description display content, can be overridden by `slot#content`\n */\n content: {\n type: String,\n default: '',\n },\n /**\n * @description whether `content` is treated as HTML string\n */\n rawContent: Boolean,\n /**\n * @description when tooltip inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: Boolean,\n // because model toggle prop is generated dynamically\n // so the typing cannot be evaluated by typescript as type:\n // [name]: { type: Boolean, default: null }\n // so we need to declare that again for type checking.\n /**\n * @description visibility of Tooltip\n */\n visible: {\n type: definePropType<boolean | null>(Boolean),\n default: null,\n },\n /**\n * @description animation name\n */\n transition: String,\n /**\n * @description whether tooltip content is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: {\n type: Boolean,\n default: true,\n },\n /**\n * @description whether Tooltip is disabled\n */\n disabled: Boolean,\n ...useAriaProps(['ariaLabel']),\n} as const)\n\nexport type ElTooltipContentProps = ExtractPropTypes<\n typeof useTooltipContentProps\n>\n\nexport type TooltipContentInstance = InstanceType<typeof TooltipContent>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,sBAAsB,GAAG,UAAU,CAAC;AACjD,EAAE,GAAG,qBAAqB;AAC1B,EAAE,GAAG,kBAAkB;AACvB,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC;AACjC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;;;;"}
|
|
@@ -1,35 +1,189 @@
|
|
|
1
|
+
import { defineComponent, ref, inject, computed, onBeforeUnmount, unref, watch, openBlock, createBlock, withCtx, createVNode, Transition, withDirectives, mergeProps, renderSlot, vShow, createCommentVNode } from 'vue';
|
|
2
|
+
import { onClickOutside } from '@vueuse/core';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
1
4
|
import '../../../utils/index.mjs';
|
|
2
5
|
import '../../popper/index.mjs';
|
|
3
|
-
import '
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import { ElTeleport } from '../../teleport/index.mjs';
|
|
7
|
+
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
8
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
9
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
|
+
import { usePopperContainerId } from '../../../hooks/use-popper-container/index.mjs';
|
|
11
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
12
|
+
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
13
|
+
import ElPopperContent from '../../popper/src/content2.mjs';
|
|
8
14
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
const __default__ = defineComponent({
|
|
16
|
+
name: "ElTooltipContent",
|
|
17
|
+
inheritAttrs: false
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
...__default__,
|
|
21
|
+
props: useTooltipContentProps,
|
|
22
|
+
setup(__props, { expose }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const { selector } = usePopperContainerId();
|
|
25
|
+
const ns = useNamespace("tooltip");
|
|
26
|
+
const contentRef = ref(null);
|
|
27
|
+
let stopHandle;
|
|
28
|
+
const {
|
|
29
|
+
controlled,
|
|
30
|
+
id,
|
|
31
|
+
open,
|
|
32
|
+
trigger,
|
|
33
|
+
onClose,
|
|
34
|
+
onOpen,
|
|
35
|
+
onShow,
|
|
36
|
+
onHide,
|
|
37
|
+
onBeforeShow,
|
|
38
|
+
onBeforeHide
|
|
39
|
+
} = inject(TOOLTIP_INJECTION_KEY, void 0);
|
|
40
|
+
const transitionClass = computed(() => {
|
|
41
|
+
return props.transition || `${ns.namespace.value}-fade-in-linear`;
|
|
42
|
+
});
|
|
43
|
+
const persistentRef = computed(() => {
|
|
44
|
+
if (process.env.NODE_ENV === "test") {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return props.persistent;
|
|
48
|
+
});
|
|
49
|
+
onBeforeUnmount(() => {
|
|
50
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
51
|
+
});
|
|
52
|
+
const shouldRender = computed(() => {
|
|
53
|
+
return unref(persistentRef) ? true : unref(open);
|
|
54
|
+
});
|
|
55
|
+
const shouldShow = computed(() => {
|
|
56
|
+
return props.disabled ? false : unref(open);
|
|
57
|
+
});
|
|
58
|
+
const appendTo = computed(() => {
|
|
59
|
+
return props.appendTo || selector.value;
|
|
60
|
+
});
|
|
61
|
+
const contentStyle = computed(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
return (_a = props.style) != null ? _a : {};
|
|
64
|
+
});
|
|
65
|
+
const ariaHidden = ref(true);
|
|
66
|
+
const onTransitionLeave = () => {
|
|
67
|
+
onHide();
|
|
68
|
+
ariaHidden.value = true;
|
|
69
|
+
};
|
|
70
|
+
const stopWhenControlled = () => {
|
|
71
|
+
if (unref(controlled))
|
|
72
|
+
return true;
|
|
73
|
+
};
|
|
74
|
+
const onContentEnter = composeEventHandlers(stopWhenControlled, () => {
|
|
75
|
+
if (props.enterable && unref(trigger) === "hover") {
|
|
76
|
+
onOpen();
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const onContentLeave = composeEventHandlers(stopWhenControlled, () => {
|
|
80
|
+
if (unref(trigger) === "hover") {
|
|
81
|
+
onClose();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const onBeforeEnter = () => {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
87
|
+
onBeforeShow == null ? void 0 : onBeforeShow();
|
|
88
|
+
};
|
|
89
|
+
const onBeforeLeave = () => {
|
|
90
|
+
onBeforeHide == null ? void 0 : onBeforeHide();
|
|
91
|
+
};
|
|
92
|
+
const onAfterShow = () => {
|
|
93
|
+
onShow();
|
|
94
|
+
stopHandle = onClickOutside(computed(() => {
|
|
95
|
+
var _a;
|
|
96
|
+
return (_a = contentRef.value) == null ? void 0 : _a.popperContentRef;
|
|
97
|
+
}), () => {
|
|
98
|
+
if (unref(controlled))
|
|
99
|
+
return;
|
|
100
|
+
const $trigger = unref(trigger);
|
|
101
|
+
if ($trigger !== "hover") {
|
|
102
|
+
onClose();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
const onBlur = () => {
|
|
107
|
+
if (!props.virtualTriggering) {
|
|
108
|
+
onClose();
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
watch(() => unref(open), (val) => {
|
|
112
|
+
if (!val) {
|
|
113
|
+
stopHandle == null ? void 0 : stopHandle();
|
|
114
|
+
} else {
|
|
115
|
+
ariaHidden.value = false;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
flush: "post"
|
|
119
|
+
});
|
|
120
|
+
watch(() => props.content, () => {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
(_b = (_a = contentRef.value) == null ? void 0 : _a.updatePopper) == null ? void 0 : _b.call(_a);
|
|
123
|
+
});
|
|
124
|
+
expose({
|
|
125
|
+
contentRef
|
|
126
|
+
});
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
return openBlock(), createBlock(unref(ElTeleport), {
|
|
129
|
+
disabled: !_ctx.teleported,
|
|
130
|
+
to: unref(appendTo)
|
|
131
|
+
}, {
|
|
132
|
+
default: withCtx(() => [
|
|
133
|
+
createVNode(Transition, {
|
|
134
|
+
name: unref(transitionClass),
|
|
135
|
+
onAfterLeave: onTransitionLeave,
|
|
136
|
+
onBeforeEnter,
|
|
137
|
+
onAfterEnter: onAfterShow,
|
|
138
|
+
onBeforeLeave
|
|
139
|
+
}, {
|
|
140
|
+
default: withCtx(() => [
|
|
141
|
+
unref(shouldRender) ? withDirectives((openBlock(), createBlock(unref(ElPopperContent), mergeProps({
|
|
142
|
+
key: 0,
|
|
143
|
+
id: unref(id),
|
|
144
|
+
ref_key: "contentRef",
|
|
145
|
+
ref: contentRef
|
|
146
|
+
}, _ctx.$attrs, {
|
|
147
|
+
"aria-label": _ctx.ariaLabel,
|
|
148
|
+
"aria-hidden": ariaHidden.value,
|
|
149
|
+
"boundaries-padding": _ctx.boundariesPadding,
|
|
150
|
+
"fallback-placements": _ctx.fallbackPlacements,
|
|
151
|
+
"gpu-acceleration": _ctx.gpuAcceleration,
|
|
152
|
+
offset: _ctx.offset,
|
|
153
|
+
placement: _ctx.placement,
|
|
154
|
+
"popper-options": _ctx.popperOptions,
|
|
155
|
+
strategy: _ctx.strategy,
|
|
156
|
+
effect: _ctx.effect,
|
|
157
|
+
enterable: _ctx.enterable,
|
|
158
|
+
pure: _ctx.pure,
|
|
159
|
+
"popper-class": _ctx.popperClass,
|
|
160
|
+
"popper-style": [_ctx.popperStyle, unref(contentStyle)],
|
|
161
|
+
"reference-el": _ctx.referenceEl,
|
|
162
|
+
"trigger-target-el": _ctx.triggerTargetEl,
|
|
163
|
+
visible: unref(shouldShow),
|
|
164
|
+
"z-index": _ctx.zIndex,
|
|
165
|
+
onMouseenter: unref(onContentEnter),
|
|
166
|
+
onMouseleave: unref(onContentLeave),
|
|
167
|
+
onBlur,
|
|
168
|
+
onClose: unref(onClose)
|
|
169
|
+
}), {
|
|
170
|
+
default: withCtx(() => [
|
|
171
|
+
renderSlot(_ctx.$slots, "default")
|
|
172
|
+
]),
|
|
173
|
+
_: 3
|
|
174
|
+
}, 16, ["id", "aria-label", "aria-hidden", "boundaries-padding", "fallback-placements", "gpu-acceleration", "offset", "placement", "popper-options", "strategy", "effect", "enterable", "pure", "popper-class", "popper-style", "reference-el", "trigger-target-el", "visible", "z-index", "onMouseenter", "onMouseleave", "onClose"])), [
|
|
175
|
+
[vShow, unref(shouldShow)]
|
|
176
|
+
]) : createCommentVNode("v-if", true)
|
|
177
|
+
]),
|
|
178
|
+
_: 3
|
|
179
|
+
}, 8, ["name"])
|
|
180
|
+
]),
|
|
181
|
+
_: 3
|
|
182
|
+
}, 8, ["disabled", "to"]);
|
|
183
|
+
};
|
|
184
|
+
}
|
|
32
185
|
});
|
|
186
|
+
var ElTooltipContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "content.vue"]]);
|
|
33
187
|
|
|
34
|
-
export {
|
|
188
|
+
export { ElTooltipContent as default };
|
|
35
189
|
//# sourceMappingURL=content2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip/src/content.
|
|
1
|
+
{"version":3,"file":"content2.mjs","sources":["../../../../../../packages/components/tooltip/src/content.vue"],"sourcesContent":["<template>\n <el-teleport :disabled=\"!teleported\" :to=\"appendTo\">\n <transition\n :name=\"transitionClass\"\n @after-leave=\"onTransitionLeave\"\n @before-enter=\"onBeforeEnter\"\n @after-enter=\"onAfterShow\"\n @before-leave=\"onBeforeLeave\"\n >\n <el-popper-content\n v-if=\"shouldRender\"\n v-show=\"shouldShow\"\n :id=\"id\"\n ref=\"contentRef\"\n v-bind=\"$attrs\"\n :aria-label=\"ariaLabel\"\n :aria-hidden=\"ariaHidden\"\n :boundaries-padding=\"boundariesPadding\"\n :fallback-placements=\"fallbackPlacements\"\n :gpu-acceleration=\"gpuAcceleration\"\n :offset=\"offset\"\n :placement=\"placement\"\n :popper-options=\"popperOptions\"\n :strategy=\"strategy\"\n :effect=\"effect\"\n :enterable=\"enterable\"\n :pure=\"pure\"\n :popper-class=\"popperClass\"\n :popper-style=\"[popperStyle, contentStyle]\"\n :reference-el=\"referenceEl\"\n :trigger-target-el=\"triggerTargetEl\"\n :visible=\"shouldShow\"\n :z-index=\"zIndex\"\n @mouseenter=\"onContentEnter\"\n @mouseleave=\"onContentLeave\"\n @blur=\"onBlur\"\n @close=\"onClose\"\n >\n <slot />\n </el-popper-content>\n </transition>\n </el-teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, inject, onBeforeUnmount, ref, unref, watch } from 'vue'\nimport { onClickOutside } from '@vueuse/core'\nimport { useNamespace, usePopperContainerId } from '@element-plus/hooks'\nimport { composeEventHandlers } from '@element-plus/utils'\nimport { ElPopperContent } from '@element-plus/components/popper'\nimport ElTeleport from '@element-plus/components/teleport'\nimport { TOOLTIP_INJECTION_KEY } from './constants'\nimport { useTooltipContentProps } from './content'\n\ndefineOptions({\n name: 'ElTooltipContent',\n inheritAttrs: false,\n})\n\nconst props = defineProps(useTooltipContentProps)\n\nconst { selector } = usePopperContainerId()\nconst ns = useNamespace('tooltip')\n// TODO any is temporary, replace with `InstanceType<typeof ElPopperContent> | null` later\nconst contentRef = ref<any>(null)\nlet stopHandle: ReturnType<typeof onClickOutside>\nconst {\n controlled,\n id,\n open,\n trigger,\n onClose,\n onOpen,\n onShow,\n onHide,\n onBeforeShow,\n onBeforeHide,\n} = inject(TOOLTIP_INJECTION_KEY, undefined)!\nconst transitionClass = computed(() => {\n return props.transition || `${ns.namespace.value}-fade-in-linear`\n})\nconst persistentRef = computed(() => {\n // For testing, we would always want the content to be rendered\n // to the DOM, so we need to return true here.\n if (process.env.NODE_ENV === 'test') {\n return true\n }\n return props.persistent\n})\n\nonBeforeUnmount(() => {\n stopHandle?.()\n})\n\nconst shouldRender = computed(() => {\n return unref(persistentRef) ? true : unref(open)\n})\n\nconst shouldShow = computed(() => {\n return props.disabled ? false : unref(open)\n})\n\nconst appendTo = computed(() => {\n return props.appendTo || selector.value\n})\n\nconst contentStyle = computed(() => (props.style ?? {}) as any)\n\nconst ariaHidden = ref(true)\n\nconst onTransitionLeave = () => {\n onHide()\n ariaHidden.value = true\n}\n\nconst stopWhenControlled = () => {\n if (unref(controlled)) return true\n}\n\nconst onContentEnter = composeEventHandlers(stopWhenControlled, () => {\n if (props.enterable && unref(trigger) === 'hover') {\n onOpen()\n }\n})\n\nconst onContentLeave = composeEventHandlers(stopWhenControlled, () => {\n if (unref(trigger) === 'hover') {\n onClose()\n }\n})\n\nconst onBeforeEnter = () => {\n contentRef.value?.updatePopper?.()\n onBeforeShow?.()\n}\n\nconst onBeforeLeave = () => {\n onBeforeHide?.()\n}\n\nconst onAfterShow = () => {\n onShow()\n stopHandle = onClickOutside(\n computed(() => {\n return contentRef.value?.popperContentRef\n }),\n () => {\n if (unref(controlled)) return\n const $trigger = unref(trigger)\n if ($trigger !== 'hover') {\n onClose()\n }\n }\n )\n}\n\nconst onBlur = () => {\n if (!props.virtualTriggering) {\n onClose()\n }\n}\n\nwatch(\n () => unref(open),\n (val) => {\n if (!val) {\n stopHandle?.()\n } else {\n ariaHidden.value = false\n }\n },\n {\n flush: 'post',\n }\n)\n\nwatch(\n () => props.content,\n () => {\n contentRef.value?.updatePopper?.()\n }\n)\n\ndefineExpose({\n /**\n * @description el-popper-content component instance\n */\n contentRef,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;mCAsDc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AAAA,EACN,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAE,aAAa,oBAAqB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAA,GAAK,aAAa,SAAS,CAAA,CAAA;AAEjC,IAAM,MAAA,UAAA,GAAa,IAAS,IAAI,CAAA,CAAA;AAChC,IAAI,IAAA,UAAA,CAAA;AACJ,IAAM,MAAA;AAAA,MACJ,UAAA;AAAA,MACA,EAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KACE,GAAA,MAAA,CAAO,uBAAuB,KAAS,CAAA,CAAA,CAAA;AAC3C,IAAM,MAAA,eAAA,GAAkB,SAAS,MAAM;AACrC,MAAA,OAAO,KAAM,CAAA,UAAA,IAAc,CAAG,EAAA,EAAA,CAAG,SAAU,CAAA,KAAA,CAAA,eAAA,CAAA,CAAA;AAAA,KAC5C,CAAA,CAAA;AACD,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM;AAGnC,MAAI,IAAA,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,MAAQ,EAAA;AACnC,QAAO,OAAA,IAAA,CAAA;AAAA,OAC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I,CAAC,KAAK,CAAA,iBAAA,EAAA;AACR,QAAa,OAAA,EAAA,CAAA;AAAA,OACR;AACL,KAAA,CAAA;AAAmB,IACrB,KAAA,CAAA,MAAA,KAAA,CAAA,IAAA,CAAA,EAAA,CAAA,GAAA,KAAA;AAAA,MAEF,IAAA,CAAA,GAAA,EAAA;AAAA,QACS,UAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,EAAA,CAAA;AAAA,OAEX,MAAA;AAEA,QACE,UAAY,CAAA,KAAA,GAAA,KACN,CAAA;AACJ,OAAA;AAAiC,KAErC,EAAA;AAEA,MAAa,KAAA,EAAA,MAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,KAAC,CAAA,MAAA,KAAA,CAAA,OAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../../utils/index.mjs';
|
|
2
2
|
import '../../../hooks/index.mjs';
|
|
3
3
|
import '../../popper/index.mjs';
|
|
4
|
-
import { useTooltipContentProps } from './
|
|
4
|
+
import { useTooltipContentProps } from './content.mjs';
|
|
5
5
|
import { useTooltipTriggerProps } from './trigger.mjs';
|
|
6
6
|
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
|
7
7
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
@@ -5,7 +5,7 @@ import '../../../hooks/index.mjs';
|
|
|
5
5
|
import { TOOLTIP_INJECTION_KEY } from './constants.mjs';
|
|
6
6
|
import { useTooltipProps, tooltipEmits, useTooltipModelToggle } from './tooltip.mjs';
|
|
7
7
|
import ElTooltipTrigger from './trigger2.mjs';
|
|
8
|
-
import ElTooltipContent from './
|
|
8
|
+
import ElTooltipContent from './content2.mjs';
|
|
9
9
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
10
10
|
import { usePopperContainer } from '../../../hooks/use-popper-container/index.mjs';
|
|
11
11
|
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
@@ -2,7 +2,7 @@ import '../../../utils/index.mjs';
|
|
|
2
2
|
import '../../popper/index.mjs';
|
|
3
3
|
import '../../../constants/index.mjs';
|
|
4
4
|
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
5
|
-
import { popperTriggerProps } from '../../popper/src/
|
|
5
|
+
import { popperTriggerProps } from '../../popper/src/trigger2.mjs';
|
|
6
6
|
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
7
7
|
|
|
8
8
|
const useTooltipTriggerProps = buildProps({
|
|
@@ -8,7 +8,7 @@ import { whenTrigger } from './utils.mjs';
|
|
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
9
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
10
|
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
|
11
|
-
import ElPopperTrigger from '../../popper/src/
|
|
11
|
+
import ElPopperTrigger from '../../popper/src/trigger.mjs';
|
|
12
12
|
|
|
13
13
|
const __default__ = defineComponent({
|
|
14
14
|
name: "ElTooltipTrigger"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Tour from './src/
|
|
2
|
+
import Tour from './src/tour.mjs';
|
|
3
3
|
import TourStep from './src/step2.mjs';
|
|
4
|
-
export { tourEmits, tourProps } from './src/
|
|
4
|
+
export { tourEmits, tourProps } from './src/tour2.mjs';
|
|
5
5
|
export { tourStepEmits, tourStepProps } from './src/step.mjs';
|
|
6
6
|
export { tourContentEmits, tourContentProps, tourPlacements, tourStrategies } from './src/content.mjs';
|
|
7
7
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|