hzzt-plus 0.0.1 → 0.0.2

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 (520) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +733 -45
  3. package/dist/index.full.min.js +17 -17
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +17 -17
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +709 -47
  8. package/dist/locale/en.js +7 -2
  9. package/dist/locale/en.min.js +1 -1
  10. package/dist/locale/en.min.js.map +1 -1
  11. package/dist/locale/en.min.mjs +1 -1
  12. package/dist/locale/en.min.mjs.map +1 -1
  13. package/dist/locale/en.mjs +7 -2
  14. package/dist/locale/zh-cn.js +7 -2
  15. package/dist/locale/zh-cn.min.js +1 -1
  16. package/dist/locale/zh-cn.min.js.map +1 -1
  17. package/dist/locale/zh-cn.min.mjs +1 -1
  18. package/dist/locale/zh-cn.min.mjs.map +1 -1
  19. package/dist/locale/zh-cn.mjs +7 -2
  20. package/es/component.mjs +10 -2
  21. package/es/component.mjs.map +1 -1
  22. package/es/components/collapse/index.d.ts +55 -0
  23. package/es/components/collapse/index.mjs +8 -0
  24. package/es/components/collapse/index.mjs.map +1 -0
  25. package/es/components/collapse/src/index.mjs +70 -0
  26. package/es/components/collapse/src/index.mjs.map +1 -0
  27. package/es/components/collapse/src/index.vue.d.ts +55 -0
  28. package/es/components/collapse/style/css.d.ts +2 -0
  29. package/es/components/collapse/style/css.mjs +3 -0
  30. package/es/components/collapse/style/index.d.ts +2 -0
  31. package/es/components/collapse/style/index.mjs +3 -0
  32. package/es/components/config-provider/index.d.ts +41 -0
  33. package/es/components/config-provider/index.mjs +11 -0
  34. package/es/components/config-provider/index.mjs.map +1 -0
  35. package/es/components/config-provider/src/config-provider-props.d.ts +19 -0
  36. package/es/components/config-provider/src/config-provider-props.mjs +22 -0
  37. package/es/components/config-provider/src/config-provider-props.mjs.map +1 -0
  38. package/es/components/config-provider/src/config-provider.d.ts +38 -0
  39. package/es/components/config-provider/src/config-provider.mjs +15 -0
  40. package/es/components/config-provider/src/config-provider.mjs.map +1 -0
  41. package/es/components/config-provider/src/constants.d.ts +4 -0
  42. package/es/components/config-provider/src/constants.mjs +4 -0
  43. package/es/components/config-provider/src/constants.mjs.map +1 -0
  44. package/es/components/config-provider/src/hooks/use-global-config.d.ts +6 -0
  45. package/es/components/config-provider/src/hooks/use-global-config.mjs +57 -0
  46. package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -0
  47. package/es/components/config-provider/style/css.d.ts +2 -0
  48. package/es/components/config-provider/style/css.mjs +3 -0
  49. package/es/components/config-provider/style/css.mjs.map +1 -0
  50. package/es/components/config-provider/style/index.d.ts +2 -0
  51. package/es/components/config-provider/style/index.mjs +3 -0
  52. package/es/components/dropdown/index.d.ts +102 -0
  53. package/es/components/dropdown/index.mjs +8 -0
  54. package/es/components/dropdown/index.mjs.map +1 -0
  55. package/es/components/dropdown/src/index.mjs +124 -0
  56. package/es/components/dropdown/src/index.mjs.map +1 -0
  57. package/es/components/dropdown/src/index.vue.d.ts +102 -0
  58. package/es/components/dropdown/style/css.d.ts +2 -0
  59. package/es/components/dropdown/style/css.mjs +3 -0
  60. package/es/components/dropdown/style/css.mjs.map +1 -0
  61. package/es/components/dropdown/style/index.d.ts +2 -0
  62. package/es/{packages/components/base → components/dropdown}/style/index.mjs.map +1 -1
  63. package/es/components/index.d.ts +4 -0
  64. package/es/components/index.mjs +9 -0
  65. package/es/components/index.mjs.map +1 -0
  66. package/es/components/tab/index.d.ts +45 -0
  67. package/es/components/tab/index.mjs +8 -0
  68. package/es/components/tab/index.mjs.map +1 -0
  69. package/es/components/tab/src/index.mjs +78 -0
  70. package/es/components/tab/src/index.mjs.map +1 -0
  71. package/es/components/tab/src/index.vue.d.ts +45 -0
  72. package/es/components/tab/style/css.d.ts +2 -0
  73. package/es/{packages/components/title → components/tab}/style/css.mjs +1 -1
  74. package/es/components/tab/style/css.mjs.map +1 -0
  75. package/es/components/tab/style/index.d.ts +2 -0
  76. package/es/components/tab/style/index.mjs +3 -0
  77. package/es/components/tab/style/index.mjs.map +1 -0
  78. package/es/components/title/index.mjs.map +1 -0
  79. package/es/{packages/components → components}/title/src/index.mjs +1 -1
  80. package/es/components/title/src/index.mjs.map +1 -0
  81. package/es/components/title/style/css.d.ts +1 -1
  82. package/es/components/title/style/css.mjs +3 -0
  83. package/es/components/title/style/css.mjs.map +1 -0
  84. package/es/components/title/style/index.mjs +3 -0
  85. package/es/components/title/style/index.mjs.map +1 -0
  86. package/es/constants/aria.mjs.map +1 -0
  87. package/es/constants/date.mjs.map +1 -0
  88. package/es/constants/event.mjs.map +1 -0
  89. package/es/constants/key.mjs.map +1 -0
  90. package/es/constants/size.mjs.map +1 -0
  91. package/es/defaults.d.ts +1 -1
  92. package/es/directives/blur/index.d.ts +3 -0
  93. package/es/directives/blur/index.mjs +10 -0
  94. package/es/directives/blur/index.mjs.map +1 -0
  95. package/es/directives/download/index.d.ts +3 -0
  96. package/es/directives/download/index.mjs +21 -0
  97. package/es/directives/download/index.mjs.map +1 -0
  98. package/es/directives/height/index.d.ts +3 -0
  99. package/es/directives/height/index.mjs +78 -0
  100. package/es/directives/height/index.mjs.map +1 -0
  101. package/es/directives/highlight/index.d.ts +3 -0
  102. package/es/directives/highlight/index.mjs +30 -0
  103. package/es/directives/highlight/index.mjs.map +1 -0
  104. package/es/directives/index.d.ts +4 -0
  105. package/es/directives/index.mjs +5 -0
  106. package/es/directives/index.mjs.map +1 -0
  107. package/es/hooks/index.d.ts +2 -0
  108. package/es/hooks/index.mjs +3 -0
  109. package/es/hooks/index.mjs.map +1 -0
  110. package/es/hooks/use-locale/index.d.ts +15 -0
  111. package/es/hooks/use-locale/index.mjs +26 -0
  112. package/es/hooks/use-locale/index.mjs.map +1 -0
  113. package/es/hooks/use-size/index.d.ts +21 -0
  114. package/es/hooks/use-size/index.mjs +24 -0
  115. package/es/hooks/use-size/index.mjs.map +1 -0
  116. package/es/index.d.ts +4 -1
  117. package/es/index.mjs +21 -2
  118. package/es/index.mjs.map +1 -1
  119. package/es/locale/index.d.ts +1 -1
  120. package/es/locale/index.mjs.map +1 -0
  121. package/es/locale/lang/en.d.ts +6 -1
  122. package/es/locale/lang/en.mjs +12 -0
  123. package/es/locale/lang/en.mjs.map +1 -0
  124. package/es/locale/lang/zh-cn.d.ts +6 -1
  125. package/es/{packages/locale → locale}/lang/zh-cn.mjs +6 -1
  126. package/es/locale/lang/zh-cn.mjs.map +1 -0
  127. package/es/locales.d.ts +1 -0
  128. package/es/locales.mjs +4 -0
  129. package/es/locales.mjs.map +1 -0
  130. package/es/make-installer.d.ts +1 -1
  131. package/es/make-installer.mjs +7 -3
  132. package/es/make-installer.mjs.map +1 -1
  133. package/es/utils/arrays.mjs.map +1 -0
  134. package/es/utils/browser.mjs.map +1 -0
  135. package/es/utils/dom/aria.mjs.map +1 -0
  136. package/es/utils/dom/element.mjs.map +1 -0
  137. package/es/utils/dom/event.mjs.map +1 -0
  138. package/es/utils/dom/position.mjs.map +1 -0
  139. package/es/utils/dom/scroll.mjs.map +1 -0
  140. package/es/utils/dom/style.mjs.map +1 -0
  141. package/es/utils/easings.mjs.map +1 -0
  142. package/es/utils/error.mjs.map +1 -0
  143. package/es/utils/i18n.mjs.map +1 -0
  144. package/es/utils/objects.mjs.map +1 -0
  145. package/es/utils/raf.mjs.map +1 -0
  146. package/es/utils/rand.mjs.map +1 -0
  147. package/es/utils/strings.mjs.map +1 -0
  148. package/es/utils/throttleByRaf.mjs.map +1 -0
  149. package/es/utils/types.mjs.map +1 -0
  150. package/es/utils/typescript.mjs.map +1 -0
  151. package/es/utils/vue/global-node.mjs.map +1 -0
  152. package/es/utils/vue/icon.mjs +33 -0
  153. package/es/utils/vue/icon.mjs.map +1 -0
  154. package/es/utils/vue/install.mjs.map +1 -0
  155. package/es/utils/vue/props/runtime.mjs.map +1 -0
  156. package/es/utils/vue/refs.mjs.map +1 -0
  157. package/es/utils/vue/size.mjs.map +1 -0
  158. package/es/utils/vue/validator.mjs.map +1 -0
  159. package/es/utils/vue/vnode.d.ts +6 -6
  160. package/es/utils/vue/vnode.mjs.map +1 -0
  161. package/es/version.d.ts +1 -1
  162. package/es/version.mjs +1 -1
  163. package/es/version.mjs.map +1 -1
  164. package/global.d.ts +4 -0
  165. package/lib/component.js +10 -2
  166. package/lib/component.js.map +1 -1
  167. package/lib/components/collapse/index.d.ts +55 -0
  168. package/lib/components/collapse/index.js +13 -0
  169. package/lib/components/collapse/index.js.map +1 -0
  170. package/lib/components/collapse/src/index.js +74 -0
  171. package/lib/components/collapse/src/index.js.map +1 -0
  172. package/lib/components/collapse/src/index.vue.d.ts +55 -0
  173. package/lib/components/collapse/style/css.d.ts +2 -0
  174. package/lib/components/collapse/style/css.js +6 -0
  175. package/lib/components/collapse/style/index.d.ts +2 -0
  176. package/lib/components/collapse/style/index.js +6 -0
  177. package/lib/components/config-provider/index.d.ts +41 -0
  178. package/lib/components/config-provider/index.js +20 -0
  179. package/lib/components/config-provider/index.js.map +1 -0
  180. package/lib/components/config-provider/src/config-provider-props.d.ts +19 -0
  181. package/lib/components/config-provider/src/config-provider-props.js +26 -0
  182. package/lib/components/config-provider/src/config-provider-props.js.map +1 -0
  183. package/lib/components/config-provider/src/config-provider.d.ts +38 -0
  184. package/lib/components/config-provider/src/config-provider.js +19 -0
  185. package/lib/components/config-provider/src/config-provider.js.map +1 -0
  186. package/lib/components/config-provider/src/constants.d.ts +4 -0
  187. package/lib/components/config-provider/src/constants.js +8 -0
  188. package/lib/components/config-provider/src/constants.js.map +1 -0
  189. package/lib/components/config-provider/src/hooks/use-global-config.d.ts +6 -0
  190. package/lib/components/config-provider/src/hooks/use-global-config.js +62 -0
  191. package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -0
  192. package/lib/components/config-provider/style/css.d.ts +2 -0
  193. package/lib/components/config-provider/style/css.js +6 -0
  194. package/lib/components/config-provider/style/css.js.map +1 -0
  195. package/lib/components/config-provider/style/index.d.ts +2 -0
  196. package/lib/components/config-provider/style/index.js +6 -0
  197. package/lib/{packages/components → components/config-provider/style}/index.js.map +1 -1
  198. package/lib/components/dropdown/index.d.ts +102 -0
  199. package/lib/components/dropdown/index.js +13 -0
  200. package/lib/components/dropdown/index.js.map +1 -0
  201. package/lib/components/dropdown/src/index.js +128 -0
  202. package/lib/components/dropdown/src/index.js.map +1 -0
  203. package/lib/components/dropdown/src/index.vue.d.ts +102 -0
  204. package/lib/components/dropdown/style/css.d.ts +2 -0
  205. package/lib/components/dropdown/style/css.js +6 -0
  206. package/lib/components/dropdown/style/css.js.map +1 -0
  207. package/lib/components/dropdown/style/index.d.ts +2 -0
  208. package/lib/components/dropdown/style/index.js.map +1 -0
  209. package/lib/components/index.d.ts +4 -0
  210. package/lib/components/index.js +25 -0
  211. package/lib/components/index.js.map +1 -0
  212. package/lib/components/tab/index.d.ts +45 -0
  213. package/lib/components/tab/index.js +13 -0
  214. package/lib/components/tab/index.js.map +1 -0
  215. package/lib/components/tab/src/index.js +82 -0
  216. package/lib/components/tab/src/index.js.map +1 -0
  217. package/lib/components/tab/src/index.vue.d.ts +45 -0
  218. package/lib/components/tab/style/css.d.ts +2 -0
  219. package/lib/{packages/components/title → components/tab}/style/css.js +1 -1
  220. package/lib/components/tab/style/css.js.map +1 -0
  221. package/lib/components/tab/style/index.d.ts +2 -0
  222. package/lib/components/tab/style/index.js +6 -0
  223. package/lib/components/tab/style/index.js.map +1 -0
  224. package/lib/components/title/index.js.map +1 -0
  225. package/lib/{packages/components → components}/title/src/index.js +1 -1
  226. package/lib/components/title/src/index.js.map +1 -0
  227. package/lib/components/title/style/css.d.ts +1 -1
  228. package/lib/components/title/style/css.js +6 -0
  229. package/lib/components/title/style/css.js.map +1 -0
  230. package/lib/components/title/style/index.js +6 -0
  231. package/lib/components/title/style/index.js.map +1 -0
  232. package/lib/constants/aria.js.map +1 -0
  233. package/lib/constants/date.js.map +1 -0
  234. package/lib/constants/event.js.map +1 -0
  235. package/lib/constants/key.js.map +1 -0
  236. package/lib/constants/size.js.map +1 -0
  237. package/lib/defaults.d.ts +1 -1
  238. package/lib/directives/blur/index.d.ts +3 -0
  239. package/lib/directives/blur/index.js +14 -0
  240. package/lib/directives/blur/index.js.map +1 -0
  241. package/lib/directives/download/index.d.ts +3 -0
  242. package/lib/directives/download/index.js +25 -0
  243. package/lib/directives/download/index.js.map +1 -0
  244. package/lib/directives/height/index.d.ts +3 -0
  245. package/lib/directives/height/index.js +82 -0
  246. package/lib/directives/height/index.js.map +1 -0
  247. package/lib/directives/highlight/index.d.ts +3 -0
  248. package/lib/directives/highlight/index.js +34 -0
  249. package/lib/directives/highlight/index.js.map +1 -0
  250. package/lib/directives/index.d.ts +4 -0
  251. package/lib/directives/index.js +16 -0
  252. package/lib/hooks/index.d.ts +2 -0
  253. package/lib/hooks/index.js +19 -0
  254. package/lib/hooks/index.js.map +1 -0
  255. package/lib/hooks/use-locale/index.d.ts +15 -0
  256. package/lib/hooks/use-locale/index.js +34 -0
  257. package/lib/hooks/use-locale/index.js.map +1 -0
  258. package/lib/hooks/use-size/index.d.ts +21 -0
  259. package/lib/hooks/use-size/index.js +31 -0
  260. package/lib/hooks/use-size/index.js.map +1 -0
  261. package/lib/index.d.ts +4 -1
  262. package/lib/index.js +47 -2
  263. package/lib/index.js.map +1 -1
  264. package/lib/locale/index.d.ts +1 -1
  265. package/lib/locale/lang/en.d.ts +6 -1
  266. package/lib/locale/lang/en.js +16 -0
  267. package/lib/locale/lang/en.js.map +1 -0
  268. package/lib/locale/lang/zh-cn.d.ts +6 -1
  269. package/lib/{packages/locale → locale}/lang/zh-cn.js +6 -1
  270. package/lib/locale/lang/zh-cn.js.map +1 -0
  271. package/lib/locales.d.ts +1 -0
  272. package/lib/locales.js +13 -0
  273. package/lib/locales.js.map +1 -0
  274. package/lib/make-installer.d.ts +1 -1
  275. package/lib/make-installer.js +7 -3
  276. package/lib/make-installer.js.map +1 -1
  277. package/lib/utils/arrays.js.map +1 -0
  278. package/lib/utils/browser.js.map +1 -0
  279. package/lib/utils/dom/aria.js.map +1 -0
  280. package/lib/utils/dom/element.js.map +1 -0
  281. package/lib/utils/dom/event.js.map +1 -0
  282. package/lib/utils/dom/position.js.map +1 -0
  283. package/lib/utils/dom/scroll.js.map +1 -0
  284. package/lib/utils/dom/style.js.map +1 -0
  285. package/lib/utils/easings.js.map +1 -0
  286. package/lib/utils/error.js.map +1 -0
  287. package/lib/utils/i18n.js.map +1 -0
  288. package/lib/utils/objects.js.map +1 -0
  289. package/lib/utils/raf.js.map +1 -0
  290. package/lib/utils/rand.js.map +1 -0
  291. package/lib/utils/strings.js.map +1 -0
  292. package/lib/utils/throttleByRaf.js.map +1 -0
  293. package/lib/utils/types.js.map +1 -0
  294. package/lib/utils/typescript.js.map +1 -0
  295. package/lib/utils/vue/global-node.js.map +1 -0
  296. package/lib/{packages/utils → utils}/vue/icon.js +14 -14
  297. package/lib/utils/vue/icon.js.map +1 -0
  298. package/lib/utils/vue/install.js.map +1 -0
  299. package/lib/utils/vue/props/index.js.map +1 -0
  300. package/lib/utils/vue/props/runtime.js.map +1 -0
  301. package/lib/utils/vue/refs.js.map +1 -0
  302. package/lib/utils/vue/size.js.map +1 -0
  303. package/lib/utils/vue/validator.js.map +1 -0
  304. package/lib/utils/vue/vnode.d.ts +6 -6
  305. package/lib/utils/vue/vnode.js.map +1 -0
  306. package/lib/version.d.ts +1 -1
  307. package/lib/version.js +1 -1
  308. package/lib/version.js.map +1 -1
  309. package/package.json +3 -1
  310. package/theme/base.css +1 -1
  311. package/theme/hzzt-collapse.css +1 -0
  312. package/theme/hzzt-config-provider.css +0 -0
  313. package/theme/hzzt-dropdown.css +1 -0
  314. package/theme/hzzt-tab.css +1 -0
  315. package/theme/hzzt-title.css +1 -1
  316. package/theme/index.css +1 -1
  317. package/theme/src/base.scss +1 -1
  318. package/theme/src/collapse.scss +56 -0
  319. package/theme/src/common/{position.scss → display.scss} +35 -0
  320. package/theme/src/common/font.scss +13 -0
  321. package/theme/src/config-provider.scss +0 -0
  322. package/theme/src/dropdown.scss +178 -0
  323. package/theme/src/index.scss +3 -0
  324. package/theme/src/tab.scss +63 -0
  325. package/theme/src/title.scss +2 -2
  326. 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 +0 -5764
  327. 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 +0 -1
  328. package/es/packages/components/index.mjs +0 -2
  329. package/es/packages/components/title/index.mjs.map +0 -1
  330. package/es/packages/components/title/src/index.mjs.map +0 -1
  331. package/es/packages/constants/aria.mjs.map +0 -1
  332. package/es/packages/constants/date.mjs.map +0 -1
  333. package/es/packages/constants/event.mjs.map +0 -1
  334. package/es/packages/constants/key.mjs.map +0 -1
  335. package/es/packages/constants/size.mjs.map +0 -1
  336. package/es/packages/locale/lang/en.mjs +0 -7
  337. package/es/packages/locale/lang/en.mjs.map +0 -1
  338. package/es/packages/locale/lang/zh-cn.mjs.map +0 -1
  339. package/es/packages/utils/arrays.mjs.map +0 -1
  340. package/es/packages/utils/browser.mjs.map +0 -1
  341. package/es/packages/utils/dom/aria.mjs.map +0 -1
  342. package/es/packages/utils/dom/element.mjs.map +0 -1
  343. package/es/packages/utils/dom/event.mjs.map +0 -1
  344. package/es/packages/utils/dom/position.mjs.map +0 -1
  345. package/es/packages/utils/dom/scroll.mjs.map +0 -1
  346. package/es/packages/utils/dom/style.mjs.map +0 -1
  347. package/es/packages/utils/easings.mjs.map +0 -1
  348. package/es/packages/utils/error.mjs.map +0 -1
  349. package/es/packages/utils/i18n.mjs.map +0 -1
  350. package/es/packages/utils/objects.mjs.map +0 -1
  351. package/es/packages/utils/raf.mjs.map +0 -1
  352. package/es/packages/utils/rand.mjs.map +0 -1
  353. package/es/packages/utils/strings.mjs.map +0 -1
  354. package/es/packages/utils/throttleByRaf.mjs.map +0 -1
  355. package/es/packages/utils/types.mjs.map +0 -1
  356. package/es/packages/utils/typescript.mjs.map +0 -1
  357. package/es/packages/utils/vue/global-node.mjs.map +0 -1
  358. package/es/packages/utils/vue/icon.mjs +0 -33
  359. package/es/packages/utils/vue/icon.mjs.map +0 -1
  360. package/es/packages/utils/vue/install.mjs.map +0 -1
  361. package/es/packages/utils/vue/props/runtime.mjs.map +0 -1
  362. package/es/packages/utils/vue/refs.mjs.map +0 -1
  363. package/es/packages/utils/vue/size.mjs.map +0 -1
  364. package/es/packages/utils/vue/validator.mjs.map +0 -1
  365. package/es/packages/utils/vue/vnode.mjs.map +0 -1
  366. 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 +0 -6060
  367. 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 +0 -1
  368. package/lib/packages/components/index.js +0 -10
  369. package/lib/packages/components/title/index.js.map +0 -1
  370. package/lib/packages/components/title/src/index.js.map +0 -1
  371. package/lib/packages/constants/aria.js.map +0 -1
  372. package/lib/packages/constants/date.js.map +0 -1
  373. package/lib/packages/constants/event.js.map +0 -1
  374. package/lib/packages/constants/key.js.map +0 -1
  375. package/lib/packages/constants/size.js.map +0 -1
  376. package/lib/packages/locale/lang/en.js +0 -11
  377. package/lib/packages/locale/lang/en.js.map +0 -1
  378. package/lib/packages/locale/lang/zh-cn.js.map +0 -1
  379. package/lib/packages/utils/arrays.js.map +0 -1
  380. package/lib/packages/utils/browser.js.map +0 -1
  381. package/lib/packages/utils/dom/aria.js.map +0 -1
  382. package/lib/packages/utils/dom/element.js.map +0 -1
  383. package/lib/packages/utils/dom/event.js.map +0 -1
  384. package/lib/packages/utils/dom/position.js.map +0 -1
  385. package/lib/packages/utils/dom/scroll.js.map +0 -1
  386. package/lib/packages/utils/dom/style.js.map +0 -1
  387. package/lib/packages/utils/easings.js.map +0 -1
  388. package/lib/packages/utils/error.js.map +0 -1
  389. package/lib/packages/utils/i18n.js.map +0 -1
  390. package/lib/packages/utils/objects.js.map +0 -1
  391. package/lib/packages/utils/raf.js.map +0 -1
  392. package/lib/packages/utils/rand.js.map +0 -1
  393. package/lib/packages/utils/strings.js.map +0 -1
  394. package/lib/packages/utils/throttleByRaf.js.map +0 -1
  395. package/lib/packages/utils/types.js.map +0 -1
  396. package/lib/packages/utils/typescript.js.map +0 -1
  397. package/lib/packages/utils/vue/global-node.js.map +0 -1
  398. package/lib/packages/utils/vue/icon.js.map +0 -1
  399. package/lib/packages/utils/vue/install.js.map +0 -1
  400. package/lib/packages/utils/vue/props/runtime.js.map +0 -1
  401. package/lib/packages/utils/vue/refs.js.map +0 -1
  402. package/lib/packages/utils/vue/size.js.map +0 -1
  403. package/lib/packages/utils/vue/validator.js.map +0 -1
  404. package/lib/packages/utils/vue/vnode.js.map +0 -1
  405. /package/es/{packages/components → components}/base/style/css.mjs +0 -0
  406. /package/es/{packages/components → components}/base/style/css.mjs.map +0 -0
  407. /package/es/{packages/components → components}/base/style/index.mjs +0 -0
  408. /package/es/{packages/components → components/base/style}/index.mjs.map +0 -0
  409. /package/es/{packages/components/title → components/collapse}/style/css.mjs.map +0 -0
  410. /package/es/{packages/locale → components/collapse/style}/index.mjs.map +0 -0
  411. /package/es/{packages/components/title → components/config-provider}/style/index.mjs.map +0 -0
  412. /package/es/{packages/components/title → components/dropdown}/style/index.mjs +0 -0
  413. /package/es/{packages/components → components}/title/index.mjs +0 -0
  414. /package/es/{packages/constants → constants}/aria.mjs +0 -0
  415. /package/es/{packages/constants → constants}/date.mjs +0 -0
  416. /package/es/{packages/constants → constants}/event.mjs +0 -0
  417. /package/es/{packages/constants → constants}/index.mjs +0 -0
  418. /package/es/{packages/utils/vue/props → constants}/index.mjs.map +0 -0
  419. /package/es/{packages/constants → constants}/key.mjs +0 -0
  420. /package/es/{packages/constants → constants}/size.mjs +0 -0
  421. /package/es/{packages/locale → locale}/index.mjs +0 -0
  422. /package/es/{packages/utils → utils}/arrays.mjs +0 -0
  423. /package/es/{packages/utils → utils}/browser.mjs +0 -0
  424. /package/es/{packages/utils → utils}/dom/aria.mjs +0 -0
  425. /package/es/{packages/utils → utils}/dom/element.mjs +0 -0
  426. /package/es/{packages/utils → utils}/dom/event.mjs +0 -0
  427. /package/es/{packages/utils → utils}/dom/index.mjs +0 -0
  428. /package/es/{packages/utils → utils}/dom/index.mjs.map +0 -0
  429. /package/es/{packages/utils → utils}/dom/position.mjs +0 -0
  430. /package/es/{packages/utils → utils}/dom/scroll.mjs +0 -0
  431. /package/es/{packages/utils → utils}/dom/style.mjs +0 -0
  432. /package/es/{packages/utils → utils}/easings.mjs +0 -0
  433. /package/es/{packages/utils → utils}/error.mjs +0 -0
  434. /package/es/{packages/utils → utils}/functions.mjs +0 -0
  435. /package/es/{packages/utils → utils}/functions.mjs.map +0 -0
  436. /package/es/{packages/utils → utils}/i18n.mjs +0 -0
  437. /package/es/{packages/utils → utils}/index.mjs +0 -0
  438. /package/es/{packages/utils → utils}/index.mjs.map +0 -0
  439. /package/es/{packages/utils → utils}/objects.mjs +0 -0
  440. /package/es/{packages/utils → utils}/raf.mjs +0 -0
  441. /package/es/{packages/utils → utils}/rand.mjs +0 -0
  442. /package/es/{packages/utils → utils}/strings.mjs +0 -0
  443. /package/es/{packages/utils → utils}/throttleByRaf.mjs +0 -0
  444. /package/es/{packages/utils → utils}/types.mjs +0 -0
  445. /package/es/{packages/utils → utils}/typescript.mjs +0 -0
  446. /package/es/{packages/utils → utils}/vue/global-node.mjs +0 -0
  447. /package/es/{packages/utils → utils}/vue/index.mjs +0 -0
  448. /package/es/{packages/utils → utils}/vue/index.mjs.map +0 -0
  449. /package/es/{packages/utils → utils}/vue/install.mjs +0 -0
  450. /package/es/{packages/utils → utils}/vue/props/index.mjs +0 -0
  451. /package/es/{packages/constants → utils/vue/props}/index.mjs.map +0 -0
  452. /package/es/{packages/utils → utils}/vue/props/runtime.mjs +0 -0
  453. /package/es/{packages/utils → utils}/vue/props/types.mjs +0 -0
  454. /package/es/{packages/utils → utils}/vue/props/types.mjs.map +0 -0
  455. /package/es/{packages/utils → utils}/vue/props/util.mjs +0 -0
  456. /package/es/{packages/utils → utils}/vue/props/util.mjs.map +0 -0
  457. /package/es/{packages/utils → utils}/vue/refs.mjs +0 -0
  458. /package/es/{packages/utils → utils}/vue/size.mjs +0 -0
  459. /package/es/{packages/utils → utils}/vue/typescript.mjs +0 -0
  460. /package/es/{packages/utils → utils}/vue/typescript.mjs.map +0 -0
  461. /package/es/{packages/utils → utils}/vue/validator.mjs +0 -0
  462. /package/es/{packages/utils → utils}/vue/vnode.mjs +0 -0
  463. /package/lib/{packages/components → components}/base/style/css.js +0 -0
  464. /package/lib/{packages/components → components}/base/style/css.js.map +0 -0
  465. /package/lib/{packages/components → components}/base/style/index.js +0 -0
  466. /package/lib/{packages/components → components}/base/style/index.js.map +0 -0
  467. /package/lib/{packages/components/title → components/collapse}/style/css.js.map +0 -0
  468. /package/lib/{packages/components/title → components/collapse}/style/index.js.map +0 -0
  469. /package/lib/{packages/components/title → components/dropdown}/style/index.js +0 -0
  470. /package/lib/{packages/components → components}/title/index.js +0 -0
  471. /package/lib/{packages/constants → constants}/aria.js +0 -0
  472. /package/lib/{packages/constants → constants}/date.js +0 -0
  473. /package/lib/{packages/constants → constants}/event.js +0 -0
  474. /package/lib/{packages/constants → constants}/index.js +0 -0
  475. /package/lib/{packages/utils/vue/props → constants}/index.js.map +0 -0
  476. /package/lib/{packages/constants → constants}/key.js +0 -0
  477. /package/lib/{packages/constants → constants}/size.js +0 -0
  478. /package/lib/{packages/constants → directives}/index.js.map +0 -0
  479. /package/lib/{packages/locale → locale}/index.js +0 -0
  480. /package/lib/{packages/locale → locale}/index.js.map +0 -0
  481. /package/lib/{packages/utils → utils}/arrays.js +0 -0
  482. /package/lib/{packages/utils → utils}/browser.js +0 -0
  483. /package/lib/{packages/utils → utils}/dom/aria.js +0 -0
  484. /package/lib/{packages/utils → utils}/dom/element.js +0 -0
  485. /package/lib/{packages/utils → utils}/dom/event.js +0 -0
  486. /package/lib/{packages/utils → utils}/dom/index.js +0 -0
  487. /package/lib/{packages/utils → utils}/dom/index.js.map +0 -0
  488. /package/lib/{packages/utils → utils}/dom/position.js +0 -0
  489. /package/lib/{packages/utils → utils}/dom/scroll.js +0 -0
  490. /package/lib/{packages/utils → utils}/dom/style.js +0 -0
  491. /package/lib/{packages/utils → utils}/easings.js +0 -0
  492. /package/lib/{packages/utils → utils}/error.js +0 -0
  493. /package/lib/{packages/utils → utils}/functions.js +0 -0
  494. /package/lib/{packages/utils → utils}/functions.js.map +0 -0
  495. /package/lib/{packages/utils → utils}/i18n.js +0 -0
  496. /package/lib/{packages/utils → utils}/index.js +0 -0
  497. /package/lib/{packages/utils → utils}/index.js.map +0 -0
  498. /package/lib/{packages/utils → utils}/objects.js +0 -0
  499. /package/lib/{packages/utils → utils}/raf.js +0 -0
  500. /package/lib/{packages/utils → utils}/rand.js +0 -0
  501. /package/lib/{packages/utils → utils}/strings.js +0 -0
  502. /package/lib/{packages/utils → utils}/throttleByRaf.js +0 -0
  503. /package/lib/{packages/utils → utils}/types.js +0 -0
  504. /package/lib/{packages/utils → utils}/typescript.js +0 -0
  505. /package/lib/{packages/utils → utils}/vue/global-node.js +0 -0
  506. /package/lib/{packages/utils → utils}/vue/index.js +0 -0
  507. /package/lib/{packages/utils → utils}/vue/index.js.map +0 -0
  508. /package/lib/{packages/utils → utils}/vue/install.js +0 -0
  509. /package/lib/{packages/utils → utils}/vue/props/index.js +0 -0
  510. /package/lib/{packages/utils → utils}/vue/props/runtime.js +0 -0
  511. /package/lib/{packages/utils → utils}/vue/props/types.js +0 -0
  512. /package/lib/{packages/utils → utils}/vue/props/types.js.map +0 -0
  513. /package/lib/{packages/utils → utils}/vue/props/util.js +0 -0
  514. /package/lib/{packages/utils → utils}/vue/props/util.js.map +0 -0
  515. /package/lib/{packages/utils → utils}/vue/refs.js +0 -0
  516. /package/lib/{packages/utils → utils}/vue/size.js +0 -0
  517. /package/lib/{packages/utils → utils}/vue/typescript.js +0 -0
  518. /package/lib/{packages/utils → utils}/vue/typescript.js.map +0 -0
  519. /package/lib/{packages/utils → utils}/vue/validator.js +0 -0
  520. /package/lib/{packages/utils → utils}/vue/vnode.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, useSlots, computed, unref, openBlock, createElementBlock, createCommentVNode, renderSlot, createElementVNode, createTextVNode, toDisplayString } from 'vue';
