hzzt-plus 0.0.2 → 0.0.3

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 (267) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.full.js +13545 -403
  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 +13527 -394
  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/collapse.mjs +2 -0
  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/{index.mjs → collapse2.mjs} +3 -4
  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 +487 -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 +487 -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 +102 -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 +14364 -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 +14364 -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 +144 -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 +144 -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 +3131 -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 +3130 -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/height/index.mjs +3 -3
  112. package/es/directives/height/index.mjs.map +1 -1
  113. package/es/directives/highlight/index.d.ts +1 -1
  114. package/es/directives/highlight/index.mjs +5 -1
  115. package/es/directives/highlight/index.mjs.map +1 -1
  116. package/es/hooks/index.d.ts +1 -0
  117. package/es/hooks/index.mjs +1 -0
  118. package/es/hooks/index.mjs.map +1 -1
  119. package/es/hooks/use-namespace/index.d.ts +23 -0
  120. package/es/hooks/use-namespace/index.mjs +77 -0
  121. package/es/hooks/use-namespace/index.mjs.map +1 -0
  122. package/es/index.mjs +6 -0
  123. package/es/index.mjs.map +1 -1
  124. package/es/locale/lang/en.d.ts +11 -0
  125. package/es/locale/lang/en.mjs +11 -0
  126. package/es/locale/lang/en.mjs.map +1 -1
  127. package/es/locale/lang/zh-cn.d.ts +11 -0
  128. package/es/locale/lang/zh-cn.mjs +11 -0
  129. package/es/locale/lang/zh-cn.mjs.map +1 -1
  130. package/es/plugin.mjs.map +1 -1
  131. package/global.d.ts +5 -0
  132. package/lib/component.js +11 -1
  133. package/lib/component.js.map +1 -1
  134. package/lib/components/collapse/index.d.ts +1 -3
  135. package/lib/components/collapse/index.js +3 -2
  136. package/lib/components/collapse/index.js.map +1 -1
  137. package/lib/components/collapse/src/collapse.d.ts +2 -0
  138. package/lib/components/collapse/src/collapse.js +3 -0
  139. package/lib/components/collapse/src/collapse.js.map +1 -0
  140. package/lib/components/collapse/src/{index.vue.d.ts → collapse.vue.d.ts} +0 -3
  141. package/lib/components/collapse/src/{index.js → collapse2.js} +2 -3
  142. package/lib/components/collapse/src/collapse2.js.map +1 -0
  143. package/lib/components/config-provider/src/config-provider.js.map +1 -1
  144. package/lib/components/config-provider/src/hooks/use-global-config.js.map +1 -1
  145. package/lib/components/confirm-password/index.d.ts +487 -0
  146. package/lib/components/confirm-password/index.js +13 -0
  147. package/lib/components/confirm-password/index.js.map +1 -0
  148. package/lib/components/confirm-password/src/confirm-password.js +76 -0
  149. package/lib/components/confirm-password/src/confirm-password.js.map +1 -0
  150. package/lib/components/confirm-password/src/confirm-password.vue.d.ts +487 -0
  151. package/lib/components/confirm-password/style/css.d.ts +2 -0
  152. package/lib/components/confirm-password/style/css.js +6 -0
  153. package/lib/components/confirm-password/style/css.js.map +1 -0
  154. package/lib/components/confirm-password/style/index.d.ts +2 -0
  155. package/lib/components/confirm-password/style/index.js +6 -0
  156. package/lib/components/confirm-password/style/index.js.map +1 -0
  157. package/lib/components/dropdown/index.js.map +1 -1
  158. package/lib/components/dropdown/src/index.js +18 -12
  159. package/lib/components/dropdown/src/index.js.map +1 -1
  160. package/lib/components/icon/index.d.ts +5 -0
  161. package/lib/components/icon/index.js +42 -0
  162. package/lib/components/icon/index.js.map +1 -0
  163. package/lib/components/icon/src/index.js +38 -0
  164. package/lib/components/icon/src/index.js.map +1 -0
  165. package/lib/components/icon/src/index.vue.d.ts +102 -0
  166. package/lib/components/icon/style/css.d.ts +2 -0
  167. package/lib/components/icon/style/css.js +6 -0
  168. package/lib/components/icon/style/css.js.map +1 -0
  169. package/lib/components/icon/style/index.d.ts +2 -0
  170. package/lib/components/icon/style/index.js +6 -0
  171. package/lib/components/icon/style/index.js.map +1 -0
  172. package/lib/components/index.d.ts +5 -0
  173. package/lib/components/index.js +10 -0
  174. package/lib/components/index.js.map +1 -1
  175. package/lib/components/page-size/index.d.ts +14364 -0
  176. package/lib/components/page-size/index.js +13 -0
  177. package/lib/components/page-size/index.js.map +1 -0
  178. package/lib/components/page-size/src/index.js +161 -0
  179. package/lib/components/page-size/src/index.js.map +1 -0
  180. package/lib/components/page-size/src/index.vue.d.ts +14364 -0
  181. package/lib/components/page-size/style/css.d.ts +2 -0
  182. package/lib/components/page-size/style/css.js +6 -0
  183. package/lib/components/page-size/style/css.js.map +1 -0
  184. package/lib/components/page-size/style/index.d.ts +2 -0
  185. package/lib/components/page-size/style/index.js +6 -0
  186. package/lib/components/page-size/style/index.js.map +1 -0
  187. package/lib/components/pagination/index.d.ts +144 -0
  188. package/lib/components/pagination/index.js +13 -0
  189. package/lib/components/pagination/index.js.map +1 -0
  190. package/lib/components/pagination/src/index.js +72 -0
  191. package/lib/components/pagination/src/index.js.map +1 -0
  192. package/lib/components/pagination/src/index.vue.d.ts +144 -0
  193. package/lib/components/pagination/style/css.d.ts +2 -0
  194. package/lib/components/pagination/style/css.js +6 -0
  195. package/lib/components/pagination/style/css.js.map +1 -0
  196. package/lib/components/pagination/style/index.d.ts +2 -0
  197. package/lib/components/pagination/style/index.js +6 -0
  198. package/lib/components/pagination/style/index.js.map +1 -0
  199. package/lib/components/tab/index.js.map +1 -1
  200. package/lib/components/tab/src/index.js +3 -3
  201. package/lib/components/tab/src/index.js.map +1 -1
  202. package/lib/components/title/index.js +2 -2
  203. package/lib/components/title/index.js.map +1 -1
  204. package/lib/components/title/src/{index.js → title.js} +2 -2
  205. package/lib/components/title/src/title.js.map +1 -0
  206. package/lib/components/tooltip/index.d.ts +3131 -0
  207. package/lib/components/tooltip/index.js +13 -0
  208. package/lib/components/tooltip/index.js.map +1 -0
  209. package/lib/components/tooltip/src/instance.d.ts +2 -0
  210. package/lib/components/tooltip/src/instance.js +3 -0
  211. package/lib/components/tooltip/src/instance.js.map +1 -0
  212. package/lib/components/tooltip/src/tooltip.js +53 -0
  213. package/lib/components/tooltip/src/tooltip.js.map +1 -0
  214. package/lib/components/tooltip/src/tooltip.vue.d.ts +3130 -0
  215. package/lib/components/tooltip/style/css.d.ts +2 -0
  216. package/lib/components/tooltip/style/css.js +6 -0
  217. package/lib/components/tooltip/style/css.js.map +1 -0
  218. package/lib/components/tooltip/style/index.d.ts +2 -0
  219. package/lib/components/tooltip/style/index.js +6 -0
  220. package/lib/components/tooltip/style/index.js.map +1 -0
  221. package/lib/directives/blur/index.js.map +1 -1
  222. package/lib/directives/download/index.js.map +1 -1
  223. package/lib/directives/height/index.js +3 -3
  224. package/lib/directives/height/index.js.map +1 -1
  225. package/lib/directives/highlight/index.d.ts +1 -1
  226. package/lib/directives/highlight/index.js +5 -1
  227. package/lib/directives/highlight/index.js.map +1 -1
  228. package/lib/hooks/index.d.ts +1 -0
  229. package/lib/hooks/index.js +5 -0
  230. package/lib/hooks/index.js.map +1 -1
  231. package/lib/hooks/use-namespace/index.d.ts +23 -0
  232. package/lib/hooks/use-namespace/index.js +84 -0
  233. package/lib/hooks/use-namespace/index.js.map +1 -0
  234. package/lib/index.js +34 -19
  235. package/lib/index.js.map +1 -1
  236. package/lib/locale/lang/en.d.ts +11 -0
  237. package/lib/locale/lang/en.js +11 -0
  238. package/lib/locale/lang/en.js.map +1 -1
  239. package/lib/locale/lang/zh-cn.d.ts +11 -0
  240. package/lib/locale/lang/zh-cn.js +11 -0
  241. package/lib/locale/lang/zh-cn.js.map +1 -1
  242. package/lib/plugin.js.map +1 -1
  243. package/lib/utils/vue/icon.js +14 -14
  244. package/lib/utils/vue/icon.js.map +1 -1
  245. package/package.json +1 -1
  246. package/theme/base.css +1 -1
  247. package/theme/hzzt-confirm-password.css +0 -0
  248. package/theme/hzzt-icon.css +0 -0
  249. package/theme/hzzt-page-size.css +1 -0
  250. package/theme/hzzt-pagination.css +1 -0
  251. package/theme/hzzt-tooltip.css +0 -0
  252. package/theme/index.css +1 -1
  253. package/theme/src/base.scss +4 -3
  254. package/theme/src/common/font.scss +6 -0
  255. package/theme/src/common/index.scss +48 -0
  256. package/theme/src/confirm-password.scss +0 -0
  257. package/theme/src/icon.scss +0 -0
  258. package/theme/src/index.scss +6 -0
  259. package/theme/src/page-size.scss +86 -0
  260. package/theme/src/pagination.scss +17 -0
  261. package/theme/src/tooltip.scss +0 -0
  262. package/es/components/collapse/src/index.mjs.map +0 -1
  263. package/es/components/title/src/index.mjs.map +0 -1
  264. package/lib/components/collapse/src/index.js.map +0 -1
  265. package/lib/components/title/src/index.js.map +0 -1
  266. /package/es/components/title/src/{index.vue.d.ts → title.vue.d.ts} +0 -0
  267. /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,6 @@
