@yh-ui/components 0.1.21 → 0.1.22

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 (484) hide show
  1. package/README.md +2 -0
  2. package/dist/form/index.cjs +1 -1
  3. package/dist/form/index.d.ts +1 -1
  4. package/dist/form/index.mjs +1 -1
  5. package/dist/icon/index.cjs +1 -1
  6. package/dist/icon/index.d.ts +1 -1
  7. package/dist/icon/index.mjs +1 -1
  8. package/dist/loading/index.cjs +1 -1
  9. package/dist/loading/index.d.ts +1 -1
  10. package/dist/loading/index.mjs +1 -1
  11. package/dist/message/src/method.cjs +1 -1
  12. package/dist/message/src/method.d.ts +1 -1
  13. package/dist/message/src/method.mjs +1 -1
  14. package/dist/message-box/index.cjs +1 -1
  15. package/dist/message-box/index.d.ts +1 -1
  16. package/dist/message-box/index.mjs +1 -1
  17. package/dist/notification/src/method.cjs +1 -1
  18. package/dist/notification/src/method.d.ts +1 -1
  19. package/dist/notification/src/method.mjs +1 -1
  20. package/dist/resolver.cjs +1 -1
  21. package/dist/resolver.d.ts +7 -5
  22. package/dist/resolver.mjs +1 -1
  23. package/dist/style.css +584 -0
  24. package/package.json +6 -6
  25. package/dist/affix/__tests__/affix.bottom.test.cjs +0 -101
  26. package/dist/affix/__tests__/affix.bottom.test.mjs +0 -88
  27. package/dist/affix/__tests__/affix.ssr.test.cjs +0 -38
  28. package/dist/affix/__tests__/affix.ssr.test.mjs +0 -51
  29. package/dist/affix/__tests__/affix.test.cjs +0 -185
  30. package/dist/affix/__tests__/affix.test.mjs +0 -180
  31. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +0 -55
  32. package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +0 -39
  33. package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +0 -235
  34. package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +0 -157
  35. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +0 -61
  36. package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +0 -65
  37. package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +0 -205
  38. package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +0 -133
  39. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +0 -73
  40. package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +0 -68
  41. package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +0 -128
  42. package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +0 -109
  43. package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.cjs +0 -50
  44. package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.mjs +0 -33
  45. package/dist/ai-attachments/__tests__/ai-attachments.test.cjs +0 -113
  46. package/dist/ai-attachments/__tests__/ai-attachments.test.mjs +0 -81
  47. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +0 -95
  48. package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +0 -66
  49. package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +0 -624
  50. package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +0 -393
  51. package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.cjs +0 -51
  52. package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.mjs +0 -51
  53. package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.cjs +0 -138
  54. package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.mjs +0 -112
  55. package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +0 -90
  56. package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +0 -77
  57. package/dist/ai-chat/__tests__/ai-chat.test.cjs +0 -177
  58. package/dist/ai-chat/__tests__/ai-chat.test.mjs +0 -129
  59. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +0 -75
  60. package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +0 -57
  61. package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +0 -174
  62. package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +0 -108
  63. package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.cjs +0 -46
  64. package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.mjs +0 -39
  65. package/dist/ai-code-editor/__tests__/ai-code-editor.test.cjs +0 -90
  66. package/dist/ai-code-editor/__tests__/ai-code-editor.test.mjs +0 -78
  67. package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.cjs +0 -28
  68. package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.mjs +0 -26
  69. package/dist/ai-code-runner/__tests__/ai-code-runner.test.cjs +0 -69
  70. package/dist/ai-code-runner/__tests__/ai-code-runner.test.mjs +0 -66
  71. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +0 -50
  72. package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +0 -42
  73. package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +0 -67
  74. package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +0 -51
  75. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +0 -62
  76. package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +0 -50
  77. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +0 -315
  78. package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +0 -226
  79. package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.cjs +0 -45
  80. package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.mjs +0 -29
  81. package/dist/ai-file-card/__tests__/ai-file-card.test.cjs +0 -160
  82. package/dist/ai-file-card/__tests__/ai-file-card.test.mjs +0 -109
  83. package/dist/ai-mention/__tests__/ai-mention.ssr.test.cjs +0 -38
  84. package/dist/ai-mention/__tests__/ai-mention.ssr.test.mjs +0 -37
  85. package/dist/ai-mention/__tests__/ai-mention.test.cjs +0 -113
  86. package/dist/ai-mention/__tests__/ai-mention.test.mjs +0 -84
  87. package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.cjs +0 -43
  88. package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.mjs +0 -33
  89. package/dist/ai-mermaid/__tests__/ai-mermaid.test.cjs +0 -113
  90. package/dist/ai-mermaid/__tests__/ai-mermaid.test.mjs +0 -92
  91. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +0 -49
  92. package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +0 -41
  93. package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +0 -54
  94. package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +0 -38
  95. package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +0 -33
  96. package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +0 -34
  97. package/dist/ai-provider/__tests__/ai-provider.test.cjs +0 -38
  98. package/dist/ai-provider/__tests__/ai-provider.test.mjs +0 -33
  99. package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +0 -46
  100. package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +0 -37
  101. package/dist/ai-sender/__tests__/ai-sender.test.cjs +0 -511
  102. package/dist/ai-sender/__tests__/ai-sender.test.mjs +0 -322
  103. package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +0 -72
  104. package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +0 -82
  105. package/dist/ai-sources/__tests__/ai-sources.test.cjs +0 -200
  106. package/dist/ai-sources/__tests__/ai-sources.test.mjs +0 -160
  107. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +0 -56
  108. package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +0 -42
  109. package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +0 -151
  110. package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +0 -96
  111. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +0 -88
  112. package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +0 -55
  113. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +0 -344
  114. package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +0 -237
  115. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +0 -32
  116. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +0 -25
  117. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +0 -130
  118. package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +0 -103
  119. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +0 -57
  120. package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +0 -39
  121. package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +0 -169
  122. package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +0 -113
  123. package/dist/alert/__tests__/alert.ssr.test.cjs +0 -28
  124. package/dist/alert/__tests__/alert.ssr.test.mjs +0 -29
  125. package/dist/alert/__tests__/alert.test.cjs +0 -123
  126. package/dist/alert/__tests__/alert.test.mjs +0 -110
  127. package/dist/autocomplete/__tests__/autocomplete.ssr.test.cjs +0 -54
  128. package/dist/autocomplete/__tests__/autocomplete.ssr.test.mjs +0 -47
  129. package/dist/autocomplete/__tests__/autocomplete.test.cjs +0 -299
  130. package/dist/autocomplete/__tests__/autocomplete.test.mjs +0 -263
  131. package/dist/avatar/__tests__/avatar.ssr.test.cjs +0 -103
  132. package/dist/avatar/__tests__/avatar.ssr.test.mjs +0 -108
  133. package/dist/avatar/__tests__/avatar.test.cjs +0 -146
  134. package/dist/avatar/__tests__/avatar.test.mjs +0 -125
  135. package/dist/back-top/__tests__/back-top.ssr.test.cjs +0 -13
  136. package/dist/back-top/__tests__/back-top.ssr.test.mjs +0 -10
  137. package/dist/back-top/__tests__/back-top.test.cjs +0 -88
  138. package/dist/back-top/__tests__/back-top.test.mjs +0 -76
  139. package/dist/badge/__tests__/badge.ssr.test.cjs +0 -36
  140. package/dist/badge/__tests__/badge.ssr.test.mjs +0 -33
  141. package/dist/badge/__tests__/badge.test.cjs +0 -115
  142. package/dist/badge/__tests__/badge.test.mjs +0 -112
  143. package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.cjs +0 -22
  144. package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.mjs +0 -20
  145. package/dist/breadcrumb/__tests__/breadcrumb.test.cjs +0 -64
  146. package/dist/breadcrumb/__tests__/breadcrumb.test.mjs +0 -51
  147. package/dist/button/__tests__/button.ssr.test.cjs +0 -52
  148. package/dist/button/__tests__/button.ssr.test.mjs +0 -55
  149. package/dist/button/__tests__/button.test.cjs +0 -207
  150. package/dist/button/__tests__/button.test.mjs +0 -141
  151. package/dist/calendar/__tests__/calendar.ssr.test.cjs +0 -65
  152. package/dist/calendar/__tests__/calendar.ssr.test.mjs +0 -63
  153. package/dist/calendar/__tests__/calendar.test.cjs +0 -263
  154. package/dist/calendar/__tests__/calendar.test.mjs +0 -255
  155. package/dist/card/__tests__/card.ssr.test.cjs +0 -37
  156. package/dist/card/__tests__/card.ssr.test.mjs +0 -40
  157. package/dist/card/__tests__/card.test.cjs +0 -131
  158. package/dist/card/__tests__/card.test.mjs +0 -124
  159. package/dist/carousel/__tests__/carousel.ssr.test.cjs +0 -27
  160. package/dist/carousel/__tests__/carousel.ssr.test.mjs +0 -27
  161. package/dist/carousel/__tests__/carousel.test.cjs +0 -115
  162. package/dist/carousel/__tests__/carousel.test.mjs +0 -98
  163. package/dist/cascader/__tests__/cascader-panel.test.cjs +0 -162
  164. package/dist/cascader/__tests__/cascader-panel.test.mjs +0 -151
  165. package/dist/cascader/__tests__/cascader.ssr.test.cjs +0 -61
  166. package/dist/cascader/__tests__/cascader.ssr.test.mjs +0 -55
  167. package/dist/cascader/__tests__/cascader.test.cjs +0 -342
  168. package/dist/cascader/__tests__/cascader.test.mjs +0 -316
  169. package/dist/category-nav/__tests__/category-nav.ssr.test.cjs +0 -35
  170. package/dist/category-nav/__tests__/category-nav.ssr.test.mjs +0 -21
  171. package/dist/category-nav/__tests__/category-nav.test.cjs +0 -53
  172. package/dist/category-nav/__tests__/category-nav.test.mjs +0 -33
  173. package/dist/checkbox/__tests__/checkbox.ssr.test.cjs +0 -52
  174. package/dist/checkbox/__tests__/checkbox.ssr.test.mjs +0 -57
  175. package/dist/checkbox/__tests__/checkbox.test.cjs +0 -173
  176. package/dist/checkbox/__tests__/checkbox.test.mjs +0 -133
  177. package/dist/col/__tests__/col.ssr.test.cjs +0 -44
  178. package/dist/col/__tests__/col.ssr.test.mjs +0 -42
  179. package/dist/col/__tests__/col.test.cjs +0 -128
  180. package/dist/col/__tests__/col.test.mjs +0 -116
  181. package/dist/color-picker/__tests__/color-picker.ssr.test.cjs +0 -34
  182. package/dist/color-picker/__tests__/color-picker.ssr.test.mjs +0 -39
  183. package/dist/color-picker/__tests__/color-picker.test.cjs +0 -227
  184. package/dist/color-picker/__tests__/color-picker.test.mjs +0 -176
  185. package/dist/config-provider/__tests__/config-provider.ssr.test.cjs +0 -43
  186. package/dist/config-provider/__tests__/config-provider.ssr.test.mjs +0 -42
  187. package/dist/config-provider/__tests__/config-provider.test.cjs +0 -75
  188. package/dist/config-provider/__tests__/config-provider.test.mjs +0 -64
  189. package/dist/container/__tests__/container.ssr.test.cjs +0 -71
  190. package/dist/container/__tests__/container.ssr.test.mjs +0 -50
  191. package/dist/container/__tests__/container.test.cjs +0 -111
  192. package/dist/container/__tests__/container.test.mjs +0 -84
  193. package/dist/countdown/__tests__/countdown.ssr.test.cjs +0 -86
  194. package/dist/countdown/__tests__/countdown.ssr.test.mjs +0 -78
  195. package/dist/countdown/__tests__/countdown.test.cjs +0 -767
  196. package/dist/countdown/__tests__/countdown.test.mjs +0 -722
  197. package/dist/coupon-card/__tests__/coupon-card.ssr.test.cjs +0 -21
  198. package/dist/coupon-card/__tests__/coupon-card.ssr.test.mjs +0 -18
  199. package/dist/coupon-card/__tests__/coupon-card.test.cjs +0 -67
  200. package/dist/coupon-card/__tests__/coupon-card.test.mjs +0 -64
  201. package/dist/date-picker/__tests__/date-picker-extended.test.cjs +0 -581
  202. package/dist/date-picker/__tests__/date-picker-extended.test.mjs +0 -455
  203. package/dist/date-picker/__tests__/date-picker.ssr.test.cjs +0 -26
  204. package/dist/date-picker/__tests__/date-picker.ssr.test.mjs +0 -23
  205. package/dist/date-picker/__tests__/date-picker.test.cjs +0 -170
  206. package/dist/date-picker/__tests__/date-picker.test.mjs +0 -136
  207. package/dist/descriptions/__tests__/descriptions.ssr.test.cjs +0 -67
  208. package/dist/descriptions/__tests__/descriptions.ssr.test.mjs +0 -72
  209. package/dist/descriptions/__tests__/descriptions.test.cjs +0 -150
  210. package/dist/descriptions/__tests__/descriptions.test.mjs +0 -130
  211. package/dist/dialog/__tests__/dialog.functional.test.cjs +0 -49
  212. package/dist/dialog/__tests__/dialog.functional.test.mjs +0 -49
  213. package/dist/dialog/__tests__/dialog.ssr.test.cjs +0 -31
  214. package/dist/dialog/__tests__/dialog.ssr.test.mjs +0 -29
  215. package/dist/dialog/__tests__/dialog.test.cjs +0 -561
  216. package/dist/dialog/__tests__/dialog.test.mjs +0 -388
  217. package/dist/divider/__tests__/divider.ssr.test.cjs +0 -41
  218. package/dist/divider/__tests__/divider.ssr.test.mjs +0 -44
  219. package/dist/divider/__tests__/divider.test.cjs +0 -71
  220. package/dist/divider/__tests__/divider.test.mjs +0 -68
  221. package/dist/drawer/__tests__/drawer.ssr.test.cjs +0 -25
  222. package/dist/drawer/__tests__/drawer.ssr.test.mjs +0 -23
  223. package/dist/drawer/__tests__/drawer.test.cjs +0 -145
  224. package/dist/drawer/__tests__/drawer.test.mjs +0 -122
  225. package/dist/dropdown/__tests__/dropdown.ssr.test.cjs +0 -49
  226. package/dist/dropdown/__tests__/dropdown.ssr.test.mjs +0 -64
  227. package/dist/dropdown/__tests__/dropdown.test.cjs +0 -310
  228. package/dist/dropdown/__tests__/dropdown.test.mjs +0 -269
  229. package/dist/empty/__tests__/empty.ssr.test.cjs +0 -96
  230. package/dist/empty/__tests__/empty.ssr.test.mjs +0 -99
  231. package/dist/empty/__tests__/empty.test.cjs +0 -110
  232. package/dist/empty/__tests__/empty.test.mjs +0 -101
  233. package/dist/filter-bar/__tests__/filter-bar.ssr.test.cjs +0 -29
  234. package/dist/filter-bar/__tests__/filter-bar.ssr.test.mjs +0 -16
  235. package/dist/filter-bar/__tests__/filter-bar.test.cjs +0 -51
  236. package/dist/filter-bar/__tests__/filter-bar.test.mjs +0 -29
  237. package/dist/form/__tests__/form-schema.test.cjs +0 -636
  238. package/dist/form/__tests__/form-schema.test.mjs +0 -366
  239. package/dist/form/__tests__/form.ssr.test.cjs +0 -74
  240. package/dist/form/__tests__/form.ssr.test.mjs +0 -73
  241. package/dist/form/__tests__/form.test.cjs +0 -208
  242. package/dist/form/__tests__/form.test.mjs +0 -128
  243. package/dist/gantt-chart/__tests__/debug_ssr.test.cjs +0 -51
  244. package/dist/gantt-chart/__tests__/debug_ssr.test.mjs +0 -37
  245. package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.cjs +0 -95
  246. package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.mjs +0 -94
  247. package/dist/gantt-chart/__tests__/gantt-chart.test.cjs +0 -86
  248. package/dist/gantt-chart/__tests__/gantt-chart.test.mjs +0 -79
  249. package/dist/grid/__tests__/grid.ssr.test.cjs +0 -81
  250. package/dist/grid/__tests__/grid.ssr.test.mjs +0 -63
  251. package/dist/grid/__tests__/grid.test.cjs +0 -142
  252. package/dist/grid/__tests__/grid.test.mjs +0 -89
  253. package/dist/icon/__tests__/icon.ssr.test.cjs +0 -35
  254. package/dist/icon/__tests__/icon.ssr.test.mjs +0 -26
  255. package/dist/icon/__tests__/icon.test.cjs +0 -144
  256. package/dist/icon/__tests__/icon.test.mjs +0 -123
  257. package/dist/image/__tests__/image-viewer.test.cjs +0 -101
  258. package/dist/image/__tests__/image-viewer.test.mjs +0 -94
  259. package/dist/image/__tests__/image.ssr.test.cjs +0 -73
  260. package/dist/image/__tests__/image.ssr.test.mjs +0 -72
  261. package/dist/image/__tests__/image.test.cjs +0 -171
  262. package/dist/image/__tests__/image.test.mjs +0 -159
  263. package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.cjs +0 -54
  264. package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.mjs +0 -35
  265. package/dist/image-magnifier/__tests__/image-magnifier.test.cjs +0 -257
  266. package/dist/image-magnifier/__tests__/image-magnifier.test.mjs +0 -177
  267. package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.cjs +0 -59
  268. package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.mjs +0 -84
  269. package/dist/infinite-scroll/__tests__/infinite-scroll.test.cjs +0 -255
  270. package/dist/infinite-scroll/__tests__/infinite-scroll.test.mjs +0 -187
  271. package/dist/input/__tests__/input-utils.test.cjs +0 -77
  272. package/dist/input/__tests__/input-utils.test.mjs +0 -75
  273. package/dist/input/__tests__/input.ssr.test.cjs +0 -100
  274. package/dist/input/__tests__/input.ssr.test.mjs +0 -85
  275. package/dist/input/__tests__/input.test.cjs +0 -127
  276. package/dist/input/__tests__/input.test.mjs +0 -112
  277. package/dist/input-number/__tests__/input-number.hydration.test.cjs +0 -24
  278. package/dist/input-number/__tests__/input-number.hydration.test.mjs +0 -21
  279. package/dist/input-number/__tests__/input-number.ssr.test.cjs +0 -95
  280. package/dist/input-number/__tests__/input-number.ssr.test.mjs +0 -92
  281. package/dist/input-number/__tests__/input-number.test.cjs +0 -199
  282. package/dist/input-number/__tests__/input-number.test.mjs +0 -173
  283. package/dist/input-tag/__tests__/input-tag.ssr.test.cjs +0 -47
  284. package/dist/input-tag/__tests__/input-tag.ssr.test.mjs +0 -41
  285. package/dist/input-tag/__tests__/input-tag.test.cjs +0 -268
  286. package/dist/input-tag/__tests__/input-tag.test.mjs +0 -201
  287. package/dist/loading/__tests__/loading.ssr.test.cjs +0 -37
  288. package/dist/loading/__tests__/loading.ssr.test.mjs +0 -27
  289. package/dist/loading/__tests__/loading.test.cjs +0 -91
  290. package/dist/loading/__tests__/loading.test.mjs +0 -75
  291. package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.cjs +0 -33
  292. package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.mjs +0 -31
  293. package/dist/lucky-draw/__tests__/lucky-draw.test.cjs +0 -56
  294. package/dist/lucky-draw/__tests__/lucky-draw.test.mjs +0 -48
  295. package/dist/marquee/__tests__/marquee.ssr.test.cjs +0 -59
  296. package/dist/marquee/__tests__/marquee.ssr.test.mjs +0 -60
  297. package/dist/marquee/__tests__/marquee.test.cjs +0 -94
  298. package/dist/marquee/__tests__/marquee.test.mjs +0 -92
  299. package/dist/mention/__tests__/mention.ssr.test.cjs +0 -92
  300. package/dist/mention/__tests__/mention.ssr.test.mjs +0 -70
  301. package/dist/mention/__tests__/mention.test.cjs +0 -650
  302. package/dist/mention/__tests__/mention.test.mjs +0 -523
  303. package/dist/menu/__tests__/menu.ssr.test.cjs +0 -92
  304. package/dist/menu/__tests__/menu.ssr.test.mjs +0 -124
  305. package/dist/menu/__tests__/menu.test.cjs +0 -209
  306. package/dist/menu/__tests__/menu.test.mjs +0 -182
  307. package/dist/message/__tests__/message.ssr.test.cjs +0 -29
  308. package/dist/message/__tests__/message.ssr.test.mjs +0 -23
  309. package/dist/message/__tests__/message.test.cjs +0 -170
  310. package/dist/message/__tests__/message.test.mjs +0 -154
  311. package/dist/message-box/__tests__/message-box.ssr.test.cjs +0 -33
  312. package/dist/message-box/__tests__/message-box.ssr.test.mjs +0 -30
  313. package/dist/message-box/__tests__/message-box.test.cjs +0 -100
  314. package/dist/message-box/__tests__/message-box.test.mjs +0 -95
  315. package/dist/notification/__tests__/notification.ssr.test.cjs +0 -31
  316. package/dist/notification/__tests__/notification.ssr.test.mjs +0 -25
  317. package/dist/notification/__tests__/notification.test.cjs +0 -248
  318. package/dist/notification/__tests__/notification.test.mjs +0 -206
  319. package/dist/pagination/__tests__/pagination.ssr.test.cjs +0 -61
  320. package/dist/pagination/__tests__/pagination.ssr.test.mjs +0 -59
  321. package/dist/pagination/__tests__/pagination.test.cjs +0 -135
  322. package/dist/pagination/__tests__/pagination.test.mjs +0 -131
  323. package/dist/popconfirm/__tests__/popconfirm.ssr.test.cjs +0 -48
  324. package/dist/popconfirm/__tests__/popconfirm.ssr.test.mjs +0 -63
  325. package/dist/popconfirm/__tests__/popconfirm.test.cjs +0 -62
  326. package/dist/popconfirm/__tests__/popconfirm.test.mjs +0 -56
  327. package/dist/popover/__tests__/popover.ssr.test.cjs +0 -48
  328. package/dist/popover/__tests__/popover.ssr.test.mjs +0 -63
  329. package/dist/popover/__tests__/popover.test.cjs +0 -107
  330. package/dist/popover/__tests__/popover.test.mjs +0 -93
  331. package/dist/price/__tests__/price.ssr.test.cjs +0 -20
  332. package/dist/price/__tests__/price.ssr.test.mjs +0 -19
  333. package/dist/price/__tests__/price.test.cjs +0 -45
  334. package/dist/price/__tests__/price.test.mjs +0 -42
  335. package/dist/product-card/__tests__/product-card.ssr.test.cjs +0 -21
  336. package/dist/product-card/__tests__/product-card.ssr.test.mjs +0 -18
  337. package/dist/product-card/__tests__/product-card.test.cjs +0 -54
  338. package/dist/product-card/__tests__/product-card.test.mjs +0 -53
  339. package/dist/progress/__tests__/progress.ssr.test.cjs +0 -31
  340. package/dist/progress/__tests__/progress.ssr.test.mjs +0 -29
  341. package/dist/progress/__tests__/progress.test.cjs +0 -119
  342. package/dist/progress/__tests__/progress.test.mjs +0 -77
  343. package/dist/radio/__tests__/radio-button.test.cjs +0 -99
  344. package/dist/radio/__tests__/radio-button.test.mjs +0 -83
  345. package/dist/radio/__tests__/radio.ssr.test.cjs +0 -132
  346. package/dist/radio/__tests__/radio.ssr.test.mjs +0 -165
  347. package/dist/radio/__tests__/radio.test.cjs +0 -170
  348. package/dist/radio/__tests__/radio.test.mjs +0 -143
  349. package/dist/rate/__tests__/rate.ssr.test.cjs +0 -106
  350. package/dist/rate/__tests__/rate.ssr.test.mjs +0 -103
  351. package/dist/rate/__tests__/rate.test.cjs +0 -88
  352. package/dist/rate/__tests__/rate.test.mjs +0 -85
  353. package/dist/result/__tests__/result.ssr.test.cjs +0 -62
  354. package/dist/result/__tests__/result.ssr.test.mjs +0 -51
  355. package/dist/result/__tests__/result.test.cjs +0 -135
  356. package/dist/result/__tests__/result.test.mjs +0 -92
  357. package/dist/row/__tests__/row.ssr.test.cjs +0 -29
  358. package/dist/row/__tests__/row.ssr.test.mjs +0 -30
  359. package/dist/row/__tests__/row.test.cjs +0 -89
  360. package/dist/row/__tests__/row.test.mjs +0 -86
  361. package/dist/row/__tests__/row_ts.test.cjs +0 -31
  362. package/dist/row/__tests__/row_ts.test.mjs +0 -28
  363. package/dist/scrollbar/__tests__/scrollbar.ssr.test.cjs +0 -49
  364. package/dist/scrollbar/__tests__/scrollbar.ssr.test.mjs +0 -54
  365. package/dist/scrollbar/__tests__/scrollbar.test.cjs +0 -43
  366. package/dist/scrollbar/__tests__/scrollbar.test.mjs +0 -40
  367. package/dist/select/__tests__/select.perf.test.cjs +0 -191
  368. package/dist/select/__tests__/select.perf.test.mjs +0 -185
  369. package/dist/select/__tests__/select.ssr.test.cjs +0 -58
  370. package/dist/select/__tests__/select.ssr.test.mjs +0 -52
  371. package/dist/select/__tests__/select.test.cjs +0 -414
  372. package/dist/select/__tests__/select.test.mjs +0 -345
  373. package/dist/skeleton/__tests__/skeleton.ssr.test.cjs +0 -81
  374. package/dist/skeleton/__tests__/skeleton.ssr.test.mjs +0 -83
  375. package/dist/skeleton/__tests__/skeleton.test.cjs +0 -72
  376. package/dist/skeleton/__tests__/skeleton.test.mjs +0 -65
  377. package/dist/sku-selector/__tests__/sku-selector.ssr.test.cjs +0 -32
  378. package/dist/sku-selector/__tests__/sku-selector.ssr.test.mjs +0 -19
  379. package/dist/sku-selector/__tests__/sku-selector.test.cjs +0 -64
  380. package/dist/sku-selector/__tests__/sku-selector.test.mjs +0 -53
  381. package/dist/slider/__tests__/repro.test.cjs +0 -25
  382. package/dist/slider/__tests__/repro.test.mjs +0 -22
  383. package/dist/slider/__tests__/slider.ssr.test.cjs +0 -118
  384. package/dist/slider/__tests__/slider.ssr.test.mjs +0 -115
  385. package/dist/slider/__tests__/slider.test.cjs +0 -155
  386. package/dist/slider/__tests__/slider.test.mjs +0 -120
  387. package/dist/smart-address/__tests__/smart-address.ssr.test.cjs +0 -28
  388. package/dist/smart-address/__tests__/smart-address.ssr.test.mjs +0 -25
  389. package/dist/smart-address/__tests__/smart-address.test.cjs +0 -68
  390. package/dist/smart-address/__tests__/smart-address.test.mjs +0 -56
  391. package/dist/space/__tests__/space.ssr.test.cjs +0 -115
  392. package/dist/space/__tests__/space.ssr.test.mjs +0 -150
  393. package/dist/space/__tests__/space.test.cjs +0 -227
  394. package/dist/space/__tests__/space.test.mjs +0 -187
  395. package/dist/spin/__tests__/spin.ssr.test.cjs +0 -46
  396. package/dist/spin/__tests__/spin.ssr.test.mjs +0 -43
  397. package/dist/spin/__tests__/spin.test.cjs +0 -65
  398. package/dist/spin/__tests__/spin.test.mjs +0 -63
  399. package/dist/steps/__tests__/steps.ssr.test.cjs +0 -73
  400. package/dist/steps/__tests__/steps.ssr.test.mjs +0 -55
  401. package/dist/steps/__tests__/steps.test.cjs +0 -152
  402. package/dist/steps/__tests__/steps.test.mjs +0 -123
  403. package/dist/submit-bar/__tests__/submit-bar.ssr.test.cjs +0 -21
  404. package/dist/submit-bar/__tests__/submit-bar.ssr.test.mjs +0 -18
  405. package/dist/submit-bar/__tests__/submit-bar.test.cjs +0 -50
  406. package/dist/submit-bar/__tests__/submit-bar.test.mjs +0 -36
  407. package/dist/switch/__tests__/switch.ssr.test.cjs +0 -105
  408. package/dist/switch/__tests__/switch.ssr.test.mjs +0 -102
  409. package/dist/switch/__tests__/switch.test.cjs +0 -251
  410. package/dist/switch/__tests__/switch.test.mjs +0 -193
  411. package/dist/table/__tests__/table-advance.test.cjs +0 -180
  412. package/dist/table/__tests__/table-advance.test.mjs +0 -118
  413. package/dist/table/__tests__/table-interaction.test.cjs +0 -236
  414. package/dist/table/__tests__/table-interaction.test.mjs +0 -162
  415. package/dist/table/__tests__/table-utils.test.cjs +0 -690
  416. package/dist/table/__tests__/table-utils.test.mjs +0 -485
  417. package/dist/table/__tests__/table.perf.test.cjs +0 -231
  418. package/dist/table/__tests__/table.perf.test.mjs +0 -225
  419. package/dist/table/__tests__/table.ssr.test.cjs +0 -296
  420. package/dist/table/__tests__/table.ssr.test.mjs +0 -265
  421. package/dist/table/__tests__/table.test.cjs +0 -682
  422. package/dist/table/__tests__/table.test.mjs +0 -617
  423. package/dist/table/__tests__/use-column-drag.test.cjs +0 -238
  424. package/dist/table/__tests__/use-column-drag.test.mjs +0 -150
  425. package/dist/table/__tests__/use-table-export.test.cjs +0 -179
  426. package/dist/table/__tests__/use-table-export.test.mjs +0 -105
  427. package/dist/table/__tests__/use-table-import.test.cjs +0 -206
  428. package/dist/table/__tests__/use-table-import.test.mjs +0 -144
  429. package/dist/table/__tests__/use-table-print.test.cjs +0 -190
  430. package/dist/table/__tests__/use-table-print.test.mjs +0 -134
  431. package/dist/table/__tests__/use-virtual-scroll.test.cjs +0 -286
  432. package/dist/table/__tests__/use-virtual-scroll.test.mjs +0 -196
  433. package/dist/tabs/__tests__/tabs.ssr.test.cjs +0 -57
  434. package/dist/tabs/__tests__/tabs.ssr.test.mjs +0 -41
  435. package/dist/tabs/__tests__/tabs.test.cjs +0 -171
  436. package/dist/tabs/__tests__/tabs.test.mjs +0 -134
  437. package/dist/tag/__tests__/tag.ssr.test.cjs +0 -45
  438. package/dist/tag/__tests__/tag.ssr.test.mjs +0 -48
  439. package/dist/tag/__tests__/tag.test.cjs +0 -194
  440. package/dist/tag/__tests__/tag.test.mjs +0 -167
  441. package/dist/time-picker/__tests__/time-picker.ssr.test.cjs +0 -46
  442. package/dist/time-picker/__tests__/time-picker.ssr.test.mjs +0 -43
  443. package/dist/time-picker/__tests__/time-picker.test.cjs +0 -228
  444. package/dist/time-picker/__tests__/time-picker.test.mjs +0 -218
  445. package/dist/time-picker/__tests__/time-spinner.test.cjs +0 -196
  446. package/dist/time-picker/__tests__/time-spinner.test.mjs +0 -162
  447. package/dist/time-select/__tests__/time-select.ssr.test.cjs +0 -42
  448. package/dist/time-select/__tests__/time-select.ssr.test.mjs +0 -37
  449. package/dist/time-select/__tests__/time-select.test.cjs +0 -390
  450. package/dist/time-select/__tests__/time-select.test.mjs +0 -374
  451. package/dist/tooltip/__tests__/tooltip.ssr.test.cjs +0 -55
  452. package/dist/tooltip/__tests__/tooltip.ssr.test.mjs +0 -76
  453. package/dist/tooltip/__tests__/tooltip.test.cjs +0 -132
  454. package/dist/tooltip/__tests__/tooltip.test.mjs +0 -121
  455. package/dist/transfer/__tests__/transfer.ssr.test.cjs +0 -47
  456. package/dist/transfer/__tests__/transfer.ssr.test.mjs +0 -44
  457. package/dist/transfer/__tests__/transfer.test.cjs +0 -422
  458. package/dist/transfer/__tests__/transfer.test.mjs +0 -405
  459. package/dist/tree/__tests__/tree.perf.test.cjs +0 -182
  460. package/dist/tree/__tests__/tree.perf.test.mjs +0 -198
  461. package/dist/tree/__tests__/tree.ssr.test.cjs +0 -56
  462. package/dist/tree/__tests__/tree.ssr.test.mjs +0 -45
  463. package/dist/tree/__tests__/tree.test.cjs +0 -488
  464. package/dist/tree/__tests__/tree.test.mjs +0 -333
  465. package/dist/tree-select/__tests__/tree-select.ssr.test.cjs +0 -52
  466. package/dist/tree-select/__tests__/tree-select.ssr.test.mjs +0 -55
  467. package/dist/tree-select/__tests__/tree-select.test.cjs +0 -231
  468. package/dist/tree-select/__tests__/tree-select.test.mjs +0 -189
  469. package/dist/typography/__tests__/typography.ssr.test.cjs +0 -85
  470. package/dist/typography/__tests__/typography.ssr.test.mjs +0 -63
  471. package/dist/typography/__tests__/typography.test.cjs +0 -362
  472. package/dist/typography/__tests__/typography.test.mjs +0 -161
  473. package/dist/upload/__tests__/upload.ssr.test.cjs +0 -28
  474. package/dist/upload/__tests__/upload.ssr.test.mjs +0 -26
  475. package/dist/upload/__tests__/upload.test.cjs +0 -467
  476. package/dist/upload/__tests__/upload.test.mjs +0 -336
  477. package/dist/waterfall/__tests__/waterfall.ssr.test.cjs +0 -38
  478. package/dist/waterfall/__tests__/waterfall.ssr.test.mjs +0 -39
  479. package/dist/waterfall/__tests__/waterfall.test.cjs +0 -122
  480. package/dist/waterfall/__tests__/waterfall.test.mjs +0 -85
  481. package/dist/watermark/__tests__/watermark.ssr.test.cjs +0 -32
  482. package/dist/watermark/__tests__/watermark.ssr.test.mjs +0 -30
  483. package/dist/watermark/__tests__/watermark.test.cjs +0 -127
  484. package/dist/watermark/__tests__/watermark.test.mjs +0 -124
