hzzt-plus 0.0.2 → 0.0.4

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 (280) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +13679 -406
  3. package/dist/index.full.min.js +25 -17
  4. package/dist/index.full.min.js.map +1 -1
  5. package/dist/index.full.min.mjs +26 -18
  6. package/dist/index.full.min.mjs.map +1 -1
  7. package/dist/index.full.mjs +13660 -397
  8. package/dist/locale/en.js +11 -0
  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 +11 -0
  14. package/dist/locale/zh-cn.js +11 -0
  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 +11 -0
  20. package/es/component.mjs +11 -1
  21. package/es/component.mjs.map +1 -1
  22. package/es/components/collapse/index.d.ts +1 -3
  23. package/es/components/collapse/index.mjs +2 -1
  24. package/es/components/collapse/index.mjs.map +1 -1
  25. package/es/components/collapse/src/collapse.d.ts +2 -0
  26. package/es/components/collapse/src/{index.mjs → collapse.mjs} +3 -4
  27. package/es/components/collapse/src/collapse.mjs.map +1 -0
  28. package/es/components/collapse/src/{index.vue.d.ts → collapse.vue.d.ts} +0 -3
  29. package/es/components/collapse/src/collapse2.mjs +2 -0
  30. package/es/components/collapse/src/collapse2.mjs.map +1 -0
  31. package/es/components/config-provider/src/config-provider.mjs.map +1 -1
  32. package/es/components/config-provider/src/hooks/use-global-config.mjs.map +1 -1
  33. package/es/components/confirm-password/index.d.ts +556 -0
  34. package/es/components/confirm-password/index.mjs +8 -0
  35. package/es/components/confirm-password/index.mjs.map +1 -0
  36. package/es/components/confirm-password/src/confirm-password.mjs +72 -0
  37. package/es/components/confirm-password/src/confirm-password.mjs.map +1 -0
  38. package/es/components/confirm-password/src/confirm-password.vue.d.ts +556 -0
  39. package/es/components/confirm-password/style/css.d.ts +2 -0
  40. package/es/components/confirm-password/style/css.mjs +3 -0
  41. package/es/components/confirm-password/style/css.mjs.map +1 -0
  42. package/es/components/confirm-password/style/index.d.ts +2 -0
  43. package/es/components/confirm-password/style/index.mjs +3 -0
  44. package/es/components/confirm-password/style/index.mjs.map +1 -0
  45. package/es/components/dropdown/index.mjs.map +1 -1
  46. package/es/components/dropdown/src/index.mjs +18 -12
  47. package/es/components/dropdown/src/index.mjs.map +1 -1
  48. package/es/components/icon/index.d.ts +5 -0
  49. package/es/components/icon/index.mjs +17 -0
  50. package/es/components/icon/index.mjs.map +1 -0
  51. package/es/components/icon/src/index.mjs +34 -0
  52. package/es/components/icon/src/index.mjs.map +1 -0
  53. package/es/components/icon/src/index.vue.d.ts +138 -0
  54. package/es/components/icon/style/css.d.ts +2 -0
  55. package/es/components/icon/style/css.mjs +3 -0
  56. package/es/components/icon/style/css.mjs.map +1 -0
  57. package/es/components/icon/style/index.d.ts +2 -0
  58. package/es/components/icon/style/index.mjs +3 -0
  59. package/es/components/icon/style/index.mjs.map +1 -0
  60. package/es/components/index.d.ts +5 -0
  61. package/es/components/index.mjs +5 -0
  62. package/es/components/index.mjs.map +1 -1
  63. package/es/components/page-size/index.d.ts +3570 -0
  64. package/es/components/page-size/index.mjs +8 -0
  65. package/es/components/page-size/index.mjs.map +1 -0
  66. package/es/components/page-size/src/index.mjs +157 -0
  67. package/es/components/page-size/src/index.mjs.map +1 -0
  68. package/es/components/page-size/src/index.vue.d.ts +3570 -0
  69. package/es/components/page-size/style/css.d.ts +2 -0
  70. package/es/components/page-size/style/css.mjs +3 -0
  71. package/es/components/page-size/style/css.mjs.map +1 -0
  72. package/es/components/page-size/style/index.d.ts +2 -0
  73. package/es/components/page-size/style/index.mjs +3 -0
  74. package/es/components/page-size/style/index.mjs.map +1 -0
  75. package/es/components/pagination/index.d.ts +180 -0
  76. package/es/components/pagination/index.mjs +8 -0
  77. package/es/components/pagination/index.mjs.map +1 -0
  78. package/es/components/pagination/src/index.mjs +68 -0
  79. package/es/components/pagination/src/index.mjs.map +1 -0
  80. package/es/components/pagination/src/index.vue.d.ts +180 -0
  81. package/es/components/pagination/style/css.d.ts +2 -0
  82. package/es/components/pagination/style/css.mjs +3 -0
  83. package/es/components/pagination/style/css.mjs.map +1 -0
  84. package/es/components/pagination/style/index.d.ts +2 -0
  85. package/es/components/pagination/style/index.mjs +3 -0
  86. package/es/components/pagination/style/index.mjs.map +1 -0
  87. package/es/components/tab/index.mjs.map +1 -1
  88. package/es/components/tab/src/index.mjs +3 -3
  89. package/es/components/tab/src/index.mjs.map +1 -1
  90. package/es/components/title/index.mjs +1 -1
  91. package/es/components/title/index.mjs.map +1 -1
  92. package/es/components/title/src/{index.mjs → title.mjs} +2 -2
  93. package/es/components/title/src/title.mjs.map +1 -0
  94. package/es/components/tooltip/index.d.ts +1601 -0
  95. package/es/components/tooltip/index.mjs +8 -0
  96. package/es/components/tooltip/index.mjs.map +1 -0
  97. package/es/components/tooltip/src/instance.d.ts +2 -0
  98. package/es/components/tooltip/src/instance.mjs +2 -0
  99. package/es/components/tooltip/src/instance.mjs.map +1 -0
  100. package/es/components/tooltip/src/tooltip.mjs +49 -0
  101. package/es/components/tooltip/src/tooltip.mjs.map +1 -0
  102. package/es/components/tooltip/src/tooltip.vue.d.ts +1600 -0
  103. package/es/components/tooltip/style/css.d.ts +2 -0
  104. package/es/components/tooltip/style/css.mjs +3 -0
  105. package/es/components/tooltip/style/css.mjs.map +1 -0
  106. package/es/components/tooltip/style/index.d.ts +2 -0
  107. package/es/components/tooltip/style/index.mjs +3 -0
  108. package/es/components/tooltip/style/index.mjs.map +1 -0
  109. package/es/directives/blur/index.mjs.map +1 -1
  110. package/es/directives/download/index.mjs.map +1 -1
  111. package/es/directives/drag/index.d.ts +3 -0
  112. package/es/directives/drag/index.mjs +81 -0
  113. package/es/directives/drag/index.mjs.map +1 -0
  114. package/es/directives/height/index.mjs +3 -3
  115. package/es/directives/height/index.mjs.map +1 -1
  116. package/es/directives/highlight/index.d.ts +1 -1
  117. package/es/directives/highlight/index.mjs +5 -1
  118. package/es/directives/highlight/index.mjs.map +1 -1
  119. package/es/directives/index.d.ts +1 -0
  120. package/es/directives/index.mjs +1 -0
  121. package/es/directives/index.mjs.map +1 -1
  122. package/es/hooks/index.d.ts +1 -0
  123. package/es/hooks/index.mjs +1 -0
  124. package/es/hooks/index.mjs.map +1 -1
  125. package/es/hooks/use-namespace/index.d.ts +23 -0
  126. package/es/hooks/use-namespace/index.mjs +77 -0
  127. package/es/hooks/use-namespace/index.mjs.map +1 -0
  128. package/es/index.mjs +7 -0
  129. package/es/index.mjs.map +1 -1
  130. package/es/locale/lang/en.d.ts +11 -0
  131. package/es/locale/lang/en.mjs +11 -0
  132. package/es/locale/lang/en.mjs.map +1 -1
  133. package/es/locale/lang/zh-cn.d.ts +11 -0
  134. package/es/locale/lang/zh-cn.mjs +11 -0
  135. package/es/locale/lang/zh-cn.mjs.map +1 -1
  136. package/es/plugin.mjs.map +1 -1
  137. package/global.d.ts +5 -0
  138. package/lib/component.js +11 -1
  139. package/lib/component.js.map +1 -1
  140. package/lib/components/collapse/index.d.ts +1 -3
  141. package/lib/components/collapse/index.js +3 -2
  142. package/lib/components/collapse/index.js.map +1 -1
  143. package/lib/components/collapse/src/collapse.d.ts +2 -0
  144. package/lib/components/collapse/src/{index.js → collapse.js} +2 -3
  145. package/lib/components/collapse/src/collapse.js.map +1 -0
  146. package/lib/components/collapse/src/{index.vue.d.ts → collapse.vue.d.ts} +0 -3
  147. package/lib/components/collapse/src/collapse2.js +3 -0
  148. package/lib/components/collapse/src/collapse2.js.map +1 -0
  149. package/lib/components/config-provider/src/config-provider.js.map +1 -1
  150. package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
  151. package/lib/components/confirm-password/index.d.ts +556 -0
  152. package/lib/components/confirm-password/index.js +13 -0
  153. package/lib/components/confirm-password/index.js.map +1 -0
  154. package/lib/components/confirm-password/src/confirm-password.js +76 -0
  155. package/lib/components/confirm-password/src/confirm-password.js.map +1 -0
  156. package/lib/components/confirm-password/src/confirm-password.vue.d.ts +556 -0
  157. package/lib/components/confirm-password/style/css.d.ts +2 -0
  158. package/lib/components/confirm-password/style/css.js +6 -0
  159. package/lib/components/confirm-password/style/css.js.map +1 -0
  160. package/lib/components/confirm-password/style/index.d.ts +2 -0
  161. package/lib/components/confirm-password/style/index.js +6 -0
  162. package/lib/components/confirm-password/style/index.js.map +1 -0
  163. package/lib/components/dropdown/index.js.map +1 -1
  164. package/lib/components/dropdown/src/index.js +18 -12
  165. package/lib/components/dropdown/src/index.js.map +1 -1
  166. package/lib/components/icon/index.d.ts +5 -0
  167. package/lib/components/icon/index.js +42 -0
  168. package/lib/components/icon/index.js.map +1 -0
  169. package/lib/components/icon/src/index.js +38 -0
  170. package/lib/components/icon/src/index.js.map +1 -0
  171. package/lib/components/icon/src/index.vue.d.ts +138 -0
  172. package/lib/components/icon/style/css.d.ts +2 -0
  173. package/lib/components/icon/style/css.js +6 -0
  174. package/lib/components/icon/style/css.js.map +1 -0
  175. package/lib/components/icon/style/index.d.ts +2 -0
  176. package/lib/components/icon/style/index.js +6 -0
  177. package/lib/components/icon/style/index.js.map +1 -0
  178. package/lib/components/index.d.ts +5 -0
  179. package/lib/components/index.js +10 -0
  180. package/lib/components/index.js.map +1 -1
  181. package/lib/components/page-size/index.d.ts +3570 -0
  182. package/lib/components/page-size/index.js +13 -0
  183. package/lib/components/page-size/index.js.map +1 -0
  184. package/lib/components/page-size/src/index.js +161 -0
  185. package/lib/components/page-size/src/index.js.map +1 -0
  186. package/lib/components/page-size/src/index.vue.d.ts +3570 -0
  187. package/lib/components/page-size/style/css.d.ts +2 -0
  188. package/lib/components/page-size/style/css.js +6 -0
  189. package/lib/components/page-size/style/css.js.map +1 -0
  190. package/lib/components/page-size/style/index.d.ts +2 -0
  191. package/lib/components/page-size/style/index.js +6 -0
  192. package/lib/components/page-size/style/index.js.map +1 -0
  193. package/lib/components/pagination/index.d.ts +180 -0
  194. package/lib/components/pagination/index.js +13 -0
  195. package/lib/components/pagination/index.js.map +1 -0
  196. package/lib/components/pagination/src/index.js +72 -0
  197. package/lib/components/pagination/src/index.js.map +1 -0
  198. package/lib/components/pagination/src/index.vue.d.ts +180 -0
  199. package/lib/components/pagination/style/css.d.ts +2 -0
  200. package/lib/components/pagination/style/css.js +6 -0
  201. package/lib/components/pagination/style/css.js.map +1 -0
  202. package/lib/components/pagination/style/index.d.ts +2 -0
  203. package/lib/components/pagination/style/index.js +6 -0
  204. package/lib/components/pagination/style/index.js.map +1 -0
  205. package/lib/components/tab/index.js.map +1 -1
  206. package/lib/components/tab/src/index.js +3 -3
  207. package/lib/components/tab/src/index.js.map +1 -1
  208. package/lib/components/title/index.js +2 -2
  209. package/lib/components/title/index.js.map +1 -1
  210. package/lib/components/title/src/{index.js → title.js} +2 -2
  211. package/lib/components/title/src/title.js.map +1 -0
  212. package/lib/components/tooltip/index.d.ts +1601 -0
  213. package/lib/components/tooltip/index.js +13 -0
  214. package/lib/components/tooltip/index.js.map +1 -0
  215. package/lib/components/tooltip/src/instance.d.ts +2 -0
  216. package/lib/components/tooltip/src/instance.js +3 -0
  217. package/lib/components/tooltip/src/instance.js.map +1 -0
  218. package/lib/components/tooltip/src/tooltip.js +53 -0
  219. package/lib/components/tooltip/src/tooltip.js.map +1 -0
  220. package/lib/components/tooltip/src/tooltip.vue.d.ts +1600 -0
  221. package/lib/components/tooltip/style/css.d.ts +2 -0
  222. package/lib/components/tooltip/style/css.js +6 -0
  223. package/lib/components/tooltip/style/css.js.map +1 -0
  224. package/lib/components/tooltip/style/index.d.ts +2 -0
  225. package/lib/components/tooltip/style/index.js +6 -0
  226. package/lib/components/tooltip/style/index.js.map +1 -0
  227. package/lib/directives/blur/index.js.map +1 -1
  228. package/lib/directives/download/index.js.map +1 -1
  229. package/lib/directives/drag/index.d.ts +3 -0
  230. package/lib/directives/drag/index.js +85 -0
  231. package/lib/directives/drag/index.js.map +1 -0
  232. package/lib/directives/height/index.js +3 -3
  233. package/lib/directives/height/index.js.map +1 -1
  234. package/lib/directives/highlight/index.d.ts +1 -1
  235. package/lib/directives/highlight/index.js +5 -1
  236. package/lib/directives/highlight/index.js.map +1 -1
  237. package/lib/directives/index.d.ts +1 -0
  238. package/lib/directives/index.js +2 -0
  239. package/lib/directives/index.js.map +1 -1
  240. package/lib/hooks/index.d.ts +1 -0
  241. package/lib/hooks/index.js +5 -0
  242. package/lib/hooks/index.js.map +1 -1
  243. package/lib/hooks/use-namespace/index.d.ts +23 -0
  244. package/lib/hooks/use-namespace/index.js +84 -0
  245. package/lib/hooks/use-namespace/index.js.map +1 -0
  246. package/lib/index.js +36 -19
  247. package/lib/index.js.map +1 -1
  248. package/lib/locale/lang/en.d.ts +11 -0
  249. package/lib/locale/lang/en.js +11 -0
  250. package/lib/locale/lang/en.js.map +1 -1
  251. package/lib/locale/lang/zh-cn.d.ts +11 -0
  252. package/lib/locale/lang/zh-cn.js +11 -0
  253. package/lib/locale/lang/zh-cn.js.map +1 -1
  254. package/lib/plugin.js.map +1 -1
  255. package/lib/utils/vue/icon.js +14 -14
  256. package/lib/utils/vue/icon.js.map +1 -1
  257. package/package.json +1 -1
  258. package/theme/base.css +1 -1
  259. package/theme/hzzt-confirm-password.css +0 -0
  260. package/theme/hzzt-icon.css +0 -0
  261. package/theme/hzzt-page-size.css +1 -0
  262. package/theme/hzzt-pagination.css +1 -0
  263. package/theme/hzzt-tooltip.css +0 -0
  264. package/theme/index.css +1 -1
  265. package/theme/src/base.scss +4 -3
  266. package/theme/src/common/display.scss +1 -1
  267. package/theme/src/common/font.scss +6 -0
  268. package/theme/src/common/index.scss +48 -0
  269. package/theme/src/confirm-password.scss +0 -0
  270. package/theme/src/icon.scss +0 -0
  271. package/theme/src/index.scss +6 -0
  272. package/theme/src/page-size.scss +86 -0
  273. package/theme/src/pagination.scss +17 -0
  274. package/theme/src/tooltip.scss +0 -0
  275. package/es/components/collapse/src/index.mjs.map +0 -1
  276. package/es/components/title/src/index.mjs.map +0 -1
  277. package/lib/components/collapse/src/index.js.map +0 -1
  278. package/lib/components/title/src/index.js.map +0 -1
  279. /package/es/components/title/src/{index.vue.d.ts → title.vue.d.ts} +0 -0
  280. /package/lib/components/title/src/{index.vue.d.ts → title.vue.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ import 'hzzt-plus/es/components/base/style/css';
2
+ import 'hzzt-plus/theme/hzzt-tooltip.css';
@@ -0,0 +1,3 @@
1
+ import '../../base/style/css.mjs';
2
+ import 'hzzt-plus/theme/hzzt-tooltip.css';
3
+ //# sourceMappingURL=css.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,2 @@
1
+ import 'hzzt-plus/es/components/base/style';
2
+ import 'hzzt-plus/theme/src/tooltip.scss';
@@ -0,0 +1,3 @@
1
+ import '../../base/style/index.mjs';
2
+ import 'hzzt-plus/theme/src/tooltip.scss';
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +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;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/blur/index.ts"],"sourcesContent":["import type { ObjectDirective } 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;;;;"}
@@ -1 +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;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/download/index.ts"],"sourcesContent":["import type { DirectiveBinding, ObjectDirective } from 'vue'\n\ntype DocumentHandler = (e: Event) => void\nlet handler: DocumentHandler\nconst Download: ObjectDirective = {\n // 只调用一次,指令第一次绑定到元素时调用。在这里可以进行一次性的初始化设置。\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n const { path, name = 'download' } = binding.value || {}\n\n handler = function (e: Event) {\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"],"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 Drag: ObjectDirective;
3
+ export default Drag;
@@ -0,0 +1,81 @@
1
+ const Drag = {
2
+ mounted(el, binding) {
3
+ let callback = binding.value;
4
+ if (!callback) {
5
+ callback = () => ({});
6
+ }
7
+ initMouseEvent(el, callback);
8
+ },
9
+ updated(el, binding) {
10
+ let callback = binding.value;
11
+ if (!callback) {
12
+ callback = () => ({});
13
+ }
14
+ initMouseEvent(el, callback);
15
+ },
16
+ unmounted(el) {
17
+ el.onmousedown = null;
18
+ el.onmousemove = null;
19
+ el.onmouseup = null;
20
+ }
21
+ };
22
+ function initMouseEvent(el, callback) {
23
+ let startPoint = null;
24
+ let endPoint = null;
25
+ let roiDiv = null;
26
+ const onMousedown = (e) => {
27
+ if (e.ctrlKey) {
28
+ startPoint = { x: e.x, y: e.y };
29
+ document.onselectstart = () => false;
30
+ document.ondragstart = () => false;
31
+ } else {
32
+ removeRoi();
33
+ startPoint = null;
34
+ endPoint = null;
35
+ }
36
+ };
37
+ const onMousemove = (e) => {
38
+ if (e.ctrlKey && startPoint) {
39
+ endPoint = { x: e.x, y: e.y };
40
+ removeRoi();
41
+ createRoi();
42
+ } else {
43
+ removeRoi();
44
+ startPoint = null;
45
+ endPoint = null;
46
+ document.onselectstart = null;
47
+ document.ondragstart = null;
48
+ }
49
+ };
50
+ const onMouseup = () => {
51
+ if (roiDiv) {
52
+ callback(roiDiv.getBoundingClientRect());
53
+ }
54
+ document.onselectstart = null;
55
+ document.ondragstart = null;
56
+ removeRoi();
57
+ startPoint = null;
58
+ endPoint = null;
59
+ };
60
+ function removeRoi() {
61
+ if (roiDiv && document.body.contains(roiDiv)) {
62
+ document.body.removeChild(roiDiv);
63
+ }
64
+ roiDiv = null;
65
+ }
66
+ function createRoi() {
67
+ roiDiv = document.createElement("div");
68
+ const distX = endPoint.x - startPoint.x;
69
+ const distY = endPoint.y - startPoint.y;
70
+ const left = startPoint.x < endPoint.x ? startPoint.x : endPoint.x;
71
+ const top = startPoint.y < endPoint.y ? startPoint.y : endPoint.y;
72
+ roiDiv.style.cssText = `position: fixed;z-index: 9999;width: ${Math.abs(distX)}px;height: ${Math.abs(distY)}px;border: 1px solid #0655c3;left: ${left}px;top: ${top}px;pointer-events: none;`;
73
+ document.body.appendChild(roiDiv);
74
+ }
75
+ el.onmousedown = onMousedown;
76
+ el.onmousemove = onMousemove;
77
+ el.onmouseup = onMouseup;
78
+ }
79
+
80
+ export { Drag as default };
81
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/drag/index.ts"],"sourcesContent":["import type { DirectiveBinding, ObjectDirective } from 'vue'\n\ntype Point = {\n x: number\n y: number\n}\n\ntype CallbackHandler = (rect?: DOMRect) => void\n\nconst Drag: ObjectDirective = {\n // 当被绑定的元素插入到 DOM 中时……\n mounted(el: HTMLElement, binding: DirectiveBinding) {\n let callback = binding.value\n if (!callback) {\n callback = () => ({})\n }\n\n initMouseEvent(el, callback)\n },\n updated(el: HTMLElement, binding: DirectiveBinding) {\n let callback = binding.value\n if (!callback) {\n callback = () => ({})\n }\n initMouseEvent(el, callback)\n },\n // 只调用一次,指令与元素解绑时调用。\n unmounted(el: HTMLElement) {\n el.onmousedown = null\n el.onmousemove = null\n el.onmouseup = null\n },\n}\n\nfunction initMouseEvent(el: HTMLElement, callback: CallbackHandler) {\n let startPoint: Point | null = null\n let endPoint: Point | null = null\n let roiDiv: HTMLDivElement | null = null\n\n const onMousedown = (e: MouseEvent) => {\n if (e.ctrlKey) {\n startPoint = { x: e.x, y: e.y }\n document.onselectstart = () => false\n document.ondragstart = () => false\n } else {\n removeRoi()\n startPoint = null\n endPoint = null\n }\n }\n\n const onMousemove = (e: MouseEvent) => {\n if (e.ctrlKey && startPoint) {\n endPoint = { x: e.x, y: e.y }\n removeRoi()\n createRoi()\n } else {\n removeRoi()\n startPoint = null\n endPoint = null\n document.onselectstart = null\n document.ondragstart = null\n }\n }\n const onMouseup = () => {\n if (roiDiv) {\n callback(roiDiv.getBoundingClientRect())\n }\n document.onselectstart = null\n document.ondragstart = null\n removeRoi()\n startPoint = null\n endPoint = null\n }\n\n function removeRoi() {\n if (roiDiv && document.body.contains(roiDiv)) {\n document.body.removeChild(roiDiv)\n }\n roiDiv = null\n }\n\n function createRoi() {\n roiDiv = document.createElement('div')\n const distX = endPoint!.x - startPoint!.x\n const distY = endPoint!.y - startPoint!.y\n const left = startPoint!.x < endPoint!.x ? startPoint!.x : endPoint!.x\n const top = startPoint!.y < endPoint!.y ? startPoint!.y : endPoint!.y\n roiDiv.style.cssText = `position: fixed;z-index: 9999;width: ${Math.abs(\n distX\n )}px;height: ${Math.abs(\n distY\n )}px;border: 1px solid #0655c3;left: ${left}px;top: ${top}px;pointer-events: none;`\n document.body.appendChild(roiDiv)\n }\n\n el.onmousedown = onMousedown\n el.onmousemove = onMousemove\n el.onmouseup = onMouseup\n}\n\nexport default Drag\n"],"names":[],"mappings":"AAAK,MAAC,IAAI,GAAG;AACb,EAAE,OAAO,CAAC,EAAE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;AAClB,GAAG;AACH,EAAE,SAAS,SAAS,GAAG;AACvB,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC3C,IAAI,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;AAC5C,IAAI,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;AAC5C,IAAI,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AACvE,IAAI,MAAM,GAAG,GAAG,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AACtE,IAAI,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,qCAAqC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,mCAAmC,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,wBAAwB,CAAC,CAAC;AAClM,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACtC,GAAG;AACH,EAAE,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,EAAE,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,EAAE,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC;AAC3B;;;;"}
@@ -47,10 +47,10 @@ const Height = {
47
47
  };
48
48
  function createDocumentHandler(el, binding) {
49
49
  const { element, distY, type } = getEffectiveValue(el, binding.value);
50
- const cssProp = type ? type + "Height" : "height";
51
- el.style[cssProp] = element.clientHeight + distY + "px";
50
+ const cssProp = type ? `${type}Height` : "height";
51
+ el.style[cssProp] = `${element.clientHeight + distY}px`;
52
52
  return function() {
53
- el.style[cssProp] = element.clientHeight + distY + "px";
53
+ el.style[cssProp] = `${element.clientHeight + distY}px`;
54
54
  };
55
55
  }
56
56
  function getEffectiveValue(el, val) {
@@ -1 +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":";;;;;AACA,MAAM,QAAQ,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAC3C,IAAI,QAAQ,EAAE;AACd,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7C,EAAE,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE;AAC5C,IAAI,KAAK,MAAM,EAAE,eAAe,EAAE,IAAI,QAAQ,EAAE;AAChD,MAAM,eAAe,EAAE,CAAC;AACxB,KAAK;AACL,GAAG;AACH,CAAC;AACI,MAAC,MAAM,GAAG;AACf,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE;AACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAC3B,MAAM,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC3B,KAAK;AACL,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE,C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,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC;AACnD,GAAG;AACH,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAClC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/directives/height/index.ts"],"sourcesContent":["import { isClient, isNumber, isObject } from '@hzzt-plus/utils'\n\nimport type { DirectiveBinding, ObjectDirective } from 'vue'\n\ntype DocumentHandler = () => 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[<any>cssProp] = `${element!.clientHeight + distY}px`\n return function () {\n el.style[<any>cssProp] = `${element!.clientHeight + distY}px`\n }\n}\n\nfunction getEffectiveValue(el: HTMLElement, val: any) {\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"],"names":[],"mappings":";;;;;AACA,MAAM,QAAQ,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAC3C,IAAI,QAAQ,EAAE;AACd,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7C,EAAE,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,KAAK,MAAM,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE;AAC5C,IAAI,KAAK,MAAM,EAAE,eAAe,EAAE,IAAI,QAAQ,EAAE;AAChD,MAAM,eAAe,EAAE,CAAC;AACxB,KAAK;AACL,GAAG;AACH,CAAC;AACI,MAAC,MAAM,GAAG;AACf,EAAE,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE;AACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;AAC3B,MAAM,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AAC3B,KAAK;AACL,IAAI,QAAQ,CAAC,GAAG,CAAC,EAAE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C,CAAC;AACpD,IAAI,IAAI,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,IAAI,KAAK,EAAE,CAAC;AACnD,GAAG;AACH,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAClC;;;;"}
@@ -1,3 +1,3 @@
1
- import type { ObjectDirective } from "vue";
1
+ import type { ObjectDirective } from 'vue';
2
2
  declare const Highlight: ObjectDirective;
3
3
  export default Highlight;
@@ -4,7 +4,11 @@ const Highlight = {
4
4
  };
5
5
  function handle(el, binding) {
6
6
  const { form = false } = binding.modifiers;
7
- const { color = "#ff0000", fontSize = "16px", show = true } = binding.value || {};
7
+ const {
8
+ color = "#ff0000",
9
+ fontSize = "16px",
10
+ show = true
11
+ } = binding.value || {};
8
12
  el.style.color = show ? color : "";
9
13
  el.style.fontSize = show ? fontSize : "";
10
14
  if (form) {
@@ -1 +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\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AC,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;;;;"}
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 {\n color = '#ff0000',\n fontSize = '16px',\n show = true,\n } = 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(\n el: HTMLElement,\n show: boolean,\n prop: string,\n value: string\n) {\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"],"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;AACR,IAAI,KAAK,GAAG,SAAS;AACr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3 +2,4 @@ export { default as Download } from './download';
2
2
  export { default as Height } from './height';
3
3
  export { default as Blur } from './blur';
4
4
  export { default as Highlight } from './highlight';
5
+ export { default as Drag } from './drag';
@@ -2,4 +2,5 @@ export { default as Download } from './download/index.mjs';
2
2
  export { default as Height } from './height/index.mjs';
3
3
  export { default as Blur } from './blur/index.mjs';
4
4
  export { default as Highlight } from './highlight/index.mjs';
5
+ export { default as Drag } from './drag/index.mjs';
5
6
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,2 +1,3 @@
1
1
  export * from './use-locale';
2
2
  export * from './use-size';
3
+ export * from './use-namespace';
@@ -1,3 +1,4 @@
1
1
  export { buildLocaleContext, buildTranslator, localeContextKey, translate, useLocale } from './use-locale/index.mjs';
2
2
  export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps } from './use-size/index.mjs';
3
+ export { defaultNamespace, namespaceContextKey, useGetDerivedNamespace, useNamespace } from './use-namespace/index.mjs';
3
4
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,23 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ export declare const defaultNamespace = "hzzt";
3
+ export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
4
+ export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined> | undefined) => import("vue").ComputedRef<string>;
5
+ export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined> | undefined) => {
6
+ namespace: import("vue").ComputedRef<string>;
7
+ b: (blockSuffix?: string) => string;
8
+ e: (element?: string | undefined) => string;
9
+ m: (modifier?: string | undefined) => string;
10
+ be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
11
+ em: (element?: string | undefined, modifier?: string | undefined) => string;
12
+ bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
13
+ bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
14
+ is: {
15
+ (name: string, state: boolean | undefined): string;
16
+ (name: string): string;
17
+ };
18
+ cssVar: (object: Record<string, string>) => Record<string, string>;
19
+ cssVarName: (name: string) => string;
20
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
21
+ cssVarBlockName: (name: string) => string;
22
+ };
23
+ export declare type UseNamespaceReturn = ReturnType<typeof useNamespace>;
@@ -0,0 +1,77 @@
1
+ import { getCurrentInstance, inject, ref, computed, unref } from 'vue';
2
+
3
+ const defaultNamespace = "hzzt";
4
+ const statePrefix = "is-";
5
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
6
+ let cls = `${namespace}-${block}`;
7
+ if (blockSuffix) {
8
+ cls += `-${blockSuffix}`;
9
+ }
10
+ if (element) {
11
+ cls += `__${element}`;
12
+ }
13
+ if (modifier) {
14
+ cls += `--${modifier}`;
15
+ }
16
+ return cls;
17
+ };
18
+ const namespaceContextKey = Symbol("namespaceContextKey");
19
+ const useGetDerivedNamespace = (namespaceOverrides) => {
20
+ const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace));
21
+ const namespace = computed(() => {
22
+ return unref(derivedNamespace) || defaultNamespace;
23
+ });
24
+ return namespace;
25
+ };
26
+ const useNamespace = (block, namespaceOverrides) => {
27
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
28
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
29
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
30
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
31
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
32
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
33
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
34
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
35
+ const is = (name, ...args) => {
36
+ const state = args.length >= 1 ? args[0] : true;
37
+ return name && state ? `${statePrefix}${name}` : "";
38
+ };
39
+ const cssVar = (object) => {
40
+ const styles = {};
41
+ for (const key in object) {
42
+ if (object[key]) {
43
+ styles[`--${namespace.value}-${key}`] = object[key];
44
+ }
45
+ }
46
+ return styles;
47
+ };
48
+ const cssVarBlock = (object) => {
49
+ const styles = {};
50
+ for (const key in object) {
51
+ if (object[key]) {
52
+ styles[`--${namespace.value}-${block}-${key}`] = object[key];
53
+ }
54
+ }
55
+ return styles;
56
+ };
57
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
58
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
59
+ return {
60
+ namespace,
61
+ b,
62
+ e,
63
+ m,
64
+ be,
65
+ em,
66
+ bm,
67
+ bem,
68
+ is,
69
+ cssVar,
70
+ cssVarName,
71
+ cssVarBlock,
72
+ cssVarBlockName
73
+ };
74
+ };
75
+
76
+ export { defaultNamespace, namespaceContextKey, useGetDerivedNamespace, useNamespace };
77
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../packages/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'hzzt'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> =\n Symbol('namespaceContextKey')\n\nexport const useGetDerivedNamespace = (\n namespaceOverrides?: Ref<string | undefined>\n) => {\n const derivedNamespace =\n namespaceOverrides ||\n (getCurrentInstance()\n ? inject(namespaceContextKey, ref(defaultNamespace))\n : ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport const useNamespace = (\n block: string,\n namespaceOverrides?: Ref<string | undefined>\n) => {\n const namespace = useGetDerivedNamespace(namespaceOverrides)\n const b = (blockSuffix = '') =>\n _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(namespace.value, block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(namespace.value, block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(namespace.value, block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(namespace.value, block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(namespace.value, block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(namespace.value, block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) =>\n `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName,\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"names":[],"mappings":";;AACY,MAAC,gBAAgB,GAAG,OAAO;AACvC,MAAM,WAAW,GAAG,KAAK,CAAC;AAC1B,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,KAAK;AACnE,EAAE,IAAI,GAAG,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AACpC,EAAE,IAAI,WAAW,EAAE;AACnB,IAAI,GAAG,IAAI,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AAC7B,GAAG;AACH,EAAE,IAAI,OAAO,EAAE;AACf,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1B,GAAG;AACH,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3B,GAAG;AACH,EAAE,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AACU,MAAC,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,EAAE;AACrD,MAAC,sBAAsB,GAAG,CAAC,kBAAkB,KAAK;AAC9D,EAAE,MAAM,gBAAgB,GAAG,kBAAkB,KAAK,kBAAkB,EAAE,GAAG,MAAM,CAAC,mBAAmB,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACrJ,E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,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACrE,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,MAAM,UAAU,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9D,EAAE,MAAM,eAAe,GAAG,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC5E,EAAE,OAAO;AACT,IAAI,SAAS;AACb,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,CAAC;AACL,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,EAAE;AACN,IAAI,GAAG;AACP,IAAI,EAAE;AACN,IAAI,MAAM;AACV,IAAI,UAAU;AACd,IAAI,WAAW;AACf,IAAI,eAAe;AACnB,GAAG,CAAC;AACJ;;;;"}
package/es/index.mjs CHANGED
@@ -13,6 +13,11 @@ export { configProviderContextKey } from './components/config-provider/src/const
13
13
  export { provideGlobalConfig, useGlobalConfig } from './components/config-provider/src/hooks/use-global-config.mjs';
14
14
  export { HzztConfigProvider } from './components/config-provider/index.mjs';
15
15
  export { HzztTab } from './components/tab/index.mjs';
16
+ export { HzztIcon } from './components/icon/index.mjs';
17
+ export { HzztPagination } from './components/pagination/index.mjs';
18
+ export { HzztTooltip } from './components/tooltip/index.mjs';
19
+ export { HzztPageSize } from './components/page-size/index.mjs';
20
+ export { HzztConfirmPassword } from './components/confirm-password/index.mjs';
16
21
  export { INSTALLED_KEY } from './constants/key.mjs';
17
22
  export { componentSizeMap, componentSizes } from './constants/size.mjs';
18
23
  export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
@@ -20,8 +25,10 @@ export { default as Download } from './directives/download/index.mjs';
20
25
  export { default as Height } from './directives/height/index.mjs';
21
26
  export { default as Blur } from './directives/blur/index.mjs';
22
27
  export { default as Highlight } from './directives/highlight/index.mjs';
28
+ export { default as Drag } from './directives/drag/index.mjs';
23
29
  export { buildLocaleContext, buildTranslator, localeContextKey, translate, useLocale } from './hooks/use-locale/index.mjs';
24
30
  export { SIZE_INJECTION_KEY, useGlobalSize, useSizeProp, useSizeProps } from './hooks/use-size/index.mjs';
31
+ export { defaultNamespace, namespaceContextKey, useGetDerivedNamespace, useNamespace } from './hooks/use-namespace/index.mjs';
25
32
 
26
33
  const install = installer.install;
27
34
  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 '@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;;;;"}
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,6 +5,17 @@ declare const _default: {
5
5
  expand: string;
6
6
  retract: string;
7
7
  };
8
+ pagination: {
9
+ total: string;
10
+ strip: string;
11
+ };
12
+ pageSize: {
13
+ total: string;
14
+ strip: string;
15
+ page: string;
16
+ d: string;
17
+ per_page: string;
18
+ };
8
19
  };
9
20
  };
10
21
  export default _default;
@@ -4,6 +4,17 @@ var English = {
4
4
  collapse: {
5
5
  expand: "expand",
6
6
  retract: "retract"
7
+ },
8
+ pagination: {
9
+ total: "total",
10
+ strip: "strip"
11
+ },
12
+ pageSize: {
13
+ total: "total",
14
+ strip: "strip",
15
+ page: "page",
16
+ d: "",
17
+ per_page: "per page"
7
18
  }
8
19
  }
9
20
  };
@@ -1 +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
+ {"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 pagination: {\n total: 'total',\n strip: 'strip',\n },\n pageSize: {\n total: 'total',\n strip: 'strip',\n page: 'page',\n d: '',\n per_page: 'per page',\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,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,OAAO;AACpB,MAAM,KAAK,EAAE,OAAO;AACpB,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,MAAM,KAAK,EAAE,OAAO;AACpB,MAAM,KAAK,EAAE,OAAO;AACpB,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,CAAC,EAAE,EAAE;AACX,MAAM,QAAQ,EAAE,UAAU;AAC1B,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
@@ -5,6 +5,17 @@ declare const _default: {
5
5
  expand: string;
6
6
  retract: string;
7
7
  };
8
+ pagination: {
9
+ total: string;
10
+ strip: string;
11
+ };
12
+ pageSize: {
13
+ total: string;
14
+ strip: string;
15
+ d: string;
16
+ page: string;
17
+ per_page: string;
18
+ };
8
19
  };
9
20
  };
10
21
  export default _default;
@@ -4,6 +4,17 @@ var zhCn = {
4
4
  collapse: {
5
5
  expand: "\u5C55\u5F00",
6
6
  retract: "\u6536\u8D77"
7
+ },
8
+ pagination: {
9
+ total: "\u5171",
10
+ strip: "\u6761"
11
+ },
12
+ pageSize: {
13
+ total: "\u5171",
14
+ strip: "\u6761",
15
+ d: "\u7B2C",
16
+ page: "\u9875",
17
+ per_page: "\u6BCF\u9875"
7
18
  }
8
19
  }
9
20
  };
@@ -1 +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;;;;"}
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 pagination: {\n total: '共',\n strip: '条',\n },\n pageSize: {\n total: '共',\n strip: '条',\n d: '第',\n page: '页',\n per_page: '每页',\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,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,QAAQ;AACrB,MAAM,KAAK,EAAE,QAAQ;AACrB,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,MAAM,KAAK,EAAE,QAAQ;AACrB,MAAM,KAAK,EAAE,QAAQ;AACrB,MAAM,CAAC,EAAE,QAAQ;AACjB,MAAM,IAAI,EAAE,QAAQ;AACpB,MAAM,QAAQ,EAAE,cAAc;AAC9B,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
package/es/plugin.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","sources":["../../../packages/hzzt-plus/plugin.ts"],"sourcesContent":["\nimport type { Plugin } from 'vue'\n\nexport default [] as Plugin[]\n"],"names":[],"mappings":"AAAA,cAAe,EAAE;;;;"}
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../packages/hzzt-plus/plugin.ts"],"sourcesContent":["import type { Plugin } from 'vue'\n\nexport default [] as Plugin[]\n"],"names":[],"mappings":"AAAA,cAAe,EAAE;;;;"}
package/global.d.ts CHANGED
@@ -6,6 +6,11 @@ declare module 'vue' {
6
6
  HzztCollapse: typeof import('hzzt-plus')['HzztCollapse']
7
7
  HzztConfigProvider: typeof import('hzzt-plus')['HzztConfigProvider']
8
8
  HzztTab: typeof import('hzzt-plus')['HzztTab']
9
+ HzztIcon: typeof import('hzzt-plus')['HzztIcon']
10
+ HzztPagination: typeof import('hzzt-plus')['HzztPagination']
11
+ HzztTooltip: typeof import('hzzt-plus')['HzztTooltip']
12
+ HzztPageSize: typeof import('hzzt-plus')['HzztPageSize']
13
+ HzztConfirmPassword: typeof import('hzzt-plus')['HzztConfirmPassword']
9
14
  }
10
15
  }
11
16
 
package/lib/component.js CHANGED
@@ -7,13 +7,23 @@ var index$2 = require('./components/dropdown/index.js');
7
7
  var index$3 = require('./components/collapse/index.js');
8
8
  var index = require('./components/config-provider/index.js');
9
9
  var index$4 = require('./components/tab/index.js');
10
+ var index$5 = require('./components/icon/index.js');
11
+ var index$6 = require('./components/pagination/index.js');
12
+ var index$7 = require('./components/tooltip/index.js');
13
+ var index$8 = require('./components/page-size/index.js');
14
+ var index$9 = require('./components/confirm-password/index.js');
10
15
 
11
16
  var Components = [
12
17
  index.HzztConfigProvider,
13
18
  index$1.HzztTitle,
14
19
  index$2.HzztDropdown,
15
20
  index$3.HzztCollapse,
16
- index$4.HzztTab
21
+ index$4.HzztTab,
22
+ index$5.HzztIcon,
23
+ index$6.HzztPagination,
24
+ index$7.HzztTooltip,
25
+ index$8.HzztPageSize,
26
+ index$9.HzztConfirmPassword
17
27
  ];
18
28
 
19
29
  exports["default"] = Components;
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab"],"mappings":";;;;;;;;;;AAKA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,CAAC;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import { HzztTitle } from '@hzzt-plus/components/title'\nimport { HzztDropdown } from '@hzzt-plus/components/dropdown'\nimport { HzztCollapse } from '@hzzt-plus/components/collapse'\nimport { HzztConfigProvider } from '@hzzt-plus/components/config-provider'\nimport { HzztTab } from '@hzzt-plus/components/tab'\nimport { HzztIcon } from '@hzzt-plus/components/icon'\nimport { HzztPagination } from '@hzzt-plus/components/pagination'\nimport { HzztTooltip } from '@hzzt-plus/components/tooltip'\nimport { HzztPageSize } from '@hzzt-plus/components/page-size'\nimport { HzztConfirmPassword } from '@hzzt-plus/components/confirm-password'\n\nimport type { Plugin } from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n HzztTooltip,\n HzztPageSize,\n HzztConfirmPassword,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon","HzztPagination","HzztTooltip","HzztPageSize","HzztConfirmPassword"],"mappings":";;;;;;;;;;;;;;;AAUA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,EAAEC,gBAAQ;AACV,EAAEC,sBAAc;AAChB,EAAEC,mBAAW;AACb,EAAEC,oBAAY;AACd,EAAEC,2BAAmB;AACrB,CAAC;;;;"}
@@ -30,9 +30,6 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
30
30
  [x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
31
31
  }>>;
32
32
  active: import("vue").Ref<boolean>;
33
- slots: Readonly<{
34
- [name: string]: import("vue").Slot | undefined;
35
- }>;
36
33
  toggle: () => void;
37
34
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
35
  defaultActive: {
@@ -53,3 +50,4 @@ export declare const HzztCollapse: import("hzzt-plus/es/utils").SFCWithInstall<i
53
50
  expand: boolean;
54
51
  }>> & Record<string, any>;
55
52
  export default HzztCollapse;
53
+ export * from './src/collapse';
@@ -3,10 +3,11 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('../../utils/index.js');
6
- var index = require('./src/index.js');
6
+ var collapse = require('./src/collapse.js');
7
+ require('./src/collapse2.js');
7
8
  var install = require('../../utils/vue/install.js');
8
9
 
9
- const HzztCollapse = install.withInstall(index["default"]);
10
+ const HzztCollapse = install.withInstall(collapse["default"]);
10
11
 
11
12
  exports.HzztCollapse = HzztCollapse;
12
13
  exports["default"] = HzztCollapse;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../packages/components/collapse/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\n\nimport Collapse from './src/index.vue';\n\nexport const HzztCollapse = withInstall(Collapse);\nexport default HzztCollapse\n"],"names":["withInstall","Collapse"],"mappings":";;;;;;;;AAEY,MAAC,YAAY,GAAGA,mBAAW,CAACC,gBAAQ;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/components/collapse/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\n\nimport Collapse from './src/collapse.vue'\n\nexport const HzztCollapse = withInstall(Collapse)\nexport default HzztCollapse\n\nexport * from './src/collapse'\n"],"names":["withInstall","Collapse"],"mappings":";;;;;;;;;AAEY,MAAC,YAAY,GAAGA,mBAAW,CAACC,mBAAQ;;;;;"}
@@ -0,0 +1,2 @@
1
+ import type Collapse from './collapse.vue';
2
+ export declare type CollapseInstance = InstanceType<typeof Collapse>;