1
+ 'use strict';
2
+
3
+ require('../../base/style/css.js');
4
+ require('hzzt-plus/theme/hzzt-tooltip.css');
5
+
6
+ //# sourceMappingURL=css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.js","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,6 @@
1
+ 'use strict';
2
+
3
+ require('../../base/style/index.js');
4
+ require('hzzt-plus/theme/src/tooltip.scss');
5
+
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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.js","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.js","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.js","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;;;;"}
@@ -51,10 +51,10 @@ const Height = {
51
51
  };
52
52
  function createDocumentHandler(el, binding) {
53
53
  const { element, distY, type } = getEffectiveValue(el, binding.value);
54
- const cssProp = type ? type + "Height" : "height";
55
- el.style[cssProp] = element.clientHeight + distY + "px";
54
+ const cssProp = type ? `${type}Height` : "height";
55
+ el.style[cssProp] = `${element.clientHeight + distY}px`;
56
56
  return function() {
57
- el.style[cssProp] = element.clientHeight + distY + "px";
57
+ el.style[cssProp] = `${element.clientHeight + distY}px`;
58
58
  };
59
59
  }
60
60
  function getEffectiveValue(el, val) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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":["isClient","isNumber","isObject"],"mappings":";;;;;;;;;AACA,MAAM,QAAQ,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAC3C,IAAIA,aAAQ,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,S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;AACd,GAAG,MAAM,IAAIC,cAAQ,CAAC,GAAG,CAAC,EAAE;AAC5B,IAAI,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC;AAC/B,IAAI,KAAK,GAAG,GAAG,CAAC;AAChB,GAAG,MAAM,IAAIC,eAAQ,CAAC,GAAG,CAAC,EAAE;AAC5B,IAAI,OAAO,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC;AAClE,IAAI,KAAK,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK,CAAC,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
