@forgedevstack/bear 1.3.2 → 1.3.3

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 (306) hide show
  1. package/README.md +4 -0
  2. package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
  3. package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
  4. package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
  5. package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
  6. package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
  7. package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
  8. package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
  9. package/dist/components/ApprovalCard/index.d.ts +2 -0
  10. package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
  11. package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
  12. package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
  13. package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
  14. package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
  15. package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
  16. package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
  17. package/dist/components/ArtifactCard/index.d.ts +2 -0
  18. package/dist/components/Banner/Banner.const.cjs +1 -1
  19. package/dist/components/Banner/Banner.const.js +9 -8
  20. package/dist/components/Chart/BarChart.cjs +1 -1
  21. package/dist/components/Chart/BarChart.js +65 -72
  22. package/dist/components/Chart/Chart.cjs +1 -1
  23. package/dist/components/Chart/Chart.js +21 -18
  24. package/dist/components/Chart/Chart.types.d.ts +1 -1
  25. package/dist/components/Chart/FunnelChart.cjs +1 -1
  26. package/dist/components/Chart/FunnelChart.js +38 -36
  27. package/dist/components/Chart/LineChart.cjs +1 -1
  28. package/dist/components/Chart/LineChart.js +74 -60
  29. package/dist/components/Chart/PieChart.cjs +1 -1
  30. package/dist/components/Chart/PieChart.js +102 -82
  31. package/dist/components/Chart/RadarChart.cjs +1 -1
  32. package/dist/components/Chart/RadarChart.d.ts +1 -1
  33. package/dist/components/Chart/RadarChart.js +116 -93
  34. package/dist/components/Chat/Chat.cjs +1 -1
  35. package/dist/components/Chat/Chat.const.cjs +1 -1
  36. package/dist/components/Chat/Chat.const.d.ts +9 -22
  37. package/dist/components/Chat/Chat.const.js +18 -26
  38. package/dist/components/Chat/Chat.d.ts +1 -20
  39. package/dist/components/Chat/Chat.js +107 -162
  40. package/dist/components/Chat/Chat.types.d.ts +20 -27
  41. package/dist/components/Chat/Chat.utils.cjs +1 -0
  42. package/dist/components/Chat/Chat.utils.d.ts +2 -0
  43. package/dist/components/Chat/Chat.utils.js +10 -0
  44. package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
  45. package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
  46. package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
  47. package/dist/components/Chat/index.d.ts +2 -1
  48. package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
  49. package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
  50. package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
  51. package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
  52. package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
  53. package/dist/components/ChatBubble/ChatBubble.js +32 -0
  54. package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
  55. package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
  56. package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
  57. package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
  58. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
  59. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
  60. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
  61. package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
  62. package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
  63. package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
  64. package/dist/components/ChatBubble/index.d.ts +2 -0
  65. package/dist/components/ChatError/ChatError.cjs +1 -0
  66. package/dist/components/ChatError/ChatError.const.cjs +1 -0
  67. package/dist/components/ChatError/ChatError.const.d.ts +2 -0
  68. package/dist/components/ChatError/ChatError.const.js +8 -0
  69. package/dist/components/ChatError/ChatError.d.ts +2 -0
  70. package/dist/components/ChatError/ChatError.js +32 -0
  71. package/dist/components/ChatError/ChatError.types.d.ts +14 -0
  72. package/dist/components/ChatError/index.d.ts +2 -0
  73. package/dist/components/CitationList/CitationList.cjs +1 -0
  74. package/dist/components/CitationList/CitationList.d.ts +2 -0
  75. package/dist/components/CitationList/CitationList.js +30 -0
  76. package/dist/components/CitationList/CitationList.types.d.ts +15 -0
  77. package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
  78. package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
  79. package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
  80. package/dist/components/CitationList/helpers/index.d.ts +1 -0
  81. package/dist/components/CitationList/index.d.ts +2 -0
  82. package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
  83. package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
  84. package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
  85. package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
  86. package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
  87. package/dist/components/ContextMeter/ContextMeter.js +49 -0
  88. package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
  89. package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
  90. package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
  91. package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
  92. package/dist/components/ContextMeter/index.d.ts +2 -0
  93. package/dist/components/Drawer/Drawer.cjs +1 -1
  94. package/dist/components/Drawer/Drawer.const.cjs +1 -1
  95. package/dist/components/Drawer/Drawer.const.d.ts +2 -1
  96. package/dist/components/Drawer/Drawer.const.js +7 -6
  97. package/dist/components/Drawer/Drawer.d.ts +1 -1
  98. package/dist/components/Drawer/Drawer.js +93 -83
  99. package/dist/components/Drawer/Drawer.types.d.ts +4 -1
  100. package/dist/components/Drawer/hooks/useDrawer.cjs +1 -1
  101. package/dist/components/Drawer/hooks/useDrawer.js +33 -34
  102. package/dist/components/Drawer/index.d.ts +1 -1
  103. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  104. package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
  105. package/dist/components/EmptyState/EmptyState.const.d.ts +8 -6
  106. package/dist/components/EmptyState/EmptyState.const.js +15 -8
  107. package/dist/components/EmptyState/EmptyState.d.ts +1 -2
  108. package/dist/components/EmptyState/EmptyState.js +39 -43
  109. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
  110. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
  111. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
  112. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
  113. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
  114. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
  115. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
  116. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
  117. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
  118. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
  119. package/dist/components/EmptyState/helpers/index.d.ts +3 -0
  120. package/dist/components/EmptyState/index.d.ts +1 -1
  121. package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
  122. package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
  123. package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
  124. package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
  125. package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
  126. package/dist/components/FloatingChat/FloatingChat.js +93 -124
  127. package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
  128. package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
  129. package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
  130. package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
  131. package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
  132. package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
  133. package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
  134. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
  135. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
  136. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
  137. package/dist/components/FloatingChat/index.d.ts +1 -1
  138. package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
  139. package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
  140. package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
  141. package/dist/components/Icon/index.d.ts +1 -0
  142. package/dist/components/Icon/productIcons.cjs +1 -0
  143. package/dist/components/Icon/productIcons.d.ts +7 -0
  144. package/dist/components/Icon/productIcons.js +25 -0
  145. package/dist/components/MessageActions/MessageActions.cjs +1 -0
  146. package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
  147. package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
  148. package/dist/components/MessageActions/MessageActions.const.js +10 -0
  149. package/dist/components/MessageActions/MessageActions.d.ts +2 -0
  150. package/dist/components/MessageActions/MessageActions.js +31 -0
  151. package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
  152. package/dist/components/MessageActions/index.d.ts +2 -0
  153. package/dist/components/Modal/Modal.cjs +1 -1
  154. package/dist/components/Modal/Modal.js +1 -1
  155. package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
  156. package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
  157. package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
  158. package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
  159. package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
  160. package/dist/components/ModelSelect/ModelSelect.js +41 -0
  161. package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
  162. package/dist/components/ModelSelect/index.d.ts +2 -0
  163. package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
  164. package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
  165. package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
  166. package/dist/components/PasswordInput/PasswordInput.js +5 -5
  167. package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
  168. package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
  169. package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
  170. package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
  171. package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
  172. package/dist/components/PromptComposer/PromptComposer.js +132 -0
  173. package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
  174. package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
  175. package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
  176. package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
  177. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
  178. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
  179. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
  180. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
  181. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
  182. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
  183. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
  184. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
  185. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
  186. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
  187. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
  188. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
  189. package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
  190. package/dist/components/PromptComposer/index.d.ts +2 -0
  191. package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
  192. package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
  193. package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
  194. package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
  195. package/dist/components/PromptSuggestions/index.d.ts +2 -0
  196. package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
  197. package/dist/components/RichEditor/helpers/IconRender.js +16 -16
  198. package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
  199. package/dist/components/RichEditor/helpers/toolbarItemRender.js +23 -23
  200. package/dist/components/Select/Select.cjs +1 -1
  201. package/dist/components/Select/Select.js +23 -23
  202. package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
  203. package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
  204. package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
  205. package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
  206. package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
  207. package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
  208. package/dist/components/Select/helpers/index.d.ts +2 -0
  209. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  210. package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
  211. package/dist/components/Skeleton/Skeleton.const.js +5 -6
  212. package/dist/components/Skeleton/Skeleton.js +59 -59
  213. package/dist/components/StatCard/StatCard.cjs +1 -1
  214. package/dist/components/StatCard/StatCard.const.cjs +1 -1
  215. package/dist/components/StatCard/StatCard.const.d.ts +0 -7
  216. package/dist/components/StatCard/StatCard.const.js +5 -12
  217. package/dist/components/StatCard/StatCard.d.ts +1 -2
  218. package/dist/components/StatCard/StatCard.js +48 -37
  219. package/dist/components/StatCard/StatCard.utils.cjs +1 -0
  220. package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
  221. package/dist/components/StatCard/StatCard.utils.js +7 -0
  222. package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
  223. package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
  224. package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
  225. package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
  226. package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
  227. package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
  228. package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
  229. package/dist/components/StreamingMessage/index.d.ts +2 -0
  230. package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
  231. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
  232. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
  233. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
  234. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
  235. package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
  236. package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
  237. package/dist/components/ThemeSwitcher/index.d.ts +2 -0
  238. package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
  239. package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
  240. package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
  241. package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
  242. package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
  243. package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
  244. package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
  245. package/dist/components/ThinkingBlock/index.d.ts +2 -0
  246. package/dist/components/ToolCall/ToolCall.cjs +1 -0
  247. package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
  248. package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
  249. package/dist/components/ToolCall/ToolCall.const.js +17 -0
  250. package/dist/components/ToolCall/ToolCall.d.ts +2 -0
  251. package/dist/components/ToolCall/ToolCall.js +43 -0
  252. package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
  253. package/dist/components/ToolCall/index.d.ts +2 -0
  254. package/dist/components/Transition/Transition.const.cjs +1 -1
  255. package/dist/components/Transition/Transition.const.js +12 -6
  256. package/dist/components/Transition/Transition.types.d.ts +1 -1
  257. package/dist/components/index.cjs +1 -1
  258. package/dist/components/index.d.ts +37 -9
  259. package/dist/components/index.js +455 -423
  260. package/dist/constants/generals.const.cjs +1 -1
  261. package/dist/constants/generals.const.d.ts +46 -0
  262. package/dist/constants/generals.const.js +158 -115
  263. package/dist/constants/keys.const.cjs +1 -1
  264. package/dist/constants/keys.const.js +2 -1
  265. package/dist/constants/numbers.const.cjs +1 -1
  266. package/dist/constants/numbers.const.d.ts +7 -0
  267. package/dist/constants/numbers.const.js +60 -52
  268. package/dist/context/BearProvider.cjs +1 -1
  269. package/dist/context/BearProvider.d.ts +19 -44
  270. package/dist/context/BearProvider.js +223 -208
  271. package/dist/context/bearProvider.types.d.ts +4 -0
  272. package/dist/context/index.d.ts +1 -1
  273. package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
  274. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
  275. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
  276. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
  277. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
  278. package/dist/index.cjs +1 -1
  279. package/dist/index.js +595 -563
  280. package/dist/styles/_ai-chat.css +487 -0
  281. package/dist/styles/_base.css +2 -0
  282. package/dist/styles/_chart.css +144 -0
  283. package/dist/styles/_effects.css +8 -4
  284. package/dist/styles/_skeleton.css +90 -0
  285. package/dist/styles/main.css +3 -0
  286. package/dist/styles.css +734 -32
  287. package/package.json +1 -1
  288. package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
  289. package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
  290. package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
  291. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +0 -1
  292. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +0 -1
  293. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +0 -14
  294. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +0 -35
  295. package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +0 -1
  296. package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +0 -26
  297. package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +0 -1
  298. package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +0 -4
  299. package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +0 -1
  300. package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +0 -130
  301. package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +0 -1
  302. package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +0 -12
  303. package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +0 -1
  304. package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +0 -18
  305. package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +0 -1
  306. package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +0 -6
