@element-plus/nightly 0.0.20251119 → 0.0.20251120
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 +17 -5
- package/dist/index.full.min.js +8 -8
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +17 -5
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +24 -129
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +129 -24
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +40 -96
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +96 -40
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/anchor/index.mjs +2 -2
- package/es/components/anchor/src/anchor.mjs +40 -207
- package/es/components/anchor/src/anchor.mjs.map +1 -1
- package/es/components/anchor/src/anchor2.mjs +207 -40
- package/es/components/anchor/src/anchor2.mjs.map +1 -1
- package/es/components/avatar/index.mjs +2 -2
- package/es/components/avatar/src/avatar.mjs +31 -65
- package/es/components/avatar/src/avatar.mjs.map +1 -1
- package/es/components/avatar/src/avatar2.mjs +65 -31
- package/es/components/avatar/src/avatar2.mjs.map +1 -1
- package/es/components/backtop/index.mjs +2 -2
- package/es/components/backtop/src/backtop.mjs +21 -53
- package/es/components/backtop/src/backtop.mjs.map +1 -1
- package/es/components/backtop/src/backtop2.mjs +53 -21
- package/es/components/backtop/src/backtop2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +31 -89
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +89 -31
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +14 -37
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +37 -14
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.mjs +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +69 -234
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +234 -69
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +12 -12
- 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/mention2.mjs +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +97 -16
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +16 -97
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +135 -50
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +50 -135
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/radio/index.mjs +2 -2
- package/es/components/radio/src/radio-group.mjs +51 -86
- package/es/components/radio/src/radio-group.mjs.map +1 -1
- package/es/components/radio/src/radio-group2.mjs +86 -51
- package/es/components/radio/src/radio-group2.mjs.map +1 -1
- package/es/components/select/src/useSelect.mjs +8 -2
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.mjs +7 -1
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/switch/index.mjs +2 -2
- package/es/components/switch/src/switch.mjs +225 -72
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch2.mjs +72 -225
- package/es/components/switch/src/switch2.mjs.map +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +16 -81
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +81 -16
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/index.mjs +12 -12
- 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 +25 -129
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +129 -25
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +41 -95
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +95 -41
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/anchor/index.js +2 -2
- package/lib/components/anchor/src/anchor.js +40 -206
- package/lib/components/anchor/src/anchor.js.map +1 -1
- package/lib/components/anchor/src/anchor2.js +206 -40
- package/lib/components/anchor/src/anchor2.js.map +1 -1
- package/lib/components/avatar/index.js +2 -2
- package/lib/components/avatar/src/avatar.js +32 -65
- package/lib/components/avatar/src/avatar.js.map +1 -1
- package/lib/components/avatar/src/avatar2.js +65 -32
- package/lib/components/avatar/src/avatar2.js.map +1 -1
- package/lib/components/backtop/index.js +2 -2
- package/lib/components/backtop/src/backtop.js +22 -53
- package/lib/components/backtop/src/backtop.js.map +1 -1
- package/lib/components/backtop/src/backtop2.js +53 -22
- package/lib/components/backtop/src/backtop2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +35 -89
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +89 -35
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +15 -37
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +37 -15
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.js +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +69 -233
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +233 -69
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +12 -12
- 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/mention2.js +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +97 -17
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +17 -97
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +135 -51
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +51 -135
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/radio/index.js +2 -2
- package/lib/components/radio/src/radio-group.js +53 -86
- package/lib/components/radio/src/radio-group.js.map +1 -1
- package/lib/components/radio/src/radio-group2.js +86 -53
- package/lib/components/radio/src/radio-group2.js.map +1 -1
- package/lib/components/select/src/useSelect.js +8 -2
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.js +7 -1
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/switch/src/switch.js +224 -72
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch2.js +72 -224
- package/lib/components/switch/src/switch2.js.map +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +16 -81
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +81 -16
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/index.js +12 -12
- 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
|
@@ -2,142 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var index = require('../../../hooks/use-locale/index.js');
|
|
12
|
-
var index$1 = require('../../../hooks/use-namespace/index.js');
|
|
13
|
-
var style = require('../../../utils/dom/style.js');
|
|
5
|
+
var iconsVue = require('@element-plus/icons-vue');
|
|
6
|
+
var button = require('../../button/src/button.js');
|
|
7
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
8
|
+
var icon = require('../../../utils/vue/icon.js');
|
|
9
|
+
var content = require('../../tooltip/src/content.js');
|
|
10
|
+
var trigger = require('../../tooltip/src/trigger.js');
|
|
14
11
|
|
|
15
|
-
const
|
|
16
|
-
|
|
12
|
+
const popconfirmProps = runtime.buildProps({
|
|
13
|
+
title: String,
|
|
14
|
+
confirmButtonText: String,
|
|
15
|
+
cancelButtonText: String,
|
|
16
|
+
confirmButtonType: {
|
|
17
|
+
type: String,
|
|
18
|
+
values: button.buttonTypes,
|
|
19
|
+
default: "primary"
|
|
20
|
+
},
|
|
21
|
+
cancelButtonType: {
|
|
22
|
+
type: String,
|
|
23
|
+
values: button.buttonTypes,
|
|
24
|
+
default: "text"
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: icon.iconPropType,
|
|
28
|
+
default: () => iconsVue.QuestionFilled
|
|
29
|
+
},
|
|
30
|
+
iconColor: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "#f90"
|
|
33
|
+
},
|
|
34
|
+
hideIcon: Boolean,
|
|
35
|
+
hideAfter: {
|
|
36
|
+
type: Number,
|
|
37
|
+
default: 200
|
|
38
|
+
},
|
|
39
|
+
effect: {
|
|
40
|
+
...content.useTooltipContentProps.effect,
|
|
41
|
+
default: "light"
|
|
42
|
+
},
|
|
43
|
+
teleported: content.useTooltipContentProps.teleported,
|
|
44
|
+
persistent: content.useTooltipContentProps.persistent,
|
|
45
|
+
width: {
|
|
46
|
+
type: [String, Number],
|
|
47
|
+
default: 150
|
|
48
|
+
},
|
|
49
|
+
virtualTriggering: trigger.useTooltipTriggerProps.virtualTriggering,
|
|
50
|
+
virtualRef: trigger.useTooltipTriggerProps.virtualRef
|
|
17
51
|
});
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
setup(__props, { expose, emit }) {
|
|
23
|
-
const props = __props;
|
|
24
|
-
const { t } = index.useLocale();
|
|
25
|
-
const ns = index$1.useNamespace("popconfirm");
|
|
26
|
-
const tooltipRef = vue.ref();
|
|
27
|
-
const rootRef = vue.ref();
|
|
28
|
-
const popperRef = vue.computed(() => {
|
|
29
|
-
var _a;
|
|
30
|
-
return (_a = vue.unref(tooltipRef)) == null ? void 0 : _a.popperRef;
|
|
31
|
-
});
|
|
32
|
-
const showPopper = () => {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
(_b = (_a = rootRef.value) == null ? void 0 : _a.focus) == null ? void 0 : _b.call(_a);
|
|
35
|
-
};
|
|
36
|
-
const hidePopper = () => {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
(_b = (_a = tooltipRef.value) == null ? void 0 : _a.onClose) == null ? void 0 : _b.call(_a);
|
|
39
|
-
};
|
|
40
|
-
const style$1 = vue.computed(() => {
|
|
41
|
-
return {
|
|
42
|
-
width: style.addUnit(props.width)
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
const confirm = (e) => {
|
|
46
|
-
emit("confirm", e);
|
|
47
|
-
hidePopper();
|
|
48
|
-
};
|
|
49
|
-
const cancel = (e) => {
|
|
50
|
-
emit("cancel", e);
|
|
51
|
-
hidePopper();
|
|
52
|
-
};
|
|
53
|
-
const finalConfirmButtonText = vue.computed(() => props.confirmButtonText || t("el.popconfirm.confirmButtonText"));
|
|
54
|
-
const finalCancelButtonText = vue.computed(() => props.cancelButtonText || t("el.popconfirm.cancelButtonText"));
|
|
55
|
-
expose({
|
|
56
|
-
popperRef,
|
|
57
|
-
hide: hidePopper
|
|
58
|
-
});
|
|
59
|
-
return (_ctx, _cache) => {
|
|
60
|
-
return vue.openBlock(), vue.createBlock(vue.unref(index$2.ElTooltip), vue.mergeProps({
|
|
61
|
-
ref_key: "tooltipRef",
|
|
62
|
-
ref: tooltipRef,
|
|
63
|
-
trigger: "click",
|
|
64
|
-
effect: _ctx.effect
|
|
65
|
-
}, _ctx.$attrs, {
|
|
66
|
-
"virtual-triggering": _ctx.virtualTriggering,
|
|
67
|
-
"virtual-ref": _ctx.virtualRef,
|
|
68
|
-
"popper-class": `${vue.unref(ns).namespace.value}-popover`,
|
|
69
|
-
"popper-style": vue.unref(style$1),
|
|
70
|
-
teleported: _ctx.teleported,
|
|
71
|
-
"fallback-placements": ["bottom", "top", "right", "left"],
|
|
72
|
-
"hide-after": _ctx.hideAfter,
|
|
73
|
-
persistent: _ctx.persistent,
|
|
74
|
-
loop: "",
|
|
75
|
-
onShow: showPopper
|
|
76
|
-
}), {
|
|
77
|
-
content: vue.withCtx(() => [
|
|
78
|
-
vue.createElementVNode("div", {
|
|
79
|
-
ref_key: "rootRef",
|
|
80
|
-
ref: rootRef,
|
|
81
|
-
tabindex: "-1",
|
|
82
|
-
class: vue.normalizeClass(vue.unref(ns).b())
|
|
83
|
-
}, [
|
|
84
|
-
vue.createElementVNode("div", {
|
|
85
|
-
class: vue.normalizeClass(vue.unref(ns).e("main"))
|
|
86
|
-
}, [
|
|
87
|
-
!_ctx.hideIcon && _ctx.icon ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.ElIcon), {
|
|
88
|
-
key: 0,
|
|
89
|
-
class: vue.normalizeClass(vue.unref(ns).e("icon")),
|
|
90
|
-
style: vue.normalizeStyle({ color: _ctx.iconColor })
|
|
91
|
-
}, {
|
|
92
|
-
default: vue.withCtx(() => [
|
|
93
|
-
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.icon)))
|
|
94
|
-
]),
|
|
95
|
-
_: 1
|
|
96
|
-
}, 8, ["class", "style"])) : vue.createCommentVNode("v-if", true),
|
|
97
|
-
vue.createTextVNode(" " + vue.toDisplayString(_ctx.title), 1)
|
|
98
|
-
], 2),
|
|
99
|
-
vue.createElementVNode("div", {
|
|
100
|
-
class: vue.normalizeClass(vue.unref(ns).e("action"))
|
|
101
|
-
}, [
|
|
102
|
-
vue.renderSlot(_ctx.$slots, "actions", {
|
|
103
|
-
confirm,
|
|
104
|
-
cancel
|
|
105
|
-
}, () => [
|
|
106
|
-
vue.createVNode(vue.unref(index$4.ElButton), {
|
|
107
|
-
size: "small",
|
|
108
|
-
type: _ctx.cancelButtonType === "text" ? "" : _ctx.cancelButtonType,
|
|
109
|
-
text: _ctx.cancelButtonType === "text",
|
|
110
|
-
onClick: cancel
|
|
111
|
-
}, {
|
|
112
|
-
default: vue.withCtx(() => [
|
|
113
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(finalCancelButtonText)), 1)
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
}, 8, ["type", "text"]),
|
|
117
|
-
vue.createVNode(vue.unref(index$4.ElButton), {
|
|
118
|
-
size: "small",
|
|
119
|
-
type: _ctx.confirmButtonType === "text" ? "" : _ctx.confirmButtonType,
|
|
120
|
-
text: _ctx.confirmButtonType === "text",
|
|
121
|
-
onClick: confirm
|
|
122
|
-
}, {
|
|
123
|
-
default: vue.withCtx(() => [
|
|
124
|
-
vue.createTextVNode(vue.toDisplayString(vue.unref(finalConfirmButtonText)), 1)
|
|
125
|
-
]),
|
|
126
|
-
_: 1
|
|
127
|
-
}, 8, ["type", "text"])
|
|
128
|
-
])
|
|
129
|
-
], 2)
|
|
130
|
-
], 2)
|
|
131
|
-
]),
|
|
132
|
-
default: vue.withCtx(() => [
|
|
133
|
-
_ctx.$slots.reference ? vue.renderSlot(_ctx.$slots, "reference", { key: 0 }) : vue.createCommentVNode("v-if", true)
|
|
134
|
-
]),
|
|
135
|
-
_: 3
|
|
136
|
-
}, 16, ["effect", "virtual-triggering", "virtual-ref", "popper-class", "popper-style", "teleported", "hide-after", "persistent"]);
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
var Popconfirm = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "popconfirm.vue"]]);
|
|
52
|
+
const popconfirmEmits = {
|
|
53
|
+
confirm: (e) => e instanceof MouseEvent,
|
|
54
|
+
cancel: (e) => e instanceof MouseEvent
|
|
55
|
+
};
|
|
141
56
|
|
|
142
|
-
exports
|
|
57
|
+
exports.popconfirmEmits = popconfirmEmits;
|
|
58
|
+
exports.popconfirmProps = popconfirmProps;
|
|
143
59
|
//# sourceMappingURL=popconfirm2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popconfirm2.js","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.
|
|
1
|
+
{"version":3,"file":"popconfirm2.js","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonTypes } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, iconPropType } from '@element-plus/utils'\nimport {\n useTooltipContentProps,\n useTooltipTriggerProps,\n} from '@element-plus/components/tooltip'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\nimport type Popconfirm from './popconfirm.vue'\n\nexport const popconfirmProps = buildProps({\n /**\n * @description Title\n */\n title: String,\n /**\n * @description Confirm button text\n */\n confirmButtonText: String,\n /**\n * @description Cancel button text\n */\n cancelButtonText: String,\n /**\n * @description Confirm button type\n */\n confirmButtonType: {\n type: String,\n values: buttonTypes,\n default: 'primary',\n },\n /**\n * @description Cancel button type\n */\n cancelButtonType: {\n type: String,\n values: buttonTypes,\n default: 'text',\n },\n /**\n * @description Icon Component\n */\n icon: {\n type: iconPropType,\n default: () => QuestionFilled,\n },\n /**\n * @description Icon color\n */\n iconColor: {\n type: String,\n default: '#f90',\n },\n /**\n * @description is hide Icon\n */\n hideIcon: Boolean,\n /**\n * @description delay of disappear, in millisecond\n */\n hideAfter: {\n type: Number,\n default: 200,\n },\n /**\n * @description Tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n ...useTooltipContentProps.effect,\n default: 'light',\n },\n /**\n * @description whether popconfirm is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed\n */\n persistent: useTooltipContentProps.persistent,\n /**\n * @description popconfirm width, min width 150px\n */\n width: {\n type: [String, Number],\n default: 150,\n },\n virtualTriggering: useTooltipTriggerProps.virtualTriggering,\n virtualRef: useTooltipTriggerProps.virtualRef,\n} as const)\n\nexport const popconfirmEmits = {\n /**\n * @description triggers when click confirm button\n */\n confirm: (e: MouseEvent) => e instanceof MouseEvent,\n /**\n * @description triggers when click cancel button\n */\n cancel: (e: MouseEvent) => e instanceof MouseEvent,\n}\n\nexport type PopconfirmEmits = typeof popconfirmEmits\n\nexport type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>\nexport type PopconfirmPropsPublic = __ExtractPublicPropTypes<\n typeof popconfirmProps\n>\n\nexport type PopconfirmInstance = InstanceType<typeof Popconfirm> & unknown\n"],"names":["buildProps","buttonTypes","iconPropType","QuestionFilled","useTooltipContentProps","useTooltipTriggerProps"],"mappings":";;;;;;;;;;;AAOY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,KAAK,EAAE,MAAM;AACf,EAAE,iBAAiB,EAAE,MAAM;AAC3B,EAAE,gBAAgB,EAAE,MAAM;AAC1B,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEC,kBAAW;AACvB,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAEA,kBAAW;AACvB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAEC,iBAAY;AACtB,IAAI,OAAO,EAAE,MAAMC,uBAAc;AACjC,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,GAAGC,8BAAsB,CAAC,MAAM;AACpC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,UAAU,EAAEA,8BAAsB,CAAC,UAAU;AAC/C,EAAE,UAAU,EAAEA,8BAAsB,CAAC,UAAU;AAC/C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAEC,8BAAsB,CAAC,iBAAiB;AAC7D,EAAE,UAAU,EAAEA,8BAAsB,CAAC,UAAU;AAC/C,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,UAAU;AACzC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,UAAU;AACxC;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var dropdown = require('../../dropdown/src/dropdown.js');
|
|
6
6
|
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
-
var trigger = require('../../tooltip/src/
|
|
7
|
+
var trigger = require('../../tooltip/src/trigger.js');
|
|
8
8
|
var content = require('../../tooltip/src/content.js');
|
|
9
9
|
var types = require('../../../utils/types.js');
|
|
10
10
|
|
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var radio$1 = require('./src/radio2.js');
|
|
6
6
|
var radioButton$1 = require('./src/radio-button2.js');
|
|
7
|
-
var radioGroup$1 = require('./src/radio-
|
|
7
|
+
var radioGroup$1 = require('./src/radio-group2.js');
|
|
8
8
|
var radio = require('./src/radio.js');
|
|
9
|
-
var radioGroup = require('./src/radio-
|
|
9
|
+
var radioGroup = require('./src/radio-group.js');
|
|
10
10
|
var radioButton = require('./src/radio-button.js');
|
|
11
11
|
var constants = require('./src/constants.js');
|
|
12
12
|
var install = require('../../utils/vue/install.js');
|
|
@@ -2,93 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var radio = require('./radio2.js');
|
|
10
|
-
var radioButton = require('./radio-button2.js');
|
|
11
|
-
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
-
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
|
-
var index$1 = require('../../../hooks/use-id/index.js');
|
|
14
|
-
var useFormItem = require('../../form/src/hooks/use-form-item.js');
|
|
15
|
-
var error = require('../../../utils/error.js');
|
|
16
|
-
var event = require('../../../constants/event.js');
|
|
5
|
+
var radio = require('./radio.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
var index = require('../../../hooks/use-size/index.js');
|
|
8
|
+
var index$1 = require('../../../hooks/use-aria/index.js');
|
|
17
9
|
|
|
18
|
-
const
|
|
19
|
-
|
|
10
|
+
const radioGroupProps = runtime.buildProps({
|
|
11
|
+
id: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: void 0
|
|
14
|
+
},
|
|
15
|
+
size: index.useSizeProp,
|
|
16
|
+
disabled: Boolean,
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: [String, Number, Boolean],
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
fill: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
textColor: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
name: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
validateEvent: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
options: {
|
|
38
|
+
type: runtime.definePropType(Array)
|
|
39
|
+
},
|
|
40
|
+
props: {
|
|
41
|
+
type: runtime.definePropType(Object),
|
|
42
|
+
default: () => radioDefaultProps
|
|
43
|
+
},
|
|
44
|
+
type: {
|
|
45
|
+
type: String,
|
|
46
|
+
values: ["radio", "button"],
|
|
47
|
+
default: "radio"
|
|
48
|
+
},
|
|
49
|
+
...index$1.useAriaProps(["ariaLabel"])
|
|
20
50
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const ns = index.useNamespace("radio");
|
|
28
|
-
const radioId = index$1.useId();
|
|
29
|
-
const radioGroupRef = vue.ref();
|
|
30
|
-
const { formItem } = useFormItem.useFormItem();
|
|
31
|
-
const { inputId: groupId, isLabeledByFormItem } = useFormItem.useFormItemInputId(props, {
|
|
32
|
-
formItemContext: formItem
|
|
33
|
-
});
|
|
34
|
-
const changeEvent = (value) => {
|
|
35
|
-
emit(event.UPDATE_MODEL_EVENT, value);
|
|
36
|
-
vue.nextTick(() => emit(event.CHANGE_EVENT, value));
|
|
37
|
-
};
|
|
38
|
-
vue.onMounted(() => {
|
|
39
|
-
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
40
|
-
const firstLabel = radios[0];
|
|
41
|
-
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
42
|
-
firstLabel.tabIndex = 0;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
const name = vue.computed(() => {
|
|
46
|
-
return props.name || radioId.value;
|
|
47
|
-
});
|
|
48
|
-
const aliasProps = vue.computed(() => ({
|
|
49
|
-
...radioGroup.radioDefaultProps,
|
|
50
|
-
...props.props
|
|
51
|
-
}));
|
|
52
|
-
const getOptionProps = (option) => {
|
|
53
|
-
const { label, value, disabled } = aliasProps.value;
|
|
54
|
-
const base = {
|
|
55
|
-
label: option[label],
|
|
56
|
-
value: option[value],
|
|
57
|
-
disabled: option[disabled]
|
|
58
|
-
};
|
|
59
|
-
return { ...lodashUnified.omit(option, [label, value, disabled]), ...base };
|
|
60
|
-
};
|
|
61
|
-
const optionComponent = vue.computed(() => props.type === "button" ? radioButton["default"] : radio["default"]);
|
|
62
|
-
vue.provide(constants.radioGroupKey, vue.reactive({
|
|
63
|
-
...vue.toRefs(props),
|
|
64
|
-
changeEvent,
|
|
65
|
-
name
|
|
66
|
-
}));
|
|
67
|
-
vue.watch(() => props.modelValue, (newVal, oldValue) => {
|
|
68
|
-
if (props.validateEvent && !lodashUnified.isEqual(newVal, oldValue)) {
|
|
69
|
-
formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return (_ctx, _cache) => {
|
|
73
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
74
|
-
id: vue.unref(groupId),
|
|
75
|
-
ref_key: "radioGroupRef",
|
|
76
|
-
ref: radioGroupRef,
|
|
77
|
-
class: vue.normalizeClass(vue.unref(ns).b("group")),
|
|
78
|
-
role: "radiogroup",
|
|
79
|
-
"aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
80
|
-
"aria-labelledby": vue.unref(isLabeledByFormItem) ? vue.unref(formItem).labelId : void 0
|
|
81
|
-
}, [
|
|
82
|
-
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
83
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (item, index) => {
|
|
84
|
-
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(optionComponent)), vue.mergeProps({ key: index }, getOptionProps(item)), null, 16);
|
|
85
|
-
}), 128))
|
|
86
|
-
])
|
|
87
|
-
], 10, ["id", "aria-label", "aria-labelledby"]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
var RadioGroup = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-group.vue"]]);
|
|
51
|
+
const radioGroupEmits = radio.radioEmits;
|
|
52
|
+
const radioDefaultProps = {
|
|
53
|
+
label: "label",
|
|
54
|
+
value: "value",
|
|
55
|
+
disabled: "disabled"
|
|
56
|
+
};
|
|
92
57
|
|
|
93
|
-
exports
|
|
58
|
+
exports.radioDefaultProps = radioDefaultProps;
|
|
59
|
+
exports.radioGroupEmits = radioGroupEmits;
|
|
60
|
+
exports.radioGroupProps = radioGroupProps;
|
|
94
61
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sources":["../../../../../../packages/components/radio/src/radio-group.
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../../../../../../packages/components/radio/src/radio-group.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { radioEmits } from './radio'\n\nimport type { RadioPropsPublic } from './radio'\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\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 options: {\n type: definePropType<radioOption[]>(Array),\n },\n props: {\n type: definePropType<radioOptionProp>(Object),\n default: () => radioDefaultProps,\n },\n type: {\n type: String,\n values: ['radio', 'button'] as const,\n default: 'radio',\n },\n ...useAriaProps(['ariaLabel']),\n} as const)\nexport type RadioGroupProps = ExtractPropTypes<typeof radioGroupProps>\nexport type RadioGroupPropsPublic = __ExtractPublicPropTypes<\n typeof radioGroupProps\n>\n\nexport const radioGroupEmits = radioEmits\nexport type RadioGroupEmits = typeof radioGroupEmits\nexport type RadioGroupInstance = InstanceType<typeof RadioGroup> & unknown\n\nexport type radioOption = RadioPropsPublic & Record<string, any>\n\nexport const radioDefaultProps: Required<radioOptionProp> = {\n label: 'label',\n value: 'value',\n disabled: 'disabled',\n}\nexport type radioOptionProp = {\n value?: string\n label?: string\n disabled?: string\n}\n"],"names":["buildProps","useSizeProp","definePropType","useAriaProps","radioEmits"],"mappings":";;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,EAAEC,iBAAW;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,OAAO,EAAE;AACX,IAAI,IAAI,EAAEC,sBAAc,CAAC,KAAK,CAAC;AAC/B,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,MAAM,iBAAiB;AACpC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;AAC/B,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,GAAGC,oBAAY,CAAC,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC,EAAE;AACS,MAAC,eAAe,GAAGC,iBAAW;AAC9B,MAAC,iBAAiB,GAAG;AACjC,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,QAAQ,EAAE,UAAU;AACtB;;;;;;"}
|
|
@@ -2,60 +2,93 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var radioGroup = require('./radio-group.js');
|
|
7
|
+
var constants = require('./constants.js');
|
|
8
|
+
var lodashUnified = require('lodash-unified');
|
|
9
|
+
var radio = require('./radio2.js');
|
|
10
|
+
var radioButton = require('./radio-button2.js');
|
|
11
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
12
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
13
|
+
var index$1 = require('../../../hooks/use-id/index.js');
|
|
14
|
+
var useFormItem = require('../../form/src/hooks/use-form-item.js');
|
|
15
|
+
var error = require('../../../utils/error.js');
|
|
16
|
+
var event = require('../../../constants/event.js');
|
|
9
17
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
type: String,
|
|
13
|
-
default: void 0
|
|
14
|
-
},
|
|
15
|
-
size: index.useSizeProp,
|
|
16
|
-
disabled: Boolean,
|
|
17
|
-
modelValue: {
|
|
18
|
-
type: [String, Number, Boolean],
|
|
19
|
-
default: void 0
|
|
20
|
-
},
|
|
21
|
-
fill: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ""
|
|
24
|
-
},
|
|
25
|
-
textColor: {
|
|
26
|
-
type: String,
|
|
27
|
-
default: ""
|
|
28
|
-
},
|
|
29
|
-
name: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: void 0
|
|
32
|
-
},
|
|
33
|
-
validateEvent: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: true
|
|
36
|
-
},
|
|
37
|
-
options: {
|
|
38
|
-
type: runtime.definePropType(Array)
|
|
39
|
-
},
|
|
40
|
-
props: {
|
|
41
|
-
type: runtime.definePropType(Object),
|
|
42
|
-
default: () => radioDefaultProps
|
|
43
|
-
},
|
|
44
|
-
type: {
|
|
45
|
-
type: String,
|
|
46
|
-
values: ["radio", "button"],
|
|
47
|
-
default: "radio"
|
|
48
|
-
},
|
|
49
|
-
...index$1.useAriaProps(["ariaLabel"])
|
|
18
|
+
const __default__ = vue.defineComponent({
|
|
19
|
+
name: "ElRadioGroup"
|
|
50
20
|
});
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
21
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
22
|
+
...__default__,
|
|
23
|
+
props: radioGroup.radioGroupProps,
|
|
24
|
+
emits: radioGroup.radioGroupEmits,
|
|
25
|
+
setup(__props, { emit }) {
|
|
26
|
+
const props = __props;
|
|
27
|
+
const ns = index.useNamespace("radio");
|
|
28
|
+
const radioId = index$1.useId();
|
|
29
|
+
const radioGroupRef = vue.ref();
|
|
30
|
+
const { formItem } = useFormItem.useFormItem();
|
|
31
|
+
const { inputId: groupId, isLabeledByFormItem } = useFormItem.useFormItemInputId(props, {
|
|
32
|
+
formItemContext: formItem
|
|
33
|
+
});
|
|
34
|
+
const changeEvent = (value) => {
|
|
35
|
+
emit(event.UPDATE_MODEL_EVENT, value);
|
|
36
|
+
vue.nextTick(() => emit(event.CHANGE_EVENT, value));
|
|
37
|
+
};
|
|
38
|
+
vue.onMounted(() => {
|
|
39
|
+
const radios = radioGroupRef.value.querySelectorAll("[type=radio]");
|
|
40
|
+
const firstLabel = radios[0];
|
|
41
|
+
if (!Array.from(radios).some((radio) => radio.checked) && firstLabel) {
|
|
42
|
+
firstLabel.tabIndex = 0;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
const name = vue.computed(() => {
|
|
46
|
+
return props.name || radioId.value;
|
|
47
|
+
});
|
|
48
|
+
const aliasProps = vue.computed(() => ({
|
|
49
|
+
...radioGroup.radioDefaultProps,
|
|
50
|
+
...props.props
|
|
51
|
+
}));
|
|
52
|
+
const getOptionProps = (option) => {
|
|
53
|
+
const { label, value, disabled } = aliasProps.value;
|
|
54
|
+
const base = {
|
|
55
|
+
label: option[label],
|
|
56
|
+
value: option[value],
|
|
57
|
+
disabled: option[disabled]
|
|
58
|
+
};
|
|
59
|
+
return { ...lodashUnified.omit(option, [label, value, disabled]), ...base };
|
|
60
|
+
};
|
|
61
|
+
const optionComponent = vue.computed(() => props.type === "button" ? radioButton["default"] : radio["default"]);
|
|
62
|
+
vue.provide(constants.radioGroupKey, vue.reactive({
|
|
63
|
+
...vue.toRefs(props),
|
|
64
|
+
changeEvent,
|
|
65
|
+
name
|
|
66
|
+
}));
|
|
67
|
+
vue.watch(() => props.modelValue, (newVal, oldValue) => {
|
|
68
|
+
if (props.validateEvent && !lodashUnified.isEqual(newVal, oldValue)) {
|
|
69
|
+
formItem == null ? void 0 : formItem.validate("change").catch((err) => error.debugWarn(err));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return (_ctx, _cache) => {
|
|
73
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
74
|
+
id: vue.unref(groupId),
|
|
75
|
+
ref_key: "radioGroupRef",
|
|
76
|
+
ref: radioGroupRef,
|
|
77
|
+
class: vue.normalizeClass(vue.unref(ns).b("group")),
|
|
78
|
+
role: "radiogroup",
|
|
79
|
+
"aria-label": !vue.unref(isLabeledByFormItem) ? _ctx.ariaLabel || "radio-group" : void 0,
|
|
80
|
+
"aria-labelledby": vue.unref(isLabeledByFormItem) ? vue.unref(formItem).labelId : void 0
|
|
81
|
+
}, [
|
|
82
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
83
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.options, (item, index) => {
|
|
84
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(optionComponent)), vue.mergeProps({ key: index }, getOptionProps(item)), null, 16);
|
|
85
|
+
}), 128))
|
|
86
|
+
])
|
|
87
|
+
], 10, ["id", "aria-label", "aria-labelledby"]);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
var RadioGroup = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "radio-group.vue"]]);
|
|
57
92
|
|
|
58
|
-
exports
|
|
59
|
-
exports.radioGroupEmits = radioGroupEmits;
|
|
60
|
-
exports.radioGroupProps = radioGroupProps;
|
|
93
|
+
exports["default"] = RadioGroup;
|
|
61
94
|
//# sourceMappingURL=radio-group2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group2.js","sources":["../../../../../../packages/components/radio/src/radio-group.
|
|
1
|
+
{"version":3,"file":"radio-group2.js","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 <component\n :is=\"optionComponent\"\n v-for=\"(item, index) in options\"\n :key=\"index\"\n v-bind=\"getOptionProps(item)\"\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 { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { useId, useNamespace } from '@element-plus/hooks'\nimport { debugWarn } from '@element-plus/utils'\nimport {\n radioDefaultProps,\n radioGroupEmits,\n radioGroupProps,\n} from './radio-group'\nimport { radioGroupKey } from './constants'\nimport { isEqual, omit } from 'lodash-unified'\nimport ElRadio from './radio.vue'\nimport ElRadioButton from './radio-button.vue'\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_EVENT, 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\nconst aliasProps = computed(() => ({\n ...radioDefaultProps,\n ...props.props,\n}))\nconst getOptionProps = (option: Record<string, any>) => {\n const { label, value, disabled } = aliasProps.value\n const base = {\n label: option[label],\n value: option[value],\n disabled: option[disabled],\n }\n return { ...omit(option, [label, value, disabled]), ...base }\n}\n\nconst optionComponent = computed(() =>\n props.type === 'button' ? ElRadioButton : ElRadio\n)\n\nprovide(\n radioGroupKey,\n reactive({\n ...toRefs(props),\n changeEvent,\n name,\n })\n)\n\nwatch(\n () => props.modelValue,\n (newVal, oldValue) => {\n if (props.validateEvent && !isEqual(newVal, oldValue)) {\n formItem?.validate('change').catch((err) => debugWarn(err))\n }\n }\n)\n</script>\n"],"names":["useNamespace","useId","ref","useFormItem","useFormItemInputId","UPDATE_MODEL_EVENT","nextTick","CHANGE_EVENT","onMounted","computed","radioDefaultProps","omit","ElRadioButton","ElRadio","provide","radioGroupKey","reactive","toRefs","watch","isEqual","debugWarn","_openBlock","_createElementBlock","_normalizeClass","_unref"],"mappings":"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"}
|