hzzt-plus 0.0.1

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 (386) hide show
  1. package/README.md +45 -0
  2. package/dist/index.css +1 -0
  3. package/dist/index.full.js +6928 -0
  4. package/dist/index.full.min.js +29 -0
  5. package/dist/index.full.min.js.map +1 -0
  6. package/dist/index.full.min.mjs +29 -0
  7. package/dist/index.full.min.mjs.map +1 -0
  8. package/dist/index.full.mjs +6916 -0
  9. package/dist/locale/en.js +16 -0
  10. package/dist/locale/en.min.js +2 -0
  11. package/dist/locale/en.min.js.map +1 -0
  12. package/dist/locale/en.min.mjs +2 -0
  13. package/dist/locale/en.min.mjs.map +1 -0
  14. package/dist/locale/en.mjs +8 -0
  15. package/dist/locale/zh-cn.js +16 -0
  16. package/dist/locale/zh-cn.min.js +2 -0
  17. package/dist/locale/zh-cn.min.js.map +1 -0
  18. package/dist/locale/zh-cn.min.mjs +2 -0
  19. package/dist/locale/zh-cn.min.mjs.map +1 -0
  20. package/dist/locale/zh-cn.mjs +8 -0
  21. package/es/_virtual/plugin-vue_export-helper.mjs +10 -0
  22. package/es/_virtual/plugin-vue_export-helper.mjs.map +1 -0
  23. package/es/component.d.ts +3 -0
  24. package/es/component.mjs +8 -0
  25. package/es/component.mjs.map +1 -0
  26. package/es/components/base/style/css.d.ts +1 -0
  27. package/es/components/base/style/index.d.ts +1 -0
  28. package/es/components/index.d.ts +1 -0
  29. package/es/components/title/index.d.ts +30 -0
  30. package/es/components/title/src/index.vue.d.ts +30 -0
  31. package/es/components/title/style/css.d.ts +2 -0
  32. package/es/components/title/style/index.d.ts +2 -0
  33. package/es/constants/aria.d.ts +17 -0
  34. package/es/constants/date.d.ts +3 -0
  35. package/es/constants/event.d.ts +3 -0
  36. package/es/constants/index.d.ts +3 -0
  37. package/es/constants/key.d.ts +1 -0
  38. package/es/constants/size.d.ts +7 -0
  39. package/es/defaults.d.ts +5 -0
  40. package/es/defaults.mjs +8 -0
  41. package/es/defaults.mjs.map +1 -0
  42. package/es/index.d.ts +6 -0
  43. package/es/index.mjs +11 -0
  44. package/es/index.mjs.map +1 -0
  45. package/es/locale/index.d.ts +9 -0
  46. package/es/locale/lang/en.d.ts +5 -0
  47. package/es/locale/lang/zh-cn.d.ts +5 -0
  48. package/es/make-installer.d.ts +5 -0
  49. package/es/make-installer.mjs +19 -0
  50. package/es/make-installer.mjs.map +1 -0
  51. package/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.2.37/node_modules/@element-plus/icons-vue/dist/index.mjs +5764 -0
  52. package/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.2.37/node_modules/@element-plus/icons-vue/dist/index.mjs.map +1 -0
  53. package/es/packages/components/base/style/css.mjs +2 -0
  54. package/es/packages/components/base/style/css.mjs.map +1 -0
  55. package/es/packages/components/base/style/index.mjs +2 -0
  56. package/es/packages/components/base/style/index.mjs.map +1 -0
  57. package/es/packages/components/index.mjs +2 -0
  58. package/es/packages/components/index.mjs.map +1 -0
  59. package/es/packages/components/title/index.mjs +8 -0
  60. package/es/packages/components/title/index.mjs.map +1 -0
  61. package/es/packages/components/title/src/index.mjs +48 -0
  62. package/es/packages/components/title/src/index.mjs.map +1 -0
  63. package/es/packages/components/title/style/css.mjs +3 -0
  64. package/es/packages/components/title/style/css.mjs.map +1 -0
  65. package/es/packages/components/title/style/index.mjs +3 -0
  66. package/es/packages/components/title/style/index.mjs.map +1 -0
  67. package/es/packages/constants/aria.mjs +20 -0
  68. package/es/packages/constants/aria.mjs.map +1 -0
  69. package/es/packages/constants/date.mjs +25 -0
  70. package/es/packages/constants/date.mjs.map +1 -0
  71. package/es/packages/constants/event.mjs +6 -0
  72. package/es/packages/constants/event.mjs.map +1 -0
  73. package/es/packages/constants/index.mjs +4 -0
  74. package/es/packages/constants/index.mjs.map +1 -0
  75. package/es/packages/constants/key.mjs +4 -0
  76. package/es/packages/constants/key.mjs.map +1 -0
  77. package/es/packages/constants/size.mjs +9 -0
  78. package/es/packages/constants/size.mjs.map +1 -0
  79. package/es/packages/locale/index.mjs +3 -0
  80. package/es/packages/locale/index.mjs.map +1 -0
  81. package/es/packages/locale/lang/en.mjs +7 -0
  82. package/es/packages/locale/lang/en.mjs.map +1 -0
  83. package/es/packages/locale/lang/zh-cn.mjs +7 -0
  84. package/es/packages/locale/lang/zh-cn.mjs.map +1 -0
  85. package/es/packages/utils/arrays.mjs +11 -0
  86. package/es/packages/utils/arrays.mjs.map +1 -0
  87. package/es/packages/utils/browser.mjs +7 -0
  88. package/es/packages/utils/browser.mjs.map +1 -0
  89. package/es/packages/utils/dom/aria.mjs +74 -0
  90. package/es/packages/utils/dom/aria.mjs.map +1 -0
  91. package/es/packages/utils/dom/element.mjs +20 -0
  92. package/es/packages/utils/dom/element.mjs.map +1 -0
  93. package/es/packages/utils/dom/event.mjs +15 -0
  94. package/es/packages/utils/dom/event.mjs.map +1 -0
  95. package/es/packages/utils/dom/index.mjs +7 -0
  96. package/es/packages/utils/dom/index.mjs.map +1 -0
  97. package/es/packages/utils/dom/position.mjs +53 -0
  98. package/es/packages/utils/dom/position.mjs.map +1 -0
  99. package/es/packages/utils/dom/scroll.mjs +116 -0
  100. package/es/packages/utils/dom/scroll.mjs.map +1 -0
  101. package/es/packages/utils/dom/style.mjs +76 -0
  102. package/es/packages/utils/dom/style.mjs.map +1 -0
  103. package/es/packages/utils/easings.mjs +11 -0
  104. package/es/packages/utils/easings.mjs.map +1 -0
  105. package/es/packages/utils/error.mjs +21 -0
  106. package/es/packages/utils/error.mjs.map +1 -0
  107. package/es/packages/utils/functions.mjs +2 -0
  108. package/es/packages/utils/functions.mjs.map +1 -0
  109. package/es/packages/utils/i18n.mjs +4 -0
  110. package/es/packages/utils/i18n.mjs.map +1 -0
  111. package/es/packages/utils/index.mjs +34 -0
  112. package/es/packages/utils/index.mjs.map +1 -0
  113. package/es/packages/utils/objects.mjs +18 -0
  114. package/es/packages/utils/objects.mjs.map +1 -0
  115. package/es/packages/utils/raf.mjs +8 -0
  116. package/es/packages/utils/raf.mjs.map +1 -0
  117. package/es/packages/utils/rand.mjs +5 -0
  118. package/es/packages/utils/rand.mjs.map +1 -0
  119. package/es/packages/utils/strings.mjs +8 -0
  120. package/es/packages/utils/strings.mjs.map +1 -0
  121. package/es/packages/utils/throttleByRaf.mjs +22 -0
  122. package/es/packages/utils/throttleByRaf.mjs.map +1 -0
  123. package/es/packages/utils/types.mjs +29 -0
  124. package/es/packages/utils/types.mjs.map +1 -0
  125. package/es/packages/utils/typescript.mjs +4 -0
  126. package/es/packages/utils/typescript.mjs.map +1 -0
  127. package/es/packages/utils/vue/global-node.mjs +33 -0
  128. package/es/packages/utils/vue/global-node.mjs.map +1 -0
  129. package/es/packages/utils/vue/icon.mjs +33 -0
  130. package/es/packages/utils/vue/icon.mjs.map +1 -0
  131. package/es/packages/utils/vue/index.mjs +11 -0
  132. package/es/packages/utils/vue/index.mjs.map +1 -0
  133. package/es/packages/utils/vue/install.mjs +41 -0
  134. package/es/packages/utils/vue/install.mjs.map +1 -0
  135. package/es/packages/utils/vue/props/index.mjs +4 -0
  136. package/es/packages/utils/vue/props/index.mjs.map +1 -0
  137. package/es/packages/utils/vue/props/runtime.mjs +48 -0
  138. package/es/packages/utils/vue/props/runtime.mjs.map +1 -0
  139. package/es/packages/utils/vue/props/types.mjs +2 -0
  140. package/es/packages/utils/vue/props/types.mjs.map +1 -0
  141. package/es/packages/utils/vue/props/util.mjs +2 -0
  142. package/es/packages/utils/vue/props/util.mjs.map +1 -0
  143. package/es/packages/utils/vue/refs.mjs +17 -0
  144. package/es/packages/utils/vue/refs.mjs.map +1 -0
  145. package/es/packages/utils/vue/size.mjs +9 -0
  146. package/es/packages/utils/vue/size.mjs.map +1 -0
  147. package/es/packages/utils/vue/typescript.mjs +2 -0
  148. package/es/packages/utils/vue/typescript.mjs.map +1 -0
  149. package/es/packages/utils/vue/validator.mjs +9 -0
  150. package/es/packages/utils/vue/validator.mjs.map +1 -0
  151. package/es/packages/utils/vue/vnode.mjs +104 -0
  152. package/es/packages/utils/vue/vnode.mjs.map +1 -0
  153. package/es/plugin.d.ts +3 -0
  154. package/es/plugin.mjs +4 -0
  155. package/es/plugin.mjs.map +1 -0
  156. package/es/utils/arrays.d.ts +5 -0
  157. package/es/utils/browser.d.ts +3 -0
  158. package/es/utils/dom/aria.d.ts +30 -0
  159. package/es/utils/dom/element.d.ts +3 -0
  160. package/es/utils/dom/event.d.ts +6 -0
  161. package/es/utils/dom/index.d.ts +6 -0
  162. package/es/utils/dom/position.d.ts +7 -0
  163. package/es/utils/dom/scroll.d.ts +11 -0
  164. package/es/utils/dom/style.d.ts +9 -0
  165. package/es/utils/easings.d.ts +1 -0
  166. package/es/utils/error.d.ts +3 -0
  167. package/es/utils/functions.d.ts +1 -0
  168. package/es/utils/i18n.d.ts +1 -0
  169. package/es/utils/index.d.ts +15 -0
  170. package/es/utils/objects.d.ts +8 -0
  171. package/es/utils/raf.d.ts +2 -0
  172. package/es/utils/rand.d.ts +12 -0
  173. package/es/utils/strings.d.ts +6 -0
  174. package/es/utils/throttleByRaf.d.ts +4 -0
  175. package/es/utils/types.d.ts +10 -0
  176. package/es/utils/typescript.d.ts +12 -0
  177. package/es/utils/vue/global-node.d.ts +3 -0
  178. package/es/utils/vue/icon.d.ts +23 -0
  179. package/es/utils/vue/index.d.ts +9 -0
  180. package/es/utils/vue/install.d.ts +6 -0
  181. package/es/utils/vue/props/index.d.ts +3 -0
  182. package/es/utils/vue/props/runtime.d.ts +29 -0
  183. package/es/utils/vue/props/types.d.ts +120 -0
  184. package/es/utils/vue/props/util.d.ts +8 -0
  185. package/es/utils/vue/refs.d.ts +3 -0
  186. package/es/utils/vue/size.d.ts +1 -0
  187. package/es/utils/vue/typescript.d.ts +5 -0
  188. package/es/utils/vue/validator.d.ts +2 -0
  189. package/es/utils/vue/vnode.d.ts +51 -0
  190. package/es/version.d.ts +1 -0
  191. package/es/version.mjs +4 -0
  192. package/es/version.mjs.map +1 -0
  193. package/global.d.ts +8 -0
  194. package/lib/_virtual/plugin-vue_export-helper.js +14 -0
  195. package/lib/_virtual/plugin-vue_export-helper.js.map +1 -0
  196. package/lib/component.d.ts +3 -0
  197. package/lib/component.js +12 -0
  198. package/lib/component.js.map +1 -0
  199. package/lib/components/base/style/css.d.ts +1 -0
  200. package/lib/components/base/style/index.d.ts +1 -0
  201. package/lib/components/index.d.ts +1 -0
  202. package/lib/components/title/index.d.ts +30 -0
  203. package/lib/components/title/src/index.vue.d.ts +30 -0
  204. package/lib/components/title/style/css.d.ts +2 -0
  205. package/lib/components/title/style/index.d.ts +2 -0
  206. package/lib/constants/aria.d.ts +17 -0
  207. package/lib/constants/date.d.ts +3 -0
  208. package/lib/constants/event.d.ts +3 -0
  209. package/lib/constants/index.d.ts +3 -0
  210. package/lib/constants/key.d.ts +1 -0
  211. package/lib/constants/size.d.ts +7 -0
  212. package/lib/defaults.d.ts +5 -0
  213. package/lib/defaults.js +12 -0
  214. package/lib/defaults.js.map +1 -0
  215. package/lib/index.d.ts +6 -0
  216. package/lib/index.js +18 -0
  217. package/lib/index.js.map +1 -0
  218. package/lib/locale/index.d.ts +9 -0
  219. package/lib/locale/lang/en.d.ts +5 -0
  220. package/lib/locale/lang/zh-cn.d.ts +5 -0
  221. package/lib/make-installer.d.ts +5 -0
  222. package/lib/make-installer.js +23 -0
  223. package/lib/make-installer.js.map +1 -0
  224. package/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.2.37/node_modules/@element-plus/icons-vue/dist/index.js +6060 -0
  225. package/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.2.37/node_modules/@element-plus/icons-vue/dist/index.js.map +1 -0
  226. package/lib/packages/components/base/style/css.js +5 -0
  227. package/lib/packages/components/base/style/css.js.map +1 -0
  228. package/lib/packages/components/base/style/index.js +5 -0
  229. package/lib/packages/components/base/style/index.js.map +1 -0
  230. package/lib/packages/components/index.js +10 -0
  231. package/lib/packages/components/index.js.map +1 -0
  232. package/lib/packages/components/title/index.js +13 -0
  233. package/lib/packages/components/title/index.js.map +1 -0
  234. package/lib/packages/components/title/src/index.js +52 -0
  235. package/lib/packages/components/title/src/index.js.map +1 -0
  236. package/lib/packages/components/title/style/css.js +6 -0
  237. package/lib/packages/components/title/style/css.js.map +1 -0
  238. package/lib/packages/components/title/style/index.js +6 -0
  239. package/lib/packages/components/title/style/index.js.map +1 -0
  240. package/lib/packages/constants/aria.js +24 -0
  241. package/lib/packages/constants/aria.js.map +1 -0
  242. package/lib/packages/constants/date.js +30 -0
  243. package/lib/packages/constants/date.js.map +1 -0
  244. package/lib/packages/constants/event.js +12 -0
  245. package/lib/packages/constants/event.js.map +1 -0
  246. package/lib/packages/constants/index.js +16 -0
  247. package/lib/packages/constants/index.js.map +1 -0
  248. package/lib/packages/constants/key.js +8 -0
  249. package/lib/packages/constants/key.js.map +1 -0
  250. package/lib/packages/constants/size.js +14 -0
  251. package/lib/packages/constants/size.js.map +1 -0
  252. package/lib/packages/locale/index.js +12 -0
  253. package/lib/packages/locale/index.js.map +1 -0
  254. package/lib/packages/locale/lang/en.js +11 -0
  255. package/lib/packages/locale/lang/en.js.map +1 -0
  256. package/lib/packages/locale/lang/zh-cn.js +11 -0
  257. package/lib/packages/locale/lang/zh-cn.js.map +1 -0
  258. package/lib/packages/utils/arrays.js +20 -0
  259. package/lib/packages/utils/arrays.js.map +1 -0
  260. package/lib/packages/utils/browser.js +18 -0
  261. package/lib/packages/utils/browser.js.map +1 -0
  262. package/lib/packages/utils/dom/aria.js +85 -0
  263. package/lib/packages/utils/dom/aria.js.map +1 -0
  264. package/lib/packages/utils/dom/element.js +24 -0
  265. package/lib/packages/utils/dom/element.js.map +1 -0
  266. package/lib/packages/utils/dom/event.js +20 -0
  267. package/lib/packages/utils/dom/event.js.map +1 -0
  268. package/lib/packages/utils/dom/index.js +44 -0
  269. package/lib/packages/utils/dom/index.js.map +1 -0
  270. package/lib/packages/utils/dom/position.js +60 -0
  271. package/lib/packages/utils/dom/position.js.map +1 -0
  272. package/lib/packages/utils/dom/scroll.js +126 -0
  273. package/lib/packages/utils/dom/scroll.js.map +1 -0
  274. package/lib/packages/utils/dom/style.js +87 -0
  275. package/lib/packages/utils/dom/style.js.map +1 -0
  276. package/lib/packages/utils/easings.js +15 -0
  277. package/lib/packages/utils/easings.js.map +1 -0
  278. package/lib/packages/utils/error.js +26 -0
  279. package/lib/packages/utils/error.js.map +1 -0
  280. package/lib/packages/utils/functions.js +13 -0
  281. package/lib/packages/utils/functions.js.map +1 -0
  282. package/lib/packages/utils/i18n.js +8 -0
  283. package/lib/packages/utils/i18n.js.map +1 -0
  284. package/lib/packages/utils/index.js +194 -0
  285. package/lib/packages/utils/index.js.map +1 -0
  286. package/lib/packages/utils/objects.js +28 -0
  287. package/lib/packages/utils/objects.js.map +1 -0
  288. package/lib/packages/utils/raf.js +13 -0
  289. package/lib/packages/utils/raf.js.map +1 -0
  290. package/lib/packages/utils/rand.js +10 -0
  291. package/lib/packages/utils/rand.js.map +1 -0
  292. package/lib/packages/utils/strings.js +24 -0
  293. package/lib/packages/utils/strings.js.map +1 -0
  294. package/lib/packages/utils/throttleByRaf.js +26 -0
  295. package/lib/packages/utils/throttleByRaf.js.map +1 -0
  296. package/lib/packages/utils/types.js +71 -0
  297. package/lib/packages/utils/types.js.map +1 -0
  298. package/lib/packages/utils/typescript.js +8 -0
  299. package/lib/packages/utils/typescript.js.map +1 -0
  300. package/lib/packages/utils/vue/global-node.js +39 -0
  301. package/lib/packages/utils/vue/global-node.js.map +1 -0
  302. package/lib/packages/utils/vue/icon.js +41 -0
  303. package/lib/packages/utils/vue/icon.js.map +1 -0
  304. package/lib/packages/utils/vue/index.js +51 -0
  305. package/lib/packages/utils/vue/index.js.map +1 -0
  306. package/lib/packages/utils/vue/install.js +48 -0
  307. package/lib/packages/utils/vue/install.js.map +1 -0
  308. package/lib/packages/utils/vue/props/index.js +16 -0
  309. package/lib/packages/utils/vue/props/index.js.map +1 -0
  310. package/lib/packages/utils/vue/props/runtime.js +56 -0
  311. package/lib/packages/utils/vue/props/runtime.js.map +1 -0
  312. package/lib/packages/utils/vue/props/types.js +3 -0
  313. package/lib/packages/utils/vue/props/types.js.map +1 -0
  314. package/lib/packages/utils/vue/props/util.js +3 -0
  315. package/lib/packages/utils/vue/props/util.js.map +1 -0
  316. package/lib/packages/utils/vue/refs.js +21 -0
  317. package/lib/packages/utils/vue/refs.js.map +1 -0
  318. package/lib/packages/utils/vue/size.js +13 -0
  319. package/lib/packages/utils/vue/size.js.map +1 -0
  320. package/lib/packages/utils/vue/typescript.js +3 -0
  321. package/lib/packages/utils/vue/typescript.js.map +1 -0
  322. package/lib/packages/utils/vue/validator.js +14 -0
  323. package/lib/packages/utils/vue/validator.js.map +1 -0
  324. package/lib/packages/utils/vue/vnode.js +119 -0
  325. package/lib/packages/utils/vue/vnode.js.map +1 -0
  326. package/lib/plugin.d.ts +3 -0
  327. package/lib/plugin.js +8 -0
  328. package/lib/plugin.js.map +1 -0
  329. package/lib/utils/arrays.d.ts +5 -0
  330. package/lib/utils/browser.d.ts +3 -0
  331. package/lib/utils/dom/aria.d.ts +30 -0
  332. package/lib/utils/dom/element.d.ts +3 -0
  333. package/lib/utils/dom/event.d.ts +6 -0
  334. package/lib/utils/dom/index.d.ts +6 -0
  335. package/lib/utils/dom/position.d.ts +7 -0
  336. package/lib/utils/dom/scroll.d.ts +11 -0
  337. package/lib/utils/dom/style.d.ts +9 -0
  338. package/lib/utils/easings.d.ts +1 -0
  339. package/lib/utils/error.d.ts +3 -0
  340. package/lib/utils/functions.d.ts +1 -0
  341. package/lib/utils/i18n.d.ts +1 -0
  342. package/lib/utils/index.d.ts +15 -0
  343. package/lib/utils/objects.d.ts +8 -0
  344. package/lib/utils/raf.d.ts +2 -0
  345. package/lib/utils/rand.d.ts +12 -0
  346. package/lib/utils/strings.d.ts +6 -0
  347. package/lib/utils/throttleByRaf.d.ts +4 -0
  348. package/lib/utils/types.d.ts +10 -0
  349. package/lib/utils/typescript.d.ts +12 -0
  350. package/lib/utils/vue/global-node.d.ts +3 -0
  351. package/lib/utils/vue/icon.d.ts +23 -0
  352. package/lib/utils/vue/index.d.ts +9 -0
  353. package/lib/utils/vue/install.d.ts +6 -0
  354. package/lib/utils/vue/props/index.d.ts +3 -0
  355. package/lib/utils/vue/props/runtime.d.ts +29 -0
  356. package/lib/utils/vue/props/types.d.ts +120 -0
  357. package/lib/utils/vue/props/util.d.ts +8 -0
  358. package/lib/utils/vue/refs.d.ts +3 -0
  359. package/lib/utils/vue/size.d.ts +1 -0
  360. package/lib/utils/vue/typescript.d.ts +5 -0
  361. package/lib/utils/vue/validator.d.ts +2 -0
  362. package/lib/utils/vue/vnode.d.ts +51 -0
  363. package/lib/version.d.ts +1 -0
  364. package/lib/version.js +8 -0
  365. package/lib/version.js.map +1 -0
  366. package/package.json +106 -0
  367. package/theme/base.css +1 -0
  368. package/theme/hzzt-title.css +1 -0
  369. package/theme/hzzt-var.css +1 -0
  370. package/theme/index.css +1 -0
  371. package/theme/src/base.scss +5 -0
  372. package/theme/src/common/box.scss +93 -0
  373. package/theme/src/common/flex.scss +119 -0
  374. package/theme/src/common/font.scss +39 -0
  375. package/theme/src/common/position.scss +41 -0
  376. package/theme/src/common/var.scss +1540 -0
  377. package/theme/src/index.scss +3 -0
  378. package/theme/src/mixins/_button.scss +165 -0
  379. package/theme/src/mixins/_col.scss +33 -0
  380. package/theme/src/mixins/_var.scss +66 -0
  381. package/theme/src/mixins/config.scss +5 -0
  382. package/theme/src/mixins/function.scss +86 -0
  383. package/theme/src/mixins/mixins.scss +235 -0
  384. package/theme/src/mixins/utils.scss +39 -0
  385. package/theme/src/title.scss +22 -0
  386. package/theme/src/var.scss +87 -0