2
- import _export_sfc from '../../../../_virtual/plugin-vue_export-helper.mjs';
2
+ import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
3
3
 
4
4
  const _hoisted_1 = {
5
5
  key: 0,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/title/src/index.vue"],"sourcesContent":["<template>\n <div v-if=\"showLabel\" class=\"hzzt-title flex align-items-center\">\n <span v-if=\"sideline\" class=\"decorative-line\" />\n <slot name=\"before\" />\n <label class=\"label-name\">\n <slot>{{ label }}</slot>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n\n import {computed, useSlots} from 'vue';\n\n defineOptions({\n name: 'HzztTitle',\n });\n\n const props = defineProps({\n label: String,\n sideline: {\n type: Boolean,\n default: true,\n },\n });\n\n const slots = useSlots();\n\n const showLabel = computed(() => props.label || slots?.default?.()?.[0]?.children);\n\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;mCAcgB,CAAA;AAAA,EACZ,IAAM,EAAA,WAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;AAUA,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,IAAM,MAAA,SAAA,GAAY,SAAS,MAAM;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
1
  import 'hzzt-plus/es/components/base/style/css';
2
- import 'hzzt-plus/theme/el-title.css';
2
+ import 'hzzt-plus/theme/hzzt-title.css';
@@ -0,0 +1,3 @@
1
+ import '../../base/style/css.mjs';
2
+ import 'hzzt-plus/theme/hzzt-title.css';
3
+ //# sourceMappingURL=css.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,3 @@
1
+ import '../../base/style/index.mjs';
2
+ import 'hzzt-plus/theme/src/title.scss';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria.mjs","sources":["../../../../packages/constants/aria.ts"],"sourcesContent":["export const EVENT_CODE = {\n tab: 'Tab',\n enter: 'Enter',\n space: 'Space',\n left: 'ArrowLeft', // 37\n up: 'ArrowUp', // 38\n right: 'ArrowRight', // 39\n down: 'ArrowDown', // 40\n esc: 'Escape',\n delete: 'Delete',\n backspace: 'Backspace',\n numpadEnter: 'NumpadEnter',\n pageUp: 'PageUp',\n pageDown: 'PageDown',\n home: 'Home',\n end: 'End',\n}\n"],"names":[],"mappings":"AAAY,MAAC,UAAU,GAAG;AAC1B,EAAE,GAAG,EAAE,KAAK;AACZ,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,EAAE,EAAE,SAAS;AACf,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE,GAAG,EAAE,QAAQ;AACf,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,SAAS,EAAE,WAAW;AACxB,EAAE,WAAW,EAAE,aAAa;AAC5B,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,GAAG,EAAE,KAAK;AACZ;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.mjs","sources":["../../../../packages/constants/date.ts"],"sourcesContent":["export const datePickTypes = [\n 'year',\n 'years',\n 'month',\n 'months',\n 'date',\n 'dates',\n 'week',\n 'datetime',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n] as const\n\nexport const WEEK_DAYS = [\n 'sun',\n 'mon',\n 'tue',\n 'wed',\n 'thu',\n 'fri',\n 'sat',\n] as const\n\nexport type DatePickType = typeof datePickTypes[number]\n"],"names":[],"mappings":"AAAY,MAAC,aAAa,GAAG;AAC7B,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,OAAO;AACT,EAAE,QAAQ;AACV,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,MAAM;AACR,EAAE,UAAU;AACZ,EAAE,eAAe;AACjB,EAAE,WAAW;AACb,EAAE,YAAY;AACd,EAAE;AACU,MAAC,SAAS,GAAG;AACzB,EAAE,KAAK;AACP,EAAE,KAAK;AACP,EAAE,KAAK;AACP,EAAE,KAAK;AACP,EAAE,KAAK;AACP,EAAE,KAAK;AACP,EAAE,KAAK;AACP;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.mjs","sources":["../../../../packages/constants/event.ts"],"sourcesContent":["export const UPDATE_MODEL_EVENT = 'update:modelValue'\nexport const CHANGE_EVENT = 'change'\nexport const INPUT_EVENT = 'input'\n"],"names":[],"mappings":"AAAY,MAAC,kBAAkB,GAAG,oBAAoB;AAC1C,MAAC,YAAY,GAAG,SAAS;AACzB,MAAC,WAAW,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.mjs","sources":["../../../../packages/constants/key.ts"],"sourcesContent":["export const INSTALLED_KEY = Symbol('INSTALLED_KEY')\n"],"names":[],"mappings":"AAAY,MAAC,aAAa,GAAG,MAAM,CAAC,eAAe;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.mjs","sources":["../../../../packages/constants/size.ts"],"sourcesContent":["export const componentSizes = ['', 'default', 'small', 'large'] as const\n\nexport type ComponentSize = typeof componentSizes[number]\n\nexport const componentSizeMap = {\n large: 40,\n default: 32,\n small: 24,\n} as const\n"],"names":[],"mappings":"AAAY,MAAC,cAAc,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;AACpD,MAAC,gBAAgB,GAAG;AAChC,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,OAAO,EAAE,EAAE;AACb,EAAE,KAAK,EAAE,EAAE;AACX;;;;"}
package/es/defaults.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
2
  version: string;
3
- install: (app: import("vue").App<any>) => void;
3
+ install: (app: import("vue").App<any>, options?: Partial<import("./components").ConfigProviderProps> | undefined) => void;
4
4
  };
5
5
  export default _default;
@@ -0,0 +1,3 @@
1
+ import type { ObjectDirective } from 'vue';
2
+ declare const Blur: ObjectDirective;
3
+ export default Blur;
@@ -0,0 +1,10 @@
1
+ const Blur = {
2
+ beforeMount(el) {
3
+ el.addEventListener("click", () => {
4
+ el.blur();
5
+ });
6
+ }
7
+ };
8
+
9
+ export { Blur as default };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/blur/index.ts"],"sourcesContent":["import type {\n ObjectDirective,\n} from 'vue'\n\nconst Blur: ObjectDirective = {\n // 只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。\n beforeMount(el: HTMLElement) {\n el.addEventListener('click', () => {\n el.blur();\n });\n },\n};\n\nexport default Blur;\n"],"names":[],"mappings":"AAAK,MAAC,IAAI,GAAG;AACb,EAAE,WAAW,CAAC,EAAE,EAAE;AAClB,IAAI,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM;AACvC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;AAChB,KAAK,CAAC,CAAC;AACP,GAAG;AACH;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { ObjectDirective } from 'vue';
2
+ declare const Download: ObjectDirective;
3
+ export default Download;
@@ -0,0 +1,21 @@
1
+ let handler;
2
+ const Download = {
3
+ mounted(el, binding) {
4
+ const { path, name = "download" } = binding.value || {};
5
+ handler = function(e) {
6
+ e.preventDefault();
7
+ const a = document.createElement("a");
8
+ a.href = path;
9
+ a.download = name;
10
+ a.click();
11
+ a.remove();
12
+ };
13
+ el.addEventListener("click", handler);
14
+ },
15
+ unmounted(el) {
16
+ el.removeEventListener("click", handler);
17
+ }
18
+ };
19
+
20
+ export { Download as default };
21
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/download/index.ts"],"sourcesContent":["import type {\n DirectiveBinding,\n ObjectDirective,\n} from 'vue'\n\nlet handler;\nconst Download: ObjectDirective = {\n // 只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n const {path, name = 'download'} = binding.value || {};\n\n handler = function (e) {\n e.preventDefault();\n const a = document.createElement('a');\n a.href = path;\n a.download = name;\n a.click();\n a.remove();\n };\n el.addEventListener('click', handler);\n },\n // 只调用一次,指令与元素解绑时调用。\n unmounted(el: HTMLElement) {\n el.removeEventListener('click', handler);\n },\n};\n\nexport default Download;\n\n"],"names":[],"mappings":"AAAA,IAAI,OAAO,CAAC;AACP,MAAC,QAAQ,GAAG;AACjB,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE;AACvB,IAAI,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AAC5D,IAAI,OAAO,GAAG,SAAS,CAAC,EAAE;AAC1B,MAAM,CAAC,CAAC,cAAc,EAAE,CAAC;AACzB,MAAM,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;AAC5C,MAAM,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,MAAM,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;AACxB,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;AAChB,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;AACjB,KAAK,CAAC;AACN,IAAI,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,SAAS,CAAC,EAAE,EAAE;AAChB,IAAI,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC7C,GAAG;AACH;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { ObjectDirective } from 'vue';
2
+ declare const Height: ObjectDirective;
3
+ export default Height;
@@ -0,0 +1,78 @@
1
+ import '../../utils/index.mjs';
2
+ import { isClient } from '@vueuse/core';
3
+ import { isNumber } from '../../utils/types.mjs';
4
+ import { isObject } from '@vue/shared';
5
+
6
+ const nodeList = /* @__PURE__ */ new Map();
7
+ if (isClient) {
8
+ window.addEventListener("resize", handler);
9
+ document.addEventListener("fullscreenchange", handler);
10
+ }
11
+ function handler() {
12
+ for (const handlers of nodeList.values()) {
13
+ for (const { documentHandler } of handlers) {
14
+ documentHandler();
15
+ }
16
+ }
17
+ }
18
+ const Height = {
19
+ mounted(el, binding) {
20
+ if (!nodeList.has(el)) {
21
+ nodeList.set(el, []);
22
+ }
23
+ nodeList.get(el).push({
24
+ documentHandler: createDocumentHandler(el, binding),
25
+ bindingFn: binding.value
26
+ });
27
+ },
28
+ updated(el, binding) {
29
+ if (!nodeList.has(el)) {
30
+ nodeList.set(el, []);
31
+ }
32
+ const handlers = nodeList.get(el);
33
+ const oldHandlerIndex = handlers.findIndex((item) => item.bindingFn === binding.oldValue);
34
+ const newHandler = {
35
+ documentHandler: createDocumentHandler(el, binding),
36
+ bindingFn: binding.value
37
+ };
38
+ if (oldHandlerIndex >= 0) {
39
+ handlers.splice(oldHandlerIndex, 1, newHandler);
40
+ } else {
41
+ handlers.push(newHandler);
42
+ }
43
+ },
44
+ unmounted(el) {
45
+ nodeList.delete(el);
46
+ }
47
+ };
48
+ function createDocumentHandler(el, binding) {
49
+ const { element, distY, type } = getEffectiveValue(el, binding.value);
50
+ const cssProp = type ? type + "Height" : "height";
51
+ el.style[cssProp] = element.clientHeight + distY + "px";
52
+ return function() {
53
+ el.style[cssProp] = element.clientHeight + distY + "px";
54
+ };
55
+ }
56
+ function getEffectiveValue(el, val) {
57
+ let element = el.parentElement;
58
+ let distY = 0;
59
+ let type = "";
60
+ if (!val) {
61
+ element = el.parentElement;
62
+ distY = 0;
63
+ } else if (val instanceof HTMLElement) {
64
+ element = val;
65
+ distY = 0;
66
+ } else if (isNumber(val)) {
67
+ element = el.parentElement;
68
+ distY = val;
69
+ } else if (isObject(val)) {
70
+ element = (val == null ? void 0 : val.el) || el.parentElement;
71
+ distY = (val == null ? void 0 : val.distY) || 0;
72
+ type = (val == null ? void 0 : val.type) || "";
73
+ }
74
+ return { element, distY, type };
75
+ }
76
+
77
+ export { Height as default };
78
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/height/index.ts"],"sourcesContent":["import {isClient, isNumber, isObject} from '@hzzt-plus/utils'\n\nimport type {\n DirectiveBinding,\n ObjectDirective,\n} from 'vue'\n\ntype DocumentHandler = <T>() => void\ntype FlushList = Map<\n HTMLElement,\n {\n documentHandler: DocumentHandler\n bindingFn: (...args: unknown[]) => unknown\n }[]\n>\n\nconst nodeList: FlushList = new Map();\n\nif (isClient) {\n window.addEventListener('resize', handler);\n document.addEventListener('fullscreenchange', handler);\n}\n\nfunction handler() {\n for (const handlers of nodeList.values()) {\n for (const {documentHandler} of handlers) {\n documentHandler()\n }\n }\n}\n\n// v-height\n// 默认高度为当前元素的父元素高度\n\n// v-height = el\n// 当前元素的高度设置为el的高度\n\n// v-height = 60\n// 当前元素的高度设置为父元素高度+60px\n\n// v-height = {el: el, distY: 60}\n// 当前元素的高度设置为el的高度+60px\nconst Height: ObjectDirective = {\n // 当被绑定的元素插入到 DOM 中时……\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, []);\n }\n nodeList.get(el)!.push({\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n })\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n if (!nodeList.has(el)) {\n nodeList.set(el, []);\n }\n const handlers = nodeList.get(el)!\n const oldHandlerIndex = handlers.findIndex(\n (item) => item.bindingFn === binding.oldValue\n )\n const newHandler = {\n documentHandler: createDocumentHandler(el, binding),\n bindingFn: binding.value,\n }\n\n if (oldHandlerIndex >= 0) {\n // replace the old handler to the new handler\n handlers.splice(oldHandlerIndex, 1, newHandler)\n } else {\n handlers.push(newHandler)\n }\n },\n // 只调用一次,指令与元素解绑时调用。\n unmounted(el: HTMLElement) {\n nodeList.delete(el);\n },\n};\n\nfunction createDocumentHandler(el: HTMLElement, binding: DirectiveBinding) {\n const {element, distY, type} = getEffectiveValue(el, binding.value);\n const cssProp = type ? (type + 'Height') : 'height';\n el.style[cssProp] = element.clientHeight + distY + 'px';\n return function () {\n el.style[cssProp] = element.clientHeight + distY + 'px';\n }\n}\n\nfunction getEffectiveValue(el, val) {\n let element = el.parentElement;\n let distY = 0;\n let type = '';\n if (!val) {\n element = el.parentElement;\n distY = 0;\n } else if (val instanceof HTMLElement) {\n element = val;\n distY = 0;\n } else if (isNumber(val)) {\n element = el.parentElement;\n distY = val;\n } else if (isObject(val)) {\n element = val?.el || el.parentElement;\n distY = val?.distY || 0;\n type = val?.type || '';\n }\n return {element, distY, type};\n}\n\nexport default Height;\n\n"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ import type { ObjectDirective } from "vue";
2
+ declare const Highlight: ObjectDirective;
3
+ export default Highlight;
@@ -0,0 +1,30 @@
1
+ const Highlight = {
2
+ beforeMount: handle,
3
+ updated: handle
4
+ };
5
+ function handle(el, binding) {
6
+ const { form = false } = binding.modifiers;
7
+ const { color = "#ff0000", fontSize = "16px", show = true } = binding.value || {};
8
+ el.style.color = show ? color : "";
9
+ el.style.fontSize = show ? fontSize : "";
10
+ if (form) {
11
+ setCssText(el, show, "--el-text-color-regular", color);
12
+ setCssText(el, show, "--font-size", fontSize);
13
+ }
14
+ }
15
+ function setCssText(el, show, prop, value) {
16
+ let cssText = el.style.cssText;
17
+ if (show) {
18
+ let cssText2 = el.style.cssText;
19
+ if (!~cssText2.indexOf(prop)) {
20
+ cssText2 = `${cssText2};${prop}: ${value}`;
21
+ }
22
+ el.style.cssText = cssText2;
23
+ } else {
24
+ cssText = cssText.replace(`${prop}: ${value};`, "");
25
+ el.style.cssText = cssText;
26
+ }
27
+ }
28
+
29
+ export { Highlight as default };
30
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/highlight/index.ts"],"sourcesContent":["import type {DirectiveBinding, ObjectDirective} from \"vue\";\n\nconst Highlight: ObjectDirective = {\n // 只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。\n beforeMount: handle,\n updated: handle,\n};\n\nfunction handle(el: HTMLElement, binding: DirectiveBinding) {\n const {form = false} = binding.modifiers;\n const {color = '#ff0000', fontSize = '16px', show = true} = binding.value || {};\n el.style.color = show ? color : '';\n el.style.fontSize = show ? fontSize : '';\n if (form) {\n setCssText(el, show, '--el-text-color-regular', color);\n setCssText(el, show, '--font-size', fontSize);\n }\n}\n\nfunction setCssText(el: HTMLElement, show: boolean, prop: string, value: string) {\n let cssText = el.style.cssText;\n if (show) {\n let cssText = el.style.cssText;\n if (!~cssText.indexOf(prop)) {\n cssText = `${cssText};${prop}: ${value}`;\n }\n el.style.cssText = cssText;\n } else {\n cssText = cssText.replace(`${prop}: ${value};`, '');\n el.style.cssText = cssText;\n }\n}\n\nexport default Highlight;\n\n"],"names":[],"mappings":"AAAK,MAAC,SAAS,GAAG;AAClB,EAAE,WAAW,EAAE,MAAM;AACrB,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE;AACF,SAAS,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;AAC7B,EAAE,MAAM,EAAE,IAAI,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC;AAC7C,EAAE,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,QAAQ,GAAG,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AACpF,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;AACrC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,EAAE,CAAC;AAC3C,EAAE,IAAI,IAAI,EAAE;AACZ,IAAI,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE,KAAK,CAAC,CAAC;AAC3D,IAAI,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;AAClD,GAAG;AACH,CAAC;AACD,SAAS,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE;AAC3C,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;AACjC,EAAE,IAAI,IAAI,EAAE;AACZ,IAAI,IAAI,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;AACpC,IAAI,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AAClC,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AACjD,KAAK;AACL,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,QAAQ,CAAC;AAChC,GAAG,MAAM;AACT,IAAI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACxD,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,GAAG;AACH;;;;"}
@@ -0,0 +1,4 @@
1
+ export { default as Download } from './download';
2
+ export { default as Height } from './height';
3
+ export { default as Blur } from './blur';
4
+ export { default as Highlight } from './highlight';
@@ -0,0 +1,5 @@
1
+ export { default as Download } from './download/index.mjs';
2
+ export { default as Height } from './height/index.mjs';
3
+ export { default as Blur } from './blur/index.mjs';
4
+ export { default as Highlight } from './highlight/index.mjs';
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,2 @@
1
+ export * from './use-locale';
2
+ export * from './use-size';
@@ -0,0 +1,3 @@
1
+ export { buildLocaleContext, buildTranslator, localeContextKey, translate, useLocale } from './use-locale/index.mjs';
2
+ export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps } from './use-size/index.mjs';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,15 @@
1
+ import type { MaybeRef } from '@vueuse/core';
2
+ import type { InjectionKey, Ref } from 'vue';
3
+ import type { Language } from 'hzzt-plus/es/locale';
4
+ export declare type TranslatorOption = Record<string, string | number>;
5
+ export declare type Translator = (path: string, option?: TranslatorOption) => string;
6
+ export declare type LocaleContext = {
7
+ locale: Ref<Language>;
8
+ lang: Ref<string>;
9
+ t: Translator;
10
+ };
11
+ export declare const buildTranslator: (locale: MaybeRef<Language>) => Translator;
12
+ export declare const translate: (path: string, option: undefined | TranslatorOption, locale: Language) => string;
13
+ export declare const buildLocaleContext: (locale: MaybeRef<Language>) => LocaleContext;
14
+ export declare const localeContextKey: InjectionKey<Ref<Language | undefined>>;
15
+ export declare const useLocale: (localeOverrides?: Ref<Language | undefined> | undefined) => LocaleContext;
@@ -0,0 +1,26 @@
1
+ import { unref, computed, isRef, ref, inject } from 'vue';
2
+ import { get } from 'lodash-unified';
3
+ import English from '../../locale/lang/en.mjs';
4
+
5
+ const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
6
+ const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
7
+ var _a;
8
+ return `${(_a = option == null ? void 0 : option[key]) != null ? _a : `{${key}}`}`;
9
+ });
10
+ const buildLocaleContext = (locale) => {
11
+ const lang = computed(() => unref(locale).name);
12
+ const localeRef = isRef(locale) ? locale : ref(locale);
13
+ return {
14
+ lang,
15
+ locale: localeRef,
16
+ t: buildTranslator(locale)
17
+ };
18
+ };
19
+ const localeContextKey = Symbol("localeContextKey");
20
+ const useLocale = (localeOverrides) => {
21
+ const locale = localeOverrides || inject(localeContextKey, ref());
22
+ return buildLocaleContext(computed(() => locale.value || English));
23
+ };
24
+
25
+ export { buildLocaleContext, buildTranslator, localeContextKey, translate, useLocale };
26
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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 '@hzzt-plus/locale/lang/en'\n\nimport type { MaybeRef } from '@vueuse/core'\nimport type { InjectionKey, Ref } from 'vue'\nimport type { Language } from '@hzzt-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;;;;"}
@@ -0,0 +1,21 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { ComponentSize } from 'hzzt-plus/es/constants';
3
+ export declare const useSizeProp: {
4
+ readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
5
+ readonly required: false;
6
+ readonly validator: ((val: unknown) => boolean) | undefined;
7
+ __epPropKey: true;
8
+ };
9
+ export declare const useSizeProps: {
10
+ size: {
11
+ readonly type: import("vue").PropType<import("hzzt-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
12
+ readonly required: false;
13
+ readonly validator: ((val: unknown) => boolean) | undefined;
14
+ __epPropKey: true;
15
+ };
16
+ };
17
+ export interface SizeContext {
18
+ size: Ref<ComponentSize>;
19
+ }
20
+ export declare const SIZE_INJECTION_KEY: InjectionKey<SizeContext>;
21
+ export declare const useGlobalSize: () => import("vue").ComputedRef<"" | "default" | "small" | "large">;
@@ -0,0 +1,24 @@
1
+ import { inject, computed, unref } from 'vue';
2
+ import '../../utils/index.mjs';
3
+ import '../../constants/index.mjs';
4
+ import { buildProp } from '../../utils/vue/props/runtime.mjs';
5
+ import { componentSizes } from '../../constants/size.mjs';
6
+
7
+ const useSizeProp = buildProp({
8
+ type: String,
9
+ values: componentSizes,
10
+ required: false
11
+ });
12
+ const useSizeProps = {
13
+ size: useSizeProp
14
+ };
15
+ const SIZE_INJECTION_KEY = Symbol("size");
16
+ const useGlobalSize = () => {
17
+ const injectedSize = inject(SIZE_INJECTION_KEY, {});
18
+ return computed(() => {
19
+ return unref(injectedSize.size) || "";
20
+ });
21
+ };
22
+
23
+ export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps };
24
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-size/index.ts"],"sourcesContent":["import { computed, inject, unref } from 'vue'\nimport { buildProp } from '@hzzt-plus/utils'\nimport { componentSizes } from '@hzzt-plus/constants'\n\nimport type { InjectionKey, Ref } from 'vue'\nimport type { ComponentSize } from '@hzzt-plus/constants'\n\nexport const useSizeProp = buildProp({\n type: String,\n values: componentSizes,\n required: false,\n} as const)\n\nexport const useSizeProps = {\n size: useSizeProp,\n}\n\nexport interface SizeContext {\n size: Ref<ComponentSize>\n}\n\nexport const SIZE_INJECTION_KEY: InjectionKey<SizeContext> = Symbol('size')\n\nexport const useGlobalSize = () => {\n const injectedSize = inject(SIZE_INJECTION_KEY, {} as SizeContext)\n\n return computed<ComponentSize>(() => {\n return unref(injectedSize.size) || ''\n })\n}\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,WAAW,GAAG,SAAS,CAAC;AACrC,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,MAAM,EAAE,cAAc;AACxB,EAAE,QAAQ,EAAE,KAAK;AACjB,CAAC,EAAE;AACS,MAAC,YAAY,GAAG;AAC5B,EAAE,IAAI,EAAE,WAAW;AACnB,EAAE;AACU,MAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE;AACrC,MAAC,aAAa,GAAG,MAAM;AACnC,EAAE,MAAM,YAAY,GAAG,MAAM,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AACtD,EAAE,OAAO,QAAQ,CAAC,MAAM;AACxB,IAAI,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAC1C,GAAG,CAAC,CAAC;AACL;;;;"}
package/es/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import installer from './defaults';
2
2
  export * from 'hzzt-plus/es/components';
