@element-plus/nightly 0.0.20241217 → 0.0.20241218
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- 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/button/index.mjs +1 -1
- package/es/components/button/src/button-group.mjs +29 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -29
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +40 -399
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +399 -40
- 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/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +22 -79
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +79 -22
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +26 -126
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +126 -26
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +26 -87
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +87 -26
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/index.mjs +11 -11
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +349 -60
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +60 -349
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +215 -65
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +65 -215
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/popper/index.mjs +2 -2
- 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/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -27
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +167 -33
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +33 -167
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +228 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -228
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +13 -71
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +71 -13
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +36 -21
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +21 -36
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/arrow.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +11 -11
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/button/index.js +1 -1
- package/lib/components/button/src/button-group.js +29 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -29
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +40 -397
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +397 -40
- 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/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +23 -79
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +79 -23
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +26 -126
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +126 -26
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +26 -86
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +86 -26
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/index.js +11 -11
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +347 -59
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +59 -347
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +214 -65
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +65 -214
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/popper/index.js +2 -2
- 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/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +27 -31
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +31 -27
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +167 -34
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +34 -167
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +227 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -227
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +13 -71
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +71 -13
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +36 -21
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +21 -36
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/arrow.js +37 -22
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +22 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +11 -11
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"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":["_openBlock","_createElementBlock","_normalizeClass","_unref","_withModifiers","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
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,MAAM;AAChB,IAAI,SAAS,EAAE,oBAAoB;AACnC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,YAAY,EAAE,OAAO;AACvB,EAAE,kBAAkB,EAAE;A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AC,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,9 +1,9 @@
|
|
1
1
|
import Tabs from './src/tabs.mjs';
|
2
2
|
export { tabsEmits, tabsProps } from './src/tabs.mjs';
|
3
|
-
import TabPane from './src/tab-
|
3
|
+
import TabPane from './src/tab-pane2.mjs';
|
4
4
|
export { tabBarProps } from './src/tab-bar.mjs';
|
5
5
|
export { tabNavEmits, tabNavProps } from './src/tab-nav.mjs';
|
6
|
-
export { tabPaneProps } from './src/tab-
|
6
|
+
export { tabPaneProps } from './src/tab-pane.mjs';
|
7
7
|
export { tabsRootContextKey } from './src/constants.mjs';
|
8
8
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
9
9
|
|
@@ -1,75 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
import { eagerComputed } from '@vueuse/core';
|
3
|
-
import { tabsRootContextKey } from './constants.mjs';
|
4
|
-
import { tabPaneProps } from './tab-pane2.mjs';
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { throwError } from '../../../utils/error.mjs';
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
8
2
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
3
|
+
const tabPaneProps = buildProps({
|
4
|
+
label: {
|
5
|
+
type: String,
|
6
|
+
default: ""
|
7
|
+
},
|
8
|
+
name: {
|
9
|
+
type: [String, Number]
|
10
|
+
},
|
11
|
+
closable: Boolean,
|
12
|
+
disabled: Boolean,
|
13
|
+
lazy: Boolean
|
12
14
|
});
|
13
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
14
|
-
...__default__,
|
15
|
-
props: tabPaneProps,
|
16
|
-
setup(__props) {
|
17
|
-
const props = __props;
|
18
|
-
const instance = getCurrentInstance();
|
19
|
-
const slots = useSlots();
|
20
|
-
const tabsRoot = inject(tabsRootContextKey);
|
21
|
-
if (!tabsRoot)
|
22
|
-
throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
23
|
-
const ns = useNamespace("tab-pane");
|
24
|
-
const index = ref();
|
25
|
-
const isClosable = computed(() => props.closable || tabsRoot.props.closable);
|
26
|
-
const active = eagerComputed(() => {
|
27
|
-
var _a;
|
28
|
-
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
|
29
|
-
});
|
30
|
-
const loaded = ref(active.value);
|
31
|
-
const paneName = computed(() => {
|
32
|
-
var _a;
|
33
|
-
return (_a = props.name) != null ? _a : index.value;
|
34
|
-
});
|
35
|
-
const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
|
36
|
-
watch(active, (val) => {
|
37
|
-
if (val)
|
38
|
-
loaded.value = true;
|
39
|
-
});
|
40
|
-
const pane = reactive({
|
41
|
-
uid: instance.uid,
|
42
|
-
slots,
|
43
|
-
props,
|
44
|
-
paneName,
|
45
|
-
active,
|
46
|
-
index,
|
47
|
-
isClosable
|
48
|
-
});
|
49
|
-
tabsRoot.registerPane(pane);
|
50
|
-
onMounted(() => {
|
51
|
-
tabsRoot.sortPane(pane);
|
52
|
-
});
|
53
|
-
onUnmounted(() => {
|
54
|
-
tabsRoot.unregisterPane(pane.uid);
|
55
|
-
});
|
56
|
-
return (_ctx, _cache) => {
|
57
|
-
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
|
58
|
-
key: 0,
|
59
|
-
id: `pane-${unref(paneName)}`,
|
60
|
-
class: normalizeClass(unref(ns).b()),
|
61
|
-
role: "tabpanel",
|
62
|
-
"aria-hidden": !unref(active),
|
63
|
-
"aria-labelledby": `tab-${unref(paneName)}`
|
64
|
-
}, [
|
65
|
-
renderSlot(_ctx.$slots, "default")
|
66
|
-
], 10, ["id", "aria-hidden", "aria-labelledby"])), [
|
67
|
-
[vShow, unref(active)]
|
68
|
-
]) : createCommentVNode("v-if", true);
|
69
|
-
};
|
70
|
-
}
|
71
|
-
});
|
72
|
-
var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-pane.vue"]]);
|
73
15
|
|
74
|
-
export {
|
16
|
+
export { tabPaneProps };
|
75
17
|
//# sourceMappingURL=tab-pane.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
1
|
+
{"version":3,"file":"tab-pane.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TabPane from './tab-pane.vue'\n\nexport const tabPaneProps = buildProps({\n /**\n * @description title of the tab\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description identifier corresponding to the name of Tabs, representing the alias of the tab-pane, the default is ordinal number of the tab-pane in the sequence, e.g. the first tab-pane is '0'\n */\n name: {\n type: [String, Number],\n },\n /**\n * @description whether Tab is closable\n */\n closable: Boolean,\n /**\n * @description whether Tab is disabled\n */\n disabled: Boolean,\n /**\n * @description whether Tab is lazily rendered\n */\n lazy: Boolean,\n} as const)\n\nexport type TabPaneProps = ExtractPropTypes<typeof tabPaneProps>\n\nexport type TabPaneInstance = InstanceType<typeof TabPane>\n"],"names":[],"mappings":";;AACY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,OAAO;AACf,CAAC;;;;"}
|
@@ -1,17 +1,75 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, getCurrentInstance, useSlots, inject, ref, computed, watch, reactive, onMounted, onUnmounted, unref, withDirectives, openBlock, createElementBlock, normalizeClass, renderSlot, vShow, createCommentVNode } from 'vue';
|
2
|
+
import { eagerComputed } from '@vueuse/core';
|
3
|
+
import { tabsRootContextKey } from './constants.mjs';
|
4
|
+
import { tabPaneProps } from './tab-pane.mjs';
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
+
import { throwError } from '../../../utils/error.mjs';
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
2
8
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
default: ""
|
7
|
-
},
|
8
|
-
name: {
|
9
|
-
type: [String, Number]
|
10
|
-
},
|
11
|
-
closable: Boolean,
|
12
|
-
disabled: Boolean,
|
13
|
-
lazy: Boolean
|
9
|
+
const COMPONENT_NAME = "ElTabPane";
|
10
|
+
const __default__ = defineComponent({
|
11
|
+
name: COMPONENT_NAME
|
14
12
|
});
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
14
|
+
...__default__,
|
15
|
+
props: tabPaneProps,
|
16
|
+
setup(__props) {
|
17
|
+
const props = __props;
|
18
|
+
const instance = getCurrentInstance();
|
19
|
+
const slots = useSlots();
|
20
|
+
const tabsRoot = inject(tabsRootContextKey);
|
21
|
+
if (!tabsRoot)
|
22
|
+
throwError(COMPONENT_NAME, "usage: <el-tabs><el-tab-pane /></el-tabs/>");
|
23
|
+
const ns = useNamespace("tab-pane");
|
24
|
+
const index = ref();
|
25
|
+
const isClosable = computed(() => props.closable || tabsRoot.props.closable);
|
26
|
+
const active = eagerComputed(() => {
|
27
|
+
var _a;
|
28
|
+
return tabsRoot.currentName.value === ((_a = props.name) != null ? _a : index.value);
|
29
|
+
});
|
30
|
+
const loaded = ref(active.value);
|
31
|
+
const paneName = computed(() => {
|
32
|
+
var _a;
|
33
|
+
return (_a = props.name) != null ? _a : index.value;
|
34
|
+
});
|
35
|
+
const shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value);
|
36
|
+
watch(active, (val) => {
|
37
|
+
if (val)
|
38
|
+
loaded.value = true;
|
39
|
+
});
|
40
|
+
const pane = reactive({
|
41
|
+
uid: instance.uid,
|
42
|
+
slots,
|
43
|
+
props,
|
44
|
+
paneName,
|
45
|
+
active,
|
46
|
+
index,
|
47
|
+
isClosable
|
48
|
+
});
|
49
|
+
tabsRoot.registerPane(pane);
|
50
|
+
onMounted(() => {
|
51
|
+
tabsRoot.sortPane(pane);
|
52
|
+
});
|
53
|
+
onUnmounted(() => {
|
54
|
+
tabsRoot.unregisterPane(pane.uid);
|
55
|
+
});
|
56
|
+
return (_ctx, _cache) => {
|
57
|
+
return unref(shouldBeRender) ? withDirectives((openBlock(), createElementBlock("div", {
|
58
|
+
key: 0,
|
59
|
+
id: `pane-${unref(paneName)}`,
|
60
|
+
class: normalizeClass(unref(ns).b()),
|
61
|
+
role: "tabpanel",
|
62
|
+
"aria-hidden": !unref(active),
|
63
|
+
"aria-labelledby": `tab-${unref(paneName)}`
|
64
|
+
}, [
|
65
|
+
renderSlot(_ctx.$slots, "default")
|
66
|
+
], 10, ["id", "aria-hidden", "aria-labelledby"])), [
|
67
|
+
[vShow, unref(active)]
|
68
|
+
]) : createCommentVNode("v-if", true);
|
69
|
+
};
|
70
|
+
}
|
71
|
+
});
|
72
|
+
var TabPane = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "tab-pane.vue"]]);
|
15
73
|
|
16
|
-
export {
|
74
|
+
export { TabPane as default };
|
17
75
|
//# sourceMappingURL=tab-pane2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tab-pane2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.
|
1
|
+
{"version":3,"file":"tab-pane2.mjs","sources":["../../../../../../packages/components/tabs/src/tab-pane.vue"],"sourcesContent":["<template>\n <div\n v-if=\"shouldBeRender\"\n v-show=\"active\"\n :id=\"`pane-${paneName}`\"\n :class=\"ns.b()\"\n role=\"tabpanel\"\n :aria-hidden=\"!active\"\n :aria-labelledby=\"`tab-${paneName}`\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n getCurrentInstance,\n inject,\n onMounted,\n onUnmounted,\n reactive,\n ref,\n useSlots,\n watch,\n} from 'vue'\nimport { eagerComputed } from '@vueuse/core'\nimport { throwError } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { tabsRootContextKey } from './constants'\nimport { tabPaneProps } from './tab-pane'\n\nconst COMPONENT_NAME = 'ElTabPane'\ndefineOptions({\n name: COMPONENT_NAME,\n})\nconst props = defineProps(tabPaneProps)\n\nconst instance = getCurrentInstance()!\nconst slots = useSlots()\n\nconst tabsRoot = inject(tabsRootContextKey)\nif (!tabsRoot)\n throwError(COMPONENT_NAME, 'usage: <el-tabs><el-tab-pane /></el-tabs/>')\n\nconst ns = useNamespace('tab-pane')\n\nconst index = ref<string>()\nconst isClosable = computed(() => props.closable || tabsRoot.props.closable)\nconst active = eagerComputed(\n () => tabsRoot.currentName.value === (props.name ?? index.value)\n)\nconst loaded = ref(active.value)\nconst paneName = computed(() => props.name ?? index.value)\nconst shouldBeRender = eagerComputed(\n () => !props.lazy || loaded.value || active.value\n)\n\nwatch(active, (val) => {\n if (val) loaded.value = true\n})\n\nconst pane = reactive({\n uid: instance.uid,\n slots,\n props,\n paneName,\n active,\n index,\n isClosable,\n})\n\ntabsRoot.registerPane(pane)\nonMounted(() => {\n t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AAAA,IAC1B,KAAC,CAAA,MAAA,EAAA,CAAA,GAAA,KAAA;AAED,MAAA,IAAM;AAAgB,cACN,CAAA,KAAA,GAAA,IAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAAA,IACA,MAAA,IAAA,GAAA,QAAA,CAAA;AAAA,MACA,GAAA,EAAA,QAAA,CAAA,GAAA;AAAA,MACA,KAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACD,MAAA;AAED,MAAA,KAAA;AACA,MAAA,UAAgB;AACd,KAAA,CAAA,CAAA;AAAsB,IACxB,QAAC,CAAA,YAAA,CAAA,IAAA,CAAA,CAAA;AAED,IAAA,SAAA,CAAA,MAAkB;AAChB,MAAS,QAAA,CAAA,QAAA,CAAA,IAAA,CAAA,CAAe;AAAQ,KACjC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,26 +1,41 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, unref, normalizeStyle, withCtx, renderSlot } from 'vue';
|
2
|
+
import { textProps } from './text2.mjs';
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
+
import { isUndefined } from '../../../utils/types.mjs';
|
3
7
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
8
|
+
const __default__ = defineComponent({
|
9
|
+
name: "ElText"
|
10
|
+
});
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...__default__,
|
13
|
+
props: textProps,
|
14
|
+
setup(__props) {
|
15
|
+
const props = __props;
|
16
|
+
const textSize = useFormSize();
|
17
|
+
const ns = useNamespace("text");
|
18
|
+
const textKls = computed(() => [
|
19
|
+
ns.b(),
|
20
|
+
ns.m(props.type),
|
21
|
+
ns.m(textSize.value),
|
22
|
+
ns.is("truncated", props.truncated),
|
23
|
+
ns.is("line-clamp", !isUndefined(props.lineClamp))
|
24
|
+
]);
|
25
|
+
return (_ctx, _cache) => {
|
26
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
27
|
+
class: normalizeClass(unref(textKls)),
|
28
|
+
style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
29
|
+
}, {
|
30
|
+
default: withCtx(() => [
|
31
|
+
renderSlot(_ctx.$slots, "default")
|
32
|
+
]),
|
33
|
+
_: 3
|
34
|
+
}, 8, ["class", "style"]);
|
35
|
+
};
|
22
36
|
}
|
23
37
|
});
|
38
|
+
var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
|
24
39
|
|
25
|
-
export {
|
40
|
+
export { Text as default };
|
26
41
|
//# sourceMappingURL=text.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.
|
1
|
+
{"version":3,"file":"text.mjs","sources":["../../../../../../packages/components/text/src/text.vue"],"sourcesContent":["<template>\n <component\n :is=\"tag\"\n :class=\"textKls\"\n :style=\"{ '-webkit-line-clamp': lineClamp }\"\n >\n <slot />\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isUndefined } from '@element-plus/utils'\nimport { textProps } from './text'\n\ndefineOptions({\n name: 'ElText',\n})\n\nconst props = defineProps(textProps)\n\nconst textSize = useFormSize()\nconst ns = useNamespace('text')\n\nconst textKls = computed(() => [\n ns.b(),\n ns.m(props.type),\n ns.m(textSize.value),\n ns.is('truncated', props.truncated),\n ns.is('line-clamp', !isUndefined(props.lineClamp)),\n])\n</script>\n"],"names":[],"mappings":";;;;;;;mCAiBc,CAAA;AAAA,EACZ,IAAM,EAAA,QAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAA,MAAM,WAAW,WAAY,EAAA,CAAA;AAC7B,IAAM,MAAA,EAAA,GAAK,aAAa,MAAM,CAAA,CAAA;AAE9B,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAAA,MAC7B,GAAG,CAAE,EAAA;AAAA,MACL,EAAA,CAAG,CAAE,CAAA,KAAA,CAAM,IAAI,CAAA;AAAA,MACf,EAAA,CAAG,CAAE,CAAA,QAAA,CAAS,KAAK,CAAA;AAAA,MACnB,EAAG,CAAA,EAAA,CAAG,WAAa,EAAA,KAAA,CAAM,SAAS,CAAA;AAAA,MAClC,GAAG,EAAG,CAAA,YAAA,EAAc,CAAC,WAAY,CAAA,KAAA,CAAM,SAAS,CAAC,CAAA;AAAA,KAClD,CAAA,CAAA;;;;;;;;;;;;;;;;;;"}
|
@@ -1,41 +1,26 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
-
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
-
import { isUndefined } from '../../../utils/types.mjs';
|
1
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
2
|
+
import { componentSizes } from '../../../constants/size.mjs';
|
7
3
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
27
|
-
class: normalizeClass(unref(textKls)),
|
28
|
-
style: normalizeStyle({ "-webkit-line-clamp": _ctx.lineClamp })
|
29
|
-
}, {
|
30
|
-
default: withCtx(() => [
|
31
|
-
renderSlot(_ctx.$slots, "default")
|
32
|
-
]),
|
33
|
-
_: 3
|
34
|
-
}, 8, ["class", "style"]);
|
35
|
-
};
|
4
|
+
const textProps = buildProps({
|
5
|
+
type: {
|
6
|
+
type: String,
|
7
|
+
values: ["primary", "success", "info", "warning", "danger", ""],
|
8
|
+
default: ""
|
9
|
+
},
|
10
|
+
size: {
|
11
|
+
type: String,
|
12
|
+
values: componentSizes,
|
13
|
+
default: ""
|
14
|
+
},
|
15
|
+
truncated: Boolean,
|
16
|
+
lineClamp: {
|
17
|
+
type: [String, Number]
|
18
|
+
},
|
19
|
+
tag: {
|
20
|
+
type: String,
|
21
|
+
default: "span"
|
36
22
|
}
|
37
23
|
});
|
38
|
-
var Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "text.vue"]]);
|
39
24
|
|
40
|
-
export {
|
25
|
+
export { textProps };
|
41
26
|
//# sourceMappingURL=text2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.
|
1
|
+
{"version":3,"file":"text2.mjs","sources":["../../../../../../packages/components/text/src/text.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes } from 'vue'\n\nexport const textProps = buildProps({\n /**\n * @description text type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'info', 'warning', 'danger', ''],\n default: '',\n },\n /**\n * @description text size\n */\n size: {\n type: String,\n values: componentSizes,\n default: '',\n },\n /**\n * @description render ellipsis\n */\n truncated: Boolean,\n /**\n * @description maximum lines\n */\n lineClamp: {\n type: [String, Number],\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: String,\n default: 'span',\n },\n} as const)\n\nexport type TextProps = ExtractPropTypes<typeof textProps>\n"],"names":[],"mappings":";;;AAEY,MAAC,SAAS,GAAG,UAAU,CAAC;AACpC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC;AACnE,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useTooltipContentProps } from './content.mjs';
|
2
2
|
import { useTooltipTriggerProps } from './trigger.mjs';
|
3
|
-
import { popperProps } from '../../popper/src/
|
3
|
+
import { popperProps } from '../../popper/src/popper2.mjs';
|
4
4
|
import { popperArrowProps } from '../../popper/src/arrow.mjs';
|
5
5
|
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
6
6
|
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import TooltipV2 from './src/tooltip2.mjs';
|
2
|
-
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/
|
2
|
+
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/arrow2.mjs';
|
3
3
|
export { tooltipV2ContentProps } from './src/content.mjs';
|
4
4
|
export { tooltipV2RootProps } from './src/root.mjs';
|
5
5
|
export { tooltipV2Props } from './src/tooltip.mjs';
|
@@ -1,27 +1,43 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
|
2
|
+
import { tooltipV2RootKey, tooltipV2ContentKey } from './constants.mjs';
|
3
|
+
import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow2.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
3
5
|
|
4
|
-
const
|
5
|
-
|
6
|
-
type: Number,
|
7
|
-
default: 10
|
8
|
-
},
|
9
|
-
height: {
|
10
|
-
type: Number,
|
11
|
-
default: 10
|
12
|
-
},
|
13
|
-
style: {
|
14
|
-
type: definePropType(Object),
|
15
|
-
default: null
|
16
|
-
}
|
6
|
+
const __default__ = defineComponent({
|
7
|
+
name: "ElTooltipV2Arrow"
|
17
8
|
});
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
|
+
...__default__,
|
11
|
+
props: {
|
12
|
+
...tooltipV2ArrowProps,
|
13
|
+
...tooltipV2ArrowSpecialProps
|
14
|
+
},
|
15
|
+
setup(__props) {
|
16
|
+
const props = __props;
|
17
|
+
const { ns } = inject(tooltipV2RootKey);
|
18
|
+
const { arrowRef } = inject(tooltipV2ContentKey);
|
19
|
+
const arrowStyle = computed(() => {
|
20
|
+
const { style, width, height } = props;
|
21
|
+
const namespace = ns.namespace.value;
|
22
|
+
return {
|
23
|
+
[`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
|
24
|
+
[`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
|
25
|
+
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
26
|
+
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
27
|
+
...style || {}
|
28
|
+
};
|
29
|
+
});
|
30
|
+
return (_ctx, _cache) => {
|
31
|
+
return openBlock(), createElementBlock("span", {
|
32
|
+
ref_key: "arrowRef",
|
33
|
+
ref: arrowRef,
|
34
|
+
style: normalizeStyle(unref(arrowStyle)),
|
35
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
36
|
+
}, null, 6);
|
37
|
+
};
|
23
38
|
}
|
24
39
|
});
|
40
|
+
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
|
25
41
|
|
26
|
-
export {
|
42
|
+
export { TooltipV2Arrow as default };
|
27
43
|
//# sourceMappingURL=arrow.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
1
|
+
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from './constants'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'ElTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;mCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,kBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;AAOA,IAAA,MAAM,EAAE,EAAA,EAAO,GAAA,MAAA,CAAO,gBAAgB,CAAA,CAAA;AACtC,IAAA,MAAM,EAAE,QAAA,EAAa,GAAA,MAAA,CAAO,mBAAmB,CAAA,CAAA;AAE/C,IAAM,MAAA,UAAA,GAAa,SAAwB,MAAM;AAC/C,MAAA,MAAM,EAAE,KAAA,EAAO,KAAO,EAAA,MAAA,EAAW,GAAA,KAAA,CAAA;AACjC,MAAM,MAAA,SAAA,GAAY,GAAG,SAAU,CAAA,KAAA,CAAA;AAE/B,MAAO,OAAA;AAAA,QACL,CAAC,CAAK,EAAA,EAAA,SAAS,CAAyB,uBAAA,CAAA,GAAG,GAAG,KAAK,CAAA,EAAA,CAAA;AAAA,QACnD,CAAC,CAAK,EAAA,EAAA,SAAS,CAA0B,wBAAA,CAAA,GAAG,GAAG,MAAM,CAAA,EAAA,CAAA;AAAA,QACrD,CAAC,CAAK,EAAA,EAAA,SAAS,gCAAgC,GAAG,CAAA,EAAG,QAAQ,CAAC,CAAA,EAAA,CAAA;AAAA,QAC9D,CAAC,CAAK,EAAA,EAAA,SAAS,CAA+B,6BAAA,CAAA,GAAG,QAAQ,CAAI,GAAA,CAAA;AAAA,QAC7D,GAAI,SAAS,EAAC;AAAA,OAChB,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;"}
|
@@ -1,43 +1,27 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow.mjs';
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
1
|
+
import { tooltipV2Sides } from './common.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
5
3
|
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
const tooltipV2ArrowProps = buildProps({
|
5
|
+
width: {
|
6
|
+
type: Number,
|
7
|
+
default: 10
|
8
|
+
},
|
9
|
+
height: {
|
10
|
+
type: Number,
|
11
|
+
default: 10
|
14
12
|
},
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
26
|
-
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
27
|
-
...style || {}
|
28
|
-
};
|
29
|
-
});
|
30
|
-
return (_ctx, _cache) => {
|
31
|
-
return openBlock(), createElementBlock("span", {
|
32
|
-
ref_key: "arrowRef",
|
33
|
-
ref: arrowRef,
|
34
|
-
style: normalizeStyle(unref(arrowStyle)),
|
35
|
-
class: normalizeClass(unref(ns).e("arrow"))
|
36
|
-
}, null, 6);
|
37
|
-
};
|
13
|
+
style: {
|
14
|
+
type: definePropType(Object),
|
15
|
+
default: null
|
16
|
+
}
|
17
|
+
});
|
18
|
+
const tooltipV2ArrowSpecialProps = buildProps({
|
19
|
+
side: {
|
20
|
+
type: definePropType(String),
|
21
|
+
values: tooltipV2Sides,
|
22
|
+
required: true
|
38
23
|
}
|
39
24
|
});
|
40
|
-
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "arrow.vue"]]);
|
41
25
|
|
42
|
-
export {
|
26
|
+
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
|
43
27
|
//# sourceMappingURL=arrow2.mjs.map
|