+ {"version":3,"file":"index.js","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":["isClient","isNumber","isObject"],"mappings":";;;;;;;;;AACA,MAAM,QAAQ,mBAAmB,IAAI,GAAG,EAAE,CAAC;AAC3C,IAAIA,aAAQ,EAAE;AACd,EAAE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7C,EAAE,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,OAAO,CAAC,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EAAE;AACzC,IAAI,OAAO,GAAG,GAAG,CAAC;AAClB,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,GAAG,MAAM,IAAIC,cAAQ,CAAC,GAAG,CAAC,EAAE;AAC5B,IAAI,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC;AAC/B,IAAI,KAAK,GAAG,GAAG,CAAC;AAChB,GAAG,MAAM,IAAIC,eAAQ,CAAC,GAAG,CAAC,EAAE;AAC5B,IAAI,OAAO,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC;AAClE,IAAI,KAAK,GAAG,CAAC,GAAG,IAAI,IAAI,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK,CAAC,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;
@@ -8,7 +8,11 @@ const Highlight = {
8
8
  };
9
9
  function handle(el, binding) {
10
10
  const { form = false } = binding.modifiers;
11
- const { color = "#ff0000", fontSize = "16px", show = true } = binding.value || {};
11
+ const {
12
+ color = "#ff0000",
13
+ fontSize = "16px",
14
+ show = true
15
+ } = binding.value || {};
12
16
  el.style.color = show ? color : "";
13
17
  el.style.fontSize = show ? fontSize : "";
14
18
  if (form) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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;;;;"}
1
+ {"version":3,"file":"index.js","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;AACrB,IAAI,QAAQ,GAAG,MAAM;AACrB,IAAI,IAAI,GAAG,IAAI;AACf,GAAG,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;AAC1B,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;;;;"}
@@ -1,2 +1,3 @@
1
1
  export * from './use-locale';
2
2
  export * from './use-size';
3
+ export * from './use-namespace';
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var index = require('./use-locale/index.js');
6
6
  var index$1 = require('./use-size/index.js');
7
+ var index$2 = require('./use-namespace/index.js');
7
8
 
8
9
 
9
10
 
@@ -16,4 +17,8 @@ exports.SIZE_INJECTION_KEY = index$1.SIZE_INJECTION_KEY;
16
17
  exports.useGlobalSize = index$1.useGlobalSize;
17
18
  exports.useSizeProp = index$1.useSizeProp;
18
19
  exports.useSizeProps = index$1.useSizeProps;
20
+ exports.defaultNamespace = index$2.defaultNamespace;
21
+ exports.namespaceContextKey = index$2.namespaceContextKey;
22
+ exports.useGetDerivedNamespace = index$2.useGetDerivedNamespace;
23
+ exports.useNamespace = index$2.useNamespace;
19
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","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,84 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+
7
+ const defaultNamespace = "hzzt";
8
+ const statePrefix = "is-";
9
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
10
+ let cls = `${namespace}-${block}`;
11
+ if (blockSuffix) {
12
+ cls += `-${blockSuffix}`;
13
+ }
14
+ if (element) {
15
+ cls += `__${element}`;
16
+ }
17
+ if (modifier) {
18
+ cls += `--${modifier}`;
19
+ }
20
+ return cls;
21
+ };
22
+ const namespaceContextKey = Symbol("namespaceContextKey");
23
+ const useGetDerivedNamespace = (namespaceOverrides) => {
24
+ const derivedNamespace = namespaceOverrides || (vue.getCurrentInstance() ? vue.inject(namespaceContextKey, vue.ref(defaultNamespace)) : vue.ref(defaultNamespace));
25
+ const namespace = vue.computed(() => {
26
+ return vue.unref(derivedNamespace) || defaultNamespace;
27
+ });
28
+ return namespace;
29
+ };
30
+ const useNamespace = (block, namespaceOverrides) => {
31
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
32
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
33
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
34
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
35
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
36
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
37
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
38
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
39
+ const is = (name, ...args) => {
40
+ const state = args.length >= 1 ? args[0] : true;
41
+ return name && state ? `${statePrefix}${name}` : "";
42
+ };
43
+ const cssVar = (object) => {
44
+ const styles = {};
45
+ for (const key in object) {
46
+ if (object[key]) {
47
+ styles[`--${namespace.value}-${key}`] = object[key];
48
+ }
49
+ }
50
+ return styles;
51
+ };
52
+ const cssVarBlock = (object) => {
53
+ const styles = {};
54
+ for (const key in object) {
55
+ if (object[key]) {
56
+ styles[`--${namespace.value}-${block}-${key}`] = object[key];
57
+ }
58
+ }
59
+ return styles;
60
+ };
61
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
62
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
63
+ return {
64
+ namespace,
65
+ b,
66
+ e,
67
+ m,
68
+ be,
69
+ em,
70
+ bm,
71
+ bem,
72
+ is,
73
+ cssVar,
74
+ cssVarName,
75
+ cssVarBlock,
76
+ cssVarBlockName
77
+ };
78
+ };
79
+
80
+ exports.defaultNamespace = defaultNamespace;
81
+ exports.namespaceContextKey = namespaceContextKey;
82
+ exports.useGetDerivedNamespace = useGetDerivedNamespace;
83
+ exports.useNamespace = useNamespace;
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","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":["getCurrentInstance","inject","ref","computed","unref"],"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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AAG,CAAC;AACJ;;;;;;;"}
package/lib/index.js CHANGED
@@ -16,15 +16,21 @@ var constants = require('./components/config-provider/src/constants.js');
16
16
  var useGlobalConfig = require('./components/config-provider/src/hooks/use-global-config.js');
17
17
  var index$3 = require('./components/config-provider/index.js');
18
18
  var index$4 = require('./components/tab/index.js');
19
+ var index$5 = require('./components/icon/index.js');
20
+ var index$6 = require('./components/pagination/index.js');
21
+ var index$7 = require('./components/tooltip/index.js');
22
+ var index$8 = require('./components/page-size/index.js');
23
+ var index$9 = require('./components/confirm-password/index.js');
19
24
  var key = require('./constants/key.js');
20
25
  var size = require('./constants/size.js');
21
26
  var date = require('./constants/date.js');
22
- var index$5 = require('./directives/download/index.js');
23
- var index$6 = require('./directives/height/index.js');
24
- var index$7 = require('./directives/blur/index.js');
25
- var index$8 = require('./directives/highlight/index.js');
26
- var index$9 = require('./hooks/use-locale/index.js');
27
- var index$a = require('./hooks/use-size/index.js');
27
+ var index$a = require('./directives/download/index.js');
28
+ var index$b = require('./directives/height/index.js');
29
+ var index$c = require('./directives/blur/index.js');
30
+ var index$d = require('./directives/highlight/index.js');
31
+ var index$e = require('./hooks/use-locale/index.js');
32
+ var index$f = require('./hooks/use-size/index.js');
33
+ var index$g = require('./hooks/use-namespace/index.js');
28
34
 
29
35
  const install = defaults["default"].install;
30
36
  const version = defaults["default"].version;
@@ -40,24 +46,33 @@ exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
40
46
  exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
41
47
  exports.HzztConfigProvider = index$3.HzztConfigProvider;
42
48
  exports.HzztTab = index$4.HzztTab;
49
+ exports.HzztIcon = index$5.HzztIcon;
50
+ exports.HzztPagination = index$6.HzztPagination;
51
+ exports.HzztTooltip = index$7.HzztTooltip;
52
+ exports.HzztPageSize = index$8.HzztPageSize;
53
+ exports.HzztConfirmPassword = index$9.HzztConfirmPassword;
43
54
  exports.INSTALLED_KEY = key.INSTALLED_KEY;
44
55
  exports.componentSizeMap = size.componentSizeMap;
45
56
  exports.componentSizes = size.componentSizes;
46
57
  exports.WEEK_DAYS = date.WEEK_DAYS;
47
58
  exports.datePickTypes = date.datePickTypes;
48
- exports.Download = index$5["default"];
49
- exports.Height = index$6["default"];
50
- exports.Blur = index$7["default"];
51
- exports.Highlight = index$8["default"];
52
- exports.buildLocaleContext = index$9.buildLocaleContext;
53
- exports.buildTranslator = index$9.buildTranslator;
54
- exports.localeContextKey = index$9.localeContextKey;
55
- exports.translate = index$9.translate;
56
- exports.useLocale = index$9.useLocale;
57
- exports.SIZE_INJECTION_KEY = index$a.SIZE_INJECTION_KEY;
58
- exports.useGlobalSize = index$a.useGlobalSize;
59
- exports.useSizeProp = index$a.useSizeProp;
60
- exports.useSizeProps = index$a.useSizeProps;
59
+ exports.Download = index$a["default"];
60
+ exports.Height = index$b["default"];
61
+ exports.Blur = index$c["default"];
62
+ exports.Highlight = index$d["default"];
63
+ exports.buildLocaleContext = index$e.buildLocaleContext;
64
+ exports.buildTranslator = index$e.buildTranslator;
65
+ exports.localeContextKey = index$e.localeContextKey;
66
+ exports.translate = index$e.translate;
67
+ exports.useLocale = index$e.useLocale;
68
+ exports.SIZE_INJECTION_KEY = index$f.SIZE_INJECTION_KEY;
69
+ exports.useGlobalSize = index$f.useGlobalSize;
70
+ exports.useSizeProp = index$f.useSizeProp;
71
+ exports.useSizeProps = index$f.useSizeProps;
72
+ exports.defaultNamespace = index$g.defaultNamespace;
73
+ exports.namespaceContextKey = index$g.namespaceContextKey;
74
+ exports.useGetDerivedNamespace = index$g.useGetDerivedNamespace;
75
+ exports.useNamespace = index$g.useNamespace;
61
76
  exports.install = install;
62
77
  exports.version = version;
63
78
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","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":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,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;
@@ -8,6 +8,17 @@ var English = {
8
8
  collapse: {
9
9
  expand: "expand",
10
10
  retract: "retract"
11
+ },
12
+ pagination: {
13
+ total: "total",
14
+ strip: "strip"
15
+ },
16
+ pageSize: {
17
+ total: "total",
18
+ strip: "strip",
19
+ page: "page",
20
+ d: "",
21
+ per_page: "per page"
11
22
  }
12
23
  }
13
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","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.js","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;
@@ -8,6 +8,17 @@ var zhCn = {
8
8
  collapse: {
9
9
  expand: "\u5C55\u5F00",
10
10
  retract: "\u6536\u8D77"
11
+ },
12
+ pagination: {
13
+ total: "\u5171",
14
+ strip: "\u6761"
15
+ },
16
+ pageSize: {
17
+ total: "\u5171",
18
+ strip: "\u6761",
19
+ d: "\u7B2C",
20
+ page: "\u9875",
21
+ per_page: "\u6BCF\u9875"
11
22
  }
12
23
  }
13
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"zh-cn.js","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.js","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/lib/plugin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","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.js","sources":["../../../packages/hzzt-plus/plugin.ts"],"sourcesContent":["import type { Plugin } from 'vue'\n\nexport default [] as Plugin[]\n"],"names":[],"mappings":";;;;AAAA,cAAe,EAAE;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var iconsVue = require('@element-plus/icons-vue');
5
+ var Icons = require('@element-plus/icons-vue');
6
6
  require('./props/index.js');
7
7
  var runtime = require('./props/runtime.js');
8
8
 
@@ -12,25 +12,25 @@ const iconPropType = runtime.definePropType([
12
12
  Function
13
13
  ]);
14
14
  const CloseComponents = {
15
- Close: iconsVue.Close
15
+ Close: Icons.Close
16
16
  };
17
17
  const TypeComponents = {
18
- Close: iconsVue.Close,
19
- SuccessFilled: iconsVue.SuccessFilled,
20
- InfoFilled: iconsVue.InfoFilled,
21
- WarningFilled: iconsVue.WarningFilled,
22
- CircleCloseFilled: iconsVue.CircleCloseFilled
18
+ Close: Icons.Close,
19
+ SuccessFilled: Icons.SuccessFilled,
20
+ InfoFilled: Icons.InfoFilled,
21
+ WarningFilled: Icons.WarningFilled,
22
+ CircleCloseFilled: Icons.CircleCloseFilled
23
23
  };
24
24
  const TypeComponentsMap = {
25
- success: iconsVue.SuccessFilled,
26
- warning: iconsVue.WarningFilled,
27
- error: iconsVue.CircleCloseFilled,
28
- info: iconsVue.InfoFilled
25
+ success: Icons.SuccessFilled,
26
+ warning: Icons.WarningFilled,
27
+ error: Icons.CircleCloseFilled,
28
+ info: Icons.InfoFilled
29
29
  };
30
30
  const ValidateComponentsMap = {
31
- validating: iconsVue.Loading,
32
- success: iconsVue.CircleCheck,
33
- error: iconsVue.CircleClose
31
+ validating: Icons.Loading,
32
+ success: Icons.CircleCheck,
33
+ error: Icons.CircleClose
34
34
  };
35
35
 
36
36
  exports.CloseComponents = CloseComponents;
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sources":["../../../../../packages/utils/vue/icon.ts"],"sourcesContent":["import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType<string | Component>([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n"],"names":["definePropType","Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;;;;;;;AAWY,MAAC,YAAY,GAAGA,sBAAc,CAAC;AAC3C,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,SAAEC,cAAK;AACP,EAAE;AACU,MAAC,cAAc,GAAG;AAC9B,SAAEA,cAAK;AACP,iBAAEC,sBAAa;AACf,cAAEC,mBAAU;AACZ,iBAAEC,sBAAa;AACf,qBAAEC,0BAAiB;AACnB,EAAE;AACU,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAEH,sBAAa;AACxB,EAAE,OAAO,EAAEE,sBAAa;AACxB,EAAE,KAAK,EAAEC,0BAAiB;AAC1B,EAAE,IAAI,EAAEF,mBAAU;AAClB,EAAE;AACU,MAAC,qBAAqB,GAAG;AACrC,EAAE,UAAU,EAAEG,gBAAO;AACrB,EAAE,OAAO,EAAEC,oBAAW;AACtB,EAAE,KAAK,EAAEC,oBAAW;AACpB;;;;;;;;"}
1
+ {"version":3,"file":"icon.js","sources":["../../../../../packages/utils/vue/icon.ts"],"sourcesContent":["import {\n CircleCheck,\n CircleClose,\n CircleCloseFilled,\n Close,\n InfoFilled,\n Loading,\n SuccessFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\nimport { definePropType } from './props'\n\nimport type { Component } from 'vue'\n\nexport const iconPropType = definePropType<string | Component>([\n String,\n Object,\n Function,\n])\n\nexport const CloseComponents = {\n Close,\n}\n\nexport const TypeComponents = {\n Close,\n SuccessFilled,\n InfoFilled,\n WarningFilled,\n CircleCloseFilled,\n}\n\nexport const TypeComponentsMap = {\n success: SuccessFilled,\n warning: WarningFilled,\n error: CircleCloseFilled,\n info: InfoFilled,\n}\n\nexport const ValidateComponentsMap = {\n validating: Loading,\n success: CircleCheck,\n error: CircleClose,\n}\n"],"names":["definePropType","Close","SuccessFilled","InfoFilled","WarningFilled","CircleCloseFilled","Loading","CircleCheck","CircleClose"],"mappings":";;;;;;;;AAWY,MAAC,YAAY,GAAGA,sBAAc,CAAC;AAC3C,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACS,MAAC,eAAe,GAAG;AAC/B,SAAEC,WAAK;AACP,EAAE;AACU,MAAC,cAAc,GAAG;AAC9B,SAAEA,WAAK;AACP,iBAAEC,mBAAa;AACf,cAAEC,gBAAU;AACZ,iBAAEC,mBAAa;AACf,qBAAEC,uBAAiB;AACnB,EAAE;AACU,MAAC,iBAAiB,GAAG;AACjC,EAAE,OAAO,EAAEH,mBAAa;AACxB,EAAE,OAAO,EAAEE,mBAAa;AACxB,EAAE,KAAK,EAAEC,uBAAiB;AAC1B,EAAE,IAAI,EAAEF,gBAAU;AAClB,EAAE;AACU,MAAC,qBAAqB,GAAG;AACrC,EAAE,UAAU,EAAEG,aAAO;AACrB,EAAE,OAAO,EAAEC,iBAAW;AACtB,EAAE,KAAK,EAAEC,iBAAW;AACpB;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hzzt-plus",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A Component Library for Vue 3",
5
5
  "keywords": [
6
6
  "hzzt-plus",