@@ -0,0 +1,8 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const a = (r) => {
3
+ const { className: e } = r;
4
+ return /* @__PURE__ */ o("svg", { className: e, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ o("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) });
5
+ };
6
+ export {
7
+ a as EmptyStateInboxSvg
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=t=>{const{className:r}=t;return e.jsx("svg",{className:r,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-4.35-4.35M10.5 18a7.5 7.5 0 100-15 7.5 7.5 0 000 15z"})})};exports.EmptyStateSearchSvg=o;
@@ -0,0 +1,3 @@
1
+ export declare const EmptyStateSearchSvg: (props: {
2
+ className?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ const n = (e) => {
3
+ const { className: o } = e;
4
+ return /* @__PURE__ */ r("svg", { className: o, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M21 21l-4.35-4.35M10.5 18a7.5 7.5 0 100-15 7.5 7.5 0 000 15z" }) });
5
+ };
6
+ export {
7
+ n as EmptyStateSearchSvg
8
+ };
@@ -0,0 +1,3 @@
1
+ export { EmptyStateErrorSvg } from './EmptyStateErrorSvg';
2
+ export { EmptyStateInboxSvg } from './EmptyStateInboxSvg';
3
+ export { EmptyStateSearchSvg } from './EmptyStateSearchSvg';
@@ -1,2 +1,2 @@
1
1
  export { EmptyState } from './EmptyState';
2
- export type { EmptyStateProps } from './EmptyState.types';
2
+ export type { EmptyStatePreset, EmptyStateProps } from './EmptyState.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),G=require("react-dom"),r=require("../../utils/cn.cjs"),U=require("../../context/BearProvider.cjs"),g=require("../Button/Button.cjs"),P=require("../Avatar/Avatar.cjs");require("../Box/Box.cjs");const o=require("../Typography/Typography.cjs"),M=require("../Badge/Badge.cjs"),l=require("@forgedevstack/bear-icons"),$=require("../Chat/Chat.cjs"),t=require("./FloatingChat.const.cjs"),Z=({messages:d,onSend:j,isLoading:b=!1,isTyping:S=!1,title:h=t.FLOATING_CHAT_DEFAULTS.TITLE,subtitle:_=t.FLOATING_CHAT_DEFAULTS.SUBTITLE,avatar:w,position:m=t.FLOATING_CHAT_DEFAULTS.POSITION,bottom:u=t.FLOATING_CHAT_DEFAULTS.BOTTOM,side:x=t.FLOATING_CHAT_DEFAULTS.SIDE,defaultOpen:E=!1,open:F,onOpenChange:s,trigger:T,badgeCount:i,header:y,welcomeMessage:p=t.FLOATING_CHAT_DEFAULTS.WELCOME_MESSAGE,poweredBy:A,className:L,testId:q})=>{const{mode:D}=U.useBear(),B=D==="dark",[C,v]=c.useState(E),[I,n]=c.useState(!1),a=F??C,N=c.useCallback(()=>{const f=!a;n(!0),v(f),s==null||s(f),setTimeout(()=>n(!1),300)},[a,s]),H=c.useCallback(()=>{n(!0),v(!1),s==null||s(!1),setTimeout(()=>n(!1),300)},[s]),k=d.length===0&&p?[{id:"welcome",content:p,sender:"bot",timestamp:new Date}]:d,z={bottom:`${u}px`,[m==="bottom-right"?"right":"left"]:`${x}px`},O={bottom:`${u+70}px`,[m==="bottom-right"?"right":"left"]:`${x}px`,width:t.CHAT_WINDOW_SIZE.width,height:t.CHAT_WINDOW_SIZE.height},W=e.jsxs("div",{className:r.cn("Bear-FloatingChat",L),"data-testid":q,children:[(a||I)&&e.jsxs("div",{className:r.cn("fixed z-50 rounded-2xl overflow-hidden shadow-2xl","transition-all duration-300 ease-out",a&&!I?"opacity-100 translate-y-0 scale-100":"opacity-0 translate-y-4 scale-95 pointer-events-none"),style:O,children:[y?e.jsx("div",{className:r.cn("px-4 py-3",B?"bg-gray-800":"bg-[var(--bear-primary-500)]"),children:y}):e.jsxs("div",{className:r.cn("px-4 py-3 flex items-center gap-3","bg-[var(--bear-primary-500)] text-white"),children:[e.jsx(P.Avatar,{src:w,initials:h[0],size:"sm",className:"ring-2 ring-white/20"}),e.jsxs("div",{className:"flex-1",children:[e.jsx(o.Typography,{variant:"subtitle2",className:"text-white font-semibold",children:h}),e.jsx(o.Typography,{variant:"caption",className:"text-white/70",children:_})]}),e.jsx(g.Button,{variant:"ghost",size:"sm",onClick:H,className:"!text-white hover:!bg-white/10",children:e.jsx(l.BearIcons.XIcon,{size:18})})]}),e.jsx($.Chat,{messages:k,onSend:j,isLoading:b,isTyping:S,showAvatars:!1,height:t.CHAT_WINDOW_SIZE.height-140,className:"!rounded-none !border-0"}),A&&e.jsx("div",{className:"px-3 py-2 text-center border-t border-gray-200 dark:border-gray-700",children:e.jsxs(o.Typography,{variant:"caption",className:"opacity-50",children:["Powered by ",A]})})]}),e.jsx("div",{className:"fixed z-50",style:z,children:T?e.jsx("div",{onClick:N,children:T}):e.jsxs("div",{className:"relative",children:[e.jsx(g.Button,{variant:"primary",onClick:N,className:r.cn("!w-14 !h-14 !rounded-full !p-0 shadow-lg","transition-transform duration-200",a&&"rotate-180"),children:a?e.jsx(l.BearIcons.XIcon,{size:24}):e.jsx(l.BearIcons.ChatIcon,{size:24})}),!a&&i&&i>0&&e.jsx(M.Badge,{variant:"danger",size:"sm",className:"absolute -top-1 -right-1 !min-w-[20px] !h-5",children:i>99?"99+":i})]})})]});return typeof document>"u"?null:G.createPortal(W,document.body)};exports.FloatingChat=Z;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),P=require("react"),R=require("react-dom"),a=require("../../constants/generals.const.cjs"),_=require("../../utils/cn.cjs"),W=require("../../utils/generateBearId.utils.cjs"),V=require("../../utils/useBearId.cjs"),L=require("../Box/Box.cjs"),X=require("../Chat/Chat.cjs"),Y=require("../Typography/Typography.cjs"),e=require("./FloatingChat.const.cjs"),Z=require("./FloatingChat.utils.cjs"),k=require("./helpers/FloatingChatHeader.cjs"),z=require("./helpers/FloatingChatTrigger.cjs"),J=d=>{const{id:g,testId:F,messages:r,onSend:O,onStop:C,onAttach:E,isLoading:u=a.BOOLEAN_FALSE,isStreaming:h=a.BOOLEAN_FALSE,isTyping:N=a.BOOLEAN_FALSE,title:I=e.FLOATING_CHAT_DEFAULTS.TITLE,subtitle:S=e.FLOATING_CHAT_DEFAULTS.SUBTITLE,avatar:B,position:p=e.FLOATING_CHAT_DEFAULTS.POSITION,bottom:m=e.FLOATING_CHAT_DEFAULTS.BOTTOM,side:H=e.FLOATING_CHAT_DEFAULTS.SIDE,defaultOpen:b=e.FLOATING_CHAT_DEFAULT_OPEN,open:i,onOpenChange:o,trigger:q,badgeCount:D,header:y,welcomeMessage:l=e.FLOATING_CHAT_DEFAULTS.WELCOME_MESSAGE,poweredBy:c=e.FLOATING_CHAT_POWERED_BY,allowAttach:G,className:w,translations:M}=d,x=V.useBearId(a.COMPONENT_NAME_FLOATING_CHAT),U=W.resolveBearId(g,x),[f,j]=P.useState(b),s=i??f,n={...e.FLOATING_CHAT_DEFAULT_TRANSLATIONS,...M},v=r.length===0&&l?[{id:e.FLOATING_CHAT_WELCOME_ID,content:l,sender:"bot",timestamp:new Date}]:r,A=T=>{i===void 0&&j(T),o==null||o(T)};return typeof document>"u"?null:R.createPortal(t.jsxs(L.Box,{id:U,"data-testid":F,className:_.cn("Bear-FloatingChat",p==="bottom-left"&&"Bear-FloatingChat--left",w),style:Z.resolveFloatingChatVars(m,H),children:[t.jsxs(L.Box,{className:_.cn("Bear-FloatingChat__window",!s&&"Bear-FloatingChat__window--closed"),children:[t.jsx(k.FloatingChatHeader,{header:y,title:I,subtitle:S,avatar:B,closeLabel:n.closeLabel,onClose:()=>A(a.BOOLEAN_FALSE)}),t.jsx(X.Chat,{messages:v,onSend:O,onStop:C,onAttach:E,isLoading:u,isStreaming:h,isTyping:N,showAvatars:a.BOOLEAN_FALSE,height:e.CHAT_WINDOW_SIZE.height-e.FLOATING_CHAT_CHROME_PX,allowAttach:G,className:"Bear-FloatingChat__chat"}),c&&t.jsx(Y.Typography,{variant:"caption",className:"Bear-FloatingChat__powered",color:"secondary",children:c})]}),t.jsx(z.FloatingChatTrigger,{isOpen:s,trigger:q,badgeCount:D,openLabel:n.openLabel,closeLabel:n.closeLabel,onToggle:()=>A(!s)})]}),document.body)};exports.FloatingChat=J;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t={POSITION:"bottom-right",BOTTOM:20,SIDE:20,TITLE:"Chat",SUBTITLE:"We typically reply in a few minutes",WELCOME_MESSAGE:"Hi! How can we help you today?"},T={width:380,height:520};exports.CHAT_WINDOW_SIZE=T;exports.FLOATING_CHAT_DEFAULTS=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../../constants/numbers.const.cjs"),T=require("../../constants/generals.const.cjs"),_={POSITION:"bottom-right",BOTTOM:A.TWENTY,SIDE:A.TWENTY,TITLE:"Chat",SUBTITLE:"We typically reply in a few minutes",WELCOME_MESSAGE:"Hi! How can we help you today?"},L={width:360,height:520},O=140,E="welcome",t=T.BOOLEAN_FALSE,I="Forge",e=A.CHAT_BADGE_MAX,C="--Bear-FloatingChat-bottom",o="--Bear-FloatingChat-side",H="--Bear-FloatingChat-width",N="--Bear-FloatingChat-height",F={placeholder:T.PLACEHOLDER_START_TYPING,typingText:"is typing...",newMessagesLabel:T.LABEL_NEW_MESSAGES,closeLabel:T.LABEL_CLOSE,openLabel:_.TITLE};exports.CHAT_WINDOW_SIZE=L;exports.FLOATING_CHAT_BADGE_MAX=e;exports.FLOATING_CHAT_BOTTOM_VAR=C;exports.FLOATING_CHAT_CHROME_PX=O;exports.FLOATING_CHAT_DEFAULTS=_;exports.FLOATING_CHAT_DEFAULT_OPEN=t;exports.FLOATING_CHAT_DEFAULT_TRANSLATIONS=F;exports.FLOATING_CHAT_HEIGHT_VAR=N;exports.FLOATING_CHAT_POWERED_BY=I;exports.FLOATING_CHAT_SIDE_VAR=o;exports.FLOATING_CHAT_WELCOME_ID=E;exports.FLOATING_CHAT_WIDTH_VAR=H;
@@ -1,3 +1,4 @@
1
+ import { FloatingChatTranslations } from './FloatingChat.types';
1
2
  export declare const FLOATING_CHAT_DEFAULTS: {
2
3
  readonly POSITION: "bottom-right";
3
4
  readonly BOTTOM: 20;
@@ -7,6 +8,16 @@ export declare const FLOATING_CHAT_DEFAULTS: {
7
8
  readonly WELCOME_MESSAGE: "Hi! How can we help you today?";
8
9
  };
9
10
  export declare const CHAT_WINDOW_SIZE: {
10
- readonly width: 380;
11
+ readonly width: 360;
11
12
  readonly height: 520;
12
13
  };
14
+ export declare const FLOATING_CHAT_CHROME_PX = 140;
15
+ export declare const FLOATING_CHAT_WELCOME_ID = "welcome";
16
+ export declare const FLOATING_CHAT_DEFAULT_OPEN = false;
17
+ export declare const FLOATING_CHAT_POWERED_BY = "Forge";
18
+ export declare const FLOATING_CHAT_BADGE_MAX = 99;
19
+ export declare const FLOATING_CHAT_BOTTOM_VAR = "--Bear-FloatingChat-bottom";
20
+ export declare const FLOATING_CHAT_SIDE_VAR = "--Bear-FloatingChat-side";
21
+ export declare const FLOATING_CHAT_WIDTH_VAR = "--Bear-FloatingChat-width";
22
+ export declare const FLOATING_CHAT_HEIGHT_VAR = "--Bear-FloatingChat-height";
23
+ export declare const FLOATING_CHAT_DEFAULT_TRANSLATIONS: FloatingChatTranslations;
@@ -1,15 +1,33 @@
1
- const t = {
1
+ import { TWENTY as T, CHAT_BADGE_MAX as A } from "../../constants/numbers.const.js";
2
+ import { BOOLEAN_FALSE as _, LABEL_CLOSE as t, LABEL_NEW_MESSAGES as o, PLACEHOLDER_START_TYPING as E } from "../../constants/generals.const.js";
3
+ const L = {
2
4
  POSITION: "bottom-right",
3
- BOTTOM: 20,
4
- SIDE: 20,
5
+ BOTTOM: T,
6
+ SIDE: T,
5
7
  TITLE: "Chat",
6
8
  SUBTITLE: "We typically reply in a few minutes",
7
9
  WELCOME_MESSAGE: "Hi! How can we help you today?"
8
- }, T = {
9
- width: 380,
10
+ }, I = {
11
+ width: 360,
10
12
  height: 520
13
+ }, n = 140, C = "welcome", a = _, F = "Forge", H = A, N = "--Bear-FloatingChat-bottom", i = "--Bear-FloatingChat-side", s = "--Bear-FloatingChat-width", c = "--Bear-FloatingChat-height", G = {
14
+ placeholder: E,
15
+ typingText: "is typing...",
16
+ newMessagesLabel: o,
17
+ closeLabel: t,
18
+ openLabel: L.TITLE
11
19
  };
12
20
  export {
13
- T as CHAT_WINDOW_SIZE,
14
- t as FLOATING_CHAT_DEFAULTS
21
+ I as CHAT_WINDOW_SIZE,
22
+ H as FLOATING_CHAT_BADGE_MAX,
23
+ N as FLOATING_CHAT_BOTTOM_VAR,
24
+ n as FLOATING_CHAT_CHROME_PX,
25
+ L as FLOATING_CHAT_DEFAULTS,
26
+ a as FLOATING_CHAT_DEFAULT_OPEN,
27
+ G as FLOATING_CHAT_DEFAULT_TRANSLATIONS,
28
+ c as FLOATING_CHAT_HEIGHT_VAR,
29
+ F as FLOATING_CHAT_POWERED_BY,
30
+ i as FLOATING_CHAT_SIDE_VAR,
31
+ C as FLOATING_CHAT_WELCOME_ID,
32
+ s as FLOATING_CHAT_WIDTH_VAR
15
33
  };
@@ -1,19 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { FloatingChatProps } from './FloatingChat.types';
3
- /**
4
- * FloatingChat - Floating chat widget bubble
5
- *
6
- * @example
7
- * ```tsx
8
- * <FloatingChat
9
- * messages={messages}
10
- * onSend={handleSend}
11
- * title="Support"
12
- * subtitle="We're here to help!"
13
- * position="bottom-right"
14
- * badgeCount={2}
15
- * />
16
- * ```
17
- */
18
- export declare const FloatingChat: FC<FloatingChatProps>;
19
- export default FloatingChat;
2
+ export declare const FloatingChat: (props: FloatingChatProps) => import('react').ReactPortal | null;
@@ -1,145 +1,114 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { useState as I, useCallback as S } from "react";
3
- import { createPortal as Z } from "react-dom";
4
- import { cn as s } from "../../utils/cn.js";
5
- import { useBear as q } from "../../context/BearProvider.js";
6
- import { Button as A } from "../Button/Button.js";
7
- import { Avatar as J } from "../Avatar/Avatar.js";
8
- import "../Box/Box.js";
9
- import { Typography as c } from "../Typography/Typography.js";
10
- import { Badge as K } from "../Badge/Badge.js";
11
- import { BearIcons as n } from "@forgedevstack/bear-icons";
12
- import { Chat as O } from "../Chat/Chat.js";
13
- import { FLOATING_CHAT_DEFAULTS as a, CHAT_WINDOW_SIZE as m } from "./FloatingChat.const.js";
14
- const ct = ({
15
- messages: d,
16
- onSend: E,
17
- isLoading: z = !1,
18
- isTyping: k = !1,
19
- title: h = a.TITLE,
20
- subtitle: B = a.SUBTITLE,
21
- avatar: D,
22
- position: p = a.POSITION,
23
- bottom: f = a.BOTTOM,
24
- side: v = a.SIDE,
25
- defaultOpen: L = !1,
26
- open: _,
27
- onOpenChange: e,
28
- trigger: y,
29
- badgeCount: o,
30
- header: x,
31
- welcomeMessage: u = a.WELCOME_MESSAGE,
32
- poweredBy: N,
33
- className: F,
34
- testId: W
35
- }) => {
36
- const { mode: $ } = q(), M = $ === "dark", [P, b] = I(L), [w, l] = I(!1), i = _ ?? P, g = S(() => {
37
- const T = !i;
38
- l(!0), b(T), e == null || e(T), setTimeout(() => l(!1), 300);
39
- }, [i, e]), j = S(() => {
40
- l(!0), b(!1), e == null || e(!1), setTimeout(() => l(!1), 300);
41
- }, [e]), G = d.length === 0 && u ? [{ id: "welcome", content: u, sender: "bot", timestamp: /* @__PURE__ */ new Date() }] : d, H = {
42
- bottom: `${f}px`,
43
- [p === "bottom-right" ? "right" : "left"]: `${v}px`
44
- }, U = {
45
- bottom: `${f + 70}px`,
46
- [p === "bottom-right" ? "right" : "left"]: `${v}px`,
47
- width: m.width,
48
- height: m.height
49
- }, X = /* @__PURE__ */ r("div", { className: s("Bear-FloatingChat", F), "data-testid": W, children: [
50
- (i || w) && /* @__PURE__ */ r(
51
- "div",
1
+ import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
+ import { useState as j } from "react";
3
+ import { createPortal as V } from "react-dom";
4
+ import { BOOLEAN_FALSE as t, COMPONENT_NAME_FLOATING_CHAT as X } from "../../constants/generals.const.js";
5
+ import { cn as T } from "../../utils/cn.js";
6
+ import { resolveBearId as Y } from "../../utils/generateBearId.utils.js";
7
+ import { useBearId as Z } from "../../utils/useBearId.js";
8
+ import { Box as _ } from "../Box/Box.js";
9
+ import { Chat as k } from "../Chat/Chat.js";
10
+ import { Typography as q } from "../Typography/Typography.js";
11
+ import { FLOATING_CHAT_DEFAULTS as e, FLOATING_CHAT_DEFAULT_OPEN as z, FLOATING_CHAT_POWERED_BY as J, FLOATING_CHAT_WELCOME_ID as K, FLOATING_CHAT_DEFAULT_TRANSLATIONS as Q, CHAT_WINDOW_SIZE as $, FLOATING_CHAT_CHROME_PX as ee } from "./FloatingChat.const.js";
12
+ import { resolveFloatingChatVars as te } from "./FloatingChat.utils.js";
13
+ import { FloatingChatHeader as oe } from "./helpers/FloatingChatHeader.js";
14
+ import { FloatingChatTrigger as ae } from "./helpers/FloatingChatTrigger.js";
15
+ const he = (g) => {
16
+ const {
17
+ id: A,
18
+ testId: O,
19
+ messages: n,
20
+ onSend: h,
21
+ onStop: C,
22
+ onAttach: L,
23
+ isLoading: I = t,
24
+ isStreaming: f = t,
25
+ isTyping: E = t,
26
+ title: F = e.TITLE,
27
+ subtitle: N = e.SUBTITLE,
28
+ avatar: B,
29
+ position: S = e.POSITION,
30
+ bottom: b = e.BOTTOM,
31
+ side: u = e.SIDE,
32
+ defaultOpen: w = z,
33
+ open: i,
34
+ onOpenChange: a,
35
+ trigger: H,
36
+ badgeCount: y,
37
+ header: M,
38
+ welcomeMessage: l = e.WELCOME_MESSAGE,
39
+ poweredBy: m = J,
40
+ allowAttach: D,
41
+ className: G,
42
+ translations: v
43
+ } = g, P = Z(X), W = Y(A, P), [U, x] = j(w), r = i ?? U, s = { ...Q, ...v }, R = n.length === 0 && l ? [{ id: K, content: l, sender: "bot", timestamp: /* @__PURE__ */ new Date() }] : n, d = (c) => {
44
+ i === void 0 && x(c), a == null || a(c);
45
+ };
46
+ return typeof document > "u" ? null : V(
47
+ /* @__PURE__ */ p(
48
+ _,
52
49
  {
53
- className: s(
54
- "fixed z-50 rounded-2xl overflow-hidden shadow-2xl",
55
- "transition-all duration-300 ease-out",
56
- i && !w ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-4 scale-95 pointer-events-none"
50
+ id: W,
51
+ "data-testid": O,
52
+ className: T(
53
+ "Bear-FloatingChat",
54
+ S === "bottom-left" && "Bear-FloatingChat--left",
55
+ G
57
56
  ),
58
- style: U,
57
+ style: te(b, u),
59
58
  children: [
60
- x ? /* @__PURE__ */ t("div", { className: s(
61
- "px-4 py-3",
62
- M ? "bg-gray-800" : "bg-[var(--bear-primary-500)]"
63
- ), children: x }) : /* @__PURE__ */ r(
64
- "div",
59
+ /* @__PURE__ */ p(
60
+ _,
65
61
  {
66
- className: s(
67
- "px-4 py-3 flex items-center gap-3",
68
- "bg-[var(--bear-primary-500)] text-white"
69
- ),
62
+ className: T("Bear-FloatingChat__window", !r && "Bear-FloatingChat__window--closed"),
70
63
  children: [
71
- /* @__PURE__ */ t(
72
- J,
64
+ /* @__PURE__ */ o(
65
+ oe,
73
66
  {
74
- src: D,
75
- initials: h[0],
76
- size: "sm",
77
- className: "ring-2 ring-white/20"
67
+ header: M,
68
+ title: F,
69
+ subtitle: N,
70
+ avatar: B,
71
+ closeLabel: s.closeLabel,
72
+ onClose: () => d(t)
78
73
  }
79
74
  ),
80
- /* @__PURE__ */ r("div", { className: "flex-1", children: [
81
- /* @__PURE__ */ t(c, { variant: "subtitle2", className: "text-white font-semibold", children: h }),
82
- /* @__PURE__ */ t(c, { variant: "caption", className: "text-white/70", children: B })
83
- ] }),
84
- /* @__PURE__ */ t(
85
- A,
75
+ /* @__PURE__ */ o(
76
+ k,
86
77
  {
87
- variant: "ghost",
88
- size: "sm",
89
- onClick: j,
90
- className: "!text-white hover:!bg-white/10",
91
- children: /* @__PURE__ */ t(n.XIcon, { size: 18 })
78
+ messages: R,
79
+ onSend: h,
80
+ onStop: C,
81
+ onAttach: L,
82
+ isLoading: I,
83
+ isStreaming: f,
84
+ isTyping: E,
85
+ showAvatars: t,
86
+ height: $.height - ee,
87
+ allowAttach: D,
88
+ className: "Bear-FloatingChat__chat"
92
89
  }
93
- )
90
+ ),
91
+ m && /* @__PURE__ */ o(q, { variant: "caption", className: "Bear-FloatingChat__powered", color: "secondary", children: m })
94
92
  ]
95
93
  }
96
94
  ),
97
- /* @__PURE__ */ t(
98
- O,
95
+ /* @__PURE__ */ o(
96
+ ae,
99
97
  {
100
- messages: G,
101
- onSend: E,
102
- isLoading: z,
103
- isTyping: k,
104
- showAvatars: !1,
105
- height: m.height - 140,
106
- className: "!rounded-none !border-0"
98
+ isOpen: r,
99
+ trigger: H,
100
+ badgeCount: y,
101
+ openLabel: s.openLabel,
102
+ closeLabel: s.closeLabel,
103
+ onToggle: () => d(!r)
107
104
  }
108
- ),
109
- N && /* @__PURE__ */ t("div", { className: "px-3 py-2 text-center border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ r(c, { variant: "caption", className: "opacity-50", children: [
110
- "Powered by ",
111
- N
112
- ] }) })
105
+ )
113
106
  ]
114
107
  }
115
108
  ),
116
- /* @__PURE__ */ t("div", { className: "fixed z-50", style: H, children: y ? /* @__PURE__ */ t("div", { onClick: g, children: y }) : /* @__PURE__ */ r("div", { className: "relative", children: [
117
- /* @__PURE__ */ t(
118
- A,
119
- {
120
- variant: "primary",
121
- onClick: g,
122
- className: s(
123
- "!w-14 !h-14 !rounded-full !p-0 shadow-lg",
124
- "transition-transform duration-200",
125
- i && "rotate-180"
126
- ),
127
- children: i ? /* @__PURE__ */ t(n.XIcon, { size: 24 }) : /* @__PURE__ */ t(n.ChatIcon, { size: 24 })
128
- }
129
- ),
130
- !i && o && o > 0 && /* @__PURE__ */ t(
131
- K,
132
- {
133
- variant: "danger",
134
- size: "sm",
135
- className: "absolute -top-1 -right-1 !min-w-[20px] !h-5",
136
- children: o > 99 ? "99+" : o
137
- }
138
- )
139
- ] }) })
140
- ] });
141
- return typeof document > "u" ? null : Z(X, document.body);
109
+ document.body
110
+ );
142
111
  };
143
112
  export {
144
- ct as FloatingChat
113
+ he as FloatingChat
145
114
  };
@@ -1,45 +1,34 @@
1
1
  import { ReactNode } from 'react';
2
- import { ChatMessage } from '../Chat/Chat.types';
2
+ import { ChatMessage, ChatTranslations } from '../Chat/Chat.types';
3
+ export interface FloatingChatTranslations extends ChatTranslations {
4
+ closeLabel: string;
5
+ openLabel: string;
6
+ }
3
7
  export interface FloatingChatProps {
4
8
  id?: string;
5
- /** Chat messages */
9
+ testId?: string;
6
10
  messages: ChatMessage[];
7
- /** Callback when user sends a message */
8
11
  onSend?: (message: string) => void;
9
- /** Loading state */
12
+ onStop?: () => void;
13
+ onAttach?: (files: File[]) => void;
10
14
  isLoading?: boolean;
11
- /** Typing indicator */
15
+ isStreaming?: boolean;
12
16
  isTyping?: boolean;
13
- /** Chat title */
14
17
  title?: string;
15
- /** Chat subtitle */
16
18
  subtitle?: string;
17
- /** Avatar URL */
18
19
  avatar?: string;
19
- /** Position on screen */
20
20
  position?: 'bottom-right' | 'bottom-left';
21
- /** Distance from bottom */
22
21
  bottom?: number;
23
- /** Distance from side */
24
22
  side?: number;
25
- /** Initial open state */
26
23
  defaultOpen?: boolean;
27
- /** Controlled open state */
28
24
  open?: boolean;
29
- /** Callback when open state changes */
30
25
  onOpenChange?: (open: boolean) => void;
31
- /** Custom trigger button */
32
26
  trigger?: ReactNode;
33
- /** Badge count (e.g., unread messages) */
34
27
  badgeCount?: number;
35
- /** Header content */
36
28
  header?: ReactNode;
37
- /** Welcome message */
38
29
  welcomeMessage?: string;
39
- /** Show powered by */
40
30
  poweredBy?: string;
41
- /** Custom class name */
31
+ allowAttach?: boolean;
42
32
  className?: string;
43
- /** Test ID */
44
- testId?: string;
33
+ translations?: Partial<FloatingChatTranslations>;
45
34
  }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/generals.const.cjs"),e=require("./FloatingChat.const.cjs"),T=(t,_)=>({[e.FLOATING_CHAT_BOTTOM_VAR]:`${t}${r.UNIT_PX}`,[e.FLOATING_CHAT_SIDE_VAR]:`${_}${r.UNIT_PX}`,[e.FLOATING_CHAT_WIDTH_VAR]:`${e.CHAT_WINDOW_SIZE.width}${r.UNIT_PX}`,[e.FLOATING_CHAT_HEIGHT_VAR]:`${e.CHAT_WINDOW_SIZE.height}${r.UNIT_PX}`}),o=(t,_)=>t>_?`${_}+`:String(t);exports.resolveFloatingChatBadge=o;exports.resolveFloatingChatVars=T;
@@ -0,0 +1,2 @@
1
+ export declare const resolveFloatingChatVars: (bottom: number, side: number) => Record<string, string>;
2
+ export declare const resolveFloatingChatBadge: (count: number, max: number) => string;
@@ -0,0 +1,12 @@
1
+ import { UNIT_PX as r } from "../../constants/generals.const.js";
2
+ import { CHAT_WINDOW_SIZE as t, FLOATING_CHAT_HEIGHT_VAR as A, FLOATING_CHAT_WIDTH_VAR as o, FLOATING_CHAT_SIDE_VAR as I, FLOATING_CHAT_BOTTOM_VAR as e } from "./FloatingChat.const.js";
3
+ const H = (_, T) => ({
4
+ [e]: `${_}${r}`,
5
+ [I]: `${T}${r}`,
6
+ [o]: `${t.width}${r}`,
7
+ [A]: `${t.height}${r}`
8
+ }), C = (_, T) => _ > T ? `${T}+` : String(_);
9
+ export {
10
+ C as resolveFloatingChatBadge,
11
+ H as resolveFloatingChatVars
12
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Avatar/Avatar.cjs");require("react");const r=require("../../Box/Box.cjs"),h=require("../../CloseButton/CloseButton.cjs"),g=require("../../Flex/Flex.cjs"),s=require("../../Typography/Typography.cjs"),x=i=>{const{header:a,title:t,subtitle:l,avatar:n,closeLabel:o,onClose:c}=i;return a?e.jsx(r.Box,{className:"Bear-FloatingChat__header",children:a}):e.jsxs(g.Flex,{className:"Bear-FloatingChat__header",align:"center",gap:3,children:[e.jsx(u.Avatar,{src:n,initials:t[0],size:"sm"}),e.jsxs(r.Box,{children:[e.jsx(s.Typography,{variant:"subtitle2",className:"Bear-FloatingChat__title",children:t}),e.jsx(s.Typography,{variant:"caption",className:"Bear-FloatingChat__subtitle",children:l})]}),e.jsx(h.CloseButton,{"aria-label":o,onClick:c})]})};exports.FloatingChatHeader=x;
@@ -0,0 +1,9 @@
1
+ import { FloatingChatProps } from '../FloatingChat.types';
2
+ export declare const FloatingChatHeader: (props: {
3
+ header?: FloatingChatProps["header"];
4
+ title: string;
5
+ subtitle: string;
6
+ avatar?: string;
7
+ closeLabel: string;
8
+ onClose: () => void;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as a, jsxs as e } from "react/jsx-runtime";
2
+ import { Avatar as h } from "../../Avatar/Avatar.js";
3
+ import "react";
4
+ import { Box as i } from "../../Box/Box.js";
5
+ import { CloseButton as p } from "../../CloseButton/CloseButton.js";
6
+ import { Flex as d } from "../../Flex/Flex.js";
7
+ import { Typography as o } from "../../Typography/Typography.js";
8
+ const b = (l) => {
9
+ const { header: t, title: r, subtitle: n, avatar: s, closeLabel: m, onClose: c } = l;
10
+ return t ? /* @__PURE__ */ a(i, { className: "Bear-FloatingChat__header", children: t }) : /* @__PURE__ */ e(d, { className: "Bear-FloatingChat__header", align: "center", gap: 3, children: [
11
+ /* @__PURE__ */ a(h, { src: s, initials: r[0], size: "sm" }),
12
+ /* @__PURE__ */ e(i, { children: [
13
+ /* @__PURE__ */ a(o, { variant: "subtitle2", className: "Bear-FloatingChat__title", children: r }),
14
+ /* @__PURE__ */ a(o, { variant: "caption", className: "Bear-FloatingChat__subtitle", children: n })
15
+ ] }),
16
+ /* @__PURE__ */ a(p, { "aria-label": m, onClick: c })
17
+ ] });
18
+ };
19
+ export {
20
+ b as FloatingChatHeader
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Badge/Badge.cjs"),i=require("../../Box/Box.cjs"),B=require("../../Button/Button.cjs"),C=require("../../CloseButton/CloseButton.cjs"),d=require("../FloatingChat.const.cjs"),h=require("../FloatingChat.utils.cjs"),_=s=>{const{isOpen:a,trigger:r,badgeCount:l,openLabel:n,closeLabel:g,onToggle:t}=s,o=l??0,c=!a&&o>0;return r?e.jsx(i.Box,{className:"Bear-FloatingChat__trigger",onClick:t,children:r}):e.jsxs(i.Box,{className:"Bear-FloatingChat__trigger",children:[a?e.jsx(C.CloseButton,{"aria-label":g,onClick:t,size:"lg"}):e.jsx(B.Button,{type:"button",variant:"primary","aria-label":n,onClick:t,children:n}),c&&e.jsx(u.Badge,{variant:"danger",size:"sm",className:"Bear-FloatingChat__badge",children:h.resolveFloatingChatBadge(o,d.FLOATING_CHAT_BADGE_MAX)})]})};exports.FloatingChatTrigger=_;
@@ -0,0 +1,9 @@
1
+ import { FloatingChatProps } from '../FloatingChat.types';
2
+ export declare const FloatingChatTrigger: (props: {
3
+ isOpen: boolean;
4
+ trigger?: FloatingChatProps["trigger"];
5
+ badgeCount?: number;
6
+ openLabel: string;
7
+ closeLabel: string;
8
+ onToggle: () => void;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import { Badge as p } from "../../Badge/Badge.js";
3
+ import { Box as n } from "../../Box/Box.js";
4
+ import { Button as C } from "../../Button/Button.js";
5
+ import { CloseButton as d } from "../../CloseButton/CloseButton.js";
6
+ import { FLOATING_CHAT_BADGE_MAX as h } from "../FloatingChat.const.js";
7
+ import { resolveFloatingChatBadge as B } from "../FloatingChat.utils.js";
8
+ const N = (l) => {
9
+ const { isOpen: a, trigger: t, badgeCount: g, openLabel: e, closeLabel: s, onToggle: o } = l, i = g ?? 0, m = !a && i > 0;
10
+ return t ? /* @__PURE__ */ r(n, { className: "Bear-FloatingChat__trigger", onClick: o, children: t }) : /* @__PURE__ */ c(n, { className: "Bear-FloatingChat__trigger", children: [
11
+ a ? /* @__PURE__ */ r(d, { "aria-label": s, onClick: o, size: "lg" }) : /* @__PURE__ */ r(C, { type: "button", variant: "primary", "aria-label": e, onClick: o, children: e }),
12
+ m && /* @__PURE__ */ r(p, { variant: "danger", size: "sm", className: "Bear-FloatingChat__badge", children: B(i, h) })
13
+ ] });
14
+ };
15
+ export {
16
+ N as FloatingChatTrigger
17
+ };
@@ -1,2 +1,2 @@
1
1
  export { FloatingChat } from './FloatingChat';
2
- export type { FloatingChatProps } from './FloatingChat.types';
2
+ export type { FloatingChatProps, FloatingChatTranslations } from './FloatingChat.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),E=require("../../utils/useBearId.cjs"),o=require("../Skeleton/Skeleton.cjs"),e=require("./FormSkeleton.const.cjs"),u=({fields:s=e.FORM_SKELETON_DEFAULT_FIELDS,animation:t="pulse",id:l,testId:n,className:_})=>{const a=E.useBearId("FormSkeleton"),i=S.resolveBearId(l,a);return r.jsx("div",{id:i,"data-testid":n,className:c.cn(e.FORM_SKELETON_ROOT_CLASS,"bear-flex bear-flex-col",_),style:{gap:e.FORM_SKELETON_FIELD_GAP_PX},children:Array.from({length:s}).map((F,d)=>r.jsxs("div",{className:"Bear-FormSkeleton__field bear-flex bear-flex-col bear-gap-2",children:[r.jsx(o.Skeleton,{animation:t,width:"30%",height:e.FORM_SKELETON_LABEL_HEIGHT_PX}),r.jsx(o.Skeleton,{animation:t,width:"100%",height:e.FORM_SKELETON_FIELD_HEIGHT_PX})]},`field-${d}`))})};exports.FormSkeleton=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../constants/numbers.const.cjs"),u=require("../../constants/generals.const.cjs"),d=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),F=require("../../utils/useBearId.cjs"),n=require("../Flex/Flex.cjs"),t=require("../Skeleton/Skeleton.cjs"),_=s=>{const{fields:l=r.THREE,animation:o=u.ANIMATION_PULSE,id:a,testId:i,className:c}=s;return e.jsx(n.Flex,{id:S.resolveBearId(a,F.useBearId("FormSkeleton")),testId:i,direction:"column",gap:4,className:d.cn("Bear-FormSkeleton",c),children:Array.from({length:l}).map((k,m)=>e.jsxs(n.Flex,{direction:"column",gap:2,className:"Bear-FormSkeleton__field",children:[e.jsx(t.Skeleton,{animation:o,height:r.FOURTEEN,className:"Bear-FormSkeleton__label"}),e.jsx(t.Skeleton,{animation:o,height:r.FORTY,className:"Bear-FormSkeleton__control"})]},`field-${m}`))})};exports.FormSkeleton=_;
@@ -1,2 +1,2 @@
1
1
  import { FormSkeletonProps } from './FormSkeleton.types';
2
- export declare const FormSkeleton: ({ fields, animation, id, testId, className, }: FormSkeletonProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const FormSkeleton: (props: FormSkeletonProps) => import("react/jsx-runtime").JSX.Element;