3
+ export * from 'hzzt-plus/es/constants';
4
+ export * from 'hzzt-plus/es/directives';
5
+ export * from 'hzzt-plus/es/hooks';
3
6
  export * from './make-installer';
4
- export declare const install: (app: import("vue").App<any>) => void;
7
+ export declare const install: (app: import("vue").App<any>, options?: Partial<import("hzzt-plus/es/components").ConfigProviderProps> | undefined) => void;
5
8
  export declare const version: string;
6
9
  export default installer;
package/es/index.mjs CHANGED
@@ -1,8 +1,27 @@
1
1
  import installer from './defaults.mjs';
2
2
  export { default } from './defaults.mjs';
3
- import './packages/components/index.mjs';
3
+ import './components/index.mjs';
4
+ import './constants/index.mjs';
5
+ import './directives/index.mjs';
6
+ import './hooks/index.mjs';
4
7
  export { makeInstaller } from './make-installer.mjs';
5
- export { HzztTitle } from './packages/components/title/index.mjs';
8
+ export { HzztTitle } from './components/title/index.mjs';
9
+ export { HzztDropdown } from './components/dropdown/index.mjs';
10
+ export { HzztCollapse } from './components/collapse/index.mjs';
11
+ export { configProviderProps } from './components/config-provider/src/config-provider-props.mjs';
12
+ export { configProviderContextKey } from './components/config-provider/src/constants.mjs';
13
+ export { provideGlobalConfig, useGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
14
+ export { HzztConfigProvider } from './components/config-provider/index.mjs';
15
+ export { HzztTab } from './components/tab/index.mjs';
16
+ export { INSTALLED_KEY } from './constants/key.mjs';
17
+ export { componentSizeMap, componentSizes } from './constants/size.mjs';
18
+ export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
19
+ export { default as Download } from './directives/download/index.mjs';
20
+ export { default as Height } from './directives/height/index.mjs';
21
+ export { default as Blur } from './directives/blur/index.mjs';
22
+ export { default as Highlight } from './directives/highlight/index.mjs';
23
+ export { buildLocaleContext, buildTranslator, localeContextKey, translate, useLocale } from './hooks/use-locale/index.mjs';
24
+ export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps } from './hooks/use-size/index.mjs';
6
25
 
