@yh-ui/components 0.1.21 → 0.1.23

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 (485) hide show
  1. package/README.md +2 -0
  2. package/dist/breadcrumb/src/breadcrumb-item.vue +10 -6
  3. package/dist/form/index.cjs +1 -1
  4. package/dist/form/index.d.ts +1 -1
  5. package/dist/form/index.mjs +1 -1
  6. package/dist/icon/index.cjs +1 -1
  7. package/dist/icon/index.d.ts +1 -1
  8. package/dist/icon/index.mjs +1 -1
  9. package/dist/loading/index.cjs +1 -1
  10. package/dist/loading/index.d.ts +1 -1
  11. package/dist/loading/index.mjs +1 -1
  12. package/dist/message/src/method.cjs +1 -1
  13. package/dist/message/src/method.d.ts +1 -1
  14. package/dist/message/src/method.mjs +1 -1
  15. package/dist/message-box/index.cjs +1 -1
  16. package/dist/message-box/index.d.ts +1 -1
  17. package/dist/message-box/index.mjs +1 -1
  18. package/dist/notification/src/method.cjs +1 -1
  19. package/dist/notification/src/method.d.ts +1 -1
  20. package/dist/notification/src/method.mjs +1 -1
  21. package/dist/resolver.cjs +1 -1
  22. package/dist/resolver.d.ts +7 -5
  23. package/dist/resolver.mjs +1 -1
  24. package/dist/style.css +584 -0
  25. package/package.json +9 -8
  26. package/dist/affix/__tests__/affix.bottom.test.cjs +0 -101
  27. package/dist/affix/__tests__/affix.bottom.test.mjs +0 -88
  28. package/dist/affix/__tests__/affix.ssr.test.cjs +0 -38
  29. package/dist/affix/__tests__/affix.ssr.test.mjs +0 -51
  30. package/dist/affix/__tests__/affix.test.cjs +0 -185
  31. package/dist/affix/__tests__/affix.test.mjs +0 -180
  32. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +0 -55
  33. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +0 -39
  34. package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +0 -235
  35. package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +0 -157
  36. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +0 -61
  37. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +0 -65
  38. package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +0 -205
  39. package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +0 -133
  40. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +0 -73
  41. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +0 -68
  42. package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +0 -128
  43. package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +0 -109
  44. package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.cjs +0 -50
  45. package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.mjs +0 -33
  46. package/dist/ai-attachments/__tests__/ai-attachments.test.cjs +0 -113
  47. package/dist/ai-attachments/__tests__/ai-attachments.test.mjs +0 -81
  48. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +0 -95
  49. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +0 -66
  50. package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +0 -624
  51. package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +0 -393
  52. package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.cjs +0 -51
  53. package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.mjs +0 -51
  54. package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.cjs +0 -138
  55. package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.mjs +0 -112
  56. package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +0 -90
  57. package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +0 -77
  58. package/dist/ai-chat/__tests__/ai-chat.test.cjs +0 -177
  59. package/dist/ai-chat/__tests__/ai-chat.test.mjs +0 -129
  60. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +0 -75
  61. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +0 -57
  62. package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +0 -174
  63. package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +0 -108
  64. package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.cjs +0 -46
  65. package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.mjs +0 -39
  66. package/dist/ai-code-editor/__tests__/ai-code-editor.test.cjs +0 -90
  67. package/dist/ai-code-editor/__tests__/ai-code-editor.test.mjs +0 -78
  68. package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.cjs +0 -28
  69. package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.mjs +0 -26
  70. package/dist/ai-code-runner/__tests__/ai-code-runner.test.cjs +0 -69
  71. package/dist/ai-code-runner/__tests__/ai-code-runner.test.mjs +0 -66
  72. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +0 -50
  73. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +0 -42
  74. package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +0 -67
  75. package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +0 -51
  76. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +0 -62
  77. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +0 -50
  78. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +0 -315
  79. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +0 -226
  80. package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.cjs +0 -45
  81. package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.mjs +0 -29
  82. package/dist/ai-file-card/__tests__/ai-file-card.test.cjs +0 -160
  83. package/dist/ai-file-card/__tests__/ai-file-card.test.mjs +0 -109
  84. package/dist/ai-mention/__tests__/ai-mention.ssr.test.cjs +0 -38
  85. package/dist/ai-mention/__tests__/ai-mention.ssr.test.mjs +0 -37
  86. package/dist/ai-mention/__tests__/ai-mention.test.cjs +0 -113
  87. package/dist/ai-mention/__tests__/ai-mention.test.mjs +0 -84
  88. package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.cjs +0 -43
  89. package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.mjs +0 -33
  90. package/dist/ai-mermaid/__tests__/ai-mermaid.test.cjs +0 -113
  91. package/dist/ai-mermaid/__tests__/ai-mermaid.test.mjs +0 -92
  92. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +0 -49
  93. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +0 -41
  94. package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +0 -54
  95. package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +0 -38
  96. package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +0 -33
  97. package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +0 -34
  98. package/dist/ai-provider/__tests__/ai-provider.test.cjs +0 -38
  99. package/dist/ai-provider/__tests__/ai-provider.test.mjs +0 -33
  100. package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +0 -46
  101. package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +0 -37
  102. package/dist/ai-sender/__tests__/ai-sender.test.cjs +0 -511
  103. package/dist/ai-sender/__tests__/ai-sender.test.mjs +0 -322
  104. package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +0 -72
  105. package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +0 -82
  106. package/dist/ai-sources/__tests__/ai-sources.test.cjs +0 -200
  107. package/dist/ai-sources/__tests__/ai-sources.test.mjs +0 -160
  108. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +0 -56
  109. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +0 -42
  110. package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +0 -151
  111. package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +0 -96
  112. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +0 -88
  113. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +0 -55
  114. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +0 -344
  115. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +0 -237
  116. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +0 -32
  117. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +0 -25
  118. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +0 -130
  119. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +0 -103
  120. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +0 -57
  121. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +0 -39
  122. package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +0 -169
  123. package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +0 -113
  124. package/dist/alert/__tests__/alert.ssr.test.cjs +0 -28
  125. package/dist/alert/__tests__/alert.ssr.test.mjs +0 -29
  126. package/dist/alert/__tests__/alert.test.cjs +0 -123
  127. package/dist/alert/__tests__/alert.test.mjs +0 -110
  128. package/dist/autocomplete/__tests__/autocomplete.ssr.test.cjs +0 -54
  129. package/dist/autocomplete/__tests__/autocomplete.ssr.test.mjs +0 -47
  130. package/dist/autocomplete/__tests__/autocomplete.test.cjs +0 -299
  131. package/dist/autocomplete/__tests__/autocomplete.test.mjs +0 -263
  132. package/dist/avatar/__tests__/avatar.ssr.test.cjs +0 -103
  133. package/dist/avatar/__tests__/avatar.ssr.test.mjs +0 -108
  134. package/dist/avatar/__tests__/avatar.test.cjs +0 -146
  135. package/dist/avatar/__tests__/avatar.test.mjs +0 -125
  136. package/dist/back-top/__tests__/back-top.ssr.test.cjs +0 -13
  137. package/dist/back-top/__tests__/back-top.ssr.test.mjs +0 -10
  138. package/dist/back-top/__tests__/back-top.test.cjs +0 -88
  139. package/dist/back-top/__tests__/back-top.test.mjs +0 -76
  140. package/dist/badge/__tests__/badge.ssr.test.cjs +0 -36
  141. package/dist/badge/__tests__/badge.ssr.test.mjs +0 -33
  142. package/dist/badge/__tests__/badge.test.cjs +0 -115
  143. package/dist/badge/__tests__/badge.test.mjs +0 -112
  144. package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.cjs +0 -22
  145. package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.mjs +0 -20
  146. package/dist/breadcrumb/__tests__/breadcrumb.test.cjs +0 -64
  147. package/dist/breadcrumb/__tests__/breadcrumb.test.mjs +0 -51
  148. package/dist/button/__tests__/button.ssr.test.cjs +0 -52
  149. package/dist/button/__tests__/button.ssr.test.mjs +0 -55
  150. package/dist/button/__tests__/button.test.cjs +0 -207
  151. package/dist/button/__tests__/button.test.mjs +0 -141
  152. package/dist/calendar/__tests__/calendar.ssr.test.cjs +0 -65
  153. package/dist/calendar/__tests__/calendar.ssr.test.mjs +0 -63
  154. package/dist/calendar/__tests__/calendar.test.cjs +0 -263
  155. package/dist/calendar/__tests__/calendar.test.mjs +0 -255
  156. package/dist/card/__tests__/card.ssr.test.cjs +0 -37
  157. package/dist/card/__tests__/card.ssr.test.mjs +0 -40
  158. package/dist/card/__tests__/card.test.cjs +0 -131
  159. package/dist/card/__tests__/card.test.mjs +0 -124
  160. package/dist/carousel/__tests__/carousel.ssr.test.cjs +0 -27
  161. package/dist/carousel/__tests__/carousel.ssr.test.mjs +0 -27
  162. package/dist/carousel/__tests__/carousel.test.cjs +0 -115
  163. package/dist/carousel/__tests__/carousel.test.mjs +0 -98
  164. package/dist/cascader/__tests__/cascader-panel.test.cjs +0 -162
  165. package/dist/cascader/__tests__/cascader-panel.test.mjs +0 -151
  166. package/dist/cascader/__tests__/cascader.ssr.test.cjs +0 -61
  167. package/dist/cascader/__tests__/cascader.ssr.test.mjs +0 -55
  168. package/dist/cascader/__tests__/cascader.test.cjs +0 -342
  169. package/dist/cascader/__tests__/cascader.test.mjs +0 -316
  170. package/dist/category-nav/__tests__/category-nav.ssr.test.cjs +0 -35
  171. package/dist/category-nav/__tests__/category-nav.ssr.test.mjs +0 -21
  172. package/dist/category-nav/__tests__/category-nav.test.cjs +0 -53
  173. package/dist/category-nav/__tests__/category-nav.test.mjs +0 -33
  174. package/dist/checkbox/__tests__/checkbox.ssr.test.cjs +0 -52
  175. package/dist/checkbox/__tests__/checkbox.ssr.test.mjs +0 -57
  176. package/dist/checkbox/__tests__/checkbox.test.cjs +0 -173
  177. package/dist/checkbox/__tests__/checkbox.test.mjs +0 -133
  178. package/dist/col/__tests__/col.ssr.test.cjs +0 -44
  179. package/dist/col/__tests__/col.ssr.test.mjs +0 -42
  180. package/dist/col/__tests__/col.test.cjs +0 -128
  181. package/dist/col/__tests__/col.test.mjs +0 -116
  182. package/dist/color-picker/__tests__/color-picker.ssr.test.cjs +0 -34
  183. package/dist/color-picker/__tests__/color-picker.ssr.test.mjs +0 -39
  184. package/dist/color-picker/__tests__/color-picker.test.cjs +0 -227
  185. package/dist/color-picker/__tests__/color-picker.test.mjs +0 -176
  186. package/dist/config-provider/__tests__/config-provider.ssr.test.cjs +0 -43
  187. package/dist/config-provider/__tests__/config-provider.ssr.test.mjs +0 -42
  188. package/dist/config-provider/__tests__/config-provider.test.cjs +0 -75
  189. package/dist/config-provider/__tests__/config-provider.test.mjs +0 -64
  190. package/dist/container/__tests__/container.ssr.test.cjs +0 -71
  191. package/dist/container/__tests__/container.ssr.test.mjs +0 -50
  192. package/dist/container/__tests__/container.test.cjs +0 -111
  193. package/dist/container/__tests__/container.test.mjs +0 -84
  194. package/dist/countdown/__tests__/countdown.ssr.test.cjs +0 -86
  195. package/dist/countdown/__tests__/countdown.ssr.test.mjs +0 -78
  196. package/dist/countdown/__tests__/countdown.test.cjs +0 -767
  197. package/dist/countdown/__tests__/countdown.test.mjs +0 -722
  198. package/dist/coupon-card/__tests__/coupon-card.ssr.test.cjs +0 -21
  199. package/dist/coupon-card/__tests__/coupon-card.ssr.test.mjs +0 -18
  200. package/dist/coupon-card/__tests__/coupon-card.test.cjs +0 -67
  201. package/dist/coupon-card/__tests__/coupon-card.test.mjs +0 -64
  202. package/dist/date-picker/__tests__/date-picker-extended.test.cjs +0 -581
  203. package/dist/date-picker/__tests__/date-picker-extended.test.mjs +0 -455
  204. package/dist/date-picker/__tests__/date-picker.ssr.test.cjs +0 -26
  205. package/dist/date-picker/__tests__/date-picker.ssr.test.mjs +0 -23
  206. package/dist/date-picker/__tests__/date-picker.test.cjs +0 -170
  207. package/dist/date-picker/__tests__/date-picker.test.mjs +0 -136
  208. package/dist/descriptions/__tests__/descriptions.ssr.test.cjs +0 -67
  209. package/dist/descriptions/__tests__/descriptions.ssr.test.mjs +0 -72
  210. package/dist/descriptions/__tests__/descriptions.test.cjs +0 -150
  211. package/dist/descriptions/__tests__/descriptions.test.mjs +0 -130
  212. package/dist/dialog/__tests__/dialog.functional.test.cjs +0 -49
  213. package/dist/dialog/__tests__/dialog.functional.test.mjs +0 -49
  214. package/dist/dialog/__tests__/dialog.ssr.test.cjs +0 -31
  215. package/dist/dialog/__tests__/dialog.ssr.test.mjs +0 -29
  216. package/dist/dialog/__tests__/dialog.test.cjs +0 -561
  217. package/dist/dialog/__tests__/dialog.test.mjs +0 -388
  218. package/dist/divider/__tests__/divider.ssr.test.cjs +0 -41
  219. package/dist/divider/__tests__/divider.ssr.test.mjs +0 -44
  220. package/dist/divider/__tests__/divider.test.cjs +0 -71
  221. package/dist/divider/__tests__/divider.test.mjs +0 -68
  222. package/dist/drawer/__tests__/drawer.ssr.test.cjs +0 -25
  223. package/dist/drawer/__tests__/drawer.ssr.test.mjs +0 -23
  224. package/dist/drawer/__tests__/drawer.test.cjs +0 -145
  225. package/dist/drawer/__tests__/drawer.test.mjs +0 -122
  226. package/dist/dropdown/__tests__/dropdown.ssr.test.cjs +0 -49
  227. package/dist/dropdown/__tests__/dropdown.ssr.test.mjs +0 -64
  228. package/dist/dropdown/__tests__/dropdown.test.cjs +0 -310
  229. package/dist/dropdown/__tests__/dropdown.test.mjs +0 -269
  230. package/dist/empty/__tests__/empty.ssr.test.cjs +0 -96
  231. package/dist/empty/__tests__/empty.ssr.test.mjs +0 -99
  232. package/dist/empty/__tests__/empty.test.cjs +0 -110
  233. package/dist/empty/__tests__/empty.test.mjs +0 -101
  234. package/dist/filter-bar/__tests__/filter-bar.ssr.test.cjs +0 -29
  235. package/dist/filter-bar/__tests__/filter-bar.ssr.test.mjs +0 -16
  236. package/dist/filter-bar/__tests__/filter-bar.test.cjs +0 -51
  237. package/dist/filter-bar/__tests__/filter-bar.test.mjs +0 -29
  238. package/dist/form/__tests__/form-schema.test.cjs +0 -636
  239. package/dist/form/__tests__/form-schema.test.mjs +0 -366
  240. package/dist/form/__tests__/form.ssr.test.cjs +0 -74
  241. package/dist/form/__tests__/form.ssr.test.mjs +0 -73
  242. package/dist/form/__tests__/form.test.cjs +0 -208
  243. package/dist/form/__tests__/form.test.mjs +0 -128
  244. package/dist/gantt-chart/__tests__/debug_ssr.test.cjs +0 -51
  245. package/dist/gantt-chart/__tests__/debug_ssr.test.mjs +0 -37
  246. package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.cjs +0 -95
  247. package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.mjs +0 -94
  248. package/dist/gantt-chart/__tests__/gantt-chart.test.cjs +0 -86
  249. package/dist/gantt-chart/__tests__/gantt-chart.test.mjs +0 -79
  250. package/dist/grid/__tests__/grid.ssr.test.cjs +0 -81
  251. package/dist/grid/__tests__/grid.ssr.test.mjs +0 -63
  252. package/dist/grid/__tests__/grid.test.cjs +0 -142
  253. package/dist/grid/__tests__/grid.test.mjs +0 -89
  254. package/dist/icon/__tests__/icon.ssr.test.cjs +0 -35
  255. package/dist/icon/__tests__/icon.ssr.test.mjs +0 -26
  256. package/dist/icon/__tests__/icon.test.cjs +0 -144
  257. package/dist/icon/__tests__/icon.test.mjs +0 -123
  258. package/dist/image/__tests__/image-viewer.test.cjs +0 -101
  259. package/dist/image/__tests__/image-viewer.test.mjs +0 -94
  260. package/dist/image/__tests__/image.ssr.test.cjs +0 -73
  261. package/dist/image/__tests__/image.ssr.test.mjs +0 -72
  262. package/dist/image/__tests__/image.test.cjs +0 -171
  263. package/dist/image/__tests__/image.test.mjs +0 -159
  264. package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.cjs +0 -54
  265. package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.mjs +0 -35
  266. package/dist/image-magnifier/__tests__/image-magnifier.test.cjs +0 -257
  267. package/dist/image-magnifier/__tests__/image-magnifier.test.mjs +0 -177
  268. package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.cjs +0 -59
  269. package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.mjs +0 -84
  270. package/dist/infinite-scroll/__tests__/infinite-scroll.test.cjs +0 -255
  271. package/dist/infinite-scroll/__tests__/infinite-scroll.test.mjs +0 -187
  272. package/dist/input/__tests__/input-utils.test.cjs +0 -77
  273. package/dist/input/__tests__/input-utils.test.mjs +0 -75
  274. package/dist/input/__tests__/input.ssr.test.cjs +0 -100
  275. package/dist/input/__tests__/input.ssr.test.mjs +0 -85
  276. package/dist/input/__tests__/input.test.cjs +0 -127
  277. package/dist/input/__tests__/input.test.mjs +0 -112
  278. package/dist/input-number/__tests__/input-number.hydration.test.cjs +0 -24
  279. package/dist/input-number/__tests__/input-number.hydration.test.mjs +0 -21
  280. package/dist/input-number/__tests__/input-number.ssr.test.cjs +0 -95
  281. package/dist/input-number/__tests__/input-number.ssr.test.mjs +0 -92
  282. package/dist/input-number/__tests__/input-number.test.cjs +0 -199
  283. package/dist/input-number/__tests__/input-number.test.mjs +0 -173
  284. package/dist/input-tag/__tests__/input-tag.ssr.test.cjs +0 -47
  285. package/dist/input-tag/__tests__/input-tag.ssr.test.mjs +0 -41
  286. package/dist/input-tag/__tests__/input-tag.test.cjs +0 -268
  287. package/dist/input-tag/__tests__/input-tag.test.mjs +0 -201
  288. package/dist/loading/__tests__/loading.ssr.test.cjs +0 -37
  289. package/dist/loading/__tests__/loading.ssr.test.mjs +0 -27
  290. package/dist/loading/__tests__/loading.test.cjs +0 -91
  291. package/dist/loading/__tests__/loading.test.mjs +0 -75
  292. package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.cjs +0 -33
  293. package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.mjs +0 -31
  294. package/dist/lucky-draw/__tests__/lucky-draw.test.cjs +0 -56
  295. package/dist/lucky-draw/__tests__/lucky-draw.test.mjs +0 -48
  296. package/dist/marquee/__tests__/marquee.ssr.test.cjs +0 -59
  297. package/dist/marquee/__tests__/marquee.ssr.test.mjs +0 -60
  298. package/dist/marquee/__tests__/marquee.test.cjs +0 -94
  299. package/dist/marquee/__tests__/marquee.test.mjs +0 -92
  300. package/dist/mention/__tests__/mention.ssr.test.cjs +0 -92
  301. package/dist/mention/__tests__/mention.ssr.test.mjs +0 -70
  302. package/dist/mention/__tests__/mention.test.cjs +0 -650
  303. package/dist/mention/__tests__/mention.test.mjs +0 -523
  304. package/dist/menu/__tests__/menu.ssr.test.cjs +0 -92
  305. package/dist/menu/__tests__/menu.ssr.test.mjs +0 -124
  306. package/dist/menu/__tests__/menu.test.cjs +0 -209
  307. package/dist/menu/__tests__/menu.test.mjs +0 -182
  308. package/dist/message/__tests__/message.ssr.test.cjs +0 -29
  309. package/dist/message/__tests__/message.ssr.test.mjs +0 -23
  310. package/dist/message/__tests__/message.test.cjs +0 -170
  311. package/dist/message/__tests__/message.test.mjs +0 -154
  312. package/dist/message-box/__tests__/message-box.ssr.test.cjs +0 -33
  313. package/dist/message-box/__tests__/message-box.ssr.test.mjs +0 -30
  314. package/dist/message-box/__tests__/message-box.test.cjs +0 -100
  315. package/dist/message-box/__tests__/message-box.test.mjs +0 -95
  316. package/dist/notification/__tests__/notification.ssr.test.cjs +0 -31
  317. package/dist/notification/__tests__/notification.ssr.test.mjs +0 -25
  318. package/dist/notification/__tests__/notification.test.cjs +0 -248
  319. package/dist/notification/__tests__/notification.test.mjs +0 -206
  320. package/dist/pagination/__tests__/pagination.ssr.test.cjs +0 -61
  321. package/dist/pagination/__tests__/pagination.ssr.test.mjs +0 -59
  322. package/dist/pagination/__tests__/pagination.test.cjs +0 -135
  323. package/dist/pagination/__tests__/pagination.test.mjs +0 -131
  324. package/dist/popconfirm/__tests__/popconfirm.ssr.test.cjs +0 -48
  325. package/dist/popconfirm/__tests__/popconfirm.ssr.test.mjs +0 -63
  326. package/dist/popconfirm/__tests__/popconfirm.test.cjs +0 -62
  327. package/dist/popconfirm/__tests__/popconfirm.test.mjs +0 -56
  328. package/dist/popover/__tests__/popover.ssr.test.cjs +0 -48
  329. package/dist/popover/__tests__/popover.ssr.test.mjs +0 -63
  330. package/dist/popover/__tests__/popover.test.cjs +0 -107
  331. package/dist/popover/__tests__/popover.test.mjs +0 -93
  332. package/dist/price/__tests__/price.ssr.test.cjs +0 -20
  333. package/dist/price/__tests__/price.ssr.test.mjs +0 -19
  334. package/dist/price/__tests__/price.test.cjs +0 -45
  335. package/dist/price/__tests__/price.test.mjs +0 -42
  336. package/dist/product-card/__tests__/product-card.ssr.test.cjs +0 -21
  337. package/dist/product-card/__tests__/product-card.ssr.test.mjs +0 -18
  338. package/dist/product-card/__tests__/product-card.test.cjs +0 -54
  339. package/dist/product-card/__tests__/product-card.test.mjs +0 -53
  340. package/dist/progress/__tests__/progress.ssr.test.cjs +0 -31
  341. package/dist/progress/__tests__/progress.ssr.test.mjs +0 -29
  342. package/dist/progress/__tests__/progress.test.cjs +0 -119
  343. package/dist/progress/__tests__/progress.test.mjs +0 -77
  344. package/dist/radio/__tests__/radio-button.test.cjs +0 -99
  345. package/dist/radio/__tests__/radio-button.test.mjs +0 -83
  346. package/dist/radio/__tests__/radio.ssr.test.cjs +0 -132
  347. package/dist/radio/__tests__/radio.ssr.test.mjs +0 -165
  348. package/dist/radio/__tests__/radio.test.cjs +0 -170
  349. package/dist/radio/__tests__/radio.test.mjs +0 -143
  350. package/dist/rate/__tests__/rate.ssr.test.cjs +0 -106
  351. package/dist/rate/__tests__/rate.ssr.test.mjs +0 -103
  352. package/dist/rate/__tests__/rate.test.cjs +0 -88
  353. package/dist/rate/__tests__/rate.test.mjs +0 -85
  354. package/dist/result/__tests__/result.ssr.test.cjs +0 -62
  355. package/dist/result/__tests__/result.ssr.test.mjs +0 -51
  356. package/dist/result/__tests__/result.test.cjs +0 -135
  357. package/dist/result/__tests__/result.test.mjs +0 -92
  358. package/dist/row/__tests__/row.ssr.test.cjs +0 -29
  359. package/dist/row/__tests__/row.ssr.test.mjs +0 -30
  360. package/dist/row/__tests__/row.test.cjs +0 -89
  361. package/dist/row/__tests__/row.test.mjs +0 -86
  362. package/dist/row/__tests__/row_ts.test.cjs +0 -31
  363. package/dist/row/__tests__/row_ts.test.mjs +0 -28
  364. package/dist/scrollbar/__tests__/scrollbar.ssr.test.cjs +0 -49
  365. package/dist/scrollbar/__tests__/scrollbar.ssr.test.mjs +0 -54
  366. package/dist/scrollbar/__tests__/scrollbar.test.cjs +0 -43
  367. package/dist/scrollbar/__tests__/scrollbar.test.mjs +0 -40
  368. package/dist/select/__tests__/select.perf.test.cjs +0 -191
  369. package/dist/select/__tests__/select.perf.test.mjs +0 -185
  370. package/dist/select/__tests__/select.ssr.test.cjs +0 -58
  371. package/dist/select/__tests__/select.ssr.test.mjs +0 -52
  372. package/dist/select/__tests__/select.test.cjs +0 -414
  373. package/dist/select/__tests__/select.test.mjs +0 -345
  374. package/dist/skeleton/__tests__/skeleton.ssr.test.cjs +0 -81
  375. package/dist/skeleton/__tests__/skeleton.ssr.test.mjs +0 -83
  376. package/dist/skeleton/__tests__/skeleton.test.cjs +0 -72
  377. package/dist/skeleton/__tests__/skeleton.test.mjs +0 -65
  378. package/dist/sku-selector/__tests__/sku-selector.ssr.test.cjs +0 -32
  379. package/dist/sku-selector/__tests__/sku-selector.ssr.test.mjs +0 -19
  380. package/dist/sku-selector/__tests__/sku-selector.test.cjs +0 -64
  381. package/dist/sku-selector/__tests__/sku-selector.test.mjs +0 -53
  382. package/dist/slider/__tests__/repro.test.cjs +0 -25
  383. package/dist/slider/__tests__/repro.test.mjs +0 -22
  384. package/dist/slider/__tests__/slider.ssr.test.cjs +0 -118
  385. package/dist/slider/__tests__/slider.ssr.test.mjs +0 -115
  386. package/dist/slider/__tests__/slider.test.cjs +0 -155
  387. package/dist/slider/__tests__/slider.test.mjs +0 -120
  388. package/dist/smart-address/__tests__/smart-address.ssr.test.cjs +0 -28
  389. package/dist/smart-address/__tests__/smart-address.ssr.test.mjs +0 -25
  390. package/dist/smart-address/__tests__/smart-address.test.cjs +0 -68
  391. package/dist/smart-address/__tests__/smart-address.test.mjs +0 -56
  392. package/dist/space/__tests__/space.ssr.test.cjs +0 -115
  393. package/dist/space/__tests__/space.ssr.test.mjs +0 -150
  394. package/dist/space/__tests__/space.test.cjs +0 -227
  395. package/dist/space/__tests__/space.test.mjs +0 -187
  396. package/dist/spin/__tests__/spin.ssr.test.cjs +0 -46
  397. package/dist/spin/__tests__/spin.ssr.test.mjs +0 -43
  398. package/dist/spin/__tests__/spin.test.cjs +0 -65
  399. package/dist/spin/__tests__/spin.test.mjs +0 -63
  400. package/dist/steps/__tests__/steps.ssr.test.cjs +0 -73
  401. package/dist/steps/__tests__/steps.ssr.test.mjs +0 -55
  402. package/dist/steps/__tests__/steps.test.cjs +0 -152
  403. package/dist/steps/__tests__/steps.test.mjs +0 -123
  404. package/dist/submit-bar/__tests__/submit-bar.ssr.test.cjs +0 -21
  405. package/dist/submit-bar/__tests__/submit-bar.ssr.test.mjs +0 -18
  406. package/dist/submit-bar/__tests__/submit-bar.test.cjs +0 -50
  407. package/dist/submit-bar/__tests__/submit-bar.test.mjs +0 -36
  408. package/dist/switch/__tests__/switch.ssr.test.cjs +0 -105
  409. package/dist/switch/__tests__/switch.ssr.test.mjs +0 -102
  410. package/dist/switch/__tests__/switch.test.cjs +0 -251
  411. package/dist/switch/__tests__/switch.test.mjs +0 -193
  412. package/dist/table/__tests__/table-advance.test.cjs +0 -180
  413. package/dist/table/__tests__/table-advance.test.mjs +0 -118
  414. package/dist/table/__tests__/table-interaction.test.cjs +0 -236
  415. package/dist/table/__tests__/table-interaction.test.mjs +0 -162
  416. package/dist/table/__tests__/table-utils.test.cjs +0 -690
  417. package/dist/table/__tests__/table-utils.test.mjs +0 -485
  418. package/dist/table/__tests__/table.perf.test.cjs +0 -231
  419. package/dist/table/__tests__/table.perf.test.mjs +0 -225
  420. package/dist/table/__tests__/table.ssr.test.cjs +0 -296
  421. package/dist/table/__tests__/table.ssr.test.mjs +0 -265
  422. package/dist/table/__tests__/table.test.cjs +0 -682
  423. package/dist/table/__tests__/table.test.mjs +0 -617
  424. package/dist/table/__tests__/use-column-drag.test.cjs +0 -238
  425. package/dist/table/__tests__/use-column-drag.test.mjs +0 -150
  426. package/dist/table/__tests__/use-table-export.test.cjs +0 -179
  427. package/dist/table/__tests__/use-table-export.test.mjs +0 -105
  428. package/dist/table/__tests__/use-table-import.test.cjs +0 -206
  429. package/dist/table/__tests__/use-table-import.test.mjs +0 -144
  430. package/dist/table/__tests__/use-table-print.test.cjs +0 -190
  431. package/dist/table/__tests__/use-table-print.test.mjs +0 -134
  432. package/dist/table/__tests__/use-virtual-scroll.test.cjs +0 -286
  433. package/dist/table/__tests__/use-virtual-scroll.test.mjs +0 -196
  434. package/dist/tabs/__tests__/tabs.ssr.test.cjs +0 -57
  435. package/dist/tabs/__tests__/tabs.ssr.test.mjs +0 -41
  436. package/dist/tabs/__tests__/tabs.test.cjs +0 -171
  437. package/dist/tabs/__tests__/tabs.test.mjs +0 -134
  438. package/dist/tag/__tests__/tag.ssr.test.cjs +0 -45
  439. package/dist/tag/__tests__/tag.ssr.test.mjs +0 -48
  440. package/dist/tag/__tests__/tag.test.cjs +0 -194
  441. package/dist/tag/__tests__/tag.test.mjs +0 -167
  442. package/dist/time-picker/__tests__/time-picker.ssr.test.cjs +0 -46
  443. package/dist/time-picker/__tests__/time-picker.ssr.test.mjs +0 -43
  444. package/dist/time-picker/__tests__/time-picker.test.cjs +0 -228
  445. package/dist/time-picker/__tests__/time-picker.test.mjs +0 -218
  446. package/dist/time-picker/__tests__/time-spinner.test.cjs +0 -196
  447. package/dist/time-picker/__tests__/time-spinner.test.mjs +0 -162
  448. package/dist/time-select/__tests__/time-select.ssr.test.cjs +0 -42
  449. package/dist/time-select/__tests__/time-select.ssr.test.mjs +0 -37
  450. package/dist/time-select/__tests__/time-select.test.cjs +0 -390
  451. package/dist/time-select/__tests__/time-select.test.mjs +0 -374
  452. package/dist/tooltip/__tests__/tooltip.ssr.test.cjs +0 -55
  453. package/dist/tooltip/__tests__/tooltip.ssr.test.mjs +0 -76
  454. package/dist/tooltip/__tests__/tooltip.test.cjs +0 -132
  455. package/dist/tooltip/__tests__/tooltip.test.mjs +0 -121
  456. package/dist/transfer/__tests__/transfer.ssr.test.cjs +0 -47
  457. package/dist/transfer/__tests__/transfer.ssr.test.mjs +0 -44
  458. package/dist/transfer/__tests__/transfer.test.cjs +0 -422
  459. package/dist/transfer/__tests__/transfer.test.mjs +0 -405
  460. package/dist/tree/__tests__/tree.perf.test.cjs +0 -182
  461. package/dist/tree/__tests__/tree.perf.test.mjs +0 -198
  462. package/dist/tree/__tests__/tree.ssr.test.cjs +0 -56
  463. package/dist/tree/__tests__/tree.ssr.test.mjs +0 -45
  464. package/dist/tree/__tests__/tree.test.cjs +0 -488
  465. package/dist/tree/__tests__/tree.test.mjs +0 -333
  466. package/dist/tree-select/__tests__/tree-select.ssr.test.cjs +0 -52
  467. package/dist/tree-select/__tests__/tree-select.ssr.test.mjs +0 -55
  468. package/dist/tree-select/__tests__/tree-select.test.cjs +0 -231
  469. package/dist/tree-select/__tests__/tree-select.test.mjs +0 -189
  470. package/dist/typography/__tests__/typography.ssr.test.cjs +0 -85
  471. package/dist/typography/__tests__/typography.ssr.test.mjs +0 -63
  472. package/dist/typography/__tests__/typography.test.cjs +0 -362
  473. package/dist/typography/__tests__/typography.test.mjs +0 -161
  474. package/dist/upload/__tests__/upload.ssr.test.cjs +0 -28
  475. package/dist/upload/__tests__/upload.ssr.test.mjs +0 -26
  476. package/dist/upload/__tests__/upload.test.cjs +0 -467
  477. package/dist/upload/__tests__/upload.test.mjs +0 -336
  478. package/dist/waterfall/__tests__/waterfall.ssr.test.cjs +0 -38
  479. package/dist/waterfall/__tests__/waterfall.ssr.test.mjs +0 -39
  480. package/dist/waterfall/__tests__/waterfall.test.cjs +0 -122
  481. package/dist/waterfall/__tests__/waterfall.test.mjs +0 -85
  482. package/dist/watermark/__tests__/watermark.ssr.test.cjs +0 -32
  483. package/dist/watermark/__tests__/watermark.ssr.test.mjs +0 -30
  484. package/dist/watermark/__tests__/watermark.test.cjs +0 -127
  485. package/dist/watermark/__tests__/watermark.test.mjs +0 -124
