@yh-ui/components 0.1.10 → 0.1.12
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/dist/ai-action-group/__tests__/ai-action-group.ssr.test.cjs +55 -0
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.d.ts +1 -0
- package/dist/ai-action-group/__tests__/ai-action-group.ssr.test.mjs +39 -0
- package/dist/ai-action-group/__tests__/ai-action-group.test.cjs +149 -0
- package/dist/ai-action-group/__tests__/ai-action-group.test.d.ts +1 -0
- package/dist/ai-action-group/__tests__/ai-action-group.test.mjs +104 -0
- package/dist/ai-action-group/index.cjs +26 -0
- package/dist/ai-action-group/index.d.ts +3 -0
- package/dist/ai-action-group/index.mjs +5 -0
- package/dist/ai-action-group/src/ai-action-group.cjs +50 -0
- package/dist/ai-action-group/src/ai-action-group.css +517 -0
- package/dist/ai-action-group/src/ai-action-group.d.ts +55 -0
- package/dist/ai-action-group/src/ai-action-group.d.vue.ts +40 -0
- package/dist/ai-action-group/src/ai-action-group.mjs +44 -0
- package/dist/ai-action-group/src/ai-action-group.vue +602 -0
- package/dist/ai-action-group/src/ai-action-group.vue.d.ts +40 -0
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.cjs +61 -0
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.d.ts +1 -0
- package/dist/ai-agent-card/__tests__/ai-agent-card.ssr.test.mjs +65 -0
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.cjs +70 -0
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.d.ts +1 -0
- package/dist/ai-agent-card/__tests__/ai-agent-card.test.mjs +64 -0
- package/dist/ai-agent-card/index.cjs +26 -0
- package/dist/ai-agent-card/index.d.ts +3 -0
- package/dist/ai-agent-card/index.mjs +5 -0
- package/dist/ai-agent-card/src/ai-agent-card.cjs +74 -0
- package/dist/ai-agent-card/src/ai-agent-card.css +859 -0
- package/dist/ai-agent-card/src/ai-agent-card.d.ts +122 -0
- package/dist/ai-agent-card/src/ai-agent-card.d.vue.ts +62 -0
- package/dist/ai-agent-card/src/ai-agent-card.mjs +68 -0
- package/dist/ai-agent-card/src/ai-agent-card.vue +1029 -0
- package/dist/ai-agent-card/src/ai-agent-card.vue.d.ts +62 -0
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.cjs +73 -0
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.d.ts +1 -0
- package/dist/ai-artifacts/__tests__/ai-artifacts.ssr.test.mjs +68 -0
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.cjs +128 -0
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.d.ts +1 -0
- package/dist/ai-artifacts/__tests__/ai-artifacts.test.mjs +109 -0
- package/dist/ai-artifacts/index.cjs +26 -0
- package/dist/ai-artifacts/index.d.ts +3 -0
- package/dist/ai-artifacts/index.mjs +5 -0
- package/dist/ai-artifacts/src/ai-artifacts.cjs +55 -0
- package/dist/ai-artifacts/src/ai-artifacts.css +633 -0
- package/dist/ai-artifacts/src/ai-artifacts.d.ts +93 -0
- package/dist/ai-artifacts/src/ai-artifacts.d.vue.ts +33 -0
- package/dist/ai-artifacts/src/ai-artifacts.mjs +49 -0
- package/dist/ai-artifacts/src/ai-artifacts.vue +803 -0
- package/dist/ai-artifacts/src/ai-artifacts.vue.d.ts +33 -0
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.cjs +87 -0
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.d.ts +1 -0
- package/dist/ai-bubble/__tests__/ai-bubble.ssr.test.mjs +58 -0
- package/dist/ai-bubble/__tests__/ai-bubble.test.cjs +227 -0
- package/dist/ai-bubble/__tests__/ai-bubble.test.d.ts +1 -0
- package/dist/ai-bubble/__tests__/ai-bubble.test.mjs +123 -0
- package/dist/ai-bubble/index.cjs +26 -0
- package/dist/ai-bubble/index.d.ts +3 -0
- package/dist/ai-bubble/index.mjs +5 -0
- package/dist/ai-bubble/src/ai-bubble.cjs +86 -0
- package/dist/ai-bubble/src/ai-bubble.css +932 -0
- package/dist/ai-bubble/src/ai-bubble.d.ts +126 -0
- package/dist/ai-bubble/src/ai-bubble.d.vue.ts +110 -0
- package/dist/ai-bubble/src/ai-bubble.mjs +80 -0
- package/dist/ai-bubble/src/ai-bubble.vue +1300 -0
- package/dist/ai-bubble/src/ai-bubble.vue.d.ts +110 -0
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.cjs +82 -0
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.d.ts +1 -0
- package/dist/ai-chat/__tests__/ai-chat.ssr.test.mjs +69 -0
- package/dist/ai-chat/__tests__/ai-chat.test.cjs +169 -0
- package/dist/ai-chat/__tests__/ai-chat.test.d.ts +1 -0
- package/dist/ai-chat/__tests__/ai-chat.test.mjs +121 -0
- package/dist/ai-chat/index.cjs +26 -0
- package/dist/ai-chat/index.d.ts +3 -0
- package/dist/ai-chat/index.mjs +5 -0
- package/dist/ai-chat/src/ai-chat.cjs +41 -0
- package/dist/ai-chat/src/ai-chat.css +503 -0
- package/dist/ai-chat/src/ai-chat.d.ts +57 -0
- package/dist/ai-chat/src/ai-chat.d.vue.ts +43 -0
- package/dist/ai-chat/src/ai-chat.mjs +35 -0
- package/dist/ai-chat/src/ai-chat.vue +606 -0
- package/dist/ai-chat/src/ai-chat.vue.d.ts +43 -0
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.cjs +66 -0
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.d.ts +1 -0
- package/dist/ai-code-block/__tests__/ai-code-block.ssr.test.mjs +48 -0
- package/dist/ai-code-block/__tests__/ai-code-block.test.cjs +174 -0
- package/dist/ai-code-block/__tests__/ai-code-block.test.d.ts +1 -0
- package/dist/ai-code-block/__tests__/ai-code-block.test.mjs +108 -0
- package/dist/ai-code-block/index.cjs +26 -0
- package/dist/ai-code-block/index.d.ts +3 -0
- package/dist/ai-code-block/index.mjs +5 -0
- package/dist/ai-code-block/src/ai-code-block.cjs +79 -0
- package/dist/ai-code-block/src/ai-code-block.css +589 -0
- package/dist/ai-code-block/src/ai-code-block.d.ts +76 -0
- package/dist/ai-code-block/src/ai-code-block.d.vue.ts +63 -0
- package/dist/ai-code-block/src/ai-code-block.mjs +73 -0
- package/dist/ai-code-block/src/ai-code-block.vue +706 -0
- package/dist/ai-code-block/src/ai-code-block.vue.d.ts +63 -0
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.cjs +50 -0
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.d.ts +1 -0
- package/dist/ai-conversations/__tests__/ai-conversations.ssr.test.mjs +42 -0
- package/dist/ai-conversations/__tests__/ai-conversations.test.cjs +67 -0
- package/dist/ai-conversations/__tests__/ai-conversations.test.d.ts +1 -0
- package/dist/ai-conversations/__tests__/ai-conversations.test.mjs +51 -0
- package/dist/ai-conversations/index.cjs +26 -0
- package/dist/ai-conversations/index.d.ts +3 -0
- package/dist/ai-conversations/index.mjs +5 -0
- package/dist/ai-conversations/src/ai-conversations.cjs +69 -0
- package/dist/ai-conversations/src/ai-conversations.css +679 -0
- package/dist/ai-conversations/src/ai-conversations.d.ts +67 -0
- package/dist/ai-conversations/src/ai-conversations.d.vue.ts +52 -0
- package/dist/ai-conversations/src/ai-conversations.mjs +63 -0
- package/dist/ai-conversations/src/ai-conversations.vue +949 -0
- package/dist/ai-conversations/src/ai-conversations.vue.d.ts +52 -0
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.cjs +62 -0
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.d.ts +1 -0
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.ssr.test.mjs +50 -0
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.cjs +315 -0
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.d.ts +1 -0
- package/dist/ai-editor-sender/__tests__/ai-editor-sender.test.mjs +226 -0
- package/dist/ai-editor-sender/index.cjs +26 -0
- package/dist/ai-editor-sender/index.d.ts +3 -0
- package/dist/ai-editor-sender/index.mjs +5 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.cjs +66 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.css +566 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.d.ts +70 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.d.vue.ts +70 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.mjs +60 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.vue +713 -0
- package/dist/ai-editor-sender/src/ai-editor-sender.vue.d.ts +70 -0
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.cjs +49 -0
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.d.ts +1 -0
- package/dist/ai-prompts/__tests__/ai-prompts.ssr.test.mjs +41 -0
- package/dist/ai-prompts/__tests__/ai-prompts.test.cjs +54 -0
- package/dist/ai-prompts/__tests__/ai-prompts.test.d.ts +1 -0
- package/dist/ai-prompts/__tests__/ai-prompts.test.mjs +38 -0
- package/dist/ai-prompts/index.cjs +26 -0
- package/dist/ai-prompts/index.d.ts +3 -0
- package/dist/ai-prompts/index.mjs +5 -0
- package/dist/ai-prompts/src/ai-prompts.cjs +42 -0
- package/dist/ai-prompts/src/ai-prompts.css +572 -0
- package/dist/ai-prompts/src/ai-prompts.d.ts +45 -0
- package/dist/ai-prompts/src/ai-prompts.d.vue.ts +44 -0
- package/dist/ai-prompts/src/ai-prompts.mjs +36 -0
- package/dist/ai-prompts/src/ai-prompts.vue +646 -0
- package/dist/ai-prompts/src/ai-prompts.vue.d.ts +44 -0
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.cjs +33 -0
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.d.ts +1 -0
- package/dist/ai-provider/__tests__/ai-provider.ssr.test.mjs +34 -0
- package/dist/ai-provider/__tests__/ai-provider.test.cjs +38 -0
- package/dist/ai-provider/__tests__/ai-provider.test.d.ts +1 -0
- package/dist/ai-provider/__tests__/ai-provider.test.mjs +33 -0
- package/dist/ai-provider/index.cjs +38 -0
- package/dist/ai-provider/index.d.ts +4 -0
- package/dist/ai-provider/index.mjs +6 -0
- package/dist/ai-provider/src/ai-provider.cjs +7 -0
- package/dist/ai-provider/src/ai-provider.d.ts +88 -0
- package/dist/ai-provider/src/ai-provider.d.vue.ts +48 -0
- package/dist/ai-provider/src/ai-provider.mjs +1 -0
- package/dist/ai-provider/src/ai-provider.vue +24 -0
- package/dist/ai-provider/src/ai-provider.vue.d.ts +48 -0
- package/dist/ai-provider/src/use-ai-provider.cjs +11 -0
- package/dist/ai-provider/src/use-ai-provider.d.ts +10 -0
- package/dist/ai-provider/src/use-ai-provider.mjs +5 -0
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.cjs +46 -0
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.d.ts +1 -0
- package/dist/ai-sender/__tests__/ai-sender.ssr.test.mjs +37 -0
- package/dist/ai-sender/__tests__/ai-sender.test.cjs +388 -0
- package/dist/ai-sender/__tests__/ai-sender.test.d.ts +1 -0
- package/dist/ai-sender/__tests__/ai-sender.test.mjs +248 -0
- package/dist/ai-sender/index.cjs +26 -0
- package/dist/ai-sender/index.d.ts +3 -0
- package/dist/ai-sender/index.mjs +5 -0
- package/dist/ai-sender/src/ai-sender.cjs +91 -0
- package/dist/ai-sender/src/ai-sender.css +754 -0
- package/dist/ai-sender/src/ai-sender.d.ts +140 -0
- package/dist/ai-sender/src/ai-sender.d.vue.ts +69 -0
- package/dist/ai-sender/src/ai-sender.mjs +85 -0
- package/dist/ai-sender/src/ai-sender.vue +1032 -0
- package/dist/ai-sender/src/ai-sender.vue.d.ts +69 -0
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.cjs +72 -0
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.d.ts +1 -0
- package/dist/ai-sources/__tests__/ai-sources.ssr.test.mjs +82 -0
- package/dist/ai-sources/__tests__/ai-sources.test.cjs +93 -0
- package/dist/ai-sources/__tests__/ai-sources.test.d.ts +1 -0
- package/dist/ai-sources/__tests__/ai-sources.test.mjs +89 -0
- package/dist/ai-sources/index.cjs +26 -0
- package/dist/ai-sources/index.d.ts +3 -0
- package/dist/ai-sources/index.mjs +5 -0
- package/dist/ai-sources/src/ai-sources.cjs +59 -0
- package/dist/ai-sources/src/ai-sources.css +830 -0
- package/dist/ai-sources/src/ai-sources.d.ts +79 -0
- package/dist/ai-sources/src/ai-sources.d.vue.ts +45 -0
- package/dist/ai-sources/src/ai-sources.mjs +53 -0
- package/dist/ai-sources/src/ai-sources.vue +1109 -0
- package/dist/ai-sources/src/ai-sources.vue.d.ts +45 -0
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.cjs +56 -0
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.d.ts +1 -0
- package/dist/ai-thinking/__tests__/ai-thinking.ssr.test.mjs +42 -0
- package/dist/ai-thinking/__tests__/ai-thinking.test.cjs +151 -0
- package/dist/ai-thinking/__tests__/ai-thinking.test.d.ts +1 -0
- package/dist/ai-thinking/__tests__/ai-thinking.test.mjs +96 -0
- package/dist/ai-thinking/index.cjs +26 -0
- package/dist/ai-thinking/index.d.ts +3 -0
- package/dist/ai-thinking/index.mjs +5 -0
- package/dist/ai-thinking/src/ai-thinking.cjs +44 -0
- package/dist/ai-thinking/src/ai-thinking.css +543 -0
- package/dist/ai-thinking/src/ai-thinking.d.ts +42 -0
- package/dist/ai-thinking/src/ai-thinking.d.vue.ts +33 -0
- package/dist/ai-thinking/src/ai-thinking.mjs +38 -0
- package/dist/ai-thinking/src/ai-thinking.vue +631 -0
- package/dist/ai-thinking/src/ai-thinking.vue.d.ts +33 -0
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.cjs +83 -0
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.d.ts +1 -0
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.ssr.test.mjs +52 -0
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.cjs +204 -0
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.d.ts +1 -0
- package/dist/ai-thought-chain/__tests__/ai-thought-chain.test.mjs +134 -0
- package/dist/ai-thought-chain/index.cjs +26 -0
- package/dist/ai-thought-chain/index.d.ts +3 -0
- package/dist/ai-thought-chain/index.mjs +5 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.cjs +68 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.css +668 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.d.ts +82 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.d.vue.ts +83 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.mjs +62 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.vue +813 -0
- package/dist/ai-thought-chain/src/ai-thought-chain.vue.d.ts +83 -0
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.cjs +32 -0
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.d.ts +1 -0
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.ssr.test.mjs +25 -0
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.cjs +113 -0
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.d.ts +1 -0
- package/dist/ai-voice-trigger/__tests__/ai-voice-trigger.test.mjs +93 -0
- package/dist/ai-voice-trigger/index.cjs +26 -0
- package/dist/ai-voice-trigger/index.d.ts +3 -0
- package/dist/ai-voice-trigger/index.mjs +5 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.cjs +35 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.css +603 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.d.ts +37 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.d.vue.ts +29 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.mjs +29 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.vue +708 -0
- package/dist/ai-voice-trigger/src/ai-voice-trigger.vue.d.ts +29 -0
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.cjs +57 -0
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.d.ts +1 -0
- package/dist/ai-welcome/__tests__/ai-welcome.ssr.test.mjs +39 -0
- package/dist/ai-welcome/__tests__/ai-welcome.test.cjs +169 -0
- package/dist/ai-welcome/__tests__/ai-welcome.test.d.ts +1 -0
- package/dist/ai-welcome/__tests__/ai-welcome.test.mjs +113 -0
- package/dist/ai-welcome/index.cjs +26 -0
- package/dist/ai-welcome/index.d.ts +3 -0
- package/dist/ai-welcome/index.mjs +5 -0
- package/dist/ai-welcome/src/ai-welcome.cjs +56 -0
- package/dist/ai-welcome/src/ai-welcome.css +591 -0
- package/dist/ai-welcome/src/ai-welcome.d.ts +59 -0
- package/dist/ai-welcome/src/ai-welcome.d.vue.ts +51 -0
- package/dist/ai-welcome/src/ai-welcome.mjs +50 -0
- package/dist/ai-welcome/src/ai-welcome.vue +655 -0
- package/dist/ai-welcome/src/ai-welcome.vue.d.ts +51 -0
- package/dist/alert/src/alert.d.vue.ts +5 -5
- package/dist/alert/src/alert.vue.d.ts +5 -5
- package/dist/autocomplete/src/autocomplete.d.vue.ts +2 -2
- package/dist/autocomplete/src/autocomplete.vue.d.ts +2 -2
- package/dist/avatar/index.d.ts +39 -1
- package/dist/back-top/src/back-top.d.vue.ts +1 -1
- package/dist/back-top/src/back-top.vue.d.ts +1 -1
- package/dist/button/index.d.ts +3 -3
- package/dist/button/src/button.css +3 -3
- package/dist/button/src/button.d.vue.ts +1 -1
- package/dist/button/src/button.vue +3 -3
- package/dist/button/src/button.vue.d.ts +1 -1
- package/dist/calendar/src/calendar.d.vue.ts +2 -2
- package/dist/calendar/src/calendar.vue.d.ts +2 -2
- package/dist/cascader/src/cascader-panel.d.vue.ts +2 -2
- package/dist/cascader/src/cascader-panel.vue.d.ts +2 -2
- package/dist/checkbox/index.d.ts +3 -3
- package/dist/checkbox/src/checkbox-group.d.vue.ts +1 -1
- package/dist/checkbox/src/checkbox-group.vue +13 -1
- package/dist/checkbox/src/checkbox-group.vue.d.ts +1 -1
- package/dist/checkbox/src/checkbox.d.ts +12 -0
- package/dist/col/src/col.d.vue.ts +4 -4
- package/dist/col/src/col.vue.d.ts +4 -4
- package/dist/color-picker/src/color-picker.d.vue.ts +1 -1
- package/dist/color-picker/src/color-picker.vue.d.ts +1 -1
- package/dist/component.d.ts +63 -0
- package/dist/date-picker/src/date-picker.d.vue.ts +4 -4
- package/dist/date-picker/src/date-picker.vue.d.ts +4 -4
- package/dist/descriptions/src/description-item.d.vue.ts +1 -1
- package/dist/descriptions/src/description-item.vue.d.ts +1 -1
- package/dist/dialog/src/dialog.d.vue.ts +6 -6
- package/dist/dialog/src/dialog.vue.d.ts +6 -6
- package/dist/drawer/src/drawer.d.vue.ts +3 -3
- package/dist/drawer/src/drawer.vue.d.ts +3 -3
- package/dist/dropdown/src/dropdown-item.d.vue.ts +1 -1
- package/dist/dropdown/src/dropdown-item.vue.d.ts +1 -1
- package/dist/dropdown/src/dropdown.d.vue.ts +8 -8
- package/dist/dropdown/src/dropdown.vue.d.ts +8 -8
- package/dist/form/__tests__/form-schema.test.cjs +477 -24
- package/dist/form/__tests__/form-schema.test.mjs +277 -57
- package/dist/form/index.cjs +12 -0
- package/dist/form/index.d.ts +1 -2
- package/dist/form/index.mjs +1 -0
- package/dist/form/src/form-item.d.vue.ts +2 -1
- package/dist/form/src/form-item.vue +3 -1
- package/dist/form/src/form-item.vue.d.ts +2 -1
- package/dist/form/src/form-schema.cjs +2 -1
- package/dist/form/src/form-schema.d.ts +124 -19
- package/dist/form/src/form-schema.d.vue.ts +69 -19
- package/dist/form/src/form-schema.mjs +2 -1
- package/dist/form/src/form-schema.vue +522 -160
- package/dist/form/src/form-schema.vue.d.ts +69 -19
- package/dist/form/src/form.cjs +7 -0
- package/dist/form/src/form.d.ts +20 -0
- package/dist/form/src/form.d.vue.ts +10 -1
- package/dist/form/src/form.mjs +7 -0
- package/dist/form/src/form.vue +22 -10
- package/dist/form/src/form.vue.d.ts +10 -1
- package/dist/grid/src/grid.d.vue.ts +1 -1
- package/dist/grid/src/grid.vue.d.ts +1 -1
- package/dist/icon/src/icons/index.cjs +122 -2
- package/dist/icon/src/icons/index.d.ts +24 -0
- package/dist/icon/src/icons/index.mjs +145 -1
- package/dist/image/index.d.ts +356 -2
- package/dist/image/src/image-viewer.d.vue.ts +3 -3
- package/dist/image/src/image-viewer.vue.d.ts +3 -3
- package/dist/image/src/image.d.vue.ts +4 -4
- package/dist/image/src/image.vue.d.ts +4 -4
- package/dist/index.cjs +193 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.mjs +49 -1
- package/dist/input/index.d.ts +18 -18
- package/dist/input/src/input.d.vue.ts +6 -6
- package/dist/input/src/input.vue.d.ts +6 -6
- package/dist/input-tag/src/input-tag.d.vue.ts +2 -2
- package/dist/input-tag/src/input-tag.vue.d.ts +2 -2
- package/dist/mention/src/mention.d.vue.ts +8 -8
- package/dist/mention/src/mention.vue.d.ts +8 -8
- package/dist/menu/src/menu.d.vue.ts +4 -4
- package/dist/menu/src/menu.vue.d.ts +4 -4
- package/dist/message/src/message.d.vue.ts +1 -1
- package/dist/message/src/message.vue.d.ts +1 -1
- package/dist/popconfirm/src/popconfirm.d.vue.ts +5 -5
- package/dist/popconfirm/src/popconfirm.vue.d.ts +5 -5
- package/dist/popover/src/popover.d.vue.ts +4 -4
- package/dist/popover/src/popover.vue.d.ts +4 -4
- package/dist/progress/src/progress.d.vue.ts +1 -1
- package/dist/progress/src/progress.vue.d.ts +1 -1
- package/dist/radio/src/radio-group.d.vue.ts +1 -1
- package/dist/radio/src/radio-group.vue +25 -4
- package/dist/radio/src/radio-group.vue.d.ts +1 -1
- package/dist/radio/src/radio.d.ts +12 -0
- package/dist/rate/src/rate.d.vue.ts +1 -1
- package/dist/rate/src/rate.vue.d.ts +1 -1
- package/dist/select/src/select.d.vue.ts +1 -1
- package/dist/select/src/select.vue.d.ts +1 -1
- package/dist/skeleton/src/skeleton.d.vue.ts +1 -1
- package/dist/skeleton/src/skeleton.vue.d.ts +1 -1
- package/dist/slider/src/slider.d.vue.ts +1 -1
- package/dist/slider/src/slider.vue.d.ts +1 -1
- package/dist/steps/src/step.d.vue.ts +1 -1
- package/dist/steps/src/step.vue.d.ts +1 -1
- package/dist/switch/src/switch.d.vue.ts +2 -2
- package/dist/switch/src/switch.vue.d.ts +2 -2
- package/dist/table/__tests__/table.perf.test.cjs +2 -2
- package/dist/table/__tests__/table.perf.test.mjs +2 -2
- package/dist/table/__tests__/table.test.cjs +18 -0
- package/dist/table/__tests__/table.test.mjs +18 -0
- package/dist/table/__tests__/use-table-import.test.cjs +6 -0
- package/dist/table/__tests__/use-table-import.test.mjs +8 -1
- package/dist/table/src/table-column.d.vue.ts +1 -1
- package/dist/table/src/table-column.vue.d.ts +1 -1
- package/dist/table/src/table.d.vue.ts +1 -1
- package/dist/table/src/table.vue.d.ts +1 -1
- package/dist/tabs/src/tab-pane.d.vue.ts +1 -1
- package/dist/tabs/src/tab-pane.vue.d.ts +1 -1
- package/dist/tabs/src/tabs.d.vue.ts +2 -2
- package/dist/tabs/src/tabs.vue.d.ts +2 -2
- package/dist/tooltip/index.d.ts +7 -7
- package/dist/tooltip/src/tooltip.d.vue.ts +7 -7
- package/dist/tooltip/src/tooltip.vue.d.ts +7 -7
- package/dist/tree/src/tree.d.vue.ts +1 -1
- package/dist/tree/src/tree.vue.d.ts +1 -1
- package/dist/tree-select/src/tree-select.d.vue.ts +3 -3
- package/dist/tree-select/src/tree-select.vue.d.ts +3 -3
- package/dist/upload/src/upload.d.vue.ts +1 -1
- package/dist/upload/src/upload.vue.d.ts +1 -1
- package/package.json +8 -5
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useNamespace, useLocale } from "@yh-ui/hooks";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { aiActionGroupProps, aiActionGroupEmits } from "./ai-action-group";
|
|
5
|
+
import { YhIcon } from "../../icon";
|
|
6
|
+
import { YhTooltip } from "../../tooltip";
|
|
7
|
+
import { useComponentTheme } from "@yh-ui/theme";
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: "YhAiActionGroup"
|
|
10
|
+
});
|
|
11
|
+
const props = defineProps(aiActionGroupProps);
|
|
12
|
+
const emit = defineEmits(aiActionGroupEmits);
|
|
13
|
+
const ns = useNamespace("ai-action-group");
|
|
14
|
+
const { t } = useLocale();
|
|
15
|
+
const { themeStyle } = useComponentTheme("ai-action-group", props.themeOverrides);
|
|
16
|
+
const defaultIcons = {
|
|
17
|
+
copy: "copy",
|
|
18
|
+
refresh: "refresh",
|
|
19
|
+
regenerate: "refresh",
|
|
20
|
+
share: "share",
|
|
21
|
+
"thumb-up": "thumb-up",
|
|
22
|
+
"thumb-down": "thumb-down",
|
|
23
|
+
edit: "edit",
|
|
24
|
+
delete: "delete"
|
|
25
|
+
};
|
|
26
|
+
const defaultLabels = computed(() => ({
|
|
27
|
+
copy: t("yh.ai.action.copy"),
|
|
28
|
+
refresh: t("yh.ai.action.regenerate"),
|
|
29
|
+
regenerate: t("yh.ai.action.regenerate"),
|
|
30
|
+
share: t("yh.ai.action.share"),
|
|
31
|
+
"thumb-up": t("yh.ai.action.like"),
|
|
32
|
+
"thumb-down": t("yh.ai.action.dislike"),
|
|
33
|
+
edit: t("yh.ai.action.edit"),
|
|
34
|
+
delete: t("yh.ai.action.delete")
|
|
35
|
+
}));
|
|
36
|
+
const actionItems = computed(() => {
|
|
37
|
+
return props.items.map((item) => {
|
|
38
|
+
if (typeof item === "string") {
|
|
39
|
+
return {
|
|
40
|
+
key: item,
|
|
41
|
+
icon: defaultIcons[item] || "more",
|
|
42
|
+
label: "",
|
|
43
|
+
// 通常泡泡底座不需要文字标签
|
|
44
|
+
tooltip: defaultLabels.value[item] || item
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
...item,
|
|
49
|
+
icon: item.icon || defaultIcons[item.key] || "more"
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
const handleClick = (item) => {
|
|
54
|
+
if (typeof item === "object" && item.disabled) return;
|
|
55
|
+
const key = typeof item === "string" ? item : item.key;
|
|
56
|
+
emit("click", key, item);
|
|
57
|
+
};
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<div :class="[ns.b(), ns.m(direction), ns.m(size)]" :style="themeStyle">
|
|
62
|
+
<template v-for="(item, index) in actionItems" :key="index">
|
|
63
|
+
<div :class="[ns.e('item'), ns.is('disabled', item.disabled)]" @click="handleClick(item)">
|
|
64
|
+
<!-- 使用 Tooltip 装饰 -->
|
|
65
|
+
<YhTooltip v-if="item.tooltip" :content="item.tooltip" placement="top">
|
|
66
|
+
<div :class="ns.e('item-inner')">
|
|
67
|
+
<YhIcon :class="ns.e('item-icon')" :name="item.icon" />
|
|
68
|
+
<span v-if="item.label" :class="ns.e('item-label')">{{ item.label }}</span>
|
|
69
|
+
</div>
|
|
70
|
+
</YhTooltip>
|
|
71
|
+
|
|
72
|
+
<template v-else>
|
|
73
|
+
<YhIcon :class="ns.e('item-icon')" :name="item.icon" />
|
|
74
|
+
<span v-if="item.label" :class="ns.e('item-label')">{{ item.label }}</span>
|
|
75
|
+
</template>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<!-- 为插槽预留尾部 -->
|
|
80
|
+
<slot></slot>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<style>
|
|
85
|
+
@charset "UTF-8";
|
|
86
|
+
/**
|
|
87
|
+
* YH-UI CSS Variables
|
|
88
|
+
* 全局 CSS 变量定义 - 业内最佳主题系统
|
|
89
|
+
*/
|
|
90
|
+
:root {
|
|
91
|
+
/* ==================== 密度/紧凑度系统 ==================== */
|
|
92
|
+
--yh-density-factor: 1;
|
|
93
|
+
--yh-component-size-default: 32px;
|
|
94
|
+
--yh-component-size-small: 24px;
|
|
95
|
+
--yh-component-size-large: 40px;
|
|
96
|
+
--yh-padding-default: 12px 16px;
|
|
97
|
+
--yh-padding-small: 8px 12px;
|
|
98
|
+
--yh-padding-large: 16px 20px;
|
|
99
|
+
--yh-spacing-unit: 8px;
|
|
100
|
+
/* ==================== 基础颜色 ==================== */
|
|
101
|
+
--yh-color-white: #ffffff;
|
|
102
|
+
--yh-color-black: #000000;
|
|
103
|
+
/* ==================== 颜色系统 ==================== */
|
|
104
|
+
/* 主色 */
|
|
105
|
+
--yh-color-primary: #409eff;
|
|
106
|
+
--yh-color-primary-light-1: #53a8ff;
|
|
107
|
+
--yh-color-primary-light-2: #66b1ff;
|
|
108
|
+
--yh-color-primary-light-3: #79bbff;
|
|
109
|
+
--yh-color-primary-light-4: #8cc5ff;
|
|
110
|
+
--yh-color-primary-light-5: #a0cfff;
|
|
111
|
+
--yh-color-primary-light-6: #b3d8ff;
|
|
112
|
+
--yh-color-primary-light-7: #c6e2ff;
|
|
113
|
+
--yh-color-primary-light-8: #d9ecff;
|
|
114
|
+
--yh-color-primary-light-9: #ecf5ff;
|
|
115
|
+
--yh-color-primary-dark-2: #337ecc;
|
|
116
|
+
/* 成功色 */
|
|
117
|
+
--yh-color-success: #67c23a;
|
|
118
|
+
--yh-color-success-light-3: #95d475;
|
|
119
|
+
--yh-color-success-light-5: #b3e19d;
|
|
120
|
+
--yh-color-success-light-7: #d1edc4;
|
|
121
|
+
--yh-color-success-light-9: #f0f9eb;
|
|
122
|
+
--yh-color-success-dark-2: #529b2e;
|
|
123
|
+
/* 警告色 */
|
|
124
|
+
--yh-color-warning: #e6a23c;
|
|
125
|
+
--yh-color-warning-light-3: #eebe77;
|
|
126
|
+
--yh-color-warning-light-5: #f3d19e;
|
|
127
|
+
--yh-color-warning-light-7: #f8e3c5;
|
|
128
|
+
--yh-color-warning-light-9: #fdf6ec;
|
|
129
|
+
--yh-color-warning-dark-2: #b88230;
|
|
130
|
+
/* 危险色 */
|
|
131
|
+
--yh-color-danger: #f56c6c;
|
|
132
|
+
--yh-color-danger-light-3: #f89898;
|
|
133
|
+
--yh-color-danger-light-5: #fab6b6;
|
|
134
|
+
--yh-color-danger-light-7: #fcd3d3;
|
|
135
|
+
--yh-color-danger-light-9: #fef0f0;
|
|
136
|
+
--yh-color-danger-dark-2: #c45656;
|
|
137
|
+
/* 信息色 */
|
|
138
|
+
--yh-color-info: #909399;
|
|
139
|
+
--yh-color-info-light-3: #b1b3b8;
|
|
140
|
+
--yh-color-info-light-5: #c8c9cc;
|
|
141
|
+
--yh-color-info-light-7: #dedfe0;
|
|
142
|
+
--yh-color-info-light-9: #f4f4f5;
|
|
143
|
+
--yh-color-info-dark-2: #73767a;
|
|
144
|
+
/* 文字颜色 */
|
|
145
|
+
--yh-text-color-primary: #303133;
|
|
146
|
+
--yh-text-color-regular: #606266;
|
|
147
|
+
--yh-text-color-secondary: #909399;
|
|
148
|
+
--yh-text-color-placeholder: #a8abb2;
|
|
149
|
+
--yh-text-color-disabled: #c0c4cc;
|
|
150
|
+
/* 边框颜色 */
|
|
151
|
+
--yh-border-color: #dcdfe6;
|
|
152
|
+
--yh-border-color-hover: var(--yh-color-primary);
|
|
153
|
+
--yh-border-color-light: #e4e7ed;
|
|
154
|
+
--yh-border-color-lighter: #ebeef5;
|
|
155
|
+
--yh-border-color-extra-light: #f2f6fc;
|
|
156
|
+
--yh-border-color-dark: #d4d7de;
|
|
157
|
+
--yh-border-color-darker: #cdd0d6;
|
|
158
|
+
/* 填充颜色 */
|
|
159
|
+
--yh-fill-color: #f0f2f5;
|
|
160
|
+
--yh-fill-color-light: #f5f7fa;
|
|
161
|
+
--yh-fill-color-lighter: #fafafa;
|
|
162
|
+
--yh-fill-color-extra-light: #fafcff;
|
|
163
|
+
--yh-fill-color-dark: #ebedf0;
|
|
164
|
+
--yh-fill-color-darker: #e6e8eb;
|
|
165
|
+
--yh-fill-color-blank: #ffffff;
|
|
166
|
+
/* 背景颜色 */
|
|
167
|
+
--yh-bg-color: #ffffff;
|
|
168
|
+
--yh-bg-color-page: #f2f3f5;
|
|
169
|
+
--yh-bg-color-overlay: #ffffff;
|
|
170
|
+
/* ==================== 间距系统 ==================== */
|
|
171
|
+
--yh-spacing-none: 0;
|
|
172
|
+
--yh-spacing-xs: 4px;
|
|
173
|
+
--yh-spacing-sm: 8px;
|
|
174
|
+
--yh-spacing-md: 16px;
|
|
175
|
+
--yh-spacing-lg: 24px;
|
|
176
|
+
--yh-spacing-xl: 32px;
|
|
177
|
+
--yh-spacing-xxl: 48px;
|
|
178
|
+
/* ==================== 圆角系统 ==================== */
|
|
179
|
+
--yh-radius-none: 0;
|
|
180
|
+
--yh-radius-sm: 2px;
|
|
181
|
+
--yh-radius-base: 4px;
|
|
182
|
+
--yh-radius-md: 8px;
|
|
183
|
+
--yh-radius-lg: 12px;
|
|
184
|
+
--yh-radius-xl: 16px;
|
|
185
|
+
--yh-radius-round: 20px;
|
|
186
|
+
--yh-radius-circle: 50%;
|
|
187
|
+
/* ==================== 字体系统 ==================== */
|
|
188
|
+
--yh-font-family:
|
|
189
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
|
|
190
|
+
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
191
|
+
/* 字号 */
|
|
192
|
+
--yh-font-size-xs: 12px;
|
|
193
|
+
--yh-font-size-sm: 13px;
|
|
194
|
+
--yh-font-size-base: 14px;
|
|
195
|
+
--yh-font-size-md: 16px;
|
|
196
|
+
--yh-font-size-lg: 18px;
|
|
197
|
+
--yh-font-size-xl: 20px;
|
|
198
|
+
--yh-font-size-xxl: 24px;
|
|
199
|
+
/* 行高 */
|
|
200
|
+
--yh-line-height-none: 1;
|
|
201
|
+
--yh-line-height-tight: 1.25;
|
|
202
|
+
--yh-line-height-snug: 1.375;
|
|
203
|
+
--yh-line-height-normal: 1.5;
|
|
204
|
+
--yh-line-height-relaxed: 1.625;
|
|
205
|
+
--yh-line-height-loose: 2;
|
|
206
|
+
/* 字重 */
|
|
207
|
+
--yh-font-weight-light: 300;
|
|
208
|
+
--yh-font-weight-normal: 400;
|
|
209
|
+
--yh-font-weight-medium: 500;
|
|
210
|
+
--yh-font-weight-semibold: 600;
|
|
211
|
+
--yh-font-weight-bold: 700;
|
|
212
|
+
/* ==================== 阴影系统 ==================== */
|
|
213
|
+
--yh-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
214
|
+
--yh-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
|
|
215
|
+
--yh-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
216
|
+
--yh-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
|
217
|
+
--yh-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
|
|
218
|
+
/* ==================== 过渡动效 ==================== */
|
|
219
|
+
--yh-duration-fast: 150ms;
|
|
220
|
+
--yh-duration-base: 200ms;
|
|
221
|
+
--yh-duration-slow: 300ms;
|
|
222
|
+
--yh-timing-ease: ease;
|
|
223
|
+
--yh-timing-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
224
|
+
--yh-timing-ease-out: cubic-bezier(0, 0, 0.2, 1);
|
|
225
|
+
--yh-timing-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
226
|
+
--yh-timing-linear: linear;
|
|
227
|
+
--yh-transition-base: all var(--yh-duration-base) var(--yh-timing-ease-in-out);
|
|
228
|
+
--yh-transition-fast: all var(--yh-duration-fast) var(--yh-timing-ease-in-out);
|
|
229
|
+
--yh-transition-slow: all var(--yh-duration-slow) var(--yh-timing-ease-in-out);
|
|
230
|
+
/* ==================== 层级系统 ==================== */
|
|
231
|
+
--yh-z-index-normal: 1;
|
|
232
|
+
--yh-z-index-top: 1000;
|
|
233
|
+
--yh-z-index-popper: 2000;
|
|
234
|
+
--yh-z-index-overlay: 2001;
|
|
235
|
+
--yh-z-index-modal: 2002;
|
|
236
|
+
--yh-z-index-popover: 2003;
|
|
237
|
+
--yh-z-index-tooltip: 2004;
|
|
238
|
+
--yh-z-index-loading: 2005;
|
|
239
|
+
/* ==================== 组件尺寸 ==================== */
|
|
240
|
+
/* Large */
|
|
241
|
+
--yh-component-size-large: 40px;
|
|
242
|
+
--yh-component-size-large-font: 14px;
|
|
243
|
+
--yh-component-size-large-padding: 20px;
|
|
244
|
+
/* Default */
|
|
245
|
+
--yh-component-size-default: 32px;
|
|
246
|
+
--yh-component-size-default-font: 14px;
|
|
247
|
+
--yh-component-size-default-padding: 16px;
|
|
248
|
+
/* Small */
|
|
249
|
+
--yh-component-size-small: 24px;
|
|
250
|
+
--yh-component-size-small-font: 12px;
|
|
251
|
+
--yh-component-size-small-padding: 12px;
|
|
252
|
+
/* ==================== 组件语义化变量 ==================== */
|
|
253
|
+
--yh-border-radius-base: var(--yh-radius-base);
|
|
254
|
+
--yh-border-radius-small: var(--yh-radius-sm);
|
|
255
|
+
--yh-border-radius-round: var(--yh-radius-round);
|
|
256
|
+
/* Message 消息提示 */
|
|
257
|
+
--yh-message-bg-color: var(--yh-bg-color-overlay);
|
|
258
|
+
--yh-message-border-color: var(--yh-border-color-lighter);
|
|
259
|
+
--yh-message-shadow: var(--yh-shadow-lg);
|
|
260
|
+
--yh-message-text-color: var(--yh-text-color-primary);
|
|
261
|
+
--yh-message-close-color: var(--yh-text-color-secondary);
|
|
262
|
+
--yh-message-close-hover-color: var(--yh-text-color-primary);
|
|
263
|
+
/* Notification 通知 */
|
|
264
|
+
--yh-notification-bg-color: var(--yh-bg-color-overlay);
|
|
265
|
+
--yh-notification-border-color: var(--yh-border-color-lighter);
|
|
266
|
+
--yh-notification-shadow: var(--yh-shadow-lg);
|
|
267
|
+
--yh-notification-title-color: var(--yh-text-color-primary);
|
|
268
|
+
--yh-notification-content-color: var(--yh-text-color-regular);
|
|
269
|
+
/* Badge 徽标 */
|
|
270
|
+
--yh-badge-bg-color: var(--yh-color-danger);
|
|
271
|
+
--yh-badge-text-color: #ffffff;
|
|
272
|
+
--yh-badge-border-color: var(--yh-bg-color);
|
|
273
|
+
/* Card 卡片 */
|
|
274
|
+
--yh-card-bg-color: var(--yh-bg-color-overlay);
|
|
275
|
+
--yh-card-border-color: var(--yh-border-color-lighter);
|
|
276
|
+
--yh-card-shadow: var(--yh-shadow-base);
|
|
277
|
+
--yh-card-header-padding: 18px 20px;
|
|
278
|
+
--yh-card-body-padding: 20px;
|
|
279
|
+
/* Input 输入框 */
|
|
280
|
+
--yh-input-bg-color: var(--yh-fill-color-blank);
|
|
281
|
+
--yh-input-text-color: var(--yh-text-color-regular);
|
|
282
|
+
--yh-input-border-color: var(--yh-border-color);
|
|
283
|
+
--yh-input-hover-border-color: var(--yh-color-primary);
|
|
284
|
+
--yh-input-focus-border-color: var(--yh-color-primary);
|
|
285
|
+
--yh-input-placeholder-color: var(--yh-text-color-placeholder);
|
|
286
|
+
--yh-input-icon-color: var(--yh-text-color-placeholder);
|
|
287
|
+
--yh-input-disabled-bg-color: var(--yh-fill-color-light);
|
|
288
|
+
--yh-input-disabled-text-color: var(--yh-text-color-disabled);
|
|
289
|
+
--yh-input-disabled-border-color: var(--yh-border-color-light);
|
|
290
|
+
/* Image 图片 */
|
|
291
|
+
--yh-image-placeholder-bg-color: var(--yh-fill-color-light);
|
|
292
|
+
--yh-image-placeholder-text-color: var(--yh-text-color-placeholder);
|
|
293
|
+
--yh-image-error-bg-color: var(--yh-fill-color-extra-light);
|
|
294
|
+
--yh-image-error-text-color: var(--yh-text-color-placeholder);
|
|
295
|
+
/* Image Viewer 预览器 */
|
|
296
|
+
--yh-image-viewer-mask-bg-color: rgba(0, 0, 0, 0.5);
|
|
297
|
+
--yh-image-viewer-btn-bg-color: var(--yh-text-color-regular);
|
|
298
|
+
--yh-image-viewer-btn-color: #ffffff;
|
|
299
|
+
--yh-image-viewer-btn-hover-bg-color: var(--yh-color-primary);
|
|
300
|
+
/* Calendar 日历 */
|
|
301
|
+
--yh-calendar-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
|
|
302
|
+
--yh-calendar-border-color: rgba(0, 0, 0, 0.06);
|
|
303
|
+
--yh-calendar-border-radius: var(--yh-radius-xl);
|
|
304
|
+
--yh-calendar-header-bg: rgba(255, 255, 255, 0.95);
|
|
305
|
+
--yh-calendar-header-border: rgba(0, 0, 0, 0.04);
|
|
306
|
+
--yh-calendar-header-padding: 18px 22px;
|
|
307
|
+
--yh-calendar-body-padding: 14px 18px 18px;
|
|
308
|
+
/* Calendar 尺寸 */
|
|
309
|
+
--yh-calendar-cell-height: 85px;
|
|
310
|
+
--yh-calendar-cell-height-small: 52px;
|
|
311
|
+
--yh-calendar-cell-height-large: 110px;
|
|
312
|
+
--yh-calendar-cell-radius: 10px;
|
|
313
|
+
--yh-calendar-cell-radius-small: 6px;
|
|
314
|
+
--yh-calendar-cell-radius-large: 12px;
|
|
315
|
+
/* Calendar 颜色 */
|
|
316
|
+
--yh-calendar-primary: var(--yh-color-primary);
|
|
317
|
+
--yh-calendar-primary-light: rgba(59, 130, 246, 0.1);
|
|
318
|
+
--yh-calendar-selected-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
|
|
319
|
+
--yh-calendar-selected-border: rgba(59, 130, 246, 0.4);
|
|
320
|
+
--yh-calendar-today-dot: var(--yh-color-primary);
|
|
321
|
+
--yh-calendar-weekend-color: #f97316;
|
|
322
|
+
--yh-calendar-disabled-color: var(--yh-text-color-disabled);
|
|
323
|
+
--yh-calendar-other-month-opacity: 0.35;
|
|
324
|
+
/* Calendar 假日 */
|
|
325
|
+
--yh-calendar-holiday-color: var(--yh-color-success);
|
|
326
|
+
--yh-calendar-holiday-bg: rgba(16, 185, 129, 0.12);
|
|
327
|
+
--yh-calendar-holiday-border: rgba(16, 185, 129, 0.25);
|
|
328
|
+
--yh-calendar-workday-color: var(--yh-color-warning);
|
|
329
|
+
--yh-calendar-workday-bg: rgba(245, 158, 11, 0.12);
|
|
330
|
+
--yh-calendar-workday-border: rgba(245, 158, 11, 0.25);
|
|
331
|
+
/* Calendar 范围选择 */
|
|
332
|
+
--yh-calendar-range-bg: rgba(59, 130, 246, 0.08);
|
|
333
|
+
--yh-calendar-range-border: rgba(59, 130, 246, 0.2);
|
|
334
|
+
/* Calendar 字体 */
|
|
335
|
+
--yh-calendar-weekday-font-size: var(--yh-font-size-sm);
|
|
336
|
+
--yh-calendar-weekday-color: var(--yh-text-color-secondary);
|
|
337
|
+
--yh-calendar-day-font-size: 15px;
|
|
338
|
+
--yh-calendar-day-color: var(--yh-text-color-primary);
|
|
339
|
+
--yh-calendar-badge-font-size: 9px;
|
|
340
|
+
/* Table 表格 */
|
|
341
|
+
--yh-table-border-color: var(--yh-border-color-lighter);
|
|
342
|
+
--yh-table-header-bg: var(--yh-fill-color-light);
|
|
343
|
+
--yh-table-header-text-color: var(--yh-text-color-primary);
|
|
344
|
+
--yh-table-header-font-weight: var(--yh-font-weight-semibold);
|
|
345
|
+
--yh-table-row-bg: var(--yh-bg-color);
|
|
346
|
+
--yh-table-row-hover-bg: var(--yh-fill-color-light);
|
|
347
|
+
--yh-table-row-stripe-bg: var(--yh-fill-color-lighter);
|
|
348
|
+
--yh-table-row-current-bg: var(--yh-color-primary-light-9);
|
|
349
|
+
--yh-table-row-selected-bg: var(--yh-color-primary-light-8);
|
|
350
|
+
--yh-table-row-success-bg: var(--yh-color-success-light-9);
|
|
351
|
+
--yh-table-row-warning-bg: var(--yh-color-warning-light-9);
|
|
352
|
+
--yh-table-text-color: var(--yh-text-color-regular);
|
|
353
|
+
--yh-table-empty-text-color: var(--yh-text-color-secondary);
|
|
354
|
+
--yh-table-font-size: var(--yh-font-size-base);
|
|
355
|
+
--yh-table-cell-padding: 12px 0;
|
|
356
|
+
--yh-table-cell-spacing: 12px;
|
|
357
|
+
--yh-table-fixed-left-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
|
|
358
|
+
--yh-table-fixed-right-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);
|
|
359
|
+
/* ==================== 边框基础 ==================== */
|
|
360
|
+
--yh-border-width: 1px;
|
|
361
|
+
--yh-border-style: solid;
|
|
362
|
+
--yh-border: var(--yh-border-width) var(--yh-border-style) var(--yh-border-color);
|
|
363
|
+
/* ==================== 断点系统 ==================== */
|
|
364
|
+
--yh-breakpoint-xs: 0;
|
|
365
|
+
--yh-breakpoint-sm: 576px;
|
|
366
|
+
--yh-breakpoint-md: 768px;
|
|
367
|
+
--yh-breakpoint-lg: 992px;
|
|
368
|
+
--yh-breakpoint-xl: 1200px;
|
|
369
|
+
--yh-breakpoint-xxl: 1400px;
|
|
370
|
+
/* ==================== 字体系统扩展 ==================== */
|
|
371
|
+
--yh-font-family-monospace:
|
|
372
|
+
'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
373
|
+
--yh-font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
|
|
374
|
+
/* ==================== 无障碍/聚焦系统 ==================== */
|
|
375
|
+
--yh-focus-ring-color: var(--yh-color-primary);
|
|
376
|
+
--yh-focus-ring-width: 2px;
|
|
377
|
+
--yh-focus-ring-offset: 2px;
|
|
378
|
+
--yh-focus-ring-opacity: 0.2;
|
|
379
|
+
--yh-focus-ring:
|
|
380
|
+
0 0 0 var(--yh-focus-ring-offset) var(--yh-bg-color),
|
|
381
|
+
0 0 0 calc(var(--yh-focus-ring-offset) + var(--yh-focus-ring-width)) var(--yh-focus-ring-color);
|
|
382
|
+
/* 高对比度模式支持 */
|
|
383
|
+
--yh-high-contrast-outline: 2px solid transparent;
|
|
384
|
+
--yh-high-contrast-outline-offset: 2px;
|
|
385
|
+
/* ==================== 滚动条样式 ==================== */
|
|
386
|
+
--yh-scrollbar-width: 6px;
|
|
387
|
+
--yh-scrollbar-thumb-color: var(--yh-text-color-disabled);
|
|
388
|
+
--yh-scrollbar-thumb-hover-color: var(--yh-text-color-secondary);
|
|
389
|
+
--yh-scrollbar-track-color: transparent;
|
|
390
|
+
--yh-scrollbar-thumb-radius: 3px;
|
|
391
|
+
/* ==================== 遮罩层 ==================== */
|
|
392
|
+
--yh-mask-color: rgba(0, 0, 0, 0.5);
|
|
393
|
+
--yh-mask-color-light: rgba(0, 0, 0, 0.3);
|
|
394
|
+
--yh-mask-color-extra-light: rgba(0, 0, 0, 0.1);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* ==================== 暗黑模式 ==================== */
|
|
398
|
+
html.dark {
|
|
399
|
+
--yh-color-primary: #409eff;
|
|
400
|
+
--yh-color-primary-light-3: #3375b9;
|
|
401
|
+
--yh-color-primary-light-5: #2a598a;
|
|
402
|
+
--yh-color-primary-light-7: #213d5b;
|
|
403
|
+
--yh-color-primary-light-9: #18222c;
|
|
404
|
+
--yh-color-primary-dark-2: #66b1ff;
|
|
405
|
+
--yh-color-success: #67c23a;
|
|
406
|
+
--yh-color-success-light-3: #4e8e2f;
|
|
407
|
+
--yh-color-success-light-5: #3e6b27;
|
|
408
|
+
--yh-color-success-light-7: #2d481f;
|
|
409
|
+
--yh-color-success-light-9: #1d2518;
|
|
410
|
+
--yh-color-warning: #e6a23c;
|
|
411
|
+
--yh-color-warning-light-3: #a77730;
|
|
412
|
+
--yh-color-warning-light-5: #7d5b28;
|
|
413
|
+
--yh-color-warning-light-7: #533f20;
|
|
414
|
+
--yh-color-warning-light-9: #292218;
|
|
415
|
+
--yh-color-danger: #f56c6c;
|
|
416
|
+
--yh-color-danger-light-3: #b25252;
|
|
417
|
+
--yh-color-danger-light-5: #854040;
|
|
418
|
+
--yh-color-danger-light-7: #582e2e;
|
|
419
|
+
--yh-color-danger-light-9: #2b1d1d;
|
|
420
|
+
--yh-color-info: #909399;
|
|
421
|
+
--yh-color-info-light-3: #6b6d71;
|
|
422
|
+
--yh-color-info-light-5: #525457;
|
|
423
|
+
--yh-color-info-light-7: #393b3e;
|
|
424
|
+
--yh-color-info-light-9: #202124;
|
|
425
|
+
--yh-text-color-primary: #e5eaf3;
|
|
426
|
+
--yh-text-color-regular: #cfd3dc;
|
|
427
|
+
--yh-text-color-secondary: #a3a6ad;
|
|
428
|
+
--yh-text-color-placeholder: #8d9095;
|
|
429
|
+
--yh-text-color-disabled: #6c6e72;
|
|
430
|
+
--yh-border-color: #4c4d4f;
|
|
431
|
+
--yh-border-color-light: #414243;
|
|
432
|
+
--yh-border-color-lighter: #363637;
|
|
433
|
+
--yh-border-color-extra-light: #2b2b2c;
|
|
434
|
+
--yh-border-color-dark: #58585b;
|
|
435
|
+
--yh-border-color-darker: #636466;
|
|
436
|
+
--yh-fill-color: #303030;
|
|
437
|
+
--yh-fill-color-light: #262727;
|
|
438
|
+
--yh-fill-color-lighter: #1d1d1d;
|
|
439
|
+
--yh-fill-color-extra-light: #191919;
|
|
440
|
+
--yh-fill-color-dark: #39393a;
|
|
441
|
+
--yh-fill-color-darker: #424243;
|
|
442
|
+
--yh-fill-color-blank: transparent;
|
|
443
|
+
--yh-bg-color: #141414;
|
|
444
|
+
--yh-bg-color-page: #0a0a0a;
|
|
445
|
+
--yh-bg-color-overlay: #1d1e1f;
|
|
446
|
+
/* 组件暗色模式覆盖 */
|
|
447
|
+
--yh-message-bg-color: var(--yh-bg-color-overlay);
|
|
448
|
+
--yh-message-border-color: var(--yh-border-color-lighter);
|
|
449
|
+
--yh-notification-bg-color: var(--yh-bg-color-overlay);
|
|
450
|
+
--yh-notification-border-color: var(--yh-border-color-lighter);
|
|
451
|
+
--yh-badge-border-color: var(--yh-bg-color);
|
|
452
|
+
--yh-card-bg-color: var(--yh-bg-color-overlay);
|
|
453
|
+
--yh-card-border-color: var(--yh-border-color-lighter);
|
|
454
|
+
/* Calendar 暗黑模式 */
|
|
455
|
+
--yh-calendar-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
|
|
456
|
+
--yh-calendar-border-color: rgba(255, 255, 255, 0.08);
|
|
457
|
+
--yh-calendar-header-bg: rgba(30, 30, 30, 0.95);
|
|
458
|
+
--yh-calendar-header-border: rgba(255, 255, 255, 0.06);
|
|
459
|
+
--yh-calendar-day-color: var(--yh-text-color-primary);
|
|
460
|
+
--yh-calendar-weekday-color: var(--yh-text-color-secondary);
|
|
461
|
+
--yh-calendar-selected-bg: linear-gradient(
|
|
462
|
+
135deg,
|
|
463
|
+
rgba(59, 130, 246, 0.2) 0%,
|
|
464
|
+
rgba(59, 130, 246, 0.1) 100%
|
|
465
|
+
);
|
|
466
|
+
/* Table 暗黑模式 */
|
|
467
|
+
--yh-table-border-color: var(--yh-border-color-lighter);
|
|
468
|
+
--yh-table-header-bg: var(--yh-fill-color-dark);
|
|
469
|
+
--yh-table-header-text-color: var(--yh-text-color-primary);
|
|
470
|
+
--yh-table-row-bg: var(--yh-bg-color);
|
|
471
|
+
--yh-table-row-hover-bg: var(--yh-fill-color);
|
|
472
|
+
--yh-table-row-stripe-bg: var(--yh-fill-color-light);
|
|
473
|
+
--yh-table-row-current-bg: var(--yh-color-primary-light-9);
|
|
474
|
+
--yh-table-row-selected-bg: var(--yh-color-primary-light-9);
|
|
475
|
+
--yh-table-row-success-bg: var(--yh-color-success-light-9);
|
|
476
|
+
--yh-table-row-warning-bg: var(--yh-color-warning-light-9);
|
|
477
|
+
--yh-table-fixed-left-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.3);
|
|
478
|
+
--yh-table-fixed-right-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.3);
|
|
479
|
+
/* 遮罩层暗黑模式 */
|
|
480
|
+
--yh-mask-color: rgba(0, 0, 0, 0.7);
|
|
481
|
+
--yh-mask-color-light: rgba(0, 0, 0, 0.5);
|
|
482
|
+
--yh-mask-color-extra-light: rgba(0, 0, 0, 0.3);
|
|
483
|
+
/* 滚动条暗黑模式 */
|
|
484
|
+
--yh-scrollbar-thumb-color: var(--yh-fill-color-darker);
|
|
485
|
+
--yh-scrollbar-thumb-hover-color: var(--yh-text-color-placeholder);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/* ==================== 减少动画偏好支持 ==================== */
|
|
489
|
+
@media (prefers-reduced-motion: reduce) {
|
|
490
|
+
:root,
|
|
491
|
+
html.dark {
|
|
492
|
+
--yh-duration-fast: 0ms;
|
|
493
|
+
--yh-duration-base: 0ms;
|
|
494
|
+
--yh-duration-slow: 0ms;
|
|
495
|
+
--yh-transition-base: none;
|
|
496
|
+
--yh-transition-fast: none;
|
|
497
|
+
--yh-transition-slow: none;
|
|
498
|
+
}
|
|
499
|
+
*,
|
|
500
|
+
*::before,
|
|
501
|
+
*::after {
|
|
502
|
+
animation-duration: 0.01ms !important;
|
|
503
|
+
animation-iteration-count: 1 !important;
|
|
504
|
+
transition-duration: 0.01ms !important;
|
|
505
|
+
scroll-behavior: auto !important;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
/* ==================== 高对比度模式支持 ==================== */
|
|
509
|
+
@media (prefers-contrast: high) {
|
|
510
|
+
:root {
|
|
511
|
+
--yh-border-color: #000000;
|
|
512
|
+
--yh-border-color-light: #333333;
|
|
513
|
+
--yh-text-color-primary: #000000;
|
|
514
|
+
--yh-text-color-regular: #1a1a1a;
|
|
515
|
+
--yh-focus-ring-width: 3px;
|
|
516
|
+
--yh-focus-ring-color: #000000;
|
|
517
|
+
}
|
|
518
|
+
html.dark {
|
|
519
|
+
--yh-border-color: #ffffff;
|
|
520
|
+
--yh-border-color-light: #cccccc;
|
|
521
|
+
--yh-text-color-primary: #ffffff;
|
|
522
|
+
--yh-text-color-regular: #e5e5e5;
|
|
523
|
+
--yh-focus-ring-color: #ffffff;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
/* ==================== 强制颜色模式支持 (Windows 高对比度) ==================== */
|
|
527
|
+
@media (forced-colors: active) {
|
|
528
|
+
:root {
|
|
529
|
+
--yh-color-primary: LinkText;
|
|
530
|
+
--yh-border-color: ButtonBorder;
|
|
531
|
+
--yh-bg-color: Canvas;
|
|
532
|
+
--yh-text-color-primary: CanvasText;
|
|
533
|
+
--yh-focus-ring-color: Highlight;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
.yh-ai-action-group {
|
|
537
|
+
--yh-ai-action-gap: 8px;
|
|
538
|
+
--yh-ai-action-icon-size: 16px;
|
|
539
|
+
--yh-ai-action-btn-padding: 4px;
|
|
540
|
+
--yh-ai-action-btn-radius: 6px;
|
|
541
|
+
--yh-ai-action-hover-bg: var(--yh-fill-color-light);
|
|
542
|
+
display: inline-flex;
|
|
543
|
+
gap: var(--yh-ai-action-gap);
|
|
544
|
+
flex-wrap: wrap;
|
|
545
|
+
align-items: center;
|
|
546
|
+
}
|
|
547
|
+
.yh-ai-action-group--vertical {
|
|
548
|
+
flex-direction: column;
|
|
549
|
+
align-items: flex-start;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.yh-ai-action-group__item {
|
|
553
|
+
display: inline-flex;
|
|
554
|
+
align-items: center;
|
|
555
|
+
justify-content: center;
|
|
556
|
+
gap: 4px;
|
|
557
|
+
cursor: pointer;
|
|
558
|
+
transition: all 0.2s;
|
|
559
|
+
border-radius: var(--yh-ai-action-btn-radius);
|
|
560
|
+
color: var(--yh-text-color-secondary);
|
|
561
|
+
padding: var(--yh-ai-action-btn-padding);
|
|
562
|
+
background-color: transparent;
|
|
563
|
+
border: none;
|
|
564
|
+
}
|
|
565
|
+
.yh-ai-action-group__item:hover {
|
|
566
|
+
color: var(--yh-color-primary);
|
|
567
|
+
background-color: var(--yh-ai-action-hover-bg);
|
|
568
|
+
}
|
|
569
|
+
.yh-ai-action-group__item:active {
|
|
570
|
+
transform: scale(0.92);
|
|
571
|
+
}
|
|
572
|
+
.yh-ai-action-group__item.is-disabled {
|
|
573
|
+
cursor: not-allowed;
|
|
574
|
+
opacity: 0.5;
|
|
575
|
+
}
|
|
576
|
+
.yh-ai-action-group__item.is-disabled:hover {
|
|
577
|
+
color: var(--yh-text-color-secondary);
|
|
578
|
+
background-color: transparent;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.yh-ai-action-group__item-icon {
|
|
582
|
+
font-size: var(--yh-ai-action-icon-size);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.yh-ai-action-group__item-label {
|
|
586
|
+
font-size: 12px;
|
|
587
|
+
font-weight: 400;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.yh-ai-action-group {
|
|
591
|
+
/* Variations by size */
|
|
592
|
+
}
|
|
593
|
+
.yh-ai-action-group--small {
|
|
594
|
+
--yh-ai-action-icon-size: 14px;
|
|
595
|
+
--yh-ai-action-gap: 4px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.yh-ai-action-group--large {
|
|
599
|
+
--yh-ai-action-icon-size: 20px;
|
|
600
|
+
--yh-ai-action-gap: 12px;
|
|
601
|
+
}
|
|
602
|
+
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ActionItem } from './ai-action-group';
|
|
2
|
+
declare var __VLS_13: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_13) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
7
|
+
readonly items: {
|
|
8
|
+
readonly type: import("vue").PropType<ActionItem[]>;
|
|
9
|
+
readonly default: () => never[];
|
|
10
|
+
};
|
|
11
|
+
readonly size: {
|
|
12
|
+
readonly type: import("vue").PropType<"small" | "default" | "large">;
|
|
13
|
+
readonly default: "small";
|
|
14
|
+
};
|
|
15
|
+
readonly variant: {
|
|
16
|
+
readonly type: import("vue").PropType<"text" | "ghost" | "outlined">;
|
|
17
|
+
readonly default: "text";
|
|
18
|
+
};
|
|
19
|
+
readonly direction: {
|
|
20
|
+
readonly type: import("vue").PropType<"horizontal" | "vertical">;
|
|
21
|
+
readonly default: "horizontal";
|
|
22
|
+
};
|
|
23
|
+
readonly themeOverrides: {
|
|
24
|
+
readonly type: import("vue").PropType<import("@yh-ui/theme").ComponentThemeVars>;
|
|
25
|
+
readonly default: undefined;
|
|
26
|
+
};
|
|
27
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {
|
|
28
|
+
readonly themeOverrides: import("@yh-ui/theme").ComponentThemeVars;
|
|
29
|
+
readonly size: "small" | "default" | "large";
|
|
30
|
+
readonly direction: "horizontal" | "vertical";
|
|
31
|
+
readonly items: ActionItem[];
|
|
32
|
+
readonly variant: "text" | "ghost" | "outlined";
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
34
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _vitest = require("vitest");
|
|
4
|
+
var _serverRenderer = require("@vue/server-renderer");
|
|
5
|
+
var _vue = require("vue");
|
|
6
|
+
var _aiAgentCard = _interopRequireDefault(require("../src/ai-agent-card.vue"));
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
(0, _vitest.describe)("YhAiAgentCard SSR", () => {
|
|
9
|
+
const mockData = {
|
|
10
|
+
id: "1",
|
|
11
|
+
name: "SSR Agent",
|
|
12
|
+
model: "GPT-SSR",
|
|
13
|
+
description: "Server side rendering test",
|
|
14
|
+
avatar: "robot",
|
|
15
|
+
status: "online"
|
|
16
|
+
};
|
|
17
|
+
(0, _vitest.it)("should render basic structure on server", async () => {
|
|
18
|
+
const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiAgentCard.default, {
|
|
19
|
+
data: mockData
|
|
20
|
+
}));
|
|
21
|
+
(0, _vitest.expect)(html).toContain("yh-ai-agent-card");
|
|
22
|
+
(0, _vitest.expect)(html).toContain("SSR Agent");
|
|
23
|
+
(0, _vitest.expect)(html).toContain("GPT-SSR");
|
|
24
|
+
});
|
|
25
|
+
(0, _vitest.it)("should render horizontal layout on server", async () => {
|
|
26
|
+
const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiAgentCard.default, {
|
|
27
|
+
data: mockData,
|
|
28
|
+
layout: "horizontal"
|
|
29
|
+
}));
|
|
30
|
+
(0, _vitest.expect)(html).toContain("yh-ai-agent-card--horizontal");
|
|
31
|
+
});
|
|
32
|
+
(0, _vitest.it)("should render compact layout on server", async () => {
|
|
33
|
+
const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiAgentCard.default, {
|
|
34
|
+
data: mockData,
|
|
35
|
+
layout: "compact"
|
|
36
|
+
}));
|
|
37
|
+
(0, _vitest.expect)(html).toContain("yh-ai-agent-card--compact");
|
|
38
|
+
});
|
|
39
|
+
(0, _vitest.it)("should render stats on server", async () => {
|
|
40
|
+
const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiAgentCard.default, {
|
|
41
|
+
data: {
|
|
42
|
+
...mockData,
|
|
43
|
+
stats: {
|
|
44
|
+
uses: 1e3,
|
|
45
|
+
rating: 4.8
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
(0, _vitest.expect)(html).toContain("yh-ai-agent-card__stats");
|
|
50
|
+
(0, _vitest.expect)(html).toContain("1.0k");
|
|
51
|
+
(0, _vitest.expect)(html).toContain("4.8");
|
|
52
|
+
});
|
|
53
|
+
(0, _vitest.it)("should render loading state on server", async () => {
|
|
54
|
+
const html = await (0, _serverRenderer.renderToString)((0, _vue.h)(_aiAgentCard.default, {
|
|
55
|
+
data: mockData,
|
|
56
|
+
loading: true
|
|
57
|
+
}));
|
|
58
|
+
(0, _vitest.expect)(html).toContain("is-loading");
|
|
59
|
+
(0, _vitest.expect)(html).toContain("yh-ai-agent-card__skeleton-avatar");
|
|
60
|
+
});
|
|
61
|
+
});
|