@gravity-ui/aikit 0.1.0 → 0.1.2

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.
Files changed (396) hide show
  1. package/dist/{src/components → components}/atoms/ActionButton/ActionButton.js +1 -11
  2. package/dist/components/atoms/Alert/Alert.scss +29 -0
  3. package/dist/components/atoms/ChatDate/ChatDate.scss +15 -0
  4. package/dist/components/atoms/ChatDate/i18n/en.json +8 -0
  5. package/dist/components/atoms/ChatDate/i18n/ru.json +10 -0
  6. package/dist/components/atoms/ContextIndicator/ContextIndicator.scss +93 -0
  7. package/dist/components/atoms/DiffStat/DiffStat.scss +36 -0
  8. package/dist/components/atoms/Disclaimer/Disclaimer.scss +13 -0
  9. package/dist/components/atoms/Loader/Loader.scss +72 -0
  10. package/dist/components/atoms/MarkdownRenderer/MarkdownRenderer.scss +5 -0
  11. package/dist/components/atoms/MessageBalloon/MessageBalloon.scss +11 -0
  12. package/dist/components/atoms/Shimmer/Shimmer.scss +32 -0
  13. package/dist/components/atoms/SubmitButton/SubmitButton.scss +29 -0
  14. package/dist/components/atoms/SubmitButton/i18n/en.json +3 -0
  15. package/dist/components/atoms/SubmitButton/i18n/ru.json +3 -0
  16. package/dist/components/atoms/ToolIndicator/ToolIndicator.scss +15 -0
  17. package/dist/components/molecules/BaseMessage/BaseMessage.scss +41 -0
  18. package/dist/components/molecules/BaseMessage/i18n/en.json +8 -0
  19. package/dist/components/molecules/BaseMessage/i18n/ru.json +8 -0
  20. package/dist/components/molecules/ButtonGroup/ButtonGroup.scss +19 -0
  21. package/dist/components/molecules/PromptInputBody/PromptInputBody.scss +22 -0
  22. package/dist/components/molecules/PromptInputFooter/PromptInputFooter.scss +25 -0
  23. package/dist/components/molecules/PromptInputFooter/i18n/en.json +5 -0
  24. package/dist/components/molecules/PromptInputFooter/i18n/ru.json +5 -0
  25. package/dist/components/molecules/PromptInputHeader/PromptInputHeader.scss +27 -0
  26. package/dist/components/molecules/PromptInputPanel/PromptInputPanel.scss +11 -0
  27. package/dist/components/molecules/Suggestions/Suggestions.scss +73 -0
  28. package/dist/components/molecules/Tabs/Tabs.scss +46 -0
  29. package/dist/components/molecules/Tabs/i18n/en.json +3 -0
  30. package/dist/components/molecules/Tabs/i18n/ru.json +3 -0
  31. package/dist/components/molecules/ToolFooter/ToolFooter.scss +15 -0
  32. package/dist/components/molecules/ToolHeader/ToolHeader.scss +24 -0
  33. package/dist/components/organisms/AssistantMessage/AssistantMessage.scss +10 -0
  34. package/dist/components/organisms/Header/Header.scss +51 -0
  35. package/dist/components/organisms/Header/i18n/en.json +7 -0
  36. package/dist/components/organisms/Header/i18n/ru.json +7 -0
  37. package/dist/components/organisms/MessageList/MessageList.scss +30 -0
  38. package/dist/components/organisms/MessageList/i18n/en.json +4 -0
  39. package/dist/components/organisms/MessageList/i18n/ru.json +4 -0
  40. package/dist/components/organisms/PromptInput/PromptInput.scss +73 -0
  41. package/dist/components/organisms/ThinkingMessage/ThinkingMessage.scss +27 -0
  42. package/dist/components/organisms/ThinkingMessage/i18n/en.json +4 -0
  43. package/dist/components/organisms/ThinkingMessage/i18n/ru.json +4 -0
  44. package/dist/{src/components → components}/organisms/ThinkingMessage/index.js +1 -11
  45. package/dist/components/organisms/ToolMessage/ToolMessage.scss +19 -0
  46. package/dist/components/organisms/ToolMessage/i18n/en.json +9 -0
  47. package/dist/components/organisms/ToolMessage/i18n/ru.json +9 -0
  48. package/dist/components/organisms/UserMessage/UserMessage.scss +10 -0
  49. package/dist/components/pages/ChatContainer/ChatContainer.scss +41 -0
  50. package/dist/components/pages/ChatContainer/i18n/en.json +10 -0
  51. package/dist/components/pages/ChatContainer/i18n/ru.json +10 -0
  52. package/dist/components/templates/ChatContent/ChatContent.scss +27 -0
  53. package/dist/components/templates/EmptyContainer/EmptyContainer.scss +86 -0
  54. package/dist/components/templates/EmptyContainer/i18n/en.json +3 -0
  55. package/dist/components/templates/EmptyContainer/i18n/ru.json +3 -0
  56. package/dist/components/templates/History/History.scss +90 -0
  57. package/dist/components/templates/History/i18n/en.json +7 -0
  58. package/dist/components/templates/History/i18n/ru.json +7 -0
  59. package/dist/styles/_functions.scss +5 -0
  60. package/dist/styles/styles.scss +1 -0
  61. package/dist/styles/variables.scss +1 -0
  62. package/dist/themes/dark.css +19 -0
  63. package/dist/themes/light.css +19 -0
  64. package/dist/themes/variables.css +63 -0
  65. package/package.json +35 -5
  66. package/dist/.storybook/theme.d.ts +0 -6
  67. package/dist/.storybook/theme.js +0 -28
  68. package/dist/package.json +0 -111
  69. package/dist/src/components/atoms/ActionButton/__stories__/ActionButton.stories.d.ts +0 -8
  70. package/dist/src/components/atoms/ActionButton/__stories__/ActionButton.stories.js +0 -48
  71. package/dist/src/components/atoms/Alert/__stories__/Alert.stories.d.ts +0 -9
  72. package/dist/src/components/atoms/Alert/__stories__/Alert.stories.js +0 -56
  73. package/dist/src/components/atoms/ChatDate/__stories__/ChatDate.stories.d.ts +0 -16
  74. package/dist/src/components/atoms/ChatDate/__stories__/ChatDate.stories.js +0 -83
  75. package/dist/src/components/atoms/ChatDate/i18n/en.json +0 -8
  76. package/dist/src/components/atoms/ChatDate/i18n/ru.json +0 -10
  77. package/dist/src/components/atoms/ContextIndicator/__stories__/ContextIndicator.stories.d.ts +0 -17
  78. package/dist/src/components/atoms/ContextIndicator/__stories__/ContextIndicator.stories.js +0 -72
  79. package/dist/src/components/atoms/ContextItem/__stories__/ContextItem.stories.d.ts +0 -6
  80. package/dist/src/components/atoms/ContextItem/__stories__/ContextItem.stories.js +0 -32
  81. package/dist/src/components/atoms/DiffStat/__stories__/DiffStat.stories.d.ts +0 -7
  82. package/dist/src/components/atoms/DiffStat/__stories__/DiffStat.stories.js +0 -45
  83. package/dist/src/components/atoms/Disclaimer/__stories__/Disclaimer.stories.d.ts +0 -8
  84. package/dist/src/components/atoms/Disclaimer/__stories__/Disclaimer.stories.js +0 -32
  85. package/dist/src/components/atoms/Loader/__stories__/Loader.stories.d.ts +0 -8
  86. package/dist/src/components/atoms/Loader/__stories__/Loader.stories.js +0 -47
  87. package/dist/src/components/atoms/MarkdownRenderer/__stories__/MarkdownRenderer.stories.d.ts +0 -6
  88. package/dist/src/components/atoms/MarkdownRenderer/__stories__/MarkdownRenderer.stories.js +0 -49
  89. package/dist/src/components/atoms/MessageBalloon/__stories__/MessageBalloon.stories.d.ts +0 -6
  90. package/dist/src/components/atoms/MessageBalloon/__stories__/MessageBalloon.stories.js +0 -32
  91. package/dist/src/components/atoms/Shimmer/__stories__/Shimmer.stories.d.ts +0 -5
  92. package/dist/src/components/atoms/Shimmer/__stories__/Shimmer.stories.js +0 -28
  93. package/dist/src/components/atoms/SubmitButton/__stories__/SubmitButton.stories.d.ts +0 -12
  94. package/dist/src/components/atoms/SubmitButton/__stories__/SubmitButton.stories.js +0 -95
  95. package/dist/src/components/atoms/SubmitButton/i18n/en.json +0 -3
  96. package/dist/src/components/atoms/SubmitButton/i18n/ru.json +0 -3
  97. package/dist/src/components/atoms/ToolIndicator/__stories__/ToolIndicator.stories.d.ts +0 -9
  98. package/dist/src/components/atoms/ToolIndicator/__stories__/ToolIndicator.stories.js +0 -34
  99. package/dist/src/components/molecules/BaseMessage/__stories__/BaseMessage.stories.d.ts +0 -8
  100. package/dist/src/components/molecules/BaseMessage/__stories__/BaseMessage.stories.js +0 -66
  101. package/dist/src/components/molecules/BaseMessage/i18n/en.json +0 -8
  102. package/dist/src/components/molecules/BaseMessage/i18n/ru.json +0 -8
  103. package/dist/src/components/molecules/ButtonGroup/__stories__/ButtonGroup.stories.d.ts +0 -6
  104. package/dist/src/components/molecules/ButtonGroup/__stories__/ButtonGroup.stories.js +0 -44
  105. package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.d.ts +0 -11
  106. package/dist/src/components/molecules/PromptInputBody/__stories__/PromptInputBody.stories.js +0 -62
  107. package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.d.ts +0 -11
  108. package/dist/src/components/molecules/PromptInputFooter/__stories__/PromptInputFooter.stories.js +0 -96
  109. package/dist/src/components/molecules/PromptInputFooter/i18n/en.json +0 -5
  110. package/dist/src/components/molecules/PromptInputFooter/i18n/ru.json +0 -5
  111. package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.d.ts +0 -13
  112. package/dist/src/components/molecules/PromptInputHeader/__stories__/PromptInputHeader.stories.js +0 -103
  113. package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.d.ts +0 -8
  114. package/dist/src/components/molecules/PromptInputPanel/__stories__/PromptInputPanel.stories.js +0 -38
  115. package/dist/src/components/molecules/Suggestions/__stories__/Suggestions.stories.d.ts +0 -19
  116. package/dist/src/components/molecules/Suggestions/__stories__/Suggestions.stories.js +0 -143
  117. package/dist/src/components/molecules/Tabs/__stories__/Tabs.stories.d.ts +0 -9
  118. package/dist/src/components/molecules/Tabs/__stories__/Tabs.stories.js +0 -103
  119. package/dist/src/components/molecules/Tabs/i18n/en.json +0 -3
  120. package/dist/src/components/molecules/Tabs/i18n/ru.json +0 -3
  121. package/dist/src/components/molecules/ToolFooter/__stories__/ToolFooter.stories.d.ts +0 -7
  122. package/dist/src/components/molecules/ToolFooter/__stories__/ToolFooter.stories.js +0 -58
  123. package/dist/src/components/molecules/ToolHeader/__stories__/ToolHeader.stories.d.ts +0 -7
  124. package/dist/src/components/molecules/ToolHeader/__stories__/ToolHeader.stories.js +0 -55
  125. package/dist/src/components/organisms/AssistantMessage/__stories__/AssistantMessage.stories.d.ts +0 -13
  126. package/dist/src/components/organisms/AssistantMessage/__stories__/AssistantMessage.stories.js +0 -151
  127. package/dist/src/components/organisms/Header/__stories__/Header.stories.d.ts +0 -13
  128. package/dist/src/components/organisms/Header/__stories__/Header.stories.js +0 -130
  129. package/dist/src/components/organisms/Header/i18n/en.json +0 -7
  130. package/dist/src/components/organisms/Header/i18n/ru.json +0 -7
  131. package/dist/src/components/organisms/MessageList/__stories__/MessageList.stories.d.ts +0 -24
  132. package/dist/src/components/organisms/MessageList/__stories__/MessageList.stories.js +0 -288
  133. package/dist/src/components/organisms/MessageList/i18n/en.json +0 -4
  134. package/dist/src/components/organisms/MessageList/i18n/ru.json +0 -4
  135. package/dist/src/components/organisms/PromptInput/__stories__/PromptInput.stories.d.ts +0 -18
  136. package/dist/src/components/organisms/PromptInput/__stories__/PromptInput.stories.js +0 -278
  137. package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.d.ts +0 -12
  138. package/dist/src/components/organisms/ThinkingMessage/__stories__/ThinkingMessage.stories.js +0 -107
  139. package/dist/src/components/organisms/ThinkingMessage/i18n/en.json +0 -4
  140. package/dist/src/components/organisms/ThinkingMessage/i18n/ru.json +0 -4
  141. package/dist/src/components/organisms/ToolMessage/__stories__/ToolMessage.stories.d.ts +0 -11
  142. package/dist/src/components/organisms/ToolMessage/__stories__/ToolMessage.stories.js +0 -70
  143. package/dist/src/components/organisms/ToolMessage/i18n/en.json +0 -9
  144. package/dist/src/components/organisms/ToolMessage/i18n/ru.json +0 -9
  145. package/dist/src/components/organisms/UserMessage/__stories__/UserMessage.stories.d.ts +0 -7
  146. package/dist/src/components/organisms/UserMessage/__stories__/UserMessage.stories.js +0 -70
  147. package/dist/src/components/pages/ChatContainer/__stories__/ChatContainer.stories.d.ts +0 -53
  148. package/dist/src/components/pages/ChatContainer/__stories__/ChatContainer.stories.js +0 -743
  149. package/dist/src/components/pages/ChatContainer/i18n/en.json +0 -10
  150. package/dist/src/components/pages/ChatContainer/i18n/ru.json +0 -10
  151. package/dist/src/components/templates/ChatContent/__stories__/ChatContent.stories.d.ts +0 -14
  152. package/dist/src/components/templates/ChatContent/__stories__/ChatContent.stories.js +0 -327
  153. package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.d.ts +0 -20
  154. package/dist/src/components/templates/EmptyContainer/__stories__/EmptyContainer.stories.js +0 -250
  155. package/dist/src/components/templates/EmptyContainer/i18n/en.json +0 -3
  156. package/dist/src/components/templates/EmptyContainer/i18n/ru.json +0 -3
  157. package/dist/src/components/templates/History/__stories__/History.stories.d.ts +0 -17
  158. package/dist/src/components/templates/History/__stories__/History.stories.js +0 -281
  159. package/dist/src/components/templates/History/i18n/en.json +0 -7
  160. package/dist/src/components/templates/History/i18n/ru.json +0 -7
  161. package/dist/src/demo/ContentWrapper/ContentWrapper.d.ts +0 -4
  162. package/dist/src/demo/ContentWrapper/ContentWrapper.js +0 -19
  163. package/dist/src/demo/ContentWrapper/index.d.ts +0 -1
  164. package/dist/src/demo/ContentWrapper/index.js +0 -1
  165. package/dist/src/demo/DocsDecorator/DocsDecorator.d.ts +0 -6
  166. package/dist/src/demo/DocsDecorator/DocsDecorator.js +0 -12
  167. package/dist/src/demo/DocsDecorator/ThemeContext.d.ts +0 -2
  168. package/dist/src/demo/DocsDecorator/ThemeContext.js +0 -2
  169. package/dist/src/demo/Showcase/Showcase.d.ts +0 -9
  170. package/dist/src/demo/Showcase/Showcase.js +0 -7
  171. package/dist/src/demo/Showcase/index.d.ts +0 -1
  172. package/dist/src/demo/Showcase/index.js +0 -1
  173. package/dist/src/demo/ShowcaseItem/ShowcaseItem.d.ts +0 -7
  174. package/dist/src/demo/ShowcaseItem/ShowcaseItem.js +0 -7
  175. package/dist/src/demo/ShowcaseItem/index.d.ts +0 -1
  176. package/dist/src/demo/ShowcaseItem/index.js +0 -1
  177. package/dist/src/demo/SwapArea/SwapArea.d.ts +0 -2
  178. package/dist/src/demo/SwapArea/SwapArea.js +0 -7
  179. package/dist/src/demo/SwapArea/index.d.ts +0 -1
  180. package/dist/src/demo/SwapArea/index.js +0 -1
  181. /package/dist/{src/components → components}/atoms/ActionButton/ActionButton.d.ts +0 -0
  182. /package/dist/{src/components → components}/atoms/ActionButton/index.d.ts +0 -0
  183. /package/dist/{src/components → components}/atoms/ActionButton/index.js +0 -0
  184. /package/dist/{src/components → components}/atoms/Alert/index.d.ts +0 -0
  185. /package/dist/{src/components → components}/atoms/Alert/index.js +0 -0
  186. /package/dist/{src/components → components}/atoms/ChatDate/ChatDate.d.ts +0 -0
  187. /package/dist/{src/components → components}/atoms/ChatDate/ChatDate.js +0 -0
  188. /package/dist/{src/components → components}/atoms/ChatDate/i18n/index.d.ts +0 -0
  189. /package/dist/{src/components → components}/atoms/ChatDate/i18n/index.js +0 -0
  190. /package/dist/{src/components → components}/atoms/ChatDate/index.d.ts +0 -0
  191. /package/dist/{src/components → components}/atoms/ChatDate/index.js +0 -0
  192. /package/dist/{src/components → components}/atoms/ContextIndicator/index.d.ts +0 -0
  193. /package/dist/{src/components → components}/atoms/ContextIndicator/index.js +0 -0
  194. /package/dist/{src/components → components}/atoms/ContextIndicator/utils.d.ts +0 -0
  195. /package/dist/{src/components → components}/atoms/ContextIndicator/utils.js +0 -0
  196. /package/dist/{src/components → components}/atoms/ContextItem/index.d.ts +0 -0
  197. /package/dist/{src/components → components}/atoms/ContextItem/index.js +0 -0
  198. /package/dist/{src/components → components}/atoms/DiffStat/index.d.ts +0 -0
  199. /package/dist/{src/components → components}/atoms/DiffStat/index.js +0 -0
  200. /package/dist/{src/components → components}/atoms/Disclaimer/Disclaimer.d.ts +0 -0
  201. /package/dist/{src/components → components}/atoms/Disclaimer/Disclaimer.js +0 -0
  202. /package/dist/{src/components → components}/atoms/Disclaimer/index.d.ts +0 -0
  203. /package/dist/{src/components → components}/atoms/Disclaimer/index.js +0 -0
  204. /package/dist/{src/components → components}/atoms/InlineCitation/index.d.ts +0 -0
  205. /package/dist/{src/components → components}/atoms/InlineCitation/index.js +0 -0
  206. /package/dist/{src/components → components}/atoms/Loader/Loader.d.ts +0 -0
  207. /package/dist/{src/components → components}/atoms/Loader/Loader.js +0 -0
  208. /package/dist/{src/components → components}/atoms/Loader/index.d.ts +0 -0
  209. /package/dist/{src/components → components}/atoms/Loader/index.js +0 -0
  210. /package/dist/{src/components → components}/atoms/MarkdownRenderer/MarkdownRenderer.d.ts +0 -0
  211. /package/dist/{src/components → components}/atoms/MarkdownRenderer/MarkdownRenderer.js +0 -0
  212. /package/dist/{src/components → components}/atoms/MarkdownRenderer/index.d.ts +0 -0
  213. /package/dist/{src/components → components}/atoms/MarkdownRenderer/index.js +0 -0
  214. /package/dist/{src/components → components}/atoms/MessageBalloon/index.d.ts +0 -0
  215. /package/dist/{src/components → components}/atoms/MessageBalloon/index.js +0 -0
  216. /package/dist/{src/components → components}/atoms/Shimmer/index.d.ts +0 -0
  217. /package/dist/{src/components → components}/atoms/Shimmer/index.js +0 -0
  218. /package/dist/{src/components → components}/atoms/SubmitButton/SubmitButton.d.ts +0 -0
  219. /package/dist/{src/components → components}/atoms/SubmitButton/SubmitButton.js +0 -0
  220. /package/dist/{src/components → components}/atoms/SubmitButton/i18n/index.d.ts +0 -0
  221. /package/dist/{src/components → components}/atoms/SubmitButton/i18n/index.js +0 -0
  222. /package/dist/{src/components → components}/atoms/SubmitButton/index.d.ts +0 -0
  223. /package/dist/{src/components → components}/atoms/SubmitButton/index.js +0 -0
  224. /package/dist/{src/components → components}/atoms/ToolIndicator/index.d.ts +0 -0
  225. /package/dist/{src/components → components}/atoms/ToolIndicator/index.js +0 -0
  226. /package/dist/{src/components → components}/atoms/index.d.ts +0 -0
  227. /package/dist/{src/components → components}/atoms/index.js +0 -0
  228. /package/dist/{src/components → components}/index.d.ts +0 -0
  229. /package/dist/{src/components → components}/index.js +0 -0
  230. /package/dist/{src/components → components}/molecules/BaseMessage/i18n/index.d.ts +0 -0
  231. /package/dist/{src/components → components}/molecules/BaseMessage/i18n/index.js +0 -0
  232. /package/dist/{src/components → components}/molecules/BaseMessage/index.d.ts +0 -0
  233. /package/dist/{src/components → components}/molecules/BaseMessage/index.js +0 -0
  234. /package/dist/{src/components → components}/molecules/ButtonGroup/index.d.ts +0 -0
  235. /package/dist/{src/components → components}/molecules/ButtonGroup/index.js +0 -0
  236. /package/dist/{src/components → components}/molecules/InputContext/index.d.ts +0 -0
  237. /package/dist/{src/components → components}/molecules/InputContext/index.js +0 -0
  238. /package/dist/{src/components → components}/molecules/PromptInputBody/PromptInputBody.d.ts +0 -0
  239. /package/dist/{src/components → components}/molecules/PromptInputBody/PromptInputBody.js +0 -0
  240. /package/dist/{src/components → components}/molecules/PromptInputBody/index.d.ts +0 -0
  241. /package/dist/{src/components → components}/molecules/PromptInputBody/index.js +0 -0
  242. /package/dist/{src/components → components}/molecules/PromptInputFooter/PromptInputFooter.d.ts +0 -0
  243. /package/dist/{src/components → components}/molecules/PromptInputFooter/PromptInputFooter.js +0 -0
  244. /package/dist/{src/components → components}/molecules/PromptInputFooter/i18n/index.d.ts +0 -0
  245. /package/dist/{src/components → components}/molecules/PromptInputFooter/i18n/index.js +0 -0
  246. /package/dist/{src/components → components}/molecules/PromptInputFooter/index.d.ts +0 -0
  247. /package/dist/{src/components → components}/molecules/PromptInputFooter/index.js +0 -0
  248. /package/dist/{src/components → components}/molecules/PromptInputHeader/PromptInputHeader.d.ts +0 -0
  249. /package/dist/{src/components → components}/molecules/PromptInputHeader/PromptInputHeader.js +0 -0
  250. /package/dist/{src/components → components}/molecules/PromptInputHeader/index.d.ts +0 -0
  251. /package/dist/{src/components → components}/molecules/PromptInputHeader/index.js +0 -0
  252. /package/dist/{src/components → components}/molecules/PromptInputPanel/PromptInputPanel.d.ts +0 -0
  253. /package/dist/{src/components → components}/molecules/PromptInputPanel/PromptInputPanel.js +0 -0
  254. /package/dist/{src/components → components}/molecules/PromptInputPanel/index.d.ts +0 -0
  255. /package/dist/{src/components → components}/molecules/PromptInputPanel/index.js +0 -0
  256. /package/dist/{src/components → components}/molecules/Suggestions/Suggestions.d.ts +0 -0
  257. /package/dist/{src/components → components}/molecules/Suggestions/Suggestions.js +0 -0
  258. /package/dist/{src/components → components}/molecules/Suggestions/index.d.ts +0 -0
  259. /package/dist/{src/components → components}/molecules/Suggestions/index.js +0 -0
  260. /package/dist/{src/components → components}/molecules/Tabs/Tabs.d.ts +0 -0
  261. /package/dist/{src/components → components}/molecules/Tabs/Tabs.js +0 -0
  262. /package/dist/{src/components → components}/molecules/Tabs/i18n/index.d.ts +0 -0
  263. /package/dist/{src/components → components}/molecules/Tabs/i18n/index.js +0 -0
  264. /package/dist/{src/components → components}/molecules/Tabs/index.d.ts +0 -0
  265. /package/dist/{src/components → components}/molecules/Tabs/index.js +0 -0
  266. /package/dist/{src/components → components}/molecules/ToolFooter/index.d.ts +0 -0
  267. /package/dist/{src/components → components}/molecules/ToolFooter/index.js +0 -0
  268. /package/dist/{src/components → components}/molecules/ToolHeader/index.d.ts +0 -0
  269. /package/dist/{src/components → components}/molecules/ToolHeader/index.js +0 -0
  270. /package/dist/{src/components → components}/molecules/index.d.ts +0 -0
  271. /package/dist/{src/components → components}/molecules/index.js +0 -0
  272. /package/dist/{src/components → components}/organisms/AssistantMessage/AssistantMessage.d.ts +0 -0
  273. /package/dist/{src/components → components}/organisms/AssistantMessage/AssistantMessage.js +0 -0
  274. /package/dist/{src/components → components}/organisms/AssistantMessage/defaultMessageTypeRegistry.d.ts +0 -0
  275. /package/dist/{src/components → components}/organisms/AssistantMessage/defaultMessageTypeRegistry.js +0 -0
  276. /package/dist/{src/components → components}/organisms/AssistantMessage/index.d.ts +0 -0
  277. /package/dist/{src/components → components}/organisms/AssistantMessage/index.js +0 -0
  278. /package/dist/{src/components → components}/organisms/Header/Header.d.ts +0 -0
  279. /package/dist/{src/components → components}/organisms/Header/Header.js +0 -0
  280. /package/dist/{src/components → components}/organisms/Header/i18n/index.d.ts +0 -0
  281. /package/dist/{src/components → components}/organisms/Header/i18n/index.js +0 -0
  282. /package/dist/{src/components → components}/organisms/Header/index.d.ts +0 -0
  283. /package/dist/{src/components → components}/organisms/Header/index.js +0 -0
  284. /package/dist/{src/components → components}/organisms/Header/types.d.ts +0 -0
  285. /package/dist/{src/components → components}/organisms/Header/types.js +0 -0
  286. /package/dist/{src/components → components}/organisms/Header/useHeader.d.ts +0 -0
  287. /package/dist/{src/components → components}/organisms/Header/useHeader.js +0 -0
  288. /package/dist/{src/components → components}/organisms/MessageList/ErrorAlert.d.ts +0 -0
  289. /package/dist/{src/components → components}/organisms/MessageList/ErrorAlert.js +0 -0
  290. /package/dist/{src/components → components}/organisms/MessageList/MessageList.d.ts +0 -0
  291. /package/dist/{src/components → components}/organisms/MessageList/MessageList.js +0 -0
  292. /package/dist/{src/components → components}/organisms/MessageList/i18n/index.d.ts +0 -0
  293. /package/dist/{src/components → components}/organisms/MessageList/i18n/index.js +0 -0
  294. /package/dist/{src/components → components}/organisms/MessageList/index.d.ts +0 -0
  295. /package/dist/{src/components → components}/organisms/MessageList/index.js +0 -0
  296. /package/dist/{src/components → components}/organisms/PromptInput/PromptInput.d.ts +0 -0
  297. /package/dist/{src/components → components}/organisms/PromptInput/PromptInput.js +0 -0
  298. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputFull.d.ts +0 -0
  299. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputFull.js +0 -0
  300. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputSimple.d.ts +0 -0
  301. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputSimple.js +0 -0
  302. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithPanels.d.ts +0 -0
  303. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithPanels.js +0 -0
  304. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithSuggestions.d.ts +0 -0
  305. /package/dist/{src/components → components}/organisms/PromptInput/PromptInputWithSuggestions.js +0 -0
  306. /package/dist/{src/components → components}/organisms/PromptInput/index.d.ts +0 -0
  307. /package/dist/{src/components → components}/organisms/PromptInput/index.js +0 -0
  308. /package/dist/{src/components → components}/organisms/PromptInput/types.d.ts +0 -0
  309. /package/dist/{src/components → components}/organisms/PromptInput/types.js +0 -0
  310. /package/dist/{src/components → components}/organisms/PromptInput/useDelayedUnmount.d.ts +0 -0
  311. /package/dist/{src/components → components}/organisms/PromptInput/useDelayedUnmount.js +0 -0
  312. /package/dist/{src/components → components}/organisms/PromptInput/usePromptInput.d.ts +0 -0
  313. /package/dist/{src/components → components}/organisms/PromptInput/usePromptInput.js +0 -0
  314. /package/dist/{src/components → components}/organisms/ThinkingMessage/i18n/index.d.ts +0 -0
  315. /package/dist/{src/components → components}/organisms/ThinkingMessage/i18n/index.js +0 -0
  316. /package/dist/{src/components → components}/organisms/ThinkingMessage/index.d.ts +0 -0
  317. /package/dist/{src/components → components}/organisms/ThinkingMessage/useThinkingMessage.d.ts +0 -0
  318. /package/dist/{src/components → components}/organisms/ThinkingMessage/useThinkingMessage.js +0 -0
  319. /package/dist/{src/components → components}/organisms/ToolMessage/i18n/index.d.ts +0 -0
  320. /package/dist/{src/components → components}/organisms/ToolMessage/i18n/index.js +0 -0
  321. /package/dist/{src/components → components}/organisms/ToolMessage/index.d.ts +0 -0
  322. /package/dist/{src/components → components}/organisms/ToolMessage/index.js +0 -0
  323. /package/dist/{src/components → components}/organisms/UserMessage/index.d.ts +0 -0
  324. /package/dist/{src/components → components}/organisms/UserMessage/index.js +0 -0
  325. /package/dist/{src/components → components}/organisms/index.d.ts +0 -0
  326. /package/dist/{src/components → components}/organisms/index.js +0 -0
  327. /package/dist/{src/components → components}/pages/ChatContainer/ChatContainer.d.ts +0 -0
  328. /package/dist/{src/components → components}/pages/ChatContainer/ChatContainer.js +0 -0
  329. /package/dist/{src/components → components}/pages/ChatContainer/i18n/index.d.ts +0 -0
  330. /package/dist/{src/components → components}/pages/ChatContainer/i18n/index.js +0 -0
  331. /package/dist/{src/components → components}/pages/ChatContainer/index.d.ts +0 -0
  332. /package/dist/{src/components → components}/pages/ChatContainer/index.js +0 -0
  333. /package/dist/{src/components → components}/pages/ChatContainer/types.d.ts +0 -0
  334. /package/dist/{src/components → components}/pages/ChatContainer/types.js +0 -0
  335. /package/dist/{src/components → components}/pages/ChatContainer/useChatContainer.d.ts +0 -0
  336. /package/dist/{src/components → components}/pages/ChatContainer/useChatContainer.js +0 -0
  337. /package/dist/{src/components → components}/pages/index.d.ts +0 -0
  338. /package/dist/{src/components → components}/pages/index.js +0 -0
  339. /package/dist/{src/components → components}/templates/ChatContent/ChatContent.d.ts +0 -0
  340. /package/dist/{src/components → components}/templates/ChatContent/ChatContent.js +0 -0
  341. /package/dist/{src/components → components}/templates/ChatContent/index.d.ts +0 -0
  342. /package/dist/{src/components → components}/templates/ChatContent/index.js +0 -0
  343. /package/dist/{src/components → components}/templates/EmptyContainer/EmptyContainer.d.ts +0 -0
  344. /package/dist/{src/components → components}/templates/EmptyContainer/EmptyContainer.js +0 -0
  345. /package/dist/{src/components → components}/templates/EmptyContainer/i18n/index.d.ts +0 -0
  346. /package/dist/{src/components → components}/templates/EmptyContainer/i18n/index.js +0 -0
  347. /package/dist/{src/components → components}/templates/EmptyContainer/index.d.ts +0 -0
  348. /package/dist/{src/components → components}/templates/EmptyContainer/index.js +0 -0
  349. /package/dist/{src/components → components}/templates/History/ChatItem.d.ts +0 -0
  350. /package/dist/{src/components → components}/templates/History/ChatItem.js +0 -0
  351. /package/dist/{src/components → components}/templates/History/DateHeaderItem.d.ts +0 -0
  352. /package/dist/{src/components → components}/templates/History/DateHeaderItem.js +0 -0
  353. /package/dist/{src/components → components}/templates/History/History.d.ts +0 -0
  354. /package/dist/{src/components → components}/templates/History/History.js +0 -0
  355. /package/dist/{src/components → components}/templates/History/HistoryList.d.ts +0 -0
  356. /package/dist/{src/components → components}/templates/History/HistoryList.js +0 -0
  357. /package/dist/{src/components → components}/templates/History/i18n/index.d.ts +0 -0
  358. /package/dist/{src/components → components}/templates/History/i18n/index.js +0 -0
  359. /package/dist/{src/components → components}/templates/History/index.d.ts +0 -0
  360. /package/dist/{src/components → components}/templates/History/index.js +0 -0
  361. /package/dist/{src/components → components}/templates/index.d.ts +0 -0
  362. /package/dist/{src/components → components}/templates/index.js +0 -0
  363. /package/dist/{src/constants → constants}/index.d.ts +0 -0
  364. /package/dist/{src/constants → constants}/index.js +0 -0
  365. /package/dist/{src/hooks → hooks}/index.d.ts +0 -0
  366. /package/dist/{src/hooks → hooks}/index.js +0 -0
  367. /package/dist/{src/hooks → hooks}/useDateFormatter/index.d.ts +0 -0
  368. /package/dist/{src/hooks → hooks}/useDateFormatter/index.js +0 -0
  369. /package/dist/{src/hooks → hooks}/useSmartScroll.d.ts +0 -0
  370. /package/dist/{src/hooks → hooks}/useSmartScroll.js +0 -0
  371. /package/dist/{src/hooks → hooks}/useToolMessage.d.ts +0 -0
  372. /package/dist/{src/hooks → hooks}/useToolMessage.js +0 -0
  373. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  374. /package/dist/{src/index.js → index.js} +0 -0
  375. /package/dist/{src/types → types}/chat.d.ts +0 -0
  376. /package/dist/{src/types → types}/chat.js +0 -0
  377. /package/dist/{src/types → types}/common.d.ts +0 -0
  378. /package/dist/{src/types → types}/common.js +0 -0
  379. /package/dist/{src/types → types}/index.d.ts +0 -0
  380. /package/dist/{src/types → types}/index.js +0 -0
  381. /package/dist/{src/types → types}/messages.d.ts +0 -0
  382. /package/dist/{src/types → types}/messages.js +0 -0
  383. /package/dist/{src/types → types}/tool.d.ts +0 -0
  384. /package/dist/{src/types → types}/tool.js +0 -0
  385. /package/dist/{src/utils → utils}/chatUtils.d.ts +0 -0
  386. /package/dist/{src/utils → utils}/chatUtils.js +0 -0
  387. /package/dist/{src/utils → utils}/cn.d.ts +0 -0
  388. /package/dist/{src/utils → utils}/cn.js +0 -0
  389. /package/dist/{src/utils → utils}/index.d.ts +0 -0
  390. /package/dist/{src/utils → utils}/index.js +0 -0
  391. /package/dist/{src/utils → utils}/messageTypeRegistry.d.ts +0 -0
  392. /package/dist/{src/utils → utils}/messageTypeRegistry.js +0 -0
  393. /package/dist/{src/utils → utils}/messageUtils.d.ts +0 -0
  394. /package/dist/{src/utils → utils}/messageUtils.js +0 -0
  395. /package/dist/{src/utils → utils}/validation.d.ts +0 -0
  396. /package/dist/{src/utils → utils}/validation.js +0 -0
