@element-plus/nightly 0.0.20260420 → 0.0.20260422
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.full.js +29 -16
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +7 -7
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +29 -16
- 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/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.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/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.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/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.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-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/src/affix.d.ts +1 -1
- package/es/components/affix/src/affix.vue.d.ts +1 -1
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +2 -2
- package/es/components/anchor/src/anchor.vue.d.ts +1 -1
- package/es/components/autocomplete/src/autocomplete.d.ts +15 -5
- package/es/components/autocomplete/src/autocomplete.mjs +5 -0
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs +4 -0
- package/es/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/avatar/src/avatar-group-props.d.ts +1 -1
- package/es/components/avatar/src/avatar-group.d.ts +3 -3
- package/es/components/avatar/src/avatar.d.ts +2 -2
- package/es/components/avatar/src/avatar.vue.d.ts +1 -1
- package/es/components/backtop/src/backtop.vue.d.ts +1 -1
- package/es/components/badge/src/badge.d.ts +1 -1
- package/es/components/badge/src/badge.vue.d.ts +2 -2
- package/es/components/button/src/button-group.vue.d.ts +1 -1
- package/es/components/button/src/button.d.ts +2 -2
- package/es/components/button/src/button.vue.d.ts +5 -5
- package/es/components/card/src/card.d.ts +1 -1
- package/es/components/carousel/src/carousel.d.ts +1 -1
- package/es/components/carousel/src/carousel.vue.d.ts +2 -2
- package/es/components/cascader/src/cascader.d.ts +4 -4
- package/es/components/cascader/src/cascader.vue.d.ts +17 -17
- package/es/components/cascader-panel/src/index.vue.d.ts +1 -1
- package/es/components/check-tag/src/check-tag.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +4 -4
- package/es/components/checkbox/src/checkbox-group.d.ts +1 -1
- package/es/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/es/components/checkbox/src/checkbox.d.ts +9 -9
- package/es/components/checkbox/src/checkbox.vue.d.ts +4 -4
- package/es/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
- package/es/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
- package/es/components/col/src/col.vue.d.ts +2 -2
- package/es/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.d.ts +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +5 -5
- package/es/components/color-picker-panel/src/color-picker-panel.vue.d.ts +2 -2
- package/es/components/config-provider/src/config-provider-props.d.ts +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +2 -2
- package/es/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/es/components/countdown/src/countdown.vue.d.ts +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +15 -15
- package/es/components/date-picker/src/props.d.ts +2 -2
- package/es/components/date-picker-panel/src/date-picker-panel.d.ts +3 -3
- package/es/components/descriptions/src/description-item.d.ts +12 -12
- package/es/components/descriptions/src/description.d.ts +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +1 -1
- package/es/components/divider/src/divider.vue.d.ts +1 -1
- package/es/components/drawer/src/drawer.vue.d.ts +2 -2
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
- package/es/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +3 -3
- package/es/components/dropdown/src/dropdown.vue.d.ts +99 -99
- package/es/components/form/src/form-item.d.ts +3 -3
- package/es/components/form/src/form-item.vue.d.ts +3 -3
- package/es/components/form/src/form.d.ts +3 -3
- package/es/components/form/src/form.vue.d.ts +1 -1
- package/es/components/form/src/hooks/use-form-common-props.d.ts +2 -2
- package/es/components/image/src/image.d.ts +1 -1
- package/es/components/image/src/image.vue.d.ts +4 -4
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +3 -3
- package/es/components/input/src/input.d.ts +3 -3
- package/es/components/input/src/input.vue.d.ts +12 -12
- package/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs +13 -3
- package/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/src/input-number.d.ts +2 -2
- package/es/components/input-number/src/input-number.vue.d.ts +7 -7
- package/es/components/input-otp/src/input-otp.vue.d.ts +2 -2
- package/es/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
- package/es/components/input-tag/src/input-tag.d.ts +2 -2
- package/es/components/input-tag/src/input-tag.vue.d.ts +13 -13
- package/es/components/link/src/link.d.ts +2 -2
- package/es/components/mention/src/mention.d.ts +4 -4
- package/es/components/mention/src/mention.vue.d.ts +4 -4
- package/es/components/menu/src/menu.d.ts +1 -1
- package/es/components/message/src/message.d.ts +2 -2
- package/es/components/message/src/message.vue.d.ts +5 -5
- package/es/components/notification/src/notification.d.ts +2 -2
- package/es/components/notification/src/notification.vue.d.ts +2 -2
- package/es/components/pagination/src/pagination.d.ts +5 -5
- package/es/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/es/components/popover/src/popover.d.ts +2 -2
- package/es/components/popover/src/popover.vue.d.ts +15 -15
- package/es/components/popper/src/composables/use-content.d.ts +4 -4
- package/es/components/popper/src/content.d.ts +4 -4
- package/es/components/popper/src/content.vue.d.ts +16 -16
- package/es/components/popper/src/popper.d.ts +2 -2
- package/es/components/progress/src/progress.d.ts +1 -1
- package/es/components/progress/src/progress.vue.d.ts +4 -4
- package/es/components/radio/src/radio-button.d.ts +4 -4
- package/es/components/radio/src/radio-button.vue.d.ts +2 -2
- package/es/components/radio/src/radio-group.d.ts +2 -2
- package/es/components/radio/src/radio-group.vue.d.ts +3 -3
- package/es/components/radio/src/radio.d.ts +8 -8
- package/es/components/radio/src/radio.vue.d.ts +3 -3
- package/es/components/rate/src/rate.d.ts +1 -1
- package/es/components/rate/src/rate.vue.d.ts +1 -1
- package/es/components/result/src/result.d.ts +1 -1
- package/es/components/result/src/result.vue.d.ts +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/es/components/row/src/row.d.ts +1 -1
- package/es/components/row/src/row.vue.d.ts +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +4 -4
- package/es/components/segmented/index.d.ts +1 -1
- package/es/components/segmented/src/segmented.d.ts +2 -2
- package/es/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.mjs +4 -0
- package/es/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/option.d.ts +2 -2
- package/es/components/select/src/option.vue.d.ts +5 -5
- package/es/components/select/src/select.d.ts +7 -7
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +143 -124
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs +2 -13
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/select2.mjs.map +1 -1
- package/es/components/select-v2/src/defaults.d.ts +4 -4
- package/es/components/select-v2/src/select.vue.d.ts +94 -94
- package/es/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/es/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/es/components/slider/src/button.vue.d.ts +1 -1
- package/es/components/slider/src/slider.d.ts +2 -2
- package/es/components/slider/src/slider.vue.d.ts +8 -8
- package/es/components/space/src/space.d.ts +3 -3
- package/es/components/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/item.vue.d.ts +1 -1
- package/es/components/steps/src/steps.d.ts +2 -2
- package/es/components/switch/src/switch.d.ts +1 -1
- package/es/components/switch/src/switch.vue.d.ts +2 -2
- package/es/components/table/src/table-column/index.d.ts +19 -19
- package/es/components/table/src/table-header/index.d.ts +12 -12
- package/es/components/table/src/table.vue.d.ts +48 -48
- package/es/components/table-v2/src/components/row.d.ts +1 -1
- package/es/components/table-v2/src/table-grid.d.ts +3 -3
- package/es/components/table-v2/src/table-v2.d.ts +3 -3
- package/es/components/tabs/src/tab-nav.d.ts +1 -1
- package/es/components/tabs/src/tabs.d.ts +6 -6
- package/es/components/tag/src/tag.d.ts +2 -2
- package/es/components/tag/src/tag.vue.d.ts +1 -1
- package/es/components/text/src/text.d.ts +2 -2
- package/es/components/time-picker/src/common/picker.vue.d.ts +17 -17
- package/es/components/time-picker/src/common/props.d.ts +2 -2
- package/es/components/time-picker/src/time-picker.d.ts +15 -15
- package/es/components/time-select/src/time-select.d.ts +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +5 -5
- package/es/components/timeline/src/timeline-item.d.ts +3 -3
- package/es/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/es/components/tooltip/src/content.d.ts +1 -1
- package/es/components/tooltip/src/content.vue.d.ts +16 -16
- package/es/components/tooltip/src/tooltip.d.ts +3 -3
- package/es/components/tooltip/src/tooltip.vue.d.ts +18 -18
- package/es/components/tooltip/src/trigger.d.ts +1 -1
- package/es/components/tour/src/content.d.ts +2 -2
- package/es/components/tour/src/step.d.ts +1 -1
- package/es/components/tour/src/step.vue.d.ts +1 -1
- package/es/components/tour/src/tour.d.ts +1 -1
- package/es/components/tour/src/tour.vue.d.ts +2 -2
- package/es/components/tree/src/tree.vue.d.ts +18 -18
- package/es/components/tree-select/src/tree-select.vue.d.ts +43 -43
- package/es/components/tree-v2/src/tree.vue.d.ts +4 -4
- package/es/components/upload/src/upload-content.d.ts +1 -1
- package/es/components/upload/src/upload-content.vue.d.ts +1 -1
- package/es/components/upload/src/upload-list.d.ts +1 -1
- package/es/components/upload/src/upload.d.ts +2 -2
- package/es/components/upload/src/upload.vue.d.ts +2 -2
- package/es/components/virtual-list/src/builders/build-grid.d.ts +3 -3
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
- 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 +3 -3
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/es/hooks/use-floating/index.d.ts +8 -8
- package/es/hooks/use-popper/index.d.ts +4 -4
- package/es/hooks/use-size/index.d.ts +3 -3
- package/es/utils/vue/vnode.d.ts +4 -4
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix.d.ts +1 -1
- package/lib/components/affix/src/affix.vue.d.ts +1 -1
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +2 -2
- package/lib/components/anchor/src/anchor.vue.d.ts +1 -1
- package/lib/components/autocomplete/src/autocomplete.d.ts +15 -5
- package/lib/components/autocomplete/src/autocomplete.js +5 -0
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +3 -3
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js +4 -0
- package/lib/components/autocomplete/src/autocomplete.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/avatar/src/avatar-group-props.d.ts +1 -1
- package/lib/components/avatar/src/avatar-group.d.ts +3 -3
- package/lib/components/avatar/src/avatar.d.ts +2 -2
- package/lib/components/avatar/src/avatar.vue.d.ts +1 -1
- package/lib/components/backtop/src/backtop.vue.d.ts +1 -1
- package/lib/components/badge/src/badge.d.ts +1 -1
- package/lib/components/badge/src/badge.vue.d.ts +2 -2
- package/lib/components/button/src/button-group.vue.d.ts +1 -1
- package/lib/components/button/src/button.d.ts +2 -2
- package/lib/components/button/src/button.vue.d.ts +5 -5
- package/lib/components/card/src/card.d.ts +1 -1
- package/lib/components/carousel/src/carousel.d.ts +1 -1
- package/lib/components/carousel/src/carousel.vue.d.ts +2 -2
- package/lib/components/cascader/src/cascader.d.ts +4 -4
- package/lib/components/cascader/src/cascader.vue.d.ts +17 -17
- package/lib/components/cascader-panel/src/index.vue.d.ts +1 -1
- package/lib/components/check-tag/src/check-tag.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +4 -4
- package/lib/components/checkbox/src/checkbox-group.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox-group.vue.d.ts +2 -2
- package/lib/components/checkbox/src/checkbox.d.ts +9 -9
- package/lib/components/checkbox/src/checkbox.vue.d.ts +4 -4
- package/lib/components/checkbox/src/composables/use-checkbox-status.d.ts +2 -2
- package/lib/components/checkbox/src/composables/use-checkbox.d.ts +2 -2
- package/lib/components/col/src/col.vue.d.ts +2 -2
- package/lib/components/collapse/src/collapse-item.vue.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.d.ts +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +5 -5
- package/lib/components/color-picker-panel/src/color-picker-panel.vue.d.ts +2 -2
- package/lib/components/config-provider/src/config-provider-props.d.ts +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +2 -2
- package/lib/components/config-provider/src/hooks/use-global-config.d.ts +1 -1
- package/lib/components/countdown/src/countdown.vue.d.ts +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +15 -15
- package/lib/components/date-picker/src/props.d.ts +2 -2
- package/lib/components/date-picker-panel/src/date-picker-panel.d.ts +3 -3
- package/lib/components/descriptions/src/description-item.d.ts +12 -12
- package/lib/components/descriptions/src/description.d.ts +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +1 -1
- package/lib/components/divider/src/divider.vue.d.ts +1 -1
- package/lib/components/drawer/src/drawer.vue.d.ts +2 -2
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +3 -3
- package/lib/components/dropdown/src/dropdown.vue.d.ts +99 -99
- package/lib/components/form/src/form-item.d.ts +3 -3
- package/lib/components/form/src/form-item.vue.d.ts +3 -3
- package/lib/components/form/src/form.d.ts +3 -3
- package/lib/components/form/src/form.vue.d.ts +1 -1
- package/lib/components/form/src/hooks/use-form-common-props.d.ts +2 -2
- package/lib/components/image/src/image.d.ts +1 -1
- package/lib/components/image/src/image.vue.d.ts +4 -4
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +3 -3
- package/lib/components/input/src/input.d.ts +3 -3
- package/lib/components/input/src/input.vue.d.ts +12 -12
- package/lib/components/input/src/input.vue_vue_type_script_setup_true_lang.js +13 -3
- package/lib/components/input/src/input.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/src/input-number.d.ts +2 -2
- package/lib/components/input-number/src/input-number.vue.d.ts +7 -7
- package/lib/components/input-otp/src/input-otp.vue.d.ts +2 -2
- package/lib/components/input-tag/src/composables/use-input-tag.d.ts +1 -1
- package/lib/components/input-tag/src/input-tag.d.ts +2 -2
- package/lib/components/input-tag/src/input-tag.vue.d.ts +13 -13
- package/lib/components/link/src/link.d.ts +2 -2
- package/lib/components/mention/src/mention.d.ts +4 -4
- package/lib/components/mention/src/mention.vue.d.ts +4 -4
- package/lib/components/menu/src/menu.d.ts +1 -1
- package/lib/components/message/src/message.d.ts +2 -2
- package/lib/components/message/src/message.vue.d.ts +5 -5
- package/lib/components/notification/src/notification.d.ts +2 -2
- package/lib/components/notification/src/notification.vue.d.ts +2 -2
- package/lib/components/pagination/src/pagination.d.ts +5 -5
- package/lib/components/popconfirm/src/popconfirm.d.ts +2 -2
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +2 -2
- package/lib/components/popover/src/popover.d.ts +2 -2
- package/lib/components/popover/src/popover.vue.d.ts +15 -15
- package/lib/components/popper/src/composables/use-content.d.ts +4 -4
- package/lib/components/popper/src/content.d.ts +4 -4
- package/lib/components/popper/src/content.vue.d.ts +16 -16
- package/lib/components/popper/src/popper.d.ts +2 -2
- package/lib/components/progress/src/progress.d.ts +1 -1
- package/lib/components/progress/src/progress.vue.d.ts +4 -4
- package/lib/components/radio/src/radio-button.d.ts +4 -4
- package/lib/components/radio/src/radio-button.vue.d.ts +2 -2
- package/lib/components/radio/src/radio-group.d.ts +2 -2
- package/lib/components/radio/src/radio-group.vue.d.ts +3 -3
- package/lib/components/radio/src/radio.d.ts +8 -8
- package/lib/components/radio/src/radio.vue.d.ts +3 -3
- package/lib/components/rate/src/rate.d.ts +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +1 -1
- package/lib/components/result/src/result.d.ts +1 -1
- package/lib/components/result/src/result.vue.d.ts +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +1 -1
- package/lib/components/row/src/row.d.ts +1 -1
- package/lib/components/row/src/row.vue.d.ts +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +4 -4
- package/lib/components/segmented/index.d.ts +1 -1
- package/lib/components/segmented/src/segmented.d.ts +2 -2
- package/lib/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.js +4 -0
- package/lib/components/segmented/src/segmented.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/option.d.ts +2 -2
- package/lib/components/select/src/option.vue.d.ts +5 -5
- package/lib/components/select/src/select.d.ts +7 -7
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +143 -124
- package/lib/components/select/src/select.vue_vue_type_script_lang.js +1 -12
- package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/select2.js.map +1 -1
- package/lib/components/select-v2/src/defaults.d.ts +4 -4
- package/lib/components/select-v2/src/select.vue.d.ts +94 -94
- package/lib/components/skeleton/src/skeleton-item.d.ts +1 -1
- package/lib/components/skeleton/src/skeleton.vue.d.ts +1 -1
- package/lib/components/slider/src/button.vue.d.ts +1 -1
- package/lib/components/slider/src/slider.d.ts +2 -2
- package/lib/components/slider/src/slider.vue.d.ts +8 -8
- package/lib/components/space/src/space.d.ts +3 -3
- package/lib/components/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/item.vue.d.ts +1 -1
- package/lib/components/steps/src/steps.d.ts +2 -2
- package/lib/components/switch/src/switch.d.ts +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +2 -2
- package/lib/components/table/src/table-column/index.d.ts +19 -19
- package/lib/components/table/src/table-header/index.d.ts +12 -12
- package/lib/components/table/src/table.vue.d.ts +48 -48
- package/lib/components/table-v2/src/components/row.d.ts +1 -1
- package/lib/components/table-v2/src/table-grid.d.ts +3 -3
- package/lib/components/table-v2/src/table-v2.d.ts +3 -3
- package/lib/components/tabs/src/tab-nav.d.ts +1 -1
- package/lib/components/tabs/src/tabs.d.ts +6 -6
- package/lib/components/tag/src/tag.d.ts +2 -2
- package/lib/components/tag/src/tag.vue.d.ts +1 -1
- package/lib/components/text/src/text.d.ts +2 -2
- package/lib/components/time-picker/src/common/picker.vue.d.ts +17 -17
- package/lib/components/time-picker/src/common/props.d.ts +2 -2
- package/lib/components/time-picker/src/time-picker.d.ts +15 -15
- package/lib/components/time-select/src/time-select.d.ts +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +5 -5
- package/lib/components/timeline/src/timeline-item.d.ts +3 -3
- package/lib/components/timeline/src/timeline-item.vue.d.ts +1 -1
- package/lib/components/tooltip/src/content.d.ts +1 -1
- package/lib/components/tooltip/src/content.vue.d.ts +16 -16
- package/lib/components/tooltip/src/tooltip.d.ts +3 -3
- package/lib/components/tooltip/src/tooltip.vue.d.ts +18 -18
- package/lib/components/tooltip/src/trigger.d.ts +1 -1
- package/lib/components/tour/src/content.d.ts +2 -2
- package/lib/components/tour/src/step.d.ts +1 -1
- package/lib/components/tour/src/step.vue.d.ts +1 -1
- package/lib/components/tour/src/tour.d.ts +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +2 -2
- package/lib/components/tree/src/tree.vue.d.ts +18 -18
- package/lib/components/tree-select/src/tree-select.vue.d.ts +43 -43
- package/lib/components/tree-v2/src/tree.vue.d.ts +4 -4
- package/lib/components/upload/src/upload-content.d.ts +1 -1
- package/lib/components/upload/src/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/src/upload-list.d.ts +1 -1
- package/lib/components/upload/src/upload.d.ts +2 -2
- package/lib/components/upload/src/upload.vue.d.ts +2 -2
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +3 -3
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +3 -3
- 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 +3 -3
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +4 -4
- package/lib/hooks/use-floating/index.d.ts +8 -8
- package/lib/hooks/use-popper/index.d.ts +4 -4
- package/lib/hooks/use-size/index.d.ts +3 -3
- package/lib/utils/vue/vnode.d.ts +4 -4
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/web-types.json +1 -1
|
@@ -32,7 +32,7 @@ interface ResultProps {
|
|
|
32
32
|
declare const resultProps: {
|
|
33
33
|
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
34
34
|
readonly subTitle: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
35
|
-
readonly icon: EpPropFinalized<StringConstructor, "
|
|
35
|
+
readonly icon: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* @deprecated Removed after 3.0.0, Use `ResultProps` instead.
|
|
@@ -13,8 +13,8 @@ type __VLS_Slots = {} & {
|
|
|
13
13
|
extra?: (props: typeof __VLS_12) => any;
|
|
14
14
|
};
|
|
15
15
|
declare const __VLS_base: vue.DefineComponent<ResultProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<ResultProps> & Readonly<{}>, {
|
|
16
|
-
title: string;
|
|
17
16
|
icon: "primary" | "success" | "warning" | "info" | "error";
|
|
17
|
+
title: string;
|
|
18
18
|
subTitle: string;
|
|
19
19
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -13,7 +13,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
13
13
|
handleKeydown: (event: Event) => void;
|
|
14
14
|
handleFocus: (event: Event) => void;
|
|
15
15
|
handleMousedown: (event: Event) => void;
|
|
16
|
-
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("focus" | "
|
|
16
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("focus" | "mousedown" | "keydown")[], "focus" | "mousedown" | "keydown", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
17
17
|
focusable: {
|
|
18
18
|
type: BooleanConstructor;
|
|
19
19
|
default: boolean;
|
|
@@ -33,7 +33,7 @@ declare const rowProps: {
|
|
|
33
33
|
readonly gutter: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
34
34
|
readonly justify: EpPropFinalized<StringConstructor, "space-around" | "space-between" | "space-evenly" | "center" | "end" | "start", unknown, "start", boolean>;
|
|
35
35
|
readonly align: {
|
|
36
|
-
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "
|
|
36
|
+
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "bottom" | "top" | "middle", unknown>>;
|
|
37
37
|
readonly required: false;
|
|
38
38
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
39
39
|
__epPropKey: true;
|
|
@@ -8,8 +8,8 @@ type __VLS_Slots = {} & {
|
|
|
8
8
|
default?: (props: typeof __VLS_8) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: vue.DefineComponent<RowProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<RowProps> & Readonly<{}>, {
|
|
11
|
-
tag: string;
|
|
12
11
|
justify: typeof RowJustify[number];
|
|
12
|
+
tag: string;
|
|
13
13
|
gutter: number;
|
|
14
14
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -17,26 +17,26 @@ declare const __VLS_base: vue.DefineComponent<ScrollbarProps, {
|
|
|
17
17
|
setScrollLeft: (value: number) => void; /** @description handle scroll event */
|
|
18
18
|
handleScroll: () => void;
|
|
19
19
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
20
|
-
"end-reached": (direction: ScrollbarDirection) => void;
|
|
21
20
|
scroll: (args_0: {
|
|
22
21
|
scrollTop: number;
|
|
23
22
|
scrollLeft: number;
|
|
24
23
|
}) => void;
|
|
24
|
+
"end-reached": (direction: ScrollbarDirection) => void;
|
|
25
25
|
}, string, vue.PublicProps, Readonly<ScrollbarProps> & Readonly<{
|
|
26
|
-
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
|
27
26
|
onScroll?: ((args_0: {
|
|
28
27
|
scrollTop: number;
|
|
29
28
|
scrollLeft: number;
|
|
30
29
|
}) => any) | undefined;
|
|
30
|
+
"onEnd-reached"?: ((direction: ScrollbarDirection) => any) | undefined;
|
|
31
31
|
}>, {
|
|
32
|
-
distance: number;
|
|
33
32
|
height: number | string;
|
|
34
33
|
maxHeight: number | string;
|
|
34
|
+
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
35
|
+
distance: number;
|
|
35
36
|
wrapStyle: string | false | CSSProperties | StyleValue[] | null;
|
|
36
37
|
wrapClass: string | string[];
|
|
37
38
|
viewClass: string | string[];
|
|
38
39
|
viewStyle: string | false | CSSProperties | StyleValue[] | null;
|
|
39
|
-
tag: keyof HTMLElementTagNameMap | (string & {});
|
|
40
40
|
minSize: number;
|
|
41
41
|
tabindex: number | string;
|
|
42
42
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,8 +6,8 @@ import * as vue from "vue";
|
|
|
6
6
|
|
|
7
7
|
//#region ../../packages/components/segmented/index.d.ts
|
|
8
8
|
declare const ElSegmented: (<T extends Option = Option>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
9
|
-
attrs: any;
|
|
10
9
|
emit: ((event: "update:modelValue", val: any) => void) & ((event: "change", val: any) => void);
|
|
10
|
+
attrs: any;
|
|
11
11
|
slots: {
|
|
12
12
|
default?: (props: {
|
|
13
13
|
item: T;
|
|
@@ -64,11 +64,11 @@ declare const segmentedProps: {
|
|
|
64
64
|
ariaLabel: StringConstructor;
|
|
65
65
|
direction: EpPropFinalized<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical") | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical")) | null)[], unknown, unknown, string, boolean>;
|
|
66
66
|
options: EpPropFinalized<(new (...args: any[]) => Option[]) | (() => Option[]) | (((new (...args: any[]) => Option[]) | (() => Option[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
67
|
-
modelValue: EpPropFinalized<(
|
|
67
|
+
modelValue: EpPropFinalized<(NumberConstructor | BooleanConstructor | StringConstructor)[], unknown, unknown, undefined, boolean>;
|
|
68
68
|
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
|
69
69
|
block: BooleanConstructor;
|
|
70
70
|
size: {
|
|
71
|
-
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "
|
|
71
|
+
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
|
72
72
|
readonly required: false;
|
|
73
73
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
74
74
|
__epPropKey: true;
|
|
@@ -122,6 +122,10 @@ var segmented_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
122
122
|
});
|
|
123
123
|
useResizeObserver(segmentedRef, updateSelect);
|
|
124
124
|
watch(activeElement, updateSelect);
|
|
125
|
+
watch(() => props.options, updateSelect, {
|
|
126
|
+
deep: true,
|
|
127
|
+
flush: "post"
|
|
128
|
+
});
|
|
125
129
|
watch(() => props.modelValue, () => {
|
|
126
130
|
updateSelect();
|
|
127
131
|
if (props.validateEvent) formItem?.validate?.("change").catch(NOOP);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/segmented/src/segmented.vue"],"sourcesContent":["<template>\n <div\n v-if=\"options.length\"\n :id=\"inputId\"\n ref=\"segmentedRef\"\n :class=\"segmentedCls\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'segmented' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <div :class=\"[ns.e('group'), ns.m(direction)]\">\n <div :style=\"selectedStyle\" :class=\"selectedCls\" />\n <label\n v-for=\"(item, index) in options\"\n :key=\"index\"\n :class=\"getItemCls(item)\"\n >\n <input\n :class=\"ns.e('item-input')\"\n type=\"radio\"\n :name=\"name\"\n :disabled=\"getDisabled(item)\"\n :checked=\"getSelected(item)\"\n @change=\"handleChange($event, item)\"\n />\n <div :class=\"ns.e('item-label')\">\n <slot :item=\"item\">{{ getLabel(item) }}</slot>\n </div>\n </label>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends Option = Option\">\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useActiveElement, useResizeObserver } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { NOOP, isObject } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { defaultProps, segmentedEmits } from './segmented'\n\nimport type { Option } from './types'\nimport type { SegmentedProps } from './segmented'\n\ndefineOptions({\n name: 'ElSegmented',\n})\n\nconst props = withDefaults(defineProps<SegmentedProps<T>>(), {\n direction: 'horizontal',\n options: () => [],\n props: () => defaultProps,\n validateEvent: true,\n modelValue: undefined,\n disabled: undefined,\n})\nconst emit = defineEmits(segmentedEmits)\n\nconst ns = useNamespace('segmented')\nconst segmentedId = useId()\nconst segmentedSize = useFormSize()\nconst _disabled = useFormDisabled()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst segmentedRef = ref<HTMLElement | null>(null)\nconst activeElement = useActiveElement()\n\nconst state = reactive({\n isInit: false,\n width: 0,\n height: 0,\n translateX: 0,\n translateY: 0,\n focusVisible: false,\n})\n\nconst handleChange = (evt: Event, item: T) => {\n const value = getValue(item)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n ;(evt.target as HTMLInputElement).checked = value === props.modelValue\n}\n\nconst aliasProps = computed(() => ({ ...defaultProps, ...props.props }))\n\nconst getValue = (item: T) => {\n return isObject(item) ? item[aliasProps.value.value] : item\n}\n\nconst getLabel = (item: T) => {\n return isObject(item) ? item[aliasProps.value.label] : item\n}\n\nconst getDisabled = (item: T | undefined) => {\n return !!(\n _disabled.value ||\n (isObject(item) ? item[aliasProps.value.disabled] : false)\n )\n}\n\nconst getSelected = (item: T) => {\n return props.modelValue === getValue(item)\n}\n\nconst getOption = (value: any) => {\n return props.options.find((item) => getValue(item) === value)\n}\n\nconst getItemCls = (item: T) => {\n return [\n ns.e('item'),\n ns.is('selected', getSelected(item)),\n ns.is('disabled', getDisabled(item)),\n ]\n}\n\nconst updateSelect = () => {\n if (!segmentedRef.value) return\n const selectedItem = segmentedRef.value.querySelector(\n '.is-selected'\n ) as HTMLElement\n const selectedItemInput = segmentedRef.value.querySelector(\n '.is-selected input'\n ) as HTMLElement\n if (!selectedItem || !selectedItemInput) {\n state.width = 0\n state.height = 0\n state.translateX = 0\n state.translateY = 0\n state.focusVisible = false\n return\n }\n state.isInit = true\n if (props.direction === 'vertical') {\n state.height = selectedItem.offsetHeight\n state.translateY = selectedItem.offsetTop\n } else {\n state.width = selectedItem.offsetWidth\n state.translateX = selectedItem.offsetLeft\n }\n try {\n // This will failed in test\n state.focusVisible = selectedItemInput.matches(':focus-visible')\n } catch {}\n}\n\nconst segmentedCls = computed(() => [\n ns.b(),\n ns.m(segmentedSize.value),\n ns.is('block', props.block),\n])\n\nconst selectedStyle = computed(() => ({\n width: props.direction === 'vertical' ? '100%' : `${state.width}px`,\n height: props.direction === 'vertical' ? `${state.height}px` : '100%',\n transform:\n props.direction === 'vertical'\n ? `translateY(${state.translateY}px)`\n : `translateX(${state.translateX}px)`,\n display: state.isInit ? 'block' : 'none',\n}))\n\nconst selectedCls = computed(() => [\n ns.e('item-selected'),\n ns.is('disabled', getDisabled(getOption(props.modelValue))),\n ns.is('focus-visible', state.focusVisible),\n])\n\nconst name = computed(() => {\n return props.name || segmentedId.value\n})\n\nuseResizeObserver(segmentedRef, updateSelect)\n\nwatch(activeElement, updateSelect)\n\nwatch(\n () => props.modelValue,\n () => {\n updateSelect()\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n },\n {\n flush: 'post',\n }\n)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDA,MAAM,QAAQ;EAQd,MAAM,OAAO;EAEb,MAAM,KAAK,aAAa,YAAW;EACnC,MAAM,cAAc,OAAM;EAC1B,MAAM,gBAAgB,aAAY;EAClC,MAAM,YAAY,iBAAgB;EAClC,MAAM,EAAE,aAAa,aAAY;EACjC,MAAM,EAAE,SAAS,wBAAwB,mBAAmB,OAAO,EACjE,iBAAiB,UAClB,CAAA;EAED,MAAM,eAAe,IAAwB,KAAI;EACjD,MAAM,gBAAgB,kBAAiB;EAEvC,MAAM,QAAQ,SAAS;GACrB,QAAQ;GACR,OAAO;GACP,QAAQ;GACR,YAAY;GACZ,YAAY;GACZ,cAAc;GACf,CAAA;EAED,MAAM,gBAAgB,KAAY,SAAY;GAC5C,MAAM,QAAQ,SAAS,KAAI;AAC3B,QAAK,oBAAoB,MAAK;AAC9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AAG;GACN,GAAG,EAAE,cAAc,MAAM;GACzB,GAAG,GAAG,SAAS,MAAM,MAAM;GAC5B,CAAA;EAED,MAAM,gBAAgB,gBAAgB;GACpC,OAAO,MAAM,cAAc,aAAa,SAAS,GAAG,MAAM,MAAM;GAChE,QAAQ,MAAM,cAAc,aAAa,GAAG,MAAM,OAAO,MAAM;GAC/D,WACE,MAAM,cAAc,aAChB,cAAc,MAAM,WAAW,OAC/B,cAAc,MAAM,WAAW;GACrC,SAAS,MAAM,SAAS,UAAU;GACnC,EAAC;EAEF,MAAM,cAAc,eAAe;GACjC,GAAG,EAAE,gBAAgB;GACrB,GAAG,GAAG,YAAY,YAAY,UAAU,MAAM,WAAW,CAAC,CAAC;GAC3D,GAAG,GAAG,iBAAiB,MAAM,aAAa;GAC3C,CAAA;EAED,MAAM,OAAO,eAAe;AAC1B,UAAO,MAAM,QAAQ,YAAY;IAClC;AAED,oBAAkB,cAAc,aAAY;AAE5C,QAAM,eAAe,aAAY;AAEjC,cACQ,MAAM,kBACN;AACJ,iBAAa;AACb,OAAI,MAAM,cACR,WAAU,WAAW,SAAS,CAAC,MAAM,KAAI;KAG7C,EACE,OAAO,QACT,CACF;;
|
|
1
|
+
{"version":3,"file":"segmented.vue_vue_type_script_setup_true_lang.mjs","names":[],"sources":["../../../../../../packages/components/segmented/src/segmented.vue"],"sourcesContent":["<template>\n <div\n v-if=\"options.length\"\n :id=\"inputId\"\n ref=\"segmentedRef\"\n :class=\"segmentedCls\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'segmented' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <div :class=\"[ns.e('group'), ns.m(direction)]\">\n <div :style=\"selectedStyle\" :class=\"selectedCls\" />\n <label\n v-for=\"(item, index) in options\"\n :key=\"index\"\n :class=\"getItemCls(item)\"\n >\n <input\n :class=\"ns.e('item-input')\"\n type=\"radio\"\n :name=\"name\"\n :disabled=\"getDisabled(item)\"\n :checked=\"getSelected(item)\"\n @change=\"handleChange($event, item)\"\n />\n <div :class=\"ns.e('item-label')\">\n <slot :item=\"item\">{{ getLabel(item) }}</slot>\n </div>\n </label>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends Option = Option\">\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useActiveElement, useResizeObserver } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { NOOP, isObject } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { defaultProps, segmentedEmits } from './segmented'\n\nimport type { Option } from './types'\nimport type { SegmentedProps } from './segmented'\n\ndefineOptions({\n name: 'ElSegmented',\n})\n\nconst props = withDefaults(defineProps<SegmentedProps<T>>(), {\n direction: 'horizontal',\n options: () => [],\n props: () => defaultProps,\n validateEvent: true,\n modelValue: undefined,\n disabled: undefined,\n})\nconst emit = defineEmits(segmentedEmits)\n\nconst ns = useNamespace('segmented')\nconst segmentedId = useId()\nconst segmentedSize = useFormSize()\nconst _disabled = useFormDisabled()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst segmentedRef = ref<HTMLElement | null>(null)\nconst activeElement = useActiveElement()\n\nconst state = reactive({\n isInit: false,\n width: 0,\n height: 0,\n translateX: 0,\n translateY: 0,\n focusVisible: false,\n})\n\nconst handleChange = (evt: Event, item: T) => {\n const value = getValue(item)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n ;(evt.target as HTMLInputElement).checked = value === props.modelValue\n}\n\nconst aliasProps = computed(() => ({ ...defaultProps, ...props.props }))\n\nconst getValue = (item: T) => {\n return isObject(item) ? item[aliasProps.value.value] : item\n}\n\nconst getLabel = (item: T) => {\n return isObject(item) ? item[aliasProps.value.label] : item\n}\n\nconst getDisabled = (item: T | undefined) => {\n return !!(\n _disabled.value ||\n (isObject(item) ? item[aliasProps.value.disabled] : false)\n )\n}\n\nconst getSelected = (item: T) => {\n return props.modelValue === getValue(item)\n}\n\nconst getOption = (value: any) => {\n return props.options.find((item) => getValue(item) === value)\n}\n\nconst getItemCls = (item: T) => {\n return [\n ns.e('item'),\n ns.is('selected', getSelected(item)),\n ns.is('disabled', getDisabled(item)),\n ]\n}\n\nconst updateSelect = () => {\n if (!segmentedRef.value) return\n const selectedItem = segmentedRef.value.querySelector(\n '.is-selected'\n ) as HTMLElement\n const selectedItemInput = segmentedRef.value.querySelector(\n '.is-selected input'\n ) as HTMLElement\n if (!selectedItem || !selectedItemInput) {\n state.width = 0\n state.height = 0\n state.translateX = 0\n state.translateY = 0\n state.focusVisible = false\n return\n }\n state.isInit = true\n if (props.direction === 'vertical') {\n state.height = selectedItem.offsetHeight\n state.translateY = selectedItem.offsetTop\n } else {\n state.width = selectedItem.offsetWidth\n state.translateX = selectedItem.offsetLeft\n }\n try {\n // This will failed in test\n state.focusVisible = selectedItemInput.matches(':focus-visible')\n } catch {}\n}\n\nconst segmentedCls = computed(() => [\n ns.b(),\n ns.m(segmentedSize.value),\n ns.is('block', props.block),\n])\n\nconst selectedStyle = computed(() => ({\n width: props.direction === 'vertical' ? '100%' : `${state.width}px`,\n height: props.direction === 'vertical' ? `${state.height}px` : '100%',\n transform:\n props.direction === 'vertical'\n ? `translateY(${state.translateY}px)`\n : `translateX(${state.translateX}px)`,\n display: state.isInit ? 'block' : 'none',\n}))\n\nconst selectedCls = computed(() => [\n ns.e('item-selected'),\n ns.is('disabled', getDisabled(getOption(props.modelValue))),\n ns.is('focus-visible', state.focusVisible),\n])\n\nconst name = computed(() => {\n return props.name || segmentedId.value\n})\n\nuseResizeObserver(segmentedRef, updateSelect)\n\nwatch(activeElement, updateSelect)\n\nwatch(() => props.options, updateSelect, { deep: true, flush: 'post' })\n\nwatch(\n () => props.mod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","names":[],"sources":["../../../../../../packages/components/segmented/src/segmented.vue"],"sourcesContent":["<template>\n <div\n v-if=\"options.length\"\n :id=\"inputId\"\n ref=\"segmentedRef\"\n :class=\"segmentedCls\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'segmented' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <div :class=\"[ns.e('group'), ns.m(direction)]\">\n <div :style=\"selectedStyle\" :class=\"selectedCls\" />\n <label\n v-for=\"(item, index) in options\"\n :key=\"index\"\n :class=\"getItemCls(item)\"\n >\n <input\n :class=\"ns.e('item-input')\"\n type=\"radio\"\n :name=\"name\"\n :disabled=\"getDisabled(item)\"\n :checked=\"getSelected(item)\"\n @change=\"handleChange($event, item)\"\n />\n <div :class=\"ns.e('item-label')\">\n <slot :item=\"item\">{{ getLabel(item) }}</slot>\n </div>\n </label>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends Option = Option\">\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useActiveElement, useResizeObserver } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { NOOP, isObject } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { defaultProps, segmentedEmits } from './segmented'\n\nimport type { Option } from './types'\nimport type { SegmentedProps } from './segmented'\n\ndefineOptions({\n name: 'ElSegmented',\n})\n\nconst props = withDefaults(defineProps<SegmentedProps<T>>(), {\n direction: 'horizontal',\n options: () => [],\n props: () => defaultProps,\n validateEvent: true,\n modelValue: undefined,\n disabled: undefined,\n})\nconst emit = defineEmits(segmentedEmits)\n\nconst ns = useNamespace('segmented')\nconst segmentedId = useId()\nconst segmentedSize = useFormSize()\nconst _disabled = useFormDisabled()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst segmentedRef = ref<HTMLElement | null>(null)\nconst activeElement = useActiveElement()\n\nconst state = reactive({\n isInit: false,\n width: 0,\n height: 0,\n translateX: 0,\n translateY: 0,\n focusVisible: false,\n})\n\nconst handleChange = (evt: Event, item: T) => {\n const value = getValue(item)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n ;(evt.target as HTMLInputElement).checked = value === props.modelValue\n}\n\nconst aliasProps = computed(() => ({ ...defaultProps, ...props.props }))\n\nconst getValue = (item: T) => {\n return isObject(item) ? item[aliasProps.value.value] : item\n}\n\nconst getLabel = (item: T) => {\n return isObject(item) ? item[aliasProps.value.label] : item\n}\n\nconst getDisabled = (item: T | undefined) => {\n return !!(\n _disabled.value ||\n (isObject(item) ? item[aliasProps.value.disabled] : false)\n )\n}\n\nconst getSelected = (item: T) => {\n return props.modelValue === getValue(item)\n}\n\nconst getOption = (value: any) => {\n return props.options.find((item) => getValue(item) === value)\n}\n\nconst getItemCls = (item: T) => {\n return [\n ns.e('item'),\n ns.is('selected', getSelected(item)),\n ns.is('disabled', getDisabled(item)),\n ]\n}\n\nconst updateSelect = () => {\n if (!segmentedRef.value) return\n const selectedItem = segmentedRef.value.querySelector(\n '.is-selected'\n ) as HTMLElement\n const selectedItemInput = segmentedRef.value.querySelector(\n '.is-selected input'\n ) as HTMLElement\n if (!selectedItem || !selectedItemInput) {\n state.width = 0\n state.height = 0\n state.translateX = 0\n state.translateY = 0\n state.focusVisible = false\n return\n }\n state.isInit = true\n if (props.direction === 'vertical') {\n state.height = selectedItem.offsetHeight\n state.translateY = selectedItem.offsetTop\n } else {\n state.width = selectedItem.offsetWidth\n state.translateX = selectedItem.offsetLeft\n }\n try {\n // This will failed in test\n state.focusVisible = selectedItemInput.matches(':focus-visible')\n } catch {}\n}\n\nconst segmentedCls = computed(() => [\n ns.b(),\n ns.m(segmentedSize.value),\n ns.is('block', props.block),\n])\n\nconst selectedStyle = computed(() => ({\n width: props.direction === 'vertical' ? '100%' : `${state.width}px`,\n height: props.direction === 'vertical' ? `${state.height}px` : '100%',\n transform:\n props.direction === 'vertical'\n ? `translateY(${state.translateY}px)`\n : `translateX(${state.translateX}px)`,\n display: state.isInit ? 'block' : 'none',\n}))\n\nconst selectedCls = computed(() => [\n ns.e('item-selected'),\n ns.is('disabled', getDisabled(getOption(props.modelValue))),\n ns.is('focus-visible', state.focusVisible),\n])\n\nconst name = computed(() => {\n return props.name || segmentedId.value\n})\n\nuseResizeObserver(segmentedRef, updateSelect)\n\nwatch(activeElement, updateSelect)\n\nwatch(\n () => props.modelValue,\n () => {\n updateSelect()\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n },\n {\n flush: 'post',\n }\n)\n</script>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"segmented2.mjs","names":[],"sources":["../../../../../../packages/components/segmented/src/segmented.vue"],"sourcesContent":["<template>\n <div\n v-if=\"options.length\"\n :id=\"inputId\"\n ref=\"segmentedRef\"\n :class=\"segmentedCls\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'segmented' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <div :class=\"[ns.e('group'), ns.m(direction)]\">\n <div :style=\"selectedStyle\" :class=\"selectedCls\" />\n <label\n v-for=\"(item, index) in options\"\n :key=\"index\"\n :class=\"getItemCls(item)\"\n >\n <input\n :class=\"ns.e('item-input')\"\n type=\"radio\"\n :name=\"name\"\n :disabled=\"getDisabled(item)\"\n :checked=\"getSelected(item)\"\n @change=\"handleChange($event, item)\"\n />\n <div :class=\"ns.e('item-label')\">\n <slot :item=\"item\">{{ getLabel(item) }}</slot>\n </div>\n </label>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup generic=\"T extends Option = Option\">\nimport { computed, reactive, ref, watch } from 'vue'\nimport { useActiveElement, useResizeObserver } from '@vueuse/core'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport { NOOP, isObject } from '@element-plus/utils'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { defaultProps, segmentedEmits } from './segmented'\n\nimport type { Option } from './types'\nimport type { SegmentedProps } from './segmented'\n\ndefineOptions({\n name: 'ElSegmented',\n})\n\nconst props = withDefaults(defineProps<SegmentedProps<T>>(), {\n direction: 'horizontal',\n options: () => [],\n props: () => defaultProps,\n validateEvent: true,\n modelValue: undefined,\n disabled: undefined,\n})\nconst emit = defineEmits(segmentedEmits)\n\nconst ns = useNamespace('segmented')\nconst segmentedId = useId()\nconst segmentedSize = useFormSize()\nconst _disabled = useFormDisabled()\nconst { formItem } = useFormItem()\nconst { inputId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst segmentedRef = ref<HTMLElement | null>(null)\nconst activeElement = useActiveElement()\n\nconst state = reactive({\n isInit: false,\n width: 0,\n height: 0,\n translateX: 0,\n translateY: 0,\n focusVisible: false,\n})\n\nconst handleChange = (evt: Event, item: T) => {\n const value = getValue(item)\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value)\n ;(evt.target as HTMLInputElement).checked = value === props.modelValue\n}\n\nconst aliasProps = computed(() => ({ ...defaultProps, ...props.props }))\n\nconst getValue = (item: T) => {\n return isObject(item) ? item[aliasProps.value.value] : item\n}\n\nconst getLabel = (item: T) => {\n return isObject(item) ? item[aliasProps.value.label] : item\n}\n\nconst getDisabled = (item: T | undefined) => {\n return !!(\n _disabled.value ||\n (isObject(item) ? item[aliasProps.value.disabled] : false)\n )\n}\n\nconst getSelected = (item: T) => {\n return props.modelValue === getValue(item)\n}\n\nconst getOption = (value: any) => {\n return props.options.find((item) => getValue(item) === value)\n}\n\nconst getItemCls = (item: T) => {\n return [\n ns.e('item'),\n ns.is('selected', getSelected(item)),\n ns.is('disabled', getDisabled(item)),\n ]\n}\n\nconst updateSelect = () => {\n if (!segmentedRef.value) return\n const selectedItem = segmentedRef.value.querySelector(\n '.is-selected'\n ) as HTMLElement\n const selectedItemInput = segmentedRef.value.querySelector(\n '.is-selected input'\n ) as HTMLElement\n if (!selectedItem || !selectedItemInput) {\n state.width = 0\n state.height = 0\n state.translateX = 0\n state.translateY = 0\n state.focusVisible = false\n return\n }\n state.isInit = true\n if (props.direction === 'vertical') {\n state.height = selectedItem.offsetHeight\n state.translateY = selectedItem.offsetTop\n } else {\n state.width = selectedItem.offsetWidth\n state.translateX = selectedItem.offsetLeft\n }\n try {\n // This will failed in test\n state.focusVisible = selectedItemInput.matches(':focus-visible')\n } catch {}\n}\n\nconst segmentedCls = computed(() => [\n ns.b(),\n ns.m(segmentedSize.value),\n ns.is('block', props.block),\n])\n\nconst selectedStyle = computed(() => ({\n width: props.direction === 'vertical' ? '100%' : `${state.width}px`,\n height: props.direction === 'vertical' ? `${state.height}px` : '100%',\n transform:\n props.direction === 'vertical'\n ? `translateY(${state.translateY}px)`\n : `translateX(${state.translateX}px)`,\n display: state.isInit ? 'block' : 'none',\n}))\n\nconst selectedCls = computed(() => [\n ns.e('item-selected'),\n ns.is('disabled', getDisabled(getOption(props.modelValue))),\n ns.is('focus-visible', state.focusVisible),\n])\n\nconst name = computed(() => {\n return props.name || segmentedId.value\n})\n\nuseResizeObserver(segmentedRef, updateSelect)\n\nwatch(activeElement, updateSelect)\n\nwatch(() => props.options, updateSelect, { deep: true, flush: 'post' })\n\nwatch(\n () => props.modelValue,\n () => {\n updateSelect()\n if (props.validateEvent) {\n formItem?.validate?.('change').catch(NOOP)\n }\n },\n {\n flush: 'post',\n }\n)\n</script>\n"],"mappings":""}
|
|
@@ -5,13 +5,13 @@ import * as vue from "vue";
|
|
|
5
5
|
//#region ../../packages/components/select/src/option.d.ts
|
|
6
6
|
declare const optionProps: {
|
|
7
7
|
value: {
|
|
8
|
-
readonly type: vue.PropType<EpPropMergeType<(
|
|
8
|
+
readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>>;
|
|
9
9
|
readonly required: true;
|
|
10
10
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
11
|
__epPropKey: true;
|
|
12
12
|
};
|
|
13
13
|
label: {
|
|
14
|
-
readonly type: vue.PropType<EpPropMergeType<(
|
|
14
|
+
readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
|
|
15
15
|
readonly required: false;
|
|
16
16
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
17
|
__epPropKey: true;
|
|
@@ -8,13 +8,13 @@ import * as vue from "vue";
|
|
|
8
8
|
declare const _default: typeof __VLS_export;
|
|
9
9
|
declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
10
10
|
value: {
|
|
11
|
-
readonly type: vue.PropType<EpPropMergeType<(
|
|
11
|
+
readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>>;
|
|
12
12
|
readonly required: true;
|
|
13
13
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
14
14
|
__epPropKey: true;
|
|
15
15
|
};
|
|
16
16
|
label: {
|
|
17
|
-
readonly type: vue.PropType<EpPropMergeType<(
|
|
17
|
+
readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
|
|
18
18
|
readonly required: false;
|
|
19
19
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
20
20
|
__epPropKey: true;
|
|
@@ -42,7 +42,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
42
42
|
};
|
|
43
43
|
id: vue.Ref<string, string>;
|
|
44
44
|
containerKls: vue.ComputedRef<string[]>;
|
|
45
|
-
currentLabel: vue.ComputedRef<boolean | EpPropMergeType<(
|
|
45
|
+
currentLabel: vue.ComputedRef<boolean | EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
|
|
46
46
|
itemSelected: vue.ComputedRef<boolean>;
|
|
47
47
|
isDisabled: vue.ComputedRef<boolean>;
|
|
48
48
|
select: SelectContext;
|
|
@@ -60,13 +60,13 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
60
60
|
selectOptionClick: () => void;
|
|
61
61
|
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
62
62
|
value: {
|
|
63
|
-
readonly type: vue.PropType<EpPropMergeType<(
|
|
63
|
+
readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>>;
|
|
64
64
|
readonly required: true;
|
|
65
65
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
66
66
|
__epPropKey: true;
|
|
67
67
|
};
|
|
68
68
|
label: {
|
|
69
|
-
readonly type: vue.PropType<EpPropMergeType<(
|
|
69
|
+
readonly type: vue.PropType<EpPropMergeType<(NumberConstructor | StringConstructor)[], unknown, unknown>>;
|
|
70
70
|
readonly required: false;
|
|
71
71
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
72
72
|
__epPropKey: true;
|
|
@@ -35,11 +35,11 @@ declare const selectProps: {
|
|
|
35
35
|
valueOnClear: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null) | (((new (...args: any[]) => string | number | boolean | Function) | (() => string | number | boolean | Function | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
36
36
|
name: StringConstructor;
|
|
37
37
|
id: StringConstructor;
|
|
38
|
-
modelValue: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(
|
|
38
|
+
modelValue: EpPropFinalized<(new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown> | EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>[] | null) | (((new (...args: any[]) => string | number | boolean | Record<string, any> | EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>[]) | (() => EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown> | EpPropMergeType<(NumberConstructor | BooleanConstructor | ObjectConstructor | StringConstructor)[], unknown, unknown>[] | null)) | null)[], unknown, unknown, undefined, boolean>;
|
|
39
39
|
autocomplete: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
40
40
|
automaticDropdown: BooleanConstructor;
|
|
41
41
|
size: {
|
|
42
|
-
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "
|
|
42
|
+
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
|
43
43
|
readonly required: false;
|
|
44
44
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
45
45
|
__epPropKey: true;
|
|
@@ -97,7 +97,7 @@ declare const selectProps: {
|
|
|
97
97
|
suffixIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
|
98
98
|
tagType: {
|
|
99
99
|
default: string;
|
|
100
|
-
type: vue.PropType<EpPropMergeType<StringConstructor, "
|
|
100
|
+
type: vue.PropType<EpPropMergeType<StringConstructor, "info" | "primary" | "success" | "warning" | "danger", unknown>>;
|
|
101
101
|
required: false;
|
|
102
102
|
validator: ((val: unknown) => boolean) | undefined;
|
|
103
103
|
__epPropKey: true;
|
|
@@ -113,9 +113,9 @@ declare const selectProps: {
|
|
|
113
113
|
remoteShowSuffix: BooleanConstructor;
|
|
114
114
|
showArrow: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
|
|
115
115
|
offset: EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
116
|
-
placement: EpPropFinalized<(new (...args: any[]) => "
|
|
116
|
+
placement: EpPropFinalized<(new (...args: any[]) => "bottom-start" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "right" | "left" | "top-start" | "top-end" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement) | (((new (...args: any[]) => "bottom-start" | "bottom" | "auto" | "auto-start" | "auto-end" | "top" | "right" | "left" | "top-start" | "top-end" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end") | (() => Placement)) | null)[], Placement, unknown, string, boolean>;
|
|
117
117
|
fallbackPlacements: EpPropFinalized<(new (...args: any[]) => Placement[]) | (() => Placement[]) | (((new (...args: any[]) => Placement[]) | (() => Placement[])) | null)[], unknown, unknown, string[], boolean>;
|
|
118
|
-
tabindex: EpPropFinalized<(
|
|
118
|
+
tabindex: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, number, boolean>;
|
|
119
119
|
appendTo: {
|
|
120
120
|
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement) | (((new (...args: any[]) => string | HTMLElement) | (() => string | HTMLElement)) | null)[], unknown, unknown>>;
|
|
121
121
|
readonly required: false;
|
|
@@ -131,8 +131,8 @@ declare const selectProps: {
|
|
|
131
131
|
props: EpPropFinalized<(new (...args: any[]) => Props) | (() => Props) | (((new (...args: any[]) => Props) | (() => Props)) | null)[], unknown, unknown, () => Required<Props>, boolean>;
|
|
132
132
|
};
|
|
133
133
|
declare const selectEmits: {
|
|
134
|
-
"update:modelValue": (val: SelectProps["modelValue"]) => boolean;
|
|
135
|
-
change: (val: SelectProps["modelValue"]) => boolean;
|
|
134
|
+
"update:modelValue": (val: SelectProps["modelValue"] | any) => boolean;
|
|
135
|
+
change: (val: SelectProps["modelValue"] | any) => boolean;
|
|
136
136
|
'popup-scroll': ({
|
|
137
137
|
scrollTop,
|
|
138
138
|
scrollLeft
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":[],"sources":["../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { scrollbarEmits } from '@element-plus/components/scrollbar'\nimport {\n useAriaProps,\n useEmptyValuesProps,\n useSizeProp,\n} from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { ArrowDown, CircleClose } from '@element-plus/icons-vue'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { defaultProps } from '@element-plus/components/select-v2/src/useProps'\n\nimport type { EmitFn } from '@element-plus/utils'\nimport type {\n CSSProperties,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nimport type Select from './select.vue'\nimport type {\n Options,\n Placement,\n PopperEffect,\n} from '@element-plus/components/popper'\nimport type { OptionValue } from './type'\nimport type { Props } from '@element-plus/components/select-v2/src/useProps'\n\n/**\n * @description Tag tooltip configuration interface\n */\nexport interface TagTooltipProps {\n appendTo?: string | HTMLElement\n placement?: Placement\n fallbackPlacements?: Placement[]\n effect?: PopperEffect\n popperClass?: string\n popperStyle?: string | CSSProperties\n transition?: string\n teleported?: boolean\n popperOptions?: Partial<Options>\n showAfter?: number\n hideAfter?: number\n autoClose?: number\n offset?: number\n}\n\nexport const selectProps = buildProps({\n /**\n * @description the name attribute of select input\n */\n name: String,\n /**\n * @description native input id\n */\n id: String,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<OptionValue | OptionValue[] | null>([\n Array,\n String,\n Number,\n Boolean,\n Object,\n ]),\n default: undefined,\n },\n /**\n * @description the autocomplete attribute of select input\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n */\n automaticDropdown: Boolean,\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType<PopperEffect>(String),\n default: 'light',\n },\n /**\n * @description whether Select is disabled\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether select can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether Select is filterable\n */\n filterable: Boolean,\n /**\n * @description whether creating new items is allowed. To use this, `filterable` must be true\n */\n allowCreate: Boolean,\n /**\n * @description whether Select is loading data from server\n */\n loading: Boolean,\n /**\n * @description custom class name for Select's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description custom style for Select's dropdown\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}) as Partial<Options>,\n },\n /**\n * @description whether options are loaded from server\n */\n remote: Boolean,\n /**\n * @description debounce delay during remote search, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description displayed text while loading data from server, default is 'Loading'\n */\n loadingText: String,\n /**\n * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'\n */\n noMatchText: String,\n /**\n * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'\n */\n noDataText: String,\n /**\n * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true\n */\n remoteMethod: {\n type: definePropType<(query: string) => void>(Function),\n },\n /**\n * @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true\n */\n filterMethod: {\n type: definePropType<(query: string) => void>(Function),\n },\n /**\n * @description whether multiple-select is activated\n */\n multiple: Boolean,\n /**\n * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0\n */\n multipleLimit: {\n type: Number,\n default: 0,\n },\n /**\n * @description placeholder, default is 'Select'\n */\n placeholder: {\n type: String,\n },\n /**\n * @description select first matching option on enter key. Use with `filterable` or `remote`\n */\n defaultFirstOption: Boolean,\n /**\n * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option\n */\n reserveKeyword: {\n type: Boolean,\n default: true,\n },\n /**\n * @description unique identity key name for value, required when value is an object\n */\n valueKey: {\n type: String,\n default: 'value',\n },\n /**\n * @description whether to collapse tags to a text when multiple selecting\n */\n collapseTags: Boolean,\n /**\n * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n */\n collapseTagsTooltip: Boolean,\n /**\n * @description configuration object for the collapse-tags tooltip. To use this, `collapse-tags` and `collapse-tags-tooltip` must be true\n */\n tagTooltip: {\n type: definePropType<TagTooltipProps>(Object),\n default: () => ({}),\n },\n /**\n * @description the max tags number to be shown. To use this, `collapse-tags` must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: iconPropType,\n default: CircleClose,\n },\n /**\n * @description whether the width of the dropdown is the same as the input\n */\n fitInputWidth: Boolean,\n /**\n * @description custom suffix icon component\n */\n suffixIcon: {\n type: iconPropType,\n default: ArrowDown,\n },\n /**\n * @description tag type\n */\n\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: { ...tagProps.effect, default: 'light' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description in remote search method show suffix icon\n */\n remoteShowSuffix: Boolean,\n /**\n * @description determines whether the arrow is displayed\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the dropdown\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of dropdown\n */\n placement: {\n type: definePropType<Placement>(String),\n values: placements,\n default: 'bottom-start',\n },\n /**\n * @description list of possible positions for dropdown\n */\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: ['bottom-start', 'top-start', 'right', 'left'],\n },\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description which element the selection dropdown appends to\n */\n appendTo: useTooltipContentProps.appendTo,\n options: {\n type: definePropType<Record<string, any>[]>(Array),\n },\n props: {\n type: definePropType<SelectOptionProps>(Object),\n default: () => defaultProps,\n },\n ...useEmptyValuesProps,\n ...useAriaProps(['ariaLabel']),\n})\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport const selectEmits = {\n [UPDATE_MODEL_EVENT]: (val: SelectProps['modelValue']) => true,\n [CHANGE_EVENT]: (val: SelectProps['modelValue']) => true,\n 'popup-scroll': scrollbarEmits.scroll,\n 'end-reached': scrollbarEmits['end-reached'],\n 'remove-tag': (val: unknown) => true,\n 'visible-change': (visible: boolean) => true,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\nexport type SelectProps = ExtractPropTypes<typeof selectProps>\nexport type SelectPropsPublic = ExtractPublicPropTypes<typeof selectProps>\nexport type SelectEmits = EmitFn<typeof selectEmits>\nexport type SelectInstance = InstanceType<typeof Select> & unknown\nexport type SelectOptionProps = Props\n"],"mappings":";;;;;;;;;;;;;;AAgDA,MAAa,cAAc,WAAW;CAIpC,MAAM;CAIN,IAAI;CAIJ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;EACN,SAAS;EACV;CAID,QAAQ;EACN,MAAM;EACN,SAAS;EACV;CAID,WAAW;EACT,MAAM,eAA0B,OAAO;EACvC,QAAQ;EACR,SAAS;EACV;CAID,oBAAoB;EAClB,MAAM,eAA4B,MAAM;EACxC,SAAS;GAAC;GAAgB;GAAa;GAAS;GAAO;EACxD;CAID,UAAU;EACR,MAAM,CAAC,QAAQ,OAAO;EACtB,SAAS;EACV;CAID,UAAU,uBAAuB;CACjC,SAAS,EACP,MAAM,eAAsC,MAAM,EACnD;CACD,OAAO;EACL,MAAM,eAAkC,OAAO;EAC/C,eAAe;EAChB;CACD,GAAG;CACH,GAAG,aAAa,CAAC,YAAY,CAAC;CAC/B,CAAC;AAEF,MAAa,cAAc;EACxB,sBAAsB,QAAmC;EACzD,gBAAgB,QAAmC;CACpD,gBAAgB,eAAe;CAC/B,eAAe,eAAe;CAC9B,eAAe,QAAiB;CAChC,mBAAmB,YAAqB;CACxC,QAAQ,QAAoB,eAAe;CAC3C,OAAO,QAAoB,eAAe;CAC1C,aAAa;CACd"}
|
|
1
|
+
{"version":3,"file":"select.mjs","names":[],"sources":["../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { scrollbarEmits } from '@element-plus/components/scrollbar'\nimport {\n useAriaProps,\n useEmptyValuesProps,\n useSizeProp,\n} from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { ArrowDown, CircleClose } from '@element-plus/icons-vue'\nimport { tagProps } from '@element-plus/components/tag'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { defaultProps } from '@element-plus/components/select-v2/src/useProps'\n\nimport type { EmitFn } from '@element-plus/utils'\nimport type {\n CSSProperties,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nimport type Select from './select.vue'\nimport type {\n Options,\n Placement,\n PopperEffect,\n} from '@element-plus/components/popper'\nimport type { OptionValue } from './type'\nimport type { Props } from '@element-plus/components/select-v2/src/useProps'\n\n/**\n * @description Tag tooltip configuration interface\n */\nexport interface TagTooltipProps {\n appendTo?: string | HTMLElement\n placement?: Placement\n fallbackPlacements?: Placement[]\n effect?: PopperEffect\n popperClass?: string\n popperStyle?: string | CSSProperties\n transition?: string\n teleported?: boolean\n popperOptions?: Partial<Options>\n showAfter?: number\n hideAfter?: number\n autoClose?: number\n offset?: number\n}\n\nexport const selectProps = buildProps({\n /**\n * @description the name attribute of select input\n */\n name: String,\n /**\n * @description native input id\n */\n id: String,\n /**\n * @description binding value\n */\n modelValue: {\n type: definePropType<OptionValue | OptionValue[] | null>([\n Array,\n String,\n Number,\n Boolean,\n Object,\n ]),\n default: undefined,\n },\n /**\n * @description the autocomplete attribute of select input\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n */\n automaticDropdown: Boolean,\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType<PopperEffect>(String),\n default: 'light',\n },\n /**\n * @description whether Select is disabled\n */\n disabled: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description whether select can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether Select is filterable\n */\n filterable: Boolean,\n /**\n * @description whether creating new items is allowed. To use this, `filterable` must be true\n */\n allowCreate: Boolean,\n /**\n * @description whether Select is loading data from server\n */\n loading: Boolean,\n /**\n * @description custom class name for Select's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description custom style for Select's dropdown\n */\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({}) as Partial<Options>,\n },\n /**\n * @description whether options are loaded from server\n */\n remote: Boolean,\n /**\n * @description debounce delay during remote search, in milliseconds\n */\n debounce: {\n type: Number,\n default: 300,\n },\n /**\n * @description displayed text while loading data from server, default is 'Loading'\n */\n loadingText: String,\n /**\n * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'\n */\n noMatchText: String,\n /**\n * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'\n */\n noDataText: String,\n /**\n * @description function that gets called when the input value changes. Its parameter is the current input value. To use this, `filterable` must be true\n */\n remoteMethod: {\n type: definePropType<(query: string) => void>(Function),\n },\n /**\n * @description custom filter method, the first parameter is the current input value. To use this, `filterable` must be true\n */\n filterMethod: {\n type: definePropType<(query: string) => void>(Function),\n },\n /**\n * @description whether multiple-select is activated\n */\n multiple: Boolean,\n /**\n * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0\n */\n multipleLimit: {\n type: Number,\n default: 0,\n },\n /**\n * @description placeholder, default is 'Select'\n */\n placeholder: {\n type: String,\n },\n /**\n * @description select first matching option on enter key. Use with `filterable` or `remote`\n */\n defaultFirstOption: Boolean,\n /**\n * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option\n */\n reserveKeyword: {\n type: Boolean,\n default: true,\n },\n /**\n * @description unique identity key name for value, required when value is an object\n */\n valueKey: {\n type: String,\n default: 'value',\n },\n /**\n * @description whether to collapse tags to a text when multiple selecting\n */\n collapseTags: Boolean,\n /**\n * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n */\n collapseTagsTooltip: Boolean,\n /**\n * @description configuration object for the collapse-tags tooltip. To use this, `collapse-tags` and `collapse-tags-tooltip` must be true\n */\n tagTooltip: {\n type: definePropType<TagTooltipProps>(Object),\n default: () => ({}),\n },\n /**\n * @description the max tags number to be shown. To use this, `collapse-tags` must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether select dropdown is teleported, if `true` it will be teleported to where `append-to` sets\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: iconPropType,\n default: CircleClose,\n },\n /**\n * @description whether the width of the dropdown is the same as the input\n */\n fitInputWidth: Boolean,\n /**\n * @description custom suffix icon component\n */\n suffixIcon: {\n type: iconPropType,\n default: ArrowDown,\n },\n /**\n * @description tag type\n */\n\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: { ...tagProps.effect, default: 'light' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description in remote search method show suffix icon\n */\n remoteShowSuffix: Boolean,\n /**\n * @description determines whether the arrow is displayed\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n /**\n * @description offset of the dropdown\n */\n offset: {\n type: Number,\n default: 12,\n },\n /**\n * @description position of dropdown\n */\n placement: {\n type: definePropType<Placement>(String),\n values: placements,\n default: 'bottom-start',\n },\n /**\n * @description list of possible positions for dropdown\n */\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: ['bottom-start', 'top-start', 'right', 'left'],\n },\n /**\n * @description tabindex for input\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description which element the selection dropdown appends to\n */\n appendTo: useTooltipContentProps.appendTo,\n options: {\n type: definePropType<Record<string, any>[]>(Array),\n },\n props: {\n type: definePropType<SelectOptionProps>(Object),\n default: () => defaultProps,\n },\n ...useEmptyValuesProps,\n ...useAriaProps(['ariaLabel']),\n})\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport const selectEmits = {\n // todo: use generics to eliminate any\n [UPDATE_MODEL_EVENT]: (val: SelectProps['modelValue'] | any) => true,\n [CHANGE_EVENT]: (val: SelectProps['modelValue'] | any) => true,\n 'popup-scroll': scrollbarEmits.scroll,\n 'end-reached': scrollbarEmits['end-reached'],\n 'remove-tag': (val: unknown) => true,\n 'visible-change': (visible: boolean) => true,\n focus: (evt: FocusEvent) => evt instanceof FocusEvent,\n blur: (evt: FocusEvent) => evt instanceof FocusEvent,\n clear: () => true,\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\nexport type SelectProps = ExtractPropTypes<typeof selectProps>\nexport type SelectPropsPublic = ExtractPublicPropTypes<typeof selectProps>\nexport type SelectEmits = EmitFn<typeof selectEmits>\nexport type SelectInstance = InstanceType<typeof Select> & unknown\nexport type SelectOptionProps = Props\n"],"mappings":";;;;;;;;;;;;;;AAgDA,MAAa,cAAc,WAAW;CAIpC,MAAM;CAIN,IAAI;CAIJ,YAAY;EACV,MAAM,eAAmD;GACvD;GACA;GACA;GACA;GACA;GACD,CAAC;EACF,SAAS;EACV;CAID,cAAc;EACZ,MAAM;EACN,SAAS;EACV;CAID,mBAAmB;CAInB,MAAM;CAIN,QAAQ;EACN,MAAM,eAA6B,OAAO;EAC1C,SAAS;EACV;CAID,UAAU;EACR,MAAM;EACN,SAAS;EACV;CAID,WAAW;CAIX,YAAY;CAIZ,aAAa;CAIb,SAAS;CAIT,aAAa;EACX,MAAM;EACN,SAAS;EACV;CAID,aAAa,EACX,MAAM,eAAuC,CAAC,QAAQ,OAAO,CAAC,EAC/D;CAID,eAAe;EACb,MAAM,eAAiC,OAAO;EAC9C,gBAAgB,EAAE;EACnB;CAID,QAAQ;CAIR,UAAU;EACR,MAAM;EACN,SAAS;EACV;CAID,aAAa;CAIb,aAAa;CAIb,YAAY;CAIZ,cAAc,EACZ,MAAM,eAAwC,SAAS,EACxD;CAID,cAAc,EACZ,MAAM,eAAwC,SAAS,EACxD;CAID,UAAU;CAIV,eAAe;EACb,MAAM;EACN,SAAS;EACV;CAID,aAAa,EACX,MAAM,QACP;CAID,oBAAoB;CAIpB,gBAAgB;EACd,MAAM;EACN,SAAS;EACV;CAID,UAAU;EACR,MAAM;EACN,SAAS;EACV;CAID,cAAc;CAId,qBAAqB;CAIrB,YAAY;EACV,MAAM,eAAgC,OAAO;EAC7C,gBAAg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