@element-plus/nightly 0.0.20250602 → 0.0.20250603
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 +1326 -904
- package/dist/index.full.min.js +19 -19
- 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 +1322 -904
- 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/component.mjs +4 -1
- package/es/component.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +108 -41
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +41 -108
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +193 -42
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +42 -193
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/button/index.mjs +3 -3
- package/es/components/button/src/button-group.mjs +29 -6
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +6 -29
- package/es/components/button/src/button-group2.mjs.map +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/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +134 -16
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +16 -134
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/calendar/src/date-table.mjs +89 -31
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +31 -89
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -38
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +38 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/col/index.mjs +2 -2
- package/es/components/col/src/col.mjs +64 -43
- package/es/components/col/src/col.mjs.map +1 -1
- package/es/components/col/src/col2.mjs +43 -64
- package/es/components/col/src/col2.mjs.map +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +62 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -62
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +39 -403
- 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 +9 -9
- package/es/components/color-picker/src/components/predefine.mjs.map +1 -1
- package/es/components/color-picker/src/utils/color.d.ts +4 -6
- package/es/components/color-picker/src/utils/color.mjs +38 -235
- package/es/components/color-picker/src/utils/color.mjs.map +1 -1
- package/es/components/descriptions/index.mjs +2 -2
- package/es/components/descriptions/src/description.mjs +127 -26
- package/es/components/descriptions/src/description.mjs.map +1 -1
- package/es/components/descriptions/src/description2.mjs +26 -127
- package/es/components/descriptions/src/description2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +2 -2
- package/es/components/form/index.mjs +4 -4
- package/es/components/form/src/form-item.mjs +47 -320
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +320 -47
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +159 -54
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +54 -159
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +35 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -35
- package/es/components/icon/src/icon2.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.d.ts +1 -0
- package/es/components/index.mjs +28 -25
- package/es/components/index.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +4 -33
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +33 -4
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +32 -22
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +22 -32
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +1 -1
- package/es/components/radio/src/radio.mjs +32 -74
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +74 -32
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +1 -1
- package/es/components/select/src/useOption.mjs +2 -1
- package/es/components/select/src/useOption.mjs.map +1 -1
- package/es/components/slider/src/button.mjs +91 -19
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +19 -91
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/splitter/index.d.ts +10 -0
- package/es/components/splitter/index.mjs +13 -0
- package/es/components/splitter/index.mjs.map +1 -0
- package/es/components/splitter/src/hooks/index.d.ts +3 -0
- package/es/components/splitter/src/hooks/index.mjs +4 -0
- package/es/components/splitter/src/hooks/index.mjs.map +1 -0
- package/es/components/splitter/src/hooks/useContainer.d.ts +5 -0
- package/es/components/splitter/src/hooks/useContainer.mjs +14 -0
- package/es/components/splitter/src/hooks/useContainer.mjs.map +1 -0
- package/es/components/splitter/src/hooks/usePanel.d.ts +9 -0
- package/es/components/splitter/src/hooks/usePanel.mjs +23 -0
- package/es/components/splitter/src/hooks/usePanel.mjs.map +1 -0
- package/es/components/splitter/src/hooks/useResize.d.ts +12 -0
- package/es/components/splitter/src/hooks/useResize.mjs +94 -0
- package/es/components/splitter/src/hooks/useResize.mjs.map +1 -0
- package/es/components/splitter/src/hooks/useSize.d.ts +10 -0
- package/es/components/splitter/src/hooks/useSize.mjs +56 -0
- package/es/components/splitter/src/hooks/useSize.mjs.map +1 -0
- package/es/components/splitter/src/split-bar.mjs +148 -0
- package/es/components/splitter/src/split-bar.mjs.map +1 -0
- package/es/components/splitter/src/split-bar.vue.d.ts +67 -0
- package/es/components/splitter/src/split-panel.d.ts +26 -0
- package/es/components/splitter/src/split-panel.mjs +24 -0
- package/es/components/splitter/src/split-panel.mjs.map +1 -0
- package/es/components/splitter/src/split-panel.vue.d.ts +62 -0
- package/es/components/splitter/src/split-panel2.mjs +158 -0
- package/es/components/splitter/src/split-panel2.mjs.map +1 -0
- package/es/components/splitter/src/splitter.d.ts +7 -0
- package/es/components/splitter/src/splitter.mjs +12 -0
- package/es/components/splitter/src/splitter.mjs.map +1 -0
- package/es/components/splitter/src/splitter.vue.d.ts +25 -0
- package/es/components/splitter/src/splitter2.mjs +82 -0
- package/es/components/splitter/src/splitter2.mjs.map +1 -0
- package/es/components/splitter/src/type.d.ts +34 -0
- package/es/components/splitter/src/type.mjs +4 -0
- package/es/components/splitter/src/type.mjs.map +1 -0
- package/es/components/splitter/style/css.d.ts +2 -0
- package/es/components/splitter/style/css.mjs +3 -0
- package/es/components/splitter/style/css.mjs.map +1 -0
- package/es/components/splitter/style/index.d.ts +2 -0
- package/es/components/splitter/style/index.mjs +3 -0
- package/es/components/splitter/style/index.mjs.map +1 -0
- package/es/components/splitter-panel/style/css.d.ts +2 -0
- package/es/components/splitter-panel/style/css.mjs +3 -0
- package/es/components/splitter-panel/style/css.mjs.map +1 -0
- package/es/components/splitter-panel/style/index.d.ts +2 -0
- package/es/components/splitter-panel/style/index.mjs +3 -0
- package/es/components/splitter-panel/style/index.mjs.map +1 -0
- package/es/components/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +69 -25
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +25 -69
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/steps/index.mjs +2 -2
- package/es/components/steps/src/item.mjs +190 -19
- package/es/components/steps/src/item.mjs.map +1 -1
- package/es/components/steps/src/item2.mjs +19 -190
- package/es/components/steps/src/item2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +228 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -228
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/text/index.mjs +2 -2
- package/es/components/text/src/text.mjs +67 -21
- package/es/components/text/src/text.mjs.map +1 -1
- package/es/components/text/src/text2.mjs +21 -67
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +132 -54
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +54 -132
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +2 -2
- package/es/components/tooltip/src/tooltip.mjs +30 -169
- package/es/components/tooltip/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +169 -30
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/content2.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tour/index.mjs +3 -3
- package/es/components/tour/src/content.mjs +67 -43
- package/es/components/tour/src/content.mjs.map +1 -1
- package/es/components/tour/src/content2.mjs +43 -67
- package/es/components/tour/src/content2.mjs.map +1 -1
- package/es/components/tour/src/step.mjs +1 -1
- package/es/components/tour/src/tour.mjs +154 -69
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +69 -154
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-list.mjs +173 -28
- package/es/components/upload/src/upload-list.mjs.map +1 -1
- package/es/components/upload/src/upload-list2.mjs +28 -173
- package/es/components/upload/src/upload-list2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/components/visual-hidden/index.mjs +3 -3
- package/es/components/visual-hidden/src/visual-hidden.mjs +35 -6
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -1
- package/es/components/visual-hidden/src/visual-hidden2.mjs +6 -35
- package/es/components/visual-hidden/src/visual-hidden2.mjs.map +1 -1
- package/es/hooks/use-draggable/index.mjs +1 -1
- package/es/hooks/use-draggable/index.mjs.map +1 -1
- package/es/index.d.ts +160 -15
- package/es/index.mjs +28 -25
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/global.d.ts +2 -0
- package/lib/component.js +4 -1
- package/lib/component.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +107 -42
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +42 -107
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +192 -42
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +42 -192
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/button/index.js +3 -3
- package/lib/components/button/src/button-group.js +29 -6
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +6 -29
- package/lib/components/button/src/button-group2.js.map +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/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +134 -17
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +17 -134
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/calendar/src/date-table.js +89 -35
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +35 -89
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -38
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +38 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/col/index.js +2 -2
- package/lib/components/col/src/col.js +64 -43
- package/lib/components/col/src/col.js.map +1 -1
- package/lib/components/col/src/col2.js +43 -64
- package/lib/components/col/src/col2.js.map +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +62 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -62
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +40 -402
- 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 +9 -9
- package/lib/components/color-picker/src/components/predefine.js.map +1 -1
- package/lib/components/color-picker/src/utils/color.d.ts +4 -6
- package/lib/components/color-picker/src/utils/color.js +37 -234
- package/lib/components/color-picker/src/utils/color.js.map +1 -1
- package/lib/components/descriptions/index.js +2 -2
- package/lib/components/descriptions/src/description.js +127 -26
- package/lib/components/descriptions/src/description.js.map +1 -1
- package/lib/components/descriptions/src/description2.js +26 -127
- package/lib/components/descriptions/src/description2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +2 -2
- package/lib/components/form/index.js +4 -4
- package/lib/components/form/src/form-item.js +48 -324
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +324 -48
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +158 -55
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +55 -158
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +35 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -35
- package/lib/components/icon/src/icon2.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.d.ts +1 -0
- package/lib/components/index.js +45 -38
- package/lib/components/index.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +4 -33
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +33 -4
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +32 -25
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +25 -32
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +1 -1
- package/lib/components/radio/src/radio.js +33 -73
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +73 -33
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +1 -1
- package/lib/components/select/src/useOption.js +2 -1
- package/lib/components/select/src/useOption.js.map +1 -1
- package/lib/components/slider/src/button.js +91 -20
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +20 -91
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/splitter/index.d.ts +10 -0
- package/lib/components/splitter/index.js +21 -0
- package/lib/components/splitter/index.js.map +1 -0
- package/lib/components/splitter/src/hooks/index.d.ts +3 -0
- package/lib/components/splitter/src/hooks/index.js +18 -0
- package/lib/components/splitter/src/hooks/index.js.map +1 -0
- package/lib/components/splitter/src/hooks/useContainer.d.ts +5 -0
- package/lib/components/splitter/src/hooks/useContainer.js +18 -0
- package/lib/components/splitter/src/hooks/useContainer.js.map +1 -0
- package/lib/components/splitter/src/hooks/usePanel.d.ts +9 -0
- package/lib/components/splitter/src/hooks/usePanel.js +28 -0
- package/lib/components/splitter/src/hooks/usePanel.js.map +1 -0
- package/lib/components/splitter/src/hooks/useResize.d.ts +12 -0
- package/lib/components/splitter/src/hooks/useResize.js +98 -0
- package/lib/components/splitter/src/hooks/useResize.js.map +1 -0
- package/lib/components/splitter/src/hooks/useSize.d.ts +10 -0
- package/lib/components/splitter/src/hooks/useSize.js +64 -0
- package/lib/components/splitter/src/hooks/useSize.js.map +1 -0
- package/lib/components/splitter/src/split-bar.js +152 -0
- package/lib/components/splitter/src/split-bar.js.map +1 -0
- package/lib/components/splitter/src/split-bar.vue.d.ts +67 -0
- package/lib/components/splitter/src/split-panel.d.ts +26 -0
- package/lib/components/splitter/src/split-panel.js +28 -0
- package/lib/components/splitter/src/split-panel.js.map +1 -0
- package/lib/components/splitter/src/split-panel.vue.d.ts +62 -0
- package/lib/components/splitter/src/split-panel2.js +162 -0
- package/lib/components/splitter/src/split-panel2.js.map +1 -0
- package/lib/components/splitter/src/splitter.d.ts +7 -0
- package/lib/components/splitter/src/splitter.js +16 -0
- package/lib/components/splitter/src/splitter.js.map +1 -0
- package/lib/components/splitter/src/splitter.vue.d.ts +25 -0
- package/lib/components/splitter/src/splitter2.js +86 -0
- package/lib/components/splitter/src/splitter2.js.map +1 -0
- package/lib/components/splitter/src/type.d.ts +34 -0
- package/lib/components/splitter/src/type.js +8 -0
- package/lib/components/splitter/src/type.js.map +1 -0
- package/lib/components/splitter/style/css.d.ts +2 -0
- package/lib/components/splitter/style/css.js +6 -0
- package/lib/components/splitter/style/css.js.map +1 -0
- package/lib/components/splitter/style/index.d.ts +2 -0
- package/lib/components/splitter/style/index.js +6 -0
- package/lib/components/splitter/style/index.js.map +1 -0
- package/lib/components/splitter-panel/style/css.d.ts +2 -0
- package/lib/components/splitter-panel/style/css.js +6 -0
- package/lib/components/splitter-panel/style/css.js.map +1 -0
- package/lib/components/splitter-panel/style/index.d.ts +2 -0
- package/lib/components/splitter-panel/style/index.js +6 -0
- package/lib/components/splitter-panel/style/index.js.map +1 -0
- package/lib/components/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +69 -25
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +25 -69
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/steps/index.js +2 -2
- package/lib/components/steps/src/item.js +190 -19
- package/lib/components/steps/src/item.js.map +1 -1
- package/lib/components/steps/src/item2.js +19 -190
- package/lib/components/steps/src/item2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +227 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -227
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/text/index.js +2 -2
- package/lib/components/text/src/text.js +67 -21
- package/lib/components/text/src/text.js.map +1 -1
- package/lib/components/text/src/text2.js +21 -67
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +137 -54
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +54 -137
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/index.js +2 -2
- package/lib/components/tooltip/src/tooltip.js +34 -169
- package/lib/components/tooltip/src/tooltip.js.map +1 -1
- package/lib/components/tooltip/src/tooltip2.js +169 -34
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/content2.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tour/index.js +3 -3
- package/lib/components/tour/src/content.js +67 -46
- package/lib/components/tour/src/content.js.map +1 -1
- package/lib/components/tour/src/content2.js +46 -67
- package/lib/components/tour/src/content2.js.map +1 -1
- package/lib/components/tour/src/step.js +1 -1
- package/lib/components/tour/src/tour.js +152 -68
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +68 -152
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-list.js +173 -29
- package/lib/components/upload/src/upload-list.js.map +1 -1
- package/lib/components/upload/src/upload-list2.js +29 -173
- package/lib/components/upload/src/upload-list2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/components/visual-hidden/index.js +2 -2
- package/lib/components/visual-hidden/src/visual-hidden.js +35 -6
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -1
- package/lib/components/visual-hidden/src/visual-hidden2.js +6 -35
- package/lib/components/visual-hidden/src/visual-hidden2.js.map +1 -1
- package/lib/hooks/use-draggable/index.js +1 -1
- package/lib/hooks/use-draggable/index.js.map +1 -1
- package/lib/index.d.ts +160 -15
- package/lib/index.js +151 -144
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-splitter-panel.css +1 -0
- package/theme-chalk/el-splitter.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/index.scss +2 -0
- package/theme-chalk/src/splitter-panel.scss +8 -0
- package/theme-chalk/src/splitter.scss +129 -0
- package/web-types.json +1 -1
@@ -1,138 +1,16 @@
|
|
1
|
-
import {
|
1
|
+
import { TinyColor } from '@ctrl/tinycolor';
|
2
|
+
import { hasOwn } from '@vue/shared';
|
2
3
|
|
3
|
-
const hsv2hsl = function(hue, sat, val) {
|
4
|
-
return [
|
5
|
-
hue,
|
6
|
-
sat * val / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0,
|
7
|
-
hue / 2
|
8
|
-
];
|
9
|
-
};
|
10
|
-
const isOnePointZero = function(n) {
|
11
|
-
return isString(n) && n.includes(".") && Number.parseFloat(n) === 1;
|
12
|
-
};
|
13
|
-
const isPercentage = function(n) {
|
14
|
-
return isString(n) && n.includes("%");
|
15
|
-
};
|
16
|
-
const bound01 = function(value, max) {
|
17
|
-
if (isOnePointZero(value))
|
18
|
-
value = "100%";
|
19
|
-
const processPercent = isPercentage(value);
|
20
|
-
value = Math.min(max, Math.max(0, Number.parseFloat(`${value}`)));
|
21
|
-
if (processPercent) {
|
22
|
-
value = Number.parseInt(`${value * max}`, 10) / 100;
|
23
|
-
}
|
24
|
-
if (Math.abs(value - max) < 1e-6) {
|
25
|
-
return 1;
|
26
|
-
}
|
27
|
-
return value % max / Number.parseFloat(max);
|
28
|
-
};
|
29
|
-
const INT_HEX_MAP = {
|
30
|
-
10: "A",
|
31
|
-
11: "B",
|
32
|
-
12: "C",
|
33
|
-
13: "D",
|
34
|
-
14: "E",
|
35
|
-
15: "F"
|
36
|
-
};
|
37
|
-
const hexOne = (value) => {
|
38
|
-
value = Math.min(Math.round(value), 255);
|
39
|
-
const high = Math.floor(value / 16);
|
40
|
-
const low = value % 16;
|
41
|
-
return `${INT_HEX_MAP[high] || high}${INT_HEX_MAP[low] || low}`;
|
42
|
-
};
|
43
|
-
const toHex = function({ r, g, b }) {
|
44
|
-
if (Number.isNaN(+r) || Number.isNaN(+g) || Number.isNaN(+b))
|
45
|
-
return "";
|
46
|
-
return `#${hexOne(r)}${hexOne(g)}${hexOne(b)}`;
|
47
|
-
};
|
48
|
-
const HEX_INT_MAP = {
|
49
|
-
A: 10,
|
50
|
-
B: 11,
|
51
|
-
C: 12,
|
52
|
-
D: 13,
|
53
|
-
E: 14,
|
54
|
-
F: 15
|
55
|
-
};
|
56
|
-
const parseHexChannel = function(hex) {
|
57
|
-
if (hex.length === 2) {
|
58
|
-
return (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 + (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]);
|
59
|
-
}
|
60
|
-
return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1];
|
61
|
-
};
|
62
|
-
const hsl2hsv = function(hue, sat, light) {
|
63
|
-
sat = sat / 100;
|
64
|
-
light = light / 100;
|
65
|
-
let smin = sat;
|
66
|
-
const lmin = Math.max(light, 0.01);
|
67
|
-
light *= 2;
|
68
|
-
sat *= light <= 1 ? light : 2 - light;
|
69
|
-
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
70
|
-
const v = (light + sat) / 2;
|
71
|
-
const sv = light === 0 ? 2 * smin / (lmin + smin) : 2 * sat / (light + sat);
|
72
|
-
return {
|
73
|
-
h: hue,
|
74
|
-
s: sv * 100,
|
75
|
-
v: v * 100
|
76
|
-
};
|
77
|
-
};
|
78
|
-
const rgb2hsv = (r, g, b) => {
|
79
|
-
r = bound01(r, 255);
|
80
|
-
g = bound01(g, 255);
|
81
|
-
b = bound01(b, 255);
|
82
|
-
const max = Math.max(r, g, b);
|
83
|
-
const min = Math.min(r, g, b);
|
84
|
-
let h;
|
85
|
-
const v = max;
|
86
|
-
const d = max - min;
|
87
|
-
const s = max === 0 ? 0 : d / max;
|
88
|
-
if (max === min) {
|
89
|
-
h = 0;
|
90
|
-
} else {
|
91
|
-
switch (max) {
|
92
|
-
case r: {
|
93
|
-
h = (g - b) / d + (g < b ? 6 : 0);
|
94
|
-
break;
|
95
|
-
}
|
96
|
-
case g: {
|
97
|
-
h = (b - r) / d + 2;
|
98
|
-
break;
|
99
|
-
}
|
100
|
-
case b: {
|
101
|
-
h = (r - g) / d + 4;
|
102
|
-
break;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
h /= 6;
|
106
|
-
}
|
107
|
-
return { h: h * 360, s: s * 100, v: v * 100 };
|
108
|
-
};
|
109
|
-
const hsv2rgb = function(h, s, v) {
|
110
|
-
h = bound01(h, 360) * 6;
|
111
|
-
s = bound01(s, 100);
|
112
|
-
v = bound01(v, 100);
|
113
|
-
const i = Math.floor(h);
|
114
|
-
const f = h - i;
|
115
|
-
const p = v * (1 - s);
|
116
|
-
const q = v * (1 - f * s);
|
117
|
-
const t = v * (1 - (1 - f) * s);
|
118
|
-
const mod = i % 6;
|
119
|
-
const r = [v, q, p, p, t, v][mod];
|
120
|
-
const g = [t, v, v, q, p, p][mod];
|
121
|
-
const b = [p, p, t, v, v, q][mod];
|
122
|
-
return {
|
123
|
-
r: Math.round(r * 255),
|
124
|
-
g: Math.round(g * 255),
|
125
|
-
b: Math.round(b * 255)
|
126
|
-
};
|
127
|
-
};
|
128
4
|
class Color {
|
129
5
|
constructor(options = {}) {
|
130
6
|
this._hue = 0;
|
131
7
|
this._saturation = 100;
|
132
8
|
this._value = 100;
|
133
9
|
this._alpha = 100;
|
10
|
+
this._tiny = new TinyColor();
|
11
|
+
this._isValid = false;
|
134
12
|
this.enableAlpha = false;
|
135
|
-
this.format = "
|
13
|
+
this.format = "";
|
136
14
|
this.value = "";
|
137
15
|
for (const option in options) {
|
138
16
|
if (hasOwn(options, option)) {
|
@@ -155,132 +33,57 @@ class Color {
|
|
155
33
|
return;
|
156
34
|
}
|
157
35
|
this[`_${prop}`] = value;
|
36
|
+
this._isValid = true;
|
158
37
|
this.doOnChange();
|
159
38
|
}
|
160
39
|
get(prop) {
|
161
|
-
if (
|
162
|
-
return Math.
|
40
|
+
if (["hue", "saturation", "value", "alpha"].includes(prop)) {
|
41
|
+
return Math.round(this[`_${prop}`]);
|
163
42
|
}
|
164
43
|
return this[`_${prop}`];
|
165
44
|
}
|
166
45
|
toRgb() {
|
167
|
-
return
|
46
|
+
return this._isValid ? this._tiny.toRgb() : { r: 255, g: 255, b: 255, a: 0 };
|
168
47
|
}
|
169
48
|
fromString(value) {
|
170
|
-
|
49
|
+
const color = new TinyColor(value);
|
50
|
+
this._isValid = color.isValid;
|
51
|
+
if (color.isValid) {
|
52
|
+
const { h, s, v, a } = color.toHsv();
|
53
|
+
this._hue = h;
|
54
|
+
this._saturation = s * 100;
|
55
|
+
this._value = v * 100;
|
56
|
+
this._alpha = a * 100;
|
57
|
+
} else {
|
171
58
|
this._hue = 0;
|
172
59
|
this._saturation = 100;
|
173
60
|
this._value = 100;
|
174
|
-
this.
|
175
|
-
return;
|
176
|
-
}
|
177
|
-
const fromHSV = (h, s, v) => {
|
178
|
-
this._hue = Math.max(0, Math.min(360, h));
|
179
|
-
this._saturation = Math.max(0, Math.min(100, s));
|
180
|
-
this._value = Math.max(0, Math.min(100, v));
|
181
|
-
this.doOnChange();
|
182
|
-
};
|
183
|
-
if (value.includes("hsl")) {
|
184
|
-
const parts = value.replace(/hsla|hsl|\(|\)/gm, "").split(/\s|,/g).filter((val) => val !== "").map((val, index) => index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10));
|
185
|
-
if (parts.length === 4) {
|
186
|
-
this._alpha = Number.parseFloat(parts[3]) * 100;
|
187
|
-
} else if (parts.length === 3) {
|
188
|
-
this._alpha = 100;
|
189
|
-
}
|
190
|
-
if (parts.length >= 3) {
|
191
|
-
const { h, s, v } = hsl2hsv(parts[0], parts[1], parts[2]);
|
192
|
-
fromHSV(h, s, v);
|
193
|
-
}
|
194
|
-
} else if (value.includes("hsv")) {
|
195
|
-
const parts = value.replace(/hsva|hsv|\(|\)/gm, "").split(/\s|,/g).filter((val) => val !== "").map((val, index) => index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10));
|
196
|
-
if (parts.length === 4) {
|
197
|
-
this._alpha = Number.parseFloat(parts[3]) * 100;
|
198
|
-
} else if (parts.length === 3) {
|
199
|
-
this._alpha = 100;
|
200
|
-
}
|
201
|
-
if (parts.length >= 3) {
|
202
|
-
fromHSV(parts[0], parts[1], parts[2]);
|
203
|
-
}
|
204
|
-
} else if (value.includes("rgb")) {
|
205
|
-
const parts = value.replace(/rgba|rgb|\(|\)/gm, "").split(/\s|,/g).filter((val) => val !== "").map((val, index) => index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10));
|
206
|
-
if (parts.length === 4) {
|
207
|
-
this._alpha = Number.parseFloat(parts[3]) * 100;
|
208
|
-
} else if (parts.length === 3) {
|
209
|
-
this._alpha = 100;
|
210
|
-
}
|
211
|
-
if (parts.length >= 3) {
|
212
|
-
const { h, s, v } = rgb2hsv(parts[0], parts[1], parts[2]);
|
213
|
-
fromHSV(h, s, v);
|
214
|
-
}
|
215
|
-
} else if (value.includes("#")) {
|
216
|
-
const hex = value.replace("#", "").trim();
|
217
|
-
if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex))
|
218
|
-
return;
|
219
|
-
let r, g, b;
|
220
|
-
if (hex.length === 3) {
|
221
|
-
r = parseHexChannel(hex[0] + hex[0]);
|
222
|
-
g = parseHexChannel(hex[1] + hex[1]);
|
223
|
-
b = parseHexChannel(hex[2] + hex[2]);
|
224
|
-
} else if (hex.length === 6 || hex.length === 8) {
|
225
|
-
r = parseHexChannel(hex.slice(0, 2));
|
226
|
-
g = parseHexChannel(hex.slice(2, 4));
|
227
|
-
b = parseHexChannel(hex.slice(4, 6));
|
228
|
-
}
|
229
|
-
if (hex.length === 8) {
|
230
|
-
this._alpha = parseHexChannel(hex.slice(6)) / 255 * 100;
|
231
|
-
} else if (hex.length === 3 || hex.length === 6) {
|
232
|
-
this._alpha = 100;
|
233
|
-
}
|
234
|
-
const { h, s, v } = rgb2hsv(r, g, b);
|
235
|
-
fromHSV(h, s, v);
|
61
|
+
this._alpha = 100;
|
236
62
|
}
|
63
|
+
this.doOnChange();
|
237
64
|
}
|
238
65
|
compare(color) {
|
239
|
-
|
66
|
+
const compareColor = new TinyColor({
|
67
|
+
h: color._hue,
|
68
|
+
s: color._saturation / 100,
|
69
|
+
v: color._value / 100,
|
70
|
+
a: color._alpha / 100
|
71
|
+
});
|
72
|
+
return this._tiny.equals(compareColor);
|
240
73
|
}
|
241
74
|
doOnChange() {
|
242
|
-
const { _hue, _saturation, _value, _alpha, format } = this;
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
|
247
|
-
this.value = `hsla(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(hsl[2] * 100)}%, ${this.get("alpha") / 100})`;
|
248
|
-
break;
|
249
|
-
}
|
250
|
-
case "hsv": {
|
251
|
-
this.value = `hsva(${_hue}, ${Math.round(_saturation)}%, ${Math.round(_value)}%, ${this.get("alpha") / 100})`;
|
252
|
-
break;
|
253
|
-
}
|
254
|
-
case "hex": {
|
255
|
-
this.value = `${toHex(hsv2rgb(_hue, _saturation, _value))}${hexOne(_alpha * 255 / 100)}`;
|
256
|
-
break;
|
257
|
-
}
|
258
|
-
default: {
|
259
|
-
const { r, g, b } = hsv2rgb(_hue, _saturation, _value);
|
260
|
-
this.value = `rgba(${r}, ${g}, ${b}, ${this.get("alpha") / 100})`;
|
261
|
-
}
|
262
|
-
}
|
263
|
-
} else {
|
264
|
-
switch (format) {
|
265
|
-
case "hsl": {
|
266
|
-
const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100);
|
267
|
-
this.value = `hsl(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(hsl[2] * 100)}%)`;
|
268
|
-
break;
|
269
|
-
}
|
270
|
-
case "hsv": {
|
271
|
-
this.value = `hsv(${_hue}, ${Math.round(_saturation)}%, ${Math.round(_value)}%)`;
|
272
|
-
break;
|
273
|
-
}
|
274
|
-
case "rgb": {
|
275
|
-
const { r, g, b } = hsv2rgb(_hue, _saturation, _value);
|
276
|
-
this.value = `rgb(${r}, ${g}, ${b})`;
|
277
|
-
break;
|
278
|
-
}
|
279
|
-
default: {
|
280
|
-
this.value = toHex(hsv2rgb(_hue, _saturation, _value));
|
281
|
-
}
|
282
|
-
}
|
75
|
+
const { _hue, _saturation, _value, _alpha, format, enableAlpha } = this;
|
76
|
+
let _format = format || (enableAlpha ? "rgb" : "hex");
|
77
|
+
if (format === "hex" && enableAlpha) {
|
78
|
+
_format = "hex8";
|
283
79
|
}
|
80
|
+
this._tiny = new TinyColor({
|
81
|
+
h: _hue,
|
82
|
+
s: _saturation / 100,
|
83
|
+
v: _value / 100,
|
84
|
+
a: _alpha / 100
|
85
|
+
});
|
86
|
+
this.value = this._isValid ? this._tiny.toString(_format) : "";
|
284
87
|
}
|
285
88
|
}
|
286
89
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"color.mjs","sources":["../../../../../../../packages/components/color-picker/src/utils/color.ts"],"sourcesContent":["import { hasOwn, isString } from '@element-plus/utils'\n\nconst hsv2hsl = function (hue: number, sat: number, val: number) {\n return [\n hue,\n (sat * val) / ((hue = (2 - sat) * val) < 1 ? hue : 2 - hue) || 0,\n hue / 2,\n ]\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\nconst isOnePointZero = function (n: unknown) {\n return isString(n) && n.includes('.') && Number.parseFloat(n) === 1\n}\n\nconst isPercentage = function (n: unknown) {\n return isString(n) && n.includes('%')\n}\n\n// Take input from [0, n] and return it as [0, 1]\nconst bound01 = function (value: number | string, max: number | string) {\n if (isOnePointZero(value)) value = '100%'\n\n const processPercent = isPercentage(value)\n value = Math.min(max as number, Math.max(0, Number.parseFloat(`${value}`)))\n\n // Automatically convert percentage into number\n if (processPercent) {\n value = Number.parseInt(`${value * (max as number)}`, 10) / 100\n }\n\n // Handle floating point rounding errors\n if (Math.abs(value - (max as number)) < 0.000001) {\n return 1\n }\n\n // Convert into [0, 1] range if it isn't already\n return (value % (max as number)) / Number.parseFloat(max as string)\n}\n\nconst INT_HEX_MAP: Record<string, string> = {\n 10: 'A',\n 11: 'B',\n 12: 'C',\n 13: 'D',\n 14: 'E',\n 15: 'F',\n}\n\nconst hexOne = (value: number) => {\n value = Math.min(Math.round(value), 255)\n const high = Math.floor(value / 16)\n const low = value % 16\n return `${INT_HEX_MAP[high] || high}${INT_HEX_MAP[low] || low}`\n}\n\nconst toHex = function ({ r, g, b }: { r: number; g: number; b: number }) {\n if (Number.isNaN(+r) || Number.isNaN(+g) || Number.isNaN(+b)) return ''\n return `#${hexOne(r)}${hexOne(g)}${hexOne(b)}`\n}\n\nconst HEX_INT_MAP: Record<string, number> = {\n A: 10,\n B: 11,\n C: 12,\n D: 13,\n E: 14,\n F: 15,\n}\n\nconst parseHexChannel = function (hex: string) {\n if (hex.length === 2) {\n return (\n (HEX_INT_MAP[hex[0].toUpperCase()] || +hex[0]) * 16 +\n (HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1])\n )\n }\n\n return HEX_INT_MAP[hex[1].toUpperCase()] || +hex[1]\n}\n\nconst hsl2hsv = function (hue: number, sat: number, light: number) {\n sat = sat / 100\n light = light / 100\n let smin = sat\n const lmin = Math.max(light, 0.01)\n // let sv\n // let v\n\n light *= 2\n sat *= light <= 1 ? light : 2 - light\n smin *= lmin <= 1 ? lmin : 2 - lmin\n const v = (light + sat) / 2\n const sv =\n light === 0 ? (2 * smin) / (lmin + smin) : (2 * sat) / (light + sat)\n\n return {\n h: hue,\n s: sv * 100,\n v: v * 100,\n }\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nconst rgb2hsv = (r: number, g: number, b: number) => {\n r = bound01(r, 255)\n g = bound01(g, 255)\n b = bound01(b, 255)\n\n const max = Math.max(r, g, b)\n const min = Math.min(r, g, b)\n let h: number\n const v = max\n\n const d = max - min\n const s = max === 0 ? 0 : d / max\n\n if (max === min) {\n h = 0 // achromatic\n } else {\n switch (max) {\n case r: {\n h = (g - b) / d + (g < b ? 6 : 0)\n break\n }\n case g: {\n h = (b - r) / d + 2\n break\n }\n case b: {\n h = (r - g) / d + 4\n break\n }\n }\n h! /= 6\n }\n\n return { h: h! * 360, s: s * 100, v: v * 100 }\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nconst hsv2rgb = function (h: number, s: number, v: number) {\n h = bound01(h, 360) * 6\n s = bound01(s, 100)\n v = bound01(v, 100)\n\n const i = Math.floor(h)\n const f = h - i\n const p = v * (1 - s)\n const q = v * (1 - f * s)\n const t = v * (1 - (1 - f) * s)\n const mod = i % 6\n const r = [v, q, p, p, t, v][mod]\n const g = [t, v, v, q, p, p][mod]\n const b = [p, p, t, v, v, q][mod]\n\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255),\n }\n}\n\ninterface ColorOptions {\n enableAlpha: boolean\n format: string\n value?: string\n}\n\nexport default class Color {\n private _hue = 0\n private _saturation = 100\n private _value = 100\n _alpha = 100\n public enableAlpha = false\n public format = 'hex'\n public value = ''\n public selected?: boolean\n\n constructor(options: Partial<ColorOptions> = {}) {\n for (const option in options) {\n if (hasOwn(options, option)) {\n this[option] = options[option]\n }\n }\n if (options.value) {\n this.fromString(options.value)\n } else {\n this.doOnChange()\n }\n }\n\n set(prop: { [key: string]: any } | any, value?: number) {\n if (arguments.length === 1 && typeof prop === 'object') {\n for (const p in prop) {\n if (hasOwn(prop, p)) {\n this.set(p, prop[p])\n }\n }\n\n return\n }\n\n ;(this as any)[`_${prop}`] = value\n this.doOnChange()\n }\n\n get(prop: string) {\n if (prop === 'alpha') {\n return Math.floor(this[`_${prop}`])\n }\n return (this as any)[`_${prop}`]\n }\n\n toRgb() {\n return hsv2rgb(this._hue, this._saturation, this._value)\n }\n\n fromString(value: string) {\n if (!value) {\n this._hue = 0\n this._saturation = 100\n this._value = 100\n\n this.doOnChange()\n return\n }\n\n const fromHSV = (h: number, s: number, v: number) => {\n this._hue = Math.max(0, Math.min(360, h))\n this._saturation = Math.max(0, Math.min(100, s))\n this._value = Math.max(0, Math.min(100, v))\n\n this.doOnChange()\n }\n\n if (value.includes('hsl')) {\n const parts = value\n .replace(/hsla|hsl|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n const { h, s, v } = hsl2hsv(parts[0], parts[1], parts[2])\n fromHSV(h, s, v)\n }\n } else if (value.includes('hsv')) {\n const parts = value\n .replace(/hsva|hsv|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n fromHSV(parts[0], parts[1], parts[2])\n }\n } else if (value.includes('rgb')) {\n const parts = value\n .replace(/rgba|rgb|\\(|\\)/gm, '')\n .split(/\\s|,/g)\n .filter((val) => val !== '')\n .map((val, index) =>\n index > 2 ? Number.parseFloat(val) : Number.parseInt(val, 10)\n )\n\n if (parts.length === 4) {\n // @ts-expect-error\n this._alpha = Number.parseFloat(parts[3]) * 100\n } else if (parts.length === 3) {\n this._alpha = 100\n }\n if (parts.length >= 3) {\n const { h, s, v } = rgb2hsv(parts[0], parts[1], parts[2])\n fromHSV(h, s, v)\n }\n } else if (value.includes('#')) {\n const hex = value.replace('#', '').trim()\n if (!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(hex))\n return\n let r: number, g: number, b: number\n\n if (hex.length === 3) {\n r = parseHexChannel(hex[0] + hex[0])\n g = parseHexChannel(hex[1] + hex[1])\n b = parseHexChannel(hex[2] + hex[2])\n } else if (hex.length === 6 || hex.length === 8) {\n r = parseHexChannel(hex.slice(0, 2))\n g = parseHexChannel(hex.slice(2, 4))\n b = parseHexChannel(hex.slice(4, 6))\n }\n\n if (hex.length === 8) {\n this._alpha = (parseHexChannel(hex.slice(6)) / 255) * 100\n } else if (hex.length === 3 || hex.length === 6) {\n this._alpha = 100\n }\n\n const { h, s, v } = rgb2hsv(r!, g!, b!)\n fromHSV(h, s, v)\n }\n }\n\n compare(color: this) {\n return (\n Math.abs(color._hue - this._hue) < 2 &&\n Math.abs(color._saturation - this._saturation) < 1 &&\n Math.abs(color._value - this._value) < 1 &&\n Math.abs(color._alpha - this._alpha) < 1\n )\n }\n\n doOnChange() {\n const { _hue, _saturation, _value, _alpha, format } = this\n\n if (this.enableAlpha) {\n switch (format) {\n case 'hsl': {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100)\n this.value = `hsla(${_hue}, ${Math.round(\n hsl[1] * 100\n )}%, ${Math.round(hsl[2] * 100)}%, ${this.get('alpha') / 100})`\n break\n }\n case 'hsv': {\n this.value = `hsva(${_hue}, ${Math.round(_saturation)}%, ${Math.round(\n _value\n )}%, ${this.get('alpha') / 100})`\n break\n }\n case 'hex': {\n this.value = `${toHex(hsv2rgb(_hue, _saturation, _value))}${hexOne(\n (_alpha * 255) / 100\n )}`\n break\n }\n default: {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value)\n this.value = `rgba(${r}, ${g}, ${b}, ${this.get('alpha') / 100})`\n }\n }\n } else {\n switch (format) {\n case 'hsl': {\n const hsl = hsv2hsl(_hue, _saturation / 100, _value / 100)\n this.value = `hsl(${_hue}, ${Math.round(hsl[1] * 100)}%, ${Math.round(\n hsl[2] * 100\n )}%)`\n break\n }\n case 'hsv': {\n this.value = `hsv(${_hue}, ${Math.round(_saturation)}%, ${Math.round(\n _value\n )}%)`\n break\n }\n case 'rgb': {\n const { r, g, b } = hsv2rgb(_hue, _saturation, _value)\n this.value = `rgb(${r}, ${g}, ${b})`\n break\n }\n default: {\n this.value = toHex(hsv2rgb(_hue, _saturation, _value))\n }\n }\n }\n }\n}\n"],"names":[],"mappings":";;AACA,MAAM,OAAO,GAAG,SAAS,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AACxC,EAAE,OAAO;AACT,IAAI,GAAG;AACP,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC;AAClE,IAAI,GAAG,GAAG,CAAC;AACX,GAAG,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,cAAc,GAAG,SAAS,CAAC,EAAE;AACnC,EAAE,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAA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CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAClG,UAAU,MAAM;AAChB,SAAS;AACT,QAAQ,KAAK,KAAK,EAAE;AACpB,UAAU,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;AAC3F,UAAU,MAAM;AAChB,SAAS;AACT,QAAQ,KAAK,KAAK,EAAE;AACpB,UAAU,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AACjE,UAAU,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,UAAU,MAAM;AAChB,SAAS;AACT,QAAQ,SAAS;AACjB,UAAU,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;"}
|
1
|
+
{"version":3,"file":"color.mjs","sources":["../../../../../../../packages/components/color-picker/src/utils/color.ts"],"sourcesContent":["import { TinyColor } from '@ctrl/tinycolor'\nimport { hasOwn } from '@element-plus/utils'\nimport type { ColorFormats } from '@ctrl/tinycolor'\n\ninterface ColorOptions {\n enableAlpha: boolean\n format: string\n value?: string\n}\n\nexport default class Color {\n private _hue = 0\n private _saturation = 100\n private _value = 100\n private _alpha = 100\n private _tiny = new TinyColor()\n private _isValid = false\n public enableAlpha = false\n public format = ''\n public value = ''\n public selected?: boolean\n\n constructor(options: Partial<ColorOptions> = {}) {\n for (const option in options) {\n if (hasOwn(options, option)) {\n this[option] = options[option]\n }\n }\n if (options.value) {\n this.fromString(options.value)\n } else {\n this.doOnChange()\n }\n }\n\n set(prop: { [key: string]: any } | any, value?: number) {\n if (arguments.length === 1 && typeof prop === 'object') {\n for (const p in prop) {\n if (hasOwn(prop, p)) {\n this.set(p, prop[p])\n }\n }\n\n return\n }\n ;(this as any)[`_${prop}`] = value\n this._isValid = true\n this.doOnChange()\n }\n\n get(prop: string) {\n if (['hue', 'saturation', 'value', 'alpha'].includes(prop)) {\n return Math.round((this as any)[`_${prop}`])\n }\n return (this as any)[`_${prop}`]\n }\n\n toRgb() {\n return this._isValid ? this._tiny.toRgb() : { r: 255, g: 255, b: 255, a: 0 }\n }\n\n fromString(value: string) {\n const color = new TinyColor(value)\n this._isValid = color.isValid\n if (color.isValid) {\n const { h, s, v, a } = color.toHsv()\n this._hue = h\n this._saturation = s * 100\n this._value = v * 100\n this._alpha = a * 100\n } else {\n this._hue = 0\n this._saturation = 100\n this._value = 100\n this._alpha = 100\n }\n this.doOnChange()\n }\n\n compare(color: this) {\n const compareColor = new TinyColor({\n h: color._hue,\n s: color._saturation / 100,\n v: color._value / 100,\n a: color._alpha / 100,\n })\n return this._tiny.equals(compareColor)\n }\n\n doOnChange() {\n const { _hue, _saturation, _value, _alpha, format, enableAlpha } = this\n let _format = format || (enableAlpha ? 'rgb' : 'hex')\n if (format === 'hex' && enableAlpha) {\n _format = 'hex8'\n }\n this._tiny = new TinyColor({\n h: _hue,\n s: _saturation / 100,\n v: _value / 100,\n a: _alpha / 100,\n })\n this.value = this._isValid\n ? this._tiny.toString(_format as ColorFormats)\n : ''\n }\n}\n"],"names":[],"mappings":";;;AAEe,MAAM,KAAK,CAAC;AAC3B,EAAE,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC5B,IAAI,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;AAClB,IAAI,IAAI,CAAC,WAA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AC;AACP,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AACnE,GAAG;AACH;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import Descriptions from './src/
|
1
|
+
import Descriptions from './src/description.mjs';
|
2
2
|
import DescriptionItem from './src/description-item.mjs';
|
3
3
|
export { descriptionItemProps } from './src/description-item.mjs';
|
4
|
-
export { descriptionProps } from './src/
|
4
|
+
export { descriptionProps } from './src/description2.mjs';
|
5
5
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
6
6
|
|
7
7
|
const ElDescriptions = withInstall(Descriptions, {
|
@@ -1,31 +1,132 @@
|
|
1
|
-
import {
|
2
|
-
import
|
1
|
+
import { defineComponent, useSlots, provide, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from 'vue';
|
2
|
+
import ElDescriptionsRow from './descriptions-row2.mjs';
|
3
|
+
import { descriptionsKey } from './token.mjs';
|
4
|
+
import { descriptionProps } from './description2.mjs';
|
5
|
+
import { COMPONENT_NAME } from './constants.mjs';
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
8
|
+
import { useFormSize } from '../../form/src/hooks/use-form-common-props.mjs';
|
9
|
+
import { flattedChildren } from '../../../utils/vue/vnode.mjs';
|
3
10
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
11
|
+
const __default__ = defineComponent({
|
12
|
+
name: "ElDescriptions"
|
13
|
+
});
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
15
|
+
...__default__,
|
16
|
+
props: descriptionProps,
|
17
|
+
setup(__props) {
|
18
|
+
const props = __props;
|
19
|
+
const ns = useNamespace("descriptions");
|
20
|
+
const descriptionsSize = useFormSize();
|
21
|
+
const slots = useSlots();
|
22
|
+
provide(descriptionsKey, props);
|
23
|
+
const descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)]);
|
24
|
+
const filledNode = (node, span, count, isLast = false) => {
|
25
|
+
if (!node.props) {
|
26
|
+
node.props = {};
|
27
|
+
}
|
28
|
+
if (span > count) {
|
29
|
+
node.props.span = count;
|
30
|
+
}
|
31
|
+
if (isLast) {
|
32
|
+
node.props.span = span;
|
33
|
+
}
|
34
|
+
return node;
|
35
|
+
};
|
36
|
+
const getRows = () => {
|
37
|
+
if (!slots.default)
|
38
|
+
return [];
|
39
|
+
const children = flattedChildren(slots.default()).filter((node) => {
|
40
|
+
var _a;
|
41
|
+
return ((_a = node == null ? void 0 : node.type) == null ? void 0 : _a.name) === COMPONENT_NAME;
|
42
|
+
});
|
43
|
+
const rows = [];
|
44
|
+
let temp = [];
|
45
|
+
let count = props.column;
|
46
|
+
let totalSpan = 0;
|
47
|
+
const rowspanTemp = [];
|
48
|
+
children.forEach((node, index) => {
|
49
|
+
var _a, _b, _c;
|
50
|
+
const span = ((_a = node.props) == null ? void 0 : _a.span) || 1;
|
51
|
+
const rowspan = ((_b = node.props) == null ? void 0 : _b.rowspan) || 1;
|
52
|
+
const rowNo = rows.length;
|
53
|
+
rowspanTemp[rowNo] || (rowspanTemp[rowNo] = 0);
|
54
|
+
if (rowspan > 1) {
|
55
|
+
for (let i = 1; i < rowspan; i++) {
|
56
|
+
rowspanTemp[_c = rowNo + i] || (rowspanTemp[_c] = 0);
|
57
|
+
rowspanTemp[rowNo + i]++;
|
58
|
+
totalSpan++;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
if (rowspanTemp[rowNo] > 0) {
|
62
|
+
count -= rowspanTemp[rowNo];
|
63
|
+
rowspanTemp[rowNo] = 0;
|
64
|
+
}
|
65
|
+
if (index < children.length - 1) {
|
66
|
+
totalSpan += span > count ? count : span;
|
67
|
+
}
|
68
|
+
if (index === children.length - 1) {
|
69
|
+
const lastSpan = props.column - totalSpan % props.column;
|
70
|
+
temp.push(filledNode(node, lastSpan, count, true));
|
71
|
+
rows.push(temp);
|
72
|
+
return;
|
73
|
+
}
|
74
|
+
if (span < count) {
|
75
|
+
count -= span;
|
76
|
+
temp.push(node);
|
77
|
+
} else {
|
78
|
+
temp.push(filledNode(node, span, count));
|
79
|
+
rows.push(temp);
|
80
|
+
count = props.column;
|
81
|
+
temp = [];
|
82
|
+
}
|
83
|
+
});
|
84
|
+
return rows;
|
85
|
+
};
|
86
|
+
return (_ctx, _cache) => {
|
87
|
+
return openBlock(), createElementBlock("div", {
|
88
|
+
class: normalizeClass(unref(descriptionKls))
|
89
|
+
}, [
|
90
|
+
_ctx.title || _ctx.extra || _ctx.$slots.title || _ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
91
|
+
key: 0,
|
92
|
+
class: normalizeClass(unref(ns).e("header"))
|
93
|
+
}, [
|
94
|
+
createElementVNode("div", {
|
95
|
+
class: normalizeClass(unref(ns).e("title"))
|
96
|
+
}, [
|
97
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
98
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
99
|
+
])
|
100
|
+
], 2),
|
101
|
+
createElementVNode("div", {
|
102
|
+
class: normalizeClass(unref(ns).e("extra"))
|
103
|
+
}, [
|
104
|
+
renderSlot(_ctx.$slots, "extra", {}, () => [
|
105
|
+
createTextVNode(toDisplayString(_ctx.extra), 1)
|
106
|
+
])
|
107
|
+
], 2)
|
108
|
+
], 2)) : createCommentVNode("v-if", true),
|
109
|
+
createElementVNode("div", {
|
110
|
+
class: normalizeClass(unref(ns).e("body"))
|
111
|
+
}, [
|
112
|
+
createElementVNode("table", {
|
113
|
+
class: normalizeClass([unref(ns).e("table"), unref(ns).is("bordered", _ctx.border)])
|
114
|
+
}, [
|
115
|
+
createElementVNode("tbody", null, [
|
116
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(getRows(), (row, _index) => {
|
117
|
+
return openBlock(), createBlock(ElDescriptionsRow, {
|
118
|
+
key: _index,
|
119
|
+
row
|
120
|
+
}, null, 8, ["row"]);
|
121
|
+
}), 128))
|
122
|
+
])
|
123
|
+
], 2)
|
124
|
+
], 2)
|
125
|
+
], 2);
|
126
|
+
};
|
27
127
|
}
|
28
128
|
});
|
129
|
+
var Descriptions = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "description.vue"]]);
|
29
130
|
|
30
|
-
export {
|
131
|
+
export { Descriptions as default };
|
31
132
|
//# sourceMappingURL=description.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"description.mjs","sources":["../../../../../../packages/components/descriptions/src/description.
|
1
|
+
{"version":3,"file":"description.mjs","sources":["../../../../../../packages/components/descriptions/src/description.vue"],"sourcesContent":["<template>\n <div :class=\"descriptionKls\">\n <div\n v-if=\"title || extra || $slots.title || $slots.extra\"\n :class=\"ns.e('header')\"\n >\n <div :class=\"ns.e('title')\">\n <slot name=\"title\">{{ title }}</slot>\n </div>\n <div :class=\"ns.e('extra')\">\n <slot name=\"extra\">{{ extra }}</slot>\n </div>\n </div>\n\n <div :class=\"ns.e('body')\">\n <table :class=\"[ns.e('table'), ns.is('bordered', border)]\">\n <tbody>\n <template v-for=\"(row, _index) in getRows()\" :key=\"_index\">\n <el-descriptions-row :row=\"row\" />\n </template>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, useSlots } from 'vue'\nimport { flattedChildren } from '@element-plus/utils'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useFormSize } from '@element-plus/components/form'\nimport ElDescriptionsRow from './descriptions-row.vue'\nimport { descriptionsKey } from './token'\nimport { descriptionProps } from './description'\nimport { COMPONENT_NAME } from './constants'\n\nimport type { IDescriptionsInject } from './descriptions.type'\nimport type { DescriptionItemVNode } from './description-item'\n\ndefineOptions({\n name: 'ElDescriptions',\n})\n\nconst props = defineProps(descriptionProps)\n\nconst ns = useNamespace('descriptions')\n\nconst descriptionsSize = useFormSize()\n\nconst slots = useSlots()\n\nprovide(descriptionsKey, props as IDescriptionsInject)\n\nconst descriptionKls = computed(() => [ns.b(), ns.m(descriptionsSize.value)])\n\nconst filledNode = (\n node: DescriptionItemVNode,\n span: number,\n count: number,\n isLast = false\n) => {\n if (!node.props) {\n node.props = {}\n }\n if (span > count) {\n node.props.span = count\n }\n if (isLast) {\n // set the last span\n node.props.span = span\n }\n return node\n}\n\nconst getRows = () => {\n if (!slots.default) return []\n\n const children = flattedChildren(slots.default()).filter(\n (node): node is DescriptionItemVNode =>\n (node as any)?.type?.name === COMPONENT_NAME\n )\n const rows: DescriptionItemVNode[][] = []\n let temp: DescriptionItemVNode[] = []\n let count = props.column\n let totalSpan = 0 // all spans number of item\n const rowspanTemp: number[] = [] // the number of row spans\n\n children.forEach((node, index) => {\n const span = node.props?.span || 1\n const rowspan = node.props?.rowspan || 1\n const rowNo = rows.length\n rowspanTemp[rowNo] ||= 0\n\n if (rowspan > 1) {\n for (let i = 1; i < rowspan; i++) {\n rowspanTemp[rowNo + i] ||= 0\n rowspanTemp[rowNo + i]++\n totalSpan++\n }\n }\n if (rowspanTemp[rowNo] > 0) {\n count -= rowspanTemp[rowNo]\n rowspanTemp[rowNo] = 0\n }\n if (index < children.length - 1) {\n totalSpan += span > count ? count : span\n }\n\n if (index === children.length - 1) {\n // calculate the last item span\n const lastSpan = props.column - (totalSpan % props.column)\n temp.push(filledNode(node, lastSpan, count, true))\n rows.push(temp)\n return\n }\n\n if (span < count) {\n count -= span\n temp.push(node)\n } else {\n temp.push(filledNode(node, span, count))\n rows.push(temp)\n count = props.column\n temp = []\n }\n })\n\n return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