@element-plus/nightly 0.0.20250204 → 0.0.20250205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.js +2 -2
- package/dist/index.full.min.js +2 -2
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +2 -2
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +2 -2
- 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/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/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +25 -118
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +118 -25
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +42 -192
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +192 -42
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/autocomplete/index.mjs +2 -2
- package/es/components/autocomplete/src/autocomplete.mjs +367 -79
- package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
- package/es/components/autocomplete/src/autocomplete2.mjs +79 -367
- package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb.mjs +10 -37
- package/es/components/breadcrumb/src/breadcrumb.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb2.mjs +37 -10
- package/es/components/breadcrumb/src/breadcrumb2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +2 -2
- package/es/components/carousel/src/carousel-item.mjs +69 -7
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +7 -69
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/cascader/src/cascader.mjs +1 -1
- package/es/components/dialog/src/dialog-content.mjs +29 -87
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +87 -29
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/index.mjs +16 -16
- package/es/components/input-tag/src/input-tag.mjs +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +142 -68
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +68 -142
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/arrow.mjs +36 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -36
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/radio/index.mjs +4 -4
- package/es/components/radio/src/radio-button.mjs +1 -1
- package/es/components/radio/src/radio-group.mjs +65 -34
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +34 -65
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/radio/src/radio.mjs +73 -32
- package/es/components/radio/src/radio.mjs.map +1 -1
- package/es/components/radio/src/radio2.mjs +32 -73
- package/es/components/radio/src/radio2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/scrollbar.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +33 -167
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +167 -33
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/select/src/select.mjs +1 -1
- package/es/components/select-v2/src/defaults.mjs +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/tag/index.mjs +2 -2
- package/es/components/tag/src/tag.mjs +27 -99
- package/es/components/tag/src/tag.mjs.map +1 -1
- package/es/components/tag/src/tag2.mjs +99 -27
- package/es/components/tag/src/tag2.mjs.map +1 -1
- package/es/components/time-select/index.mjs +2 -2
- package/es/components/time-select/src/time-select.mjs +54 -131
- package/es/components/time-select/src/time-select.mjs.map +1 -1
- package/es/components/time-select/src/time-select2.mjs +131 -54
- package/es/components/time-select/src/time-select2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/tooltip.mjs +19 -77
- package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip2.mjs +77 -19
- package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +1 -1
- 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 +1 -1
- package/es/components/tour/src/tour2.mjs +1 -1
- package/es/directives/click-outside/index.mjs +1 -1
- package/es/hooks/use-focus-controller/index.mjs +1 -1
- package/es/hooks/use-lockscreen/index.mjs +1 -1
- package/es/index.mjs +16 -16
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +26 -118
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +118 -26
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +42 -191
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +191 -42
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/autocomplete/index.js +2 -2
- package/lib/components/autocomplete/src/autocomplete.js +366 -79
- package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
- package/lib/components/autocomplete/src/autocomplete2.js +79 -366
- package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb.js +10 -37
- package/lib/components/breadcrumb/src/breadcrumb.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb2.js +37 -10
- package/lib/components/breadcrumb/src/breadcrumb2.js.map +1 -1
- package/lib/components/carousel/index.js +2 -2
- package/lib/components/carousel/src/carousel-item.js +69 -7
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +7 -69
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/cascader/src/cascader.js +1 -1
- package/lib/components/dialog/src/dialog-content.js +29 -86
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +86 -29
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/index.js +16 -16
- package/lib/components/input-tag/src/input-tag.js +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +141 -69
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +69 -141
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/arrow.js +36 -8
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +8 -36
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/radio/index.js +4 -4
- package/lib/components/radio/src/radio-button.js +1 -1
- package/lib/components/radio/src/radio-group.js +65 -35
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +35 -65
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/radio/src/radio.js +73 -34
- package/lib/components/radio/src/radio.js.map +1 -1
- package/lib/components/radio/src/radio2.js +34 -73
- package/lib/components/radio/src/radio2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/scrollbar.js +170 -56
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +56 -170
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +34 -167
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +167 -34
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/select/src/select.js +1 -1
- package/lib/components/select-v2/src/defaults.js +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/tag/index.js +2 -2
- package/lib/components/tag/src/tag.js +28 -99
- package/lib/components/tag/src/tag.js.map +1 -1
- package/lib/components/tag/src/tag2.js +99 -28
- package/lib/components/tag/src/tag2.js.map +1 -1
- package/lib/components/time-select/index.js +2 -2
- package/lib/components/time-select/src/time-select.js +54 -136
- package/lib/components/time-select/src/time-select.js.map +1 -1
- package/lib/components/time-select/src/time-select2.js +136 -54
- package/lib/components/time-select/src/time-select2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/tooltip.js +19 -77
- package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip2.js +77 -19
- package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger.js +89 -12
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +12 -89
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +1 -1
- 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 +1 -1
- package/lib/components/tour/src/tour2.js +1 -1
- package/lib/directives/click-outside/index.js +1 -1
- package/lib/hooks/use-focus-controller/index.js +1 -1
- package/lib/hooks/use-lockscreen/index.js +1 -1
- package/lib/index.js +16 -16
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -2,178 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var bar = require('./bar2.js');
|
|
8
|
-
var constants = require('./constants.js');
|
|
9
|
-
var scrollbar = require('./scrollbar.js');
|
|
10
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
-
var style = require('../../../utils/dom/style.js');
|
|
13
|
-
var shared = require('@vue/shared');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
6
|
+
var index = require('../../../hooks/use-aria/index.js');
|
|
14
7
|
var types = require('../../../utils/types.js');
|
|
15
|
-
var error = require('../../../utils/error.js');
|
|
16
8
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
const scrollbarProps = runtime.buildProps({
|
|
10
|
+
height: {
|
|
11
|
+
type: [String, Number],
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
maxHeight: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
native: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
22
|
+
wrapStyle: {
|
|
23
|
+
type: runtime.definePropType([String, Object, Array]),
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
wrapClass: {
|
|
27
|
+
type: [String, Array],
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
viewClass: {
|
|
31
|
+
type: [String, Array],
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
viewStyle: {
|
|
35
|
+
type: [String, Array, Object],
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
noresize: Boolean,
|
|
39
|
+
tag: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "div"
|
|
42
|
+
},
|
|
43
|
+
always: Boolean,
|
|
44
|
+
minSize: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 20
|
|
47
|
+
},
|
|
48
|
+
tabindex: {
|
|
49
|
+
type: [String, Number],
|
|
50
|
+
default: void 0
|
|
51
|
+
},
|
|
52
|
+
id: String,
|
|
53
|
+
role: String,
|
|
54
|
+
...index.useAriaProps(["ariaLabel", "ariaOrientation"])
|
|
20
55
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const ns = index.useNamespace("scrollbar");
|
|
28
|
-
let stopResizeObserver = void 0;
|
|
29
|
-
let stopResizeListener = void 0;
|
|
30
|
-
let wrapScrollTop = 0;
|
|
31
|
-
let wrapScrollLeft = 0;
|
|
32
|
-
const scrollbarRef = vue.ref();
|
|
33
|
-
const wrapRef = vue.ref();
|
|
34
|
-
const resizeRef = vue.ref();
|
|
35
|
-
const barRef = vue.ref();
|
|
36
|
-
const wrapStyle = vue.computed(() => {
|
|
37
|
-
const style$1 = {};
|
|
38
|
-
if (props.height)
|
|
39
|
-
style$1.height = style.addUnit(props.height);
|
|
40
|
-
if (props.maxHeight)
|
|
41
|
-
style$1.maxHeight = style.addUnit(props.maxHeight);
|
|
42
|
-
return [props.wrapStyle, style$1];
|
|
43
|
-
});
|
|
44
|
-
const wrapKls = vue.computed(() => {
|
|
45
|
-
return [
|
|
46
|
-
props.wrapClass,
|
|
47
|
-
ns.e("wrap"),
|
|
48
|
-
{ [ns.em("wrap", "hidden-default")]: !props.native }
|
|
49
|
-
];
|
|
50
|
-
});
|
|
51
|
-
const resizeKls = vue.computed(() => {
|
|
52
|
-
return [ns.e("view"), props.viewClass];
|
|
53
|
-
});
|
|
54
|
-
const handleScroll = () => {
|
|
55
|
-
var _a;
|
|
56
|
-
if (wrapRef.value) {
|
|
57
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
58
|
-
wrapScrollTop = wrapRef.value.scrollTop;
|
|
59
|
-
wrapScrollLeft = wrapRef.value.scrollLeft;
|
|
60
|
-
emit("scroll", {
|
|
61
|
-
scrollTop: wrapRef.value.scrollTop,
|
|
62
|
-
scrollLeft: wrapRef.value.scrollLeft
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
function scrollTo(arg1, arg2) {
|
|
67
|
-
if (shared.isObject(arg1)) {
|
|
68
|
-
wrapRef.value.scrollTo(arg1);
|
|
69
|
-
} else if (types.isNumber(arg1) && types.isNumber(arg2)) {
|
|
70
|
-
wrapRef.value.scrollTo(arg1, arg2);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
const setScrollTop = (value) => {
|
|
74
|
-
if (!types.isNumber(value)) {
|
|
75
|
-
error.debugWarn(COMPONENT_NAME, "value must be a number");
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
wrapRef.value.scrollTop = value;
|
|
79
|
-
};
|
|
80
|
-
const setScrollLeft = (value) => {
|
|
81
|
-
if (!types.isNumber(value)) {
|
|
82
|
-
error.debugWarn(COMPONENT_NAME, "value must be a number");
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
wrapRef.value.scrollLeft = value;
|
|
86
|
-
};
|
|
87
|
-
const update = () => {
|
|
88
|
-
var _a;
|
|
89
|
-
(_a = barRef.value) == null ? void 0 : _a.update();
|
|
90
|
-
};
|
|
91
|
-
vue.watch(() => props.noresize, (noresize) => {
|
|
92
|
-
if (noresize) {
|
|
93
|
-
stopResizeObserver == null ? void 0 : stopResizeObserver();
|
|
94
|
-
stopResizeListener == null ? void 0 : stopResizeListener();
|
|
95
|
-
} else {
|
|
96
|
-
({ stop: stopResizeObserver } = core.useResizeObserver(resizeRef, update));
|
|
97
|
-
stopResizeListener = core.useEventListener("resize", update);
|
|
98
|
-
}
|
|
99
|
-
}, { immediate: true });
|
|
100
|
-
vue.watch(() => [props.maxHeight, props.height], () => {
|
|
101
|
-
if (!props.native)
|
|
102
|
-
vue.nextTick(() => {
|
|
103
|
-
var _a;
|
|
104
|
-
update();
|
|
105
|
-
if (wrapRef.value) {
|
|
106
|
-
(_a = barRef.value) == null ? void 0 : _a.handleScroll(wrapRef.value);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
vue.provide(constants.scrollbarContextKey, vue.reactive({
|
|
111
|
-
scrollbarElement: scrollbarRef,
|
|
112
|
-
wrapElement: wrapRef
|
|
113
|
-
}));
|
|
114
|
-
vue.onActivated(() => {
|
|
115
|
-
if (wrapRef.value) {
|
|
116
|
-
wrapRef.value.scrollTop = wrapScrollTop;
|
|
117
|
-
wrapRef.value.scrollLeft = wrapScrollLeft;
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
vue.onMounted(() => {
|
|
121
|
-
if (!props.native)
|
|
122
|
-
vue.nextTick(() => {
|
|
123
|
-
update();
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
vue.onUpdated(() => update());
|
|
127
|
-
expose({
|
|
128
|
-
wrapRef,
|
|
129
|
-
update,
|
|
130
|
-
scrollTo,
|
|
131
|
-
setScrollTop,
|
|
132
|
-
setScrollLeft,
|
|
133
|
-
handleScroll
|
|
134
|
-
});
|
|
135
|
-
return (_ctx, _cache) => {
|
|
136
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
137
|
-
ref_key: "scrollbarRef",
|
|
138
|
-
ref: scrollbarRef,
|
|
139
|
-
class: vue.normalizeClass(vue.unref(ns).b())
|
|
140
|
-
}, [
|
|
141
|
-
vue.createElementVNode("div", {
|
|
142
|
-
ref_key: "wrapRef",
|
|
143
|
-
ref: wrapRef,
|
|
144
|
-
class: vue.normalizeClass(vue.unref(wrapKls)),
|
|
145
|
-
style: vue.normalizeStyle(vue.unref(wrapStyle)),
|
|
146
|
-
tabindex: _ctx.tabindex,
|
|
147
|
-
onScroll: handleScroll
|
|
148
|
-
}, [
|
|
149
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.tag), {
|
|
150
|
-
id: _ctx.id,
|
|
151
|
-
ref_key: "resizeRef",
|
|
152
|
-
ref: resizeRef,
|
|
153
|
-
class: vue.normalizeClass(vue.unref(resizeKls)),
|
|
154
|
-
style: vue.normalizeStyle(_ctx.viewStyle),
|
|
155
|
-
role: _ctx.role,
|
|
156
|
-
"aria-label": _ctx.ariaLabel,
|
|
157
|
-
"aria-orientation": _ctx.ariaOrientation
|
|
158
|
-
}, {
|
|
159
|
-
default: vue.withCtx(() => [
|
|
160
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
161
|
-
]),
|
|
162
|
-
_: 3
|
|
163
|
-
}, 8, ["id", "class", "style", "role", "aria-label", "aria-orientation"]))
|
|
164
|
-
], 46, ["tabindex"]),
|
|
165
|
-
!_ctx.native ? (vue.openBlock(), vue.createBlock(bar["default"], {
|
|
166
|
-
key: 0,
|
|
167
|
-
ref_key: "barRef",
|
|
168
|
-
ref: barRef,
|
|
169
|
-
always: _ctx.always,
|
|
170
|
-
"min-size": _ctx.minSize
|
|
171
|
-
}, null, 8, ["always", "min-size"])) : vue.createCommentVNode("v-if", true)
|
|
172
|
-
], 2);
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
var Scrollbar = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "scrollbar.vue"]]);
|
|
56
|
+
const scrollbarEmits = {
|
|
57
|
+
scroll: ({
|
|
58
|
+
scrollTop,
|
|
59
|
+
scrollLeft
|
|
60
|
+
}) => [scrollTop, scrollLeft].every(types.isNumber)
|
|
61
|
+
};
|
|
177
62
|
|
|
178
|
-
exports
|
|
63
|
+
exports.scrollbarEmits = scrollbarEmits;
|
|
64
|
+
exports.scrollbarProps = scrollbarProps;
|
|
179
65
|
//# sourceMappingURL=scrollbar2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbar2.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.
|
|
1
|
+
{"version":3,"file":"scrollbar2.js","sources":["../../../../../../packages/components/scrollbar/src/scrollbar.ts"],"sourcesContent":["import { buildProps, definePropType, isNumber } from '@element-plus/utils'\nimport { useAriaProps } from '@element-plus/hooks'\nimport type { ExtractPropTypes, StyleValue } from 'vue'\nimport type Scrollbar from './scrollbar.vue'\n\nexport const scrollbarProps = buildProps({\n /**\n * @description height of scrollbar\n */\n height: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description max height of scrollbar\n */\n maxHeight: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description whether to use the native scrollbar\n */\n native: {\n type: Boolean,\n default: false,\n },\n /**\n * @description style of wrap\n */\n wrapStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n default: '',\n },\n /**\n * @description class of wrap\n */\n wrapClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description class of view\n */\n viewClass: {\n type: [String, Array],\n default: '',\n },\n /**\n * @description style of view\n */\n viewStyle: {\n type: [String, Array, Object],\n default: '',\n },\n /**\n * @description do not respond to container size changes, if the container size does not change, it is better to set it to optimize performance\n */\n noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能\n /**\n * @description element tag of the view\n */\n tag: {\n type: String,\n default: 'div',\n },\n /**\n * @description always show\n */\n always: Boolean,\n /**\n * @description minimum size of scrollbar\n */\n minSize: {\n type: Number,\n default: 20,\n },\n /**\n * @description Wrap tabindex\n */\n tabindex: {\n type: [String, Number],\n default: undefined,\n },\n /**\n * @description id of view\n */\n id: String,\n /**\n * @description role of view\n */\n role: String,\n ...useAriaProps(['ariaLabel', 'ariaOrientation']),\n} as const)\nexport type ScrollbarProps = ExtractPropTypes<typeof scrollbarProps>\n\nexport const scrollbarEmits = {\n scroll: ({\n scrollTop,\n scrollLeft,\n }: {\n scrollTop: number\n scrollLeft: number\n }) => [scrollTop, scrollLeft].every(isNumber),\n}\nexport type ScrollbarEmits = typeof scrollbarEmits\n\nexport type ScrollbarInstance = InstanceType<typeof Scrollbar>\n"],"names":["buildProps","definePropType","useAriaProps","isNumber"],"mappings":";;;;;;;;AAEY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AACjD,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AACzB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AACzB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;AACjC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,GAAGC,kBAAY,CAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC;AACnD,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,MAAM,EAAE,CAAC;AACX,IAAI,SAAS;AACb,IAAI,UAAU;AACd,GAAG,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,KAAK,CAACC,cAAQ,CAAC;AAC/C;;;;;"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var segmented$1 = require('./src/
|
|
6
|
-
var segmented = require('./src/
|
|
5
|
+
var segmented$1 = require('./src/segmented2.js');
|
|
6
|
+
var segmented = require('./src/segmented.js');
|
|
7
7
|
var install = require('../../utils/vue/install.js');
|
|
8
8
|
|
|
9
9
|
const ElSegmented = install.withInstall(segmented$1["default"]);
|
|
@@ -2,175 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
10
|
-
var index$1 = require('../../../hooks/use-id/index.js');
|
|
11
|
-
var useFormCommonProps = require('../../form/src/hooks/use-form-common-props.js');
|
|
12
|
-
var useFormItem = require('../../form/src/hooks/use-form-item.js');
|
|
13
|
-
var shared = require('@vue/shared');
|
|
14
|
-
var error = require('../../../utils/error.js');
|
|
5
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
6
|
+
var index = require('../../../hooks/use-size/index.js');
|
|
7
|
+
var index$1 = require('../../../hooks/use-aria/index.js');
|
|
15
8
|
var event = require('../../../constants/event.js');
|
|
9
|
+
var shared = require('@vue/shared');
|
|
10
|
+
var types = require('../../../utils/types.js');
|
|
16
11
|
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
translateX: 0,
|
|
41
|
-
translateY: 0,
|
|
42
|
-
focusVisible: false
|
|
43
|
-
});
|
|
44
|
-
const handleChange = (item) => {
|
|
45
|
-
const value = getValue(item);
|
|
46
|
-
emit(event.UPDATE_MODEL_EVENT, value);
|
|
47
|
-
emit(event.CHANGE_EVENT, value);
|
|
48
|
-
};
|
|
49
|
-
const getValue = (item) => {
|
|
50
|
-
return shared.isObject(item) ? item.value : item;
|
|
51
|
-
};
|
|
52
|
-
const getLabel = (item) => {
|
|
53
|
-
return shared.isObject(item) ? item.label : item;
|
|
54
|
-
};
|
|
55
|
-
const getDisabled = (item) => {
|
|
56
|
-
return !!(_disabled.value || (shared.isObject(item) ? item.disabled : false));
|
|
57
|
-
};
|
|
58
|
-
const getSelected = (item) => {
|
|
59
|
-
return props.modelValue === getValue(item);
|
|
60
|
-
};
|
|
61
|
-
const getOption = (value) => {
|
|
62
|
-
return props.options.find((item) => getValue(item) === value);
|
|
63
|
-
};
|
|
64
|
-
const getItemCls = (item) => {
|
|
65
|
-
return [
|
|
66
|
-
ns.e("item"),
|
|
67
|
-
ns.is("selected", getSelected(item)),
|
|
68
|
-
ns.is("disabled", getDisabled(item))
|
|
69
|
-
];
|
|
70
|
-
};
|
|
71
|
-
const updateSelect = () => {
|
|
72
|
-
if (!segmentedRef.value)
|
|
73
|
-
return;
|
|
74
|
-
const selectedItem = segmentedRef.value.querySelector(".is-selected");
|
|
75
|
-
const selectedItemInput = segmentedRef.value.querySelector(".is-selected input");
|
|
76
|
-
if (!selectedItem || !selectedItemInput) {
|
|
77
|
-
state.width = 0;
|
|
78
|
-
state.height = 0;
|
|
79
|
-
state.translateX = 0;
|
|
80
|
-
state.translateY = 0;
|
|
81
|
-
state.focusVisible = false;
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const rect = selectedItem.getBoundingClientRect();
|
|
85
|
-
state.isInit = true;
|
|
86
|
-
if (props.direction === "vertical") {
|
|
87
|
-
state.height = rect.height;
|
|
88
|
-
state.translateY = selectedItem.offsetTop;
|
|
89
|
-
} else {
|
|
90
|
-
state.width = rect.width;
|
|
91
|
-
state.translateX = selectedItem.offsetLeft;
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
state.focusVisible = selectedItemInput.matches(":focus-visible");
|
|
95
|
-
} catch (e) {
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const segmentedCls = vue.computed(() => [
|
|
99
|
-
ns.b(),
|
|
100
|
-
ns.m(segmentedSize.value),
|
|
101
|
-
ns.is("block", props.block)
|
|
102
|
-
]);
|
|
103
|
-
const selectedStyle = vue.computed(() => ({
|
|
104
|
-
width: props.direction === "vertical" ? "100%" : `${state.width}px`,
|
|
105
|
-
height: props.direction === "vertical" ? `${state.height}px` : "100%",
|
|
106
|
-
transform: props.direction === "vertical" ? `translateY(${state.translateY}px)` : `translateX(${state.translateX}px)`,
|
|
107
|
-
display: state.isInit ? "block" : "none"
|
|
108
|
-
}));
|
|
109
|
-
const selectedCls = vue.computed(() => [
|
|
110
|
-
ns.e("item-selected"),
|
|
111
|
-
ns.is("disabled", getDisabled(getOption(props.modelValue))),
|
|
112
|
-
ns.is("focus-visible", state.focusVisible)
|
|
113
|
-
]);
|
|
114
|
-
const name = vue.computed(() => {
|
|
115
|
-
return props.name || segmentedId.value;
|
|
116
|
-
});
|
|
117
|
-
core.useResizeObserver(segmentedRef, updateSelect);
|
|
118
|
-
vue.watch(activeElement, updateSelect);
|
|
119
|
-
vue.watch(() => props.modelValue, () => {
|
|
120
|
-
var _a;
|
|
121
|
-
updateSelect();
|
|
122
|
-
if (props.validateEvent) {
|
|
123
|
-
(_a = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a.call(formItem, "change").catch((err) => error.debugWarn(err));
|
|
124
|
-
}
|
|
125
|
-
}, {
|
|
126
|
-
flush: "post"
|
|
127
|
-
});
|
|
128
|
-
return (_ctx, _cache) => {
|
|
129
|
-
return _ctx.options.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
130
|
-
key: 0,
|
|
131
|
-
id: vue.unref(inputId),
|
|
132
|
-
ref_key: "segmentedRef",
|
|
133
|
-
ref: segmentedRef,
|
|
134
|
-
class: vue.normalizeClass(vue.unref(segmentedCls)),
|
|
135
|
-
role: "radiogroup",
|
|
136
|
-
"aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.ariaLabel || "segmented" : void 0,
|
|
137
|
-
"aria-labelledby": vue.unref(isLabeledByFormItem) ? vue.unref(formItem).labelId : void 0
|
|
138
|
-
}, [
|
|
139
|
-
vue.createElementVNode("div", {
|
|
140
|
-
class: vue.normalizeClass([vue.unref(ns).e("group"), vue.unref(ns).m(props.direction)])
|
|
141
|
-
}, [
|
|
142
|
-
vue.createElementVNode("div", {
|
|
143
|
-
style: vue.normalizeStyle(vue.unref(selectedStyle)),
|
|
144
|
-
class: vue.normalizeClass(vue.unref(selectedCls))
|
|
145
|
-
}, null, 6),
|
|
146
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (item, index) => {
|
|
147
|
-
return vue.openBlock(), vue.createElementBlock("label", {
|
|
148
|
-
key: index,
|
|
149
|
-
class: vue.normalizeClass(getItemCls(item))
|
|
150
|
-
}, [
|
|
151
|
-
vue.createElementVNode("input", {
|
|
152
|
-
class: vue.normalizeClass(vue.unref(ns).e("item-input")),
|
|
153
|
-
type: "radio",
|
|
154
|
-
name: vue.unref(name),
|
|
155
|
-
disabled: getDisabled(item),
|
|
156
|
-
checked: getSelected(item),
|
|
157
|
-
onChange: ($event) => handleChange(item)
|
|
158
|
-
}, null, 42, ["name", "disabled", "checked", "onChange"]),
|
|
159
|
-
vue.createElementVNode("div", {
|
|
160
|
-
class: vue.normalizeClass(vue.unref(ns).e("item-label"))
|
|
161
|
-
}, [
|
|
162
|
-
vue.renderSlot(_ctx.$slots, "default", { item }, () => [
|
|
163
|
-
vue.createTextVNode(vue.toDisplayString(getLabel(item)), 1)
|
|
164
|
-
])
|
|
165
|
-
], 2)
|
|
166
|
-
], 2);
|
|
167
|
-
}), 128))
|
|
168
|
-
], 2)
|
|
169
|
-
], 10, ["id", "aria-label", "aria-labelledby"])) : vue.createCommentVNode("v-if", true);
|
|
170
|
-
};
|
|
171
|
-
}
|
|
12
|
+
const segmentedProps = runtime.buildProps({
|
|
13
|
+
direction: {
|
|
14
|
+
type: runtime.definePropType(String),
|
|
15
|
+
default: "horizontal"
|
|
16
|
+
},
|
|
17
|
+
options: {
|
|
18
|
+
type: runtime.definePropType(Array),
|
|
19
|
+
default: () => []
|
|
20
|
+
},
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: [String, Number, Boolean],
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
block: Boolean,
|
|
26
|
+
size: index.useSizeProp,
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
validateEvent: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true
|
|
31
|
+
},
|
|
32
|
+
id: String,
|
|
33
|
+
name: String,
|
|
34
|
+
...index$1.useAriaProps(["ariaLabel"])
|
|
172
35
|
});
|
|
173
|
-
|
|
36
|
+
const segmentedEmits = {
|
|
37
|
+
[event.UPDATE_MODEL_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val),
|
|
38
|
+
[event.CHANGE_EVENT]: (val) => shared.isString(val) || types.isNumber(val) || types.isBoolean(val)
|
|
39
|
+
};
|
|
174
40
|
|
|
175
|
-
exports
|
|
41
|
+
exports.segmentedEmits = segmentedEmits;
|
|
42
|
+
exports.segmentedProps = segmentedProps;
|
|
176
43
|
//# sourceMappingURL=segmented.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented.js","sources":["../../../../../../packages/components/segmented/src/segmented.
|
|
1
|
+
{"version":3,"file":"segmented.js","sources":["../../../../../../packages/components/segmented/src/segmented.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n isString,\n} from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { Option } from './types'\nimport type { ExtractPropTypes } from 'vue'\nimport type Segmented from './segmented.vue'\n\nexport const segmentedProps = buildProps({\n direction: {\n type: definePropType<'vertical' | 'horizontal'>(String),\n default: 'horizontal',\n },\n /**\n * @description options of segmented\n */\n options: {\n type: definePropType<Option[]>(Array),\n default: () => [],\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description fit width of parent content\n */\n block: Boolean,\n /**\n * @description size of component\n */\n size: useSizeProp,\n /**\n * @description whether segmented is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description native input id\n */\n id: String,\n /**\n * @description native `name` attribute\n */\n name: String,\n ...useAriaProps(['ariaLabel']),\n})\n\nexport type SegmentedProps = ExtractPropTypes<typeof segmentedProps>\n\nexport const segmentedEmits = {\n [UPDATE_MODEL_EVENT]: (val: any) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: any) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\nexport type SegmentedEmits = typeof segmentedEmits\n\nexport type SegmentedInstance = InstanceType<typeof Segmented>\n"],"names":["buildProps","definePropType","useSizeProp","useAriaProps","UPDATE_MODEL_EVENT","isString","isNumber","isBoolean","CHANGE_EVENT"],"mappings":";;;;;;;;;;;AASY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,YAAY;AACzB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,EAAE;AACrB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAEC,iBAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,EAAE,EAAE,MAAM;AACZ,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,GAAGC,oBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,CAACC,wBAAkB,GAAG,CAAC,GAAG,KAAKC,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AACjF,EAAE,CAACC,kBAAY,GAAG,CAAC,GAAG,KAAKH,eAAQ,CAAC,GAAG,CAAC,IAAIC,cAAQ,CAAC,GAAG,CAAC,IAAIC,eAAS,CAAC,GAAG,CAAC;AAC3E;;;;;"}
|