@element-plus/nightly 0.0.20220103 → 0.0.20220107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +7985 -7058
- package/dist/index.full.min.js +11 -11
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +11 -11
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +7960 -7050
- package/es/components/autocomplete/index.d.ts +26 -18
- package/es/components/autocomplete/src/index.vue.d.ts +13 -10
- package/es/components/autocomplete/src/index.vue_vue_type_script_lang.mjs +14 -18
- package/es/components/autocomplete/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.mjs +52 -49
- package/es/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.mjs.map +1 -1
- package/es/components/carousel/index.d.ts +4 -4
- package/es/components/carousel/src/main.vue.d.ts +4 -4
- package/es/components/cascader/index.d.ts +1118 -6532
- package/es/components/cascader/src/index.vue.d.ts +559 -3267
- package/es/components/cascader/src/index.vue_vue_type_script_lang.mjs +10 -10
- package/es/components/cascader/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.mjs +12 -12
- package/es/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs +3 -0
- package/es/components/cascader-panel/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_template_id_97c48f5c_lang.mjs.map +1 -1
- package/es/components/checkbox/index.d.ts +1 -1
- package/es/components/checkbox/src/checkbox.vue.d.ts +1 -1
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.mjs +7 -13
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.mjs +2 -2
- package/es/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.mjs.map +1 -1
- package/es/components/collection/index.d.ts +2 -0
- package/es/components/collection/index.mjs +3 -0
- package/es/components/{popper/src → collection}/index.mjs.map +1 -1
- package/es/components/collection/src/collection-item.mjs +7 -0
- package/es/components/collection/src/collection-item.mjs.map +1 -0
- package/es/components/collection/src/collection-item.vue.d.ts +2 -0
- package/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs +9 -0
- package/es/components/collection/src/collection-item.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.mjs +8 -0
- package/es/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.mjs.map +1 -0
- package/es/components/collection/src/collection.d.ts +263 -0
- package/es/components/collection/src/collection.mjs +68 -0
- package/es/components/collection/src/collection.mjs.map +1 -0
- package/es/components/collection/src/collection.vue.d.ts +2 -0
- package/es/components/collection/src/collection.vue_vue_type_script_lang.mjs +8 -0
- package/es/components/collection/src/collection.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.mjs +8 -0
- package/es/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.mjs.map +1 -0
- package/es/components/collection/src/collection2.mjs +7 -0
- package/es/components/collection/src/collection2.mjs.map +1 -0
- package/es/components/collection/src/tokens.d.ts +12 -0
- package/es/components/collection/src/tokens.mjs +2 -0
- package/es/components/collection/src/tokens.mjs.map +1 -0
- package/es/components/color-picker/index.d.ts +0 -2
- package/es/components/color-picker/src/index.vue.d.ts +0 -2
- package/es/components/color-picker/src/index.vue_vue_type_script_lang.mjs +2 -4
- package/es/components/color-picker/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.mjs +9 -10
- package/es/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.mjs.map +1 -1
- package/es/components/date-picker/index.d.ts +4 -4
- package/es/components/date-picker/src/date-picker.d.ts +2 -2
- package/es/components/descriptions/index.d.ts +4 -4
- package/es/components/descriptions/src/description-item.d.ts +2 -2
- package/es/components/dialog/index.d.ts +5 -5
- package/es/components/dialog/src/dialog.vue.d.ts +5 -5
- package/es/components/drawer/index.d.ts +5 -5
- package/es/components/drawer/src/drawer.vue.d.ts +5 -5
- package/es/components/dropdown/index.d.ts +767 -84
- package/es/components/dropdown/src/dropdown-item-impl.mjs +7 -0
- package/es/components/dropdown/src/dropdown-item-impl.mjs.map +1 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue.d.ts +39 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs +53 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.mjs +33 -0
- package/es/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.mjs.map +1 -0
- package/es/components/dropdown/src/dropdown-item.vue.d.ts +17 -9
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs +51 -21
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.mjs +30 -20
- package/es/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.vue.d.ts +17 -6
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs +59 -23
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.mjs +12 -9
- package/es/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.d.ts +295 -1
- package/es/components/dropdown/src/dropdown.mjs +84 -0
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue.d.ts +712 -73
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs +60 -153
- package/es/components/dropdown/src/dropdown.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.mjs +92 -52
- package/es/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.mjs.map +1 -1
- package/es/components/dropdown/src/tokens.d.ts +8 -0
- package/es/components/dropdown/src/tokens.mjs +4 -0
- package/es/components/dropdown/src/tokens.mjs.map +1 -0
- package/es/components/focus-trap/index.d.ts +5 -0
- package/es/components/focus-trap/index.mjs +6 -0
- package/es/components/focus-trap/index.mjs.map +1 -0
- package/es/components/focus-trap/src/focus-trap.mjs +7 -0
- package/es/components/focus-trap/src/focus-trap.mjs.map +1 -0
- package/es/components/focus-trap/src/focus-trap.vue.d.ts +21 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs +137 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.mjs +8 -0
- package/es/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.mjs.map +1 -0
- package/es/components/focus-trap/src/tokens.d.ts +11 -0
- package/es/components/focus-trap/src/tokens.mjs +12 -0
- package/es/components/focus-trap/src/tokens.mjs.map +1 -0
- package/es/components/focus-trap/src/utils.d.ts +18 -0
- package/es/components/focus-trap/src/utils.mjs +92 -0
- package/es/components/focus-trap/src/utils.mjs.map +1 -0
- package/es/components/image/index.d.ts +2 -2
- package/es/components/image/src/image.vue.d.ts +2 -2
- package/es/components/index.mjs +7 -6
- package/es/components/index.mjs.map +1 -1
- package/es/components/input/index.d.ts +5 -5
- package/es/components/input/src/input.vue.d.ts +5 -5
- package/es/components/input-number/index.d.ts +14 -12
- package/es/components/input-number/src/input-number.vue.d.ts +14 -12
- package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs +15 -1
- package/es/components/input-number/src/input-number.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.mjs +5 -4
- package/es/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.mjs.map +1 -1
- package/es/components/menu/index.d.ts +9 -3
- package/es/components/menu/src/menu-item.vue.d.ts +4 -2
- package/es/components/menu/src/menu-item.vue_vue_type_script_lang.mjs +3 -3
- package/es/components/menu/src/menu-item.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/menu/src/menu.d.ts +1 -1
- package/es/components/menu/src/menu.mjs +2 -1
- package/es/components/menu/src/menu.mjs.map +1 -1
- package/es/components/menu/src/sub-menu.mjs +18 -21
- package/es/components/menu/src/sub-menu.mjs.map +1 -1
- package/es/components/menu/src/types.d.ts +2 -0
- package/es/components/message-box/src/index.vue.d.ts +2 -2
- package/es/components/message-box/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.mjs +1 -0
- package/es/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +2 -2
- package/es/components/pagination/src/pagination.d.ts +2 -2
- package/es/components/popconfirm/index.d.ts +19 -12
- package/es/components/popconfirm/index.mjs +1 -1
- package/es/components/popconfirm/src/popconfirm.d.ts +3 -5
- package/es/components/popconfirm/src/popconfirm.mjs +11 -5
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +19 -13
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.mjs +22 -20
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.mjs +12 -13
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.mjs.map +1 -1
- package/es/components/popover/index.d.ts +1690 -420
- package/es/components/popover/src/directive.mjs +7 -13
- package/es/components/popover/src/directive.mjs.map +1 -1
- package/es/components/popover/src/index.mjs +2 -0
- package/es/components/popover/src/index.mjs.map +1 -1
- package/es/components/popover/src/index.vue.d.ts +846 -213
- package/es/components/popover/src/index.vue_vue_type_script_lang.mjs +41 -107
- package/es/components/popover/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.mjs +31 -0
- package/es/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.mjs.map +1 -0
- package/es/components/popover/src/popover.d.ts +70 -0
- package/es/components/popover/src/popover.mjs +31 -0
- package/es/components/popover/src/popover.mjs.map +1 -0
- package/es/components/popper/index.d.ts +7 -3479
- package/es/components/popper/index.mjs +13 -14
- package/es/components/popper/index.mjs.map +1 -1
- package/es/components/popper/src/arrow.mjs +7 -0
- package/es/components/popper/src/arrow.mjs.map +1 -0
- package/es/components/popper/src/arrow.vue.d.ts +12 -0
- package/es/components/popper/src/arrow.vue_vue_type_script_lang.mjs +27 -0
- package/es/components/popper/src/arrow.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.mjs +13 -0
- package/es/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.mjs.map +1 -0
- package/es/components/popper/src/container.d.ts +3 -0
- package/es/components/popper/src/container.mjs +22 -0
- package/es/components/popper/src/container.mjs.map +1 -0
- package/es/components/popper/src/content.mjs +7 -0
- package/es/components/popper/src/content.mjs.map +1 -0
- package/es/components/popper/src/content.vue.d.ts +299 -0
- package/es/components/popper/src/content.vue_vue_type_script_lang.mjs +85 -0
- package/es/components/popper/src/content.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs +16 -0
- package/es/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.mjs.map +1 -0
- package/es/components/popper/src/popper.d.ts +58 -0
- package/es/components/popper/src/popper.mjs +98 -0
- package/es/components/popper/src/popper.mjs.map +1 -0
- package/es/components/popper/src/popper.vue.d.ts +3 -0
- package/es/components/popper/src/popper.vue_vue_type_script_lang.mjs +19 -0
- package/es/components/popper/src/popper.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.mjs +8 -0
- package/es/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.mjs.map +1 -0
- package/es/components/popper/src/popper2.mjs +7 -0
- package/es/components/popper/src/popper2.mjs.map +1 -0
- package/es/components/popper/src/tokens.d.ts +14 -0
- package/es/components/popper/src/tokens.mjs +5 -0
- package/es/components/popper/src/tokens.mjs.map +1 -0
- package/es/components/popper/src/trigger.mjs +7 -0
- package/es/components/popper/src/trigger.mjs.map +1 -0
- package/es/components/popper/src/trigger.vue.d.ts +45 -0
- package/es/components/popper/src/trigger.vue_vue_type_script_lang.mjs +66 -0
- package/es/components/popper/src/trigger.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.mjs +16 -0
- package/es/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.mjs.map +1 -0
- package/es/components/popper/src/utils.d.ts +55 -0
- package/es/components/popper/src/utils.mjs +76 -0
- package/es/components/popper/src/utils.mjs.map +1 -0
- package/es/components/rate/index.d.ts +7 -1
- package/es/components/rate/src/rate.d.ts +2 -0
- package/es/components/rate/src/rate.mjs +5 -0
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +7 -1
- package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs +6 -0
- package/es/components/rate/src/rate.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs +3 -3
- package/es/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.mjs.map +1 -1
- package/es/components/roving-focus-group/index.d.ts +7 -0
- package/es/components/roving-focus-group/index.mjs +9 -0
- package/es/components/roving-focus-group/index.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +7 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +43 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs +102 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.mjs +8 -0
- package/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group.d.ts +269 -0
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +32 -0
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs +15 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.mjs +20 -0
- package/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +7 -0
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +7 -0
- package/es/components/roving-focus-group/src/roving-focus-item.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts +29 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs +100 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.mjs +18 -0
- package/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.mjs.map +1 -0
- package/es/components/roving-focus-group/src/tokens.d.ts +27 -0
- package/es/components/roving-focus-group/src/tokens.mjs +5 -0
- package/es/components/roving-focus-group/src/tokens.mjs.map +1 -0
- package/es/components/roving-focus-group/src/utils.d.ts +8 -0
- package/es/components/roving-focus-group/src/utils.mjs +48 -0
- package/es/components/roving-focus-group/src/utils.mjs.map +1 -0
- package/es/components/select/index.d.ts +680 -14
- package/es/components/select/src/select-dropdown.vue.d.ts +1 -1
- package/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs +1 -0
- package/es/components/select/src/select-dropdown.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/select-dropdown.vue_vue_type_template_id_46cf6eee_lang.mjs.map +1 -1
- package/es/components/select/src/select.vue.d.ts +681 -15
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs +25 -11
- package/es/components/select/src/select.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select/src/select.vue_vue_type_template_id_33774f85_lang.mjs +11 -12
- package/es/components/select/src/select.vue_vue_type_template_id_33774f85_lang.mjs.map +1 -1
- package/es/components/select/src/token.d.ts +1 -0
- package/es/components/select/src/token.mjs.map +1 -1
- package/es/components/select/src/useSelect.d.ts +671 -7
- package/es/components/select/src/useSelect.mjs +33 -23
- package/es/components/select/src/useSelect.mjs.map +1 -1
- package/es/components/select-v2/index.d.ts +1326 -16
- package/es/components/select-v2/src/select.vue.d.ts +665 -10
- package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs +2 -2
- package/es/components/select-v2/src/select.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.mjs +8 -9
- package/es/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.mjs.map +1 -1
- package/es/components/select-v2/src/useSelect.d.ts +659 -4
- package/es/components/select-v2/src/useSelect.mjs +7 -7
- package/es/components/select-v2/src/useSelect.mjs.map +1 -1
- package/es/components/slider/index.d.ts +22 -6
- package/es/components/slider/src/button.vue_vue_type_script_lang.mjs +2 -2
- package/es/components/slider/src/button.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/slider/src/index.vue.d.ts +11 -3
- package/es/components/slider/src/index.vue_vue_type_script_lang.mjs +21 -2
- package/es/components/slider/src/index.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.mjs +19 -19
- package/es/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.mjs.map +1 -1
- package/es/components/slot/index.d.ts +5 -0
- package/es/components/slot/index.mjs +2 -0
- package/es/components/slot/index.mjs.map +1 -0
- package/es/components/slot/src/only-child.d.ts +5 -0
- package/es/components/slot/src/only-child.mjs +61 -0
- package/es/components/slot/src/only-child.mjs.map +1 -0
- package/es/components/switch/index.d.ts +5 -0
- package/es/components/switch/src/switch.d.ts +2 -0
- package/es/components/switch/src/switch.mjs +5 -0
- package/es/components/switch/src/switch.mjs.map +1 -1
- package/es/components/switch/src/switch.vue.d.ts +5 -0
- package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs +10 -1
- package/es/components/switch/src/switch.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs +1 -1
- package/es/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.mjs.map +1 -1
- package/es/components/table/index.d.ts +13 -4
- package/es/components/table/src/filter-panel.vue.d.ts +654 -4
- package/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs +5 -7
- package/es/components/table/src/filter-panel.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.mjs +8 -9
- package/es/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.mjs.map +1 -1
- package/es/components/table/src/table/style-helper.d.ts +7 -0
- package/es/components/table/src/table/style-helper.mjs +20 -17
- package/es/components/table/src/table/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-body/index.mjs +5 -3
- package/es/components/table/src/table-body/index.mjs.map +1 -1
- package/es/components/table/src/table-body/styles-helper.d.ts +0 -1
- package/es/components/table/src/table-body/styles-helper.mjs +10 -17
- package/es/components/table/src/table-body/styles-helper.mjs.map +1 -1
- package/es/components/table/src/table-column/defaults.d.ts +1 -0
- package/es/components/table/src/table-column/defaults.mjs.map +1 -1
- package/es/components/table/src/table-column/index.d.ts +1 -1
- package/es/components/table/src/table-column/index.mjs +1 -0
- package/es/components/table/src/table-column/index.mjs.map +1 -1
- package/es/components/table/src/table-footer/index.d.ts +4 -2
- package/es/components/table/src/table-footer/index.mjs +33 -18
- package/es/components/table/src/table-footer/index.mjs.map +1 -1
- package/es/components/table/src/table-footer/style-helper.d.ts +4 -2
- package/es/components/table/src/table-footer/style-helper.mjs +28 -31
- package/es/components/table/src/table-footer/style-helper.mjs.map +1 -1
- package/es/components/table/src/table-header/index.d.ts +3 -2
- package/es/components/table/src/table-header/index.mjs +89 -51
- package/es/components/table/src/table-header/index.mjs.map +1 -1
- package/es/components/table/src/table-header/style.helper.d.ts +1 -1
- package/es/components/table/src/table-header/style.helper.mjs +14 -24
- package/es/components/table/src/table-header/style.helper.mjs.map +1 -1
- package/es/components/table/src/table-header/utils-helper.mjs +1 -0
- package/es/components/table/src/table-header/utils-helper.mjs.map +1 -1
- package/es/components/table/src/table-layout.d.ts +1 -0
- package/es/components/table/src/table-layout.mjs +8 -3
- package/es/components/table/src/table-layout.mjs.map +1 -1
- package/es/components/table/src/table.vue.d.ts +11 -2
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs +12 -2
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.mjs +62 -213
- package/es/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.mjs.map +1 -1
- package/es/components/table/src/util.d.ts +18 -4
- package/es/components/table/src/util.mjs +99 -6
- package/es/components/table/src/util.mjs.map +1 -1
- package/es/components/teleport/index.d.ts +11 -8
- package/es/components/teleport/src/teleport.d.ts +4 -3
- package/es/components/teleport/src/teleport.mjs +5 -1
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport.vue.d.ts +11 -8
- package/es/components/teleport/src/teleport.vue_vue_type_script_lang.mjs +1 -2
- package/es/components/teleport/src/teleport.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.mjs +3 -2
- package/es/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.mjs.map +1 -1
- package/es/components/time-picker/index.d.ts +4 -4
- package/es/components/time-picker/src/common/picker.vue.d.ts +663 -9
- package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs +29 -17
- package/es/components/time-picker/src/common/picker.vue_vue_type_script_lang.mjs.map +1 -1
- package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs +38 -38
- package/es/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.mjs.map +1 -1
- package/es/components/time-picker/src/time-picker.d.ts +2 -2
- package/es/components/time-select/index.d.ts +4 -4
- package/es/components/time-select/src/time-select.vue.d.ts +2 -2
- package/es/components/tooltip/index.d.ts +346 -430
- package/es/components/tooltip/index.mjs +6 -7
- package/es/components/tooltip/index.mjs.map +1 -1
- package/es/components/tooltip/src/content.mjs +7 -0
- package/es/components/tooltip/src/content.mjs.map +1 -0
- package/es/components/tooltip/src/content.vue.d.ts +809 -0
- package/es/components/tooltip/src/content.vue_vue_type_script_lang.mjs +135 -0
- package/es/components/tooltip/src/content.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.mjs +65 -0
- package/es/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.mjs.map +1 -0
- package/es/components/tooltip/src/tokens.d.ts +14 -0
- package/es/components/tooltip/src/tokens.mjs +4 -0
- package/es/components/tooltip/src/tokens.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip.d.ts +146 -0
- package/es/components/tooltip/src/tooltip.mjs +63 -0
- package/es/components/tooltip/src/tooltip.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip.vue.d.ts +383 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs +104 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.mjs +67 -0
- package/es/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.mjs.map +1 -0
- package/es/components/tooltip/src/tooltip2.mjs +7 -0
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -0
- package/es/components/tooltip/src/trigger.mjs +7 -0
- package/es/components/tooltip/src/trigger.mjs.map +1 -0
- package/es/components/tooltip/src/trigger.vue.d.ts +39 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_script_lang.mjs +60 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.mjs +27 -0
- package/es/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.mjs.map +1 -0
- package/es/components/tooltip/src/utils.d.ts +4 -0
- package/es/components/tooltip/src/utils.mjs +18 -0
- package/es/components/tooltip/src/utils.mjs.map +1 -0
- package/es/components/tree/index.d.ts +4 -4
- package/es/components/tree/src/tree.vue.d.ts +2 -2
- package/es/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/es/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/es/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/es/components/visual-hidden/index.d.ts +3 -0
- package/es/components/visual-hidden/index.mjs +4 -0
- package/es/components/{popper/src/renderers → visual-hidden}/index.mjs.map +0 -0
- package/es/components/visual-hidden/src/visual-hidden.mjs +7 -0
- package/es/components/visual-hidden/src/visual-hidden.mjs.map +1 -0
- package/es/components/visual-hidden/src/visual-hidden.vue.d.ts +12 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.mjs +34 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.mjs.map +1 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.mjs +8 -0
- package/es/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.mjs.map +1 -0
- package/es/directives/click-outside/index.mjs.map +1 -1
- package/es/hooks/index.d.ts +8 -1
- package/es/hooks/index.mjs +8 -2
- package/es/hooks/index.mjs.map +1 -1
- package/es/hooks/use-delayed-toggle/index.d.ts +13 -0
- package/es/hooks/use-delayed-toggle/index.mjs +39 -0
- package/es/hooks/use-delayed-toggle/index.mjs.map +1 -0
- package/es/hooks/use-escape-keydown/index.d.ts +1 -0
- package/es/hooks/use-escape-keydown/index.mjs +21 -0
- package/es/hooks/use-escape-keydown/index.mjs.map +1 -0
- package/es/hooks/use-focus/index.d.ts +3 -1
- package/es/hooks/use-focus/index.mjs.map +1 -1
- package/es/hooks/use-forward-ref/index.d.ts +13 -0
- package/es/hooks/use-forward-ref/index.mjs +27 -0
- package/es/hooks/use-forward-ref/index.mjs.map +1 -0
- package/es/hooks/use-id/index.d.ts +8 -0
- package/es/hooks/use-id/index.mjs +24 -0
- package/es/hooks/use-id/index.mjs.map +1 -0
- package/es/hooks/use-intermediate-render/index.d.ts +11 -0
- package/es/hooks/use-intermediate-render/index.mjs +43 -0
- package/es/hooks/use-intermediate-render/index.mjs.map +1 -0
- package/es/hooks/use-model-toggle/index.d.ts +18 -9
- package/es/hooks/use-model-toggle/index.mjs +103 -93
- package/es/hooks/use-model-toggle/index.mjs.map +1 -1
- package/es/hooks/use-popper-container/index.d.ts +3 -0
- package/es/hooks/use-popper-container/index.mjs +22 -0
- package/es/hooks/use-popper-container/index.mjs.map +1 -0
- package/es/hooks/use-restore-active/index.mjs +1 -1
- package/es/hooks/use-restore-active/index.mjs.map +1 -1
- package/es/index.mjs +15 -8
- package/es/index.mjs.map +1 -1
- package/es/utils/aria.d.ts +4 -0
- package/es/utils/aria.mjs +5 -1
- package/es/utils/aria.mjs.map +1 -1
- package/es/utils/dom.d.ts +9 -1
- package/es/utils/dom.mjs +27 -1
- package/es/utils/dom.mjs.map +1 -1
- package/es/utils/props.d.ts +2 -2
- package/es/utils/props.mjs +1 -1
- package/es/utils/props.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/components/autocomplete/index.d.ts +26 -18
- package/lib/components/autocomplete/src/index.vue.d.ts +13 -10
- package/lib/components/autocomplete/src/index.vue_vue_type_script_lang.js +13 -17
- package/lib/components/autocomplete/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.js +51 -48
- package/lib/components/autocomplete/src/index.vue_vue_type_template_id_2f09f285_lang.js.map +1 -1
- package/lib/components/carousel/index.d.ts +4 -4
- package/lib/components/carousel/src/main.vue.d.ts +4 -4
- package/lib/components/cascader/index.d.ts +1118 -6532
- package/lib/components/cascader/src/index.vue.d.ts +559 -3267
- package/lib/components/cascader/src/index.vue_vue_type_script_lang.js +10 -10
- package/lib/components/cascader/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.js +12 -12
- package/lib/components/cascader/src/index.vue_vue_type_template_id_0429c2db_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js +3 -0
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/cascader-panel/src/index.vue_vue_type_template_id_97c48f5c_lang.js.map +1 -1
- package/lib/components/checkbox/index.d.ts +1 -1
- package/lib/components/checkbox/src/checkbox.vue.d.ts +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.js +7 -13
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.js +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue_vue_type_template_id_f68ae30a_lang.js.map +1 -1
- package/lib/components/collection/index.d.ts +2 -0
- package/lib/components/collection/index.js +12 -0
- package/lib/components/{popper/src → collection}/index.js.map +0 -0
- package/lib/components/collection/src/collection-item.js +12 -0
- package/lib/components/collection/src/collection-item.js.map +1 -0
- package/lib/components/collection/src/collection-item.vue.d.ts +2 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_script_lang.js +13 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.js +12 -0
- package/lib/components/collection/src/collection-item.vue_vue_type_template_id_dd23be6a_lang.js.map +1 -0
- package/lib/components/collection/src/collection.d.ts +263 -0
- package/lib/components/collection/src/collection.js +73 -0
- package/lib/components/collection/src/collection.js.map +1 -0
- package/lib/components/collection/src/collection.vue.d.ts +2 -0
- package/lib/components/collection/src/collection.vue_vue_type_script_lang.js +12 -0
- package/lib/components/collection/src/collection.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.js +12 -0
- package/lib/components/collection/src/collection.vue_vue_type_template_id_5f9c2545_lang.js.map +1 -0
- package/lib/components/collection/src/collection2.js +12 -0
- package/lib/components/collection/src/collection2.js.map +1 -0
- package/lib/components/collection/src/tokens.d.ts +12 -0
- package/lib/components/collection/src/tokens.js +3 -0
- package/lib/components/collection/src/tokens.js.map +1 -0
- package/lib/components/color-picker/index.d.ts +0 -2
- package/lib/components/color-picker/src/index.vue.d.ts +0 -2
- package/lib/components/color-picker/src/index.vue_vue_type_script_lang.js +2 -4
- package/lib/components/color-picker/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.js +9 -10
- package/lib/components/color-picker/src/index.vue_vue_type_template_id_46a474d5_lang.js.map +1 -1
- package/lib/components/date-picker/index.d.ts +4 -4
- package/lib/components/date-picker/src/date-picker.d.ts +2 -2
- package/lib/components/descriptions/index.d.ts +4 -4
- package/lib/components/descriptions/src/description-item.d.ts +2 -2
- package/lib/components/dialog/index.d.ts +5 -5
- package/lib/components/dialog/src/dialog.vue.d.ts +5 -5
- package/lib/components/drawer/index.d.ts +5 -5
- package/lib/components/drawer/src/drawer.vue.d.ts +5 -5
- package/lib/components/dropdown/index.d.ts +767 -84
- package/lib/components/dropdown/src/dropdown-item-impl.js +12 -0
- package/lib/components/dropdown/src/dropdown-item-impl.js.map +1 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue.d.ts +39 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.js +57 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.js +37 -0
- package/lib/components/dropdown/src/dropdown-item-impl.vue_vue_type_template_id_6daab4f2_lang.js.map +1 -0
- package/lib/components/dropdown/src/dropdown-item.vue.d.ts +17 -9
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.js +50 -20
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.js +29 -19
- package/lib/components/dropdown/src/dropdown-item.vue_vue_type_template_id_396ed16b_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.vue.d.ts +17 -6
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.js +57 -21
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.js +11 -8
- package/lib/components/dropdown/src/dropdown-menu.vue_vue_type_template_id_617b3492_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.d.ts +295 -1
- package/lib/components/dropdown/src/dropdown.js +96 -0
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue.d.ts +712 -73
- package/lib/components/dropdown/src/dropdown.vue_vue_type_script_lang.js +59 -152
- package/lib/components/dropdown/src/dropdown.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.js +91 -51
- package/lib/components/dropdown/src/dropdown.vue_vue_type_template_id_3ed790a5_lang.js.map +1 -1
- package/lib/components/dropdown/src/tokens.d.ts +8 -0
- package/lib/components/dropdown/src/tokens.js +8 -0
- package/lib/components/dropdown/src/tokens.js.map +1 -0
- package/lib/components/focus-trap/index.d.ts +5 -0
- package/lib/components/focus-trap/index.js +27 -0
- package/lib/components/focus-trap/index.js.map +1 -0
- package/lib/components/focus-trap/src/focus-trap.js +12 -0
- package/lib/components/focus-trap/src/focus-trap.js.map +1 -0
- package/lib/components/focus-trap/src/focus-trap.vue.d.ts +21 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.js +141 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.js +12 -0
- package/lib/components/focus-trap/src/focus-trap.vue_vue_type_template_id_4a8a10c5_lang.js.map +1 -0
- package/lib/components/focus-trap/src/tokens.d.ts +11 -0
- package/lib/components/focus-trap/src/tokens.js +21 -0
- package/lib/components/focus-trap/src/tokens.js.map +1 -0
- package/lib/components/focus-trap/src/utils.d.ts +18 -0
- package/lib/components/focus-trap/src/utils.js +102 -0
- package/lib/components/focus-trap/src/utils.js.map +1 -0
- package/lib/components/image/index.d.ts +2 -2
- package/lib/components/image/src/image.vue.d.ts +2 -2
- package/lib/components/index.js +92 -84
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +5 -5
- package/lib/components/input/src/input.vue.d.ts +5 -5
- package/lib/components/input-number/index.d.ts +14 -12
- package/lib/components/input-number/src/input-number.vue.d.ts +14 -12
- package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js +18 -4
- package/lib/components/input-number/src/input-number.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.js +5 -4
- package/lib/components/input-number/src/input-number.vue_vue_type_template_id_dec60af6_lang.js.map +1 -1
- package/lib/components/menu/index.d.ts +9 -3
- package/lib/components/menu/src/menu-item.vue.d.ts +4 -2
- package/lib/components/menu/src/menu-item.vue_vue_type_script_lang.js +3 -3
- package/lib/components/menu/src/menu-item.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/menu/src/menu.d.ts +1 -1
- package/lib/components/menu/src/menu.js +2 -1
- package/lib/components/menu/src/menu.js.map +1 -1
- package/lib/components/menu/src/sub-menu.js +18 -21
- package/lib/components/menu/src/sub-menu.js.map +1 -1
- package/lib/components/menu/src/types.d.ts +2 -0
- package/lib/components/message-box/src/index.vue.d.ts +2 -2
- package/lib/components/message-box/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.js +1 -0
- package/lib/components/message-box/src/index.vue_vue_type_template_id_7035e868_lang.js.map +1 -1
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/src/pagination.d.ts +2 -2
- package/lib/components/popconfirm/index.d.ts +19 -12
- package/lib/components/popconfirm/index.js +0 -1
- package/lib/components/popconfirm/index.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.d.ts +3 -5
- package/lib/components/popconfirm/src/popconfirm.js +10 -5
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue.d.ts +19 -13
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.js +20 -18
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.js +11 -12
- package/lib/components/popconfirm/src/popconfirm.vue_vue_type_template_id_16409d25_lang.js.map +1 -1
- package/lib/components/popover/index.d.ts +1690 -420
- package/lib/components/popover/src/directive.js +7 -13
- package/lib/components/popover/src/directive.js.map +1 -1
- package/lib/components/popover/src/index.js +2 -0
- package/lib/components/popover/src/index.js.map +1 -1
- package/lib/components/popover/src/index.vue.d.ts +846 -213
- package/lib/components/popover/src/index.vue_vue_type_script_lang.js +40 -106
- package/lib/components/popover/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.js +35 -0
- package/lib/components/popover/src/index.vue_vue_type_template_id_15486cf0_lang.js.map +1 -0
- package/lib/components/popover/src/popover.d.ts +70 -0
- package/lib/components/popover/src/popover.js +35 -0
- package/lib/components/popover/src/popover.js.map +1 -0
- package/lib/components/popper/index.d.ts +7 -3479
- package/lib/components/popper/index.js +24 -20
- package/lib/components/popper/index.js.map +1 -1
- package/lib/components/popper/src/arrow.js +12 -0
- package/lib/components/popper/src/arrow.js.map +1 -0
- package/lib/components/popper/src/arrow.vue.d.ts +12 -0
- package/lib/components/popper/src/arrow.vue_vue_type_script_lang.js +31 -0
- package/lib/components/popper/src/arrow.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.js +17 -0
- package/lib/components/popper/src/arrow.vue_vue_type_template_id_8ab40b80_lang.js.map +1 -0
- package/lib/components/popper/src/container.d.ts +3 -0
- package/lib/components/popper/src/container.js +28 -0
- package/lib/components/popper/src/container.js.map +1 -0
- package/lib/components/popper/src/content.js +12 -0
- package/lib/components/popper/src/content.js.map +1 -0
- package/lib/components/popper/src/content.vue.d.ts +299 -0
- package/lib/components/popper/src/content.vue_vue_type_script_lang.js +89 -0
- package/lib/components/popper/src/content.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js +20 -0
- package/lib/components/popper/src/content.vue_vue_type_template_id_611b76f0_lang.js.map +1 -0
- package/lib/components/popper/src/popper.d.ts +58 -0
- package/lib/components/popper/src/popper.js +107 -0
- package/lib/components/popper/src/popper.js.map +1 -0
- package/lib/components/popper/src/popper.vue.d.ts +3 -0
- package/lib/components/popper/src/popper.vue_vue_type_script_lang.js +23 -0
- package/lib/components/popper/src/popper.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.js +12 -0
- package/lib/components/popper/src/popper.vue_vue_type_template_id_77a3d185_lang.js.map +1 -0
- package/lib/components/popper/src/popper2.js +12 -0
- package/lib/components/popper/src/popper2.js.map +1 -0
- package/lib/components/popper/src/tokens.d.ts +14 -0
- package/lib/components/popper/src/tokens.js +10 -0
- package/lib/components/popper/src/tokens.js.map +1 -0
- package/lib/components/popper/src/trigger.js +12 -0
- package/lib/components/popper/src/trigger.js.map +1 -0
- package/lib/components/popper/src/trigger.vue.d.ts +45 -0
- package/lib/components/popper/src/trigger.vue_vue_type_script_lang.js +70 -0
- package/lib/components/popper/src/trigger.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.js +20 -0
- package/lib/components/popper/src/trigger.vue_vue_type_template_id_4fb6e0af_lang.js.map +1 -0
- package/lib/components/popper/src/utils.d.ts +55 -0
- package/lib/components/popper/src/utils.js +81 -0
- package/lib/components/popper/src/utils.js.map +1 -0
- package/lib/components/rate/index.d.ts +7 -1
- package/lib/components/rate/src/rate.d.ts +2 -0
- package/lib/components/rate/src/rate.js +5 -0
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +7 -1
- package/lib/components/rate/src/rate.vue_vue_type_script_lang.js +6 -0
- package/lib/components/rate/src/rate.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js +2 -2
- package/lib/components/rate/src/rate.vue_vue_type_template_id_38c42df6_lang.js.map +1 -1
- package/lib/components/roving-focus-group/index.d.ts +7 -0
- package/lib/components/roving-focus-group/index.js +25 -0
- package/lib/components/roving-focus-group/index.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +43 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.js +106 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_template_id_e5cee750_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.d.ts +269 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.js +40 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue.d.ts +2 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.js +19 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.js +24 -0
- package/lib/components/roving-focus-group/src/roving-focus-group.vue_vue_type_template_id_91b51b76_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.js +12 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue.d.ts +29 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.js +104 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.js +22 -0
- package/lib/components/roving-focus-group/src/roving-focus-item.vue_vue_type_template_id_5f657dbd_lang.js.map +1 -0
- package/lib/components/roving-focus-group/src/tokens.d.ts +27 -0
- package/lib/components/roving-focus-group/src/tokens.js +10 -0
- package/lib/components/roving-focus-group/src/tokens.js.map +1 -0
- package/lib/components/roving-focus-group/src/utils.d.ts +8 -0
- package/lib/components/roving-focus-group/src/utils.js +54 -0
- package/lib/components/roving-focus-group/src/utils.js.map +1 -0
- package/lib/components/select/index.d.ts +680 -14
- package/lib/components/select/src/select-dropdown.vue.d.ts +1 -1
- package/lib/components/select/src/select-dropdown.vue_vue_type_script_lang.js +1 -0
- package/lib/components/select/src/select-dropdown.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/select-dropdown.vue_vue_type_template_id_46cf6eee_lang.js.map +1 -1
- package/lib/components/select/src/select.vue.d.ts +681 -15
- package/lib/components/select/src/select.vue_vue_type_script_lang.js +24 -10
- package/lib/components/select/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select/src/select.vue_vue_type_template_id_33774f85_lang.js +11 -12
- package/lib/components/select/src/select.vue_vue_type_template_id_33774f85_lang.js.map +1 -1
- package/lib/components/select/src/token.d.ts +1 -0
- package/lib/components/select/src/token.js.map +1 -1
- package/lib/components/select/src/useSelect.d.ts +671 -7
- package/lib/components/select/src/useSelect.js +33 -23
- package/lib/components/select/src/useSelect.js.map +1 -1
- package/lib/components/select-v2/index.d.ts +1326 -16
- package/lib/components/select-v2/src/select.vue.d.ts +665 -10
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js +2 -2
- package/lib/components/select-v2/src/select.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.js +8 -9
- package/lib/components/select-v2/src/select.vue_vue_type_template_id_13e598a4_lang.js.map +1 -1
- package/lib/components/select-v2/src/useSelect.d.ts +659 -4
- package/lib/components/select-v2/src/useSelect.js +11 -11
- package/lib/components/select-v2/src/useSelect.js.map +1 -1
- package/lib/components/slider/index.d.ts +22 -6
- package/lib/components/slider/src/button.vue_vue_type_script_lang.js +1 -1
- package/lib/components/slider/src/button.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/slider/src/index.vue.d.ts +11 -3
- package/lib/components/slider/src/index.vue_vue_type_script_lang.js +21 -2
- package/lib/components/slider/src/index.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.js +18 -18
- package/lib/components/slider/src/index.vue_vue_type_template_id_24c42d04_lang.js.map +1 -1
- package/lib/components/slot/index.d.ts +5 -0
- package/lib/components/slot/index.js +10 -0
- package/lib/components/{popper/src/renderers → slot}/index.js.map +1 -1
- package/lib/components/slot/src/only-child.d.ts +5 -0
- package/lib/components/slot/src/only-child.js +65 -0
- package/lib/components/slot/src/only-child.js.map +1 -0
- package/lib/components/switch/index.d.ts +5 -0
- package/lib/components/switch/src/switch.d.ts +2 -0
- package/lib/components/switch/src/switch.js +5 -0
- package/lib/components/switch/src/switch.js.map +1 -1
- package/lib/components/switch/src/switch.vue.d.ts +5 -0
- package/lib/components/switch/src/switch.vue_vue_type_script_lang.js +9 -0
- package/lib/components/switch/src/switch.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js +1 -1
- package/lib/components/switch/src/switch.vue_vue_type_template_id_538fbc85_lang.js.map +1 -1
- package/lib/components/table/index.d.ts +13 -4
- package/lib/components/table/src/filter-panel.vue.d.ts +654 -4
- package/lib/components/table/src/filter-panel.vue_vue_type_script_lang.js +5 -7
- package/lib/components/table/src/filter-panel.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.js +8 -9
- package/lib/components/table/src/filter-panel.vue_vue_type_template_id_fde1c940_lang.js.map +1 -1
- package/lib/components/table/src/table/style-helper.d.ts +7 -0
- package/lib/components/table/src/table/style-helper.js +20 -21
- package/lib/components/table/src/table/style-helper.js.map +1 -1
- package/lib/components/table/src/table-body/index.js +5 -3
- package/lib/components/table/src/table-body/index.js.map +1 -1
- package/lib/components/table/src/table-body/styles-helper.d.ts +0 -1
- package/lib/components/table/src/table-body/styles-helper.js +10 -17
- package/lib/components/table/src/table-body/styles-helper.js.map +1 -1
- package/lib/components/table/src/table-column/defaults.d.ts +1 -0
- package/lib/components/table/src/table-column/defaults.js.map +1 -1
- package/lib/components/table/src/table-column/index.d.ts +1 -1
- package/lib/components/table/src/table-column/index.js +1 -0
- package/lib/components/table/src/table-column/index.js.map +1 -1
- package/lib/components/table/src/table-footer/index.d.ts +4 -2
- package/lib/components/table/src/table-footer/index.js +32 -17
- package/lib/components/table/src/table-footer/index.js.map +1 -1
- package/lib/components/table/src/table-footer/style-helper.d.ts +4 -2
- package/lib/components/table/src/table-footer/style-helper.js +28 -31
- package/lib/components/table/src/table-footer/style-helper.js.map +1 -1
- package/lib/components/table/src/table-header/index.d.ts +3 -2
- package/lib/components/table/src/table-header/index.js +89 -51
- package/lib/components/table/src/table-header/index.js.map +1 -1
- package/lib/components/table/src/table-header/style.helper.d.ts +1 -1
- package/lib/components/table/src/table-header/style.helper.js +14 -24
- package/lib/components/table/src/table-header/style.helper.js.map +1 -1
- package/lib/components/table/src/table-header/utils-helper.js +1 -0
- package/lib/components/table/src/table-header/utils-helper.js.map +1 -1
- package/lib/components/table/src/table-layout.d.ts +1 -0
- package/lib/components/table/src/table-layout.js +8 -3
- package/lib/components/table/src/table-layout.js.map +1 -1
- package/lib/components/table/src/table.vue.d.ts +11 -2
- package/lib/components/table/src/table.vue_vue_type_script_lang.js +12 -2
- package/lib/components/table/src/table.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.js +62 -213
- package/lib/components/table/src/table.vue_vue_type_template_id_4a1660ad_lang.js.map +1 -1
- package/lib/components/table/src/util.d.ts +18 -4
- package/lib/components/table/src/util.js +104 -5
- package/lib/components/table/src/util.js.map +1 -1
- package/lib/components/teleport/index.d.ts +11 -8
- package/lib/components/teleport/src/teleport.d.ts +4 -3
- package/lib/components/teleport/src/teleport.js +5 -1
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport.vue.d.ts +11 -8
- package/lib/components/teleport/src/teleport.vue_vue_type_script_lang.js +1 -2
- package/lib/components/teleport/src/teleport.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.js +3 -2
- package/lib/components/teleport/src/teleport.vue_vue_type_template_id_787c6a36_lang.js.map +1 -1
- package/lib/components/time-picker/index.d.ts +4 -4
- package/lib/components/time-picker/src/common/picker.vue.d.ts +663 -9
- package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js +33 -21
- package/lib/components/time-picker/src/common/picker.vue_vue_type_script_lang.js.map +1 -1
- package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js +37 -37
- package/lib/components/time-picker/src/common/picker.vue_vue_type_template_id_1d54be91_lang.js.map +1 -1
- package/lib/components/time-picker/src/time-picker.d.ts +2 -2
- package/lib/components/time-select/index.d.ts +4 -4
- package/lib/components/time-select/src/time-select.vue.d.ts +2 -2
- package/lib/components/tooltip/index.d.ts +346 -430
- package/lib/components/tooltip/index.js +9 -7
- package/lib/components/tooltip/index.js.map +1 -1
- package/lib/components/tooltip/src/content.js +12 -0
- package/lib/components/tooltip/src/content.js.map +1 -0
- package/lib/components/tooltip/src/content.vue.d.ts +809 -0
- package/lib/components/tooltip/src/content.vue_vue_type_script_lang.js +139 -0
- package/lib/components/tooltip/src/content.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.js +69 -0
- package/lib/components/tooltip/src/content.vue_vue_type_template_id_20254f8d_lang.js.map +1 -0
- package/lib/components/tooltip/src/tokens.d.ts +14 -0
- package/lib/components/tooltip/src/tokens.js +8 -0
- package/lib/components/tooltip/src/tokens.js.map +1 -0
- package/lib/components/tooltip/src/tooltip.d.ts +146 -0
- package/lib/components/tooltip/src/tooltip.js +69 -0
- package/lib/components/tooltip/src/tooltip.js.map +1 -0
- package/lib/components/tooltip/src/tooltip.vue.d.ts +383 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js +108 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.js +71 -0
- package/lib/components/tooltip/src/tooltip.vue_vue_type_template_id_694d1617_lang.js.map +1 -0
- package/lib/components/tooltip/src/tooltip2.js +12 -0
- package/lib/components/tooltip/src/tooltip2.js.map +1 -0
- package/lib/components/tooltip/src/trigger.js +12 -0
- package/lib/components/tooltip/src/trigger.js.map +1 -0
- package/lib/components/tooltip/src/trigger.vue.d.ts +39 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_script_lang.js +64 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.js +31 -0
- package/lib/components/tooltip/src/trigger.vue_vue_type_template_id_0ec0b94c_lang.js.map +1 -0
- package/lib/components/tooltip/src/utils.d.ts +4 -0
- package/lib/components/tooltip/src/utils.js +23 -0
- package/lib/components/tooltip/src/utils.js.map +1 -0
- package/lib/components/tree/index.d.ts +4 -4
- package/lib/components/tree/src/tree.vue.d.ts +2 -2
- package/lib/components/tree-v2/src/tree-node.vue.d.ts +1 -1
- package/lib/components/virtual-list/src/builders/build-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/dynamic-size-list.d.ts +1 -1
- package/lib/components/virtual-list/src/components/fixed-size-list.d.ts +1 -1
- package/lib/components/visual-hidden/index.d.ts +3 -0
- package/lib/components/visual-hidden/index.js +12 -0
- package/lib/components/visual-hidden/index.js.map +1 -0
- package/lib/components/visual-hidden/src/visual-hidden.js +12 -0
- package/lib/components/visual-hidden/src/visual-hidden.js.map +1 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue.d.ts +12 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.js +38 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_script_lang.js.map +1 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.js +12 -0
- package/lib/components/visual-hidden/src/visual-hidden.vue_vue_type_template_id_4cbd1102_lang.js.map +1 -0
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/hooks/index.d.ts +8 -1
- package/lib/hooks/index.js +36 -20
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-delayed-toggle/index.d.ts +13 -0
- package/lib/hooks/use-delayed-toggle/index.js +44 -0
- package/lib/hooks/use-delayed-toggle/index.js.map +1 -0
- package/lib/hooks/use-escape-keydown/index.d.ts +1 -0
- package/lib/hooks/use-escape-keydown/index.js +25 -0
- package/lib/hooks/use-escape-keydown/index.js.map +1 -0
- package/lib/hooks/use-focus/index.d.ts +3 -1
- package/lib/hooks/use-focus/index.js.map +1 -1
- package/lib/hooks/use-forward-ref/index.d.ts +13 -0
- package/lib/hooks/use-forward-ref/index.js +33 -0
- package/lib/hooks/use-forward-ref/index.js.map +1 -0
- package/lib/hooks/use-id/index.d.ts +8 -0
- package/lib/hooks/use-id/index.js +29 -0
- package/lib/hooks/use-id/index.js.map +1 -0
- package/lib/hooks/use-intermediate-render/index.d.ts +11 -0
- package/lib/hooks/use-intermediate-render/index.js +47 -0
- package/lib/hooks/use-intermediate-render/index.js.map +1 -0
- package/lib/hooks/use-model-toggle/index.d.ts +18 -9
- package/lib/hooks/use-model-toggle/index.js +102 -91
- package/lib/hooks/use-model-toggle/index.js.map +1 -1
- package/lib/hooks/use-popper-container/index.d.ts +3 -0
- package/lib/hooks/use-popper-container/index.js +28 -0
- package/lib/hooks/use-popper-container/index.js.map +1 -0
- package/lib/hooks/use-restore-active/index.js +1 -1
- package/lib/hooks/use-restore-active/index.js.map +1 -1
- package/lib/index.js +167 -143
- package/lib/index.js.map +1 -1
- package/lib/utils/aria.d.ts +4 -0
- package/lib/utils/aria.js +5 -1
- package/lib/utils/aria.js.map +1 -1
- package/lib/utils/dom.d.ts +9 -1
- package/lib/utils/dom.js +30 -0
- package/lib/utils/dom.js.map +1 -1
- package/lib/utils/props.d.ts +2 -2
- package/lib/utils/props.js +1 -1
- package/lib/utils/props.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/base.css +1 -1
- package/theme-chalk/el-checkbox.css +1 -1
- package/theme-chalk/el-collapse.css +1 -1
- package/theme-chalk/el-date-picker.css +1 -1
- package/theme-chalk/el-dropdown.css +1 -1
- package/theme-chalk/el-menu.css +1 -1
- package/theme-chalk/el-radio.css +1 -1
- package/theme-chalk/el-rate.css +1 -1
- package/theme-chalk/el-select-v2.css +1 -1
- package/theme-chalk/el-slider.css +1 -1
- package/theme-chalk/el-switch.css +1 -1
- package/theme-chalk/el-table-column.css +1 -1
- package/theme-chalk/el-table.css +1 -1
- package/theme-chalk/el-time-picker.css +1 -1
- package/theme-chalk/el-time-select.css +1 -1
- package/theme-chalk/el-tree.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/checkbox.scss +40 -6
- package/theme-chalk/src/common/transition.scss +8 -0
- package/theme-chalk/src/common/var.scss +0 -2
- package/theme-chalk/src/date-picker/picker-panel.scss +1 -1
- package/theme-chalk/src/dropdown.scss +1 -2
- package/theme-chalk/src/radio.scss +21 -0
- package/theme-chalk/src/rate.scss +19 -2
- package/theme-chalk/src/select-v2.scss +2 -3
- package/theme-chalk/src/slider.scss +28 -77
- package/theme-chalk/src/switch.scss +43 -4
- package/theme-chalk/src/table-column.scss +0 -1
- package/theme-chalk/src/table.scss +176 -124
- package/web-types.json +1 -1
- package/es/components/popover/src/usePopover.d.ts +0 -32
- package/es/components/popover/src/usePopover.mjs +0 -38
- package/es/components/popover/src/usePopover.mjs.map +0 -1
- package/es/components/popper/src/index.mjs +0 -5
- package/es/components/popper/src/index.vue.d.ts +0 -1737
- package/es/components/popper/src/index.vue_vue_type_script_lang.mjs +0 -103
- package/es/components/popper/src/index.vue_vue_type_script_lang.mjs.map +0 -1
- package/es/components/popper/src/renderers/arrow.d.ts +0 -3
- package/es/components/popper/src/renderers/arrow.mjs +0 -12
- package/es/components/popper/src/renderers/arrow.mjs.map +0 -1
- package/es/components/popper/src/renderers/index.d.ts +0 -3
- package/es/components/popper/src/renderers/index.mjs +0 -4
- package/es/components/popper/src/renderers/popper.d.ts +0 -23
- package/es/components/popper/src/renderers/popper.mjs +0 -51
- package/es/components/popper/src/renderers/popper.mjs.map +0 -1
- package/es/components/popper/src/renderers/trigger.d.ts +0 -13
- package/es/components/popper/src/renderers/trigger.mjs +0 -13
- package/es/components/popper/src/renderers/trigger.mjs.map +0 -1
- package/es/components/popper/src/use-popper/build-modifiers.d.ts +0 -10
- package/es/components/popper/src/use-popper/build-modifiers.mjs +0 -50
- package/es/components/popper/src/use-popper/build-modifiers.mjs.map +0 -1
- package/es/components/popper/src/use-popper/defaults.d.ts +0 -142
- package/es/components/popper/src/use-popper/defaults.mjs +0 -116
- package/es/components/popper/src/use-popper/defaults.mjs.map +0 -1
- package/es/components/popper/src/use-popper/index.d.ts +0 -1554
- package/es/components/popper/src/use-popper/index.mjs +0 -235
- package/es/components/popper/src/use-popper/index.mjs.map +0 -1
- package/es/components/popper/src/use-popper/popper-options.d.ts +0 -20
- package/es/components/popper/src/use-popper/popper-options.mjs +0 -22
- package/es/components/popper/src/use-popper/popper-options.mjs.map +0 -1
- package/es/components/tooltip/src/index.d.ts +0 -240
- package/es/components/tooltip/src/index.mjs +0 -101
- package/es/components/tooltip/src/index.mjs.map +0 -1
- package/es/hooks/use-popper/index.d.ts +0 -103
- package/es/hooks/use-popper/index.mjs +0 -256
- package/es/hooks/use-popper/index.mjs.map +0 -1
- package/es/hooks/use-popper/use-popper-options.d.ts +0 -49
- package/es/hooks/use-popper/use-popper-options.mjs +0 -47
- package/es/hooks/use-popper/use-popper-options.mjs.map +0 -1
- package/es/hooks/use-popper/use-target-events.d.ts +0 -13
- package/es/hooks/use-popper/use-target-events.mjs +0 -68
- package/es/hooks/use-popper/use-target-events.mjs.map +0 -1
- package/lib/components/popover/src/usePopover.d.ts +0 -32
- package/lib/components/popover/src/usePopover.js +0 -44
- package/lib/components/popover/src/usePopover.js.map +0 -1
- package/lib/components/popper/src/index.js +0 -10
- package/lib/components/popper/src/index.vue.d.ts +0 -1737
- package/lib/components/popper/src/index.vue_vue_type_script_lang.js +0 -107
- package/lib/components/popper/src/index.vue_vue_type_script_lang.js.map +0 -1
- package/lib/components/popper/src/renderers/arrow.d.ts +0 -3
- package/lib/components/popper/src/renderers/arrow.js +0 -16
- package/lib/components/popper/src/renderers/arrow.js.map +0 -1
- package/lib/components/popper/src/renderers/index.d.ts +0 -3
- package/lib/components/popper/src/renderers/index.js +0 -14
- package/lib/components/popper/src/renderers/popper.d.ts +0 -23
- package/lib/components/popper/src/renderers/popper.js +0 -55
- package/lib/components/popper/src/renderers/popper.js.map +0 -1
- package/lib/components/popper/src/renderers/trigger.d.ts +0 -13
- package/lib/components/popper/src/renderers/trigger.js +0 -17
- package/lib/components/popper/src/renderers/trigger.js.map +0 -1
- package/lib/components/popper/src/use-popper/build-modifiers.d.ts +0 -10
- package/lib/components/popper/src/use-popper/build-modifiers.js +0 -54
- package/lib/components/popper/src/use-popper/build-modifiers.js.map +0 -1
- package/lib/components/popper/src/use-popper/defaults.d.ts +0 -142
- package/lib/components/popper/src/use-popper/defaults.js +0 -121
- package/lib/components/popper/src/use-popper/defaults.js.map +0 -1
- package/lib/components/popper/src/use-popper/index.d.ts +0 -1554
- package/lib/components/popper/src/use-popper/index.js +0 -242
- package/lib/components/popper/src/use-popper/index.js.map +0 -1
- package/lib/components/popper/src/use-popper/popper-options.d.ts +0 -20
- package/lib/components/popper/src/use-popper/popper-options.js +0 -26
- package/lib/components/popper/src/use-popper/popper-options.js.map +0 -1
- package/lib/components/tooltip/src/index.d.ts +0 -240
- package/lib/components/tooltip/src/index.js +0 -105
- package/lib/components/tooltip/src/index.js.map +0 -1
- package/lib/hooks/use-popper/index.d.ts +0 -103
- package/lib/hooks/use-popper/index.js +0 -264
- package/lib/hooks/use-popper/index.js.map +0 -1
- package/lib/hooks/use-popper/use-popper-options.d.ts +0 -49
- package/lib/hooks/use-popper/use-popper-options.js +0 -53
- package/lib/hooks/use-popper/use-popper-options.js.map +0 -1
- package/lib/hooks/use-popper/use-target-events.d.ts +0 -13
- package/lib/hooks/use-popper/use-target-events.js +0 -73
- package/lib/hooks/use-popper/use-target-events.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-menu.mjs","sources":["../../../../../../packages/components/menu/src/sub-menu.ts"],"sourcesContent":["import {\n defineComponent,\n computed,\n ref,\n provide,\n inject,\n getCurrentInstance,\n watch,\n onMounted,\n onBeforeUnmount,\n withDirectives,\n Fragment,\n vShow,\n h,\n reactive,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElPopper from '@element-plus/components/popper'\nimport { buildProps } from '@element-plus/utils/props'\nimport { throwError } from '@element-plus/utils/error'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { ExtractPropTypes, VNodeArrayChildren, CSSProperties } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n index: {\n type: String,\n required: true,\n },\n showTimeout: {\n type: Number,\n default: 300,\n },\n hideTimeout: {\n type: Number,\n default: 300,\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: undefined,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes<typeof subMenuProps>\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n const instance = getCurrentInstance()!\n const { paddingStyle, indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n\n // inject\n const rootMenu = inject<MenuProvider>('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n let timeout: (() => void) | undefined\n const currentPlacement = ref<Placement | ''>('')\n const mouseInChild = ref(false)\n const verticalTitleRef = ref<HTMLDivElement>()\n const vPopper = ref()\n\n // computed\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? ArrowDown\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n let isFirstLevel = true\n let parent = instance.parent\n while (parent && parent.type.name !== 'ElMenu') {\n if (['ElSubMenu', 'ElMenuItemGroup'].includes(parent.type.name!)) {\n isFirstLevel = false\n break\n } else {\n parent = parent.parent\n }\n }\n return isFirstLevel\n })\n const appendToBody = computed(() => {\n return props.popperAppendToBody === undefined\n ? isFirstLevel.value\n : Boolean(props.popperAppendToBody)\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse ? 'el-zoom-in-left' : 'el-zoom-in-top'\n )\n const fallbackPlacements = computed<Placement[]>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const backgroundColor = computed(() => rootMenu.props.backgroundColor || '')\n const activeTextColor = computed(() => rootMenu.props.activeTextColor || '')\n const textColor = computed(() => rootMenu.props.textColor || '')\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const titleStyle = computed<CSSProperties>(() => {\n if (mode.value !== 'horizontal') {\n return {\n color: textColor.value,\n }\n }\n return {\n borderBottomColor: active.value\n ? rootMenu.props.activeTextColor\n ? activeTextColor.value\n : ''\n : 'transparent',\n color: active.value ? activeTextColor.value : textColor.value,\n }\n })\n\n // methods\n const doDestroy = () => vPopper.value?.doDestroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (value) {\n updatePlacement()\n } else {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = props.showTimeout\n ) => {\n if (event.type === 'focus' && !event.relatedTarget) {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n return\n }\n mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(\n () => rootMenu.openMenu(props.index, indexPath.value),\n showTimeout\n ))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n return\n }\n mouseInChild.value = false\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n props.hideTimeout\n ))\n\n if (appendToBody.value && deepDispatch) {\n if (instance.parent?.type.name === 'ElSubMenu') {\n subMenu.handleMouseleave?.(true)\n }\n }\n }\n\n const updatePlacement = () => {\n currentPlacement.value =\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide<SubMenuProvider>(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n updatePlacement()\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: ['el-sub-menu__icon-arrow'],\n },\n { default: () => h(subMenuTitleIcon.value) }\n ),\n ]\n\n const ulStyle = useMenuCssVar(rootMenu.props)\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElPopper as any,\n {\n ref: vPopper,\n manualMode: true,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: 6,\n showArrow: false,\n popperClass: props.popperClass,\n placement: currentPlacement.value,\n appendToBody: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n default: () =>\n h(\n 'div',\n {\n class: [`el-menu--${mode.value}`, props.popperClass],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n 'el-menu el-menu--popup',\n `el-menu--popup-${currentPlacement.value}`,\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n trigger: () =>\n h(\n 'div',\n {\n class: 'el-sub-menu__title',\n style: [\n paddingStyle.value,\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: 'el-sub-menu__title',\n style: [\n paddingStyle.value,\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: 'el-menu el-menu--inline',\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n 'el-sub-menu',\n {\n 'is-active': active.value,\n 'is-opened': opened.value,\n 'is-disabled': props.disabled,\n },\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(true),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n"],"names":["ElPopper","ElCollapseTransition"],"mappings":";;;;;;;;;;;AAyBY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACH,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,cAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,cAAc;AACtB,EAAE,KAAK,EAAE,Y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,IAAI,GAAG,CAAC;AACpB,YAAY,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE;AAC1C,cAAc,IAAI,EAAE,MAAM;AAC1B,cAAc,KAAK,EAAE,yBAAyB;AAC9C,cAAc,KAAK,EAAE,OAAO,CAAC,KAAK;AAClC,aAAa,EAAE,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrG,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAC,CAAC;AACT,MAAM,OAAO,CAAC,CAAC,IAAI,EAAE;AACrB,QAAQ,KAAK,EAAE;AACf,UAAU,aAAa;AACvB,UAAU;AACV,YAAY,WAAW,EAAE,MAAM,CAAC,KAAK;AACrC,YAAY,WAAW,EAAE,MAAM,CAAC,KAAK;AACrC,YAAY,aAAa,EAAE,KAAK,CAAC,QAAQ;AACzC,WAAW;AACX,SAAS;AACT,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,YAAY,EAAE,MAAM,CAAC,KAAK;AAClC,QAAQ,YAAY,EAAE,gBAAgB;AACtC,QAAQ,YAAY,EAAE,MAAM,gBAAgB,CAAC,IAAI,CAAC;AAClD,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAClB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"sub-menu.mjs","sources":["../../../../../../packages/components/menu/src/sub-menu.ts"],"sourcesContent":["import {\n defineComponent,\n computed,\n ref,\n provide,\n inject,\n getCurrentInstance,\n watch,\n onMounted,\n onBeforeUnmount,\n withDirectives,\n Fragment,\n vShow,\n h,\n reactive,\n} from 'vue'\nimport { useTimeoutFn } from '@vueuse/core'\nimport ElCollapseTransition from '@element-plus/components/collapse-transition'\nimport ElTooltip from '@element-plus/components/tooltip'\nimport { buildProps } from '@element-plus/utils/props'\nimport { throwError } from '@element-plus/utils/error'\nimport { ArrowDown, ArrowRight } from '@element-plus/icons-vue'\nimport { ElIcon } from '@element-plus/components/icon'\nimport useMenu from './use-menu'\nimport { useMenuCssVar } from './use-menu-css-var'\n\nimport type { Placement } from '@element-plus/components/popper'\nimport type { ExtractPropTypes, VNodeArrayChildren, CSSProperties } from 'vue'\nimport type { MenuProvider, SubMenuProvider } from './types'\n\nexport const subMenuProps = buildProps({\n index: {\n type: String,\n required: true,\n },\n showTimeout: {\n type: Number,\n default: 300,\n },\n hideTimeout: {\n type: Number,\n default: 300,\n },\n popperClass: String,\n disabled: Boolean,\n popperAppendToBody: {\n type: Boolean,\n default: undefined,\n },\n} as const)\nexport type SubMenuProps = ExtractPropTypes<typeof subMenuProps>\n\nconst COMPONENT_NAME = 'ElSubMenu'\nexport default defineComponent({\n name: COMPONENT_NAME,\n props: subMenuProps,\n\n setup(props, { slots, expose }) {\n const instance = getCurrentInstance()!\n const { paddingStyle, indexPath, parentMenu } = useMenu(\n instance,\n computed(() => props.index)\n )\n\n // inject\n const rootMenu = inject<MenuProvider>('rootMenu')\n if (!rootMenu) throwError(COMPONENT_NAME, 'can not inject root menu')\n\n const subMenu = inject<SubMenuProvider>(`subMenu:${parentMenu.value!.uid}`)\n if (!subMenu) throwError(COMPONENT_NAME, 'can not inject sub menu')\n\n const items = ref<MenuProvider['items']>({})\n const subMenus = ref<MenuProvider['subMenus']>({})\n\n let timeout: (() => void) | undefined\n const mouseInChild = ref(false)\n const verticalTitleRef = ref<HTMLDivElement>()\n const vPopper = ref<InstanceType<typeof ElTooltip> | null>(null)\n\n // computed\n const currentPlacement = computed<Placement>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? 'bottom-start'\n : 'right-start'\n )\n const subMenuTitleIcon = computed(() => {\n return (mode.value === 'horizontal' && isFirstLevel.value) ||\n (mode.value === 'vertical' && !rootMenu.props.collapse)\n ? ArrowDown\n : ArrowRight\n })\n const isFirstLevel = computed(() => {\n let isFirstLevel = true\n let parent = instance.parent\n while (parent && parent.type.name !== 'ElMenu') {\n if (['ElSubMenu', 'ElMenuItemGroup'].includes(parent.type.name!)) {\n isFirstLevel = false\n break\n } else {\n parent = parent.parent\n }\n }\n return isFirstLevel\n })\n const appendToBody = computed(() => {\n return props.popperAppendToBody === undefined\n ? isFirstLevel.value\n : Boolean(props.popperAppendToBody)\n })\n const menuTransitionName = computed(() =>\n rootMenu.props.collapse ? 'el-zoom-in-left' : 'el-zoom-in-top'\n )\n const fallbackPlacements = computed<Placement[]>(() =>\n mode.value === 'horizontal' && isFirstLevel.value\n ? [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'left-start',\n ]\n : [\n 'right-start',\n 'left-start',\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n ]\n )\n const opened = computed(() => rootMenu.openedMenus.includes(props.index))\n const active = computed(() => {\n let isActive = false\n\n Object.values(items.value).forEach((item) => {\n if (item.active) {\n isActive = true\n }\n })\n\n Object.values(subMenus.value).forEach((subItem) => {\n if (subItem.active) {\n isActive = true\n }\n })\n\n return isActive\n })\n\n const backgroundColor = computed(() => rootMenu.props.backgroundColor || '')\n const activeTextColor = computed(() => rootMenu.props.activeTextColor || '')\n const textColor = computed(() => rootMenu.props.textColor || '')\n const mode = computed(() => rootMenu.props.mode)\n const item = reactive({\n index: props.index,\n indexPath,\n active,\n })\n\n const titleStyle = computed<CSSProperties>(() => {\n if (mode.value !== 'horizontal') {\n return {\n color: textColor.value,\n }\n }\n return {\n borderBottomColor: active.value\n ? rootMenu.props.activeTextColor\n ? activeTextColor.value\n : ''\n : 'transparent',\n color: active.value ? activeTextColor.value : textColor.value,\n }\n })\n\n // methods\n const doDestroy = () =>\n vPopper.value?.popperRef?.popperInstanceRef?.destroy()\n\n const handleCollapseToggle = (value: boolean) => {\n if (!value) {\n doDestroy()\n }\n }\n\n const handleClick = () => {\n if (\n (rootMenu.props.menuTrigger === 'hover' &&\n rootMenu.props.mode === 'horizontal') ||\n (rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n )\n return\n\n rootMenu.handleSubMenuClick({\n index: props.index,\n indexPath: indexPath.value,\n active: active.value,\n })\n }\n\n const handleMouseenter = (\n event: MouseEvent | FocusEvent,\n showTimeout = props.showTimeout\n ) => {\n if (event.type === 'focus' && !event.relatedTarget) {\n return\n }\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical') ||\n props.disabled\n ) {\n return\n }\n subMenu.mouseInChild.value = true\n\n timeout?.()\n ;({ stop: timeout } = useTimeoutFn(() => {\n rootMenu.openMenu(props.index, indexPath.value)\n }, showTimeout))\n\n if (appendToBody.value) {\n parentMenu.value.vnode.el?.dispatchEvent(new MouseEvent('mouseenter'))\n }\n }\n\n const handleMouseleave = (deepDispatch = false) => {\n if (\n (rootMenu.props.menuTrigger === 'click' &&\n rootMenu.props.mode === 'horizontal') ||\n (!rootMenu.props.collapse && rootMenu.props.mode === 'vertical')\n ) {\n return\n }\n timeout?.()\n subMenu.mouseInChild.value = false\n ;({ stop: timeout } = useTimeoutFn(\n () =>\n !mouseInChild.value &&\n rootMenu.closeMenu(props.index, indexPath.value),\n props.hideTimeout\n ))\n\n if (appendToBody.value && deepDispatch) {\n if (instance.parent?.type.name === 'ElSubMenu') {\n subMenu.handleMouseleave?.(true)\n }\n }\n }\n\n watch(\n () => rootMenu.props.collapse,\n (value) => handleCollapseToggle(Boolean(value))\n )\n\n // provide\n {\n const addSubMenu: SubMenuProvider['addSubMenu'] = (item) => {\n subMenus.value[item.index] = item\n }\n const removeSubMenu: SubMenuProvider['removeSubMenu'] = (item) => {\n delete subMenus.value[item.index]\n }\n provide<SubMenuProvider>(`subMenu:${instance.uid}`, {\n addSubMenu,\n removeSubMenu,\n handleMouseleave,\n mouseInChild,\n })\n }\n\n // expose\n expose({\n opened,\n })\n\n // lifecycle\n onMounted(() => {\n rootMenu.addSubMenu(item)\n subMenu.addSubMenu(item)\n })\n\n onBeforeUnmount(() => {\n subMenu.removeSubMenu(item)\n rootMenu.removeSubMenu(item)\n })\n\n return () => {\n const titleTag: VNodeArrayChildren = [\n slots.title?.(),\n h(\n ElIcon,\n {\n class: ['el-sub-menu__icon-arrow'],\n },\n { default: () => h(subMenuTitleIcon.value) }\n ),\n ]\n\n const ulStyle = useMenuCssVar(rootMenu.props)\n\n // this render function is only used for bypass `Vue`'s compiler caused patching issue.\n // temporarily mark ElPopper as any due to type inconsistency.\n const child = rootMenu.isMenuPopup\n ? h(\n // TODO: correct popper's type.\n ElTooltip as any,\n {\n ref: vPopper,\n visible: opened.value,\n effect: 'light',\n pure: true,\n offset: 6,\n showArrow: false,\n persistent: true,\n popperClass: props.popperClass,\n placement: currentPlacement.value,\n teleported: appendToBody.value,\n fallbackPlacements: fallbackPlacements.value,\n transition: menuTransitionName.value,\n gpuAcceleration: false,\n },\n {\n content: () =>\n h(\n 'div',\n {\n class: [`el-menu--${mode.value}`, props.popperClass],\n onMouseenter: (evt: MouseEvent) =>\n handleMouseenter(evt, 100),\n onMouseleave: () => handleMouseleave(true),\n onFocus: (evt: FocusEvent) => handleMouseenter(evt, 100),\n },\n [\n h(\n 'ul',\n {\n class: [\n 'el-menu el-menu--popup',\n `el-menu--popup-${currentPlacement.value}`,\n ],\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n ]\n ),\n default: () =>\n h(\n 'div',\n {\n class: 'el-sub-menu__title',\n style: [\n paddingStyle.value,\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n onClick: handleClick,\n },\n titleTag\n ),\n }\n )\n : h(Fragment, {}, [\n h(\n 'div',\n {\n class: 'el-sub-menu__title',\n style: [\n paddingStyle.value,\n titleStyle.value,\n { backgroundColor: backgroundColor.value },\n ],\n ref: verticalTitleRef,\n onClick: handleClick,\n },\n titleTag\n ),\n h(\n ElCollapseTransition,\n {},\n {\n default: () =>\n withDirectives(\n h(\n 'ul',\n {\n role: 'menu',\n class: 'el-menu el-menu--inline',\n style: ulStyle.value,\n },\n [slots.default?.()]\n ),\n [[vShow, opened.value]]\n ),\n }\n ),\n ])\n\n return h(\n 'li',\n {\n class: [\n 'el-sub-menu',\n {\n 'is-active': active.value,\n 'is-opened': opened.value,\n 'is-disabled': props.disabled,\n },\n ],\n role: 'menuitem',\n ariaHaspopup: true,\n ariaExpanded: opened.value,\n onMouseenter: handleMouseenter,\n onMouseleave: () => handleMouseleave(true),\n onFocus: handleMouseenter,\n },\n [child]\n )\n }\n },\n})\n"],"names":["ElCollapseTransition"],"mappings":";;;;;;;;;;;AAyBY,MAAC,YAAY,GAAG,UAAU,CAAC;AACvC,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,CAAC,EAAE;AACH,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,cAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,cAAc;AACtB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;AA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ACzB,YAAY,IAAI,GAAG,CAAC;AACpB,YAAY,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,EAAE;AAC1C,cAAc,IAAI,EAAE,MAAM;AAC1B,cAAc,KAAK,EAAE,yBAAyB;AAC9C,cAAc,KAAK,EAAE,OAAO,CAAC,KAAK;AAClC,aAAa,EAAE,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACrG,WAAW;AACX,SAAS,CAAC;AACV,OAAO,CAAC,CAAC;AACT,MAAM,OAAO,CAAC,CAAC,IAAI,EAAE;AACrB,QAAQ,KAAK,EAAE;AACf,UAAU,aAAa;AACvB,UAAU;AACV,YAAY,WAAW,EAAE,MAAM,CAAC,KAAK;AACrC,YAAY,WAAW,EAAE,MAAM,CAAC,KAAK;AACrC,YAAY,aAAa,EAAE,KAAK,CAAC,QAAQ;AACzC,WAAW;AACX,SAAS;AACT,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,YAAY,EAAE,IAAI;AAC1B,QAAQ,YAAY,EAAE,MAAM,CAAC,KAAK;AAClC,QAAQ,YAAY,EAAE,gBAAgB;AACtC,QAAQ,YAAY,EAAE,MAAM,gBAAgB,CAAC,IAAI,CAAC;AAClD,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAClB,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
1
2
|
import type { RouteLocationRaw } from 'vue-router';
|
|
2
3
|
import type { MenuProps } from './menu';
|
|
3
4
|
export interface MenuItemRegistered {
|
|
@@ -30,4 +31,5 @@ export interface SubMenuProvider {
|
|
|
30
31
|
addSubMenu: (item: MenuItemRegistered) => void;
|
|
31
32
|
removeSubMenu: (item: MenuItemRegistered) => void;
|
|
32
33
|
handleMouseleave?: (deepDispatch: boolean) => void;
|
|
34
|
+
mouseInChild: Ref<boolean>;
|
|
33
35
|
}
|
|
@@ -1810,12 +1810,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1810
1810
|
boxType?: unknown;
|
|
1811
1811
|
} & {
|
|
1812
1812
|
center: boolean;
|
|
1813
|
+
container: string;
|
|
1813
1814
|
showClose: boolean;
|
|
1814
1815
|
closeOnClickModal: boolean;
|
|
1815
1816
|
closeOnPressEscape: boolean;
|
|
1816
1817
|
lockScroll: boolean;
|
|
1817
1818
|
modal: boolean;
|
|
1818
|
-
container: string;
|
|
1819
1819
|
closeOnHashChange: boolean;
|
|
1820
1820
|
roundButton: boolean;
|
|
1821
1821
|
boxType: MessageBoxType;
|
|
@@ -1826,12 +1826,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1826
1826
|
onAction?: ((...args: any[]) => any) | undefined;
|
|
1827
1827
|
}, {
|
|
1828
1828
|
center: boolean;
|
|
1829
|
+
container: string;
|
|
1829
1830
|
showClose: boolean;
|
|
1830
1831
|
closeOnClickModal: boolean;
|
|
1831
1832
|
closeOnPressEscape: boolean;
|
|
1832
1833
|
lockScroll: boolean;
|
|
1833
1834
|
modal: boolean;
|
|
1834
|
-
container: string;
|
|
1835
1835
|
closeOnHashChange: boolean;
|
|
1836
1836
|
roundButton: boolean;
|
|
1837
1837
|
boxType: MessageBoxType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_script_lang.mjs","sources":["../../../../../../packages/components/message-box/src/index.vue"],"sourcesContent":["<template>\n <transition name=\"fade-in-linear\" @after-leave=\"$emit('vanish')\">\n <el-overlay\n v-show=\"visible\"\n :z-index=\"zIndex\"\n :overlay-class=\"['is-message-box', modalClass]\"\n :mask=\"modal\"\n @click.self=\"handleWrapperClick\"\n >\n <div\n ref=\"root\"\n v-trap-focus\n :aria-label=\"title || 'dialog'\"\n aria-modal=\"true\"\n :class=\"[\n 'el-message-box',\n customClass,\n { 'el-message-box--center': center },\n ]\"\n :style=\"customStyle\"\n >\n <div\n v-if=\"title !== null && title !== undefined\"\n class=\"el-message-box__header\"\n >\n <div class=\"el-message-box__title\">\n <el-icon\n v-if=\"iconComponent && center\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <span>{{ title }}</span>\n </div>\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"el-message-box__headerbtn\"\n aria-label=\"Close\"\n @click=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n @keydown.prevent.enter=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n >\n <el-icon class=\"el-message-box__close\"><close /></el-icon>\n </button>\n </div>\n <div class=\"el-message-box__content\">\n <div class=\"el-message-box__container\">\n <el-icon\n v-if=\"iconComponent && !center && hasMessage\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div v-if=\"hasMessage\" class=\"el-message-box__message\">\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <p v-else v-html=\"message\"></p>\n </slot>\n </div>\n </div>\n <div v-show=\"showInput\" class=\"el-message-box__input\">\n <el-input\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"inputPlaceholder\"\n :class=\"{ invalid: validateError }\"\n @keydown.prevent.enter=\"handleInputEnter\"\n />\n <div\n class=\"el-message-box__errormsg\"\n :style=\"{\n visibility: !!editorErrorMessage ? 'visible' : 'hidden',\n }\"\n >\n {{ editorErrorMessage }}\n </div>\n </div>\n </div>\n <div class=\"el-message-box__btns\">\n <el-button\n v-if=\"showCancelButton\"\n :loading=\"cancelButtonLoading\"\n :class=\"[cancelButtonClass]\"\n :round=\"roundButton\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('cancel')\"\n @keydown.prevent.enter=\"handleAction('cancel')\"\n >\n {{ cancelButtonText || t('el.messagebox.cancel') }}\n </el-button>\n <el-button\n v-show=\"showConfirmButton\"\n ref=\"confirmRef\"\n type=\"primary\"\n :loading=\"confirmButtonLoading\"\n :class=\"[confirmButtonClasses]\"\n :round=\"roundButton\"\n :disabled=\"confirmButtonDisabled\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('confirm')\"\n @keydown.prevent.enter=\"handleAction('confirm')\"\n >\n {{ confirmButtonText || t('el.messagebox.confirm') }}\n </el-button>\n </div>\n </div>\n </el-overlay>\n </transition>\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onMounted,\n onBeforeUnmount,\n computed,\n watch,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport { TrapFocus } from '@element-plus/directives'\nimport {\n useModal,\n useLockscreen,\n useLocale,\n useRestoreActive,\n usePreventGlobal,\n} from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { on, off } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils/icon'\n\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type {\n Action,\n MessageBoxState,\n MessageBoxType,\n} from './message-box.type'\n\nexport default defineComponent({\n name: 'ElMessageBox',\n directives: {\n TrapFocus,\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents,\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n closeOnHashChange: {\n type: Boolean,\n default: true,\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean,\n },\n container: {\n type: String, // default append to body\n default: 'body',\n },\n boxType: {\n type: String as PropType<MessageBoxType>,\n default: '',\n },\n },\n emits: ['vanish', 'action'],\n setup(props, { emit }) {\n // const popup = usePopup(props, doClose)\n const { t } = useLocale()\n const visible = ref(false)\n // s represents state\n const state = reactive<MessageBoxState>({\n beforeClose: null,\n callback: null,\n cancelButtonText: '',\n cancelButtonClass: '',\n confirmButtonText: '',\n confirmButtonClass: '',\n customClass: '',\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: '',\n inputPattern: null,\n inputPlaceholder: '',\n inputType: 'text',\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: '',\n message: null,\n modalFade: true,\n modalClass: '',\n showCancelButton: false,\n showConfirmButton: true,\n type: '',\n title: undefined,\n showInput: false,\n action: '' as Action,\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: '',\n // refer to: https://github.com/ElemeFE/element/commit/2999279ae34ef10c373ca795c87b020ed6753eed\n // seemed ok for now without this state.\n // isOnComposition: false, // temporary remove\n validateError: false,\n zIndex: PopupManager.nextZIndex(),\n })\n\n const typeClass = computed(() => {\n const type = state.type\n return type && TypeComponentsMap[type]\n ? `el-message-box-icon--${type}`\n : ''\n })\n\n const iconComponent = computed(\n () => state.icon || TypeComponentsMap[state.type] || ''\n )\n const hasMessage = computed(() => !!state.message)\n const inputRef = ref<ComponentPublicInstance>(null)\n const confirmRef = ref<ComponentPublicInstance>(null)\n\n const confirmButtonClasses = computed(() => state.confirmButtonClass)\n\n watch(\n () => state.inputValue,\n async (val) => {\n await nextTick()\n if (props.boxType === 'prompt' && val !== null) {\n validate()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => visible.value,\n (val) => {\n if (val) {\n if (props.boxType === 'alert' || props.boxType === 'confirm') {\n nextTick().then(() => {\n confirmRef.value?.$el?.focus?.()\n })\n }\n state.zIndex = PopupManager.nextZIndex()\n }\n if (props.boxType !== 'prompt') return\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus()\n }\n })\n } else {\n state.editorErrorMessage = ''\n state.validateError = false\n }\n }\n )\n\n onMounted(async () => {\n await nextTick()\n if (props.closeOnHashChange) {\n on(window, 'hashchange', doClose)\n }\n })\n\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, 'hashchange', doClose)\n }\n })\n\n function doClose() {\n if (!visible.value) return\n visible.value = false\n nextTick(() => {\n if (state.action) emit('action', state.action)\n })\n }\n\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? 'close' : 'cancel')\n }\n }\n\n const handleInputEnter = () => {\n if (state.inputType !== 'textarea') {\n return handleAction('confirm')\n }\n }\n\n const handleAction = (action: Action) => {\n if (props.boxType === 'prompt' && action === 'confirm' && !validate()) {\n return\n }\n\n state.action = action\n\n if (state.beforeClose) {\n state.beforeClose?.(action, state, doClose)\n } else {\n doClose()\n }\n }\n\n const validate = () => {\n if (props.boxType === 'prompt') {\n const inputPattern = state.inputPattern\n if (inputPattern && !inputPattern.test(state.inputValue || '')) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n const inputValidator = state.inputValidator\n if (typeof inputValidator === 'function') {\n const validateResult = inputValidator(state.inputValue)\n if (validateResult === false) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n if (typeof validateResult === 'string') {\n state.editorErrorMessage = validateResult\n state.validateError = true\n return false\n }\n }\n }\n state.editorErrorMessage = ''\n state.validateError = false\n return true\n }\n\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs\n return (inputRefs.input || inputRefs.textarea) as HTMLElement\n }\n\n const handleClose = () => {\n handleAction('close')\n }\n\n // when close on press escape is disabled, pressing esc should not callout\n // any other message box and close any other dialog-ish elements\n // e.g. Dialog has a close on press esc feature, and when it closes, it calls\n // props.beforeClose method to make a intermediate state by callout a message box\n // for some verification or alerting. then if we allow global event liek this\n // to dispatch, it could callout another message box.\n if (props.closeOnPressEscape) {\n useModal(\n {\n handleClose,\n },\n visible\n )\n } else {\n usePreventGlobal(\n visible,\n 'keydown',\n (e: KeyboardEvent) => e.code === EVENT_CODE.esc\n )\n }\n\n // locks the screen to prevent scroll\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n // restore to prev active element.\n useRestoreActive(visible)\n\n return {\n ...toRefs(state),\n visible,\n hasMessage,\n typeClass,\n iconComponent,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose, // for outside usage\n handleClose, // for out side usage\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAgJA,aAAe,eAAe,CAAC;;AAE/B,EAAE,UAAU,EAAE;AACd,IAAI;AACJ,GAAG;EACD;IACE,QAAQ;IACR,OAAO;AACX,IAAI,SAAS;;AAEb,IAAI,GAAG,cAAc;GAClB;EACD,YAAY;OACP,EAAE;;MAEH,IAAI,EAAE;MACN;KACD;IACD,KAAK,EAAE;MACL,IAAI;MACJ,OAAO,EAAE,IAAI;;IAEf,UAAU,EAAE;MACV;MACA,OAAO;;aAEA,EAAE;;MAET;;;;MAIA,OAAO;;;;MAIP,OAAO,EAAE;;;;MAIT,OAAO,EAAE,IAAI;;UAET,EAAE,OAAO;IACf;MACE,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;;IAEf;MACE,IAAI,EAAE,MAAM;MACZ,OAAO,EAAE;;IAEX;MACE,I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_script_lang.mjs","sources":["../../../../../../packages/components/message-box/src/index.vue"],"sourcesContent":["<template>\n <transition name=\"fade-in-linear\" @after-leave=\"$emit('vanish')\">\n <el-overlay\n v-show=\"visible\"\n :z-index=\"zIndex\"\n :overlay-class=\"['is-message-box', modalClass]\"\n :mask=\"modal\"\n @click.self=\"handleWrapperClick\"\n >\n <div\n ref=\"root\"\n v-trap-focus\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n aria-modal=\"true\"\n :class=\"[\n 'el-message-box',\n customClass,\n { 'el-message-box--center': center },\n ]\"\n :style=\"customStyle\"\n >\n <div\n v-if=\"title !== null && title !== undefined\"\n class=\"el-message-box__header\"\n >\n <div class=\"el-message-box__title\">\n <el-icon\n v-if=\"iconComponent && center\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <span>{{ title }}</span>\n </div>\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"el-message-box__headerbtn\"\n aria-label=\"Close\"\n @click=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n @keydown.prevent.enter=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n >\n <el-icon class=\"el-message-box__close\"><close /></el-icon>\n </button>\n </div>\n <div class=\"el-message-box__content\">\n <div class=\"el-message-box__container\">\n <el-icon\n v-if=\"iconComponent && !center && hasMessage\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div v-if=\"hasMessage\" class=\"el-message-box__message\">\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <p v-else v-html=\"message\"></p>\n </slot>\n </div>\n </div>\n <div v-show=\"showInput\" class=\"el-message-box__input\">\n <el-input\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"inputPlaceholder\"\n :class=\"{ invalid: validateError }\"\n @keydown.prevent.enter=\"handleInputEnter\"\n />\n <div\n class=\"el-message-box__errormsg\"\n :style=\"{\n visibility: !!editorErrorMessage ? 'visible' : 'hidden',\n }\"\n >\n {{ editorErrorMessage }}\n </div>\n </div>\n </div>\n <div class=\"el-message-box__btns\">\n <el-button\n v-if=\"showCancelButton\"\n :loading=\"cancelButtonLoading\"\n :class=\"[cancelButtonClass]\"\n :round=\"roundButton\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('cancel')\"\n @keydown.prevent.enter=\"handleAction('cancel')\"\n >\n {{ cancelButtonText || t('el.messagebox.cancel') }}\n </el-button>\n <el-button\n v-show=\"showConfirmButton\"\n ref=\"confirmRef\"\n type=\"primary\"\n :loading=\"confirmButtonLoading\"\n :class=\"[confirmButtonClasses]\"\n :round=\"roundButton\"\n :disabled=\"confirmButtonDisabled\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('confirm')\"\n @keydown.prevent.enter=\"handleAction('confirm')\"\n >\n {{ confirmButtonText || t('el.messagebox.confirm') }}\n </el-button>\n </div>\n </div>\n </el-overlay>\n </transition>\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onMounted,\n onBeforeUnmount,\n computed,\n watch,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport { TrapFocus } from '@element-plus/directives'\nimport {\n useModal,\n useLockscreen,\n useLocale,\n useRestoreActive,\n usePreventGlobal,\n} from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { on, off } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils/icon'\n\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type {\n Action,\n MessageBoxState,\n MessageBoxType,\n} from './message-box.type'\n\nexport default defineComponent({\n name: 'ElMessageBox',\n directives: {\n TrapFocus,\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents,\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n closeOnHashChange: {\n type: Boolean,\n default: true,\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean,\n },\n container: {\n type: String, // default append to body\n default: 'body',\n },\n boxType: {\n type: String as PropType<MessageBoxType>,\n default: '',\n },\n },\n emits: ['vanish', 'action'],\n setup(props, { emit }) {\n // const popup = usePopup(props, doClose)\n const { t } = useLocale()\n const visible = ref(false)\n // s represents state\n const state = reactive<MessageBoxState>({\n beforeClose: null,\n callback: null,\n cancelButtonText: '',\n cancelButtonClass: '',\n confirmButtonText: '',\n confirmButtonClass: '',\n customClass: '',\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: '',\n inputPattern: null,\n inputPlaceholder: '',\n inputType: 'text',\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: '',\n message: null,\n modalFade: true,\n modalClass: '',\n showCancelButton: false,\n showConfirmButton: true,\n type: '',\n title: undefined,\n showInput: false,\n action: '' as Action,\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: '',\n // refer to: https://github.com/ElemeFE/element/commit/2999279ae34ef10c373ca795c87b020ed6753eed\n // seemed ok for now without this state.\n // isOnComposition: false, // temporary remove\n validateError: false,\n zIndex: PopupManager.nextZIndex(),\n })\n\n const typeClass = computed(() => {\n const type = state.type\n return type && TypeComponentsMap[type]\n ? `el-message-box-icon--${type}`\n : ''\n })\n\n const iconComponent = computed(\n () => state.icon || TypeComponentsMap[state.type] || ''\n )\n const hasMessage = computed(() => !!state.message)\n const inputRef = ref<ComponentPublicInstance>(null)\n const confirmRef = ref<ComponentPublicInstance>(null)\n\n const confirmButtonClasses = computed(() => state.confirmButtonClass)\n\n watch(\n () => state.inputValue,\n async (val) => {\n await nextTick()\n if (props.boxType === 'prompt' && val !== null) {\n validate()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => visible.value,\n (val) => {\n if (val) {\n if (props.boxType === 'alert' || props.boxType === 'confirm') {\n nextTick().then(() => {\n confirmRef.value?.$el?.focus?.()\n })\n }\n state.zIndex = PopupManager.nextZIndex()\n }\n if (props.boxType !== 'prompt') return\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus()\n }\n })\n } else {\n state.editorErrorMessage = ''\n state.validateError = false\n }\n }\n )\n\n onMounted(async () => {\n await nextTick()\n if (props.closeOnHashChange) {\n on(window, 'hashchange', doClose)\n }\n })\n\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, 'hashchange', doClose)\n }\n })\n\n function doClose() {\n if (!visible.value) return\n visible.value = false\n nextTick(() => {\n if (state.action) emit('action', state.action)\n })\n }\n\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? 'close' : 'cancel')\n }\n }\n\n const handleInputEnter = () => {\n if (state.inputType !== 'textarea') {\n return handleAction('confirm')\n }\n }\n\n const handleAction = (action: Action) => {\n if (props.boxType === 'prompt' && action === 'confirm' && !validate()) {\n return\n }\n\n state.action = action\n\n if (state.beforeClose) {\n state.beforeClose?.(action, state, doClose)\n } else {\n doClose()\n }\n }\n\n const validate = () => {\n if (props.boxType === 'prompt') {\n const inputPattern = state.inputPattern\n if (inputPattern && !inputPattern.test(state.inputValue || '')) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n const inputValidator = state.inputValidator\n if (typeof inputValidator === 'function') {\n const validateResult = inputValidator(state.inputValue)\n if (validateResult === false) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n if (typeof validateResult === 'string') {\n state.editorErrorMessage = validateResult\n state.validateError = true\n return false\n }\n }\n }\n state.editorErrorMessage = ''\n state.validateError = false\n return true\n }\n\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs\n return (inputRefs.input || inputRefs.textarea) as HTMLElement\n }\n\n const handleClose = () => {\n handleAction('close')\n }\n\n // when close on press escape is disabled, pressing esc should not callout\n // any other message box and close any other dialog-ish elements\n // e.g. Dialog has a close on press esc feature, and when it closes, it calls\n // props.beforeClose method to make a intermediate state by callout a message box\n // for some verification or alerting. then if we allow global event liek this\n // to dispatch, it could callout another message box.\n if (props.closeOnPressEscape) {\n useModal(\n {\n handleClose,\n },\n visible\n )\n } else {\n usePreventGlobal(\n visible,\n 'keydown',\n (e: KeyboardEvent) => e.code === EVENT_CODE.esc\n )\n }\n\n // locks the screen to prevent scroll\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n // restore to prev active element.\n useRestoreActive(visible)\n\n return {\n ...toRefs(state),\n visible,\n hasMessage,\n typeClass,\n iconComponent,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose, // for outside usage\n handleClose, // for out side usage\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t,\n }\n },\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAiJA,aAAe,eAAe,CAAC;;AAE/B,EAAE,UAAU,EAAE;AACd,IAAI;AACJ,GAAG;EACD;IACE,QAAQ;IACR,OAAO;AACX,IAAI,SAAS;;AAEb,IAAI,GAAG,cAAc;GAClB;EACD,YAAY;OACP,EAAE;;MAEH,IAAI,EAAE;MACN;KACD;IACD,KAAK,EAAE;MACL,IAAI;MACJ,OAAO,EAAE,IAAI;;IAEf,UAAU,EAAE;MACV;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AAC,CAAC;WACP;sBACW,CAAC,OAAO,EAAE;;aAEnB,CAAC,UAAU,EAAE;mBACP,CAAC;;oBAEA,CAAC,QAAQ;WAClB;gBACK,KAAK,CAAC;aACT;gBACG;eACD;mBACI;;;gBAGH;aACH;iBACI;;;;MAIX;MACA;;;;;;"}
|
|
@@ -37,6 +37,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
37
37
|
default: withCtx(() => [
|
|
38
38
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
39
39
|
ref: "root",
|
|
40
|
+
role: "dialog",
|
|
40
41
|
"aria-label": _ctx.title || "dialog",
|
|
41
42
|
"aria-modal": "true",
|
|
42
43
|
class: normalizeClass([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue_vue_type_template_id_7035e868_lang.mjs","sources":["../../../../../../packages/components/message-box/src/index.vue?vue&type=template&id=7035e868&lang.js"],"sourcesContent":["<template>\n <transition name=\"fade-in-linear\" @after-leave=\"$emit('vanish')\">\n <el-overlay\n v-show=\"visible\"\n :z-index=\"zIndex\"\n :overlay-class=\"['is-message-box', modalClass]\"\n :mask=\"modal\"\n @click.self=\"handleWrapperClick\"\n >\n <div\n ref=\"root\"\n v-trap-focus\n :aria-label=\"title || 'dialog'\"\n aria-modal=\"true\"\n :class=\"[\n 'el-message-box',\n customClass,\n { 'el-message-box--center': center },\n ]\"\n :style=\"customStyle\"\n >\n <div\n v-if=\"title !== null && title !== undefined\"\n class=\"el-message-box__header\"\n >\n <div class=\"el-message-box__title\">\n <el-icon\n v-if=\"iconComponent && center\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <span>{{ title }}</span>\n </div>\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"el-message-box__headerbtn\"\n aria-label=\"Close\"\n @click=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n @keydown.prevent.enter=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n >\n <el-icon class=\"el-message-box__close\"><close /></el-icon>\n </button>\n </div>\n <div class=\"el-message-box__content\">\n <div class=\"el-message-box__container\">\n <el-icon\n v-if=\"iconComponent && !center && hasMessage\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div v-if=\"hasMessage\" class=\"el-message-box__message\">\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <p v-else v-html=\"message\"></p>\n </slot>\n </div>\n </div>\n <div v-show=\"showInput\" class=\"el-message-box__input\">\n <el-input\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"inputPlaceholder\"\n :class=\"{ invalid: validateError }\"\n @keydown.prevent.enter=\"handleInputEnter\"\n />\n <div\n class=\"el-message-box__errormsg\"\n :style=\"{\n visibility: !!editorErrorMessage ? 'visible' : 'hidden',\n }\"\n >\n {{ editorErrorMessage }}\n </div>\n </div>\n </div>\n <div class=\"el-message-box__btns\">\n <el-button\n v-if=\"showCancelButton\"\n :loading=\"cancelButtonLoading\"\n :class=\"[cancelButtonClass]\"\n :round=\"roundButton\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('cancel')\"\n @keydown.prevent.enter=\"handleAction('cancel')\"\n >\n {{ cancelButtonText || t('el.messagebox.cancel') }}\n </el-button>\n <el-button\n v-show=\"showConfirmButton\"\n ref=\"confirmRef\"\n type=\"primary\"\n :loading=\"confirmButtonLoading\"\n :class=\"[confirmButtonClasses]\"\n :round=\"roundButton\"\n :disabled=\"confirmButtonDisabled\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('confirm')\"\n @keydown.prevent.enter=\"handleAction('confirm')\"\n >\n {{ confirmButtonText || t('el.messagebox.confirm') }}\n </el-button>\n </div>\n </div>\n </el-overlay>\n </transition>\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onMounted,\n onBeforeUnmount,\n computed,\n watch,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport { TrapFocus } from '@element-plus/directives'\nimport {\n useModal,\n useLockscreen,\n useLocale,\n useRestoreActive,\n usePreventGlobal,\n} from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { on, off } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils/icon'\n\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type {\n Action,\n MessageBoxState,\n MessageBoxType,\n} from './message-box.type'\n\nexport default defineComponent({\n name: 'ElMessageBox',\n directives: {\n TrapFocus,\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents,\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n closeOnHashChange: {\n type: Boolean,\n default: true,\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean,\n },\n container: {\n type: String, // default append to body\n default: 'body',\n },\n boxType: {\n type: String as PropType<MessageBoxType>,\n default: '',\n },\n },\n emits: ['vanish', 'action'],\n setup(props, { emit }) {\n // const popup = usePopup(props, doClose)\n const { t } = useLocale()\n const visible = ref(false)\n // s represents state\n const state = reactive<MessageBoxState>({\n beforeClose: null,\n callback: null,\n cancelButtonText: '',\n cancelButtonClass: '',\n confirmButtonText: '',\n confirmButtonClass: '',\n customClass: '',\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: '',\n inputPattern: null,\n inputPlaceholder: '',\n inputType: 'text',\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: '',\n message: null,\n modalFade: true,\n modalClass: '',\n showCancelButton: false,\n showConfirmButton: true,\n type: '',\n title: undefined,\n showInput: false,\n action: '' as Action,\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: '',\n // refer to: https://github.com/ElemeFE/element/commit/2999279ae34ef10c373ca795c87b020ed6753eed\n // seemed ok for now without this state.\n // isOnComposition: false, // temporary remove\n validateError: false,\n zIndex: PopupManager.nextZIndex(),\n })\n\n const typeClass = computed(() => {\n const type = state.type\n return type && TypeComponentsMap[type]\n ? `el-message-box-icon--${type}`\n : ''\n })\n\n const iconComponent = computed(\n () => state.icon || TypeComponentsMap[state.type] || ''\n )\n const hasMessage = computed(() => !!state.message)\n const inputRef = ref<ComponentPublicInstance>(null)\n const confirmRef = ref<ComponentPublicInstance>(null)\n\n const confirmButtonClasses = computed(() => state.confirmButtonClass)\n\n watch(\n () => state.inputValue,\n async (val) => {\n await nextTick()\n if (props.boxType === 'prompt' && val !== null) {\n validate()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => visible.value,\n (val) => {\n if (val) {\n if (props.boxType === 'alert' || props.boxType === 'confirm') {\n nextTick().then(() => {\n confirmRef.value?.$el?.focus?.()\n })\n }\n state.zIndex = PopupManager.nextZIndex()\n }\n if (props.boxType !== 'prompt') return\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus()\n }\n })\n } else {\n state.editorErrorMessage = ''\n state.validateError = false\n }\n }\n )\n\n onMounted(async () => {\n await nextTick()\n if (props.closeOnHashChange) {\n on(window, 'hashchange', doClose)\n }\n })\n\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, 'hashchange', doClose)\n }\n })\n\n function doClose() {\n if (!visible.value) return\n visible.value = false\n nextTick(() => {\n if (state.action) emit('action', state.action)\n })\n }\n\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? 'close' : 'cancel')\n }\n }\n\n const handleInputEnter = () => {\n if (state.inputType !== 'textarea') {\n return handleAction('confirm')\n }\n }\n\n const handleAction = (action: Action) => {\n if (props.boxType === 'prompt' && action === 'confirm' && !validate()) {\n return\n }\n\n state.action = action\n\n if (state.beforeClose) {\n state.beforeClose?.(action, state, doClose)\n } else {\n doClose()\n }\n }\n\n const validate = () => {\n if (props.boxType === 'prompt') {\n const inputPattern = state.inputPattern\n if (inputPattern && !inputPattern.test(state.inputValue || '')) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n const inputValidator = state.inputValidator\n if (typeof inputValidator === 'function') {\n const validateResult = inputValidator(state.inputValue)\n if (validateResult === false) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n if (typeof validateResult === 'string') {\n state.editorErrorMessage = validateResult\n state.validateError = true\n return false\n }\n }\n }\n state.editorErrorMessage = ''\n state.validateError = false\n return true\n }\n\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs\n return (inputRefs.input || inputRefs.textarea) as HTMLElement\n }\n\n const handleClose = () => {\n handleAction('close')\n }\n\n // when close on press escape is disabled, pressing esc should not callout\n // any other message box and close any other dialog-ish elements\n // e.g. Dialog has a close on press esc feature, and when it closes, it calls\n // props.beforeClose method to make a intermediate state by callout a message box\n // for some verification or alerting. then if we allow global event liek this\n // to dispatch, it could callout another message box.\n if (props.closeOnPressEscape) {\n useModal(\n {\n handleClose,\n },\n visible\n )\n } else {\n usePreventGlobal(\n visible,\n 'keydown',\n (e: KeyboardEvent) => e.code === EVENT_CODE.esc\n )\n }\n\n // locks the screen to prevent scroll\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n // restore to prev active element.\n useRestoreActive(visible)\n\n return {\n ...toRefs(state),\n visible,\n hasMessage,\n typeClass,\n iconComponent,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose, // for outside usage\n handleClose, // for out side usage\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t,\n }\n },\n})\n</script>\n"],"names":["_withModifiers","_createCommentVNode","_withCtx","_createTextVNode"],"mappings":";;;;;;EAuBU;;qBAEK,KAAK,EAAC;qBAyBR,KAAK,EAAC;;;;EASgB;;;;mDAO4B;eAmBlD,KAAK,EAAC,sBAAsB;;;;;;;;;;;IApF3B;;;;;QAGP,SAAOA;;QAEP;;;0BAGD;;YACE,KAAI;;;;;;;;kDASe;;;;;;;;;;2CAYb;;;;;;;;iCAKa;;;;;;;;;;;;;wBAWf;;;;;;;;;;;;;;;sBAOEC;;;;;;;;;;;0BAOY;0CAAV;;;8BACU,SAAgB;;;;;;;;kBAM5B;;;qCAEgB;;;;;;uBAMX,EAACC;kBACLC;;;;;;;;sCAQP;;;;;yBAIU;;;iFAGc;;;;;;;;;;;;;oBAUd;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.vue_vue_type_template_id_7035e868_lang.mjs","sources":["../../../../../../packages/components/message-box/src/index.vue?vue&type=template&id=7035e868&lang.js"],"sourcesContent":["<template>\n <transition name=\"fade-in-linear\" @after-leave=\"$emit('vanish')\">\n <el-overlay\n v-show=\"visible\"\n :z-index=\"zIndex\"\n :overlay-class=\"['is-message-box', modalClass]\"\n :mask=\"modal\"\n @click.self=\"handleWrapperClick\"\n >\n <div\n ref=\"root\"\n v-trap-focus\n role=\"dialog\"\n :aria-label=\"title || 'dialog'\"\n aria-modal=\"true\"\n :class=\"[\n 'el-message-box',\n customClass,\n { 'el-message-box--center': center },\n ]\"\n :style=\"customStyle\"\n >\n <div\n v-if=\"title !== null && title !== undefined\"\n class=\"el-message-box__header\"\n >\n <div class=\"el-message-box__title\">\n <el-icon\n v-if=\"iconComponent && center\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <span>{{ title }}</span>\n </div>\n <button\n v-if=\"showClose\"\n type=\"button\"\n class=\"el-message-box__headerbtn\"\n aria-label=\"Close\"\n @click=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n @keydown.prevent.enter=\"\n handleAction(distinguishCancelAndClose ? 'close' : 'cancel')\n \"\n >\n <el-icon class=\"el-message-box__close\"><close /></el-icon>\n </button>\n </div>\n <div class=\"el-message-box__content\">\n <div class=\"el-message-box__container\">\n <el-icon\n v-if=\"iconComponent && !center && hasMessage\"\n class=\"el-message-box__status\"\n :class=\"typeClass\"\n >\n <component :is=\"iconComponent\" />\n </el-icon>\n <div v-if=\"hasMessage\" class=\"el-message-box__message\">\n <slot>\n <p v-if=\"!dangerouslyUseHTMLString\">{{ message }}</p>\n <p v-else v-html=\"message\"></p>\n </slot>\n </div>\n </div>\n <div v-show=\"showInput\" class=\"el-message-box__input\">\n <el-input\n ref=\"inputRef\"\n v-model=\"inputValue\"\n :type=\"inputType\"\n :placeholder=\"inputPlaceholder\"\n :class=\"{ invalid: validateError }\"\n @keydown.prevent.enter=\"handleInputEnter\"\n />\n <div\n class=\"el-message-box__errormsg\"\n :style=\"{\n visibility: !!editorErrorMessage ? 'visible' : 'hidden',\n }\"\n >\n {{ editorErrorMessage }}\n </div>\n </div>\n </div>\n <div class=\"el-message-box__btns\">\n <el-button\n v-if=\"showCancelButton\"\n :loading=\"cancelButtonLoading\"\n :class=\"[cancelButtonClass]\"\n :round=\"roundButton\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('cancel')\"\n @keydown.prevent.enter=\"handleAction('cancel')\"\n >\n {{ cancelButtonText || t('el.messagebox.cancel') }}\n </el-button>\n <el-button\n v-show=\"showConfirmButton\"\n ref=\"confirmRef\"\n type=\"primary\"\n :loading=\"confirmButtonLoading\"\n :class=\"[confirmButtonClasses]\"\n :round=\"roundButton\"\n :disabled=\"confirmButtonDisabled\"\n :size=\"buttonSize || ''\"\n @click=\"handleAction('confirm')\"\n @keydown.prevent.enter=\"handleAction('confirm')\"\n >\n {{ confirmButtonText || t('el.messagebox.confirm') }}\n </el-button>\n </div>\n </div>\n </el-overlay>\n </transition>\n</template>\n<script lang=\"ts\">\nimport {\n defineComponent,\n nextTick,\n onMounted,\n onBeforeUnmount,\n computed,\n watch,\n reactive,\n ref,\n toRefs,\n} from 'vue'\nimport ElButton from '@element-plus/components/button'\nimport { TrapFocus } from '@element-plus/directives'\nimport {\n useModal,\n useLockscreen,\n useLocale,\n useRestoreActive,\n usePreventGlobal,\n} from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { PopupManager } from '@element-plus/utils/popup-manager'\nimport { on, off } from '@element-plus/utils/dom'\nimport { EVENT_CODE } from '@element-plus/utils/aria'\nimport { isValidComponentSize } from '@element-plus/utils/validators'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { TypeComponents, TypeComponentsMap } from '@element-plus/utils/icon'\n\nimport type { ComponentPublicInstance, PropType } from 'vue'\nimport type { ComponentSize } from '@element-plus/utils/types'\nimport type {\n Action,\n MessageBoxState,\n MessageBoxType,\n} from './message-box.type'\n\nexport default defineComponent({\n name: 'ElMessageBox',\n directives: {\n TrapFocus,\n },\n components: {\n ElButton,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents,\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String as PropType<ComponentSize>,\n validator: isValidComponentSize,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n showClose: {\n type: Boolean,\n default: true,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n closeOnHashChange: {\n type: Boolean,\n default: true,\n },\n center: Boolean,\n roundButton: {\n default: false,\n type: Boolean,\n },\n container: {\n type: String, // default append to body\n default: 'body',\n },\n boxType: {\n type: String as PropType<MessageBoxType>,\n default: '',\n },\n },\n emits: ['vanish', 'action'],\n setup(props, { emit }) {\n // const popup = usePopup(props, doClose)\n const { t } = useLocale()\n const visible = ref(false)\n // s represents state\n const state = reactive<MessageBoxState>({\n beforeClose: null,\n callback: null,\n cancelButtonText: '',\n cancelButtonClass: '',\n confirmButtonText: '',\n confirmButtonClass: '',\n customClass: '',\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: '',\n inputPattern: null,\n inputPlaceholder: '',\n inputType: 'text',\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: '',\n message: null,\n modalFade: true,\n modalClass: '',\n showCancelButton: false,\n showConfirmButton: true,\n type: '',\n title: undefined,\n showInput: false,\n action: '' as Action,\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: '',\n // refer to: https://github.com/ElemeFE/element/commit/2999279ae34ef10c373ca795c87b020ed6753eed\n // seemed ok for now without this state.\n // isOnComposition: false, // temporary remove\n validateError: false,\n zIndex: PopupManager.nextZIndex(),\n })\n\n const typeClass = computed(() => {\n const type = state.type\n return type && TypeComponentsMap[type]\n ? `el-message-box-icon--${type}`\n : ''\n })\n\n const iconComponent = computed(\n () => state.icon || TypeComponentsMap[state.type] || ''\n )\n const hasMessage = computed(() => !!state.message)\n const inputRef = ref<ComponentPublicInstance>(null)\n const confirmRef = ref<ComponentPublicInstance>(null)\n\n const confirmButtonClasses = computed(() => state.confirmButtonClass)\n\n watch(\n () => state.inputValue,\n async (val) => {\n await nextTick()\n if (props.boxType === 'prompt' && val !== null) {\n validate()\n }\n },\n { immediate: true }\n )\n\n watch(\n () => visible.value,\n (val) => {\n if (val) {\n if (props.boxType === 'alert' || props.boxType === 'confirm') {\n nextTick().then(() => {\n confirmRef.value?.$el?.focus?.()\n })\n }\n state.zIndex = PopupManager.nextZIndex()\n }\n if (props.boxType !== 'prompt') return\n if (val) {\n nextTick().then(() => {\n if (inputRef.value && inputRef.value.$el) {\n getInputElement().focus()\n }\n })\n } else {\n state.editorErrorMessage = ''\n state.validateError = false\n }\n }\n )\n\n onMounted(async () => {\n await nextTick()\n if (props.closeOnHashChange) {\n on(window, 'hashchange', doClose)\n }\n })\n\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n off(window, 'hashchange', doClose)\n }\n })\n\n function doClose() {\n if (!visible.value) return\n visible.value = false\n nextTick(() => {\n if (state.action) emit('action', state.action)\n })\n }\n\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? 'close' : 'cancel')\n }\n }\n\n const handleInputEnter = () => {\n if (state.inputType !== 'textarea') {\n return handleAction('confirm')\n }\n }\n\n const handleAction = (action: Action) => {\n if (props.boxType === 'prompt' && action === 'confirm' && !validate()) {\n return\n }\n\n state.action = action\n\n if (state.beforeClose) {\n state.beforeClose?.(action, state, doClose)\n } else {\n doClose()\n }\n }\n\n const validate = () => {\n if (props.boxType === 'prompt') {\n const inputPattern = state.inputPattern\n if (inputPattern && !inputPattern.test(state.inputValue || '')) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n const inputValidator = state.inputValidator\n if (typeof inputValidator === 'function') {\n const validateResult = inputValidator(state.inputValue)\n if (validateResult === false) {\n state.editorErrorMessage =\n state.inputErrorMessage || t('el.messagebox.error')\n state.validateError = true\n return false\n }\n if (typeof validateResult === 'string') {\n state.editorErrorMessage = validateResult\n state.validateError = true\n return false\n }\n }\n }\n state.editorErrorMessage = ''\n state.validateError = false\n return true\n }\n\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs\n return (inputRefs.input || inputRefs.textarea) as HTMLElement\n }\n\n const handleClose = () => {\n handleAction('close')\n }\n\n // when close on press escape is disabled, pressing esc should not callout\n // any other message box and close any other dialog-ish elements\n // e.g. Dialog has a close on press esc feature, and when it closes, it calls\n // props.beforeClose method to make a intermediate state by callout a message box\n // for some verification or alerting. then if we allow global event liek this\n // to dispatch, it could callout another message box.\n if (props.closeOnPressEscape) {\n useModal(\n {\n handleClose,\n },\n visible\n )\n } else {\n usePreventGlobal(\n visible,\n 'keydown',\n (e: KeyboardEvent) => e.code === EVENT_CODE.esc\n )\n }\n\n // locks the screen to prevent scroll\n if (props.lockScroll) {\n useLockscreen(visible)\n }\n\n // restore to prev active element.\n useRestoreActive(visible)\n\n return {\n ...toRefs(state),\n visible,\n hasMessage,\n typeClass,\n iconComponent,\n confirmButtonClasses,\n inputRef,\n confirmRef,\n doClose, // for outside usage\n handleClose, // for out side usage\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t,\n }\n },\n})\n</script>\n"],"names":["_withModifiers","_createCommentVNode","_withCtx","_createTextVNode"],"mappings":";;;;;;EAwBU;;qBAEK,KAAK,EAAC;qBAyBR,KAAK,EAAC;;;;EASgB;;;;mDAO4B;eAmBlD,KAAK,EAAC,sBAAsB;;;;;;;;;;;IArF3B;;;;;QAGP,SAAOA;;QAEP;;;0BAGD;;YACE;YAEA;;;;;;;;kDAQmB;;;;;;;;;;2CAYb;;;;;;;;iCAKa;;;;;;;;;;;;;wBAWf;;;;;;;;;;;;;;;sBAOEC;;;;;;;;;;;0BAOY;0CAAV;;;8BACU,SAAgB;;;;;;;;kBAM5B;;;qCAEgB;;;;;;uBAMX,EAACC;kBACLC;;;;;;;;sCAQP;;;;;yBAIU;;;iFAGc;;;;;;;;;;;;;oBAUd;;;;;;;;;"}
|
|
@@ -45,8 +45,8 @@ export declare const ElPagination: import("../../utils/types").SFCWithInstall<im
|
|
|
45
45
|
small: boolean;
|
|
46
46
|
disabled: boolean;
|
|
47
47
|
layout: string;
|
|
48
|
-
popperClass: string;
|
|
49
48
|
background: boolean;
|
|
49
|
+
popperClass: string;
|
|
50
50
|
pagerCount: number;
|
|
51
51
|
pageSizes: number[];
|
|
52
52
|
prevText: string;
|
|
@@ -70,8 +70,8 @@ export declare const ElPagination: import("../../utils/types").SFCWithInstall<im
|
|
|
70
70
|
small: boolean;
|
|
71
71
|
disabled: boolean;
|
|
72
72
|
layout: string;
|
|
73
|
-
popperClass: string;
|
|
74
73
|
background: boolean;
|
|
74
|
+
popperClass: string;
|
|
75
75
|
pagerCount: number;
|
|
76
76
|
pageSizes: number[];
|
|
77
77
|
prevText: string;
|
|
@@ -74,8 +74,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
74
74
|
small: boolean;
|
|
75
75
|
disabled: boolean;
|
|
76
76
|
layout: string;
|
|
77
|
-
popperClass: string;
|
|
78
77
|
background: boolean;
|
|
78
|
+
popperClass: string;
|
|
79
79
|
pagerCount: number;
|
|
80
80
|
pageSizes: number[];
|
|
81
81
|
prevText: string;
|
|
@@ -99,8 +99,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
99
99
|
small: boolean;
|
|
100
100
|
disabled: boolean;
|
|
101
101
|
layout: string;
|
|
102
|
-
popperClass: string;
|
|
103
102
|
background: boolean;
|
|
103
|
+
popperClass: string;
|
|
104
104
|
pagerCount: number;
|
|
105
105
|
pageSizes: number[];
|
|
106
106
|
prevText: string;
|
|
@@ -7,17 +7,18 @@ export declare const ElPopconfirm: import("../../utils/types").SFCWithInstall<im
|
|
|
7
7
|
readonly icon: import("../../utils/props").BuildPropReturn<import("../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, any, unknown, unknown, unknown>;
|
|
8
8
|
readonly iconColor: import("../../utils/props").BuildPropReturn<StringConstructor, "#f90", unknown, unknown, unknown>;
|
|
9
9
|
readonly hideIcon: import("../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
10
|
+
readonly hideAfter: import("../../utils/props").BuildPropReturn<NumberConstructor, 200, unknown, unknown, unknown>;
|
|
11
|
+
readonly onConfirm: import("../../utils/props").BuildPropReturn<import("../../utils/props").PropWrapper<(e: Event) => boolean | Promise<boolean>>, unknown, unknown, unknown, unknown>;
|
|
12
|
+
readonly onCancel: import("../../utils/props").BuildPropReturn<import("../../utils/props").PropWrapper<(e: Event) => boolean | Promise<boolean>>, unknown, unknown, unknown, unknown>;
|
|
10
13
|
}, {
|
|
11
|
-
Effect: typeof import("..").Effect;
|
|
12
|
-
visible: import("vue").Ref<boolean>;
|
|
13
14
|
finalConfirmButtonText: import("vue").ComputedRef<string>;
|
|
14
15
|
finalCancelButtonText: import("vue").ComputedRef<string>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
confirm: () =>
|
|
19
|
-
cancel: () =>
|
|
20
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
16
|
+
tooltipRef: import("vue").Ref<{
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
} | undefined>;
|
|
19
|
+
confirm: (e: Event) => void;
|
|
20
|
+
cancel: (e: Event) => void;
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
21
22
|
readonly title?: unknown;
|
|
22
23
|
readonly confirmButtonText?: unknown;
|
|
23
24
|
readonly cancelButtonText?: unknown;
|
|
@@ -26,7 +27,11 @@ export declare const ElPopconfirm: import("../../utils/types").SFCWithInstall<im
|
|
|
26
27
|
readonly icon?: unknown;
|
|
27
28
|
readonly iconColor?: unknown;
|
|
28
29
|
readonly hideIcon?: unknown;
|
|
30
|
+
readonly hideAfter?: unknown;
|
|
31
|
+
readonly onConfirm?: unknown;
|
|
32
|
+
readonly onCancel?: unknown;
|
|
29
33
|
} & {
|
|
34
|
+
hideAfter: number;
|
|
30
35
|
confirmButtonType: import("../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
31
36
|
cancelButtonType: import("../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
32
37
|
iconColor: string;
|
|
@@ -36,18 +41,20 @@ export declare const ElPopconfirm: import("../../utils/types").SFCWithInstall<im
|
|
|
36
41
|
title?: string | undefined;
|
|
37
42
|
confirmButtonText?: string | undefined;
|
|
38
43
|
cancelButtonText?: string | undefined;
|
|
39
|
-
|
|
40
|
-
onCancel?: (() =>
|
|
41
|
-
|
|
42
|
-
}, {
|
|
44
|
+
onConfirm?: ((e: Event) => boolean | Promise<boolean>) | undefined;
|
|
45
|
+
onCancel?: ((e: Event) => boolean | Promise<boolean>) | undefined;
|
|
46
|
+
}>, {
|
|
43
47
|
icon: import("../../utils/props").BuildPropType<import("../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown>;
|
|
44
48
|
title: string;
|
|
49
|
+
hideAfter: number;
|
|
45
50
|
confirmButtonText: string;
|
|
46
51
|
cancelButtonText: string;
|
|
47
52
|
confirmButtonType: import("../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
48
53
|
cancelButtonType: import("../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
49
54
|
iconColor: string;
|
|
50
55
|
hideIcon: import("../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
56
|
+
onConfirm: (e: Event) => boolean | Promise<boolean>;
|
|
57
|
+
onCancel: (e: Event) => boolean | Promise<boolean>;
|
|
51
58
|
}>> & Record<string, any>;
|
|
52
59
|
export default ElPopconfirm;
|
|
53
60
|
export * from './src/popconfirm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../../utils/with-install.mjs';
|
|
2
2
|
import './src/popconfirm2.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { popconfirmProps } from './src/popconfirm.mjs';
|
|
4
4
|
import script from './src/popconfirm.vue_vue_type_script_lang.mjs';
|
|
5
5
|
|
|
6
6
|
const ElPopconfirm = withInstall(script);
|
|
@@ -8,10 +8,8 @@ export declare const popconfirmProps: {
|
|
|
8
8
|
readonly icon: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, any, unknown, unknown, unknown>;
|
|
9
9
|
readonly iconColor: import("element-plus/es/utils/props").BuildPropReturn<StringConstructor, "#f90", unknown, unknown, unknown>;
|
|
10
10
|
readonly hideIcon: import("element-plus/es/utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
11
|
+
readonly hideAfter: import("element-plus/es/utils/props").BuildPropReturn<NumberConstructor, 200, unknown, unknown, unknown>;
|
|
12
|
+
readonly onConfirm: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<(e: Event) => Promise<boolean> | boolean>, unknown, unknown, unknown, unknown>;
|
|
13
|
+
readonly onCancel: import("element-plus/es/utils/props").BuildPropReturn<import("element-plus/es/utils/props").PropWrapper<(e: Event) => Promise<boolean> | boolean>, unknown, unknown, unknown, unknown>;
|
|
11
14
|
};
|
|
12
15
|
export declare type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>;
|
|
13
|
-
export declare const popconfirmEmits: {
|
|
14
|
-
confirm: () => boolean;
|
|
15
|
-
cancel: () => boolean;
|
|
16
|
-
};
|
|
17
|
-
export declare type PopconfirmEmits = typeof popconfirmEmits;
|
|
@@ -34,12 +34,18 @@ const popconfirmProps = buildProps({
|
|
|
34
34
|
hideIcon: {
|
|
35
35
|
type: Boolean,
|
|
36
36
|
default: false
|
|
37
|
+
},
|
|
38
|
+
hideAfter: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 200
|
|
41
|
+
},
|
|
42
|
+
onConfirm: {
|
|
43
|
+
type: definePropType(Function)
|
|
44
|
+
},
|
|
45
|
+
onCancel: {
|
|
46
|
+
type: definePropType(Function)
|
|
37
47
|
}
|
|
38
48
|
});
|
|
39
|
-
const popconfirmEmits = {
|
|
40
|
-
confirm: () => true,
|
|
41
|
-
cancel: () => true
|
|
42
|
-
};
|
|
43
49
|
|
|
44
|
-
export {
|
|
50
|
+
export { popconfirmProps };
|
|
45
51
|
//# sourceMappingURL=popconfirm.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popconfirm.mjs","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonType } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, definePropType } from '@element-plus/utils/props'\n\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const popconfirmProps = buildProps({\n title: {\n type: String,\n },\n confirmButtonText: {\n type: String,\n },\n cancelButtonText: {\n type: String,\n },\n confirmButtonType: {\n type: String,\n values: buttonType,\n default: 'primary',\n },\n cancelButtonType: {\n type: String,\n values: buttonType,\n default: 'text',\n },\n icon: {\n type: definePropType<string | Component>([String, Object]),\n default: QuestionFilled as any,\n },\n iconColor: {\n type: String,\n default: '#f90',\n },\n hideIcon: {\n type: Boolean,\n default: false,\n },\n
|
|
1
|
+
{"version":3,"file":"popconfirm.mjs","sources":["../../../../../../packages/components/popconfirm/src/popconfirm.ts"],"sourcesContent":["import { buttonType } from '@element-plus/components/button'\nimport { QuestionFilled } from '@element-plus/icons-vue'\nimport { buildProps, definePropType } from '@element-plus/utils/props'\n\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const popconfirmProps = buildProps({\n title: {\n type: String,\n },\n confirmButtonText: {\n type: String,\n },\n cancelButtonText: {\n type: String,\n },\n confirmButtonType: {\n type: String,\n values: buttonType,\n default: 'primary',\n },\n cancelButtonType: {\n type: String,\n values: buttonType,\n default: 'text',\n },\n icon: {\n type: definePropType<string | Component>([String, Object]),\n default: QuestionFilled as any,\n },\n iconColor: {\n type: String,\n default: '#f90',\n },\n hideIcon: {\n type: Boolean,\n default: false,\n },\n hideAfter: {\n type: Number,\n default: 200,\n },\n onConfirm: {\n type: definePropType<(e: Event) => Promise<boolean> | boolean>(Function),\n },\n onCancel: {\n type: definePropType<(e: Event) => Promise<boolean> | boolean>(Function),\n },\n} as const)\nexport type PopconfirmProps = ExtractPropTypes<typeof popconfirmProps>\n"],"names":[],"mappings":";;;;;AAGY,MAAC,eAAe,GAAG,UAAU,CAAC;AAC1C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,SAAS;AACtB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,UAAU;AACtB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,cAAc;AAC3B,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,MAAM;AACnB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Effect } from 'element-plus/es/components/popper';
|
|
2
1
|
declare const _default: import("vue").DefineComponent<{
|
|
3
2
|
readonly title: import("../../../utils/props").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
4
3
|
readonly confirmButtonText: import("../../../utils/props").BuildPropReturn<StringConstructor, unknown, unknown, unknown, unknown>;
|
|
@@ -8,17 +7,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
7
|
readonly icon: import("../../../utils/props").BuildPropReturn<import("../../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, any, unknown, unknown, unknown>;
|
|
9
8
|
readonly iconColor: import("../../../utils/props").BuildPropReturn<StringConstructor, "#f90", unknown, unknown, unknown>;
|
|
10
9
|
readonly hideIcon: import("../../../utils/props").BuildPropReturn<BooleanConstructor, false, unknown, unknown, unknown>;
|
|
10
|
+
readonly hideAfter: import("../../../utils/props").BuildPropReturn<NumberConstructor, 200, unknown, unknown, unknown>;
|
|
11
|
+
readonly onConfirm: import("../../../utils/props").BuildPropReturn<import("../../../utils/props").PropWrapper<(e: Event) => boolean | Promise<boolean>>, unknown, unknown, unknown, unknown>;
|
|
12
|
+
readonly onCancel: import("../../../utils/props").BuildPropReturn<import("../../../utils/props").PropWrapper<(e: Event) => boolean | Promise<boolean>>, unknown, unknown, unknown, unknown>;
|
|
11
13
|
}, {
|
|
12
|
-
Effect: typeof Effect;
|
|
13
|
-
visible: import("vue").Ref<boolean>;
|
|
14
14
|
finalConfirmButtonText: import("vue").ComputedRef<string>;
|
|
15
15
|
finalCancelButtonText: import("vue").ComputedRef<string>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
confirm: () =>
|
|
20
|
-
cancel: () =>
|
|
21
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
16
|
+
tooltipRef: import("vue").Ref<{
|
|
17
|
+
onClose: () => void;
|
|
18
|
+
} | undefined>;
|
|
19
|
+
confirm: (e: Event) => void;
|
|
20
|
+
cancel: (e: Event) => void;
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
22
22
|
readonly title?: unknown;
|
|
23
23
|
readonly confirmButtonText?: unknown;
|
|
24
24
|
readonly cancelButtonText?: unknown;
|
|
@@ -27,7 +27,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
readonly icon?: unknown;
|
|
28
28
|
readonly iconColor?: unknown;
|
|
29
29
|
readonly hideIcon?: unknown;
|
|
30
|
+
readonly hideAfter?: unknown;
|
|
31
|
+
readonly onConfirm?: unknown;
|
|
32
|
+
readonly onCancel?: unknown;
|
|
30
33
|
} & {
|
|
34
|
+
hideAfter: number;
|
|
31
35
|
confirmButtonType: import("../../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
32
36
|
cancelButtonType: import("../../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
33
37
|
iconColor: string;
|
|
@@ -37,17 +41,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
37
41
|
title?: string | undefined;
|
|
38
42
|
confirmButtonText?: string | undefined;
|
|
39
43
|
cancelButtonText?: string | undefined;
|
|
40
|
-
|
|
41
|
-
onCancel?: (() =>
|
|
42
|
-
|
|
43
|
-
}, {
|
|
44
|
+
onConfirm?: ((e: Event) => boolean | Promise<boolean>) | undefined;
|
|
45
|
+
onCancel?: ((e: Event) => boolean | Promise<boolean>) | undefined;
|
|
46
|
+
}>, {
|
|
44
47
|
icon: import("../../../utils/props").BuildPropType<import("../../../utils/props").PropWrapper<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>, unknown, unknown>;
|
|
45
48
|
title: string;
|
|
49
|
+
hideAfter: number;
|
|
46
50
|
confirmButtonText: string;
|
|
47
51
|
cancelButtonText: string;
|
|
48
52
|
confirmButtonType: import("../../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
49
53
|
cancelButtonType: import("../../../utils/props").BuildPropType<StringConstructor, "" | "default" | "primary" | "success" | "warning" | "info" | "danger" | "text", unknown>;
|
|
50
54
|
iconColor: string;
|
|
51
55
|
hideIcon: import("../../../utils/props").BuildPropType<BooleanConstructor, unknown, unknown>;
|
|
56
|
+
onConfirm: (e: Event) => boolean | Promise<boolean>;
|
|
57
|
+
onCancel: (e: Event) => boolean | Promise<boolean>;
|
|
52
58
|
}>;
|
|
53
59
|
export default _default;
|