7
26
  const install = installer.install;
8
27
  const version = installer.version;
package/es/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
@@ -5,5 +5,5 @@ export declare type TranslatePair = {
5
5
  };
6
6
  export declare type Language = {
7
7
  name: string;
8
- el: TranslatePair;
8
+ hzzt: TranslatePair;
9
9
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,10 @@
1
1
  declare const _default: {
2
2
  name: string;
3
- hzzt: {};
3
+ hzzt: {
4
+ collapse: {
5
+ expand: string;
6
+ retract: string;
7
+ };
8
+ };
4
9
  };
5
10
  export default _default;
@@ -0,0 +1,12 @@
1
+ var English = {
2
+ name: "en",
3
+ hzzt: {
4
+ collapse: {
5
+ expand: "expand",
6
+ retract: "retract"
7
+ }
8
+ }
9
+ };
10
+
11
+ export { English as default };
12
+ //# sourceMappingURL=en.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.mjs","sources":["../../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n }\n },\n}\n"],"names":[],"mappings":"AAAA,cAAe;AACf,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,QAAQ;AACtB,MAAM,OAAO,EAAE,SAAS;AACxB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -1,5 +1,10 @@
1
1
  declare const _default: {
2
2
  name: string;
3
- hzzt: {};
3
+ hzzt: {
4
+ collapse: {
5
+ expand: string;
6
+ retract: string;
7
+ };
8
+ };
4
9
  };
5
10
  export default _default;
@@ -1,6 +1,11 @@
1
1
  var zhCn = {
2
2
  name: "zh-cn",
3
- hzzt: {}
3
+ hzzt: {
4
+ collapse: {
5
+ expand: "\u5C55\u5F00",
6
+ retract: "\u6536\u8D77"
7
+ }
8
+ }
4
9
  };
5
10
 
6
11
  export { zhCn as default };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-cn.mjs","sources":["../../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n }\n },\n}\n"],"names":[],"mappings":"AAAA,WAAe;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,OAAO,EAAE,cAAc;AAC7B,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -0,0 +1 @@
