element-plus 2.3.14 → 2.4.1
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 +1631 -1090
- package/dist/index.full.min.js +17 -17
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +17 -17
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1630 -1091
- 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.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/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 +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/autocomplete/index.d.ts +28 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +28 -1
- package/es/components/carousel/index.d.ts +5 -0
- package/es/components/carousel/src/carousel.vue.d.ts +5 -0
- package/es/components/carousel/src/carousel2.mjs +7 -2
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.d.ts +6 -0
- package/es/components/carousel/src/use-carousel.mjs +41 -6
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +150 -6
- package/es/components/cascader/src/cascader.vue.d.ts +75 -3
- package/es/components/checkbox/index.d.ts +12 -0
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +4 -0
- package/es/components/checkbox/src/checkbox.d.ts +1 -0
- package/es/components/checkbox/src/checkbox.mjs +2 -1
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +4 -0
- package/es/components/checkbox/src/checkbox2.mjs +8 -12
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +2 -2
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +1 -0
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +19 -2
- package/es/components/color-picker/src/color-picker.d.ts +2 -0
- package/es/components/color-picker/src/color-picker.mjs +3 -1
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +19 -2
- package/es/components/color-picker/src/color-picker2.mjs +84 -12
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +8 -0
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs +1 -1
- package/es/components/date-picker/src/date-picker-com/basic-cell-render.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +269 -11
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs +2 -2
- package/es/components/date-picker/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +269 -11
- package/es/components/date-picker/src/date-picker.d.ts +4 -0
- package/es/components/date-picker/src/panel-utils.d.ts +538 -22
- package/es/components/date-picker/src/props/date-picker.d.ts +2 -0
- package/es/components/date-picker/src/props/panel-date-pick.d.ts +2 -0
- package/es/components/date-picker/src/props/panel-date-range.d.ts +2 -0
- package/es/components/date-picker/src/props/shared.d.ts +2 -0
- package/es/components/date-picker/src/props/shared.mjs +3 -1
- package/es/components/date-picker/src/props/shared.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +48 -140
- package/es/components/descriptions/index.mjs +3 -3
- package/es/components/descriptions/index.mjs.map +1 -1
- package/es/components/descriptions/src/description-item.d.ts +39 -69
- package/es/components/descriptions/src/description-item.mjs +39 -36
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description.vue.d.ts +16 -10
- package/es/components/descriptions/src/description2.mjs +9 -8
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-cell.d.ts +9 -3
- package/es/components/descriptions/src/descriptions-cell.mjs +16 -11
- package/es/components/descriptions/src/descriptions-cell.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.d.ts +2 -1
- package/es/components/descriptions/src/descriptions-row.mjs +2 -2
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row.vue.d.ts +10 -6
- package/es/components/descriptions/src/descriptions-row2.mjs +6 -6
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +1 -1
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/image/index.d.ts +16 -0
- package/es/components/image/src/image.d.ts +2 -0
- package/es/components/image/src/image.mjs +8 -0
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +16 -0
- package/es/components/image/src/image2.mjs +3 -1
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.d.ts +8 -0
- package/es/components/image-viewer/src/image-viewer.d.ts +2 -0
- package/es/components/image-viewer/src/image-viewer.mjs +8 -0
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +8 -0
- package/es/components/image-viewer/src/image-viewer2.mjs +3 -2
- 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 +2 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/menu/index.d.ts +1 -0
- package/es/components/menu/index.mjs +1 -0
- package/es/components/menu/index.mjs.map +1 -1
- package/es/components/menu/src/instance.d.ts +12 -0
- package/es/components/menu/src/instance.mjs +2 -0
- package/es/components/menu/src/instance.mjs.map +1 -0
- package/es/components/menu/src/sub-menu.mjs +0 -22
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +4 -0
- package/es/components/popper/src/composables/use-content-dom.mjs +4 -2
- package/es/components/popper/src/composables/use-content-dom.mjs.map +1 -1
- package/es/components/scrollbar/index.d.ts +28 -1
- package/es/components/scrollbar/src/scrollbar.d.ts +9 -0
- package/es/components/scrollbar/src/scrollbar.mjs +7 -0
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +28 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +12 -8
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.d.ts +4 -0
- package/es/components/select/src/option.mjs +9 -1
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/option.vue.d.ts +1 -0
- package/es/components/select/src/select.mjs +251 -228
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +98 -98
- package/es/components/select/src/useOption.mjs +6 -7
- package/es/components/select/src/useOption.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +1 -0
- package/es/components/select/src/useSelect.mjs +4 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +2 -2
- package/es/components/select-v2/src/select-dropdown.mjs +4 -7
- package/es/components/select-v2/src/select-dropdown.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue.d.ts +1 -1
- package/es/components/select-v2/src/useSelect.d.ts +1 -1
- package/es/components/select-v2/src/useSelect.mjs +16 -15
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/switch/index.d.ts +4 -0
- package/es/components/switch/src/switch.d.ts +1 -0
- package/es/components/switch/src/switch.mjs +4 -0
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +4 -0
- package/es/components/switch/src/switch2.mjs +2 -1
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.mjs +15 -33
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs +33 -12
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.d.ts +4 -1
- package/es/components/tabs/src/tab-nav.mjs.map +1 -1
- package/es/components/tabs/src/tabs.d.ts +16 -29
- package/es/components/tabs/src/tabs.mjs +10 -10
- package/es/components/tabs/src/tabs.mjs.map +1 -1
- package/es/components/text/index.d.ts +18 -0
- package/es/components/text/src/text.d.ts +6 -2
- package/es/components/text/src/text.mjs +3 -0
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text.vue.d.ts +32 -14
- package/es/components/text/src/text2.mjs +8 -4
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-picker/index.d.ts +8 -0
- package/es/components/time-picker/src/common/picker.mjs +2 -0
- package/es/components/time-picker/src/common/picker.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +6 -0
- package/es/components/time-picker/src/common/props.d.ts +29 -18
- package/es/components/time-picker/src/common/props.mjs +2 -0
- package/es/components/time-picker/src/common/props.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +216 -9
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +263 -11
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +263 -11
- package/es/components/time-picker/src/time-picker.d.ts +4 -0
- package/es/components/time-select/index.d.ts +16 -0
- package/es/components/time-select/src/time-select.vue.d.ts +17 -3
- package/es/components/time-select/src/time-select2.mjs +3 -1
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/transfer/index.d.ts +40 -0
- package/es/components/transfer/src/transfer-panel.vue.d.ts +8 -0
- package/es/components/transfer/src/transfer.vue.d.ts +40 -0
- package/es/components/tree-select/src/tree-select-option.d.ts +6 -0
- package/es/components/tree-v2/index.d.ts +8 -0
- package/es/components/tree-v2/src/tree-node.vue.d.ts +8 -0
- package/es/components/tree-v2/src/tree.vue.d.ts +8 -0
- package/es/components/upload/index.d.ts +18 -16
- package/es/components/upload/src/upload-content.d.ts +0 -1
- package/es/components/upload/src/upload-content.vue.d.ts +0 -4
- package/es/components/upload/src/upload-list.vue.d.ts +17 -0
- package/es/components/upload/src/upload-list2.mjs +8 -6
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.d.ts +9 -5
- package/es/components/upload/src/upload.mjs +0 -4
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +18 -16
- package/es/components/watermark/index.d.ts +94 -0
- package/es/components/watermark/index.mjs +9 -0
- package/es/components/watermark/index.mjs.map +1 -0
- package/es/components/watermark/src/useClips.d.ts +7 -0
- package/es/components/watermark/src/useClips.mjs +82 -0
- package/es/components/watermark/src/useClips.mjs.map +1 -0
- package/es/components/watermark/src/utils.d.ts +8 -0
- package/es/components/watermark/src/utils.mjs +22 -0
- package/es/components/watermark/src/utils.mjs.map +1 -0
- package/es/components/watermark/src/watermark.d.ts +32 -0
- package/es/components/watermark/src/watermark.mjs +33 -0
- package/es/components/watermark/src/watermark.mjs.map +1 -0
- package/es/components/watermark/src/watermark.vue.d.ts +94 -0
- package/es/components/watermark/src/watermark2.mjs +202 -0
- package/es/components/watermark/src/watermark2.mjs.map +1 -0
- package/es/components/watermark/style/css.d.ts +0 -0
- package/es/components/watermark/style/css.mjs +2 -0
- package/es/components/watermark/style/css.mjs.map +1 -0
- package/es/components/watermark/style/index.d.ts +0 -0
- package/es/components/watermark/style/index.mjs +2 -0
- package/es/components/watermark/style/index.mjs.map +1 -0
- package/es/hooks/use-focus-controller/index.d.ts +6 -1
- package/es/hooks/use-focus-controller/index.mjs +5 -2
- package/es/hooks/use-focus-controller/index.mjs.map +1 -1
- package/es/index.mjs +2 -0
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/autocomplete/index.d.ts +28 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +28 -1
- package/lib/components/carousel/index.d.ts +5 -0
- package/lib/components/carousel/src/carousel.vue.d.ts +5 -0
- package/lib/components/carousel/src/carousel2.js +7 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.d.ts +6 -0
- package/lib/components/carousel/src/use-carousel.js +40 -5
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/index.d.ts +150 -6
- package/lib/components/cascader/src/cascader.vue.d.ts +75 -3
- package/lib/components/checkbox/index.d.ts +12 -0
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +4 -0
- package/lib/components/checkbox/src/checkbox.d.ts +1 -0
- package/lib/components/checkbox/src/checkbox.js +2 -1
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +4 -0
- package/lib/components/checkbox/src/checkbox2.js +8 -12
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +1 -0
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +19 -2
- package/lib/components/color-picker/src/color-picker.d.ts +2 -0
- package/lib/components/color-picker/src/color-picker.js +3 -1
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +19 -2
- package/lib/components/color-picker/src/color-picker2.js +94 -22
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +8 -0
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js +1 -1
- package/lib/components/date-picker/src/date-picker-com/basic-cell-render.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +269 -11
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js +2 -2
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +269 -11
- package/lib/components/date-picker/src/date-picker.d.ts +4 -0
- package/lib/components/date-picker/src/panel-utils.d.ts +538 -22
- package/lib/components/date-picker/src/props/date-picker.d.ts +2 -0
- package/lib/components/date-picker/src/props/panel-date-pick.d.ts +2 -0
- package/lib/components/date-picker/src/props/panel-date-range.d.ts +2 -0
- package/lib/components/date-picker/src/props/shared.d.ts +2 -0
- package/lib/components/date-picker/src/props/shared.js +3 -1
- package/lib/components/date-picker/src/props/shared.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +48 -140
- package/lib/components/descriptions/src/description-item.d.ts +39 -69
- package/lib/components/descriptions/src/description-item.js +39 -36
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description.vue.d.ts +16 -10
- package/lib/components/descriptions/src/description2.js +9 -8
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-cell.d.ts +9 -3
- package/lib/components/descriptions/src/descriptions-cell.js +15 -10
- package/lib/components/descriptions/src/descriptions-cell.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.d.ts +2 -1
- package/lib/components/descriptions/src/descriptions-row.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row.vue.d.ts +10 -6
- package/lib/components/descriptions/src/descriptions-row2.js +6 -6
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/form/src/form-item2.js +1 -1
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/image/index.d.ts +16 -0
- package/lib/components/image/src/image.d.ts +2 -0
- package/lib/components/image/src/image.js +8 -0
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +16 -0
- package/lib/components/image/src/image2.js +3 -1
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.d.ts +8 -0
- package/lib/components/image-viewer/src/image-viewer.d.ts +2 -0
- package/lib/components/image-viewer/src/image-viewer.js +8 -0
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +8 -0
- package/lib/components/image-viewer/src/image-viewer2.js +3 -2
- 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 +17 -13
- package/lib/components/index.js.map +1 -1
- package/lib/components/menu/index.d.ts +1 -0
- package/lib/components/menu/index.js +1 -0
- package/lib/components/menu/index.js.map +1 -1
- package/lib/components/menu/src/instance.d.ts +12 -0
- package/lib/components/menu/src/instance.js +3 -0
- package/lib/components/menu/src/instance.js.map +1 -0
- package/lib/components/menu/src/sub-menu.js +0 -22
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +4 -0
- package/lib/components/popper/src/composables/use-content-dom.js +4 -2
- package/lib/components/popper/src/composables/use-content-dom.js.map +1 -1
- package/lib/components/scrollbar/index.d.ts +28 -1
- package/lib/components/scrollbar/src/scrollbar.d.ts +9 -0
- package/lib/components/scrollbar/src/scrollbar.js +7 -0
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +28 -1
- package/lib/components/scrollbar/src/scrollbar2.js +12 -8
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.d.ts +4 -0
- package/lib/components/select/src/option.js +9 -1
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/option.vue.d.ts +1 -0
- package/lib/components/select/src/select.js +251 -228
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +98 -98
- package/lib/components/select/src/useOption.js +3 -4
- package/lib/components/select/src/useOption.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +1 -0
- package/lib/components/select/src/useSelect.js +4 -2
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +2 -2
- package/lib/components/select-v2/src/select-dropdown.js +3 -6
- package/lib/components/select-v2/src/select-dropdown.js.map +1 -1
- package/lib/components/select-v2/src/select.vue.d.ts +1 -1
- package/lib/components/select-v2/src/useSelect.d.ts +1 -1
- package/lib/components/select-v2/src/useSelect.js +16 -15
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/switch/index.d.ts +4 -0
- package/lib/components/switch/src/switch.d.ts +1 -0
- package/lib/components/switch/src/switch.js +4 -0
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +4 -0
- package/lib/components/switch/src/switch2.js +2 -1
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/table/src/table-footer/index.js +15 -33
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table.js +33 -12
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.d.ts +4 -1
- package/lib/components/tabs/src/tab-nav.js.map +1 -1
- package/lib/components/tabs/src/tabs.d.ts +16 -29
- package/lib/components/tabs/src/tabs.js +10 -10
- package/lib/components/tabs/src/tabs.js.map +1 -1
- package/lib/components/text/index.d.ts +18 -0
- package/lib/components/text/src/text.d.ts +6 -2
- package/lib/components/text/src/text.js +3 -0
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text.vue.d.ts +32 -14
- package/lib/components/text/src/text2.js +7 -3
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-picker/index.d.ts +8 -0
- package/lib/components/time-picker/src/common/picker.js +2 -0
- package/lib/components/time-picker/src/common/picker.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +6 -0
- package/lib/components/time-picker/src/common/props.d.ts +29 -18
- package/lib/components/time-picker/src/common/props.js +2 -0
- package/lib/components/time-picker/src/common/props.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +216 -9
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +263 -11
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +263 -11
- package/lib/components/time-picker/src/time-picker.d.ts +4 -0
- package/lib/components/time-select/index.d.ts +16 -0
- package/lib/components/time-select/src/time-select.vue.d.ts +17 -3
- package/lib/components/time-select/src/time-select2.js +5 -3
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/transfer/index.d.ts +40 -0
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +8 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +40 -0
- package/lib/components/tree-select/src/tree-select-option.d.ts +6 -0
- package/lib/components/tree-v2/index.d.ts +8 -0
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +8 -0
- package/lib/components/tree-v2/src/tree.vue.d.ts +8 -0
- package/lib/components/upload/index.d.ts +18 -16
- package/lib/components/upload/src/upload-content.d.ts +0 -1
- package/lib/components/upload/src/upload-content.vue.d.ts +0 -4
- package/lib/components/upload/src/upload-list.vue.d.ts +17 -0
- package/lib/components/upload/src/upload-list2.js +7 -5
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.d.ts +9 -5
- package/lib/components/upload/src/upload.js +0 -4
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +18 -16
- package/lib/components/watermark/index.d.ts +94 -0
- package/lib/components/watermark/index.js +15 -0
- package/lib/components/watermark/index.js.map +1 -0
- package/lib/components/watermark/src/useClips.d.ts +7 -0
- package/lib/components/watermark/src/useClips.js +87 -0
- package/lib/components/watermark/src/useClips.js.map +1 -0
- package/lib/components/watermark/src/utils.d.ts +8 -0
- package/lib/components/watermark/src/utils.js +29 -0
- package/lib/components/watermark/src/utils.js.map +1 -0
- package/lib/components/watermark/src/watermark.d.ts +32 -0
- package/lib/components/watermark/src/watermark.js +37 -0
- package/lib/components/watermark/src/watermark.js.map +1 -0
- package/lib/components/watermark/src/watermark.vue.d.ts +94 -0
- package/lib/components/watermark/src/watermark2.js +206 -0
- package/lib/components/watermark/src/watermark2.js.map +1 -0
- package/lib/components/watermark/style/css.d.ts +0 -0
- package/lib/components/watermark/style/css.js +3 -0
- package/lib/components/watermark/style/css.js.map +1 -0
- package/lib/components/watermark/style/index.d.ts +0 -0
- package/lib/components/watermark/style/index.js +3 -0
- package/lib/components/watermark/style/index.js.map +1 -0
- package/lib/hooks/use-focus-controller/index.d.ts +6 -1
- package/lib/hooks/use-focus-controller/index.js +5 -2
- package/lib/hooks/use-focus-controller/index.js.map +1 -1
- package/lib/index.js +108 -104
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +5 -2
- package/tags.json +1 -1
- package/theme-chalk/el-button.css +1 -1
- package/theme-chalk/el-color-picker.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-text.css +1 -1
- package/theme-chalk/el-upload.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/button.scss +1 -0
- package/theme-chalk/src/color-picker.scss +8 -2
- package/theme-chalk/src/common/var.scss +3 -1
- package/theme-chalk/src/menu.scss +14 -4
- package/theme-chalk/src/message-box.scss +0 -12
- package/theme-chalk/src/table.scss +38 -15
- package/theme-chalk/src/text.scss +6 -0
- package/theme-chalk/src/upload.scss +1 -1
- package/web-types.json +1 -1
|
@@ -6,6 +6,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6
6
|
};
|
|
7
7
|
label: {
|
|
8
8
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
9
|
+
default: undefined;
|
|
9
10
|
};
|
|
10
11
|
indeterminate: BooleanConstructor;
|
|
11
12
|
disabled: BooleanConstructor;
|
|
@@ -50,6 +51,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
51
|
};
|
|
51
52
|
label: {
|
|
52
53
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
54
|
+
default: undefined;
|
|
53
55
|
};
|
|
54
56
|
indeterminate: BooleanConstructor;
|
|
55
57
|
disabled: BooleanConstructor;
|
|
@@ -133,6 +135,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
133
135
|
};
|
|
134
136
|
label: {
|
|
135
137
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
138
|
+
default: undefined;
|
|
136
139
|
};
|
|
137
140
|
indeterminate: BooleanConstructor;
|
|
138
141
|
disabled: BooleanConstructor;
|
|
@@ -174,6 +177,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
174
177
|
"onUpdate:modelValue"?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
|
|
175
178
|
}, {
|
|
176
179
|
modelValue: string | number | boolean;
|
|
180
|
+
label: string | number | boolean | Record<string, any>;
|
|
177
181
|
id: string;
|
|
178
182
|
disabled: boolean;
|
|
179
183
|
name: string;
|
|
@@ -14,6 +14,7 @@ export declare const checkboxProps: {
|
|
|
14
14
|
*/
|
|
15
15
|
label: {
|
|
16
16
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
17
|
+
default: undefined;
|
|
17
18
|
};
|
|
18
19
|
/**
|
|
19
20
|
* @description Set indeterminate state, only responsible for style control
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { isBoolean, isNumber, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Checkbox from './checkbox.vue'\n\nexport type CheckboxValueType = string | number | boolean\n\nexport const checkboxProps = {\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, String, Boolean],\n default: undefined,\n },\n /**\n * @description value of the Checkbox when used inside a `checkbox-group`\n */\n label: {\n type: [String, Boolean, Number, Object],\n },\n /**\n * @description Set indeterminate state, only responsible for style control\n */\n indeterminate: Boolean,\n /**\n * @description whether the Checkbox is disabled\n */\n disabled: Boolean,\n /**\n * @description if the Checkbox is checked\n */\n checked: Boolean,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's checked\n */\n trueLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's not checked\n */\n falseLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as [aria-controls](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls), takes effect when `indeterminate` is `true`\n */\n controls: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to add a border around Checkbox\n */\n border: Boolean,\n /**\n * @description size of the Checkbox\n */\n size: useSizeProp,\n /**\n * @description input tabindex\n */\n tabindex: [String, Number],\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n}\n\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n change: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type CheckboxProps = ExtractPropTypes<typeof checkboxProps>\nexport type CheckboxEmits = typeof checkboxEmits\nexport type CheckboxInstance = InstanceType<typeof Checkbox>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,aAAa,GAAG;AAC7B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AAC3C,GAAG;AACH,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5B,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE;AACU,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACnE;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { isBoolean, isNumber, isString } from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Checkbox from './checkbox.vue'\n\nexport type CheckboxValueType = string | number | boolean\n\nexport const checkboxProps = {\n /**\n * @description binding value\n */\n modelValue: {\n type: [Number, String, Boolean],\n default: undefined,\n },\n /**\n * @description value of the Checkbox when used inside a `checkbox-group`\n */\n label: {\n type: [String, Boolean, Number, Object],\n default: undefined,\n },\n /**\n * @description Set indeterminate state, only responsible for style control\n */\n indeterminate: Boolean,\n /**\n * @description whether the Checkbox is disabled\n */\n disabled: Boolean,\n /**\n * @description if the Checkbox is checked\n */\n checked: Boolean,\n /**\n * @description native 'name' attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's checked\n */\n trueLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description value of the Checkbox if it's not checked\n */\n falseLabel: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description input id\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description same as [aria-controls](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls), takes effect when `indeterminate` is `true`\n */\n controls: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to add a border around Checkbox\n */\n border: Boolean,\n /**\n * @description size of the Checkbox\n */\n size: useSizeProp,\n /**\n * @description input tabindex\n */\n tabindex: [String, Number],\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n}\n\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n change: (val: CheckboxValueType) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\n\nexport type CheckboxProps = ExtractPropTypes<typeof checkboxProps>\nexport type CheckboxEmits = typeof checkboxEmits\nexport type CheckboxInstance = InstanceType<typeof Checkbox>\n"],"names":[],"mappings":";;;;;;;;AAGY,MAAC,aAAa,GAAG;AAC7B,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC;AAC3C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC5B,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE;AACU,MAAC,aAAa,GAAG;AAC7B,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACjF,EAAE,MAAM,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,GAAG,CAAC;AACnE;;;;"}
|
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
};
|
|
6
6
|
label: {
|
|
7
7
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
8
|
+
default: undefined;
|
|
8
9
|
};
|
|
9
10
|
indeterminate: BooleanConstructor;
|
|
10
11
|
disabled: BooleanConstructor;
|
|
@@ -49,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
50
|
};
|
|
50
51
|
label: {
|
|
51
52
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
53
|
+
default: undefined;
|
|
52
54
|
};
|
|
53
55
|
indeterminate: BooleanConstructor;
|
|
54
56
|
disabled: BooleanConstructor;
|
|
@@ -132,6 +134,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
134
|
};
|
|
133
135
|
label: {
|
|
134
136
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
137
|
+
default: undefined;
|
|
135
138
|
};
|
|
136
139
|
indeterminate: BooleanConstructor;
|
|
137
140
|
disabled: BooleanConstructor;
|
|
@@ -173,6 +176,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
176
|
"onUpdate:modelValue"?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
|
|
174
177
|
}, {
|
|
175
178
|
modelValue: string | number | boolean;
|
|
179
|
+
label: string | number | boolean | Record<string, any>;
|
|
176
180
|
id: string;
|
|
177
181
|
disabled: boolean;
|
|
178
182
|
name: string;
|
|
@@ -6,9 +6,8 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
|
6
6
|
import { useCheckbox } from './composables/use-checkbox.mjs';
|
|
7
7
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
8
|
|
|
9
|
-
const _hoisted_1 = ["tabindex", "
|
|
10
|
-
const _hoisted_2 = ["id", "
|
|
11
|
-
const _hoisted_3 = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"];
|
|
9
|
+
const _hoisted_1 = ["id", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value"];
|
|
10
|
+
const _hoisted_2 = ["id", "indeterminate", "disabled", "value", "name", "tabindex"];
|
|
12
11
|
const __default__ = defineComponent({
|
|
13
12
|
name: "ElCheckbox"
|
|
14
13
|
});
|
|
@@ -58,10 +57,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
57
|
}, {
|
|
59
58
|
default: withCtx(() => [
|
|
60
59
|
createElementVNode("span", {
|
|
61
|
-
class: normalizeClass(unref(spanKls))
|
|
62
|
-
tabindex: _ctx.indeterminate ? 0 : void 0,
|
|
63
|
-
role: _ctx.indeterminate ? "checkbox" : void 0,
|
|
64
|
-
"aria-checked": _ctx.indeterminate ? "mixed" : void 0
|
|
60
|
+
class: normalizeClass(unref(spanKls))
|
|
65
61
|
}, [
|
|
66
62
|
_ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
|
|
67
63
|
key: 0,
|
|
@@ -69,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
65
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
|
|
70
66
|
class: normalizeClass(unref(ns).e("original")),
|
|
71
67
|
type: "checkbox",
|
|
72
|
-
|
|
68
|
+
indeterminate: _ctx.indeterminate,
|
|
73
69
|
name: _ctx.name,
|
|
74
70
|
tabindex: _ctx.tabindex,
|
|
75
71
|
disabled: unref(isDisabled),
|
|
@@ -80,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
76
|
onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
|
|
81
77
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
82
78
|
}, ["stop"]))
|
|
83
|
-
}, null, 42,
|
|
79
|
+
}, null, 42, _hoisted_1)), [
|
|
84
80
|
[vModelCheckbox, unref(model)]
|
|
85
81
|
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
86
82
|
key: 1,
|
|
@@ -88,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
84
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(model) ? model.value = $event : null),
|
|
89
85
|
class: normalizeClass(unref(ns).e("original")),
|
|
90
86
|
type: "checkbox",
|
|
91
|
-
|
|
87
|
+
indeterminate: _ctx.indeterminate,
|
|
92
88
|
disabled: unref(isDisabled),
|
|
93
89
|
value: _ctx.label,
|
|
94
90
|
name: _ctx.name,
|
|
@@ -98,13 +94,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
94
|
onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false),
|
|
99
95
|
onClick: _cache[9] || (_cache[9] = withModifiers(() => {
|
|
100
96
|
}, ["stop"]))
|
|
101
|
-
}, null, 42,
|
|
97
|
+
}, null, 42, _hoisted_2)), [
|
|
102
98
|
[vModelCheckbox, unref(model)]
|
|
103
99
|
]),
|
|
104
100
|
createElementVNode("span", {
|
|
105
101
|
class: normalizeClass(unref(ns).e("inner"))
|
|
106
102
|
}, null, 2)
|
|
107
|
-
],
|
|
103
|
+
], 2),
|
|
108
104
|
unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
|
|
109
105
|
key: 0,
|
|
110
106
|
class: normalizeClass(unref(ns).e("label"))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox2.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span
|
|
1
|
+
{"version":3,"file":"checkbox2.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span :class=\"spanKls\">\n <input\n v-if=\"trueLabel || falseLabel\"\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :true-value=\"trueLabel\"\n :false-value=\"falseLabel\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <input\n v-else\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :disabled=\"isDisabled\"\n :value=\"label\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span v-if=\"hasOwnLabel\" :class=\"ns.e('label')\">\n <slot />\n <template v-if=\"!$slots.default\">{{ label }}</template>\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxEmits, checkboxProps } from './checkbox'\nimport { useCheckbox } from './composables'\n\ndefineOptions({\n name: 'ElCheckbox',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n model,\n handleChange,\n onClickRoot,\n} = useCheckbox(props, slots)\n\nconst ns = useNamespace('checkbox')\n\nconst compKls = computed(() => {\n return [\n ns.b(),\n ns.m(checkboxSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('bordered', props.border),\n ns.is('checked', isChecked.value),\n ]\n})\n\nconst spanKls = computed(() => {\n return [\n ns.e('input'),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('indeterminate', props.indeterminate),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAA,WAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAE5B,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,CAAE,CAAA,YAAA,CAAa,KAAK,CAAA;AAAA,QACvB,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,QAC9B,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,EAAA,CAAG,EAAE,OAAO,CAAA;AAAA,QACZ,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,QAChC,EAAG,CAAA,EAAA,CAAG,eAAiB,EAAA,KAAA,CAAM,aAAa,CAAA;AAAA,QAC1C,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAChC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, ref, computed, toRaw } from 'vue';
|
|
2
|
-
import { isEqual } from 'lodash-unified';
|
|
2
|
+
import { isEqual, isNil } from 'lodash-unified';
|
|
3
3
|
import '../../../form/index.mjs';
|
|
4
4
|
import '../../../../utils/index.mjs';
|
|
5
5
|
import { checkboxGroupContextKey } from '../constants.mjs';
|
|
@@ -37,7 +37,7 @@ const useCheckboxStatus = (props, slots, { model }) => {
|
|
|
37
37
|
return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
|
|
38
38
|
}));
|
|
39
39
|
const hasOwnLabel = computed(() => {
|
|
40
|
-
return !!
|
|
40
|
+
return !!slots.default || !isNil(props.label);
|
|
41
41
|
});
|
|
42
42
|
return {
|
|
43
43
|
checkboxButtonSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-checkbox-status.mjs","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!
|
|
1
|
+
{"version":3,"file":"use-checkbox-status.mjs","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual, isNil } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!slots.default || !isNil(props.label)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n }\n}\n\nexport type CheckboxStatus = ReturnType<typeof useCheckboxStatus>\n"],"names":[],"mappings":";;;;;;;;;AAKY,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC9D,EAAE,MAAM,aAAa,GAAG,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM;AACnC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAC9B,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAC1B,MAAM,OAAO,KAAK,CAAC;AACnB,KAAK,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;AAC/B,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACjC,QAAQ,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE,OAAO,MAAM;AACb,QAAQ,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACtD,OAAO;AACP,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE;AACnD,MAAM,OAAO,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;AACvC,KAAK,MAAM;AACX,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC;AACrB,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,kBAAkB,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM;AACxD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,EAAE;AACN,IAAI,IAAI,EAAE,IAAI;AACd,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM;AAClD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClD,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -47,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
"aria-controls": unref(scopedContentId),
|
|
48
48
|
"aria-describedby": unref(scopedContentId),
|
|
49
49
|
tabindex: _ctx.disabled ? -1 : 0,
|
|
50
|
+
type: "button",
|
|
50
51
|
onClick: _cache[0] || (_cache[0] = (...args) => unref(handleHeaderClick) && unref(handleHeaderClick)(...args)),
|
|
51
52
|
onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => unref(handleEnterClick) && unref(handleEnterClick)(...args), ["stop", "prevent"]), ["space", "enter"])),
|
|
52
53
|
onFocus: _cache[2] || (_cache[2] = (...args) => unref(handleFocus) && unref(handleFocus)(...args)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapse-item2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse-item.vue"],"sourcesContent":["<template>\n <div :class=\"rootKls\">\n <button\n :id=\"scopedHeadId\"\n :class=\"headKls\"\n :aria-expanded=\"isActive\"\n :aria-controls=\"scopedContentId\"\n :aria-describedby=\"scopedContentId\"\n :tabindex=\"disabled ? -1 : 0\"\n @click=\"handleHeaderClick\"\n @keydown.space.enter.stop.prevent=\"handleEnterClick\"\n @focus=\"handleFocus\"\n @blur=\"focusing = false\"\n >\n <slot name=\"title\">{{ title }}</slot>\n <el-icon :class=\"arrowKls\">\n <arrow-right />\n </el-icon>\n </button>\n\n <el-collapse-transition>\n <div\n v-show=\"isActive\"\n :id=\"scopedContentId\"\n role=\"region\"\n :class=\"itemWrapperKls\"\n :aria-hidden=\"!isActive\"\n :aria-labelledby=\"scopedHeadId\"\n >\n <div :class=\"itemContentKls\">\n <slot />\n </div>\n </div>\n </el-collapse-transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElIcon from '@element-plus/components/icon'\nimport { ArrowRight } from '@element-plus/icons-vue'\nimport { collapseItemProps } from './collapse-item'\nimport { useCollapseItem, useCollapseItemDOM } from './use-collapse-item'\n\ndefineOptions({\n name: 'ElCollapseItem',\n})\n\nconst props = defineProps(collapseItemProps)\nconst {\n focusing,\n id,\n isActive,\n handleFocus,\n handleHeaderClick,\n handleEnterClick,\n} = useCollapseItem(props)\n\nconst {\n arrowKls,\n headKls,\n rootKls,\n itemWrapperKls,\n itemContentKls,\n scopedContentId,\n scopedHeadId,\n} = useCollapseItemDOM(props, { focusing, isActive, id })\n\ndefineExpose({\n /** @description current collapse-item whether active */\n isActive,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"collapse-item2.mjs","sources":["../../../../../../packages/components/collapse/src/collapse-item.vue"],"sourcesContent":["<template>\n <div :class=\"rootKls\">\n <button\n :id=\"scopedHeadId\"\n :class=\"headKls\"\n :aria-expanded=\"isActive\"\n :aria-controls=\"scopedContentId\"\n :aria-describedby=\"scopedContentId\"\n :tabindex=\"disabled ? -1 : 0\"\n type=\"button\"\n @click=\"handleHeaderClick\"\n @keydown.space.enter.stop.prevent=\"handleEnterClick\"\n @focus=\"handleFocus\"\n @blur=\"focusing = false\"\n >\n <slot name=\"title\">{{ title }}</slot>\n <el-icon :class=\"arrowKls\">\n <arrow-right />\n </el-icon>\n </button>\n\n <el-collapse-transition>\n <div\n v-show=\"isActive\"\n :id=\"scopedContentId\"\n role=\"region\"\n :class=\"itemWrapperKls\"\n :aria-hidden=\"!isActive\"\n :aria-labelledby=\"scopedHeadId\"\n >\n <div :class=\"itemContentKls\">\n <slot />\n </div>\n </div>\n </el-collapse-transition>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElIcon from '@element-plus/components/icon'\nimport { ArrowRight } from '@element-plus/icons-vue'\nimport { collapseItemProps } from './collapse-item'\nimport { useCollapseItem, useCollapseItemDOM } from './use-collapse-item'\n\ndefineOptions({\n name: 'ElCollapseItem',\n})\n\nconst props = defineProps(collapseItemProps)\nconst {\n focusing,\n id,\n isActive,\n handleFocus,\n handleHeaderClick,\n handleEnterClick,\n} = useCollapseItem(props)\n\nconst {\n arrowKls,\n headKls,\n rootKls,\n itemWrapperKls,\n itemContentKls,\n scopedContentId,\n scopedHeadId,\n} = useCollapseItemDOM(props, { focusing, isActive, id })\n\ndefineExpose({\n /** @description current collapse-item whether active */\n isActive,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCA6Cc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,EAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA;AAAA,MACA,iBAAA;AAAA,MACA,gBAAA;AAAA,KAAA,GACE,gBAAgB,KAAK,CAAA,CAAA;AAEzB,IAAM,MAAA;AAAA,MACJ,QAAA;AAAA,MACA,OAAA;AAAA,MACA,OAAA;AAAA,MACA,cAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,YAAA;AAAA,KAAA,GACE,mBAAmB,KAAO,EAAA,EAAE,QAAU,EAAA,QAAA,EAAU,IAAI,CAAA,CAAA;AAExD,IAAa,MAAA,CAAA;AAAA,MAEX,QAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -46,9 +46,11 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
46
46
|
}>> & {
|
|
47
47
|
onChange?: ((val: string | null) => any) | undefined;
|
|
48
48
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
49
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
50
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
49
51
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
50
52
|
}>>;
|
|
51
|
-
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "activeChange", val: string | null) => void);
|
|
53
|
+
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "activeChange", val: string | null) => void);
|
|
52
54
|
t: import("../..").Translator;
|
|
53
55
|
ns: {
|
|
54
56
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -6644,6 +6646,12 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6644
6646
|
readonly disabled: boolean;
|
|
6645
6647
|
}>;
|
|
6646
6648
|
}> & {} & import("vue").ComponentCustomProperties) | undefined>;
|
|
6649
|
+
triggerRef: import("vue").Ref<any>;
|
|
6650
|
+
inputRef: import("vue").Ref<any>;
|
|
6651
|
+
isFocused: import("vue").Ref<boolean>;
|
|
6652
|
+
_handleFocus: (event: FocusEvent) => void;
|
|
6653
|
+
handleBlur: (event: FocusEvent) => void;
|
|
6654
|
+
handleFocus: (event: FocusEvent) => void;
|
|
6647
6655
|
shouldActiveChange: boolean;
|
|
6648
6656
|
color: import("./src/utils/color").default;
|
|
6649
6657
|
showPicker: import("vue").Ref<boolean>;
|
|
@@ -6656,7 +6664,7 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6656
6664
|
btnKls: import("vue").ComputedRef<string[]>;
|
|
6657
6665
|
displayedRgb: (color: import("./src/utils/color").default, showAlpha: boolean) => string;
|
|
6658
6666
|
setShowPicker: (value: boolean) => void;
|
|
6659
|
-
debounceSetShowPicker: import("lodash").
|
|
6667
|
+
debounceSetShowPicker: import("lodash").DebouncedFuncLeading<(value: boolean) => void>;
|
|
6660
6668
|
show: () => void;
|
|
6661
6669
|
hide: () => void;
|
|
6662
6670
|
resetColor: () => void;
|
|
@@ -6664,6 +6672,11 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
6664
6672
|
handleConfirm: () => void;
|
|
6665
6673
|
confirmValue: () => void;
|
|
6666
6674
|
clear: () => void;
|
|
6675
|
+
handleClickOutside: (event: Event) => void;
|
|
6676
|
+
handleEsc: (event: KeyboardEvent) => void;
|
|
6677
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
6678
|
+
focus: () => void;
|
|
6679
|
+
blur: () => void;
|
|
6667
6680
|
ElButton: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
6668
6681
|
readonly size: {
|
|
6669
6682
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -10834,6 +10847,8 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
10834
10847
|
"update:modelValue": (val: string | null) => boolean;
|
|
10835
10848
|
change: (val: string | null) => boolean;
|
|
10836
10849
|
activeChange: (val: string | null) => boolean;
|
|
10850
|
+
focus: (event: FocusEvent) => boolean;
|
|
10851
|
+
blur: (event: FocusEvent) => boolean;
|
|
10837
10852
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10838
10853
|
readonly modelValue: StringConstructor;
|
|
10839
10854
|
readonly id: StringConstructor;
|
|
@@ -10859,6 +10874,8 @@ export declare const ElColorPicker: import("element-plus/es/utils").SFCWithInsta
|
|
|
10859
10874
|
}>> & {
|
|
10860
10875
|
onChange?: ((val: string | null) => any) | undefined;
|
|
10861
10876
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
10877
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
10878
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
10862
10879
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
10863
10880
|
}, {
|
|
10864
10881
|
readonly popperClass: string;
|
|
@@ -27,6 +27,8 @@ export declare const colorPickerEmits: {
|
|
|
27
27
|
"update:modelValue": (val: string | null) => boolean;
|
|
28
28
|
change: (val: string | null) => boolean;
|
|
29
29
|
activeChange: (val: string | null) => boolean;
|
|
30
|
+
focus: (event: FocusEvent) => boolean;
|
|
31
|
+
blur: (event: FocusEvent) => boolean;
|
|
30
32
|
};
|
|
31
33
|
export declare type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>;
|
|
32
34
|
export declare type ColorPickerEmits = typeof colorPickerEmits;
|
|
@@ -37,7 +37,9 @@ const colorPickerProps = buildProps({
|
|
|
37
37
|
const colorPickerEmits = {
|
|
38
38
|
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
|
|
39
39
|
[CHANGE_EVENT]: (val) => isString(val) || isNil(val),
|
|
40
|
-
activeChange: (val) => isString(val) || isNil(val)
|
|
40
|
+
activeChange: (val) => isString(val) || isNil(val),
|
|
41
|
+
focus: (event) => event instanceof FocusEvent,
|
|
42
|
+
blur: (event) => event instanceof FocusEvent
|
|
41
43
|
};
|
|
42
44
|
const colorPickerContextKey = Symbol("colorPickerContextKey");
|
|
43
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.mjs","sources":["../../../../../../packages/components/color-picker/src/color-picker.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n}\n\nexport type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType<typeof ColorPicker>\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef<string>\n}\n\nexport const colorPickerContextKey: InjectionKey<ColorPickerContext> = Symbol(\n 'colorPickerContextKey'\n)\n"],"names":[],"mappings":";;;;;;;;;AAIY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AAC5D,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACtD,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACpD,EAAE;AACU,MAAC,qBAAqB,GAAG,MAAM,CAAC,uBAAuB;;;;"}
|
|
1
|
+
{"version":3,"file":"color-picker.mjs","sources":["../../../../../../packages/components/color-picker/src/color-picker.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n focus: (event: FocusEvent) => event instanceof FocusEvent,\n blur: (event: FocusEvent) => event instanceof FocusEvent,\n}\n\nexport type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType<typeof ColorPicker>\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef<string>\n}\n\nexport const colorPickerContextKey: InjectionKey<ColorPickerContext> = Symbol(\n 'colorPickerContextKey'\n)\n"],"names":[],"mappings":";;;;;;;;;AAIY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AAC5D,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACtD,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACpD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,YAAY,UAAU;AAC/C,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,KAAK,YAAY,UAAU;AAC9C,EAAE;AACU,MAAC,qBAAqB,GAAG,MAAM,CAAC,uBAAuB;;;;"}
|
|
@@ -48,9 +48,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
}>> & {
|
|
49
49
|
onChange?: ((val: string | null) => any) | undefined;
|
|
50
50
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
51
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
52
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
51
53
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
52
54
|
}>>;
|
|
53
|
-
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "activeChange", val: string | null) => void);
|
|
55
|
+
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "activeChange", val: string | null) => void);
|
|
54
56
|
t: import("element-plus/es/hooks").Translator;
|
|
55
57
|
ns: {
|
|
56
58
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -6646,6 +6648,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6646
6648
|
readonly disabled: boolean;
|
|
6647
6649
|
}>;
|
|
6648
6650
|
}> & {} & import("vue").ComponentCustomProperties) | undefined>;
|
|
6651
|
+
triggerRef: import("vue").Ref<any>;
|
|
6652
|
+
inputRef: import("vue").Ref<any>;
|
|
6653
|
+
isFocused: import("vue").Ref<boolean>;
|
|
6654
|
+
_handleFocus: (event: FocusEvent) => void;
|
|
6655
|
+
handleBlur: (event: FocusEvent) => void;
|
|
6656
|
+
handleFocus: (event: FocusEvent) => void;
|
|
6649
6657
|
shouldActiveChange: boolean;
|
|
6650
6658
|
color: Color;
|
|
6651
6659
|
showPicker: import("vue").Ref<boolean>;
|
|
@@ -6658,7 +6666,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6658
6666
|
btnKls: import("vue").ComputedRef<string[]>;
|
|
6659
6667
|
displayedRgb: (color: Color, showAlpha: boolean) => string;
|
|
6660
6668
|
setShowPicker: (value: boolean) => void;
|
|
6661
|
-
debounceSetShowPicker: import("lodash").
|
|
6669
|
+
debounceSetShowPicker: import("lodash").DebouncedFuncLeading<(value: boolean) => void>;
|
|
6662
6670
|
show: () => void;
|
|
6663
6671
|
hide: () => void;
|
|
6664
6672
|
resetColor: () => void;
|
|
@@ -6666,6 +6674,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6666
6674
|
handleConfirm: () => void;
|
|
6667
6675
|
confirmValue: () => void;
|
|
6668
6676
|
clear: () => void;
|
|
6677
|
+
handleClickOutside: (event: Event) => void;
|
|
6678
|
+
handleEsc: (event: KeyboardEvent) => void;
|
|
6679
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
6680
|
+
focus: () => void;
|
|
6681
|
+
blur: () => void;
|
|
6669
6682
|
ElButton: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
6670
6683
|
readonly size: {
|
|
6671
6684
|
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -10836,6 +10849,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10836
10849
|
"update:modelValue": (val: string | null) => boolean;
|
|
10837
10850
|
change: (val: string | null) => boolean;
|
|
10838
10851
|
activeChange: (val: string | null) => boolean;
|
|
10852
|
+
focus: (event: FocusEvent) => boolean;
|
|
10853
|
+
blur: (event: FocusEvent) => boolean;
|
|
10839
10854
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10840
10855
|
readonly modelValue: StringConstructor;
|
|
10841
10856
|
readonly id: StringConstructor;
|
|
@@ -10861,6 +10876,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10861
10876
|
}>> & {
|
|
10862
10877
|
onChange?: ((val: string | null) => any) | undefined;
|
|
10863
10878
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
10879
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
10880
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
10864
10881
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
10865
10882
|
}, {
|
|
10866
10883
|
readonly popperClass: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, computed, nextTick, onMounted, watch, provide, openBlock, createBlock, unref, withCtx, withDirectives, createElementBlock, createElementVNode, normalizeClass, createVNode, createCommentVNode,
|
|
1
|
+
import { defineComponent, ref, reactive, computed, nextTick, onMounted, watch, provide, openBlock, createBlock, unref, withCtx, withDirectives, createElementBlock, withKeys, createElementVNode, normalizeClass, createVNode, createCommentVNode, createTextVNode, toDisplayString, normalizeStyle, vShow } from 'vue';
|
|
2
2
|
import { debounce } from 'lodash-unified';
|
|
3
3
|
import { ElButton } from '../../button/index.mjs';
|
|
4
4
|
import { ElIcon } from '../../icon/index.mjs';
|
|
@@ -21,11 +21,14 @@ import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
|
21
21
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
22
22
|
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
23
23
|
import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
24
|
+
import { useFocusController } from '../../../hooks/use-focus-controller/index.mjs';
|
|
24
25
|
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
25
26
|
import { debugWarn } from '../../../utils/error.mjs';
|
|
27
|
+
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
26
28
|
import ClickOutside from '../../../directives/click-outside/index.mjs';
|
|
27
29
|
|
|
28
|
-
const _hoisted_1 = ["
|
|
30
|
+
const _hoisted_1 = ["onKeydown"];
|
|
31
|
+
const _hoisted_2 = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"];
|
|
29
32
|
const __default__ = defineComponent({
|
|
30
33
|
name: "ElColorPicker"
|
|
31
34
|
});
|
|
@@ -47,6 +50,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
50
|
const sv = ref();
|
|
48
51
|
const alpha = ref();
|
|
49
52
|
const popper = ref();
|
|
53
|
+
const triggerRef = ref();
|
|
54
|
+
const inputRef = ref();
|
|
55
|
+
const {
|
|
56
|
+
isFocused,
|
|
57
|
+
handleFocus: _handleFocus,
|
|
58
|
+
handleBlur
|
|
59
|
+
} = useFocusController(triggerRef, {
|
|
60
|
+
beforeBlur(event) {
|
|
61
|
+
var _a;
|
|
62
|
+
return (_a = popper.value) == null ? void 0 : _a.isFocusInsideContent(event);
|
|
63
|
+
},
|
|
64
|
+
afterBlur() {
|
|
65
|
+
setShowPicker(false);
|
|
66
|
+
resetColor();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const handleFocus = (event) => {
|
|
70
|
+
if (colorDisabled.value)
|
|
71
|
+
return blur();
|
|
72
|
+
_handleFocus(event);
|
|
73
|
+
};
|
|
50
74
|
let shouldActiveChange = true;
|
|
51
75
|
const color = reactive(new Color({
|
|
52
76
|
enableAlpha: props.showAlpha,
|
|
@@ -75,7 +99,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
99
|
return [
|
|
76
100
|
ns.b("picker"),
|
|
77
101
|
ns.is("disabled", colorDisabled.value),
|
|
78
|
-
ns.bm("picker", colorSize.value)
|
|
102
|
+
ns.bm("picker", colorSize.value),
|
|
103
|
+
ns.is("focused", isFocused.value)
|
|
79
104
|
];
|
|
80
105
|
});
|
|
81
106
|
function displayedRgb(color2, showAlpha) {
|
|
@@ -88,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
113
|
function setShowPicker(value) {
|
|
89
114
|
showPicker.value = value;
|
|
90
115
|
}
|
|
91
|
-
const debounceSetShowPicker = debounce(setShowPicker, 100);
|
|
116
|
+
const debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true });
|
|
92
117
|
function show() {
|
|
93
118
|
if (colorDisabled.value)
|
|
94
119
|
return;
|
|
@@ -146,6 +171,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
171
|
}
|
|
147
172
|
resetColor();
|
|
148
173
|
}
|
|
174
|
+
function handleClickOutside(event) {
|
|
175
|
+
if (!showPicker.value)
|
|
176
|
+
return;
|
|
177
|
+
hide();
|
|
178
|
+
if (isFocused.value) {
|
|
179
|
+
const _event = new FocusEvent("focus", event);
|
|
180
|
+
handleBlur(_event);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function handleEsc(event) {
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
event.stopPropagation();
|
|
186
|
+
setShowPicker(false);
|
|
187
|
+
resetColor();
|
|
188
|
+
}
|
|
189
|
+
function handleKeyDown(event) {
|
|
190
|
+
switch (event.code) {
|
|
191
|
+
case EVENT_CODE.enter:
|
|
192
|
+
case EVENT_CODE.space:
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
event.stopPropagation();
|
|
195
|
+
show();
|
|
196
|
+
inputRef.value.focus();
|
|
197
|
+
break;
|
|
198
|
+
case EVENT_CODE.esc:
|
|
199
|
+
handleEsc(event);
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function focus() {
|
|
204
|
+
triggerRef.value.focus();
|
|
205
|
+
}
|
|
206
|
+
function blur() {
|
|
207
|
+
triggerRef.value.blur();
|
|
208
|
+
}
|
|
149
209
|
onMounted(() => {
|
|
150
210
|
if (props.modelValue) {
|
|
151
211
|
customInput.value = currentColor.value;
|
|
@@ -183,7 +243,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
183
243
|
expose({
|
|
184
244
|
color,
|
|
185
245
|
show,
|
|
186
|
-
hide
|
|
246
|
+
hide,
|
|
247
|
+
focus,
|
|
248
|
+
blur
|
|
187
249
|
});
|
|
188
250
|
return (_ctx, _cache) => {
|
|
189
251
|
return openBlock(), createBlock(unref(ElTooltip), {
|
|
@@ -199,10 +261,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
199
261
|
effect: "light",
|
|
200
262
|
trigger: "click",
|
|
201
263
|
transition: `${unref(ns).namespace.value}-zoom-in-top`,
|
|
202
|
-
persistent: ""
|
|
264
|
+
persistent: "",
|
|
265
|
+
onHide: _cache[2] || (_cache[2] = ($event) => setShowPicker(false))
|
|
203
266
|
}, {
|
|
204
267
|
content: withCtx(() => [
|
|
205
|
-
withDirectives((openBlock(), createElementBlock("div",
|
|
268
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
269
|
+
onKeydown: withKeys(handleEsc, ["esc"])
|
|
270
|
+
}, [
|
|
206
271
|
createElementVNode("div", {
|
|
207
272
|
class: normalizeClass(unref(ns).be("dropdown", "main-wrapper"))
|
|
208
273
|
}, [
|
|
@@ -238,6 +303,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
238
303
|
class: normalizeClass(unref(ns).be("dropdown", "value"))
|
|
239
304
|
}, [
|
|
240
305
|
createVNode(unref(ElInput), {
|
|
306
|
+
ref_key: "inputRef",
|
|
307
|
+
ref: inputRef,
|
|
241
308
|
modelValue: customInput.value,
|
|
242
309
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
|
|
243
310
|
"validate-event": false,
|
|
@@ -269,20 +336,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
269
336
|
_: 1
|
|
270
337
|
}, 8, ["class"])
|
|
271
338
|
], 2)
|
|
272
|
-
])), [
|
|
273
|
-
[unref(ClickOutside),
|
|
339
|
+
], 40, _hoisted_1)), [
|
|
340
|
+
[unref(ClickOutside), handleClickOutside]
|
|
274
341
|
])
|
|
275
342
|
]),
|
|
276
343
|
default: withCtx(() => [
|
|
277
344
|
createElementVNode("div", {
|
|
278
345
|
id: unref(buttonId),
|
|
346
|
+
ref_key: "triggerRef",
|
|
347
|
+
ref: triggerRef,
|
|
279
348
|
class: normalizeClass(unref(btnKls)),
|
|
280
349
|
role: "button",
|
|
281
350
|
"aria-label": unref(buttonAriaLabel),
|
|
282
351
|
"aria-labelledby": unref(buttonAriaLabelledby),
|
|
283
352
|
"aria-description": unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }),
|
|
284
|
-
|
|
285
|
-
|
|
353
|
+
"aria-disabled": unref(colorDisabled),
|
|
354
|
+
tabindex: unref(colorDisabled) ? -1 : _ctx.tabindex,
|
|
355
|
+
onKeydown: handleKeyDown,
|
|
356
|
+
onFocus: handleFocus,
|
|
357
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args))
|
|
286
358
|
}, [
|
|
287
359
|
unref(colorDisabled) ? (openBlock(), createElementBlock("div", {
|
|
288
360
|
key: 0,
|
|
@@ -324,7 +396,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
396
|
], 6)
|
|
325
397
|
], 2)
|
|
326
398
|
], 2)
|
|
327
|
-
], 42,
|
|
399
|
+
], 42, _hoisted_2)
|
|
328
400
|
]),
|
|
329
401
|
_: 1
|
|
330
402
|
}, 8, ["visible", "popper-class", "transition"]);
|