@element-plus/nightly 0.0.20250808 → 0.0.20250810
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.full.js +2735 -845
- package/dist/index.full.min.js +14 -14
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +15 -15
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2735 -846
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +53 -21
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +21 -53
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/badge/index.mjs +2 -2
- package/es/components/badge/src/badge.mjs +71 -32
- package/es/components/badge/src/badge.mjs.map +1 -1
- package/es/components/badge/src/badge2.mjs +32 -71
- package/es/components/badge/src/badge2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +56 -8
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +8 -56
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider-props.d.ts +7 -0
- package/es/components/config-provider/src/config-provider-props.mjs +3 -0
- package/es/components/config-provider/src/config-provider-props.mjs.map +1 -1
- package/es/components/config-provider/src/config-provider.d.ts +12 -0
- package/es/components/dialog/index.mjs +1 -1
- package/es/components/dialog/src/dialog-content.d.ts +3 -3
- package/es/components/dialog/src/dialog-content.mjs +12 -3
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.vue.d.ts +9 -9
- package/es/components/dialog/src/dialog-content2.mjs +4 -4
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.d.ts +12 -5
- package/es/components/dialog/src/dialog.mjs +3 -3
- package/es/components/dialog/src/dialog.mjs.map +1 -1
- package/es/components/dialog/src/dialog.vue.d.ts +11 -11
- package/es/components/dialog/src/dialog2.mjs +6 -4
- package/es/components/dialog/src/dialog2.mjs.map +1 -1
- package/es/components/dialog/src/use-dialog.d.ts +4 -1
- package/es/components/dialog/src/use-dialog.mjs +37 -12
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/drawer/src/drawer.d.ts +4 -4
- package/es/components/drawer/src/drawer.vue.d.ts +11 -11
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/image/src/image.vue.d.ts +1 -1
- package/es/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/es/components/index.mjs +13 -13
- package/es/components/input/src/utils.mjs +3 -3
- package/es/components/input/src/utils.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag.vue.d.ts +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +100 -15
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +15 -100
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/message/src/message.vue.d.ts +1 -1
- package/es/components/message-box/src/index.vue.d.ts +1 -1
- package/es/components/notification/src/notification.vue.d.ts +1 -1
- package/es/components/pagination/src/components/pager.mjs +16 -210
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +210 -16
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popper/index.mjs +4 -4
- package/es/components/popper/src/content.mjs +130 -88
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +88 -130
- package/es/components/popper/src/content2.mjs.map +1 -1
- 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-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/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/statistic/index.mjs +2 -2
- package/es/components/statistic/src/statistic.mjs +25 -69
- package/es/components/statistic/src/statistic.mjs.map +1 -1
- package/es/components/statistic/src/statistic2.mjs +69 -25
- package/es/components/statistic/src/statistic2.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +72 -227
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +227 -72
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +87 -11
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +11 -87
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tooltip/src/content.mjs +1 -1
- package/es/components/tooltip/src/content2.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +1 -1
- package/es/components/tooltip-v2/src/root.mjs +17 -79
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +79 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +69 -154
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour.vue.d.ts +1 -1
- package/es/components/tour/src/tour2.mjs +154 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/tree/src/tree.vue.d.ts +1 -1
- package/es/index.d.ts +66 -38
- package/es/index.mjs +13 -13
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +53 -22
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +22 -53
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/badge/index.js +2 -2
- package/lib/components/badge/src/badge.js +71 -32
- package/lib/components/badge/src/badge.js.map +1 -1
- package/lib/components/badge/src/badge2.js +32 -71
- package/lib/components/badge/src/badge2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +56 -8
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +8 -56
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/config-provider/src/config-provider-props.d.ts +7 -0
- package/lib/components/config-provider/src/config-provider-props.js +3 -0
- package/lib/components/config-provider/src/config-provider-props.js.map +1 -1
- package/lib/components/config-provider/src/config-provider.d.ts +12 -0
- package/lib/components/dialog/index.js +1 -0
- package/lib/components/dialog/index.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.d.ts +3 -3
- package/lib/components/dialog/src/dialog-content.js +12 -3
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.vue.d.ts +9 -9
- package/lib/components/dialog/src/dialog-content2.js +4 -4
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.d.ts +12 -5
- package/lib/components/dialog/src/dialog.js +3 -2
- package/lib/components/dialog/src/dialog.js.map +1 -1
- package/lib/components/dialog/src/dialog.vue.d.ts +11 -11
- package/lib/components/dialog/src/dialog2.js +6 -4
- package/lib/components/dialog/src/dialog2.js.map +1 -1
- package/lib/components/dialog/src/use-dialog.d.ts +4 -1
- package/lib/components/dialog/src/use-dialog.js +37 -12
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/drawer/src/drawer.d.ts +4 -4
- package/lib/components/drawer/src/drawer.vue.d.ts +11 -11
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/image/src/image.vue.d.ts +1 -1
- package/lib/components/image-viewer/src/image-viewer.vue.d.ts +1 -1
- package/lib/components/index.js +13 -12
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/src/utils.js +3 -3
- package/lib/components/input/src/utils.js.map +1 -1
- package/lib/components/input-tag/src/input-tag.vue.d.ts +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +100 -16
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +16 -100
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/message/src/message.vue.d.ts +1 -1
- package/lib/components/message-box/src/index.vue.d.ts +1 -1
- package/lib/components/notification/src/notification.vue.d.ts +1 -1
- package/lib/components/pagination/src/components/pager.js +16 -210
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +210 -16
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popper/index.js +4 -4
- package/lib/components/popper/src/content.js +130 -93
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +93 -130
- package/lib/components/popper/src/content2.js.map +1 -1
- 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-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/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/statistic/index.js +2 -2
- package/lib/components/statistic/src/statistic.js +25 -69
- package/lib/components/statistic/src/statistic.js.map +1 -1
- package/lib/components/statistic/src/statistic2.js +69 -25
- package/lib/components/statistic/src/statistic2.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +72 -226
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +226 -72
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +87 -11
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +11 -87
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tooltip/src/content.js +1 -1
- package/lib/components/tooltip/src/content2.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/index.js +1 -1
- package/lib/components/tooltip-v2/src/root.js +17 -79
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +79 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +69 -153
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour.vue.d.ts +1 -1
- package/lib/components/tour/src/tour2.js +153 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/tree/src/tree.vue.d.ts +1 -1
- package/lib/index.d.ts +66 -38
- package/lib/index.js +13 -12
- 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/web-types.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type {\n ComponentPublicInstance,\n ExtractPropTypes,\n Ref,\n __ExtractPublicPropTypes,\n} from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\nexport type SliderButtonPropsPublic = __ExtractPublicPropTypes<\n typeof sliderButtonProps\n>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = ComponentPublicInstance<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD;;;;"}
|
@@ -3,7 +3,7 @@ import { useEventListener } from '@vueuse/core';
|
|
3
3
|
import { ElInputNumber } from '../../input-number/index.mjs';
|
4
4
|
import { sliderContextKey } from './constants.mjs';
|
5
5
|
import { sliderProps, sliderEmits } from './slider.mjs';
|
6
|
-
import SliderButton from './
|
6
|
+
import SliderButton from './button.mjs';
|
7
7
|
import SliderMarker from './marker.mjs';
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
9
9
|
import { useSlide } from './composables/use-slide.mjs';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Statistic from './src/
|
2
|
-
export { statisticProps } from './src/
|
1
|
+
import Statistic from './src/statistic2.mjs';
|
2
|
+
export { statisticProps } from './src/statistic.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElStatistic = withInstall(Statistic);
|
@@ -1,74 +1,30 @@
|
|
1
|
-
import {
|
2
|
-
import { statisticProps } from './statistic2.mjs';
|
3
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
5
|
-
import { isFunction } from '@vue/shared';
|
6
|
-
import { isNumber } from '../../../utils/types.mjs';
|
1
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
7
2
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
return (_ctx, _cache) => {
|
32
|
-
return openBlock(), createElementBlock("div", {
|
33
|
-
class: normalizeClass(unref(ns).b())
|
34
|
-
}, [
|
35
|
-
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
|
36
|
-
key: 0,
|
37
|
-
class: normalizeClass(unref(ns).e("head"))
|
38
|
-
}, [
|
39
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
40
|
-
createTextVNode(toDisplayString(_ctx.title), 1)
|
41
|
-
])
|
42
|
-
], 2)) : createCommentVNode("v-if", true),
|
43
|
-
createElementVNode("div", {
|
44
|
-
class: normalizeClass(unref(ns).e("content"))
|
45
|
-
}, [
|
46
|
-
_ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
|
47
|
-
key: 0,
|
48
|
-
class: normalizeClass(unref(ns).e("prefix"))
|
49
|
-
}, [
|
50
|
-
renderSlot(_ctx.$slots, "prefix", {}, () => [
|
51
|
-
createElementVNode("span", null, toDisplayString(_ctx.prefix), 1)
|
52
|
-
])
|
53
|
-
], 2)) : createCommentVNode("v-if", true),
|
54
|
-
createElementVNode("span", {
|
55
|
-
class: normalizeClass(unref(ns).e("number")),
|
56
|
-
style: normalizeStyle(_ctx.valueStyle)
|
57
|
-
}, toDisplayString(unref(displayValue)), 7),
|
58
|
-
_ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
|
59
|
-
key: 1,
|
60
|
-
class: normalizeClass(unref(ns).e("suffix"))
|
61
|
-
}, [
|
62
|
-
renderSlot(_ctx.$slots, "suffix", {}, () => [
|
63
|
-
createElementVNode("span", null, toDisplayString(_ctx.suffix), 1)
|
64
|
-
])
|
65
|
-
], 2)) : createCommentVNode("v-if", true)
|
66
|
-
], 2)
|
67
|
-
], 2);
|
68
|
-
};
|
3
|
+
const statisticProps = buildProps({
|
4
|
+
decimalSeparator: {
|
5
|
+
type: String,
|
6
|
+
default: "."
|
7
|
+
},
|
8
|
+
groupSeparator: {
|
9
|
+
type: String,
|
10
|
+
default: ","
|
11
|
+
},
|
12
|
+
precision: {
|
13
|
+
type: Number,
|
14
|
+
default: 0
|
15
|
+
},
|
16
|
+
formatter: Function,
|
17
|
+
value: {
|
18
|
+
type: definePropType([Number, Object]),
|
19
|
+
default: 0
|
20
|
+
},
|
21
|
+
prefix: String,
|
22
|
+
suffix: String,
|
23
|
+
title: String,
|
24
|
+
valueStyle: {
|
25
|
+
type: definePropType([String, Object, Array])
|
69
26
|
}
|
70
27
|
});
|
71
|
-
var Statistic = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "statistic.vue"]]);
|
72
28
|
|
73
|
-
export {
|
29
|
+
export { statisticProps };
|
74
30
|
//# sourceMappingURL=statistic.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.
|
1
|
+
{"version":3,"file":"statistic.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type {\n ExtractPropTypes,\n StyleValue,\n __ExtractPublicPropTypes,\n} from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Statistic from './statistic.vue'\n\nexport const statisticProps = buildProps({\n /**\n * @description Setting the decimal point\n */\n decimalSeparator: {\n type: String,\n default: '.',\n },\n /**\n * @description Sets the thousandth identifier\n */\n groupSeparator: {\n type: String,\n default: ',',\n },\n /**\n * @description numerical precision\n */\n precision: {\n type: Number,\n default: 0,\n },\n /**\n * @description Custom numerical presentation\n */\n formatter: Function,\n /**\n * @description Numerical content\n */\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n default: 0,\n },\n /**\n * @description Sets the prefix of a number\n */\n prefix: String,\n\n /**\n * @description Sets the suffix of a number\n */\n suffix: String,\n /**\n * @description Numeric titles\n */\n title: String,\n /**\n * @description Styles numeric values\n */\n valueStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n} as const)\nexport type StatisticProps = ExtractPropTypes<typeof statisticProps>\nexport type StatisticPropsPublic = __ExtractPublicPropTypes<\n typeof statisticProps\n>\n\nexport type StatisticInstance = InstanceType<typeof Statistic> & unknown\n"],"names":[],"mappings":";;AACY,MAAC,cAAc,GAAG,UAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,SAAS,EAAE,QAAQ;AACrB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,MAAM,EAAE,MAAM;AAChB,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,GAAG;AACH,CAAC;;;;"}
|
@@ -1,30 +1,74 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
|
2
|
+
import { statisticProps } from './statistic.mjs';
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
5
|
+
import { isFunction } from '@vue/shared';
|
6
|
+
import { isNumber } from '../../../utils/types.mjs';
|
2
7
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
8
|
+
const __default__ = defineComponent({
|
9
|
+
name: "ElStatistic"
|
10
|
+
});
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
12
|
+
...__default__,
|
13
|
+
props: statisticProps,
|
14
|
+
setup(__props, { expose }) {
|
15
|
+
const props = __props;
|
16
|
+
const ns = useNamespace("statistic");
|
17
|
+
const displayValue = computed(() => {
|
18
|
+
const { value, formatter, precision, decimalSeparator, groupSeparator } = props;
|
19
|
+
if (isFunction(formatter))
|
20
|
+
return formatter(value);
|
21
|
+
if (!isNumber(value) || Number.isNaN(value))
|
22
|
+
return value;
|
23
|
+
let [integer, decimal = ""] = String(value).split(".");
|
24
|
+
decimal = decimal.padEnd(precision, "0").slice(0, precision > 0 ? precision : 0);
|
25
|
+
integer = integer.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
26
|
+
return [integer, decimal].join(decimal ? decimalSeparator : "");
|
27
|
+
});
|
28
|
+
expose({
|
29
|
+
displayValue
|
30
|
+
});
|
31
|
+
return (_ctx, _cache) => {
|
32
|
+
return openBlock(), createElementBlock("div", {
|
33
|
+
class: normalizeClass(unref(ns).b())
|
34
|
+
}, [
|
35
|
+
_ctx.$slots.title || _ctx.title ? (openBlock(), createElementBlock("div", {
|
36
|
+
key: 0,
|
37
|
+
class: normalizeClass(unref(ns).e("head"))
|
38
|
+
}, [
|
39
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
40
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
41
|
+
])
|
42
|
+
], 2)) : createCommentVNode("v-if", true),
|
43
|
+
createElementVNode("div", {
|
44
|
+
class: normalizeClass(unref(ns).e("content"))
|
45
|
+
}, [
|
46
|
+
_ctx.$slots.prefix || _ctx.prefix ? (openBlock(), createElementBlock("div", {
|
47
|
+
key: 0,
|
48
|
+
class: normalizeClass(unref(ns).e("prefix"))
|
49
|
+
}, [
|
50
|
+
renderSlot(_ctx.$slots, "prefix", {}, () => [
|
51
|
+
createElementVNode("span", null, toDisplayString(_ctx.prefix), 1)
|
52
|
+
])
|
53
|
+
], 2)) : createCommentVNode("v-if", true),
|
54
|
+
createElementVNode("span", {
|
55
|
+
class: normalizeClass(unref(ns).e("number")),
|
56
|
+
style: normalizeStyle(_ctx.valueStyle)
|
57
|
+
}, toDisplayString(unref(displayValue)), 7),
|
58
|
+
_ctx.$slots.suffix || _ctx.suffix ? (openBlock(), createElementBlock("div", {
|
59
|
+
key: 1,
|
60
|
+
class: normalizeClass(unref(ns).e("suffix"))
|
61
|
+
}, [
|
62
|
+
renderSlot(_ctx.$slots, "suffix", {}, () => [
|
63
|
+
createElementVNode("span", null, toDisplayString(_ctx.suffix), 1)
|
64
|
+
])
|
65
|
+
], 2)) : createCommentVNode("v-if", true)
|
66
|
+
], 2)
|
67
|
+
], 2);
|
68
|
+
};
|
26
69
|
}
|
27
70
|
});
|
71
|
+
var Statistic = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "statistic.vue"]]);
|
28
72
|
|
29
|
-
export {
|
73
|
+
export { Statistic as default };
|
30
74
|
//# sourceMappingURL=statistic2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"statistic2.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.
|
1
|
+
{"version":3,"file":"statistic2.mjs","sources":["../../../../../../packages/components/statistic/src/statistic.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div v-if=\"$slots.title || title\" :class=\"ns.e('head')\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </div>\n <div :class=\"ns.e('content')\">\n <div v-if=\"$slots.prefix || prefix\" :class=\"ns.e('prefix')\">\n <slot name=\"prefix\">\n <span>{{ prefix }}</span>\n </slot>\n </div>\n <span :class=\"ns.e('number')\" :style=\"valueStyle\">\n {{ displayValue }}\n </span>\n <div v-if=\"$slots.suffix || suffix\" :class=\"ns.e('suffix')\">\n <slot name=\"suffix\">\n <span>{{ suffix }}</span>\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isFunction, isNumber } from '@element-plus/utils'\nimport { statisticProps } from './statistic'\n\ndefineOptions({\n name: 'ElStatistic',\n})\n\nconst props = defineProps(statisticProps)\nconst ns = useNamespace('statistic')\n\nconst displayValue = computed(() => {\n const { value, formatter, precision, decimalSeparator, groupSeparator } =\n props\n\n if (isFunction(formatter)) return formatter(value)\n\n // https://github.com/element-plus/element-plus/issues/17784\n if (!isNumber(value) || Number.isNaN(value)) return value\n\n let [integer, decimal = ''] = String(value).split('.')\n decimal = decimal\n .padEnd(precision, '0')\n .slice(0, precision > 0 ? precision : 0)\n integer = integer.replace(/\\B(?=(\\d{3})+(?!\\d))/g, groupSeparator)\n return [integer, decimal].join(decimal ? decimalSeparator : '')\n})\n\ndefineExpose({\n /**\n * @description current display value\n */\n displayValue,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;mCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAGA,IAAM,MAAA,EAAA,GAAK,aAAa,WAAW,CAAA,CAAA;AAEnC,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,MAAA,MAAM,EAAE,KAAO,EAAA,SAAA,EAAW,SAAW,EAAA,gBAAA,EAAkB,gBACrD,GAAA,KAAA,CAAA;AAEF,MAAA,IAAI,UAAW,CAAA,SAAS,CAAG;AAG3B,QAAI,gBAAe,CAAA,KAAK;AAExB,MAAI,IAAA,CAAC,SAAS,KAAU,CAAA,IAAA,MAAM,CAAO,KAAA,CAAA,KAAK,CAAE;AAC5C,QAAU,OAAA,KAAA,CAAA;AAGV,MAAU,IAAA,CAAA,OAAA,EAAA,OAAgB,GAAA,EAAA,CAAA,GAAA,MAAA,CAAA,KAAA,CAAA,CAAA,KAAA,CAAA,GAAuC,CAAA,CAAA;AACjE,MAAA,OAAO,GAAU,OAAA,CAAA,MAAO,UAAO,EAAA,GAAA,CAAA,CAAU,qBAAqB,CAAA,GAAA,SAAA,GAAA,CAAA,CAAA,CAAA;AAAA,MAC/D,OAAA,GAAA,OAAA,CAAA,OAAA,CAAA,uBAAA,EAAA,cAAA,CAAA,CAAA;AAED,MAAa,OAAA,CAAA,OAAA,EAAA,OAAA,CAAA,CAAA,IAAA,CAAA,OAAA,GAAA,gBAAA,GAAA,EAAA,CAAA,CAAA;AAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MAAA,CAAA;AAAA,MAAA,YAAA;AAAA,KAIX,CAAA,CAAA;AAAA,IACF,OAAC,CAAA,IAAA,EAAA,MAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Switch from './src/
|
2
|
-
export { switchEmits, switchProps } from './src/
|
1
|
+
import Switch from './src/switch2.mjs';
|
2
|
+
export { switchEmits, switchProps } from './src/switch.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElSwitch = withInstall(Switch);
|
@@ -1,232 +1,77 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
6
|
-
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
7
|
-
import { useFormSize, useFormDisabled } from '../../form/src/hooks/use-form-common-props.mjs';
|
8
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
9
|
-
import { addUnit } from '../../../utils/dom/style.mjs';
|
1
|
+
import { isValidComponentSize } from '../../../utils/vue/validator.mjs';
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
4
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
10
5
|
import { UPDATE_MODEL_EVENT, CHANGE_EVENT, INPUT_EVENT } from '../../../constants/event.mjs';
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import { isBoolean } from '../../../utils/types.mjs';
|
6
|
+
import { isBoolean, isNumber } from '../../../utils/types.mjs';
|
7
|
+
import { isString } from '@vue/shared';
|
14
8
|
|
15
|
-
const
|
16
|
-
|
17
|
-
|
9
|
+
const switchProps = buildProps({
|
10
|
+
modelValue: {
|
11
|
+
type: [Boolean, String, Number],
|
12
|
+
default: false
|
13
|
+
},
|
14
|
+
disabled: Boolean,
|
15
|
+
loading: Boolean,
|
16
|
+
size: {
|
17
|
+
type: String,
|
18
|
+
validator: isValidComponentSize
|
19
|
+
},
|
20
|
+
width: {
|
21
|
+
type: [String, Number],
|
22
|
+
default: ""
|
23
|
+
},
|
24
|
+
inlinePrompt: Boolean,
|
25
|
+
inactiveActionIcon: {
|
26
|
+
type: iconPropType
|
27
|
+
},
|
28
|
+
activeActionIcon: {
|
29
|
+
type: iconPropType
|
30
|
+
},
|
31
|
+
activeIcon: {
|
32
|
+
type: iconPropType
|
33
|
+
},
|
34
|
+
inactiveIcon: {
|
35
|
+
type: iconPropType
|
36
|
+
},
|
37
|
+
activeText: {
|
38
|
+
type: String,
|
39
|
+
default: ""
|
40
|
+
},
|
41
|
+
inactiveText: {
|
42
|
+
type: String,
|
43
|
+
default: ""
|
44
|
+
},
|
45
|
+
activeValue: {
|
46
|
+
type: [Boolean, String, Number],
|
47
|
+
default: true
|
48
|
+
},
|
49
|
+
inactiveValue: {
|
50
|
+
type: [Boolean, String, Number],
|
51
|
+
default: false
|
52
|
+
},
|
53
|
+
name: {
|
54
|
+
type: String,
|
55
|
+
default: ""
|
56
|
+
},
|
57
|
+
validateEvent: {
|
58
|
+
type: Boolean,
|
59
|
+
default: true
|
60
|
+
},
|
61
|
+
beforeChange: {
|
62
|
+
type: definePropType(Function)
|
63
|
+
},
|
64
|
+
id: String,
|
65
|
+
tabindex: {
|
66
|
+
type: [String, Number]
|
67
|
+
},
|
68
|
+
...useAriaProps(["ariaLabel"])
|
18
69
|
});
|
19
|
-
const
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
const props = __props;
|
25
|
-
const { formItem } = useFormItem();
|
26
|
-
const switchSize = useFormSize();
|
27
|
-
const ns = useNamespace("switch");
|
28
|
-
const { inputId } = useFormItemInputId(props, {
|
29
|
-
formItemContext: formItem
|
30
|
-
});
|
31
|
-
const switchDisabled = useFormDisabled(computed(() => props.loading));
|
32
|
-
const isControlled = ref(props.modelValue !== false);
|
33
|
-
const input = ref();
|
34
|
-
const core = ref();
|
35
|
-
const switchKls = computed(() => [
|
36
|
-
ns.b(),
|
37
|
-
ns.m(switchSize.value),
|
38
|
-
ns.is("disabled", switchDisabled.value),
|
39
|
-
ns.is("checked", checked.value)
|
40
|
-
]);
|
41
|
-
const labelLeftKls = computed(() => [
|
42
|
-
ns.e("label"),
|
43
|
-
ns.em("label", "left"),
|
44
|
-
ns.is("active", !checked.value)
|
45
|
-
]);
|
46
|
-
const labelRightKls = computed(() => [
|
47
|
-
ns.e("label"),
|
48
|
-
ns.em("label", "right"),
|
49
|
-
ns.is("active", checked.value)
|
50
|
-
]);
|
51
|
-
const coreStyle = computed(() => ({
|
52
|
-
width: addUnit(props.width)
|
53
|
-
}));
|
54
|
-
watch(() => props.modelValue, () => {
|
55
|
-
isControlled.value = true;
|
56
|
-
});
|
57
|
-
const actualValue = computed(() => {
|
58
|
-
return isControlled.value ? props.modelValue : false;
|
59
|
-
});
|
60
|
-
const checked = computed(() => actualValue.value === props.activeValue);
|
61
|
-
if (![props.activeValue, props.inactiveValue].includes(actualValue.value)) {
|
62
|
-
emit(UPDATE_MODEL_EVENT, props.inactiveValue);
|
63
|
-
emit(CHANGE_EVENT, props.inactiveValue);
|
64
|
-
emit(INPUT_EVENT, props.inactiveValue);
|
65
|
-
}
|
66
|
-
watch(checked, (val) => {
|
67
|
-
var _a;
|
68
|
-
input.value.checked = val;
|
69
|
-
if (props.validateEvent) {
|
70
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => debugWarn());
|
71
|
-
}
|
72
|
-
});
|
73
|
-
const handleChange = () => {
|
74
|
-
const val = checked.value ? props.inactiveValue : props.activeValue;
|
75
|
-
emit(UPDATE_MODEL_EVENT, val);
|
76
|
-
emit(CHANGE_EVENT, val);
|
77
|
-
emit(INPUT_EVENT, val);
|
78
|
-
nextTick(() => {
|
79
|
-
input.value.checked = checked.value;
|
80
|
-
});
|
81
|
-
};
|
82
|
-
const switchValue = () => {
|
83
|
-
if (switchDisabled.value)
|
84
|
-
return;
|
85
|
-
const { beforeChange } = props;
|
86
|
-
if (!beforeChange) {
|
87
|
-
handleChange();
|
88
|
-
return;
|
89
|
-
}
|
90
|
-
const shouldChange = beforeChange();
|
91
|
-
const isPromiseOrBool = [
|
92
|
-
isPromise(shouldChange),
|
93
|
-
isBoolean(shouldChange)
|
94
|
-
].includes(true);
|
95
|
-
if (!isPromiseOrBool) {
|
96
|
-
throwError(COMPONENT_NAME, "beforeChange must return type `Promise<boolean>` or `boolean`");
|
97
|
-
}
|
98
|
-
if (isPromise(shouldChange)) {
|
99
|
-
shouldChange.then((result) => {
|
100
|
-
if (result) {
|
101
|
-
handleChange();
|
102
|
-
}
|
103
|
-
}).catch((e) => {
|
104
|
-
});
|
105
|
-
} else if (shouldChange) {
|
106
|
-
handleChange();
|
107
|
-
}
|
108
|
-
};
|
109
|
-
const focus = () => {
|
110
|
-
var _a, _b;
|
111
|
-
(_b = (_a = input.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
112
|
-
};
|
113
|
-
onMounted(() => {
|
114
|
-
input.value.checked = checked.value;
|
115
|
-
});
|
116
|
-
expose({
|
117
|
-
focus,
|
118
|
-
checked
|
119
|
-
});
|
120
|
-
return (_ctx, _cache) => {
|
121
|
-
return openBlock(), createElementBlock("div", {
|
122
|
-
class: normalizeClass(unref(switchKls)),
|
123
|
-
onClick: withModifiers(switchValue, ["prevent"])
|
124
|
-
}, [
|
125
|
-
createElementVNode("input", {
|
126
|
-
id: unref(inputId),
|
127
|
-
ref_key: "input",
|
128
|
-
ref: input,
|
129
|
-
class: normalizeClass(unref(ns).e("input")),
|
130
|
-
type: "checkbox",
|
131
|
-
role: "switch",
|
132
|
-
"aria-checked": unref(checked),
|
133
|
-
"aria-disabled": unref(switchDisabled),
|
134
|
-
"aria-label": _ctx.ariaLabel,
|
135
|
-
name: _ctx.name,
|
136
|
-
"true-value": _ctx.activeValue,
|
137
|
-
"false-value": _ctx.inactiveValue,
|
138
|
-
disabled: unref(switchDisabled),
|
139
|
-
tabindex: _ctx.tabindex,
|
140
|
-
onChange: handleChange,
|
141
|
-
onKeydown: withKeys(switchValue, ["enter"])
|
142
|
-
}, null, 42, ["id", "aria-checked", "aria-disabled", "aria-label", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"]),
|
143
|
-
!_ctx.inlinePrompt && (_ctx.inactiveIcon || _ctx.inactiveText) ? (openBlock(), createElementBlock("span", {
|
144
|
-
key: 0,
|
145
|
-
class: normalizeClass(unref(labelLeftKls))
|
146
|
-
}, [
|
147
|
-
_ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
148
|
-
default: withCtx(() => [
|
149
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveIcon)))
|
150
|
-
]),
|
151
|
-
_: 1
|
152
|
-
})) : createCommentVNode("v-if", true),
|
153
|
-
!_ctx.inactiveIcon && _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
|
154
|
-
key: 1,
|
155
|
-
"aria-hidden": unref(checked)
|
156
|
-
}, toDisplayString(_ctx.inactiveText), 9, ["aria-hidden"])) : createCommentVNode("v-if", true)
|
157
|
-
], 2)) : createCommentVNode("v-if", true),
|
158
|
-
createElementVNode("span", {
|
159
|
-
ref_key: "core",
|
160
|
-
ref: core,
|
161
|
-
class: normalizeClass(unref(ns).e("core")),
|
162
|
-
style: normalizeStyle(unref(coreStyle))
|
163
|
-
}, [
|
164
|
-
_ctx.inlinePrompt ? (openBlock(), createElementBlock("div", {
|
165
|
-
key: 0,
|
166
|
-
class: normalizeClass(unref(ns).e("inner"))
|
167
|
-
}, [
|
168
|
-
_ctx.activeIcon || _ctx.inactiveIcon ? (openBlock(), createBlock(unref(ElIcon), {
|
169
|
-
key: 0,
|
170
|
-
class: normalizeClass(unref(ns).is("icon"))
|
171
|
-
}, {
|
172
|
-
default: withCtx(() => [
|
173
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(checked) ? _ctx.activeIcon : _ctx.inactiveIcon)))
|
174
|
-
]),
|
175
|
-
_: 1
|
176
|
-
}, 8, ["class"])) : _ctx.activeText || _ctx.inactiveText ? (openBlock(), createElementBlock("span", {
|
177
|
-
key: 1,
|
178
|
-
class: normalizeClass(unref(ns).is("text")),
|
179
|
-
"aria-hidden": !unref(checked)
|
180
|
-
}, toDisplayString(unref(checked) ? _ctx.activeText : _ctx.inactiveText), 11, ["aria-hidden"])) : createCommentVNode("v-if", true)
|
181
|
-
], 2)) : createCommentVNode("v-if", true),
|
182
|
-
createElementVNode("div", {
|
183
|
-
class: normalizeClass(unref(ns).e("action"))
|
184
|
-
}, [
|
185
|
-
_ctx.loading ? (openBlock(), createBlock(unref(ElIcon), {
|
186
|
-
key: 0,
|
187
|
-
class: normalizeClass(unref(ns).is("loading"))
|
188
|
-
}, {
|
189
|
-
default: withCtx(() => [
|
190
|
-
createVNode(unref(Loading))
|
191
|
-
]),
|
192
|
-
_: 1
|
193
|
-
}, 8, ["class"])) : unref(checked) ? renderSlot(_ctx.$slots, "active-action", { key: 1 }, () => [
|
194
|
-
_ctx.activeActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
195
|
-
default: withCtx(() => [
|
196
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.activeActionIcon)))
|
197
|
-
]),
|
198
|
-
_: 1
|
199
|
-
})) : createCommentVNode("v-if", true)
|
200
|
-
]) : !unref(checked) ? renderSlot(_ctx.$slots, "inactive-action", { key: 2 }, () => [
|
201
|
-
_ctx.inactiveActionIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
202
|
-
default: withCtx(() => [
|
203
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.inactiveActionIcon)))
|
204
|
-
]),
|
205
|
-
_: 1
|
206
|
-
})) : createCommentVNode("v-if", true)
|
207
|
-
]) : createCommentVNode("v-if", true)
|
208
|
-
], 2)
|
209
|
-
], 6),
|
210
|
-
!_ctx.inlinePrompt && (_ctx.activeIcon || _ctx.activeText) ? (openBlock(), createElementBlock("span", {
|
211
|
-
key: 1,
|
212
|
-
class: normalizeClass(unref(labelRightKls))
|
213
|
-
}, [
|
214
|
-
_ctx.activeIcon ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
|
215
|
-
default: withCtx(() => [
|
216
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.activeIcon)))
|
217
|
-
]),
|
218
|
-
_: 1
|
219
|
-
})) : createCommentVNode("v-if", true),
|
220
|
-
!_ctx.activeIcon && _ctx.activeText ? (openBlock(), createElementBlock("span", {
|
221
|
-
key: 1,
|
222
|
-
"aria-hidden": !unref(checked)
|
223
|
-
}, toDisplayString(_ctx.activeText), 9, ["aria-hidden"])) : createCommentVNode("v-if", true)
|
224
|
-
], 2)) : createCommentVNode("v-if", true)
|
225
|
-
], 10, ["onClick"]);
|
226
|
-
};
|
227
|
-
}
|
228
|
-
});
|
229
|
-
var Switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "switch.vue"]]);
|
70
|
+
const switchEmits = {
|
71
|
+
[UPDATE_MODEL_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
72
|
+
[CHANGE_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val),
|
73
|
+
[INPUT_EVENT]: (val) => isBoolean(val) || isString(val) || isNumber(val)
|
74
|
+
};
|
230
75
|
|
231
|
-
export {
|
76
|
+
export { switchEmits, switchProps };
|
232
77
|
//# sourceMappingURL=switch.mjs.map
|