@@ -1,75 +0,0 @@
1
- import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
2
- import { calcTextareaHeight } from "../src/utils.mjs";
3
- describe("calcTextareaHeight", () => {
4
- let textarea;
5
- beforeEach(() => {
6
- textarea = document.createElement("textarea");
7
- vi.spyOn(window, "getComputedStyle").mockReturnValue({
8
- getPropertyValue: (prop) => {
9
- const map = {
10
- "box-sizing": "border-box",
11
- "padding-top": "4",
12
- "padding-bottom": "4",
13
- "border-top-width": "1",
14
- "border-bottom-width": "1",
15
- "letter-spacing": "normal",
16
- "line-height": "20px",
17
- "font-family": "sans-serif",
18
- "font-weight": "normal",
19
- "font-size": "14px",
20
- "text-rendering": "auto",
21
- "text-transform": "none",
22
- width: "200px",
23
- "text-indent": "0px",
24
- "padding-left": "8px",
25
- "padding-right": "8px"
26
- };
27
- return map[prop] ?? "";
28
- }
29
- });
30
- Object.defineProperty(HTMLTextAreaElement.prototype, "scrollHeight", {
31
- configurable: true,
32
- get() {
33
- return 24;
34
- }
35
- });
36
- document.body.appendChild(textarea);
37
- });
38
- afterEach(() => {
39
- vi.restoreAllMocks();
40
- document.body.innerHTML = "";
41
- });
42
- it("should return height string", () => {
43
- const result = calcTextareaHeight(textarea);
44
- expect(result).toHaveProperty("height");
45
- expect(typeof result.height).toBe("string");
46
- expect(result.height).toMatch(/px$/);
47
- });
48
- it("should return minHeight when minRows > 0", () => {
49
- const result = calcTextareaHeight(textarea, 2);
50
- expect(result).toHaveProperty("minHeight");
51
- expect(result.minHeight).toMatch(/px$/);
52
- });
53
- it("should handle maxRows constraint", () => {
54
- const result = calcTextareaHeight(textarea, 1, 3);
55
- expect(result.height).toMatch(/px$/);
56
- });
57
- it("should handle content-box sizing", () => {
58
- vi.spyOn(window, "getComputedStyle").mockReturnValue({
59
- getPropertyValue: (prop) => {
60
- if (prop === "box-sizing") return "content-box";
61
- if (prop === "padding-top") return "4";
62
- if (prop === "padding-bottom") return "4";
63
- if (prop === "border-top-width") return "1";
64
- if (prop === "border-bottom-width") return "1";
65
- return "";
66
- }
67
- });
68
- const result = calcTextareaHeight(textarea, 1);
69
- expect(result.height).toMatch(/px$/);
70
- });
71
- it("should handle minRows = 0 (no minHeight)", () => {
72
- const result = calcTextareaHeight(textarea, 0);
73
- expect(result.height).toMatch(/px$/);
74
- });
75
- });
@@ -1,100 +0,0 @@
1
- "use strict";
2
-
3
- var _vitest = require("vitest");
4
- var _input = _interopRequireDefault(require("../src/input.vue"));
5
- var _ssr = require("../../__tests__/utils/ssr.cjs");
6
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
- (0, _vitest.describe)("YhInput SSR", () => {
8
- (0, _vitest.it)("should render correctly in SSR", async () => {
9
- const html = await (0, _ssr.renderSSR)(_input.default, {
10
- modelValue: "test value"
11
- });
12
- (0, _ssr.expectSSRHasClass)(html, "yh-input");
13
- (0, _vitest.expect)(html).toContain("test value");
14
- });
15
- (0, _vitest.it)("should render with placeholder in SSR", async () => {
16
- const html = await (0, _ssr.renderSSR)(_input.default, {
17
- placeholder: "Enter text"
18
- });
19
- (0, _vitest.expect)(html).toContain('placeholder="Enter text"');
20
- });
21
- (0, _vitest.it)("should render disabled state in SSR", async () => {
22
- const html = await (0, _ssr.renderSSR)(_input.default, {
23
- disabled: true
24
- });
25
- (0, _ssr.expectSSRHasClass)(html, "is-disabled");
26
- (0, _vitest.expect)(html).toContain("disabled");
27
- });
28
- (0, _vitest.it)("should render different sizes in SSR", async () => {
29
- const sizes = ["small", "default", "large"];
30
- for (const size of sizes) {
31
- const html = await (0, _ssr.renderSSR)(_input.default, {
32
- size
33
- });
34
- if (size !== "default") {
35
- (0, _ssr.expectSSRHasClass)(html, `yh-input--${size}`);
36
- }
37
- }
38
- });
39
- (0, _vitest.it)("should render clearable input in SSR", async () => {
40
- const html = await (0, _ssr.renderSSR)(_input.default, {
41
- modelValue: "clearable",
42
- clearable: true
43
- });
44
- (0, _ssr.expectSSRHasClass)(html, "yh-input");
45
- });
46
- (0, _vitest.it)("should render prefix icon in SSR", async () => {
47
- const html = await (0, _ssr.renderSSR)(_input.default, {
48
- prefixIcon: "search"
49
- });
50
- (0, _ssr.expectSSRHasClass)(html, "yh-input__prefix");
51
- });
52
- (0, _vitest.it)("should render suffix icon in SSR", async () => {
53
- const html = await (0, _ssr.renderSSR)(_input.default, {
54
- suffixIcon: "close"
55
- });
56
- (0, _ssr.expectSSRHasClass)(html, "yh-input__suffix");
57
- });
58
- (0, _vitest.it)("should hydrate without mismatch", async () => {
59
- const result = await (0, _ssr.testHydration)(_input.default, {
60
- modelValue: "Hydration Test",
61
- placeholder: "Enter text",
62
- clearable: true
63
- });
64
- (0, _vitest.expect)(result.isMatch).toBe(true);
65
- });
66
- (0, _vitest.it)("should render textarea in SSR", async () => {
67
- const html = await (0, _ssr.renderSSR)(_input.default, {
68
- type: "textarea",
69
- modelValue: "Textarea content",
70
- rows: 4
71
- });
72
- (0, _vitest.expect)(html).toContain("textarea");
73
- (0, _vitest.expect)(html).toContain("Textarea content");
74
- });
75
- (0, _vitest.it)("should render maxlength in SSR", async () => {
76
- const html = await (0, _ssr.renderSSR)(_input.default, {
77
- maxlength: 100,
78
- showWordLimit: true,
79
- modelValue: "test"
80
- });
81
- (0, _vitest.expect)(html).toContain('maxlength="100"');
82
- });
83
- (0, _vitest.it)("should render password input in SSR", async () => {
84
- const html = await (0, _ssr.renderSSR)(_input.default, {
85
- type: "password",
86
- showPassword: true
87
- });
88
- (0, _vitest.expect)(html).toContain('type="password"');
89
- });
90
- (0, _vitest.it)("should hydrate textarea without mismatch", async () => {
91
- const result = await (0, _ssr.testHydration)(_input.default, {
92
- type: "textarea",
93
- modelValue: "Multi-line\ntext content",
94
- rows: 5,
95
- maxlength: 200,
96
- showWordLimit: true
97
- });
98
- (0, _vitest.expect)(result.isMatch).toBe(true);
99
- });
100
- });
@@ -1,85 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import Input from "../src/input.vue";
3
- import { renderSSR, expectSSRHasClass, testHydration } from "../../__tests__/utils/ssr.mjs";
4
- describe("YhInput SSR", () => {
5
- it("should render correctly in SSR", async () => {
6
- const html = await renderSSR(Input, { modelValue: "test value" });
7
- expectSSRHasClass(html, "yh-input");
8
- expect(html).toContain("test value");
9
- });
10
- it("should render with placeholder in SSR", async () => {
11
- const html = await renderSSR(Input, { placeholder: "Enter text" });
12
- expect(html).toContain('placeholder="Enter text"');
13
- });
14
- it("should render disabled state in SSR", async () => {
15
- const html = await renderSSR(Input, { disabled: true });
16
- expectSSRHasClass(html, "is-disabled");
17
- expect(html).toContain("disabled");
18
- });
19
- it("should render different sizes in SSR", async () => {
20
- const sizes = ["small", "default", "large"];
21
- for (const size of sizes) {
22
- const html = await renderSSR(Input, { size });
23
- if (size !== "default") {
24
- expectSSRHasClass(html, `yh-input--${size}`);
25
- }
26
- }
27
- });
28
- it("should render clearable input in SSR", async () => {
29
- const html = await renderSSR(Input, {
30
- modelValue: "clearable",
31
- clearable: true
32
- });
33
- expectSSRHasClass(html, "yh-input");
34
- });
35
- it("should render prefix icon in SSR", async () => {
36
- const html = await renderSSR(Input, { prefixIcon: "search" });
37
- expectSSRHasClass(html, "yh-input__prefix");
38
- });
39
- it("should render suffix icon in SSR", async () => {
40
- const html = await renderSSR(Input, { suffixIcon: "close" });
41
- expectSSRHasClass(html, "yh-input__suffix");
42
- });
43
- it("should hydrate without mismatch", async () => {
44
- const result = await testHydration(Input, {
45
- modelValue: "Hydration Test",
46
- placeholder: "Enter text",
47
- clearable: true
48
- });
49
- expect(result.isMatch).toBe(true);
50
- });
51
- it("should render textarea in SSR", async () => {
52
- const html = await renderSSR(Input, {
53
- type: "textarea",
54
- modelValue: "Textarea content",
55
- rows: 4
56
- });
57
- expect(html).toContain("textarea");
58
- expect(html).toContain("Textarea content");
59
- });
60
- it("should render maxlength in SSR", async () => {
61
- const html = await renderSSR(Input, {
62
- maxlength: 100,
63
- showWordLimit: true,
64
- modelValue: "test"
65
- });
66
- expect(html).toContain('maxlength="100"');
67
- });
68
- it("should render password input in SSR", async () => {
69
- const html = await renderSSR(Input, {
70
- type: "password",
71
- showPassword: true
72
- });
73
- expect(html).toContain('type="password"');
74
- });
75
- it("should hydrate textarea without mismatch", async () => {
76
- const result = await testHydration(Input, {
77
- type: "textarea",
78
- modelValue: "Multi-line\ntext content",
79
- rows: 5,
80
- maxlength: 200,
81
- showWordLimit: true
82
- });
83
- expect(result.isMatch).toBe(true);
84
- });
85
- });
@@ -1,127 +0,0 @@
1
- "use strict";
2
-
3
- var _vitest = require("vitest");
4
- var _testUtils = require("@vue/test-utils");
5
- var _vue = require("vue");
6
- var _input = _interopRequireDefault(require("../src/input.vue"));
7
- var _input2 = require("../src/input.cjs");
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- (0, _vitest.describe)("YhInput", () => {
10
- (0, _vitest.it)("should render correctly", () => {
11
- const wrapper = (0, _testUtils.mount)(_input.default);
12
- (0, _vitest.expect)(wrapper.classes()).toContain("yh-input");
13
- (0, _vitest.expect)(wrapper.find("input").exists()).toBe(true);
14
- });
15
- (0, _vitest.it)("should work with v-model", async () => {
16
- const wrapper = (0, _testUtils.mount)(_input.default, {
17
- props: {
18
- modelValue: "test",
19
- "onUpdate:modelValue": val => wrapper.setProps({
20
- modelValue: val
21
- })
22
- }
23
- });
24
- (0, _vitest.expect)(wrapper.find("input").element.value).toBe("test");
25
- await wrapper.find("input").setValue("new value");
26
- (0, _vitest.expect)(wrapper.props("modelValue")).toBe("new value");
27
- });
28
- (0, _vitest.it)("should display placeholder", () => {
29
- const wrapper = (0, _testUtils.mount)(_input.default, {
30
- props: {
31
- placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9"
32
- }
33
- });
34
- (0, _vitest.expect)(wrapper.find("input").attributes("placeholder")).toBe("\u8BF7\u8F93\u5165\u5185\u5BB9");
35
- });
36
- (0, _vitest.it)("should be disabled when disabled prop is true", () => {
37
- const wrapper = (0, _testUtils.mount)(_input.default, {
38
- props: {
39
- disabled: true
40
- }
41
- });
42
- (0, _vitest.expect)(wrapper.classes()).toContain("is-disabled");
43
- (0, _vitest.expect)(wrapper.find("input").attributes("disabled")).toBeDefined();
44
- });
45
- (0, _vitest.it)("should be readonly when readonly prop is true", () => {
46
- const wrapper = (0, _testUtils.mount)(_input.default, {
47
- props: {
48
- readonly: true
49
- }
50
- });
51
- (0, _vitest.expect)(wrapper.find("input").attributes("readonly")).toBeDefined();
52
- });
53
- (0, _vitest.it)("should apply size class", () => {
54
- const wrapper = (0, _testUtils.mount)(_input.default, {
55
- props: {
56
- size: "large"
57
- }
58
- });
59
- (0, _vitest.expect)(wrapper.classes()).toContain("yh-input--large");
60
- });
61
- (0, _vitest.it)("should show clear button when clearable", async () => {
62
- const wrapper = (0, _testUtils.mount)(_input.default, {
63
- props: {
64
- modelValue: "test",
65
- clearable: true
66
- }
67
- });
68
- await wrapper.find("input").trigger("focus");
69
- await (0, _vue.nextTick)();
70
- (0, _vitest.expect)(wrapper.find(".yh-input__clear").exists()).toBe(true);
71
- });
72
- (0, _vitest.it)("should toggle password visibility", async () => {
73
- const wrapper = (0, _testUtils.mount)(_input.default, {
74
- props: {
75
- type: "password",
76
- modelValue: "password123",
77
- showPassword: true
78
- }
79
- });
80
- (0, _vitest.expect)(wrapper.find("input").attributes("type")).toBe("password");
81
- await wrapper.find(".yh-input__password").trigger("click");
82
- (0, _vitest.expect)(wrapper.find("input").attributes("type")).toBe("text");
83
- });
84
- (0, _vitest.it)("should export valid constants", () => {
85
- (0, _vitest.expect)(_input2.inputTypes).toBeTruthy();
86
- (0, _vitest.expect)(_input2.inputSizes).toBeTruthy();
87
- (0, _vitest.expect)(_input2.inputVariants).toBeTruthy();
88
- (0, _vitest.expect)(_input2.inputStatuses).toBeTruthy();
89
- });
90
- (0, _vitest.it)("should show word limit count", () => {
91
- const wrapper = (0, _testUtils.mount)(_input.default, {
92
- props: {
93
- modelValue: "hello",
94
- maxlength: 10,
95
- showWordLimit: true
96
- }
97
- });
98
- (0, _vitest.expect)(wrapper.find(".yh-input__count").exists()).toBe(true);
99
- (0, _vitest.expect)(wrapper.find(".yh-input__count").text()).toBe("5 / 10");
100
- });
101
- (0, _vitest.it)("should render textarea when type is textarea", () => {
102
- const wrapper = (0, _testUtils.mount)(_input.default, {
103
- props: {
104
- type: "textarea"
105
- }
106
- });
107
- (0, _vitest.expect)(wrapper.find("textarea").exists()).toBe(true);
108
- (0, _vitest.expect)(wrapper.find("input").exists()).toBe(false);
109
- });
110
- (0, _vitest.it)("should emit focus and blur events", async () => {
111
- const wrapper = (0, _testUtils.mount)(_input.default);
112
- await wrapper.find("input").trigger("focus");
113
- (0, _vitest.expect)(wrapper.emitted("focus")).toBeTruthy();
114
- await wrapper.find("input").trigger("blur");
115
- (0, _vitest.expect)(wrapper.emitted("blur")).toBeTruthy();
116
- });
117
- (0, _vitest.it)("should render prepend and append slots", () => {
118
- const wrapper = (0, _testUtils.mount)(_input.default, {
119
- slots: {
120
- prepend: "<span>http://</span>",
121
- append: "<span>.com</span>"
122
- }
123
- });
124
- (0, _vitest.expect)(wrapper.find(".yh-input__prepend").exists()).toBe(true);
125
- (0, _vitest.expect)(wrapper.find(".yh-input__append").exists()).toBe(true);
126
- });
127
- });
@@ -1,112 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { mount } from "@vue/test-utils";
3
- import { nextTick } from "vue";
4
- import Input from "../src/input.vue";
5
- import { inputTypes, inputSizes, inputVariants, inputStatuses } from "../src/input.mjs";
6
- describe("YhInput", () => {
7
- it("should render correctly", () => {
8
- const wrapper = mount(Input);
9
- expect(wrapper.classes()).toContain("yh-input");
10
- expect(wrapper.find("input").exists()).toBe(true);
11
- });
12
- it("should work with v-model", async () => {
13
- const wrapper = mount(Input, {
14
- props: {
15
- modelValue: "test",
16
- "onUpdate:modelValue": (val) => wrapper.setProps({ modelValue: val })
17
- }
18
- });
19
- expect(wrapper.find("input").element.value).toBe("test");
20
- await wrapper.find("input").setValue("new value");
21
- expect(wrapper.props("modelValue")).toBe("new value");
22
- });
23
- it("should display placeholder", () => {
24
- const wrapper = mount(Input, {
25
- props: { placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9" }
26
- });
27
- expect(wrapper.find("input").attributes("placeholder")).toBe("\u8BF7\u8F93\u5165\u5185\u5BB9");
28
- });
29
- it("should be disabled when disabled prop is true", () => {
30
- const wrapper = mount(Input, {
31
- props: { disabled: true }
32
- });
33
- expect(wrapper.classes()).toContain("is-disabled");
34
- expect(wrapper.find("input").attributes("disabled")).toBeDefined();
35
- });
36
- it("should be readonly when readonly prop is true", () => {
37
- const wrapper = mount(Input, {
38
- props: { readonly: true }
39
- });
40
- expect(wrapper.find("input").attributes("readonly")).toBeDefined();
41
- });
42
- it("should apply size class", () => {
43
- const wrapper = mount(Input, {
44
- props: { size: "large" }
45
- });
46
- expect(wrapper.classes()).toContain("yh-input--large");
47
- });
48
- it("should show clear button when clearable", async () => {
49
- const wrapper = mount(Input, {
50
- props: {
51
- modelValue: "test",
52
- clearable: true
53
- }
54
- });
55
- await wrapper.find("input").trigger("focus");
56
- await nextTick();
57
- expect(wrapper.find(".yh-input__clear").exists()).toBe(true);
58
- });
59
- it("should toggle password visibility", async () => {
60
- const wrapper = mount(Input, {
61
- props: {
62
- type: "password",
63
- modelValue: "password123",
64
- showPassword: true
65
- }
66
- });
67
- expect(wrapper.find("input").attributes("type")).toBe("password");
68
- await wrapper.find(".yh-input__password").trigger("click");
69
- expect(wrapper.find("input").attributes("type")).toBe("text");
70
- });
71
- it("should export valid constants", () => {
72
- expect(inputTypes).toBeTruthy();
73
- expect(inputSizes).toBeTruthy();
74
- expect(inputVariants).toBeTruthy();
75
- expect(inputStatuses).toBeTruthy();
76
- });
77
- it("should show word limit count", () => {
78
- const wrapper = mount(Input, {
79
- props: {
80
- modelValue: "hello",
81
- maxlength: 10,
82
- showWordLimit: true
83
- }
84
- });
85
- expect(wrapper.find(".yh-input__count").exists()).toBe(true);
86
- expect(wrapper.find(".yh-input__count").text()).toBe("5 / 10");
87
- });
88
- it("should render textarea when type is textarea", () => {
89
- const wrapper = mount(Input, {
90
- props: { type: "textarea" }
91
- });
92
- expect(wrapper.find("textarea").exists()).toBe(true);
93
- expect(wrapper.find("input").exists()).toBe(false);
94
- });
95
- it("should emit focus and blur events", async () => {
96
- const wrapper = mount(Input);
97
- await wrapper.find("input").trigger("focus");
98
- expect(wrapper.emitted("focus")).toBeTruthy();
99
- await wrapper.find("input").trigger("blur");
100
- expect(wrapper.emitted("blur")).toBeTruthy();
101
- });
102
- it("should render prepend and append slots", () => {
103
- const wrapper = mount(Input, {
104
- slots: {
105
- prepend: "<span>http://</span>",
106
- append: "<span>.com</span>"
107
- }
108
- });
109
- expect(wrapper.find(".yh-input__prepend").exists()).toBe(true);
110
- expect(wrapper.find(".yh-input__append").exists()).toBe(true);
111
- });
112
- });
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- var _vitest = require("vitest");
4
- var _inputNumber = _interopRequireDefault(require("../src/input-number.vue"));
5
- var _ssr = require("../../__tests__/utils/ssr.cjs");
6
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
- (0, _vitest.describe)("YhInputNumber Hydration", () => {
8
- (0, _vitest.it)("should hydrate without mismatch", async () => {
9
- const result = await (0, _ssr.testHydration)(_inputNumber.default, {
10
- modelValue: 100,
11
- min: 0,
12
- max: 200,
13
- step: 10
14
- });
15
- (0, _vitest.expect)(result.ssrHtml).toBe(result.csrHtml);
16
- });
17
- (0, _vitest.it)("should hydrate with precision", async () => {
18
- const result = await (0, _ssr.testHydration)(_inputNumber.default, {
19
- modelValue: 3.14159,
20
- precision: 2
21
- });
22
- (0, _vitest.expect)(result.ssrHtml).toBe(result.csrHtml);
23
- });
24
- });
@@ -1,21 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import InputNumber from "../src/input-number.vue";
3
- import { testHydration } from "../../__tests__/utils/ssr.mjs";
4
- describe("YhInputNumber Hydration", () => {
5
- it("should hydrate without mismatch", async () => {
6
- const result = await testHydration(InputNumber, {
7
- modelValue: 100,
8
- min: 0,
9
- max: 200,
10
- step: 10
11
- });
12
- expect(result.ssrHtml).toBe(result.csrHtml);
13
- });
14
- it("should hydrate with precision", async () => {
15
- const result = await testHydration(InputNumber, {
16
- modelValue: 3.14159,
17
- precision: 2
18
- });
19
- expect(result.ssrHtml).toBe(result.csrHtml);
20
- });
21
- });
@@ -1,95 +0,0 @@
1
- "use strict";
2
-
3
- var _vitest = require("vitest");
4
- var _inputNumber = _interopRequireDefault(require("../src/input-number.vue"));
5
- var _ssr = require("../../__tests__/utils/ssr.cjs");
6
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
7
- (0, _vitest.describe)("YhInputNumber SSR", () => {
8
- (0, _vitest.it)("should render correctly in SSR", async () => {
9
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
10
- modelValue: 0
11
- });
12
- (0, _ssr.expectSSRHasClass)(html, "yh-input-number");
13
- });
14
- (0, _vitest.it)("should render with initial value in SSR", async () => {
15
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
16
- modelValue: 10
17
- });
18
- (0, _vitest.expect)(html).toContain("10");
19
- });
20
- (0, _vitest.it)("should render disabled state in SSR", async () => {
21
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
22
- modelValue: 5,
23
- disabled: true
24
- });
25
- (0, _ssr.expectSSRHasClass)(html, "is-disabled");
26
- });
27
- (0, _vitest.it)("should render different sizes in SSR", async () => {
28
- const sizes = ["small", "default", "large"];
29
- for (const size of sizes) {
30
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
31
- modelValue: 0,
32
- size
33
- });
34
- if (size !== "default") {
35
- (0, _ssr.expectSSRHasClass)(html, `yh-input-number--${size}`);
36
- }
37
- }
38
- });
39
- (0, _vitest.it)("should render with min value in SSR", async () => {
40
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
41
- modelValue: 5,
42
- min: 0
43
- });
44
- (0, _ssr.expectSSRHasClass)(html, "yh-input-number");
45
- });
46
- (0, _vitest.it)("should render with max value in SSR", async () => {
47
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
48
- modelValue: 5,
49
- max: 10
50
- });
51
- (0, _ssr.expectSSRHasClass)(html, "yh-input-number");
52
- });
53
- (0, _vitest.it)("should render with step in SSR", async () => {
54
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
55
- modelValue: 0,
56
- step: 2
57
- });
58
- (0, _ssr.expectSSRHasClass)(html, "yh-input-number");
59
- });
60
- (0, _vitest.it)("should render with precision in SSR", async () => {
61
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
62
- modelValue: 1.5,
63
- precision: 2
64
- });
65
- (0, _vitest.expect)(html).toContain("1.50");
66
- });
67
- (0, _vitest.it)("should render controls position in SSR", async () => {
68
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
69
- modelValue: 0,
70
- controlsPosition: "right"
71
- });
72
- (0, _ssr.expectSSRHasClass)(html, "is-controls-right");
73
- });
74
- (0, _vitest.it)("should render without controls in SSR", async () => {
75
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
76
- modelValue: 0,
77
- controls: false
78
- });
79
- (0, _ssr.expectSSRHasClass)(html, "yh-input-number");
80
- });
81
- (0, _vitest.it)("should render readonly state in SSR", async () => {
82
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
83
- modelValue: 10,
84
- readonly: true
85
- });
86
- (0, _ssr.expectSSRHasClass)(html, "yh-input-number");
87
- });
88
- (0, _vitest.it)("should render placeholder in SSR", async () => {
89
- const html = await (0, _ssr.renderSSR)(_inputNumber.default, {
90
- modelValue: void 0,
91
- placeholder: "Enter number"
92
- });
93
- (0, _vitest.expect)(html).toContain("Enter number");
94
- });
95
- });