1
+ export * from 'hzzt-plus/es/locale';
package/es/locales.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import './locale/index.mjs';
2
+ export { default as en } from './locale/lang/en.mjs';
3
+ export { default as zhCn } from './locale/lang/zh-cn.mjs';
4
+ //# sourceMappingURL=locales.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,5 +1,5 @@
1
1
  import type { App, Plugin } from '@vue/runtime-core';
2
2
  export declare const makeInstaller: (components?: Plugin[]) => {
3
3
  version: string;
4
- install: (app: App) => void;
4
+ install: (app: App, options?: Partial<import("hzzt-plus/es/components/config-provider").ConfigProviderProps> | undefined) => void;
5
5
  };
@@ -1,13 +1,17 @@
1
- import './packages/constants/index.mjs';
1
+ import './components/config-provider/index.mjs';
2
+ import './constants/index.mjs';
2
3
  import { version } from './version.mjs';
3
- import { INSTALLED_KEY } from './packages/constants/key.mjs';
4
+ import { INSTALLED_KEY } from './constants/key.mjs';
5
+ import { provideGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
4
6
 
5
7
  const makeInstaller = (components = []) => {
6
- const install = (app) => {
8
+ const install = (app, options) => {
7
9
  if (app[INSTALLED_KEY])
8
10
  return;
9
11
  app[INSTALLED_KEY] = true;
10
12
  components.forEach((c) => app.use(c));
13
+ if (options)
14
+ provideGlobalConfig(options, app, true);
11
15
  };
12
16
  return {
13
17
  version,
@@ -1 +1 @@
1
- {"version":3,"file":"make-installer.mjs","sources":["../../../packages/hzzt-plus/make-installer.ts"],"sourcesContent":["import { INSTALLED_KEY } from '@hzzt-plus/constants'\nimport { version } from './version'\n\nimport type { App, Plugin } from '@vue/runtime-core'\n\nexport const makeInstaller = (components: Plugin[] = []) => {\n const install = (app: App) => {\n if (app[INSTALLED_KEY]) return\n\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n }\n\n return {\n version,\n install,\n }\n}\n"],"names":[],"mappings":";;;;AAEY,MAAC,aAAa,GAAG,CAAC,UAAU,GAAG,EAAE,KAAK;AAClD,EAAE,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK;AAC3B,IAAI,IAAI,GAAG,CAAC,aAAa,CAAC;AAC1B,MAAM,OAAO;AACb,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;AAC9B,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1C,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"make-installer.mjs","sources":["../../../packages/hzzt-plus/make-installer.ts"],"sourcesContent":["import { provideGlobalConfig } from '@hzzt-plus/components/config-provider'\nimport { INSTALLED_KEY } from '@hzzt-plus/constants'\nimport { version } from './version'\n\nimport type { App, Plugin } from '@vue/runtime-core'\nimport type { ConfigProviderContext } from '@hzzt-plus/components/config-provider'\n\nexport const makeInstaller = (components: Plugin[] = []) => {\n const install = (app: App, options?: ConfigProviderContext) => {\n if (app[INSTALLED_KEY]) return\n\n app[INSTALLED_KEY] = true\n components.forEach((c) => app.use(c))\n\n if (options) provideGlobalConfig(options, app, true)\n }\n\n return {\n version,\n install,\n }\n}\n"],"names":[],"mappings":";;;;;;AAGY,MAAC,aAAa,GAAG,CAAC,UAAU,GAAG,EAAE,KAAK;AAClD,EAAE,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK;AACpC,IAAI,IAAI,GAAG,CAAC,aAAa,CAAC;AAC1B,MAAM,OAAO;AACb,IAAI,GAAG,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;AAC9B,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1C,IAAI,IAAI,OAAO;AACf,MAAM,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAC9C,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,OAAO;AACX,IAAI,OAAO;AACX,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrays.mjs","sources":["../../../../packages/utils/arrays.ts"],"sourcesContent":["export const unique = <T>(arr: T[]) => [...new Set(arr)]\n\ntype Many<T> = T | ReadonlyArray<T>\n// TODO: rename to `ensureArray`\n/** like `_.castArray`, except falsy value returns empty array. */\nexport const castArray = <T>(arr: Many<T>): T[] => {\n if (!arr && (arr as any) !== 0) return []\n return Array.isArray(arr) ? arr : [arr]\n}\n\n// TODO: remove import alias\n// avoid naming conflicts\nexport { castArray as ensureArray } from 'lodash-unified'\n"],"names":[],"mappings":";;AAAY,MAAC,MAAM,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,EAAE;AACrC,MAAC,SAAS,GAAG,CAAC,GAAG,KAAK;AAClC,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AACvB,IAAI,OAAO,EAAE,CAAC;AACd,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;AAC1C;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.mjs","sources":["../../../../packages/utils/browser.ts"],"sourcesContent":["import { isClient, isIOS } from '@vueuse/core'\n\nexport const isFirefox = (): boolean =>\n isClient && /firefox/i.test(window.navigator.userAgent)\n\nexport { isClient, isIOS }\n"],"names":[],"mappings":";;;AACY,MAAC,SAAS,GAAG,MAAM,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS;;;;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria.mjs","sources":["../../../../../packages/utils/dom/aria.ts"],"sourcesContent":["const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`\n\n/**\n * Determine if the testing element is visible on screen no matter if its on the viewport or not\n */\nexport const isVisible = (element: HTMLElement) => {\n if (process.env.NODE_ENV === 'test') return true\n const computed = getComputedStyle(element)\n // element.offsetParent won't work on fix positioned\n // WARNING: potential issue here, going to need some expert advices on this issue\n return computed.position === 'fixed' ? false : element.offsetParent !== null\n}\n\nexport const obtainAllFocusableElements = (\n element: HTMLElement\n): HTMLElement[] => {\n return Array.from(\n element.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENT_SELECTORS)\n ).filter((item: HTMLElement) => isFocusable(item) && isVisible(item))\n}\n\n/**\n * @desc Determine if target element is focusable\n * @param element {HTMLElement}\n * @returns {Boolean} true if it is focusable\n */\nexport const isFocusable = (element: HTMLElement): boolean => {\n if (\n element.tabIndex > 0 ||\n (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)\n ) {\n return true\n }\n // HTMLButtonElement has disabled\n if ((element as HTMLButtonElement).disabled) {\n return false\n }\n\n switch (element.nodeName) {\n case 'A': {\n // casting current element to Specific HTMLElement in order to be more type precise\n return (\n !!(element as HTMLAnchorElement).href &&\n (element as HTMLAnchorElement).rel !== 'ignore'\n )\n }\n case 'INPUT': {\n return !(\n (element as HTMLInputElement).type === 'hidden' ||\n (element as HTMLInputElement).type === 'file'\n )\n }\n case 'BUTTON':\n case 'SELECT':\n case 'TEXTAREA': {\n return true\n }\n default: {\n return false\n }\n }\n}\n\n/**\n * @desc Set Attempt to set focus on the current node.\n * @param element\n * The node to attempt to focus on.\n * @returns\n * true if element is focused.\n */\nexport const attemptFocus = (element: HTMLElement): boolean => {\n if (!isFocusable(element)) {\n return false\n }\n // Remove the old try catch block since there will be no error to be thrown\n element.focus?.()\n return document.activeElement === element\n}\n\n/**\n * Trigger an event\n * mouseenter, mouseleave, mouseover, keyup, change, click, etc.\n * @param {HTMLElement} elm\n * @param {String} name\n * @param {*} opts\n */\nexport const triggerEvent = function (\n elm: HTMLElement,\n name: string,\n ...opts: Array<boolean>\n): HTMLElement {\n let eventName: string\n\n if (name.includes('mouse') || name.includes('click')) {\n eventName = 'MouseEvents'\n } else if (name.includes('key')) {\n eventName = 'KeyboardEvent'\n } else {\n eventName = 'HTMLEvents'\n }\n const evt = document.createEvent(eventName)\n\n evt.initEvent(name, ...opts)\n elm.dispatchEvent(evt)\n return elm\n}\n\nexport const isLeaf = (el: HTMLElement) => !el.getAttribute('aria-owns')\n\nexport const getSibling = (\n el: HTMLElement,\n distance: number,\n elClass: string\n) => {\n const { parentNode } = el\n if (!parentNode) return null\n const siblings = parentNode.querySelectorAll(elClass)\n const index = Array.prototype.indexOf.call(siblings, el)\n return siblings[index + distance] || null\n}\n\nexport const focusNode = (el: HTMLElement) => {\n if (!el) return\n el.focus()\n !isLeaf(el) && el.click()\n}\n"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"element.mjs","sources":["../../../../../packages/utils/dom/element.ts"],"sourcesContent":["import { isString } from '../types'\nimport { isClient } from '../browser'\n\ntype GetElement = <T extends string | HTMLElement | Window | null | undefined>(\n target: T\n) => T extends string ? HTMLElement | null : T\n\nexport const getElement = ((\n target: string | HTMLElement | Window | null | undefined\n) => {\n if (!isClient || target === '') return null\n if (isString(target)) {\n try {\n return document.querySelector<HTMLElement>(target)\n } catch {\n return null\n }\n }\n return target\n}) as GetElement\n"],"names":[],"mappings":";;;;;AAEY,MAAC,UAAU,GAAG,CAAC,MAAM,KAAK;AACtC,EAAE,IAAI,CAAC,QAAQ,IAAI,MAAM,KAAK,EAAE;AAChC,IAAI,OAAO,IAAI,CAAC;AAChB,EAAE,IAAI,QAAQ,CAAC,MAAM,CAAC,EAAE;AACxB,IAAI,IAAI;AACR,MAAM,OAAO,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAC5C,KAAK,CAAC,OAAO,CAAC,EAAE;AAChB,MAAM,OAAO,IAAI,CAAC;AAClB,KAAK;AACL,GAAG;AACH,EAAE,OAAO,MAAM,CAAC;AAChB;;;;"}