@@ -1,248 +0,0 @@
1
- "use strict";
2
-
3
- var _vitest = require("vitest");
4
- var _vue = require("vue");
5
- var _method = _interopRequireDefault(require("../src/method.cjs"));
6
- var _notification = require("../src/notification.cjs");
7
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
- (0, _vitest.describe)("Notification Constants Coverage", () => {
9
- (0, _vitest.it)("should have constants defined", () => {
10
- (0, _vitest.expect)(_notification.notificationTypes).toContain("success");
11
- (0, _vitest.expect)(_notification.notificationPositions).toContain("top-right");
12
- });
13
- });
14
- (0, _vitest.describe)("Notification \u65B9\u6CD5", () => {
15
- (0, _vitest.beforeEach)(() => {
16
- document.body.innerHTML = "";
17
- });
18
- (0, _vitest.afterEach)(() => {
19
- _method.default.closeAll();
20
- });
21
- (0, _vitest.it)("\u5E94\u8BE5\u80FD\u521B\u5EFA\u901A\u77E5", async () => {
22
- const handler = (0, _method.default)({
23
- title: "\u6807\u9898",
24
- message: "\u901A\u77E5\u5185\u5BB9"
25
- });
26
- await (0, _vue.nextTick)();
27
- const notificationEl = document.querySelector(".yh-notification");
28
- (0, _vitest.expect)(notificationEl).toBeTruthy();
29
- (0, _vitest.expect)(notificationEl?.querySelector(".yh-notification__title")?.textContent).toBe("\u6807\u9898");
30
- (0, _vitest.expect)(notificationEl?.querySelector(".yh-notification__text")?.textContent).toBe("\u901A\u77E5\u5185\u5BB9");
31
- handler.close();
32
- });
33
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301\u4E0D\u540C\u7C7B\u578B", async () => {
34
- const successHandler = _method.default.success("\u6210\u529F", "\u64CD\u4F5C\u6210\u529F");
35
- await (0, _vue.nextTick)();
36
- const successEl = document.querySelector(".yh-notification--success");
37
- (0, _vitest.expect)(successEl).toBeTruthy();
38
- successHandler.close();
39
- const errorHandler = _method.default.error("\u9519\u8BEF", "\u64CD\u4F5C\u5931\u8D25");
40
- await (0, _vue.nextTick)();
41
- const errorEl = document.querySelector(".yh-notification--error");
42
- (0, _vitest.expect)(errorEl).toBeTruthy();
43
- errorHandler.close();
44
- });
45
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301\u4E0D\u540C\u4F4D\u7F6E", async () => {
46
- const handler1 = (0, _method.default)({
47
- title: "\u53F3\u4E0A",
48
- position: "top-right"
49
- });
50
- await (0, _vue.nextTick)();
51
- const topRightEl = document.querySelector(".yh-notification--top-right");
52
- (0, _vitest.expect)(topRightEl).toBeTruthy();
53
- handler1.close();
54
- const handler2 = (0, _method.default)({
55
- title: "\u5DE6\u4E0B",
56
- position: "bottom-left"
57
- });
58
- await (0, _vue.nextTick)();
59
- const bottomLeftEl = document.querySelector(".yh-notification--bottom-left");
60
- (0, _vitest.expect)(bottomLeftEl).toBeTruthy();
61
- handler2.close();
62
- });
63
- (0, _vitest.it)("\u5E94\u8BE5\u9ED8\u8BA4\u663E\u793A\u5173\u95ED\u6309\u94AE", async () => {
64
- const handler = (0, _method.default)({
65
- title: "\u6D4B\u8BD5"
66
- });
67
- await (0, _vue.nextTick)();
68
- const closeBtn = document.querySelector(".yh-notification__close");
69
- (0, _vitest.expect)(closeBtn).toBeTruthy();
70
- handler.close();
71
- });
72
- (0, _vitest.it)("\u5E94\u8BE5\u80FD\u624B\u52A8\u5173\u95ED\u901A\u77E5", async () => {
73
- const handler = (0, _method.default)({
74
- title: "\u6D4B\u8BD5\u5173\u95ED"
75
- });
76
- await (0, _vue.nextTick)();
77
- let notificationEl = document.querySelector(".yh-notification");
78
- (0, _vitest.expect)(notificationEl).toBeTruthy();
79
- handler.close();
80
- await (0, _vue.nextTick)();
81
- await new Promise(resolve => setTimeout(resolve, 300));
82
- notificationEl = document.querySelector(".yh-notification");
83
- (0, _vitest.expect)(notificationEl).toBeFalsy();
84
- });
85
- (0, _vitest.it)("\u5E94\u8BE5\u80FD\u5173\u95ED\u6240\u6709\u901A\u77E5", async () => {
86
- (0, _method.default)({
87
- title: "\u901A\u77E51"
88
- });
89
- (0, _method.default)({
90
- title: "\u901A\u77E52"
91
- });
92
- (0, _method.default)({
93
- title: "\u901A\u77E53"
94
- });
95
- await (0, _vue.nextTick)();
96
- let notifications = document.querySelectorAll(".yh-notification");
97
- (0, _vitest.expect)(notifications.length).toBe(3);
98
- _method.default.closeAll();
99
- await (0, _vue.nextTick)();
100
- await new Promise(resolve => setTimeout(resolve, 500));
101
- notifications = document.querySelectorAll(".yh-notification");
102
- (0, _vitest.expect)(notifications.length).toBe(0);
103
- });
104
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301 onClick \u56DE\u8C03", async () => {
105
- const onClick = _vitest.vi.fn();
106
- const handler = (0, _method.default)({
107
- title: "\u6D4B\u8BD5\u70B9\u51FB",
108
- onClick
109
- });
110
- await (0, _vue.nextTick)();
111
- const notificationEl = document.querySelector(".yh-notification");
112
- notificationEl.click();
113
- (0, _vitest.expect)(onClick).toHaveBeenCalled();
114
- handler.close();
115
- });
116
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301 onClose \u56DE\u8C03", async () => {
117
- const onClose = _vitest.vi.fn();
118
- const handler = (0, _method.default)({
119
- title: "\u6D4B\u8BD5\u56DE\u8C03",
120
- onClose
121
- });
122
- await (0, _vue.nextTick)();
123
- handler.close();
124
- await (0, _vue.nextTick)();
125
- (0, _vitest.expect)(onClose).toHaveBeenCalled();
126
- });
127
- (0, _vitest.it)("\u540C\u4E00\u4F4D\u7F6E\u7684\u901A\u77E5\u5E94\u8BE5\u81EA\u52A8\u8BA1\u7B97\u504F\u79FB\u91CF", async () => {
128
- (0, _method.default)({
129
- title: "\u901A\u77E51",
130
- position: "top-right"
131
- });
132
- await (0, _vue.nextTick)();
133
- (0, _method.default)({
134
- title: "\u901A\u77E52",
135
- position: "top-right"
136
- });
137
- await (0, _vue.nextTick)();
138
- const notifications = document.querySelectorAll(".yh-notification--top-right");
139
- (0, _vitest.expect)(notifications.length).toBe(2);
140
- const firstTop = parseInt(notifications[0].style.top);
141
- const secondTop = parseInt(notifications[1].style.top);
142
- (0, _vitest.expect)(secondTop).toBeGreaterThan(firstTop);
143
- });
144
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301 top-center \u4F4D\u7F6E", async () => {
145
- const handler = (0, _method.default)({
146
- title: "\u9876\u90E8\u5C45\u4E2D",
147
- position: "top-center"
148
- });
149
- await (0, _vue.nextTick)();
150
- const topCenterEl = document.querySelector(".yh-notification--top-center");
151
- (0, _vitest.expect)(topCenterEl).toBeTruthy();
152
- handler.close();
153
- });
154
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301 bottom-center \u4F4D\u7F6E", async () => {
155
- const handler = (0, _method.default)({
156
- title: "\u5E95\u90E8\u5C45\u4E2D",
157
- position: "bottom-center"
158
- });
159
- await (0, _vue.nextTick)();
160
- const bottomCenterEl = document.querySelector(".yh-notification--bottom-center");
161
- (0, _vitest.expect)(bottomCenterEl).toBeTruthy();
162
- handler.close();
163
- });
164
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301 max \u9650\u5236\u901A\u77E5\u6570\u91CF", async () => {
165
- (0, _method.default)({
166
- title: "\u901A\u77E51",
167
- position: "top-right",
168
- max: 2
169
- });
170
- await (0, _vue.nextTick)();
171
- (0, _method.default)({
172
- title: "\u901A\u77E52",
173
- position: "top-right",
174
- max: 2
175
- });
176
- await (0, _vue.nextTick)();
177
- let notifications = document.querySelectorAll(".yh-notification--top-right");
178
- (0, _vitest.expect)(notifications.length).toBe(2);
179
- (0, _method.default)({
180
- title: "\u901A\u77E53",
181
- position: "top-right",
182
- max: 2
183
- });
184
- await (0, _vue.nextTick)();
185
- await new Promise(resolve => setTimeout(resolve, 350));
186
- notifications = document.querySelectorAll(".yh-notification--top-right");
187
- (0, _vitest.expect)(notifications.length).toBeLessThanOrEqual(2);
188
- });
189
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301 VNode \u4F5C\u4E3A message", async () => {
190
- const {
191
- h
192
- } = await Promise.resolve().then(() => require("vue"));
193
- const handler = (0, _method.default)({
194
- title: "VNode \u6D88\u606F",
195
- message: h("p", null, [h("span", null, "Message can be "), h("i", {
196
- style: "color: teal"
197
- }, "VNode")])
198
- });
199
- await (0, _vue.nextTick)();
200
- const notificationEl = document.querySelector(".yh-notification");
201
- (0, _vitest.expect)(notificationEl).toBeTruthy();
202
- (0, _vitest.expect)(notificationEl?.textContent).toContain("Message can be");
203
- (0, _vitest.expect)(notificationEl?.textContent).toContain("VNode");
204
- handler.close();
205
- });
206
- (0, _vitest.it)("\u5E94\u8BE5\u652F\u6301\u51FD\u6570\u5F62\u5F0F\u7684 message\uFF08\u52A8\u6001 VNode\uFF09", async () => {
207
- const {
208
- h,
209
- ref
210
- } = await Promise.resolve().then(() => require("vue"));
211
- const count = ref(0);
212
- const handler = (0, _method.default)({
213
- title: "\u52A8\u6001\u6D88\u606F",
214
- message: () => h("span", null, `Count: ${count.value}`)
215
- });
216
- await (0, _vue.nextTick)();
217
- const notificationEl = document.querySelector(".yh-notification");
218
- (0, _vitest.expect)(notificationEl).toBeTruthy();
219
- (0, _vitest.expect)(notificationEl?.textContent).toContain("Count: 0");
220
- handler.close();
221
- });
222
- (0, _vitest.it)("\u5E94\u8BE5\u8986\u76D6 Notification.vue \u7684\u5269\u4F59\u5206\u652F (\u8986\u76D6\u903B\u8F91)", async () => {
223
- (0, _method.default)({
224
- title: "z-index",
225
- zIndex: 9999,
226
- icon: "my-icon"
227
- });
228
- await (0, _vue.nextTick)();
229
- const el = document.querySelector(".yh-notification");
230
- (0, _vitest.expect)(el.style.zIndex).toBe("9999");
231
- (0, _method.default)({
232
- title: "html",
233
- message: "<b>bold</b>",
234
- dangerouslyUseHTMLString: true
235
- });
236
- await (0, _vue.nextTick)();
237
- (0, _vitest.expect)(document.body.innerHTML).toContain("<b>bold</b>");
238
- const handler = (0, _method.default)({
239
- title: "hover",
240
- duration: 1e3
241
- });
242
- await (0, _vue.nextTick)();
243
- const notifyEl = document.querySelector(".yh-notification");
244
- await notifyEl.dispatchEvent(new MouseEvent("mouseenter"));
245
- await notifyEl.dispatchEvent(new MouseEvent("mouseleave"));
246
- handler.close();
247
- });
248
- });
@@ -1,206 +0,0 @@
1
- import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
2
- import { nextTick } from "vue";
3
- import Notification from "../src/method.mjs";
4
- import { notificationTypes, notificationPositions } from "../src/notification.mjs";
5
- describe("Notification Constants Coverage", () => {
6
- it("should have constants defined", () => {
7
- expect(notificationTypes).toContain("success");
8
- expect(notificationPositions).toContain("top-right");
9
- });
10
- });
11
- describe("Notification \u65B9\u6CD5", () => {
12
- beforeEach(() => {
13
- document.body.innerHTML = "";
14
- });
15
- afterEach(() => {
16
- Notification.closeAll();
17
- });
18
- it("\u5E94\u8BE5\u80FD\u521B\u5EFA\u901A\u77E5", async () => {
19
- const handler = Notification({
20
- title: "\u6807\u9898",
21
- message: "\u901A\u77E5\u5185\u5BB9"
22
- });
23
- await nextTick();
24
- const notificationEl = document.querySelector(".yh-notification");
25
- expect(notificationEl).toBeTruthy();
26
- expect(notificationEl?.querySelector(".yh-notification__title")?.textContent).toBe("\u6807\u9898");
27
- expect(notificationEl?.querySelector(".yh-notification__text")?.textContent).toBe("\u901A\u77E5\u5185\u5BB9");
28
- handler.close();
29
- });
30
- it("\u5E94\u8BE5\u652F\u6301\u4E0D\u540C\u7C7B\u578B", async () => {
31
- const successHandler = Notification.success("\u6210\u529F", "\u64CD\u4F5C\u6210\u529F");
32
- await nextTick();
33
- const successEl = document.querySelector(".yh-notification--success");
34
- expect(successEl).toBeTruthy();
35
- successHandler.close();
36
- const errorHandler = Notification.error("\u9519\u8BEF", "\u64CD\u4F5C\u5931\u8D25");
37
- await nextTick();
38
- const errorEl = document.querySelector(".yh-notification--error");
39
- expect(errorEl).toBeTruthy();
40
- errorHandler.close();
41
- });
42
- it("\u5E94\u8BE5\u652F\u6301\u4E0D\u540C\u4F4D\u7F6E", async () => {
43
- const handler1 = Notification({
44
- title: "\u53F3\u4E0A",
45
- position: "top-right"
46
- });
47
- await nextTick();
48
- const topRightEl = document.querySelector(".yh-notification--top-right");
49
- expect(topRightEl).toBeTruthy();
50
- handler1.close();
51
- const handler2 = Notification({
52
- title: "\u5DE6\u4E0B",
53
- position: "bottom-left"
54
- });
55
- await nextTick();
56
- const bottomLeftEl = document.querySelector(".yh-notification--bottom-left");
57
- expect(bottomLeftEl).toBeTruthy();
58
- handler2.close();
59
- });
60
- it("\u5E94\u8BE5\u9ED8\u8BA4\u663E\u793A\u5173\u95ED\u6309\u94AE", async () => {
61
- const handler = Notification({
62
- title: "\u6D4B\u8BD5"
63
- });
64
- await nextTick();
65
- const closeBtn = document.querySelector(".yh-notification__close");
66
- expect(closeBtn).toBeTruthy();
67
- handler.close();
68
- });
69
- it("\u5E94\u8BE5\u80FD\u624B\u52A8\u5173\u95ED\u901A\u77E5", async () => {
70
- const handler = Notification({
71
- title: "\u6D4B\u8BD5\u5173\u95ED"
72
- });
73
- await nextTick();
74
- let notificationEl = document.querySelector(".yh-notification");
75
- expect(notificationEl).toBeTruthy();
76
- handler.close();
77
- await nextTick();
78
- await new Promise((resolve) => setTimeout(resolve, 300));
79
- notificationEl = document.querySelector(".yh-notification");
80
- expect(notificationEl).toBeFalsy();
81
- });
82
- it("\u5E94\u8BE5\u80FD\u5173\u95ED\u6240\u6709\u901A\u77E5", async () => {
83
- Notification({ title: "\u901A\u77E51" });
84
- Notification({ title: "\u901A\u77E52" });
85
- Notification({ title: "\u901A\u77E53" });
86
- await nextTick();
87
- let notifications = document.querySelectorAll(".yh-notification");
88
- expect(notifications.length).toBe(3);
89
- Notification.closeAll();
90
- await nextTick();
91
- await new Promise((resolve) => setTimeout(resolve, 500));
92
- notifications = document.querySelectorAll(".yh-notification");
93
- expect(notifications.length).toBe(0);
94
- });
95
- it("\u5E94\u8BE5\u652F\u6301 onClick \u56DE\u8C03", async () => {
96
- const onClick = vi.fn();
97
- const handler = Notification({
98
- title: "\u6D4B\u8BD5\u70B9\u51FB",
99
- onClick
100
- });
101
- await nextTick();
102
- const notificationEl = document.querySelector(".yh-notification");
103
- notificationEl.click();
104
- expect(onClick).toHaveBeenCalled();
105
- handler.close();
106
- });
107
- it("\u5E94\u8BE5\u652F\u6301 onClose \u56DE\u8C03", async () => {
108
- const onClose = vi.fn();
109
- const handler = Notification({
110
- title: "\u6D4B\u8BD5\u56DE\u8C03",
111
- onClose
112
- });
113
- await nextTick();
114
- handler.close();
115
- await nextTick();
116
- expect(onClose).toHaveBeenCalled();
117
- });
118
- it("\u540C\u4E00\u4F4D\u7F6E\u7684\u901A\u77E5\u5E94\u8BE5\u81EA\u52A8\u8BA1\u7B97\u504F\u79FB\u91CF", async () => {
119
- Notification({ title: "\u901A\u77E51", position: "top-right" });
120
- await nextTick();
121
- Notification({ title: "\u901A\u77E52", position: "top-right" });
122
- await nextTick();
123
- const notifications = document.querySelectorAll(".yh-notification--top-right");
124
- expect(notifications.length).toBe(2);
125
- const firstTop = parseInt(notifications[0].style.top);
126
- const secondTop = parseInt(notifications[1].style.top);
127
- expect(secondTop).toBeGreaterThan(firstTop);
128
- });
129
- it("\u5E94\u8BE5\u652F\u6301 top-center \u4F4D\u7F6E", async () => {
130
- const handler = Notification({
131
- title: "\u9876\u90E8\u5C45\u4E2D",
132
- position: "top-center"
133
- });
134
- await nextTick();
135
- const topCenterEl = document.querySelector(".yh-notification--top-center");
136
- expect(topCenterEl).toBeTruthy();
137
- handler.close();
138
- });
139
- it("\u5E94\u8BE5\u652F\u6301 bottom-center \u4F4D\u7F6E", async () => {
140
- const handler = Notification({
141
- title: "\u5E95\u90E8\u5C45\u4E2D",
142
- position: "bottom-center"
143
- });
144
- await nextTick();
145
- const bottomCenterEl = document.querySelector(".yh-notification--bottom-center");
146
- expect(bottomCenterEl).toBeTruthy();
147
- handler.close();
148
- });
149
- it("\u5E94\u8BE5\u652F\u6301 max \u9650\u5236\u901A\u77E5\u6570\u91CF", async () => {
150
- Notification({ title: "\u901A\u77E51", position: "top-right", max: 2 });
151
- await nextTick();
152
- Notification({ title: "\u901A\u77E52", position: "top-right", max: 2 });
153
- await nextTick();
154
- let notifications = document.querySelectorAll(".yh-notification--top-right");
155
- expect(notifications.length).toBe(2);
156
- Notification({ title: "\u901A\u77E53", position: "top-right", max: 2 });
157
- await nextTick();
158
- await new Promise((resolve) => setTimeout(resolve, 350));
159
- notifications = document.querySelectorAll(".yh-notification--top-right");
160
- expect(notifications.length).toBeLessThanOrEqual(2);
161
- });
162
- it("\u5E94\u8BE5\u652F\u6301 VNode \u4F5C\u4E3A message", async () => {
163
- const { h } = await import("vue");
164
- const handler = Notification({
165
- title: "VNode \u6D88\u606F",
166
- message: h("p", null, [
167
- h("span", null, "Message can be "),
168
- h("i", { style: "color: teal" }, "VNode")
169
- ])
170
- });
171
- await nextTick();
172
- const notificationEl = document.querySelector(".yh-notification");
173
- expect(notificationEl).toBeTruthy();
174
- expect(notificationEl?.textContent).toContain("Message can be");
175
- expect(notificationEl?.textContent).toContain("VNode");
176
- handler.close();
177
- });
178
- it("\u5E94\u8BE5\u652F\u6301\u51FD\u6570\u5F62\u5F0F\u7684 message\uFF08\u52A8\u6001 VNode\uFF09", async () => {
179
- const { h, ref } = await import("vue");
180
- const count = ref(0);
181
- const handler = Notification({
182
- title: "\u52A8\u6001\u6D88\u606F",
183
- message: () => h("span", null, `Count: ${count.value}`)
184
- });
185
- await nextTick();
186
- const notificationEl = document.querySelector(".yh-notification");
187
- expect(notificationEl).toBeTruthy();
188
- expect(notificationEl?.textContent).toContain("Count: 0");
189
- handler.close();
190
- });
191
- it("\u5E94\u8BE5\u8986\u76D6 Notification.vue \u7684\u5269\u4F59\u5206\u652F (\u8986\u76D6\u903B\u8F91)", async () => {
192
- Notification({ title: "z-index", zIndex: 9999, icon: "my-icon" });
193
- await nextTick();
194
- const el = document.querySelector(".yh-notification");
195
- expect(el.style.zIndex).toBe("9999");
196
- Notification({ title: "html", message: "<b>bold</b>", dangerouslyUseHTMLString: true });
197
- await nextTick();
198
- expect(document.body.innerHTML).toContain("<b>bold</b>");
199
- const handler = Notification({ title: "hover", duration: 1e3 });
200
- await nextTick();
201
- const notifyEl = document.querySelector(".yh-notification");
202
- await notifyEl.dispatchEvent(new MouseEvent("mouseenter"));
203
- await notifyEl.dispatchEvent(new MouseEvent("mouseleave"));
204
- handler.close();
205
- });
206
- });
@@ -1,61 +0,0 @@
1
- "use strict";
2
-
3
- var _vitest = require("vitest");
4
- var _serverRenderer = require("@vue/server-renderer");
5
- var _vue = require("vue");
6
- var _index = require("../index.cjs");
7
- var _select = require("../../select/index.cjs");
8
- var _input = require("../../input/index.cjs");
9
- (0, _vitest.describe)("Pagination SSR", () => {
10
- const createTestApp = props => {
11
- const app = (0, _vue.createApp)({
12
- render: () => (0, _vue.h)(_index.YhPagination, props)
13
- });
14
- app.component("YhSelect", _select.YhSelect);
15
- app.component("YhOption", _select.YhOption);
16
- app.component("YhInput", _input.YhInput);
17
- return app;
18
- };
19
- (0, _vitest.it)("should render correctly on server", async () => {
20
- const app = createTestApp({
21
- total: 100,
22
- currentPage: 1,
23
- layout: "prev, pager, next, jumper, sizes, total"
24
- });
25
- const html = await (0, _serverRenderer.renderToString)(app);
26
- (0, _vitest.expect)(html).toContain("yh-pagination");
27
- (0, _vitest.expect)(html).toContain("yh-pagination__pager");
28
- (0, _vitest.expect)(html).toContain("yh-pagination__jumper");
29
- (0, _vitest.expect)(html).toContain("yh-pagination__total");
30
- (0, _vitest.expect)(html).toContain("yh-pagination__sizes");
31
- (0, _vitest.expect)(html).toContain("1");
32
- });
33
- (0, _vitest.it)("should render circle style on server", async () => {
34
- const app = createTestApp({
35
- total: 50,
36
- circle: true
37
- });
38
- const html = await (0, _serverRenderer.renderToString)(app);
39
- (0, _vitest.expect)(html).toContain("is-circle");
40
- });
41
- (0, _vitest.it)("should render small and background styles on server", async () => {
42
- const app = createTestApp({
43
- total: 50,
44
- small: true,
45
- background: true
46
- });
47
- const html = await (0, _serverRenderer.renderToString)(app);
48
- (0, _vitest.expect)(html).toContain("is-small");
49
- (0, _vitest.expect)(html).toContain("is-background");
50
- });
51
- (0, _vitest.it)("should render custom text on server", async () => {
52
- const app = createTestApp({
53
- total: 50,
54
- prevText: "Previous",
55
- nextText: "Next"
56
- });
57
- const html = await (0, _serverRenderer.renderToString)(app);
58
- (0, _vitest.expect)(html).toContain("Previous");
59
- (0, _vitest.expect)(html).toContain("Next");
60
- });
61
- });
@@ -1,59 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { renderToString } from "@vue/server-renderer";
3
- import { createApp, h } from "vue";
4
- import { YhPagination } from "../index.mjs";
5
- import { YhSelect, YhOption } from "../../select/index.mjs";
6
- import { YhInput } from "../../input/index.mjs";
7
- describe("Pagination SSR", () => {
8
- const createTestApp = (props) => {
9
- const app = createApp({
10
- render: () => h(YhPagination, props)
11
- });
12
- app.component("YhSelect", YhSelect);
13
- app.component("YhOption", YhOption);
14
- app.component("YhInput", YhInput);
15
- return app;
16
- };
17
- it("should render correctly on server", async () => {
18
- const app = createTestApp({
19
- total: 100,
20
- currentPage: 1,
21
- layout: "prev, pager, next, jumper, sizes, total"
22
- });
23
- const html = await renderToString(app);
24
- expect(html).toContain("yh-pagination");
25
- expect(html).toContain("yh-pagination__pager");
26
- expect(html).toContain("yh-pagination__jumper");
27
- expect(html).toContain("yh-pagination__total");
28
- expect(html).toContain("yh-pagination__sizes");
29
- expect(html).toContain("1");
30
- });
31
- it("should render circle style on server", async () => {
32
- const app = createTestApp({
33
- total: 50,
34
- circle: true
35
- });
36
- const html = await renderToString(app);
37
- expect(html).toContain("is-circle");
38
- });
39
- it("should render small and background styles on server", async () => {
40
- const app = createTestApp({
41
- total: 50,
42
- small: true,
43
- background: true
44
- });
45
- const html = await renderToString(app);
46
- expect(html).toContain("is-small");
47
- expect(html).toContain("is-background");
48
- });
49
- it("should render custom text on server", async () => {
50
- const app = createTestApp({
51
- total: 50,
52
- prevText: "Previous",
53
- nextText: "Next"
54
- });
55
- const html = await renderToString(app);
56
- expect(html).toContain("Previous");
57
- expect(html).toContain("Next");
58
- });
59
- });