element-pe 2.0.6 → 2.0.7

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.
Files changed (302) hide show
  1. package/dist/index.full.js +1 -1
  2. package/dist/index.full.min.js +1 -1
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +1 -1
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +1 -1
  7. package/es/components/affix/index.mjs +2 -2
  8. package/es/components/affix/src/affix.mjs +114 -23
  9. package/es/components/affix/src/affix.mjs.map +1 -1
  10. package/es/components/affix/src/affix2.mjs +23 -114
  11. package/es/components/affix/src/affix2.mjs.map +1 -1
  12. package/es/components/autocomplete/index.mjs +2 -2
  13. package/es/components/autocomplete/src/autocomplete.mjs +325 -67
  14. package/es/components/autocomplete/src/autocomplete.mjs.map +1 -1
  15. package/es/components/autocomplete/src/autocomplete2.mjs +67 -325
  16. package/es/components/autocomplete/src/autocomplete2.mjs.map +1 -1
  17. package/es/components/backtop/index.mjs +2 -2
  18. package/es/components/backtop/src/backtop.mjs +100 -21
  19. package/es/components/backtop/src/backtop.mjs.map +1 -1
  20. package/es/components/backtop/src/backtop2.mjs +21 -100
  21. package/es/components/backtop/src/backtop2.mjs.map +1 -1
  22. package/es/components/breadcrumb/index.mjs +2 -2
  23. package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -57
  24. package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
  25. package/es/components/breadcrumb/src/breadcrumb-item2.mjs +57 -11
  26. package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
  27. package/es/components/button/index.mjs +3 -3
  28. package/es/components/button/src/button-group.mjs +5 -30
  29. package/es/components/button/src/button-group.mjs.map +1 -1
  30. package/es/components/button/src/button-group2.mjs +30 -5
  31. package/es/components/button/src/button-group2.mjs.map +1 -1
  32. package/es/components/button/src/button.mjs +106 -51
  33. package/es/components/button/src/button.mjs.map +1 -1
  34. package/es/components/button/src/button2.mjs +51 -106
  35. package/es/components/button/src/button2.mjs.map +1 -1
  36. package/es/components/carousel/index.mjs +2 -2
  37. package/es/components/carousel/src/carousel.mjs +48 -319
  38. package/es/components/carousel/src/carousel.mjs.map +1 -1
  39. package/es/components/carousel/src/carousel2.mjs +319 -48
  40. package/es/components/carousel/src/carousel2.mjs.map +1 -1
  41. package/es/components/dialog/index.mjs +2 -2
  42. package/es/components/dialog/src/dialog.mjs +113 -70
  43. package/es/components/dialog/src/dialog.mjs.map +1 -1
  44. package/es/components/dialog/src/dialog2.mjs +70 -113
  45. package/es/components/dialog/src/dialog2.mjs.map +1 -1
  46. package/es/components/drawer/index.mjs +2 -2
  47. package/es/components/drawer/src/drawer.mjs +21 -126
  48. package/es/components/drawer/src/drawer.mjs.map +1 -1
  49. package/es/components/drawer/src/drawer2.mjs +126 -21
  50. package/es/components/drawer/src/drawer2.mjs.map +1 -1
  51. package/es/components/empty/index.mjs +2 -2
  52. package/es/components/empty/src/empty.mjs +11 -56
  53. package/es/components/empty/src/empty.mjs.map +1 -1
  54. package/es/components/empty/src/empty2.mjs +56 -11
  55. package/es/components/empty/src/empty2.mjs.map +1 -1
  56. package/es/components/form/index.mjs +2 -2
  57. package/es/components/form/src/form-item.mjs +43 -272
  58. package/es/components/form/src/form-item.mjs.map +1 -1
  59. package/es/components/form/src/form-item2.mjs +272 -43
  60. package/es/components/form/src/form-item2.mjs.map +1 -1
  61. package/es/components/icon/index.mjs +2 -2
  62. package/es/components/icon/src/icon.mjs +35 -8
  63. package/es/components/icon/src/icon.mjs.map +1 -1
  64. package/es/components/icon/src/icon2.mjs +8 -35
  65. package/es/components/icon/src/icon2.mjs.map +1 -1
  66. package/es/components/index.mjs +26 -26
  67. package/es/components/input/index.mjs +2 -2
  68. package/es/components/input/src/input.mjs +92 -433
  69. package/es/components/input/src/input.mjs.map +1 -1
  70. package/es/components/input/src/input2.mjs +433 -92
  71. package/es/components/input/src/input2.mjs.map +1 -1
  72. package/es/components/input-number/index.mjs +2 -2
  73. package/es/components/input-number/src/input-number.mjs +284 -53
  74. package/es/components/input-number/src/input-number.mjs.map +1 -1
  75. package/es/components/input-number/src/input-number2.mjs +53 -284
  76. package/es/components/input-number/src/input-number2.mjs.map +1 -1
  77. package/es/components/link/index.mjs +2 -2
  78. package/es/components/link/src/link.mjs +49 -22
  79. package/es/components/link/src/link.mjs.map +1 -1
  80. package/es/components/link/src/link2.mjs +22 -49
  81. package/es/components/link/src/link2.mjs.map +1 -1
  82. package/es/components/menu/index.mjs +2 -2
  83. package/es/components/menu/src/menu-item-group.mjs +4 -51
  84. package/es/components/menu/src/menu-item-group.mjs.map +1 -1
  85. package/es/components/menu/src/menu-item-group2.mjs +51 -4
  86. package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
  87. package/es/components/page-header/index.mjs +2 -2
  88. package/es/components/page-header/src/page-header.mjs +60 -17
  89. package/es/components/page-header/src/page-header.mjs.map +1 -1
  90. package/es/components/page-header/src/page-header2.mjs +17 -60
  91. package/es/components/page-header/src/page-header2.mjs.map +1 -1
  92. package/es/components/popconfirm/index.mjs +2 -2
  93. package/es/components/popconfirm/src/popconfirm.mjs +52 -119
  94. package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
  95. package/es/components/popconfirm/src/popconfirm2.mjs +119 -52
  96. package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
  97. package/es/components/popper/index.mjs +2 -2
  98. package/es/components/popper/src/arrow.mjs +37 -7
  99. package/es/components/popper/src/arrow.mjs.map +1 -1
  100. package/es/components/popper/src/arrow2.mjs +7 -37
  101. package/es/components/popper/src/arrow2.mjs.map +1 -1
  102. package/es/components/progress/index.mjs +2 -2
  103. package/es/components/progress/src/progress.mjs +230 -57
  104. package/es/components/progress/src/progress.mjs.map +1 -1
  105. package/es/components/progress/src/progress2.mjs +57 -230
  106. package/es/components/progress/src/progress2.mjs.map +1 -1
  107. package/es/components/radio/index.mjs +2 -2
  108. package/es/components/radio/src/radio-group.mjs +20 -84
  109. package/es/components/radio/src/radio-group.mjs.map +1 -1
  110. package/es/components/radio/src/radio-group2.mjs +84 -20
  111. package/es/components/radio/src/radio-group2.mjs.map +1 -1
  112. package/es/components/rate/index.mjs +2 -2
  113. package/es/components/rate/src/rate.mjs +239 -88
  114. package/es/components/rate/src/rate.mjs.map +1 -1
  115. package/es/components/rate/src/rate2.mjs +88 -239
  116. package/es/components/rate/src/rate2.mjs.map +1 -1
  117. package/es/components/skeleton/index.mjs +2 -2
  118. package/es/components/skeleton/src/skeleton-item.mjs +18 -23
  119. package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
  120. package/es/components/skeleton/src/skeleton-item2.mjs +23 -18
  121. package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
  122. package/es/components/skeleton/src/skeleton.mjs +1 -1
  123. package/es/components/switch/index.mjs +2 -2
  124. package/es/components/switch/src/switch.mjs +250 -87
  125. package/es/components/switch/src/switch.mjs.map +1 -1
  126. package/es/components/switch/src/switch2.mjs +87 -250
  127. package/es/components/switch/src/switch2.mjs.map +1 -1
  128. package/es/components/tabs/index.mjs +3 -3
  129. package/es/components/tabs/src/tab-bar.mjs +76 -7
  130. package/es/components/tabs/src/tab-bar.mjs.map +1 -1
  131. package/es/components/tabs/src/tab-bar2.mjs +7 -76
  132. package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
  133. package/es/components/tabs/src/tab-nav.mjs +1 -1
  134. package/es/components/tabs/src/tab-pane.mjs +60 -14
  135. package/es/components/tabs/src/tab-pane.mjs.map +1 -1
  136. package/es/components/tabs/src/tab-pane2.mjs +14 -60
  137. package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
  138. package/es/components/teleport/index.mjs +2 -2
  139. package/es/components/teleport/src/teleport.mjs +18 -43
  140. package/es/components/teleport/src/teleport.mjs.map +1 -1
  141. package/es/components/teleport/src/teleport2.mjs +43 -18
  142. package/es/components/teleport/src/teleport2.mjs.map +1 -1
  143. package/es/components/tooltip/src/tooltip2.mjs +2 -2
  144. package/es/components/tooltip-v2/index.mjs +3 -3
  145. package/es/components/tooltip-v2/src/arrow.mjs +22 -38
  146. package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
  147. package/es/components/tooltip-v2/src/arrow2.mjs +38 -22
  148. package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
  149. package/es/components/tooltip-v2/src/tooltip.mjs +20 -73
  150. package/es/components/tooltip-v2/src/tooltip.mjs.map +1 -1
  151. package/es/components/tooltip-v2/src/tooltip2.mjs +73 -20
  152. package/es/components/tooltip-v2/src/tooltip2.mjs.map +1 -1
  153. package/es/index.mjs +26 -26
  154. package/lib/components/affix/index.js +2 -2
  155. package/lib/components/affix/src/affix.js +114 -24
  156. package/lib/components/affix/src/affix.js.map +1 -1
  157. package/lib/components/affix/src/affix2.js +24 -114
  158. package/lib/components/affix/src/affix2.js.map +1 -1
  159. package/lib/components/autocomplete/index.js +2 -2
  160. package/lib/components/autocomplete/src/autocomplete.js +324 -67
  161. package/lib/components/autocomplete/src/autocomplete.js.map +1 -1
  162. package/lib/components/autocomplete/src/autocomplete2.js +67 -324
  163. package/lib/components/autocomplete/src/autocomplete2.js.map +1 -1
  164. package/lib/components/backtop/index.js +2 -2
  165. package/lib/components/backtop/src/backtop.js +100 -22
  166. package/lib/components/backtop/src/backtop.js.map +1 -1
  167. package/lib/components/backtop/src/backtop2.js +22 -100
  168. package/lib/components/backtop/src/backtop2.js.map +1 -1
  169. package/lib/components/breadcrumb/index.js +2 -2
  170. package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -57
  171. package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
  172. package/lib/components/breadcrumb/src/breadcrumb-item2.js +57 -11
  173. package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
  174. package/lib/components/button/index.js +3 -3
  175. package/lib/components/button/src/button-group.js +5 -30
  176. package/lib/components/button/src/button-group.js.map +1 -1
  177. package/lib/components/button/src/button-group2.js +30 -5
  178. package/lib/components/button/src/button-group2.js.map +1 -1
  179. package/lib/components/button/src/button.js +106 -54
  180. package/lib/components/button/src/button.js.map +1 -1
  181. package/lib/components/button/src/button2.js +54 -106
  182. package/lib/components/button/src/button2.js.map +1 -1
  183. package/lib/components/carousel/index.js +2 -2
  184. package/lib/components/carousel/src/carousel.js +49 -319
  185. package/lib/components/carousel/src/carousel.js.map +1 -1
  186. package/lib/components/carousel/src/carousel2.js +319 -49
  187. package/lib/components/carousel/src/carousel2.js.map +1 -1
  188. package/lib/components/dialog/index.js +2 -2
  189. package/lib/components/dialog/src/dialog.js +113 -71
  190. package/lib/components/dialog/src/dialog.js.map +1 -1
  191. package/lib/components/dialog/src/dialog2.js +71 -113
  192. package/lib/components/dialog/src/dialog2.js.map +1 -1
  193. package/lib/components/drawer/index.js +2 -2
  194. package/lib/components/drawer/src/drawer.js +22 -126
  195. package/lib/components/drawer/src/drawer.js.map +1 -1
  196. package/lib/components/drawer/src/drawer2.js +126 -22
  197. package/lib/components/drawer/src/drawer2.js.map +1 -1
  198. package/lib/components/empty/index.js +2 -2
  199. package/lib/components/empty/src/empty.js +11 -56
  200. package/lib/components/empty/src/empty.js.map +1 -1
  201. package/lib/components/empty/src/empty2.js +56 -11
  202. package/lib/components/empty/src/empty2.js.map +1 -1
  203. package/lib/components/form/index.js +2 -2
  204. package/lib/components/form/src/form-item.js +44 -276
  205. package/lib/components/form/src/form-item.js.map +1 -1
  206. package/lib/components/form/src/form-item2.js +276 -44
  207. package/lib/components/form/src/form-item2.js.map +1 -1
  208. package/lib/components/icon/index.js +2 -2
  209. package/lib/components/icon/src/icon.js +35 -8
  210. package/lib/components/icon/src/icon.js.map +1 -1
  211. package/lib/components/icon/src/icon2.js +8 -35
  212. package/lib/components/icon/src/icon2.js.map +1 -1
  213. package/lib/components/index.js +26 -26
  214. package/lib/components/input/index.js +2 -2
  215. package/lib/components/input/src/input.js +92 -432
  216. package/lib/components/input/src/input.js.map +1 -1
  217. package/lib/components/input/src/input2.js +432 -92
  218. package/lib/components/input/src/input2.js.map +1 -1
  219. package/lib/components/input-number/index.js +2 -2
  220. package/lib/components/input-number/src/input-number.js +284 -54
  221. package/lib/components/input-number/src/input-number.js.map +1 -1
  222. package/lib/components/input-number/src/input-number2.js +54 -284
  223. package/lib/components/input-number/src/input-number2.js.map +1 -1
  224. package/lib/components/link/index.js +2 -2
  225. package/lib/components/link/src/link.js +49 -23
  226. package/lib/components/link/src/link.js.map +1 -1
  227. package/lib/components/link/src/link2.js +23 -49
  228. package/lib/components/link/src/link2.js.map +1 -1
  229. package/lib/components/menu/index.js +2 -2
  230. package/lib/components/menu/src/menu-item-group.js +4 -51
  231. package/lib/components/menu/src/menu-item-group.js.map +1 -1
  232. package/lib/components/menu/src/menu-item-group2.js +51 -4
  233. package/lib/components/menu/src/menu-item-group2.js.map +1 -1
  234. package/lib/components/page-header/index.js +2 -2
  235. package/lib/components/page-header/src/page-header.js +60 -18
  236. package/lib/components/page-header/src/page-header.js.map +1 -1
  237. package/lib/components/page-header/src/page-header2.js +18 -60
  238. package/lib/components/page-header/src/page-header2.js.map +1 -1
  239. package/lib/components/popconfirm/index.js +2 -2
  240. package/lib/components/popconfirm/src/popconfirm.js +52 -119
  241. package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
  242. package/lib/components/popconfirm/src/popconfirm2.js +119 -52
  243. package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
  244. package/lib/components/popper/index.js +2 -2
  245. package/lib/components/popper/src/arrow.js +37 -7
  246. package/lib/components/popper/src/arrow.js.map +1 -1
  247. package/lib/components/popper/src/arrow2.js +7 -37
  248. package/lib/components/popper/src/arrow2.js.map +1 -1
  249. package/lib/components/progress/index.js +2 -2
  250. package/lib/components/progress/src/progress.js +230 -57
  251. package/lib/components/progress/src/progress.js.map +1 -1
  252. package/lib/components/progress/src/progress2.js +57 -230
  253. package/lib/components/progress/src/progress2.js.map +1 -1
  254. package/lib/components/radio/index.js +2 -2
  255. package/lib/components/radio/src/radio-group.js +21 -84
  256. package/lib/components/radio/src/radio-group.js.map +1 -1
  257. package/lib/components/radio/src/radio-group2.js +84 -21
  258. package/lib/components/radio/src/radio-group2.js.map +1 -1
  259. package/lib/components/rate/index.js +2 -2
  260. package/lib/components/rate/src/rate.js +239 -89
  261. package/lib/components/rate/src/rate.js.map +1 -1
  262. package/lib/components/rate/src/rate2.js +89 -239
  263. package/lib/components/rate/src/rate2.js.map +1 -1
  264. package/lib/components/skeleton/index.js +2 -2
  265. package/lib/components/skeleton/src/skeleton-item.js +18 -23
  266. package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
  267. package/lib/components/skeleton/src/skeleton-item2.js +23 -18
  268. package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
  269. package/lib/components/skeleton/src/skeleton.js +1 -1
  270. package/lib/components/switch/index.js +2 -2
  271. package/lib/components/switch/src/switch.js +249 -87
  272. package/lib/components/switch/src/switch.js.map +1 -1
  273. package/lib/components/switch/src/switch2.js +87 -249
  274. package/lib/components/switch/src/switch2.js.map +1 -1
  275. package/lib/components/tabs/index.js +3 -3
  276. package/lib/components/tabs/src/tab-bar.js +76 -7
  277. package/lib/components/tabs/src/tab-bar.js.map +1 -1
  278. package/lib/components/tabs/src/tab-bar2.js +7 -76
  279. package/lib/components/tabs/src/tab-bar2.js.map +1 -1
  280. package/lib/components/tabs/src/tab-nav.js +1 -1
  281. package/lib/components/tabs/src/tab-pane.js +60 -14
  282. package/lib/components/tabs/src/tab-pane.js.map +1 -1
  283. package/lib/components/tabs/src/tab-pane2.js +14 -60
  284. package/lib/components/tabs/src/tab-pane2.js.map +1 -1
  285. package/lib/components/teleport/index.js +2 -2
  286. package/lib/components/teleport/src/teleport.js +18 -43
  287. package/lib/components/teleport/src/teleport.js.map +1 -1
  288. package/lib/components/teleport/src/teleport2.js +43 -18
  289. package/lib/components/teleport/src/teleport2.js.map +1 -1
  290. package/lib/components/tooltip/src/tooltip2.js +2 -2
  291. package/lib/components/tooltip-v2/index.js +3 -3
  292. package/lib/components/tooltip-v2/src/arrow.js +23 -38
  293. package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
  294. package/lib/components/tooltip-v2/src/arrow2.js +38 -23
  295. package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
  296. package/lib/components/tooltip-v2/src/tooltip.js +20 -73
  297. package/lib/components/tooltip-v2/src/tooltip.js.map +1 -1
  298. package/lib/components/tooltip-v2/src/tooltip2.js +73 -20
  299. package/lib/components/tooltip-v2/src/tooltip2.js.map +1 -1
  300. package/lib/index.js +26 -26
  301. package/package.json +1 -1
  302. package/web-types.json +1 -1
