element-plus 2.1.8 → 2.1.11
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/README.md +10 -11
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +1231 -2350
- package/dist/index.full.min.js +11 -17
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -17
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +1228 -2349
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.js.map +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.min.mjs.map +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.js.map +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.min.mjs.map +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.js.map +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.min.mjs.map +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.js.map +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.min.mjs.map +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.js.map +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.min.mjs.map +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.js.map +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.min.mjs.map +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.js.map +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.min.mjs.map +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.js.map +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.min.mjs.map +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.js.map +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.min.mjs.map +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.js.map +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.min.mjs.map +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.js.map +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.min.mjs.map +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.js.map +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.min.mjs.map +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.js.map +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.min.mjs.map +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.js.map +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.min.mjs.map +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.js.map +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.min.mjs.map +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.js.map +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.min.mjs.map +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.js.map +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.min.mjs.map +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.js.map +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.min.mjs.map +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.js.map +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.min.mjs.map +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.js.map +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.min.mjs.map +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.js.map +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.min.mjs.map +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.js.map +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.min.mjs.map +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.js.map +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.min.mjs.map +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.js.map +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.min.mjs.map +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.js.map +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.min.mjs.map +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.js.map +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.min.mjs.map +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.js.map +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.min.mjs.map +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.js.map +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.min.mjs.map +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.js.map +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.min.mjs.map +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.js.map +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.min.mjs.map +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.js.map +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.min.mjs.map +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.js.map +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.min.mjs.map +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.js.map +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.min.mjs.map +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.js.map +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.min.mjs.map +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.js.map +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.min.mjs.map +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.js.map +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.min.mjs.map +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.js.map +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.min.mjs.map +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.js.map +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.min.mjs.map +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.js.map +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.min.mjs.map +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.js.map +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.min.mjs.map +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.js.map +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.min.mjs.map +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.js.map +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.min.mjs.map +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.js.map +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.min.mjs.map +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.js.map +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.min.mjs.map +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.js.map +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.min.mjs.map +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.js.map +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.min.mjs.map +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.js.map +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.min.mjs.map +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.d.ts +4 -4
- package/es/components/alert/src/alert.d.ts +1 -1
- package/es/components/alert/src/alert.vue.d.ts +4 -4
- package/es/components/autocomplete/index.d.ts +29 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +29 -1
- package/es/components/avatar/src/avatar2.mjs +1 -1
- package/es/components/button/index.d.ts +4 -0
- package/es/components/button/src/button-custom.d.ts +4 -0
- package/es/components/button/src/button-custom.mjs +60 -0
- package/es/components/button/src/button-custom.mjs.map +1 -0
- package/es/components/button/src/button.d.ts +1 -0
- package/es/components/button/src/button.mjs +1 -0
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button.vue.d.ts +4 -0
- package/es/components/button/src/button2.mjs +2 -37
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/index.d.ts +4 -0
- package/es/components/calendar/src/calendar.vue.d.ts +4 -0
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +3 -2
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +38 -2
- package/es/components/cascader/src/index.vue.d.ts +19 -1
- package/es/components/col/src/col.d.ts +2 -0
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/color-picker/src/index.mjs +4 -1
- package/es/components/color-picker/src/index.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs +2 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-cell.mjs +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +1 -1
- package/es/components/empty/src/img-empty.mjs +7 -17
- package/es/components/empty/src/img-empty.mjs.map +1 -1
- package/es/components/form/index.d.ts +4 -6
- package/es/components/form/src/form-item.vue.d.ts +2 -3
- package/es/components/form/src/form-item2.mjs +23 -23
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form-label-wrap.mjs +6 -6
- package/es/components/form/src/form-label-wrap.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +1 -1
- package/es/components/image/index.d.ts +12 -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 +12 -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 +4 -0
- package/es/components/image-viewer/src/image-viewer.d.ts +1 -0
- package/es/components/image-viewer/src/image-viewer.mjs +4 -0
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +4 -0
- package/es/components/image-viewer/src/image-viewer2.mjs +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/input/index.d.ts +10 -0
- package/es/components/input/src/input.d.ts +2 -0
- package/es/components/input/src/input.mjs +6 -0
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input.vue.d.ts +10 -0
- package/es/components/input/src/input2.mjs +119 -102
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.d.ts +20 -0
- package/es/components/input-number/src/input-number.vue.d.ts +20 -0
- package/es/components/loading/src/loading.mjs +3 -1
- package/es/components/loading/src/loading.mjs.map +1 -1
- package/es/components/loading/src/service.mjs +1 -2
- package/es/components/loading/src/service.mjs.map +1 -1
- package/es/components/menu/index.d.ts +84 -0
- package/es/components/menu/src/menu-collapse-transition.mjs +10 -7
- package/es/components/menu/src/menu-collapse-transition.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group.vue.d.ts +14 -0
- package/es/components/menu/src/menu-item-group2.mjs +12 -7
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/menu/src/menu-item.vue.d.ts +28 -0
- package/es/components/menu/src/menu-item2.mjs +15 -7
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/menu/src/menu.mjs +10 -6
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.mjs +17 -14
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/menu/src/utils/menu-bar.d.ts +2 -2
- package/es/components/menu/src/utils/menu-bar.mjs +4 -4
- package/es/components/menu/src/utils/menu-bar.mjs.map +1 -1
- package/es/components/menu/src/utils/menu-item.d.ts +2 -2
- package/es/components/menu/src/utils/menu-item.mjs +4 -4
- package/es/components/menu/src/utils/menu-item.mjs.map +1 -1
- package/es/components/message-box/src/index.mjs +56 -47
- package/es/components/message-box/src/index.mjs.map +1 -1
- package/es/components/message-box/src/index.vue.d.ts +17 -1
- package/es/components/popover/src/index.mjs +1 -0
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popper/src/content.vue.d.ts +1 -1
- package/es/components/popper/src/content2.mjs +3 -3
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +1 -1
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +3 -2
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/scrollbar/src/thumb.vue.d.ts +16 -16
- package/es/components/scrollbar/src/util.d.ts +18 -18
- package/es/components/scrollbar/src/util.mjs.map +1 -1
- package/es/components/select/src/select.mjs +9 -21
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +3 -3
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/table/src/store/current.mjs +1 -0
- package/es/components/table/src/store/current.mjs.map +1 -1
- package/es/components/table/src/table/defaults.d.ts +1 -1
- package/es/components/table/src/table/defaults.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.mjs +1 -4
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/watcher-helper.mjs +8 -8
- package/es/components/table/src/table-column/watcher-helper.mjs.map +1 -1
- package/es/components/table-v2/index.d.ts +4 -0
- package/es/components/table-v2/index.mjs +4 -0
- package/es/components/table-v2/index.mjs.map +1 -0
- package/es/components/table-v2/src/cell.d.ts +11 -0
- package/es/components/table-v2/src/cell.mjs +22 -0
- package/es/components/table-v2/src/cell.mjs.map +1 -0
- package/es/components/table-v2/src/column.d.ts +19 -0
- package/es/components/table-v2/src/column.mjs +41 -0
- package/es/components/table-v2/src/column.mjs.map +1 -0
- package/es/components/table-v2/src/common.d.ts +42 -0
- package/es/components/table-v2/src/common.mjs +38 -0
- package/es/components/table-v2/src/common.mjs.map +1 -0
- package/es/components/table-v2/src/components/cell.d.ts +4 -0
- package/es/components/table-v2/src/components/cell.mjs +22 -0
- package/es/components/table-v2/src/components/cell.mjs.map +1 -0
- package/es/components/table-v2/src/components/expand-icon.d.ts +11 -0
- package/es/components/table-v2/src/components/expand-icon.mjs +26 -0
- package/es/components/table-v2/src/components/expand-icon.mjs.map +1 -0
- package/es/components/table-v2/src/components/header-cell.d.ts +4 -0
- package/es/components/table-v2/src/components/header-cell.mjs +15 -0
- package/es/components/table-v2/src/components/header-cell.mjs.map +1 -0
- package/es/components/table-v2/src/components/header-row.d.ts +27 -0
- package/es/components/table-v2/src/components/header-row.mjs +40 -0
- package/es/components/table-v2/src/components/header-row.mjs.map +1 -0
- package/es/components/table-v2/src/components/header.d.ts +44 -0
- package/es/components/table-v2/src/components/header.mjs +96 -0
- package/es/components/table-v2/src/components/header.mjs.map +1 -0
- package/es/components/table-v2/src/components/index.d.ts +10 -0
- package/es/components/table-v2/src/components/index.mjs +8 -0
- package/es/components/table-v2/src/components/index.mjs.map +1 -0
- package/es/components/table-v2/src/components/row.d.ts +68 -0
- package/es/components/table-v2/src/components/row.mjs +204 -0
- package/es/components/table-v2/src/components/row.mjs.map +1 -0
- package/es/components/table-v2/src/components/sort-icon.d.ts +8 -0
- package/es/components/table-v2/src/components/sort-icon.mjs +19 -0
- package/es/components/table-v2/src/components/sort-icon.mjs.map +1 -0
- package/es/components/table-v2/src/composables/index.d.ts +5 -0
- package/es/components/table-v2/src/composables/index.mjs +6 -0
- package/es/components/table-v2/src/composables/index.mjs.map +1 -0
- package/es/components/table-v2/src/composables/use-columns.d.ts +20 -0
- package/es/components/table-v2/src/composables/use-columns.mjs +88 -0
- package/es/components/table-v2/src/composables/use-columns.mjs.map +1 -0
- package/es/components/table-v2/src/composables/use-data.d.ts +17 -0
- package/es/components/table-v2/src/composables/use-data.mjs +44 -0
- package/es/components/table-v2/src/composables/use-data.mjs.map +1 -0
- package/es/components/table-v2/src/composables/use-row.d.ts +32 -0
- package/es/components/table-v2/src/composables/use-row.mjs +123 -0
- package/es/components/table-v2/src/composables/use-row.mjs.map +1 -0
- package/es/components/table-v2/src/composables/use-scrollbar.d.ts +26 -0
- package/es/components/table-v2/src/composables/use-scrollbar.mjs +55 -0
- package/es/components/table-v2/src/composables/use-scrollbar.mjs.map +1 -0
- package/es/components/table-v2/src/composables/use-styles.d.ts +25 -0
- package/es/components/table-v2/src/composables/use-styles.mjs +87 -0
- package/es/components/table-v2/src/composables/use-styles.mjs.map +1 -0
- package/es/components/table-v2/src/composables/utils.d.ts +3 -0
- package/es/components/table-v2/src/composables/utils.mjs +26 -0
- package/es/components/table-v2/src/composables/utils.mjs.map +1 -0
- package/es/components/table-v2/src/constants.d.ts +17 -0
- package/es/components/table-v2/src/constants.mjs +23 -0
- package/es/components/table-v2/src/constants.mjs.map +1 -0
- package/es/components/table-v2/src/grid.d.ts +39 -0
- package/es/components/table-v2/src/grid.mjs +42 -0
- package/es/components/table-v2/src/grid.mjs.map +1 -0
- package/es/components/table-v2/src/header-cell.d.ts +7 -0
- package/es/components/table-v2/src/header-cell.mjs +12 -0
- package/es/components/table-v2/src/header-cell.mjs.map +1 -0
- package/es/components/table-v2/src/header-row.d.ts +8 -0
- package/es/components/table-v2/src/header-row.mjs +13 -0
- package/es/components/table-v2/src/header-row.mjs.map +1 -0
- package/es/components/table-v2/src/header.d.ts +13 -0
- package/es/components/table-v2/src/header.mjs +33 -0
- package/es/components/table-v2/src/header.mjs.map +1 -0
- package/es/components/table-v2/src/private.d.ts +1 -0
- package/es/components/table-v2/src/private.mjs +4 -0
- package/es/components/table-v2/src/private.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/cell.d.ts +10 -0
- package/es/components/table-v2/src/renderers/cell.mjs +91 -0
- package/es/components/table-v2/src/renderers/cell.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/empty.d.ts +7 -0
- package/es/components/table-v2/src/renderers/empty.mjs +15 -0
- package/es/components/table-v2/src/renderers/empty.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/footer.d.ts +7 -0
- package/es/components/table-v2/src/renderers/footer.mjs +15 -0
- package/es/components/table-v2/src/renderers/footer.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/header-cell.d.ts +10 -0
- package/es/components/table-v2/src/renderers/header-cell.mjs +65 -0
- package/es/components/table-v2/src/renderers/header-cell.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/header.d.ts +9 -0
- package/es/components/table-v2/src/renderers/header.mjs +39 -0
- package/es/components/table-v2/src/renderers/header.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/left-table.d.ts +8 -0
- package/es/components/table-v2/src/renderers/left-table.mjs +24 -0
- package/es/components/table-v2/src/renderers/left-table.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/main-table.d.ts +8 -0
- package/es/components/table-v2/src/renderers/main-table.mjs +22 -0
- package/es/components/table-v2/src/renderers/main-table.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/overlay.d.ts +3 -0
- package/es/components/table-v2/src/renderers/overlay.mjs +15 -0
- package/es/components/table-v2/src/renderers/overlay.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/right-table.d.ts +8 -0
- package/es/components/table-v2/src/renderers/right-table.mjs +24 -0
- package/es/components/table-v2/src/renderers/right-table.mjs.map +1 -0
- package/es/components/table-v2/src/renderers/row.d.ts +10 -0
- package/es/components/table-v2/src/renderers/row.mjs +77 -0
- package/es/components/table-v2/src/renderers/row.mjs.map +1 -0
- package/es/components/table-v2/src/row.d.ts +54 -0
- package/es/components/table-v2/src/row.mjs +44 -0
- package/es/components/table-v2/src/row.mjs.map +1 -0
- package/es/components/table-v2/src/table-grid.d.ts +104 -0
- package/es/components/table-v2/src/table-grid.mjs +221 -0
- package/es/components/table-v2/src/table-grid.mjs.map +1 -0
- package/es/components/table-v2/src/table-v2.d.ts +142 -0
- package/es/components/table-v2/src/table-v2.mjs +250 -0
- package/es/components/table-v2/src/table-v2.mjs.map +1 -0
- package/es/components/table-v2/src/table.d.ts +91 -0
- package/es/components/table-v2/src/table.mjs +106 -0
- package/es/components/table-v2/src/table.mjs.map +1 -0
- package/es/components/table-v2/src/tokens.d.ts +10 -0
- package/es/components/table-v2/src/tokens.mjs +4 -0
- package/es/components/table-v2/src/tokens.mjs.map +1 -0
- package/es/components/table-v2/src/types.d.ts +88 -0
- package/es/components/table-v2/src/types.mjs +2 -0
- package/es/components/table-v2/src/types.mjs.map +1 -0
- package/es/components/table-v2/src/use-table.d.ts +49 -0
- package/es/components/table-v2/src/use-table.mjs +150 -0
- package/es/components/table-v2/src/use-table.mjs.map +1 -0
- package/es/components/table-v2/src/utils.d.ts +7 -0
- package/es/components/table-v2/src/utils.mjs +23 -0
- package/es/components/table-v2/src/utils.mjs.map +1 -0
- package/es/components/tag/index.d.ts +4 -4
- package/es/components/tag/src/tag.d.ts +1 -1
- package/es/components/tag/src/tag.vue.d.ts +4 -4
- package/es/components/time-select/index.d.ts +28 -0
- package/es/components/time-select/src/time-select.mjs +7 -3
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select.vue.d.ts +14 -0
- package/es/components/tooltip/src/content.vue.d.ts +2 -2
- package/es/components/tree-select/src/tree-select.mjs +1 -0
- package/es/components/tree-select/src/tree-select.mjs.map +1 -1
- package/es/components/tree-select/src/tree.mjs +16 -3
- package/es/components/tree-select/src/tree.mjs.map +1 -1
- package/es/components/tree-select/style/css.d.ts +1 -1
- package/es/components/tree-select/style/css.mjs +1 -1
- package/es/components/upload/index.d.ts +16 -12
- package/es/components/upload/src/upload-content.d.ts +1 -1
- package/es/components/upload/src/upload-content.vue.d.ts +4 -3
- package/es/components/upload/src/upload-content2.mjs +3 -1
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +5 -3
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload.d.ts +2 -2
- package/es/components/upload/src/upload.mjs +1 -1
- package/es/components/upload/src/upload.mjs.map +1 -1
- package/es/components/upload/src/upload.vue.d.ts +16 -12
- package/es/components/virtual-list/index.d.ts +3 -1
- package/es/components/virtual-list/index.mjs +1 -1
- package/es/components/virtual-list/src/builders/build-grid.d.ts +45 -6
- package/es/components/virtual-list/src/builders/build-grid.mjs +54 -13
- package/es/components/virtual-list/src/builders/build-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +16 -2
- package/es/components/virtual-list/src/builders/build-list.mjs +7 -5
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-grid.d.ts +38 -5
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs +35 -3
- package/es/components/virtual-list/src/components/dynamic-size-grid.mjs.map +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +16 -2
- package/es/components/virtual-list/src/components/fixed-size-grid.d.ts +24 -3
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +16 -2
- package/es/components/virtual-list/src/components/scrollbar.d.ts +14 -0
- package/es/components/virtual-list/src/components/scrollbar.mjs +27 -28
- package/es/components/virtual-list/src/components/scrollbar.mjs.map +1 -1
- package/es/components/virtual-list/src/defaults.d.ts +1 -1
- package/es/components/virtual-list/src/defaults.mjs +1 -1
- package/es/components/virtual-list/src/defaults.mjs.map +1 -1
- package/es/components/virtual-list/src/hooks/use-grid-wheel.mjs +7 -2
- package/es/components/virtual-list/src/hooks/use-grid-wheel.mjs.map +1 -1
- package/es/components/virtual-list/src/props.d.ts +14 -1
- package/es/components/virtual-list/src/props.mjs +19 -0
- package/es/components/virtual-list/src/props.mjs.map +1 -1
- package/es/components/virtual-list/src/types.d.ts +33 -0
- package/es/components/virtual-list/src/utils.d.ts +10 -5
- package/es/components/virtual-list/src/utils.mjs.map +1 -1
- package/es/constants/index.mjs +1 -1
- package/es/constants/size.d.ts +5 -0
- package/es/constants/size.mjs +6 -1
- package/es/constants/size.mjs.map +1 -1
- package/es/directives/mousewheel/index.mjs +1 -7
- package/es/directives/mousewheel/index.mjs.map +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-cursor/index.d.ts +2 -0
- package/es/hooks/use-cursor/index.mjs +46 -0
- package/es/hooks/use-cursor/index.mjs.map +1 -0
- package/es/hooks/use-draggable/index.mjs +1 -1
- package/es/hooks/use-namespace/index.d.ts +1 -0
- package/es/hooks/use-namespace/index.mjs.map +1 -1
- package/es/hooks/use-popper-container/index.mjs +8 -5
- package/es/hooks/use-popper-container/index.mjs.map +1 -1
- package/es/index.mjs +2 -1
- package/es/index.mjs.map +1 -1
- package/es/utils/animation.mjs +3 -1
- package/es/utils/animation.mjs.map +1 -1
- package/es/utils/dom/index.mjs +1 -1
- package/es/utils/dom/style.d.ts +1 -0
- package/es/utils/dom/style.mjs +15 -3
- package/es/utils/dom/style.mjs.map +1 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/vue/index.d.ts +1 -1
- package/es/utils/vue/index.mjs +1 -1
- package/es/utils/vue/refs.mjs +1 -1
- package/es/utils/vue/refs.mjs.map +1 -1
- package/es/utils/vue/size.d.ts +1 -0
- package/es/utils/vue/size.mjs +9 -0
- package/es/utils/vue/size.mjs.map +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/alert/index.d.ts +4 -4
- package/lib/components/alert/src/alert.d.ts +1 -1
- package/lib/components/alert/src/alert.vue.d.ts +4 -4
- package/lib/components/autocomplete/index.d.ts +29 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +29 -1
- package/lib/components/avatar/src/avatar2.js +1 -1
- package/lib/components/button/index.d.ts +4 -0
- package/lib/components/button/src/button-custom.d.ts +4 -0
- package/lib/components/button/src/button-custom.js +65 -0
- package/lib/components/button/src/button-custom.js.map +1 -0
- package/lib/components/button/src/button.d.ts +1 -0
- package/lib/components/button/src/button.js +1 -0
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button.vue.d.ts +4 -0
- package/lib/components/button/src/button2.js +2 -37
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/index.d.ts +4 -0
- package/lib/components/calendar/src/calendar.vue.d.ts +4 -0
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +3 -2
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/cascader/index.d.ts +38 -2
- package/lib/components/cascader/src/index.vue.d.ts +19 -1
- package/lib/components/col/src/col.d.ts +2 -0
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/color-picker/src/index.js +4 -1
- package/lib/components/color-picker/src/index.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js +2 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-cell.js +1 -1
- package/lib/components/dropdown/src/dropdown2.js +1 -1
- package/lib/components/empty/src/img-empty.js +7 -17
- package/lib/components/empty/src/img-empty.js.map +1 -1
- package/lib/components/form/index.d.ts +4 -6
- package/lib/components/form/src/form-item.vue.d.ts +2 -3
- package/lib/components/form/src/form-item2.js +23 -23
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form-label-wrap.js +6 -6
- package/lib/components/form/src/form-label-wrap.js.map +1 -1
- package/lib/components/icon/src/icon2.js +1 -1
- package/lib/components/image/index.d.ts +12 -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 +12 -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 +4 -0
- package/lib/components/image-viewer/src/image-viewer.d.ts +1 -0
- package/lib/components/image-viewer/src/image-viewer.js +4 -0
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +4 -0
- package/lib/components/image-viewer/src/image-viewer2.js +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/input/index.d.ts +10 -0
- package/lib/components/input/src/input.d.ts +2 -0
- package/lib/components/input/src/input.js +6 -0
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input.vue.d.ts +10 -0
- package/lib/components/input/src/input2.js +119 -102
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.d.ts +20 -0
- package/lib/components/input-number/src/input-number.vue.d.ts +20 -0
- package/lib/components/loading/src/loading.js +3 -1
- package/lib/components/loading/src/loading.js.map +1 -1
- package/lib/components/loading/src/service.js +1 -2
- package/lib/components/loading/src/service.js.map +1 -1
- package/lib/components/menu/index.d.ts +84 -0
- package/lib/components/menu/src/menu-collapse-transition.js +10 -7
- package/lib/components/menu/src/menu-collapse-transition.js.map +1 -1
- package/lib/components/menu/src/menu-item-group.vue.d.ts +14 -0
- package/lib/components/menu/src/menu-item-group2.js +11 -6
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/menu/src/menu-item.vue.d.ts +28 -0
- package/lib/components/menu/src/menu-item2.js +15 -7
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/menu/src/menu.js +14 -10
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.js +23 -20
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/menu/src/utils/menu-bar.d.ts +2 -2
- package/lib/components/menu/src/utils/menu-bar.js +4 -4
- package/lib/components/menu/src/utils/menu-bar.js.map +1 -1
- package/lib/components/menu/src/utils/menu-item.d.ts +2 -2
- package/lib/components/menu/src/utils/menu-item.js +4 -4
- package/lib/components/menu/src/utils/menu-item.js.map +1 -1
- package/lib/components/message-box/src/index.js +71 -62
- package/lib/components/message-box/src/index.js.map +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +17 -1
- package/lib/components/popover/src/index.js +1 -0
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popper/src/content.vue.d.ts +1 -1
- package/lib/components/popper/src/content2.js +3 -3
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/progress/src/progress2.js +1 -1
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +2 -1
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/scrollbar/src/thumb.vue.d.ts +16 -16
- package/lib/components/scrollbar/src/util.d.ts +18 -18
- package/lib/components/scrollbar/src/util.js.map +1 -1
- package/lib/components/select/src/select.js +8 -20
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/useSelect.js +3 -3
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/table/src/store/current.js +1 -0
- package/lib/components/table/src/store/current.js.map +1 -1
- package/lib/components/table/src/table/defaults.d.ts +1 -1
- package/lib/components/table/src/table/defaults.js.map +1 -1
- package/lib/components/table/src/table/style-helper.js +1 -4
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-column/watcher-helper.js +8 -8
- package/lib/components/table/src/table-column/watcher-helper.js.map +1 -1
- package/lib/components/table-v2/index.d.ts +4 -0
- package/lib/components/table-v2/index.js +16 -0
- package/lib/components/table-v2/index.js.map +1 -0
- package/lib/components/table-v2/src/cell.d.ts +11 -0
- package/lib/components/table-v2/src/cell.js +26 -0
- package/lib/components/table-v2/src/cell.js.map +1 -0
- package/lib/components/table-v2/src/column.d.ts +19 -0
- package/lib/components/table-v2/src/column.js +45 -0
- package/lib/components/table-v2/src/column.js.map +1 -0
- package/lib/components/table-v2/src/common.d.ts +42 -0
- package/lib/components/table-v2/src/common.js +51 -0
- package/lib/components/table-v2/src/common.js.map +1 -0
- package/lib/components/table-v2/src/components/cell.d.ts +4 -0
- package/lib/components/table-v2/src/components/cell.js +26 -0
- package/lib/components/table-v2/src/components/cell.js.map +1 -0
- package/lib/components/table-v2/src/components/expand-icon.d.ts +11 -0
- package/lib/components/table-v2/src/components/expand-icon.js +30 -0
- package/lib/components/table-v2/src/components/expand-icon.js.map +1 -0
- package/lib/components/table-v2/src/components/header-cell.d.ts +4 -0
- package/lib/components/table-v2/src/components/header-cell.js +19 -0
- package/lib/components/table-v2/src/components/header-cell.js.map +1 -0
- package/lib/components/table-v2/src/components/header-row.d.ts +27 -0
- package/lib/components/table-v2/src/components/header-row.js +44 -0
- package/lib/components/table-v2/src/components/header-row.js.map +1 -0
- package/lib/components/table-v2/src/components/header.d.ts +44 -0
- package/lib/components/table-v2/src/components/header.js +100 -0
- package/lib/components/table-v2/src/components/header.js.map +1 -0
- package/lib/components/table-v2/src/components/index.d.ts +10 -0
- package/lib/components/table-v2/src/components/index.js +22 -0
- package/lib/components/table-v2/src/components/index.js.map +1 -0
- package/lib/components/table-v2/src/components/row.d.ts +68 -0
- package/lib/components/table-v2/src/components/row.js +208 -0
- package/lib/components/table-v2/src/components/row.js.map +1 -0
- package/lib/components/table-v2/src/components/sort-icon.d.ts +8 -0
- package/lib/components/table-v2/src/components/sort-icon.js +23 -0
- package/lib/components/table-v2/src/components/sort-icon.js.map +1 -0
- package/lib/components/table-v2/src/composables/index.d.ts +5 -0
- package/lib/components/table-v2/src/composables/index.js +18 -0
- package/lib/components/table-v2/src/composables/index.js.map +1 -0
- package/lib/components/table-v2/src/composables/use-columns.d.ts +20 -0
- package/lib/components/table-v2/src/composables/use-columns.js +92 -0
- package/lib/components/table-v2/src/composables/use-columns.js.map +1 -0
- package/lib/components/table-v2/src/composables/use-data.d.ts +17 -0
- package/lib/components/table-v2/src/composables/use-data.js +48 -0
- package/lib/components/table-v2/src/composables/use-data.js.map +1 -0
- package/lib/components/table-v2/src/composables/use-row.d.ts +32 -0
- package/lib/components/table-v2/src/composables/use-row.js +127 -0
- package/lib/components/table-v2/src/composables/use-row.js.map +1 -0
- package/lib/components/table-v2/src/composables/use-scrollbar.d.ts +26 -0
- package/lib/components/table-v2/src/composables/use-scrollbar.js +59 -0
- package/lib/components/table-v2/src/composables/use-scrollbar.js.map +1 -0
- package/lib/components/table-v2/src/composables/use-styles.d.ts +25 -0
- package/lib/components/table-v2/src/composables/use-styles.js +91 -0
- package/lib/components/table-v2/src/composables/use-styles.js.map +1 -0
- package/lib/components/table-v2/src/composables/utils.d.ts +3 -0
- package/lib/components/table-v2/src/composables/utils.js +30 -0
- package/lib/components/table-v2/src/composables/utils.js.map +1 -0
- package/lib/components/table-v2/src/constants.d.ts +17 -0
- package/lib/components/table-v2/src/constants.js +31 -0
- package/lib/components/table-v2/src/constants.js.map +1 -0
- package/lib/components/table-v2/src/grid.d.ts +39 -0
- package/lib/components/table-v2/src/grid.js +46 -0
- package/lib/components/table-v2/src/grid.js.map +1 -0
- package/lib/components/table-v2/src/header-cell.d.ts +7 -0
- package/lib/components/table-v2/src/header-cell.js +16 -0
- package/lib/components/table-v2/src/header-cell.js.map +1 -0
- package/lib/components/table-v2/src/header-row.d.ts +8 -0
- package/lib/components/table-v2/src/header-row.js +17 -0
- package/lib/components/table-v2/src/header-row.js.map +1 -0
- package/lib/components/table-v2/src/header.d.ts +13 -0
- package/lib/components/table-v2/src/header.js +37 -0
- package/lib/components/table-v2/src/header.js.map +1 -0
- package/lib/components/table-v2/src/private.d.ts +1 -0
- package/lib/components/table-v2/src/private.js +8 -0
- package/lib/components/table-v2/src/private.js.map +1 -0
- package/lib/components/table-v2/src/renderers/cell.d.ts +10 -0
- package/lib/components/table-v2/src/renderers/cell.js +95 -0
- package/lib/components/table-v2/src/renderers/cell.js.map +1 -0
- package/lib/components/table-v2/src/renderers/empty.d.ts +7 -0
- package/lib/components/table-v2/src/renderers/empty.js +19 -0
- package/lib/components/table-v2/src/renderers/empty.js.map +1 -0
- package/lib/components/table-v2/src/renderers/footer.d.ts +7 -0
- package/lib/components/table-v2/src/renderers/footer.js +19 -0
- package/lib/components/table-v2/src/renderers/footer.js.map +1 -0
- package/lib/components/table-v2/src/renderers/header-cell.d.ts +10 -0
- package/lib/components/table-v2/src/renderers/header-cell.js +69 -0
- package/lib/components/table-v2/src/renderers/header-cell.js.map +1 -0
- package/lib/components/table-v2/src/renderers/header.d.ts +9 -0
- package/lib/components/table-v2/src/renderers/header.js +43 -0
- package/lib/components/table-v2/src/renderers/header.js.map +1 -0
- package/lib/components/table-v2/src/renderers/left-table.d.ts +8 -0
- package/lib/components/table-v2/src/renderers/left-table.js +28 -0
- package/lib/components/table-v2/src/renderers/left-table.js.map +1 -0
- package/lib/components/table-v2/src/renderers/main-table.d.ts +8 -0
- package/lib/components/table-v2/src/renderers/main-table.js +26 -0
- package/lib/components/table-v2/src/renderers/main-table.js.map +1 -0
- package/lib/components/table-v2/src/renderers/overlay.d.ts +3 -0
- package/lib/components/table-v2/src/renderers/overlay.js +19 -0
- package/lib/components/table-v2/src/renderers/overlay.js.map +1 -0
- package/lib/components/table-v2/src/renderers/right-table.d.ts +8 -0
- package/lib/components/table-v2/src/renderers/right-table.js +28 -0
- package/lib/components/table-v2/src/renderers/right-table.js.map +1 -0
- package/lib/components/table-v2/src/renderers/row.d.ts +10 -0
- package/lib/components/table-v2/src/renderers/row.js +81 -0
- package/lib/components/table-v2/src/renderers/row.js.map +1 -0
- package/lib/components/table-v2/src/row.d.ts +54 -0
- package/lib/components/table-v2/src/row.js +48 -0
- package/lib/components/table-v2/src/row.js.map +1 -0
- package/lib/components/table-v2/src/table-grid.d.ts +104 -0
- package/lib/components/table-v2/src/table-grid.js +225 -0
- package/lib/components/table-v2/src/table-grid.js.map +1 -0
- package/lib/components/table-v2/src/table-v2.d.ts +142 -0
- package/lib/components/table-v2/src/table-v2.js +254 -0
- package/lib/components/table-v2/src/table-v2.js.map +1 -0
- package/lib/components/table-v2/src/table.d.ts +91 -0
- package/lib/components/table-v2/src/table.js +110 -0
- package/lib/components/table-v2/src/table.js.map +1 -0
- package/lib/components/table-v2/src/tokens.d.ts +10 -0
- package/lib/components/table-v2/src/tokens.js +8 -0
- package/lib/components/table-v2/src/tokens.js.map +1 -0
- package/lib/components/table-v2/src/types.d.ts +88 -0
- package/lib/components/table-v2/src/types.js +3 -0
- package/lib/components/table-v2/src/types.js.map +1 -0
- package/lib/components/table-v2/src/use-table.d.ts +49 -0
- package/lib/components/table-v2/src/use-table.js +154 -0
- package/lib/components/table-v2/src/use-table.js.map +1 -0
- package/lib/components/table-v2/src/utils.d.ts +7 -0
- package/lib/components/table-v2/src/utils.js +30 -0
- package/lib/components/table-v2/src/utils.js.map +1 -0
- package/lib/components/tag/index.d.ts +4 -4
- package/lib/components/tag/src/tag.d.ts +1 -1
- package/lib/components/tag/src/tag.vue.d.ts +4 -4
- package/lib/components/time-select/index.d.ts +28 -0
- package/lib/components/time-select/src/time-select.js +6 -2
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select.vue.d.ts +14 -0
- package/lib/components/tooltip/src/content.vue.d.ts +2 -2
- package/lib/components/tree-select/src/tree-select.js +1 -0
- package/lib/components/tree-select/src/tree-select.js.map +1 -1
- package/lib/components/tree-select/src/tree.js +16 -3
- package/lib/components/tree-select/src/tree.js.map +1 -1
- package/lib/components/tree-select/style/css.d.ts +1 -1
- package/lib/components/tree-select/style/css.js +1 -1
- package/lib/components/upload/index.d.ts +16 -12
- package/lib/components/upload/src/upload-content.d.ts +1 -1
- package/lib/components/upload/src/upload-content.vue.d.ts +4 -3
- package/lib/components/upload/src/upload-content2.js +3 -1
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +4 -2
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload.d.ts +2 -2
- package/lib/components/upload/src/upload.js +1 -1
- package/lib/components/upload/src/upload.js.map +1 -1
- package/lib/components/upload/src/upload.vue.d.ts +16 -12
- package/lib/components/virtual-list/index.d.ts +3 -1
- package/lib/components/virtual-list/index.js +1 -1
- package/lib/components/virtual-list/src/builders/build-grid.d.ts +45 -6
- package/lib/components/virtual-list/src/builders/build-grid.js +53 -12
- package/lib/components/virtual-list/src/builders/build-grid.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +16 -2
- package/lib/components/virtual-list/src/builders/build-list.js +7 -5
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-grid.d.ts +38 -5
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js +35 -3
- package/lib/components/virtual-list/src/components/dynamic-size-grid.js.map +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +16 -2
- package/lib/components/virtual-list/src/components/fixed-size-grid.d.ts +24 -3
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +16 -2
- package/lib/components/virtual-list/src/components/scrollbar.d.ts +14 -0
- package/lib/components/virtual-list/src/components/scrollbar.js +26 -27
- package/lib/components/virtual-list/src/components/scrollbar.js.map +1 -1
- package/lib/components/virtual-list/src/defaults.d.ts +1 -1
- package/lib/components/virtual-list/src/defaults.js +1 -1
- package/lib/components/virtual-list/src/defaults.js.map +1 -1
- package/lib/components/virtual-list/src/hooks/use-grid-wheel.js +7 -2
- package/lib/components/virtual-list/src/hooks/use-grid-wheel.js.map +1 -1
- package/lib/components/virtual-list/src/props.d.ts +14 -1
- package/lib/components/virtual-list/src/props.js +19 -0
- package/lib/components/virtual-list/src/props.js.map +1 -1
- package/lib/components/virtual-list/src/types.d.ts +33 -0
- package/lib/components/virtual-list/src/utils.d.ts +10 -5
- package/lib/components/virtual-list/src/utils.js.map +1 -1
- package/lib/constants/index.js +1 -0
- package/lib/constants/index.js.map +1 -1
- package/lib/constants/size.d.ts +5 -0
- package/lib/constants/size.js +6 -0
- package/lib/constants/size.js.map +1 -1
- package/lib/directives/mousewheel/index.js +1 -7
- package/lib/directives/mousewheel/index.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-cursor/index.d.ts +2 -0
- package/lib/hooks/use-cursor/index.js +50 -0
- package/lib/hooks/use-cursor/index.js.map +1 -0
- package/lib/hooks/use-draggable/index.js +1 -1
- package/lib/hooks/use-namespace/index.d.ts +1 -0
- package/lib/hooks/use-namespace/index.js.map +1 -1
- package/lib/hooks/use-popper-container/index.js +8 -5
- package/lib/hooks/use-popper-container/index.js.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/animation.js +3 -1
- package/lib/utils/animation.js.map +1 -1
- package/lib/utils/dom/index.js +1 -0
- package/lib/utils/dom/index.js.map +1 -1
- package/lib/utils/dom/style.d.ts +1 -0
- package/lib/utils/dom/style.js +13 -0
- package/lib/utils/dom/style.js.map +1 -1
- package/lib/utils/index.js +3 -2
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/vue/index.d.ts +1 -1
- package/lib/utils/vue/index.js +2 -2
- package/lib/utils/vue/refs.js +1 -1
- package/lib/utils/vue/refs.js.map +1 -1
- package/lib/utils/vue/size.d.ts +1 -0
- package/lib/utils/vue/size.js +13 -0
- package/lib/utils/vue/size.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +24 -21
- package/tags.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/el-alert.css +1 -1
- package/theme-chalk/el-autocomplete.css +1 -1
- package/theme-chalk/el-backtop.css +1 -1
- package/theme-chalk/el-badge.css +1 -1
- package/theme-chalk/el-button.css +1 -1
- package/theme-chalk/el-calendar.css +1 -1
- package/theme-chalk/el-cascader-panel.css +1 -1
- package/theme-chalk/el-cascader.css +1 -1
- package/theme-chalk/el-check-tag.css +1 -1
- package/theme-chalk/el-checkbox-button.css +1 -1
- package/theme-chalk/el-checkbox.css +1 -1
- package/theme-chalk/el-color-picker.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-descriptions.css +1 -1
- package/theme-chalk/el-dialog.css +1 -1
- package/theme-chalk/el-divider.css +1 -1
- package/theme-chalk/el-drawer.css +1 -1
- package/theme-chalk/el-dropdown.css +1 -1
- package/theme-chalk/el-form.css +1 -1
- package/theme-chalk/el-input-number.css +1 -1
- package/theme-chalk/el-input.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-message-box.css +1 -1
- package/theme-chalk/el-notification.css +1 -1
- package/theme-chalk/el-option-item.css +1 -1
- package/theme-chalk/el-option.css +1 -1
- package/theme-chalk/el-pagination.css +1 -1
- package/theme-chalk/el-popper.css +1 -1
- package/theme-chalk/el-radio-button.css +1 -1
- package/theme-chalk/el-radio.css +1 -1
- package/theme-chalk/el-result.css +1 -1
- package/theme-chalk/el-select-dropdown.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-select.css +1 -1
- package/theme-chalk/el-step.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -0
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-tabs.css +1 -1
- package/theme-chalk/el-tag.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/el-transfer.css +1 -1
- package/theme-chalk/el-tree.css +1 -1
- package/theme-chalk/el-upload.css +1 -1
- package/theme-chalk/el-var.css +1 -1
- package/theme-chalk/el-virtual-list.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/alert.scss +18 -14
- package/theme-chalk/src/autocomplete.scss +9 -9
- package/theme-chalk/src/badge.scss +14 -12
- package/theme-chalk/src/button.scss +2 -0
- package/theme-chalk/src/calendar.scss +2 -2
- package/theme-chalk/src/card.scss +11 -10
- package/theme-chalk/src/cascader.scss +9 -14
- package/theme-chalk/src/check-tag.scss +6 -6
- package/theme-chalk/src/checkbox-button.scss +1 -4
- package/theme-chalk/src/checkbox.scss +1 -1
- package/theme-chalk/src/color-picker.scss +74 -47
- package/theme-chalk/src/common/var.scss +21 -37
- package/theme-chalk/src/dark/css-vars.scss +22 -2
- package/theme-chalk/src/dark/var.scss +130 -1
- package/theme-chalk/src/date-picker/date-picker.scss +1 -1
- package/theme-chalk/src/date-picker/month-table.scss +1 -1
- package/theme-chalk/src/date-picker/picker-panel.scss +3 -3
- package/theme-chalk/src/date-picker/picker.scss +16 -3
- package/theme-chalk/src/date-picker/time-picker.scss +2 -2
- package/theme-chalk/src/date-picker/time-spinner.scss +1 -1
- package/theme-chalk/src/date-picker/year-table.scss +2 -2
- package/theme-chalk/src/descriptions.scss +1 -1
- package/theme-chalk/src/dialog.scss +6 -6
- package/theme-chalk/src/divider.scss +1 -1
- package/theme-chalk/src/drawer.scss +1 -1
- package/theme-chalk/src/dropdown.scss +2 -2
- package/theme-chalk/src/form.scss +4 -2
- package/theme-chalk/src/index.scss +1 -0
- package/theme-chalk/src/input-number.scss +9 -8
- package/theme-chalk/src/input.scss +121 -173
- package/theme-chalk/src/menu.scss +1 -1
- package/theme-chalk/src/message-box.scss +1 -1
- package/theme-chalk/src/mixins/_var.scss +15 -17
- package/theme-chalk/src/mixins/mixins.scss +1 -1
- package/theme-chalk/src/notification.scss +2 -2
- package/theme-chalk/src/option.scss +0 -4
- package/theme-chalk/src/pagination.scss +19 -16
- package/theme-chalk/src/popper.scss +11 -11
- package/theme-chalk/src/radio-button.scss +1 -4
- package/theme-chalk/src/radio.scss +0 -1
- package/theme-chalk/src/result.scss +0 -2
- package/theme-chalk/src/select/common.scss +1 -1
- package/theme-chalk/src/select-v2.scss +1 -1
- package/theme-chalk/src/select.scss +22 -16
- package/theme-chalk/src/step.scss +1 -1
- package/theme-chalk/src/table-column.scss +1 -1
- package/theme-chalk/src/table-v2.scss +213 -0
- package/theme-chalk/src/table.scss +1 -1
- package/theme-chalk/src/tabs.scss +6 -6
- package/theme-chalk/src/tag.scss +24 -20
- package/theme-chalk/src/transfer.scss +2 -2
- package/theme-chalk/src/tree.scss +1 -1
- package/theme-chalk/src/upload.scss +28 -35
- package/theme-chalk/src/var.scss +32 -33
- package/theme-chalk/src/virtual-list.scss +3 -0
- package/web-types.json +1 -1
- package/es/utils/vue/style.d.ts +0 -1
- package/es/utils/vue/style.mjs +0 -19
- package/es/utils/vue/style.mjs.map +0 -1
- package/lib/utils/vue/style.d.ts +0 -1
- package/lib/utils/vue/style.js +0 -23
- package/lib/utils/vue/style.js.map +0 -1
|
@@ -83,6 +83,12 @@ const virtualizedListProps = buildProps({
|
|
|
83
83
|
itemSize,
|
|
84
84
|
...virtualizedProps
|
|
85
85
|
});
|
|
86
|
+
const scrollbarSize = {
|
|
87
|
+
type: Number,
|
|
88
|
+
default: 6
|
|
89
|
+
};
|
|
90
|
+
const startGap = { type: Number, default: 0 };
|
|
91
|
+
const endGap = { type: Number, default: 2 };
|
|
86
92
|
const virtualizedGridProps = buildProps({
|
|
87
93
|
columnCache: cache,
|
|
88
94
|
columnWidth: itemSize,
|
|
@@ -90,13 +96,23 @@ const virtualizedGridProps = buildProps({
|
|
|
90
96
|
estimatedRowHeight: estimatedItemSize,
|
|
91
97
|
initScrollLeft: initScrollOffset,
|
|
92
98
|
initScrollTop: initScrollOffset,
|
|
99
|
+
itemKey: {
|
|
100
|
+
type: definePropType(Function),
|
|
101
|
+
default: ({ columnIndex, rowIndex }) => `${rowIndex}:${columnIndex}`
|
|
102
|
+
},
|
|
93
103
|
rowCache: cache,
|
|
94
104
|
rowHeight: itemSize,
|
|
95
105
|
totalColumn: total,
|
|
96
106
|
totalRow: total,
|
|
107
|
+
hScrollbarSize: scrollbarSize,
|
|
108
|
+
vScrollbarSize: scrollbarSize,
|
|
109
|
+
scrollbarStartGap: startGap,
|
|
110
|
+
scrollbarEndGap: endGap,
|
|
97
111
|
...virtualizedProps
|
|
98
112
|
});
|
|
99
113
|
const virtualizedScrollbarProps = buildProps({
|
|
114
|
+
alwaysOn: Boolean,
|
|
115
|
+
class: String,
|
|
100
116
|
layout,
|
|
101
117
|
total,
|
|
102
118
|
ratio: {
|
|
@@ -111,6 +127,9 @@ const virtualizedScrollbarProps = buildProps({
|
|
|
111
127
|
type: Number,
|
|
112
128
|
required: true
|
|
113
129
|
},
|
|
130
|
+
scrollbarSize,
|
|
131
|
+
startGap,
|
|
132
|
+
endGap,
|
|
114
133
|
visible: Boolean
|
|
115
134
|
});
|
|
116
135
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.mjs","sources":["../../../../../../packages/components/virtual-list/src/props.ts"],"sourcesContent":["import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType<number | ItemSize>([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType<string | Element>([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType<any[]>(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n style: {\n type: definePropType<StyleValue>([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes<typeof virtualizedProps>\nexport type VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"names":[],"mappings":";;;;;AAOA,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC1C,EAAE,QAAQ,EAAE,IAAI;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,EAAE,MAAM;AACd,CAAC,CAAC,CAAC;AACH,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC;AACH,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;AACxB,EAAE,OAAO,EAAE,KAAK;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC;AACH,MAAM,KA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AAC;AAC1B,IAAI,QAAQ,EAAE,KAAK;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,oBAAoB,GAAG,UAAU,CAAC;AAC/C,EAAE,KAAK;AACP,EAAE,iBAAiB;AACnB,EAAE,MAAM;AACR,EAAE,gBAAgB;AAClB,EAAE,KAAK;AACP,EAAE,QAAQ;AACV,EAAE,GAAG,gBAAgB;AACrB,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"props.mjs","sources":["../../../../../../packages/components/virtual-list/src/props.ts"],"sourcesContent":["import {\n buildProp,\n buildProps,\n definePropType,\n mutable,\n} from '@element-plus/utils'\nimport { VERTICAL } from './defaults'\n\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type { GridItemKeyGetter, ItemSize } from './types'\n\nconst itemSize = buildProp({\n type: definePropType<number | ItemSize>([Number, Function]),\n required: true,\n} as const)\n\nconst estimatedItemSize = buildProp({\n type: Number,\n} as const)\n\nconst cache = buildProp({\n type: Number,\n default: 2,\n} as const)\n\nconst direction = buildProp({\n type: String,\n values: ['ltr', 'rtl'],\n default: 'ltr',\n} as const)\n\nconst initScrollOffset = buildProp({\n type: Number,\n default: 0,\n} as const)\n\nconst total = buildProp({\n type: Number,\n required: true,\n} as const)\n\nconst layout = buildProp({\n type: String,\n values: ['horizontal', 'vertical'],\n default: VERTICAL,\n} as const)\n\nexport const virtualizedProps = buildProps({\n className: {\n type: String,\n default: '',\n },\n\n containerElement: {\n type: definePropType<string | Element>([String, Object]),\n default: 'div',\n },\n\n data: {\n type: definePropType<any[]>(Array),\n default: () => mutable([] as const),\n },\n\n /**\n * @description controls the horizontal direction.\n */\n direction,\n\n height: {\n type: [String, Number],\n required: true,\n },\n\n innerElement: {\n type: [String, Object],\n default: 'div',\n },\n\n style: {\n type: definePropType<StyleValue>([Object, String, Array]),\n },\n\n useIsScrolling: {\n type: Boolean,\n default: false,\n },\n\n width: {\n type: [Number, String],\n required: false,\n },\n\n perfMode: {\n type: Boolean,\n default: true,\n },\n scrollbarAlwaysOn: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport const virtualizedListProps = buildProps({\n /**\n * @description describes how many items should be pre rendered to the head\n * and the tail of the window\n */\n cache,\n\n estimatedItemSize,\n\n /**\n * @description controls the list's orientation\n */\n layout,\n\n initScrollOffset,\n\n /**\n * @description describes the total number of the list.\n */\n total,\n\n itemSize,\n ...virtualizedProps,\n} as const)\n\nconst scrollbarSize = {\n type: Number,\n default: 6,\n} as const\n\nconst startGap = { type: Number, default: 0 } as const\nconst endGap = { type: Number, default: 2 } as const\n\nexport const virtualizedGridProps = buildProps({\n columnCache: cache,\n columnWidth: itemSize,\n estimatedColumnWidth: estimatedItemSize,\n estimatedRowHeight: estimatedItemSize,\n initScrollLeft: initScrollOffset,\n initScrollTop: initScrollOffset,\n itemKey: {\n type: definePropType<GridItemKeyGetter>(Function),\n default: ({ columnIndex, rowIndex }) => `${rowIndex}:${columnIndex}`,\n },\n rowCache: cache,\n rowHeight: itemSize,\n totalColumn: total,\n totalRow: total,\n hScrollbarSize: scrollbarSize,\n vScrollbarSize: scrollbarSize,\n scrollbarStartGap: startGap,\n scrollbarEndGap: endGap,\n ...virtualizedProps,\n} as const)\n\nexport const virtualizedScrollbarProps = buildProps({\n alwaysOn: Boolean,\n class: String,\n layout,\n total,\n ratio: {\n type: Number,\n required: true,\n },\n clientSize: {\n type: Number,\n required: true,\n },\n scrollFrom: {\n type: Number,\n required: true,\n },\n scrollbarSize,\n startGap,\n endGap,\n\n visible: Boolean,\n} as const)\n\nexport type VirtualizedProps = ExtractPropTypes<typeof virtualizedProps>\nexport type VirtualizedListProps = ExtractPropTypes<typeof virtualizedListProps>\nexport type VirtualizedGridProps = ExtractPropTypes<typeof virtualizedGridProps>\n\nexport type VirtualizedScrollbarProps = ExtractPropTypes<\n typeof virtualizedScrollbarProps\n>\n"],"names":[],"mappings":";;;;;AAOA,MAAM,QAAQ,GAAG,SAAS,CAAC;AAC3B,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC1C,EAAE,QAAQ,EAAE,IAAI;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,EAAE,MAAM;AACd,CAAC,CAAC,CAAC;AACH,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC;AACH,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;AACxB,EAAE,OAAO,EAAE,KAAK;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,SAAS,CAAC;AACnC,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC;AACH,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,QAAQ,EAAE,IAAI;AAChB,CAAC,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,SAAS,CAAC;AACzB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;AACpC,EAAE,OAAO,EAAE,QAAQ;AACnB,CAAC,CAAC,CAAC;AACS,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,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,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,aAAa;AACf,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,OAAO,EAAE,OAAO;AAClB,CAAC;;;;"}
|
|
@@ -99,6 +99,39 @@ export declare type GridConstructorProps<T, P extends InitGridCacheFunc<T> = Ini
|
|
|
99
99
|
getRowStartIndexForOffset: GetStartIndexForOffset<T, P>;
|
|
100
100
|
getRowStopIndexForStartIndex: GetStopIndexForStartIndex<T, P>;
|
|
101
101
|
initCache: P;
|
|
102
|
+
injectToInstance?: (instance: Instance, cache: Ref<ReturnType<P>>) => void;
|
|
102
103
|
clearCache: boolean;
|
|
103
104
|
validateProps: PropValidator<T>;
|
|
104
105
|
};
|
|
106
|
+
/**
|
|
107
|
+
* Instance methods and emits
|
|
108
|
+
*/
|
|
109
|
+
export declare type GridDefaultSlotParams = {
|
|
110
|
+
columnIndex: number;
|
|
111
|
+
rowIndex: number;
|
|
112
|
+
data: any;
|
|
113
|
+
key: number | string;
|
|
114
|
+
isScrolling?: boolean;
|
|
115
|
+
style: CSSProperties;
|
|
116
|
+
};
|
|
117
|
+
export declare type GridItemRenderedEvtParams = {
|
|
118
|
+
columnCacheStart: number;
|
|
119
|
+
columnCacheEnd: number;
|
|
120
|
+
rowCacheStart: number;
|
|
121
|
+
rowCacheEnd: number;
|
|
122
|
+
columnVisibleStart: number;
|
|
123
|
+
columnVisibleEnd: number;
|
|
124
|
+
rowVisibleStart: number;
|
|
125
|
+
rowVisibleEnd: number;
|
|
126
|
+
};
|
|
127
|
+
export declare type GridScrollOptions = {
|
|
128
|
+
scrollLeft?: number;
|
|
129
|
+
scrollTop?: number;
|
|
130
|
+
};
|
|
131
|
+
export declare type GridItemKeyGetter = <T extends {
|
|
132
|
+
[key: string | number]: any;
|
|
133
|
+
}>(args: {
|
|
134
|
+
columnIndex: number;
|
|
135
|
+
data: T;
|
|
136
|
+
rowIndex: number;
|
|
137
|
+
}) => string | number;
|
|
@@ -5,8 +5,13 @@ export declare const isHorizontal: (dir: string) => boolean;
|
|
|
5
5
|
export declare const isRTL: (dir: Direction) => boolean;
|
|
6
6
|
export declare function getRTLOffsetType(recalculate?: boolean): RTLOffsetType;
|
|
7
7
|
export declare const getRelativePos: (e: TouchEvent | MouseEvent, layout: LayoutDirection) => any;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
8
|
+
declare type RenderThumbStyleParams = {
|
|
9
|
+
bar: {
|
|
10
|
+
size: 'height' | 'width';
|
|
11
|
+
axis: 'X' | 'Y';
|
|
12
|
+
};
|
|
13
|
+
size: string;
|
|
14
|
+
move: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function renderThumbStyle({ move, size, bar }: RenderThumbStyleParams, layout: string): CSSProperties;
|
|
17
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/virtual-list/src/utils.ts"],"sourcesContent":["import {\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n LTR,\n PageKey,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { Direction, LayoutDirection, RTLOffsetType } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\nexport function renderThumbStyle({ move, size, bar }
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../../../../../packages/components/virtual-list/src/utils.ts"],"sourcesContent":["import {\n BACKWARD,\n FORWARD,\n HORIZONTAL,\n LTR,\n PageKey,\n RTL,\n RTL_OFFSET_NAG,\n RTL_OFFSET_POS_ASC,\n RTL_OFFSET_POS_DESC,\n} from './defaults'\n\nimport type { CSSProperties } from 'vue'\nimport type { Direction, LayoutDirection, RTLOffsetType } from './types'\n\nexport const getScrollDir = (prev: number, cur: number) =>\n prev < cur ? FORWARD : BACKWARD\n\nexport const isHorizontal = (dir: string) =>\n dir === LTR || dir === RTL || dir === HORIZONTAL\n\nexport const isRTL = (dir: Direction) => dir === RTL\n\nlet cachedRTLResult: RTLOffsetType | null = null\n\nexport function getRTLOffsetType(recalculate = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div')\n const outerStyle = outerDiv.style\n outerStyle.width = '50px'\n outerStyle.height = '50px'\n outerStyle.overflow = 'scroll'\n outerStyle.direction = 'rtl'\n\n const innerDiv = document.createElement('div')\n const innerStyle = innerDiv.style\n innerStyle.width = '100px'\n innerStyle.height = '100px'\n\n outerDiv.appendChild(innerDiv)\n\n document.body.appendChild(outerDiv)\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = RTL_OFFSET_POS_DESC\n } else {\n outerDiv.scrollLeft = 1\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = RTL_OFFSET_NAG\n } else {\n cachedRTLResult = RTL_OFFSET_POS_ASC\n }\n }\n\n document.body.removeChild(outerDiv)\n\n return cachedRTLResult\n }\n\n return cachedRTLResult\n}\n\nexport const getRelativePos = (\n e: TouchEvent | MouseEvent,\n layout: LayoutDirection\n) => {\n return 'touches' in e ? e.touches[0][PageKey[layout]] : e[PageKey[layout]]\n}\n\ntype RenderThumbStyleParams = {\n bar: {\n size: 'height' | 'width'\n axis: 'X' | 'Y'\n }\n size: string\n move: number\n}\n\nexport function renderThumbStyle(\n { move, size, bar }: RenderThumbStyleParams,\n layout: string\n) {\n const style: CSSProperties = {}\n const translate = `translate${bar.axis}(${move}px)`\n\n style[bar.size] = size\n style.transform = translate\n style.msTransform = translate\n // polyfill\n ;(style as any).webkitTransform = translate\n\n if (layout === 'horizontal') {\n style.height = '100%'\n } else {\n style.width = '100%'\n }\n\n return style\n}\n"],"names":[],"mappings":";;AAWY,MAAC,YAAY,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,SAAS;AAC/D,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,WAAW;AAC1E,MAAC,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,IAAI;AAC1C,IAAI,eAAe,GAAG,IAAI,CAAC;AACpB,SAAS,gBAAgB,CAAC,WAAW,GAAG,KAAK,EAAE;AAC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AAc,GAAG,CAAC,CAAC,EAAE,MAAM,KAAK;AAC7C,EAAE,OAAO,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7E,EAAE;AACK,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE;AAC9D,EAAE,MAAM,KAAK,GAAG,EAAE,CAAC;AACnB,EAAE,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;AACtD,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACzB,EAAE,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAC9B,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;AAChC,EAAE,KAAK,CAAC,eAAe,GAAG,SAAS,CAAC;AACpC,EAAE,IAAI,MAAM,KAAK,YAAY,EAAE;AAC/B,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;AAC1B,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
|
package/es/constants/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { EVENT_CODE } from './aria.mjs';
|
|
2
2
|
export { WEEK_DAYS, datePickTypes } from './date.mjs';
|
|
3
3
|
export { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from './event.mjs';
|
|
4
|
-
export { componentSizes } from './size.mjs';
|
|
4
|
+
export { componentSizeMap, componentSizes } from './size.mjs';
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
package/es/constants/size.d.ts
CHANGED
package/es/constants/size.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size.mjs","sources":["../../../../packages/constants/size.ts"],"sourcesContent":["export const componentSizes = ['', 'default', 'small', 'large'] as const\nexport type ComponentSize = typeof componentSizes[number]\n"],"names":[],"mappings":"AAAY,MAAC,cAAc,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO;;;;"}
|
|
1
|
+
{"version":3,"file":"size.mjs","sources":["../../../../packages/constants/size.ts"],"sourcesContent":["export const componentSizes = ['', 'default', 'small', 'large'] as const\n\nexport type ComponentSize = typeof componentSizes[number]\n\nexport const componentSizeMap = {\n large: 40,\n default: 32,\n small: 24,\n} as const\n"],"names":[],"mappings":"AAAY,MAAC,cAAc,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;AACpD,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,KAAK,EAAE,EAAE;AACX;;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import normalizeWheel from 'normalize-wheel-es';
|
|
2
|
-
import '../../utils/index.mjs';
|
|
3
|
-
import { isFirefox } from '../../utils/browser.mjs';
|
|
4
2
|
|
|
5
3
|
const mousewheel = function(element, callback) {
|
|
6
4
|
if (element && element.addEventListener) {
|
|
@@ -8,11 +6,7 @@ const mousewheel = function(element, callback) {
|
|
|
8
6
|
const normalized = normalizeWheel(event);
|
|
9
7
|
callback && Reflect.apply(callback, this, [event, normalized]);
|
|
10
8
|
};
|
|
11
|
-
|
|
12
|
-
element.addEventListener("DOMMouseScroll", fn);
|
|
13
|
-
} else {
|
|
14
|
-
element.onmousewheel = fn;
|
|
15
|
-
}
|
|
9
|
+
element.addEventListener("wheel", fn, { passive: true });
|
|
16
10
|
}
|
|
17
11
|
};
|
|
18
12
|
const Mousewheel = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/mousewheel/index.ts"],"sourcesContent":["import normalizeWheel from 'normalize-wheel-es'\nimport
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/mousewheel/index.ts"],"sourcesContent":["import normalizeWheel from 'normalize-wheel-es'\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\n\nconst mousewheel = function (element, callback) {\n if (element && element.addEventListener) {\n const fn = function (this: any, event) {\n const normalized = normalizeWheel(event)\n callback && Reflect.apply(callback, this, [event, normalized])\n }\n element.addEventListener('wheel', fn, { passive: true })\n }\n}\n\nconst Mousewheel: ObjectDirective = {\n beforeMount(el: HTMLElement, binding: DirectiveBinding) {\n mousewheel(el, binding.value)\n },\n}\n\nexport default Mousewheel\n"],"names":[],"mappings":";;AACA,MAAM,UAAU,GAAG,SAAS,OAAO,EAAE,QAAQ,EAAE;AAC/C,EAAE,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAC3C,IAAI,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE;AAC/B,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAC/C,MAAM,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;AACrE,KAAK,CAAC;AACN,IAAI,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7D,GAAG;AACH,CAAC,CAAC;AACG,MAAC,UAAU,GAAG;AACnB,EAAE,WAAW,CAAC,EAAE,EAAE,OAAO,EAAE;AAC3B,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AAClC,GAAG;AACH;;;;"}
|
package/es/hooks/index.d.ts
CHANGED
package/es/hooks/index.mjs
CHANGED
|
@@ -26,4 +26,5 @@ export { FORWARD_REF_INJECTION_KEY, useForwardRef, useForwardRefDirective } from
|
|
|
26
26
|
export { useNamespace } from './use-namespace/index.mjs';
|
|
27
27
|
export { useZIndex } from './use-z-index/index.mjs';
|
|
28
28
|
export { arrowMiddleware, getPositionDataWithUnit, useFloating, useFloatingProps } from './use-floating/index.mjs';
|
|
29
|
+
export { useCursor } from './use-cursor/index.mjs';
|
|
29
30
|
//# sourceMappingURL=index.mjs.map
|
package/es/hooks/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
function useCursor(input) {
|
|
4
|
+
const selectionRef = ref();
|
|
5
|
+
function recordCursor() {
|
|
6
|
+
if (input.value == void 0)
|
|
7
|
+
return;
|
|
8
|
+
const { selectionStart, selectionEnd, value } = input.value;
|
|
9
|
+
if (selectionStart == null || selectionEnd == null)
|
|
10
|
+
return;
|
|
11
|
+
const beforeTxt = value.slice(0, Math.max(0, selectionStart));
|
|
12
|
+
const afterTxt = value.slice(Math.max(0, selectionEnd));
|
|
13
|
+
selectionRef.value = {
|
|
14
|
+
selectionStart,
|
|
15
|
+
selectionEnd,
|
|
16
|
+
value,
|
|
17
|
+
beforeTxt,
|
|
18
|
+
afterTxt
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function setCursor() {
|
|
22
|
+
if (input.value == void 0 || selectionRef.value == void 0)
|
|
23
|
+
return;
|
|
24
|
+
const { value } = input.value;
|
|
25
|
+
const { beforeTxt, afterTxt, selectionStart } = selectionRef.value;
|
|
26
|
+
if (beforeTxt == void 0 || afterTxt == void 0 || selectionStart == void 0)
|
|
27
|
+
return;
|
|
28
|
+
let startPos = value.length;
|
|
29
|
+
if (value.endsWith(afterTxt)) {
|
|
30
|
+
startPos = value.length - afterTxt.length;
|
|
31
|
+
} else if (value.startsWith(beforeTxt)) {
|
|
32
|
+
startPos = beforeTxt.length;
|
|
33
|
+
} else {
|
|
34
|
+
const beforeLastChar = beforeTxt[selectionStart - 1];
|
|
35
|
+
const newIndex = value.indexOf(beforeLastChar, selectionStart - 1);
|
|
36
|
+
if (newIndex !== -1) {
|
|
37
|
+
startPos = newIndex + 1;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
input.value.setSelectionRange(startPos, startPos);
|
|
41
|
+
}
|
|
42
|
+
return [recordCursor, setCursor];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { useCursor };
|
|
46
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-cursor/index.ts"],"sourcesContent":["import { ref } from 'vue'\n\nimport type { ShallowRef } from 'vue'\n\n// Keep input cursor in the correct position when we use formatter.\nexport function useCursor(\n input: ShallowRef<HTMLInputElement | undefined>\n): [() => void, () => void] {\n const selectionRef = ref<{\n selectionStart?: number\n selectionEnd?: number\n value?: string\n beforeTxt?: string\n afterTxt?: string\n }>()\n\n function recordCursor() {\n if (input.value == undefined) return\n\n const { selectionStart, selectionEnd, value } = input.value\n\n if (selectionStart == null || selectionEnd == null) return\n\n const beforeTxt = value.slice(0, Math.max(0, selectionStart))\n const afterTxt = value.slice(Math.max(0, selectionEnd))\n\n selectionRef.value = {\n selectionStart,\n selectionEnd,\n value,\n beforeTxt,\n afterTxt,\n }\n }\n function setCursor() {\n if (input.value == undefined || selectionRef.value == undefined) return\n\n const { value } = input.value\n const { beforeTxt, afterTxt, selectionStart } = selectionRef.value\n\n if (\n beforeTxt == undefined ||\n afterTxt == undefined ||\n selectionStart == undefined\n )\n return\n\n let startPos = value.length\n\n if (value.endsWith(afterTxt)) {\n startPos = value.length - afterTxt.length\n } else if (value.startsWith(beforeTxt)) {\n startPos = beforeTxt.length\n } else {\n const beforeLastChar = beforeTxt[selectionStart - 1]\n const newIndex = value.indexOf(beforeLastChar, selectionStart - 1)\n if (newIndex !== -1) {\n startPos = newIndex + 1\n }\n }\n\n input.value.setSelectionRange(startPos, startPos)\n }\n\n return [recordCursor, setCursor]\n}\n"],"names":[],"mappings":";;AACO,SAAS,SAAS,CAAC,KAAK,EAAE;AACjC,EAAE,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC;AAC7B,EAAE,SAAS,YAAY,GAAG;AAC1B,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC;AAC7B,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;AAChE,IAAI,IAAI,cAAc,IAAI,IAAI,IAAI,YAAY,IAAI,IAAI;AACtD,MAAM,OAAO;AACb,IAAI,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;AAClE,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC;AAC5D,IAAI,YAAY,CAAC,KAAK,GAAG;AACzB,MAAM,cAAc;AACpB,MAAM,YAAY;AAClB,MAAM,KAAK;AACX,MAAM,SAAS;AACf,MAAM,QAAQ;AACd,KAAK,CAAC;AACN,GAAG;AACH,EAAE,SAAS,SAAS,GAAG;AACvB,IAAI,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,YAAY,CAAC,KAAK,IAAI,KAAK,CAAC;AAC7D,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;AAClC,IAAI,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC;AACvE,IAAI,IAAI,SAAS,IAAI,KAAK,CAAC,IAAI,QAAQ,IAAI,KAAK,CAAC,IAAI,cAAc,IAAI,KAAK,CAAC;AAC7E,MAAM,OAAO;AACb,IAAI,IAAI,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;AAChC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;AAClC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AAChD,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;AAC5C,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAAC;AAClC,KAAK,MAAM;AACX,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;AAC3D,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,cAAc,GAAG,CAAC,CAAC,CAAC;AACzE,MAAM,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE;AAC3B,QAAQ,QAAQ,GAAG,QAAQ,GAAG,CAAC,CAAC;AAChC,OAAO;AACP,KAAK;AACL,IAAI,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,GAAG;AACH,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { onMounted, watchEffect, onBeforeUnmount } from 'vue';
|
|
2
2
|
import '../../utils/index.mjs';
|
|
3
|
-
import { addUnit } from '../../utils/
|
|
3
|
+
import { addUnit } from '../../utils/dom/style.mjs';
|
|
4
4
|
|
|
5
5
|
const useDraggable = (targetRef, dragRef, draggable) => {
|
|
6
6
|
let transform = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, unref } from 'vue'\nimport { useGlobalConfig } from '../use-global-config'\n\nconst defaultNamespace = 'el'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const useNamespace = (block: string) => {\n const globalConfig = useGlobalConfig('namespace')\n const namespace = computed(() => globalConfig.value || defaultNamespace)\n const b = (blockSuffix = '') =>\n _bem(unref(namespace), block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(unref(namespace), block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(unref(namespace), block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(unref(namespace), block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(unref(namespace), block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(unref(namespace), block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(unref(namespace), block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAC9B,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,IA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N,IAAI,EAAE;AACN,IAAI,GAAG;AACP,IAAI,EAAE;AACN,GAAG,CAAC;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, unref } from 'vue'\nimport { useGlobalConfig } from '../use-global-config'\n\nconst defaultNamespace = 'el'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const useNamespace = (block: string) => {\n const globalConfig = useGlobalConfig('namespace')\n const namespace = computed(() => globalConfig.value || defaultNamespace)\n const b = (blockSuffix = '') =>\n _bem(unref(namespace), block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(unref(namespace), block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(unref(namespace), block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(unref(namespace), block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(unref(namespace), block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(unref(namespace), block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(unref(namespace), block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"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O;AACT,IAAI,SAAS;AACb,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,GAAG;AACP,IAAI,EAAE;AACN,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -6,15 +6,18 @@ import { generateId } from '../../utils/rand.mjs';
|
|
|
6
6
|
let cachedContainer;
|
|
7
7
|
const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`;
|
|
8
8
|
const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`;
|
|
9
|
+
const createContainer = () => {
|
|
10
|
+
const container = document.createElement("div");
|
|
11
|
+
container.id = POPPER_CONTAINER_ID;
|
|
12
|
+
document.body.appendChild(container);
|
|
13
|
+
return container;
|
|
14
|
+
};
|
|
9
15
|
const usePopperContainer = () => {
|
|
10
16
|
onBeforeMount(() => {
|
|
11
17
|
if (!isClient)
|
|
12
18
|
return;
|
|
13
|
-
if (process.env.NODE_ENV === "test" || !cachedContainer) {
|
|
14
|
-
|
|
15
|
-
container.id = POPPER_CONTAINER_ID;
|
|
16
|
-
document.body.appendChild(container);
|
|
17
|
-
cachedContainer = container;
|
|
19
|
+
if (process.env.NODE_ENV === "test" || !cachedContainer || !document.body.querySelector(POPPER_CONTAINER_SELECTOR)) {
|
|
20
|
+
cachedContainer = createContainer();
|
|
18
21
|
}
|
|
19
22
|
});
|
|
20
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { onBeforeMount } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { generateId } from '@element-plus/utils'\n\nlet cachedContainer: HTMLElement\n\nexport const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`\n\nexport const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (!isClient) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (process.env.NODE_ENV === 'test'
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { onBeforeMount } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { generateId } from '@element-plus/utils'\n\nlet cachedContainer: HTMLElement\n\nexport const POPPER_CONTAINER_ID = `el-popper-container-${generateId()}`\n\nexport const POPPER_CONTAINER_SELECTOR = `#${POPPER_CONTAINER_ID}`\n\nconst createContainer = () => {\n const container = document.createElement('div')\n container.id = POPPER_CONTAINER_ID\n document.body.appendChild(container)\n return container\n}\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (!isClient) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (\n process.env.NODE_ENV === 'test' ||\n !cachedContainer ||\n !document.body.querySelector(POPPER_CONTAINER_SELECTOR)\n ) {\n cachedContainer = createContainer()\n }\n })\n}\n"],"names":[],"mappings":";;;;;AAGA,IAAI,eAAe,CAAC;AACR,MAAC,mBAAmB,GAAG,CAAC,oBAAoB,EAAE,UAAU,EAAE,CAAC,EAAE;AAC7D,MAAC,yBAAyB,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,EAAE;AACnE,MAAM,eAAe,GAAG,MAAM;AAC9B,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAClD,EAAE,SAAS,CAAC,EAAE,GAAG,mBAAmB,CAAC;AACrC,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACvC,EAAE,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACU,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAE,aAAa,CAAC,MAAM;AACtB,IAAI,IAAI,CAAC,QAAQ;AACjB,MAAM,OAAO;AACb,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,EAAE;AACxH,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;AAC1C,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;"}
|
package/es/index.mjs
CHANGED
|
@@ -176,7 +176,7 @@ export { ElNotification } from './components/notification/index.mjs';
|
|
|
176
176
|
export { ElPopover, ElPopoverDirective } from './components/popover/index.mjs';
|
|
177
177
|
export { EVENT_CODE } from './constants/aria.mjs';
|
|
178
178
|
export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
|
|
179
|
-
export { componentSizes } from './constants/size.mjs';
|
|
179
|
+
export { componentSizeMap, componentSizes } from './constants/size.mjs';
|
|
180
180
|
export { default as ClickOutside } from './directives/click-outside/index.mjs';
|
|
181
181
|
export { default as RepeatClick } from './directives/repeat-click/index.mjs';
|
|
182
182
|
export { default as TrapFocus } from './directives/trap-focus/index.mjs';
|
|
@@ -210,6 +210,7 @@ export { FORWARD_REF_INJECTION_KEY, useForwardRef, useForwardRefDirective } from
|
|
|
210
210
|
export { useNamespace } from './hooks/use-namespace/index.mjs';
|
|
211
211
|
export { useZIndex } from './hooks/use-z-index/index.mjs';
|
|
212
212
|
export { arrowMiddleware, getPositionDataWithUnit, useFloating, useFloatingProps } from './hooks/use-floating/index.mjs';
|
|
213
|
+
export { useCursor } from './hooks/use-cursor/index.mjs';
|
|
213
214
|
export { breadcrumbKey } from './tokens/breadcrumb.mjs';
|
|
214
215
|
export { buttonGroupContextKey } from './tokens/button.mjs';
|
|
215
216
|
export { carouselContextKey } from './tokens/carousel.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../packages/element-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@element-plus/components'\nexport * from '@element-plus/constants'\nexport * from '@element-plus/directives'\nexport * from '@element-plus/hooks'\nexport * from '@element-plus/tokens'\nexport { makeInstaller } from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer\n\nexport { default as dayjs } from 'dayjs'\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
|
package/es/utils/animation.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.mjs","sources":["../../../../packages/utils/animation.ts"],"sourcesContent":["export const cubic = (value: number): number => value ** 3\n\nexport const easeInOutCubic = (value: number): number =>\n value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2\n"],"names":[],"mappings":"AAAY,MAAC,KAAK,GAAG,CAAC,KAAK,KAAK,KAAK,IAAI,EAAE;
|
|
1
|
+
{"version":3,"file":"animation.mjs","sources":["../../../../packages/utils/animation.ts"],"sourcesContent":["export const cubic = (value: number): number => {\n return value ** 3\n}\n\nexport const easeInOutCubic = (value: number): number =>\n value < 0.5 ? cubic(value * 2) / 2 : 1 - cubic((1 - value) * 2) / 2\n"],"names":[],"mappings":"AAAY,MAAC,KAAK,GAAG,CAAC,KAAK,KAAK;AAChC,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC;AACpB,EAAE;AACU,MAAC,cAAc,GAAG,CAAC,KAAK,KAAK,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,GAAG;;;;"}
|
package/es/utils/dom/index.mjs
CHANGED
|
@@ -3,5 +3,5 @@ export { composeEventHandlers, off, on, once, whenMouse } from './event.mjs';
|
|
|
3
3
|
export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './position.mjs';
|
|
4
4
|
export { addResizeListener, removeResizeListener } from './resize-event.mjs';
|
|
5
5
|
export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from './scroll.mjs';
|
|
6
|
-
export { addClass, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './style.mjs';
|
|
6
|
+
export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './style.mjs';
|
|
7
7
|
//# sourceMappingURL=index.mjs.map
|
package/es/utils/dom/style.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export declare const removeClass: (el: Element, cls: string) => void;
|
|
|
6
6
|
export declare const getStyle: (element: HTMLElement, styleName: keyof CSSProperties) => string;
|
|
7
7
|
export declare const setStyle: (element: HTMLElement, styleName: CSSProperties | keyof CSSProperties, value?: string | number | undefined) => void;
|
|
8
8
|
export declare const removeStyle: (element: HTMLElement, style: CSSProperties | keyof CSSProperties) => void;
|
|
9
|
+
export declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
|
package/es/utils/dom/style.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { isClient } from '@vueuse/core';
|
|
1
|
+
import { isClient, isNumber } from '@vueuse/core';
|
|
2
2
|
import '../types.mjs';
|
|
3
3
|
import '../strings.mjs';
|
|
4
4
|
import { entriesOf, keysOf } from '../objects.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { debugWarn } from '../error.mjs';
|
|
6
|
+
import { camelize, isObject, isString } from '@vue/shared';
|
|
6
7
|
|
|
8
|
+
const SCOPE = "utils/dom/style";
|
|
7
9
|
const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
|
|
8
10
|
const hasClass = (el, cls) => {
|
|
9
11
|
if (!el || !cls)
|
|
@@ -58,6 +60,16 @@ const removeStyle = (element, style) => {
|
|
|
58
60
|
setStyle(element, style, "");
|
|
59
61
|
}
|
|
60
62
|
};
|
|
63
|
+
function addUnit(value, defaultUnit = "px") {
|
|
64
|
+
if (!value)
|
|
65
|
+
return "";
|
|
66
|
+
if (isString(value)) {
|
|
67
|
+
return value;
|
|
68
|
+
} else if (isNumber(value)) {
|
|
69
|
+
return `${value}${defaultUnit}`;
|
|
70
|
+
}
|
|
71
|
+
debugWarn(SCOPE, "binding value must be a string or number");
|
|
72
|
+
}
|
|
61
73
|
|
|
62
|
-
export { addClass, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle };
|
|
74
|
+
export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle };
|
|
63
75
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\nimport { isObject } from '../types'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport type { CSSProperties } from 'vue'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = element.style[styleName]\n if (style) return style\n const computed = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[styleName] : ''\n } catch {\n return element.style[styleName]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key = camelize(styleName)\n element.style[key] = value\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isClient } from '@vueuse/core'\nimport { isNumber, isObject, isString } from '../types'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = element.style[styleName]\n if (style) return style\n const computed = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[styleName] : ''\n } catch {\n return element.style[styleName]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key = camelize(styleName)\n element.style[key] = value\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value) return ''\n if (isString(value)) {\n return value\n } else if (isNumber(value)) {\n return `${value}${defaultUnit}`\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"names":[],"mappings":";;;;;;;AAKA,MAAM,KAAK,GAAG,iBAAiB,CAAC;AACpB,MAAC,gBAAgB,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;AACjF,MAAC,QAAQ,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK;AACrC,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,GAAG;AACjB,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,IAAI,GAA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;AACZ,IAAI,OAAO,EAAE,CAAC;AACd,EAAE,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACvB,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC9B,IAAI,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AACpC,GAAG;AACH,EAAE,SAAS,CAAC,KAAK,EAAE,0CAA0C,CAAC,CAAC;AAC/D;;;;"}
|
package/es/utils/index.mjs
CHANGED
|
@@ -16,13 +16,13 @@ export { composeEventHandlers, off, on, once, whenMouse } from './dom/event.mjs'
|
|
|
16
16
|
export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './dom/position.mjs';
|
|
17
17
|
export { addResizeListener, removeResizeListener } from './dom/resize-event.mjs';
|
|
18
18
|
export { getScrollBarWidth, getScrollContainer, isScroll, scrollIntoView } from './dom/scroll.mjs';
|
|
19
|
-
export { addClass, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './dom/style.mjs';
|
|
19
|
+
export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './dom/style.mjs';
|
|
20
20
|
export { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from './vue/global-node.mjs';
|
|
21
21
|
export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from './vue/icon.mjs';
|
|
22
22
|
export { withInstall, withInstallFunction, withNoopInstall } from './vue/install.mjs';
|
|
23
23
|
export { buildProp, buildProps, definePropType, propKey } from './vue/props.mjs';
|
|
24
24
|
export { composeRefs } from './vue/refs.mjs';
|
|
25
|
-
export {
|
|
25
|
+
export { getComponentSize } from './vue/size.mjs';
|
|
26
26
|
export { isValidComponentSize, isValidDatePickType } from './vue/validator.mjs';
|
|
27
27
|
export { PatchFlags, ensureOnlyChild, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vue/vnode.mjs';
|
|
28
28
|
export { castArray as ensureArray } from 'lodash-unified';
|
package/es/utils/vue/index.d.ts
CHANGED
package/es/utils/vue/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsM
|
|
|
3
3
|
export { withInstall, withInstallFunction, withNoopInstall } from './install.mjs';
|
|
4
4
|
export { buildProp, buildProps, definePropType, propKey } from './props.mjs';
|
|
5
5
|
export { composeRefs } from './refs.mjs';
|
|
6
|
-
export {
|
|
6
|
+
export { getComponentSize } from './size.mjs';
|
|
7
7
|
import './typescript.mjs';
|
|
8
8
|
export { isValidComponentSize, isValidDatePickType } from './validator.mjs';
|
|
9
9
|
export { PatchFlags, ensureOnlyChild, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vnode.mjs';
|
package/es/utils/vue/refs.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refs.mjs","sources":["../../../../../packages/utils/vue/refs.ts"],"sourcesContent":["import { isFunction } from '
|
|
1
|
+
{"version":3,"file":"refs.mjs","sources":["../../../../../packages/utils/vue/refs.ts"],"sourcesContent":["import { isFunction } from '../types'\n\nimport type { ComponentPublicInstance, Ref } from 'vue'\n\nexport type RefSetter = (\n el: Element | ComponentPublicInstance | undefined\n) => void\n\nexport const composeRefs = (\n ...refs: (Ref<HTMLElement | undefined> | RefSetter)[]\n) => {\n return (el: Element | ComponentPublicInstance | null) => {\n refs.forEach((ref) => {\n if (isFunction(ref)) {\n ref(el as Element | ComponentPublicInstance)\n } else {\n ref.value = el as HTMLElement | undefined\n }\n })\n }\n}\n"],"names":[],"mappings":";;;AACY,MAAC,WAAW,GAAG,CAAC,GAAG,IAAI,KAAK;AACxC,EAAE,OAAO,CAAC,EAAE,KAAK;AACjB,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1B,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE;AAC3B,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC;AAChB,OAAO,MAAM;AACb,QAAQ,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC;AACvB,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getComponentSize: (size?: "" | "default" | "small" | "large" | undefined) => 40 | 32 | 24;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.mjs","sources":["../../../../../packages/utils/vue/size.ts"],"sourcesContent":["import { componentSizeMap } from '@element-plus/constants'\n\nimport type { ComponentSize } from '@element-plus/constants'\n\nexport const getComponentSize = (size?: ComponentSize) => {\n return componentSizeMap[size || 'default']\n}\n"],"names":[],"mappings":";;;AACY,MAAC,gBAAgB,GAAG,CAAC,IAAI,KAAK;AAC1C,EAAE,OAAO,gBAAgB,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC;AAC7C;;;;"}
|
package/es/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.1.
|
|
1
|
+
export declare const version = "2.1.11";
|
package/es/version.mjs
CHANGED
package/es/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.1.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '2.1.11'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
|