@@ -1,143 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Suggestions } from '..';
3
- import { ContentWrapper } from '../../../../demo/ContentWrapper';
4
- import MDXDocs from './Docs.mdx';
5
- export default {
6
- title: 'molecules/Suggestions',
7
- component: Suggestions,
8
- parameters: {
9
- docs: {
10
- page: MDXDocs,
11
- },
12
- },
13
- argTypes: {
14
- items: {
15
- control: 'object',
16
- description: 'Array of suggestion items to display',
17
- },
18
- onClick: {
19
- action: 'clicked',
20
- description: 'Callback function called when a suggestion is clicked',
21
- },
22
- layout: {
23
- control: 'select',
24
- options: ['grid', 'list'],
25
- description: 'Layout orientation: grid for horizontal, list for vertical',
26
- },
27
- textAlign: {
28
- control: 'select',
29
- options: ['left', 'center', 'right'],
30
- description: 'Text alignment inside buttons',
31
- },
32
- className: {
33
- control: 'text',
34
- description: 'Additional CSS class',
35
- },
36
- qa: {
37
- control: 'text',
38
- description: 'QA/test identifier',
39
- },
40
- },
41
- };
42
- export const Playground = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args)) }));
43
- Playground.args = {
44
- items: [
45
- { id: '1', title: 'First suggestion' },
46
- { id: '2', title: 'Second suggestion' },
47
- { id: '3', title: 'Third suggestion' },
48
- ],
49
- onClick: () => {
50
- // onClick handler
51
- },
52
- layout: 'list',
53
- };
54
- export const ListLayout = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
55
- { id: '1', title: 'Example suggestion' },
56
- { id: '2', title: 'Another one suggestion' },
57
- { id: '3', title: 'Looooooong suggestion for testing' },
58
- ], layout: "list", onClick: () => {
59
- // onClick handler
60
- } })) }));
61
- export const ListLayoutWithContainer = (args) => (_jsx(ContentWrapper, { width: "200px", children: _jsx(Suggestions, Object.assign({}, args, { items: [
62
- { id: '1', title: 'Example suggestion' },
63
- { id: '2', title: 'Another one suggestion' },
64
- { id: '3', title: 'Looooooong suggestion for testing' },
65
- ], layout: "list", onClick: () => {
66
- // onClick handler
67
- } })) }));
68
- export const GridLayout = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
69
- { id: '1', title: 'Option 1' },
70
- { id: '2', title: 'Option 2' },
71
- { id: '3', title: 'Option 3' },
72
- { id: '4', title: 'Option 4' },
73
- ], layout: "grid", onClick: () => {
74
- // onClick handler
75
- } })) }));
76
- export const GridLayoutWithContainer = (args) => (_jsx(ContentWrapper, { width: "300px", children: _jsx(Suggestions, Object.assign({}, args, { items: [
77
- { id: '1', title: 'Option 1' },
78
- { id: '2', title: 'Option 2' },
79
- { id: '3', title: 'Option 3' },
80
- { id: '4', title: 'Option 4' },
81
- ], layout: "grid", onClick: () => {
82
- // onClick handler
83
- } })) }));
84
- export const WithoutIds = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [{ title: 'First item' }, { title: 'Second item' }, { title: 'Third item' }], onClick: () => {
85
- // onClick handler
86
- } })) }));
87
- export const SingleItem = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [{ id: '1', title: 'Only one suggestion' }], onClick: () => {
88
- // onClick handler
89
- } })) }));
90
- export const TextAlignLeft = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
91
- { id: '1', title: 'Left aligned text' },
92
- { id: '2', title: 'Another left aligned suggestion' },
93
- ], textAlign: "left", onClick: () => {
94
- // onClick handler
95
- } })) }));
96
- export const TextAlignCenter = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
97
- { id: '1', title: 'Center aligned text' },
98
- { id: '2', title: 'Another centered suggestion' },
99
- ], textAlign: "center", onClick: () => {
100
- // onClick handler
101
- } })) }));
102
- export const TextAlignRight = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
103
- { id: '1', title: 'Right aligned text' },
104
- { id: '2', title: 'Another right aligned suggestion' },
105
- ], textAlign: "right", onClick: () => {
106
- // onClick handler
107
- } })) }));
108
- export const WithLeftIcon = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
109
- { id: '1', title: 'Previous page', icon: 'left' },
110
- { id: '2', title: 'Go back', icon: 'left' },
111
- { id: '3', title: 'Return to start', icon: 'left' },
112
- ], onClick: () => {
113
- // onClick handler
114
- } })) }));
115
- export const WithRightIcon = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
116
- { id: '1', title: 'Next page', icon: 'right' },
117
- { id: '2', title: 'Continue', icon: 'right' },
118
- { id: '3', title: 'Go forward', icon: 'right' },
119
- ], onClick: () => {
120
- // onClick handler
121
- } })) }));
122
- export const WithMixedIcons = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
123
- { id: '1', title: 'Previous', icon: 'left' },
124
- { id: '2', title: 'No action' },
125
- { id: '3', title: 'Next', icon: 'right' },
126
- ], layout: "grid", onClick: () => {
127
- // onClick handler
128
- } })) }));
129
- export const IconsWithContainer = (args) => (_jsx(ContentWrapper, { width: "200px", children: _jsx(Suggestions, Object.assign({}, args, { items: [
130
- { id: '1', title: 'Example suggestion', icon: 'right' },
131
- { id: '2', title: 'Another one suggestion', icon: 'right' },
132
- { id: '3', title: 'Looooooong suggestion for testing', icon: 'right' },
133
- ], layout: "list", onClick: () => {
134
- // onClick handler
135
- } })) }));
136
- export const WithIconsInGridLayout = (args) => (_jsx(ContentWrapper, { children: _jsx(Suggestions, Object.assign({}, args, { items: [
137
- { id: '1', title: 'Back', icon: 'left' },
138
- { id: '2', title: 'Home' },
139
- { id: '3', title: 'Settings' },
140
- { id: '4', title: 'Forward', icon: 'right' },
141
- ], layout: "grid", onClick: () => {
142
- // onClick handler
143
- } })) }));
@@ -1,9 +0,0 @@
1
- import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
2
- import { type TabsProps } from '..';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: StoryFn<TabsProps>;
6
- export declare const Basic: StoryObj<TabsProps>;
7
- export declare const WithIcons: StoryObj<TabsProps>;
8
- export declare const WithStyle: StoryObj<TabsProps>;
9
- export declare const MaxWidth: StoryObj<TabsProps>;
@@ -1,103 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { At, Envelope, Gear } from '@gravity-ui/icons';
3
- import { Icon } from '@gravity-ui/uikit';
4
- import { Tabs } from '..';
5
- import { ContentWrapper } from '../../../../demo/ContentWrapper';
6
- import { Showcase } from '../../../../demo/Showcase';
7
- import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
8
- import MDXDocs from './Docs.mdx';
9
- export default {
10
- title: 'molecules/Tabs',
11
- component: Tabs,
12
- parameters: {
13
- docs: {
14
- page: MDXDocs,
15
- },
16
- },
17
- argTypes: {
18
- items: {
19
- control: 'object',
20
- description: 'Array of tab items',
21
- },
22
- activeId: {
23
- control: 'text',
24
- description: 'ID of the currently active tab',
25
- },
26
- allowDelete: {
27
- control: 'boolean',
28
- description: 'Whether to show delete buttons',
29
- },
30
- className: {
31
- control: 'text',
32
- description: 'Additional CSS class',
33
- },
34
- styles: {
35
- control: 'object',
36
- description: 'Additional CSS properties',
37
- },
38
- },
39
- };
40
- const defaultDecorators = [
41
- (Story) => (_jsx(ContentWrapper, { children: _jsx(Showcase, { children: _jsx(Story, {}) }) })),
42
- ];
43
- const basicItems = [
44
- { id: '1', title: 'Chat name 1' },
45
- { id: '2', title: 'Chat name 2' },
46
- { id: '3', title: 'Chat name 3' },
47
- { id: '4', title: 'Chat name 4' },
48
- ];
49
- const itemsWithIcons = [
50
- { id: '1', title: 'Chat name 1', icon: _jsx(Icon, { data: At, size: 16 }) },
51
- { id: '2', title: 'Chat name 2', icon: _jsx(Icon, { data: Envelope, size: 16 }) },
52
- { id: '3', title: 'Chat name 3', icon: _jsx(Icon, { data: Gear, size: 16 }) },
53
- ];
54
- export const Playground = (args) => (_jsx(ContentWrapper, { children: _jsx(Tabs, Object.assign({}, args)) }));
55
- Playground.args = {
56
- items: basicItems,
57
- activeId: '1',
58
- allowDelete: true,
59
- };
60
- export const Basic = {
61
- render: (args) => (_jsx(ShowcaseItem, { title: "Basic Tabs", children: _jsx(Tabs, Object.assign({}, args)) })),
62
- decorators: defaultDecorators,
63
- };
64
- Basic.args = {
65
- items: basicItems,
66
- activeId: '1',
67
- allowDelete: true,
68
- };
69
- export const WithIcons = {
70
- render: (args) => (_jsx(ShowcaseItem, { title: "Tabs with Icons", children: _jsx(Tabs, Object.assign({}, args)) })),
71
- decorators: defaultDecorators,
72
- };
73
- WithIcons.args = {
74
- items: itemsWithIcons,
75
- activeId: '1',
76
- allowDelete: true,
77
- };
78
- export const WithStyle = {
79
- render: (args) => (_jsx(ShowcaseItem, { title: "Tabs with Style", children: _jsx(Tabs, Object.assign({}, args)) })),
80
- decorators: defaultDecorators,
81
- };
82
- WithStyle.args = {
83
- items: basicItems,
84
- activeId: '1',
85
- allowDelete: true,
86
- style: {
87
- '--g-color-base-info-light': '#ff9100',
88
- '--g-color-base-info-light-hover': '#aa9100',
89
- '--g-color-text-info-heavy': '#ffffff',
90
- '--g-color-base-simple-hover': '#aa9100',
91
- '--g-color-text-complementary': '#ff9100',
92
- '--g-color-line-generic': '#ff9100',
93
- },
94
- };
95
- export const MaxWidth = {
96
- render: (args) => (_jsx(ShowcaseItem, { title: "Max width (200px)", children: _jsxs("div", { style: { maxWidth: '200px', border: '1px solid lightgray' }, children: [_jsx("h1", { style: { paddingInline: '10px' }, children: "Lorem ipsum" }), _jsx(Tabs, Object.assign({}, args)), _jsx("p", { style: { paddingInline: '10px' }, children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio consectetur commodi natus dolor repellendus sit, similique aliquam, quia ad hic quam porro nobis a? Cumque ratione est nostrum exercitationem velit." })] }) })),
97
- decorators: defaultDecorators,
98
- };
99
- MaxWidth.args = {
100
- items: basicItems,
101
- activeId: '1',
102
- allowDelete: true,
103
- };
@@ -1,3 +0,0 @@
1
- {
2
- "close-tooltip": "Close"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "close-tooltip": "Закрыть"
3
- }
@@ -1,7 +0,0 @@
1
- import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
2
- import { ToolFooterProps } from 'src/types';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: StoryFn<ToolFooterProps>;
6
- export declare const ConfirmationState: StoryObj<ToolFooterProps>;
7
- export declare const WaitingState: StoryObj<ToolFooterProps>;
@@ -1,58 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ToolFooter } 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/ToolFooter',
9
- component: ToolFooter,
10
- parameters: {
11
- docs: {
12
- page: MDXDocs,
13
- },
14
- },
15
- argTypes: {
16
- content: {
17
- control: 'text',
18
- description: 'Status message to display',
19
- },
20
- showLoader: {
21
- control: 'boolean',
22
- description: 'Whether to show loading indicator',
23
- },
24
- },
25
- };
26
- const defaultDecorators = [
27
- (Story) => (_jsx(Showcase, { children: _jsx(Story, {}) })),
28
- ];
29
- const rejectAction = {
30
- label: 'Reject',
31
- onClick: () => alert('Rejected'),
32
- view: 'outlined',
33
- };
34
- const acceptAction = {
35
- label: 'Accept',
36
- onClick: () => alert('Accepted'),
37
- view: 'action',
38
- };
39
- const cancelAction = {
40
- label: 'Cancel',
41
- onClick: () => alert('Cancelled'),
42
- view: 'outlined',
43
- };
44
- const defaultActions = [rejectAction, acceptAction];
45
- export const Playground = (args) => (_jsx(ContentWrapper, { width: "430px", children: _jsx(ToolFooter, Object.assign({}, args)) }));
46
- Playground.args = {
47
- content: 'Awaiting confirmation',
48
- actions: defaultActions,
49
- showLoader: true,
50
- };
51
- export const ConfirmationState = {
52
- render: (args) => (_jsx(ShowcaseItem, { title: "Confirmation State", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolFooter, Object.assign({}, args, { content: "Awaiting confirmation", actions: defaultActions })) }) })),
53
- decorators: defaultDecorators,
54
- };
55
- export const WaitingState = {
56
- render: (args) => (_jsx(ShowcaseItem, { title: "Waiting State", children: _jsx(ContentWrapper, { width: "430px", children: _jsx(ToolFooter, Object.assign({}, args, { content: "Awaiting form submission", actions: [cancelAction] })) }) })),
57
- decorators: defaultDecorators,
58
- };
@@ -1,7 +0,0 @@
1
- import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
2
- import type { ToolHeaderProps } from '../../../../types/tool';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: StoryFn<ToolHeaderProps>;
6
- export declare const Loading: StoryObj<ToolHeaderProps>;
7
- export declare const Success: StoryObj<ToolHeaderProps>;
@@ -1,55 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ChevronDown, Copy, Pencil } from '@gravity-ui/icons';
3
- import { Icon, Text } from '@gravity-ui/uikit';
4
- import { ToolHeader } from '..';
5
- import { ContentWrapper } from '../../../../demo/ContentWrapper';
6
- import { Showcase } from '../../../../demo/Showcase';
7
- import MDXDocs from './Docs.mdx';
8
- export default {
9
- title: 'molecules/ToolHeader',
10
- component: ToolHeader,
11
- parameters: {
12
- docs: {
13
- page: MDXDocs,
14
- },
15
- },
16
- argTypes: {
17
- toolName: {
18
- control: 'text',
19
- description: 'Name of the tool',
20
- },
21
- status: {
22
- control: 'select',
23
- options: ['success', 'error', 'loading'],
24
- description: 'Status indicator',
25
- },
26
- },
27
- };
28
- const defaultDecorators = [
29
- (Story) => (_jsx(Showcase, { children: _jsx(Story, {}) })),
30
- ];
31
- const copyAction = {
32
- label: 'Copy',
33
- onClick: () => alert('Copied'),
34
- icon: _jsx(Icon, { data: Copy, size: 16 }),
35
- };
36
- const collapseAction = {
37
- label: 'Collapse',
38
- onClick: () => alert('Collapsed'),
39
- icon: _jsx(Icon, { data: ChevronDown, size: 16 }),
40
- };
41
- export const Playground = (args) => (_jsx(ContentWrapper, { width: "430px", children: _jsx(ToolHeader, Object.assign({}, args)) }));
42
- Playground.args = {
43
- toolIcon: _jsx(Icon, { data: Pencil, size: 16 }),
44
- toolName: 'Writing',
45
- content: (_jsx(Text, { color: "secondary", variant: "body-1", children: "expectScreenshotFixture.ts" })),
46
- status: 'success',
47
- };
48
- export const Loading = {
49
- render: (args) => (_jsx(ContentWrapper, { width: "430px", children: _jsx(ToolHeader, Object.assign({}, args, { toolIcon: _jsx(Icon, { data: Pencil, size: 16 }), toolName: "Writing", content: _jsx(Text, { color: "secondary", variant: "body-1", children: "expectScreenshotFixture.ts" }), status: "loading" })) })),
50
- decorators: defaultDecorators,
51
- };
52
- export const Success = {
53
- render: (args) => (_jsx(ContentWrapper, { width: "430px", children: _jsx(ToolHeader, Object.assign({}, args, { toolIcon: _jsx(Icon, { data: Pencil, size: 16 }), toolName: "Writing", content: _jsx(Text, { color: "secondary", variant: "body-1", children: "expectScreenshotFixture.ts" }), actions: [collapseAction, copyAction], status: "success" })) })),
54
- decorators: defaultDecorators,
55
- };
@@ -1,13 +0,0 @@
1
- import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
2
- import { type AssistantMessageProps } from '..';
3
- import type { TMessageContent } from '../../../../types/messages';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare const Playground: StoryFn<AssistantMessageProps>;
7
- export declare const WithToolCall: StoryObj<AssistantMessageProps>;
8
- interface CustomMessageData {
9
- title: string;
10
- description: string;
11
- }
12
- type CustomMessageContent = TMessageContent<'custom', CustomMessageData>;
13
- export declare const WithCustomRenderer: StoryObj<AssistantMessageProps<CustomMessageContent>>;
@@ -1,151 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /* eslint-disable no-console */
3
- import { Pencil } from '@gravity-ui/icons';
4
- import { Icon, Text } from '@gravity-ui/uikit';
5
- import { AssistantMessage } from '..';
6
- import { ContentWrapper } from '../../../../demo/ContentWrapper';
7
- import { Showcase } from '../../../../demo/Showcase';
8
- import { ShowcaseItem } from '../../../../demo/ShowcaseItem';
9
- import { createMessageRendererRegistry, registerMessageRenderer, } from '../../../../utils/messageTypeRegistry';
10
- import MDXDocs from './Docs.mdx';
11
- export default {
12
- title: 'organisms/AssistantMessage',
13
- component: AssistantMessage,
14
- parameters: {
15
- docs: {
16
- page: MDXDocs,
17
- },
18
- },
19
- argTypes: {
20
- content: {
21
- control: 'object',
22
- description: 'Message content',
23
- },
24
- actions: {
25
- control: 'object',
26
- description: 'Message actions',
27
- },
28
- timestamp: {
29
- control: 'text',
30
- description: 'Message timestamp',
31
- },
32
- id: {
33
- control: 'text',
34
- description: 'Message ID',
35
- },
36
- messageRendererRegistry: {
37
- control: false,
38
- description: 'Custom message renderer registry',
39
- },
40
- showActionsOnHover: {
41
- control: 'boolean',
42
- description: 'Show action buttons on hover',
43
- },
44
- showTimestamp: {
45
- control: 'boolean',
46
- description: 'Show timestamp in actions area',
47
- },
48
- className: {
49
- control: 'text',
50
- description: 'Additional CSS class',
51
- },
52
- qa: {
53
- control: 'text',
54
- description: 'QA/test identifier',
55
- },
56
- },
57
- };
58
- const simpleMessage = {
59
- id: '1',
60
- role: 'assistant',
61
- content: 'Hello! How can I help you today?',
62
- };
63
- const multiPartMessage = {
64
- id: '4',
65
- role: 'assistant',
66
- content: [
67
- {
68
- type: 'text',
69
- data: {
70
- text: "I'll scan the SCSS structure: global styles and mixins, theme files, and a couple of component styles. I'll also search for the custom Sass function usage and theming patterns.",
71
- },
72
- },
73
- {
74
- type: 'tool',
75
- data: {
76
- toolName: 'Reading',
77
- headerContent: (_jsx(Text, { color: "secondary", variant: "body-1", children: "Warning.css" })),
78
- status: 'success',
79
- toolIcon: _jsx(Icon, { data: Pencil }),
80
- },
81
- },
82
- {
83
- type: 'text',
84
- data: {
85
- text: 'I’m organizing which files to read first. I’ll start with the essentials like package.json, README.md, tsconfig.json, jest.config.js, and eslint.config.mjs.',
86
- },
87
- },
88
- ],
89
- };
90
- const actions = [
91
- // eslint-disable-next-line no-console
92
- { type: 'copy', onClick: () => console.log('Copy clicked') },
93
- // eslint-disable-next-line no-console
94
- { type: 'like', onClick: () => console.log('Like clicked') },
95
- // eslint-disable-next-line no-console
96
- { type: 'unlike', onClick: () => console.log('Unlike clicked') },
97
- ];
98
- export const Playground = (args) => (_jsx(ContentWrapper, { width: "480px", children: _jsx(AssistantMessage, Object.assign({}, args)) }));
99
- Playground.args = {
100
- content: simpleMessage.content,
101
- actions,
102
- timestamp: simpleMessage.timestamp,
103
- id: simpleMessage.id,
104
- };
105
- export const WithToolCall = {
106
- render: (args) => (_jsx(ShowcaseItem, { title: "With Tool Call", children: _jsx(ContentWrapper, { width: "480px", children: _jsx(AssistantMessage, Object.assign({}, args, { content: multiPartMessage.content, actions: actions, timestamp: multiPartMessage.timestamp, id: multiPartMessage.id })) }) })),
107
- decorators: [
108
- (StoryComponent) => (_jsx(Showcase, { children: _jsx(StoryComponent, {}) })),
109
- ],
110
- };
111
- const CustomMessageView = ({ part, }) => {
112
- const { title, description } = part.data;
113
- return (_jsxs("div", { style: {
114
- padding: '16px',
115
- border: '1px solid var(--g-color-line-generic)',
116
- borderRadius: '8px',
117
- backgroundColor: 'var(--g-color-base-float)',
118
- }, children: [_jsx("div", { style: { fontWeight: 'bold', marginBottom: '8px' }, children: title }), _jsx("div", { style: { color: 'var(--g-color-text-secondary)' }, children: description })] }));
119
- };
120
- export const WithCustomRenderer = {
121
- render: (args) => {
122
- const customRegistry = createMessageRendererRegistry();
123
- registerMessageRenderer(customRegistry, 'custom', {
124
- component: CustomMessageView,
125
- });
126
- const customMessage = {
127
- id: '5',
128
- role: 'assistant',
129
- timestamp: '2024-01-01T00:00:04Z',
130
- content: [
131
- {
132
- type: 'text',
133
- data: {
134
- text: "I'll scan the SCSS structure: global styles and mixins, theme files, and a couple of component styles. I'll also search for the custom Sass function usage and theming patterns.",
135
- },
136
- },
137
- {
138
- type: 'custom',
139
- data: {
140
- title: 'Custom Message',
141
- description: 'This is a custom message part rendered with a custom renderer.',
142
- },
143
- },
144
- ],
145
- };
146
- return (_jsx(ShowcaseItem, { title: "With Custom Renderer", children: _jsx(ContentWrapper, { width: "480px", children: _jsx(AssistantMessage, Object.assign({}, args, { content: customMessage.content, actions: actions, timestamp: customMessage.timestamp, id: customMessage.id, messageRendererRegistry: customRegistry })) }) }));
147
- },
148
- decorators: [
149
- (StoryComponent) => (_jsx(Showcase, { children: _jsx(StoryComponent, {}) })),
150
- ],
151
- };
@@ -1,13 +0,0 @@
1
- import { Meta, StoryFn, StoryObj } from '@storybook/react-webpack5';
2
- import { type HeaderProps } from '../index';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: StoryFn<HeaderProps>;
6
- export declare const WithTitle: StoryFn<HeaderProps>;
7
- export declare const WithIcon: StoryFn<HeaderProps>;
8
- export declare const WithPreview: StoryFn<HeaderProps>;
9
- export declare const TitlePositions: StoryObj<HeaderProps>;
10
- export declare const BaseActions: StoryObj<HeaderProps>;
11
- export declare const AdditionalActions: StoryFn<HeaderProps>;
12
- export declare const FullExample: StoryFn<HeaderProps>;
13
- export declare const FoldingInteractive: StoryFn<HeaderProps>;