@element-plus/nightly 0.0.20250710 → 0.0.20250712
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 +5 -0
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +17 -9
- package/dist/index.full.min.js +4 -4
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +17 -9
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +41 -108
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +108 -41
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +89 -31
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +31 -89
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
- package/es/components/checkbox/src/checkbox.d.ts +3 -3
- package/es/components/checkbox/src/checkbox.vue.d.ts +6 -6
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +399 -44
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +44 -399
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/date-picker/src/date-picker.d.ts +3 -3
- package/es/components/date-picker/src/props/date-picker.d.ts +1 -1
- package/es/components/descriptions/src/description2.mjs +1 -1
- package/es/components/descriptions/src/descriptions-row.mjs +6 -63
- package/es/components/descriptions/src/descriptions-row.mjs.map +1 -1
- package/es/components/descriptions/src/descriptions-row2.mjs +63 -6
- package/es/components/descriptions/src/descriptions-row2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +2 -2
- package/es/components/index.mjs +12 -12
- package/es/components/input-number/src/input-number.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +7 -0
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/message/src/message.vue.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/content.mjs +88 -130
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +130 -88
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.d.ts +3 -3
- package/es/components/radio/src/radio-button.vue.d.ts +9 -9
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.d.ts +6 -6
- package/es/components/radio/src/radio.vue.d.ts +9 -9
- package/es/components/radio/src/use-radio.d.ts +2 -2
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/segmented/index.d.ts +7 -7
- package/es/components/segmented/src/segmented.d.ts +1 -1
- package/es/components/segmented/src/segmented.vue.d.ts +3 -3
- package/es/components/select/src/option.d.ts +1 -1
- package/es/components/select/src/option.vue.d.ts +2 -2
- package/es/components/select/src/select.d.ts +1 -1
- package/es/components/select/src/select.vue.d.ts +5 -5
- package/es/components/select/src/useSelect.d.ts +2 -2
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -69
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +69 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +35 -41
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +41 -35
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +2 -2
- package/es/components/table/src/table-column/index.d.ts +4 -4
- package/es/components/tabs/index.mjs +2 -2
- package/es/components/tabs/src/tab-pane.mjs +82 -13
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +13 -82
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue.d.ts +3 -3
- package/es/components/time-picker/src/common/props.d.ts +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +3 -3
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +14 -72
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +72 -14
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +1 -1
- package/es/components/tour/src/content.mjs +43 -67
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +67 -43
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/components/tree-select/src/tree-select-option.d.ts +8 -8
- package/es/components/tree-v2/src/tree.mjs +3 -2
- package/es/components/tree-v2/src/tree.mjs.map +1 -1
- package/es/components/tree-v2/src/tree.vue.d.ts +3 -0
- package/es/components/tree-v2/src/virtual-tree.d.ts +1 -0
- package/es/components/tree-v2/src/virtual-tree.mjs +2 -1
- package/es/components/tree-v2/src/virtual-tree.mjs.map +1 -1
- package/es/components/virtual-list/src/builders/build-list.mjs +2 -1
- package/es/components/virtual-list/src/builders/build-list.mjs.map +1 -1
- package/es/index.d.ts +94 -90
- package/es/index.mjs +12 -12
- package/es/utils/vue/props/util.d.ts +0 -31
- package/es/utils/vue3.3.polyfill.d.ts +34 -0
- package/es/utils/vue3.3.polyfill.mjs +2 -0
- package/es/utils/vue3.3.polyfill.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.js +2 -2
- package/lib/components/alert/src/alert.js +42 -107
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +107 -42
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +89 -35
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +35 -89
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/index.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +6 -6
- package/lib/components/checkbox/src/checkbox.d.ts +3 -3
- package/lib/components/checkbox/src/checkbox.vue.d.ts +6 -6
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +398 -45
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +45 -398
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/date-picker/src/date-picker.d.ts +3 -3
- package/lib/components/date-picker/src/props/date-picker.d.ts +1 -1
- package/lib/components/descriptions/src/description2.js +1 -1
- package/lib/components/descriptions/src/descriptions-row.js +6 -63
- package/lib/components/descriptions/src/descriptions-row.js.map +1 -1
- package/lib/components/descriptions/src/descriptions-row2.js +63 -6
- package/lib/components/descriptions/src/descriptions-row2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +2 -2
- package/lib/components/index.js +12 -12
- package/lib/components/input-number/src/input-number.js +2 -2
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +7 -0
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/message/src/message.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/content.js +93 -130
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +130 -93
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.d.ts +3 -3
- package/lib/components/radio/src/radio-button.vue.d.ts +9 -9
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.d.ts +6 -6
- package/lib/components/radio/src/radio.vue.d.ts +9 -9
- package/lib/components/radio/src/use-radio.d.ts +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/segmented/index.d.ts +7 -7
- package/lib/components/segmented/src/segmented.d.ts +1 -1
- package/lib/components/segmented/src/segmented.vue.d.ts +3 -3
- package/lib/components/select/src/option.d.ts +1 -1
- package/lib/components/select/src/option.vue.d.ts +2 -2
- package/lib/components/select/src/select.d.ts +1 -1
- package/lib/components/select/src/select.vue.d.ts +5 -5
- package/lib/components/select/src/useSelect.d.ts +2 -2
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -69
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +69 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +36 -41
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +41 -36
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +2 -2
- package/lib/components/table/src/table-column/index.d.ts +4 -4
- package/lib/components/tabs/index.js +2 -2
- package/lib/components/tabs/src/tab-pane.js +82 -13
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +13 -82
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue.d.ts +3 -3
- package/lib/components/time-picker/src/common/props.d.ts +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +3 -3
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +14 -72
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +72 -14
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +1 -1
- package/lib/components/tour/src/content.js +46 -67
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +67 -46
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/components/tree-select/src/tree-select-option.d.ts +8 -8
- package/lib/components/tree-v2/src/tree.js +3 -2
- package/lib/components/tree-v2/src/tree.js.map +1 -1
- package/lib/components/tree-v2/src/tree.vue.d.ts +3 -0
- package/lib/components/tree-v2/src/virtual-tree.d.ts +1 -0
- package/lib/components/tree-v2/src/virtual-tree.js +2 -1
- package/lib/components/tree-v2/src/virtual-tree.js.map +1 -1
- package/lib/components/virtual-list/src/builders/build-list.js +2 -1
- package/lib/components/virtual-list/src/builders/build-list.js.map +1 -1
- package/lib/index.d.ts +94 -90
- package/lib/index.js +12 -12
- package/lib/utils/vue/props/util.d.ts +0 -31
- package/lib/utils/vue3.3.polyfill.d.ts +34 -0
- package/lib/utils/vue3.3.polyfill.js +3 -0
- package/lib/utils/vue3.3.polyfill.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 +2 -2
- package/tags.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/dark/css-vars.css +1 -1
- package/theme-chalk/el-var.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +6 -4
- package/theme-chalk/src/dark/var.scss +7 -4
- package/theme-chalk/src/mixins/function.scss +11 -0
- package/web-types.json +1 -1
@@ -1,13 +1,65 @@
|
|
1
|
-
import {
|
2
|
-
import
|
1
|
+
import { ref, provide, inject, onMounted, unref, onBeforeUnmount } from 'vue';
|
2
|
+
import Collection from './collection2.mjs';
|
3
|
+
import CollectionItem from './collection-item.mjs';
|
3
4
|
|
4
|
-
const
|
5
|
-
|
6
|
-
}
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
const COLLECTION_ITEM_SIGN = `data-el-collection-item`;
|
6
|
+
const createCollectionWithScope = (name) => {
|
7
|
+
const COLLECTION_NAME = `El${name}Collection`;
|
8
|
+
const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`;
|
9
|
+
const COLLECTION_INJECTION_KEY = Symbol(COLLECTION_NAME);
|
10
|
+
const COLLECTION_ITEM_INJECTION_KEY = Symbol(COLLECTION_ITEM_NAME);
|
11
|
+
const ElCollection = {
|
12
|
+
...Collection,
|
13
|
+
name: COLLECTION_NAME,
|
14
|
+
setup() {
|
15
|
+
const collectionRef = ref();
|
16
|
+
const itemMap = /* @__PURE__ */ new Map();
|
17
|
+
const getItems = () => {
|
18
|
+
const collectionEl = unref(collectionRef);
|
19
|
+
if (!collectionEl)
|
20
|
+
return [];
|
21
|
+
const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
|
22
|
+
const items = [...itemMap.values()];
|
23
|
+
return items.sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
|
24
|
+
};
|
25
|
+
provide(COLLECTION_INJECTION_KEY, {
|
26
|
+
itemMap,
|
27
|
+
getItems,
|
28
|
+
collectionRef
|
29
|
+
});
|
30
|
+
}
|
31
|
+
};
|
32
|
+
const ElCollectionItem = {
|
33
|
+
...CollectionItem,
|
34
|
+
name: COLLECTION_ITEM_NAME,
|
35
|
+
setup(_, { attrs }) {
|
36
|
+
const collectionItemRef = ref();
|
37
|
+
const collectionInjection = inject(COLLECTION_INJECTION_KEY, void 0);
|
38
|
+
provide(COLLECTION_ITEM_INJECTION_KEY, {
|
39
|
+
collectionItemRef
|
40
|
+
});
|
41
|
+
onMounted(() => {
|
42
|
+
const collectionItemEl = unref(collectionItemRef);
|
43
|
+
if (collectionItemEl) {
|
44
|
+
collectionInjection.itemMap.set(collectionItemEl, {
|
45
|
+
ref: collectionItemEl,
|
46
|
+
...attrs
|
47
|
+
});
|
48
|
+
}
|
49
|
+
});
|
50
|
+
onBeforeUnmount(() => {
|
51
|
+
const collectionItemEl = unref(collectionItemRef);
|
52
|
+
collectionInjection.itemMap.delete(collectionItemEl);
|
53
|
+
});
|
54
|
+
}
|
55
|
+
};
|
56
|
+
return {
|
57
|
+
COLLECTION_INJECTION_KEY,
|
58
|
+
COLLECTION_ITEM_INJECTION_KEY,
|
59
|
+
ElCollection,
|
60
|
+
ElCollectionItem
|
61
|
+
};
|
62
|
+
};
|
11
63
|
|
12
|
-
export {
|
64
|
+
export { COLLECTION_ITEM_SIGN, createCollectionWithScope };
|
13
65
|
//# sourceMappingURL=collection.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collection.mjs","sources":["../../../../../../packages/components/collection/src/collection.
|
1
|
+
{"version":3,"file":"collection.mjs","sources":["../../../../../../packages/components/collection/src/collection.ts"],"sourcesContent":["import { inject, onBeforeUnmount, onMounted, provide, ref, unref } from 'vue'\nimport Collection from './collection.vue'\nimport CollectionItem from './collection-item.vue'\n\nimport type { InjectionKey, SetupContext } from 'vue'\nimport type {\n ElCollectionInjectionContext,\n ElCollectionItemInjectionContext,\n} from './tokens'\n\nexport const COLLECTION_ITEM_SIGN = `data-el-collection-item`\n\n// Make sure the first letter of name is capitalized\nexport const createCollectionWithScope = (name: string) => {\n const COLLECTION_NAME = `El${name}Collection`\n const COLLECTION_ITEM_NAME = `${COLLECTION_NAME}Item`\n const COLLECTION_INJECTION_KEY: InjectionKey<ElCollectionInjectionContext> =\n Symbol(COLLECTION_NAME)\n const COLLECTION_ITEM_INJECTION_KEY: InjectionKey<ElCollectionItemInjectionContext> =\n Symbol(COLLECTION_ITEM_NAME)\n\n const ElCollection = {\n ...Collection,\n name: COLLECTION_NAME,\n setup() {\n const collectionRef = ref<HTMLElement>()\n const itemMap: ElCollectionInjectionContext['itemMap'] = new Map()\n const getItems = () => {\n const collectionEl = unref(collectionRef)\n\n if (!collectionEl) return []\n const orderedNodes = Array.from(\n collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`)\n )\n\n const items = [...itemMap.values()]\n\n return items.sort(\n (a, b) => orderedNodes.indexOf(a.ref!) - orderedNodes.indexOf(b.ref!)\n )\n }\n\n provide(COLLECTION_INJECTION_KEY, {\n itemMap,\n getItems,\n collectionRef,\n })\n },\n }\n\n const ElCollectionItem = {\n ...CollectionItem,\n name: COLLECTION_ITEM_NAME,\n setup(_: unknown, { attrs }: SetupContext) {\n const collectionItemRef = ref<HTMLElement>()\n const collectionInjection = inject(COLLECTION_INJECTION_KEY, undefined)!\n\n provide(COLLECTION_ITEM_INJECTION_KEY, {\n collectionItemRef,\n })\n\n onMounted(() => {\n const collectionItemEl = unref(collectionItemRef)\n if (collectionItemEl) {\n collectionInjection.itemMap.set(collectionItemEl, {\n ref: collectionItemEl,\n ...attrs,\n })\n }\n })\n\n onBeforeUnmount(() => {\n const collectionItemEl = unref(collectionItemRef)!\n collectionInjection.itemMap.delete(collectionItemEl)\n })\n },\n }\n\n return {\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n ElCollection,\n ElCollectionItem,\n }\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,oBAAoB,GAAG,CAAC,uBAAuB,EAAE;AAClD,MAAC,yBAAyB,GAAG,CAAC,IAAI,KAAK;AACnD,EAAE,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,EAAE,MAAM,oBAAoB,GAAG,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;AACxD,EAAE,MAAM,wBAAwB,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;AAC3D,EAAE,MAAM,6BAA6B,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACrE,EAAE,MAAM,YAAY,GAAG;AACvB,IAAI,GAAG,UAAU;AACjB,IAAI,IAAI,EAAE,eAAe;AACzB,IAAI,KAAK,GAAG;AACZ,MAAM,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC;AAClC,MAAM,MAAM,OAAO,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAChD,MAAM,MAAM,QAAQ,GAAG,MAAM;AAC7B,QAAQ,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC;AAClD,QAAQ,IAAI,CAAC,YAAY;AACzB,UAAU,OAAO,EAAE,CAAC;AACpB,QAAQ,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpG,QAAQ,MAAM,KAAK,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAC5C,QAAQ,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/F,OAAO,CAAC;AACR,MAAM,OAAO,CAAC,wBAAwB,EAAE;AACxC,QAAQ,OAAO;AACf,QAAQ,QAAQ;AAChB,QAAQ,aAAa;AACrB,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,MAAM,gBAAgB,GAAG;AAC3B,IAAI,GAAG,cAAc;AACrB,IAAI,IAAI,EAAE,oBAAoB;AAC9B,IAAI,KAAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE;AACxB,MAAM,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC;AACtC,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3E,MAAM,OAAO,CAAC,6BAA6B,EAAE;AAC7C,QAAQ,iBAAiB;AACzB,OAAO,CAAC,CAAC;AACT,MAAM,SAAS,CAAC,MAAM;AACtB,QAAQ,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAC1D,QAAQ,IAAI,gBAAgB,EAAE;AAC9B,UAAU,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;AAC5D,YAAY,GAAG,EAAE,gBAAgB;AACjC,YAAY,GAAG,KAAK;AACpB,WAAW,CAAC,CAAC;AACb,SAAS;AACT,OAAO,CAAC,CAAC;AACT,MAAM,eAAe,CAAC,MAAM;AAC5B,QAAQ,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAC1D,QAAQ,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAC7D,OAAO,CAAC,CAAC;AACT,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,wBAAwB;AAC5B,IAAI,6BAA6B;AACjC,IAAI,YAAY;AAChB,IAAI,gBAAgB;AACpB,GAAG,CAAC;AACJ;;;;"}
|
@@ -1,65 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import CollectionItem from './collection-item.mjs';
|
1
|
+
import { defineComponent, renderSlot } from 'vue';
|
2
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
3
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
...Collection,
|
13
|
-
name: COLLECTION_NAME,
|
14
|
-
setup() {
|
15
|
-
const collectionRef = ref();
|
16
|
-
const itemMap = /* @__PURE__ */ new Map();
|
17
|
-
const getItems = () => {
|
18
|
-
const collectionEl = unref(collectionRef);
|
19
|
-
if (!collectionEl)
|
20
|
-
return [];
|
21
|
-
const orderedNodes = Array.from(collectionEl.querySelectorAll(`[${COLLECTION_ITEM_SIGN}]`));
|
22
|
-
const items = [...itemMap.values()];
|
23
|
-
return items.sort((a, b) => orderedNodes.indexOf(a.ref) - orderedNodes.indexOf(b.ref));
|
24
|
-
};
|
25
|
-
provide(COLLECTION_INJECTION_KEY, {
|
26
|
-
itemMap,
|
27
|
-
getItems,
|
28
|
-
collectionRef
|
29
|
-
});
|
30
|
-
}
|
31
|
-
};
|
32
|
-
const ElCollectionItem = {
|
33
|
-
...CollectionItem,
|
34
|
-
name: COLLECTION_ITEM_NAME,
|
35
|
-
setup(_, { attrs }) {
|
36
|
-
const collectionItemRef = ref();
|
37
|
-
const collectionInjection = inject(COLLECTION_INJECTION_KEY, void 0);
|
38
|
-
provide(COLLECTION_ITEM_INJECTION_KEY, {
|
39
|
-
collectionItemRef
|
40
|
-
});
|
41
|
-
onMounted(() => {
|
42
|
-
const collectionItemEl = unref(collectionItemRef);
|
43
|
-
if (collectionItemEl) {
|
44
|
-
collectionInjection.itemMap.set(collectionItemEl, {
|
45
|
-
ref: collectionItemEl,
|
46
|
-
...attrs
|
47
|
-
});
|
48
|
-
}
|
49
|
-
});
|
50
|
-
onBeforeUnmount(() => {
|
51
|
-
const collectionItemEl = unref(collectionItemRef);
|
52
|
-
collectionInjection.itemMap.delete(collectionItemEl);
|
53
|
-
});
|
54
|
-
}
|
55
|
-
};
|
56
|
-
return {
|
57
|
-
COLLECTION_INJECTION_KEY,
|
58
|
-
COLLECTION_ITEM_INJECTION_KEY,
|
59
|
-
ElCollection,
|
60
|
-
ElCollectionItem
|
61
|
-
};
|
62
|
-
};
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
5
|
+
inheritAttrs: false
|
6
|
+
});
|
7
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
8
|
+
return renderSlot(_ctx.$slots, "default");
|
9
|
+
}
|
10
|
+
var Collection = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "collection.vue"]]);
|
63
11
|
|
64
|
-
export {
|
12
|
+
export { Collection as default };
|
65
13
|
//# sourceMappingURL=collection2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"collection2.mjs","sources":["../../../../../../packages/components/collection/src/collection.
|
1
|
+
{"version":3,"file":"collection2.mjs","sources":["../../../../../../packages/components/collection/src/collection.vue"],"sourcesContent":["<template>\n <slot />\n</template>\n\n<script lang=\"ts\" setup>\ndefineOptions({\n inheritAttrs: false,\n})\n</script>\n"],"names":["DO_defineComponent","_renderSlot"],"mappings":";;;kCAKcA,eAAA,CAAA;AAAA,EACZ,YAAc,EAAA,KAAA;AAChB,CAAA,CAAA,CAAA;;SANEC,UAAQ,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA,CAAA;;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import ColorPicker from './src/color-
|
2
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './src/color-
|
1
|
+
import ColorPicker from './src/color-picker.mjs';
|
2
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './src/color-picker2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElColorPicker = withInstall(ColorPicker);
|
@@ -1,49 +1,404 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
1
|
+
import { defineComponent, ref, reactive, computed, onMounted, watch, nextTick, provide, openBlock, createBlock, unref, withCtx, withDirectives, createElementBlock, withKeys, createElementVNode, normalizeClass, createVNode, createCommentVNode, createTextVNode, toDisplayString, mergeProps, normalizeStyle, vShow } from 'vue';
|
2
|
+
import { debounce } from 'lodash-unified';
|
3
|
+
import { ElButton } from '../../button/index.mjs';
|
4
|
+
import { ElIcon } from '../../icon/index.mjs';
|
5
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
6
|
+
import { ElInput } from '../../input/index.mjs';
|
7
|
+
import { ArrowDown, Close } from '@element-plus/icons-vue';
|
8
|
+
import AlphaSlider from './components/alpha-slider.mjs';
|
9
|
+
import HueSlider from './components/hue-slider.mjs';
|
10
|
+
import Predefine from './components/predefine.mjs';
|
11
|
+
import SvPanel from './components/sv-panel.mjs';
|
12
|
+
import Color from './utils/color.mjs';
|
13
|
+
import { colorPickerProps, colorPickerEmits, colorPickerContextKey } from './color-picker2.mjs';
|
14
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
15
|
+
import ClickOutside from '../../../directives/click-outside/index.mjs';
|
16
|
+
import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
17
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
18
|
+
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
19
|
+
import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
20
|
+
import { useEmptyValues } from '../../../hooks/use-empty-values/index.mjs';
|
21
|
+
import { useFocusController } from '../../../hooks/use-focus-controller/index.mjs';
|
7
22
|
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
8
|
-
import {
|
23
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
24
|
+
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
9
25
|
|
10
|
-
const
|
11
|
-
|
12
|
-
type: definePropType(String),
|
13
|
-
default: void 0
|
14
|
-
},
|
15
|
-
id: String,
|
16
|
-
showAlpha: Boolean,
|
17
|
-
colorFormat: String,
|
18
|
-
disabled: Boolean,
|
19
|
-
size: useSizeProp,
|
20
|
-
popperClass: {
|
21
|
-
type: String,
|
22
|
-
default: ""
|
23
|
-
},
|
24
|
-
tabindex: {
|
25
|
-
type: [String, Number],
|
26
|
-
default: 0
|
27
|
-
},
|
28
|
-
teleported: useTooltipContentProps.teleported,
|
29
|
-
predefine: {
|
30
|
-
type: definePropType(Array)
|
31
|
-
},
|
32
|
-
validateEvent: {
|
33
|
-
type: Boolean,
|
34
|
-
default: true
|
35
|
-
},
|
36
|
-
...useEmptyValuesProps,
|
37
|
-
...useAriaProps(["ariaLabel"])
|
26
|
+
const __default__ = defineComponent({
|
27
|
+
name: "ElColorPicker"
|
38
28
|
});
|
39
|
-
const
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
};
|
46
|
-
const
|
29
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
30
|
+
...__default__,
|
31
|
+
props: colorPickerProps,
|
32
|
+
emits: colorPickerEmits,
|
33
|
+
setup(__props, { expose, emit }) {
|
34
|
+
const props = __props;
|
35
|
+
const { t } = useLocale();
|
36
|
+
const ns = useNamespace("color");
|
37
|
+
const { formItem } = useFormItem();
|
38
|
+
const colorSize = useFormSize();
|
39
|
+
const colorDisabled = useFormDisabled();
|
40
|
+
const { valueOnClear, isEmptyValue } = useEmptyValues(props, null);
|
41
|
+
const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {
|
42
|
+
formItemContext: formItem
|
43
|
+
});
|
44
|
+
const hue = ref();
|
45
|
+
const sv = ref();
|
46
|
+
const alpha = ref();
|
47
|
+
const popper = ref();
|
48
|
+
const triggerRef = ref();
|
49
|
+
const inputRef = ref();
|
50
|
+
const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {
|
51
|
+
disabled: colorDisabled,
|
52
|
+
beforeBlur(event) {
|
53
|
+
var _a;
|
54
|
+
return (_a = popper.value) == null ? void 0 : _a.isFocusInsideContent(event);
|
55
|
+
},
|
56
|
+
afterBlur() {
|
57
|
+
setShowPicker(false);
|
58
|
+
resetColor();
|
59
|
+
}
|
60
|
+
});
|
61
|
+
let shouldActiveChange = true;
|
62
|
+
const color = reactive(new Color({
|
63
|
+
enableAlpha: props.showAlpha,
|
64
|
+
format: props.colorFormat || "",
|
65
|
+
value: props.modelValue
|
66
|
+
}));
|
67
|
+
const showPicker = ref(false);
|
68
|
+
const showPanelColor = ref(false);
|
69
|
+
const customInput = ref("");
|
70
|
+
const displayedColor = computed(() => {
|
71
|
+
if (!props.modelValue && !showPanelColor.value) {
|
72
|
+
return "transparent";
|
73
|
+
}
|
74
|
+
return displayedRgb(color, props.showAlpha);
|
75
|
+
});
|
76
|
+
const currentColor = computed(() => {
|
77
|
+
return !props.modelValue && !showPanelColor.value ? "" : color.value;
|
78
|
+
});
|
79
|
+
const buttonAriaLabel = computed(() => {
|
80
|
+
return !isLabeledByFormItem.value ? props.ariaLabel || t("el.colorpicker.defaultLabel") : void 0;
|
81
|
+
});
|
82
|
+
const buttonAriaLabelledby = computed(() => {
|
83
|
+
return isLabeledByFormItem.value ? formItem == null ? void 0 : formItem.labelId : void 0;
|
84
|
+
});
|
85
|
+
const btnKls = computed(() => {
|
86
|
+
return [
|
87
|
+
ns.b("picker"),
|
88
|
+
ns.is("disabled", colorDisabled.value),
|
89
|
+
ns.bm("picker", colorSize.value),
|
90
|
+
ns.is("focused", isFocused.value)
|
91
|
+
];
|
92
|
+
});
|
93
|
+
function displayedRgb(color2, showAlpha) {
|
94
|
+
const { r, g, b, a } = color2.toRgb();
|
95
|
+
return showAlpha ? `rgba(${r}, ${g}, ${b}, ${a})` : `rgb(${r}, ${g}, ${b})`;
|
96
|
+
}
|
97
|
+
function setShowPicker(value) {
|
98
|
+
showPicker.value = value;
|
99
|
+
}
|
100
|
+
const debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true });
|
101
|
+
function show() {
|
102
|
+
if (colorDisabled.value)
|
103
|
+
return;
|
104
|
+
setShowPicker(true);
|
105
|
+
}
|
106
|
+
function hide() {
|
107
|
+
debounceSetShowPicker(false);
|
108
|
+
resetColor();
|
109
|
+
}
|
110
|
+
function resetColor() {
|
111
|
+
nextTick(() => {
|
112
|
+
if (props.modelValue) {
|
113
|
+
color.fromString(props.modelValue);
|
114
|
+
} else {
|
115
|
+
color.value = "";
|
116
|
+
if (!currentColor.value && customInput.value) {
|
117
|
+
customInput.value = "";
|
118
|
+
}
|
119
|
+
nextTick(() => {
|
120
|
+
showPanelColor.value = false;
|
121
|
+
});
|
122
|
+
}
|
123
|
+
});
|
124
|
+
}
|
125
|
+
function handleTrigger() {
|
126
|
+
if (colorDisabled.value)
|
127
|
+
return;
|
128
|
+
if (showPicker.value) {
|
129
|
+
resetColor();
|
130
|
+
}
|
131
|
+
debounceSetShowPicker(!showPicker.value);
|
132
|
+
}
|
133
|
+
function handleConfirm() {
|
134
|
+
color.fromString(customInput.value);
|
135
|
+
if (color.value !== customInput.value) {
|
136
|
+
customInput.value = color.value;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
function confirmValue() {
|
140
|
+
const value = isEmptyValue(color.value) ? valueOnClear.value : color.value;
|
141
|
+
emit(UPDATE_MODEL_EVENT, value);
|
142
|
+
emit(CHANGE_EVENT, value);
|
143
|
+
if (props.validateEvent) {
|
144
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
145
|
+
}
|
146
|
+
debounceSetShowPicker(false);
|
147
|
+
nextTick(() => {
|
148
|
+
const newColor = new Color({
|
149
|
+
enableAlpha: props.showAlpha,
|
150
|
+
format: props.colorFormat || "",
|
151
|
+
value: props.modelValue
|
152
|
+
});
|
153
|
+
if (!color.compare(newColor)) {
|
154
|
+
resetColor();
|
155
|
+
}
|
156
|
+
});
|
157
|
+
}
|
158
|
+
function clear() {
|
159
|
+
debounceSetShowPicker(false);
|
160
|
+
emit(UPDATE_MODEL_EVENT, valueOnClear.value);
|
161
|
+
emit(CHANGE_EVENT, valueOnClear.value);
|
162
|
+
if (props.modelValue !== valueOnClear.value && props.validateEvent) {
|
163
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
164
|
+
}
|
165
|
+
resetColor();
|
166
|
+
}
|
167
|
+
function handleClickOutside() {
|
168
|
+
if (!showPicker.value)
|
169
|
+
return;
|
170
|
+
hide();
|
171
|
+
isFocused.value && focus();
|
172
|
+
}
|
173
|
+
function handleEsc(event) {
|
174
|
+
event.preventDefault();
|
175
|
+
event.stopPropagation();
|
176
|
+
setShowPicker(false);
|
177
|
+
resetColor();
|
178
|
+
}
|
179
|
+
function handleKeyDown(event) {
|
180
|
+
switch (event.code) {
|
181
|
+
case EVENT_CODE.enter:
|
182
|
+
case EVENT_CODE.numpadEnter:
|
183
|
+
case EVENT_CODE.space:
|
184
|
+
event.preventDefault();
|
185
|
+
event.stopPropagation();
|
186
|
+
show();
|
187
|
+
inputRef.value.focus();
|
188
|
+
break;
|
189
|
+
case EVENT_CODE.esc:
|
190
|
+
handleEsc(event);
|
191
|
+
break;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
function focus() {
|
195
|
+
triggerRef.value.focus();
|
196
|
+
}
|
197
|
+
function blur() {
|
198
|
+
triggerRef.value.blur();
|
199
|
+
}
|
200
|
+
onMounted(() => {
|
201
|
+
if (props.modelValue) {
|
202
|
+
customInput.value = currentColor.value;
|
203
|
+
}
|
204
|
+
});
|
205
|
+
watch(() => props.modelValue, (newVal) => {
|
206
|
+
if (!newVal) {
|
207
|
+
showPanelColor.value = false;
|
208
|
+
} else if (newVal && newVal !== color.value) {
|
209
|
+
shouldActiveChange = false;
|
210
|
+
color.fromString(newVal);
|
211
|
+
}
|
212
|
+
});
|
213
|
+
watch(() => [props.colorFormat, props.showAlpha], () => {
|
214
|
+
color.enableAlpha = props.showAlpha;
|
215
|
+
color.format = props.colorFormat || color.format;
|
216
|
+
color.doOnChange();
|
217
|
+
emit(UPDATE_MODEL_EVENT, color.value);
|
218
|
+
});
|
219
|
+
watch(() => currentColor.value, (val) => {
|
220
|
+
customInput.value = val;
|
221
|
+
shouldActiveChange && emit("activeChange", val);
|
222
|
+
shouldActiveChange = true;
|
223
|
+
});
|
224
|
+
watch(() => color.value, () => {
|
225
|
+
if (!props.modelValue && !showPanelColor.value) {
|
226
|
+
showPanelColor.value = true;
|
227
|
+
}
|
228
|
+
});
|
229
|
+
watch(() => showPicker.value, () => {
|
230
|
+
nextTick(() => {
|
231
|
+
var _a, _b, _c;
|
232
|
+
(_a = hue.value) == null ? void 0 : _a.update();
|
233
|
+
(_b = sv.value) == null ? void 0 : _b.update();
|
234
|
+
(_c = alpha.value) == null ? void 0 : _c.update();
|
235
|
+
});
|
236
|
+
});
|
237
|
+
provide(colorPickerContextKey, {
|
238
|
+
currentColor
|
239
|
+
});
|
240
|
+
expose({
|
241
|
+
color,
|
242
|
+
show,
|
243
|
+
hide,
|
244
|
+
focus,
|
245
|
+
blur
|
246
|
+
});
|
247
|
+
return (_ctx, _cache) => {
|
248
|
+
return openBlock(), createBlock(unref(ElTooltip), {
|
249
|
+
ref_key: "popper",
|
250
|
+
ref: popper,
|
251
|
+
visible: showPicker.value,
|
252
|
+
"show-arrow": false,
|
253
|
+
"fallback-placements": ["bottom", "top", "right", "left"],
|
254
|
+
offset: 0,
|
255
|
+
"gpu-acceleration": false,
|
256
|
+
"popper-class": [unref(ns).be("picker", "panel"), unref(ns).b("dropdown"), _ctx.popperClass],
|
257
|
+
"stop-popper-mouse-event": false,
|
258
|
+
effect: "light",
|
259
|
+
trigger: "click",
|
260
|
+
teleported: _ctx.teleported,
|
261
|
+
transition: `${unref(ns).namespace.value}-zoom-in-top`,
|
262
|
+
persistent: "",
|
263
|
+
onHide: ($event) => setShowPicker(false)
|
264
|
+
}, {
|
265
|
+
content: withCtx(() => [
|
266
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
267
|
+
onKeydown: withKeys(handleEsc, ["esc"])
|
268
|
+
}, [
|
269
|
+
createElementVNode("div", {
|
270
|
+
class: normalizeClass(unref(ns).be("dropdown", "main-wrapper"))
|
271
|
+
}, [
|
272
|
+
createVNode(HueSlider, {
|
273
|
+
ref_key: "hue",
|
274
|
+
ref: hue,
|
275
|
+
class: "hue-slider",
|
276
|
+
color: unref(color),
|
277
|
+
vertical: ""
|
278
|
+
}, null, 8, ["color"]),
|
279
|
+
createVNode(SvPanel, {
|
280
|
+
ref_key: "sv",
|
281
|
+
ref: sv,
|
282
|
+
color: unref(color)
|
283
|
+
}, null, 8, ["color"])
|
284
|
+
], 2),
|
285
|
+
_ctx.showAlpha ? (openBlock(), createBlock(AlphaSlider, {
|
286
|
+
key: 0,
|
287
|
+
ref_key: "alpha",
|
288
|
+
ref: alpha,
|
289
|
+
color: unref(color)
|
290
|
+
}, null, 8, ["color"])) : createCommentVNode("v-if", true),
|
291
|
+
_ctx.predefine ? (openBlock(), createBlock(Predefine, {
|
292
|
+
key: 1,
|
293
|
+
ref: "predefine",
|
294
|
+
"enable-alpha": _ctx.showAlpha,
|
295
|
+
color: unref(color),
|
296
|
+
colors: _ctx.predefine
|
297
|
+
}, null, 8, ["enable-alpha", "color", "colors"])) : createCommentVNode("v-if", true),
|
298
|
+
createElementVNode("div", {
|
299
|
+
class: normalizeClass(unref(ns).be("dropdown", "btns"))
|
300
|
+
}, [
|
301
|
+
createElementVNode("span", {
|
302
|
+
class: normalizeClass(unref(ns).be("dropdown", "value"))
|
303
|
+
}, [
|
304
|
+
createVNode(unref(ElInput), {
|
305
|
+
ref_key: "inputRef",
|
306
|
+
ref: inputRef,
|
307
|
+
modelValue: customInput.value,
|
308
|
+
"onUpdate:modelValue": ($event) => customInput.value = $event,
|
309
|
+
"validate-event": false,
|
310
|
+
size: "small",
|
311
|
+
onChange: handleConfirm
|
312
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
313
|
+
], 2),
|
314
|
+
createVNode(unref(ElButton), {
|
315
|
+
class: normalizeClass(unref(ns).be("dropdown", "link-btn")),
|
316
|
+
text: "",
|
317
|
+
size: "small",
|
318
|
+
onClick: clear
|
319
|
+
}, {
|
320
|
+
default: withCtx(() => [
|
321
|
+
createTextVNode(toDisplayString(unref(t)("el.colorpicker.clear")), 1)
|
322
|
+
]),
|
323
|
+
_: 1
|
324
|
+
}, 8, ["class"]),
|
325
|
+
createVNode(unref(ElButton), {
|
326
|
+
plain: "",
|
327
|
+
size: "small",
|
328
|
+
class: normalizeClass(unref(ns).be("dropdown", "btn")),
|
329
|
+
onClick: confirmValue
|
330
|
+
}, {
|
331
|
+
default: withCtx(() => [
|
332
|
+
createTextVNode(toDisplayString(unref(t)("el.colorpicker.confirm")), 1)
|
333
|
+
]),
|
334
|
+
_: 1
|
335
|
+
}, 8, ["class"])
|
336
|
+
], 2)
|
337
|
+
], 40, ["onKeydown"])), [
|
338
|
+
[unref(ClickOutside), handleClickOutside, triggerRef.value]
|
339
|
+
])
|
340
|
+
]),
|
341
|
+
default: withCtx(() => [
|
342
|
+
createElementVNode("div", mergeProps({
|
343
|
+
id: unref(buttonId),
|
344
|
+
ref_key: "triggerRef",
|
345
|
+
ref: triggerRef
|
346
|
+
}, _ctx.$attrs, {
|
347
|
+
class: unref(btnKls),
|
348
|
+
role: "button",
|
349
|
+
"aria-label": unref(buttonAriaLabel),
|
350
|
+
"aria-labelledby": unref(buttonAriaLabelledby),
|
351
|
+
"aria-description": unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }),
|
352
|
+
"aria-disabled": unref(colorDisabled),
|
353
|
+
tabindex: unref(colorDisabled) ? void 0 : _ctx.tabindex,
|
354
|
+
onKeydown: handleKeyDown,
|
355
|
+
onFocus: unref(handleFocus),
|
356
|
+
onBlur: unref(handleBlur)
|
357
|
+
}), [
|
358
|
+
createElementVNode("div", {
|
359
|
+
class: normalizeClass(unref(ns).be("picker", "trigger")),
|
360
|
+
onClick: handleTrigger
|
361
|
+
}, [
|
362
|
+
createElementVNode("span", {
|
363
|
+
class: normalizeClass([unref(ns).be("picker", "color"), unref(ns).is("alpha", _ctx.showAlpha)])
|
364
|
+
}, [
|
365
|
+
createElementVNode("span", {
|
366
|
+
class: normalizeClass(unref(ns).be("picker", "color-inner")),
|
367
|
+
style: normalizeStyle({
|
368
|
+
backgroundColor: unref(displayedColor)
|
369
|
+
})
|
370
|
+
}, [
|
371
|
+
withDirectives(createVNode(unref(ElIcon), {
|
372
|
+
class: normalizeClass([unref(ns).be("picker", "icon"), unref(ns).is("icon-arrow-down")])
|
373
|
+
}, {
|
374
|
+
default: withCtx(() => [
|
375
|
+
createVNode(unref(ArrowDown))
|
376
|
+
]),
|
377
|
+
_: 1
|
378
|
+
}, 8, ["class"]), [
|
379
|
+
[vShow, _ctx.modelValue || showPanelColor.value]
|
380
|
+
]),
|
381
|
+
withDirectives(createVNode(unref(ElIcon), {
|
382
|
+
class: normalizeClass([unref(ns).be("picker", "empty"), unref(ns).is("icon-close")])
|
383
|
+
}, {
|
384
|
+
default: withCtx(() => [
|
385
|
+
createVNode(unref(Close))
|
386
|
+
]),
|
387
|
+
_: 1
|
388
|
+
}, 8, ["class"]), [
|
389
|
+
[vShow, !_ctx.modelValue && !showPanelColor.value]
|
390
|
+
])
|
391
|
+
], 6)
|
392
|
+
], 2)
|
393
|
+
], 2)
|
394
|
+
], 16, ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex", "onFocus", "onBlur"])
|
395
|
+
]),
|
396
|
+
_: 1
|
397
|
+
}, 8, ["visible", "popper-class", "teleported", "transition", "onHide"]);
|
398
|
+
};
|
399
|
+
}
|
400
|
+
});
|
401
|
+
var ColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "color-picker.vue"]]);
|
47
402
|
|
48
|
-
export {
|
403
|
+
export { ColorPicker as default };
|
49
404
|
//# sourceMappingURL=color-picker.mjs.map
|