@element-plus/nightly 0.0.20250612 → 0.0.20250614
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/dist/index.full.js +10 -3
- package/dist/index.full.min.js +3 -3
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +3 -3
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +10 -3
- 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/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +87 -62
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +62 -87
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +39 -399
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +399 -39
- 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/countdown/index.mjs +2 -2
- package/es/components/countdown/src/countdown.mjs +21 -79
- package/es/components/countdown/src/countdown.mjs.map +1 -1
- package/es/components/countdown/src/countdown2.mjs +79 -21
- package/es/components/countdown/src/countdown2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/empty/index.mjs +2 -2
- package/es/components/empty/src/empty.mjs +11 -52
- package/es/components/empty/src/empty.mjs.map +1 -1
- package/es/components/empty/src/empty2.mjs +52 -11
- package/es/components/empty/src/empty2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +322 -47
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +47 -322
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +226 -68
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +68 -226
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +16 -16
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +103 -437
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +437 -103
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +25 -71
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +71 -25
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +1 -1
- package/es/components/mention/src/mention2.mjs +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +45 -114
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +114 -45
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +30 -62
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +62 -30
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/row/index.mjs +2 -2
- package/es/components/row/src/row.mjs +44 -28
- package/es/components/row/src/row.mjs.map +1 -1
- package/es/components/row/src/row2.mjs +28 -44
- package/es/components/row/src/row2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +168 -42
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +42 -168
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/slider/src/button.mjs +19 -91
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +91 -19
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/steps.mjs +35 -39
- package/es/components/steps/src/steps.mjs.map +1 -1
- package/es/components/steps/src/steps2.mjs +39 -35
- package/es/components/steps/src/steps2.mjs.map +1 -1
- package/es/components/table/src/table-body/events-helper.mjs +3 -0
- package/es/components/table/src/table-body/events-helper.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +8 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -8
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content.mjs +48 -110
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +110 -48
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +17 -79
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +79 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tour/src/tour.mjs +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +10 -56
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +60 -10
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/hooks/use-focus-controller/index.mjs.map +1 -1
- package/es/index.mjs +16 -16
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +87 -65
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +65 -87
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +40 -398
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +398 -40
- 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/countdown/index.js +2 -2
- package/lib/components/countdown/src/countdown.js +22 -79
- package/lib/components/countdown/src/countdown.js.map +1 -1
- package/lib/components/countdown/src/countdown2.js +79 -22
- package/lib/components/countdown/src/countdown2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/empty/index.js +2 -2
- package/lib/components/empty/src/empty.js +11 -52
- package/lib/components/empty/src/empty.js.map +1 -1
- package/lib/components/empty/src/empty2.js +52 -11
- package/lib/components/empty/src/empty2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +326 -48
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +48 -326
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +225 -68
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +68 -225
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +16 -16
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +101 -434
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +434 -101
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +26 -71
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +71 -26
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/mention/src/mention.js +1 -1
- package/lib/components/mention/src/mention2.js +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +46 -114
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +114 -46
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +32 -62
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +62 -32
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/row/index.js +2 -2
- package/lib/components/row/src/row.js +44 -30
- package/lib/components/row/src/row.js.map +1 -1
- package/lib/components/row/src/row2.js +30 -44
- package/lib/components/row/src/row2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +168 -44
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +44 -168
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +22 -17
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +17 -22
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/slider/src/button.js +20 -91
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +91 -20
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/steps.js +36 -39
- package/lib/components/steps/src/steps.js.map +1 -1
- package/lib/components/steps/src/steps2.js +39 -36
- package/lib/components/steps/src/steps2.js.map +1 -1
- package/lib/components/table/src/table-body/events-helper.js +3 -0
- package/lib/components/table/src/table-body/events-helper.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +8 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -8
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content.js +48 -110
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +110 -48
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +17 -79
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +79 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tour/src/tour.js +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +11 -56
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +60 -11
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/hooks/use-focus-controller/index.js.map +1 -1
- package/lib/index.js +16 -16
- 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/web-types.json +1 -1
@@ -1,92 +1,67 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { useButtonCustomStyle } from './button-custom.mjs';
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
import { Loading } from '@element-plus/icons-vue';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
4
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
8
5
|
|
9
|
-
const
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
key: 1,
|
64
|
-
class: normalizeClass(unref(ns).is("loading"))
|
65
|
-
}, {
|
66
|
-
default: withCtx(() => [
|
67
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
|
68
|
-
]),
|
69
|
-
_: 1
|
70
|
-
}, 8, ["class"]))
|
71
|
-
], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
|
72
|
-
default: withCtx(() => [
|
73
|
-
_ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
|
74
|
-
]),
|
75
|
-
_: 3
|
76
|
-
})) : createCommentVNode("v-if", true),
|
77
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("span", {
|
78
|
-
key: 2,
|
79
|
-
class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
|
80
|
-
}, [
|
81
|
-
renderSlot(_ctx.$slots, "default")
|
82
|
-
], 2)) : createCommentVNode("v-if", true)
|
83
|
-
]),
|
84
|
-
_: 3
|
85
|
-
}, 16, ["class", "style", "onClick"]);
|
86
|
-
};
|
6
|
+
const buttonTypes = [
|
7
|
+
"default",
|
8
|
+
"primary",
|
9
|
+
"success",
|
10
|
+
"warning",
|
11
|
+
"info",
|
12
|
+
"danger",
|
13
|
+
"text",
|
14
|
+
""
|
15
|
+
];
|
16
|
+
const buttonNativeTypes = ["button", "submit", "reset"];
|
17
|
+
const buttonProps = buildProps({
|
18
|
+
size: useSizeProp,
|
19
|
+
disabled: Boolean,
|
20
|
+
type: {
|
21
|
+
type: String,
|
22
|
+
values: buttonTypes,
|
23
|
+
default: ""
|
24
|
+
},
|
25
|
+
icon: {
|
26
|
+
type: iconPropType
|
27
|
+
},
|
28
|
+
nativeType: {
|
29
|
+
type: String,
|
30
|
+
values: buttonNativeTypes,
|
31
|
+
default: "button"
|
32
|
+
},
|
33
|
+
loading: Boolean,
|
34
|
+
loadingIcon: {
|
35
|
+
type: iconPropType,
|
36
|
+
default: () => Loading
|
37
|
+
},
|
38
|
+
plain: {
|
39
|
+
type: Boolean,
|
40
|
+
default: void 0
|
41
|
+
},
|
42
|
+
text: Boolean,
|
43
|
+
link: Boolean,
|
44
|
+
bg: Boolean,
|
45
|
+
autofocus: Boolean,
|
46
|
+
round: {
|
47
|
+
type: Boolean,
|
48
|
+
default: void 0
|
49
|
+
},
|
50
|
+
circle: Boolean,
|
51
|
+
color: String,
|
52
|
+
dark: Boolean,
|
53
|
+
autoInsertSpace: {
|
54
|
+
type: Boolean,
|
55
|
+
default: void 0
|
56
|
+
},
|
57
|
+
tag: {
|
58
|
+
type: definePropType([String, Object]),
|
59
|
+
default: "button"
|
87
60
|
}
|
88
61
|
});
|
89
|
-
|
62
|
+
const buttonEmits = {
|
63
|
+
click: (evt) => evt instanceof MouseEvent
|
64
|
+
};
|
90
65
|
|
91
|
-
export {
|
66
|
+
export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };
|
92
67
|
//# sourceMappingURL=button2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two chinese characters\n */\n autoInsertSpace: {\n type: Boolean,\n default: undefined,\n },\n /**\n * @description custom element tag\n */\n tag: {\n type: definePropType<string | Component>([String, Object]),\n default: 'button',\n },\n} as const)\nexport const buttonEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type ButtonProps = ExtractPropTypes<typeof buttonProps>\nexport type ButtonEmits = typeof buttonEmits\n\nexport type ButtonType = ButtonProps['type']\nexport type ButtonNativeType = ButtonProps['nativeType']\n\nexport interface ButtonConfigContext {\n type?: string\n plain?: boolean\n round?: boolean\n autoInsertSpace?: boolean\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,WAAW,GAAG;AAC3B,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,EAAE;AACJ,EAAE;AACU,MAAC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;AACnD,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,WAAW;AACvB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,iBAAiB;AAC7B,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,OAAO,EAAE,OAAO;AAClB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,MAAM,OAAO;AAC1B,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,EAAE,EAAE,OAAO;AACb,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,eAAe,EAAE;AACnB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,GAAG,YAAY,UAAU;AAC3C;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import ColorPicker from './src/color-
|
2
|
-
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './src/color-
|
1
|
+
import ColorPicker from './src/color-picker2.mjs';
|
2
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps } from './src/color-picker.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElColorPicker = withInstall(ColorPicker);
|
@@ -1,404 +1,44 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
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 { useFocusController } from '../../../hooks/use-focus-controller/index.mjs';
|
1
|
+
import { isNil } from 'lodash-unified';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
4
|
+
import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
|
5
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
21
6
|
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
|
22
|
-
import {
|
23
|
-
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
7
|
+
import { isString } from '@vue/shared';
|
24
8
|
|
25
|
-
const
|
26
|
-
|
9
|
+
const colorPickerProps = buildProps({
|
10
|
+
modelValue: String,
|
11
|
+
id: String,
|
12
|
+
showAlpha: Boolean,
|
13
|
+
colorFormat: String,
|
14
|
+
disabled: Boolean,
|
15
|
+
size: useSizeProp,
|
16
|
+
popperClass: {
|
17
|
+
type: String,
|
18
|
+
default: ""
|
19
|
+
},
|
20
|
+
tabindex: {
|
21
|
+
type: [String, Number],
|
22
|
+
default: 0
|
23
|
+
},
|
24
|
+
teleported: useTooltipContentProps.teleported,
|
25
|
+
predefine: {
|
26
|
+
type: definePropType(Array)
|
27
|
+
},
|
28
|
+
validateEvent: {
|
29
|
+
type: Boolean,
|
30
|
+
default: true
|
31
|
+
},
|
32
|
+
...useAriaProps(["ariaLabel"])
|
27
33
|
});
|
28
|
-
const
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
const { formItem } = useFormItem();
|
37
|
-
const colorSize = useFormSize();
|
38
|
-
const colorDisabled = useFormDisabled();
|
39
|
-
const { inputId: buttonId, isLabeledByFormItem } = useFormItemInputId(props, {
|
40
|
-
formItemContext: formItem
|
41
|
-
});
|
42
|
-
const hue = ref();
|
43
|
-
const sv = ref();
|
44
|
-
const alpha = ref();
|
45
|
-
const popper = ref();
|
46
|
-
const triggerRef = ref();
|
47
|
-
const inputRef = ref();
|
48
|
-
const { isFocused, handleFocus, handleBlur } = useFocusController(triggerRef, {
|
49
|
-
beforeFocus() {
|
50
|
-
return colorDisabled.value;
|
51
|
-
},
|
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 = 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, null);
|
161
|
-
emit(CHANGE_EVENT, null);
|
162
|
-
if (props.modelValue !== null && 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"]]);
|
34
|
+
const colorPickerEmits = {
|
35
|
+
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
|
36
|
+
[CHANGE_EVENT]: (val) => isString(val) || isNil(val),
|
37
|
+
activeChange: (val) => isString(val) || isNil(val),
|
38
|
+
focus: (evt) => evt instanceof FocusEvent,
|
39
|
+
blur: (evt) => evt instanceof FocusEvent
|
40
|
+
};
|
41
|
+
const colorPickerContextKey = Symbol("colorPickerContextKey");
|
402
42
|
|
403
|
-
export {
|
43
|
+
export { colorPickerContextKey, colorPickerEmits, colorPickerProps };
|
404
44
|
//# sourceMappingURL=color-picker.mjs.map
|