@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.
- package/README.md +2 -0
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/icon/index.cjs +1 -1
- package/dist/icon/index.d.ts +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/loading/index.cjs +1 -1
- package/dist/loading/index.d.ts +1 -1
- package/dist/loading/index.mjs +1 -1
- package/dist/message/src/method.cjs +1 -1
- package/dist/message/src/method.d.ts +1 -1
- package/dist/message/src/method.mjs +1 -1
- package/dist/message-box/index.cjs +1 -1
- package/dist/message-box/index.d.ts +1 -1
- package/dist/message-box/index.mjs +1 -1
- package/dist/notification/src/method.cjs +1 -1
- package/dist/notification/src/method.d.ts +1 -1
- package/dist/notification/src/method.mjs +1 -1
- package/dist/resolver.cjs +1 -1
- package/dist/resolver.d.ts +7 -5
- package/dist/resolver.mjs +1 -1
- package/dist/style.css +584 -0
- package/package.json +6 -6
- package/dist/affix/__tests__/affix.bottom.test.cjs +0 -101
- package/dist/affix/__tests__/affix.bottom.test.mjs +0 -88
- package/dist/affix/__tests__/affix.ssr.test.cjs +0 -38
- package/dist/affix/__tests__/affix.ssr.test.mjs +0 -51
- package/dist/affix/__tests__/affix.test.cjs +0 -185
- package/dist/affix/__tests__/affix.test.mjs +0 -180
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +0 -55
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +0 -39
- package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +0 -235
- package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +0 -157
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +0 -61
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +0 -65
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +0 -205
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +0 -133
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +0 -73
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +0 -68
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +0 -128
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +0 -109
- package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.cjs +0 -50
- package/dist/ai-attachments/__tests__/ai-attachments.ssr.test.mjs +0 -33
- package/dist/ai-attachments/__tests__/ai-attachments.test.cjs +0 -113
- package/dist/ai-attachments/__tests__/ai-attachments.test.mjs +0 -81
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +0 -95
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +0 -66
- package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +0 -624
- package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +0 -393
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.cjs +0 -51
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.ssr.test.mjs +0 -51
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.cjs +0 -138
- package/dist/ai-bubble-list/__tests__/ai-bubble-list.test.mjs +0 -112
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +0 -90
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +0 -77
- package/dist/ai-chat/__tests__/ai-chat.test.cjs +0 -177
- package/dist/ai-chat/__tests__/ai-chat.test.mjs +0 -129
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +0 -75
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +0 -57
- package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +0 -174
- package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +0 -108
- package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.cjs +0 -46
- package/dist/ai-code-editor/__tests__/ai-code-editor.ssr.test.mjs +0 -39
- package/dist/ai-code-editor/__tests__/ai-code-editor.test.cjs +0 -90
- package/dist/ai-code-editor/__tests__/ai-code-editor.test.mjs +0 -78
- package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.cjs +0 -28
- package/dist/ai-code-runner/__tests__/ai-code-runner.ssr.test.mjs +0 -26
- package/dist/ai-code-runner/__tests__/ai-code-runner.test.cjs +0 -69
- package/dist/ai-code-runner/__tests__/ai-code-runner.test.mjs +0 -66
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +0 -50
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +0 -42
- package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +0 -67
- package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +0 -51
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +0 -62
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +0 -50
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +0 -315
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +0 -226
- package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.cjs +0 -45
- package/dist/ai-file-card/__tests__/ai-file-card.ssr.test.mjs +0 -29
- package/dist/ai-file-card/__tests__/ai-file-card.test.cjs +0 -160
- package/dist/ai-file-card/__tests__/ai-file-card.test.mjs +0 -109
- package/dist/ai-mention/__tests__/ai-mention.ssr.test.cjs +0 -38
- package/dist/ai-mention/__tests__/ai-mention.ssr.test.mjs +0 -37
- package/dist/ai-mention/__tests__/ai-mention.test.cjs +0 -113
- package/dist/ai-mention/__tests__/ai-mention.test.mjs +0 -84
- package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.cjs +0 -43
- package/dist/ai-mermaid/__tests__/ai-mermaid.ssr.test.mjs +0 -33
- package/dist/ai-mermaid/__tests__/ai-mermaid.test.cjs +0 -113
- package/dist/ai-mermaid/__tests__/ai-mermaid.test.mjs +0 -92
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +0 -49
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +0 -41
- package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +0 -54
- package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +0 -38
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +0 -33
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +0 -34
- package/dist/ai-provider/__tests__/ai-provider.test.cjs +0 -38
- package/dist/ai-provider/__tests__/ai-provider.test.mjs +0 -33
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +0 -46
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +0 -37
- package/dist/ai-sender/__tests__/ai-sender.test.cjs +0 -511
- package/dist/ai-sender/__tests__/ai-sender.test.mjs +0 -322
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +0 -72
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +0 -82
- package/dist/ai-sources/__tests__/ai-sources.test.cjs +0 -200
- package/dist/ai-sources/__tests__/ai-sources.test.mjs +0 -160
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +0 -56
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +0 -42
- package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +0 -151
- package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +0 -96
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +0 -88
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +0 -55
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +0 -344
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +0 -237
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +0 -32
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +0 -25
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +0 -130
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +0 -103
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +0 -57
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +0 -39
- package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +0 -169
- package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +0 -113
- package/dist/alert/__tests__/alert.ssr.test.cjs +0 -28
- package/dist/alert/__tests__/alert.ssr.test.mjs +0 -29
- package/dist/alert/__tests__/alert.test.cjs +0 -123
- package/dist/alert/__tests__/alert.test.mjs +0 -110
- package/dist/autocomplete/__tests__/autocomplete.ssr.test.cjs +0 -54
- package/dist/autocomplete/__tests__/autocomplete.ssr.test.mjs +0 -47
- package/dist/autocomplete/__tests__/autocomplete.test.cjs +0 -299
- package/dist/autocomplete/__tests__/autocomplete.test.mjs +0 -263
- package/dist/avatar/__tests__/avatar.ssr.test.cjs +0 -103
- package/dist/avatar/__tests__/avatar.ssr.test.mjs +0 -108
- package/dist/avatar/__tests__/avatar.test.cjs +0 -146
- package/dist/avatar/__tests__/avatar.test.mjs +0 -125
- package/dist/back-top/__tests__/back-top.ssr.test.cjs +0 -13
- package/dist/back-top/__tests__/back-top.ssr.test.mjs +0 -10
- package/dist/back-top/__tests__/back-top.test.cjs +0 -88
- package/dist/back-top/__tests__/back-top.test.mjs +0 -76
- package/dist/badge/__tests__/badge.ssr.test.cjs +0 -36
- package/dist/badge/__tests__/badge.ssr.test.mjs +0 -33
- package/dist/badge/__tests__/badge.test.cjs +0 -115
- package/dist/badge/__tests__/badge.test.mjs +0 -112
- package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.cjs +0 -22
- package/dist/breadcrumb/__tests__/breadcrumb.ssr.test.mjs +0 -20
- package/dist/breadcrumb/__tests__/breadcrumb.test.cjs +0 -64
- package/dist/breadcrumb/__tests__/breadcrumb.test.mjs +0 -51
- package/dist/button/__tests__/button.ssr.test.cjs +0 -52
- package/dist/button/__tests__/button.ssr.test.mjs +0 -55
- package/dist/button/__tests__/button.test.cjs +0 -207
- package/dist/button/__tests__/button.test.mjs +0 -141
- package/dist/calendar/__tests__/calendar.ssr.test.cjs +0 -65
- package/dist/calendar/__tests__/calendar.ssr.test.mjs +0 -63
- package/dist/calendar/__tests__/calendar.test.cjs +0 -263
- package/dist/calendar/__tests__/calendar.test.mjs +0 -255
- package/dist/card/__tests__/card.ssr.test.cjs +0 -37
- package/dist/card/__tests__/card.ssr.test.mjs +0 -40
- package/dist/card/__tests__/card.test.cjs +0 -131
- package/dist/card/__tests__/card.test.mjs +0 -124
- package/dist/carousel/__tests__/carousel.ssr.test.cjs +0 -27
- package/dist/carousel/__tests__/carousel.ssr.test.mjs +0 -27
- package/dist/carousel/__tests__/carousel.test.cjs +0 -115
- package/dist/carousel/__tests__/carousel.test.mjs +0 -98
- package/dist/cascader/__tests__/cascader-panel.test.cjs +0 -162
- package/dist/cascader/__tests__/cascader-panel.test.mjs +0 -151
- package/dist/cascader/__tests__/cascader.ssr.test.cjs +0 -61
- package/dist/cascader/__tests__/cascader.ssr.test.mjs +0 -55
- package/dist/cascader/__tests__/cascader.test.cjs +0 -342
- package/dist/cascader/__tests__/cascader.test.mjs +0 -316
- package/dist/category-nav/__tests__/category-nav.ssr.test.cjs +0 -35
- package/dist/category-nav/__tests__/category-nav.ssr.test.mjs +0 -21
- package/dist/category-nav/__tests__/category-nav.test.cjs +0 -53
- package/dist/category-nav/__tests__/category-nav.test.mjs +0 -33
- package/dist/checkbox/__tests__/checkbox.ssr.test.cjs +0 -52
- package/dist/checkbox/__tests__/checkbox.ssr.test.mjs +0 -57
- package/dist/checkbox/__tests__/checkbox.test.cjs +0 -173
- package/dist/checkbox/__tests__/checkbox.test.mjs +0 -133
- package/dist/col/__tests__/col.ssr.test.cjs +0 -44
- package/dist/col/__tests__/col.ssr.test.mjs +0 -42
- package/dist/col/__tests__/col.test.cjs +0 -128
- package/dist/col/__tests__/col.test.mjs +0 -116
- package/dist/color-picker/__tests__/color-picker.ssr.test.cjs +0 -34
- package/dist/color-picker/__tests__/color-picker.ssr.test.mjs +0 -39
- package/dist/color-picker/__tests__/color-picker.test.cjs +0 -227
- package/dist/color-picker/__tests__/color-picker.test.mjs +0 -176
- package/dist/config-provider/__tests__/config-provider.ssr.test.cjs +0 -43
- package/dist/config-provider/__tests__/config-provider.ssr.test.mjs +0 -42
- package/dist/config-provider/__tests__/config-provider.test.cjs +0 -75
- package/dist/config-provider/__tests__/config-provider.test.mjs +0 -64
- package/dist/container/__tests__/container.ssr.test.cjs +0 -71
- package/dist/container/__tests__/container.ssr.test.mjs +0 -50
- package/dist/container/__tests__/container.test.cjs +0 -111
- package/dist/container/__tests__/container.test.mjs +0 -84
- package/dist/countdown/__tests__/countdown.ssr.test.cjs +0 -86
- package/dist/countdown/__tests__/countdown.ssr.test.mjs +0 -78
- package/dist/countdown/__tests__/countdown.test.cjs +0 -767
- package/dist/countdown/__tests__/countdown.test.mjs +0 -722
- package/dist/coupon-card/__tests__/coupon-card.ssr.test.cjs +0 -21
- package/dist/coupon-card/__tests__/coupon-card.ssr.test.mjs +0 -18
- package/dist/coupon-card/__tests__/coupon-card.test.cjs +0 -67
- package/dist/coupon-card/__tests__/coupon-card.test.mjs +0 -64
- package/dist/date-picker/__tests__/date-picker-extended.test.cjs +0 -581
- package/dist/date-picker/__tests__/date-picker-extended.test.mjs +0 -455
- package/dist/date-picker/__tests__/date-picker.ssr.test.cjs +0 -26
- package/dist/date-picker/__tests__/date-picker.ssr.test.mjs +0 -23
- package/dist/date-picker/__tests__/date-picker.test.cjs +0 -170
- package/dist/date-picker/__tests__/date-picker.test.mjs +0 -136
- package/dist/descriptions/__tests__/descriptions.ssr.test.cjs +0 -67
- package/dist/descriptions/__tests__/descriptions.ssr.test.mjs +0 -72
- package/dist/descriptions/__tests__/descriptions.test.cjs +0 -150
- package/dist/descriptions/__tests__/descriptions.test.mjs +0 -130
- package/dist/dialog/__tests__/dialog.functional.test.cjs +0 -49
- package/dist/dialog/__tests__/dialog.functional.test.mjs +0 -49
- package/dist/dialog/__tests__/dialog.ssr.test.cjs +0 -31
- package/dist/dialog/__tests__/dialog.ssr.test.mjs +0 -29
- package/dist/dialog/__tests__/dialog.test.cjs +0 -561
- package/dist/dialog/__tests__/dialog.test.mjs +0 -388
- package/dist/divider/__tests__/divider.ssr.test.cjs +0 -41
- package/dist/divider/__tests__/divider.ssr.test.mjs +0 -44
- package/dist/divider/__tests__/divider.test.cjs +0 -71
- package/dist/divider/__tests__/divider.test.mjs +0 -68
- package/dist/drawer/__tests__/drawer.ssr.test.cjs +0 -25
- package/dist/drawer/__tests__/drawer.ssr.test.mjs +0 -23
- package/dist/drawer/__tests__/drawer.test.cjs +0 -145
- package/dist/drawer/__tests__/drawer.test.mjs +0 -122
- package/dist/dropdown/__tests__/dropdown.ssr.test.cjs +0 -49
- package/dist/dropdown/__tests__/dropdown.ssr.test.mjs +0 -64
- package/dist/dropdown/__tests__/dropdown.test.cjs +0 -310
- package/dist/dropdown/__tests__/dropdown.test.mjs +0 -269
- package/dist/empty/__tests__/empty.ssr.test.cjs +0 -96
- package/dist/empty/__tests__/empty.ssr.test.mjs +0 -99
- package/dist/empty/__tests__/empty.test.cjs +0 -110
- package/dist/empty/__tests__/empty.test.mjs +0 -101
- package/dist/filter-bar/__tests__/filter-bar.ssr.test.cjs +0 -29
- package/dist/filter-bar/__tests__/filter-bar.ssr.test.mjs +0 -16
- package/dist/filter-bar/__tests__/filter-bar.test.cjs +0 -51
- package/dist/filter-bar/__tests__/filter-bar.test.mjs +0 -29
- package/dist/form/__tests__/form-schema.test.cjs +0 -636
- package/dist/form/__tests__/form-schema.test.mjs +0 -366
- package/dist/form/__tests__/form.ssr.test.cjs +0 -74
- package/dist/form/__tests__/form.ssr.test.mjs +0 -73
- package/dist/form/__tests__/form.test.cjs +0 -208
- package/dist/form/__tests__/form.test.mjs +0 -128
- package/dist/gantt-chart/__tests__/debug_ssr.test.cjs +0 -51
- package/dist/gantt-chart/__tests__/debug_ssr.test.mjs +0 -37
- package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.cjs +0 -95
- package/dist/gantt-chart/__tests__/gantt-chart.ssr.test.mjs +0 -94
- package/dist/gantt-chart/__tests__/gantt-chart.test.cjs +0 -86
- package/dist/gantt-chart/__tests__/gantt-chart.test.mjs +0 -79
- package/dist/grid/__tests__/grid.ssr.test.cjs +0 -81
- package/dist/grid/__tests__/grid.ssr.test.mjs +0 -63
- package/dist/grid/__tests__/grid.test.cjs +0 -142
- package/dist/grid/__tests__/grid.test.mjs +0 -89
- package/dist/icon/__tests__/icon.ssr.test.cjs +0 -35
- package/dist/icon/__tests__/icon.ssr.test.mjs +0 -26
- package/dist/icon/__tests__/icon.test.cjs +0 -144
- package/dist/icon/__tests__/icon.test.mjs +0 -123
- package/dist/image/__tests__/image-viewer.test.cjs +0 -101
- package/dist/image/__tests__/image-viewer.test.mjs +0 -94
- package/dist/image/__tests__/image.ssr.test.cjs +0 -73
- package/dist/image/__tests__/image.ssr.test.mjs +0 -72
- package/dist/image/__tests__/image.test.cjs +0 -171
- package/dist/image/__tests__/image.test.mjs +0 -159
- package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.cjs +0 -54
- package/dist/image-magnifier/__tests__/image-magnifier.ssr.test.mjs +0 -35
- package/dist/image-magnifier/__tests__/image-magnifier.test.cjs +0 -257
- package/dist/image-magnifier/__tests__/image-magnifier.test.mjs +0 -177
- package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.cjs +0 -59
- package/dist/infinite-scroll/__tests__/infinite-scroll.ssr.test.mjs +0 -84
- package/dist/infinite-scroll/__tests__/infinite-scroll.test.cjs +0 -255
- package/dist/infinite-scroll/__tests__/infinite-scroll.test.mjs +0 -187
- package/dist/input/__tests__/input-utils.test.cjs +0 -77
- package/dist/input/__tests__/input-utils.test.mjs +0 -75
- package/dist/input/__tests__/input.ssr.test.cjs +0 -100
- package/dist/input/__tests__/input.ssr.test.mjs +0 -85
- package/dist/input/__tests__/input.test.cjs +0 -127
- package/dist/input/__tests__/input.test.mjs +0 -112
- package/dist/input-number/__tests__/input-number.hydration.test.cjs +0 -24
- package/dist/input-number/__tests__/input-number.hydration.test.mjs +0 -21
- package/dist/input-number/__tests__/input-number.ssr.test.cjs +0 -95
- package/dist/input-number/__tests__/input-number.ssr.test.mjs +0 -92
- package/dist/input-number/__tests__/input-number.test.cjs +0 -199
- package/dist/input-number/__tests__/input-number.test.mjs +0 -173
- package/dist/input-tag/__tests__/input-tag.ssr.test.cjs +0 -47
- package/dist/input-tag/__tests__/input-tag.ssr.test.mjs +0 -41
- package/dist/input-tag/__tests__/input-tag.test.cjs +0 -268
- package/dist/input-tag/__tests__/input-tag.test.mjs +0 -201
- package/dist/loading/__tests__/loading.ssr.test.cjs +0 -37
- package/dist/loading/__tests__/loading.ssr.test.mjs +0 -27
- package/dist/loading/__tests__/loading.test.cjs +0 -91
- package/dist/loading/__tests__/loading.test.mjs +0 -75
- package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.cjs +0 -33
- package/dist/lucky-draw/__tests__/lucky-draw.ssr.test.mjs +0 -31
- package/dist/lucky-draw/__tests__/lucky-draw.test.cjs +0 -56
- package/dist/lucky-draw/__tests__/lucky-draw.test.mjs +0 -48
- package/dist/marquee/__tests__/marquee.ssr.test.cjs +0 -59
- package/dist/marquee/__tests__/marquee.ssr.test.mjs +0 -60
- package/dist/marquee/__tests__/marquee.test.cjs +0 -94
- package/dist/marquee/__tests__/marquee.test.mjs +0 -92
- package/dist/mention/__tests__/mention.ssr.test.cjs +0 -92
- package/dist/mention/__tests__/mention.ssr.test.mjs +0 -70
- package/dist/mention/__tests__/mention.test.cjs +0 -650
- package/dist/mention/__tests__/mention.test.mjs +0 -523
- package/dist/menu/__tests__/menu.ssr.test.cjs +0 -92
- package/dist/menu/__tests__/menu.ssr.test.mjs +0 -124
- package/dist/menu/__tests__/menu.test.cjs +0 -209
- package/dist/menu/__tests__/menu.test.mjs +0 -182
- package/dist/message/__tests__/message.ssr.test.cjs +0 -29
- package/dist/message/__tests__/message.ssr.test.mjs +0 -23
- package/dist/message/__tests__/message.test.cjs +0 -170
- package/dist/message/__tests__/message.test.mjs +0 -154
- package/dist/message-box/__tests__/message-box.ssr.test.cjs +0 -33
- package/dist/message-box/__tests__/message-box.ssr.test.mjs +0 -30
- package/dist/message-box/__tests__/message-box.test.cjs +0 -100
- package/dist/message-box/__tests__/message-box.test.mjs +0 -95
- package/dist/notification/__tests__/notification.ssr.test.cjs +0 -31
- package/dist/notification/__tests__/notification.ssr.test.mjs +0 -25
- package/dist/notification/__tests__/notification.test.cjs +0 -248
- package/dist/notification/__tests__/notification.test.mjs +0 -206
- package/dist/pagination/__tests__/pagination.ssr.test.cjs +0 -61
- package/dist/pagination/__tests__/pagination.ssr.test.mjs +0 -59
- package/dist/pagination/__tests__/pagination.test.cjs +0 -135
- package/dist/pagination/__tests__/pagination.test.mjs +0 -131
- package/dist/popconfirm/__tests__/popconfirm.ssr.test.cjs +0 -48
- package/dist/popconfirm/__tests__/popconfirm.ssr.test.mjs +0 -63
- package/dist/popconfirm/__tests__/popconfirm.test.cjs +0 -62
- package/dist/popconfirm/__tests__/popconfirm.test.mjs +0 -56
- package/dist/popover/__tests__/popover.ssr.test.cjs +0 -48
- package/dist/popover/__tests__/popover.ssr.test.mjs +0 -63
- package/dist/popover/__tests__/popover.test.cjs +0 -107
- package/dist/popover/__tests__/popover.test.mjs +0 -93
- package/dist/price/__tests__/price.ssr.test.cjs +0 -20
- package/dist/price/__tests__/price.ssr.test.mjs +0 -19
- package/dist/price/__tests__/price.test.cjs +0 -45
- package/dist/price/__tests__/price.test.mjs +0 -42
- package/dist/product-card/__tests__/product-card.ssr.test.cjs +0 -21
- package/dist/product-card/__tests__/product-card.ssr.test.mjs +0 -18
- package/dist/product-card/__tests__/product-card.test.cjs +0 -54
- package/dist/product-card/__tests__/product-card.test.mjs +0 -53
- package/dist/progress/__tests__/progress.ssr.test.cjs +0 -31
- package/dist/progress/__tests__/progress.ssr.test.mjs +0 -29
- package/dist/progress/__tests__/progress.test.cjs +0 -119
- package/dist/progress/__tests__/progress.test.mjs +0 -77
- package/dist/radio/__tests__/radio-button.test.cjs +0 -99
- package/dist/radio/__tests__/radio-button.test.mjs +0 -83
- package/dist/radio/__tests__/radio.ssr.test.cjs +0 -132
- package/dist/radio/__tests__/radio.ssr.test.mjs +0 -165
- package/dist/radio/__tests__/radio.test.cjs +0 -170
- package/dist/radio/__tests__/radio.test.mjs +0 -143
- package/dist/rate/__tests__/rate.ssr.test.cjs +0 -106
- package/dist/rate/__tests__/rate.ssr.test.mjs +0 -103
- package/dist/rate/__tests__/rate.test.cjs +0 -88
- package/dist/rate/__tests__/rate.test.mjs +0 -85
- package/dist/result/__tests__/result.ssr.test.cjs +0 -62
- package/dist/result/__tests__/result.ssr.test.mjs +0 -51
- package/dist/result/__tests__/result.test.cjs +0 -135
- package/dist/result/__tests__/result.test.mjs +0 -92
- package/dist/row/__tests__/row.ssr.test.cjs +0 -29
- package/dist/row/__tests__/row.ssr.test.mjs +0 -30
- package/dist/row/__tests__/row.test.cjs +0 -89
- package/dist/row/__tests__/row.test.mjs +0 -86
- package/dist/row/__tests__/row_ts.test.cjs +0 -31
- package/dist/row/__tests__/row_ts.test.mjs +0 -28
- package/dist/scrollbar/__tests__/scrollbar.ssr.test.cjs +0 -49
- package/dist/scrollbar/__tests__/scrollbar.ssr.test.mjs +0 -54
- package/dist/scrollbar/__tests__/scrollbar.test.cjs +0 -43
- package/dist/scrollbar/__tests__/scrollbar.test.mjs +0 -40
- package/dist/select/__tests__/select.perf.test.cjs +0 -191
- package/dist/select/__tests__/select.perf.test.mjs +0 -185
- package/dist/select/__tests__/select.ssr.test.cjs +0 -58
- package/dist/select/__tests__/select.ssr.test.mjs +0 -52
- package/dist/select/__tests__/select.test.cjs +0 -414
- package/dist/select/__tests__/select.test.mjs +0 -345
- package/dist/skeleton/__tests__/skeleton.ssr.test.cjs +0 -81
- package/dist/skeleton/__tests__/skeleton.ssr.test.mjs +0 -83
- package/dist/skeleton/__tests__/skeleton.test.cjs +0 -72
- package/dist/skeleton/__tests__/skeleton.test.mjs +0 -65
- package/dist/sku-selector/__tests__/sku-selector.ssr.test.cjs +0 -32
- package/dist/sku-selector/__tests__/sku-selector.ssr.test.mjs +0 -19
- package/dist/sku-selector/__tests__/sku-selector.test.cjs +0 -64
- package/dist/sku-selector/__tests__/sku-selector.test.mjs +0 -53
- package/dist/slider/__tests__/repro.test.cjs +0 -25
- package/dist/slider/__tests__/repro.test.mjs +0 -22
- package/dist/slider/__tests__/slider.ssr.test.cjs +0 -118
- package/dist/slider/__tests__/slider.ssr.test.mjs +0 -115
- package/dist/slider/__tests__/slider.test.cjs +0 -155
- package/dist/slider/__tests__/slider.test.mjs +0 -120
- package/dist/smart-address/__tests__/smart-address.ssr.test.cjs +0 -28
- package/dist/smart-address/__tests__/smart-address.ssr.test.mjs +0 -25
- package/dist/smart-address/__tests__/smart-address.test.cjs +0 -68
- package/dist/smart-address/__tests__/smart-address.test.mjs +0 -56
- package/dist/space/__tests__/space.ssr.test.cjs +0 -115
- package/dist/space/__tests__/space.ssr.test.mjs +0 -150
- package/dist/space/__tests__/space.test.cjs +0 -227
- package/dist/space/__tests__/space.test.mjs +0 -187
- package/dist/spin/__tests__/spin.ssr.test.cjs +0 -46
- package/dist/spin/__tests__/spin.ssr.test.mjs +0 -43
- package/dist/spin/__tests__/spin.test.cjs +0 -65
- package/dist/spin/__tests__/spin.test.mjs +0 -63
- package/dist/steps/__tests__/steps.ssr.test.cjs +0 -73
- package/dist/steps/__tests__/steps.ssr.test.mjs +0 -55
- package/dist/steps/__tests__/steps.test.cjs +0 -152
- package/dist/steps/__tests__/steps.test.mjs +0 -123
- package/dist/submit-bar/__tests__/submit-bar.ssr.test.cjs +0 -21
- package/dist/submit-bar/__tests__/submit-bar.ssr.test.mjs +0 -18
- package/dist/submit-bar/__tests__/submit-bar.test.cjs +0 -50
- package/dist/submit-bar/__tests__/submit-bar.test.mjs +0 -36
- package/dist/switch/__tests__/switch.ssr.test.cjs +0 -105
- package/dist/switch/__tests__/switch.ssr.test.mjs +0 -102
- package/dist/switch/__tests__/switch.test.cjs +0 -251
- package/dist/switch/__tests__/switch.test.mjs +0 -193
- package/dist/table/__tests__/table-advance.test.cjs +0 -180
- package/dist/table/__tests__/table-advance.test.mjs +0 -118
- package/dist/table/__tests__/table-interaction.test.cjs +0 -236
- package/dist/table/__tests__/table-interaction.test.mjs +0 -162
- package/dist/table/__tests__/table-utils.test.cjs +0 -690
- package/dist/table/__tests__/table-utils.test.mjs +0 -485
- package/dist/table/__tests__/table.perf.test.cjs +0 -231
- package/dist/table/__tests__/table.perf.test.mjs +0 -225
- package/dist/table/__tests__/table.ssr.test.cjs +0 -296
- package/dist/table/__tests__/table.ssr.test.mjs +0 -265
- package/dist/table/__tests__/table.test.cjs +0 -682
- package/dist/table/__tests__/table.test.mjs +0 -617
- package/dist/table/__tests__/use-column-drag.test.cjs +0 -238
- package/dist/table/__tests__/use-column-drag.test.mjs +0 -150
- package/dist/table/__tests__/use-table-export.test.cjs +0 -179
- package/dist/table/__tests__/use-table-export.test.mjs +0 -105
- package/dist/table/__tests__/use-table-import.test.cjs +0 -206
- package/dist/table/__tests__/use-table-import.test.mjs +0 -144
- package/dist/table/__tests__/use-table-print.test.cjs +0 -190
- package/dist/table/__tests__/use-table-print.test.mjs +0 -134
- package/dist/table/__tests__/use-virtual-scroll.test.cjs +0 -286
- package/dist/table/__tests__/use-virtual-scroll.test.mjs +0 -196
- package/dist/tabs/__tests__/tabs.ssr.test.cjs +0 -57
- package/dist/tabs/__tests__/tabs.ssr.test.mjs +0 -41
- package/dist/tabs/__tests__/tabs.test.cjs +0 -171
- package/dist/tabs/__tests__/tabs.test.mjs +0 -134
- package/dist/tag/__tests__/tag.ssr.test.cjs +0 -45
- package/dist/tag/__tests__/tag.ssr.test.mjs +0 -48
- package/dist/tag/__tests__/tag.test.cjs +0 -194
- package/dist/tag/__tests__/tag.test.mjs +0 -167
- package/dist/time-picker/__tests__/time-picker.ssr.test.cjs +0 -46
- package/dist/time-picker/__tests__/time-picker.ssr.test.mjs +0 -43
- package/dist/time-picker/__tests__/time-picker.test.cjs +0 -228
- package/dist/time-picker/__tests__/time-picker.test.mjs +0 -218
- package/dist/time-picker/__tests__/time-spinner.test.cjs +0 -196
- package/dist/time-picker/__tests__/time-spinner.test.mjs +0 -162
- package/dist/time-select/__tests__/time-select.ssr.test.cjs +0 -42
- package/dist/time-select/__tests__/time-select.ssr.test.mjs +0 -37
- package/dist/time-select/__tests__/time-select.test.cjs +0 -390
- package/dist/time-select/__tests__/time-select.test.mjs +0 -374
- package/dist/tooltip/__tests__/tooltip.ssr.test.cjs +0 -55
- package/dist/tooltip/__tests__/tooltip.ssr.test.mjs +0 -76
- package/dist/tooltip/__tests__/tooltip.test.cjs +0 -132
- package/dist/tooltip/__tests__/tooltip.test.mjs +0 -121
- package/dist/transfer/__tests__/transfer.ssr.test.cjs +0 -47
- package/dist/transfer/__tests__/transfer.ssr.test.mjs +0 -44
- package/dist/transfer/__tests__/transfer.test.cjs +0 -422
- package/dist/transfer/__tests__/transfer.test.mjs +0 -405
- package/dist/tree/__tests__/tree.perf.test.cjs +0 -182
- package/dist/tree/__tests__/tree.perf.test.mjs +0 -198
- package/dist/tree/__tests__/tree.ssr.test.cjs +0 -56
- package/dist/tree/__tests__/tree.ssr.test.mjs +0 -45
- package/dist/tree/__tests__/tree.test.cjs +0 -488
- package/dist/tree/__tests__/tree.test.mjs +0 -333
- package/dist/tree-select/__tests__/tree-select.ssr.test.cjs +0 -52
- package/dist/tree-select/__tests__/tree-select.ssr.test.mjs +0 -55
- package/dist/tree-select/__tests__/tree-select.test.cjs +0 -231
- package/dist/tree-select/__tests__/tree-select.test.mjs +0 -189
- package/dist/typography/__tests__/typography.ssr.test.cjs +0 -85
- package/dist/typography/__tests__/typography.ssr.test.mjs +0 -63
- package/dist/typography/__tests__/typography.test.cjs +0 -362
- package/dist/typography/__tests__/typography.test.mjs +0 -161
- package/dist/upload/__tests__/upload.ssr.test.cjs +0 -28
- package/dist/upload/__tests__/upload.ssr.test.mjs +0 -26
- package/dist/upload/__tests__/upload.test.cjs +0 -467
- package/dist/upload/__tests__/upload.test.mjs +0 -336
- package/dist/waterfall/__tests__/waterfall.ssr.test.cjs +0 -38
- package/dist/waterfall/__tests__/waterfall.ssr.test.mjs +0 -39
- package/dist/waterfall/__tests__/waterfall.test.cjs +0 -122
- package/dist/waterfall/__tests__/waterfall.test.mjs +0 -85
- package/dist/watermark/__tests__/watermark.ssr.test.cjs +0 -32
- package/dist/watermark/__tests__/watermark.ssr.test.mjs +0 -30
- package/dist/watermark/__tests__/watermark.test.cjs +0 -127
- package/dist/watermark/__tests__/watermark.test.mjs +0 -124
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi } from "vitest";
|
|
2
|
-
import { mount } from "@vue/test-utils";
|
|
3
|
-
import { nextTick } from "vue";
|
|
4
|
-
import YhSteps from "../src/steps.vue";
|
|
5
|
-
import YhStep from "../src/step.vue";
|
|
6
|
-
describe("Steps", () => {
|
|
7
|
-
it("should render basic steps", async () => {
|
|
8
|
-
const wrapper = mount({
|
|
9
|
-
components: { YhSteps, YhStep },
|
|
10
|
-
template: `
|
|
11
|
-
<yh-steps :active="1">
|
|
12
|
-
<yh-step title="Step 1" />
|
|
13
|
-
<yh-step title="Step 2" />
|
|
14
|
-
<yh-step title="Step 3" />
|
|
15
|
-
</yh-steps>
|
|
16
|
-
`
|
|
17
|
-
});
|
|
18
|
-
await nextTick();
|
|
19
|
-
expect(wrapper.find(".yh-steps").exists()).toBe(true);
|
|
20
|
-
expect(wrapper.findAll(".yh-step").length).toBe(3);
|
|
21
|
-
});
|
|
22
|
-
it("should show correct status based on active", async () => {
|
|
23
|
-
const wrapper = mount({
|
|
24
|
-
components: { YhSteps, YhStep },
|
|
25
|
-
template: `
|
|
26
|
-
<yh-steps :active="1">
|
|
27
|
-
<yh-step title="Step 1" />
|
|
28
|
-
<yh-step title="Step 2" />
|
|
29
|
-
<yh-step title="Step 3" />
|
|
30
|
-
</yh-steps>
|
|
31
|
-
`
|
|
32
|
-
});
|
|
33
|
-
await nextTick();
|
|
34
|
-
const steps = wrapper.findAll(".yh-step");
|
|
35
|
-
expect(steps[0].classes()).toContain("is-finish");
|
|
36
|
-
expect(steps[1].classes()).toContain("is-process");
|
|
37
|
-
expect(steps[2].classes()).toContain("is-wait");
|
|
38
|
-
});
|
|
39
|
-
it("should support vertical direction", async () => {
|
|
40
|
-
const wrapper = mount({
|
|
41
|
-
components: { YhSteps, YhStep },
|
|
42
|
-
template: `
|
|
43
|
-
<yh-steps direction="vertical" :active="0">
|
|
44
|
-
<yh-step title="Step 1" />
|
|
45
|
-
<yh-step title="Step 2" />
|
|
46
|
-
</yh-steps>
|
|
47
|
-
`
|
|
48
|
-
});
|
|
49
|
-
await nextTick();
|
|
50
|
-
expect(wrapper.find(".yh-steps--vertical").exists()).toBe(true);
|
|
51
|
-
});
|
|
52
|
-
it("should support simple mode", async () => {
|
|
53
|
-
const wrapper = mount({
|
|
54
|
-
components: { YhSteps, YhStep },
|
|
55
|
-
template: `
|
|
56
|
-
<yh-steps simple :active="0">
|
|
57
|
-
<yh-step title="Step 1" />
|
|
58
|
-
<yh-step title="Step 2" />
|
|
59
|
-
</yh-steps>
|
|
60
|
-
`
|
|
61
|
-
});
|
|
62
|
-
await nextTick();
|
|
63
|
-
expect(wrapper.find(".yh-steps.is-simple").exists()).toBe(true);
|
|
64
|
-
});
|
|
65
|
-
it("should support description", async () => {
|
|
66
|
-
const wrapper = mount({
|
|
67
|
-
components: { YhSteps, YhStep },
|
|
68
|
-
template: `
|
|
69
|
-
<yh-steps :active="0">
|
|
70
|
-
<yh-step title="Step 1" description="Description 1" />
|
|
71
|
-
</yh-steps>
|
|
72
|
-
`
|
|
73
|
-
});
|
|
74
|
-
await nextTick();
|
|
75
|
-
expect(wrapper.find(".yh-step__description").text()).toBe("Description 1");
|
|
76
|
-
});
|
|
77
|
-
it("should support custom status", async () => {
|
|
78
|
-
const wrapper = mount({
|
|
79
|
-
components: { YhSteps, YhStep },
|
|
80
|
-
template: `
|
|
81
|
-
<yh-steps :active="1">
|
|
82
|
-
<yh-step title="Step 1" status="error" />
|
|
83
|
-
<yh-step title="Step 2" />
|
|
84
|
-
</yh-steps>
|
|
85
|
-
`
|
|
86
|
-
});
|
|
87
|
-
await nextTick();
|
|
88
|
-
const steps = wrapper.findAll(".yh-step");
|
|
89
|
-
expect(steps[0].classes()).toContain("is-error");
|
|
90
|
-
});
|
|
91
|
-
it("should support clickable steps", async () => {
|
|
92
|
-
const onChange = vi.fn();
|
|
93
|
-
const wrapper = mount({
|
|
94
|
-
components: { YhSteps, YhStep },
|
|
95
|
-
template: `
|
|
96
|
-
<yh-steps clickable :active="0" @change="onChange">
|
|
97
|
-
<yh-step title="Step 1" />
|
|
98
|
-
<yh-step title="Step 2" />
|
|
99
|
-
</yh-steps>
|
|
100
|
-
`,
|
|
101
|
-
setup() {
|
|
102
|
-
return { onChange };
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
await nextTick();
|
|
106
|
-
const steps = wrapper.findAll(".yh-step");
|
|
107
|
-
await steps[1].trigger("click");
|
|
108
|
-
expect(onChange).toHaveBeenCalledWith(1);
|
|
109
|
-
});
|
|
110
|
-
it("should support dot progress style", async () => {
|
|
111
|
-
const wrapper = mount({
|
|
112
|
-
components: { YhSteps, YhStep },
|
|
113
|
-
template: `
|
|
114
|
-
<yh-steps progress-dot :active="0">
|
|
115
|
-
<yh-step title="Step 1" />
|
|
116
|
-
<yh-step title="Step 2" />
|
|
117
|
-
</yh-steps>
|
|
118
|
-
`
|
|
119
|
-
});
|
|
120
|
-
await nextTick();
|
|
121
|
-
expect(wrapper.find(".yh-steps.is-dot").exists()).toBe(true);
|
|
122
|
-
});
|
|
123
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _serverRenderer = require("@vue/server-renderer");
|
|
4
|
-
var _vitest = require("vitest");
|
|
5
|
-
var _vue = require("vue");
|
|
6
|
-
var _submitBar = _interopRequireDefault(require("../src/submit-bar.vue"));
|
|
7
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
-
(0, _vitest.describe)("SubmitBar SSR", () => {
|
|
9
|
-
const props = {
|
|
10
|
-
price: 3050,
|
|
11
|
-
centUnit: true,
|
|
12
|
-
buttonText: "Submit Now"
|
|
13
|
-
};
|
|
14
|
-
(0, _vitest.it)("renders correctly on server", async () => {
|
|
15
|
-
const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_submitBar.default, props));
|
|
16
|
-
(0, _vitest.expect)(html).toContain("yh-submit-bar");
|
|
17
|
-
(0, _vitest.expect)(html).toContain("30");
|
|
18
|
-
(0, _vitest.expect)(html).toContain("50");
|
|
19
|
-
(0, _vitest.expect)(html).toContain("Submit Now");
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { renderToString } from "@vue/server-renderer";
|
|
2
|
-
import { describe, it, expect } from "vitest";
|
|
3
|
-
import { h } from "vue";
|
|
4
|
-
import SubmitBar from "../src/submit-bar.vue";
|
|
5
|
-
describe("SubmitBar SSR", () => {
|
|
6
|
-
const props = {
|
|
7
|
-
price: 3050,
|
|
8
|
-
centUnit: true,
|
|
9
|
-
buttonText: "Submit Now"
|
|
10
|
-
};
|
|
11
|
-
it("renders correctly on server", async () => {
|
|
12
|
-
const html = await renderToString(h(SubmitBar, props));
|
|
13
|
-
expect(html).toContain("yh-submit-bar");
|
|
14
|
-
expect(html).toContain("30");
|
|
15
|
-
expect(html).toContain("50");
|
|
16
|
-
expect(html).toContain("Submit Now");
|
|
17
|
-
});
|
|
18
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _testUtils = require("@vue/test-utils");
|
|
5
|
-
var _submitBar = _interopRequireDefault(require("../src/submit-bar.vue"));
|
|
6
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
-
(0, _vitest.describe)("SubmitBar", () => {
|
|
8
|
-
const props = {
|
|
9
|
-
price: 3050,
|
|
10
|
-
centUnit: true,
|
|
11
|
-
buttonText: "Submit Now",
|
|
12
|
-
showCheckbox: true
|
|
13
|
-
};
|
|
14
|
-
(0, _vitest.it)("renders correctly", () => {
|
|
15
|
-
const wrapper = (0, _testUtils.mount)(_submitBar.default, {
|
|
16
|
-
props
|
|
17
|
-
});
|
|
18
|
-
(0, _vitest.expect)(wrapper.text()).toContain("30");
|
|
19
|
-
(0, _vitest.expect)(wrapper.text()).toContain("50");
|
|
20
|
-
(0, _vitest.expect)(wrapper.text()).toContain("Submit Now");
|
|
21
|
-
});
|
|
22
|
-
(0, _vitest.it)("handles button click", async () => {
|
|
23
|
-
const wrapper = (0, _testUtils.mount)(_submitBar.default, {
|
|
24
|
-
props
|
|
25
|
-
});
|
|
26
|
-
const button = wrapper.find(".yh-submit-bar__btn");
|
|
27
|
-
await button.trigger("click");
|
|
28
|
-
(0, _vitest.expect)(wrapper.emitted("submit")).toBeTruthy();
|
|
29
|
-
});
|
|
30
|
-
(0, _vitest.it)("handles disabled state", async () => {
|
|
31
|
-
const wrapper = (0, _testUtils.mount)(_submitBar.default, {
|
|
32
|
-
props: {
|
|
33
|
-
...props,
|
|
34
|
-
disabled: true
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const button = wrapper.find(".yh-submit-bar__btn");
|
|
38
|
-
await button.trigger("click");
|
|
39
|
-
(0, _vitest.expect)(wrapper.emitted("submit")).toBeFalsy();
|
|
40
|
-
});
|
|
41
|
-
(0, _vitest.it)("handles checkbox toggle", async () => {
|
|
42
|
-
const wrapper = (0, _testUtils.mount)(_submitBar.default, {
|
|
43
|
-
props
|
|
44
|
-
});
|
|
45
|
-
const checkInput = wrapper.find('input[type="checkbox"]');
|
|
46
|
-
await checkInput.setValue(true);
|
|
47
|
-
(0, _vitest.expect)(wrapper.emitted("update:checked")[0]).toEqual([true]);
|
|
48
|
-
(0, _vitest.expect)(wrapper.emitted("check-change")[0]).toEqual([true]);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { mount } from "@vue/test-utils";
|
|
3
|
-
import SubmitBar from "../src/submit-bar.vue";
|
|
4
|
-
describe("SubmitBar", () => {
|
|
5
|
-
const props = {
|
|
6
|
-
price: 3050,
|
|
7
|
-
centUnit: true,
|
|
8
|
-
buttonText: "Submit Now",
|
|
9
|
-
showCheckbox: true
|
|
10
|
-
};
|
|
11
|
-
it("renders correctly", () => {
|
|
12
|
-
const wrapper = mount(SubmitBar, { props });
|
|
13
|
-
expect(wrapper.text()).toContain("30");
|
|
14
|
-
expect(wrapper.text()).toContain("50");
|
|
15
|
-
expect(wrapper.text()).toContain("Submit Now");
|
|
16
|
-
});
|
|
17
|
-
it("handles button click", async () => {
|
|
18
|
-
const wrapper = mount(SubmitBar, { props });
|
|
19
|
-
const button = wrapper.find(".yh-submit-bar__btn");
|
|
20
|
-
await button.trigger("click");
|
|
21
|
-
expect(wrapper.emitted("submit")).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
it("handles disabled state", async () => {
|
|
24
|
-
const wrapper = mount(SubmitBar, { props: { ...props, disabled: true } });
|
|
25
|
-
const button = wrapper.find(".yh-submit-bar__btn");
|
|
26
|
-
await button.trigger("click");
|
|
27
|
-
expect(wrapper.emitted("submit")).toBeFalsy();
|
|
28
|
-
});
|
|
29
|
-
it("handles checkbox toggle", async () => {
|
|
30
|
-
const wrapper = mount(SubmitBar, { props });
|
|
31
|
-
const checkInput = wrapper.find('input[type="checkbox"]');
|
|
32
|
-
await checkInput.setValue(true);
|
|
33
|
-
expect(wrapper.emitted("update:checked")[0]).toEqual([true]);
|
|
34
|
-
expect(wrapper.emitted("check-change")[0]).toEqual([true]);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _vitest = require("vitest");
|
|
4
|
-
var _switch = _interopRequireDefault(require("../src/switch.vue"));
|
|
5
|
-
var _ssr = require("../../__tests__/utils/ssr.cjs");
|
|
6
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
-
(0, _vitest.describe)("YhSwitch SSR", () => {
|
|
8
|
-
(0, _vitest.it)("should render correctly in SSR", async () => {
|
|
9
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
10
|
-
modelValue: false
|
|
11
|
-
});
|
|
12
|
-
(0, _ssr.expectSSRHasClass)(html, "yh-switch");
|
|
13
|
-
});
|
|
14
|
-
(0, _vitest.it)("should render checked state in SSR", async () => {
|
|
15
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
16
|
-
modelValue: true
|
|
17
|
-
});
|
|
18
|
-
(0, _ssr.expectSSRHasClass)(html, "is-checked");
|
|
19
|
-
});
|
|
20
|
-
(0, _vitest.it)("should render unchecked state in SSR", async () => {
|
|
21
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
22
|
-
modelValue: false
|
|
23
|
-
});
|
|
24
|
-
(0, _ssr.expectSSRHasClass)(html, "yh-switch");
|
|
25
|
-
});
|
|
26
|
-
(0, _vitest.it)("should render disabled state in SSR", async () => {
|
|
27
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
28
|
-
modelValue: false,
|
|
29
|
-
disabled: true
|
|
30
|
-
});
|
|
31
|
-
(0, _ssr.expectSSRHasClass)(html, "is-disabled");
|
|
32
|
-
});
|
|
33
|
-
(0, _vitest.it)("should render loading state in SSR", async () => {
|
|
34
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
35
|
-
modelValue: false,
|
|
36
|
-
loading: true
|
|
37
|
-
});
|
|
38
|
-
(0, _ssr.expectSSRHasClass)(html, "is-loading");
|
|
39
|
-
});
|
|
40
|
-
(0, _vitest.it)("should render different sizes in SSR", async () => {
|
|
41
|
-
const sizes = ["small", "default", "large"];
|
|
42
|
-
for (const size of sizes) {
|
|
43
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
44
|
-
modelValue: false,
|
|
45
|
-
size
|
|
46
|
-
});
|
|
47
|
-
if (size !== "default") {
|
|
48
|
-
(0, _ssr.expectSSRHasClass)(html, `yh-switch--${size}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
(0, _vitest.it)("should render with active text in SSR", async () => {
|
|
53
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
54
|
-
modelValue: true,
|
|
55
|
-
activeText: "On"
|
|
56
|
-
});
|
|
57
|
-
(0, _vitest.expect)(html).toContain("On");
|
|
58
|
-
});
|
|
59
|
-
(0, _vitest.it)("should render with inactive text in SSR", async () => {
|
|
60
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
61
|
-
modelValue: false,
|
|
62
|
-
inactiveText: "Off"
|
|
63
|
-
});
|
|
64
|
-
(0, _vitest.expect)(html).toContain("Off");
|
|
65
|
-
});
|
|
66
|
-
(0, _vitest.it)("should render custom colors in SSR", async () => {
|
|
67
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
68
|
-
modelValue: true,
|
|
69
|
-
activeColor: "#13ce66",
|
|
70
|
-
inactiveColor: "#ff4949"
|
|
71
|
-
});
|
|
72
|
-
(0, _ssr.expectSSRHasClass)(html, "yh-switch");
|
|
73
|
-
});
|
|
74
|
-
(0, _vitest.it)("should hydrate without mismatch", async () => {
|
|
75
|
-
const result = await (0, _ssr.testHydration)(_switch.default, {
|
|
76
|
-
modelValue: true,
|
|
77
|
-
activeText: "ON",
|
|
78
|
-
inactiveText: "OFF"
|
|
79
|
-
});
|
|
80
|
-
(0, _vitest.expect)(result.isMatch).toBe(true);
|
|
81
|
-
});
|
|
82
|
-
(0, _vitest.it)("should hydrate with loading state", async () => {
|
|
83
|
-
const result = await (0, _ssr.testHydration)(_switch.default, {
|
|
84
|
-
modelValue: false,
|
|
85
|
-
loading: true
|
|
86
|
-
});
|
|
87
|
-
(0, _vitest.expect)(result.isMatch).toBe(true);
|
|
88
|
-
});
|
|
89
|
-
(0, _vitest.it)("should render with custom active value in SSR", async () => {
|
|
90
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
91
|
-
modelValue: "yes",
|
|
92
|
-
activeValue: "yes",
|
|
93
|
-
inactiveValue: "no"
|
|
94
|
-
});
|
|
95
|
-
(0, _ssr.expectSSRHasClass)(html, "is-checked");
|
|
96
|
-
});
|
|
97
|
-
(0, _vitest.it)("should render with custom inactive value in SSR", async () => {
|
|
98
|
-
const html = await (0, _ssr.renderSSR)(_switch.default, {
|
|
99
|
-
modelValue: "no",
|
|
100
|
-
activeValue: "yes",
|
|
101
|
-
inactiveValue: "no"
|
|
102
|
-
});
|
|
103
|
-
(0, _ssr.expectSSRHasClass)(html, "yh-switch");
|
|
104
|
-
});
|
|
105
|
-
});
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import Switch from "../src/switch.vue";
|
|
3
|
-
import { renderSSR, expectSSRHasClass, testHydration } from "../../__tests__/utils/ssr.mjs";
|
|
4
|
-
describe("YhSwitch SSR", () => {
|
|
5
|
-
it("should render correctly in SSR", async () => {
|
|
6
|
-
const html = await renderSSR(Switch, {
|
|
7
|
-
modelValue: false
|
|
8
|
-
});
|
|
9
|
-
expectSSRHasClass(html, "yh-switch");
|
|
10
|
-
});
|
|
11
|
-
it("should render checked state in SSR", async () => {
|
|
12
|
-
const html = await renderSSR(Switch, {
|
|
13
|
-
modelValue: true
|
|
14
|
-
});
|
|
15
|
-
expectSSRHasClass(html, "is-checked");
|
|
16
|
-
});
|
|
17
|
-
it("should render unchecked state in SSR", async () => {
|
|
18
|
-
const html = await renderSSR(Switch, {
|
|
19
|
-
modelValue: false
|
|
20
|
-
});
|
|
21
|
-
expectSSRHasClass(html, "yh-switch");
|
|
22
|
-
});
|
|
23
|
-
it("should render disabled state in SSR", async () => {
|
|
24
|
-
const html = await renderSSR(Switch, {
|
|
25
|
-
modelValue: false,
|
|
26
|
-
disabled: true
|
|
27
|
-
});
|
|
28
|
-
expectSSRHasClass(html, "is-disabled");
|
|
29
|
-
});
|
|
30
|
-
it("should render loading state in SSR", async () => {
|
|
31
|
-
const html = await renderSSR(Switch, {
|
|
32
|
-
modelValue: false,
|
|
33
|
-
loading: true
|
|
34
|
-
});
|
|
35
|
-
expectSSRHasClass(html, "is-loading");
|
|
36
|
-
});
|
|
37
|
-
it("should render different sizes in SSR", async () => {
|
|
38
|
-
const sizes = ["small", "default", "large"];
|
|
39
|
-
for (const size of sizes) {
|
|
40
|
-
const html = await renderSSR(Switch, {
|
|
41
|
-
modelValue: false,
|
|
42
|
-
size
|
|
43
|
-
});
|
|
44
|
-
if (size !== "default") {
|
|
45
|
-
expectSSRHasClass(html, `yh-switch--${size}`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
it("should render with active text in SSR", async () => {
|
|
50
|
-
const html = await renderSSR(Switch, {
|
|
51
|
-
modelValue: true,
|
|
52
|
-
activeText: "On"
|
|
53
|
-
});
|
|
54
|
-
expect(html).toContain("On");
|
|
55
|
-
});
|
|
56
|
-
it("should render with inactive text in SSR", async () => {
|
|
57
|
-
const html = await renderSSR(Switch, {
|
|
58
|
-
modelValue: false,
|
|
59
|
-
inactiveText: "Off"
|
|
60
|
-
});
|
|
61
|
-
expect(html).toContain("Off");
|
|
62
|
-
});
|
|
63
|
-
it("should render custom colors in SSR", async () => {
|
|
64
|
-
const html = await renderSSR(Switch, {
|
|
65
|
-
modelValue: true,
|
|
66
|
-
activeColor: "#13ce66",
|
|
67
|
-
inactiveColor: "#ff4949"
|
|
68
|
-
});
|
|
69
|
-
expectSSRHasClass(html, "yh-switch");
|
|
70
|
-
});
|
|
71
|
-
it("should hydrate without mismatch", async () => {
|
|
72
|
-
const result = await testHydration(Switch, {
|
|
73
|
-
modelValue: true,
|
|
74
|
-
activeText: "ON",
|
|
75
|
-
inactiveText: "OFF"
|
|
76
|
-
});
|
|
77
|
-
expect(result.isMatch).toBe(true);
|
|
78
|
-
});
|
|
79
|
-
it("should hydrate with loading state", async () => {
|
|
80
|
-
const result = await testHydration(Switch, {
|
|
81
|
-
modelValue: false,
|
|
82
|
-
loading: true
|
|
83
|
-
});
|
|
84
|
-
expect(result.isMatch).toBe(true);
|
|
85
|
-
});
|
|
86
|
-
it("should render with custom active value in SSR", async () => {
|
|
87
|
-
const html = await renderSSR(Switch, {
|
|
88
|
-
modelValue: "yes",
|
|
89
|
-
activeValue: "yes",
|
|
90
|
-
inactiveValue: "no"
|
|
91
|
-
});
|
|
92
|
-
expectSSRHasClass(html, "is-checked");
|
|
93
|
-
});
|
|
94
|
-
it("should render with custom inactive value in SSR", async () => {
|
|
95
|
-
const html = await renderSSR(Switch, {
|
|
96
|
-
modelValue: "no",
|
|
97
|
-
activeValue: "yes",
|
|
98
|
-
inactiveValue: "no"
|
|
99
|
-
});
|
|
100
|
-
expectSSRHasClass(html, "yh-switch");
|
|
101
|
-
});
|
|
102
|
-
});
|