@element-plus/nightly 0.0.20251211 → 0.0.20251213
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.css +1 -1
- package/dist/index.full.js +42 -14
- package/dist/index.full.min.js +10 -10
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +42 -14
- 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 +129 -24
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +24 -129
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +1 -1
- package/es/components/calendar/src/date-table.mjs +89 -31
- package/es/components/calendar/src/date-table.mjs.map +1 -1
- package/es/components/calendar/src/date-table2.mjs +31 -89
- package/es/components/calendar/src/date-table2.mjs.map +1 -1
- package/es/components/calendar/src/use-date-table.mjs +1 -1
- package/es/components/card/index.mjs +2 -2
- package/es/components/card/src/card.mjs +23 -48
- package/es/components/card/src/card.mjs.map +1 -1
- package/es/components/card/src/card2.mjs +48 -23
- package/es/components/card/src/card2.mjs.map +1 -1
- package/es/components/cascader/index.mjs +2 -2
- package/es/components/cascader/src/cascader.mjs +717 -102
- package/es/components/cascader/src/cascader.mjs.map +1 -1
- package/es/components/cascader/src/cascader2.mjs +102 -717
- package/es/components/cascader/src/cascader2.mjs.map +1 -1
- package/es/components/color-picker/index.mjs +2 -2
- package/es/components/color-picker/src/color-picker.mjs +49 -347
- package/es/components/color-picker/src/color-picker.mjs.map +1 -1
- package/es/components/color-picker/src/color-picker2.mjs +347 -49
- package/es/components/color-picker/src/color-picker2.mjs.map +1 -1
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs +2 -2
- package/es/components/date-picker-panel/src/date-picker-com/panel-date-range.mjs.map +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +258 -112
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +112 -258
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/index.mjs +15 -15
- package/es/components/input-tag/index.mjs +2 -2
- package/es/components/input-tag/src/input-tag.mjs +283 -83
- package/es/components/input-tag/src/input-tag.mjs.map +1 -1
- package/es/components/input-tag/src/input-tag2.mjs +83 -283
- package/es/components/input-tag/src/input-tag2.mjs.map +1 -1
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +15 -103
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +103 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/notification/index.mjs +1 -1
- package/es/components/notification/src/notification.mjs +147 -73
- package/es/components/notification/src/notification.mjs.map +1 -1
- package/es/components/notification/src/notification2.mjs +73 -147
- package/es/components/notification/src/notification2.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +2 -2
- package/es/components/pagination/src/components/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/next.mjs +18 -35
- package/es/components/pagination/src/components/next.mjs.map +1 -1
- package/es/components/pagination/src/components/next2.mjs +35 -18
- package/es/components/pagination/src/components/next2.mjs.map +1 -1
- package/es/components/pagination/src/components/pager.mjs +210 -16
- package/es/components/pagination/src/components/pager.mjs.map +1 -1
- package/es/components/pagination/src/components/pager2.mjs +16 -210
- package/es/components/pagination/src/components/pager2.mjs.map +1 -1
- package/es/components/pagination/src/components/prev.mjs +17 -35
- package/es/components/pagination/src/components/prev.mjs.map +1 -1
- package/es/components/pagination/src/components/prev2.mjs +35 -17
- package/es/components/pagination/src/components/prev2.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes.mjs +26 -72
- package/es/components/pagination/src/components/sizes.mjs.map +1 -1
- package/es/components/pagination/src/components/sizes2.mjs +72 -26
- package/es/components/pagination/src/components/sizes2.mjs.map +1 -1
- package/es/components/pagination/src/components/total.mjs +26 -6
- package/es/components/pagination/src/components/total.mjs.map +1 -1
- package/es/components/pagination/src/components/total2.mjs +6 -26
- package/es/components/pagination/src/components/total2.mjs.map +1 -1
- package/es/components/pagination/src/pagination.mjs +6 -6
- package/es/components/popconfirm/src/popconfirm.mjs +1 -1
- package/es/components/popover/src/popover.mjs +2 -2
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/popper.mjs +22 -32
- package/es/components/popper/src/popper.mjs.map +1 -1
- package/es/components/popper/src/popper2.mjs +32 -22
- package/es/components/popper/src/popper2.mjs.map +1 -1
- package/es/components/segmented/index.mjs +2 -2
- package/es/components/segmented/src/segmented.mjs +45 -171
- package/es/components/segmented/src/segmented.mjs.map +1 -1
- package/es/components/segmented/src/segmented2.mjs +171 -45
- package/es/components/segmented/src/segmented2.mjs.map +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- 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/skeleton2.mjs +1 -1
- package/es/components/slider/src/button.mjs +91 -19
- package/es/components/slider/src/button.mjs.map +1 -1
- package/es/components/slider/src/button2.mjs +19 -91
- package/es/components/slider/src/button2.mjs.map +1 -1
- package/es/components/slider/src/slider2.mjs +1 -1
- package/es/components/table/src/table-header/index.mjs +1 -0
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table-v2/src/components/expand-icon.d.ts +1 -0
- package/es/components/table-v2/src/components/expand-icon.mjs +9 -4
- package/es/components/table-v2/src/components/expand-icon.mjs.map +1 -1
- package/es/components/table-v2/src/components/sort-icon.d.ts +1 -0
- package/es/components/table-v2/src/components/sort-icon.mjs +6 -3
- package/es/components/table-v2/src/components/sort-icon.mjs.map +1 -1
- package/es/components/table-v2/src/renderers/cell.d.ts +2 -1
- package/es/components/table-v2/src/renderers/cell.mjs +2 -0
- package/es/components/table-v2/src/renderers/cell.mjs.map +1 -1
- package/es/components/table-v2/src/renderers/header-cell.d.ts +2 -1
- package/es/components/table-v2/src/renderers/header-cell.mjs +14 -2
- package/es/components/table-v2/src/renderers/header-cell.mjs.map +1 -1
- package/es/components/table-v2/src/table-v2.mjs +7 -1
- package/es/components/table-v2/src/table-v2.mjs.map +1 -1
- package/es/components/tabs/index.mjs +1 -1
- package/es/components/tabs/src/tab-bar.mjs +92 -11
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +11 -92
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tooltip/index.mjs +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +81 -16
- package/es/components/tooltip/src/trigger.mjs.map +1 -1
- package/es/components/tooltip/src/trigger2.mjs +16 -81
- package/es/components/tooltip/src/trigger2.mjs.map +1 -1
- package/es/components/tour/index.mjs +4 -4
- package/es/components/tour/src/step.mjs +44 -192
- package/es/components/tour/src/step.mjs.map +1 -1
- package/es/components/tour/src/step2.mjs +192 -44
- package/es/components/tour/src/step2.mjs.map +1 -1
- package/es/components/tour/src/tour.mjs +69 -154
- package/es/components/tour/src/tour.mjs.map +1 -1
- package/es/components/tour/src/tour2.mjs +154 -69
- package/es/components/tour/src/tour2.mjs.map +1 -1
- package/es/components/transfer/src/composables/use-check.mjs +1 -1
- package/es/components/transfer/src/transfer-panel.mjs +130 -19
- package/es/components/transfer/src/transfer-panel.mjs.map +1 -1
- package/es/components/transfer/src/transfer-panel2.mjs +19 -130
- package/es/components/transfer/src/transfer-panel2.mjs.map +1 -1
- package/es/components/transfer/src/transfer2.mjs +1 -1
- package/es/index.mjs +15 -15
- 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 +129 -25
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +25 -129
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +1 -1
- package/lib/components/calendar/src/date-table.js +89 -35
- package/lib/components/calendar/src/date-table.js.map +1 -1
- package/lib/components/calendar/src/date-table2.js +35 -89
- package/lib/components/calendar/src/date-table2.js.map +1 -1
- package/lib/components/calendar/src/use-date-table.js +1 -1
- package/lib/components/card/index.js +2 -2
- package/lib/components/card/src/card.js +24 -48
- package/lib/components/card/src/card.js.map +1 -1
- package/lib/components/card/src/card2.js +48 -24
- package/lib/components/card/src/card2.js.map +1 -1
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/cascader/src/cascader.js +716 -102
- package/lib/components/cascader/src/cascader.js.map +1 -1
- package/lib/components/cascader/src/cascader2.js +102 -716
- package/lib/components/cascader/src/cascader2.js.map +1 -1
- package/lib/components/color-picker/index.js +2 -2
- package/lib/components/color-picker/src/color-picker.js +49 -346
- package/lib/components/color-picker/src/color-picker.js.map +1 -1
- package/lib/components/color-picker/src/color-picker2.js +346 -49
- package/lib/components/color-picker/src/color-picker2.js.map +1 -1
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js +2 -2
- package/lib/components/date-picker-panel/src/date-picker-com/panel-date-range.js.map +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +258 -117
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +117 -258
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/index.js +15 -15
- package/lib/components/input-tag/index.js +2 -2
- package/lib/components/input-tag/src/input-tag.js +281 -82
- package/lib/components/input-tag/src/input-tag.js.map +1 -1
- package/lib/components/input-tag/src/input-tag2.js +82 -281
- package/lib/components/input-tag/src/input-tag2.js.map +1 -1
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +16 -103
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +103 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/notification/index.js +1 -1
- package/lib/components/notification/src/notification.js +146 -74
- package/lib/components/notification/src/notification.js.map +1 -1
- package/lib/components/notification/src/notification2.js +74 -146
- package/lib/components/notification/src/notification2.js.map +1 -1
- package/lib/components/notification/src/notify.js +2 -2
- package/lib/components/pagination/src/components/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/next.js +18 -35
- package/lib/components/pagination/src/components/next.js.map +1 -1
- package/lib/components/pagination/src/components/next2.js +35 -18
- package/lib/components/pagination/src/components/next2.js.map +1 -1
- package/lib/components/pagination/src/components/pager.js +210 -16
- package/lib/components/pagination/src/components/pager.js.map +1 -1
- package/lib/components/pagination/src/components/pager2.js +16 -210
- package/lib/components/pagination/src/components/pager2.js.map +1 -1
- package/lib/components/pagination/src/components/prev.js +18 -35
- package/lib/components/pagination/src/components/prev.js.map +1 -1
- package/lib/components/pagination/src/components/prev2.js +35 -18
- package/lib/components/pagination/src/components/prev2.js.map +1 -1
- package/lib/components/pagination/src/components/sizes.js +26 -72
- package/lib/components/pagination/src/components/sizes.js.map +1 -1
- package/lib/components/pagination/src/components/sizes2.js +72 -26
- package/lib/components/pagination/src/components/sizes2.js.map +1 -1
- package/lib/components/pagination/src/components/total.js +26 -6
- package/lib/components/pagination/src/components/total.js.map +1 -1
- package/lib/components/pagination/src/components/total2.js +6 -26
- package/lib/components/pagination/src/components/total2.js.map +1 -1
- package/lib/components/pagination/src/pagination.js +6 -6
- package/lib/components/popconfirm/src/popconfirm.js +1 -1
- package/lib/components/popover/src/popover.js +2 -2
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/popper.js +25 -32
- package/lib/components/popper/src/popper.js.map +1 -1
- package/lib/components/popper/src/popper2.js +32 -25
- package/lib/components/popper/src/popper2.js.map +1 -1
- package/lib/components/segmented/index.js +2 -2
- package/lib/components/segmented/src/segmented.js +47 -171
- package/lib/components/segmented/src/segmented.js.map +1 -1
- package/lib/components/segmented/src/segmented2.js +171 -47
- package/lib/components/segmented/src/segmented2.js.map +1 -1
- package/lib/components/skeleton/index.js +2 -2
- 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/skeleton2.js +1 -1
- package/lib/components/slider/src/button.js +91 -20
- package/lib/components/slider/src/button.js.map +1 -1
- package/lib/components/slider/src/button2.js +20 -91
- package/lib/components/slider/src/button2.js.map +1 -1
- package/lib/components/slider/src/slider2.js +1 -1
- package/lib/components/table/src/table-header/index.js +1 -0
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table-v2/src/components/expand-icon.d.ts +1 -0
- package/lib/components/table-v2/src/components/expand-icon.js +9 -4
- package/lib/components/table-v2/src/components/expand-icon.js.map +1 -1
- package/lib/components/table-v2/src/components/sort-icon.d.ts +1 -0
- package/lib/components/table-v2/src/components/sort-icon.js +6 -3
- package/lib/components/table-v2/src/components/sort-icon.js.map +1 -1
- package/lib/components/table-v2/src/renderers/cell.d.ts +2 -1
- package/lib/components/table-v2/src/renderers/cell.js +2 -0
- package/lib/components/table-v2/src/renderers/cell.js.map +1 -1
- package/lib/components/table-v2/src/renderers/header-cell.d.ts +2 -1
- package/lib/components/table-v2/src/renderers/header-cell.js +14 -2
- package/lib/components/table-v2/src/renderers/header-cell.js.map +1 -1
- package/lib/components/table-v2/src/table-v2.js +7 -1
- package/lib/components/table-v2/src/table-v2.js.map +1 -1
- package/lib/components/tabs/index.js +1 -1
- package/lib/components/tabs/src/tab-bar.js +92 -11
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +11 -92
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tooltip/index.js +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +81 -16
- package/lib/components/tooltip/src/trigger.js.map +1 -1
- package/lib/components/tooltip/src/trigger2.js +16 -81
- package/lib/components/tooltip/src/trigger2.js.map +1 -1
- package/lib/components/tour/index.js +4 -4
- package/lib/components/tour/src/step.js +44 -191
- package/lib/components/tour/src/step.js.map +1 -1
- package/lib/components/tour/src/step2.js +191 -44
- package/lib/components/tour/src/step2.js.map +1 -1
- package/lib/components/tour/src/tour.js +69 -153
- package/lib/components/tour/src/tour.js.map +1 -1
- package/lib/components/tour/src/tour2.js +153 -69
- package/lib/components/tour/src/tour2.js.map +1 -1
- package/lib/components/transfer/src/composables/use-check.js +1 -1
- package/lib/components/transfer/src/transfer-panel.js +130 -21
- package/lib/components/transfer/src/transfer-panel.js.map +1 -1
- package/lib/components/transfer/src/transfer-panel2.js +21 -130
- package/lib/components/transfer/src/transfer-panel2.js.map +1 -1
- package/lib/components/transfer/src/transfer2.js +1 -1
- package/lib/index.js +15 -15
- 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/theme-chalk/el-radio.css +1 -1
- package/theme-chalk/el-table-v2.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/col.scss +10 -2
- package/theme-chalk/src/mixins/_col.scss +10 -2
- package/theme-chalk/src/radio.scss +5 -0
- package/theme-chalk/src/table-v2.scss +3 -2
- package/web-types.json +1 -1
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, createBlock, createCommentVNode } from 'vue';
|
|
2
|
+
import { PictureFilled } from '@element-plus/icons-vue';
|
|
3
|
+
import { skeletonItemProps } from './skeleton-item.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
2
6
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
const __default__ = defineComponent({
|
|
8
|
+
name: "ElSkeletonItem"
|
|
9
|
+
});
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: skeletonItemProps,
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const ns = useNamespace("skeleton");
|
|
15
|
+
return (_ctx, _cache) => {
|
|
16
|
+
return openBlock(), createElementBlock("div", {
|
|
17
|
+
class: normalizeClass([unref(ns).e("item"), unref(ns).e(_ctx.variant)])
|
|
18
|
+
}, [
|
|
19
|
+
_ctx.variant === "image" ? (openBlock(), createBlock(unref(PictureFilled), { key: 0 })) : createCommentVNode("v-if", true)
|
|
20
|
+
], 2);
|
|
21
|
+
};
|
|
18
22
|
}
|
|
19
23
|
});
|
|
24
|
+
var SkeletonItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "skeleton-item.vue"]]);
|
|
20
25
|
|
|
21
|
-
export {
|
|
26
|
+
export { SkeletonItem as default };
|
|
22
27
|
//# sourceMappingURL=skeleton-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-item2.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton-item.
|
|
1
|
+
{"version":3,"file":"skeleton-item2.mjs","sources":["../../../../../../packages/components/skeleton/src/skeleton-item.vue"],"sourcesContent":["<template>\n <div :class=\"[ns.e('item'), ns.e(variant)]\">\n <picture-filled v-if=\"variant === 'image'\" />\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useNamespace } from '@element-plus/hooks'\nimport { PictureFilled } from '@element-plus/icons-vue'\nimport { skeletonItemProps } from './skeleton-item'\n\ndefineOptions({\n name: 'ElSkeletonItem',\n})\ndefineProps(skeletonItemProps)\nconst ns = useNamespace('skeleton')\n</script>\n"],"names":[],"mappings":";;;;;;mCAWc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;AAEA,IAAM,MAAA,EAAA,GAAK,aAAa,UAAU,CAAA,CAAA;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, toRef, unref, openBlock, createElementBlock, mergeProps, Fragment, renderList, renderSlot, createVNode, normalizeClass, createBlock, createCommentVNode, normalizeProps } from 'vue';
|
|
2
2
|
import { skeletonProps } from './skeleton.mjs';
|
|
3
|
-
import SkeletonItem from './skeleton-
|
|
3
|
+
import SkeletonItem from './skeleton-item2.mjs';
|
|
4
4
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
5
|
import { useThrottleRender } from '../../../hooks/use-throttle-render/index.mjs';
|
|
6
6
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
@@ -1,24 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent, reactive, computed, toRefs, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createVNode, withCtx, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { ElTooltip } from '../../tooltip/index.mjs';
|
|
3
|
+
import { sliderButtonProps, sliderButtonEmits } from './button2.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { useSliderButton } from './composables/use-slider-button.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
5
7
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const __default__ = defineComponent({
|
|
9
|
+
name: "ElSliderButton"
|
|
10
|
+
});
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
...__default__,
|
|
13
|
+
props: sliderButtonProps,
|
|
14
|
+
emits: sliderButtonEmits,
|
|
15
|
+
setup(__props, { expose, emit }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const ns = useNamespace("slider");
|
|
18
|
+
const initData = reactive({
|
|
19
|
+
hovering: false,
|
|
20
|
+
dragging: false,
|
|
21
|
+
isClick: false,
|
|
22
|
+
startX: 0,
|
|
23
|
+
currentX: 0,
|
|
24
|
+
startY: 0,
|
|
25
|
+
currentY: 0,
|
|
26
|
+
startPosition: 0,
|
|
27
|
+
newPosition: 0,
|
|
28
|
+
oldValue: props.modelValue
|
|
29
|
+
});
|
|
30
|
+
const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
|
|
31
|
+
const {
|
|
32
|
+
disabled,
|
|
33
|
+
button,
|
|
34
|
+
tooltip,
|
|
35
|
+
showTooltip,
|
|
36
|
+
persistent,
|
|
37
|
+
tooltipVisible,
|
|
38
|
+
wrapperStyle,
|
|
39
|
+
formatValue,
|
|
40
|
+
handleMouseEnter,
|
|
41
|
+
handleMouseLeave,
|
|
42
|
+
onButtonDown,
|
|
43
|
+
onKeyDown,
|
|
44
|
+
setPosition
|
|
45
|
+
} = useSliderButton(props, initData, emit);
|
|
46
|
+
const { hovering, dragging } = toRefs(initData);
|
|
47
|
+
expose({
|
|
48
|
+
onButtonDown,
|
|
49
|
+
onKeyDown,
|
|
50
|
+
setPosition,
|
|
51
|
+
hovering,
|
|
52
|
+
dragging
|
|
53
|
+
});
|
|
54
|
+
return (_ctx, _cache) => {
|
|
55
|
+
return openBlock(), createElementBlock("div", {
|
|
56
|
+
ref_key: "button",
|
|
57
|
+
ref: button,
|
|
58
|
+
class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
|
|
59
|
+
style: normalizeStyle(unref(wrapperStyle)),
|
|
60
|
+
tabindex: unref(disabled) ? void 0 : 0,
|
|
61
|
+
onMouseenter: unref(handleMouseEnter),
|
|
62
|
+
onMouseleave: unref(handleMouseLeave),
|
|
63
|
+
onMousedown: unref(onButtonDown),
|
|
64
|
+
onFocus: unref(handleMouseEnter),
|
|
65
|
+
onBlur: unref(handleMouseLeave),
|
|
66
|
+
onKeydown: unref(onKeyDown)
|
|
67
|
+
}, [
|
|
68
|
+
createVNode(unref(ElTooltip), {
|
|
69
|
+
ref_key: "tooltip",
|
|
70
|
+
ref: tooltip,
|
|
71
|
+
visible: unref(tooltipVisible),
|
|
72
|
+
placement: _ctx.placement,
|
|
73
|
+
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
74
|
+
"stop-popper-mouse-event": false,
|
|
75
|
+
"popper-class": _ctx.tooltipClass,
|
|
76
|
+
disabled: !unref(showTooltip),
|
|
77
|
+
persistent: unref(tooltipPersistent)
|
|
78
|
+
}, {
|
|
79
|
+
content: withCtx(() => [
|
|
80
|
+
createElementVNode("span", null, toDisplayString(unref(formatValue)), 1)
|
|
81
|
+
]),
|
|
82
|
+
default: withCtx(() => [
|
|
83
|
+
createElementVNode("div", {
|
|
84
|
+
class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
|
|
85
|
+
}, null, 2)
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
|
|
89
|
+
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
|
|
90
|
+
};
|
|
17
91
|
}
|
|
18
92
|
});
|
|
19
|
-
|
|
20
|
-
[UPDATE_MODEL_EVENT]: (value) => isNumber(value)
|
|
21
|
-
};
|
|
93
|
+
var SliderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "button.vue"]]);
|
|
22
94
|
|
|
23
|
-
export {
|
|
95
|
+
export { SliderButton as default };
|
|
24
96
|
//# sourceMappingURL=button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/slider/src/button.
|
|
1
|
+
{"version":3,"file":"button.mjs","sources":["../../../../../../packages/components/slider/src/button.vue"],"sourcesContent":["<template>\n <div\n ref=\"button\"\n :class=\"[ns.e('button-wrapper'), { hover: hovering, dragging }]\"\n :style=\"wrapperStyle\"\n :tabindex=\"disabled ? undefined : 0\"\n @mouseenter=\"handleMouseEnter\"\n @mouseleave=\"handleMouseLeave\"\n @mousedown=\"onButtonDown\"\n @focus=\"handleMouseEnter\"\n @blur=\"handleMouseLeave\"\n @keydown=\"onKeyDown\"\n >\n <el-tooltip\n ref=\"tooltip\"\n :visible=\"tooltipVisible\"\n :placement=\"placement\"\n :fallback-placements=\"['top', 'bottom', 'right', 'left']\"\n :stop-popper-mouse-event=\"false\"\n :popper-class=\"tooltipClass\"\n :disabled=\"!showTooltip\"\n :persistent=\"tooltipPersistent\"\n >\n <template #content>\n <span>{{ formatValue }}</span>\n </template>\n <div :class=\"[ns.e('button'), { hover: hovering, dragging }]\" />\n </el-tooltip>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, reactive, toRefs } from 'vue'\nimport { ElTooltip } from '@element-plus/components/tooltip'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useSliderButton } from './composables'\nimport { sliderButtonEmits, sliderButtonProps } from './button'\n\nimport type { SliderButtonInitData } from './button'\n\ndefineOptions({\n name: 'ElSliderButton',\n})\n\nconst props = defineProps(sliderButtonProps)\nconst emit = defineEmits(sliderButtonEmits)\n\nconst ns = useNamespace('slider')\n\nconst initData = reactive<SliderButtonInitData>({\n hovering: false,\n dragging: false,\n isClick: false,\n startX: 0,\n currentX: 0,\n startY: 0,\n currentY: 0,\n startPosition: 0,\n newPosition: 0,\n oldValue: props.modelValue,\n})\n\nconst tooltipPersistent = computed(() =>\n !showTooltip.value ? false : persistent.value\n)\n\nconst {\n disabled,\n button,\n tooltip,\n showTooltip,\n persistent,\n tooltipVisible,\n wrapperStyle,\n formatValue,\n handleMouseEnter,\n handleMouseLeave,\n onButtonDown,\n onKeyDown,\n setPosition,\n} = useSliderButton(props, initData, emit)\n\nconst { hovering, dragging } = toRefs(initData)\n\ndefineExpose({\n onButtonDown,\n onKeyDown,\n setPosition,\n hovering,\n dragging,\n})\n</script>\n"],"names":["_openBlock","_createElementBlock"],"mappings":";;;;;;;mCAwCc,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;AAKA,IAAM,MAAA,EAAA,GAAK,aAAa,QAAQ,CAAA,CAAA;AAEhC,IAAA,MAAM,WAAW,QAA+B,CAAA;AAAA,MAC9C,QAAU,EAAA,KAAA;AAAA,MACV,QAAU,EAAA,KAAA;AAAA,MACV,OAAS,EAAA,KAAA;AAAA,MACT,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,CAAA;AAAA,MACV,aAAe,EAAA,CAAA;AAAA,MACf,WAAa,EAAA,CAAA;AAAA,MACb,UAAU,KAAM,CAAA,UAAA;AAAA,KACjB,CAAA,CAAA;AAED,IAAA,MAAM,iBAAoB,GAAA,QAAA,CAAA,MAAA,CAAA,WAAA,CAAA,KAAA,GAAA,KAAA,GAAA,UAAA,CAAA,KAAA,CAAA,CAAA;AAAA,IAAA,MACxB;AAAwC,MAC1C,QAAA;AAEA,MAAM,MAAA;AAAA,MACJ,OAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA;AAAA,MACA,cAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,KACA,GAAA,eAAA,CAAA,KAAA,EAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAAA,IACA,MAAA,EAAA,QAAA,EAAA,QAAA,EAAA,GAAA,MAAA,CAAA,QAAA,CAAA,CAAA;AAAA,IACF,MAAI,CAAA;AAEJ,MAAA,YAAQ;AAER,MAAa,SAAA;AAAA,MACX,WAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,KACA,CAAA,CAAA;AAAA,IACA,OAAA,CAAA,IAAA,EAAA,MAAA,KAAA;AAAA,MACD,OAAAA,SAAA,EAAA,EAAAC,kBAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,96 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { useSliderButton } from './composables/use-slider-button.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import { placements } from '@popperjs/core';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
|
|
3
|
+
import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
|
|
4
|
+
import { isNumber } from '../../../utils/types.mjs';
|
|
7
5
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hovering: false,
|
|
20
|
-
dragging: false,
|
|
21
|
-
isClick: false,
|
|
22
|
-
startX: 0,
|
|
23
|
-
currentX: 0,
|
|
24
|
-
startY: 0,
|
|
25
|
-
currentY: 0,
|
|
26
|
-
startPosition: 0,
|
|
27
|
-
newPosition: 0,
|
|
28
|
-
oldValue: props.modelValue
|
|
29
|
-
});
|
|
30
|
-
const tooltipPersistent = computed(() => !showTooltip.value ? false : persistent.value);
|
|
31
|
-
const {
|
|
32
|
-
disabled,
|
|
33
|
-
button,
|
|
34
|
-
tooltip,
|
|
35
|
-
showTooltip,
|
|
36
|
-
persistent,
|
|
37
|
-
tooltipVisible,
|
|
38
|
-
wrapperStyle,
|
|
39
|
-
formatValue,
|
|
40
|
-
handleMouseEnter,
|
|
41
|
-
handleMouseLeave,
|
|
42
|
-
onButtonDown,
|
|
43
|
-
onKeyDown,
|
|
44
|
-
setPosition
|
|
45
|
-
} = useSliderButton(props, initData, emit);
|
|
46
|
-
const { hovering, dragging } = toRefs(initData);
|
|
47
|
-
expose({
|
|
48
|
-
onButtonDown,
|
|
49
|
-
onKeyDown,
|
|
50
|
-
setPosition,
|
|
51
|
-
hovering,
|
|
52
|
-
dragging
|
|
53
|
-
});
|
|
54
|
-
return (_ctx, _cache) => {
|
|
55
|
-
return openBlock(), createElementBlock("div", {
|
|
56
|
-
ref_key: "button",
|
|
57
|
-
ref: button,
|
|
58
|
-
class: normalizeClass([unref(ns).e("button-wrapper"), { hover: unref(hovering), dragging: unref(dragging) }]),
|
|
59
|
-
style: normalizeStyle(unref(wrapperStyle)),
|
|
60
|
-
tabindex: unref(disabled) ? void 0 : 0,
|
|
61
|
-
onMouseenter: unref(handleMouseEnter),
|
|
62
|
-
onMouseleave: unref(handleMouseLeave),
|
|
63
|
-
onMousedown: unref(onButtonDown),
|
|
64
|
-
onFocus: unref(handleMouseEnter),
|
|
65
|
-
onBlur: unref(handleMouseLeave),
|
|
66
|
-
onKeydown: unref(onKeyDown)
|
|
67
|
-
}, [
|
|
68
|
-
createVNode(unref(ElTooltip), {
|
|
69
|
-
ref_key: "tooltip",
|
|
70
|
-
ref: tooltip,
|
|
71
|
-
visible: unref(tooltipVisible),
|
|
72
|
-
placement: _ctx.placement,
|
|
73
|
-
"fallback-placements": ["top", "bottom", "right", "left"],
|
|
74
|
-
"stop-popper-mouse-event": false,
|
|
75
|
-
"popper-class": _ctx.tooltipClass,
|
|
76
|
-
disabled: !unref(showTooltip),
|
|
77
|
-
persistent: unref(tooltipPersistent)
|
|
78
|
-
}, {
|
|
79
|
-
content: withCtx(() => [
|
|
80
|
-
createElementVNode("span", null, toDisplayString(unref(formatValue)), 1)
|
|
81
|
-
]),
|
|
82
|
-
default: withCtx(() => [
|
|
83
|
-
createElementVNode("div", {
|
|
84
|
-
class: normalizeClass([unref(ns).e("button"), { hover: unref(hovering), dragging: unref(dragging) }])
|
|
85
|
-
}, null, 2)
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
}, 8, ["visible", "placement", "popper-class", "disabled", "persistent"])
|
|
89
|
-
], 46, ["tabindex", "onMouseenter", "onMouseleave", "onMousedown", "onFocus", "onBlur", "onKeydown"]);
|
|
90
|
-
};
|
|
6
|
+
const sliderButtonProps = buildProps({
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: Number,
|
|
9
|
+
default: 0
|
|
10
|
+
},
|
|
11
|
+
vertical: Boolean,
|
|
12
|
+
tooltipClass: String,
|
|
13
|
+
placement: {
|
|
14
|
+
type: String,
|
|
15
|
+
values: placements,
|
|
16
|
+
default: "top"
|
|
91
17
|
}
|
|
92
18
|
});
|
|
93
|
-
|
|
19
|
+
const sliderButtonEmits = {
|
|
20
|
+
[UPDATE_MODEL_EVENT]: (value) => isNumber(value)
|
|
21
|
+
};
|
|
94
22
|
|
|
95
|
-
export {
|
|
23
|
+
export { sliderButtonEmits, sliderButtonProps };
|
|
96
24
|
//# sourceMappingURL=button2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.
|
|
1
|
+
{"version":3,"file":"button2.mjs","sources":["../../../../../../packages/components/slider/src/button.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport { buildProps, isNumber } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type {\n ComponentPublicInstance,\n ExtractPropTypes,\n Ref,\n __ExtractPublicPropTypes,\n} from 'vue'\nimport type Button from './button.vue'\n\nexport const sliderButtonProps = buildProps({\n modelValue: {\n type: Number,\n default: 0,\n },\n vertical: Boolean,\n tooltipClass: String,\n placement: {\n type: String,\n values: placements,\n default: 'top',\n },\n} as const)\nexport type SliderButtonProps = ExtractPropTypes<typeof sliderButtonProps>\nexport type SliderButtonPropsPublic = __ExtractPublicPropTypes<\n typeof sliderButtonProps\n>\n\nexport const sliderButtonEmits = {\n [UPDATE_MODEL_EVENT]: (value: number) => isNumber(value),\n}\nexport type SliderButtonEmits = typeof sliderButtonEmits\n\nexport type SliderButtonInstance = ComponentPublicInstance<typeof Button>\n\nexport type ButtonRefs = Record<\n 'firstButton' | 'secondButton',\n Ref<SliderButtonInstance | undefined>\n>\n\nexport interface SliderButtonInitData {\n hovering: boolean\n dragging: boolean\n isClick: boolean\n startX: number\n currentX: number\n startY: number\n currentY: number\n startPosition: number\n newPosition: number\n oldValue: number\n}\n"],"names":[],"mappings":";;;;;AAGY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,YAAY,EAAE,MAAM;AACtB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,iBAAiB,GAAG;AACjC,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,QAAQ,CAAC,KAAK,CAAC;AAClD;;;;"}
|
|
@@ -3,7 +3,7 @@ import { useEventListener } from '@vueuse/core';
|
|
|
3
3
|
import { ElInputNumber } from '../../input-number/index.mjs';
|
|
4
4
|
import { sliderContextKey } from './constants.mjs';
|
|
5
5
|
import { sliderProps, sliderEmits } from './slider.mjs';
|
|
6
|
-
import SliderButton from './
|
|
6
|
+
import SliderButton from './button.mjs';
|
|
7
7
|
import SliderMarker from './marker.mjs';
|
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
9
|
import { useSlide } from './composables/use-slide.mjs';
|
|
@@ -169,6 +169,7 @@ var TableHeader = defineComponent({
|
|
|
169
169
|
key: `${column.id}-thead`,
|
|
170
170
|
rowspan: column.rowSpan,
|
|
171
171
|
scope: column.colSpan > 1 ? "colgroup" : "col",
|
|
172
|
+
ariaSort: column.sortable ? column.order : void 0,
|
|
172
173
|
style: getHeaderCellStyle(rowIndex, cellIndex, subColumns, column),
|
|
173
174
|
onClick: ($event) => {
|
|
174
175
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-header/index.ts"],"sourcesContent":["import {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useLocale } from '@element-plus/hooks/use-locale'\nimport FilterPanel from '../filter-panel.vue'\nimport useLayoutObserver from '../layout-observer'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useEvent from './event-helper'\nimport useStyle from './style.helper'\nimport useUtils from './utils-helper'\n\nimport type TableLayout from '../table-layout'\nimport type { ComponentInternalInstance, PropType, Ref } from 'vue'\nimport type { DefaultRow, Sort } from '../table/defaults'\nimport type { Store } from '../store'\n\nexport interface TableHeader extends ComponentInternalInstance {\n state: {\n onColumnsChange: (layout: TableLayout<any>) => void\n onScrollableChange: (layout: TableLayout<any>) => void\n }\n filterPanels: Ref<DefaultRow>\n}\nexport interface TableHeaderProps<T extends DefaultRow> {\n fixed: string\n store: Store<T>\n border: boolean\n defaultSort: Sort\n allowDragLastColumn: boolean\n}\n\nexport default defineComponent({\n name: 'ElTableHeader',\n components: {\n ElCheckbox,\n },\n props: {\n fixed: {\n type: String,\n default: '',\n },\n store: {\n required: true,\n type: Object as PropType<TableHeaderProps<any>['store']>,\n },\n border: Boolean,\n defaultSort: {\n type: Object as PropType<TableHeaderProps<any>['defaultSort']>,\n default: () => {\n return {\n prop: '',\n order: '',\n }\n },\n },\n appendFilterPanelTo: {\n type: String,\n },\n allowDragLastColumn: {\n type: Boolean,\n },\n },\n setup(props, { emit }) {\n const instance = getCurrentInstance() as TableHeader\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const filterPanels = ref({})\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n const isTableLayoutAuto = parent?.props.tableLayout === 'auto'\n const saveIndexSelection = reactive(new Map())\n const theadRef = ref()\n\n let delayId: ReturnType<typeof setTimeout> | undefined\n const updateFixedColumnStyle = () => {\n delayId = setTimeout(() => {\n if (saveIndexSelection.size > 0) {\n saveIndexSelection.forEach((column, key) => {\n const el = theadRef.value.querySelector(\n `.${key.replace(/\\s/g, '.')}`\n )\n if (el) {\n const width = el.getBoundingClientRect().width\n column.width = width || column.width\n }\n })\n saveIndexSelection.clear()\n }\n })\n }\n\n watch(saveIndexSelection, updateFixedColumnStyle)\n onBeforeUnmount(() => {\n if (delayId) {\n clearTimeout(delayId)\n delayId = undefined\n }\n })\n\n onMounted(async () => {\n // Need double await, because updateColumns is executed after nextTick for now\n await nextTick()\n await nextTick()\n const { prop, order } = props.defaultSort\n parent?.store.commit('sort', { prop, order, init: true })\n\n updateFixedColumnStyle()\n })\n\n const {\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick,\n } = useEvent(props as TableHeaderProps<any>, emit)\n const {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass,\n } = useStyle(props as TableHeaderProps<any>)\n const { isGroup, toggleAllSelection, columnRows } = useUtils(\n props as TableHeaderProps<any>\n )\n\n const { t } = useLocale()\n\n instance.state = {\n onColumnsChange,\n onScrollableChange,\n }\n instance.filterPanels = filterPanels\n\n return {\n ns,\n t,\n filterPanels,\n onColumnsChange,\n onScrollableChange,\n columnRows,\n getHeaderRowClass,\n getHeaderRowStyle,\n getHeaderCellClass,\n getHeaderCellStyle,\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick,\n isGroup,\n toggleAllSelection,\n saveIndexSelection,\n isTableLayoutAuto,\n theadRef,\n updateFixedColumnStyle,\n }\n },\n render() {\n const {\n ns,\n t,\n isGroup,\n columnRows,\n getHeaderCellStyle,\n getHeaderCellClass,\n getHeaderRowClass,\n getHeaderRowStyle,\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleSortClick,\n handleMouseOut,\n store,\n $parent,\n saveIndexSelection,\n isTableLayoutAuto,\n } = this\n let rowSpan = 1\n return h(\n 'thead',\n {\n ref: 'theadRef',\n class: ns.is('group', isGroup),\n },\n columnRows.map((subColumns, rowIndex) =>\n h(\n 'tr',\n {\n class: getHeaderRowClass(rowIndex),\n key: rowIndex,\n style: getHeaderRowStyle(rowIndex),\n },\n subColumns.map((column, cellIndex) => {\n if (column.rowSpan > rowSpan) {\n rowSpan = column.rowSpan\n }\n const _class = getHeaderCellClass(\n rowIndex,\n cellIndex,\n subColumns,\n column\n )\n if (isTableLayoutAuto && column.fixed) {\n saveIndexSelection.set(_class, column)\n }\n return h(\n 'th',\n {\n class: _class,\n colspan: column.colSpan,\n key: `${column.id}-thead`,\n rowspan: column.rowSpan,\n scope: column.colSpan > 1 ? 'colgroup' : 'col',\n style: getHeaderCellStyle(\n rowIndex,\n cellIndex,\n subColumns,\n column\n ),\n onClick: ($event: Event) => {\n if (\n ($event.currentTarget as Element)?.classList.contains(\n 'noclick'\n )\n ) {\n return\n }\n handleHeaderClick($event, column)\n },\n onContextmenu: ($event: MouseEvent) =>\n handleHeaderContextMenu($event, column),\n onMousedown: ($event: MouseEvent) =>\n handleMouseDown($event, column),\n onMousemove: ($event: MouseEvent) =>\n handleMouseMove($event, column),\n onMouseout: handleMouseOut,\n },\n [\n h(\n 'div',\n {\n class: [\n 'cell',\n column.filteredValue && column.filteredValue.length > 0\n ? 'highlight'\n : '',\n ],\n },\n [\n column.renderHeader\n ? column.renderHeader({\n column,\n $index: cellIndex,\n store,\n _self: $parent,\n })\n : column.label,\n column.sortable &&\n h(\n 'button',\n {\n type: 'button',\n class: 'caret-wrapper',\n 'aria-label': t('el.table.sortLabel', {\n column: column.label || '',\n }),\n onClick: ($event: Event) =>\n handleSortClick($event, column),\n },\n [\n h('i', {\n onClick: ($event: Event) =>\n handleSortClick($event, column, 'ascending'),\n class: 'sort-caret ascending',\n }),\n h('i', {\n onClick: ($event: Event) =>\n handleSortClick($event, column, 'descending'),\n class: 'sort-caret descending',\n }),\n ]\n ),\n column.filterable &&\n h(\n FilterPanel as any,\n {\n store,\n placement: column.filterPlacement || 'bottom-start',\n appendTo: ($parent as any)?.appendFilterPanelTo,\n column,\n upDataColumn: (key: never, value: never) => {\n column[key] = value\n },\n },\n {\n 'filter-icon': () =>\n column.renderFilterIcon\n ? column.renderFilterIcon({\n filterOpened: column.filterOpened,\n })\n : null,\n }\n ),\n ]\n ),\n ]\n )\n })\n )\n )\n )\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;;AAqBA,kBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,eAAe;AACvB,EAAE,UAAU,EAAE;AACd,IAAI,UAAU;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,KAAK,EAAE;AACX,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,OAAO,EAAE,EAAE;AACjB,KAAK;AACL,IAAI,KAAK,EAAE;AACX,MAAM,QAAQ,EAAE,IAAI;AACpB,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK;AACL,IAAI,MAAM,EAAE,OAAO;AACnB,IAAI,WA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a,CAAC,GAAG,IAAI;AACrB,WAAW,CAAC;AACZ,SAAS,CAAC;AACV,OAAO,CAAC,CAAC;AACT,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../packages/components/table/src/table-header/index.ts"],"sourcesContent":["import {\n defineComponent,\n getCurrentInstance,\n h,\n inject,\n nextTick,\n onBeforeUnmount,\n onMounted,\n reactive,\n ref,\n watch,\n} from 'vue'\nimport ElCheckbox from '@element-plus/components/checkbox'\nimport { useNamespace } from '@element-plus/hooks'\nimport { useLocale } from '@element-plus/hooks/use-locale'\nimport FilterPanel from '../filter-panel.vue'\nimport useLayoutObserver from '../layout-observer'\nimport { TABLE_INJECTION_KEY } from '../tokens'\nimport useEvent from './event-helper'\nimport useStyle from './style.helper'\nimport useUtils from './utils-helper'\n\nimport type TableLayout from '../table-layout'\nimport type { ComponentInternalInstance, PropType, Ref } from 'vue'\nimport type { DefaultRow, Sort } from '../table/defaults'\nimport type { Store } from '../store'\n\nexport interface TableHeader extends ComponentInternalInstance {\n state: {\n onColumnsChange: (layout: TableLayout<any>) => void\n onScrollableChange: (layout: TableLayout<any>) => void\n }\n filterPanels: Ref<DefaultRow>\n}\nexport interface TableHeaderProps<T extends DefaultRow> {\n fixed: string\n store: Store<T>\n border: boolean\n defaultSort: Sort\n allowDragLastColumn: boolean\n}\n\nexport default defineComponent({\n name: 'ElTableHeader',\n components: {\n ElCheckbox,\n },\n props: {\n fixed: {\n type: String,\n default: '',\n },\n store: {\n required: true,\n type: Object as PropType<TableHeaderProps<any>['store']>,\n },\n border: Boolean,\n defaultSort: {\n type: Object as PropType<TableHeaderProps<any>['defaultSort']>,\n default: () => {\n return {\n prop: '',\n order: '',\n }\n },\n },\n appendFilterPanelTo: {\n type: String,\n },\n allowDragLastColumn: {\n type: Boolean,\n },\n },\n setup(props, { emit }) {\n const instance = getCurrentInstance() as TableHeader\n const parent = inject(TABLE_INJECTION_KEY)\n const ns = useNamespace('table')\n const filterPanels = ref({})\n const { onColumnsChange, onScrollableChange } = useLayoutObserver(parent!)\n\n const isTableLayoutAuto = parent?.props.tableLayout === 'auto'\n const saveIndexSelection = reactive(new Map())\n const theadRef = ref()\n\n let delayId: ReturnType<typeof setTimeout> | undefined\n const updateFixedColumnStyle = () => {\n delayId = setTimeout(() => {\n if (saveIndexSelection.size > 0) {\n saveIndexSelection.forEach((column, key) => {\n const el = theadRef.value.querySelector(\n `.${key.replace(/\\s/g, '.')}`\n )\n if (el) {\n const width = el.getBoundingClientRect().width\n column.width = width || column.width\n }\n })\n saveIndexSelection.clear()\n }\n })\n }\n\n watch(saveIndexSelection, updateFixedColumnStyle)\n onBeforeUnmount(() => {\n if (delayId) {\n clearTimeout(delayId)\n delayId = undefined\n }\n })\n\n onMounted(async () => {\n // Need double await, because updateColumns is executed after nextTick for now\n await nextTick()\n await nextTick()\n const { prop, order } = props.defaultSort\n parent?.store.commit('sort', { prop, order, init: true })\n\n updateFixedColumnStyle()\n })\n\n const {\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick,\n } = useEvent(props as TableHeaderProps<any>, emit)\n const {\n getHeaderRowStyle,\n getHeaderRowClass,\n getHeaderCellStyle,\n getHeaderCellClass,\n } = useStyle(props as TableHeaderProps<any>)\n const { isGroup, toggleAllSelection, columnRows } = useUtils(\n props as TableHeaderProps<any>\n )\n\n const { t } = useLocale()\n\n instance.state = {\n onColumnsChange,\n onScrollableChange,\n }\n instance.filterPanels = filterPanels\n\n return {\n ns,\n t,\n filterPanels,\n onColumnsChange,\n onScrollableChange,\n columnRows,\n getHeaderRowClass,\n getHeaderRowStyle,\n getHeaderCellClass,\n getHeaderCellStyle,\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleMouseOut,\n handleSortClick,\n handleFilterClick,\n isGroup,\n toggleAllSelection,\n saveIndexSelection,\n isTableLayoutAuto,\n theadRef,\n updateFixedColumnStyle,\n }\n },\n render() {\n const {\n ns,\n t,\n isGroup,\n columnRows,\n getHeaderCellStyle,\n getHeaderCellClass,\n getHeaderRowClass,\n getHeaderRowStyle,\n handleHeaderClick,\n handleHeaderContextMenu,\n handleMouseDown,\n handleMouseMove,\n handleSortClick,\n handleMouseOut,\n store,\n $parent,\n saveIndexSelection,\n isTableLayoutAuto,\n } = this\n let rowSpan = 1\n return h(\n 'thead',\n {\n ref: 'theadRef',\n class: ns.is('group', isGroup),\n },\n columnRows.map((subColumns, rowIndex) =>\n h(\n 'tr',\n {\n class: getHeaderRowClass(rowIndex),\n key: rowIndex,\n style: getHeaderRowStyle(rowIndex),\n },\n subColumns.map((column, cellIndex) => {\n if (column.rowSpan > rowSpan) {\n rowSpan = column.rowSpan\n }\n const _class = getHeaderCellClass(\n rowIndex,\n cellIndex,\n subColumns,\n column\n )\n if (isTableLayoutAuto && column.fixed) {\n saveIndexSelection.set(_class, column)\n }\n return h(\n 'th',\n {\n class: _class,\n colspan: column.colSpan,\n key: `${column.id}-thead`,\n rowspan: column.rowSpan,\n scope: column.colSpan > 1 ? 'colgroup' : 'col',\n ariaSort: column.sortable ? column.order : undefined,\n style: getHeaderCellStyle(\n rowIndex,\n cellIndex,\n subColumns,\n column\n ),\n onClick: ($event: Event) => {\n if (\n ($event.currentTarget as Element)?.classList.contains(\n 'noclick'\n )\n ) {\n return\n }\n handleHeaderClick($event, column)\n },\n onContextmenu: ($event: MouseEvent) =>\n handleHeaderContextMenu($event, column),\n onMousedown: ($event: MouseEvent) =>\n handleMouseDown($event, column),\n onMousemove: ($event: MouseEvent) =>\n handleMouseMove($event, column),\n onMouseout: handleMouseOut,\n },\n [\n h(\n 'div',\n {\n class: [\n 'cell',\n column.filteredValue && column.filteredValue.length > 0\n ? 'highlight'\n : '',\n ],\n },\n [\n column.renderHeader\n ? column.renderHeader({\n column,\n $index: cellIndex,\n store,\n _self: $parent,\n })\n : column.label,\n column.sortable &&\n h(\n 'button',\n {\n type: 'button',\n class: 'caret-wrapper',\n 'aria-label': t('el.table.sortLabel', {\n column: column.label || '',\n }),\n onClick: ($event: Event) =>\n handleSortClick($event, column),\n },\n [\n h('i', {\n onClick: ($event: Event) =>\n handleSortClick($event, column, 'ascending'),\n class: 'sort-caret ascending',\n }),\n h('i', {\n onClick: ($event: Event) =>\n handleSortClick($event, column, 'descending'),\n class: 'sort-caret descending',\n }),\n ]\n ),\n column.filterable &&\n h(\n FilterPanel as any,\n {\n store,\n placement: column.filterPlacement || 'bottom-start',\n appendTo: ($parent as any)?.appendFilterPanelTo,\n column,\n upDataColumn: (key: never, value: never) => {\n column[key] = value\n },\n },\n {\n 'filter-icon': () =>\n column.renderFilterIcon\n ? column.renderFilterIcon({\n filterOpened: column.filterOpened,\n })\n : null,\n }\n ),\n ]\n ),\n ]\n )\n })\n )\n )\n )\n },\n})\n"],"names":[],"mappings":";;;;;;;;;;;AAqBA,kBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,eAAe;AACvB,EAAE,UAAU,EAAE;AACd,IAAI,UAAU;AACd,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,KAAK,EAAE;AACX,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,OAAO,EAAE,EAAE;AACjB,KAAK;AACL,IAAI,KAAK,EAAE;AACX,MAAM,QAAQ,EAAE,IAAI;AACpB,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK;AACL,IAAI,MAAM,EAAE,OAAO;AACnB,IAAI,WAAW,EAAE;AACjB,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,OAAO,EAAE,MAAM;AACrB,QAAQ,OAAO;AACf,UAAU,IAAI,EAAE,EAAE;AAClB,UAAU,KAAK,EAAE,EAAE;AACnB,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL,IAAI,mBAAmB,EAAE;AACzB,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK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,6 +3,7 @@ import type { TableV2RowCellRenderParam } from './row';
|
|
|
3
3
|
declare const ExpandIcon: (props: TableV2RowCellRenderParam["expandIconProps"] & {
|
|
4
4
|
class?: string | string[];
|
|
5
5
|
style: StyleValue;
|
|
6
|
+
ariaLabel?: string;
|
|
6
7
|
size: number;
|
|
7
8
|
expanded: boolean;
|
|
8
9
|
expandable: boolean;
|
|
@@ -8,18 +8,23 @@ const ExpandIcon = (props) => {
|
|
|
8
8
|
expandable,
|
|
9
9
|
onExpand,
|
|
10
10
|
style,
|
|
11
|
-
size
|
|
11
|
+
size,
|
|
12
|
+
ariaLabel
|
|
12
13
|
} = props;
|
|
13
14
|
const expandIconProps = {
|
|
14
15
|
onClick: expandable ? () => onExpand(!expanded) : void 0,
|
|
16
|
+
ariaLabel,
|
|
17
|
+
ariaExpanded: expanded,
|
|
15
18
|
class: props.class
|
|
16
19
|
};
|
|
17
|
-
return createVNode(
|
|
20
|
+
return createVNode("button", mergeProps(expandIconProps, {
|
|
21
|
+
"type": "button"
|
|
22
|
+
}), [createVNode(ElIcon, {
|
|
18
23
|
"size": size,
|
|
19
24
|
"style": style
|
|
20
|
-
}
|
|
25
|
+
}, {
|
|
21
26
|
default: () => [createVNode(ArrowRight, null, null)]
|
|
22
|
-
});
|
|
27
|
+
})]);
|
|
23
28
|
};
|
|
24
29
|
var ExpandIcon$1 = ExpandIcon;
|
|
25
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expand-icon.mjs","sources":["../../../../../../../packages/components/table-v2/src/components/expand-icon.tsx"],"sourcesContent":["import ElIcon from '@element-plus/components/icon'\nimport { ArrowRight } from '@element-plus/icons-vue'\n\nimport type { StyleValue } from 'vue'\nimport type { TableV2RowCellRenderParam } from './row'\n\nconst ExpandIcon = (\n props: TableV2RowCellRenderParam['expandIconProps'] & {\n class?: string | string[]\n style: StyleValue\n size: number\n expanded: boolean\n expandable: boolean\n }\n) => {\n const { expanded, expandable, onExpand, style, size } = props\n\n const expandIconProps = {\n onClick: expandable ? () => onExpand(!expanded) : undefined,\n class: props.class,\n } as any\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"expand-icon.mjs","sources":["../../../../../../../packages/components/table-v2/src/components/expand-icon.tsx"],"sourcesContent":["import ElIcon from '@element-plus/components/icon'\nimport { ArrowRight } from '@element-plus/icons-vue'\n\nimport type { StyleValue } from 'vue'\nimport type { TableV2RowCellRenderParam } from './row'\n\nconst ExpandIcon = (\n props: TableV2RowCellRenderParam['expandIconProps'] & {\n class?: string | string[]\n style: StyleValue\n ariaLabel?: string\n size: number\n expanded: boolean\n expandable: boolean\n }\n) => {\n const { expanded, expandable, onExpand, style, size, ariaLabel } = props\n\n const expandIconProps = {\n onClick: expandable ? () => onExpand(!expanded) : undefined,\n ariaLabel,\n ariaExpanded: expanded,\n class: props.class,\n } as any\n\n return (\n <button {...expandIconProps} type=\"button\">\n <ElIcon size={size} style={style}>\n <ArrowRight />\n </ElIcon>\n </button>\n )\n}\n\nexport default ExpandIcon\n\nexport type ExpandIconInstance = ReturnType<typeof ExpandIcon>\n"],"names":["ExpandIcon","expanded","expandable","onExpand","style","size","ariaLabel","onClick","ariaExpanded","class","_createVNode","_mergeProps"],"mappings":";;;;;AAMA,EAAMA,MAAAA;IAUE,QAAA;IAAEC,UAAF;IAAYC,QAAZ;IAAwBC,KAAxB;IAAkCC,IAAlC;IAAyCC,SAAzC;AAA+CC,GAAAA,GAAAA,KAAAA,CAAAA;AAA/C,EAAA,MAAN,eAAA,GAAA;AAEA,IAAA,mBAAqB,GAAG,MAAA,QAAA,CAAA,CAAA,QAAA,CAAA,GAAA,KAAA,CAAA;IACtBC,SAASL;IACTI,YAFsB,EAAA,QAAA;AAGtBE,IAAAA,KAAAA,EAAAA,KAAY,MAHU;IAItBC;EAJsB,OAAxBC,WAAA,CAAA,QAAA,EAAAC,UAAA,CAAA,eAAA,EAAA;AAOA,IAAA,MAAA,EAAA,QAAA;IAAA,EACoC,CAAAD,WAAA,CAAA,MAAA,EAAA;AADpC,IAAA,MAAA,EAAA,IAAA;AAAA,IAAA,OAAA,EAAA,KAAA;KAE+BN;AAF/B,IAAA,OAAA,EAAA,MAAA,CAAAM,WAAA,CAAA,UAAA,EAAA,IAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA;AAOD,mBA1BD,UAAA;;;;"}
|
|
@@ -2,6 +2,7 @@ import { SortOrder } from '../constants';
|
|
|
2
2
|
import type { FunctionalComponent } from 'vue';
|
|
3
3
|
export type SortIconProps = {
|
|
4
4
|
sortOrder: SortOrder;
|
|
5
|
+
ariaLabel?: string;
|
|
5
6
|
class?: JSX.IntrinsicAttributes['class'];
|
|
6
7
|
};
|
|
7
8
|
declare const SortIcon: FunctionalComponent<SortIconProps>;
|
|
@@ -7,12 +7,15 @@ const SortIcon = (props) => {
|
|
|
7
7
|
const {
|
|
8
8
|
sortOrder
|
|
9
9
|
} = props;
|
|
10
|
-
return createVNode(
|
|
11
|
-
"
|
|
10
|
+
return createVNode("button", {
|
|
11
|
+
"type": "button",
|
|
12
|
+
"aria-label": props.ariaLabel,
|
|
12
13
|
"class": props.class
|
|
14
|
+
}, [createVNode(ElIcon, {
|
|
15
|
+
"size": 14
|
|
13
16
|
}, {
|
|
14
17
|
default: () => [sortOrder === SortOrder.ASC ? createVNode(SortUp, null, null) : createVNode(SortDown, null, null)]
|
|
15
|
-
});
|
|
18
|
+
})]);
|
|
16
19
|
};
|
|
17
20
|
var SortIcon$1 = SortIcon;
|
|
18
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-icon.mjs","sources":["../../../../../../../packages/components/table-v2/src/components/sort-icon.tsx"],"sourcesContent":["import ElIcon from '@element-plus/components/icon'\nimport { SortDown, SortUp } from '@element-plus/icons-vue'\nimport { SortOrder } from '../constants'\n\nimport type { FunctionalComponent } from 'vue'\n\nexport type SortIconProps = {\n sortOrder: SortOrder\n class?: JSX.IntrinsicAttributes['class']\n}\n\nconst SortIcon: FunctionalComponent<SortIconProps> = (props) => {\n const { sortOrder } = props\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"sort-icon.mjs","sources":["../../../../../../../packages/components/table-v2/src/components/sort-icon.tsx"],"sourcesContent":["import ElIcon from '@element-plus/components/icon'\nimport { SortDown, SortUp } from '@element-plus/icons-vue'\nimport { SortOrder } from '../constants'\n\nimport type { FunctionalComponent } from 'vue'\n\nexport type SortIconProps = {\n sortOrder: SortOrder\n ariaLabel?: string\n class?: JSX.IntrinsicAttributes['class']\n}\n\nconst SortIcon: FunctionalComponent<SortIconProps> = (props) => {\n const { sortOrder } = props\n\n return (\n <button type=\"button\" aria-label={props.ariaLabel} class={props.class}>\n <ElIcon size={14}>\n {sortOrder === SortOrder.ASC ? <SortUp /> : <SortDown />}\n </ElIcon>\n </button>\n )\n}\n\nexport default SortIcon\n"],"names":["SortIcon","sortOrder","_createVNode","props","ariaLabel","class"],"mappings":";;;;;;AAYA,EAAMA,MAAAA;IACE,SAAA;AAAEC,GAAAA,GAAAA,KAAAA,CAAAA;AAAF,EAAA,OAANC,WAAA,CAAA,QAAA,EAAA;AAEA,IAAA,MAAA,EAAA,QAAA;AAAA,IAAA,YAAA,EAAA,KAAA,CAAA,SAAA;IAAA,OACoCC,EAAAA,KAAAA,CAAAA,KAAMC;AAD1C,GAAA,EAAA,CAAAF,WACiE,CAACG,MAAAA,EAAAA;AADlE,IAAA,MAAA,EAAA,EAAA;KAEkB;AAFlB,IAAA,OAAA,EAAA,MAAA,CAAA,SAAA,KAAA,SAAA,CAAA,GAAA,GAAAH,WAAA,CAAA,MAAA,EAAA,IAAA,EAAA,IAAA,CAAA,GAAAA,WAAA,CAAA,QAAA,EAAA,IAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA;AAOD,iBAVD,QAAA;;;;"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { FunctionalComponent, UnwrapNestedRefs } from 'vue';
|
|
2
2
|
import type { TableV2RowCellRenderParam } from '../components';
|
|
3
|
-
import type { UseNamespaceReturn } from '@element-plus/nightly/es/hooks';
|
|
3
|
+
import type { Translator, UseNamespaceReturn } from '@element-plus/nightly/es/hooks';
|
|
4
4
|
import type { UseTableReturn } from '../use-table';
|
|
5
5
|
import type { TableV2Props } from '../table';
|
|
6
6
|
type CellRendererProps = TableV2RowCellRenderParam & Pick<TableV2Props, 'cellProps' | 'expandColumnKey' | 'indentSize' | 'iconSize' | 'rowKey'> & UnwrapNestedRefs<Pick<UseTableReturn, 'expandedRowKeys'>> & {
|
|
7
7
|
ns: UseNamespaceReturn;
|
|
8
|
+
t: Translator;
|
|
8
9
|
};
|
|
9
10
|
declare const CellRenderer: FunctionalComponent<CellRendererProps>;
|
|
10
11
|
export default CellRenderer;
|
|
@@ -19,6 +19,7 @@ const CellRenderer = ({
|
|
|
19
19
|
style,
|
|
20
20
|
expandedRowKeys,
|
|
21
21
|
ns,
|
|
22
|
+
t,
|
|
22
23
|
cellProps: _cellProps,
|
|
23
24
|
expandColumnKey,
|
|
24
25
|
indentSize,
|
|
@@ -77,6 +78,7 @@ const CellRenderer = ({
|
|
|
77
78
|
"class": [ns.e("expand-icon"), ns.is("expanded", expanded)],
|
|
78
79
|
"size": iconSize,
|
|
79
80
|
"expanded": expanded,
|
|
81
|
+
"ariaLabel": t(expanded ? "el.table.collapseRowLabel" : "el.table.expandRowLabel"),
|
|
80
82
|
"style": iconStyle,
|
|
81
83
|
"expandable": true
|
|
82
84
|
}), null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.mjs","sources":["../../../../../../../packages/components/table-v2/src/renderers/cell.tsx"],"sourcesContent":["import { renderSlot } from 'vue'\nimport { get } from 'lodash-unified'\nimport { isFunction, isObject } from '@element-plus/utils'\nimport { ExpandIcon, TableCell } from '../components'\nimport { Alignment } from '../constants'\nimport { placeholderSign } from '../private'\nimport { componentToSlot, enforceUnit, tryCall } from '../utils'\n\nimport type { FunctionalComponent, UnwrapNestedRefs, VNode } from 'vue'\nimport type { TableV2RowCellRenderParam } from '../components'\nimport type { UseNamespaceReturn } from '@element-plus/hooks'\nimport type { UseTableReturn } from '../use-table'\nimport type { TableV2Props } from '../table'\n\ntype CellRendererProps = TableV2RowCellRenderParam &\n Pick<\n TableV2Props,\n 'cellProps' | 'expandColumnKey' | 'indentSize' | 'iconSize' | 'rowKey'\n > &\n UnwrapNestedRefs<Pick<UseTableReturn, 'expandedRowKeys'>> & {\n ns: UseNamespaceReturn\n }\n\nconst CellRenderer: FunctionalComponent<CellRendererProps> = (\n {\n // renderer props\n columns,\n column,\n columnIndex,\n depth,\n expandIconProps,\n isScrolling,\n rowData,\n rowIndex,\n // from use-table\n style,\n expandedRowKeys,\n ns,\n // derived props\n cellProps: _cellProps,\n expandColumnKey,\n indentSize,\n iconSize,\n rowKey,\n },\n { slots }\n) => {\n const cellStyle = enforceUnit(style)\n\n if (column.placeholderSign === placeholderSign) {\n return <div class={ns.em('row-cell', 'placeholder')} style={cellStyle} />\n }\n const { cellRenderer, dataKey, dataGetter } = column\n\n const cellData = isFunction(dataGetter)\n ? dataGetter({ columns, column, columnIndex, rowData, rowIndex })\n : get(rowData, dataKey ?? '')\n\n const extraCellProps = tryCall(_cellProps, {\n cellData,\n columns,\n column,\n columnIndex,\n rowIndex,\n rowData,\n })\n\n const cellProps = {\n class: ns.e('cell-text'),\n columns,\n column,\n columnIndex,\n cellData,\n isScrolling,\n rowData,\n rowIndex,\n }\n const columnCellRenderer = componentToSlot<typeof cellProps>(cellRenderer)\n const Cell = columnCellRenderer\n ? columnCellRenderer(cellProps)\n : renderSlot(slots, 'default', cellProps, () => [\n <TableCell {...cellProps}></TableCell>,\n ])\n\n const kls = [\n ns.e('row-cell'),\n column.class,\n column.align === Alignment.CENTER && ns.is('align-center'),\n column.align === Alignment.RIGHT && ns.is('align-right'),\n ]\n\n const expandable =\n rowIndex >= 0 && expandColumnKey && column.key === expandColumnKey\n const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey])\n\n let IconOrPlaceholder: VNode | undefined\n const iconStyle = `margin-inline-start: ${depth * indentSize}px;`\n if (expandable) {\n if (isObject(expandIconProps)) {\n IconOrPlaceholder = (\n <ExpandIcon\n {...expandIconProps}\n class={[ns.e('expand-icon'), ns.is('expanded', expanded)]}\n size={iconSize}\n expanded={expanded}\n style={iconStyle}\n expandable\n />\n )\n } else {\n IconOrPlaceholder = (\n <div\n style={[\n iconStyle,\n `width: ${iconSize}px; height: ${iconSize}px;`,\n ].join(' ')}\n />\n )\n }\n }\n\n return (\n <div class={kls} style={cellStyle} {...extraCellProps} role=\"cell\">\n {IconOrPlaceholder}\n {Cell}\n </div>\n )\n}\n\nCellRenderer.inheritAttrs = false\n\nexport default CellRenderer\n"],"names":["CellRenderer","columns","column","columnIndex","depth","expandIconProps","isScrolling","rowData","rowIndex","style","expandedRowKeys","ns","cellProps","indentSize","rowKey","slots","cellStyle","cellRenderer","dataKey","dataGetter","cellData","class","_createVNode","columnCellRenderer","Cell","kls","expandColumnKey","_mergeProps","expanded","includes","iconStyle","isObject","IconOrPlaceholder"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"cell.mjs","sources":["../../../../../../../packages/components/table-v2/src/renderers/cell.tsx"],"sourcesContent":["import { renderSlot } from 'vue'\nimport { get } from 'lodash-unified'\nimport { isFunction, isObject } from '@element-plus/utils'\nimport { ExpandIcon, TableCell } from '../components'\nimport { Alignment } from '../constants'\nimport { placeholderSign } from '../private'\nimport { componentToSlot, enforceUnit, tryCall } from '../utils'\n\nimport type { FunctionalComponent, UnwrapNestedRefs, VNode } from 'vue'\nimport type { TableV2RowCellRenderParam } from '../components'\nimport type { Translator, UseNamespaceReturn } from '@element-plus/hooks'\nimport type { UseTableReturn } from '../use-table'\nimport type { TableV2Props } from '../table'\n\ntype CellRendererProps = TableV2RowCellRenderParam &\n Pick<\n TableV2Props,\n 'cellProps' | 'expandColumnKey' | 'indentSize' | 'iconSize' | 'rowKey'\n > &\n UnwrapNestedRefs<Pick<UseTableReturn, 'expandedRowKeys'>> & {\n ns: UseNamespaceReturn\n t: Translator\n }\n\nconst CellRenderer: FunctionalComponent<CellRendererProps> = (\n {\n // renderer props\n columns,\n column,\n columnIndex,\n depth,\n expandIconProps,\n isScrolling,\n rowData,\n rowIndex,\n // from use-table\n style,\n expandedRowKeys,\n ns,\n t,\n // derived props\n cellProps: _cellProps,\n expandColumnKey,\n indentSize,\n iconSize,\n rowKey,\n },\n { slots }\n) => {\n const cellStyle = enforceUnit(style)\n\n if (column.placeholderSign === placeholderSign) {\n return <div class={ns.em('row-cell', 'placeholder')} style={cellStyle} />\n }\n const { cellRenderer, dataKey, dataGetter } = column\n\n const cellData = isFunction(dataGetter)\n ? dataGetter({ columns, column, columnIndex, rowData, rowIndex })\n : get(rowData, dataKey ?? '')\n\n const extraCellProps = tryCall(_cellProps, {\n cellData,\n columns,\n column,\n columnIndex,\n rowIndex,\n rowData,\n })\n\n const cellProps = {\n class: ns.e('cell-text'),\n columns,\n column,\n columnIndex,\n cellData,\n isScrolling,\n rowData,\n rowIndex,\n }\n const columnCellRenderer = componentToSlot<typeof cellProps>(cellRenderer)\n const Cell = columnCellRenderer\n ? columnCellRenderer(cellProps)\n : renderSlot(slots, 'default', cellProps, () => [\n <TableCell {...cellProps}></TableCell>,\n ])\n\n const kls = [\n ns.e('row-cell'),\n column.class,\n column.align === Alignment.CENTER && ns.is('align-center'),\n column.align === Alignment.RIGHT && ns.is('align-right'),\n ]\n\n const expandable =\n rowIndex >= 0 && expandColumnKey && column.key === expandColumnKey\n const expanded = rowIndex >= 0 && expandedRowKeys.includes(rowData[rowKey])\n\n let IconOrPlaceholder: VNode | undefined\n const iconStyle = `margin-inline-start: ${depth * indentSize}px;`\n if (expandable) {\n if (isObject(expandIconProps)) {\n IconOrPlaceholder = (\n <ExpandIcon\n {...expandIconProps}\n class={[ns.e('expand-icon'), ns.is('expanded', expanded)]}\n size={iconSize}\n expanded={expanded}\n ariaLabel={t(\n expanded ? 'el.table.collapseRowLabel' : 'el.table.expandRowLabel'\n )}\n style={iconStyle}\n expandable\n />\n )\n } else {\n IconOrPlaceholder = (\n <div\n style={[\n iconStyle,\n `width: ${iconSize}px; height: ${iconSize}px;`,\n ].join(' ')}\n />\n )\n }\n }\n\n return (\n <div class={kls} style={cellStyle} {...extraCellProps} role=\"cell\">\n {IconOrPlaceholder}\n {Cell}\n </div>\n )\n}\n\nCellRenderer.inheritAttrs = false\n\nexport default CellRenderer\n"],"names":["CellRenderer","columns","column","columnIndex","depth","expandIconProps","isScrolling","rowData","rowIndex","style","expandedRowKeys","ns","t","cellProps","indentSize","rowKey","slots","cellStyle","cellRenderer","dataKey","dataGetter","cellData","class","_createVNode","columnCellRenderer","Cell","kls","expandColumnKey","_mergeProps","expanded","includes","iconStyle","isObject","IconOrPlaceholder"],"mappings":";;;;;;;;;;AAwBA,EAAMA,OAAAA;AAEF,EAAA,MAAA;EACAC,WAFF;EAGEC,KAHF;EAIEC,eAJF;EAKEC,WALF;EAMEC,OANF;EAOEC,QAPF;EAQEC,KARF;EASEC,eATF;AAUE,EAAA,EAAA;EACAC,CAXF;EAYEC,SAZF,EAAA,UAAA;EAaEC,eAbF;EAcEC,UAdF;AAeE,EAAA,QAAA;AACAC,EAAAA,MAAAA;GAhBF;EAkBEC,KAlBF;MAAA;AAoBEC,EAAAA,MAAAA,SAAAA,GAAAA,WAAAA,CAAAA,KAAAA,CAAAA,CAAAA;AApBF,EAsBA,IAAA,MAAA,CAAA,eAAA,KAAA,eAAA,EAAA;AAAEC,IAAAA,OAAAA,WAAAA,CAAAA,KAAAA,EAAAA;AAAF,MACG,OAAA,EAAA,EAAA,CAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA;AACH,MAAA,OAAe,EAAA,SAAc;;AAE7B,GAAA;AACE,EAAA,MAAA;AAAA,IAAA;WAA4DC;AAA5D,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