@element-plus/nightly 0.0.20230305 → 0.0.20230307

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 (360) hide show
  1. package/dist/index.full.js +117 -42
  2. package/dist/index.full.min.js +19 -19
  3. package/dist/index.full.min.js.map +1 -1
  4. package/dist/index.full.min.mjs +19 -19
  5. package/dist/index.full.min.mjs.map +1 -1
  6. package/dist/index.full.mjs +116 -43
  7. package/dist/locale/af.js +1 -1
  8. package/dist/locale/af.min.js +1 -1
  9. package/dist/locale/af.min.mjs +1 -1
  10. package/dist/locale/af.mjs +1 -1
  11. package/dist/locale/ar.js +1 -1
  12. package/dist/locale/ar.min.js +1 -1
  13. package/dist/locale/ar.min.mjs +1 -1
  14. package/dist/locale/ar.mjs +1 -1
  15. package/dist/locale/az.js +1 -1
  16. package/dist/locale/az.min.js +1 -1
  17. package/dist/locale/az.min.mjs +1 -1
  18. package/dist/locale/az.mjs +1 -1
  19. package/dist/locale/bg.js +1 -1
  20. package/dist/locale/bg.min.js +1 -1
  21. package/dist/locale/bg.min.mjs +1 -1
  22. package/dist/locale/bg.mjs +1 -1
  23. package/dist/locale/bn.js +1 -1
  24. package/dist/locale/bn.min.js +1 -1
  25. package/dist/locale/bn.min.mjs +1 -1
  26. package/dist/locale/bn.mjs +1 -1
  27. package/dist/locale/ca.js +1 -1
  28. package/dist/locale/ca.min.js +1 -1
  29. package/dist/locale/ca.min.mjs +1 -1
  30. package/dist/locale/ca.mjs +1 -1
  31. package/dist/locale/ckb.js +1 -1
  32. package/dist/locale/ckb.min.js +1 -1
  33. package/dist/locale/ckb.min.mjs +1 -1
  34. package/dist/locale/ckb.mjs +1 -1
  35. package/dist/locale/cs.js +1 -1
  36. package/dist/locale/cs.min.js +1 -1
  37. package/dist/locale/cs.min.mjs +1 -1
  38. package/dist/locale/cs.mjs +1 -1
  39. package/dist/locale/da.js +1 -1
  40. package/dist/locale/da.min.js +1 -1
  41. package/dist/locale/da.min.mjs +1 -1
  42. package/dist/locale/da.mjs +1 -1
  43. package/dist/locale/de.js +1 -1
  44. package/dist/locale/de.min.js +1 -1
  45. package/dist/locale/de.min.mjs +1 -1
  46. package/dist/locale/de.mjs +1 -1
  47. package/dist/locale/el.js +1 -1
  48. package/dist/locale/el.min.js +1 -1
  49. package/dist/locale/el.min.mjs +1 -1
  50. package/dist/locale/el.mjs +1 -1
  51. package/dist/locale/en.js +1 -1
  52. package/dist/locale/en.min.js +1 -1
  53. package/dist/locale/en.min.mjs +1 -1
  54. package/dist/locale/en.mjs +1 -1
  55. package/dist/locale/eo.js +1 -1
  56. package/dist/locale/eo.min.js +1 -1
  57. package/dist/locale/eo.min.mjs +1 -1
  58. package/dist/locale/eo.mjs +1 -1
  59. package/dist/locale/es.js +1 -1
  60. package/dist/locale/es.min.js +1 -1
  61. package/dist/locale/es.min.mjs +1 -1
  62. package/dist/locale/es.mjs +1 -1
  63. package/dist/locale/et.js +1 -1
  64. package/dist/locale/et.min.js +1 -1
  65. package/dist/locale/et.min.mjs +1 -1
  66. package/dist/locale/et.mjs +1 -1
  67. package/dist/locale/eu.js +1 -1
  68. package/dist/locale/eu.min.js +1 -1
  69. package/dist/locale/eu.min.mjs +1 -1
  70. package/dist/locale/eu.mjs +1 -1
  71. package/dist/locale/fa.js +1 -1
  72. package/dist/locale/fa.min.js +1 -1
  73. package/dist/locale/fa.min.mjs +1 -1
  74. package/dist/locale/fa.mjs +1 -1
  75. package/dist/locale/fi.js +1 -1
  76. package/dist/locale/fi.min.js +1 -1
  77. package/dist/locale/fi.min.mjs +1 -1
  78. package/dist/locale/fi.mjs +1 -1
  79. package/dist/locale/fr.js +1 -1
  80. package/dist/locale/fr.min.js +1 -1
  81. package/dist/locale/fr.min.mjs +1 -1
  82. package/dist/locale/fr.mjs +1 -1
  83. package/dist/locale/he.js +1 -1
  84. package/dist/locale/he.min.js +1 -1
  85. package/dist/locale/he.min.mjs +1 -1
  86. package/dist/locale/he.mjs +1 -1
  87. package/dist/locale/hr.js +1 -1
  88. package/dist/locale/hr.min.js +1 -1
  89. package/dist/locale/hr.min.mjs +1 -1
  90. package/dist/locale/hr.mjs +1 -1
  91. package/dist/locale/hu.js +1 -1
  92. package/dist/locale/hu.min.js +1 -1
  93. package/dist/locale/hu.min.mjs +1 -1
  94. package/dist/locale/hu.mjs +1 -1
  95. package/dist/locale/hy-am.js +1 -1
  96. package/dist/locale/hy-am.min.js +1 -1
  97. package/dist/locale/hy-am.min.mjs +1 -1
  98. package/dist/locale/hy-am.mjs +1 -1
  99. package/dist/locale/id.js +1 -1
  100. package/dist/locale/id.min.js +1 -1
  101. package/dist/locale/id.min.mjs +1 -1
  102. package/dist/locale/id.mjs +1 -1
  103. package/dist/locale/it.js +1 -1
  104. package/dist/locale/it.min.js +1 -1
  105. package/dist/locale/it.min.mjs +1 -1
  106. package/dist/locale/it.mjs +1 -1
  107. package/dist/locale/ja.js +1 -1
  108. package/dist/locale/ja.min.js +1 -1
  109. package/dist/locale/ja.min.mjs +1 -1
  110. package/dist/locale/ja.mjs +1 -1
  111. package/dist/locale/kk.js +1 -1
  112. package/dist/locale/kk.min.js +1 -1
  113. package/dist/locale/kk.min.mjs +1 -1
  114. package/dist/locale/kk.mjs +1 -1
  115. package/dist/locale/km.js +1 -1
  116. package/dist/locale/km.min.js +1 -1
  117. package/dist/locale/km.min.mjs +1 -1
  118. package/dist/locale/km.mjs +1 -1
  119. package/dist/locale/ko.js +1 -1
  120. package/dist/locale/ko.min.js +1 -1
  121. package/dist/locale/ko.min.mjs +1 -1
  122. package/dist/locale/ko.mjs +1 -1
  123. package/dist/locale/ku.js +1 -1
  124. package/dist/locale/ku.min.js +1 -1
  125. package/dist/locale/ku.min.mjs +1 -1
  126. package/dist/locale/ku.mjs +1 -1
  127. package/dist/locale/ky.js +1 -1
  128. package/dist/locale/ky.min.js +1 -1
  129. package/dist/locale/ky.min.mjs +1 -1
  130. package/dist/locale/ky.mjs +1 -1
  131. package/dist/locale/lt.js +1 -1
  132. package/dist/locale/lt.min.js +1 -1
  133. package/dist/locale/lt.min.mjs +1 -1
  134. package/dist/locale/lt.mjs +1 -1
  135. package/dist/locale/lv.js +1 -1
  136. package/dist/locale/lv.min.js +1 -1
  137. package/dist/locale/lv.min.mjs +1 -1
  138. package/dist/locale/lv.mjs +1 -1
  139. package/dist/locale/mg.js +1 -1
  140. package/dist/locale/mg.min.js +1 -1
  141. package/dist/locale/mg.min.mjs +1 -1
  142. package/dist/locale/mg.mjs +1 -1
  143. package/dist/locale/mn.js +1 -1
  144. package/dist/locale/mn.min.js +1 -1
  145. package/dist/locale/mn.min.mjs +1 -1
  146. package/dist/locale/mn.mjs +1 -1
  147. package/dist/locale/nb-no.js +1 -1
  148. package/dist/locale/nb-no.min.js +1 -1
  149. package/dist/locale/nb-no.min.mjs +1 -1
  150. package/dist/locale/nb-no.mjs +1 -1
  151. package/dist/locale/nl.js +1 -1
  152. package/dist/locale/nl.min.js +1 -1
  153. package/dist/locale/nl.min.mjs +1 -1
  154. package/dist/locale/nl.mjs +1 -1
  155. package/dist/locale/pa.js +1 -1
  156. package/dist/locale/pa.min.js +1 -1
  157. package/dist/locale/pa.min.mjs +1 -1
  158. package/dist/locale/pa.mjs +1 -1
  159. package/dist/locale/pl.js +1 -1
  160. package/dist/locale/pl.min.js +1 -1
  161. package/dist/locale/pl.min.mjs +1 -1
  162. package/dist/locale/pl.mjs +1 -1
  163. package/dist/locale/pt-br.js +1 -1
  164. package/dist/locale/pt-br.min.js +1 -1
  165. package/dist/locale/pt-br.min.mjs +1 -1
  166. package/dist/locale/pt-br.mjs +1 -1
  167. package/dist/locale/pt.js +1 -1
  168. package/dist/locale/pt.min.js +1 -1
  169. package/dist/locale/pt.min.mjs +1 -1
  170. package/dist/locale/pt.mjs +1 -1
  171. package/dist/locale/ro.js +1 -1
  172. package/dist/locale/ro.min.js +1 -1
  173. package/dist/locale/ro.min.mjs +1 -1
  174. package/dist/locale/ro.mjs +1 -1
  175. package/dist/locale/ru.js +1 -1
  176. package/dist/locale/ru.min.js +1 -1
  177. package/dist/locale/ru.min.mjs +1 -1
  178. package/dist/locale/ru.mjs +1 -1
  179. package/dist/locale/sk.js +1 -1
  180. package/dist/locale/sk.min.js +1 -1
  181. package/dist/locale/sk.min.mjs +1 -1
  182. package/dist/locale/sk.mjs +1 -1
  183. package/dist/locale/sl.js +1 -1
  184. package/dist/locale/sl.min.js +1 -1
  185. package/dist/locale/sl.min.mjs +1 -1
  186. package/dist/locale/sl.mjs +1 -1
  187. package/dist/locale/sr.js +1 -1
  188. package/dist/locale/sr.min.js +1 -1
  189. package/dist/locale/sr.min.mjs +1 -1
  190. package/dist/locale/sr.mjs +1 -1
  191. package/dist/locale/sv.js +1 -1
  192. package/dist/locale/sv.min.js +1 -1
  193. package/dist/locale/sv.min.mjs +1 -1
  194. package/dist/locale/sv.mjs +1 -1
  195. package/dist/locale/ta.js +1 -1
  196. package/dist/locale/ta.min.js +1 -1
  197. package/dist/locale/ta.min.mjs +1 -1
  198. package/dist/locale/ta.mjs +1 -1
  199. package/dist/locale/th.js +1 -1
  200. package/dist/locale/th.min.js +1 -1
  201. package/dist/locale/th.min.mjs +1 -1
  202. package/dist/locale/th.mjs +1 -1
  203. package/dist/locale/tk.js +1 -1
  204. package/dist/locale/tk.min.js +1 -1
  205. package/dist/locale/tk.min.mjs +1 -1
  206. package/dist/locale/tk.mjs +1 -1
  207. package/dist/locale/tr.js +1 -1
  208. package/dist/locale/tr.min.js +1 -1
  209. package/dist/locale/tr.min.mjs +1 -1
  210. package/dist/locale/tr.mjs +1 -1
  211. package/dist/locale/ug-cn.js +1 -1
  212. package/dist/locale/ug-cn.min.js +1 -1
  213. package/dist/locale/ug-cn.min.mjs +1 -1
  214. package/dist/locale/ug-cn.mjs +1 -1
  215. package/dist/locale/uk.js +1 -1
  216. package/dist/locale/uk.min.js +1 -1
  217. package/dist/locale/uk.min.mjs +1 -1
  218. package/dist/locale/uk.mjs +1 -1
  219. package/dist/locale/uz-uz.js +1 -1
  220. package/dist/locale/uz-uz.min.js +1 -1
  221. package/dist/locale/uz-uz.min.mjs +1 -1
  222. package/dist/locale/uz-uz.mjs +1 -1
  223. package/dist/locale/vi.js +1 -1
  224. package/dist/locale/vi.min.js +1 -1
  225. package/dist/locale/vi.min.mjs +1 -1
  226. package/dist/locale/vi.mjs +1 -1
  227. package/dist/locale/zh-cn.js +1 -1
  228. package/dist/locale/zh-cn.min.js +1 -1
  229. package/dist/locale/zh-cn.min.mjs +1 -1
  230. package/dist/locale/zh-cn.mjs +1 -1
  231. package/dist/locale/zh-tw.js +1 -1
  232. package/dist/locale/zh-tw.min.js +1 -1
  233. package/dist/locale/zh-tw.min.mjs +1 -1
  234. package/dist/locale/zh-tw.mjs +1 -1
  235. package/es/components/config-provider/index.mjs +1 -1
  236. package/es/components/config-provider/src/hooks/use-global-config.d.ts +27 -0
  237. package/es/components/config-provider/src/hooks/use-global-config.mjs +30 -5
  238. package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -1
  239. package/es/components/dialog/index.d.ts +12 -0
  240. package/es/components/dialog/src/dialog.vue.d.ts +12 -0
  241. package/es/components/index.mjs +1 -1
  242. package/es/components/loading/src/loading.mjs +13 -6
  243. package/es/components/loading/src/loading.mjs.map +1 -1
  244. package/es/components/loading/src/service.mjs +2 -5
  245. package/es/components/loading/src/service.mjs.map +1 -1
  246. package/es/components/message/src/message.vue.d.ts +5 -0
  247. package/es/components/message/src/message2.mjs +4 -5
  248. package/es/components/message/src/message2.mjs.map +1 -1
  249. package/es/components/message-box/src/index.mjs +14 -12
  250. package/es/components/message-box/src/index.mjs.map +1 -1
  251. package/es/components/message-box/src/index.vue.d.ts +2 -1852
  252. package/es/components/notification/src/notification.vue.d.ts +7 -0
  253. package/es/components/notification/src/notification2.mjs +6 -4
  254. package/es/components/notification/src/notification2.mjs.map +1 -1
  255. package/es/components/notification/src/notify.mjs +0 -4
  256. package/es/components/notification/src/notify.mjs.map +1 -1
  257. package/es/components/overlay/index.d.ts +12 -0
  258. package/es/components/overlay/src/overlay.d.ts +18 -0
  259. package/es/components/overlay/src/overlay.mjs +7 -1
  260. package/es/components/overlay/src/overlay.mjs.map +1 -1
  261. package/es/components/pagination/src/components/sizes.vue.d.ts +1 -0
  262. package/es/components/select/index.d.ts +1 -0
  263. package/es/components/select/src/options.d.ts +7 -0
  264. package/es/components/select/src/options.mjs +29 -0
  265. package/es/components/select/src/options.mjs.map +1 -0
  266. package/es/components/select/src/select.mjs +14 -1
  267. package/es/components/select/src/select.mjs.map +1 -1
  268. package/es/components/select/src/select.vue.d.ts +1 -0
  269. package/es/components/select/src/useSelect.d.ts +1 -0
  270. package/es/components/select/src/useSelect.mjs +2 -10
  271. package/es/components/select/src/useSelect.mjs.map +1 -1
  272. package/es/components/time-select/index.d.ts +4 -0
  273. package/es/components/time-select/src/time-select.vue.d.ts +2 -0
  274. package/es/components/tooltip/src/tooltip.vue.d.ts +9 -12
  275. package/es/hooks/index.mjs +1 -1
  276. package/es/hooks/use-locale/index.d.ts +1 -1
  277. package/es/hooks/use-locale/index.mjs +2 -2
  278. package/es/hooks/use-locale/index.mjs.map +1 -1
  279. package/es/hooks/use-lockscreen/index.d.ts +5 -1
  280. package/es/hooks/use-lockscreen/index.mjs +2 -2
  281. package/es/hooks/use-lockscreen/index.mjs.map +1 -1
  282. package/es/hooks/use-namespace/index.d.ts +2 -2
  283. package/es/hooks/use-namespace/index.mjs +4 -4
  284. package/es/hooks/use-namespace/index.mjs.map +1 -1
  285. package/es/hooks/use-popper-container/index.d.ts +4 -1
  286. package/es/hooks/use-popper-container/index.mjs +5 -1
  287. package/es/hooks/use-popper-container/index.mjs.map +1 -1
  288. package/es/hooks/use-z-index/index.d.ts +3 -1
  289. package/es/hooks/use-z-index/index.mjs +3 -3
  290. package/es/hooks/use-z-index/index.mjs.map +1 -1
  291. package/es/index.mjs +2 -2
  292. package/es/version.d.ts +1 -1
  293. package/es/version.mjs +1 -1
  294. package/es/version.mjs.map +1 -1
  295. package/lib/components/config-provider/index.js +1 -0
  296. package/lib/components/config-provider/index.js.map +1 -1
  297. package/lib/components/config-provider/src/hooks/use-global-config.d.ts +27 -0
  298. package/lib/components/config-provider/src/hooks/use-global-config.js +31 -5
  299. package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
  300. package/lib/components/dialog/index.d.ts +12 -0
  301. package/lib/components/dialog/src/dialog.vue.d.ts +12 -0
  302. package/lib/components/index.js +1 -0
  303. package/lib/components/index.js.map +1 -1
  304. package/lib/components/loading/src/loading.js +12 -5
  305. package/lib/components/loading/src/loading.js.map +1 -1
  306. package/lib/components/loading/src/service.js +2 -5
  307. package/lib/components/loading/src/service.js.map +1 -1
  308. package/lib/components/message/src/message.vue.d.ts +5 -0
  309. package/lib/components/message/src/message2.js +9 -10
  310. package/lib/components/message/src/message2.js.map +1 -1
  311. package/lib/components/message-box/src/index.js +23 -21
  312. package/lib/components/message-box/src/index.js.map +1 -1
  313. package/lib/components/message-box/src/index.vue.d.ts +2 -1852
  314. package/lib/components/notification/src/notification.vue.d.ts +7 -0
  315. package/lib/components/notification/src/notification2.js +9 -7
  316. package/lib/components/notification/src/notification2.js.map +1 -1
  317. package/lib/components/notification/src/notify.js +0 -4
  318. package/lib/components/notification/src/notify.js.map +1 -1
  319. package/lib/components/overlay/index.d.ts +12 -0
  320. package/lib/components/overlay/src/overlay.d.ts +18 -0
  321. package/lib/components/overlay/src/overlay.js +7 -1
  322. package/lib/components/overlay/src/overlay.js.map +1 -1
  323. package/lib/components/pagination/src/components/sizes.vue.d.ts +1 -0
  324. package/lib/components/select/index.d.ts +1 -0
  325. package/lib/components/select/src/options.d.ts +7 -0
  326. package/lib/components/select/src/options.js +33 -0
  327. package/lib/components/select/src/options.js.map +1 -0
  328. package/lib/components/select/src/select.js +14 -1
  329. package/lib/components/select/src/select.js.map +1 -1
  330. package/lib/components/select/src/select.vue.d.ts +1 -0
  331. package/lib/components/select/src/useSelect.d.ts +1 -0
  332. package/lib/components/select/src/useSelect.js +1 -9
  333. package/lib/components/select/src/useSelect.js.map +1 -1
  334. package/lib/components/time-select/index.d.ts +4 -0
  335. package/lib/components/time-select/src/time-select.vue.d.ts +2 -0
  336. package/lib/components/tooltip/src/tooltip.vue.d.ts +9 -12
  337. package/lib/hooks/index.js +1 -0
  338. package/lib/hooks/index.js.map +1 -1
  339. package/lib/hooks/use-locale/index.d.ts +1 -1
  340. package/lib/hooks/use-locale/index.js +2 -2
  341. package/lib/hooks/use-locale/index.js.map +1 -1
  342. package/lib/hooks/use-lockscreen/index.d.ts +5 -1
  343. package/lib/hooks/use-lockscreen/index.js +2 -2
  344. package/lib/hooks/use-lockscreen/index.js.map +1 -1
  345. package/lib/hooks/use-namespace/index.d.ts +2 -2
  346. package/lib/hooks/use-namespace/index.js +4 -4
  347. package/lib/hooks/use-namespace/index.js.map +1 -1
  348. package/lib/hooks/use-popper-container/index.d.ts +4 -1
  349. package/lib/hooks/use-popper-container/index.js +5 -1
  350. package/lib/hooks/use-popper-container/index.js.map +1 -1
  351. package/lib/hooks/use-z-index/index.d.ts +3 -1
  352. package/lib/hooks/use-z-index/index.js +3 -2
  353. package/lib/hooks/use-z-index/index.js.map +1 -1
  354. package/lib/index.js +2 -0
  355. package/lib/index.js.map +1 -1
  356. package/lib/version.d.ts +1 -1
  357. package/lib/version.js +1 -1
  358. package/lib/version.js.map +1 -1
  359. package/package.json +2 -2
  360. package/web-types.json +1 -1