@@ -1,75 +1,118 @@
1
- import '../../../utils/index.mjs';
2
- import '../../../constants/index.mjs';
3
- import { dialogContentProps } from './dialog-content.mjs';
4
- import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
5
- import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
6
- import { isBoolean } from '@vueuse/core';
1
+ import { defineComponent, ref, provide, computed, openBlock, createBlock, Teleport, createVNode, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createSlots, renderSlot, createCommentVNode, vShow } from 'vue';
2
+ import { ElOverlay } from '../../overlay/index.mjs';
3
+ import '../../../hooks/index.mjs';
4
+ import '../../../tokens/index.mjs';
5
+ import ElDialogContent from './dialog-content2.mjs';
6
+ import { dialogProps, dialogEmits } from './dialog2.mjs';
7
+ import { useDialog } from './use-dialog.mjs';
8
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
+ import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
10
+ import { dialogInjectionKey } from '../../../tokens/dialog.mjs';
11
+ import { useSameTarget } from '../../../hooks/use-same-target/index.mjs';
12
+ import { useDraggable } from '../../../hooks/use-draggable/index.mjs';
7
13
 
8
- const dialogProps = buildProps({
9
- ...dialogContentProps,
10
- appendToBody: {
11
- type: Boolean,
12
- default: false
13
- },
14
- beforeClose: {
15
- type: definePropType(Function)
16
- },
17
- destroyOnClose: {
18
- type: Boolean,
19
- default: false
20
- },
21
- closeOnClickModal: {
22
- type: Boolean,
23
- default: true
24
- },
25
- closeOnPressEscape: {
26
- type: Boolean,
27
- default: true
28
- },
29
- lockScroll: {
30
- type: Boolean,
31
- default: true
32
- },
33
- modal: {
34
- type: Boolean,
35
- default: true
36
- },
37
- openDelay: {
38
- type: Number,
39
- default: 0
40
- },
41
- closeDelay: {
42
- type: Number,
43
- default: 0
44
- },
45
- top: {
46
- type: String
47
- },
48
- modelValue: {
49
- type: Boolean,
50
- required: true
51
- },
52
- modalClass: String,
53
- width: {
54
- type: [String, Number]
55
- },
56
- zIndex: {
57
- type: Number
58
- },
59
- trapFocus: {
60
- type: Boolean,
61
- default: false
14
+ const __default__ = {
15
+ name: "ElDialog"
16
+ };
17
+ const _sfc_main = /* @__PURE__ */ defineComponent({
18
+ ...__default__,
19
+ props: dialogProps,
20
+ emits: dialogEmits,
21
+ setup(__props, { expose }) {
22
+ const props = __props;
23
+ const ns = useNamespace("dialog");
24
+ const dialogRef = ref();
25
+ const headerRef = ref();
26
+ const {
27
+ visible,
28
+ style,
29
+ rendered,
30
+ zIndex,
31
+ afterEnter,
32
+ afterLeave,
33
+ beforeLeave,
34
+ handleClose,
35
+ onModalClick
36
+ } = useDialog(props, dialogRef);
37
+ provide(dialogInjectionKey, {
38
+ dialogRef,
39
+ headerRef,
40
+ ns,
41
+ rendered,
42
+ style
43
+ });
44
+ const overlayEvent = useSameTarget(onModalClick);
45
+ const draggable = computed(() => props.draggable && !props.fullscreen);
46
+ useDraggable(dialogRef, headerRef, draggable);
47
+ expose({
48
+ visible
49
+ });
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createBlock(Teleport, {
52
+ to: "body",
53
+ disabled: !_ctx.appendToBody
54
+ }, [
55
+ createVNode(Transition, {
56
+ name: "dialog-fade",
57
+ onAfterEnter: unref(afterEnter),
58
+ onAfterLeave: unref(afterLeave),
59
+ onBeforeLeave: unref(beforeLeave)
60
+ }, {
61
+ default: withCtx(() => [
62
+ withDirectives(createVNode(unref(ElOverlay), {
63
+ "custom-mask-event": "",
64
+ mask: _ctx.modal,
65
+ "overlay-class": _ctx.modalClass,
66
+ "z-index": unref(zIndex)
67
+ }, {
68
+ default: withCtx(() => [
69
+ createElementVNode("div", {
70
+ class: normalizeClass(`${unref(ns).namespace.value}-overlay-dialog`),
71
+ onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
72
+ onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
73
+ onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
74
+ }, [
75
+ unref(rendered) ? (openBlock(), createBlock(ElDialogContent, {
76
+ key: 0,
77
+ "custom-class": _ctx.customClass,
78
+ center: _ctx.center,
79
+ "close-icon": _ctx.closeIcon,
80
+ draggable: unref(draggable),
81
+ fullscreen: _ctx.fullscreen,
82
+ "show-close": _ctx.showClose,
83
+ style: normalizeStyle(unref(style)),
84
+ title: _ctx.title,
85
+ onClose: unref(handleClose)
86
+ }, createSlots({
87
+ title: withCtx(() => [
88
+ renderSlot(_ctx.$slots, "title")
89
+ ]),
90
+ default: withCtx(() => [
91
+ renderSlot(_ctx.$slots, "default")
92
+ ]),
93
+ _: 2
94
+ }, [
95
+ _ctx.$slots.footer ? {
96
+ name: "footer",
97
+ fn: withCtx(() => [
98
+ renderSlot(_ctx.$slots, "footer")
99
+ ])
100
+ } : void 0
101
+ ]), 1032, ["custom-class", "center", "close-icon", "draggable", "fullscreen", "show-close", "style", "title", "onClose"])) : createCommentVNode("v-if", true)
102
+ ], 34)
103
+ ]),
104
+ _: 3
105
+ }, 8, ["mask", "overlay-class", "z-index"]), [
106
+ [vShow, unref(visible)]
107
+ ])
108
+ ]),
109
+ _: 3
110
+ }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
111
+ ], 8, ["disabled"]);
112
+ };
62
113
  }
63
114
  });
64
- const dialogEmits = {
65
- open: () => true,
66
- opened: () => true,
67
- close: () => true,
68
- closed: () => true,
69
- [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
70
- openAutoFocus: () => true,
71
- closeAutoFocus: () => true
72
- };
115
+ var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/dialog/src/dialog.vue"]]);
73
116
 
74
- export { dialogEmits, dialogProps };
117
+ export { Dialog as default };
75
118
  //# sourceMappingURL=dialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.ts"],"sourcesContent":["import { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { dialogContentProps } from './dialog-content'\n\nimport type { ExtractPropTypes } from 'vue'\n\ntype DoneFn = (cancel?: boolean) => void\nexport type DialogBeforeCloseFn = (done: DoneFn) => void\n\nexport const dialogProps = buildProps({\n ...dialogContentProps,\n appendToBody: {\n type: Boolean,\n default: false,\n },\n beforeClose: {\n type: definePropType<DialogBeforeCloseFn>(Function),\n },\n destroyOnClose: {\n type: Boolean,\n default: false,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n openDelay: {\n type: Number,\n default: 0,\n },\n closeDelay: {\n type: Number,\n default: 0,\n },\n top: {\n type: String,\n },\n modelValue: {\n type: Boolean,\n required: true,\n },\n modalClass: String,\n width: {\n type: [String, Number],\n },\n zIndex: {\n type: Number,\n },\n trapFocus: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type DialogProps = ExtractPropTypes<typeof dialogProps>\n\nexport const dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n openAutoFocus: () => true,\n closeAutoFocus: () => true,\n}\nexport type DialogEmits = typeof dialogEmits\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,GAAG,kBAAkB;AACvB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,kBAAkB,EAAE;AACtB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AACnD,EAAE,aAAa,EAAE,MAAM,IAAI;AAC3B,EAAE,cAAc,EAAE,MAAM,IAAI;AAC5B;;;;"}
1
+ {"version":3,"file":"dialog.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <transition\n name=\"dialog-fade\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n >\n <div\n :class=\"`${ns.namespace.value}-overlay-dialog`\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <el-dialog-content\n v-if=\"rendered\"\n :custom-class=\"customClass\"\n :center=\"center\"\n :close-icon=\"closeIcon\"\n :draggable=\"draggable\"\n :fullscreen=\"fullscreen\"\n :show-close=\"showClose\"\n :style=\"style\"\n :title=\"title\"\n @close=\"handleClose\"\n >\n <template #title>\n <slot name=\"title\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </el-dialog-content>\n </div>\n </el-overlay>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref } from 'vue'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { useDraggable, useNamespace, useSameTarget } from '@element-plus/hooks'\nimport { dialogInjectionKey } from '@element-plus/tokens'\nimport ElDialogContent from './dialog-content.vue'\nimport { dialogEmits, dialogProps } from './dialog'\nimport { useDialog } from './use-dialog'\n\ndefineOptions({\n name: 'ElDialog',\n})\n\nconst props = defineProps(dialogProps)\ndefineEmits(dialogEmits)\n\nconst ns = useNamespace('dialog')\nconst dialogRef = ref<HTMLElement>()\nconst headerRef = ref<HTMLElement>()\n\nconst {\n visible,\n style,\n rendered,\n zIndex,\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n} = useDialog(props, dialogRef)\n\nprovide(dialogInjectionKey, {\n dialogRef,\n headerRef,\n ns,\n rendered,\n style,\n})\n\nconst overlayEvent = useSameTarget(onModalClick)\n\nconst draggable = computed(() => props.draggable && !props.fullscreen)\n\nuseDraggable(dialogRef, headerRef, draggable)\n\ndefineExpose({\n /** @description whether the dialog is visible */\n visible,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+DA,IAAA,MAAA,EAAA,GAAA,aAAA,QAAA,CAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAA,EAAA,CAAA;AAEA,IAAA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,KACA,GAAA,SAAA,CAAA,OAAA,SAAA,CAAA,CAAA;AAEA,IAAA,OAAA,CAAA,kBAAA,EAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA;AAAA,MACA,EAAA;AAAA,MACA,QAAA;AAAA,MACA,KAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAA,cAAA,YAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,QAAA,CAAA,MAAA,MAAA,SAAA,IAAA,CAAA,MAAA,UAAA,CAAA,CAAA;AAEA,IAAA,YAAA,CAAA,SAAA,EAAA,WAAA,SAAA,CAAA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MAEA,OAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,118 +1,75 @@
1
- import { defineComponent, ref, provide, computed, openBlock, createBlock, Teleport, createVNode, Transition, unref, withCtx, withDirectives, createElementVNode, normalizeClass, normalizeStyle, createSlots, renderSlot, createCommentVNode, vShow } from 'vue';
2
- import { ElOverlay } from '../../overlay/index.mjs';
3
- import '../../../hooks/index.mjs';
4
- import '../../../tokens/index.mjs';
5
- import ElDialogContent from './dialog-content2.mjs';
6
- import { dialogProps, dialogEmits } from './dialog.mjs';
7
- import { useDialog } from './use-dialog.mjs';
8
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
9
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
10
- import { dialogInjectionKey } from '../../../tokens/dialog.mjs';
11
- import { useSameTarget } from '../../../hooks/use-same-target/index.mjs';
12
- import { useDraggable } from '../../../hooks/use-draggable/index.mjs';
1
+ import '../../../utils/index.mjs';
2
+ import '../../../constants/index.mjs';
3
+ import { dialogContentProps } from './dialog-content.mjs';
4
+ import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
5
+ import { UPDATE_MODEL_EVENT } from '../../../constants/event.mjs';
6
+ import { isBoolean } from '@vueuse/core';
13
7
 
14
- const __default__ = {
15
- name: "ElDialog"
16
- };
17
- const _sfc_main = /* @__PURE__ */ defineComponent({
18
- ...__default__,
19
- props: dialogProps,
20
- emits: dialogEmits,
21
- setup(__props, { expose }) {
22
- const props = __props;
23
- const ns = useNamespace("dialog");
24
- const dialogRef = ref();
25
- const headerRef = ref();
26
- const {
27
- visible,
28
- style,
29
- rendered,
30
- zIndex,
31
- afterEnter,
32
- afterLeave,
33
- beforeLeave,
34
- handleClose,
35
- onModalClick
36
- } = useDialog(props, dialogRef);
37
- provide(dialogInjectionKey, {
38
- dialogRef,
39
- headerRef,
40
- ns,
41
- rendered,
42
- style
43
- });
44
- const overlayEvent = useSameTarget(onModalClick);
45
- const draggable = computed(() => props.draggable && !props.fullscreen);
46
- useDraggable(dialogRef, headerRef, draggable);
47
- expose({
48
- visible
49
- });
50
- return (_ctx, _cache) => {
51
- return openBlock(), createBlock(Teleport, {
52
- to: "body",
53
- disabled: !_ctx.appendToBody
54
- }, [
55
- createVNode(Transition, {
56
- name: "dialog-fade",
57
- onAfterEnter: unref(afterEnter),
58
- onAfterLeave: unref(afterLeave),
59
- onBeforeLeave: unref(beforeLeave)
60
- }, {
61
- default: withCtx(() => [
62
- withDirectives(createVNode(unref(ElOverlay), {
63
- "custom-mask-event": "",
64
- mask: _ctx.modal,
65
- "overlay-class": _ctx.modalClass,
66
- "z-index": unref(zIndex)
67
- }, {
68
- default: withCtx(() => [
69
- createElementVNode("div", {
70
- class: normalizeClass(`${unref(ns).namespace.value}-overlay-dialog`),
71
- onClick: _cache[0] || (_cache[0] = (...args) => unref(overlayEvent).onClick && unref(overlayEvent).onClick(...args)),
72
- onMousedown: _cache[1] || (_cache[1] = (...args) => unref(overlayEvent).onMousedown && unref(overlayEvent).onMousedown(...args)),
73
- onMouseup: _cache[2] || (_cache[2] = (...args) => unref(overlayEvent).onMouseup && unref(overlayEvent).onMouseup(...args))
74
- }, [
75
- unref(rendered) ? (openBlock(), createBlock(ElDialogContent, {
76
- key: 0,
77
- "custom-class": _ctx.customClass,
78
- center: _ctx.center,
79
- "close-icon": _ctx.closeIcon,
80
- draggable: unref(draggable),
81
- fullscreen: _ctx.fullscreen,
82
- "show-close": _ctx.showClose,
83
- style: normalizeStyle(unref(style)),
84
- title: _ctx.title,
85
- onClose: unref(handleClose)
86
- }, createSlots({
87
- title: withCtx(() => [
88
- renderSlot(_ctx.$slots, "title")
89
- ]),
90
- default: withCtx(() => [
91
- renderSlot(_ctx.$slots, "default")
92
- ]),
93
- _: 2
94
- }, [
95
- _ctx.$slots.footer ? {
96
- name: "footer",
97
- fn: withCtx(() => [
98
- renderSlot(_ctx.$slots, "footer")
99
- ])
100
- } : void 0
101
- ]), 1032, ["custom-class", "center", "close-icon", "draggable", "fullscreen", "show-close", "style", "title", "onClose"])) : createCommentVNode("v-if", true)
102
- ], 34)
103
- ]),
104
- _: 3
105
- }, 8, ["mask", "overlay-class", "z-index"]), [
106
- [vShow, unref(visible)]
107
- ])
108
- ]),
109
- _: 3
110
- }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
111
- ], 8, ["disabled"]);
112
- };
8
+ const dialogProps = buildProps({
9
+ ...dialogContentProps,
10
+ appendToBody: {
11
+ type: Boolean,
12
+ default: false
13
+ },
14
+ beforeClose: {
15
+ type: definePropType(Function)
16
+ },
17
+ destroyOnClose: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ closeOnClickModal: {
22
+ type: Boolean,
23
+ default: true
24
+ },
25
+ closeOnPressEscape: {
26
+ type: Boolean,
27
+ default: true
28
+ },
29
+ lockScroll: {
30
+ type: Boolean,
31
+ default: true
32
+ },
33
+ modal: {
34
+ type: Boolean,
35
+ default: true
36
+ },
37
+ openDelay: {
38
+ type: Number,
39
+ default: 0
40
+ },
41
+ closeDelay: {
42
+ type: Number,
43
+ default: 0
44
+ },
45
+ top: {
46
+ type: String
47
+ },
48
+ modelValue: {
49
+ type: Boolean,
50
+ required: true
51
+ },
52
+ modalClass: String,
53
+ width: {
54
+ type: [String, Number]
55
+ },
56
+ zIndex: {
57
+ type: Number
58
+ },
59
+ trapFocus: {
60
+ type: Boolean,
61
+ default: false
113
62
  }
114
63
  });
115
- var Dialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-pe/packages/components/dialog/src/dialog.vue"]]);
64
+ const dialogEmits = {
65
+ open: () => true,
66
+ opened: () => true,
67
+ close: () => true,
68
+ closed: () => true,
69
+ [UPDATE_MODEL_EVENT]: (value) => isBoolean(value),
70
+ openAutoFocus: () => true,
71
+ closeAutoFocus: () => true
72
+ };
116
73
 
117
- export { Dialog as default };
74
+ export { dialogEmits, dialogProps };
118
75
  //# sourceMappingURL=dialog2.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.vue"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <transition\n name=\"dialog-fade\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n custom-mask-event\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n >\n <div\n :class=\"`${ns.namespace.value}-overlay-dialog`\"\n @click=\"overlayEvent.onClick\"\n @mousedown=\"overlayEvent.onMousedown\"\n @mouseup=\"overlayEvent.onMouseup\"\n >\n <el-dialog-content\n v-if=\"rendered\"\n :custom-class=\"customClass\"\n :center=\"center\"\n :close-icon=\"closeIcon\"\n :draggable=\"draggable\"\n :fullscreen=\"fullscreen\"\n :show-close=\"showClose\"\n :style=\"style\"\n :title=\"title\"\n @close=\"handleClose\"\n >\n <template #title>\n <slot name=\"title\" />\n </template>\n <slot />\n <template v-if=\"$slots.footer\" #footer>\n <slot name=\"footer\" />\n </template>\n </el-dialog-content>\n </div>\n </el-overlay>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, provide, ref } from 'vue'\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { useDraggable, useNamespace, useSameTarget } from '@element-plus/hooks'\nimport { dialogInjectionKey } from '@element-plus/tokens'\nimport ElDialogContent from './dialog-content.vue'\nimport { dialogEmits, dialogProps } from './dialog'\nimport { useDialog } from './use-dialog'\n\ndefineOptions({\n name: 'ElDialog',\n})\n\nconst props = defineProps(dialogProps)\ndefineEmits(dialogEmits)\n\nconst ns = useNamespace('dialog')\nconst dialogRef = ref<HTMLElement>()\nconst headerRef = ref<HTMLElement>()\n\nconst {\n visible,\n style,\n rendered,\n zIndex,\n afterEnter,\n afterLeave,\n beforeLeave,\n handleClose,\n onModalClick,\n} = useDialog(props, dialogRef)\n\nprovide(dialogInjectionKey, {\n dialogRef,\n headerRef,\n ns,\n rendered,\n style,\n})\n\nconst overlayEvent = useSameTarget(onModalClick)\n\nconst draggable = computed(() => props.draggable && !props.fullscreen)\n\nuseDraggable(dialogRef, headerRef, draggable)\n\ndefineExpose({\n /** @description whether the dialog is visible */\n visible,\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+DA,IAAA,MAAA,EAAA,GAAA,aAAA,QAAA,CAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAA,EAAA,CAAA;AACA,IAAA,MAAA,YAAA,GAAA,EAAA,CAAA;AAEA,IAAA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,YAAA;AAAA,KACA,GAAA,SAAA,CAAA,OAAA,SAAA,CAAA,CAAA;AAEA,IAAA,OAAA,CAAA,kBAAA,EAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA;AAAA,MACA,EAAA;AAAA,MACA,QAAA;AAAA,MACA,KAAA;AAAA,KACA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,GAAA,cAAA,YAAA,CAAA,CAAA;AAEA,IAAA,MAAA,YAAA,QAAA,CAAA,MAAA,MAAA,SAAA,IAAA,CAAA,MAAA,UAAA,CAAA,CAAA;AAEA,IAAA,YAAA,CAAA,SAAA,EAAA,WAAA,SAAA,CAAA,CAAA;AAEA,IAAA,MAAA,CAAA;AAAA,MAEA,OAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog2.mjs","sources":["../../../../../../packages/components/dialog/src/dialog.ts"],"sourcesContent":["import { buildProps, definePropType, isBoolean } from '@element-plus/utils'\nimport { UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { dialogContentProps } from './dialog-content'\n\nimport type { ExtractPropTypes } from 'vue'\n\ntype DoneFn = (cancel?: boolean) => void\nexport type DialogBeforeCloseFn = (done: DoneFn) => void\n\nexport const dialogProps = buildProps({\n ...dialogContentProps,\n appendToBody: {\n type: Boolean,\n default: false,\n },\n beforeClose: {\n type: definePropType<DialogBeforeCloseFn>(Function),\n },\n destroyOnClose: {\n type: Boolean,\n default: false,\n },\n closeOnClickModal: {\n type: Boolean,\n default: true,\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true,\n },\n lockScroll: {\n type: Boolean,\n default: true,\n },\n modal: {\n type: Boolean,\n default: true,\n },\n openDelay: {\n type: Number,\n default: 0,\n },\n closeDelay: {\n type: Number,\n default: 0,\n },\n top: {\n type: String,\n },\n modelValue: {\n type: Boolean,\n required: true,\n },\n modalClass: String,\n width: {\n type: [String, Number],\n },\n zIndex: {\n type: Number,\n },\n trapFocus: {\n type: Boolean,\n default: false,\n },\n} as const)\n\nexport type DialogProps = ExtractPropTypes<typeof dialogProps>\n\nexport const dialogEmits = {\n open: () => true,\n opened: () => true,\n close: () => true,\n closed: () => true,\n [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n openAutoFocus: () => true,\n closeAutoFocus: () => true,\n}\nexport type DialogEmits = typeof dialogEmits\n"],"names":[],"mappings":";;;;;;;AAGY,M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,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;AAC3B,EAAE,IAAI,EAAE,MAAM,IAAI;AAClB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,KAAK,EAAE,MAAM,IAAI;AACnB,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,CAAC,kBAAkB,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC;AACnD,EAAE,aAAa,EAAE,MAAM,IAAI;AAC3B,EAAE,cAAc,EAAE,MAAM,IAAI;AAC5B;;;;"}
@@ -1,6 +1,6 @@
1
1
  import '../../utils/index.mjs';
2
- import Drawer from './src/drawer.mjs';
3
- export { drawerEmits, drawerProps } from './src/drawer2.mjs';
2
+ import Drawer from './src/drawer2.mjs';
3
+ export { drawerEmits, drawerProps } from './src/drawer.mjs';
4
4
  import { withInstall } from '../../utils/vue/install.mjs';
5
5
 
6
6
  const ElDrawer = withInstall(Drawer);
@@ -1,134 +1,29 @@
1
- import { defineComponent, ref, computed, resolveComponent, resolveDirective, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, withDirectives, createElementBlock, normalizeClass, normalizeStyle, withModifiers, renderSlot, createElementVNode, toDisplayString, createCommentVNode, vShow } from 'vue';
2
- import { Close } from '@element-plus/icons-vue';
3
- import { ElOverlay } from '../../overlay/index.mjs';
1
+ import '../../../utils/index.mjs';
4
2
  import '../../dialog/index.mjs';
5
- import { ElIcon } from '../../icon/index.mjs';
6
- import '../../../directives/index.mjs';
7
- import '../../../hooks/index.mjs';
8
- import { drawerProps, drawerEmits } from './drawer2.mjs';
9
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
10
- import TrapFocus from '../../../directives/trap-focus/index.mjs';
11
- import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
12
- import { useDialog } from '../../dialog/src/use-dialog.mjs';
3
+ import { buildProps } from '../../../utils/vue/props.mjs';
4
+ import { dialogProps, dialogEmits } from '../../dialog/src/dialog2.mjs';
13
5
 
14
- const _sfc_main = defineComponent({
15
- name: "ElDrawer",
16
- components: {
17
- ElOverlay,
18
- ElIcon,
19
- Close
6
+ const drawerProps = buildProps({
7
+ ...dialogProps,
8
+ direction: {
9
+ type: String,
10
+ default: "rtl",
11
+ values: ["ltr", "rtl", "ttb", "btt"]
20
12
  },
21
- directives: {
22
- TrapFocus
13
+ size: {
14
+ type: [String, Number],
15
+ default: "30%"
23
16
  },
24
- props: drawerProps,
25
- emits: drawerEmits,
26
- setup(props, ctx) {
27
- const drawerRef = ref();
28
- const ns = useNamespace("drawer");
29
- const isHorizontal = computed(() => props.direction === "rtl" || props.direction === "ltr");
30
- const drawerSize = computed(() => typeof props.size === "number" ? `${props.size}px` : props.size);
31
- return {
32
- ...useDialog(props, ctx, drawerRef),
33
- drawerRef,
34
- isHorizontal,
35
- drawerSize,
36
- ns
37
- };
17
+ withHeader: {
18
+ type: Boolean,
19
+ default: true
20
+ },
21
+ modalFade: {
22
+ type: Boolean,
23
+ default: true
38
24
  }
39
25
  });
40
- const _hoisted_1 = ["aria-labelledby", "aria-label"];
41
- const _hoisted_2 = ["id"];
42
- const _hoisted_3 = ["title"];
43
- const _hoisted_4 = ["aria-label"];
44
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
45
- const _component_close = resolveComponent("close");
46
- const _component_el_icon = resolveComponent("el-icon");
47
- const _component_el_overlay = resolveComponent("el-overlay");
48
- const _directive_trap_focus = resolveDirective("trap-focus");
49
- return openBlock(), createBlock(Teleport, {
50
- to: "body",
51
- disabled: !_ctx.appendToBody
52
- }, [
53
- createVNode(Transition, {
54
- name: _ctx.ns.b("fade"),
55
- onAfterEnter: _ctx.afterEnter,
56
- onAfterLeave: _ctx.afterLeave,
57
- onBeforeLeave: _ctx.beforeLeave
58
- }, {
59
- default: withCtx(() => [
60
- withDirectives(createVNode(_component_el_overlay, {
61
- mask: _ctx.modal,
62
- "overlay-class": _ctx.modalClass,
63
- "z-index": _ctx.zIndex,
64
- onClick: _ctx.onModalClick
65
- }, {
66
- default: withCtx(() => [
67
- withDirectives((openBlock(), createElementBlock("div", {
68
- ref: "drawerRef",
69
- "aria-modal": "true",
70
- "aria-labelledby": _ctx.ns.e("title"),
71
- "aria-label": _ctx.title,
72
- class: normalizeClass([_ctx.ns.b(), _ctx.direction, _ctx.visible && "open", _ctx.customClass]),
73
- style: normalizeStyle(_ctx.isHorizontal ? "width: " + _ctx.drawerSize : "height: " + _ctx.drawerSize),
74
- role: "dialog",
75
- onClick: _cache[1] || (_cache[1] = withModifiers(() => {
76
- }, ["stop"]))
77
- }, [
78
- _ctx.withHeader ? (openBlock(), createElementBlock("header", {
79
- key: 0,
80
- id: _ctx.ns.e("title"),
81
- class: normalizeClass(_ctx.ns.e("header"))
82
- }, [
83
- renderSlot(_ctx.$slots, "title", {}, () => [
84
- createElementVNode("span", {
85
- role: "heading",
86
- title: _ctx.title
87
- }, toDisplayString(_ctx.title), 9, _hoisted_3)
88
- ]),
89
- _ctx.showClose ? (openBlock(), createElementBlock("button", {
90
- key: 0,
91
- "aria-label": "close " + (_ctx.title || "drawer"),
92
- class: normalizeClass(_ctx.ns.e("close-btn")),
93
- type: "button",
94
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))
95
- }, [
96
- createVNode(_component_el_icon, {
97
- class: normalizeClass(_ctx.ns.e("close"))
98
- }, {
99
- default: withCtx(() => [
100
- createVNode(_component_close)
101
- ]),
102
- _: 1
103
- }, 8, ["class"])
104
- ], 10, _hoisted_4)) : createCommentVNode("v-if", true)
105
- ], 10, _hoisted_2)) : createCommentVNode("v-if", true),
106
- _ctx.rendered ? (openBlock(), createElementBlock("section", {
107
- key: 1,
108
- class: normalizeClass(_ctx.ns.e("body"))
109
- }, [
110
- renderSlot(_ctx.$slots, "default")
111
- ], 2)) : createCommentVNode("v-if", true),
112
- _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
113
- key: 2,
114
- class: normalizeClass(_ctx.ns.e("footer"))
115
- }, [
116
- renderSlot(_ctx.$slots, "footer")
117
- ], 2)) : createCommentVNode("v-if", true)
118
- ], 14, _hoisted_1)), [
119
- [_directive_trap_focus]
120
- ])
121
- ]),
122
- _: 3
123
- }, 8, ["mask", "overlay-class", "z-index", "onClick"]), [
124
- [vShow, _ctx.visible]
125
- ])
126
- ]),
127
- _: 3
128
- }, 8, ["name", "onAfterEnter", "onAfterLeave", "onBeforeLeave"])
129
- ], 8, ["disabled"]);
130
- }
131
- var Drawer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-pe/packages/components/drawer/src/drawer.vue"]]);
26
+ const drawerEmits = dialogEmits;
132
27
 
133
- export { Drawer as default };
28
+ export { drawerEmits, drawerProps };
134
29
  //# sourceMappingURL=drawer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.mjs","sources":["../../../../../../packages/components/drawer/src/drawer.vue"],"sourcesContent":["<template>\n <teleport to=\"body\" :disabled=\"!appendToBody\">\n <transition\n :name=\"ns.b('fade')\"\n @after-enter=\"afterEnter\"\n @after-leave=\"afterLeave\"\n @before-leave=\"beforeLeave\"\n >\n <el-overlay\n v-show=\"visible\"\n :mask=\"modal\"\n :overlay-class=\"modalClass\"\n :z-index=\"zIndex\"\n @click=\"onModalClick\"\n >\n <div\n ref=\"drawerRef\"\n v-trap-focus\n aria-modal=\"true\"\n :aria-labelledby=\"ns.e('title')\"\n :aria-label=\"title\"\n :class=\"[ns.b(), direction, visible && 'open', customClass]\"\n :style=\"\n isHorizontal ? 'width: ' + drawerSize : 'height: ' + drawerSize\n \"\n role=\"dialog\"\n @click.stop\n >\n <header v-if=\"withHeader\" :id=\"ns.e('title')\" :class=\"ns.e('header')\">\n <slot name=\"title\">\n <span role=\"heading\" :title=\"title\">\n {{ title }}\n </span>\n </slot>\n <button\n v-if=\"showClose\"\n :aria-label=\"'close ' + (title || 'drawer')\"\n :class=\"ns.e('close-btn')\"\n type=\"button\"\n @click=\"handleClose\"\n >\n <el-icon :class=\"ns.e('close')\"><close /></el-icon>\n </button>\n </header>\n <template v-if=\"rendered\">\n <section :class=\"ns.e('body')\">\n <slot />\n </section>\n </template>\n <div v-if=\"$slots.footer\" :class=\"ns.e('footer')\">\n <slot name=\"footer\" />\n </div>\n </div>\n </el-overlay>\n </transition>\n </teleport>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, ref } from 'vue'\nimport { Close } from '@element-plus/icons-vue'\n\nimport { ElOverlay } from '@element-plus/components/overlay'\nimport { useDialog } from '@element-plus/components/dialog'\nimport ElIcon from '@element-plus/components/icon'\nimport { TrapFocus } from '@element-plus/directives'\nimport { useNamespace } from '@element-plus/hooks'\nimport { drawerEmits, drawerProps } from './drawer'\n\nexport default defineComponent({\n name: 'ElDrawer',\n components: {\n ElOverlay,\n ElIcon,\n Close,\n },\n directives: {\n TrapFocus,\n },\n props: drawerProps,\n emits: drawerEmits,\n\n setup(props, ctx) {\n const drawerRef = ref<HTMLElement>()\n const ns = useNamespace('drawer')\n\n const isHorizontal = computed(\n () => props.direction === 'rtl' || props.direction === 'ltr'\n )\n const drawerSize = computed(() =>\n typeof props.size === 'number' ? `${props.size}px` : props.size\n )\n\n return {\n ...useDialog(props, ctx, drawerRef),\n drawerRef,\n isHorizontal,\n drawerSize,\n ns,\n }\n },\n})\n</script>\n"],"names":["_createBlock","_Teleport","_createVNode","_Transition","_withDirectives","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_withModifiers","_renderSlot","_createElementVNode","_toDisplayString","_createCommentVNode"],"mappings":";;;;;;;;;;;;;AAqEA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,UAAA;AAAA,EACN,UAAY,EAAA;AAAA,IACV,SAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,GACF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CAAO,uBAAlBP,kBAEM,CAAA,KAAA,EAAA;AAAA,gBAAA,GAAA,EAAA,CAAA;gBAFqB,KAAK,EAAAC,cAAA,CAAE,QAAG,CAAC,CAAA,QAAA,CAAA,CAAA;AAAA,eAAA,EAAA;gBACpCG,UAAsB,CAAA,IAAA,CAAA,MAAA,EAAA,QAAA,CAAA;AAAA,eAAA,EAAA,CAAA,CAAA,IAAAG,kBAAA,CAAA,MAAA,EAAA,IAAA,CAAA;;;;;;;kBAzClB,IAAO,CAAA,OAAA,CAAA;AAAA,SAAA,CAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"drawer.mjs","sources":["../../../../../../packages/components/drawer/src/drawer.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { dialogEmits, dialogProps } from '@element-plus/components/dialog'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const drawerProps = buildProps({\n ...dialogProps,\n direction: {\n type: String,\n default: 'rtl',\n values: ['ltr', 'rtl', 'ttb', 'btt'],\n },\n size: {\n type: [String, Number],\n default: '30%',\n },\n withHeader: {\n type: Boolean,\n default: true,\n },\n modalFade: {\n type: Boolean,\n default: true,\n },\n} as const)\n\nexport type DrawerProps = ExtractPropTypes<typeof drawerProps>\n\nexport const drawerEmits = dialogEmits\n"],"names":[],"mappings":";;;;;AAEY,MAAC,WAAW,GAAG,UAAU,CAAC;AACtC,EAAE,GAAG,WAAW;AAChB,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AACxC,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,WAAW,GAAG;;;;"}