@@ -0,0 +1,76 @@
1
+ import { isNumber, isStringNumber } from '../types.mjs';
2
+ import '../browser.mjs';
3
+ import '../strings.mjs';
4
+ import { entriesOf, keysOf } from '../objects.mjs';
5
+ import { debugWarn } from '../error.mjs';
6
+ import { isClient } from '@vueuse/core';
7
+ import { camelize, isObject, isString } from '@vue/shared';
8
+
9
+ const SCOPE = "utils/dom/style";
10
+ const classNameToArray = (cls = "") => cls.split(" ").filter((item) => !!item.trim());
11
+ const hasClass = (el, cls) => {
12
+ if (!el || !cls)
13
+ return false;
14
+ if (cls.includes(" "))
15
+ throw new Error("className should not contain space.");
16
+ return el.classList.contains(cls);
17
+ };
18
+ const addClass = (el, cls) => {
19
+ if (!el || !cls.trim())
20
+ return;
21
+ el.classList.add(...classNameToArray(cls));
22
+ };
23
+ const removeClass = (el, cls) => {
24
+ if (!el || !cls.trim())
25
+ return;
26
+ el.classList.remove(...classNameToArray(cls));
27
+ };
28
+ const getStyle = (element, styleName) => {
29
+ var _a;
30
+ if (!isClient || !element || !styleName)
31
+ return "";
32
+ let key = camelize(styleName);
33
+ if (key === "float")
34
+ key = "cssFloat";
35
+ try {
36
+ const style = element.style[key];
37
+ if (style)
38
+ return style;
39
+ const computed = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(element, "");
40
+ return computed ? computed[key] : "";
41
+ } catch (e) {
42
+ return element.style[key];
43
+ }
44
+ };
45
+ const setStyle = (element, styleName, value) => {
46
+ if (!element || !styleName)
47
+ return;
48
+ if (isObject(styleName)) {
49
+ entriesOf(styleName).forEach(([prop, value2]) => setStyle(element, prop, value2));
50
+ } else {
51
+ const key = camelize(styleName);
52
+ element.style[key] = value;
53
+ }
54
+ };
55
+ const removeStyle = (element, style) => {
56
+ if (!element || !style)
57
+ return;
58
+ if (isObject(style)) {
59
+ keysOf(style).forEach((prop) => removeStyle(element, prop));
60
+ } else {
61
+ setStyle(element, style, "");
62
+ }
63
+ };
64
+ function addUnit(value, defaultUnit = "px") {
65
+ if (!value)
66
+ return "";
67
+ if (isNumber(value) || isStringNumber(value)) {
68
+ return `${value}${defaultUnit}`;
69
+ } else if (isString(value)) {
70
+ return value;
71
+ }
72
+ debugWarn(SCOPE, "binding value must be a string or number");
73
+ }
74
+
75
+ export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle };
76
+ //# sourceMappingURL=style.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.mjs","sources":["../../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isNumber, isObject, isString, isStringNumber } from '../types'\nimport { isClient } from '../browser'\nimport { camelize } from '../strings'\nimport { entriesOf, keysOf } from '../objects'\nimport { debugWarn } from '../error'\nimport type { CSSProperties } from 'vue'\n\nconst SCOPE = 'utils/dom/style'\n\nexport const classNameToArray = (cls = '') =>\n cls.split(' ').filter((item) => !!item.trim())\n\nexport const hasClass = (el: Element, cls: string): boolean => {\n if (!el || !cls) return false\n if (cls.includes(' ')) throw new Error('className should not contain space.')\n return el.classList.contains(cls)\n}\n\nexport const addClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.add(...classNameToArray(cls))\n}\n\nexport const removeClass = (el: Element, cls: string) => {\n if (!el || !cls.trim()) return\n el.classList.remove(...classNameToArray(cls))\n}\n\nexport const getStyle = (\n element: HTMLElement,\n styleName: keyof CSSProperties\n): string => {\n if (!isClient || !element || !styleName) return ''\n\n let key = camelize(styleName)\n if (key === 'float') key = 'cssFloat'\n try {\n const style = (element.style as any)[key]\n if (style) return style\n const computed: any = document.defaultView?.getComputedStyle(element, '')\n return computed ? computed[key] : ''\n } catch {\n return (element.style as any)[key]\n }\n}\n\nexport const setStyle = (\n element: HTMLElement,\n styleName: CSSProperties | keyof CSSProperties,\n value?: string | number\n) => {\n if (!element || !styleName) return\n\n if (isObject(styleName)) {\n entriesOf(styleName).forEach(([prop, value]) =>\n setStyle(element, prop, value)\n )\n } else {\n const key: any = camelize(styleName)\n element.style[key] = value as any\n }\n}\n\nexport const removeStyle = (\n element: HTMLElement,\n style: CSSProperties | keyof CSSProperties\n) => {\n if (!element || !style) return\n\n if (isObject(style)) {\n keysOf(style).forEach((prop) => removeStyle(element, prop))\n } else {\n setStyle(element, style, '')\n }\n}\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value) return ''\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`\n } else if (isString(value)) {\n return value\n }\n debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ function easeInOutCubic(t, b, c, d) {
2
+ const cc = c - b;
3
+ t /= d / 2;
4
+ if (t < 1) {
5
+ return cc / 2 * t * t * t + b;
6
+ }
7
+ return cc / 2 * ((t -= 2) * t * t + 2) + b;
8
+ }
9
+
10
+ export { easeInOutCubic };
11
+ //# sourceMappingURL=easings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"easings.mjs","sources":["../../../../../packages/utils/easings.ts"],"sourcesContent":["export function easeInOutCubic(t: number, b: number, c: number, d: number) {\n const cc = c - b\n t /= d / 2\n if (t < 1) {\n return (cc / 2) * t * t * t + b\n }\n return (cc / 2) * ((t -= 2) * t * t + 2) + b\n}\n"],"names":[],"mappings":"AAAO,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAC3C,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AACnB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE;AACb,IAAI,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAC7C;;;;"}
@@ -0,0 +1,21 @@
1
+ import './types.mjs';
2
+ import { isString } from '@vue/shared';
3
+
4
+ class ElementPlusError extends Error {
5
+ constructor(m) {
6
+ super(m);
7
+ this.name = "ElementPlusError";
8
+ }
9
+ }
10
+ function throwError(scope, m) {
11
+ throw new ElementPlusError(`[${scope}] ${m}`);
12
+ }
13
+ function debugWarn(scope, message) {
14
+ if (process.env.NODE_ENV !== "production") {
15
+ const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
16
+ console.warn(error);
17
+ }
18
+ }
19
+
20
+ export { debugWarn, throwError };
21
+ //# sourceMappingURL=error.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.mjs","sources":["../../../../../packages/utils/error.ts"],"sourcesContent":["import { isString } from './types'\n\nclass ElementPlusError extends Error {\n constructor(m: string) {\n super(m)\n this.name = 'ElementPlusError'\n }\n}\n\nexport function throwError(scope: string, m: string): never {\n throw new ElementPlusError(`[${scope}] ${m}`)\n}\n\nexport function debugWarn(err: Error): void\nexport function debugWarn(scope: string, message: string): void\nexport function debugWarn(scope: string | Error, message?: string): void {\n if (process.env.NODE_ENV !== 'production') {\n const error: Error = isString(scope)\n ? new ElementPlusError(`[${scope}] ${message}`)\n : scope\n // eslint-disable-next-line no-console\n console.warn(error)\n }\n}\n"],"names":[],"mappings":";;;AACA,MAAM,gBAAgB,SAAS,KAAK,CAAC;AACrC,EAAE,WAAW,CAAC,CAAC,EAAE;AACjB,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;AACb,IAAI,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;AACnC,GAAG;AACH,CAAC;AACM,SAAS,UAAU,CAAC,KAAK,EAAE,CAAC,EAAE;AACrC,EAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAChD,CAAC;AACM,SAAS,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1C,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AAC7C,IAAI,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;AAC1F,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxB,GAAG;AACH;;;;"}
@@ -0,0 +1,2 @@
1
+ export { NOOP } from '@vue/shared';
2
+ //# sourceMappingURL=functions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ const isKorean = (text) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(text);
2
+
3
+ export { isKorean };
4
+ //# sourceMappingURL=i18n.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.mjs","sources":["../../../../../packages/utils/i18n.ts"],"sourcesContent":["export const isKorean = (text: string) =>\n /([\\uAC00-\\uD7AF\\u3130-\\u318F])+/gi.test(text)\n"],"names":[],"mappings":"AAAY,MAAC,QAAQ,GAAG,CAAC,IAAI,KAAK,mCAAmC,CAAC,IAAI,CAAC,IAAI;;;;"}
@@ -0,0 +1,34 @@
1
+ import './dom/index.mjs';
2
+ import './vue/index.mjs';
3
+ export { castArray, unique } from './arrays.mjs';
4
+ export { isFirefox } from './browser.mjs';
5
+ export { debugWarn, throwError } from './error.mjs';
6
+ import './functions.mjs';
7
+ export { isKorean } from './i18n.mjs';
8
+ export { entriesOf, getProp, keysOf } from './objects.mjs';
9
+ export { cAF, rAF } from './raf.mjs';
10
+ export { generateId, getRandomInt } from './rand.mjs';
11
+ export { capitalize, escapeStringRegexp } from './strings.mjs';
12
+ export { isBoolean, isElement, isEmpty, isNumber, isPropAbsent, isStringNumber, isUndefined, isWindow } from './types.mjs';
13
+ export { mutable } from './typescript.mjs';
14
+ export { throttleByRaf } from './throttleByRaf.mjs';
15
+ export { easeInOutCubic } from './easings.mjs';
16
+ export { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent } from './dom/aria.mjs';
17
+ export { composeEventHandlers, whenMouse } from './dom/event.mjs';
18
+ export { getClientXY, getOffsetTop, getOffsetTopDistance, isInContainer } from './dom/position.mjs';
19
+ export { animateScrollTo, getScrollBarWidth, getScrollContainer, getScrollElement, getScrollTop, isScroll, scrollIntoView } from './dom/scroll.mjs';
20
+ export { addClass, addUnit, classNameToArray, getStyle, hasClass, removeClass, removeStyle, setStyle } from './dom/style.mjs';
21
+ export { getElement } from './dom/element.mjs';
22
+ export { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from './vue/global-node.mjs';
23
+ export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from './vue/icon.mjs';
24
+ export { withInstall, withInstallDirective, withInstallFunction, withNoopInstall } from './vue/install.mjs';
25
+ export { buildProp, buildProps, definePropType, epPropKey, isEpProp } from './vue/props/runtime.mjs';
26
+ export { composeRefs } from './vue/refs.mjs';
27
+ export { getComponentSize } from './vue/size.mjs';
28
+ export { isValidComponentSize, isValidDatePickType } from './vue/validator.mjs';
29
+ export { PatchFlags, ensureOnlyChild, flattedChildren, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vue/vnode.mjs';
30
+ export { castArray as ensureArray } from 'lodash-unified';
31
+ export { isClient, isIOS } from '@vueuse/core';
32
+ export { NOOP, camelize, hasOwn, hyphenate, isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol, hyphenate as kebabCase } from '@vue/shared';
33
+ export { isVNode } from 'vue';
34
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,18 @@
1
+ import { get, set } from 'lodash-unified';
2
+ export { hasOwn } from '@vue/shared';
3
+
4
+ const keysOf = (arr) => Object.keys(arr);
5
+ const entriesOf = (arr) => Object.entries(arr);
6
+ const getProp = (obj, path, defaultValue) => {
7
+ return {
8
+ get value() {
9
+ return get(obj, path, defaultValue);
10
+ },
11
+ set value(val) {
12
+ set(obj, path, val);
13
+ }
14
+ };
15
+ };
16
+
17
+ export { entriesOf, getProp, keysOf };
18
+ //# sourceMappingURL=objects.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.mjs","sources":["../../../../../packages/utils/objects.ts"],"sourcesContent":["import { get, set } from 'lodash-unified'\nimport type { Entries } from 'type-fest'\nimport type { Arrayable } from '.'\n\nexport const keysOf = <T>(arr: T) => Object.keys(arr) as Array<keyof T>\nexport const entriesOf = <T>(arr: T) => Object.entries(arr) as Entries<T>\nexport { hasOwn } from '@vue/shared'\n\nexport const getProp = <T = any>(\n obj: Record<string, any>,\n path: Arrayable<string>,\n defaultValue?: any\n): { value: T } => {\n return {\n get value() {\n return get(obj, path, defaultValue)\n },\n set value(val: any) {\n set(obj, path, val)\n },\n }\n}\n"],"names":[],"mappings":";;;AACY,MAAC,MAAM,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;AACpC,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;AAE1C,MAAC,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,KAAK;AACpD,EAAE,OAAO;AACT,IAAI,IAAI,KAAK,GAAG;AAChB,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;AAC1C,KAAK;AACL,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE;AACnB,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;AAC1B,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,8 @@
1
+ import './browser.mjs';
2
+ import { isClient } from '@vueuse/core';
3
+
4
+ const rAF = (fn) => isClient ? window.requestAnimationFrame(fn) : setTimeout(fn, 16);
5
+ const cAF = (handle) => isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle);
6
+
7
+ export { cAF, rAF };
8
+ //# sourceMappingURL=raf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raf.mjs","sources":["../../../../../packages/utils/raf.ts"],"sourcesContent":["import { isClient } from './browser'\n\nexport const rAF = (fn: () => void) =>\n isClient\n ? window.requestAnimationFrame(fn)\n : (setTimeout(fn, 16) as unknown as number)\n\nexport const cAF = (handle: number) =>\n isClient ? window.cancelAnimationFrame(handle) : clearTimeout(handle)\n"],"names":[],"mappings":";;;AACY,MAAC,GAAG,GAAG,CAAC,EAAE,KAAK,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE;AAChF,MAAC,GAAG,GAAG,CAAC,MAAM,KAAK,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM;;;;"}
@@ -0,0 +1,5 @@
1
+ const generateId = () => Math.floor(Math.random() * 1e4);
2
+ const getRandomInt = (max) => Math.floor(Math.random() * Math.floor(max));
3
+
4
+ export { generateId, getRandomInt };
5
+ //# sourceMappingURL=rand.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rand.mjs","sources":["../../../../../packages/utils/rand.ts"],"sourcesContent":["/**\n * @deprecated Use `useId` `useIdInjection` instead\n * Generate random number in range [0, 1000]\n * Maybe replace with [uuid](https://www.npmjs.com/package/uuid)\n */\nexport const generateId = (): number => Math.floor(Math.random() * 10000)\n\n/**\n * @deprecated\n * Generating a random int in range (0, max - 1)\n * @param max {number}\n */\nexport const getRandomInt = (max: number) =>\n Math.floor(Math.random() * Math.floor(max))\n"],"names":[],"mappings":"AAAY,MAAC,UAAU,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,EAAE;AACpD,MAAC,YAAY,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;;;;"}
@@ -0,0 +1,8 @@
1
+ import { capitalize as capitalize$1 } from '@vue/shared';
2
+ export { camelize, hyphenate, hyphenate as kebabCase } from '@vue/shared';
3
+
4
+ const escapeStringRegexp = (string = "") => string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
5
+ const capitalize = (str) => capitalize$1(str);
6
+
7
+ export { capitalize, escapeStringRegexp };
8
+ //# sourceMappingURL=strings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strings.mjs","sources":["../../../../../packages/utils/strings.ts"],"sourcesContent":["import { capitalize as toCapitalize } from '@vue/shared'\nexport {\n camelize,\n hyphenate,\n hyphenate as kebabCase, // alias\n} from '@vue/shared'\n\n/**\n * fork from {@link https://github.com/sindresorhus/escape-string-regexp}\n */\nexport const escapeStringRegexp = (string = '') =>\n string.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&').replace(/-/g, '\\\\x2d')\n\n// NOTE: improve capitalize types. Restore previous code after the [PR](https://github.com/vuejs/core/pull/6212) merge\nexport const capitalize = <T extends string>(str: T) =>\n toCapitalize(str) as Capitalize<T>\n"],"names":["toCapitalize"],"mappings":";;;AAMY,MAAC,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,KAAK,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE;AAC5G,MAAC,UAAU,GAAG,CAAC,GAAG,KAAKA,YAAY,CAAC,GAAG;;;;"}
@@ -0,0 +1,22 @@
1
+ import { cAF, rAF } from './raf.mjs';
2
+
3
+ function throttleByRaf(cb) {
4
+ let timer = 0;
5
+ const throttle = (...args) => {
6
+ if (timer) {
7
+ cAF(timer);
8
+ }
9
+ timer = rAF(() => {
10
+ cb(...args);
11
+ timer = 0;
12
+ });
13
+ };
14
+ throttle.cancel = () => {
15
+ cAF(timer);
16
+ timer = 0;
17
+ };
18
+ return throttle;
19
+ }
20
+
21
+ export { throttleByRaf };
22
+ //# sourceMappingURL=throttleByRaf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throttleByRaf.mjs","sources":["../../../../../packages/utils/throttleByRaf.ts"],"sourcesContent":["import { cAF, rAF } from './raf'\n\nexport function throttleByRaf(cb: (...args: any[]) => void) {\n let timer = 0\n\n const throttle = (...args: any[]): void => {\n if (timer) {\n cAF(timer)\n }\n timer = rAF(() => {\n cb(...args)\n timer = 0\n })\n }\n\n throttle.cancel = () => {\n cAF(timer)\n timer = 0\n }\n\n return throttle\n}\n"],"names":[],"mappings":";;AACO,SAAS,aAAa,CAAC,EAAE,EAAE;AAClC,EAAE,IAAI,KAAK,GAAG,CAAC,CAAC;AAChB,EAAE,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,KAAK;AAChC,IAAI,IAAI,KAAK,EAAE;AACf,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;AACjB,KAAK;AACL,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM;AACtB,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAClB,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ,EAAE,QAAQ,CAAC,MAAM,GAAG,MAAM;AAC1B,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;AACf,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC;AAClB;;;;"}
@@ -0,0 +1,29 @@
1
+ import { isArray, isObject, isString } from '@vue/shared';
2
+ export { isArray, isDate, isFunction, isObject, isPromise, isString, isSymbol } from '@vue/shared';
3
+ import { isNil } from 'lodash-unified';
4
+ export { isVNode } from 'vue';
5
+
6
+ const isUndefined = (val) => val === void 0;
7
+ const isBoolean = (val) => typeof val === "boolean";
8
+ const isNumber = (val) => typeof val === "number";
9
+ const isEmpty = (val) => !val && val !== 0 || isArray(val) && val.length === 0 || isObject(val) && !Object.keys(val).length;
10
+ const isElement = (e) => {
11
+ if (typeof Element === "undefined")
12
+ return false;
13
+ return e instanceof Element;
14
+ };
15
+ const isPropAbsent = (prop) => {
16
+ return isNil(prop);
17
+ };
18
+ const isStringNumber = (val) => {
19
+ if (!isString(val)) {
20
+ return false;
21
+ }
22
+ return !Number.isNaN(Number(val));
23
+ };
24
+ const isWindow = (val) => {
25
+ return val === window;
26
+ };
27
+
28
+ export { isBoolean, isElement, isEmpty, isNumber, isPropAbsent, isStringNumber, isUndefined, isWindow };
29
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","sources":["../../../../../packages/utils/types.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@vue/shared'\nimport { isNil } from 'lodash-unified'\n\nexport {\n isArray,\n isFunction,\n isObject,\n isString,\n isDate,\n isPromise,\n isSymbol,\n} from '@vue/shared'\nexport { isVNode } from 'vue'\n\nexport const isUndefined = (val: any): val is undefined => val === undefined\nexport const isBoolean = (val: any): val is boolean => typeof val === 'boolean'\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport const isEmpty = (val: unknown) =>\n (!val && val !== 0) ||\n (isArray(val) && val.length === 0) ||\n (isObject(val) && !Object.keys(val).length)\n\nexport const isElement = (e: unknown): e is Element => {\n if (typeof Element === 'undefined') return false\n return e instanceof Element\n}\n\nexport const isPropAbsent = (prop: unknown): prop is null | undefined => {\n return isNil(prop)\n}\n\nexport const isStringNumber = (val: string): boolean => {\n if (!isString(val)) {\n return false\n }\n return !Number.isNaN(Number(val))\n}\n\nexport const isWindow = (val: unknown): val is Window => {\n return val === window\n}\n"],"names":[],"mappings":";;;;;AAYY,MAAC,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,KAAK,KAAK,EAAE;AACvC,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,UAAU;AAC/C,MAAC,QAAQ,GAAG,CAAC,GAAG,KAAK,OAAO,GAAG,KAAK,SAAS;AAC7C,MAAC,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO;AACvH,MAAC,SAAS,GAAG,CAAC,CAAC,KAAK;AAChC,EAAE,IAAI,OAAO,OAAO,KAAK,WAAW;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE,OAAO,CAAC,YAAY,OAAO,CAAC;AAC9B,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,IAAI,KAAK;AACtC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,EAAE;AACU,MAAC,cAAc,GAAG,CAAC,GAAG,KAAK;AACvC,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACtB,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,EAAE;AACU,MAAC,QAAQ,GAAG,CAAC,GAAG,KAAK;AACjC,EAAE,OAAO,GAAG,KAAK,MAAM,CAAC;AACxB;;;;"}
@@ -0,0 +1,4 @@
1
+ const mutable = (val) => val;
2
+
3
+ export { mutable };
4
+ //# sourceMappingURL=typescript.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.mjs","sources":["../../../../../packages/utils/typescript.ts"],"sourcesContent":["export const mutable = <T extends readonly any[] | Record<string, unknown>>(\n val: T\n) => val as Mutable<typeof val>\nexport type Mutable<T> = { -readonly [P in keyof T]: T[P] }\n\nexport type HTMLElementCustomized<T> = HTMLElement & T\n\n/**\n * @deprecated stop to use null\n * @see {@link https://github.com/sindresorhus/meta/discussions/7}\n */\nexport type Nullable<T> = T | null\n\nexport type Arrayable<T> = T | T[]\nexport type Awaitable<T> = Promise<T> | T\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG,CAAC,GAAG,KAAK;;;;"}
@@ -0,0 +1,33 @@
1
+ import '../browser.mjs';
2
+ import { isClient } from '@vueuse/core';
3
+
4
+ const globalNodes = [];
5
+ let target = !isClient ? void 0 : document.body;
6
+ function createGlobalNode(id) {
7
+ const el = document.createElement("div");
8
+ if (id !== void 0) {
9
+ el.setAttribute("id", id);
10
+ }
11
+ if (target) {
12
+ target.appendChild(el);
13
+ globalNodes.push(el);
14
+ }
15
+ return el;
16
+ }
17
+ function removeGlobalNode(el) {
18
+ globalNodes.splice(globalNodes.indexOf(el), 1);
19
+ el.remove();
20
+ }
21
+ function changeGlobalNodesTarget(el) {
22
+ if (el === target)
23
+ return;
24
+ target = el;
25
+ globalNodes.forEach((el2) => {
26
+ if (target && !el2.contains(target)) {
27
+ target.appendChild(el2);
28
+ }
29
+ });
30
+ }
31
+
32
+ export { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode };
33
+ //# sourceMappingURL=global-node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-node.mjs","sources":["../../../../../../packages/utils/vue/global-node.ts"],"sourcesContent":["import { isClient } from '../browser'\n\nconst globalNodes: HTMLElement[] = []\nlet target: HTMLElement | undefined = !isClient ? undefined : document.body\n\nexport function createGlobalNode(id?: string) {\n const el = document.createElement('div')\n if (id !== undefined) {\n el.setAttribute('id', id)\n }\n\n if (target) {\n target.appendChild(el)\n globalNodes.push(el)\n }\n\n return el\n}\n\nexport function removeGlobalNode(el: HTMLElement) {\n globalNodes.splice(globalNodes.indexOf(el), 1)\n el.remove()\n}\n\nexport function changeGlobalNodesTarget(el: HTMLElement) {\n if (el === target) return\n\n target = el\n globalNodes.forEach((el) => {\n if (target && !el.contains(target)) {\n target.appendChild(el)\n }\n })\n}\n"],"names":[],"mappings":";;;AACA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,IAAI,MAAM,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;AACzC,SAAS,gBAAgB,CAAC,EAAE,EAAE;AACrC,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC3C,EAAE,IAAI,EAAE,KAAK,KAAK,CAAC,EAAE;AACrB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9B,GAAG;AACH,EAAE,IAAI,MAAM,EAAE;AACd,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AAC3B,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzB,GAAG;AACH,EAAE,OAAO,EAAE,CAAC;AACZ,CAAC;AACM,SAAS,gBAAgB,CAAC,EAAE,EAAE;AACrC,EAAE,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACjD,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;AACd,CAAC;AACM,SAAS,uBAAuB,CAAC,EAAE,EAAE;AAC5C,EAAE,IAAI,EAAE,KAAK,MAAM;AACnB,IAAI,OAAO;AACX,EAAE,MAAM,GAAG,EAAE,CAAC;AACd,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC/B,IAAI,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACzC,MAAM,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,CAAC,CAAC;AACL;;;;"}
@@ -0,0 +1,33 @@
1
+ import { Close as close_default, SuccessFilled as success_filled_default, InfoFilled as info_filled_default, WarningFilled as warning_filled_default, CircleCloseFilled as circle_close_filled_default, Loading as loading_default, CircleCheck as circle_check_default, CircleClose as circle_close_default } from '../../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.2.37/node_modules/@element-plus/icons-vue/dist/index.mjs';
2
+ import './props/index.mjs';
3
+ import { definePropType } from './props/runtime.mjs';
4
+
5
+ const iconPropType = definePropType([
6
+ String,
7
+ Object,
8
+ Function
9
+ ]);
10
+ const CloseComponents = {
11
+ Close: close_default
12
+ };
13
+ const TypeComponents = {
14
+ Close: close_default,
15
+ SuccessFilled: success_filled_default,
16
+ InfoFilled: info_filled_default,
17
+ WarningFilled: warning_filled_default,
18
+ CircleCloseFilled: circle_close_filled_default
19
+ };
20
+ const TypeComponentsMap = {
21
+ success: success_filled_default,
22
+ warning: warning_filled_default,
23
+ error: circle_close_filled_default,
24
+ info: info_filled_default
25
+ };
26
+ const ValidateComponentsMap = {
27
+ validating: loading_default,
28
+ success: circle_check_default,
29
+ error: circle_close_default
30
+ };
31
+
32
+ export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType };
33
+ //# sourceMappingURL=icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.mjs","sources":["../../../../../../packages/utils/vue/icon.ts"],"sourcesContent":["import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType<string | Component>([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n"],"names":["Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;;;AAWY,MAAC,YAAY,GAAG,cAAc,CAAC;AAC3C,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,SAAEA,aAAK;AACP,EAAE;AACU,MAAC,cAAc,GAAG;AAC9B,SAAEA,aAAK;AACP,iBAAEC,sBAAa;AACf,cAAEC,mBAAU;AACZ,iBAAEC,sBAAa;AACf,qBAAEC,2BAAiB;AACnB,EAAE;AACU,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAEH,sBAAa;AACxB,EAAE,OAAO,EAAEE,sBAAa;AACxB,EAAE,KAAK,EAAEC,2BAAiB;AAC1B,EAAE,IAAI,EAAEF,mBAAU;AAClB,EAAE;AACU,MAAC,qBAAqB,GAAG;AACrC,EAAE,UAAU,EAAEG,eAAO;AACrB,EAAE,OAAO,EAAEC,oBAAW;AACtB,EAAE,KAAK,EAAEC,oBAAW;AACpB;;;;"}
@@ -0,0 +1,11 @@
1
+ export { changeGlobalNodesTarget, createGlobalNode, removeGlobalNode } from './global-node.mjs';
2
+ export { CloseComponents, TypeComponents, TypeComponentsMap, ValidateComponentsMap, iconPropType } from './icon.mjs';
3
+ export { withInstall, withInstallDirective, withInstallFunction, withNoopInstall } from './install.mjs';
4
+ import './props/index.mjs';
5
+ export { composeRefs } from './refs.mjs';
6
+ export { getComponentSize } from './size.mjs';
7
+ import './typescript.mjs';
8
+ export { isValidComponentSize, isValidDatePickType } from './validator.mjs';
9
+ export { PatchFlags, ensureOnlyChild, flattedChildren, getFirstValidNode, getNormalizedProps, isComment, isFragment, isTemplate, isText, isValidElementNode, renderBlock, renderIf } from './vnode.mjs';
10
+ export { buildProp, buildProps, definePropType, epPropKey, isEpProp } from './props/runtime.mjs';
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,41 @@
1
+ import { NOOP } from '@vue/shared';
2
+
3
+ const withInstall = (main, extra) => {
4
+ ;
5
+ main.install = (app) => {
6
+ for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
7
+ app.component(comp.name, comp);
8
+ }
9
+ };
10
+ if (extra) {
11
+ for (const [key, comp] of Object.entries(extra)) {
12
+ ;
13
+ main[key] = comp;
14
+ }
15
+ }
16
+ return main;
17
+ };
18
+ const withInstallFunction = (fn, name) => {
19
+ ;
20
+ fn.install = (app) => {
21
+ ;
22
+ fn._context = app._context;
23
+ app.config.globalProperties[name] = fn;
24
+ };
25
+ return fn;
26
+ };
27
+ const withInstallDirective = (directive, name) => {
28
+ ;
29
+ directive.install = (app) => {
30
+ app.directive(name, directive);
31
+ };
32
+ return directive;
33
+ };
34
+ const withNoopInstall = (component) => {
35
+ ;
36
+ component.install = NOOP;
37
+ return component;
38
+ };
39
+
40
+ export { withInstall, withInstallDirective, withInstallFunction, withNoopInstall };
41
+ //# sourceMappingURL=install.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.mjs","sources":["../../../../../../packages/utils/vue/install.ts"],"sourcesContent":["import { NOOP } from '@vue/shared'\n\nimport type { App, Directive } from 'vue'\nimport type { SFCInstallWithContext, SFCWithInstall } from './typescript'\n\nexport const withInstall = <T, E extends Record<string, any>>(\n main: T,\n extra?: E\n) => {\n ;(main as SFCWithInstall<T>).install = (app): void => {\n for (const comp of [main, ...Object.values(extra ?? {})]) {\n app.component(comp.name, comp)\n }\n }\n\n if (extra) {\n for (const [key, comp] of Object.entries(extra)) {\n ;(main as any)[key] = comp\n }\n }\n return main as SFCWithInstall<T> & E\n}\n\nexport const withInstallFunction = <T>(fn: T, name: string) => {\n ;(fn as SFCWithInstall<T>).install = (app: App) => {\n ;(fn as SFCInstallWithContext<T>)._context = app._context\n app.config.globalProperties[name] = fn\n }\n\n return fn as SFCInstallWithContext<T>\n}\n\nexport const withInstallDirective = <T extends Directive>(\n directive: T,\n name: string\n) => {\n ;(directive as SFCWithInstall<T>).install = (app: App): void => {\n app.directive(name, directive)\n }\n\n return directive as SFCWithInstall<T>\n}\n\nexport const withNoopInstall = <T>(component: T) => {\n ;(component as SFCWithInstall<T>).install = NOOP\n\n return component as SFCWithInstall<T>\n}\n"],"names":[],"mappings":";;AACY,MAAC,WAAW,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK;AAC5C,EAAE,CAAC;AACH,EAAE,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK;AAC1B,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC,CAAC,EAAE;AAC7E,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACrC,KAAK;AACL,GAAG,CAAC;AACJ,EAAE,IAAI,KAAK,EAAE;AACb,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACrD,MAAM,CAAC;AACP,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACvB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,IAAI,CAAC;AACd,EAAE;AACU,MAAC,mBAAmB,GAAG,CAAC,EAAE,EAAE,IAAI,KAAK;AACjD,EAAE,CAAC;AACH,EAAE,EAAE,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK;AACxB,IAAI,CAAC;AACL,IAAI,EAAE,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC/B,IAAI,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AAC3C,GAAG,CAAC;AACJ,EAAE,OAAO,EAAE,CAAC;AACZ,EAAE;AACU,MAAC,oBAAoB,GAAG,CAAC,SAAS,EAAE,IAAI,KAAK;AACzD,EAAE,CAAC;AACH,EAAE,SAAS,CAAC,OAAO,GAAG,CAAC,GAAG,KAAK;AAC/B,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACnC,GAAG,CAAC;AACJ,EAAE,OAAO,SAAS,CAAC;AACnB,EAAE;AACU,MAAC,eAAe,GAAG,CAAC,SAAS,KAAK;AAC9C,EAAE,CAAC;AACH,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;AAC3B,EAAE,OAAO,SAAS,CAAC;AACnB;;;;"}
@@ -0,0 +1,4 @@
1
+ import './util.mjs';
2
+ import './types.mjs';
3
+ export { buildProp, buildProps, definePropType, epPropKey, isEpProp } from './runtime.mjs';
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,48 @@
1
+ import { warn } from 'vue';
2
+ import { fromPairs } from 'lodash-unified';
3
+ import '../../types.mjs';
4
+ import '../../objects.mjs';
5
+ import { isObject, hasOwn } from '@vue/shared';
6
+
7
+ const epPropKey = "__epPropKey";
8
+ const definePropType = (val) => val;
9
+ const isEpProp = (val) => isObject(val) && !!val[epPropKey];
10
+ const buildProp = (prop, key) => {
11
+ if (!isObject(prop) || isEpProp(prop))
12
+ return prop;
13
+ const { values, required, default: defaultValue, type, validator } = prop;
14
+ const _validator = values || validator ? (val) => {
15
+ let valid = false;
16
+ let allowedValues = [];
17
+ if (values) {
18
+ allowedValues = Array.from(values);
19
+ if (hasOwn(prop, "default")) {
20
+ allowedValues.push(defaultValue);
21
+ }
22
+ valid || (valid = allowedValues.includes(val));
23
+ }
24
+ if (validator)
25
+ valid || (valid = validator(val));
26
+ if (!valid && allowedValues.length > 0) {
27
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
28
+ warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
29
+ }
30
+ return valid;
31
+ } : void 0;
32
+ const epProp = {
33
+ type,
34
+ required: !!required,
35
+ validator: _validator,
36
+ [epPropKey]: true
37
+ };
38
+ if (hasOwn(prop, "default"))
39
+ epProp.default = defaultValue;
40
+ return epProp;
41
+ };
42
+ const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
43
+ key,
44
+ buildProp(option, key)
45
+ ]));
46
+
47
+ export { buildProp, buildProps, definePropType, epPropKey, isEpProp };
48
+ //# sourceMappingURL=runtime.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.mjs","sources":["../../../../../../../packages/utils/vue/props/runtime.ts"],"sourcesContent":["import { warn } from 'vue'\nimport { fromPairs } from 'lodash-unified'\nimport { isObject } from '../../types'\nimport { hasOwn } from '../../objects'\n\nimport type { PropType } from 'vue'\nimport type {\n EpProp,\n EpPropConvert,\n EpPropFinalized,\n EpPropInput,\n EpPropMergeType,\n IfEpProp,\n IfNativePropType,\n NativePropType,\n} from './types'\n\nexport const epPropKey = '__epPropKey'\n\nexport const definePropType = <T>(val: any): PropType<T> => val\n\nexport const isEpProp = (val: unknown): val is EpProp<any, any, any> =>\n isObject(val) && !!(val as any)[epPropKey]\n\n/**\n * @description Build prop. It can better optimize prop types\n * @description 生成 prop,能更好地优化类型\n * @example\n // limited options\n // the type will be PropType<'light' | 'dark'>\n buildProp({\n type: String,\n values: ['light', 'dark'],\n } as const)\n * @example\n // limited options and other types\n // the type will be PropType<'small' | 'large' | number>\n buildProp({\n type: [String, Number],\n values: ['small', 'large'],\n validator: (val: unknown): val is number => typeof val === 'number',\n } as const)\n @link see more: https://github.com/element-plus/element-plus/pull/3341\n */\nexport const buildProp = <\n Type = never,\n Value = never,\n Validator = never,\n Default extends EpPropMergeType<Type, Value, Validator> = never,\n Required extends boolean = false\n>(\n prop: EpPropInput<Type, Value, Validator, Default, Required>,\n key?: string\n): EpPropFinalized<Type, Value, Validator, Default, Required> => {\n // filter native prop type and nested prop, e.g `null`, `undefined` (from `buildProps`)\n if (!isObject(prop) || isEpProp(prop)) return prop as any\n\n const { values, required, default: defaultValue, type, validator } = prop\n\n const _validator =\n values || validator\n ? (val: unknown) => {\n let valid = false\n let allowedValues: unknown[] = []\n\n if (values) {\n allowedValues = Array.from(values)\n if (hasOwn(prop, 'default')) {\n allowedValues.push(defaultValue)\n }\n valid ||= allowedValues.includes(val)\n }\n if (validator) valid ||= validator(val)\n\n if (!valid && allowedValues.length > 0) {\n const allowValuesText = [...new Set(allowedValues)]\n .map((value) => JSON.stringify(value))\n .join(', ')\n warn(\n `Invalid prop: validation failed${\n key ? ` for prop \"${key}\"` : ''\n }. Expected one of [${allowValuesText}], got value ${JSON.stringify(\n val\n )}.`\n )\n }\n return valid\n }\n : undefined\n\n const epProp: any = {\n type,\n required: !!required,\n validator: _validator,\n [epPropKey]: true,\n }\n if (hasOwn(prop, 'default')) epProp.default = defaultValue\n return epProp\n}\n\nexport const buildProps = <\n Props extends Record<\n string,\n | { [epPropKey]: true }\n | NativePropType\n | EpPropInput<any, any, any, any, any>\n >\n>(\n props: Props\n): {\n [K in keyof Props]: IfEpProp<\n Props[K],\n Props[K],\n IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>\n >\n} =>\n fromPairs(\n Object.entries(props).map(([key, option]) => [\n key,\n buildProp(option as any, key),\n ])\n ) as any\n"],"names":[],"mappings":";;;;;;AAIY,MAAC,SAAS,GAAG,cAAc;AAC3B,MAAC,cAAc,GAAG,CAAC,GAAG,KAAK,IAAI;AAC/B,MAAC,QAAQ,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE;AACvD,MAAC,SAAS,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK;AACxC,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC;AACvC,IAAI,OAAO,IAAI,CAAC;AAChB,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;AAC5E,EAAE,MAAM,UAAU,GAAG,MAAM,IAAI,SAAS,GAAG,CAAC,GAAG,KAAK;AACpD,IAAI,IAAI,KAAK,GAAG,KAAK,CAAC;AACtB,IAAI,IAAI,aAAa,GAAG,EAAE,CAAC;AAC3B,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACzC,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE;AACnC,QAAQ,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AACzC,OAAO;AACP,MAAM,KAAK,KAAK,KAAK,GAAG,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,KAAK;AACL,IAAI,IAAI,SAAS;AACjB,MAAM,KAAK,KAAK,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;AACxC,IAAI,IAAI,CAAC,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;AAC5C,MAAM,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3G,MAAM,IAAI,CAAC,CAAC,+BAA+B,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzJ,KAAK;AACL,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG,GAAG,KAAK,CAAC,CAAC;AACb,EAAE,MAAM,MAAM,GAAG;AACjB,IAAI,IAAI;AACR,IAAI,QAAQ,EAAE,CAAC,CAAC,QAAQ;AACxB,IAAI,SAAS,EAAE,UAAU;AACzB,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,GAAG,CAAC;AACJ,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC;AAC7B,IAAI,MAAM,CAAC,OAAO,GAAG,YAAY,CAAC;AAClC,EAAE,OAAO,MAAM,CAAC;AAChB,EAAE;AACU,MAAC,UAAU,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK;AAC5F,EAAE,GAAG;AACL,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC;AACxB,CAAC,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=util.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import '../types.mjs';
2
+ import { isFunction } from '@vue/shared';
3
+
4
+ const composeRefs = (...refs) => {
5
+ return (el) => {
6
+ refs.forEach((ref) => {
7
+ if (isFunction(ref)) {
8
+ ref(el);
9
+ } else {
10
+ ref.value = el;
11
+ }
12
+ });
13
+ };
14
+ };
15
+
16
+ export { composeRefs };
17
+ //# sourceMappingURL=refs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.mjs","sources":["../../../../../../packages/utils/vue/refs.ts"],"sourcesContent":["import { isFunction } from '../types'\n\nimport type { ComponentPublicInstance, Ref } from 'vue'\n\nexport type RefSetter = (\n el: Element | ComponentPublicInstance | undefined\n) => void\n\nexport const composeRefs = (\n ...refs: (Ref<HTMLElement | undefined> | RefSetter)[]\n) => {\n return (el: Element | ComponentPublicInstance | null) => {\n refs.forEach((ref) => {\n if (isFunction(ref)) {\n ref(el as Element | ComponentPublicInstance)\n } else {\n ref.value = el as HTMLElement | undefined\n }\n })\n }\n}\n"],"names":[],"mappings":";;;AACY,MAAC,WAAW,GAAG,CAAC,GAAG,IAAI,KAAK;AACxC,EAAE,OAAO,CAAC,EAAE,KAAK;AACjB,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1B,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE;AAC3B,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAC;AAChB,OAAO,MAAM;AACb,QAAQ,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC;AACvB,OAAO;AACP,KAAK,CAAC,CAAC;AACP,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,9 @@
1
+ import '../../constants/index.mjs';
2
+ import { componentSizeMap } from '../../constants/size.mjs';
3
+
4
+ const getComponentSize = (size) => {
5
+ return componentSizeMap[size || "default"];
6
+ };
7
+
8
+ export { getComponentSize };
9
+ //# sourceMappingURL=size.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.mjs","sources":["../../../../../../packages/utils/vue/size.ts"],"sourcesContent":["import { componentSizeMap } from '@hzzt-plus/constants'\n\nimport type { ComponentSize } from '@hzzt-plus/constants'\n\nexport const getComponentSize = (size?: ComponentSize) => {\n return componentSizeMap[size || 'default']\n}\n"],"names":[],"mappings":";;;AACY,MAAC,gBAAgB,GAAG,CAAC,IAAI,KAAK;AAC1C,EAAE,OAAO,gBAAgB,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC;AAC7C;;;;"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=typescript.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}