@gravity-ui/aikit 0.1.1 → 0.2.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/dist/components/atoms/Alert/Alert.scss +29 -0
- package/dist/components/atoms/ChatDate/ChatDate.scss +15 -0
- package/dist/components/atoms/ChatDate/i18n/en.json +8 -0
- package/dist/components/atoms/ChatDate/i18n/ru.json +10 -0
- package/dist/components/atoms/ContextIndicator/ContextIndicator.scss +93 -0
- package/dist/components/atoms/DiffStat/DiffStat.scss +36 -0
- package/dist/components/atoms/Disclaimer/Disclaimer.scss +13 -0
- package/dist/components/atoms/Loader/Loader.scss +72 -0
- package/dist/components/atoms/MarkdownRenderer/MarkdownRenderer.scss +5 -0
- package/dist/components/atoms/MessageBalloon/MessageBalloon.scss +11 -0
- package/dist/components/atoms/Shimmer/Shimmer.scss +32 -0
- package/dist/components/atoms/SubmitButton/SubmitButton.scss +29 -0
- package/dist/components/atoms/SubmitButton/i18n/en.json +3 -0
- package/dist/components/atoms/SubmitButton/i18n/ru.json +3 -0
- package/dist/components/atoms/ToolIndicator/ToolIndicator.scss +15 -0
- package/dist/components/molecules/BaseMessage/BaseMessage.scss +41 -0
- package/dist/components/molecules/BaseMessage/i18n/en.json +8 -0
- package/dist/components/molecules/BaseMessage/i18n/ru.json +8 -0
- package/dist/components/molecules/ButtonGroup/ButtonGroup.scss +19 -0
- package/dist/components/molecules/PromptInputBody/PromptInputBody.scss +22 -0
- package/dist/components/molecules/PromptInputFooter/PromptInputFooter.scss +25 -0
- package/dist/components/molecules/PromptInputFooter/i18n/en.json +5 -0
- package/dist/components/molecules/PromptInputFooter/i18n/ru.json +5 -0
- package/dist/components/molecules/PromptInputHeader/PromptInputHeader.scss +27 -0
- package/dist/components/molecules/PromptInputPanel/PromptInputPanel.scss +11 -0
- package/dist/{src/components → components}/molecules/Suggestions/Suggestions.d.ts +4 -0
- package/dist/{src/components → components}/molecules/Suggestions/Suggestions.js +3 -3
- package/dist/components/molecules/Suggestions/Suggestions.scss +90 -0
- package/dist/components/molecules/Tabs/Tabs.scss +46 -0
- package/dist/components/molecules/Tabs/i18n/en.json +3 -0
- package/dist/components/molecules/Tabs/i18n/ru.json +3 -0
- package/dist/components/molecules/ToolFooter/ToolFooter.scss +15 -0
- package/dist/components/molecules/ToolHeader/ToolHeader.scss +24 -0
- package/dist/components/organisms/AssistantMessage/AssistantMessage.scss +10 -0
- package/dist/components/organisms/Header/Header.scss +51 -0
- package/dist/components/organisms/Header/i18n/en.json +7 -0
- package/dist/components/organisms/Header/i18n/ru.json +7 -0
- package/dist/components/organisms/MessageList/MessageList.scss +30 -0
- package/dist/components/organisms/MessageList/i18n/en.json +4 -0
- package/dist/components/organisms/MessageList/i18n/ru.json +4 -0
- package/dist/components/organisms/PromptInput/PromptInput.scss +73 -0
- package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithSuggestions.js +2 -2
- package/dist/{src/components → components}/organisms/PromptInput/types.d.ts +2 -0
- package/dist/components/organisms/ThinkingMessage/ThinkingMessage.scss +27 -0
- package/dist/components/organisms/ThinkingMessage/i18n/en.json +4 -0
- package/dist/components/organisms/ThinkingMessage/i18n/ru.json +4 -0
- package/dist/{src/components → components}/organisms/ThinkingMessage/index.js +1 -1
- package/dist/components/organisms/ToolMessage/ToolMessage.scss +19 -0
- package/dist/components/organisms/ToolMessage/i18n/en.json +9 -0
- package/dist/components/organisms/ToolMessage/i18n/ru.json +9 -0
- package/dist/components/organisms/UserMessage/UserMessage.scss +10 -0
- package/dist/components/pages/ChatContainer/ChatContainer.scss +44 -0
- package/dist/components/pages/ChatContainer/i18n/en.json +10 -0
- package/dist/components/pages/ChatContainer/i18n/ru.json +10 -0
- package/dist/components/templates/ChatContent/ChatContent.scss +27 -0
- package/dist/components/templates/EmptyContainer/EmptyContainer.scss +86 -0
- package/dist/components/templates/EmptyContainer/i18n/en.json +3 -0
- package/dist/components/templates/EmptyContainer/i18n/ru.json +3 -0
- package/dist/components/templates/History/History.scss +90 -0
- package/dist/components/templates/History/i18n/en.json +7 -0
- package/dist/components/templates/History/i18n/ru.json +7 -0
- package/dist/styles/_functions.scss +5 -0
- package/dist/styles/styles.scss +1 -0
- package/dist/styles/variables.scss +1 -0
- package/dist/themes/dark.css +19 -0
- package/dist/themes/light.css +19 -0
- package/dist/themes/variables.css +69 -0
- package/package.json +22 -4
- package/dist/.storybook/theme.d.ts +0 -6
- package/dist/.storybook/theme.js +0 -28
- package/dist/package.json +0 -123
- package/dist/src/components/atoms/ActionButton/__stories__/ActionButton.stories.d.ts +0 -8
- package/dist/src/components/atoms/ActionButton/__stories__/ActionButton.stories.js +0 -48
- package/dist/src/components/atoms/Alert/__stories__/Alert.stories.d.ts +0 -9
- package/dist/src/components/atoms/Alert/__stories__/Alert.stories.js +0 -56
- package/dist/src/components/atoms/ChatDate/__stories__/ChatDate.stories.d.ts +0 -16
- package/dist/src/components/atoms/ChatDate/__stories__/ChatDate.stories.js +0 -83
- package/dist/src/components/atoms/ChatDate/i18n/en.json +0 -8
- package/dist/src/components/atoms/ChatDate/i18n/ru.json +0 -10
- package/dist/src/components/atoms/ContextIndicator/__stories__/ContextIndicator.stories.d.ts +0 -17
- package/dist/src/components/atoms/ContextIndicator/__stories__/ContextIndicator.stories.js +0 -72
- package/dist/src/components/atoms/ContextItem/__stories__/ContextItem.stories.d.ts +0 -6
- package/dist/src/components/atoms/ContextItem/__stories__/ContextItem.stories.js +0 -32
- package/dist/src/components/atoms/DiffStat/__stories__/DiffStat.stories.d.ts +0 -7
- package/dist/src/components/atoms/DiffStat/__stories__/DiffStat.stories.js +0 -45
- package/dist/src/components/atoms/Disclaimer/__stories__/Disclaimer.stories.d.ts +0 -8
- package/dist/src/components/atoms/Disclaimer/__stories__/Disclaimer.stories.js +0 -32
- package/dist/src/components/atoms/Loader/__stories__/Loader.stories.d.ts +0 -8
- package/dist/src/components/atoms/Loader/__stories__/Loader.stories.js +0 -47
- package/dist/src/components/atoms/MarkdownRenderer/__stories__/MarkdownRenderer.stories.d.ts +0 -6
- package/dist/src/components/atoms/MarkdownRenderer/__stories__/MarkdownRenderer.stories.js +0 -49
- package/dist/src/components/atoms/MessageBalloon/__stories__/MessageBalloon.stories.d.ts +0 -6
- package/dist/src/components/atoms/MessageBalloon/__stories__/MessageBalloon.stories.js +0 -32
- package/dist/src/components/atoms/Shimmer/__stories__/Shimmer.stories.d.ts +0 -5
- package/dist/src/components/atoms/Shimmer/__stories__/Shimmer.stories.js +0 -28
- package/dist/src/components/atoms/SubmitButton/__stories__/SubmitButton.stories.d.ts +0 -12
- package/dist/src/components/atoms/SubmitButton/__stories__/SubmitButton.stories.js +0 -95
- package/dist/src/components/atoms/SubmitButton/i18n/en.json +0 -3
- package/dist/src/components/atoms/SubmitButton/i18n/ru.json +0 -3
- package/dist/src/components/atoms/ToolIndicator/__stories__/ToolIndicator.stories.d.ts +0 -9
- package/dist/src/components/atoms/ToolIndicator/__stories__/ToolIndicator.stories.js +0 -34
- package/dist/src/components/molecules/BaseMessage/__stories__/BaseMessage.stories.d.ts +0 -8
- package/dist/src/components/molecules/BaseMessage/__stories__/BaseMessage.stories.js +0 -66
- package/dist/src/components/molecules/BaseMessage/i18n/en.json +0 -8
- package/dist/src/components/molecules/BaseMessage/i18n/ru.json +0 -8
- package/dist/src/components/molecules/ButtonGroup/__stories__/ButtonGroup.stories.d.ts +0 -6
- package/dist/src/components/molecules/ButtonGroup/__stories__/ButtonGroup.stories.js +0 -44
- package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.d.ts +0 -11
- package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.js +0 -62
- package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.d.ts +0 -11
- package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.js +0 -96
- package/dist/src/components/molecules/PromptInputFooter/i18n/en.json +0 -5
- package/dist/src/components/molecules/PromptInputFooter/i18n/ru.json +0 -5
- package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.d.ts +0 -13
- package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.js +0 -103
- package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.d.ts +0 -8
- package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.js +0 -38
- package/dist/src/components/molecules/Suggestions/__stories__/Suggestions.stories.d.ts +0 -19
- package/dist/src/components/molecules/Suggestions/__stories__/Suggestions.stories.js +0 -143
- package/dist/src/components/molecules/Tabs/__stories__/Tabs.stories.d.ts +0 -9
- package/dist/src/components/molecules/Tabs/__stories__/Tabs.stories.js +0 -103
- package/dist/src/components/molecules/Tabs/i18n/en.json +0 -3
- package/dist/src/components/molecules/Tabs/i18n/ru.json +0 -3
- package/dist/src/components/molecules/ToolFooter/__stories__/ToolFooter.stories.d.ts +0 -7
- package/dist/src/components/molecules/ToolFooter/__stories__/ToolFooter.stories.js +0 -58
- package/dist/src/components/molecules/ToolHeader/__stories__/ToolHeader.stories.d.ts +0 -7
- package/dist/src/components/molecules/ToolHeader/__stories__/ToolHeader.stories.js +0 -55
- package/dist/src/components/organisms/AssistantMessage/__stories__/AssistantMessage.stories.d.ts +0 -13
- package/dist/src/components/organisms/AssistantMessage/__stories__/AssistantMessage.stories.js +0 -151
- package/dist/src/components/organisms/Header/__stories__/Header.stories.d.ts +0 -13
- package/dist/src/components/organisms/Header/__stories__/Header.stories.js +0 -130
- package/dist/src/components/organisms/Header/i18n/en.json +0 -7
- package/dist/src/components/organisms/Header/i18n/ru.json +0 -7
- package/dist/src/components/organisms/MessageList/__stories__/MessageList.stories.d.ts +0 -24
- package/dist/src/components/organisms/MessageList/__stories__/MessageList.stories.js +0 -288
- package/dist/src/components/organisms/MessageList/i18n/en.json +0 -4
- package/dist/src/components/organisms/MessageList/i18n/ru.json +0 -4
- package/dist/src/components/organisms/PromptInput/__stories__/PromptInput.stories.d.ts +0 -18
- package/dist/src/components/organisms/PromptInput/__stories__/PromptInput.stories.js +0 -278
- package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.d.ts +0 -12
- package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.js +0 -107
- package/dist/src/components/organisms/ThinkingMessage/i18n/en.json +0 -4
- package/dist/src/components/organisms/ThinkingMessage/i18n/ru.json +0 -4
- package/dist/src/components/organisms/ToolMessage/__stories__/ToolMessage.stories.d.ts +0 -11
- package/dist/src/components/organisms/ToolMessage/__stories__/ToolMessage.stories.js +0 -70
- package/dist/src/components/organisms/ToolMessage/i18n/en.json +0 -9
- package/dist/src/components/organisms/ToolMessage/i18n/ru.json +0 -9
- package/dist/src/components/organisms/UserMessage/__stories__/UserMessage.stories.d.ts +0 -7
- package/dist/src/components/organisms/UserMessage/__stories__/UserMessage.stories.js +0 -70
- package/dist/src/components/pages/ChatContainer/__stories__/ChatContainer.stories.d.ts +0 -53
- package/dist/src/components/pages/ChatContainer/__stories__/ChatContainer.stories.js +0 -743
- package/dist/src/components/pages/ChatContainer/i18n/en.json +0 -10
- package/dist/src/components/pages/ChatContainer/i18n/ru.json +0 -10
- package/dist/src/components/templates/ChatContent/__stories__/ChatContent.stories.d.ts +0 -14
- package/dist/src/components/templates/ChatContent/__stories__/ChatContent.stories.js +0 -327
- package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.d.ts +0 -20
- package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.js +0 -250
- package/dist/src/components/templates/EmptyContainer/i18n/en.json +0 -3
- package/dist/src/components/templates/EmptyContainer/i18n/ru.json +0 -3
- package/dist/src/components/templates/History/__stories__/History.stories.d.ts +0 -17
- package/dist/src/components/templates/History/__stories__/History.stories.js +0 -271
- package/dist/src/components/templates/History/i18n/en.json +0 -7
- package/dist/src/components/templates/History/i18n/ru.json +0 -7
- package/dist/src/demo/ContentWrapper/ContentWrapper.d.ts +0 -4
- package/dist/src/demo/ContentWrapper/ContentWrapper.js +0 -9
- package/dist/src/demo/ContentWrapper/index.d.ts +0 -1
- package/dist/src/demo/ContentWrapper/index.js +0 -1
- package/dist/src/demo/DocsDecorator/DocsDecorator.d.ts +0 -6
- package/dist/src/demo/DocsDecorator/DocsDecorator.js +0 -12
- package/dist/src/demo/DocsDecorator/ThemeContext.d.ts +0 -2
- package/dist/src/demo/DocsDecorator/ThemeContext.js +0 -2
- package/dist/src/demo/Showcase/Showcase.d.ts +0 -9
- package/dist/src/demo/Showcase/Showcase.js +0 -7
- package/dist/src/demo/Showcase/index.d.ts +0 -1
- package/dist/src/demo/Showcase/index.js +0 -1
- package/dist/src/demo/ShowcaseItem/ShowcaseItem.d.ts +0 -7
- package/dist/src/demo/ShowcaseItem/ShowcaseItem.js +0 -7
- package/dist/src/demo/ShowcaseItem/index.d.ts +0 -1
- package/dist/src/demo/ShowcaseItem/index.js +0 -1
- package/dist/src/demo/SwapArea/SwapArea.d.ts +0 -2
- package/dist/src/demo/SwapArea/SwapArea.js +0 -7
- package/dist/src/demo/SwapArea/index.d.ts +0 -1
- package/dist/src/demo/SwapArea/index.js +0 -1
- /package/dist/{src/components → components}/atoms/ActionButton/ActionButton.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ActionButton/ActionButton.js +0 -0
- /package/dist/{src/components → components}/atoms/ActionButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ActionButton/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Alert/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Alert/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/ChatDate.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/ChatDate.js +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/i18n/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ChatDate/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/utils.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ContextIndicator/utils.js +0 -0
- /package/dist/{src/components → components}/atoms/ContextItem/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ContextItem/index.js +0 -0
- /package/dist/{src/components → components}/atoms/DiffStat/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/DiffStat/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/Disclaimer.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/Disclaimer.js +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Disclaimer/index.js +0 -0
- /package/dist/{src/components → components}/atoms/InlineCitation/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/InlineCitation/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Loader/Loader.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Loader/Loader.js +0 -0
- /package/dist/{src/components → components}/atoms/Loader/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Loader/index.js +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/MarkdownRenderer.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/MarkdownRenderer.js +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/MarkdownRenderer/index.js +0 -0
- /package/dist/{src/components → components}/atoms/MessageBalloon/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/MessageBalloon/index.js +0 -0
- /package/dist/{src/components → components}/atoms/Shimmer/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/Shimmer/index.js +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/SubmitButton.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/SubmitButton.js +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/i18n/index.js +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/SubmitButton/index.js +0 -0
- /package/dist/{src/components → components}/atoms/ToolIndicator/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/ToolIndicator/index.js +0 -0
- /package/dist/{src/components → components}/atoms/index.d.ts +0 -0
- /package/dist/{src/components → components}/atoms/index.js +0 -0
- /package/dist/{src/components → components}/index.d.ts +0 -0
- /package/dist/{src/components → components}/index.js +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/i18n/index.js +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/BaseMessage/index.js +0 -0
- /package/dist/{src/components → components}/molecules/ButtonGroup/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/ButtonGroup/index.js +0 -0
- /package/dist/{src/components → components}/molecules/InputContext/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/InputContext/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/PromptInputBody.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/PromptInputBody.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputBody/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/PromptInputFooter.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/PromptInputFooter.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/i18n/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputFooter/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/PromptInputHeader.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/PromptInputHeader.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputHeader/index.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/PromptInputPanel.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/PromptInputPanel.js +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/PromptInputPanel/index.js +0 -0
- /package/dist/{src/components → components}/molecules/Suggestions/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Suggestions/index.js +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/Tabs.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/Tabs.js +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/i18n/index.js +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/Tabs/index.js +0 -0
- /package/dist/{src/components → components}/molecules/ToolFooter/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/ToolFooter/index.js +0 -0
- /package/dist/{src/components → components}/molecules/ToolHeader/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/ToolHeader/index.js +0 -0
- /package/dist/{src/components → components}/molecules/index.d.ts +0 -0
- /package/dist/{src/components → components}/molecules/index.js +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/AssistantMessage.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/AssistantMessage.js +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/defaultMessageTypeRegistry.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/defaultMessageTypeRegistry.js +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AssistantMessage/index.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/Header.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/Header.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/index.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/types.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/types.js +0 -0
- /package/dist/{src/components → components}/organisms/Header/useHeader.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/Header/useHeader.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/ErrorAlert.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/ErrorAlert.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/MessageList.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/MessageList.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/MessageList/index.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInput.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInput.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputFull.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputFull.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputSimple.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputSimple.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithPanels.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithPanels.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithSuggestions.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/index.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/types.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/useDelayedUnmount.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/useDelayedUnmount.js +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/usePromptInput.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/PromptInput/usePromptInput.js +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/useThinkingMessage.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ThinkingMessage/useThinkingMessage.js +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/i18n/index.js +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/ToolMessage/index.js +0 -0
- /package/dist/{src/components → components}/organisms/UserMessage/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/UserMessage/index.js +0 -0
- /package/dist/{src/components → components}/organisms/index.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/index.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/ChatContainer.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/ChatContainer.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/i18n/index.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/index.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/types.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/types.js +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/useChatContainer.d.ts +0 -0
- /package/dist/{src/components → components}/pages/ChatContainer/useChatContainer.js +0 -0
- /package/dist/{src/components → components}/pages/index.d.ts +0 -0
- /package/dist/{src/components → components}/pages/index.js +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/ChatContent.d.ts +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/ChatContent.js +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/ChatContent/index.js +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/EmptyContainer.d.ts +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/EmptyContainer.js +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/i18n/index.js +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/EmptyContainer/index.js +0 -0
- /package/dist/{src/components → components}/templates/History/ChatItem.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/ChatItem.js +0 -0
- /package/dist/{src/components → components}/templates/History/DateHeaderItem.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/DateHeaderItem.js +0 -0
- /package/dist/{src/components → components}/templates/History/History.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/History.js +0 -0
- /package/dist/{src/components → components}/templates/History/HistoryList.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/HistoryList.js +0 -0
- /package/dist/{src/components → components}/templates/History/i18n/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/i18n/index.js +0 -0
- /package/dist/{src/components → components}/templates/History/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/History/index.js +0 -0
- /package/dist/{src/components → components}/templates/index.d.ts +0 -0
- /package/dist/{src/components → components}/templates/index.js +0 -0
- /package/dist/{src/constants → constants}/index.d.ts +0 -0
- /package/dist/{src/constants → constants}/index.js +0 -0
- /package/dist/{src/hooks → hooks}/index.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/index.js +0 -0
- /package/dist/{src/hooks → hooks}/useDateFormatter/index.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useDateFormatter/index.js +0 -0
- /package/dist/{src/hooks → hooks}/useSmartScroll.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useSmartScroll.js +0 -0
- /package/dist/{src/hooks → hooks}/useToolMessage.d.ts +0 -0
- /package/dist/{src/hooks → hooks}/useToolMessage.js +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/index.js → index.js} +0 -0
- /package/dist/{src/types → types}/chat.d.ts +0 -0
- /package/dist/{src/types → types}/chat.js +0 -0
- /package/dist/{src/types → types}/common.d.ts +0 -0
- /package/dist/{src/types → types}/common.js +0 -0
- /package/dist/{src/types → types}/index.d.ts +0 -0
- /package/dist/{src/types → types}/index.js +0 -0
- /package/dist/{src/types → types}/messages.d.ts +0 -0
- /package/dist/{src/types → types}/messages.js +0 -0
- /package/dist/{src/types → types}/tool.d.ts +0 -0
- /package/dist/{src/types → types}/tool.js +0 -0
- /package/dist/{src/utils → utils}/chatUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/chatUtils.js +0 -0
- /package/dist/{src/utils → utils}/cn.d.ts +0 -0
- /package/dist/{src/utils → utils}/cn.js +0 -0
- /package/dist/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/index.js +0 -0
- /package/dist/{src/utils → utils}/messageTypeRegistry.d.ts +0 -0
- /package/dist/{src/utils → utils}/messageTypeRegistry.js +0 -0
- /package/dist/{src/utils → utils}/messageUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/messageUtils.js +0 -0
- /package/dist/{src/utils → utils}/validation.d.ts +0 -0
- /package/dist/{src/utils → utils}/validation.js +0 -0
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { SubmitButton } from '..';
|
|
4
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
5
|
-
import { Showcase } from '../../../../demo/Showcase';
|
|
6
|
-
import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
|
|
7
|
-
import MDXDocs from './Docs.mdx';
|
|
8
|
-
export default {
|
|
9
|
-
title: 'atoms/SubmitButton',
|
|
10
|
-
component: SubmitButton,
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
page: MDXDocs,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
argTypes: {
|
|
17
|
-
size: {
|
|
18
|
-
control: 'radio',
|
|
19
|
-
options: ['s', 'm', 'l'],
|
|
20
|
-
description: 'Button size',
|
|
21
|
-
},
|
|
22
|
-
state: {
|
|
23
|
-
control: 'radio',
|
|
24
|
-
options: ['enabled', 'disabled', 'loading', 'cancelable'],
|
|
25
|
-
description: 'Button state',
|
|
26
|
-
},
|
|
27
|
-
className: {
|
|
28
|
-
control: 'text',
|
|
29
|
-
description: 'Additional CSS class',
|
|
30
|
-
},
|
|
31
|
-
qa: {
|
|
32
|
-
control: 'text',
|
|
33
|
-
description: 'QA/test identifier',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
const defaultDecorators = [
|
|
38
|
-
(Story) => (_jsx(ContentWrapper, { children: _jsx(Showcase, { children: _jsx(Story, {}) }) })),
|
|
39
|
-
];
|
|
40
|
-
// Mock function for demonstration
|
|
41
|
-
const mockOnClick = async () => {
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
|
-
console.log('Button clicked');
|
|
44
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
45
|
-
// eslint-disable-next-line no-console
|
|
46
|
-
console.log('Action completed');
|
|
47
|
-
};
|
|
48
|
-
export const Playground = (args) => {
|
|
49
|
-
return (_jsx(ContentWrapper, { children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick })) }));
|
|
50
|
-
};
|
|
51
|
-
Playground.args = {
|
|
52
|
-
size: 'm',
|
|
53
|
-
state: 'enabled',
|
|
54
|
-
};
|
|
55
|
-
export const Enabled = (args) => {
|
|
56
|
-
return (_jsx(ContentWrapper, { children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "enabled" })) }));
|
|
57
|
-
};
|
|
58
|
-
export const Disabled = (args) => {
|
|
59
|
-
return (_jsx(ContentWrapper, { children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "disabled" })) }));
|
|
60
|
-
};
|
|
61
|
-
export const Loading = (args) => {
|
|
62
|
-
return (_jsx(ContentWrapper, { children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "loading" })) }));
|
|
63
|
-
};
|
|
64
|
-
export const Cancelable = (args) => {
|
|
65
|
-
return (_jsx(ContentWrapper, { children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "cancelable" })) }));
|
|
66
|
-
};
|
|
67
|
-
export const Size = {
|
|
68
|
-
render: (args) => {
|
|
69
|
-
return (_jsxs(_Fragment, { children: [_jsx(ShowcaseItem, { title: "Size s", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, size: "s" })) }), _jsx(ShowcaseItem, { title: "Size m", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, size: "m" })) }), _jsx(ShowcaseItem, { title: "Size l", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, size: "l" })) })] }));
|
|
70
|
-
},
|
|
71
|
-
decorators: defaultDecorators,
|
|
72
|
-
};
|
|
73
|
-
export const States = {
|
|
74
|
-
render: (args) => {
|
|
75
|
-
return (_jsxs(_Fragment, { children: [_jsx(ShowcaseItem, { title: "Enabled", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "enabled" })) }), _jsx(ShowcaseItem, { title: "Disabled", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "disabled" })) }), _jsx(ShowcaseItem, { title: "Loading", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "loading" })) }), _jsx(ShowcaseItem, { title: "Cancelable", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: mockOnClick, state: "cancelable" })) })] }));
|
|
76
|
-
},
|
|
77
|
-
decorators: defaultDecorators,
|
|
78
|
-
};
|
|
79
|
-
// Interactive story to demonstrate loading and cancelable states
|
|
80
|
-
export const Interactive = (args) => {
|
|
81
|
-
const [state, setState] = useState('enabled');
|
|
82
|
-
const handleClick = async () => {
|
|
83
|
-
if (state === 'enabled') {
|
|
84
|
-
setState('loading');
|
|
85
|
-
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
86
|
-
setState('cancelable');
|
|
87
|
-
}
|
|
88
|
-
else if (state === 'cancelable') {
|
|
89
|
-
// eslint-disable-next-line no-console
|
|
90
|
-
console.log('Cancelled');
|
|
91
|
-
setState('enabled');
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
return (_jsx(ContentWrapper, { children: _jsx(Showcase, { children: _jsx(ShowcaseItem, { title: "Click the button to see loading and cancelable states", children: _jsx(SubmitButton, Object.assign({}, args, { onClick: handleClick, state: state })) }) }) }));
|
|
95
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/react-webpack5';
|
|
2
|
-
import { ToolIndicatorProps } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Playground: StoryFn<ToolIndicatorProps>;
|
|
6
|
-
export declare const Success: StoryFn<ToolIndicatorProps>;
|
|
7
|
-
export declare const Error: StoryFn<ToolIndicatorProps>;
|
|
8
|
-
export declare const Info: StoryFn<ToolIndicatorProps>;
|
|
9
|
-
export declare const Loading: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ToolIndicator } from '..';
|
|
3
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
4
|
-
import MDXDocs from './Docs.mdx';
|
|
5
|
-
export default {
|
|
6
|
-
title: 'atoms/ToolIndicator',
|
|
7
|
-
component: ToolIndicator,
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
page: MDXDocs,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
status: {
|
|
15
|
-
control: 'radio',
|
|
16
|
-
options: ['success', 'error', 'info', 'loading'],
|
|
17
|
-
description: 'Current status of the tool execution',
|
|
18
|
-
},
|
|
19
|
-
className: {
|
|
20
|
-
control: 'text',
|
|
21
|
-
description: 'Additional CSS class',
|
|
22
|
-
},
|
|
23
|
-
qa: {
|
|
24
|
-
control: 'text',
|
|
25
|
-
description: 'QA/test identifier',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
export const Playground = (args) => (_jsx(ContentWrapper, { children: _jsx(ToolIndicator, Object.assign({}, args)) }));
|
|
30
|
-
Playground.args = { status: 'success' };
|
|
31
|
-
export const Success = (args) => (_jsx(ContentWrapper, { children: _jsx(ToolIndicator, Object.assign({}, args, { status: "success" })) }));
|
|
32
|
-
export const Error = (args) => (_jsx(ContentWrapper, { children: _jsx(ToolIndicator, Object.assign({}, args, { status: "error" })) }));
|
|
33
|
-
export const Info = (args) => (_jsx(ContentWrapper, { children: _jsx(ToolIndicator, Object.assign({}, args, { status: "info" })) }));
|
|
34
|
-
export const Loading = () => (_jsx(ContentWrapper, { children: _jsx(ToolIndicator, { status: "loading" }) }));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import type { BaseMessageProps } from '../../../../types/messages';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Playground: StoryFn<BaseMessageProps>;
|
|
6
|
-
export declare const Variant: StoryObj<BaseMessageProps>;
|
|
7
|
-
export declare const ShowActionsOnHover: StoryFn<BaseMessageProps>;
|
|
8
|
-
export declare const ShowTimestamp: StoryObj<BaseMessageProps>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BaseMessage } from '..';
|
|
3
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
4
|
-
import { Showcase } from '../../../../demo/Showcase';
|
|
5
|
-
import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
|
|
6
|
-
import MDXDocs from './Docs.mdx';
|
|
7
|
-
export default {
|
|
8
|
-
title: 'molecules/BaseMessage',
|
|
9
|
-
component: BaseMessage,
|
|
10
|
-
parameters: {
|
|
11
|
-
docs: {
|
|
12
|
-
page: MDXDocs,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
argTypes: {
|
|
16
|
-
variant: {
|
|
17
|
-
control: 'radio',
|
|
18
|
-
options: ['user', 'assistant', 'system'],
|
|
19
|
-
description: 'Type of message',
|
|
20
|
-
},
|
|
21
|
-
showActionsOnHover: {
|
|
22
|
-
control: 'boolean',
|
|
23
|
-
description: 'Show actions on hover',
|
|
24
|
-
},
|
|
25
|
-
className: {
|
|
26
|
-
control: 'text',
|
|
27
|
-
description: 'Additional CSS class',
|
|
28
|
-
},
|
|
29
|
-
qa: {
|
|
30
|
-
control: 'text',
|
|
31
|
-
description: 'QA/test identifier',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
const defaultDecorators = [
|
|
36
|
-
(Story) => (_jsx(ContentWrapper, { children: _jsx(Showcase, { children: _jsx(Story, {}) }) })),
|
|
37
|
-
];
|
|
38
|
-
const buttons = [
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
|
-
{ type: 'copy', onClick: () => console.log('copy') },
|
|
41
|
-
// eslint-disable-next-line no-console
|
|
42
|
-
{ type: 'edit', onClick: () => console.log('edit') },
|
|
43
|
-
// eslint-disable-next-line no-console
|
|
44
|
-
{ type: 'delete', onClick: () => console.log('delete') },
|
|
45
|
-
// eslint-disable-next-line no-console
|
|
46
|
-
{ type: 'custom', onClick: () => console.log('custom') },
|
|
47
|
-
// eslint-disable-next-line no-console
|
|
48
|
-
{ type: 'like', onClick: () => console.log('like') },
|
|
49
|
-
// eslint-disable-next-line no-console
|
|
50
|
-
{ type: 'unlike', onClick: () => console.log('unlike') },
|
|
51
|
-
];
|
|
52
|
-
export const Playground = (args) => (_jsx(ContentWrapper, { children: _jsx(BaseMessage, Object.assign({}, args)) }));
|
|
53
|
-
Playground.args = {
|
|
54
|
-
children: 'My message',
|
|
55
|
-
actions: buttons,
|
|
56
|
-
role: 'assistant',
|
|
57
|
-
};
|
|
58
|
-
export const Variant = {
|
|
59
|
-
render: (args) => (_jsxs(_Fragment, { children: [_jsx(ShowcaseItem, { title: "User", children: _jsx(BaseMessage, Object.assign({}, args, { actions: buttons, role: "user", children: 'My message' })) }), _jsx(ShowcaseItem, { title: "Assistant", children: _jsx(BaseMessage, Object.assign({}, args, { actions: buttons, role: "assistant", children: 'My message' })) }), _jsx(ShowcaseItem, { title: "System", children: _jsx(BaseMessage, Object.assign({}, args, { actions: buttons, role: "system", children: 'My message' })) })] })),
|
|
60
|
-
decorators: defaultDecorators,
|
|
61
|
-
};
|
|
62
|
-
export const ShowActionsOnHover = (args) => (_jsx(ContentWrapper, { children: _jsx(BaseMessage, Object.assign({}, args, { actions: buttons, role: "assistant", showActionsOnHover: true, children: 'My message' })) }));
|
|
63
|
-
export const ShowTimestamp = {
|
|
64
|
-
render: (args) => (_jsxs(_Fragment, { children: [_jsx(ShowcaseItem, { title: "User", children: _jsx(BaseMessage, Object.assign({}, args, { actions: buttons, role: "user", showTimestamp: true, timestamp: "1705312234567", children: 'My message' })) }), _jsx(ShowcaseItem, { title: "Assistant", children: _jsx(BaseMessage, Object.assign({}, args, { actions: buttons, role: "assistant", showTimestamp: true, timestamp: "1705312234567", children: 'My message' })) })] })),
|
|
65
|
-
decorators: defaultDecorators,
|
|
66
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { type ButtonGroupProps } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
export declare const Playground: StoryFn<ButtonGroupProps>;
|
|
6
|
-
export declare const Orientation: StoryObj<ButtonGroupProps>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '@gravity-ui/uikit';
|
|
3
|
-
import { ButtonGroup } from '..';
|
|
4
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
5
|
-
import { Showcase } from '../../../../demo/Showcase';
|
|
6
|
-
import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
|
|
7
|
-
import MDXDocs from './Docs.mdx';
|
|
8
|
-
export default {
|
|
9
|
-
title: 'molecules/ButtonGroup',
|
|
10
|
-
component: ButtonGroup,
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
page: MDXDocs,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
argTypes: {
|
|
17
|
-
orientation: {
|
|
18
|
-
control: 'radio',
|
|
19
|
-
options: ['horizontal', 'vertical'],
|
|
20
|
-
description: 'Orientation of buttons',
|
|
21
|
-
},
|
|
22
|
-
className: {
|
|
23
|
-
control: 'text',
|
|
24
|
-
description: 'Additional CSS class',
|
|
25
|
-
},
|
|
26
|
-
qa: {
|
|
27
|
-
control: 'text',
|
|
28
|
-
description: 'QA/test identifier',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
const defaultDecorators = [
|
|
33
|
-
(Story) => (_jsx(ContentWrapper, { children: _jsx(Showcase, { children: _jsx(Story, {}) }) })),
|
|
34
|
-
];
|
|
35
|
-
const buttonChildren = (_jsxs(_Fragment, { children: [_jsx(Button, { children: "Button 1" }), _jsx(Button, { children: "Button 2" }), _jsx(Button, { children: "Button 3" })] }));
|
|
36
|
-
export const Playground = (args) => (_jsx(ContentWrapper, { children: _jsx(ButtonGroup, Object.assign({}, args)) }));
|
|
37
|
-
Playground.args = {
|
|
38
|
-
children: buttonChildren,
|
|
39
|
-
orientation: 'horizontal',
|
|
40
|
-
};
|
|
41
|
-
export const Orientation = {
|
|
42
|
-
render: (args) => (_jsxs(_Fragment, { children: [_jsx(ShowcaseItem, { title: "Horizontal", children: _jsx(ButtonGroup, Object.assign({}, args, { orientation: "horizontal", children: buttonChildren })) }), _jsx(ShowcaseItem, { title: "Vertical", children: _jsx(ButtonGroup, Object.assign({}, args, { orientation: "vertical", children: buttonChildren })) })] })),
|
|
43
|
-
decorators: defaultDecorators,
|
|
44
|
-
};
|
package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { PromptInputBody } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof PromptInputBody>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const WithValue: Story;
|
|
8
|
-
export declare const MultiLine: Story;
|
|
9
|
-
export declare const WithMaxLength: Story;
|
|
10
|
-
export declare const WithCustomContent: Story;
|
|
11
|
-
export declare const Disabled: Story;
|
package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { PromptInputBody } from '..';
|
|
4
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
5
|
-
import { SwapArea } from '../../../../demo/SwapArea';
|
|
6
|
-
import MDXDocs from './Docs.mdx';
|
|
7
|
-
export default {
|
|
8
|
-
title: 'molecules/PromptInputBody',
|
|
9
|
-
component: PromptInputBody,
|
|
10
|
-
parameters: {
|
|
11
|
-
docs: {
|
|
12
|
-
page: MDXDocs,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const defaultDecorators = [
|
|
17
|
-
(Story) => (_jsx(ContentWrapper, { width: "450px", children: _jsx(Story, {}) })),
|
|
18
|
-
];
|
|
19
|
-
export const Playground = {
|
|
20
|
-
args: {
|
|
21
|
-
placeholder: 'Plan, code, build and test anything',
|
|
22
|
-
},
|
|
23
|
-
decorators: defaultDecorators,
|
|
24
|
-
};
|
|
25
|
-
export const WithValue = {
|
|
26
|
-
render: (args) => {
|
|
27
|
-
const [value, setValue] = useState('Hello, this is a test message!');
|
|
28
|
-
return (_jsx(PromptInputBody, Object.assign({}, args, { value: value, onChange: setValue, placeholder: "Plan, code, build and test anything" })));
|
|
29
|
-
},
|
|
30
|
-
decorators: defaultDecorators,
|
|
31
|
-
};
|
|
32
|
-
export const MultiLine = {
|
|
33
|
-
render: (args) => {
|
|
34
|
-
const [value, setValue] = useState('This is a multi-line\ntext input\nwith several lines\nof content');
|
|
35
|
-
return (_jsx(PromptInputBody, Object.assign({}, args, { value: value, onChange: setValue, placeholder: "Plan, code, build and test anything", minRows: 3, maxRows: 10 })));
|
|
36
|
-
},
|
|
37
|
-
decorators: defaultDecorators,
|
|
38
|
-
};
|
|
39
|
-
export const WithMaxLength = {
|
|
40
|
-
render: (args) => {
|
|
41
|
-
const [value, setValue] = useState('');
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsx(PromptInputBody, Object.assign({}, args, { value: value, onChange: setValue, placeholder: "Maximum 100 characters", maxLength: 100 })), _jsxs("div", { style: {
|
|
43
|
-
marginTop: '8px',
|
|
44
|
-
fontSize: '12px',
|
|
45
|
-
color: 'var(--g-color-text-secondary)',
|
|
46
|
-
}, children: [value.length, " / 100 characters"] })] }));
|
|
47
|
-
},
|
|
48
|
-
decorators: defaultDecorators,
|
|
49
|
-
};
|
|
50
|
-
export const WithCustomContent = {
|
|
51
|
-
args: {
|
|
52
|
-
children: _jsx(SwapArea, {}),
|
|
53
|
-
},
|
|
54
|
-
decorators: defaultDecorators,
|
|
55
|
-
};
|
|
56
|
-
export const Disabled = {
|
|
57
|
-
render: (args) => {
|
|
58
|
-
const [value, setValue] = useState('This input is disabled');
|
|
59
|
-
return (_jsx(PromptInputBody, Object.assign({}, args, { value: value, onChange: setValue, placeholder: "Plan, code, build and test anything", disabledInput: true })));
|
|
60
|
-
},
|
|
61
|
-
decorators: defaultDecorators,
|
|
62
|
-
};
|
package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { PromptInputFooter } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof PromptInputFooter>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const WithAllIcons: Story;
|
|
8
|
-
export declare const DisabledButton: Story;
|
|
9
|
-
export declare const LoadingButton: Story;
|
|
10
|
-
export declare const CancelableButton: Story;
|
|
11
|
-
export declare const WithCustomContent: Story;
|
package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PromptInputFooter } from '..';
|
|
3
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
4
|
-
import { SwapArea } from '../../../../demo/SwapArea';
|
|
5
|
-
import MDXDocs from './Docs.mdx';
|
|
6
|
-
export default {
|
|
7
|
-
title: 'molecules/PromptInputFooter',
|
|
8
|
-
component: PromptInputFooter,
|
|
9
|
-
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
page: MDXDocs,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
const defaultDecorators = [
|
|
16
|
-
(Story) => (_jsx(ContentWrapper, { width: "450px", children: _jsx(Story, {}) })),
|
|
17
|
-
];
|
|
18
|
-
export const Playground = {
|
|
19
|
-
args: {
|
|
20
|
-
submitButton: {
|
|
21
|
-
// eslint-disable-next-line no-console
|
|
22
|
-
onClick: async () => console.log('Submit clicked'),
|
|
23
|
-
state: 'enabled',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
decorators: defaultDecorators,
|
|
27
|
-
};
|
|
28
|
-
export const WithAllIcons = {
|
|
29
|
-
args: {
|
|
30
|
-
submitButton: {
|
|
31
|
-
// eslint-disable-next-line no-console
|
|
32
|
-
onClick: async () => console.log('Submit clicked'),
|
|
33
|
-
state: 'enabled',
|
|
34
|
-
},
|
|
35
|
-
showSettings: true,
|
|
36
|
-
showAttachment: true,
|
|
37
|
-
showMicrophone: true,
|
|
38
|
-
// eslint-disable-next-line no-console
|
|
39
|
-
onSettingsClick: () => console.log('Settings clicked'),
|
|
40
|
-
// eslint-disable-next-line no-console
|
|
41
|
-
onAttachmentClick: () => console.log('Attachment clicked'),
|
|
42
|
-
// eslint-disable-next-line no-console
|
|
43
|
-
onMicrophoneClick: () => console.log('Microphone clicked'),
|
|
44
|
-
},
|
|
45
|
-
decorators: defaultDecorators,
|
|
46
|
-
};
|
|
47
|
-
export const DisabledButton = {
|
|
48
|
-
args: {
|
|
49
|
-
submitButton: {
|
|
50
|
-
// eslint-disable-next-line no-console
|
|
51
|
-
onClick: async () => console.log('Submit clicked'),
|
|
52
|
-
state: 'disabled',
|
|
53
|
-
},
|
|
54
|
-
showSettings: true,
|
|
55
|
-
showAttachment: true,
|
|
56
|
-
showMicrophone: true,
|
|
57
|
-
},
|
|
58
|
-
decorators: defaultDecorators,
|
|
59
|
-
};
|
|
60
|
-
export const LoadingButton = {
|
|
61
|
-
args: {
|
|
62
|
-
submitButton: {
|
|
63
|
-
// eslint-disable-next-line no-console
|
|
64
|
-
onClick: async () => console.log('Submit clicked'),
|
|
65
|
-
state: 'loading',
|
|
66
|
-
},
|
|
67
|
-
showSettings: true,
|
|
68
|
-
showAttachment: true,
|
|
69
|
-
showMicrophone: true,
|
|
70
|
-
},
|
|
71
|
-
decorators: defaultDecorators,
|
|
72
|
-
};
|
|
73
|
-
export const CancelableButton = {
|
|
74
|
-
args: {
|
|
75
|
-
submitButton: {
|
|
76
|
-
// eslint-disable-next-line no-console
|
|
77
|
-
onClick: async () => console.log('Cancel clicked'),
|
|
78
|
-
state: 'cancelable',
|
|
79
|
-
},
|
|
80
|
-
showSettings: true,
|
|
81
|
-
showAttachment: true,
|
|
82
|
-
showMicrophone: true,
|
|
83
|
-
},
|
|
84
|
-
decorators: defaultDecorators,
|
|
85
|
-
};
|
|
86
|
-
export const WithCustomContent = {
|
|
87
|
-
args: {
|
|
88
|
-
submitButton: {
|
|
89
|
-
// eslint-disable-next-line no-console
|
|
90
|
-
onClick: async () => console.log('Submit clicked'),
|
|
91
|
-
state: 'enabled',
|
|
92
|
-
},
|
|
93
|
-
children: _jsx(SwapArea, {}),
|
|
94
|
-
},
|
|
95
|
-
decorators: defaultDecorators,
|
|
96
|
-
};
|
package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { PromptInputHeader } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof PromptInputHeader>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const WithContextItems: Story;
|
|
8
|
-
export declare const WithSingleContextItem: Story;
|
|
9
|
-
export declare const WithManyContextItems: Story;
|
|
10
|
-
export declare const WithContextItemsAndIndicator: Story;
|
|
11
|
-
export declare const WithContextIndicator: Story;
|
|
12
|
-
export declare const WithContextIndicatorNumber: Story;
|
|
13
|
-
export declare const WithCustomContent: Story;
|
package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { PromptInputHeader } from '..';
|
|
4
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
5
|
-
import { SwapArea } from '../../../../demo/SwapArea';
|
|
6
|
-
import MDXDocs from './Docs.mdx';
|
|
7
|
-
export default {
|
|
8
|
-
title: 'molecules/PromptInputHeader',
|
|
9
|
-
component: PromptInputHeader,
|
|
10
|
-
parameters: {
|
|
11
|
-
docs: {
|
|
12
|
-
page: MDXDocs,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const defaultDecorators = [
|
|
17
|
-
(Story) => (_jsx(ContentWrapper, { width: "450px", children: _jsx(Story, {}) })),
|
|
18
|
-
];
|
|
19
|
-
export const Playground = {
|
|
20
|
-
args: {},
|
|
21
|
-
decorators: defaultDecorators,
|
|
22
|
-
};
|
|
23
|
-
export const WithContextItems = {
|
|
24
|
-
render: (args) => {
|
|
25
|
-
const [items, setItems] = useState([
|
|
26
|
-
{ id: '1', content: 'file.tsx', onRemove: () => { } },
|
|
27
|
-
{ id: '2', content: 'component.tsx', onRemove: () => { } },
|
|
28
|
-
{ id: '3', content: 'utils.ts', onRemove: () => { } },
|
|
29
|
-
]);
|
|
30
|
-
const handleRemove = (id) => {
|
|
31
|
-
setItems(items.filter((item) => item.id !== id));
|
|
32
|
-
};
|
|
33
|
-
return (_jsx(PromptInputHeader, Object.assign({}, args, { contextItems: items.map((item) => (Object.assign(Object.assign({}, item), { onRemove: () => handleRemove(item.id) }))) })));
|
|
34
|
-
},
|
|
35
|
-
decorators: defaultDecorators,
|
|
36
|
-
};
|
|
37
|
-
export const WithSingleContextItem = {
|
|
38
|
-
args: {
|
|
39
|
-
contextItems: [
|
|
40
|
-
{
|
|
41
|
-
id: '1',
|
|
42
|
-
content: 'README.md',
|
|
43
|
-
onRemove: () => {
|
|
44
|
-
// Handle remove
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
decorators: defaultDecorators,
|
|
50
|
-
};
|
|
51
|
-
export const WithManyContextItems = {
|
|
52
|
-
args: {
|
|
53
|
-
contextItems: [
|
|
54
|
-
{ id: '1', content: 'file1.tsx', onRemove: () => { } },
|
|
55
|
-
{ id: '2', content: 'file2.tsx', onRemove: () => { } },
|
|
56
|
-
{ id: '3', content: 'file3.tsx', onRemove: () => { } },
|
|
57
|
-
{ id: '4', content: 'file4.tsx', onRemove: () => { } },
|
|
58
|
-
{ id: '5', content: 'file5.tsx', onRemove: () => { } },
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
decorators: defaultDecorators,
|
|
62
|
-
};
|
|
63
|
-
export const WithContextItemsAndIndicator = {
|
|
64
|
-
args: {
|
|
65
|
-
contextItems: [
|
|
66
|
-
{ id: '1', content: 'file.tsx', onRemove: () => { } },
|
|
67
|
-
{ id: '2', content: 'component.tsx', onRemove: () => { } },
|
|
68
|
-
],
|
|
69
|
-
showContextIndicator: true,
|
|
70
|
-
contextIndicatorProps: {
|
|
71
|
-
type: 'percent',
|
|
72
|
-
usedContext: 75,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
decorators: defaultDecorators,
|
|
76
|
-
};
|
|
77
|
-
export const WithContextIndicator = {
|
|
78
|
-
args: {
|
|
79
|
-
showContextIndicator: true,
|
|
80
|
-
contextIndicatorProps: {
|
|
81
|
-
type: 'percent',
|
|
82
|
-
usedContext: 24,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
decorators: defaultDecorators,
|
|
86
|
-
};
|
|
87
|
-
export const WithContextIndicatorNumber = {
|
|
88
|
-
args: {
|
|
89
|
-
showContextIndicator: true,
|
|
90
|
-
contextIndicatorProps: {
|
|
91
|
-
type: 'number',
|
|
92
|
-
usedContext: 2400,
|
|
93
|
-
maxContext: 10000,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
decorators: defaultDecorators,
|
|
97
|
-
};
|
|
98
|
-
export const WithCustomContent = {
|
|
99
|
-
args: {
|
|
100
|
-
children: _jsx(SwapArea, {}),
|
|
101
|
-
},
|
|
102
|
-
decorators: defaultDecorators,
|
|
103
|
-
};
|
package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import { PromptInputPanel } from '..';
|
|
3
|
-
declare const _default: Meta;
|
|
4
|
-
export default _default;
|
|
5
|
-
type Story = StoryObj<typeof PromptInputPanel>;
|
|
6
|
-
export declare const Playground: Story;
|
|
7
|
-
export declare const WithSwapArea: Story;
|
|
8
|
-
export declare const WithContentAndCloseButton: Story;
|
package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Xmark } from '@gravity-ui/icons';
|
|
3
|
-
import { Button, Icon } from '@gravity-ui/uikit';
|
|
4
|
-
import { PromptInputPanel } from '..';
|
|
5
|
-
import { ContentWrapper } from '../../../../demo/ContentWrapper';
|
|
6
|
-
import { SwapArea } from '../../../../demo/SwapArea';
|
|
7
|
-
import { ActionButton } from '../../../atoms/ActionButton';
|
|
8
|
-
import MDXDocs from './Docs.mdx';
|
|
9
|
-
export default {
|
|
10
|
-
title: 'molecules/PromptInputPanel',
|
|
11
|
-
component: PromptInputPanel,
|
|
12
|
-
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
page: MDXDocs,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
const defaultDecorators = [
|
|
19
|
-
(Story) => (_jsx(ContentWrapper, { children: _jsx(Story, {}) })),
|
|
20
|
-
];
|
|
21
|
-
export const Playground = {
|
|
22
|
-
args: {
|
|
23
|
-
children: 'This is the panel content',
|
|
24
|
-
},
|
|
25
|
-
decorators: defaultDecorators,
|
|
26
|
-
};
|
|
27
|
-
export const WithSwapArea = {
|
|
28
|
-
args: {
|
|
29
|
-
children: _jsx(SwapArea, {}),
|
|
30
|
-
},
|
|
31
|
-
decorators: defaultDecorators,
|
|
32
|
-
};
|
|
33
|
-
export const WithContentAndCloseButton = {
|
|
34
|
-
args: {
|
|
35
|
-
children: (_jsxs(_Fragment, { children: [_jsx("div", { style: { flex: 1 }, children: _jsx("span", { children: "Upgrade your plan to Business to unlock all features" }) }), _jsx(Button, { view: "action", size: "m", children: "Upgrade" }), _jsx(ActionButton, { view: "flat", size: "m", onClick: () => { }, children: _jsx(Icon, { data: Xmark, size: 16 }) })] })),
|
|
36
|
-
},
|
|
37
|
-
decorators: defaultDecorators,
|
|
38
|
-
};
|