@baishuyun/ai-design 1.0.0
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/.storybook/main.ts +29 -0
- package/.storybook/preview.ts +16 -0
- package/.turbo/turbo-build.log +14 -0
- package/CHANGELOG.md +12 -0
- package/components.json +22 -0
- package/debug-storybook.log +88 -0
- package/dist/ai-design.js +20482 -0
- package/dist/ai-design.js.map +1 -0
- package/dist/ai-design.umd.cjs +260 -0
- package/dist/ai-design.umd.cjs.map +1 -0
- package/dist/src/components/abs-fullscreen-gradient-bg.d.ts +10 -0
- package/dist/src/components/abs-fullscreen-gradient-bg.d.ts.map +1 -0
- package/dist/src/components/agent-scroll-selector.d.ts +11 -0
- package/dist/src/components/agent-scroll-selector.d.ts.map +1 -0
- package/dist/src/components/agent-select.d.ts +16 -0
- package/dist/src/components/agent-select.d.ts.map +1 -0
- package/dist/src/components/attachment-part-group.d.ts +16 -0
- package/dist/src/components/attachment-part-group.d.ts.map +1 -0
- package/dist/src/components/attachment-part.d.ts +19 -0
- package/dist/src/components/attachment-part.d.ts.map +1 -0
- package/dist/src/components/attachments-previewer.d.ts +18 -0
- package/dist/src/components/attachments-previewer.d.ts.map +1 -0
- package/dist/src/components/base-button.d.ts +8 -0
- package/dist/src/components/base-button.d.ts.map +1 -0
- package/dist/src/components/border-animation.d.ts +23 -0
- package/dist/src/components/border-animation.d.ts.map +1 -0
- package/dist/src/components/border-color-animation.d.ts +11 -0
- package/dist/src/components/border-color-animation.d.ts.map +1 -0
- package/dist/src/components/bot-avatar-name.d.ts +6 -0
- package/dist/src/components/bot-avatar-name.d.ts.map +1 -0
- package/dist/src/components/bot-icon.d.ts +5 -0
- package/dist/src/components/bot-icon.d.ts.map +1 -0
- package/dist/src/components/bs-entry-select.d.ts +18 -0
- package/dist/src/components/bs-entry-select.d.ts.map +1 -0
- package/dist/src/components/bs-icons.d.ts +75 -0
- package/dist/src/components/bs-icons.d.ts.map +1 -0
- package/dist/src/components/card-field.d.ts +11 -0
- package/dist/src/components/card-field.d.ts.map +1 -0
- package/dist/src/components/card.d.ts +11 -0
- package/dist/src/components/card.d.ts.map +1 -0
- package/dist/src/components/chat-area-header.d.ts +13 -0
- package/dist/src/components/chat-area-header.d.ts.map +1 -0
- package/dist/src/components/circle-checker.d.ts +10 -0
- package/dist/src/components/circle-checker.d.ts.map +1 -0
- package/dist/src/components/collapsible-txt-msg.d.ts +11 -0
- package/dist/src/components/collapsible-txt-msg.d.ts.map +1 -0
- package/dist/src/components/confirm-dialog.d.ts +26 -0
- package/dist/src/components/confirm-dialog.d.ts.map +1 -0
- package/dist/src/components/fake-bot-msg.d.ts +8 -0
- package/dist/src/components/fake-bot-msg.d.ts.map +1 -0
- package/dist/src/components/fields-design-info-table.d.ts +7 -0
- package/dist/src/components/fields-design-info-table.d.ts.map +1 -0
- package/dist/src/components/fields-generating-indicator.d.ts +6 -0
- package/dist/src/components/fields-generating-indicator.d.ts.map +1 -0
- package/dist/src/components/fields-portal.d.ts +8 -0
- package/dist/src/components/fields-portal.d.ts.map +1 -0
- package/dist/src/components/fields-previewer.d.ts +19 -0
- package/dist/src/components/fields-previewer.d.ts.map +1 -0
- package/dist/src/components/font-icon.d.ts +6 -0
- package/dist/src/components/font-icon.d.ts.map +1 -0
- package/dist/src/components/form-info-editor.d.ts +31 -0
- package/dist/src/components/form-info-editor.d.ts.map +1 -0
- package/dist/src/components/formula-tag.d.ts +8 -0
- package/dist/src/components/formula-tag.d.ts.map +1 -0
- package/dist/src/components/generate-animation.d.ts +5 -0
- package/dist/src/components/generate-animation.d.ts.map +1 -0
- package/dist/src/components/icon-btn.d.ts +9 -0
- package/dist/src/components/icon-btn.d.ts.map +1 -0
- package/dist/src/components/img-part.d.ts +10 -0
- package/dist/src/components/img-part.d.ts.map +1 -0
- package/dist/src/components/legacy-slot.d.ts +11 -0
- package/dist/src/components/legacy-slot.d.ts.map +1 -0
- package/dist/src/components/line-checker.d.ts +19 -0
- package/dist/src/components/line-checker.d.ts.map +1 -0
- package/dist/src/components/linear-gradient-border-btn.d.ts +10 -0
- package/dist/src/components/linear-gradient-border-btn.d.ts.map +1 -0
- package/dist/src/components/linear-gradient-color-bg-animation.d.ts +8 -0
- package/dist/src/components/linear-gradient-color-bg-animation.d.ts.map +1 -0
- package/dist/src/components/memoized-markdown.d.ts +5 -0
- package/dist/src/components/memoized-markdown.d.ts.map +1 -0
- package/dist/src/components/message-content.d.ts +6 -0
- package/dist/src/components/message-content.d.ts.map +1 -0
- package/dist/src/components/number-part.d.ts +9 -0
- package/dist/src/components/number-part.d.ts.map +1 -0
- package/dist/src/components/office-container.d.ts +12 -0
- package/dist/src/components/office-container.d.ts.map +1 -0
- package/dist/src/components/option-item.d.ts +9 -0
- package/dist/src/components/option-item.d.ts.map +1 -0
- package/dist/src/components/previewer-header.d.ts +21 -0
- package/dist/src/components/previewer-header.d.ts.map +1 -0
- package/dist/src/components/primary-confirm-btn.d.ts +10 -0
- package/dist/src/components/primary-confirm-btn.d.ts.map +1 -0
- package/dist/src/components/primary-entry-btn.d.ts +9 -0
- package/dist/src/components/primary-entry-btn.d.ts.map +1 -0
- package/dist/src/components/scroll-to-bottom-btn.d.ts +6 -0
- package/dist/src/components/scroll-to-bottom-btn.d.ts.map +1 -0
- package/dist/src/components/split-line.d.ts +5 -0
- package/dist/src/components/split-line.d.ts.map +1 -0
- package/dist/src/components/square-checker.d.ts +15 -0
- package/dist/src/components/square-checker.d.ts.map +1 -0
- package/dist/src/components/tab-radio-group.d.ts +20 -0
- package/dist/src/components/tab-radio-group.d.ts.map +1 -0
- package/dist/src/components/tooltip.d.ts +6 -0
- package/dist/src/components/tooltip.d.ts.map +1 -0
- package/dist/src/components/ui/button.d.ts +12 -0
- package/dist/src/components/ui/button.d.ts.map +1 -0
- package/dist/src/components/ui/dialog.d.ts +24 -0
- package/dist/src/components/ui/dialog.d.ts.map +1 -0
- package/dist/src/components/ui/icons.d.ts +176 -0
- package/dist/src/components/ui/icons.d.ts.map +1 -0
- package/dist/src/components/ui/popover.d.ts +10 -0
- package/dist/src/components/ui/popover.d.ts.map +1 -0
- package/dist/src/components/ui/spinner.d.ts +3 -0
- package/dist/src/components/ui/spinner.d.ts.map +1 -0
- package/dist/src/components/ui/tooltip.d.ts +13 -0
- package/dist/src/components/ui/tooltip.d.ts.map +1 -0
- package/dist/src/components/user-txt-msg-bubble.d.ts +6 -0
- package/dist/src/components/user-txt-msg-bubble.d.ts.map +1 -0
- package/dist/src/components/warning-msg.d.ts +6 -0
- package/dist/src/components/warning-msg.d.ts.map +1 -0
- package/dist/src/const/ui.d.ts +7 -0
- package/dist/src/const/ui.d.ts.map +1 -0
- package/dist/src/hooks/use-resizable-width.d.ts +24 -0
- package/dist/src/hooks/use-resizable-width.d.ts.map +1 -0
- package/dist/src/hooks/use-shadow.d.ts +25 -0
- package/dist/src/hooks/use-shadow.d.ts.map +1 -0
- package/dist/src/index.d.ts +66 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/utils.d.ts +4 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/stories/AbsFullscreenGradientBg.stories.d.ts +17 -0
- package/dist/src/stories/AbsFullscreenGradientBg.stories.d.ts.map +1 -0
- package/dist/src/stories/AgentScrollSelector.stories.d.ts +11 -0
- package/dist/src/stories/AgentScrollSelector.stories.d.ts.map +1 -0
- package/dist/src/stories/AgentSelect.stories.d.ts +14 -0
- package/dist/src/stories/AgentSelect.stories.d.ts.map +1 -0
- package/dist/src/stories/AttachmentPart.stories.d.ts +23 -0
- package/dist/src/stories/AttachmentPart.stories.d.ts.map +1 -0
- package/dist/src/stories/AttachmentPartGroup.stories.d.ts +21 -0
- package/dist/src/stories/AttachmentPartGroup.stories.d.ts.map +1 -0
- package/dist/src/stories/AttachmentsPreviewer.stories.d.ts +20 -0
- package/dist/src/stories/AttachmentsPreviewer.stories.d.ts.map +1 -0
- package/dist/src/stories/BaseButton.stories.d.ts +18 -0
- package/dist/src/stories/BaseButton.stories.d.ts.map +1 -0
- package/dist/src/stories/BorderAnimation.stories.d.ts +21 -0
- package/dist/src/stories/BorderAnimation.stories.d.ts.map +1 -0
- package/dist/src/stories/BorderColorAnimation.stories.d.ts +26 -0
- package/dist/src/stories/BorderColorAnimation.stories.d.ts.map +1 -0
- package/dist/src/stories/BotAvatarAndName.stories.d.ts +18 -0
- package/dist/src/stories/BotAvatarAndName.stories.d.ts.map +1 -0
- package/dist/src/stories/BotIcon.stories.d.ts +17 -0
- package/dist/src/stories/BotIcon.stories.d.ts.map +1 -0
- package/dist/src/stories/BsEntrySelect.stories.d.ts +13 -0
- package/dist/src/stories/BsEntrySelect.stories.d.ts.map +1 -0
- package/dist/src/stories/BsTooltip.stories.d.ts +7 -0
- package/dist/src/stories/BsTooltip.stories.d.ts.map +1 -0
- package/dist/src/stories/Card.stories.d.ts +14 -0
- package/dist/src/stories/Card.stories.d.ts.map +1 -0
- package/dist/src/stories/CardField.stories.d.ts +13 -0
- package/dist/src/stories/CardField.stories.d.ts.map +1 -0
- package/dist/src/stories/ChatAreaHeader.stories.d.ts +14 -0
- package/dist/src/stories/ChatAreaHeader.stories.d.ts.map +1 -0
- package/dist/src/stories/CircleChecker.stories.d.ts +21 -0
- package/dist/src/stories/CircleChecker.stories.d.ts.map +1 -0
- package/dist/src/stories/CollapsibleTextMsg.stories.d.ts +16 -0
- package/dist/src/stories/CollapsibleTextMsg.stories.d.ts.map +1 -0
- package/dist/src/stories/ConfirmDialog.stories.d.ts +61 -0
- package/dist/src/stories/ConfirmDialog.stories.d.ts.map +1 -0
- package/dist/src/stories/FakeBotMsg.stories.d.ts +21 -0
- package/dist/src/stories/FakeBotMsg.stories.d.ts.map +1 -0
- package/dist/src/stories/FormInfoEditor.stories.d.ts +15 -0
- package/dist/src/stories/FormInfoEditor.stories.d.ts.map +1 -0
- package/dist/src/stories/FormulaTag.stories.d.ts +37 -0
- package/dist/src/stories/FormulaTag.stories.d.ts.map +1 -0
- package/dist/src/stories/GenerateAnimation.stories.d.ts +17 -0
- package/dist/src/stories/GenerateAnimation.stories.d.ts.map +1 -0
- package/dist/src/stories/IconBtn.stories.d.ts +15 -0
- package/dist/src/stories/IconBtn.stories.d.ts.map +1 -0
- package/dist/src/stories/IconLib.d.ts +12 -0
- package/dist/src/stories/IconLib.d.ts.map +1 -0
- package/dist/src/stories/Icons.stories.d.ts +24 -0
- package/dist/src/stories/Icons.stories.d.ts.map +1 -0
- package/dist/src/stories/ImgMsgPart.stories.d.ts +20 -0
- package/dist/src/stories/ImgMsgPart.stories.d.ts.map +1 -0
- package/dist/src/stories/LegacySlot.stories.d.ts +16 -0
- package/dist/src/stories/LegacySlot.stories.d.ts.map +1 -0
- package/dist/src/stories/LineChecker.stories.d.ts +23 -0
- package/dist/src/stories/LineChecker.stories.d.ts.map +1 -0
- package/dist/src/stories/LinearGradientBorderBtn.stories.d.ts +22 -0
- package/dist/src/stories/LinearGradientBorderBtn.stories.d.ts.map +1 -0
- package/dist/src/stories/LinearGradientColorBgAnimation.stories.d.ts +23 -0
- package/dist/src/stories/LinearGradientColorBgAnimation.stories.d.ts.map +1 -0
- package/dist/src/stories/MemoizedMarkdown.stories.d.ts +23 -0
- package/dist/src/stories/MemoizedMarkdown.stories.d.ts.map +1 -0
- package/dist/src/stories/MessageContent.stories.d.ts +16 -0
- package/dist/src/stories/MessageContent.stories.d.ts.map +1 -0
- package/dist/src/stories/NumbersMsgPart.stories.d.ts +19 -0
- package/dist/src/stories/NumbersMsgPart.stories.d.ts.map +1 -0
- package/dist/src/stories/OfficeContainer.stories.d.ts +8 -0
- package/dist/src/stories/OfficeContainer.stories.d.ts.map +1 -0
- package/dist/src/stories/OptionItem.stories.d.ts +20 -0
- package/dist/src/stories/OptionItem.stories.d.ts.map +1 -0
- package/dist/src/stories/PreviewerHeader.stories.d.ts +12 -0
- package/dist/src/stories/PreviewerHeader.stories.d.ts.map +1 -0
- package/dist/src/stories/PrimaryConfirmBtn.stories.d.ts +19 -0
- package/dist/src/stories/PrimaryConfirmBtn.stories.d.ts.map +1 -0
- package/dist/src/stories/PrimaryEntryBtn.stories.d.ts +26 -0
- package/dist/src/stories/PrimaryEntryBtn.stories.d.ts.map +1 -0
- package/dist/src/stories/ScrollToBottom.stories.d.ts +15 -0
- package/dist/src/stories/ScrollToBottom.stories.d.ts.map +1 -0
- package/dist/src/stories/SplitLine.stories.d.ts +9 -0
- package/dist/src/stories/SplitLine.stories.d.ts.map +1 -0
- package/dist/src/stories/SquareChecker.stories.d.ts +26 -0
- package/dist/src/stories/SquareChecker.stories.d.ts.map +1 -0
- package/dist/src/stories/TabRadioGroup.stories.d.ts +18 -0
- package/dist/src/stories/TabRadioGroup.stories.d.ts.map +1 -0
- package/dist/src/stories/UserTextMsgBubble.stories.d.ts +14 -0
- package/dist/src/stories/UserTextMsgBubble.stories.d.ts.map +1 -0
- package/dist/src/stories/WarningMessage.stories.d.ts +16 -0
- package/dist/src/stories/WarningMessage.stories.d.ts.map +1 -0
- package/dist/src/stories/fields-design-info-table.stories.d.ts +14 -0
- package/dist/src/stories/fields-design-info-table.stories.d.ts.map +1 -0
- package/dist/src/stories/fields-generating.stories.d.ts +20 -0
- package/dist/src/stories/fields-generating.stories.d.ts.map +1 -0
- package/dist/src/stories/fields-previewer.stories.d.ts +19 -0
- package/dist/src/stories/fields-previewer.stories.d.ts.map +1 -0
- package/dist/src/types.d.ts +8 -0
- package/dist/src/types.d.ts.map +1 -0
- package/package.json +80 -0
- package/src/components/abs-fullscreen-gradient-bg.tsx +35 -0
- package/src/components/agent-scroll-selector.tsx +181 -0
- package/src/components/agent-select.tsx +149 -0
- package/src/components/attachment-part-group.tsx +35 -0
- package/src/components/attachment-part.tsx +179 -0
- package/src/components/attachments-previewer.tsx +324 -0
- package/src/components/base-button.tsx +49 -0
- package/src/components/border-animation.tsx +107 -0
- package/src/components/border-color-animation.tsx +66 -0
- package/src/components/bot-avatar-name.tsx +36 -0
- package/src/components/bot-icon.tsx +23 -0
- package/src/components/bs-entry-select.tsx +724 -0
- package/src/components/bs-icons.tsx +1201 -0
- package/src/components/card-field.tsx +23 -0
- package/src/components/card.tsx +36 -0
- package/src/components/chat-area-header.tsx +65 -0
- package/src/components/circle-checker.tsx +66 -0
- package/src/components/collapsible-txt-msg.tsx +63 -0
- package/src/components/confirm-dialog.tsx +139 -0
- package/src/components/fake-bot-msg.tsx +49 -0
- package/src/components/fields-design-info-table.tsx +160 -0
- package/src/components/fields-generating-indicator.tsx +95 -0
- package/src/components/fields-portal.tsx +18 -0
- package/src/components/fields-previewer.tsx +216 -0
- package/src/components/font-icon.tsx +17 -0
- package/src/components/form-info-editor.tsx +253 -0
- package/src/components/formula-tag.tsx +32 -0
- package/src/components/generate-animation.tsx +56 -0
- package/src/components/icon-btn.tsx +43 -0
- package/src/components/img-part.tsx +27 -0
- package/src/components/legacy-slot.tsx +103 -0
- package/src/components/line-checker.tsx +160 -0
- package/src/components/linear-gradient-border-btn.tsx +48 -0
- package/src/components/linear-gradient-color-bg-animation.tsx +103 -0
- package/src/components/memoized-markdown.tsx +32 -0
- package/src/components/message-content.tsx +21 -0
- package/src/components/number-part.tsx +46 -0
- package/src/components/office-container.tsx +83 -0
- package/src/components/option-item.tsx +28 -0
- package/src/components/previewer-header.tsx +270 -0
- package/src/components/primary-confirm-btn.tsx +58 -0
- package/src/components/primary-entry-btn.tsx +48 -0
- package/src/components/scroll-to-bottom-btn.tsx +28 -0
- package/src/components/split-line.tsx +9 -0
- package/src/components/square-checker.tsx +87 -0
- package/src/components/tab-radio-group.tsx +83 -0
- package/src/components/tooltip.tsx +53 -0
- package/src/components/ui/button.tsx +51 -0
- package/src/components/ui/dialog.tsx +104 -0
- package/src/components/ui/icons.tsx +1267 -0
- package/src/components/ui/popover.tsx +50 -0
- package/src/components/ui/spinner.tsx +17 -0
- package/src/components/ui/tooltip.tsx +53 -0
- package/src/components/user-txt-msg-bubble.tsx +19 -0
- package/src/components/warning-msg.tsx +27 -0
- package/src/const/ui.ts +52 -0
- package/src/hooks/use-resizable-width.ts +92 -0
- package/src/hooks/use-shadow.ts +127 -0
- package/src/index.ts +76 -0
- package/src/lib/utils.ts +52 -0
- package/src/stories/AbsFullscreenGradientBg.stories.tsx +36 -0
- package/src/stories/AgentScrollSelector.stories.tsx +95 -0
- package/src/stories/AgentSelect.stories.tsx +134 -0
- package/src/stories/AttachmentPart.stories.tsx +122 -0
- package/src/stories/AttachmentPartGroup.stories.tsx +152 -0
- package/src/stories/AttachmentsPreviewer.stories.tsx +306 -0
- package/src/stories/BaseButton.stories.tsx +33 -0
- package/src/stories/BorderAnimation.stories.tsx +116 -0
- package/src/stories/BorderColorAnimation.stories.tsx +63 -0
- package/src/stories/BotAvatarAndName.stories.ts +24 -0
- package/src/stories/BotIcon.stories.ts +22 -0
- package/src/stories/BsEntrySelect.stories.tsx +261 -0
- package/src/stories/BsTooltip.stories.tsx +32 -0
- package/src/stories/Card.stories.tsx +28 -0
- package/src/stories/CardField.stories.tsx +87 -0
- package/src/stories/ChatAreaHeader.stories.ts +26 -0
- package/src/stories/CircleChecker.stories.tsx +89 -0
- package/src/stories/CollapsibleTextMsg.stories.ts +44 -0
- package/src/stories/ConfirmDialog.stories.tsx +123 -0
- package/src/stories/FakeBotMsg.stories.tsx +36 -0
- package/src/stories/FormInfoEditor.stories.tsx +173 -0
- package/src/stories/FormulaTag.stories.tsx +68 -0
- package/src/stories/GenerateAnimation.stories.ts +20 -0
- package/src/stories/IconBtn.stories.tsx +32 -0
- package/src/stories/IconLib.tsx +45 -0
- package/src/stories/Icons.stories.ts +22 -0
- package/src/stories/ImgMsgPart.stories.tsx +42 -0
- package/src/stories/LegacySlot.stories.tsx +56 -0
- package/src/stories/LineChecker.stories.tsx +134 -0
- package/src/stories/LinearGradientBorderBtn.stories.tsx +86 -0
- package/src/stories/LinearGradientColorBgAnimation.stories.tsx +60 -0
- package/src/stories/MemoizedMarkdown.stories.tsx +102 -0
- package/src/stories/MessageContent.stories.tsx +36 -0
- package/src/stories/NumbersMsgPart.stories.tsx +42 -0
- package/src/stories/OfficeContainer.stories.tsx +82 -0
- package/src/stories/OptionItem.stories.tsx +77 -0
- package/src/stories/PreviewerHeader.stories.tsx +91 -0
- package/src/stories/PrimaryConfirmBtn.stories.tsx +60 -0
- package/src/stories/PrimaryEntryBtn.stories.tsx +74 -0
- package/src/stories/ScrollToBottom.stories.tsx +24 -0
- package/src/stories/SplitLine.stories.tsx +40 -0
- package/src/stories/SquareChecker.stories.tsx +96 -0
- package/src/stories/TabRadioGroup.stories.tsx +84 -0
- package/src/stories/UserTextMsgBubble.stories.ts +24 -0
- package/src/stories/WarningMessage.stories.tsx +23 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/demo.css +539 -0
- package/src/stories/assets/demo_index.html +7988 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/iconfont.css +1377 -0
- package/src/stories/assets/iconfont.eot +0 -0
- package/src/stories/assets/iconfont.json +2382 -0
- package/src/stories/assets/iconfont.svg +697 -0
- package/src/stories/assets/iconfont.ttf +0 -0
- package/src/stories/assets/iconfont.woff +0 -0
- package/src/stories/assets/iconfont.woff2 +0 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/fields-design-info-table.stories.tsx +203 -0
- package/src/stories/fields-generating.stories.tsx +41 -0
- package/src/stories/fields-previewer.stories.tsx +77 -0
- package/src/style.css +223 -0
- package/src/types.ts +8 -0
- package/tsconfig.json +12 -0
- package/vite.config.ts +42 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
|
|
3
|
+
import { FakeBotMessage } from "../components/fake-bot-msg";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Example/Chat/FakeBotMessage",
|
|
7
|
+
component: FakeBotMessage,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
},
|
|
12
|
+
args: {},
|
|
13
|
+
} satisfies Meta<typeof FakeBotMessage>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
children: "这是一条模拟的 AI 助手回复消息",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const Headless: Story = {
|
|
25
|
+
args: {
|
|
26
|
+
headless: true,
|
|
27
|
+
children: "无头像模式的 AI 助手回复消息",
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithLongContent: Story = {
|
|
32
|
+
args: {
|
|
33
|
+
children:
|
|
34
|
+
"这是一条比较长的模拟 AI 助手回复消息,用于测试组件在长文本场景下的显示效果。AI 助手可能会返回较长的文本内容,需要确保排版和换行都正确显示。",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
import { FormInfoEditor, FormIconOption } from '../components/form-info-editor';
|
|
5
|
+
import { FORM_ICON_OPTIONS } from '../const/ui';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof FormInfoEditor> = {
|
|
8
|
+
title: 'Example/Chat/FormInfoEditor',
|
|
9
|
+
component: FormInfoEditor,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
name: '供应商管理表',
|
|
16
|
+
},
|
|
17
|
+
decorators: [
|
|
18
|
+
(Story) => (
|
|
19
|
+
<div className="w-[328px]">
|
|
20
|
+
<Story />
|
|
21
|
+
</div>
|
|
22
|
+
),
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
// Default collapsed state
|
|
30
|
+
export const Default: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
name: '供应商管理表',
|
|
33
|
+
selectedIcon: FORM_ICON_OPTIONS[0],
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// Expanded edit state
|
|
38
|
+
export const Expanded: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
name: '供应商管理表',
|
|
41
|
+
expanded: true,
|
|
42
|
+
selectedIcon: FORM_ICON_OPTIONS[0],
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// With icon options in expanded state (using all 36 form icons)
|
|
47
|
+
export const WithIconOptions: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
name: '供应商管理表',
|
|
50
|
+
expanded: true,
|
|
51
|
+
iconOptions: FORM_ICON_OPTIONS,
|
|
52
|
+
selectedIcon: FORM_ICON_OPTIONS[20],
|
|
53
|
+
},
|
|
54
|
+
decorators: [
|
|
55
|
+
(Story) => (
|
|
56
|
+
<div className="w-[360px]">
|
|
57
|
+
<Story />
|
|
58
|
+
</div>
|
|
59
|
+
),
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// Interactive example with state management
|
|
64
|
+
const InteractiveTemplate = () => {
|
|
65
|
+
const [name, setName] = useState('供应商管理表');
|
|
66
|
+
const [expanded, setExpanded] = useState(false);
|
|
67
|
+
const [selectedIcon, setSelectedIcon] = useState<FormIconOption>(FORM_ICON_OPTIONS[0]);
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<FormInfoEditor
|
|
71
|
+
name={name}
|
|
72
|
+
onNameChange={setName}
|
|
73
|
+
expanded={expanded}
|
|
74
|
+
onExpandedChange={setExpanded}
|
|
75
|
+
iconOptions={FORM_ICON_OPTIONS}
|
|
76
|
+
selectedIcon={selectedIcon}
|
|
77
|
+
onIconChange={setSelectedIcon}
|
|
78
|
+
onConfirm={() => {
|
|
79
|
+
alert(`表单名称: ${name}\n图标: ${selectedIcon.label}`);
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export const Interactive: Story = {
|
|
86
|
+
render: () => <InteractiveTemplate />,
|
|
87
|
+
decorators: [
|
|
88
|
+
(Story) => (
|
|
89
|
+
<div className="w-[360px]">
|
|
90
|
+
<Story />
|
|
91
|
+
</div>
|
|
92
|
+
),
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// Long form name - test ellipsis
|
|
97
|
+
export const LongName: Story = {
|
|
98
|
+
args: {
|
|
99
|
+
name: '这是一个很长的表单名称用于测试文本溢出情况显示省略号',
|
|
100
|
+
selectedIcon: FORM_ICON_OPTIONS[5],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// Custom width
|
|
105
|
+
export const CustomWidth: Story = {
|
|
106
|
+
args: {
|
|
107
|
+
name: '供应商管理表',
|
|
108
|
+
className: 'w-[400px]',
|
|
109
|
+
selectedIcon: FORM_ICON_OPTIONS[0],
|
|
110
|
+
},
|
|
111
|
+
decorators: [
|
|
112
|
+
(Story) => (
|
|
113
|
+
<div className="w-[420px]">
|
|
114
|
+
<Story />
|
|
115
|
+
</div>
|
|
116
|
+
),
|
|
117
|
+
],
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// Expanded with long name
|
|
121
|
+
export const ExpandedLongName: Story = {
|
|
122
|
+
args: {
|
|
123
|
+
name: '这是一个很长的表单名称用于测试文本溢出情况',
|
|
124
|
+
expanded: true,
|
|
125
|
+
iconOptions: FORM_ICON_OPTIONS.slice(0, 18), // Show 18 icons (3 rows)
|
|
126
|
+
selectedIcon: FORM_ICON_OPTIONS[0],
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// Empty name
|
|
131
|
+
export const EmptyName: Story = {
|
|
132
|
+
args: {
|
|
133
|
+
name: '',
|
|
134
|
+
expanded: true,
|
|
135
|
+
selectedIcon: FORM_ICON_OPTIONS[0],
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// Side by side comparison
|
|
140
|
+
export const SideBySide: Story = {
|
|
141
|
+
render: () => (
|
|
142
|
+
<div className="flex flex-col gap-4 w-[328px]">
|
|
143
|
+
<div>
|
|
144
|
+
<p className="text-sm text-gray-500 mb-2">默认状态 (收起)</p>
|
|
145
|
+
<FormInfoEditor name="供应商管理表" expanded={false} selectedIcon={FORM_ICON_OPTIONS[0]} />
|
|
146
|
+
</div>
|
|
147
|
+
<div>
|
|
148
|
+
<p className="text-sm text-gray-500 mb-2">长名称 (带省略号)</p>
|
|
149
|
+
<FormInfoEditor
|
|
150
|
+
name="这是一个超长的表单名称用于测试省略号效果"
|
|
151
|
+
expanded={false}
|
|
152
|
+
selectedIcon={FORM_ICON_OPTIONS[10]}
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
<div>
|
|
156
|
+
<p className="text-sm text-gray-500 mb-2">展开状态 (编辑)</p>
|
|
157
|
+
<FormInfoEditor
|
|
158
|
+
name="供应商管理表"
|
|
159
|
+
expanded={true}
|
|
160
|
+
iconOptions={FORM_ICON_OPTIONS}
|
|
161
|
+
selectedIcon={FORM_ICON_OPTIONS[5]}
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
),
|
|
166
|
+
decorators: [
|
|
167
|
+
(Story) => (
|
|
168
|
+
<div className="w-[380px]">
|
|
169
|
+
<Story />
|
|
170
|
+
</div>
|
|
171
|
+
),
|
|
172
|
+
],
|
|
173
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { FormulaTag } from '../components/formula-tag';
|
|
4
|
+
import { type FormulaOp, FORMULA_OP_LABEL } from '@baishuyun/types';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Example/Chat/FormulaTag',
|
|
8
|
+
component: FormulaTag,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
type: {
|
|
15
|
+
control: 'select',
|
|
16
|
+
options: Object.keys(FORMULA_OP_LABEL) as FormulaOp[],
|
|
17
|
+
description: '统计方式',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
type: 'sum',
|
|
22
|
+
},
|
|
23
|
+
} satisfies Meta<typeof FormulaTag>;
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
|
|
29
|
+
/** 求和 – #3767F1 */
|
|
30
|
+
export const Sum: Story = {
|
|
31
|
+
args: { type: 'sum' },
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** 最大值 – #F06648 */
|
|
35
|
+
export const Max: Story = {
|
|
36
|
+
args: { type: 'max' },
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** 最小值 – #4ACC8C */
|
|
40
|
+
export const Min: Story = {
|
|
41
|
+
args: { type: 'min' },
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** 平均 – #4AC0EC */
|
|
45
|
+
export const Average: Story = {
|
|
46
|
+
args: { type: 'average' },
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** 计数 – #9362CE */
|
|
50
|
+
export const Count: Story = {
|
|
51
|
+
args: { type: 'count' },
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** 去重计数 – #F168B6 */
|
|
55
|
+
export const CountDistinct: Story = {
|
|
56
|
+
args: { type: 'countDistinct' },
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** 所有统计方式一览 */
|
|
60
|
+
export const AllTypes: Story = {
|
|
61
|
+
render: () => (
|
|
62
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
63
|
+
{(Object.keys(FORMULA_OP_LABEL) as FormulaOp[]).map((op) => (
|
|
64
|
+
<FormulaTag key={op} type={op} />
|
|
65
|
+
))}
|
|
66
|
+
</div>
|
|
67
|
+
),
|
|
68
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
|
|
3
|
+
import { GenerateAnimation } from "../components/generate-animation";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Example/Animation/GenerateAnimation",
|
|
7
|
+
component: GenerateAnimation,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
},
|
|
12
|
+
args: {},
|
|
13
|
+
} satisfies Meta<typeof GenerateAnimation>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
args: {},
|
|
20
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { IconBtn } from '../components/icon-btn';
|
|
4
|
+
import { DockIcon } from '../components/bs-icons';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: 'Example/Button/IconBtn',
|
|
8
|
+
component: IconBtn,
|
|
9
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
13
|
+
layout: 'centered',
|
|
14
|
+
},
|
|
15
|
+
args: {},
|
|
16
|
+
} satisfies Meta<typeof IconBtn>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
export const Base: Story = {
|
|
22
|
+
args: {
|
|
23
|
+
icon: <DockIcon />,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Rounded: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
icon: <DockIcon />,
|
|
30
|
+
rounded: true,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Icons from '../components/bs-icons';
|
|
2
|
+
|
|
3
|
+
import { IconBtn } from '../components/icon-btn';
|
|
4
|
+
import { copyTextToClipboard } from '../lib/utils';
|
|
5
|
+
|
|
6
|
+
// 在 Icon.stories.jsx 中添加
|
|
7
|
+
export const IconLibrary = () => {
|
|
8
|
+
// 定义所有图标列表
|
|
9
|
+
const icons = Object.entries(Icons).map(([name, IconComp]) => ({
|
|
10
|
+
name,
|
|
11
|
+
icon: IconComp,
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
style={{
|
|
17
|
+
display: 'grid',
|
|
18
|
+
gridTemplateColumns: 'repeat(20, 20px)',
|
|
19
|
+
gridTemplateRows: 'repeat(20, 20px)',
|
|
20
|
+
gap: '10px',
|
|
21
|
+
padding: '10px',
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
{icons.map((item) => {
|
|
25
|
+
const Icon = item.icon;
|
|
26
|
+
return (
|
|
27
|
+
<IconBtn
|
|
28
|
+
icon={<Icon />}
|
|
29
|
+
onClick={async () => {
|
|
30
|
+
await copyTextToClipboard(`<${item.name} />`);
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
})}
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
IconLibrary.storyName = '图标库';
|
|
39
|
+
IconLibrary.parameters = {
|
|
40
|
+
docs: {
|
|
41
|
+
description: {
|
|
42
|
+
story: '展示所有可用的 SVG 图标,方便查阅和使用',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { IconLibrary } from './IconLib';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Example/Icons/BsIcon Library',
|
|
7
|
+
component: IconLibrary,
|
|
8
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
parameters: {
|
|
11
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
args: {},
|
|
15
|
+
} satisfies Meta<typeof IconLibrary>;
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
export const Base: Story = {
|
|
21
|
+
args: {},
|
|
22
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { ImgMsgPart } from '../components/img-part';
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'Example/Chat/ImgMsgPart',
|
|
7
|
+
component: ImgMsgPart,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
url: 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400',
|
|
14
|
+
alt: 'Mountain landscape',
|
|
15
|
+
},
|
|
16
|
+
} satisfies Meta<typeof ImgMsgPart>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
export const Default: Story = {
|
|
23
|
+
args: {},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const Large: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
size: 200,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Small: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
size: 64,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const WithCustomClassName: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
className: 'shadow-lg',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { LegacySlot } from '../components/legacy-slot';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'AI Office/LegacySlot',
|
|
6
|
+
component: LegacySlot,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
} satisfies Meta<typeof LegacySlot>;
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
|
|
17
|
+
export const Default: Story = {
|
|
18
|
+
args: {
|
|
19
|
+
renderLegacy: (container: HTMLElement, props: Record<string, any>) => {
|
|
20
|
+
container.innerHTML = `<div style="padding:16px;border:1px solid #ccc;border-radius:8px;">Hello from legacy renderer. Props: ${JSON.stringify(props)}</div>`;
|
|
21
|
+
return () => {
|
|
22
|
+
container.innerHTML = '';
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
props: { message: 'Hello World' },
|
|
26
|
+
shadow: false,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const WithShadow: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
renderLegacy: (container: HTMLElement) => {
|
|
33
|
+
container.innerHTML = '<div style="padding:16px;background:#f0f0f0;border-radius:8px;">Rendered inside Shadow DOM</div>';
|
|
34
|
+
return () => {
|
|
35
|
+
container.innerHTML = '';
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
props: {},
|
|
39
|
+
shadow: true,
|
|
40
|
+
withHostStyles: true,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const WithInjectedStyles: Story = {
|
|
45
|
+
args: {
|
|
46
|
+
renderLegacy: (container: HTMLElement) => {
|
|
47
|
+
container.innerHTML = '<div class="legacy-content">Styled via injected CSS</div>';
|
|
48
|
+
return () => {
|
|
49
|
+
container.innerHTML = '';
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
props: {},
|
|
53
|
+
shadow: true,
|
|
54
|
+
injectedStyles: '.legacy-content { color: #2563eb; font-size: 18px; font-weight: bold; padding: 16px; }',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
|
|
3
|
+
import { LineChecker } from "../components/line-checker";
|
|
4
|
+
import { TextIcon as FileTextIcon } from "../components/bs-icons";
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Example/Chat/LineChecker",
|
|
8
|
+
component: LineChecker,
|
|
9
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
parameters: {
|
|
12
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
13
|
+
layout: "centered",
|
|
14
|
+
},
|
|
15
|
+
args: {},
|
|
16
|
+
} satisfies Meta<typeof LineChecker>;
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
args: {
|
|
23
|
+
title: "供应商名称",
|
|
24
|
+
style: {
|
|
25
|
+
width: '400px',
|
|
26
|
+
},
|
|
27
|
+
shortDesc: "单行文本",
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const WithIcon: Story = {
|
|
32
|
+
args: {
|
|
33
|
+
title: "供应商名称",
|
|
34
|
+
shortDesc: "单行文本",
|
|
35
|
+
icon: <FileTextIcon />,
|
|
36
|
+
style: {
|
|
37
|
+
width: '400px',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const LongTitle: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
title: "供应商名称活动结束回复具体时间空间环境这是一个很长的标题会被截断",
|
|
45
|
+
shortDesc: "单行文本",
|
|
46
|
+
style: {
|
|
47
|
+
width: '400px',
|
|
48
|
+
},
|
|
49
|
+
icon: <FileTextIcon />,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const Checked: Story = {
|
|
54
|
+
args: {
|
|
55
|
+
title: "供应商名称",
|
|
56
|
+
shortDesc: "单行文本",
|
|
57
|
+
icon: <FileTextIcon />,
|
|
58
|
+
defaultChecked: true,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const Disabled: Story = {
|
|
63
|
+
args: {
|
|
64
|
+
title: "供应商名称",
|
|
65
|
+
shortDesc: "单行文本",
|
|
66
|
+
icon: <FileTextIcon />,
|
|
67
|
+
disabled: true,
|
|
68
|
+
style: {
|
|
69
|
+
width: '400px',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const DisabledChecked: Story = {
|
|
75
|
+
args: {
|
|
76
|
+
title: "供应商名称",
|
|
77
|
+
shortDesc: "单行文本",
|
|
78
|
+
icon: <FileTextIcon />,
|
|
79
|
+
defaultChecked: true,
|
|
80
|
+
disabled: true,
|
|
81
|
+
style: {
|
|
82
|
+
width: '400px',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const NoShortDesc: Story = {
|
|
88
|
+
args: {
|
|
89
|
+
title: "供应商名称",
|
|
90
|
+
icon: <FileTextIcon />,
|
|
91
|
+
style: {
|
|
92
|
+
width: '400px',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const NoIcon: Story = {
|
|
98
|
+
args: {
|
|
99
|
+
title: "供应商名称",
|
|
100
|
+
shortDesc: "单行文本",
|
|
101
|
+
style: {
|
|
102
|
+
width: '400px',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const MinimalVariant: Story = {
|
|
108
|
+
args: {
|
|
109
|
+
title: "简单选项",
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
export const WithExtraNodes: Story = {
|
|
115
|
+
args: {
|
|
116
|
+
title: "供应商名称",
|
|
117
|
+
shortDesc: "单行文本",
|
|
118
|
+
icon: <FileTextIcon />,
|
|
119
|
+
style: {
|
|
120
|
+
width: '400px',
|
|
121
|
+
},
|
|
122
|
+
extra: (
|
|
123
|
+
<div>
|
|
124
|
+
HELLO WORLD
|
|
125
|
+
HELLO WORLD
|
|
126
|
+
HELLO WORLD
|
|
127
|
+
HELLO WORLD
|
|
128
|
+
HELLO WORLD
|
|
129
|
+
HELLO WORLD
|
|
130
|
+
HELLO WORLD
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
},
|
|
134
|
+
};
|