@@ -690,9 +690,6 @@ declare const _default: import("vue").DefineComponent<{
690
690
  b: (blockSuffix?: string) => string;
691
691
  e: (element?: string | undefined) => string;
692
692
  m: (modifier?: string | undefined) => string;
693
- /**
694
- * @description update el-popper component instance
695
- */
696
693
  be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
697
694
  em: (element?: string | undefined, modifier?: string | undefined) => string;
698
695
  bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
@@ -701,7 +698,9 @@ declare const _default: import("vue").DefineComponent<{
701
698
  (name: string, state: boolean | undefined): string;
702
699
  (name: string): string;
703
700
  };
704
- cssVar: (object: Record<string, string>) => Record<string, string>;
701
+ cssVar: (object: Record<string, string>) => Record<string, string>; /**
702
+ * @description expose onOpen function to mange el-tooltip open state
703
+ */
705
704
  cssVarName: (name: string) => string;
706
705
  cssVarBlock: (object: Record<string, string>) => Record<string, string>;
707
706
  cssVarBlockName: (name: string) => string;
@@ -833,9 +832,6 @@ declare const _default: import("vue").DefineComponent<{
833
832
  b: (blockSuffix?: string) => string;
834
833
  e: (element?: string | undefined) => string;
835
834
  m: (modifier?: string | undefined) => string;
836
- /**
837
- * @description update el-popper component instance
838
- */
839
835
  be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
840
836
  em: (element?: string | undefined, modifier?: string | undefined) => string;
841
837
  bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
@@ -844,7 +840,9 @@ declare const _default: import("vue").DefineComponent<{
844
840
  (name: string, state: boolean | undefined): string;
845
841
  (name: string): string;
846
842
  };
847
- cssVar: (object: Record<string, string>) => Record<string, string>;
843
+ cssVar: (object: Record<string, string>) => Record<string, string>; /**
844
+ * @description expose onOpen function to mange el-tooltip open state
845
+ */
848
846
  cssVarName: (name: string) => string;
849
847
  cssVarBlock: (object: Record<string, string>) => Record<string, string>;
850
848
  cssVarBlockName: (name: string) => string;
@@ -1645,9 +1643,6 @@ declare const _default: import("vue").DefineComponent<{
1645
1643
  b: (blockSuffix?: string) => string;
1646
1644
  e: (element?: string | undefined) => string;
1647
1645
  m: (modifier?: string | undefined) => string;
1648
- /**
1649
- * @description update el-popper component instance
1650
- */
1651
1646
  be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
1652
1647
  em: (element?: string | undefined, modifier?: string | undefined) => string;
1653
1648
  bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
@@ -1656,7 +1651,9 @@ declare const _default: import("vue").DefineComponent<{
1656
1651
  (name: string, state: boolean | undefined): string;
1657
1652
  (name: string): string;
1658
1653
  };
1659
- cssVar: (object: Record<string, string>) => Record<string, string>;
1654
+ cssVar: (object: Record<string, string>) => Record<string, string>; /**
1655
+ * @description expose onOpen function to mange el-tooltip open state
1656
+ */
1660
1657
  cssVarName: (name: string) => string;
1661
1658
  cssVarBlock: (object: Record<string, string>) => Record<string, string>;
1662
1659
  cssVarBlockName: (name: string) => string;
@@ -22,7 +22,7 @@ export { useDelayedRender } from './use-intermediate-render/index.mjs';
22
22
  export { useDelayedToggle, useDelayedToggleProps } from './use-delayed-toggle/index.mjs';
23
23
  export { FORWARD_REF_INJECTION_KEY, useForwardRef, useForwardRefDirective } from './use-forward-ref/index.mjs';
24
24
  export { defaultNamespace, namespaceContextKey, useGetDerivedNamespace, useNamespace } from './use-namespace/index.mjs';
25
- export { useZIndex, zIndexContextKey } from './use-z-index/index.mjs';
25
+ export { defaultInitialZIndex, useZIndex, zIndexContextKey } from './use-z-index/index.mjs';
26
26
  export { arrowMiddleware, getPositionDataWithUnit, useFloating, useFloatingProps } from './use-floating/index.mjs';
27
27
  export { useCursor } from './use-cursor/index.mjs';
28
28
  export { useOrderedChildren } from './use-ordered-children/index.mjs';
@@ -12,4 +12,4 @@ export declare const buildTranslator: (locale: MaybeRef<Language>) => Translator
12
12
  export declare const translate: (path: string, option: undefined | TranslatorOption, locale: Language) => string;
13
13
  export declare const buildLocaleContext: (locale: MaybeRef<Language>) => LocaleContext;
14
14
  export declare const localeContextKey: InjectionKey<Ref<Language | undefined>>;
15
- export declare const useLocale: () => LocaleContext;
15
+ export declare const useLocale: (localeOverrides?: Ref<Language | undefined> | undefined) => LocaleContext;
@@ -17,8 +17,8 @@ const buildLocaleContext = (locale) => {
17
17
  };
18
18
  };
19
19
  const localeContextKey = Symbol("localeContextKey");
20
- const useLocale = () => {
21
- const locale = inject(localeContextKey, ref());
20
+ const useLocale = (localeOverrides) => {
21
+ const locale = localeOverrides || inject(localeContextKey, ref());
22
22
  return buildLocaleContext(computed(() => locale.value || English));
23
23
  };
24
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-locale/index.ts"],"sourcesContent":["import { computed, inject, isRef, ref, unref } from 'vue'\nimport { get } from 'lodash-unified'\nimport English from '@element-plus/locale/lang/en'\n\nimport type { MaybeRef } from '@vueuse/core'\nimport type { InjectionKey, Ref } from 'vue'\nimport type { Language } from '@element-plus/locale'\n\nexport type TranslatorOption = Record<string, string | number>\nexport type Translator = (path: string, option?: TranslatorOption) => string\nexport type LocaleContext = {\n locale: Ref<Language>\n lang: Ref<string>\n t: Translator\n}\n\nexport const buildTranslator =\n (locale: MaybeRef<Language>): Translator =>\n (path, option) =>\n translate(path, option, unref(locale))\n\nexport const translate = (\n path: string,\n option: undefined | TranslatorOption,\n locale: Language\n): string =>\n (get(locale, path, path) as string).replace(\n /\\{(\\w+)\\}/g,\n (_, key) => `${option?.[key] ?? `{${key}}`}`\n )\n\nexport const buildLocaleContext = (\n locale: MaybeRef<Language>\n): LocaleContext => {\n const lang = computed(() => unref(locale).name)\n const localeRef = isRef(locale) ? locale : ref(locale)\n return {\n lang,\n locale: localeRef,\n t: buildTranslator(locale),\n }\n}\n\nexport const localeContextKey: InjectionKey<Ref<Language | undefined>> =\n Symbol('localeContextKey')\n\nexport const useLocale = () => {\n const locale = inject(localeContextKey, ref())!\n return buildLocaleContext(computed(() => locale.value || English))\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,eAAe,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;AACxF,MAAC,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK;AAC7G,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG,CAAC,MAAM,KAAK;AAC9C,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;AAC9B,GAAG,CAAC;AACJ,EAAE;AACU,MAAC,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,EAAE;AAC/C,MAAC,SAAS,GAAG,MAAM;AAC/B,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;AACjD,EAAE,OAAO,kBAAkB,CAAC,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC;AACrE;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-locale/index.ts"],"sourcesContent":["import { computed, inject, isRef, ref, unref } from 'vue'\nimport { get } from 'lodash-unified'\nimport English from '@element-plus/locale/lang/en'\n\nimport type { MaybeRef } from '@vueuse/core'\nimport type { InjectionKey, Ref } from 'vue'\nimport type { Language } from '@element-plus/locale'\n\nexport type TranslatorOption = Record<string, string | number>\nexport type Translator = (path: string, option?: TranslatorOption) => string\nexport type LocaleContext = {\n locale: Ref<Language>\n lang: Ref<string>\n t: Translator\n}\n\nexport const buildTranslator =\n (locale: MaybeRef<Language>): Translator =>\n (path, option) =>\n translate(path, option, unref(locale))\n\nexport const translate = (\n path: string,\n option: undefined | TranslatorOption,\n locale: Language\n): string =>\n (get(locale, path, path) as string).replace(\n /\\{(\\w+)\\}/g,\n (_, key) => `${option?.[key] ?? `{${key}}`}`\n )\n\nexport const buildLocaleContext = (\n locale: MaybeRef<Language>\n): LocaleContext => {\n const lang = computed(() => unref(locale).name)\n const localeRef = isRef(locale) ? locale : ref(locale)\n return {\n lang,\n locale: localeRef,\n t: buildTranslator(locale),\n }\n}\n\nexport const localeContextKey: InjectionKey<Ref<Language | undefined>> =\n Symbol('localeContextKey')\n\nexport const useLocale = (localeOverrides?: Ref<Language | undefined>) => {\n const locale = localeOverrides || inject(localeContextKey, ref())!\n return buildLocaleContext(computed(() => locale.value || English))\n}\n"],"names":[],"mappings":";;;;AAGY,MAAC,eAAe,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;AACxF,MAAC,SAAS,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK;AAC7G,EAAE,IAAI,EAAE,CAAC;AACT,EAAE,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,MAAM,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC,EAAE;AACS,MAAC,kBAAkB,GAAG,CAAC,MAAM,KAAK;AAC9C,EAAE,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAClD,EAAE,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AACzD,EAAE,OAAO;AACT,IAAI,IAAI;AACR,IAAI,MAAM,EAAE,SAAS;AACrB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;AAC9B,GAAG,CAAC;AACJ,EAAE;AACU,MAAC,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,EAAE;AAC/C,MAAC,SAAS,GAAG,CAAC,eAAe,KAAK;AAC9C,EAAE,MAAM,MAAM,GAAG,eAAe,IAAI,MAAM,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;AACpE,EAAE,OAAO,kBAAkB,CAAC,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC;AACrE;;;;"}
@@ -1,7 +1,11 @@
1
1
  import type { Ref } from 'vue';
2
+ import type { UseNamespaceReturn } from '../use-namespace';
3
+ export declare type UseLockScreenOptions = {
4
+ ns?: UseNamespaceReturn;
5
+ };
2
6
  /**
3
7
  * Hook that monitoring the ref value to lock or unlock the screen.
4
8
  * When the trigger became true, it assumes modal is now opened and vice versa.
5
9
  * @param trigger {Ref<boolean>}
6
10
  */
7
- export declare const useLockscreen: (trigger: Ref<boolean>) => void;
11
+ export declare const useLockscreen: (trigger: Ref<boolean>, options?: UseLockScreenOptions) => void;
@@ -7,11 +7,11 @@ import { throwError } from '../../utils/error.mjs';
7
7
  import { hasClass, removeClass, getStyle, addClass } from '../../utils/dom/style.mjs';
8
8
  import { getScrollBarWidth } from '../../utils/dom/scroll.mjs';
9
9
 
10
- const useLockscreen = (trigger) => {
10
+ const useLockscreen = (trigger, options = {}) => {
11
11
  if (!isRef(trigger)) {
12
12
  throwError("[useLockscreen]", "You need to pass a ref param to this function");
13
13
  }
14
- const ns = useNamespace("popup");
14
+ const ns = options.ns || useNamespace("popup");
15
15
  const hiddenCls = computed(() => ns.bm("parent", "hidden"));
16
16
  if (!isClient || hasClass(document.body, hiddenCls.value)) {
17
17
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-lockscreen/index.ts"],"sourcesContent":["import { isRef, onScopeDispose, watch } from 'vue'\nimport { computed } from '@vue/reactivity'\nimport { isClient } from '@vueuse/core'\nimport {\n addClass,\n getScrollBarWidth,\n getStyle,\n hasClass,\n removeClass,\n throwError,\n} from '@element-plus/utils'\nimport { useNamespace } from '../use-namespace'\n\nimport type { Ref } from 'vue'\n\n/**\n * Hook that monitoring the ref value to lock or unlock the screen.\n * When the trigger became true, it assumes modal is now opened and vice versa.\n * @param trigger {Ref<boolean>}\n */\nexport const useLockscreen = (trigger: Ref<boolean>) => {\n if (!isRef(trigger)) {\n throwError(\n '[useLockscreen]',\n 'You need to pass a ref param to this function'\n )\n }\n\n const ns = useNamespace('popup')\n\n const hiddenCls = computed(() => ns.bm('parent', 'hidden'))\n\n if (!isClient || hasClass(document.body, hiddenCls.value)) {\n return\n }\n\n let scrollBarWidth = 0\n let withoutHiddenClass = false\n let bodyWidth = '0'\n\n const cleanup = () => {\n setTimeout(() => {\n removeClass(document?.body, hiddenCls.value)\n if (withoutHiddenClass && document) {\n document.body.style.width = bodyWidth\n }\n }, 200)\n }\n watch(trigger, (val) => {\n if (!val) {\n cleanup()\n return\n }\n\n withoutHiddenClass = !hasClass(document.body, hiddenCls.value)\n if (withoutHiddenClass) {\n bodyWidth = document.body.style.width\n }\n scrollBarWidth = getScrollBarWidth(ns.namespace.value)\n const bodyHasOverflow =\n document.documentElement.clientHeight < document.body.scrollHeight\n const bodyOverflowY = getStyle(document.body, 'overflowY')\n if (\n scrollBarWidth > 0 &&\n (bodyHasOverflow || bodyOverflowY === 'scroll') &&\n withoutHiddenClass\n ) {\n document.body.style.width = `calc(100% - ${scrollBarWidth}px)`\n }\n addClass(document.body, hiddenCls.value)\n })\n onScopeDispose(() => cleanup())\n}\n"],"names":[],"mappings":";;;;;;;;;AAYY,MAAC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IAAI,kBAAkB,EAAE;AAC5B,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AAC5C,KAAK;AACL,IAAI,cAAc,GAAG,iBAAiB,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC3D,IAAI,MAAM,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;AAC/F,IAAI,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAC/D,IAAI,IAAI,cAAc,GAAG,CAAC,KAAK,eAAe,IAAI,aAAa,KAAK,QAAQ,CAAC,IAAI,kBAAkB,EAAE;AACrG,MAAM,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;AACrE,KAAK;AACL,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAC7C,GAAG,CAAC,CAAC;AACL,EAAE,cAAc,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;AAClC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-lockscreen/index.ts"],"sourcesContent":["import { isRef, onScopeDispose, watch } from 'vue'\nimport { computed } from '@vue/reactivity'\nimport { isClient } from '@vueuse/core'\nimport {\n addClass,\n getScrollBarWidth,\n getStyle,\n hasClass,\n removeClass,\n throwError,\n} from '@element-plus/utils'\nimport { useNamespace } from '../use-namespace'\n\nimport type { Ref } from 'vue'\nimport type { UseNamespaceReturn } from '../use-namespace'\n\nexport type UseLockScreenOptions = {\n ns?: UseNamespaceReturn\n // shouldLock?: MaybeRef<boolean>\n}\n\n/**\n * Hook that monitoring the ref value to lock or unlock the screen.\n * When the trigger became true, it assumes modal is now opened and vice versa.\n * @param trigger {Ref<boolean>}\n */\nexport const useLockscreen = (\n trigger: Ref<boolean>,\n options: UseLockScreenOptions = {}\n) => {\n if (!isRef(trigger)) {\n throwError(\n '[useLockscreen]',\n 'You need to pass a ref param to this function'\n )\n }\n\n const ns = options.ns || useNamespace('popup')\n\n const hiddenCls = computed(() => ns.bm('parent', 'hidden'))\n\n if (!isClient || hasClass(document.body, hiddenCls.value)) {\n return\n }\n\n let scrollBarWidth = 0\n let withoutHiddenClass = false\n let bodyWidth = '0'\n\n const cleanup = () => {\n setTimeout(() => {\n removeClass(document?.body, hiddenCls.value)\n if (withoutHiddenClass && document) {\n document.body.style.width = bodyWidth\n }\n }, 200)\n }\n watch(trigger, (val) => {\n if (!val) {\n cleanup()\n return\n }\n\n withoutHiddenClass = !hasClass(document.body, hiddenCls.value)\n if (withoutHiddenClass) {\n bodyWidth = document.body.style.width\n }\n scrollBarWidth = getScrollBarWidth(ns.namespace.value)\n const bodyHasOverflow =\n document.documentElement.clientHeight < document.body.scrollHeight\n const bodyOverflowY = getStyle(document.body, 'overflowY')\n if (\n scrollBarWidth > 0 &&\n (bodyHasOverflow || bodyOverflowY === 'scroll') &&\n withoutHiddenClass\n ) {\n document.body.style.width = `calc(100% - ${scrollBarWidth}px)`\n }\n addClass(document.body, hiddenCls.value)\n })\n onScopeDispose(() => cleanup())\n}\n"],"names":[],"mappings":";;;;;;;;;AAYY,MAAC,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,EAAE,KAAK;AACxD,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;AACvB,IAAI,UAAU,CAAC,iBAAiB,EAAE,+CAA+C,CAAC,CAAC;AACnF,GAAG;AACH,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;AACjD,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;A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,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAC/D,IAAI,IAAI,cAAc,GAAG,CAAC,KAAK,eAAe,IAAI,aAAa,KAAK,QAAQ,CAAC,IAAI,kBAAkB,EAAE;AACrG,MAAM,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC;AACrE,KAAK;AACL,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;AAC7C,GAAG,CAAC,CAAC;AACL,EAAE,cAAc,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC;AAClC;;;;"}
@@ -1,8 +1,8 @@
1
1
  import type { InjectionKey, Ref } from 'vue';
2
2
  export declare const defaultNamespace = "el";
3
3
  export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
4
- export declare const useGetDerivedNamespace: () => import("vue").ComputedRef<string>;
5
- export declare const useNamespace: (block: string) => {
4
+ export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string> | undefined) => import("vue").ComputedRef<string>;
5
+ export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string> | undefined) => {
6
6
  namespace: import("vue").ComputedRef<string>;
7
7
  b: (blockSuffix?: string) => string;
8
8
  e: (element?: string | undefined) => string;
@@ -16,15 +16,15 @@ const _bem = (namespace, block, blockSuffix, element, modifier) => {
16
16
  return cls;
17
17
  };
18
18
  const namespaceContextKey = Symbol("localeContextKey");
19
- const useGetDerivedNamespace = () => {
20
- const derivedNamespace = inject(namespaceContextKey, ref(defaultNamespace));
19
+ const useGetDerivedNamespace = (namespaceOverrides) => {
20
+ const derivedNamespace = namespaceOverrides || inject(namespaceContextKey, ref(defaultNamespace));
21
21
  const namespace = computed(() => {
22
22
  return unref(derivedNamespace) || defaultNamespace;
23
23
  });
24
24
  return namespace;
25
25
  };
26
- const useNamespace = (block) => {
27
- const namespace = useGetDerivedNamespace();
26
+ const useNamespace = (block, namespaceOverrides) => {
27
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
28
28
  const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
29
29
  const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
30
30
  const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'el'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> =\n Symbol('localeContextKey')\n\nexport const useGetDerivedNamespace = () => {\n const derivedNamespace = inject(namespaceContextKey, ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport const useNamespace = (block: string) => {\n const namespace = useGetDerivedNamespace()\n\n const b = (blockSuffix = '') =>\n _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(namespace.value, block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(namespace.value, block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(namespace.value, block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(namespace.value, block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(namespace.value, block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(namespace.value, block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) =>\n `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName,\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"names":[],"mappings":";;AACY,MAAC,gBAAgB,GAAG,KAAK;AACrC,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,KAAK;AACnE,EAAE,IAAI,GAAG,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AACpC,EAAE,IAAI,WAAW,EAAE;AACnB,IAAI,GAAG,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AAC7B,GAAG;AACH,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1B,GAAG;AACH,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,GAAG,IA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AO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,MAAM,WAAW,GAAG,CAAC,MAAM,KAAK;AAClC,IAAI,MAAM,MAAM,GAAG,EAAE,CAAC;AACtB,IAAI,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;AAC9B,MAAM,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE;AACvB,QAAQ,MAAM,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACrE,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9D,EAAE,MAAM,eAAe,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5E,EAAE,OAAO;AACT,IAAI,SAAS;AACb,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,GAAG;AACP,IAAI,EAAE;AACN,IAAI,MAAM;AACV,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'el'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> =\n Symbol('localeContextKey')\n\nexport const useGetDerivedNamespace = (namespaceOverrides?: Ref<string>) => {\n const derivedNamespace =\n namespaceOverrides || inject(namespaceContextKey, ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport const useNamespace = (\n block: string,\n namespaceOverrides?: Ref<string>\n) => {\n const namespace = useGetDerivedNamespace(namespaceOverrides)\n const b = (blockSuffix = '') =>\n _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(namespace.value, block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(namespace.value, block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(namespace.value, block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(namespace.value, block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(namespace.value, block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(namespace.value, block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) =>\n `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName,\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"names":[],"mappings":";;AACY,MAAC,gBAAgB,GAAG,KAAK;AACrC,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,KAAK;AACnE,EAAE,IAAI,GAAG,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AACpC,EAAE,IAAI,WAAW,EAAE;AACnB,IAAI,GAAG,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AAC7B,GAAG;AACH,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1B,GAAG;AACH,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3B,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AACU,MAAC,mBAAmB,GAAG,MAAM,CAAC,kBAAkB,EAAE;AAClD,MAAC,sBAAsB,GAAG,CAAC,kBAAkB,KAAK;AAC9D,EAAE,MAAM,gBAAgB,GAAG,kBAAkB,IAAI,MAAM,CAAC,mBAAmB,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACpG,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,MAA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AK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACrE,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9D,EAAE,MAAM,eAAe,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5E,EAAE,OAAO;AACT,IAAI,SAAS;AACb,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,GAAG;AACP,IAAI,EAAE;AACN,IAAI,MAAM;AACV,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
@@ -2,4 +2,7 @@ export declare const usePopperContainerId: () => {
2
2
  id: import("vue").ComputedRef<string>;
3
3
  selector: import("vue").ComputedRef<string>;
4
4
  };
5
- export declare const usePopperContainer: () => void;
5
+ export declare const usePopperContainer: () => {
6
+ id: import("vue").ComputedRef<string>;
7
+ selector: import("vue").ComputedRef<string>;
8
+ };
@@ -23,14 +23,18 @@ const createContainer = (id) => {
23
23
  return container;
24
24
  };
25
25
  const usePopperContainer = () => {
26
+ const { id, selector } = usePopperContainerId();
26
27
  onBeforeMount(() => {
27
28
  if (!isClient)
28
29
  return;
29
- const { id, selector } = usePopperContainerId();
30
30
  if (process.env.NODE_ENV === "test" || !cachedContainer && !document.body.querySelector(selector.value)) {
31
31
  cachedContainer = createContainer(id.value);
32
32
  }
33
33
  });
34
+ return {
35
+ id,
36
+ selector
37
+ };
34
38
  };
35
39
 
36
40
  export { usePopperContainer, usePopperContainerId };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { computed, onBeforeMount } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { useGetDerivedNamespace } from '../use-namespace'\nimport { useIdInjection } from '../use-id'\n\nlet cachedContainer: HTMLElement\n\nexport const usePopperContainerId = () => {\n const namespace = useGetDerivedNamespace()\n const idInjection = useIdInjection()\n\n const id = computed(() => {\n return `${namespace.value}-popper-container-${idInjection.prefix}`\n })\n const selector = computed(() => `#${id.value}`)\n\n return {\n id,\n selector,\n }\n}\n\nconst createContainer = (id: string) => {\n const container = document.createElement('div')\n container.id = id\n document.body.appendChild(container)\n return container\n}\n\nexport const usePopperContainer = () => {\n onBeforeMount(() => {\n if (!isClient) return\n\n const { id, selector } = usePopperContainerId()\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (\n process.env.NODE_ENV === 'test' ||\n (!cachedContainer && !document.body.querySelector(selector.value))\n ) {\n cachedContainer = createContainer(id.value)\n }\n })\n}\n"],"names":[],"mappings":";;;;;AAIA,IAAI,eAAe,CAAC;AACR,MAAC,oBAAoB,GAAG,MAAM;AAC1C,EAAE,MAAM,SAAS,GAAG,sBAAsB,EAAE,CAAC;AAC7C,EAAE,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;AACvC,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM;AAC5B,IAAI,OAAO,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACvE,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAClD,EAAE,OAAO;AACT,IAAI,EAAE;AACN,IAAI,QAAQ;AACZ,GAAG,CAAC;AACJ,EAAE;AACF,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK;AAChC,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAClD,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;AACpB,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACvC,EAAE,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACU,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAE,aAAa,CAAC,MAAM;AACtB,IAAI,IAAI,CAAC,QAAQ;AACjB,MAAM,OAAO;AACb,IAAI,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,oBAAoB,EAAE,CAAC;AACpD,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC7G,MAAM,eAAe,GAAG,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAClD,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-popper-container/index.ts"],"sourcesContent":["import { computed, onBeforeMount } from 'vue'\nimport { isClient } from '@vueuse/core'\nimport { useGetDerivedNamespace } from '../use-namespace'\nimport { useIdInjection } from '../use-id'\n\nlet cachedContainer: HTMLElement\n\nexport const usePopperContainerId = () => {\n const namespace = useGetDerivedNamespace()\n const idInjection = useIdInjection()\n\n const id = computed(() => {\n return `${namespace.value}-popper-container-${idInjection.prefix}`\n })\n const selector = computed(() => `#${id.value}`)\n\n return {\n id,\n selector,\n }\n}\n\nconst createContainer = (id: string) => {\n const container = document.createElement('div')\n container.id = id\n document.body.appendChild(container)\n return container\n}\n\nexport const usePopperContainer = () => {\n const { id, selector } = usePopperContainerId()\n onBeforeMount(() => {\n if (!isClient) return\n\n // This is for bypassing the error that when under testing env, we often encounter\n // document.body.innerHTML = '' situation\n // for this we need to disable the caching since it's not really needed\n if (\n process.env.NODE_ENV === 'test' ||\n (!cachedContainer && !document.body.querySelector(selector.value))\n ) {\n cachedContainer = createContainer(id.value)\n }\n })\n\n return {\n id,\n selector,\n }\n}\n"],"names":[],"mappings":";;;;;AAIA,IAAI,eAAe,CAAC;AACR,MAAC,oBAAoB,GAAG,MAAM;AAC1C,EAAE,MAAM,SAAS,GAAG,sBAAsB,EAAE,CAAC;AAC7C,EAAE,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;AACvC,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM;AAC5B,IAAI,OAAO,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AACvE,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAClD,EAAE,OAAO;AACT,IAAI,EAAE;AACN,IAAI,QAAQ;AACZ,GAAG,CAAC;AACJ,EAAE;AACF,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK;AAChC,EAAE,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAClD,EAAE,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;AACpB,EAAE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACvC,EAAE,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AACU,MAAC,kBAAkB,GAAG,MAAM;AACxC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,oBAAoB,EAAE,CAAC;AAClD,EAAE,aAAa,CAAC,MAAM;AACtB,IAAI,IAAI,CAAC,QAAQ;AACjB,MAAM,OAAO;AACb,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM,IAAI,CAAC,eAAe,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AAC7G,MAAM,eAAe,GAAG,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;AAClD,KAAK;AACL,GAAG,CAAC,CAAC;AACL,EAAE,OAAO;AACT,IAAI,EAAE;AACN,IAAI,QAAQ;AACZ,GAAG,CAAC;AACJ;;;;"}
@@ -1,7 +1,9 @@
1
1
  import type { InjectionKey, Ref } from 'vue';
2
+ export declare const defaultInitialZIndex = 2000;
2
3
  export declare const zIndexContextKey: InjectionKey<Ref<number | undefined>>;
3
- export declare const useZIndex: () => {
4
+ export declare const useZIndex: (zIndexOverrides?: Ref<number> | undefined) => {
4
5
  initialZIndex: import("vue").ComputedRef<number>;
5
6
  currentZIndex: import("vue").ComputedRef<number>;
6
7
  nextZIndex: () => number;
7
8
  };
9
+ export declare type UseZIndexReturn = ReturnType<typeof useZIndex>;
@@ -5,8 +5,8 @@ import { isNumber } from '@vueuse/core';
5
5
  const zIndex = ref(0);
6
6
  const defaultInitialZIndex = 2e3;
7
7
  const zIndexContextKey = Symbol("zIndexContextKey");
8
- const useZIndex = () => {
9
- const zIndexInjection = inject(zIndexContextKey, void 0);
8
+ const useZIndex = (zIndexOverrides) => {
9
+ const zIndexInjection = zIndexOverrides || inject(zIndexContextKey, void 0);
10
10
  const initialZIndex = computed(() => {
11
11
  const zIndexFromInjection = unref(zIndexInjection);
12
12
  return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
@@ -23,5 +23,5 @@ const useZIndex = () => {
23
23
  };
24
24
  };
25
25
 
26
- export { useZIndex, zIndexContextKey };
26
+ export { defaultInitialZIndex, useZIndex, zIndexContextKey };
27
27
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-z-index/index.ts"],"sourcesContent":["import { computed, inject, ref, unref } from 'vue'\nimport { isNumber } from '@element-plus/utils'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nconst zIndex = ref(0)\nconst defaultInitialZIndex = 2000\n\nexport const zIndexContextKey: InjectionKey<Ref<number | undefined>> =\n Symbol('zIndexContextKey')\n\nexport const useZIndex = () => {\n const zIndexInjection = inject(zIndexContextKey, undefined)\n const initialZIndex = computed(() => {\n const zIndexFromInjection = unref(zIndexInjection)\n return isNumber(zIndexFromInjection)\n ? zIndexFromInjection\n : defaultInitialZIndex\n })\n const currentZIndex = computed(() => initialZIndex.value + zIndex.value)\n\n const nextZIndex = () => {\n zIndex.value++\n return currentZIndex.value\n }\n\n return {\n initialZIndex,\n currentZIndex,\n nextZIndex,\n }\n}\n"],"names":[],"mappings":";;;;AAEA,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACtB,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACrB,MAAC,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,EAAE;AAC/C,MAAC,SAAS,GAAG,MAAM;AAC/B,EAAE,MAAM,eAAe,GAAG,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3D,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM;AACvC,IAAI,MAAM,mBAAmB,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AACvD,IAAI,OAAO,QAAQ,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;AACtF,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,EAAE,MAAM,UAAU,GAAG,MAAM;AAC3B,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;AACnB,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC;AAC/B,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,UAAU;AACd,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-z-index/index.ts"],"sourcesContent":["import { computed, inject, ref, unref } from 'vue'\nimport { isNumber } from '@element-plus/utils'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nconst zIndex = ref(0)\nexport const defaultInitialZIndex = 2000\n\nexport const zIndexContextKey: InjectionKey<Ref<number | undefined>> =\n Symbol('zIndexContextKey')\n\nexport const useZIndex = (zIndexOverrides?: Ref<number>) => {\n const zIndexInjection = zIndexOverrides || inject(zIndexContextKey, undefined)\n const initialZIndex = computed(() => {\n const zIndexFromInjection = unref(zIndexInjection)\n return isNumber(zIndexFromInjection)\n ? zIndexFromInjection\n : defaultInitialZIndex\n })\n const currentZIndex = computed(() => initialZIndex.value + zIndex.value)\n\n const nextZIndex = () => {\n zIndex.value++\n return currentZIndex.value\n }\n\n return {\n initialZIndex,\n currentZIndex,\n nextZIndex,\n }\n}\n\nexport type UseZIndexReturn = ReturnType<typeof useZIndex>\n"],"names":[],"mappings":";;;;AAEA,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AACV,MAAC,oBAAoB,GAAG,IAAI;AAC5B,MAAC,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,EAAE;AAC/C,MAAC,SAAS,GAAG,CAAC,eAAe,KAAK;AAC9C,EAAE,MAAM,eAAe,GAAG,eAAe,IAAI,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;AAC9E,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM;AACvC,IAAI,MAAM,mBAAmB,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AACvD,IAAI,OAAO,QAAQ,CAAC,mBAAmB,CAAC,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;AACtF,GAAG,CAAC,CAAC;AACL,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,EAAE,MAAM,UAAU,GAAG,MAAM;AAC3B,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;AACnB,IAAI,OAAO,aAAa,CAAC,KAAK,CAAC;AAC/B,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,aAAa;AACjB,IAAI,aAAa;AACjB,IAAI,UAAU;AACd,GAAG,CAAC;AACJ;;;;"}
package/es/index.mjs CHANGED
@@ -56,7 +56,7 @@ export { ElColorPicker } from './components/color-picker/index.mjs';
56
56
  export { messageConfig } from './components/config-provider/src/config-provider.mjs';
57
57
  export { configProviderProps } from './components/config-provider/src/config-provider-props.mjs';
58
58
  export { configProviderContextKey } from './components/config-provider/src/constants.mjs';
59
- export { provideGlobalConfig, useGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
59
+ export { provideGlobalConfig, useGlobalComponentSettings, useGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
60
60
  export { ElConfigProvider } from './components/config-provider/index.mjs';
61
61
  export { ElAside, ElContainer, ElFooter, ElHeader, ElMain } from './components/container/index.mjs';
62
62
  export { countdownEmits, countdownProps } from './components/countdown/src/countdown.mjs';
@@ -248,7 +248,7 @@ export { useDelayedRender } from './hooks/use-intermediate-render/index.mjs';
248
248
  export { useDelayedToggle, useDelayedToggleProps } from './hooks/use-delayed-toggle/index.mjs';
249
249
  export { FORWARD_REF_INJECTION_KEY, useForwardRef, useForwardRefDirective } from './hooks/use-forward-ref/index.mjs';
250
250
  export { defaultNamespace, namespaceContextKey, useGetDerivedNamespace, useNamespace } from './hooks/use-namespace/index.mjs';
251
- export { useZIndex, zIndexContextKey } from './hooks/use-z-index/index.mjs';
251
+ export { defaultInitialZIndex, useZIndex, zIndexContextKey } from './hooks/use-z-index/index.mjs';
252
252
  export { arrowMiddleware, getPositionDataWithUnit, useFloating, useFloatingProps } from './hooks/use-floating/index.mjs';
253
253
  export { useCursor } from './hooks/use-cursor/index.mjs';
254
254
  export { useOrderedChildren } from './hooks/use-ordered-children/index.mjs';
package/es/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "0.0.20230305";
1
+ export declare const version = "0.0.20230307";
package/es/version.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const version = "0.0.20230305";
1
+ const version = "0.0.20230307";
2
2
 
3
3
  export { version };
4
4
  //# sourceMappingURL=version.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20230305'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"version.mjs","sources":["../../../packages/element-plus/version.ts"],"sourcesContent":["export const version = '0.0.20230307'\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"}
@@ -15,6 +15,7 @@ exports.messageConfig = configProvider.messageConfig;
15
15
  exports.configProviderProps = configProviderProps.configProviderProps;
16
16
  exports.configProviderContextKey = constants.configProviderContextKey;
17
17
  exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
18
+ exports.useGlobalComponentSettings = useGlobalConfig.useGlobalComponentSettings;
18
19
  exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
19
20
  exports.ElConfigProvider = ElConfigProvider;
20
21
  exports["default"] = ElConfigProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/config-provider/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\n\nimport ConfigProvider from './src/config-provider'\n\nexport const ElConfigProvider = withInstall(ConfigProvider)\nexport default ElConfigProvider\n\nexport * from './src/config-provider'\nexport * from './src/config-provider-props'\nexport * from './src/constants'\nexport * from './src/hooks/use-global-config'\n"],"names":["withInstall","ConfigProvider"],"mappings":";;;;;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,mBAAW,CAACC,yBAAc;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/config-provider/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\n\nimport ConfigProvider from './src/config-provider'\n\nexport const ElConfigProvider = withInstall(ConfigProvider)\nexport default ElConfigProvider\n\nexport * from './src/config-provider'\nexport * from './src/config-provider-props'\nexport * from './src/constants'\nexport * from './src/hooks/use-global-config'\n"],"names":["withInstall","ConfigProvider"],"mappings":";;;;;;;;;;;AAEY,MAAC,gBAAgB,GAAGA,mBAAW,CAACC,yBAAc;;;;;;;;;;;"}
@@ -3,4 +3,31 @@ import type { App, Ref } from 'vue';
3
3
  import type { ConfigProviderContext } from '../constants';
4
4
  export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
5
5
  export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
6
+ export declare function useGlobalComponentSettings(block: string, sizeFallback?: MaybeRef<ConfigProviderContext['size']>): {
7
+ ns: {
8
+ namespace: import("vue").ComputedRef<string>;
9
+ b: (blockSuffix?: string) => string;
10
+ e: (element?: string | undefined) => string;
11
+ m: (modifier?: string | undefined) => string;
12
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
13
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
14
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
15
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
16
+ is: {
17
+ (name: string, state: boolean | undefined): string;
18
+ (name: string): string;
19
+ };
20
+ cssVar: (object: Record<string, string>) => Record<string, string>;
21
+ cssVarName: (name: string) => string;
22
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
23
+ cssVarBlockName: (name: string) => string;
24
+ };
25
+ locale: import("element-plus/es/hooks").LocaleContext;
26
+ zIndex: {
27
+ initialZIndex: import("vue").ComputedRef<number>;
28
+ currentZIndex: import("vue").ComputedRef<number>;
29
+ nextZIndex: () => number;
30
+ };
31
+ size: import("vue").ComputedRef<"" | "default" | "small" | "large">;
32
+ };
6
33
  export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContext>, app?: App<any> | undefined, global?: boolean) => import("vue").ComputedRef<Partial<import("../config-provider-props").ConfigProviderProps>> | undefined;
@@ -6,10 +6,10 @@ var vue = require('vue');
6
6
  require('../../../../utils/index.js');
7
7
  require('../../../../hooks/index.js');
8
8
  var constants = require('../constants.js');
9
- var error = require('../../../../utils/error.js');
10
- var index = require('../../../../hooks/use-locale/index.js');
11
- var index$1 = require('../../../../hooks/use-namespace/index.js');
9
+ var index = require('../../../../hooks/use-namespace/index.js');
10
+ var index$1 = require('../../../../hooks/use-locale/index.js');
12
11
  var index$2 = require('../../../../hooks/use-z-index/index.js');
12
+ var error = require('../../../../utils/error.js');
13
13
  var index$3 = require('../../../../hooks/use-size/index.js');
14
14
  var objects = require('../../../../utils/objects.js');
15
15
 
@@ -25,6 +25,31 @@ function useGlobalConfig(key, defaultValue = void 0) {
25
25
  return config;
26
26
  }
27
27
  }
28
+ function useGlobalComponentSettings(block, sizeFallback) {
29
+ const config = useGlobalConfig();
30
+ const ns = index.useNamespace(block, vue.computed(() => {
31
+ var _a;
32
+ return ((_a = config.value) == null ? void 0 : _a.namespace) || index.defaultNamespace;
33
+ }));
34
+ const locale = index$1.useLocale(vue.computed(() => {
35
+ var _a;
36
+ return (_a = config.value) == null ? void 0 : _a.locale;
37
+ }));
38
+ const zIndex = index$2.useZIndex(vue.computed(() => {
39
+ var _a;
40
+ return ((_a = config.value) == null ? void 0 : _a.zIndex) || index$2.defaultInitialZIndex;
41
+ }));
42
+ const size = vue.computed(() => {
43
+ var _a;
44
+ return vue.unref(sizeFallback) || ((_a = config.value) == null ? void 0 : _a.size) || "";
45
+ });
46
+ return {
47
+ ns,
48
+ locale,
49
+ zIndex,
50
+ size
51
+ };
52
+ }
28
53
  const provideGlobalConfig = (config, app, global = false) => {
29
54
  var _a;
30
55
  const inSetup = !!vue.getCurrentInstance();
@@ -41,8 +66,8 @@ const provideGlobalConfig = (config, app, global = false) => {
41
66
  return mergeConfig(oldConfig.value, cfg);
42
67
  });
43
68
  provideFn(constants.configProviderContextKey, context);
44
- provideFn(index.localeContextKey, vue.computed(() => context.value.locale));
45
- provideFn(index$1.namespaceContextKey, vue.computed(() => context.value.namespace));
69
+ provideFn(index$1.localeContextKey, vue.computed(() => context.value.locale));
70
+ provideFn(index.namespaceContextKey, vue.computed(() => context.value.namespace));
46
71
  provideFn(index$2.zIndexContextKey, vue.computed(() => context.value.zIndex));
47
72
  provideFn(index$3.SIZE_INJECTION_KEY, {
48
73
  size: vue.computed(() => context.value.size || "")
@@ -63,5 +88,6 @@ const mergeConfig = (a, b) => {
63
88
  };
64
89
 
65
90
  exports.provideGlobalConfig = provideGlobalConfig;
91
+ exports.useGlobalComponentSettings = useGlobalComponentSettings;
66
92
  exports.useGlobalConfig = useGlobalConfig;
67
93
  //# sourceMappingURL=use-global-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-global-config.js","sources":["../../../../../../../packages/components/config-provider/src/hooks/use-global-config.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, provide, ref, unref } from 'vue'\nimport { debugWarn, keysOf } from '@element-plus/utils'\nimport {\n SIZE_INJECTION_KEY,\n localeContextKey,\n namespaceContextKey,\n zIndexContextKey,\n} from '@element-plus/hooks'\nimport { configProviderContextKey } from '../constants'\n\nimport type { MaybeRef } from '@vueuse/core'\nimport type { App, Ref } from 'vue'\nimport type { ConfigProviderContext } from '../constants'\n\n// this is meant to fix global methods like `ElMessage(opts)`, this way we can inject current locale\n// into the component as default injection value.\n// refer to: https://github.com/element-plus/element-plus/issues/2610#issuecomment-887965266\nconst globalConfig = ref<ConfigProviderContext>()\n\nexport function useGlobalConfig<\n K extends keyof ConfigProviderContext,\n D extends ConfigProviderContext[K]\n>(\n key: K,\n defaultValue?: D\n): Ref<Exclude<ConfigProviderContext[K], undefined> | D>\nexport function useGlobalConfig(): Ref<ConfigProviderContext>\nexport function useGlobalConfig(\n key?: keyof ConfigProviderContext,\n defaultValue = undefined\n) {\n const config = getCurrentInstance()\n ? inject(configProviderContextKey, globalConfig)\n : globalConfig\n if (key) {\n return computed(() => config.value?.[key] ?? defaultValue)\n } else {\n return config\n }\n}\n\nexport const provideGlobalConfig = (\n config: MaybeRef<ConfigProviderContext>,\n app?: App,\n global = false\n) => {\n const inSetup = !!getCurrentInstance()\n const oldConfig = inSetup ? useGlobalConfig() : undefined\n\n const provideFn = app?.provide ?? (inSetup ? provide : undefined)\n if (!provideFn) {\n debugWarn(\n 'provideGlobalConfig',\n 'provideGlobalConfig() can only be used inside setup().'\n )\n return\n }\n\n const context = computed(() => {\n const cfg = unref(config)\n if (!oldConfig?.value) return cfg\n return mergeConfig(oldConfig.value, cfg)\n })\n provideFn(configProviderContextKey, context)\n provideFn(\n localeContextKey,\n computed(() => context.value.locale)\n )\n provideFn(\n namespaceContextKey,\n computed(() => context.value.namespace)\n )\n provideFn(\n zIndexContextKey,\n computed(() => context.value.zIndex)\n )\n\n provideFn(SIZE_INJECTION_KEY, {\n size: computed(() => context.value.size || ''),\n })\n\n if (global || !globalConfig.value) {\n globalConfig.value = context.value\n }\n return context\n}\n\nconst mergeConfig = (\n a: ConfigProviderContext,\n b: ConfigProviderContext\n): ConfigProviderContext => {\n const keys = [...new Set([...keysOf(a), ...keysOf(b)])]\n const obj: Record<string, any> = {}\n for (const key of keys) {\n obj[key] = b[key] ?? a[key]\n }\n return obj\n}\n"],"names":["ref","getCurrentInstance","inject","configProviderContextKey","computed","provide","debugWarn","unref","localeContextKey","namespaceContextKey","zIndexContextKey","SIZE_INJECTION_KEY","keysOf"],"mappings":";;;;;;;;;;;;;;;AASA,MAAM,YAAY,GAAGA,OAAG,EAAE,CAAC;AACpB,SAAS,e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AAI,EAAE;AAC1B,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AACnD,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb,CAAC;;;;;"}
1
+ {"version":3,"file":"use-global-config.js","sources":["../../../../../../../packages/components/config-provider/src/hooks/use-global-config.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, provide, ref, unref } from 'vue'\nimport { debugWarn, keysOf } from '@element-plus/utils'\nimport {\n SIZE_INJECTION_KEY,\n defaultInitialZIndex,\n defaultNamespace,\n localeContextKey,\n namespaceContextKey,\n useLocale,\n useNamespace,\n useZIndex,\n zIndexContextKey,\n} from '@element-plus/hooks'\nimport { configProviderContextKey } from '../constants'\n\nimport type { MaybeRef } from '@vueuse/core'\nimport type { App, Ref } from 'vue'\nimport type { ConfigProviderContext } from '../constants'\n\n// this is meant to fix global methods like `ElMessage(opts)`, this way we can inject current locale\n// into the component as default injection value.\n// refer to: https://github.com/element-plus/element-plus/issues/2610#issuecomment-887965266\nconst globalConfig = ref<ConfigProviderContext>()\n\nexport function useGlobalConfig<\n K extends keyof ConfigProviderContext,\n D extends ConfigProviderContext[K]\n>(\n key: K,\n defaultValue?: D\n): Ref<Exclude<ConfigProviderContext[K], undefined> | D>\nexport function useGlobalConfig(): Ref<ConfigProviderContext>\nexport function useGlobalConfig(\n key?: keyof ConfigProviderContext,\n defaultValue = undefined\n) {\n const config = getCurrentInstance()\n ? inject(configProviderContextKey, globalConfig)\n : globalConfig\n if (key) {\n return computed(() => config.value?.[key] ?? defaultValue)\n } else {\n return config\n }\n}\n\n// for components like `ElMessage` `ElNotification` `ElMessageBox`.\nexport function useGlobalComponentSettings(\n block: string,\n sizeFallback?: MaybeRef<ConfigProviderContext['size']>\n) {\n const config = useGlobalConfig()\n\n const ns = useNamespace(\n block,\n computed(() => config.value?.namespace || defaultNamespace)\n )\n\n const locale = useLocale(computed(() => config.value?.locale))\n const zIndex = useZIndex(\n computed(() => config.value?.zIndex || defaultInitialZIndex)\n )\n const size = computed(() => unref(sizeFallback) || config.value?.size || '')\n\n return {\n ns,\n locale,\n zIndex,\n size,\n }\n}\n\nexport const provideGlobalConfig = (\n config: MaybeRef<ConfigProviderContext>,\n app?: App,\n global = false\n) => {\n const inSetup = !!getCurrentInstance()\n const oldConfig = inSetup ? useGlobalConfig() : undefined\n\n const provideFn = app?.provide ?? (inSetup ? provide : undefined)\n if (!provideFn) {\n debugWarn(\n 'provideGlobalConfig',\n 'provideGlobalConfig() can only be used inside setup().'\n )\n return\n }\n\n const context = computed(() => {\n const cfg = unref(config)\n if (!oldConfig?.value) return cfg\n return mergeConfig(oldConfig.value, cfg)\n })\n provideFn(configProviderContextKey, context)\n provideFn(\n localeContextKey,\n computed(() => context.value.locale)\n )\n provideFn(\n namespaceContextKey,\n computed(() => context.value.namespace)\n )\n provideFn(\n zIndexContextKey,\n computed(() => context.value.zIndex)\n )\n\n provideFn(SIZE_INJECTION_KEY, {\n size: computed(() => context.value.size || ''),\n })\n\n if (global || !globalConfig.value) {\n globalConfig.value = context.value\n }\n return context\n}\n\nconst mergeConfig = (\n a: ConfigProviderContext,\n b: ConfigProviderContext\n): ConfigProviderContext => {\n const keys = [...new Set([...keysOf(a), ...keysOf(b)])]\n const obj: Record<string, any> = {}\n for (const key of keys) {\n obj[key] = b[key] ?? a[key]\n }\n return obj\n}\n"],"names":["ref","getCurrentInstance","inject","configProviderContextKey","computed","useNamespace","defaultNamespace","useLocale","useZIndex","defaultInitialZIndex","unref","provide","debugWarn","localeContextKey","namespaceContextKey","zIndexContextKey","SIZE_INJECTION_KEY","keysOf"],"mappings":";;;;;;;;;;;;;;;AAcA,MAAM,YAAY,GAAGA,OAAG,EAAE,CAAC;AACpB,SAAS,eAAe,CAAC,GAAG,EAAE,YAAY,GAAG,KAAK,CAAC,EAAE;AAC5D,EAAE,MAAM,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AAE,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AACnD,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb,CAAC;;;;;;"}
@@ -167,6 +167,12 @@ export declare const ElDialog: import("element-plus/es/utils").SFCWithInstall<im
167
167
  readonly validator: ((val: unknown) => boolean) | undefined;
168
168
  __epPropKey: true;
169
169
  };
170
+ readonly isGlobal: {
171
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
172
+ readonly required: false;
173
+ readonly validator: ((val: unknown) => boolean) | undefined;
174
+ __epPropKey: true;
175
+ };
170
176
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
171
177
  [key: string]: any;
172
178
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -186,6 +192,12 @@ export declare const ElDialog: import("element-plus/es/utils").SFCWithInstall<im
186
192
  readonly validator: ((val: unknown) => boolean) | undefined;
187
193
  __epPropKey: true;
188
194
  };
195
+ readonly isGlobal: {
196
+ readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
197
+ readonly required: false;
198
+ readonly validator: ((val: unknown) => boolean) | undefined;
199
+ __epPropKey: true;
200
+ };
189
201
  }>> & {
190
202
  onClick?: ((evt: MouseEvent) => any) | undefined;
191
203
  }, {
@@ -167,6 +167,12 @@ declare const _default: import("vue").DefineComponent<{
167
167
  readonly validator: ((val: unknown) => boolean) | undefined;
168
168
  __epPropKey: true;
169
169
  };
170
+ readonly isGlobal: {
171
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
172
+ readonly required: false;
173
+ readonly validator: ((val: unknown) => boolean) | undefined;
174
+ __epPropKey: true;
175
+ };
170
176
  }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
171
177
  [key: string]: any;
172
178
  }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -186,6 +192,12 @@ declare const _default: import("vue").DefineComponent<{
186
192
  readonly validator: ((val: unknown) => boolean) | undefined;
187
193
  __epPropKey: true;
188
194
  };
195
+ readonly isGlobal: {
196
+ readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<BooleanConstructor, unknown, unknown>>;
197
+ readonly required: false;
198
+ readonly validator: ((val: unknown) => boolean) | undefined;
199
+ __epPropKey: true;
200
+ };
189
201
  }>> & {
190
202
  onClick?: ((evt: MouseEvent) => any) | undefined;
191
203
  }, {
@@ -371,6 +371,7 @@ exports.messageConfig = configProvider.messageConfig;
371
371
  exports.configProviderProps = configProviderProps.configProviderProps;
372
372
  exports.configProviderContextKey = constants$5.configProviderContextKey;
373
373
  exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
374
+ exports.useGlobalComponentSettings = useGlobalConfig.useGlobalComponentSettings;
374
375
  exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
375
376
  exports.countdownEmits = countdown.countdownEmits;
376
377
  exports.countdownProps = countdown.countdownProps;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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