@element-plus/nightly 0.0.20240226 → 0.0.20240228
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +1194 -856
- package/dist/index.full.min.js +24 -24
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +25 -25
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1192 -858
- 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/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/component.mjs +4 -1
- package/es/component.mjs.map +1 -1
- package/es/components/anchor/index.d.ts +196 -0
- package/es/components/anchor/index.mjs +13 -0
- package/es/components/anchor/index.mjs.map +1 -0
- package/es/components/anchor/src/anchor-link.d.ts +6 -0
- package/es/components/anchor/src/anchor-link.mjs +10 -0
- package/es/components/anchor/src/anchor-link.mjs.map +1 -0
- package/es/components/anchor/src/anchor-link.vue.d.ts +41 -0
- package/es/components/anchor/src/anchor-link2.mjs +86 -0
- package/es/components/anchor/src/anchor-link2.mjs.map +1 -0
- package/es/components/anchor/src/anchor.d.ts +23 -0
- package/es/components/anchor/src/anchor.mjs +196 -0
- package/es/components/anchor/src/anchor.mjs.map +1 -0
- package/es/components/anchor/src/anchor.vue.d.ts +115 -0
- package/es/components/anchor/src/anchor2.mjs +44 -0
- package/es/components/anchor/src/anchor2.mjs.map +1 -0
- package/es/components/anchor/src/constants.d.ts +15 -0
- package/es/components/anchor/src/constants.mjs +4 -0
- package/es/components/anchor/src/constants.mjs.map +1 -0
- package/es/components/anchor/style/css.d.ts +2 -0
- package/es/components/anchor/style/css.mjs +3 -0
- package/es/components/anchor/style/css.mjs.map +1 -0
- package/es/components/anchor/style/index.d.ts +2 -0
- package/es/components/anchor/style/index.mjs +3 -0
- package/es/components/anchor/style/index.mjs.map +1 -0
- package/es/components/anchor-link/style/css.d.ts +2 -0
- package/es/components/anchor-link/style/css.mjs +3 -0
- package/es/components/anchor-link/style/css.mjs.map +1 -0
- package/es/components/anchor-link/style/index.d.ts +2 -0
- package/es/components/anchor-link/style/index.mjs +3 -0
- package/es/components/anchor-link/style/index.mjs.map +1 -0
- package/es/components/autocomplete/index.d.ts +23 -23
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +23 -23
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +67 -32
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +32 -67
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -54
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +54 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.d.ts +4 -0
- package/es/components/badge/src/badge.d.ts +1 -0
- package/es/components/badge/src/badge.mjs +4 -0
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge.vue.d.ts +4 -0
- package/es/components/badge/src/badge2.mjs +4 -1
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +131 -18
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +18 -131
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/use-calendar.mjs +1 -11
- package/es/components/calendar/src/use-calendar.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +9 -9
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +70 -8
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +8 -70
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.d.ts +2 -2
- package/es/components/carousel/src/carousel.vue.d.ts +9 -9
- package/es/components/cascader/index.d.ts +56 -56
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +626 -65
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader.vue.d.ts +28 -28
- package/es/components/cascader/src/cascader2.mjs +65 -626
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +120 -0
- package/es/components/checkbox/src/checkbox-button.mjs +5 -4
- package/es/components/checkbox/src/checkbox-button.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
- package/es/components/checkbox/src/checkbox.d.ts +24 -1
- package/es/components/checkbox/src/checkbox.mjs +12 -0
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +40 -0
- package/es/components/checkbox/src/checkbox2.mjs +5 -4
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-event.mjs +2 -2
- package/es/components/checkbox/src/composables/use-checkbox-event.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +15 -8
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
- package/es/components/checkbox/src/composables/use-checkbox.mjs +40 -13
- package/es/components/checkbox/src/composables/use-checkbox.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +15 -15
- package/es/components/color-picker/src/color-picker.vue.d.ts +15 -15
- package/es/components/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +23 -74
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +74 -23
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/date-picker/src/composables/use-basic-date-table.mjs +1 -1
- package/es/components/date-picker/src/composables/use-basic-date-table.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +31 -31
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +31 -31
- package/es/components/date-picker/src/panel-utils.d.ts +62 -62
- package/es/components/descriptions/index.d.ts +4 -4
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +4 -4
- package/es/components/dialog/index.d.ts +3 -3
- package/es/components/dialog/src/dialog.vue.d.ts +3 -3
- package/es/components/divider/index.d.ts +8 -8
- package/es/components/divider/src/divider.d.ts +2 -2
- package/es/components/divider/src/divider.vue.d.ts +8 -8
- package/es/components/drawer/index.d.ts +4 -4
- package/es/components/drawer/src/drawer.vue.d.ts +4 -4
- package/es/components/dropdown/index.d.ts +10 -10
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +8 -8
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +3 -3
- package/es/components/form/index.d.ts +9 -9
- package/es/components/form/src/form.d.ts +2 -2
- package/es/components/form/src/form.vue.d.ts +9 -9
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +45 -401
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +401 -45
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +11 -9
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/index.d.ts +3 -3
- package/es/components/input/src/input.d.ts +1 -1
- package/es/components/input/src/input.vue.d.ts +3 -3
- package/es/components/input-number/index.d.ts +8 -8
- package/es/components/input-number/src/input-number.vue.d.ts +8 -8
- package/es/components/input-number/src/input-number2.mjs +4 -2
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/link/index.d.ts +1 -1
- package/es/components/link/src/link.vue.d.ts +1 -1
- package/es/components/menu/index.d.ts +6 -12
- package/es/components/menu/src/menu.d.ts +8 -8
- package/es/components/menu/src/sub-menu.d.ts +0 -4
- package/es/components/menu/src/sub-menu.mjs +2 -15
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +5 -1
- package/es/components/message-box/src/index.vue.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +2 -2
- package/es/components/page-header/index.d.ts +8 -8
- package/es/components/page-header/src/page-header.vue.d.ts +8 -8
- package/es/components/pagination/src/components/jumper.vue.d.ts +3 -3
- package/es/components/pagination/src/components/sizes.vue.d.ts +16 -19
- package/es/components/popconfirm/index.d.ts +12 -12
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +12 -12
- package/es/components/popover/index.d.ts +12 -12
- package/es/components/popover/src/popover.vue.d.ts +12 -12
- package/es/components/popper/src/composables/use-content.d.ts +1 -1
- package/es/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/es/components/popper/src/content.vue.d.ts +4 -4
- package/es/components/popper/src/utils.d.ts +1 -1
- package/es/components/progress/index.d.ts +1 -1
- package/es/components/progress/src/progress.vue.d.ts +1 -1
- package/es/components/radio/index.d.ts +77 -54
- package/es/components/radio/src/radio-button.d.ts +4 -2
- package/es/components/radio/src/radio-button.mjs +1 -5
- package/es/components/radio/src/radio-button.mjs.map +1 -1
- package/es/components/radio/src/radio-button.vue.d.ts +16 -7
- package/es/components/radio/src/radio-button2.mjs +4 -4
- package/es/components/radio/src/radio-button2.mjs.map +1 -1
- package/es/components/radio/src/radio-group.d.ts +3 -3
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group.vue.d.ts +10 -10
- package/es/components/radio/src/radio.d.ts +10 -6
- package/es/components/radio/src/radio.mjs +13 -9
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio.vue.d.ts +23 -18
- package/es/components/radio/src/radio2.mjs +4 -4
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/radio/src/use-radio.d.ts +4 -5
- package/es/components/radio/src/use-radio.mjs +21 -3
- package/es/components/radio/src/use-radio.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +2 -2
- package/es/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
- package/es/components/scrollbar/index.d.ts +3 -3
- package/es/components/scrollbar/src/scrollbar.d.ts +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +3 -3
- package/es/components/select/index.d.ts +16 -19
- package/es/components/select/src/select.d.ts +0 -1
- package/es/components/select/src/select.mjs +0 -4
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +16 -19
- package/es/components/select/src/useSelect.d.ts +16 -16
- package/es/components/select/src/useSelect.mjs +3 -19
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +32 -32
- package/es/components/select-v2/src/select-dropdown.mjs +5 -10
- package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +16 -16
- package/es/components/select-v2/src/useSelect.d.ts +16 -16
- package/es/components/select-v2/src/useSelect.mjs +1 -9
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/slider/index.d.ts +36 -36
- package/es/components/slider/src/button.vue.d.ts +5 -5
- package/es/components/slider/src/composables/use-slide.d.ts +22 -22
- package/es/components/slider/src/slider.vue.d.ts +36 -36
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/src/space.d.ts +4 -4
- package/es/components/steps/index.d.ts +5 -5
- package/es/components/steps/src/steps.d.ts +1 -1
- package/es/components/steps/src/steps.vue.d.ts +5 -5
- package/es/components/switch/index.d.ts +0 -19
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.d.ts +0 -4
- package/es/components/switch/src/switch.mjs +234 -98
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +0 -19
- package/es/components/switch/src/switch2.mjs +82 -268
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue.d.ts +8 -8
- package/es/components/table-v2/src/composables/use-styles.mjs +1 -1
- package/es/components/table-v2/src/composables/use-styles.mjs.map +1 -1
- package/es/components/tabs/index.d.ts +3 -15
- package/es/components/tabs/src/tabs.d.ts +4 -22
- package/es/components/tabs/src/tabs.mjs +7 -29
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/teleport/index.d.ts +1 -1
- package/es/components/teleport/src/teleport.vue.d.ts +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +15 -15
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +23 -23
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +28 -28
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +28 -28
- package/es/components/time-select/index.d.ts +64 -76
- package/es/components/time-select/src/time-select.vue.d.ts +32 -38
- package/es/components/tooltip/index.d.ts +4 -4
- package/es/components/tooltip/src/content.vue.d.ts +4 -4
- package/es/components/tooltip/src/tooltip.vue.d.ts +4 -4
- package/es/components/tooltip-v2/index.d.ts +20 -20
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/content.d.ts +1 -1
- package/es/components/tooltip-v2/src/content.vue.d.ts +7 -7
- package/es/components/tooltip-v2/src/tooltip.d.ts +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.vue.d.ts +20 -20
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.d.ts +32 -31
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/content.d.ts +1 -1
- package/es/components/tour/src/content.vue.d.ts +9 -8
- package/es/components/tour/src/content2.mjs +7 -1
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/helper.mjs +5 -1
- package/es/components/tour/src/helper.mjs.map +1 -1
- package/es/components/tour/src/step.d.ts +2 -2
- package/es/components/tour/src/step.vue.d.ts +7 -7
- package/es/components/tour/src/tour.d.ts +2 -2
- package/es/components/tour/src/tour.mjs +152 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +18 -17
- package/es/components/tour/src/tour2.mjs +69 -152
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +415 -15
- package/es/components/transfer/src/transfer-panel.vue.d.ts +83 -3
- package/es/components/transfer/src/transfer.vue.d.ts +415 -15
- package/es/components/tree-v2/index.d.ts +84 -4
- package/es/components/tree-v2/src/tree-node.vue.d.ts +80 -0
- package/es/components/tree-v2/src/tree.vue.d.ts +84 -4
- package/es/components/upload/index.d.ts +1 -1
- package/es/components/upload/src/upload-list.vue.d.ts +1 -1
- package/es/components/upload/src/upload.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/es/components/virtual-list/src/components/scrollbar.d.ts +3 -3
- package/es/components/virtual-list/src/props.d.ts +2 -2
- package/es/components/watermark/index.d.ts +1 -1
- package/es/components/watermark/src/watermark.vue.d.ts +1 -1
- package/es/hooks/use-floating/index.d.ts +2 -2
- package/es/hooks/use-popper/index.d.ts +1 -1
- package/es/index.mjs +11 -9
- package/es/index.mjs.map +1 -1
- package/es/utils/dom/element.d.ts +3 -0
- package/es/utils/dom/element.mjs +16 -0
- package/es/utils/dom/element.mjs.map +1 -0
- package/es/utils/dom/index.d.ts +1 -0
- package/es/utils/dom/index.mjs +2 -1
- package/es/utils/dom/index.mjs.map +1 -1
- package/es/utils/dom/scroll.d.ts +3 -0
- package/es/utils/dom/scroll.mjs +35 -1
- package/es/utils/dom/scroll.mjs.map +1 -1
- package/es/utils/easings.d.ts +1 -0
- package/es/utils/easings.mjs +11 -0
- package/es/utils/easings.mjs.map +1 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.mjs +5 -2
- package/es/utils/index.mjs.map +1 -1
- package/es/utils/throttleByRaf.d.ts +4 -0
- package/es/utils/throttleByRaf.mjs +22 -0
- package/es/utils/throttleByRaf.mjs.map +1 -0
- package/es/utils/types.d.ts +1 -0
- package/es/utils/types.mjs +4 -1
- package/es/utils/types.mjs.map +1 -1
- package/es/utils/vue/vnode.d.ts +6 -6
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +4 -1
- package/lib/component.js.map +1 -1
- package/lib/components/anchor/index.d.ts +196 -0
- package/lib/components/anchor/index.js +21 -0
- package/lib/components/anchor/index.js.map +1 -0
- package/lib/components/anchor/src/anchor-link.d.ts +6 -0
- package/lib/components/anchor/src/anchor-link.js +14 -0
- package/lib/components/anchor/src/anchor-link.js.map +1 -0
- package/lib/components/anchor/src/anchor-link.vue.d.ts +41 -0
- package/lib/components/anchor/src/anchor-link2.js +90 -0
- package/lib/components/anchor/src/anchor-link2.js.map +1 -0
- package/lib/components/anchor/src/anchor.d.ts +23 -0
- package/lib/components/anchor/src/anchor.js +200 -0
- package/lib/components/anchor/src/anchor.js.map +1 -0
- package/lib/components/anchor/src/anchor.vue.d.ts +115 -0
- package/lib/components/anchor/src/anchor2.js +49 -0
- package/lib/components/anchor/src/anchor2.js.map +1 -0
- package/lib/components/anchor/src/constants.d.ts +15 -0
- package/lib/components/anchor/src/constants.js +8 -0
- package/lib/components/anchor/src/constants.js.map +1 -0
- package/lib/components/anchor/style/css.d.ts +2 -0
- package/lib/components/anchor/style/css.js +6 -0
- package/lib/components/anchor/style/css.js.map +1 -0
- package/lib/components/anchor/style/index.d.ts +2 -0
- package/lib/components/anchor/style/index.js +6 -0
- package/lib/components/anchor/style/index.js.map +1 -0
- package/lib/components/anchor-link/style/css.d.ts +2 -0
- package/lib/components/anchor-link/style/css.js +6 -0
- package/lib/components/anchor-link/style/css.js.map +1 -0
- package/lib/components/anchor-link/style/index.d.ts +2 -0
- package/lib/components/anchor-link/style/index.js +6 -0
- package/lib/components/anchor-link/style/index.js.map +1 -0
- package/lib/components/autocomplete/index.d.ts +23 -23
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +23 -23
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +67 -33
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +33 -67
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -54
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +54 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.d.ts +4 -0
- package/lib/components/badge/src/badge.d.ts +1 -0
- package/lib/components/badge/src/badge.js +4 -0
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +4 -0
- package/lib/components/badge/src/badge2.js +4 -1
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +131 -19
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +19 -131
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/use-calendar.js +0 -10
- package/lib/components/calendar/src/use-calendar.js.map +1 -1
- package/lib/components/carousel/index.d.ts +9 -9
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +70 -8
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +8 -70
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.d.ts +2 -2
- package/lib/components/carousel/src/carousel.vue.d.ts +9 -9
- package/lib/components/cascader/index.d.ts +56 -56
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +626 -66
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader.vue.d.ts +28 -28
- package/lib/components/cascader/src/cascader2.js +66 -626
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +120 -0
- package/lib/components/checkbox/src/checkbox-button.js +5 -4
- package/lib/components/checkbox/src/checkbox-button.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +40 -0
- package/lib/components/checkbox/src/checkbox.d.ts +24 -1
- package/lib/components/checkbox/src/checkbox.js +12 -0
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +40 -0
- package/lib/components/checkbox/src/checkbox2.js +5 -4
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-event.js +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox-event.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +1 -0
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +13 -6
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox.d.ts +1 -0
- package/lib/components/checkbox/src/composables/use-checkbox.js +40 -13
- package/lib/components/checkbox/src/composables/use-checkbox.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +15 -15
- package/lib/components/color-picker/src/color-picker.vue.d.ts +15 -15
- package/lib/components/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +24 -74
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +74 -24
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/date-picker/src/composables/use-basic-date-table.js +1 -1
- package/lib/components/date-picker/src/composables/use-basic-date-table.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +31 -31
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +31 -31
- package/lib/components/date-picker/src/panel-utils.d.ts +62 -62
- package/lib/components/descriptions/index.d.ts +4 -4
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +4 -4
- package/lib/components/dialog/index.d.ts +3 -3
- package/lib/components/dialog/src/dialog.vue.d.ts +3 -3
- package/lib/components/divider/index.d.ts +8 -8
- package/lib/components/divider/src/divider.d.ts +2 -2
- package/lib/components/divider/src/divider.vue.d.ts +8 -8
- package/lib/components/drawer/index.d.ts +4 -4
- package/lib/components/drawer/src/drawer.vue.d.ts +4 -4
- package/lib/components/dropdown/index.d.ts +10 -10
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +8 -8
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +3 -3
- package/lib/components/form/index.d.ts +9 -9
- package/lib/components/form/src/form.d.ts +2 -2
- package/lib/components/form/src/form.vue.d.ts +9 -9
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +46 -401
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +401 -46
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +28 -22
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +3 -3
- package/lib/components/input/src/input.d.ts +1 -1
- package/lib/components/input/src/input.vue.d.ts +3 -3
- package/lib/components/input-number/index.d.ts +8 -8
- package/lib/components/input-number/src/input-number.vue.d.ts +8 -8
- package/lib/components/input-number/src/input-number2.js +4 -2
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/link/index.d.ts +1 -1
- package/lib/components/link/src/link.vue.d.ts +1 -1
- package/lib/components/menu/index.d.ts +6 -12
- package/lib/components/menu/src/menu.d.ts +8 -8
- package/lib/components/menu/src/sub-menu.d.ts +0 -4
- package/lib/components/menu/src/sub-menu.js +10 -23
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +5 -1
- package/lib/components/message-box/src/index.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +2 -2
- package/lib/components/page-header/index.d.ts +8 -8
- package/lib/components/page-header/src/page-header.vue.d.ts +8 -8
- package/lib/components/pagination/src/components/jumper.vue.d.ts +3 -3
- package/lib/components/pagination/src/components/sizes.vue.d.ts +16 -19
- package/lib/components/popconfirm/index.d.ts +12 -12
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +12 -12
- package/lib/components/popover/index.d.ts +12 -12
- package/lib/components/popover/src/popover.vue.d.ts +12 -12
- package/lib/components/popper/src/composables/use-content.d.ts +1 -1
- package/lib/components/popper/src/composables/use-focus-trap.d.ts +1 -1
- package/lib/components/popper/src/content.vue.d.ts +4 -4
- package/lib/components/popper/src/utils.d.ts +1 -1
- package/lib/components/progress/index.d.ts +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +1 -1
- package/lib/components/radio/index.d.ts +77 -54
- package/lib/components/radio/src/radio-button.d.ts +4 -2
- package/lib/components/radio/src/radio-button.js +1 -5
- package/lib/components/radio/src/radio-button.js.map +1 -1
- package/lib/components/radio/src/radio-button.vue.d.ts +16 -7
- package/lib/components/radio/src/radio-button2.js +4 -4
- package/lib/components/radio/src/radio-button2.js.map +1 -1
- package/lib/components/radio/src/radio-group.d.ts +3 -3
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group.vue.d.ts +10 -10
- package/lib/components/radio/src/radio.d.ts +10 -6
- package/lib/components/radio/src/radio.js +13 -9
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio.vue.d.ts +23 -18
- package/lib/components/radio/src/radio2.js +4 -4
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/radio/src/use-radio.d.ts +4 -5
- package/lib/components/radio/src/use-radio.js +21 -3
- package/lib/components/radio/src/use-radio.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +1 -1
- package/lib/components/scrollbar/index.d.ts +3 -3
- package/lib/components/scrollbar/src/scrollbar.d.ts +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +3 -3
- package/lib/components/select/index.d.ts +16 -19
- package/lib/components/select/src/select.d.ts +0 -1
- package/lib/components/select/src/select.js +0 -4
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +16 -19
- package/lib/components/select/src/useSelect.d.ts +16 -16
- package/lib/components/select/src/useSelect.js +4 -20
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +32 -32
- package/lib/components/select-v2/src/select-dropdown.js +5 -10
- package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +16 -16
- package/lib/components/select-v2/src/useSelect.d.ts +16 -16
- package/lib/components/select-v2/src/useSelect.js +1 -9
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/slider/index.d.ts +36 -36
- package/lib/components/slider/src/button.vue.d.ts +5 -5
- package/lib/components/slider/src/composables/use-slide.d.ts +22 -22
- package/lib/components/slider/src/slider.vue.d.ts +36 -36
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/src/space.d.ts +4 -4
- package/lib/components/steps/index.d.ts +5 -5
- package/lib/components/steps/src/steps.d.ts +1 -1
- package/lib/components/steps/src/steps.vue.d.ts +5 -5
- package/lib/components/switch/index.d.ts +0 -19
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.d.ts +0 -4
- package/lib/components/switch/src/switch.js +233 -98
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +0 -19
- package/lib/components/switch/src/switch2.js +82 -267
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue.d.ts +8 -8
- package/lib/components/table-v2/src/composables/use-styles.js +1 -1
- package/lib/components/table-v2/src/composables/use-styles.js.map +1 -1
- package/lib/components/tabs/index.d.ts +3 -15
- package/lib/components/tabs/src/tabs.d.ts +4 -22
- package/lib/components/tabs/src/tabs.js +7 -29
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/teleport/index.d.ts +1 -1
- package/lib/components/teleport/src/teleport.vue.d.ts +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +15 -15
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +23 -23
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +28 -28
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +28 -28
- package/lib/components/time-select/index.d.ts +64 -76
- package/lib/components/time-select/src/time-select.vue.d.ts +32 -38
- package/lib/components/tooltip/index.d.ts +4 -4
- package/lib/components/tooltip/src/content.vue.d.ts +4 -4
- package/lib/components/tooltip/src/tooltip.vue.d.ts +4 -4
- package/lib/components/tooltip-v2/index.d.ts +20 -20
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/content.d.ts +1 -1
- package/lib/components/tooltip-v2/src/content.vue.d.ts +7 -7
- package/lib/components/tooltip-v2/src/tooltip.d.ts +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.vue.d.ts +20 -20
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.d.ts +32 -31
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/content.d.ts +1 -1
- package/lib/components/tour/src/content.vue.d.ts +9 -8
- package/lib/components/tour/src/content2.js +7 -1
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/helper.js +5 -1
- package/lib/components/tour/src/helper.js.map +1 -1
- package/lib/components/tour/src/step.d.ts +2 -2
- package/lib/components/tour/src/step.vue.d.ts +7 -7
- package/lib/components/tour/src/tour.d.ts +2 -2
- package/lib/components/tour/src/tour.js +151 -69
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +18 -17
- package/lib/components/tour/src/tour2.js +69 -151
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +415 -15
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +83 -3
- package/lib/components/transfer/src/transfer.vue.d.ts +415 -15
- package/lib/components/tree-v2/index.d.ts +84 -4
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +80 -0
- package/lib/components/tree-v2/src/tree.vue.d.ts +84 -4
- package/lib/components/upload/index.d.ts +1 -1
- package/lib/components/upload/src/upload-list.vue.d.ts +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/lib/components/virtual-list/src/components/scrollbar.d.ts +3 -3
- package/lib/components/virtual-list/src/props.d.ts +2 -2
- package/lib/components/watermark/index.d.ts +1 -1
- package/lib/components/watermark/src/watermark.vue.d.ts +1 -1
- package/lib/hooks/use-floating/index.d.ts +2 -2
- package/lib/hooks/use-popper/index.d.ts +1 -1
- package/lib/index.js +119 -113
- package/lib/index.js.map +1 -1
- package/lib/utils/dom/element.d.ts +3 -0
- package/lib/utils/dom/element.js +20 -0
- package/lib/utils/dom/element.js.map +1 -0
- package/lib/utils/dom/index.d.ts +1 -0
- package/lib/utils/dom/index.js +5 -0
- package/lib/utils/dom/index.js.map +1 -1
- package/lib/utils/dom/scroll.d.ts +3 -0
- package/lib/utils/dom/scroll.js +37 -0
- package/lib/utils/dom/scroll.js.map +1 -1
- package/lib/utils/easings.d.ts +1 -0
- package/lib/utils/easings.js +15 -0
- package/lib/utils/easings.js.map +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +10 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/throttleByRaf.d.ts +4 -0
- package/lib/utils/throttleByRaf.js +26 -0
- package/lib/utils/throttleByRaf.js.map +1 -0
- package/lib/utils/types.d.ts +1 -0
- package/lib/utils/types.js +4 -0
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/vue/vnode.d.ts +6 -6
- 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/tags.json +1 -1
- package/theme-chalk/el-anchor-link.css +1 -0
- package/theme-chalk/el-anchor.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/anchor-link.scss +42 -0
- package/theme-chalk/src/anchor.scss +93 -0
- package/theme-chalk/src/common/var.scss +16 -0
- package/theme-chalk/src/index.scss +2 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.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 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: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether Switch is in loading state\n */\n loading: {\n type: Boolean,\n default: false,\n },\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: {\n type: Boolean,\n default: false,\n },\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 * @deprecated background color when in `on` state ( deprecated, use CSS var `--el-switch-on-color` instead )\n */\n activeColor: {\n type: String,\n default: '',\n },\n /**\n * @deprecated background color when in `off` state ( deprecated, use CSS var `--el-switch-off-color` instead )\n */\n inactiveColor: {\n type: String,\n default: '',\n },\n /**\n * @deprecated border color of the switch ( deprecated, use CSS var `--el-switch-border-color` instead )\n */\n borderColor: {\n type: String,\n default: '',\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 /**\n * @deprecated binding value ( deprecated, use `model-value / v-model` instead )\n */\n value: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description native input aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\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":";;;;;;;;;AAcY,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;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,SAA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AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,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":"switch.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=\"label\"\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 { isPromise } from '@vue/shared'\nimport { addUnit, debugWarn, isBoolean, throwError } 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":";;;;;;;;;;;;;;;;;;;;;;;;mCA+Fc,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,I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IAAA,EAAA,EAAA,EAAA,CAAA;AAEA,MAAA,CAAA,EAAA,GAAA,CAAA,EAAgB,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AACd,KAAM,CAAA;AAAyB,IACjC,SAAC,CAAA,MAAA;AAED,MAAa,KAAA,CAAA,KAAA,CAAA,OAAA,GAAA,OAAA,CAAA,KAAA,CAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IAIA,MAAA,CAAA;AAAA,MACD,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -39,9 +39,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
39
39
|
readonly inactiveText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
40
40
|
readonly activeValue: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, true, boolean>;
|
|
41
41
|
readonly inactiveValue: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
42
|
-
readonly activeColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
43
|
-
readonly inactiveColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
44
|
-
readonly borderColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
45
42
|
readonly name: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
46
43
|
readonly validateEvent: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
47
44
|
readonly beforeChange: {
|
|
@@ -57,7 +54,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
54
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
58
55
|
__epPropKey: true;
|
|
59
56
|
};
|
|
60
|
-
readonly value: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
61
57
|
readonly label: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
62
58
|
}, {
|
|
63
59
|
COMPONENT_NAME: string;
|
|
@@ -101,9 +97,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
97
|
readonly inactiveText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
102
98
|
readonly activeValue: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, true, boolean>;
|
|
103
99
|
readonly inactiveValue: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
104
|
-
readonly activeColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
105
|
-
readonly inactiveColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
106
|
-
readonly borderColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
107
100
|
readonly name: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
108
101
|
readonly validateEvent: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
109
102
|
readonly beforeChange: {
|
|
@@ -119,7 +112,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
119
112
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
120
113
|
__epPropKey: true;
|
|
121
114
|
};
|
|
122
|
-
readonly value: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
123
115
|
readonly label: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
124
116
|
}>> & {
|
|
125
117
|
onChange?: ((val: string | number | boolean) => any) | undefined;
|
|
@@ -127,7 +119,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
127
119
|
onInput?: ((val: string | number | boolean) => any) | undefined;
|
|
128
120
|
}>>;
|
|
129
121
|
emit: ((event: "update:modelValue", val: string | number | boolean) => void) & ((event: "change", val: string | number | boolean) => void) & ((event: "input", val: string | number | boolean) => void);
|
|
130
|
-
vm: import("vue").ComponentInternalInstance;
|
|
131
122
|
formItem: import("@element-plus/nightly/es/components/form").FormItemContext | undefined;
|
|
132
123
|
switchSize: import("vue").ComputedRef<"" | "default" | "small" | "large">;
|
|
133
124
|
ns: {
|
|
@@ -148,7 +139,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
148
139
|
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
149
140
|
cssVarBlockName: (name: string) => string;
|
|
150
141
|
};
|
|
151
|
-
useBatchDeprecated: (list: string[][]) => void;
|
|
152
142
|
inputId: import("vue").Ref<string | undefined>;
|
|
153
143
|
switchDisabled: import("vue").ComputedRef<boolean>;
|
|
154
144
|
isControlled: import("vue").Ref<boolean>;
|
|
@@ -162,7 +152,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
162
152
|
checked: import("vue").ComputedRef<boolean>;
|
|
163
153
|
handleChange: () => void;
|
|
164
154
|
switchValue: () => void;
|
|
165
|
-
styles: import("vue").ComputedRef<Record<string, string>>;
|
|
166
155
|
focus: () => void;
|
|
167
156
|
ElIcon: import("@element-plus/nightly/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
168
157
|
readonly size: {
|
|
@@ -272,9 +261,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
272
261
|
readonly inactiveText: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
273
262
|
readonly activeValue: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, true, boolean>;
|
|
274
263
|
readonly inactiveValue: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
275
|
-
readonly activeColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
276
|
-
readonly inactiveColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
277
|
-
readonly borderColor: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
278
264
|
readonly name: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
279
265
|
readonly validateEvent: import("@element-plus/nightly/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
280
266
|
readonly beforeChange: {
|
|
@@ -290,7 +276,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
290
276
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
291
277
|
__epPropKey: true;
|
|
292
278
|
};
|
|
293
|
-
readonly value: import("@element-plus/nightly/es/utils").EpPropFinalized<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown, false, boolean>;
|
|
294
279
|
readonly label: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
295
280
|
}>> & {
|
|
296
281
|
onChange?: ((val: string | number | boolean) => any) | undefined;
|
|
@@ -298,20 +283,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
298
283
|
onInput?: ((val: string | number | boolean) => any) | undefined;
|
|
299
284
|
}, {
|
|
300
285
|
readonly width: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
301
|
-
readonly value: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
|
|
302
286
|
readonly modelValue: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
|
|
303
287
|
readonly label: string;
|
|
304
288
|
readonly disabled: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
305
289
|
readonly name: string;
|
|
306
290
|
readonly validateEvent: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
307
|
-
readonly borderColor: string;
|
|
308
291
|
readonly loading: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
309
292
|
readonly inlinePrompt: import("@element-plus/nightly/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
310
293
|
readonly activeText: string;
|
|
311
294
|
readonly inactiveText: string;
|
|
312
295
|
readonly activeValue: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
|
|
313
296
|
readonly inactiveValue: import("@element-plus/nightly/es/utils").EpPropMergeType<readonly [BooleanConstructor, StringConstructor, NumberConstructor], unknown, unknown>;
|
|
314
|
-
readonly activeColor: string;
|
|
315
|
-
readonly inactiveColor: string;
|
|
316
297
|
}>;
|
|
317
298
|
export default _default;
|
|
@@ -1,276 +1,90 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, computed, ref, watch, nextTick, onMounted, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, withModifiers, createElementVNode, withKeys, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, toDisplayString, createVNode, renderSlot } from 'vue';
|
|
2
|
-
import { isPromise } from '@vue/shared';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import { ElIcon } from '../../icon/index.mjs';
|
|
5
|
-
import '../../form/index.mjs';
|
|
6
|
-
import { Loading } from '@element-plus/icons-vue';
|
|
7
2
|
import '../../../constants/index.mjs';
|
|
8
|
-
import '../../../
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
12
|
-
import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
13
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
14
|
-
import { useDeprecated } from '../../../hooks/use-deprecated/index.mjs';
|
|
15
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
|
4
|
+
import { isValidComponentSize } from '../../../utils/vue/validator.mjs';
|
|
5
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
16
6
|
import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
7
|
+
import { isBoolean, isNumber } from '../../../utils/types.mjs';
|
|
8
|
+
import { isString } from '@vue/shared';
|
|
19
9
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
const actualValue = computed(() => {
|
|
93
|
-
return isControlled.value ? props.modelValue : props.value;
|
|
94
|
-
});
|
|
95
|
-
const checked = computed(() => actualValue.value === props.activeValue);
|
|
96
|
-
if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
|
|
97
|
-
emit(UPDATE_MODEL_EVENT, props.inactiveValue);
|
|
98
|
-
emit(CHANGE_EVENT, props.inactiveValue);
|
|
99
|
-
emit(INPUT_EVENT, props.inactiveValue);
|
|
100
|
-
}
|
|
101
|
-
watch(checked, (val) => {
|
|
102
|
-
var _a;
|
|
103
|
-
input.value.checked = val;
|
|
104
|
-
if (props.validateEvent) {
|
|
105
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn(err));
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
const handleChange = () => {
|
|
109
|
-
const val = checked.value ? props.inactiveValue : props.activeValue;
|
|
110
|
-
emit(UPDATE_MODEL_EVENT, val);
|
|
111
|
-
emit(CHANGE_EVENT, val);
|
|
112
|
-
emit(INPUT_EVENT, val);
|
|
113
|
-
nextTick(() => {
|
|
114
|
-
input.value.checked = checked.value;
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
const switchValue = () => {
|
|
118
|
-
if (switchDisabled.value)
|
|
119
|
-
return;
|
|
120
|
-
const { beforeChange } = props;
|
|
121
|
-
if (!beforeChange) {
|
|
122
|
-
handleChange();
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
const shouldChange = beforeChange();
|
|
126
|
-
const isPromiseOrBool = [
|
|
127
|
-
isPromise(shouldChange),
|
|
128
|
-
isBoolean(shouldChange)
|
|
129
|
-
].includes(true);
|
|
130
|
-
if (!isPromiseOrBool) {
|
|
131
|
-
throwError(COMPONENT_NAME, "beforeChange must return type `Promise<boolean>` or `boolean`");
|
|
132
|
-
}
|
|
133
|
-
if (isPromise(shouldChange)) {
|
|
134
|
-
shouldChange.then((result) => {
|
|
135
|
-
if (result) {
|
|
136
|
-
handleChange();
|
|
137
|
-
}
|
|
138
|
-
}).catch((e) => {
|
|
139
|
-
debugWarn(COMPONENT_NAME, `some error occurred: ${e}`);
|
|
140
|
-
});
|
|
141
|
-
} else if (shouldChange) {
|
|
142
|
-
handleChange();
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
const styles = computed(() => {
|
|
146
|
-
return ns.cssVarBlock({
|
|
147
|
-
...props.activeColor ? { "on-color": props.activeColor } : null,
|
|
148
|
-
...props.inactiveColor ? { "off-color": props.inactiveColor } : null,
|
|
149
|
-
...props.borderColor ? { "border-color": props.borderColor } : null
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
const focus = () => {
|
|
153
|
-
var _a, _b;
|
|
154
|
-
(_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
|
155
|
-
};
|
|
156
|
-
onMounted(() => {
|
|
157
|
-
input.value.checked = checked.value;
|
|
158
|
-
});
|
|
159
|
-
expose({
|
|
160
|
-
focus,
|
|
161
|
-
checked
|
|
162
|
-
});
|
|
163
|
-
return (_ctx, _cache) => {
|
|
164
|
-
return openBlock(), createElementBlock("div", {
|
|
165
|
-
class: normalizeClass(unref(switchKls)),
|
|
166
|
-
style: normalizeStyle(unref(styles)),
|
|
167
|
-
onClick: withModifiers(switchValue, ["prevent"])
|
|
168
|
-
}, [
|
|
169
|
-
createElementVNode("input", {
|
|
170
|
-
id: unref(inputId),
|
|
171
|
-
ref_key: "input",
|
|
172
|
-
ref: input,
|
|
173
|
-
class: normalizeClass(unref(ns).e("input")),
|
|
174
|
-
type: "checkbox",
|
|
175
|
-
role: "switch",
|
|
176
|
-
"aria-checked": unref(checked),
|
|
177
|
-
"aria-disabled": unref(switchDisabled),
|
|
178
|
-
"aria-label": _ctx.label,
|
|
179
|
-
name: _ctx.name,
|
|
180
|
-
"true-value": _ctx.activeValue,
|
|
181
|
-
"false-value": _ctx.inactiveValue,
|
|
182
|
-
disabled: unref(switchDisabled),
|
|
183
|
-
tabindex: _ctx.tabindex,
|
|
184
|
-
onChange: handleChange,
|
|
185
|
-
onKeydown: withKeys(switchValue, ["enter"])
|
|
186
|
-
}, null, 42, _hoisted_2),
|
|
187
|
-
!_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", {
|
|
188
|
-
key: 0,
|
|
189
|
-
class: normalizeClass(unref(labelLeftKls))
|
|
190
|
-
}, [
|
|
191
|
-
_ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
192
|
-
default: withCtx(() => [
|
|
193
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon)))
|
|
194
|
-
]),
|
|
195
|
-
_: 1
|
|
196
|
-
})) : createCommentVNode("v-if", true),
|
|
197
|
-
!_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
|
|
198
|
-
key: 1,
|
|
199
|
-
"aria-hidden": unref(checked)
|
|
200
|
-
}, toDisplayString(_ctx.inactiveText), 9, _hoisted_3)) : createCommentVNode("v-if", true)
|
|
201
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
202
|
-
createElementVNode("span", {
|
|
203
|
-
ref_key: "core",
|
|
204
|
-
ref: core,
|
|
205
|
-
class: normalizeClass(unref(ns).e("core")),
|
|
206
|
-
style: normalizeStyle(unref(coreStyle))
|
|
207
|
-
}, [
|
|
208
|
-
_ctx.inlinePrompt ? (openBlock(), createElementBlock("div", {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: normalizeClass(unref(ns).e("inner"))
|
|
211
|
-
}, [
|
|
212
|
-
_ctx.activeIcon || _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), {
|
|
213
|
-
key: 0,
|
|
214
|
-
class: normalizeClass(unref(ns).is("icon"))
|
|
215
|
-
}, {
|
|
216
|
-
default: withCtx(() => [
|
|
217
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon)))
|
|
218
|
-
]),
|
|
219
|
-
_: 1
|
|
220
|
-
}, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
|
|
221
|
-
key: 1,
|
|
222
|
-
class: normalizeClass(unref(ns).is("text")),
|
|
223
|
-
"aria-hidden": !unref(checked)
|
|
224
|
-
}, toDisplayString(unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, _hoisted_4)) : createCommentVNode("v-if", true)
|
|
225
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
226
|
-
createElementVNode("div", {
|
|
227
|
-
class: normalizeClass(unref(ns).e("action"))
|
|
228
|
-
}, [
|
|
229
|
-
_ctx.loading ? (openBlock(), createBlock(unref(ElIcon), {
|
|
230
|
-
key: 0,
|
|
231
|
-
class: normalizeClass(unref(ns).is("loading"))
|
|
232
|
-
}, {
|
|
233
|
-
default: withCtx(() => [
|
|
234
|
-
createVNode(unref(Loading))
|
|
235
|
-
]),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["class"])) : unref(checked) ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [
|
|
238
|
-
_ctx.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
239
|
-
default: withCtx(() => [
|
|
240
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.activeActionIcon)))
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
})) : createCommentVNode("v-if", true)
|
|
244
|
-
]) : !unref(checked) ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [
|
|
245
|
-
_ctx.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
246
|
-
default: withCtx(() => [
|
|
247
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveActionIcon)))
|
|
248
|
-
]),
|
|
249
|
-
_: 1
|
|
250
|
-
})) : createCommentVNode("v-if", true)
|
|
251
|
-
]) : createCommentVNode("v-if", true)
|
|
252
|
-
], 2)
|
|
253
|
-
], 6),
|
|
254
|
-
!_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", {
|
|
255
|
-
key: 1,
|
|
256
|
-
class: normalizeClass(unref(labelRightKls))
|
|
257
|
-
}, [
|
|
258
|
-
_ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
|
259
|
-
default: withCtx(() => [
|
|
260
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon)))
|
|
261
|
-
]),
|
|
262
|
-
_: 1
|
|
263
|
-
})) : createCommentVNode("v-if", true),
|
|
264
|
-
!_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock("span", {
|
|
265
|
-
key: 1,
|
|
266
|
-
"aria-hidden": !unref(checked)
|
|
267
|
-
}, toDisplayString(_ctx.activeText), 9, _hoisted_5)) : createCommentVNode("v-if", true)
|
|
268
|
-
], 2)) : createCommentVNode("v-if", true)
|
|
269
|
-
], 14, _hoisted_1);
|
|
270
|
-
};
|
|
10
|
+
const switchProps = buildProps({
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: [Boolean, String, Number],
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
15
|
+
disabled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
loading: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
type: String,
|
|
25
|
+
validator: isValidComponentSize
|
|
26
|
+
},
|
|
27
|
+
width: {
|
|
28
|
+
type: [String, Number],
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
inlinePrompt: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
inactiveActionIcon: {
|
|
36
|
+
type: iconPropType
|
|
37
|
+
},
|
|
38
|
+
activeActionIcon: {
|
|
39
|
+
type: iconPropType
|
|
40
|
+
},
|
|
41
|
+
activeIcon: {
|
|
42
|
+
type: iconPropType
|
|
43
|
+
},
|
|
44
|
+
inactiveIcon: {
|
|
45
|
+
type: iconPropType
|
|
46
|
+
},
|
|
47
|
+
activeText: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ""
|
|
50
|
+
},
|
|
51
|
+
inactiveText: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ""
|
|
54
|
+
},
|
|
55
|
+
activeValue: {
|
|
56
|
+
type: [Boolean, String, Number],
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
59
|
+
inactiveValue: {
|
|
60
|
+
type: [Boolean, String, Number],
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
name: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: ""
|
|
66
|
+
},
|
|
67
|
+
validateEvent: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: true
|
|
70
|
+
},
|
|
71
|
+
beforeChange: {
|
|
72
|
+
type: definePropType(Function)
|
|
73
|
+
},
|
|
74
|
+
id: String,
|
|
75
|
+
tabindex: {
|
|
76
|
+
type: [String, Number]
|
|
77
|
+
},
|
|
78
|
+
label: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: void 0
|
|
271
81
|
}
|
|
272
82
|
});
|
|
273
|
-
|
|
83
|
+
const switchEmits = {
|
|
84
|
+
[UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
|
85
|
+
[CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
|
86
|
+
[INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
|
|
87
|
+
};
|
|
274
88
|
|
|
275
|
-
export {
|
|
89
|
+
export { switchEmits, switchProps };
|
|
276
90
|
//# sourceMappingURL=switch2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch2.mjs","sources":["../../../../../../packages/components/switch/src/switch.vue"],"sourcesContent":["<template>\n <div :class=\"switchKls\" :style=\"styles\" @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=\"label\"\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 {\n computed,\n getCurrentInstance,\n nextTick,\n onMounted,\n ref,\n watch,\n} from 'vue'\nimport { isPromise } from '@vue/shared'\nimport { addUnit, debugWarn, isBoolean, throwError } 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 { useDeprecated, 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 vm = getCurrentInstance()!\nconst { formItem } = useFormItem()\nconst switchSize = useFormSize()\nconst ns = useNamespace('switch')\n\nconst useBatchDeprecated = (list: string[][]) => {\n list.forEach((param) => {\n useDeprecated(\n {\n from: param[0],\n replacement: param[1],\n scope: COMPONENT_NAME,\n version: '2.3.0',\n ref: 'https://element-plus.org/en-US/component/switch.html#attributes',\n type: 'Attribute',\n },\n computed(() => !!vm.vnode.props?.[param[2]])\n )\n })\n}\nuseBatchDeprecated([\n ['\"value\"', '\"model-value\" or \"v-model\"', 'value'],\n ['\"active-color\"', 'CSS var `--el-switch-on-color`', 'activeColor'],\n ['\"inactive-color\"', 'CSS var `--el-switch-off-color`', 'inactiveColor'],\n ['\"border-color\"', 'CSS var `--el-switch-border-color`', 'borderColor'],\n])\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\nwatch(\n () => props.value,\n () => {\n isControlled.value = false\n }\n)\n\nconst actualValue = computed(() => {\n return isControlled.value ? props.modelValue : props.value\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 styles = computed(() => {\n return ns.cssVarBlock({\n ...(props.activeColor ? { 'on-color': props.activeColor } : null),\n ...(props.inactiveColor ? { 'off-color': props.inactiveColor } : null),\n ...(props.borderColor ? { 'border-color': props.borderColor } : null),\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":";;;;;;;;;;;;;;;;;;;;;;;;;mCAsGc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR;;;;;;;AAKA,IAAA,MAAM,KAAK,kBAAmB,EAAA,CAAA;AAC9B,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,aAAa,WAAY,EAAA,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C;AAAsB,MAClE,OAAC,EAAA,CAAA,WAAA,CAAA;AAAA,QACF,GAAA,KAAA,CAAA,WAAA,GAAA,EAAA,UAAA,EAAA,KAAA,CAAA,WAAA,EAAA,GAAA,IAAA;AAED,QAAA,sBAA0B,GAAA,EAAA,WAAA,EAAA,KAAA,CAAA,aAAA,EAAA,GAAA,IAAA;AACxB,QAAA,GAAA,iBAAqB,GAAA,EAAA,cAAA,EAAA,KAAA,CAAA,WAAA,EAAA,GAAA,IAAA;AAAA,OACvB,CAAA,CAAA;AAEA,KAAA,CAAA,CAAA;AACE,IAAM,MAAA,KAAA,GAAO;AAAkB,MAChC,IAAA,EAAA,EAAA,EAAA,CAAA;AAED,MAAa,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,CAAA;AAAA,KAIX,CAAA;AAAA,IAIA,SAAA,CAAA,MAAA;AAAA,MACD,KAAA,CAAA,KAAA,CAAA,OAAA,GAAA,OAAA,CAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
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 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: {\n type: Boolean,\n default: false,\n },\n /**\n * @description whether Switch is in loading state\n */\n loading: {\n type: Boolean,\n default: false,\n },\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: {\n type: Boolean,\n default: false,\n },\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 /**\n * @description native input aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\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":";;;;;;;;;AAcY,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;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,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;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE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C,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;;;;"}
|
|
@@ -2671,7 +2671,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2671
2671
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
2672
2672
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
2673
2673
|
}>>;
|
|
2674
|
-
focusStartRef: import("vue").Ref<HTMLElement | "
|
|
2674
|
+
focusStartRef: import("vue").Ref<HTMLElement | "container" | "first" | undefined>;
|
|
2675
2675
|
trapped: import("vue").Ref<boolean>;
|
|
2676
2676
|
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
2677
2677
|
onFocusAfterTrapped: () => void;
|
|
@@ -2733,7 +2733,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2733
2733
|
trapped: BooleanConstructor;
|
|
2734
2734
|
focusTrapEl: PropType<HTMLElement>;
|
|
2735
2735
|
focusStartEl: {
|
|
2736
|
-
type: PropType<HTMLElement | "
|
|
2736
|
+
type: PropType<HTMLElement | "container" | "first">;
|
|
2737
2737
|
default: string;
|
|
2738
2738
|
};
|
|
2739
2739
|
}, {
|
|
@@ -2743,7 +2743,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2743
2743
|
trapped: BooleanConstructor;
|
|
2744
2744
|
focusTrapEl: PropType<HTMLElement>;
|
|
2745
2745
|
focusStartEl: {
|
|
2746
|
-
type: PropType<HTMLElement | "
|
|
2746
|
+
type: PropType<HTMLElement | "container" | "first">;
|
|
2747
2747
|
default: string;
|
|
2748
2748
|
};
|
|
2749
2749
|
}>> & {
|
|
@@ -2756,7 +2756,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2756
2756
|
}, {
|
|
2757
2757
|
trapped: boolean;
|
|
2758
2758
|
loop: boolean;
|
|
2759
|
-
focusStartEl: HTMLElement | "
|
|
2759
|
+
focusStartEl: HTMLElement | "container" | "first";
|
|
2760
2760
|
}>;
|
|
2761
2761
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
2762
2762
|
mouseenter: (evt: MouseEvent) => boolean;
|
|
@@ -5624,7 +5624,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5624
5624
|
onMouseleave?: ((evt: MouseEvent) => any) | undefined;
|
|
5625
5625
|
onMouseenter?: ((evt: MouseEvent) => any) | undefined;
|
|
5626
5626
|
}>>;
|
|
5627
|
-
focusStartRef: import("vue").Ref<HTMLElement | "
|
|
5627
|
+
focusStartRef: import("vue").Ref<HTMLElement | "container" | "first" | undefined>;
|
|
5628
5628
|
trapped: import("vue").Ref<boolean>;
|
|
5629
5629
|
onFocusAfterReleased: (event: CustomEvent<any>) => void;
|
|
5630
5630
|
onFocusAfterTrapped: () => void;
|
|
@@ -5686,7 +5686,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5686
5686
|
trapped: BooleanConstructor;
|
|
5687
5687
|
focusTrapEl: PropType<HTMLElement>;
|
|
5688
5688
|
focusStartEl: {
|
|
5689
|
-
type: PropType<HTMLElement | "
|
|
5689
|
+
type: PropType<HTMLElement | "container" | "first">;
|
|
5690
5690
|
default: string;
|
|
5691
5691
|
};
|
|
5692
5692
|
}, {
|
|
@@ -5696,7 +5696,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5696
5696
|
trapped: BooleanConstructor;
|
|
5697
5697
|
focusTrapEl: PropType<HTMLElement>;
|
|
5698
5698
|
focusStartEl: {
|
|
5699
|
-
type: PropType<HTMLElement | "
|
|
5699
|
+
type: PropType<HTMLElement | "container" | "first">;
|
|
5700
5700
|
default: string;
|
|
5701
5701
|
};
|
|
5702
5702
|
}>> & {
|
|
@@ -5709,7 +5709,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5709
5709
|
}, {
|
|
5710
5710
|
trapped: boolean;
|
|
5711
5711
|
loop: boolean;
|
|
5712
|
-
focusStartEl: HTMLElement | "
|
|
5712
|
+
focusStartEl: HTMLElement | "container" | "first";
|
|
5713
5713
|
}>;
|
|
5714
5714
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5715
5715
|
mouseenter: (evt: MouseEvent) => boolean;
|
|
@@ -15,7 +15,7 @@ const useStyles = (props, {
|
|
|
15
15
|
const ret = width - vScrollbarSize;
|
|
16
16
|
return fixed ? Math.max(Math.round(unref(columnsTotalWidth)), ret) : ret;
|
|
17
17
|
});
|
|
18
|
-
const headerWidth = computed(() => unref(bodyWidth) +
|
|
18
|
+
const headerWidth = computed(() => unref(bodyWidth) + props.vScrollbarSize);
|
|
19
19
|
const mainTableHeight = computed(() => {
|
|
20
20
|
const { height = 0, maxHeight = 0, footerHeight: footerHeight2, hScrollbarSize } = props;
|
|
21
21
|
if (maxHeight > 0) {
|