@baishuyun/chat-sdk 0.1.9 → 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/.turbo/turbo-build.log +8 -107
- package/CHANGELOG.md +12 -0
- package/dist/chat-sdk.js +14087 -13890
- package/dist/chat-sdk.js.map +1 -1
- package/dist/chat-sdk.umd.cjs +150 -150
- package/dist/chat-sdk.umd.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/src/chat.d.ts +5 -0
- package/dist/src/chat.d.ts.map +1 -0
- package/dist/src/components/biz-comp/FakeBotMsg.d.ts +8 -0
- package/dist/src/components/biz-comp/FakeBotMsg.d.ts.map +1 -0
- package/dist/src/components/biz-comp/FieldChecker.d.ts +19 -0
- package/dist/src/components/biz-comp/FieldChecker.d.ts.map +1 -0
- package/dist/src/components/biz-comp/FieldCheckerListMsg.d.ts +19 -0
- package/dist/src/components/biz-comp/FieldCheckerListMsg.d.ts.map +1 -0
- package/dist/src/components/biz-comp/FieldValueChecker.d.ts +16 -0
- package/dist/src/components/biz-comp/FieldValueChecker.d.ts.map +1 -0
- package/dist/src/components/biz-comp/SubformFieldsValueChecker.d.ts +22 -0
- package/dist/src/components/biz-comp/SubformFieldsValueChecker.d.ts.map +1 -0
- package/dist/src/components/biz-comp/chat-client.d.ts +13 -0
- package/dist/src/components/biz-comp/chat-client.d.ts.map +1 -0
- package/dist/src/components/biz-comp/chat-frame.d.ts +6 -0
- package/dist/src/components/biz-comp/chat-frame.d.ts.map +1 -0
- package/dist/src/components/biz-comp/conversation.d.ts +10 -0
- package/dist/src/components/biz-comp/conversation.d.ts.map +1 -0
- package/dist/src/components/biz-comp/dash-widget-icon.d.ts +7 -0
- package/dist/src/components/biz-comp/dash-widget-icon.d.ts.map +1 -0
- package/dist/src/components/biz-comp/dock-btn.d.ts +2 -0
- package/dist/src/components/biz-comp/dock-btn.d.ts.map +1 -0
- package/dist/src/components/biz-comp/error-boundary.d.ts +15 -0
- package/dist/src/components/biz-comp/error-boundary.d.ts.map +1 -0
- package/dist/src/components/biz-comp/error-msg.d.ts +4 -0
- package/dist/src/components/biz-comp/error-msg.d.ts.map +1 -0
- package/dist/src/components/biz-comp/field-icon.d.ts +5 -0
- package/dist/src/components/biz-comp/field-icon.d.ts.map +1 -0
- package/dist/src/components/biz-comp/highlight-msg.d.ts +4 -0
- package/dist/src/components/biz-comp/highlight-msg.d.ts.map +1 -0
- package/dist/src/components/biz-comp/markdown-part.d.ts +7 -0
- package/dist/src/components/biz-comp/markdown-part.d.ts.map +1 -0
- package/dist/src/components/biz-comp/markdown.d.ts +5 -0
- package/dist/src/components/biz-comp/markdown.d.ts.map +1 -0
- package/dist/src/components/biz-comp/message-content.d.ts +6 -0
- package/dist/src/components/biz-comp/message-content.d.ts.map +1 -0
- package/dist/src/components/biz-comp/messages.d.ts +3 -0
- package/dist/src/components/biz-comp/messages.d.ts.map +1 -0
- package/dist/src/components/biz-comp/multi-modal-input/attachment-btn.d.ts +9 -0
- package/dist/src/components/biz-comp/multi-modal-input/attachment-btn.d.ts.map +1 -0
- package/dist/src/components/biz-comp/multi-modal-input/clear-btn.d.ts +8 -0
- package/dist/src/components/biz-comp/multi-modal-input/clear-btn.d.ts.map +1 -0
- package/dist/src/components/biz-comp/multi-modal-input/index.d.ts +22 -0
- package/dist/src/components/biz-comp/multi-modal-input/index.d.ts.map +1 -0
- package/dist/src/components/biz-comp/multi-modal-input/preview-attachment.d.ts +12 -0
- package/dist/src/components/biz-comp/multi-modal-input/preview-attachment.d.ts.map +1 -0
- package/dist/src/components/biz-comp/multi-modal-input/prompt-input.d.ts +36 -0
- package/dist/src/components/biz-comp/multi-modal-input/prompt-input.d.ts.map +1 -0
- package/dist/src/components/biz-comp/multi-modal-input/voice-btn.d.ts +9 -0
- package/dist/src/components/biz-comp/multi-modal-input/voice-btn.d.ts.map +1 -0
- package/dist/src/components/biz-comp/opening-lines.d.ts +3 -0
- package/dist/src/components/biz-comp/opening-lines.d.ts.map +1 -0
- package/dist/src/components/biz-comp/preview-message-wrapper.d.ts +12 -0
- package/dist/src/components/biz-comp/preview-message-wrapper.d.ts.map +1 -0
- package/dist/src/components/biz-comp/preview-message.d.ts +13 -0
- package/dist/src/components/biz-comp/preview-message.d.ts.map +1 -0
- package/dist/src/components/biz-comp/response.d.ts +6 -0
- package/dist/src/components/biz-comp/response.d.ts.map +1 -0
- package/dist/src/components/biz-comp/suggestions.d.ts +8 -0
- package/dist/src/components/biz-comp/suggestions.d.ts.map +1 -0
- package/dist/src/components/ui/badge.d.ts +10 -0
- package/dist/src/components/ui/badge.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/card.d.ts +9 -0
- package/dist/src/components/ui/card.d.ts.map +1 -0
- package/dist/src/components/ui/checkbox.d.ts +5 -0
- package/dist/src/components/ui/checkbox.d.ts.map +1 -0
- package/dist/src/components/ui/collapsible.d.ts +6 -0
- package/dist/src/components/ui/collapsible.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/dropdown-menu.d.ts +28 -0
- package/dist/src/components/ui/dropdown-menu.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/input-group.d.ts +17 -0
- package/dist/src/components/ui/input-group.d.ts.map +1 -0
- package/dist/src/components/ui/input.d.ts +4 -0
- package/dist/src/components/ui/input.d.ts.map +1 -0
- package/dist/src/components/ui/label.d.ts +6 -0
- package/dist/src/components/ui/label.d.ts.map +1 -0
- package/dist/src/components/ui/one-time-click-btn.d.ts +4 -0
- package/dist/src/components/ui/one-time-click-btn.d.ts.map +1 -0
- package/dist/src/components/ui/select.d.ts +14 -0
- package/dist/src/components/ui/select.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/tabs.d.ts +8 -0
- package/dist/src/components/ui/tabs.d.ts.map +1 -0
- package/dist/src/components/ui/textarea.d.ts +4 -0
- package/dist/src/components/ui/textarea.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/web-comp/fields-previewer-web-component.d.ts +60 -0
- package/dist/src/components/web-comp/fields-previewer-web-component.d.ts.map +1 -0
- package/dist/src/const/index.d.ts +5 -0
- package/dist/src/const/index.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-chat-preference.d.ts +3 -0
- package/dist/src/hooks/use-chat-preference.d.ts.map +1 -0
- package/dist/src/hooks/use-draggable.d.ts +24 -0
- package/dist/src/hooks/use-draggable.d.ts.map +1 -0
- package/dist/src/hooks/use-evt-bus.d.ts +2 -0
- package/dist/src/hooks/use-evt-bus.d.ts.map +1 -0
- package/dist/src/hooks/use-evt.d.ts +3 -0
- package/dist/src/hooks/use-evt.d.ts.map +1 -0
- package/dist/src/hooks/use-frame-mode.d.ts +20 -0
- package/dist/src/hooks/use-frame-mode.d.ts.map +1 -0
- package/dist/src/hooks/use-merged-chat.d.ts +7 -0
- package/dist/src/hooks/use-merged-chat.d.ts.map +1 -0
- package/dist/src/hooks/use-msg-status-broadcast.d.ts +3 -0
- package/dist/src/hooks/use-msg-status-broadcast.d.ts.map +1 -0
- package/dist/src/hooks/use-plugin-component.d.ts +5 -0
- package/dist/src/hooks/use-plugin-component.d.ts.map +1 -0
- package/dist/src/hooks/use-plugin-ctx.d.ts +3 -0
- package/dist/src/hooks/use-plugin-ctx.d.ts.map +1 -0
- package/dist/src/hooks/use-plugin-custom-components.d.ts +5 -0
- package/dist/src/hooks/use-plugin-custom-components.d.ts.map +1 -0
- package/dist/src/hooks/use-plugin-life-cycle-chain-runner.d.ts +5 -0
- package/dist/src/hooks/use-plugin-life-cycle-chain-runner.d.ts.map +1 -0
- package/dist/src/hooks/use-plugin-list.d.ts +2 -0
- package/dist/src/hooks/use-plugin-list.d.ts.map +1 -0
- package/dist/src/hooks/use-plugin.d.ts +2 -0
- package/dist/src/hooks/use-plugin.d.ts.map +1 -0
- package/dist/src/hooks/use-scroll-to-bottom.d.ts +9 -0
- package/dist/src/hooks/use-scroll-to-bottom.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/hooks/use-streaming-anchor.d.ts +11 -0
- package/dist/src/hooks/use-streaming-anchor.d.ts.map +1 -0
- package/dist/src/hooks/use-toast.d.ts +3 -0
- package/dist/src/hooks/use-toast.d.ts.map +1 -0
- package/dist/src/hooks/use-voice-input.d.ts +31 -0
- package/dist/src/hooks/use-voice-input.d.ts.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/lib/clone.d.ts +32 -0
- package/dist/src/lib/clone.d.ts.map +1 -0
- package/dist/src/lib/event-emitter.d.ts +39 -0
- package/dist/src/lib/event-emitter.d.ts.map +1 -0
- package/dist/src/lib/parse-design-doc.d.ts +16 -0
- package/dist/src/lib/parse-design-doc.d.ts.map +1 -0
- package/dist/src/lib/readonly.d.ts +14 -0
- package/dist/src/lib/readonly.d.ts.map +1 -0
- package/dist/src/lib/utils.d.ts +72 -0
- package/dist/src/lib/utils.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-base-plugin/const.d.ts +3 -0
- package/dist/src/plugins/form-builder-base-plugin/const.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-base-plugin/index.d.ts +7 -0
- package/dist/src/plugins/form-builder-base-plugin/index.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-base-plugin/types.d.ts +12 -0
- package/dist/src/plugins/form-builder-base-plugin/types.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/create-form-confirm.d.ts +7 -0
- package/dist/src/plugins/form-builder-plugin/components/create-form-confirm.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/design-doc-part.d.ts +4 -0
- package/dist/src/plugins/form-builder-plugin/components/design-doc-part.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/design-info.d.ts +6 -0
- package/dist/src/plugins/form-builder-plugin/components/design-info.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/entry-btn.d.ts +3 -0
- package/dist/src/plugins/form-builder-plugin/components/entry-btn.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/fields-part.d.ts +4 -0
- package/dist/src/plugins/form-builder-plugin/components/fields-part.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/follow-up.d.ts +3 -0
- package/dist/src/plugins/form-builder-plugin/components/follow-up.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/msg-part.d.ts +3 -0
- package/dist/src/plugins/form-builder-plugin/components/msg-part.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/opening-lines.d.ts +3 -0
- package/dist/src/plugins/form-builder-plugin/components/opening-lines.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/components/suggestion-part.d.ts +5 -0
- package/dist/src/plugins/form-builder-plugin/components/suggestion-part.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/const/index.d.ts +12 -0
- package/dist/src/plugins/form-builder-plugin/const/index.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/hooks/index.d.ts +4 -0
- package/dist/src/plugins/form-builder-plugin/hooks/index.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/hooks/use-fields-confirmed.d.ts +2 -0
- package/dist/src/plugins/form-builder-plugin/hooks/use-fields-confirmed.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/index.d.ts +30 -0
- package/dist/src/plugins/form-builder-plugin/index.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/types.d.ts +28 -0
- package/dist/src/plugins/form-builder-plugin/types.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/utils/get-render-strategy.d.ts +3 -0
- package/dist/src/plugins/form-builder-plugin/utils/get-render-strategy.d.ts.map +1 -0
- package/dist/src/plugins/form-builder-plugin/utils/index.d.ts +57 -0
- package/dist/src/plugins/form-builder-plugin/utils/index.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/batch-filling-data-manager.d.ts +26 -0
- package/dist/src/plugins/form-filling-plugin/batch-filling-data-manager.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/FormFillingOpeningLines.d.ts +3 -0
- package/dist/src/plugins/form-filling-plugin/components/FormFillingOpeningLines.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/avatar.d.ts +5 -0
- package/dist/src/plugins/form-filling-plugin/components/avatar.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/batch-fill-part.d.ts +4 -0
- package/dist/src/plugins/form-filling-plugin/components/batch-fill-part.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/batch-generator-action.d.ts +14 -0
- package/dist/src/plugins/form-filling-plugin/components/batch-generator-action.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/entry-btn.d.ts +3 -0
- package/dist/src/plugins/form-filling-plugin/components/entry-btn.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/first-batch-generating-animation.d.ts +2 -0
- package/dist/src/plugins/form-filling-plugin/components/first-batch-generating-animation.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/generated-data-counter.d.ts +5 -0
- package/dist/src/plugins/form-filling-plugin/components/generated-data-counter.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/mode-select.d.ts +2 -0
- package/dist/src/plugins/form-filling-plugin/components/mode-select.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/msg-part.d.ts +3 -0
- package/dist/src/plugins/form-filling-plugin/components/msg-part.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/non-first-batch-generating-animation.d.ts +2 -0
- package/dist/src/plugins/form-filling-plugin/components/non-first-batch-generating-animation.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/components/single-fill-part.d.ts +4 -0
- package/dist/src/plugins/form-filling-plugin/components/single-fill-part.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/const.d.ts +615 -0
- package/dist/src/plugins/form-filling-plugin/const.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/hooks/use-conversation-id-in-ctx.d.ts +3 -0
- package/dist/src/plugins/form-filling-plugin/hooks/use-conversation-id-in-ctx.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/hooks/use-fields-data.d.ts +4 -0
- package/dist/src/plugins/form-filling-plugin/hooks/use-fields-data.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/index.d.ts +22 -0
- package/dist/src/plugins/form-filling-plugin/index.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/types.d.ts +22 -0
- package/dist/src/plugins/form-filling-plugin/types.d.ts.map +1 -0
- package/dist/src/plugins/form-filling-plugin/utils.d.ts +6 -0
- package/dist/src/plugins/form-filling-plugin/utils.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/avatar.d.ts +5 -0
- package/dist/src/plugins/report-query-plugin/components/avatar.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/query-entry-btn.d.ts +3 -0
- package/dist/src/plugins/report-query-plugin/components/query-entry-btn.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/query-msg-part.d.ts +3 -0
- package/dist/src/plugins/report-query-plugin/components/query-msg-part.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/query-opening-lines.d.ts +2 -0
- package/dist/src/plugins/report-query-plugin/components/query-opening-lines.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/CreatedSourceMsg.d.ts +7 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/CreatedSourceMsg.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableCard.d.ts +5 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableCard.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableFields.d.ts +18 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/DataTableFields.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/FilterCondition.d.ts +4 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/FilterCondition.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/FormulaField.d.ts +8 -0
- package/dist/src/plugins/report-query-plugin/components/result-cards/FormulaField.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/const.d.ts +5 -0
- package/dist/src/plugins/report-query-plugin/const.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/index.d.ts +19 -0
- package/dist/src/plugins/report-query-plugin/index.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/types.d.ts +18 -0
- package/dist/src/plugins/report-query-plugin/types.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/build-dash-component.d.ts +17 -0
- package/dist/src/plugins/report-query-plugin/utils/build-dash-component.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/create-default-dash-styles.d.ts +30 -0
- package/dist/src/plugins/report-query-plugin/utils/create-default-dash-styles.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/create-default-widget-attr-list.d.ts +60 -0
- package/dist/src/plugins/report-query-plugin/utils/create-default-widget-attr-list.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/field-enhance.d.ts +31 -0
- package/dist/src/plugins/report-query-plugin/utils/field-enhance.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/get-field-group.d.ts +208 -0
- package/dist/src/plugins/report-query-plugin/utils/get-field-group.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/get-field-icon.d.ts +4 -0
- package/dist/src/plugins/report-query-plugin/utils/get-field-icon.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/get-group-rule.d.ts +4 -0
- package/dist/src/plugins/report-query-plugin/utils/get-group-rule.d.ts.map +1 -0
- package/dist/src/plugins/report-query-plugin/utils/index.d.ts +5 -0
- package/dist/src/plugins/report-query-plugin/utils/index.d.ts.map +1 -0
- package/dist/src/sdk.impl.d.ts +44 -0
- package/dist/src/sdk.impl.d.ts.map +1 -0
- package/dist/src/store/context.d.ts +12 -0
- package/dist/src/store/context.d.ts.map +1 -0
- package/dist/src/store/index.d.ts +14 -0
- package/dist/src/store/index.d.ts.map +1 -0
- package/dist/src/stories/FormulaField.stories.d.ts +24 -0
- package/dist/src/stories/FormulaField.stories.d.ts.map +1 -0
- package/package.json +5 -4
- package/src/components/biz-comp/FakeBotMsg.tsx +1 -1
- package/src/components/biz-comp/FieldChecker.tsx +2 -2
- package/src/components/biz-comp/FieldCheckerListMsg.tsx +3 -3
- package/src/components/biz-comp/FieldValueChecker.tsx +1 -1
- package/src/components/biz-comp/SubformFieldsValueChecker.tsx +1 -1
- package/src/components/biz-comp/chat-client.tsx +3 -3
- package/src/components/biz-comp/conversation.tsx +1 -1
- package/src/components/biz-comp/dash-widget-icon.tsx +1 -1
- package/src/components/biz-comp/field-icon.tsx +2 -2
- package/src/components/biz-comp/markdown-part.tsx +3 -3
- package/src/components/biz-comp/message-content.tsx +1 -1
- package/src/components/biz-comp/messages.tsx +5 -2
- package/src/components/biz-comp/multi-modal-input/clear-btn.tsx +2 -2
- package/src/components/biz-comp/multi-modal-input/index.tsx +4 -4
- package/src/components/biz-comp/multi-modal-input/prompt-input.tsx +2 -2
- package/src/components/biz-comp/multi-modal-input/voice-btn.tsx +2 -2
- package/src/components/biz-comp/preview-message-wrapper.tsx +14 -7
- package/src/components/biz-comp/preview-message.tsx +5 -5
- package/src/components/biz-comp/suggestions.tsx +2 -2
- package/src/components/web-comp/fields-previewer-web-component.ts +1 -1
- package/src/const/ui.ts +1 -1
- package/src/hooks/use-streaming-anchor.ts +42 -0
- package/src/plugins/form-builder-plugin/components/create-form-confirm.tsx +4 -4
- package/src/plugins/form-builder-plugin/components/design-info.tsx +3 -3
- package/src/plugins/form-builder-plugin/components/entry-btn.tsx +3 -3
- package/src/plugins/form-builder-plugin/components/fields-part.tsx +2 -2
- package/src/plugins/form-builder-plugin/components/follow-up.tsx +2 -2
- package/src/plugins/form-filling-plugin/components/FormFillingOpeningLines.tsx +1 -1
- package/src/plugins/form-filling-plugin/components/avatar.tsx +2 -2
- package/src/plugins/form-filling-plugin/components/batch-generator-action.tsx +1 -1
- package/src/plugins/form-filling-plugin/components/entry-btn.tsx +3 -3
- package/src/plugins/form-filling-plugin/components/first-batch-generating-animation.tsx +2 -2
- package/src/plugins/form-filling-plugin/components/generated-data-counter.tsx +1 -1
- package/src/plugins/form-filling-plugin/components/mode-select.tsx +1 -1
- package/src/plugins/form-filling-plugin/components/non-first-batch-generating-animation.tsx +3 -3
- package/src/plugins/form-filling-plugin/components/single-fill-part.tsx +1 -1
- package/src/plugins/report-query-plugin/components/avatar.tsx +2 -2
- package/src/plugins/report-query-plugin/components/query-entry-btn.tsx +2 -2
- package/src/plugins/report-query-plugin/components/query-opening-lines.tsx +1 -1
- package/src/plugins/report-query-plugin/components/result-cards/CreatedSourceMsg.tsx +1 -1
- package/src/plugins/report-query-plugin/components/result-cards/DataTableCard.tsx +3 -3
- package/src/plugins/report-query-plugin/components/result-cards/DataTableFields.tsx +3 -3
- package/src/plugins/report-query-plugin/components/result-cards/FormulaField.tsx +2 -2
- package/src/plugins/report-query-plugin/const.ts +1 -1
- package/src/style.css +2 -0
- package/tsconfig.json +5 -5
- package/src/components/bs-ui/abs-fullscreen-gradient-bg.tsx +0 -35
- package/src/components/bs-ui/attachment-part-group.tsx +0 -35
- package/src/components/bs-ui/attachment-part.tsx +0 -179
- package/src/components/bs-ui/attachments-previewer.tsx +0 -324
- package/src/components/bs-ui/base-button.tsx +0 -49
- package/src/components/bs-ui/border-animation.tsx +0 -107
- package/src/components/bs-ui/border-color-animation.tsx +0 -66
- package/src/components/bs-ui/bot-avatar-name.tsx +0 -25
- package/src/components/bs-ui/bot-icon.tsx +0 -23
- package/src/components/bs-ui/bs-icons.tsx +0 -1115
- package/src/components/bs-ui/card-field.tsx +0 -23
- package/src/components/bs-ui/card.tsx +0 -36
- package/src/components/bs-ui/chat-area-header.tsx +0 -65
- package/src/components/bs-ui/circle-checker.tsx +0 -66
- package/src/components/bs-ui/collapsible-txt-msg.tsx +0 -63
- package/src/components/bs-ui/confirm-dialog.tsx +0 -139
- package/src/components/bs-ui/fields-design-info-table.tsx +0 -160
- package/src/components/bs-ui/fields-generating-indicator.tsx +0 -95
- package/src/components/bs-ui/fields-portal.tsx +0 -18
- package/src/components/bs-ui/fields-previewer.tsx +0 -210
- package/src/components/bs-ui/font-icon.tsx +0 -17
- package/src/components/bs-ui/form-info-editor.tsx +0 -259
- package/src/components/bs-ui/formula-tag.tsx +0 -32
- package/src/components/bs-ui/generate-animation.tsx +0 -56
- package/src/components/bs-ui/icon-btn.tsx +0 -43
- package/src/components/bs-ui/img-part.tsx +0 -27
- package/src/components/bs-ui/line-checker.tsx +0 -160
- package/src/components/bs-ui/linear-gradient-border-btn.tsx +0 -48
- package/src/components/bs-ui/linear-gradient-color-bg-animation.tsx +0 -103
- package/src/components/bs-ui/number-part.tsx +0 -46
- package/src/components/bs-ui/option-item.tsx +0 -28
- package/src/components/bs-ui/previewer-header.tsx +0 -233
- package/src/components/bs-ui/primary-confirm-btn.tsx +0 -58
- package/src/components/bs-ui/primary-entry-btn.tsx +0 -48
- package/src/components/bs-ui/scroll-to-bottom-btn.tsx +0 -28
- package/src/components/bs-ui/split-line.tsx +0 -9
- package/src/components/bs-ui/square-checker.tsx +0 -87
- package/src/components/bs-ui/tab-radio-group.tsx +0 -82
- package/src/components/bs-ui/tooltip.tsx +0 -53
- package/src/components/bs-ui/user-txt-msg-bubble.tsx +0 -19
- package/src/components/bs-ui/warning-msg.tsx +0 -27
- package/src/stories/AbsFullscreenGradientBg.stories.tsx +0 -36
- package/src/stories/AttachmentPart.stories.tsx +0 -122
- package/src/stories/AttachmentPartGroup.stories.tsx +0 -151
- package/src/stories/AttachmentsPreviewer.stories.tsx +0 -306
- package/src/stories/BaseButton.stories.tsx +0 -33
- package/src/stories/BorderAnimation.stories.tsx +0 -116
- package/src/stories/BorderColorAnimation.stories.tsx +0 -63
- package/src/stories/BotAvatarAndName.stories.ts +0 -24
- package/src/stories/BotIcon.stories.ts +0 -22
- package/src/stories/BsTooltip.stories.tsx +0 -32
- package/src/stories/Card.stories.tsx +0 -28
- package/src/stories/CardField.stories.tsx +0 -87
- package/src/stories/ChatAreaHeader.stories.ts +0 -26
- package/src/stories/CircleChecker.stories.tsx +0 -89
- package/src/stories/CollapsibleTextMsg.stories.ts +0 -44
- package/src/stories/ConfirmDialog.stories.tsx +0 -123
- package/src/stories/DashWidgetIcon.stories.tsx +0 -132
- package/src/stories/FormInfoEditor.stories.tsx +0 -173
- package/src/stories/FormulaTag.stories.tsx +0 -68
- package/src/stories/GenerateAnimation.stories.ts +0 -20
- package/src/stories/IconBtn.stories.tsx +0 -32
- package/src/stories/IconLib.tsx +0 -45
- package/src/stories/Icons.stories.ts +0 -22
- package/src/stories/ImgMsgPart.stories.tsx +0 -42
- package/src/stories/LineChecker.stories.tsx +0 -134
- package/src/stories/LinearGradientBorderBtn.stories.tsx +0 -86
- package/src/stories/LinearGradientColorBgAnimation.stories.tsx +0 -60
- package/src/stories/NumbersMsgPart.stories.tsx +0 -42
- package/src/stories/OptionItem.stories.tsx +0 -77
- package/src/stories/PreviewerHeader.stories.tsx +0 -91
- package/src/stories/PrimaryConfirmBtn.stories.tsx +0 -60
- package/src/stories/PrimaryEntryBtn.stories.tsx +0 -74
- package/src/stories/ScrollToBottom.stories.tsx +0 -24
- package/src/stories/SplitLine.stories.tsx +0 -40
- package/src/stories/SquareChecker.stories.tsx +0 -96
- package/src/stories/TabRadioGroup.stories.tsx +0 -84
- package/src/stories/UserTextMsgBubble.stories.ts +0 -24
- package/src/stories/WarningMessage.stories.tsx +0 -23
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -1
- 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 +0 -539
- package/src/stories/assets/demo_index.html +0 -7988
- package/src/stories/assets/discord.svg +0 -1
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -1
- package/src/stories/assets/iconfont.css +0 -1377
- package/src/stories/assets/iconfont.eot +0 -0
- package/src/stories/assets/iconfont.json +0 -2382
- package/src/stories/assets/iconfont.svg +0 -697
- 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 +0 -1
- package/src/stories/assets/youtube.svg +0 -1
- package/src/stories/fields-design-info-table.stories.tsx +0 -203
- package/src/stories/fields-generating.stories.tsx +0 -41
- package/src/stories/fields-previewer.stories.tsx +0 -77
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
import { FormulaTag } from '@/components/bs-ui/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
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
import { GenerateAnimation } from "@/components/bs-ui/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
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
import { IconBtn } from '@/components/bs-ui/icon-btn';
|
|
4
|
-
import { DockIcon } from '@/components/bs-ui/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
|
-
};
|
package/src/stories/IconLib.tsx
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as Icons from '@/components/bs-ui/bs-icons';
|
|
2
|
-
|
|
3
|
-
import { IconBtn } from '@/components/bs-ui/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
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
import { ImgMsgPart } from '@/components/bs-ui/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
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
import { LineChecker } from "@/components/bs-ui/line-checker";
|
|
4
|
-
import { TextIcon as FileTextIcon } from "@/components/bs-ui/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
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
import { LinearGradientBorderBtn } from "@/components/bs-ui/linear-gradient-border-btn";
|
|
4
|
-
import { LetterAIcon } from "@/components/bs-ui/bs-icons";
|
|
5
|
-
|
|
6
|
-
const meta = {
|
|
7
|
-
title: "Example/Button/LinearGradientBorderBtn",
|
|
8
|
-
component: LinearGradientBorderBtn,
|
|
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 LinearGradientBorderBtn>;
|
|
17
|
-
|
|
18
|
-
export default meta;
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
export const Default: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
children: "搭建供应商评估表",
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const ShortText: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
children: "确认",
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const LongText: Story = {
|
|
34
|
-
args: {
|
|
35
|
-
children: "创建新的供应商管理表单并提交审核",
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const Disabled: Story = {
|
|
40
|
-
args: {
|
|
41
|
-
children: "搭建供应商评估表",
|
|
42
|
-
disabled: true,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const WithClickHandler: Story = {
|
|
47
|
-
args: {
|
|
48
|
-
children: "点击我",
|
|
49
|
-
onClick: () => alert("按钮被点击了!"),
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const CustomClassName: Story = {
|
|
54
|
-
args: {
|
|
55
|
-
children: "自定义样式",
|
|
56
|
-
className: "w-[200px]",
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const MultipleButtons: Story = {
|
|
61
|
-
render: () => (
|
|
62
|
-
<div className="flex gap-2">
|
|
63
|
-
<LinearGradientBorderBtn>取消</LinearGradientBorderBtn>
|
|
64
|
-
<LinearGradientBorderBtn>确定</LinearGradientBorderBtn>
|
|
65
|
-
<LinearGradientBorderBtn>提交</LinearGradientBorderBtn>
|
|
66
|
-
</div>
|
|
67
|
-
),
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const WithIcon: Story = {
|
|
71
|
-
args: {
|
|
72
|
-
children: (
|
|
73
|
-
<div className="flex items-center gap-1">
|
|
74
|
-
<LetterAIcon />
|
|
75
|
-
<span>添加表单</span>
|
|
76
|
-
</div>
|
|
77
|
-
),
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const FixedWidth: Story = {
|
|
82
|
-
args: {
|
|
83
|
-
children: "固定宽度按钮",
|
|
84
|
-
className: "w-[160px]",
|
|
85
|
-
},
|
|
86
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
import { LinearGradientColorBgAnimation } from "@/components/bs-ui/linear-gradient-color-bg-animation";
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: "Example/Animation/LinearGradientColorBgAnimation",
|
|
7
|
-
component: LinearGradientColorBgAnimation,
|
|
8
|
-
tags: ["autodocs"],
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: "centered",
|
|
11
|
-
},
|
|
12
|
-
args: {},
|
|
13
|
-
} satisfies Meta<typeof LinearGradientColorBgAnimation>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
export const Default: Story = {
|
|
19
|
-
args: {
|
|
20
|
-
width: '976px',
|
|
21
|
-
height: '52px',
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const WithContent: Story = {
|
|
26
|
-
args: {
|
|
27
|
-
width: '100vw',
|
|
28
|
-
height: '400px',
|
|
29
|
-
},
|
|
30
|
-
render: (args) => (
|
|
31
|
-
<LinearGradientColorBgAnimation {...args}>
|
|
32
|
-
<div style={{
|
|
33
|
-
display: 'flex',
|
|
34
|
-
alignItems: 'center',
|
|
35
|
-
justifyContent: 'center',
|
|
36
|
-
height: '100%',
|
|
37
|
-
color: '#333',
|
|
38
|
-
}}>
|
|
39
|
-
<div style={{ textAlign: 'center' }}>
|
|
40
|
-
<h1 style={{ margin: '0 0 16px 0', fontSize: '48px' }}>Flowing Gradient</h1>
|
|
41
|
-
<p style={{ margin: 0, fontSize: '20px' }}>Natural animated background</p>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</LinearGradientColorBgAnimation>
|
|
45
|
-
),
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const FixedSize: Story = {
|
|
49
|
-
args: {
|
|
50
|
-
width: '800px',
|
|
51
|
-
height: '300px',
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const TallSize: Story = {
|
|
56
|
-
args: {
|
|
57
|
-
width: '600px',
|
|
58
|
-
height: '600px',
|
|
59
|
-
},
|
|
60
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
|
|
3
|
-
import { NumbersMsgPart } from '@/components/bs-ui/number-part';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Example/Chat/NumbersMsgPart',
|
|
7
|
-
component: NumbersMsgPart,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered',
|
|
11
|
-
},
|
|
12
|
-
args: {
|
|
13
|
-
fileName: '生产小工单.excel',
|
|
14
|
-
},
|
|
15
|
-
} satisfies Meta<typeof NumbersMsgPart>;
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
export const Default: Story = {
|
|
22
|
-
args: {},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const Small: Story = {
|
|
26
|
-
args: {
|
|
27
|
-
size: 80,
|
|
28
|
-
fileName: undefined,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const LongFileName: Story = {
|
|
33
|
-
args: {
|
|
34
|
-
fileName: '这是一个非常长的文件名需要截断显示.xlsx',
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const IconOnly: Story = {
|
|
39
|
-
args: {
|
|
40
|
-
fileName: undefined,
|
|
41
|
-
},
|
|
42
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
|
|
3
|
-
import { OptionItem } from "@/components/bs-ui/option-item";
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
title: "Example/Chat/OptionItem",
|
|
7
|
-
component: OptionItem,
|
|
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 OptionItem>;
|
|
16
|
-
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof meta>;
|
|
19
|
-
|
|
20
|
-
export const Default: Story = {
|
|
21
|
-
args: {
|
|
22
|
-
label: "选项",
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const WithBgColor: Story = {
|
|
27
|
-
args: {
|
|
28
|
-
label: "单行文本",
|
|
29
|
-
bgColor: "#E8F4FF",
|
|
30
|
-
color: "#0265FF",
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const RedVariant: Story = {
|
|
35
|
-
args: {
|
|
36
|
-
label: "错误",
|
|
37
|
-
bgColor: "#FFEBEE",
|
|
38
|
-
color: "#D32F2F",
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const GreenVariant: Story = {
|
|
43
|
-
args: {
|
|
44
|
-
label: "成功",
|
|
45
|
-
bgColor: "#E8F5E9",
|
|
46
|
-
color: "#388E3C",
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const WithChildren: Story = {
|
|
51
|
-
args: {
|
|
52
|
-
children: <span>使用children</span>,
|
|
53
|
-
bgColor: "#F3E5F5",
|
|
54
|
-
color: "#7B1FA2",
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const WithIcon: Story = {
|
|
59
|
-
args: {
|
|
60
|
-
label: (
|
|
61
|
-
<div className="flex items-center gap-1">
|
|
62
|
-
<span>✓</span>
|
|
63
|
-
<span>已选择</span>
|
|
64
|
-
</div>
|
|
65
|
-
),
|
|
66
|
-
bgColor: "#E8F5E9",
|
|
67
|
-
color: "#388E3C",
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const CustomColor: Story = {
|
|
72
|
-
args: {
|
|
73
|
-
label: "自定义颜色",
|
|
74
|
-
bgColor: "#FFF8DC",
|
|
75
|
-
color: "#8B4513",
|
|
76
|
-
},
|
|
77
|
-
};
|