@element-plus/nightly 0.0.20240423 → 0.0.20240425
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 +34 -22
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +26 -23
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/src/affix2.mjs +1 -1
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +70 -8
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +8 -70
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +4 -0
- package/es/components/color-picker/src/color-picker.d.ts +1 -0
- package/es/components/color-picker/src/color-picker.mjs +3 -0
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +4 -0
- package/es/components/color-picker/src/color-picker2.mjs +2 -1
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/descriptions/index.d.ts +1 -0
- package/es/components/descriptions/index.mjs +1 -0
- package/es/components/descriptions/index.mjs.map +1 -1
- package/es/components/descriptions/src/description-item.d.ts +1 -1
- package/es/components/descriptions/src/description-item.mjs +1 -1
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/form/index.mjs +1 -1
- package/es/components/form/src/form.d.ts +1 -2
- package/es/components/form/src/form.mjs +1 -1
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/index.mjs +8 -4
- package/es/components/index.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +67 -149
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +149 -67
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/rate/index.mjs +2 -2
- package/es/components/rate/src/rate.mjs +269 -90
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate2.mjs +90 -269
- package/es/components/rate/src/rate2.mjs.map +1 -1
- package/es/components/scrollbar/src/bar.mjs +64 -11
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +11 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +1 -1
- package/es/components/select/src/option-group.mjs +17 -13
- package/es/components/select/src/option-group.mjs.map +1 -1
- package/es/components/space/index.mjs +1 -1
- package/es/components/space/src/item.d.ts +1 -1
- package/es/components/space/src/item.mjs +1 -1
- package/es/components/space/src/item.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.vue.d.ts +8 -8
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/arrow.mjs +37 -22
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +22 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/index.d.ts +2 -0
- package/es/components/tour/index.mjs +2 -0
- package/es/components/tour/index.mjs.map +1 -1
- package/es/components/tour/src/content.d.ts +2 -0
- package/es/components/tour/src/content.mjs +1 -1
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/index.mjs +8 -4
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/src/affix2.js +1 -1
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +70 -8
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +8 -70
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +4 -0
- package/lib/components/color-picker/src/color-picker.d.ts +1 -0
- package/lib/components/color-picker/src/color-picker.js +3 -0
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +4 -0
- package/lib/components/color-picker/src/color-picker2.js +2 -1
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/descriptions/index.d.ts +1 -0
- package/lib/components/descriptions/index.js +1 -0
- package/lib/components/descriptions/index.js.map +1 -1
- package/lib/components/descriptions/src/description-item.d.ts +1 -1
- package/lib/components/descriptions/src/description-item.js +1 -0
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/form/index.js +1 -0
- package/lib/components/form/index.js.map +1 -1
- package/lib/components/form/src/form.d.ts +1 -2
- package/lib/components/form/src/form.js +1 -0
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/index.js +18 -5
- package/lib/components/index.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +68 -148
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +148 -68
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/rate/index.js +2 -2
- package/lib/components/rate/src/rate.js +268 -90
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate2.js +90 -268
- package/lib/components/rate/src/rate2.js.map +1 -1
- package/lib/components/scrollbar/src/bar.js +64 -11
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +11 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +1 -1
- package/lib/components/select/src/option-group.js +17 -13
- package/lib/components/select/src/option-group.js.map +1 -1
- package/lib/components/space/index.js +2 -1
- package/lib/components/space/index.js.map +1 -1
- package/lib/components/space/src/item.d.ts +1 -1
- package/lib/components/space/src/item.js +1 -0
- package/lib/components/space/src/item.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.vue.d.ts +8 -8
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/arrow.js +37 -23
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +23 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/index.d.ts +2 -0
- package/lib/components/tour/index.js +11 -3
- package/lib/components/tour/index.js.map +1 -1
- package/lib/components/tour/src/content.d.ts +2 -0
- package/lib/components/tour/src/content.js +2 -0
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/index.js +18 -5
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-autocomplete.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/autocomplete.scss +5 -0
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker2.js","sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :offset=\"0\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), ns.b('dropdown'), popperClass]\"\n :stop-popper-mouse-event=\"false\"\n effect=\"light\"\n trigger=\"click\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n persistent\n @hide=\"setShowPicker(false)\"\n >\n <template #content>\n <div v-click-outside=\"handleClickOutside\" @keydown.esc=\"handleEsc\">\n <div :class=\"ns.be('dropdown', 'main-wrapper')\">\n <hue-slider ref=\"hue\" class=\"hue-slider\" :color=\"color\" vertical />\n <sv-panel ref=\"sv\" :color=\"color\" />\n </div>\n <alpha-slider v-if=\"showAlpha\" ref=\"alpha\" :color=\"color\" />\n <predefine\n v-if=\"predefine\"\n ref=\"predefine\"\n :color=\"color\"\n :colors=\"predefine\"\n />\n <div :class=\"ns.be('dropdown', 'btns')\">\n <span :class=\"ns.be('dropdown', 'value')\">\n <el-input\n ref=\"inputRef\"\n v-model=\"customInput\"\n :validate-event=\"false\"\n size=\"small\"\n @keyup.enter=\"handleConfirm\"\n @blur=\"handleConfirm\"\n />\n </span>\n <el-button\n :class=\"ns.be('dropdown', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('dropdown', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </div>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n ref=\"triggerRef\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :aria-disabled=\"colorDisabled\"\n :tabindex=\"colorDisabled ? -1 : tabindex\"\n @keydown=\"handleKeyDown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n >\n <div v-if=\"colorDisabled\" :class=\"ns.be('picker', 'mask')\" />\n <div :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"modelValue || showPanelColor\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-show=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElInput } from '@element-plus/components/input'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n useDeprecated,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { debugWarn } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport AlphaSlider from './components/alpha-slider.vue'\nimport HueSlider from './components/hue-slider.vue'\nimport Predefine from './components/predefine.vue'\nimport SvPanel from './components/sv-panel.vue'\nimport Color from './utils/color'\nimport {\n colorPickerContextKey,\n colorPickerEmits,\n colorPickerProps,\n} from './color-picker'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = defineProps(colorPickerProps)\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useFormSize()\nconst colorDisabled = useFormDisabled()\n\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst hue = ref<InstanceType<typeof HueSlider>>()\nconst sv = ref<InstanceType<typeof SvPanel>>()\nconst alpha = ref<InstanceType<typeof AlphaSlider>>()\nconst popper = ref<TooltipInstance>()\nconst triggerRef = ref()\nconst inputRef = ref()\n\nconst {\n isFocused,\n handleFocus: _handleFocus,\n handleBlur,\n} = useFocusController(triggerRef, {\n beforeBlur(event) {\n return popper.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n setShowPicker(false)\n resetColor()\n },\n})\n\nconst handleFocus = (event: FocusEvent) => {\n if (colorDisabled.value) return blur()\n _handleFocus(event)\n}\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst color = reactive(\n new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n) as Color\n\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\nconst customInput = ref('')\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.label || props.ariaLabel || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nuseDeprecated(\n {\n from: 'label',\n replacement: 'aria-label',\n version: '2.8.0',\n scope: 'el-color-picker',\n ref: 'https://element-plus.org/en-US/component/color-picker.html',\n },\n computed(() => !!props.label)\n)\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.bm('picker', colorSize.value),\n ns.is('focused', isFocused.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n if (!(color instanceof Color)) {\n throw new TypeError('color should be instance of _color Class')\n }\n\n const { r, g, b } = color.toRgb()\n return showAlpha\n ? `rgba(${r}, ${g}, ${b}, ${color.get('alpha') / 100})`\n : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true })\n\nfunction show() {\n if (colorDisabled.value) return\n setShowPicker(true)\n}\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value) return\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction handleConfirm() {\n color.fromString(customInput.value)\n}\n\nfunction confirmValue() {\n const value = color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit('change', value)\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, null)\n emit('change', null)\n if (props.modelValue !== null && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n resetColor()\n}\n\nfunction handleClickOutside(event: Event) {\n if (!showPicker.value) return\n hide()\n\n if (isFocused.value) {\n const _event = new FocusEvent('focus', event)\n handleBlur(_event)\n }\n}\n\nfunction handleEsc(event: KeyboardEvent) {\n event.preventDefault()\n event.stopPropagation()\n setShowPicker(false)\n resetColor()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.space:\n event.preventDefault()\n event.stopPropagation()\n show()\n inputRef.value.focus()\n break\n case EVENT_CODE.esc:\n handleEsc(event)\n break\n }\n}\n\nfunction focus() {\n triggerRef.value.focus()\n}\n\nfunction blur() {\n triggerRef.value.blur()\n}\n\nonMounted(() => {\n if (props.modelValue) {\n customInput.value = currentColor.value\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => currentColor.value,\n (val) => {\n customInput.value = val\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n nextTick(() => {\n hue.value?.update()\n sv.value?.update()\n alpha.value?.update()\n })\n }\n)\n\nprovide(colorPickerContextKey, {\n currentColor,\n})\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n /**\n * @description manually show ColorPicker\n */\n show,\n /**\n * @description manually hide ColorPicker\n */\n hide,\n /**\n * @description focus the input element\n */\n focus,\n /**\n * @description blur the input element\n */\n blur,\n})\n</script>\n"],"names":["useLocale","useNamespace","useFormItem","useFormSize","useFormDisabled","useFormItemInputId","ref","useFocusController","Color","computed","color","useDeprecated","debounce","nextTick","UPDATE_MODEL_EVENT","debugWarn","EVENT_CODE","onMounted","watch","provide","colorPickerContextKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAoJc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,MAAMA,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,aAAaC,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAYC,8BAAY,EAAA,CAAA;AAC9B,IAAA,MAAM,gBAAgBC,kCAAgB,EAAA,CAAA;AAEtC,IAAA,MAAM,EAAE,OAAA,EAAS,QAAU,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"color-picker2.js","sources":["../../../../../../packages/components/color-picker/src/color-picker.vue"],"sourcesContent":["<template>\n <el-tooltip\n ref=\"popper\"\n :visible=\"showPicker\"\n :show-arrow=\"false\"\n :fallback-placements=\"['bottom', 'top', 'right', 'left']\"\n :offset=\"0\"\n :gpu-acceleration=\"false\"\n :popper-class=\"[ns.be('picker', 'panel'), ns.b('dropdown'), popperClass]\"\n :stop-popper-mouse-event=\"false\"\n effect=\"light\"\n trigger=\"click\"\n :teleported=\"teleported\"\n :transition=\"`${ns.namespace.value}-zoom-in-top`\"\n persistent\n @hide=\"setShowPicker(false)\"\n >\n <template #content>\n <div v-click-outside=\"handleClickOutside\" @keydown.esc=\"handleEsc\">\n <div :class=\"ns.be('dropdown', 'main-wrapper')\">\n <hue-slider ref=\"hue\" class=\"hue-slider\" :color=\"color\" vertical />\n <sv-panel ref=\"sv\" :color=\"color\" />\n </div>\n <alpha-slider v-if=\"showAlpha\" ref=\"alpha\" :color=\"color\" />\n <predefine\n v-if=\"predefine\"\n ref=\"predefine\"\n :color=\"color\"\n :colors=\"predefine\"\n />\n <div :class=\"ns.be('dropdown', 'btns')\">\n <span :class=\"ns.be('dropdown', 'value')\">\n <el-input\n ref=\"inputRef\"\n v-model=\"customInput\"\n :validate-event=\"false\"\n size=\"small\"\n @keyup.enter=\"handleConfirm\"\n @blur=\"handleConfirm\"\n />\n </span>\n <el-button\n :class=\"ns.be('dropdown', 'link-btn')\"\n text\n size=\"small\"\n @click=\"clear\"\n >\n {{ t('el.colorpicker.clear') }}\n </el-button>\n <el-button\n plain\n size=\"small\"\n :class=\"ns.be('dropdown', 'btn')\"\n @click=\"confirmValue\"\n >\n {{ t('el.colorpicker.confirm') }}\n </el-button>\n </div>\n </div>\n </template>\n <template #default>\n <div\n :id=\"buttonId\"\n ref=\"triggerRef\"\n :class=\"btnKls\"\n role=\"button\"\n :aria-label=\"buttonAriaLabel\"\n :aria-labelledby=\"buttonAriaLabelledby\"\n :aria-description=\"\n t('el.colorpicker.description', { color: modelValue || '' })\n \"\n :aria-disabled=\"colorDisabled\"\n :tabindex=\"colorDisabled ? -1 : tabindex\"\n @keydown=\"handleKeyDown\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n >\n <div v-if=\"colorDisabled\" :class=\"ns.be('picker', 'mask')\" />\n <div :class=\"ns.be('picker', 'trigger')\" @click=\"handleTrigger\">\n <span :class=\"[ns.be('picker', 'color'), ns.is('alpha', showAlpha)]\">\n <span\n :class=\"ns.be('picker', 'color-inner')\"\n :style=\"{\n backgroundColor: displayedColor,\n }\"\n >\n <el-icon\n v-show=\"modelValue || showPanelColor\"\n :class=\"[ns.be('picker', 'icon'), ns.is('icon-arrow-down')]\"\n >\n <arrow-down />\n </el-icon>\n <el-icon\n v-show=\"!modelValue && !showPanelColor\"\n :class=\"[ns.be('picker', 'empty'), ns.is('icon-close')]\"\n >\n <close />\n </el-icon>\n </span>\n </span>\n </div>\n </div>\n </template>\n </el-tooltip>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport { debounce } from 'lodash-unified'\nimport { ElButton } from '@element-plus/components/button'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { ClickOutside as vClickOutside } from '@element-plus/directives'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { ElInput } from '@element-plus/components/input'\nimport {\n useFormDisabled,\n useFormItem,\n useFormItemInputId,\n useFormSize,\n} from '@element-plus/components/form'\nimport {\n useDeprecated,\n useFocusController,\n useLocale,\n useNamespace,\n} from '@element-plus/hooks'\nimport { EVENT_CODE, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { debugWarn } from '@element-plus/utils'\nimport { ArrowDown, Close } from '@element-plus/icons-vue'\nimport AlphaSlider from './components/alpha-slider.vue'\nimport HueSlider from './components/hue-slider.vue'\nimport Predefine from './components/predefine.vue'\nimport SvPanel from './components/sv-panel.vue'\nimport Color from './utils/color'\nimport {\n colorPickerContextKey,\n colorPickerEmits,\n colorPickerProps,\n} from './color-picker'\nimport type { TooltipInstance } from '@element-plus/components/tooltip'\n\ndefineOptions({\n name: 'ElColorPicker',\n})\nconst props = defineProps(colorPickerProps)\nconst emit = defineEmits(colorPickerEmits)\n\nconst { t } = useLocale()\nconst ns = useNamespace('color')\nconst { formItem } = useFormItem()\nconst colorSize = useFormSize()\nconst colorDisabled = useFormDisabled()\n\nconst { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst hue = ref<InstanceType<typeof HueSlider>>()\nconst sv = ref<InstanceType<typeof SvPanel>>()\nconst alpha = ref<InstanceType<typeof AlphaSlider>>()\nconst popper = ref<TooltipInstance>()\nconst triggerRef = ref()\nconst inputRef = ref()\n\nconst {\n isFocused,\n handleFocus: _handleFocus,\n handleBlur,\n} = useFocusController(triggerRef, {\n beforeBlur(event) {\n return popper.value?.isFocusInsideContent(event)\n },\n afterBlur() {\n setShowPicker(false)\n resetColor()\n },\n})\n\nconst handleFocus = (event: FocusEvent) => {\n if (colorDisabled.value) return blur()\n _handleFocus(event)\n}\n\n// active-change is used to prevent modelValue changes from triggering.\nlet shouldActiveChange = true\n\nconst color = reactive(\n new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n) as Color\n\nconst showPicker = ref(false)\nconst showPanelColor = ref(false)\nconst customInput = ref('')\n\nconst displayedColor = computed(() => {\n if (!props.modelValue && !showPanelColor.value) {\n return 'transparent'\n }\n return displayedRgb(color, props.showAlpha)\n})\n\nconst currentColor = computed(() => {\n return !props.modelValue && !showPanelColor.value ? '' : color.value\n})\n\nconst buttonAriaLabel = computed<string | undefined>(() => {\n return !isLabeledByFormItem.value\n ? props.label || props.ariaLabel || t('el.colorpicker.defaultLabel')\n : undefined\n})\n\nuseDeprecated(\n {\n from: 'label',\n replacement: 'aria-label',\n version: '2.8.0',\n scope: 'el-color-picker',\n ref: 'https://element-plus.org/en-US/component/color-picker.html',\n },\n computed(() => !!props.label)\n)\n\nconst buttonAriaLabelledby = computed<string | undefined>(() => {\n return isLabeledByFormItem.value ? formItem?.labelId : undefined\n})\n\nconst btnKls = computed(() => {\n return [\n ns.b('picker'),\n ns.is('disabled', colorDisabled.value),\n ns.bm('picker', colorSize.value),\n ns.is('focused', isFocused.value),\n ]\n})\n\nfunction displayedRgb(color: Color, showAlpha: boolean) {\n if (!(color instanceof Color)) {\n throw new TypeError('color should be instance of _color Class')\n }\n\n const { r, g, b } = color.toRgb()\n return showAlpha\n ? `rgba(${r}, ${g}, ${b}, ${color.get('alpha') / 100})`\n : `rgb(${r}, ${g}, ${b})`\n}\n\nfunction setShowPicker(value: boolean) {\n showPicker.value = value\n}\n\nconst debounceSetShowPicker = debounce(setShowPicker, 100, { leading: true })\n\nfunction show() {\n if (colorDisabled.value) return\n setShowPicker(true)\n}\n\nfunction hide() {\n debounceSetShowPicker(false)\n resetColor()\n}\n\nfunction resetColor() {\n nextTick(() => {\n if (props.modelValue) {\n color.fromString(props.modelValue)\n } else {\n color.value = ''\n nextTick(() => {\n showPanelColor.value = false\n })\n }\n })\n}\n\nfunction handleTrigger() {\n if (colorDisabled.value) return\n debounceSetShowPicker(!showPicker.value)\n}\n\nfunction handleConfirm() {\n color.fromString(customInput.value)\n}\n\nfunction confirmValue() {\n const value = color.value\n emit(UPDATE_MODEL_EVENT, value)\n emit('change', value)\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n debounceSetShowPicker(false)\n // check if modelValue change, if not change, then reset color.\n nextTick(() => {\n const newColor = new Color({\n enableAlpha: props.showAlpha,\n format: props.colorFormat || '',\n value: props.modelValue,\n })\n if (!color.compare(newColor)) {\n resetColor()\n }\n })\n}\n\nfunction clear() {\n debounceSetShowPicker(false)\n emit(UPDATE_MODEL_EVENT, null)\n emit('change', null)\n if (props.modelValue !== null && props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n resetColor()\n}\n\nfunction handleClickOutside(event: Event) {\n if (!showPicker.value) return\n hide()\n\n if (isFocused.value) {\n const _event = new FocusEvent('focus', event)\n handleBlur(_event)\n }\n}\n\nfunction handleEsc(event: KeyboardEvent) {\n event.preventDefault()\n event.stopPropagation()\n setShowPicker(false)\n resetColor()\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n case EVENT_CODE.enter:\n case EVENT_CODE.space:\n event.preventDefault()\n event.stopPropagation()\n show()\n inputRef.value.focus()\n break\n case EVENT_CODE.esc:\n handleEsc(event)\n break\n }\n}\n\nfunction focus() {\n triggerRef.value.focus()\n}\n\nfunction blur() {\n triggerRef.value.blur()\n}\n\nonMounted(() => {\n if (props.modelValue) {\n customInput.value = currentColor.value\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal) => {\n if (!newVal) {\n showPanelColor.value = false\n } else if (newVal && newVal !== color.value) {\n shouldActiveChange = false\n color.fromString(newVal)\n }\n }\n)\n\nwatch(\n () => currentColor.value,\n (val) => {\n customInput.value = val\n shouldActiveChange && emit('activeChange', val)\n shouldActiveChange = true\n }\n)\n\nwatch(\n () => color.value,\n () => {\n if (!props.modelValue && !showPanelColor.value) {\n showPanelColor.value = true\n }\n }\n)\n\nwatch(\n () => showPicker.value,\n () => {\n nextTick(() => {\n hue.value?.update()\n sv.value?.update()\n alpha.value?.update()\n })\n }\n)\n\nprovide(colorPickerContextKey, {\n currentColor,\n})\n\ndefineExpose({\n /**\n * @description current color object\n */\n color,\n /**\n * @description manually show ColorPicker\n */\n show,\n /**\n * @description manually hide ColorPicker\n */\n hide,\n /**\n * @description focus the input element\n */\n focus,\n /**\n * @description blur the input element\n */\n blur,\n})\n</script>\n"],"names":["useLocale","useNamespace","useFormItem","useFormSize","useFormDisabled","useFormItemInputId","ref","useFocusController","Color","computed","color","useDeprecated","debounce","nextTick","UPDATE_MODEL_EVENT","debugWarn","EVENT_CODE","onMounted","watch","provide","colorPickerContextKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAqJc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,MAAMA,eAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAKC,qBAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,aAAaC,uBAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAYC,8BAAY,EAAA,CAAA;AAC9B,IAAA,MAAM,gBAAgBC,kCAAgB,EAAA,CAAA;AAEtC,IAAA,MAAM,EAAE,OAAA,EAAS,QAAU,EAAA,mBAAA,EAAA,GAAwBC,+BAAmB,KAAO,EAAA;AAAA,MAC3E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,MAAMC,OAAoC,EAAA,CAAA;AAChD,IAAA,MAAM,KAAKA,OAAkC,EAAA,CAAA;AAC7C,IAAA,MAAM,QAAQA,OAAsC,EAAA,CAAA;AACpD,IAAA,MAAM,SAASA,OAAqB,EAAA,CAAA;AACpC,IAAA,MAAM,aAAaA,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,WAAWA,OAAI,EAAA,CAAA;AAErB,IAAM,MAAA;AAAA,MACJ,SAAA;AAAA,MACA,WAAa,EAAA,YAAA;AAAA,MACb,UAAA;AAAA,KAAA,GACEC,2BAAmB,UAAY,EAAA;AAAA,MACjC,WAAW,KAAO,EAAA;AAChB,QAAO,IAAA,EAAA,CAAA;AAAwC,QACjD,OAAA,CAAA,EAAA,GAAA,MAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,KAAA,CAAA,CAAA;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A,MAAA,EAAA,CAAA;AAAA,QACrB,CAAA,EAAA,GAAA,EAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,EAAA,CAAA;AAAA,QAEL,CAAA,EAAA,GAAA,KAAA,CAAA,KAAA,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,MAAA,EAAA,CAAA;AAEA,OAAA,CAAA,CAAA;AAA+B,KAC7B,CAAA,CAAA;AAAA,IACFM,WAAC,CAAAC,iCAAA,EAAA;AAED,MAAa,YAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IAIA,MAAA,CAAA;AAAA,aAIAV,OAAA;AAAA,MAIA,IAAA;AAAA,MAIA,IAAA;AAAA,MACD,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -13,6 +13,7 @@ const ElDescriptions = install.withInstall(description$1["default"], {
|
|
|
13
13
|
});
|
|
14
14
|
const ElDescriptionsItem = install.withNoopInstall(descriptionItem["default"]);
|
|
15
15
|
|
|
16
|
+
exports.descriptionItemProps = descriptionItem.descriptionItemProps;
|
|
16
17
|
exports.descriptionProps = description.descriptionProps;
|
|
17
18
|
exports.ElDescriptions = ElDescriptions;
|
|
18
19
|
exports.ElDescriptionsItem = ElDescriptionsItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/components/descriptions/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\n"],"names":["withInstall","Descriptions","DescriptionsItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAW,CAACC,wBAAY,EAAE;AACxD,oBAAEC,0BAAgB;AAClB,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGC,uBAAe,CAACD,0BAAgB
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/descriptions/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\n\nimport Descriptions from './src/description.vue'\nimport DescriptionsItem from './src/description-item'\n\nexport const ElDescriptions = withInstall(Descriptions, {\n DescriptionsItem,\n})\n\nexport const ElDescriptionsItem = withNoopInstall(DescriptionsItem)\n\nexport default ElDescriptions\n\nexport * from './src/description'\nexport * from './src/description-item'\n"],"names":["withInstall","Descriptions","DescriptionsItem","withNoopInstall"],"mappings":";;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,mBAAW,CAACC,wBAAY,EAAE;AACxD,oBAAEC,0BAAgB;AAClB,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAGC,uBAAe,CAACD,0BAAgB;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExtractPropTypes, Slot, VNode } from 'vue';
|
|
2
|
-
declare const descriptionItemProps: {
|
|
2
|
+
export declare const descriptionItemProps: {
|
|
3
3
|
label: import("@element-plus/nightly/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
|
4
4
|
span: import("@element-plus/nightly/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, number, boolean>;
|
|
5
5
|
width: import("@element-plus/nightly/es/utils").EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, string, boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\
|
|
1
|
+
{"version":3,"file":"description-item.js","sources":["../../../../../../packages/components/descriptions/src/description-item.ts"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, Slot, VNode } from 'vue'\n\nexport const descriptionItemProps = buildProps({\n /**\n * @description label text\n */\n label: {\n type: String,\n default: '',\n },\n /**\n * @description colspan of column\n */\n span: {\n type: Number,\n default: 1,\n },\n /**\n * @description column width, the width of the same column in different rows is set by the max value (If no `border`, width contains label and content)\n */\n width: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column minimum width, columns with `width` has a fixed width, while columns with `min-width` has a width that is distributed in proportion (If no`border`, width contains label and content)\n */\n minWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description column content alignment (If no `border`, effective for both label and content)\n */\n align: {\n type: String,\n default: 'left',\n },\n /**\n * @description column label alignment, if omitted, the value of the above `align` attribute will be applied (If no `border`, please use `align` attribute)\n */\n labelAlign: {\n type: String,\n default: '',\n },\n /**\n * @description column content custom class name\n */\n className: {\n type: String,\n default: '',\n },\n /**\n * @description column label custom class name\n */\n labelClassName: {\n type: String,\n default: '',\n },\n})\nconst DescriptionItem = defineComponent({\n name: 'ElDescriptionsItem',\n props: descriptionItemProps,\n})\n\nexport default DescriptionItem\n\ntype DescriptionItemProps = ExtractPropTypes<typeof descriptionItemProps>\nexport type DescriptionItemVNode = VNode & {\n children: { [name: string]: Slot } | null\n props: Partial<DescriptionItemProps> | null\n}\n"],"names":["buildProps","defineComponent"],"mappings":";;;;;;;;AAEY,MAAC,oBAAoB,GAAGA,kBAAU,CAAC;AAC/C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,CAAC,EAAE;AACE,MAAC,eAAe,GAAGC,mBAAe,CAAC;AACxC,EAAE,IAAI,EAAE,oBAAoB;AAC5B,EAAE,KAAK,EAAE,oBAAoB;AAC7B,CAAC;;;;;"}
|
|
@@ -20,6 +20,7 @@ const ElForm = install.withInstall(form$1["default"], {
|
|
|
20
20
|
const ElFormItem = install.withNoopInstall(formItem$1["default"]);
|
|
21
21
|
|
|
22
22
|
exports.formEmits = form.formEmits;
|
|
23
|
+
exports.formMetaProps = form.formMetaProps;
|
|
23
24
|
exports.formProps = form.formProps;
|
|
24
25
|
exports.formItemProps = formItem.formItemProps;
|
|
25
26
|
exports.formItemValidateStates = formItem.formItemValidateStates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../packages/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType<typeof Form>\nexport type FormItemInstance = InstanceType<typeof FormItem>\n"],"names":["withInstall","Form","FormItem","withNoopInstall"],"mappings":";;;;;;;;;;;;;;;;AAGY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI,EAAE;AACxC,YAAEC,qBAAQ;AACV,CAAC,EAAE;AAES,MAAC,UAAU,GAAGC,uBAAe,CAACD,qBAAQ
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/form/index.ts"],"sourcesContent":["import { withInstall, withNoopInstall } from '@element-plus/utils'\nimport Form from './src/form.vue'\nimport FormItem from './src/form-item.vue'\n\nexport const ElForm = withInstall(Form, {\n FormItem,\n})\nexport default ElForm\nexport const ElFormItem = withNoopInstall(FormItem)\n\nexport * from './src/form'\nexport * from './src/form-item'\nexport * from './src/types'\nexport * from './src/constants'\nexport * from './src/hooks'\n\nexport type FormInstance = InstanceType<typeof Form>\nexport type FormItemInstance = InstanceType<typeof FormItem>\n"],"names":["withInstall","Form","FormItem","withNoopInstall"],"mappings":";;;;;;;;;;;;;;;;AAGY,MAAC,MAAM,GAAGA,mBAAW,CAACC,iBAAI,EAAE;AACxC,YAAEC,qBAAQ;AACV,CAAC,EAAE;AAES,MAAC,UAAU,GAAGC,uBAAe,CAACD,qBAAQ;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtractPropTypes } from 'vue';
|
|
2
2
|
import type { FormItemProp } from './form-item';
|
|
3
|
-
declare const formMetaProps: {
|
|
3
|
+
export declare const formMetaProps: {
|
|
4
4
|
readonly size: {
|
|
5
5
|
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", unknown>>;
|
|
6
6
|
readonly required: false;
|
|
@@ -48,4 +48,3 @@ export declare const formEmits: {
|
|
|
48
48
|
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
|
49
49
|
};
|
|
50
50
|
export declare type FormEmits = typeof formEmits;
|
|
51
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\
|
|
1
|
+
{"version":3,"file":"form.js","sources":["../../../../../../packages/components/form/src/form.ts"],"sourcesContent":["import { componentSizes } from '@element-plus/constants'\nimport {\n buildProps,\n definePropType,\n isArray,\n isBoolean,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { FormItemProp } from './form-item'\nimport type { FormRules } from './types'\n\nexport const formMetaProps = buildProps({\n /**\n * @description Control the size of components in this form.\n */\n size: {\n type: String,\n values: componentSizes,\n },\n /**\n * @description Whether to disable all components in this form. If set to `true`, it will override the `disabled` prop of the inner component.\n */\n disabled: Boolean,\n} as const)\n\nexport const formProps = buildProps({\n ...formMetaProps,\n /**\n * @description Data of form component.\n */\n model: Object,\n /**\n * @description Validation rules of form.\n */\n rules: {\n type: definePropType<FormRules>(Object),\n },\n /**\n * @description Position of label. If set to `'left'` or `'right'`, `label-width` prop is also required.\n */\n labelPosition: {\n type: String,\n values: ['left', 'right', 'top'],\n default: 'right',\n },\n /**\n * @description Position of asterisk.\n */\n requireAsteriskPosition: {\n type: String,\n values: ['left', 'right'],\n default: 'left',\n },\n /**\n * @description Width of label, e.g. `'50px'`. All its direct child form items will inherit this value. `auto` is supported.\n */\n labelWidth: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description Suffix of the label.\n */\n labelSuffix: {\n type: String,\n default: '',\n },\n /**\n * @description Whether the form is inline.\n */\n inline: Boolean,\n /**\n * @description Whether to display the error message inline with the form item.\n */\n inlineMessage: Boolean,\n /**\n * @description Whether to display an icon indicating the validation result.\n */\n statusIcon: Boolean,\n /**\n * @description Whether to show the error message.\n */\n showMessage: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to trigger validation when the `rules` prop is changed.\n */\n validateOnRuleChange: {\n type: Boolean,\n default: true,\n },\n /**\n * @description Whether to hide required fields should have a red asterisk (star) beside their labels.\n */\n hideRequiredAsterisk: Boolean,\n /**\n * @description When validation fails, scroll to the first error form entry.\n */\n scrollToError: Boolean,\n /**\n * @description When validation fails, it scrolls to the first error item based on the scrollIntoView option.\n */\n scrollIntoViewOptions: {\n type: [Object, Boolean],\n },\n} as const)\nexport type FormProps = ExtractPropTypes<typeof formProps>\nexport type FormMetaProps = ExtractPropTypes<typeof formMetaProps>\n\nexport const formEmits = {\n validate: (prop: FormItemProp, isValid: boolean, message: string) =>\n (isArray(prop) || isString(prop)) &&\n isBoolean(isValid) &&\n isString(message),\n}\nexport type FormEmits = typeof formEmits\n"],"names":["buildProps","componentSizes","definePropType","isArray","isString","isBoolean"],"mappings":";;;;;;;;;;;AAQY,MAAC,aAAa,GAAGA,kBAAU,CAAC;AACxC,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,mBAAc;AAC1B,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,CAAC,EAAE;AACS,MAAC,SAAS,GAAGD,kBAAU,CAAC;AACpC,EAAE,GAAG,aAAa;AAClB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEE,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,uBAAuB,EAAE;AAC3B,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC7B,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,UAAU,EAAE,OAAO;AACrB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE;AACxB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,oBAAoB,EAAE,OAAO;AAC/B,EAAE,aAAa,EAAE,OAAO;AACxB,EAAE,qBAAqB,EAAE;AACzB,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;AAC3B,GAAG;AACH,CAAC,EAAE;AACS,MAAC,SAAS,GAAG;AACzB,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,CAACC,cAAO,CAAC,IAAI,CAAC,IAAIC,eAAQ,CAAC,IAAI,CAAC,KAAKC,eAAS,CAAC,OAAO,CAAC,IAAID,eAAQ,CAAC,OAAO,CAAC;AACpH;;;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -97,7 +97,7 @@ var constants$1 = require('./button/src/constants.js');
|
|
|
97
97
|
var calendar = require('./calendar/src/calendar.js');
|
|
98
98
|
var card = require('./card/src/card.js');
|
|
99
99
|
var carousel = require('./carousel/src/carousel.js');
|
|
100
|
-
var carouselItem = require('./carousel/src/carousel-
|
|
100
|
+
var carouselItem = require('./carousel/src/carousel-item2.js');
|
|
101
101
|
var constants$2 = require('./carousel/src/constants.js');
|
|
102
102
|
var cascader = require('./cascader/src/cascader.js');
|
|
103
103
|
var types = require('./cascader-panel/src/types.js');
|
|
@@ -119,6 +119,7 @@ var countdown = require('./countdown/src/countdown.js');
|
|
|
119
119
|
var constants$6 = require('./date-picker/src/constants.js');
|
|
120
120
|
var datePicker = require('./date-picker/src/props/date-picker.js');
|
|
121
121
|
var description = require('./descriptions/src/description.js');
|
|
122
|
+
var descriptionItem = require('./descriptions/src/description-item.js');
|
|
122
123
|
var useDialog = require('./dialog/src/use-dialog.js');
|
|
123
124
|
var dialog = require('./dialog/src/dialog.js');
|
|
124
125
|
var constants$7 = require('./dialog/src/constants.js');
|
|
@@ -160,7 +161,7 @@ var radio = require('./radio/src/radio.js');
|
|
|
160
161
|
var radioGroup = require('./radio/src/radio-group.js');
|
|
161
162
|
var radioButton = require('./radio/src/radio-button.js');
|
|
162
163
|
var constants$b = require('./radio/src/constants.js');
|
|
163
|
-
var rate = require('./rate/src/
|
|
164
|
+
var rate = require('./rate/src/rate2.js');
|
|
164
165
|
var result = require('./result/src/result.js');
|
|
165
166
|
var row = require('./row/src/row.js');
|
|
166
167
|
var constants$c = require('./row/src/constants.js');
|
|
@@ -175,9 +176,10 @@ var skeletonItem = require('./skeleton/src/skeleton-item.js');
|
|
|
175
176
|
var slider = require('./slider/src/slider.js');
|
|
176
177
|
var constants$e = require('./slider/src/constants.js');
|
|
177
178
|
var space = require('./space/src/space.js');
|
|
179
|
+
var item = require('./space/src/item.js');
|
|
178
180
|
var useSpace = require('./space/src/use-space.js');
|
|
179
181
|
var statistic = require('./statistic/src/statistic.js');
|
|
180
|
-
var item = require('./steps/src/item.js');
|
|
182
|
+
var item$1 = require('./steps/src/item.js');
|
|
181
183
|
var steps = require('./steps/src/steps.js');
|
|
182
184
|
var _switch = require('./switch/src/switch.js');
|
|
183
185
|
var constants$f = require('./table-v2/src/constants.js');
|
|
@@ -216,12 +218,14 @@ var dynamicSizeGrid = require('./virtual-list/src/components/dynamic-size-grid.j
|
|
|
216
218
|
var props$1 = require('./virtual-list/src/props.js');
|
|
217
219
|
var watermark = require('./watermark/src/watermark.js');
|
|
218
220
|
var tour = require('./tour/src/tour.js');
|
|
221
|
+
var step = require('./tour/src/step.js');
|
|
222
|
+
var content$3 = require('./tour/src/content.js');
|
|
219
223
|
var anchor = require('./anchor/src/anchor.js');
|
|
220
224
|
var segmented = require('./segmented/src/segmented.js');
|
|
221
225
|
var directive = require('./loading/src/directive.js');
|
|
222
226
|
var service = require('./loading/src/service.js');
|
|
223
227
|
var message = require('./message/src/message.js');
|
|
224
|
-
var notification = require('./notification/src/
|
|
228
|
+
var notification = require('./notification/src/notification.js');
|
|
225
229
|
var popover = require('./popover/src/popover.js');
|
|
226
230
|
|
|
227
231
|
|
|
@@ -396,6 +400,7 @@ exports.countdownProps = countdown.countdownProps;
|
|
|
396
400
|
exports.ROOT_PICKER_INJECTION_KEY = constants$6.ROOT_PICKER_INJECTION_KEY;
|
|
397
401
|
exports.datePickerProps = datePicker.datePickerProps;
|
|
398
402
|
exports.descriptionProps = description.descriptionProps;
|
|
403
|
+
exports.descriptionItemProps = descriptionItem.descriptionItemProps;
|
|
399
404
|
exports.useDialog = useDialog.useDialog;
|
|
400
405
|
exports.dialogEmits = dialog.dialogEmits;
|
|
401
406
|
exports.dialogProps = dialog.dialogProps;
|
|
@@ -416,6 +421,7 @@ exports.dropdownProps = dropdown.dropdownProps;
|
|
|
416
421
|
exports.DROPDOWN_INJECTION_KEY = tokens.DROPDOWN_INJECTION_KEY;
|
|
417
422
|
exports.emptyProps = empty.emptyProps;
|
|
418
423
|
exports.formEmits = form.formEmits;
|
|
424
|
+
exports.formMetaProps = form.formMetaProps;
|
|
419
425
|
exports.formProps = form.formProps;
|
|
420
426
|
exports.formItemProps = formItem.formItemProps;
|
|
421
427
|
exports.formItemValidateStates = formItem.formItemValidateStates;
|
|
@@ -505,9 +511,10 @@ exports.sliderEmits = slider.sliderEmits;
|
|
|
505
511
|
exports.sliderProps = slider.sliderProps;
|
|
506
512
|
exports.sliderContextKey = constants$e.sliderContextKey;
|
|
507
513
|
exports.spaceProps = space.spaceProps;
|
|
514
|
+
exports.spaceItemProps = item.spaceItemProps;
|
|
508
515
|
exports.useSpace = useSpace.useSpace;
|
|
509
516
|
exports.statisticProps = statistic.statisticProps;
|
|
510
|
-
exports.stepProps = item.stepProps;
|
|
517
|
+
exports.stepProps = item$1.stepProps;
|
|
511
518
|
exports.stepsEmits = steps.stepsEmits;
|
|
512
519
|
exports.stepsProps = steps.stepsProps;
|
|
513
520
|
exports.switchEmits = _switch.switchEmits;
|
|
@@ -581,6 +588,12 @@ exports.virtualizedScrollbarProps = props$1.virtualizedScrollbarProps;
|
|
|
581
588
|
exports.watermarkProps = watermark.watermarkProps;
|
|
582
589
|
exports.tourEmits = tour.tourEmits;
|
|
583
590
|
exports.tourProps = tour.tourProps;
|
|
591
|
+
exports.tourStepEmits = step.tourStepEmits;
|
|
592
|
+
exports.tourStepProps = step.tourStepProps;
|
|
593
|
+
exports.tourContentEmits = content$3.tourContentEmits;
|
|
594
|
+
exports.tourContentProps = content$3.tourContentProps;
|
|
595
|
+
exports.tourPlacements = content$3.tourPlacements;
|
|
596
|
+
exports.tourStrategies = content$3.tourStrategies;
|
|
584
597
|
exports.anchorEmits = anchor.anchorEmits;
|
|
585
598
|
exports.anchorProps = anchor.anchorProps;
|
|
586
599
|
exports.segmentedEmits = segmented.segmentedEmits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('../../utils/index.js');
|
|
6
6
|
var notify = require('./src/notify.js');
|
|
7
|
-
var notification = require('./src/
|
|
7
|
+
var notification = require('./src/notification.js');
|
|
8
8
|
var install = require('../../utils/vue/install.js');
|
|
9
9
|
|
|
10
10
|
const ElNotification = install.withInstallFunction(notify["default"], "$notify");
|
|
@@ -2,157 +2,77 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var core = require('@vueuse/core');
|
|
7
5
|
require('../../../utils/index.js');
|
|
8
|
-
require('../../../
|
|
9
|
-
var index = require('../../icon/index.js');
|
|
10
|
-
require('../../config-provider/index.js');
|
|
11
|
-
var notification = require('./notification2.js');
|
|
12
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
13
|
-
var useGlobalConfig = require('../../config-provider/src/hooks/use-global-config.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
14
7
|
var icon = require('../../../utils/vue/icon.js');
|
|
15
|
-
var aria = require('../../../constants/aria.js');
|
|
16
8
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
const notificationTypes = [
|
|
10
|
+
"success",
|
|
11
|
+
"info",
|
|
12
|
+
"warning",
|
|
13
|
+
"error"
|
|
14
|
+
];
|
|
15
|
+
const notificationProps = runtime.buildProps({
|
|
16
|
+
customClass: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
dangerouslyUseHTMLString: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
duration: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 4500
|
|
27
|
+
},
|
|
28
|
+
icon: {
|
|
29
|
+
type: icon.iconPropType
|
|
30
|
+
},
|
|
31
|
+
id: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: ""
|
|
34
|
+
},
|
|
35
|
+
message: {
|
|
36
|
+
type: runtime.definePropType([String, Object]),
|
|
37
|
+
default: ""
|
|
38
|
+
},
|
|
39
|
+
offset: {
|
|
40
|
+
type: Number,
|
|
41
|
+
default: 0
|
|
42
|
+
},
|
|
43
|
+
onClick: {
|
|
44
|
+
type: runtime.definePropType(Function),
|
|
45
|
+
default: () => void 0
|
|
46
|
+
},
|
|
47
|
+
onClose: {
|
|
48
|
+
type: runtime.definePropType(Function),
|
|
49
|
+
required: true
|
|
50
|
+
},
|
|
51
|
+
position: {
|
|
52
|
+
type: String,
|
|
53
|
+
values: ["top-right", "top-left", "bottom-right", "bottom-left"],
|
|
54
|
+
default: "top-right"
|
|
55
|
+
},
|
|
56
|
+
showClose: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: true
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
type: String,
|
|
66
|
+
values: [...notificationTypes, ""],
|
|
67
|
+
default: ""
|
|
68
|
+
},
|
|
69
|
+
zIndex: Number
|
|
23
70
|
});
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
emits: notification.notificationEmits,
|
|
28
|
-
setup(__props, { expose }) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const { ns, zIndex } = useGlobalConfig.useGlobalComponentSettings("notification");
|
|
31
|
-
const { nextZIndex, currentZIndex } = zIndex;
|
|
32
|
-
const { Close } = icon.CloseComponents;
|
|
33
|
-
const visible = vue.ref(false);
|
|
34
|
-
let timer = void 0;
|
|
35
|
-
const typeClass = vue.computed(() => {
|
|
36
|
-
const type = props.type;
|
|
37
|
-
return type && icon.TypeComponentsMap[props.type] ? ns.m(type) : "";
|
|
38
|
-
});
|
|
39
|
-
const iconComponent = vue.computed(() => {
|
|
40
|
-
if (!props.type)
|
|
41
|
-
return props.icon;
|
|
42
|
-
return icon.TypeComponentsMap[props.type] || props.icon;
|
|
43
|
-
});
|
|
44
|
-
const horizontalClass = vue.computed(() => props.position.endsWith("right") ? "right" : "left");
|
|
45
|
-
const verticalProperty = vue.computed(() => props.position.startsWith("top") ? "top" : "bottom");
|
|
46
|
-
const positionStyle = vue.computed(() => {
|
|
47
|
-
var _a;
|
|
48
|
-
return {
|
|
49
|
-
[verticalProperty.value]: `${props.offset}px`,
|
|
50
|
-
zIndex: (_a = props.zIndex) != null ? _a : currentZIndex.value
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
|
-
function startTimer() {
|
|
54
|
-
if (props.duration > 0) {
|
|
55
|
-
;
|
|
56
|
-
({ stop: timer } = core.useTimeoutFn(() => {
|
|
57
|
-
if (visible.value)
|
|
58
|
-
close();
|
|
59
|
-
}, props.duration));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function clearTimer() {
|
|
63
|
-
timer == null ? void 0 : timer();
|
|
64
|
-
}
|
|
65
|
-
function close() {
|
|
66
|
-
visible.value = false;
|
|
67
|
-
}
|
|
68
|
-
function onKeydown({ code }) {
|
|
69
|
-
if (code === aria.EVENT_CODE.delete || code === aria.EVENT_CODE.backspace) {
|
|
70
|
-
clearTimer();
|
|
71
|
-
} else if (code === aria.EVENT_CODE.esc) {
|
|
72
|
-
if (visible.value) {
|
|
73
|
-
close();
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
startTimer();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
vue.onMounted(() => {
|
|
80
|
-
startTimer();
|
|
81
|
-
nextZIndex();
|
|
82
|
-
visible.value = true;
|
|
83
|
-
});
|
|
84
|
-
core.useEventListener(document, "keydown", onKeydown);
|
|
85
|
-
expose({
|
|
86
|
-
visible,
|
|
87
|
-
close
|
|
88
|
-
});
|
|
89
|
-
return (_ctx, _cache) => {
|
|
90
|
-
return vue.openBlock(), vue.createBlock(vue.Transition, {
|
|
91
|
-
name: vue.unref(ns).b("fade"),
|
|
92
|
-
onBeforeLeave: _ctx.onClose,
|
|
93
|
-
onAfterLeave: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("destroy")),
|
|
94
|
-
persisted: ""
|
|
95
|
-
}, {
|
|
96
|
-
default: vue.withCtx(() => [
|
|
97
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
98
|
-
id: _ctx.id,
|
|
99
|
-
class: vue.normalizeClass([vue.unref(ns).b(), _ctx.customClass, vue.unref(horizontalClass)]),
|
|
100
|
-
style: vue.normalizeStyle(vue.unref(positionStyle)),
|
|
101
|
-
role: "alert",
|
|
102
|
-
onMouseenter: clearTimer,
|
|
103
|
-
onMouseleave: startTimer,
|
|
104
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
|
|
105
|
-
}, [
|
|
106
|
-
vue.unref(iconComponent) ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
107
|
-
key: 0,
|
|
108
|
-
class: vue.normalizeClass([vue.unref(ns).e("icon"), vue.unref(typeClass)])
|
|
109
|
-
}, {
|
|
110
|
-
default: vue.withCtx(() => [
|
|
111
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(iconComponent))))
|
|
112
|
-
]),
|
|
113
|
-
_: 1
|
|
114
|
-
}, 8, ["class"])) : vue.createCommentVNode("v-if", true),
|
|
115
|
-
vue.createElementVNode("div", {
|
|
116
|
-
class: vue.normalizeClass(vue.unref(ns).e("group"))
|
|
117
|
-
}, [
|
|
118
|
-
vue.createElementVNode("h2", {
|
|
119
|
-
class: vue.normalizeClass(vue.unref(ns).e("title")),
|
|
120
|
-
textContent: vue.toDisplayString(_ctx.title)
|
|
121
|
-
}, null, 10, _hoisted_2),
|
|
122
|
-
vue.withDirectives(vue.createElementVNode("div", {
|
|
123
|
-
class: vue.normalizeClass(vue.unref(ns).e("content")),
|
|
124
|
-
style: vue.normalizeStyle(!!_ctx.title ? void 0 : { margin: 0 })
|
|
125
|
-
}, [
|
|
126
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
127
|
-
!_ctx.dangerouslyUseHTMLString ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3, vue.toDisplayString(_ctx.message), 1)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
128
|
-
vue.createCommentVNode(" Caution here, message could've been compromised, never use user's input as message "),
|
|
129
|
-
vue.createElementVNode("p", { innerHTML: _ctx.message }, null, 8, _hoisted_4)
|
|
130
|
-
], 2112))
|
|
131
|
-
])
|
|
132
|
-
], 6), [
|
|
133
|
-
[vue.vShow, _ctx.message]
|
|
134
|
-
]),
|
|
135
|
-
_ctx.showClose ? (vue.openBlock(), vue.createBlock(vue.unref(index.ElIcon), {
|
|
136
|
-
key: 0,
|
|
137
|
-
class: vue.normalizeClass(vue.unref(ns).e("closeBtn")),
|
|
138
|
-
onClick: vue.withModifiers(close, ["stop"])
|
|
139
|
-
}, {
|
|
140
|
-
default: vue.withCtx(() => [
|
|
141
|
-
vue.createVNode(vue.unref(Close))
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
}, 8, ["class", "onClick"])) : vue.createCommentVNode("v-if", true)
|
|
145
|
-
], 2)
|
|
146
|
-
], 46, _hoisted_1), [
|
|
147
|
-
[vue.vShow, visible.value]
|
|
148
|
-
])
|
|
149
|
-
]),
|
|
150
|
-
_: 3
|
|
151
|
-
}, 8, ["name", "onBeforeLeave"]);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
var NotificationConstructor = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "notification.vue"]]);
|
|
71
|
+
const notificationEmits = {
|
|
72
|
+
destroy: () => true
|
|
73
|
+
};
|
|
156
74
|
|
|
157
|
-
exports
|
|
75
|
+
exports.notificationEmits = notificationEmits;
|
|
76
|
+
exports.notificationProps = notificationProps;
|
|
77
|
+
exports.notificationTypes = notificationTypes;
|
|
158
78
|
//# sourceMappingURL=notification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import { buildProps, definePropType, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, VNode } from 'vue'\nimport type Notification from './notification.vue'\n\nexport const notificationTypes = [\n 'success',\n 'info',\n 'warning',\n 'error',\n] as const\n\nexport const notificationProps = buildProps({\n /**\n * @description custom class name for Notification\n */\n customClass: {\n type: String,\n default: '',\n },\n /**\n * @description whether `message` is treated as HTML string\n */\n dangerouslyUseHTMLString: {\n type: Boolean,\n default: false,\n },\n /**\n * @description duration before close. It will not automatically close if set 0\n */\n duration: {\n type: Number,\n default: 4500,\n },\n /**\n * @description custom icon component. It will be overridden by `type`\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description notification dom id\n */\n id: {\n type: String,\n default: '',\n },\n /**\n * @description description text\n */\n message: {\n type: definePropType<string | VNode>([String, Object]),\n default: '',\n },\n /**\n * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset\n */\n offset: {\n type: Number,\n default: 0,\n },\n /**\n * @description callback function when notification clicked\n */\n onClick: {\n type: definePropType<() => void>(Function),\n default: () => undefined,\n },\n /**\n * @description callback function when closed\n */\n onClose: {\n type: definePropType<() => void>(Function),\n required: true,\n },\n /**\n * @description custom position\n */\n position: {\n type: String,\n values: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],\n default: 'top-right',\n },\n /**\n * @description whether to show a close button\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n /**\n * @description title\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description notification type\n */\n type: {\n type: String,\n values: [...notificationTypes, ''],\n default: '',\n },\n /**\n * @description initial zIndex\n */\n zIndex: Number,\n} as const)\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\n\nexport const notificationEmits = {\n destroy: () => true,\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationInstance = InstanceType<typeof Notification>\n\nexport type NotificationOptions = Omit<NotificationProps, 'id'> & {\n /**\n * @description set the root element for the notification, default to `document.body`\n */\n appendTo?: HTMLElement | string\n}\nexport type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>\n\nexport interface NotificationHandle {\n close: () => void\n}\n\nexport type NotificationParams = Partial<NotificationOptions> | string | VNode\nexport type NotificationParamsTyped =\n | Partial<NotificationOptionsTyped>\n | string\n | VNode\n\nexport type NotifyFn = ((\n options?: NotificationParams\n) => NotificationHandle) & { closeAll: () => void }\n\nexport type NotifyTypedFn = (\n options?: NotificationParamsTyped\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n success: NotifyTypedFn\n warning: NotifyTypedFn\n error: NotifyTypedFn\n info: NotifyTypedFn\n}\n\nexport interface NotificationQueueItem {\n vm: VNode\n}\n\nexport type NotificationQueue = NotificationQueueItem[]\n"],"names":["buildProps","iconPropType","definePropType"],"mappings":";;;;;;;;AACY,MAAC,iBAAiB,GAAG;AACjC,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE;AACU,MAAC,iBAAiB,GAAGA,kBAAU,CAAC;AAC5C,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,wBAAwB,EAAE;AAC5B,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,GAAG;AACH,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,MAAM,KAAK,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,E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