@element-plus/nightly 0.0.20231010 → 0.0.20231012
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +623 -452
- package/dist/index.full.min.js +17 -17
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +19 -19
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +623 -452
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/autocomplete/index.d.ts +28 -1
- package/es/components/autocomplete/src/autocomplete.vue.d.ts +28 -1
- package/es/components/carousel/index.d.ts +5 -0
- package/es/components/carousel/src/carousel.vue.d.ts +5 -0
- package/es/components/carousel/src/carousel2.mjs +7 -2
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/carousel/src/use-carousel.d.ts +6 -0
- package/es/components/carousel/src/use-carousel.mjs +33 -1
- package/es/components/carousel/src/use-carousel.mjs.map +1 -1
- package/es/components/cascader/index.d.ts +150 -6
- package/es/components/cascader/src/cascader.vue.d.ts +75 -3
- package/es/components/checkbox/index.d.ts +12 -0
- package/es/components/checkbox/src/checkbox-button.vue.d.ts +4 -0
- package/es/components/checkbox/src/checkbox.d.ts +1 -0
- package/es/components/checkbox/src/checkbox.mjs +2 -1
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +4 -0
- package/es/components/checkbox/src/checkbox2.mjs +8 -12
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs +2 -2
- package/es/components/checkbox/src/composables/use-checkbox-status.mjs.map +1 -1
- package/es/components/color-picker/index.d.ts +18 -1
- package/es/components/color-picker/src/color-picker.d.ts +2 -0
- package/es/components/color-picker/src/color-picker.mjs +3 -1
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker.vue.d.ts +18 -1
- package/es/components/color-picker/src/color-picker2.mjs +83 -11
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +263 -11
- package/es/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +263 -11
- package/es/components/date-picker/src/panel-utils.d.ts +526 -22
- package/es/components/descriptions/src/description-item.mjs.map +1 -1
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/image/index.d.ts +16 -0
- package/es/components/image/src/image.d.ts +2 -0
- package/es/components/image/src/image.mjs +8 -0
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image.vue.d.ts +16 -0
- package/es/components/image/src/image2.mjs +3 -1
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.d.ts +8 -0
- package/es/components/image-viewer/src/image-viewer.d.ts +2 -0
- package/es/components/image-viewer/src/image-viewer.mjs +8 -0
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +8 -0
- package/es/components/image-viewer/src/image-viewer2.mjs +3 -2
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.vue.d.ts +4 -0
- package/es/components/scrollbar/index.d.ts +28 -1
- package/es/components/scrollbar/src/scrollbar.d.ts +9 -0
- package/es/components/scrollbar/src/scrollbar.mjs +7 -0
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.vue.d.ts +28 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +12 -8
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/select/index.d.ts +4 -0
- package/es/components/select/src/option.mjs +9 -1
- package/es/components/select/src/option.mjs.map +1 -1
- package/es/components/select/src/option.vue.d.ts +1 -0
- package/es/components/select/src/select.mjs +251 -228
- package/es/components/select/src/select.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +98 -98
- package/es/components/select/src/useSelect.d.ts +1 -0
- package/es/components/select/src/useSelect.mjs +4 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.mjs +15 -33
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table.mjs +33 -12
- package/es/components/table/src/table.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +216 -9
- package/es/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +263 -11
- package/es/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +263 -11
- package/es/components/time-select/index.d.ts +14 -0
- package/es/components/time-select/src/time-select.vue.d.ts +16 -9
- package/es/components/transfer/index.d.ts +40 -0
- package/es/components/transfer/src/transfer-panel.vue.d.ts +8 -0
- package/es/components/transfer/src/transfer.vue.d.ts +40 -0
- package/es/components/tree-select/src/tree-select-option.d.ts +6 -0
- package/es/components/tree-v2/index.d.ts +8 -0
- package/es/components/tree-v2/src/tree-node.vue.d.ts +8 -0
- package/es/components/tree-v2/src/tree.vue.d.ts +8 -0
- package/es/hooks/use-focus-controller/index.d.ts +6 -1
- package/es/hooks/use-focus-controller/index.mjs +5 -2
- package/es/hooks/use-focus-controller/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/index.d.ts +28 -1
- package/lib/components/autocomplete/src/autocomplete.vue.d.ts +28 -1
- package/lib/components/carousel/index.d.ts +5 -0
- package/lib/components/carousel/src/carousel.vue.d.ts +5 -0
- package/lib/components/carousel/src/carousel2.js +7 -2
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/carousel/src/use-carousel.d.ts +6 -0
- package/lib/components/carousel/src/use-carousel.js +32 -0
- package/lib/components/carousel/src/use-carousel.js.map +1 -1
- package/lib/components/cascader/index.d.ts +150 -6
- package/lib/components/cascader/src/cascader.vue.d.ts +75 -3
- package/lib/components/checkbox/index.d.ts +12 -0
- package/lib/components/checkbox/src/checkbox-button.vue.d.ts +4 -0
- package/lib/components/checkbox/src/checkbox.d.ts +1 -0
- package/lib/components/checkbox/src/checkbox.js +2 -1
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +4 -0
- package/lib/components/checkbox/src/checkbox2.js +8 -12
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js +1 -1
- package/lib/components/checkbox/src/composables/use-checkbox-status.js.map +1 -1
- package/lib/components/color-picker/index.d.ts +18 -1
- package/lib/components/color-picker/src/color-picker.d.ts +2 -0
- package/lib/components/color-picker/src/color-picker.js +3 -1
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker.vue.d.ts +18 -1
- package/lib/components/color-picker/src/color-picker2.js +93 -21
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/date-picker/src/date-picker-com/panel-date-pick.vue.d.ts +263 -11
- package/lib/components/date-picker/src/date-picker-com/panel-date-range.vue.d.ts +263 -11
- package/lib/components/date-picker/src/panel-utils.d.ts +526 -22
- package/lib/components/descriptions/src/description-item.js.map +1 -1
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/image/index.d.ts +16 -0
- package/lib/components/image/src/image.d.ts +2 -0
- package/lib/components/image/src/image.js +8 -0
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image.vue.d.ts +16 -0
- package/lib/components/image/src/image2.js +3 -1
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.d.ts +8 -0
- package/lib/components/image-viewer/src/image-viewer.d.ts +2 -0
- package/lib/components/image-viewer/src/image-viewer.js +8 -0
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +8 -0
- package/lib/components/image-viewer/src/image-viewer2.js +3 -2
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.vue.d.ts +4 -0
- package/lib/components/scrollbar/index.d.ts +28 -1
- package/lib/components/scrollbar/src/scrollbar.d.ts +9 -0
- package/lib/components/scrollbar/src/scrollbar.js +7 -0
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.vue.d.ts +28 -1
- package/lib/components/scrollbar/src/scrollbar2.js +12 -8
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/select/index.d.ts +4 -0
- package/lib/components/select/src/option.js +9 -1
- package/lib/components/select/src/option.js.map +1 -1
- package/lib/components/select/src/option.vue.d.ts +1 -0
- package/lib/components/select/src/select.js +251 -228
- package/lib/components/select/src/select.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +98 -98
- package/lib/components/select/src/useSelect.d.ts +1 -0
- package/lib/components/select/src/useSelect.js +4 -2
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/table/src/table-footer/index.js +15 -33
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table.js +33 -12
- package/lib/components/table/src/table.js.map +1 -1
- package/lib/components/time-picker/src/time-picker-com/basic-time-spinner.vue.d.ts +216 -9
- package/lib/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +263 -11
- package/lib/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +263 -11
- package/lib/components/time-select/index.d.ts +14 -0
- package/lib/components/time-select/src/time-select.vue.d.ts +16 -9
- package/lib/components/transfer/index.d.ts +40 -0
- package/lib/components/transfer/src/transfer-panel.vue.d.ts +8 -0
- package/lib/components/transfer/src/transfer.vue.d.ts +40 -0
- package/lib/components/tree-select/src/tree-select-option.d.ts +6 -0
- package/lib/components/tree-v2/index.d.ts +8 -0
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +8 -0
- package/lib/components/tree-v2/src/tree.vue.d.ts +8 -0
- package/lib/hooks/use-focus-controller/index.d.ts +6 -1
- package/lib/hooks/use-focus-controller/index.js +5 -2
- package/lib/hooks/use-focus-controller/index.js.map +1 -1
- package/lib/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-color-picker.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-upload.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/color-picker.scss +8 -2
- package/theme-chalk/src/common/var.scss +1 -0
- package/theme-chalk/src/table.scss +37 -14
- package/theme-chalk/src/upload.scss +1 -1
- package/web-types.json +1 -1
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
};
|
|
6
6
|
label: {
|
|
7
7
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
8
|
+
default: undefined;
|
|
8
9
|
};
|
|
9
10
|
indeterminate: BooleanConstructor;
|
|
10
11
|
disabled: BooleanConstructor;
|
|
@@ -49,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
50
|
};
|
|
50
51
|
label: {
|
|
51
52
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
53
|
+
default: undefined;
|
|
52
54
|
};
|
|
53
55
|
indeterminate: BooleanConstructor;
|
|
54
56
|
disabled: BooleanConstructor;
|
|
@@ -132,6 +134,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
132
134
|
};
|
|
133
135
|
label: {
|
|
134
136
|
type: (ObjectConstructor | NumberConstructor | BooleanConstructor | StringConstructor)[];
|
|
137
|
+
default: undefined;
|
|
135
138
|
};
|
|
136
139
|
indeterminate: BooleanConstructor;
|
|
137
140
|
disabled: BooleanConstructor;
|
|
@@ -173,6 +176,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
173
176
|
"onUpdate:modelValue"?: ((val: import("./checkbox").CheckboxValueType) => any) | undefined;
|
|
174
177
|
}, {
|
|
175
178
|
modelValue: string | number | boolean;
|
|
179
|
+
label: string | number | boolean | Record<string, any>;
|
|
176
180
|
id: string;
|
|
177
181
|
disabled: boolean;
|
|
178
182
|
name: string;
|
|
@@ -6,9 +6,8 @@ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
|
6
6
|
import { useCheckbox } from './composables/use-checkbox.mjs';
|
|
7
7
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
8
|
|
|
9
|
-
const _hoisted_1 = ["tabindex", "
|
|
10
|
-
const _hoisted_2 = ["id", "
|
|
11
|
-
const _hoisted_3 = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"];
|
|
9
|
+
const _hoisted_1 = ["id", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value"];
|
|
10
|
+
const _hoisted_2 = ["id", "indeterminate", "disabled", "value", "name", "tabindex"];
|
|
12
11
|
const __default__ = defineComponent({
|
|
13
12
|
name: "ElCheckbox"
|
|
14
13
|
});
|
|
@@ -58,10 +57,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
58
57
|
}, {
|
|
59
58
|
default: withCtx(() => [
|
|
60
59
|
createElementVNode("span", {
|
|
61
|
-
class: normalizeClass(unref(spanKls))
|
|
62
|
-
tabindex: _ctx.indeterminate ? 0 : void 0,
|
|
63
|
-
role: _ctx.indeterminate ? "checkbox" : void 0,
|
|
64
|
-
"aria-checked": _ctx.indeterminate ? "mixed" : void 0
|
|
60
|
+
class: normalizeClass(unref(spanKls))
|
|
65
61
|
}, [
|
|
66
62
|
_ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
|
|
67
63
|
key: 0,
|
|
@@ -69,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
65
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
|
|
70
66
|
class: normalizeClass(unref(ns).e("original")),
|
|
71
67
|
type: "checkbox",
|
|
72
|
-
|
|
68
|
+
indeterminate: _ctx.indeterminate,
|
|
73
69
|
name: _ctx.name,
|
|
74
70
|
tabindex: _ctx.tabindex,
|
|
75
71
|
disabled: unref(isDisabled),
|
|
@@ -80,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
76
|
onBlur: _cache[3] || (_cache[3] = ($event) => isFocused.value = false),
|
|
81
77
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
82
78
|
}, ["stop"]))
|
|
83
|
-
}, null, 42,
|
|
79
|
+
}, null, 42, _hoisted_1)), [
|
|
84
80
|
[vModelCheckbox, unref(model)]
|
|
85
81
|
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
86
82
|
key: 1,
|
|
@@ -88,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
84
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => isRef(model) ? model.value = $event : null),
|
|
89
85
|
class: normalizeClass(unref(ns).e("original")),
|
|
90
86
|
type: "checkbox",
|
|
91
|
-
|
|
87
|
+
indeterminate: _ctx.indeterminate,
|
|
92
88
|
disabled: unref(isDisabled),
|
|
93
89
|
value: _ctx.label,
|
|
94
90
|
name: _ctx.name,
|
|
@@ -98,13 +94,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
94
|
onBlur: _cache[8] || (_cache[8] = ($event) => isFocused.value = false),
|
|
99
95
|
onClick: _cache[9] || (_cache[9] = withModifiers(() => {
|
|
100
96
|
}, ["stop"]))
|
|
101
|
-
}, null, 42,
|
|
97
|
+
}, null, 42, _hoisted_2)), [
|
|
102
98
|
[vModelCheckbox, unref(model)]
|
|
103
99
|
]),
|
|
104
100
|
createElementVNode("span", {
|
|
105
101
|
class: normalizeClass(unref(ns).e("inner"))
|
|
106
102
|
}, null, 2)
|
|
107
|
-
],
|
|
103
|
+
], 2),
|
|
108
104
|
unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
|
|
109
105
|
key: 0,
|
|
110
106
|
class: normalizeClass(unref(ns).e("label"))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox2.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span
|
|
1
|
+
{"version":3,"file":"checkbox2.mjs","sources":["../../../../../../packages/components/checkbox/src/checkbox.vue"],"sourcesContent":["<template>\n <component\n :is=\"!hasOwnLabel && isLabeledByFormItem ? 'span' : 'label'\"\n :class=\"compKls\"\n :aria-controls=\"indeterminate ? controls : null\"\n @click=\"onClickRoot\"\n >\n <span :class=\"spanKls\">\n <input\n v-if=\"trueLabel || falseLabel\"\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n :disabled=\"isDisabled\"\n :true-value=\"trueLabel\"\n :false-value=\"falseLabel\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <input\n v-else\n :id=\"inputId\"\n v-model=\"model\"\n :class=\"ns.e('original')\"\n type=\"checkbox\"\n :indeterminate=\"indeterminate\"\n :disabled=\"isDisabled\"\n :value=\"label\"\n :name=\"name\"\n :tabindex=\"tabindex\"\n @change=\"handleChange\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n @click.stop\n />\n <span :class=\"ns.e('inner')\" />\n </span>\n <span v-if=\"hasOwnLabel\" :class=\"ns.e('label')\">\n <slot />\n <template v-if=\"!$slots.default\">{{ label }}</template>\n </span>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, useSlots } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { checkboxEmits, checkboxProps } from './checkbox'\nimport { useCheckbox } from './composables'\n\ndefineOptions({\n name: 'ElCheckbox',\n})\n\nconst props = defineProps(checkboxProps)\ndefineEmits(checkboxEmits)\nconst slots = useSlots()\n\nconst {\n inputId,\n isLabeledByFormItem,\n isChecked,\n isDisabled,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n model,\n handleChange,\n onClickRoot,\n} = useCheckbox(props, slots)\n\nconst ns = useNamespace('checkbox')\n\nconst compKls = computed(() => {\n return [\n ns.b(),\n ns.m(checkboxSize.value),\n ns.is('disabled', isDisabled.value),\n ns.is('bordered', props.border),\n ns.is('checked', isChecked.value),\n ]\n})\n\nconst spanKls = computed(() => {\n return [\n ns.e('input'),\n ns.is('disabled', isDisabled.value),\n ns.is('checked', isChecked.value),\n ns.is('indeterminate', props.indeterminate),\n ns.is('focus', isFocused.value),\n ]\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;mCAwDc,CAAA;AAAA,EACZ,IAAM,EAAA,YAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,mBAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACE,GAAA,WAAA,CAAY,OAAO,KAAK,CAAA,CAAA;AAE5B,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;AAElC,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,GAAG,CAAE,EAAA;AAAA,QACL,EAAA,CAAG,CAAE,CAAA,YAAA,CAAa,KAAK,CAAA;AAAA,QACvB,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,KAAA,CAAM,MAAM,CAAA;AAAA,QAC9B,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAClC,CAAA;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,OAAA,GAAU,SAAS,MAAM;AAC7B,MAAO,OAAA;AAAA,QACL,EAAA,CAAG,EAAE,OAAO,CAAA;AAAA,QACZ,EAAG,CAAA,EAAA,CAAG,UAAY,EAAA,UAAA,CAAW,KAAK,CAAA;AAAA,QAClC,EAAG,CAAA,EAAA,CAAG,SAAW,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,QAChC,EAAG,CAAA,EAAA,CAAG,eAAiB,EAAA,KAAA,CAAM,aAAa,CAAA;AAAA,QAC1C,EAAG,CAAA,EAAA,CAAG,OAAS,EAAA,SAAA,CAAU,KAAK,CAAA;AAAA,OAChC,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, ref, computed, toRaw } from 'vue';
|
|
2
|
-
import { isEqual } from 'lodash-unified';
|
|
2
|
+
import { isEqual, isNil } from 'lodash-unified';
|
|
3
3
|
import '../../../form/index.mjs';
|
|
4
4
|
import '../../../../utils/index.mjs';
|
|
5
5
|
import { checkboxGroupContextKey } from '../constants.mjs';
|
|
@@ -37,7 +37,7 @@ const useCheckboxStatus = (props, slots, { model }) => {
|
|
|
37
37
|
return (_a = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a.value;
|
|
38
38
|
}));
|
|
39
39
|
const hasOwnLabel = computed(() => {
|
|
40
|
-
return !!
|
|
40
|
+
return !!slots.default || !isNil(props.label);
|
|
41
41
|
});
|
|
42
42
|
return {
|
|
43
43
|
checkboxButtonSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-checkbox-status.mjs","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!
|
|
1
|
+
{"version":3,"file":"use-checkbox-status.mjs","sources":["../../../../../../../packages/components/checkbox/src/composables/use-checkbox-status.ts"],"sourcesContent":["import { computed, inject, ref, toRaw } from 'vue'\nimport { isEqual, isNil } from 'lodash-unified'\nimport { useFormSize } from '@element-plus/components/form'\nimport { isArray, isBoolean, isObject } from '@element-plus/utils'\nimport { checkboxGroupContextKey } from '../constants'\n\nimport type { ComponentInternalInstance } from 'vue'\nimport type { CheckboxProps } from '../checkbox'\nimport type { CheckboxModel } from '../composables'\n\nexport const useCheckboxStatus = (\n props: CheckboxProps,\n slots: ComponentInternalInstance['slots'],\n { model }: Pick<CheckboxModel, 'model'>\n) => {\n const checkboxGroup = inject(checkboxGroupContextKey, undefined)\n const isFocused = ref(false)\n const isChecked = computed<boolean>(() => {\n const value = model.value\n if (isBoolean(value)) {\n return value\n } else if (isArray(value)) {\n if (isObject(props.label)) {\n return value.map(toRaw).some((o) => isEqual(o, props.label))\n } else {\n return value.map(toRaw).includes(props.label)\n }\n } else if (value !== null && value !== undefined) {\n return value === props.trueLabel\n } else {\n return !!value\n }\n })\n\n const checkboxButtonSize = useFormSize(\n computed(() => checkboxGroup?.size?.value),\n {\n prop: true,\n }\n )\n const checkboxSize = useFormSize(computed(() => checkboxGroup?.size?.value))\n\n const hasOwnLabel = computed<boolean>(() => {\n return !!slots.default || !isNil(props.label)\n })\n\n return {\n checkboxButtonSize,\n isChecked,\n isFocused,\n checkboxSize,\n hasOwnLabel,\n }\n}\n\nexport type CheckboxStatus = ReturnType<typeof useCheckboxStatus>\n"],"names":[],"mappings":";;;;;;;;;AAKY,MAAC,iBAAiB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK;AAC9D,EAAE,MAAM,aAAa,GAAG,MAAM,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC,CAAC;AAChE,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/B,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM;AACnC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAC9B,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAC1B,MAAM,OAAO,KAAK,CAAC;AACnB,KAAK,MAAM,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE;AAC/B,MAAM,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;AACjC,QAAQ,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACrE,OAAO,MAAM;AACb,QAAQ,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACtD,OAAO;AACP,KAAK,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,EAAE;AACnD,MAAM,OAAO,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;AACvC,KAAK,MAAM;AACX,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC;AACrB,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,kBAAkB,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM;AACxD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,EAAE;AACN,IAAI,IAAI,EAAE,IAAI;AACd,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,YAAY,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM;AAClD,IAAI,IAAI,EAAE,CAAC;AACX,IAAI,OAAO,CAAC,EAAE,GAAG,aAAa,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,aAAa,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;AAClG,GAAG,CAAC,CAAC,CAAC;AACN,EAAE,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM;AACrC,IAAI,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClD,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,WAAW;AACf,GAAG,CAAC;AACJ;;;;"}
|
|
@@ -46,9 +46,11 @@ export declare const ElColorPicker: import("@element-plus/nightly/es/utils").SFC
|
|
|
46
46
|
}>> & {
|
|
47
47
|
onChange?: ((val: string | null) => any) | undefined;
|
|
48
48
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
49
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
50
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
49
51
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
50
52
|
}>>;
|
|
51
|
-
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "activeChange", val: string | null) => void);
|
|
53
|
+
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "activeChange", val: string | null) => void);
|
|
52
54
|
t: import("../..").Translator;
|
|
53
55
|
ns: {
|
|
54
56
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -6644,6 +6646,12 @@ export declare const ElColorPicker: import("@element-plus/nightly/es/utils").SFC
|
|
|
6644
6646
|
readonly disabled: boolean;
|
|
6645
6647
|
}>;
|
|
6646
6648
|
}> & {} & import("vue").ComponentCustomProperties) | undefined>;
|
|
6649
|
+
triggerRef: import("vue").Ref<any>;
|
|
6650
|
+
inputRef: import("vue").Ref<any>;
|
|
6651
|
+
isFocused: import("vue").Ref<boolean>;
|
|
6652
|
+
_handleFocus: (event: FocusEvent) => void;
|
|
6653
|
+
handleBlur: (event: FocusEvent) => void;
|
|
6654
|
+
handleFocus: (event: FocusEvent) => void;
|
|
6647
6655
|
shouldActiveChange: boolean;
|
|
6648
6656
|
color: import("./src/utils/color").default;
|
|
6649
6657
|
showPicker: import("vue").Ref<boolean>;
|
|
@@ -6664,6 +6672,11 @@ export declare const ElColorPicker: import("@element-plus/nightly/es/utils").SFC
|
|
|
6664
6672
|
handleConfirm: () => void;
|
|
6665
6673
|
confirmValue: () => void;
|
|
6666
6674
|
clear: () => void;
|
|
6675
|
+
handleClickOutside: (event: Event) => void;
|
|
6676
|
+
handleEsc: (event: KeyboardEvent) => void;
|
|
6677
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
6678
|
+
focus: () => void;
|
|
6679
|
+
blur: () => void;
|
|
6667
6680
|
ElButton: import("@element-plus/nightly/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
6668
6681
|
readonly size: {
|
|
6669
6682
|
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -10834,6 +10847,8 @@ export declare const ElColorPicker: import("@element-plus/nightly/es/utils").SFC
|
|
|
10834
10847
|
"update:modelValue": (val: string | null) => boolean;
|
|
10835
10848
|
change: (val: string | null) => boolean;
|
|
10836
10849
|
activeChange: (val: string | null) => boolean;
|
|
10850
|
+
focus: (event: FocusEvent) => boolean;
|
|
10851
|
+
blur: (event: FocusEvent) => boolean;
|
|
10837
10852
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10838
10853
|
readonly modelValue: StringConstructor;
|
|
10839
10854
|
readonly id: StringConstructor;
|
|
@@ -10859,6 +10874,8 @@ export declare const ElColorPicker: import("@element-plus/nightly/es/utils").SFC
|
|
|
10859
10874
|
}>> & {
|
|
10860
10875
|
onChange?: ((val: string | null) => any) | undefined;
|
|
10861
10876
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
10877
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
10878
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
10862
10879
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
10863
10880
|
}, {
|
|
10864
10881
|
readonly popperClass: string;
|
|
@@ -27,6 +27,8 @@ export declare const colorPickerEmits: {
|
|
|
27
27
|
"update:modelValue": (val: string | null) => boolean;
|
|
28
28
|
change: (val: string | null) => boolean;
|
|
29
29
|
activeChange: (val: string | null) => boolean;
|
|
30
|
+
focus: (event: FocusEvent) => boolean;
|
|
31
|
+
blur: (event: FocusEvent) => boolean;
|
|
30
32
|
};
|
|
31
33
|
export declare type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>;
|
|
32
34
|
export declare type ColorPickerEmits = typeof colorPickerEmits;
|
|
@@ -37,7 +37,9 @@ const colorPickerProps = buildProps({
|
|
|
37
37
|
const colorPickerEmits = {
|
|
38
38
|
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNil(val),
|
|
39
39
|
[CHANGE_EVENT]: (val) => isString(val) || isNil(val),
|
|
40
|
-
activeChange: (val) => isString(val) || isNil(val)
|
|
40
|
+
activeChange: (val) => isString(val) || isNil(val),
|
|
41
|
+
focus: (event) => event instanceof FocusEvent,
|
|
42
|
+
blur: (event) => event instanceof FocusEvent
|
|
41
43
|
};
|
|
42
44
|
const colorPickerContextKey = Symbol("colorPickerContextKey");
|
|
43
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.mjs","sources":["../../../../../../packages/components/color-picker/src/color-picker.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n}\n\nexport type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType<typeof ColorPicker>\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef<string>\n}\n\nexport const colorPickerContextKey: InjectionKey<ColorPickerContext> = Symbol(\n 'colorPickerContextKey'\n)\n"],"names":[],"mappings":";;;;;;;;;AAIY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AAC5D,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACtD,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACpD,EAAE;AACU,MAAC,qBAAqB,GAAG,MAAM,CAAC,uBAAuB;;;;"}
|
|
1
|
+
{"version":3,"file":"color-picker.mjs","sources":["../../../../../../packages/components/color-picker/src/color-picker.ts"],"sourcesContent":["import { isNil } from 'lodash-unified'\nimport { buildProps, definePropType, isString } from '@element-plus/utils'\nimport { useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { ComputedRef, ExtractPropTypes, InjectionKey } from 'vue'\nimport type ColorPicker from './color-picker.vue'\n\nexport const colorPickerProps = buildProps({\n /**\n * @description binding value\n */\n modelValue: String,\n /**\n * @description ColorPicker id\n */\n id: String,\n /**\n * @description whether to display the alpha slider\n */\n showAlpha: Boolean,\n /**\n * @description color format of v-model\n */\n colorFormat: String,\n /**\n * @description whether to disable the ColorPicker\n */\n disabled: Boolean,\n /**\n * @description size of ColorPicker\n */\n size: useSizeProp,\n /**\n * @description custom class name for ColorPicker's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description ColorPicker aria-label\n */\n label: {\n type: String,\n default: undefined,\n },\n /**\n * @description ColorPicker tabindex\n */\n tabindex: {\n type: [String, Number],\n default: 0,\n },\n /**\n * @description predefined color options\n */\n predefine: {\n type: definePropType<string[]>(Array),\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n} as const)\nexport const colorPickerEmits = {\n [UPDATE_MODEL_EVENT]: (val: string | null) => isString(val) || isNil(val),\n [CHANGE_EVENT]: (val: string | null) => isString(val) || isNil(val),\n activeChange: (val: string | null) => isString(val) || isNil(val),\n focus: (event: FocusEvent) => event instanceof FocusEvent,\n blur: (event: FocusEvent) => event instanceof FocusEvent,\n}\n\nexport type ColorPickerProps = ExtractPropTypes<typeof colorPickerProps>\nexport type ColorPickerEmits = typeof colorPickerEmits\nexport type ColorPickerInstance = InstanceType<typeof ColorPicker>\n\nexport interface ColorPickerContext {\n currentColor: ComputedRef<string>\n}\n\nexport const colorPickerContextKey: InjectionKey<ColorPickerContext> = Symbol(\n 'colorPickerContextKey'\n)\n"],"names":[],"mappings":";;;;;;;;;AAIY,MAAC,gBAAgB,GAAG,UAAU,CAAC;AAC3C,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,SAAS,EAAE,OAAO;AACpB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,kBAAkB,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AAC5D,EAAE,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACtD,EAAE,YAAY,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;AACpD,EAAE,KAAK,EAAE,CAAC,KAAK,KAAK,KAAK,YAAY,UAAU;AAC/C,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,KAAK,YAAY,UAAU;AAC9C,EAAE;AACU,MAAC,qBAAqB,GAAG,MAAM,CAAC,uBAAuB;;;;"}
|
|
@@ -48,9 +48,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
48
48
|
}>> & {
|
|
49
49
|
onChange?: ((val: string | null) => any) | undefined;
|
|
50
50
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
51
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
52
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
51
53
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
52
54
|
}>>;
|
|
53
|
-
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "activeChange", val: string | null) => void);
|
|
55
|
+
emit: ((event: "update:modelValue", val: string | null) => void) & ((event: "change", val: string | null) => void) & ((event: "focus", event: FocusEvent) => void) & ((event: "blur", event: FocusEvent) => void) & ((event: "activeChange", val: string | null) => void);
|
|
54
56
|
t: import("@element-plus/nightly/es/hooks").Translator;
|
|
55
57
|
ns: {
|
|
56
58
|
namespace: import("vue").ComputedRef<string>;
|
|
@@ -6646,6 +6648,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6646
6648
|
readonly disabled: boolean;
|
|
6647
6649
|
}>;
|
|
6648
6650
|
}> & {} & import("vue").ComponentCustomProperties) | undefined>;
|
|
6651
|
+
triggerRef: import("vue").Ref<any>;
|
|
6652
|
+
inputRef: import("vue").Ref<any>;
|
|
6653
|
+
isFocused: import("vue").Ref<boolean>;
|
|
6654
|
+
_handleFocus: (event: FocusEvent) => void;
|
|
6655
|
+
handleBlur: (event: FocusEvent) => void;
|
|
6656
|
+
handleFocus: (event: FocusEvent) => void;
|
|
6649
6657
|
shouldActiveChange: boolean;
|
|
6650
6658
|
color: Color;
|
|
6651
6659
|
showPicker: import("vue").Ref<boolean>;
|
|
@@ -6666,6 +6674,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
6666
6674
|
handleConfirm: () => void;
|
|
6667
6675
|
confirmValue: () => void;
|
|
6668
6676
|
clear: () => void;
|
|
6677
|
+
handleClickOutside: (event: Event) => void;
|
|
6678
|
+
handleEsc: (event: KeyboardEvent) => void;
|
|
6679
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
6680
|
+
focus: () => void;
|
|
6681
|
+
blur: () => void;
|
|
6669
6682
|
ElButton: import("@element-plus/nightly/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
6670
6683
|
readonly size: {
|
|
6671
6684
|
readonly type: import("vue").PropType<import("@element-plus/nightly/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
@@ -10836,6 +10849,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10836
10849
|
"update:modelValue": (val: string | null) => boolean;
|
|
10837
10850
|
change: (val: string | null) => boolean;
|
|
10838
10851
|
activeChange: (val: string | null) => boolean;
|
|
10852
|
+
focus: (event: FocusEvent) => boolean;
|
|
10853
|
+
blur: (event: FocusEvent) => boolean;
|
|
10839
10854
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10840
10855
|
readonly modelValue: StringConstructor;
|
|
10841
10856
|
readonly id: StringConstructor;
|
|
@@ -10861,6 +10876,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10861
10876
|
}>> & {
|
|
10862
10877
|
onChange?: ((val: string | null) => any) | undefined;
|
|
10863
10878
|
"onUpdate:modelValue"?: ((val: string | null) => any) | undefined;
|
|
10879
|
+
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
10880
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
10864
10881
|
onActiveChange?: ((val: string | null) => any) | undefined;
|
|
10865
10882
|
}, {
|
|
10866
10883
|
readonly popperClass: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, computed, nextTick, onMounted, watch, provide, openBlock, createBlock, unref, withCtx, withDirectives, createElementBlock, createElementVNode, normalizeClass, createVNode, createCommentVNode,
|
|
1
|
+
import { defineComponent, ref, reactive, computed, nextTick, onMounted, watch, provide, openBlock, createBlock, unref, withCtx, withDirectives, createElementBlock, withKeys, createElementVNode, normalizeClass, createVNode, createCommentVNode, createTextVNode, toDisplayString, normalizeStyle, vShow } from 'vue';
|
|
2
2
|
import { debounce } from 'lodash-unified';
|
|
3
3
|
import { ElButton } from '../../button/index.mjs';
|
|
4
4
|
import { ElIcon } from '../../icon/index.mjs';
|
|
@@ -21,11 +21,14 @@ import { useLocale } from '../../../hooks/use-locale/index.mjs';
|
|
|
21
21
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
22
22
|
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
|
23
23
|
import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
|
24
|
+
import { useFocusController } from '../../../hooks/use-focus-controller/index.mjs';
|
|
24
25
|
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
25
26
|
import { debugWarn } from '../../../utils/error.mjs';
|
|
27
|
+
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
|
26
28
|
import ClickOutside from '../../../directives/click-outside/index.mjs';
|
|
27
29
|
|
|
28
|
-
const _hoisted_1 = ["
|
|
30
|
+
const _hoisted_1 = ["onKeydown"];
|
|
31
|
+
const _hoisted_2 = ["id", "aria-label", "aria-labelledby", "aria-description", "aria-disabled", "tabindex"];
|
|
29
32
|
const __default__ = defineComponent({
|
|
30
33
|
name: "ElColorPicker"
|
|
31
34
|
});
|
|
@@ -47,6 +50,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
50
|
const sv = ref();
|
|
48
51
|
const alpha = ref();
|
|
49
52
|
const popper = ref();
|
|
53
|
+
const triggerRef = ref();
|
|
54
|
+
const inputRef = ref();
|
|
55
|
+
const {
|
|
56
|
+
isFocused,
|
|
57
|
+
handleFocus: _handleFocus,
|
|
58
|
+
handleBlur
|
|
59
|
+
} = useFocusController(triggerRef, {
|
|
60
|
+
beforeBlur(event) {
|
|
61
|
+
var _a;
|
|
62
|
+
return (_a = popper.value) == null ? void 0 : _a.isFocusInsideContent(event);
|
|
63
|
+
},
|
|
64
|
+
afterBlur() {
|
|
65
|
+
setShowPicker(false);
|
|
66
|
+
resetColor();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const handleFocus = (event) => {
|
|
70
|
+
if (colorDisabled.value)
|
|
71
|
+
return blur();
|
|
72
|
+
_handleFocus(event);
|
|
73
|
+
};
|
|
50
74
|
let shouldActiveChange = true;
|
|
51
75
|
const color = reactive(new Color({
|
|
52
76
|
enableAlpha: props.showAlpha,
|
|
@@ -75,7 +99,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
99
|
return [
|
|
76
100
|
ns.b("picker"),
|
|
77
101
|
ns.is("disabled", colorDisabled.value),
|
|
78
|
-
ns.bm("picker", colorSize.value)
|
|
102
|
+
ns.bm("picker", colorSize.value),
|
|
103
|
+
ns.is("focused", isFocused.value)
|
|
79
104
|
];
|
|
80
105
|
});
|
|
81
106
|
function displayedRgb(color2, showAlpha) {
|
|
@@ -146,6 +171,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
171
|
}
|
|
147
172
|
resetColor();
|
|
148
173
|
}
|
|
174
|
+
function handleClickOutside(event) {
|
|
175
|
+
if (!showPicker.value)
|
|
176
|
+
return;
|
|
177
|
+
hide();
|
|
178
|
+
if (isFocused.value) {
|
|
179
|
+
const _event = new FocusEvent("focus", event);
|
|
180
|
+
handleBlur(_event);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function handleEsc(event) {
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
event.stopPropagation();
|
|
186
|
+
setShowPicker(false);
|
|
187
|
+
resetColor();
|
|
188
|
+
}
|
|
189
|
+
function handleKeyDown(event) {
|
|
190
|
+
switch (event.code) {
|
|
191
|
+
case EVENT_CODE.enter:
|
|
192
|
+
case EVENT_CODE.space:
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
event.stopPropagation();
|
|
195
|
+
show();
|
|
196
|
+
inputRef.value.focus();
|
|
197
|
+
break;
|
|
198
|
+
case EVENT_CODE.esc:
|
|
199
|
+
handleEsc(event);
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function focus() {
|
|
204
|
+
triggerRef.value.focus();
|
|
205
|
+
}
|
|
206
|
+
function blur() {
|
|
207
|
+
triggerRef.value.blur();
|
|
208
|
+
}
|
|
149
209
|
onMounted(() => {
|
|
150
210
|
if (props.modelValue) {
|
|
151
211
|
customInput.value = currentColor.value;
|
|
@@ -183,7 +243,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
183
243
|
expose({
|
|
184
244
|
color,
|
|
185
245
|
show,
|
|
186
|
-
hide
|
|
246
|
+
hide,
|
|
247
|
+
focus,
|
|
248
|
+
blur
|
|
187
249
|
});
|
|
188
250
|
return (_ctx, _cache) => {
|
|
189
251
|
return openBlock(), createBlock(unref(ElTooltip), {
|
|
@@ -199,10 +261,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
199
261
|
effect: "light",
|
|
200
262
|
trigger: "click",
|
|
201
263
|
transition: `${unref(ns).namespace.value}-zoom-in-top`,
|
|
202
|
-
persistent: ""
|
|
264
|
+
persistent: "",
|
|
265
|
+
onHide: _cache[2] || (_cache[2] = ($event) => setShowPicker(false))
|
|
203
266
|
}, {
|
|
204
267
|
content: withCtx(() => [
|
|
205
|
-
withDirectives((openBlock(), createElementBlock("div",
|
|
268
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
269
|
+
onKeydown: withKeys(handleEsc, ["esc"])
|
|
270
|
+
}, [
|
|
206
271
|
createElementVNode("div", {
|
|
207
272
|
class: normalizeClass(unref(ns).be("dropdown", "main-wrapper"))
|
|
208
273
|
}, [
|
|
@@ -238,6 +303,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
238
303
|
class: normalizeClass(unref(ns).be("dropdown", "value"))
|
|
239
304
|
}, [
|
|
240
305
|
createVNode(unref(ElInput), {
|
|
306
|
+
ref_key: "inputRef",
|
|
307
|
+
ref: inputRef,
|
|
241
308
|
modelValue: customInput.value,
|
|
242
309
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => customInput.value = $event),
|
|
243
310
|
"validate-event": false,
|
|
@@ -269,20 +336,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
269
336
|
_: 1
|
|
270
337
|
}, 8, ["class"])
|
|
271
338
|
], 2)
|
|
272
|
-
])), [
|
|
273
|
-
[unref(ClickOutside),
|
|
339
|
+
], 40, _hoisted_1)), [
|
|
340
|
+
[unref(ClickOutside), handleClickOutside]
|
|
274
341
|
])
|
|
275
342
|
]),
|
|
276
343
|
default: withCtx(() => [
|
|
277
344
|
createElementVNode("div", {
|
|
278
345
|
id: unref(buttonId),
|
|
346
|
+
ref_key: "triggerRef",
|
|
347
|
+
ref: triggerRef,
|
|
279
348
|
class: normalizeClass(unref(btnKls)),
|
|
280
349
|
role: "button",
|
|
281
350
|
"aria-label": unref(buttonAriaLabel),
|
|
282
351
|
"aria-labelledby": unref(buttonAriaLabelledby),
|
|
283
352
|
"aria-description": unref(t)("el.colorpicker.description", { color: _ctx.modelValue || "" }),
|
|
284
|
-
|
|
285
|
-
|
|
353
|
+
"aria-disabled": unref(colorDisabled),
|
|
354
|
+
tabindex: unref(colorDisabled) ? -1 : _ctx.tabindex,
|
|
355
|
+
onKeydown: handleKeyDown,
|
|
356
|
+
onFocus: handleFocus,
|
|
357
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => unref(handleBlur) && unref(handleBlur)(...args))
|
|
286
358
|
}, [
|
|
287
359
|
unref(colorDisabled) ? (openBlock(), createElementBlock("div", {
|
|
288
360
|
key: 0,
|
|
@@ -324,7 +396,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
324
396
|
], 6)
|
|
325
397
|
], 2)
|
|
326
398
|
], 2)
|
|
327
|
-
], 42,
|
|
399
|
+
], 42, _hoisted_2)
|
|
328
400
|
]),
|
|
329
401
|
_: 1
|
|
330
402
|
}, 8, ["visible", "popper-class", "transition"]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker2.mjs","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 >\n <template #content>\n <div v-click-outside=\"hide\">\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 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 :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 :tabindex=\"tabindex\"\n @keydown.enter=\"handleTrigger\"\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 { useLocale, useNamespace } from '@element-plus/hooks'\nimport { 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>()\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 || t('el.colorpicker.defaultLabel')\n : undefined\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 ]\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\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</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAyIc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAY,WAAY,EAAA,CAAA;AAC9B,IAAA,MAAM,gBAAgB,eAAgB,EAAA,CAAA;AAEtC,IAAA,MAAM,EAAE,OAAA,EAAS,QAAU,EAAA,mBAAA,EAAA,GAAwB,mBAAmB,KAAO,EAAA;AAAA,MAC3E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAA,MAAM,MAAM,GAAoC,EAAA,CAAA;AAChD,IAAA,MAAM,KAAK,GAAkC,EAAA,CAAA;AAC7C,IAAA,MAAM,QAAQ,GAAsC,EAAA,CAAA;AACpD,IAAA,MAAM,SAAS,GAAqB,EAAA,CAAA;AAGpC,IAAA,IAAI,kBAAqB,GAAA,IAAA,CAAA;AAEzB,IAAM,MAAA,KAAA,GAAQ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../../../../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 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 || t('el.colorpicker.defaultLabel')\n : undefined\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":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAmJc,CAAA;AAAA,EACZ,IAAM,EAAA,eAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAIA,IAAM,MAAA,EAAE,MAAM,SAAU,EAAA,CAAA;AACxB,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAM,MAAA,EAAE,aAAa,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,YAAY,WAAY,EAAA,CAAA;AAC9B,IAAA,MAAM,gBAAgB,eAAgB,EAAA,C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