@element-plus/nightly 0.0.20250108 → 0.0.20250109
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.full.js +30 -23
- package/dist/index.full.min.js +12 -12
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +12 -12
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +30 -23
- 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 +190 -0
- package/dist/locale/no.min.js +2 -0
- package/dist/locale/no.min.js.map +1 -0
- package/dist/locale/no.min.mjs +2 -0
- package/dist/locale/no.min.mjs.map +1 -0
- package/dist/locale/no.mjs +182 -0
- 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/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +118 -25
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +25 -118
- 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 +192 -42
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +42 -192
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +77 -56
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +56 -77
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +42 -20
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +20 -42
- package/es/components/card/src/card2.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-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +206 -115
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +115 -206
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/checkbox/index.mjs +4 -4
- package/es/components/checkbox/src/checkbox-button.mjs +1 -1
- package/es/components/checkbox/src/checkbox-group.mjs +29 -71
- package/es/components/checkbox/src/checkbox-group.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox-group2.mjs +71 -29
- package/es/components/checkbox/src/checkbox-group2.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox.mjs +119 -59
- package/es/components/checkbox/src/checkbox.mjs.map +1 -1
- package/es/components/checkbox/src/checkbox2.mjs +59 -119
- package/es/components/checkbox/src/checkbox2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +4 -4
- package/es/components/collapse/src/collapse-item.mjs +90 -18
- package/es/components/collapse/src/collapse-item.mjs.map +1 -1
- package/es/components/collapse/src/collapse-item2.mjs +18 -90
- package/es/components/collapse/src/collapse-item2.mjs.map +1 -1
- package/es/components/collapse/src/collapse.mjs +16 -28
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +28 -16
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +402 -40
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +40 -402
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/color-picker/src/components/predefine.mjs +1 -1
- package/es/components/dialog/src/use-dialog.mjs +2 -0
- package/es/components/dialog/src/use-dialog.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +178 -26
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +26 -178
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +319 -47
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +47 -319
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +232 -64
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +64 -232
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/image-viewer/index.mjs +2 -2
- package/es/components/image-viewer/src/image-viewer.mjs +412 -45
- package/es/components/image-viewer/src/image-viewer.mjs.map +1 -1
- package/es/components/image-viewer/src/image-viewer2.mjs +45 -412
- package/es/components/image-viewer/src/image-viewer2.mjs.map +1 -1
- package/es/components/index.mjs +28 -28
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +431 -102
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +102 -431
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown.mjs +15 -166
- package/es/components/mention/src/mention-dropdown.mjs.map +1 -1
- package/es/components/mention/src/mention-dropdown2.mjs +166 -15
- package/es/components/mention/src/mention-dropdown2.mjs.map +1 -1
- package/es/components/mention/src/mention.mjs +1 -1
- package/es/components/mention/src/mention2.mjs +2 -2
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item-group.mjs +34 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -34
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper.mjs +58 -7
- package/es/components/pagination/src/components/jumper.mjs.map +1 -1
- package/es/components/pagination/src/components/jumper2.mjs +7 -58
- package/es/components/pagination/src/components/jumper2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +35 -17
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +17 -35
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +6 -26
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +26 -6
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +3 -3
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +207 -53
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +53 -207
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +34 -65
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +65 -34
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/result/index.mjs +2 -2
- package/es/components/result/src/result.mjs +62 -28
- package/es/components/result/src/result.mjs.map +1 -1
- package/es/components/result/src/result2.mjs +28 -62
- package/es/components/result/src/result2.mjs.map +1 -1
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/bar.mjs +64 -10
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +10 -64
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +55 -170
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +170 -55
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +4 -4
- package/es/components/skeleton/src/skeleton-item.mjs +17 -22
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +22 -17
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton.mjs +21 -48
- package/es/components/skeleton/src/skeleton.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +48 -21
- package/es/components/skeleton/src/skeleton2.mjs.map +1 -1
- package/es/components/slider/index.mjs +2 -2
- package/es/components/slider/src/slider.mjs +238 -88
- package/es/components/slider/src/slider.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +88 -238
- package/es/components/slider/src/slider2.mjs.map +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/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +7 -95
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +95 -7
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/text/src/text2.mjs +25 -20
- package/es/components/text/src/text2.mjs.map +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/arrow.mjs +37 -21
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +21 -37
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +2 -2
- package/es/components/tooltip-v2/src/tooltip2.mjs +4 -4
- package/es/components/tooltip-v2/src/trigger.mjs +12 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -12
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +2 -2
- package/es/components/tour/src/tour.mjs +153 -68
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +68 -153
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content2.mjs +1 -1
- package/es/components/upload/src/upload-dragger.mjs +47 -10
- package/es/components/upload/src/upload-dragger.mjs.map +1 -1
- package/es/components/upload/src/upload-dragger2.mjs +10 -47
- package/es/components/upload/src/upload-dragger2.mjs.map +1 -1
- package/es/components/watermark/index.mjs +2 -2
- package/es/components/watermark/src/watermark.mjs +27 -210
- package/es/components/watermark/src/watermark.mjs.map +1 -1
- package/es/components/watermark/src/watermark2.mjs +210 -27
- package/es/components/watermark/src/watermark2.mjs.map +1 -1
- package/es/index.mjs +28 -28
- package/es/locale/lang/no.d.ts +179 -0
- package/es/locale/lang/no.mjs +181 -0
- package/es/locale/lang/no.mjs.map +1 -0
- 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 +118 -26
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +26 -118
- 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 +191 -42
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +42 -191
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +77 -59
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +59 -77
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +42 -20
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +20 -42
- package/lib/components/card/src/card2.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-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +206 -115
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +115 -206
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/checkbox/index.js +4 -4
- package/lib/components/checkbox/src/checkbox-button.js +1 -1
- package/lib/components/checkbox/src/checkbox-group.js +30 -71
- package/lib/components/checkbox/src/checkbox-group.js.map +1 -1
- package/lib/components/checkbox/src/checkbox-group2.js +71 -30
- package/lib/components/checkbox/src/checkbox-group2.js.map +1 -1
- package/lib/components/checkbox/src/checkbox.js +119 -60
- package/lib/components/checkbox/src/checkbox.js.map +1 -1
- package/lib/components/checkbox/src/checkbox2.js +60 -119
- package/lib/components/checkbox/src/checkbox2.js.map +1 -1
- package/lib/components/collapse/index.js +4 -4
- package/lib/components/collapse/src/collapse-item.js +90 -18
- package/lib/components/collapse/src/collapse-item.js.map +1 -1
- package/lib/components/collapse/src/collapse-item2.js +18 -90
- package/lib/components/collapse/src/collapse-item2.js.map +1 -1
- package/lib/components/collapse/src/collapse.js +18 -28
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +28 -18
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +400 -40
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +40 -400
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/color-picker/src/components/predefine.js +1 -1
- package/lib/components/dialog/src/use-dialog.js +2 -0
- package/lib/components/dialog/src/use-dialog.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +178 -27
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +27 -178
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +323 -48
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +48 -323
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +231 -64
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +64 -231
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/image-viewer/index.js +2 -2
- package/lib/components/image-viewer/src/image-viewer.js +412 -46
- package/lib/components/image-viewer/src/image-viewer.js.map +1 -1
- package/lib/components/image-viewer/src/image-viewer2.js +46 -412
- package/lib/components/image-viewer/src/image-viewer2.js.map +1 -1
- package/lib/components/index.js +28 -28
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +430 -102
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +102 -430
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown.js +16 -166
- package/lib/components/mention/src/mention-dropdown.js.map +1 -1
- package/lib/components/mention/src/mention-dropdown2.js +166 -16
- package/lib/components/mention/src/mention-dropdown2.js.map +1 -1
- package/lib/components/mention/src/mention.js +1 -1
- package/lib/components/mention/src/mention2.js +2 -2
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item-group.js +34 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -34
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/pagination/src/components/jumper.js +58 -7
- package/lib/components/pagination/src/components/jumper.js.map +1 -1
- package/lib/components/pagination/src/components/jumper2.js +7 -58
- package/lib/components/pagination/src/components/jumper2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +35 -18
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +18 -35
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +6 -26
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +26 -6
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +3 -3
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +207 -53
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +53 -207
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +35 -65
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +65 -35
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/result/index.js +2 -2
- package/lib/components/result/src/result.js +62 -30
- package/lib/components/result/src/result.js.map +1 -1
- package/lib/components/result/src/result2.js +30 -62
- package/lib/components/result/src/result2.js.map +1 -1
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/bar.js +64 -10
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +10 -64
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +56 -170
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +170 -56
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/skeleton/index.js +4 -4
- package/lib/components/skeleton/src/skeleton-item.js +17 -22
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +22 -17
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton.js +21 -48
- package/lib/components/skeleton/src/skeleton.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +48 -21
- package/lib/components/skeleton/src/skeleton2.js.map +1 -1
- package/lib/components/slider/index.js +2 -2
- package/lib/components/slider/src/slider.js +238 -89
- package/lib/components/slider/src/slider.js.map +1 -1
- package/lib/components/slider/src/slider2.js +89 -238
- package/lib/components/slider/src/slider2.js.map +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/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +7 -95
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +95 -7
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/text/src/text2.js +24 -19
- package/lib/components/text/src/text2.js.map +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/arrow.js +37 -22
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +22 -37
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +2 -2
- package/lib/components/tooltip-v2/src/tooltip2.js +4 -4
- package/lib/components/tooltip-v2/src/trigger.js +12 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -12
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +2 -2
- package/lib/components/tour/src/tour.js +152 -68
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +68 -152
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content2.js +1 -1
- package/lib/components/upload/src/upload-dragger.js +47 -11
- package/lib/components/upload/src/upload-dragger.js.map +1 -1
- package/lib/components/upload/src/upload-dragger2.js +11 -47
- package/lib/components/upload/src/upload-dragger2.js.map +1 -1
- package/lib/components/watermark/index.js +2 -2
- package/lib/components/watermark/src/watermark.js +27 -210
- package/lib/components/watermark/src/watermark.js.map +1 -1
- package/lib/components/watermark/src/watermark2.js +210 -27
- package/lib/components/watermark/src/watermark2.js.map +1 -1
- package/lib/index.js +28 -28
- package/lib/locale/lang/no.d.ts +179 -0
- package/lib/locale/lang/no.js +185 -0
- package/lib/locale/lang/no.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
@@ -1,69 +1,38 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
-
import { useId } from '../../../hooks/use-id/index.mjs';
|
7
|
-
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
8
|
-
import { debugWarn } from '../../../utils/error.mjs';
|
9
|
-
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
1
|
+
import { radioEmits } from './radio.mjs';
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
3
|
+
import { useSizeProp } from '../../../hooks/use-size/index.mjs';
|
4
|
+
import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
|
10
5
|
|
11
|
-
const
|
12
|
-
|
6
|
+
const radioGroupProps = buildProps({
|
7
|
+
id: {
|
8
|
+
type: String,
|
9
|
+
default: void 0
|
10
|
+
},
|
11
|
+
size: useSizeProp,
|
12
|
+
disabled: Boolean,
|
13
|
+
modelValue: {
|
14
|
+
type: [String, Number, Boolean],
|
15
|
+
default: void 0
|
16
|
+
},
|
17
|
+
fill: {
|
18
|
+
type: String,
|
19
|
+
default: ""
|
20
|
+
},
|
21
|
+
textColor: {
|
22
|
+
type: String,
|
23
|
+
default: ""
|
24
|
+
},
|
25
|
+
name: {
|
26
|
+
type: String,
|
27
|
+
default: void 0
|
28
|
+
},
|
29
|
+
validateEvent: {
|
30
|
+
type: Boolean,
|
31
|
+
default: true
|
32
|
+
},
|
33
|
+
...useAriaProps(["ariaLabel"])
|
13
34
|
});
|
14
|
-
const
|
15
|
-
...__default__,
|
16
|
-
props: radioGroupProps,
|
17
|
-
emits: radioGroupEmits,
|
18
|
-
setup(__props, { emit }) {
|
19
|
-
const props = __props;
|
20
|
-
const ns = useNamespace("radio");
|
21
|
-
const radioId = useId();
|
22
|
-
const radioGroupRef = ref();
|
23
|
-
const { formItem } = useFormItem();
|
24
|
-
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
25
|
-
formItemContext: formItem
|
26
|
-
});
|
27
|
-
const changeEvent = (value) => {
|
28
|
-
emit(UPDATE_MODEL_EVENT, value);
|
29
|
-
nextTick(() => emit("change", value));
|
30
|
-
};
|
31
|
-
onMounted(() => {
|
32
|
-
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
33
|
-
const firstLabel = radios[0];
|
34
|
-
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
35
|
-
firstLabel.tabIndex = 0;
|
36
|
-
}
|
37
|
-
});
|
38
|
-
const name = computed(() => {
|
39
|
-
return props.name || radioId.value;
|
40
|
-
});
|
41
|
-
provide(radioGroupKey, reactive({
|
42
|
-
...toRefs(props),
|
43
|
-
changeEvent,
|
44
|
-
name
|
45
|
-
}));
|
46
|
-
watch(() => props.modelValue, () => {
|
47
|
-
if (props.validateEvent) {
|
48
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
49
|
-
}
|
50
|
-
});
|
51
|
-
return (_ctx, _cache) => {
|
52
|
-
return openBlock(), createElementBlock("div", {
|
53
|
-
id: unref(groupId),
|
54
|
-
ref_key: "radioGroupRef",
|
55
|
-
ref: radioGroupRef,
|
56
|
-
class: normalizeClass(unref(ns).b("group")),
|
57
|
-
role: "radiogroup",
|
58
|
-
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
59
|
-
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
60
|
-
}, [
|
61
|
-
renderSlot(_ctx.$slots, "default")
|
62
|
-
], 10, ["id", "aria-label", "aria-labelledby"]);
|
63
|
-
};
|
64
|
-
}
|
65
|
-
});
|
66
|
-
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
|
35
|
+
const radioGroupEmits = radioEmits;
|
67
36
|
|
68
|
-
export {
|
37
|
+
export { radioGroupEmits, radioGroupProps };
|
69
38
|
//# sourceMappingURL=radio-group.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radio-group.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.
|
1
|
+
{"version":3,"file":"radio-group.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\nimport type { ExtractPropTypes } from '@vue/runtime-core'\nimport type RadioGroup from './radio-group.vue'\n\nexport const radioGroupProps = buildProps({\n /**\n * @description native `id` attribute\n */\n id: {\n type: String,\n default: undefined,\n },\n /**\n * @description the size of radio buttons or bordered radios\n */\n size: useSizeProp,\n /**\n * @description whether the nesting radios are disabled\n */\n disabled: Boolean,\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description border and background color when button is active\n */\n fill: {\n type: String,\n default: '',\n },\n /**\n * @description font color when button is active\n */\n textColor: {\n type: String,\n default: '',\n },\n /**\n * @description native `name` attribute\n */\n name: {\n type: String,\n default: undefined,\n },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType<typeof RadioGroup>\n"],"names":[],"mappings":";;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AACnC,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,GAAG,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;;;;"}
|
@@ -1,38 +1,69 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import
|
1
|
+
import { defineComponent, ref, onMounted, computed, provide, reactive, toRefs, watch, openBlock, createElementBlock, unref, normalizeClass, renderSlot, nextTick } from 'vue';
|
2
|
+
import { radioGroupProps, radioGroupEmits } from './radio-group.mjs';
|
3
|
+
import { radioGroupKey } from './constants.mjs';
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
6
|
+
import { useId } from '../../../hooks/use-id/index.mjs';
|
7
|
+
import { useFormItem, useFormItemInputId } from '../../form/src/hooks/use-form-item.mjs';
|
8
|
+
import { debugWarn } from '../../../utils/error.mjs';
|
9
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
5
10
|
|
6
|
-
const
|
7
|
-
|
8
|
-
type: String,
|
9
|
-
default: void 0
|
10
|
-
},
|
11
|
-
size: useSizeProp,
|
12
|
-
disabled: Boolean,
|
13
|
-
modelValue: {
|
14
|
-
type: [String, Number, Boolean],
|
15
|
-
default: void 0
|
16
|
-
},
|
17
|
-
fill: {
|
18
|
-
type: String,
|
19
|
-
default: ""
|
20
|
-
},
|
21
|
-
textColor: {
|
22
|
-
type: String,
|
23
|
-
default: ""
|
24
|
-
},
|
25
|
-
name: {
|
26
|
-
type: String,
|
27
|
-
default: void 0
|
28
|
-
},
|
29
|
-
validateEvent: {
|
30
|
-
type: Boolean,
|
31
|
-
default: true
|
32
|
-
},
|
33
|
-
...useAriaProps(["ariaLabel"])
|
11
|
+
const __default__ = defineComponent({
|
12
|
+
name: "ElRadioGroup"
|
34
13
|
});
|
35
|
-
const
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
15
|
+
...__default__,
|
16
|
+
props: radioGroupProps,
|
17
|
+
emits: radioGroupEmits,
|
18
|
+
setup(__props, { emit }) {
|
19
|
+
const props = __props;
|
20
|
+
const ns = useNamespace("radio");
|
21
|
+
const radioId = useId();
|
22
|
+
const radioGroupRef = ref();
|
23
|
+
const { formItem } = useFormItem();
|
24
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
|
25
|
+
formItemContext: formItem
|
26
|
+
});
|
27
|
+
const changeEvent = (value) => {
|
28
|
+
emit(UPDATE_MODEL_EVENT, value);
|
29
|
+
nextTick(() => emit("change", value));
|
30
|
+
};
|
31
|
+
onMounted(() => {
|
32
|
+
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
33
|
+
const firstLabel = radios[0];
|
34
|
+
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
35
|
+
firstLabel.tabIndex = 0;
|
36
|
+
}
|
37
|
+
});
|
38
|
+
const name = computed(() => {
|
39
|
+
return props.name || radioId.value;
|
40
|
+
});
|
41
|
+
provide(radioGroupKey, reactive({
|
42
|
+
...toRefs(props),
|
43
|
+
changeEvent,
|
44
|
+
name
|
45
|
+
}));
|
46
|
+
watch(() => props.modelValue, () => {
|
47
|
+
if (props.validateEvent) {
|
48
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn(err));
|
49
|
+
}
|
50
|
+
});
|
51
|
+
return (_ctx, _cache) => {
|
52
|
+
return openBlock(), createElementBlock("div", {
|
53
|
+
id: unref(groupId),
|
54
|
+
ref_key: "radioGroupRef",
|
55
|
+
ref: radioGroupRef,
|
56
|
+
class: normalizeClass(unref(ns).b("group")),
|
57
|
+
role: "radiogroup",
|
58
|
+
"aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
59
|
+
"aria-labelledby": unref(isLabeledByFormItem) ? unref(formItem).labelId : void 0
|
60
|
+
}, [
|
61
|
+
renderSlot(_ctx.$slots, "default")
|
62
|
+
], 10, ["id", "aria-label", "aria-labelledby"]);
|
63
|
+
};
|
64
|
+
}
|
65
|
+
});
|
66
|
+
var RadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "radio-group.vue"]]);
|
36
67
|
|
37
|
-
export {
|
68
|
+
export { RadioGroup as default };
|
38
69
|
//# sourceMappingURL=radio-group2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radio-group2.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.
|
1
|
+
{"version":3,"file":"radio-group2.mjs","sources":["../../../../../../packages/components/radio/src/radio-group.vue"],"sourcesContent":["<template>\n <div\n :id=\"groupId\"\n ref=\"radioGroupRef\"\n :class=\"ns.b('group')\"\n role=\"radiogroup\"\n :aria-label=\"!isLabeledByFormItem ? ariaLabel || 'radio-group' : undefined\"\n :aria-labelledby=\"isLabeledByFormItem ? formItem!.labelId : undefined\"\n >\n <slot />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport {\n computed,\n nextTick,\n onMounted,\n provide,\n reactive,\n ref,\n toRefs,\n watch,\n} from 'vue'\nimport { useFormItem, useFormItemInputId } from '@element-plus/components/form'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport { radioGroupEmits, radioGroupProps } from './radio-group'\nimport { radioGroupKey } from './constants'\n\nimport type { RadioGroupProps } from './radio-group'\n\ndefineOptions({\n name: 'ElRadioGroup',\n})\n\nconst props = defineProps(radioGroupProps)\nconst emit = defineEmits(radioGroupEmits)\n\nconst ns = useNamespace('radio')\nconst radioId = useId()\nconst radioGroupRef = ref<HTMLDivElement>()\nconst { formItem } = useFormItem()\nconst { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {\n formItemContext: formItem,\n})\n\nconst changeEvent = (value: RadioGroupProps['modelValue']) => {\n emit(UPDATE_MODEL_EVENT, value)\n nextTick(() => emit('change', value))\n}\n\nonMounted(() => {\n const radios =\n radioGroupRef.value!.querySelectorAll<HTMLInputElement>('[type=radio]')\n const firstLabel = radios[0]\n if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {\n firstLabel.tabIndex = 0\n }\n})\n\nconst name = computed(() => {\n return props.name || radioId.value\n})\n\nprovide(\n radioGroupKey,\n reactive({\n ...toRefs(props),\n changeEvent,\n name,\n })\n)\n\nwatch(\n () => props.modelValue,\n () => {\n if (props.validateEvent) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n)\n</script>\n"],"names":["_createElementBlock","_unref","_normalizeClass"],"mappings":";;;;;;;;;;mCAiCc,CAAA;AAAA,EACZ,IAAM,EAAA,cAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,OAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,UAAU,KAAM,EAAA,CAAA;AACtB,IAAA,MAAM,gBAAgB,GAAoB,EAAA,CAAA;AAC1C,IAAM,MAAA,EAAE,QAAS,EAAA,GAAI,WAAY,EAAA,CAAA;AACjC,IAAA,MAAM,EAAE,OAAS,EAAA,OAAA,EAAS,mBAAoB,EAAA,GAAI,mBAAmB,KAAO,EAAA;AAAA,MAC1E,eAAiB,EAAA,QAAA;AAAA,KAClB,CAAA,CAAA;AAED,IAAM,MAAA,WAAA,GAAc,CAAC,KAAyC,KAAA;AAC5D,MAAA,IAAA,CAAK,oBAAoB,KAAK,CAAA,CAAA;AAC9B,MAAA,QAAA,CAAS,MAAM,IAAA,CAAK,QAAU,EAAA,KAAK,CAAC,CAAA,CAAA;AAAA,KACtC,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,MAAM,MACJ,GAAA,aAAA,CAAc,KAAO,CAAA,gBAAA,CAAmC,cAAc,CAAA,CAAA;AACxE,MAAM,MAAA,UAAA,GAAa,OAAO,CAAC,CAAA,CAAA;AAC3B,MAAI,IAAA,CAAC,KAAM,CAAA,IAAA,CAAK,MAAM,CAAA,CAAE,IAAK,CAAA,CAAC,KAAU,KAAA,KAAA,CAAM,OAAO,CAAA,IAAK,UAAY,EAAA;AACpE,QAAA,UAAA,CAAW,QAAW,GAAA,CAAA,CAAA;AAAA,OACxB;AAAA,KACD,CAAA,CAAA;AAED,IAAM,MAAA,IAAA,GAAO,SAAS,MAAM;AAC1B,MAAO,OAAA,KAAA,CAAM,QAAQ,OAAQ,CAAA,KAAA,CAAA;AAAA,KAC9B,CAAA,CAAA;AAED,IAAA,OAAA,CAAA,aAAA,EAAA,QAAA,CAAA;AAAA,MACE,GAAA,MAAA,CAAA,KAAA,CAAA;AAAA,MACA,WAAS;AAAA,MACP,IAAA;AAAe,KACf,CAAA,CAAA,CAAA;AAAA,IACA,KAAA,CAAA,MAAA,KAAA,CAAA,UAAA,EAAA,MAAA;AAAA,MACF,IAAC,KAAA,CAAA,aAAA,EAAA;AAAA,QACH,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,QAAA,CAAA,QAAA,CAAA,CAAA,KAAA,CAAA,CAAA,GAAA,KAAA,SAAA,CAAA,GAAA,CAAA,CAAA,CAAA;AAEA,OAAA;AAAA,KAAA,CACE;AAAY,IAAA,OACN,CAAA,IAAA,EAAA,MAAA,KAAA;AACJ,MAAA,gBAAyB,EAAA,EAAAA,kBAAA,CAAA,KAAA,EAAA;AACvB,QAAU,EAAA,EAAAC,KAAA,CAAA,OAAA,CAAA;AAAgD,QAC5D,OAAA,EAAA,eAAA;AAAA,QACF,GAAA,EAAA,aAAA;AAAA,QACF,KAAA,EAAAC,cAAA,CAAAD,KAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA;;;;;;;;;;;;;;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Result from './src/
|
2
|
-
export { IconComponentMap, IconMap, resultProps } from './src/
|
1
|
+
import Result from './src/result.mjs';
|
2
|
+
export { IconComponentMap, IconMap, resultProps } from './src/result2.mjs';
|
3
3
|
import { withInstall } from '../../utils/vue/install.mjs';
|
4
4
|
|
5
5
|
const ElResult = withInstall(Result);
|
@@ -1,33 +1,67 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, resolveDynamicComponent, createCommentVNode, toDisplayString } from 'vue';
|
2
|
+
import { resultProps, IconMap, IconComponentMap } from './result2.mjs';
|
3
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
3
5
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
6
|
+
const __default__ = defineComponent({
|
7
|
+
name: "ElResult"
|
8
|
+
});
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
10
|
+
...__default__,
|
11
|
+
props: resultProps,
|
12
|
+
setup(__props) {
|
13
|
+
const props = __props;
|
14
|
+
const ns = useNamespace("result");
|
15
|
+
const resultIcon = computed(() => {
|
16
|
+
const icon = props.icon;
|
17
|
+
const iconClass = icon && IconMap[icon] ? IconMap[icon] : "icon-info";
|
18
|
+
const iconComponent = IconComponentMap[iconClass] || IconComponentMap["icon-info"];
|
19
|
+
return {
|
20
|
+
class: iconClass,
|
21
|
+
component: iconComponent
|
22
|
+
};
|
23
|
+
});
|
24
|
+
return (_ctx, _cache) => {
|
25
|
+
return openBlock(), createElementBlock("div", {
|
26
|
+
class: normalizeClass(unref(ns).b())
|
27
|
+
}, [
|
28
|
+
createElementVNode("div", {
|
29
|
+
class: normalizeClass(unref(ns).e("icon"))
|
30
|
+
}, [
|
31
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
32
|
+
unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
|
33
|
+
key: 0,
|
34
|
+
class: normalizeClass(unref(resultIcon).class)
|
35
|
+
}, null, 8, ["class"])) : createCommentVNode("v-if", true)
|
36
|
+
])
|
37
|
+
], 2),
|
38
|
+
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
39
|
+
key: 0,
|
40
|
+
class: normalizeClass(unref(ns).e("title"))
|
41
|
+
}, [
|
42
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
43
|
+
createElementVNode("p", null, toDisplayString(_ctx.title), 1)
|
44
|
+
])
|
45
|
+
], 2)) : createCommentVNode("v-if", true),
|
46
|
+
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
|
47
|
+
key: 1,
|
48
|
+
class: normalizeClass(unref(ns).e("subtitle"))
|
49
|
+
}, [
|
50
|
+
renderSlot(_ctx.$slots, "sub-title", {}, () => [
|
51
|
+
createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
|
52
|
+
])
|
53
|
+
], 2)) : createCommentVNode("v-if", true),
|
54
|
+
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
55
|
+
key: 2,
|
56
|
+
class: normalizeClass(unref(ns).e("extra"))
|
57
|
+
}, [
|
58
|
+
renderSlot(_ctx.$slots, "extra")
|
59
|
+
], 2)) : createCommentVNode("v-if", true)
|
60
|
+
], 2);
|
61
|
+
};
|
29
62
|
}
|
30
63
|
});
|
64
|
+
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "result.vue"]]);
|
31
65
|
|
32
|
-
export {
|
66
|
+
export { Result as default };
|
33
67
|
//# sourceMappingURL=result.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.
|
1
|
+
{"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div :class=\"ns.e('icon')\">\n <slot name=\"icon\">\n <component\n :is=\"resultIcon.component\"\n v-if=\"resultIcon.component\"\n :class=\"resultIcon.class\"\n />\n </slot>\n </div>\n <div v-if=\"title || $slots.title\" :class=\"ns.e('title')\">\n <slot name=\"title\">\n <p>{{ title }}</p>\n </slot>\n </div>\n <div v-if=\"subTitle || $slots['sub-title']\" :class=\"ns.e('subtitle')\">\n <slot name=\"sub-title\">\n <p>{{ subTitle }}</p>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" :class=\"ns.e('extra')\">\n <slot name=\"extra\" />\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useNamespace } from '@element-plus/hooks'\nimport { IconComponentMap, IconMap, resultProps } from './result'\n\ndefineOptions({\n name: 'ElResult',\n})\n\nconst props = defineProps(resultProps)\n\nconst ns = useNamespace('result')\n\nconst resultIcon = computed(() => {\n const icon = props.icon\n const iconClass = icon && IconMap[icon] ? IconMap[icon] : 'icon-info'\n const iconComponent =\n IconComponentMap[iconClass] || IconComponentMap['icon-info']\n\n return {\n class: iconClass,\n component: iconComponent,\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;mCA+Bc,CAAA;AAAA,EACZ,IAAM,EAAA,UAAA;AACR,CAAA,CAAA,CAAA;;;;;;AAIA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAM,MAAA,UAAA,GAAa,SAAS,MAAM;AAChC,MAAA,MAAM,OAAO,KAAM,CAAA,IAAA,CAAA;AACnB,MAAA,MAAM,YAAY,IAAQ,IAAA,OAAA,CAAQ,IAAI,CAAI,GAAA,OAAA,CAAQ,IAAI,CAAI,GAAA,WAAA,CAAA;AAC1D,MAAA,MAAM,aACJ,GAAA,gBAAA,CAAiB,SAAS,CAAA,IAAK,iBAAiB,WAAW,CAAA,CAAA;AAE7D,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,SAAA;AAAA,QACP,SAAW,EAAA,aAAA;AAAA,OACb,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,67 +1,33 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
4
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
1
|
+
import { CircleCheckFilled, WarningFilled, CircleCloseFilled, InfoFilled } from '@element-plus/icons-vue';
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
5
3
|
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
32
|
-
unref(resultIcon).component ? (openBlock(), createBlock(resolveDynamicComponent(unref(resultIcon).component), {
|
33
|
-
key: 0,
|
34
|
-
class: normalizeClass(unref(resultIcon).class)
|
35
|
-
}, null, 8, ["class"])) : createCommentVNode("v-if", true)
|
36
|
-
])
|
37
|
-
], 2),
|
38
|
-
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
39
|
-
key: 0,
|
40
|
-
class: normalizeClass(unref(ns).e("title"))
|
41
|
-
}, [
|
42
|
-
renderSlot(_ctx.$slots, "title", {}, () => [
|
43
|
-
createElementVNode("p", null, toDisplayString(_ctx.title), 1)
|
44
|
-
])
|
45
|
-
], 2)) : createCommentVNode("v-if", true),
|
46
|
-
_ctx.subTitle || _ctx.$slots["sub-title"] ? (openBlock(), createElementBlock("div", {
|
47
|
-
key: 1,
|
48
|
-
class: normalizeClass(unref(ns).e("subtitle"))
|
49
|
-
}, [
|
50
|
-
renderSlot(_ctx.$slots, "sub-title", {}, () => [
|
51
|
-
createElementVNode("p", null, toDisplayString(_ctx.subTitle), 1)
|
52
|
-
])
|
53
|
-
], 2)) : createCommentVNode("v-if", true),
|
54
|
-
_ctx.$slots.extra ? (openBlock(), createElementBlock("div", {
|
55
|
-
key: 2,
|
56
|
-
class: normalizeClass(unref(ns).e("extra"))
|
57
|
-
}, [
|
58
|
-
renderSlot(_ctx.$slots, "extra")
|
59
|
-
], 2)) : createCommentVNode("v-if", true)
|
60
|
-
], 2);
|
61
|
-
};
|
4
|
+
const IconMap = {
|
5
|
+
success: "icon-success",
|
6
|
+
warning: "icon-warning",
|
7
|
+
error: "icon-error",
|
8
|
+
info: "icon-info"
|
9
|
+
};
|
10
|
+
const IconComponentMap = {
|
11
|
+
[IconMap.success]: CircleCheckFilled,
|
12
|
+
[IconMap.warning]: WarningFilled,
|
13
|
+
[IconMap.error]: CircleCloseFilled,
|
14
|
+
[IconMap.info]: InfoFilled
|
15
|
+
};
|
16
|
+
const resultProps = buildProps({
|
17
|
+
title: {
|
18
|
+
type: String,
|
19
|
+
default: ""
|
20
|
+
},
|
21
|
+
subTitle: {
|
22
|
+
type: String,
|
23
|
+
default: ""
|
24
|
+
},
|
25
|
+
icon: {
|
26
|
+
type: String,
|
27
|
+
values: ["success", "warning", "info", "error"],
|
28
|
+
default: "info"
|
62
29
|
}
|
63
30
|
});
|
64
|
-
var Result = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "result.vue"]]);
|
65
31
|
|
66
|
-
export {
|
32
|
+
export { IconComponentMap, IconMap, resultProps };
|
67
33
|
//# sourceMappingURL=result2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"result2.mjs","sources":["../../../../../../packages/components/result/src/result.
|
1
|
+
{"version":3,"file":"result2.mjs","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n typeof IconMap[keyof typeof IconMap],\n Component\n> = {\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultProps = ExtractPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result>\n"],"names":[],"mappings":";;;AAOY,MAAC,OAAO,GAAG;AACvB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,OAAO,EAAE,cAAc;AACzB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,gBAAgB,GAAG;AAChC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,iBAAiB;AACtC,EAAE,CAAC,OAAO,CAAC,OAAO,GAAG,aAAa;AAClC,EAAE,CAAC,OAAO,CAAC,KAAK,GAAG,iBAAiB;AACpC,EAAE,CAAC,OAAO,CAAC,IAAI,GAAG,UAAU;AAC5B,EAAE;AACU,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC;AACnD,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,CAAC;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import Scrollbar from './src/
|
1
|
+
import Scrollbar from './src/scrollbar2.mjs';
|
2
2
|
export { BAR_MAP, GAP, renderThumbStyle } from './src/util.mjs';
|
3
|
-
export { scrollbarEmits, scrollbarProps } from './src/
|
3
|
+
export { scrollbarEmits, scrollbarProps } from './src/scrollbar.mjs';
|
4
4
|
export { thumbProps } from './src/thumb.mjs';
|
5
5
|
export { scrollbarContextKey } from './src/constants.mjs';
|
6
6
|
import { withInstall } from '../../utils/vue/install.mjs';
|
@@ -1,15 +1,69 @@
|
|
1
|
-
import {
|
1
|
+
import { defineComponent, inject, ref, openBlock, createElementBlock, Fragment, createVNode } from 'vue';
|
2
|
+
import { GAP } from './util.mjs';
|
3
|
+
import Thumb from './thumb2.mjs';
|
4
|
+
import { barProps } from './bar2.mjs';
|
5
|
+
import { scrollbarContextKey } from './constants.mjs';
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
2
7
|
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
9
|
+
__name: "bar",
|
10
|
+
props: barProps,
|
11
|
+
setup(__props, { expose }) {
|
12
|
+
const props = __props;
|
13
|
+
const scrollbar = inject(scrollbarContextKey);
|
14
|
+
const moveX = ref(0);
|
15
|
+
const moveY = ref(0);
|
16
|
+
const sizeWidth = ref("");
|
17
|
+
const sizeHeight = ref("");
|
18
|
+
const ratioY = ref(1);
|
19
|
+
const ratioX = ref(1);
|
20
|
+
const handleScroll = (wrap) => {
|
21
|
+
if (wrap) {
|
22
|
+
const offsetHeight = wrap.offsetHeight - GAP;
|
23
|
+
const offsetWidth = wrap.offsetWidth - GAP;
|
24
|
+
moveY.value = wrap.scrollTop * 100 / offsetHeight * ratioY.value;
|
25
|
+
moveX.value = wrap.scrollLeft * 100 / offsetWidth * ratioX.value;
|
26
|
+
}
|
27
|
+
};
|
28
|
+
const update = () => {
|
29
|
+
const wrap = scrollbar == null ? void 0 : scrollbar.wrapElement;
|
30
|
+
if (!wrap)
|
31
|
+
return;
|
32
|
+
const offsetHeight = wrap.offsetHeight - GAP;
|
33
|
+
const offsetWidth = wrap.offsetWidth - GAP;
|
34
|
+
const originalHeight = offsetHeight ** 2 / wrap.scrollHeight;
|
35
|
+
const originalWidth = offsetWidth ** 2 / wrap.scrollWidth;
|
36
|
+
const height = Math.max(originalHeight, props.minSize);
|
37
|
+
const width = Math.max(originalWidth, props.minSize);
|
38
|
+
ratioY.value = originalHeight / (offsetHeight - originalHeight) / (height / (offsetHeight - height));
|
39
|
+
ratioX.value = originalWidth / (offsetWidth - originalWidth) / (width / (offsetWidth - width));
|
40
|
+
sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : "";
|
41
|
+
sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : "";
|
42
|
+
};
|
43
|
+
expose({
|
44
|
+
handleScroll,
|
45
|
+
update
|
46
|
+
});
|
47
|
+
return (_ctx, _cache) => {
|
48
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
49
|
+
createVNode(Thumb, {
|
50
|
+
move: moveX.value,
|
51
|
+
ratio: ratioX.value,
|
52
|
+
size: sizeWidth.value,
|
53
|
+
always: _ctx.always
|
54
|
+
}, null, 8, ["move", "ratio", "size", "always"]),
|
55
|
+
createVNode(Thumb, {
|
56
|
+
move: moveY.value,
|
57
|
+
ratio: ratioY.value,
|
58
|
+
size: sizeHeight.value,
|
59
|
+
vertical: "",
|
60
|
+
always: _ctx.always
|
61
|
+
}, null, 8, ["move", "ratio", "size", "always"])
|
62
|
+
], 64);
|
63
|
+
};
|
11
64
|
}
|
12
65
|
});
|
66
|
+
var Bar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "bar.vue"]]);
|
13
67
|
|
14
|
-
export {
|
68
|
+
export { Bar as default };
|
15
69
|
//# sourceMappingURL=bar.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"bar.mjs","sources":["../../../../../../packages/components/scrollbar/src/bar.
|
1
|
+
{"version":3,"file":"bar.mjs","sources":["../../../../../../packages/components/scrollbar/src/bar.vue"],"sourcesContent":["<template>\n <thumb :move=\"moveX\" :ratio=\"ratioX\" :size=\"sizeWidth\" :always=\"always\" />\n <thumb\n :move=\"moveY\"\n :ratio=\"ratioY\"\n :size=\"sizeHeight\"\n vertical\n :always=\"always\"\n />\n</template>\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport { GAP } from './util'\nimport Thumb from './thumb.vue'\nimport { barProps } from './bar'\nimport { scrollbarContextKey } from './constants'\n\nconst props = defineProps(barProps)\n\nconst scrollbar = inject(scrollbarContextKey)\n\nconst moveX = ref(0)\nconst moveY = ref(0)\nconst sizeWidth = ref('')\nconst sizeHeight = ref('')\nconst ratioY = ref(1)\nconst ratioX = ref(1)\n\nconst handleScroll = (wrap: HTMLDivElement) => {\n if (wrap) {\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n moveY.value = ((wrap.scrollTop * 100) / offsetHeight) * ratioY.value\n moveX.value = ((wrap.scrollLeft * 100) / offsetWidth) * ratioX.value\n }\n}\n\nconst update = () => {\n const wrap = scrollbar?.wrapElement\n if (!wrap) return\n const offsetHeight = wrap.offsetHeight - GAP\n const offsetWidth = wrap.offsetWidth - GAP\n\n const originalHeight = offsetHeight ** 2 / wrap.scrollHeight\n const originalWidth = offsetWidth ** 2 / wrap.scrollWidth\n const height = Math.max(originalHeight, props.minSize)\n const width = Math.max(originalWidth, props.minSize)\n\n ratioY.value =\n originalHeight /\n (offsetHeight - originalHeight) /\n (height / (offsetHeight - height))\n ratioX.value =\n originalWidth /\n (offsetWidth - originalWidth) /\n (width / (offsetWidth - width))\n\n sizeHeight.value = height + GAP < offsetHeight ? `${height}px` : ''\n sizeWidth.value = width + GAP < offsetWidth ? `${width}px` : ''\n}\n\ndefineExpose({\n handleScroll,\n update,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;AAmBA,IAAM,MAAA,SAAA,GAAY,OAAO,mBAAmB,CAAA,CAAA;AAE5C,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,KAAA,GAAQ,IAAI,CAAC,CAAA,CAAA;AACnB,IAAM,MAAA,SAAA,GAAY,IAAI,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,UAAA,GAAa,IAAI,EAAE,CAAA,CAAA;AACzB,IAAM,MAAA,MAAA,GAAS,IAAI,CAAC,CAAA,CAAA;AACpB,IAAM,MAAA,MAAA,GAAS,IAAI,CAAC,CAAA,CAAA;AAEpB,IAAM,MAAA,YAAA,GAAe,CAAC,IAAyB,KAAA;AAC7C,MAAA,IAAI,IAAM,EAAA;AACR,QAAM,MAAA,YAAA,GAAe,KAAK,YAAe,GAAA,GAAA,CAAA;AACzC,QAAM,MAAA,WAAA,GAAc,KAAK,WAAc,GAAA,GAAA,CAAA;AAEvC,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,SAAY,GAAA,GAAA,GAAO,eAAgB,MAAO,CAAA,KAAA,CAAA;AAC/D,QAAA,KAAA,CAAM,KAAU,GAAA,IAAA,CAAK,UAAa,GAAA,GAAA,GAAO,cAAe,MAAO,CAAA,KAAA,CAAA;AAAA,OACjE;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,MAAM,OAAO,SAAW,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,WAAA,CAAA;AACxB,MAAA,IAAI,CAAC,IAAM;AACX,QAAM,OAAA;AACN,MAAM,MAAA,YAAA,OAAmB,CAAc,YAAA,GAAA,GAAA,CAAA;AAEvC,MAAM,MAAA,WAAA,GAAA,IAAiC,CAAA,WAAA,GAAA,GAAA,CAAI;AAC3C,MAAM,MAAA,cAAA,GAA+B,YAAA,IAAA,CAAA,GAAS,IAAA,CAAA,YAAA,CAAA;AAC9C,MAAA,MAAM,aAAS,GAAS,WAAA,IAAA,CAAA,QAAsB,WAAO,CAAA;AACrD,MAAA,MAAM,MAAQ,GAAA,IAAK,CAAI,GAAA,CAAA,cAAe,OAAa,CAAA,OAAA,CAAA,CAAA;AAEnD,MAAA,MAAA,KACE,GAAA,IAAA,CAAA,GAAA,CAAA,aACgB,EAAA,KAAA,CAAA,OAAA,CAAA,CAAA;AAElB,MAAA,MAAA,CAAO,KACL,GAAA,cAAA,IACe,YAAA,GAAA,cAAA,CAAA,UACL,IAAc,YAAA,GAAA,MAAA,CAAA,CAAA,CAAA;AAE1B,MAAA,MAAA,CAAA,qBAA4B,IAAA,WAAqB,GAAA,aAAgB,CAAA,IAAA,KAAA,IAAA,WAAA,GAAA,KAAA,CAAA,CAAA,CAAA;AACjE,MAAA,UAAU,SAAgB,MAAA,GAAA,GAAA,GAAoB,YAAA,GAAG,SAAY,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAAA,MAC/D,SAAA,CAAA,KAAA,GAAA,KAAA,GAAA,GAAA,GAAA,WAAA,GAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA,GAAA,EAAA,CAAA;AAEA,KAAa,CAAA;AAAA,IACX,MAAA,CAAA;AAAA,MACA,YAAA;AAAA,MACD,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
|