@forgedevstack/bear 1.3.2 → 1.3.4

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 (404) hide show
  1. package/README.md +145 -288
  2. package/dist/components/AlertDialog/AlertDialog.cjs +1 -1
  3. package/dist/components/AlertDialog/AlertDialog.js +67 -84
  4. package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
  5. package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
  6. package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
  7. package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
  8. package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
  9. package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
  10. package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
  11. package/dist/components/ApprovalCard/index.d.ts +2 -0
  12. package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
  13. package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
  14. package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
  15. package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
  16. package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
  17. package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
  18. package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
  19. package/dist/components/ArtifactCard/index.d.ts +2 -0
  20. package/dist/components/Banner/Banner.const.cjs +1 -1
  21. package/dist/components/Banner/Banner.const.js +9 -8
  22. package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
  23. package/dist/components/BottomSheet/BottomSheet.js +72 -64
  24. package/dist/components/Chart/BarChart.cjs +1 -1
  25. package/dist/components/Chart/BarChart.js +65 -72
  26. package/dist/components/Chart/Chart.cjs +1 -1
  27. package/dist/components/Chart/Chart.js +21 -18
  28. package/dist/components/Chart/Chart.types.d.ts +1 -1
  29. package/dist/components/Chart/FunnelChart.cjs +1 -1
  30. package/dist/components/Chart/FunnelChart.js +38 -36
  31. package/dist/components/Chart/LineChart.cjs +1 -1
  32. package/dist/components/Chart/LineChart.js +74 -60
  33. package/dist/components/Chart/PieChart.cjs +1 -1
  34. package/dist/components/Chart/PieChart.js +102 -82
  35. package/dist/components/Chart/RadarChart.cjs +1 -1
  36. package/dist/components/Chart/RadarChart.d.ts +1 -1
  37. package/dist/components/Chart/RadarChart.js +116 -93
  38. package/dist/components/Chat/Chat.cjs +1 -1
  39. package/dist/components/Chat/Chat.const.cjs +1 -1
  40. package/dist/components/Chat/Chat.const.d.ts +9 -22
  41. package/dist/components/Chat/Chat.const.js +18 -26
  42. package/dist/components/Chat/Chat.d.ts +1 -20
  43. package/dist/components/Chat/Chat.js +107 -162
  44. package/dist/components/Chat/Chat.types.d.ts +20 -27
  45. package/dist/components/Chat/Chat.utils.cjs +1 -0
  46. package/dist/components/Chat/Chat.utils.d.ts +2 -0
  47. package/dist/components/Chat/Chat.utils.js +10 -0
  48. package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
  49. package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
  50. package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
  51. package/dist/components/Chat/index.d.ts +2 -1
  52. package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
  53. package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
  54. package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
  55. package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
  56. package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
  57. package/dist/components/ChatBubble/ChatBubble.js +32 -0
  58. package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
  59. package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
  60. package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
  61. package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
  62. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
  63. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
  64. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
  65. package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
  66. package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
  67. package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
  68. package/dist/components/ChatBubble/index.d.ts +2 -0
  69. package/dist/components/ChatError/ChatError.cjs +1 -0
  70. package/dist/components/ChatError/ChatError.const.cjs +1 -0
  71. package/dist/components/ChatError/ChatError.const.d.ts +2 -0
  72. package/dist/components/ChatError/ChatError.const.js +8 -0
  73. package/dist/components/ChatError/ChatError.d.ts +2 -0
  74. package/dist/components/ChatError/ChatError.js +32 -0
  75. package/dist/components/ChatError/ChatError.types.d.ts +14 -0
  76. package/dist/components/ChatError/index.d.ts +2 -0
  77. package/dist/components/ChipGroup/ChipGroup.cjs +1 -1
  78. package/dist/components/ChipGroup/ChipGroup.const.cjs +1 -1
  79. package/dist/components/ChipGroup/ChipGroup.const.d.ts +2 -0
  80. package/dist/components/ChipGroup/ChipGroup.const.js +6 -4
  81. package/dist/components/ChipGroup/ChipGroup.js +52 -48
  82. package/dist/components/CitationList/CitationList.cjs +1 -0
  83. package/dist/components/CitationList/CitationList.d.ts +2 -0
  84. package/dist/components/CitationList/CitationList.js +30 -0
  85. package/dist/components/CitationList/CitationList.types.d.ts +15 -0
  86. package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
  87. package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
  88. package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
  89. package/dist/components/CitationList/helpers/index.d.ts +1 -0
  90. package/dist/components/CitationList/index.d.ts +2 -0
  91. package/dist/components/CommandPalette/CommandItem.cjs +1 -0
  92. package/dist/components/CommandPalette/CommandItem.d.ts +6 -0
  93. package/dist/components/CommandPalette/CommandItem.js +39 -0
  94. package/dist/components/CommandPalette/CommandPalette.cjs +1 -1
  95. package/dist/components/CommandPalette/CommandPalette.js +129 -144
  96. package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
  97. package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
  98. package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
  99. package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
  100. package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
  101. package/dist/components/ContextMeter/ContextMeter.js +49 -0
  102. package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
  103. package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
  104. package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
  105. package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
  106. package/dist/components/ContextMeter/index.d.ts +2 -0
  107. package/dist/components/Drawer/Drawer.cjs +1 -1
  108. package/dist/components/Drawer/Drawer.const.cjs +1 -1
  109. package/dist/components/Drawer/Drawer.const.d.ts +2 -1
  110. package/dist/components/Drawer/Drawer.const.js +7 -6
  111. package/dist/components/Drawer/Drawer.d.ts +1 -1
  112. package/dist/components/Drawer/Drawer.js +101 -85
  113. package/dist/components/Drawer/Drawer.types.d.ts +4 -1
  114. package/dist/components/Drawer/hooks/useDrawer.cjs +1 -1
  115. package/dist/components/Drawer/hooks/useDrawer.js +33 -34
  116. package/dist/components/Drawer/index.d.ts +1 -1
  117. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  118. package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
  119. package/dist/components/EmptyState/EmptyState.const.d.ts +13 -6
  120. package/dist/components/EmptyState/EmptyState.const.js +30 -8
  121. package/dist/components/EmptyState/EmptyState.d.ts +1 -2
  122. package/dist/components/EmptyState/EmptyState.js +37 -41
  123. package/dist/components/EmptyState/EmptyState.types.d.ts +3 -1
  124. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
  125. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
  126. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
  127. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
  128. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
  129. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
  130. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
  131. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
  132. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
  133. package/dist/components/EmptyState/helpers/index.d.ts +3 -0
  134. package/dist/components/EmptyState/index.d.ts +1 -1
  135. package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
  136. package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
  137. package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
  138. package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
  139. package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
  140. package/dist/components/FloatingChat/FloatingChat.js +93 -124
  141. package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
  142. package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
  143. package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
  144. package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
  145. package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
  146. package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
  147. package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
  148. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
  149. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
  150. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
  151. package/dist/components/FloatingChat/index.d.ts +1 -1
  152. package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
  153. package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
  154. package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
  155. package/dist/components/HoverCard/HoverCard.cjs +4 -3
  156. package/dist/components/HoverCard/HoverCard.const.cjs +1 -0
  157. package/dist/components/HoverCard/HoverCard.const.d.ts +1 -0
  158. package/dist/components/HoverCard/HoverCard.const.js +10 -0
  159. package/dist/components/HoverCard/HoverCard.js +62 -56
  160. package/dist/components/HoverCard/HoverCard.types.d.ts +7 -0
  161. package/dist/components/Icon/index.d.ts +1 -0
  162. package/dist/components/Icon/productIcons.cjs +1 -0
  163. package/dist/components/Icon/productIcons.d.ts +7 -0
  164. package/dist/components/Icon/productIcons.js +25 -0
  165. package/dist/components/Menu/Menu.cjs +1 -1
  166. package/dist/components/Menu/Menu.const.cjs +1 -0
  167. package/dist/components/Menu/Menu.const.d.ts +2 -0
  168. package/dist/components/Menu/Menu.const.js +12 -0
  169. package/dist/components/Menu/Menu.d.ts +3 -9
  170. package/dist/components/Menu/Menu.js +57 -89
  171. package/dist/components/Menu/Menu.types.d.ts +8 -1
  172. package/dist/components/Menu/MenuDivider.cjs +1 -0
  173. package/dist/components/Menu/MenuDivider.d.ts +6 -0
  174. package/dist/components/Menu/MenuDivider.js +7 -0
  175. package/dist/components/Menu/MenuItem.cjs +1 -0
  176. package/dist/components/Menu/MenuItem.d.ts +6 -0
  177. package/dist/components/Menu/MenuItem.js +46 -0
  178. package/dist/components/MessageActions/MessageActions.cjs +1 -0
  179. package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
  180. package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
  181. package/dist/components/MessageActions/MessageActions.const.js +10 -0
  182. package/dist/components/MessageActions/MessageActions.d.ts +2 -0
  183. package/dist/components/MessageActions/MessageActions.js +31 -0
  184. package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
  185. package/dist/components/MessageActions/index.d.ts +2 -0
  186. package/dist/components/Modal/Modal.cjs +1 -1
  187. package/dist/components/Modal/Modal.const.cjs +1 -1
  188. package/dist/components/Modal/Modal.const.d.ts +1 -0
  189. package/dist/components/Modal/Modal.const.js +20 -12
  190. package/dist/components/Modal/Modal.js +62 -59
  191. package/dist/components/Modal/Modal.types.d.ts +7 -0
  192. package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
  193. package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
  194. package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
  195. package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
  196. package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
  197. package/dist/components/ModelSelect/ModelSelect.js +41 -0
  198. package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
  199. package/dist/components/ModelSelect/index.d.ts +2 -0
  200. package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
  201. package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
  202. package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
  203. package/dist/components/PasswordInput/PasswordInput.js +5 -5
  204. package/dist/components/Popover/Popover.cjs +1 -1
  205. package/dist/components/Popover/Popover.const.cjs +1 -0
  206. package/dist/components/Popover/Popover.const.d.ts +15 -1
  207. package/dist/components/Popover/Popover.const.js +29 -0
  208. package/dist/components/Popover/Popover.js +77 -73
  209. package/dist/components/Popover/Popover.types.d.ts +7 -0
  210. package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
  211. package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
  212. package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
  213. package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
  214. package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
  215. package/dist/components/PromptComposer/PromptComposer.js +132 -0
  216. package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
  217. package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
  218. package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
  219. package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
  220. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
  221. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
  222. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
  223. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
  224. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
  225. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
  226. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
  227. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
  228. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
  229. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
  230. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
  231. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
  232. package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
  233. package/dist/components/PromptComposer/index.d.ts +2 -0
  234. package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
  235. package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
  236. package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
  237. package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
  238. package/dist/components/PromptSuggestions/index.d.ts +2 -0
  239. package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
  240. package/dist/components/RichEditor/helpers/IconRender.js +16 -16
  241. package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
  242. package/dist/components/RichEditor/helpers/toolbarItemRender.js +23 -23
  243. package/dist/components/Select/Select.cjs +1 -1
  244. package/dist/components/Select/Select.const.cjs +1 -1
  245. package/dist/components/Select/Select.const.d.ts +1 -0
  246. package/dist/components/Select/Select.const.js +7 -6
  247. package/dist/components/Select/Select.js +110 -105
  248. package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
  249. package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
  250. package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
  251. package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
  252. package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
  253. package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
  254. package/dist/components/Select/helpers/index.d.ts +2 -0
  255. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  256. package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
  257. package/dist/components/Skeleton/Skeleton.const.js +5 -6
  258. package/dist/components/Skeleton/Skeleton.js +59 -59
  259. package/dist/components/StatCard/StatCard.cjs +1 -1
  260. package/dist/components/StatCard/StatCard.const.cjs +1 -1
  261. package/dist/components/StatCard/StatCard.const.d.ts +0 -7
  262. package/dist/components/StatCard/StatCard.const.js +5 -12
  263. package/dist/components/StatCard/StatCard.d.ts +1 -2
  264. package/dist/components/StatCard/StatCard.js +48 -37
  265. package/dist/components/StatCard/StatCard.utils.cjs +1 -0
  266. package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
  267. package/dist/components/StatCard/StatCard.utils.js +7 -0
  268. package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
  269. package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
  270. package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
  271. package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
  272. package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
  273. package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
  274. package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
  275. package/dist/components/StreamingMessage/index.d.ts +2 -0
  276. package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
  277. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
  278. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
  279. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
  280. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
  281. package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
  282. package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
  283. package/dist/components/ThemeSwitcher/index.d.ts +2 -0
  284. package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
  285. package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
  286. package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
  287. package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
  288. package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
  289. package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
  290. package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
  291. package/dist/components/ThinkingBlock/index.d.ts +2 -0
  292. package/dist/components/Toast/Toast.cjs +1 -1
  293. package/dist/components/Toast/Toast.const.cjs +1 -1
  294. package/dist/components/Toast/Toast.const.d.ts +2 -0
  295. package/dist/components/Toast/Toast.const.js +11 -8
  296. package/dist/components/Toast/Toast.context.cjs +1 -0
  297. package/dist/components/Toast/Toast.context.d.ts +3 -0
  298. package/dist/components/Toast/Toast.context.js +11 -0
  299. package/dist/components/Toast/Toast.d.ts +4 -3
  300. package/dist/components/Toast/Toast.icons.cjs +1 -0
  301. package/dist/components/Toast/Toast.icons.d.ts +4 -0
  302. package/dist/components/Toast/Toast.icons.js +29 -0
  303. package/dist/components/Toast/Toast.js +32 -160
  304. package/dist/components/Toast/ToastContainer.cjs +1 -0
  305. package/dist/components/Toast/ToastContainer.d.ts +3 -0
  306. package/dist/components/Toast/ToastContainer.js +39 -0
  307. package/dist/components/Toast/ToastItem.cjs +1 -0
  308. package/dist/components/Toast/ToastItem.d.ts +5 -0
  309. package/dist/components/Toast/ToastItem.js +86 -0
  310. package/dist/components/ToggleGroup/ToggleGroup.cjs +1 -0
  311. package/dist/components/ToggleGroup/ToggleGroup.const.cjs +1 -0
  312. package/dist/components/ToggleGroup/ToggleGroup.const.d.ts +15 -0
  313. package/dist/components/ToggleGroup/ToggleGroup.const.js +33 -0
  314. package/dist/components/ToggleGroup/ToggleGroup.context.cjs +1 -0
  315. package/dist/components/ToggleGroup/ToggleGroup.context.d.ts +2 -0
  316. package/dist/components/ToggleGroup/ToggleGroup.context.js +5 -0
  317. package/dist/components/ToggleGroup/ToggleGroup.d.ts +2 -0
  318. package/dist/components/ToggleGroup/ToggleGroup.js +86 -0
  319. package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +48 -0
  320. package/dist/components/ToggleGroup/ToggleGroupItem.cjs +1 -0
  321. package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +2 -0
  322. package/dist/components/ToggleGroup/ToggleGroupItem.js +50 -0
  323. package/dist/components/ToggleGroup/hooks/useToggleGroupContext.cjs +1 -0
  324. package/dist/components/ToggleGroup/hooks/useToggleGroupContext.d.ts +1 -0
  325. package/dist/components/ToggleGroup/hooks/useToggleGroupContext.js +6 -0
  326. package/dist/components/ToggleGroup/index.d.ts +4 -0
  327. package/dist/components/ToolCall/ToolCall.cjs +1 -0
  328. package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
  329. package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
  330. package/dist/components/ToolCall/ToolCall.const.js +17 -0
  331. package/dist/components/ToolCall/ToolCall.d.ts +2 -0
  332. package/dist/components/ToolCall/ToolCall.js +43 -0
  333. package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
  334. package/dist/components/ToolCall/index.d.ts +2 -0
  335. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  336. package/dist/components/Tooltip/Tooltip.const.cjs +1 -0
  337. package/dist/components/Tooltip/Tooltip.const.d.ts +8 -0
  338. package/dist/components/Tooltip/Tooltip.const.js +18 -0
  339. package/dist/components/Tooltip/Tooltip.js +59 -61
  340. package/dist/components/Tooltip/Tooltip.types.d.ts +7 -0
  341. package/dist/components/Transition/Transition.const.cjs +1 -1
  342. package/dist/components/Transition/Transition.const.js +12 -6
  343. package/dist/components/Transition/Transition.types.d.ts +1 -1
  344. package/dist/components/index.cjs +1 -1
  345. package/dist/components/index.d.ts +39 -9
  346. package/dist/components/index.js +335 -293
  347. package/dist/constants/generals.const.cjs +1 -1
  348. package/dist/constants/generals.const.d.ts +46 -0
  349. package/dist/constants/generals.const.js +158 -115
  350. package/dist/constants/keys.const.cjs +1 -1
  351. package/dist/constants/keys.const.js +2 -1
  352. package/dist/constants/numbers.const.cjs +1 -1
  353. package/dist/constants/numbers.const.d.ts +10 -0
  354. package/dist/constants/numbers.const.js +64 -53
  355. package/dist/context/BearProvider.cjs +1 -1
  356. package/dist/context/BearProvider.d.ts +19 -44
  357. package/dist/context/BearProvider.js +223 -208
  358. package/dist/context/bearProvider.types.d.ts +4 -0
  359. package/dist/context/index.d.ts +1 -1
  360. package/dist/hooks/index.cjs +1 -1
  361. package/dist/hooks/index.d.ts +2 -0
  362. package/dist/hooks/index.js +6 -4
  363. package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
  364. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
  365. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
  366. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
  367. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
  368. package/dist/hooks/useFocusTrap/index.d.ts +2 -0
  369. package/dist/hooks/useFocusTrap/useFocusTrap.cjs +1 -0
  370. package/dist/hooks/useFocusTrap/useFocusTrap.d.ts +3 -0
  371. package/dist/hooks/useFocusTrap/useFocusTrap.js +41 -0
  372. package/dist/hooks/useFocusTrap/useFocusTrap.types.d.ts +8 -0
  373. package/dist/hooks/useFocusTrap/useFocusTrap.utils.cjs +1 -0
  374. package/dist/hooks/useFocusTrap/useFocusTrap.utils.d.ts +1 -0
  375. package/dist/hooks/useFocusTrap/useFocusTrap.utils.js +23 -0
  376. package/dist/index.cjs +1 -1
  377. package/dist/index.js +483 -439
  378. package/dist/styles/_ai-chat.css +487 -0
  379. package/dist/styles/_base.css +2 -0
  380. package/dist/styles/_chart.css +144 -0
  381. package/dist/styles/_effects.css +8 -4
  382. package/dist/styles/_skeleton.css +90 -0
  383. package/dist/styles/main.css +3 -0
  384. package/dist/styles.css +953 -199
  385. package/package.json +1 -1
  386. package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
  387. package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
  388. package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
  389. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.cjs +0 -1
  390. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.cjs +0 -1
  391. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.const.js +0 -14
  392. package/dist/node_modules/@forgedevstack/bear-icons/dist/Icon.js +0 -35
  393. package/dist/node_modules/@forgedevstack/bear-icons/dist/action.cjs +0 -1
  394. package/dist/node_modules/@forgedevstack/bear-icons/dist/action.js +0 -26
  395. package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.cjs +0 -1
  396. package/dist/node_modules/@forgedevstack/bear-icons/dist/cn.utils.js +0 -4
  397. package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.cjs +0 -1
  398. package/dist/node_modules/@forgedevstack/bear-icons/dist/editor.js +0 -130
  399. package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.cjs +0 -1
  400. package/dist/node_modules/@forgedevstack/bear-icons/dist/misc.js +0 -12
  401. package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.cjs +0 -1
  402. package/dist/node_modules/@forgedevstack/bear-icons/dist/navigation.js +0 -18
  403. package/dist/node_modules/@forgedevstack/bear-icons/dist/status.cjs +0 -1
  404. package/dist/node_modules/@forgedevstack/bear-icons/dist/status.js +0 -6
@@ -1,118 +1,138 @@
1
- import { jsxs as u, jsx as o } from "react/jsx-runtime";
2
- import { useState as z } from "react";
3
- import { ZERO as h, ONE as K } from "../../constants/numbers.const.js";
4
- import { cn as N } from "../../utils/cn.js";
5
- import { Portal as Z } from "../Portal/Portal.js";
6
- import { Card as q, CardHeader as J, CardBody as Q } from "../Card/Card.js";
7
- import { Flex as _ } from "../Flex/Flex.js";
8
- import { Box as T } from "../Box/Box.js";
9
- import { Typography as D } from "../Typography/Typography.js";
10
- import { CHART as r, PIE_VIEW_FULL as ee, PIE_VIEW_ROSE as ae, CHART_LEGEND_NONE as re, CHART_LEGEND_BOTTOM as te, PIE_VIEW_HALF as le } from "./Chart.const.js";
11
- import { getChartColor as B, createArcPath as ne, polarOffset as oe } from "./Chart.utils.js";
12
- const ge = (M) => {
1
+ import { jsx as l, jsxs as h } from "react/jsx-runtime";
2
+ import { useState as J } from "react";
3
+ import { ZERO as p, ONE as Q } from "../../constants/numbers.const.js";
4
+ import { cn as f } from "../../utils/cn.js";
5
+ import { resolveBearId as ee } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as ae } from "../../utils/useBearId.js";
7
+ import { Portal as te } from "../Portal/Portal.js";
8
+ import { Card as re, CardHeader as ne, CardBody as oe } from "../Card/Card.js";
9
+ import { Flex as g } from "../Flex/Flex.js";
10
+ import { Box as P } from "../Box/Box.js";
11
+ import { Typography as M } from "../Typography/Typography.js";
12
+ import { CHART as t, PIE_VIEW_FULL as le, PIE_VIEW_ROSE as se, CHART_LEGEND_NONE as ce, CHART_LEGEND_BOTTOM as ie, PIE_VIEW_HALF as de } from "./Chart.const.js";
13
+ import { getChartColor as S, createArcPath as pe, polarOffset as me } from "./Chart.utils.js";
14
+ const Le = (F) => {
13
15
  const {
14
- data: t,
15
- height: f = r.DEFAULT_HEIGHT,
16
- showLabels: P = !0,
17
- innerRadius: S = h,
18
- startAngle: F,
19
- padAngle: A = r.DEFAULT_PAD_ANGLE,
20
- animated: U = !0,
21
- pieView: I = ee,
22
- explodeIndex: C,
23
- legendPosition: y = "right",
24
- onSliceClick: d,
25
- onSliceHover: i,
26
- showSliceTooltip: L = !0,
27
- sliceTooltipTitle: m,
28
- sliceTooltipDescription: p,
29
- sliceTooltipContent: b,
30
- className: V,
31
- ...W
32
- } = M, E = t.reduce((e, a) => e + a.value, h), [n, x] = z(null), R = I === le, v = I === ae, w = R ? r.HALF_SWEEP : r.FULL_SWEEP, X = F ?? (R ? r.HALF_PIE_START : r.DEFAULT_START_ANGLE), H = Math.max(...t.map((e) => e.value), K), $ = y === re || !P, G = y === te, O = (e, a, c) => {
33
- const s = t[c];
34
- if (i == null || i(s, c), !L)
16
+ data: r,
17
+ height: y = t.DEFAULT_HEIGHT,
18
+ showLabels: U = !0,
19
+ innerRadius: V = p,
20
+ startAngle: W,
21
+ padAngle: _ = t.DEFAULT_PAD_ANGLE,
22
+ animated: $ = !0,
23
+ pieView: B = le,
24
+ explodeIndex: X,
25
+ legendPosition: b = "right",
26
+ onSliceClick: i,
27
+ onSliceHover: d,
28
+ showSliceTooltip: v = !0,
29
+ sliceTooltipTitle: u,
30
+ sliceTooltipDescription: E,
31
+ sliceTooltipContent: A,
32
+ className: x,
33
+ id: H,
34
+ testId: L,
35
+ ...C
36
+ } = F, G = ae("PieChart"), R = ee(H, G), m = r.reduce((e, a) => e + a.value, p), [o, N] = J(null), O = B === de, T = B === se, w = O ? t.HALF_SWEEP : t.FULL_SWEEP, j = W ?? (O ? t.HALF_PIE_START : t.DEFAULT_START_ANGLE), Y = Math.max(...r.map((e) => e.value), Q), k = b === ce || !U, z = b === ie, D = (e, a, c) => {
37
+ const s = r[c];
38
+ if (d == null || d(s, c), !v)
35
39
  return;
36
- const l = Math.round(s.value / E * r.VIEWBOX);
37
- x({ x: e, y: a, index: c, label: s.label, value: s.value, pct: l });
38
- }, k = () => {
39
- x(null), i == null || i(null, null);
40
+ const n = Math.round(s.value / m * t.VIEWBOX);
41
+ N({ x: e, y: a, index: c, label: s.label, value: s.value, pct: n });
42
+ }, K = () => {
43
+ N(null), d == null || d(null, null);
40
44
  };
41
- let g = X;
42
- const Y = t.map((e, a) => {
43
- const c = v ? w / t.length - A : e.value / E * w - A, s = g, l = g + c;
44
- g += c + A;
45
- const j = v ? r.ROSE_MIN_RADIUS + e.value / H * (r.OUTER_RADIUS - r.ROSE_MIN_RADIUS) : r.OUTER_RADIUS;
45
+ if (r.length === p || m === p)
46
+ return /* @__PURE__ */ l(
47
+ g,
48
+ {
49
+ id: R,
50
+ "data-testid": L,
51
+ align: "center",
52
+ justify: "center",
53
+ className: f("Bear-Chart Bear-Chart--pie Bear-Chart--empty", x),
54
+ style: { "--Bear-Chart-height": `${y}px` },
55
+ ...C
56
+ }
57
+ );
58
+ let I = j;
59
+ const Z = r.map((e, a) => {
60
+ const c = T ? w / r.length - _ : e.value / m * w - _, s = I, n = I + c;
61
+ I += c + _;
62
+ const q = T ? t.ROSE_MIN_RADIUS + e.value / Y * (t.OUTER_RADIUS - t.ROSE_MIN_RADIUS) : t.OUTER_RADIUS;
46
63
  return {
47
64
  startAngle: s,
48
- endAngle: l,
49
- color: B(a, e.color),
50
- outerRadius: j,
65
+ endAngle: n,
66
+ color: S(a, e.color),
67
+ outerRadius: q,
51
68
  ...e
52
69
  };
53
70
  });
54
- return /* @__PURE__ */ u(
55
- _,
71
+ return /* @__PURE__ */ h(
72
+ g,
56
73
  {
57
- direction: G ? "column" : "row",
74
+ id: R,
75
+ "data-testid": L,
76
+ direction: z ? "column" : "row",
58
77
  align: "center",
59
78
  gap: 4,
60
79
  wrap: "wrap",
61
- className: N("Bear-Chart Bear-Chart--pie bear-relative bear-max-w-full", V),
62
- ...W,
80
+ className: f("Bear-Chart Bear-Chart--pie", x),
81
+ style: { "--Bear-Chart-height": `${y}px` },
82
+ ...C,
63
83
  children: [
64
- /* @__PURE__ */ o(T, { style: { width: f, height: f }, className: "bear-min-w-0 bear-shrink-0", children: /* @__PURE__ */ o("svg", { viewBox: `0 0 ${r.VIEWBOX} ${r.VIEWBOX}`, className: "bear-h-full bear-w-full", children: Y.map((e, a) => {
65
- const c = (e.startAngle + e.endAngle) / 2, s = C === a ? oe(c, r.EXPLODE_OFFSET) : { x: h, y: h };
66
- return /* @__PURE__ */ o("g", { transform: `translate(${s.x} ${s.y})`, children: /* @__PURE__ */ o(
84
+ /* @__PURE__ */ l(P, { className: "Bear-Chart__pie-canvas", children: /* @__PURE__ */ l("svg", { viewBox: `0 0 ${t.VIEWBOX} ${t.VIEWBOX}`, className: "Bear-Chart__svg", children: Z.map((e, a) => {
85
+ const c = (e.startAngle + e.endAngle) / 2, s = X === a ? me(c, t.EXPLODE_OFFSET) : { x: p, y: p };
86
+ return /* @__PURE__ */ l("g", { transform: `translate(${s.x} ${s.y})`, children: /* @__PURE__ */ l(
67
87
  "path",
68
88
  {
69
- d: ne(e.startAngle, e.endAngle, S, e.outerRadius),
89
+ d: pe(e.startAngle, e.endAngle, V, e.outerRadius),
70
90
  fill: e.color,
71
- className: N(
72
- d && "bear-cursor-pointer",
91
+ className: f(
92
+ i && "bear-cursor-pointer",
73
93
  "bear-transition-opacity hover:bear-opacity-80",
74
- U && "animate-scale-in"
94
+ $ && "animate-scale-in"
75
95
  ),
76
- style: { animationDelay: `${a * r.SLICE_DELAY_MS}ms` },
77
- onClick: () => d == null ? void 0 : d(t[a], a),
96
+ style: { animationDelay: `${a * t.SLICE_DELAY_MS}ms` },
97
+ onClick: () => i == null ? void 0 : i(r[a], a),
78
98
  tabIndex: 0,
79
99
  role: "button",
80
- "aria-label": `${t[a].label} ${Math.round(t[a].value / E * r.VIEWBOX)}%`,
81
- onKeyDown: (l) => {
82
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), d == null || d(t[a], a));
100
+ "aria-label": `${r[a].label} ${Math.round(r[a].value / m * t.VIEWBOX)}%`,
101
+ onKeyDown: (n) => {
102
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), i == null || i(r[a], a));
83
103
  },
84
- onMouseEnter: (l) => O(l.clientX, l.clientY, a),
85
- onMouseMove: (l) => O(l.clientX, l.clientY, a),
86
- onMouseLeave: k
104
+ onMouseEnter: (n) => D(n.clientX, n.clientY, a),
105
+ onMouseMove: (n) => D(n.clientX, n.clientY, a),
106
+ onMouseLeave: K
87
107
  }
88
108
  ) }, e.label);
89
109
  }) }) }),
90
- !$ && /* @__PURE__ */ o(_, { direction: "column", gap: 2, children: t.map((e, a) => /* @__PURE__ */ u(_, { align: "center", gap: 2, children: [
91
- /* @__PURE__ */ o(
92
- T,
110
+ !k && /* @__PURE__ */ l(g, { direction: "column", gap: 2, children: r.map((e, a) => /* @__PURE__ */ h(g, { align: "center", gap: 2, children: [
111
+ /* @__PURE__ */ l(
112
+ P,
93
113
  {
94
- className: "bear-h-3 bear-w-3 bear-rounded-full",
95
- style: { backgroundColor: B(a, e.color) }
114
+ className: "Bear-Chart__swatch",
115
+ style: { "--Bear-Chart-color": S(a, e.color) }
96
116
  }
97
117
  ),
98
- /* @__PURE__ */ o(D, { variant: "body2", color: "muted", children: e.label }),
99
- /* @__PURE__ */ u(D, { variant: "body2", color: "muted", children: [
100
- Math.round(e.value / E * r.VIEWBOX),
118
+ /* @__PURE__ */ l(M, { variant: "body2", color: "muted", children: e.label }),
119
+ /* @__PURE__ */ h(M, { variant: "body2", color: "muted", children: [
120
+ Math.round(e.value / m * t.VIEWBOX),
101
121
  "%"
102
122
  ] })
103
123
  ] }, e.label)) }),
104
- n && L && /* @__PURE__ */ o(Z, { children: /* @__PURE__ */ o("div", { className: "pointer-events-none fixed z-[11500] w-56 max-w-[calc(100vw-24px)]", style: { left: n.x + 12, top: n.y + 12 }, children: /* @__PURE__ */ u(q, { variant: "elevated", padding: "none", children: [
105
- (m || p) && /* @__PURE__ */ o(
106
- J,
124
+ o && v && /* @__PURE__ */ l(te, { children: /* @__PURE__ */ l("div", { className: "pointer-events-none fixed z-[11500] w-56 max-w-[calc(100vw-24px)]", style: { left: o.x + 12, top: o.y + 12 }, children: /* @__PURE__ */ h(re, { variant: "elevated", padding: "none", children: [
125
+ (u || E) && /* @__PURE__ */ l(
126
+ ne,
107
127
  {
108
- title: (m == null ? void 0 : m(t[n.index], n.index)) ?? n.label,
109
- subtitle: p == null ? void 0 : p(t[n.index], n.index)
128
+ title: (u == null ? void 0 : u(r[o.index], o.index)) ?? o.label,
129
+ subtitle: E == null ? void 0 : E(r[o.index], o.index)
110
130
  }
111
131
  ),
112
- /* @__PURE__ */ o(Q, { className: "bear-text-xs bear-text-gray-500 dark:bear-text-slate-400", children: (b == null ? void 0 : b(t[n.index], n.index)) ?? /* @__PURE__ */ u("span", { children: [
113
- n.value,
132
+ /* @__PURE__ */ l(oe, { className: "bear-text-xs bear-text-gray-500 dark:bear-text-slate-400", children: (A == null ? void 0 : A(r[o.index], o.index)) ?? /* @__PURE__ */ h("span", { children: [
133
+ o.value,
114
134
  " (",
115
- n.pct,
135
+ o.pct,
116
136
  "%)"
117
137
  ] }) })
118
138
  ] }) }) })
@@ -121,5 +141,5 @@ const ge = (M) => {
121
141
  );
122
142
  };
123
143
  export {
124
- ge as PieChart
144
+ Le as PieChart
125
145
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),c=require("../../constants/numbers.const.cjs"),C=require("../../utils/cn.cjs");require("react");const r=require("./Chart.const.cjs"),o=require("./Chart.utils.cjs"),f=u=>{const{data:s,height:E=r.CHART.DEFAULT_HEIGHT,showLabels:d=!0,showValues:h=!1,animated:_=!0,color:A,className:m,...x}=u,i=s.length;if(i===c.ZERO)return null;const b=Math.max(...s.map(e=>e.value),c.ONE),R=r.CHART.FULL_SWEEP/i,T=s.map((e,a)=>{const t=r.CHART.DEFAULT_START_ANGLE+a*R,l=e.value/b*r.CHART.OUTER_RADIUS;return o.polarToCartesian(t,l)}),g=T.map(e=>`${e.x},${e.y}`).join(" "),H=Array.from({length:r.CHART.RADAR_RINGS},(e,a)=>{const t=(a+c.ONE)/r.CHART.RADAR_RINGS*r.CHART.OUTER_RADIUS;return Array.from({length:i},(l,y)=>{const p=r.CHART.DEFAULT_START_ANGLE+y*R;return o.polarToCartesian(p,t)})});return n.jsx("div",{className:C.cn("Bear-Chart Bear-Chart--radar bear-flex bear-flex-col bear-items-center",m),style:{height:E},...x,children:n.jsxs("svg",{viewBox:`0 0 ${r.CHART.VIEWBOX} ${r.CHART.VIEWBOX}`,className:"bear-h-full bear-w-full",children:[H.map((e,a)=>n.jsx("polygon",{points:e.map(t=>`${t.x},${t.y}`).join(" "),fill:"none",stroke:"var(--bear-border-default, #e5e5e5)",strokeWidth:.4},a)),s.map((e,a)=>{const t=r.CHART.DEFAULT_START_ANGLE+a*R,l=o.polarToCartesian(t,r.CHART.OUTER_RADIUS);return n.jsx("line",{x1:r.CHART.CENTER,y1:r.CHART.CENTER,x2:l.x,y2:l.y,stroke:"var(--bear-border-default, #e5e5e5)",strokeWidth:.4},e.label)}),n.jsx("polygon",{points:g,fill:o.getChartColor(c.ZERO,A),fillOpacity:.25,stroke:o.getChartColor(c.ZERO,A),strokeWidth:.8,className:C.cn(_&&"animate-scale-in")}),T.map((e,a)=>n.jsx("circle",{cx:e.x,cy:e.y,r:r.CHART.DOT_RADIUS,fill:o.getChartColor(a,s[a].color||A)},s[a].label)),d&&s.map((e,a)=>{const t=r.CHART.DEFAULT_START_ANGLE+a*R,l=o.polarToCartesian(t,r.CHART.OUTER_RADIUS+r.CHART.RADAR_LABEL_OFFSET);return n.jsxs("text",{x:l.x,y:l.y,textAnchor:"middle",dominantBaseline:"middle",className:"bear-fill-[var(--bear-text-secondary)]",fontSize:4,children:[e.label,h?` ${e.value}`:""]},`${e.label}-label`)})]})})};exports.RadarChart=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("../../constants/numbers.const.cjs"),T=require("../../utils/cn.cjs");require("react");const U=require("../../utils/generateBearId.utils.cjs"),D=require("../../utils/useBearId.cjs"),a=require("./Chart.const.cjs"),l=require("./Chart.utils.cjs"),L=m=>{const{data:n,height:g=a.CHART.DEFAULT_HEIGHT,showLabels:x=!0,showValues:y=!1,animated:p=!0,color:R,className:d,id:H,testId:C,...u}=m,S=D.useBearId("RadarChart"),h=U.resolveBearId(H,S),A=n.length,E={"--Bear-Chart-height":`${g}px`};if(A===c.ZERO)return o.jsx("div",{id:h,"data-testid":C,className:T.cn("Bear-Chart Bear-Chart--radar Bear-Chart--empty",d),style:E,...u});const I=Math.max(...n.map(e=>e.value),c.ONE),i=a.CHART.FULL_SWEEP/A,_=n.map((e,r)=>{const t=a.CHART.DEFAULT_START_ANGLE+r*i,s=e.value/I*a.CHART.OUTER_RADIUS;return l.polarToCartesian(t,s)}),b=_.map(e=>`${e.x},${e.y}`).join(" "),B=Array.from({length:a.CHART.RADAR_RINGS},(e,r)=>{const t=(r+c.ONE)/a.CHART.RADAR_RINGS*a.CHART.OUTER_RADIUS;return Array.from({length:A},(s,N)=>{const O=a.CHART.DEFAULT_START_ANGLE+N*i;return l.polarToCartesian(O,t)})});return o.jsx("div",{id:h,"data-testid":C,className:T.cn("Bear-Chart Bear-Chart--radar",d),style:E,...u,children:o.jsxs("svg",{viewBox:`0 0 ${a.CHART.VIEWBOX} ${a.CHART.VIEWBOX}`,className:"Bear-Chart__svg",children:[B.map((e,r)=>o.jsx("polygon",{points:e.map(t=>`${t.x},${t.y}`).join(" "),fill:"none",stroke:"var(--bear-border-default, #e5e5e5)",strokeWidth:.4},r)),n.map((e,r)=>{const t=a.CHART.DEFAULT_START_ANGLE+r*i,s=l.polarToCartesian(t,a.CHART.OUTER_RADIUS);return o.jsx("line",{x1:a.CHART.CENTER,y1:a.CHART.CENTER,x2:s.x,y2:s.y,stroke:"var(--bear-border-default, #e5e5e5)",strokeWidth:.4},e.label)}),o.jsx("polygon",{points:b,fill:l.getChartColor(c.ZERO,R),fillOpacity:.25,stroke:l.getChartColor(c.ZERO,R),strokeWidth:.8,className:T.cn(p&&"animate-scale-in")}),_.map((e,r)=>o.jsx("circle",{cx:e.x,cy:e.y,r:a.CHART.DOT_RADIUS,fill:l.getChartColor(r,n[r].color||R)},n[r].label)),x&&n.map((e,r)=>{const t=a.CHART.DEFAULT_START_ANGLE+r*i,s=l.polarToCartesian(t,a.CHART.OUTER_RADIUS+a.CHART.RADAR_LABEL_OFFSET);return o.jsxs("text",{x:s.x,y:s.y,textAnchor:"middle",dominantBaseline:"middle",className:"bear-fill-[var(--bear-text-secondary)]",fontSize:4,children:[e.label,y?` ${e.value}`:""]},`${e.label}-label`)})]})})};exports.RadarChart=L;
@@ -1,2 +1,2 @@
1
1
  import { RadarChartProps } from './Chart.types';
2
- export declare const RadarChart: (props: RadarChartProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const RadarChart: (props: RadarChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,100 +1,123 @@
1
- import { jsx as n, jsxs as T } from "react/jsx-runtime";
2
- import { ZERO as A, ONE as d } from "../../constants/numbers.const.js";
3
- import { cn as u } from "../../utils/cn.js";
1
+ import { jsx as s, jsxs as y } from "react/jsx-runtime";
2
+ import { ZERO as m, ONE as f } from "../../constants/numbers.const.js";
3
+ import { cn as A } from "../../utils/cn.js";
4
4
  import "react";
5
- import { CHART as r } from "./Chart.const.js";
6
- import { polarToCartesian as c, getChartColor as R } from "./Chart.utils.js";
7
- const $ = (_) => {
5
+ import { resolveBearId as O } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as $ } from "../../utils/useBearId.js";
7
+ import { CHART as a } from "./Chart.const.js";
8
+ import { polarToCartesian as i, getChartColor as R } from "./Chart.utils.js";
9
+ const P = (g) => {
8
10
  const {
9
- data: o,
10
- height: f = r.DEFAULT_HEIGHT,
11
- showLabels: p = !0,
12
- showValues: h = !1,
13
- animated: b = !0,
14
- color: i,
15
- className: x,
16
- ...y
17
- } = _, m = o.length;
18
- if (m === A)
19
- return null;
20
- const g = Math.max(...o.map((e) => e.value), d), s = r.FULL_SWEEP / m, E = o.map((e, a) => {
21
- const t = r.DEFAULT_START_ANGLE + a * s, l = e.value / g * r.OUTER_RADIUS;
22
- return c(t, l);
23
- }), S = E.map((e) => `${e.x},${e.y}`).join(" "), U = Array.from({ length: r.RADAR_RINGS }, (e, a) => {
24
- const t = (a + d) / r.RADAR_RINGS * r.OUTER_RADIUS;
25
- return Array.from({ length: m }, (l, D) => {
26
- const L = r.DEFAULT_START_ANGLE + D * s;
27
- return c(L, t);
28
- });
29
- });
30
- return /* @__PURE__ */ n("div", { className: u("Bear-Chart Bear-Chart--radar bear-flex bear-flex-col bear-items-center", x), style: { height: f }, ...y, children: /* @__PURE__ */ T("svg", { viewBox: `0 0 ${r.VIEWBOX} ${r.VIEWBOX}`, className: "bear-h-full bear-w-full", children: [
31
- U.map((e, a) => /* @__PURE__ */ n(
32
- "polygon",
33
- {
34
- points: e.map((t) => `${t.x},${t.y}`).join(" "),
35
- fill: "none",
36
- stroke: "var(--bear-border-default, #e5e5e5)",
37
- strokeWidth: 0.4
38
- },
39
- a
40
- )),
41
- o.map((e, a) => {
42
- const t = r.DEFAULT_START_ANGLE + a * s, l = c(t, r.OUTER_RADIUS);
43
- return /* @__PURE__ */ n(
44
- "line",
45
- {
46
- x1: r.CENTER,
47
- y1: r.CENTER,
48
- x2: l.x,
49
- y2: l.y,
50
- stroke: "var(--bear-border-default, #e5e5e5)",
51
- strokeWidth: 0.4
52
- },
53
- e.label
54
- );
55
- }),
56
- /* @__PURE__ */ n(
57
- "polygon",
11
+ data: l,
12
+ height: x = a.DEFAULT_HEIGHT,
13
+ showLabels: S = !0,
14
+ showValues: C = !1,
15
+ animated: I = !0,
16
+ color: c,
17
+ className: h,
18
+ id: N,
19
+ testId: E,
20
+ ...p
21
+ } = g, U = $("RadarChart"), T = O(N, U), d = l.length, _ = { "--Bear-Chart-height": `${x}px` };
22
+ if (d === m)
23
+ return /* @__PURE__ */ s(
24
+ "div",
58
25
  {
59
- points: S,
60
- fill: R(A, i),
61
- fillOpacity: 0.25,
62
- stroke: R(A, i),
63
- strokeWidth: 0.8,
64
- className: u(b && "animate-scale-in")
26
+ id: T,
27
+ "data-testid": E,
28
+ className: A("Bear-Chart Bear-Chart--radar Bear-Chart--empty", h),
29
+ style: _,
30
+ ...p
65
31
  }
66
- ),
67
- E.map((e, a) => /* @__PURE__ */ n(
68
- "circle",
69
- {
70
- cx: e.x,
71
- cy: e.y,
72
- r: r.DOT_RADIUS,
73
- fill: R(a, o[a].color || i)
74
- },
75
- o[a].label
76
- )),
77
- p && o.map((e, a) => {
78
- const t = r.DEFAULT_START_ANGLE + a * s, l = c(t, r.OUTER_RADIUS + r.RADAR_LABEL_OFFSET);
79
- return /* @__PURE__ */ T(
80
- "text",
81
- {
82
- x: l.x,
83
- y: l.y,
84
- textAnchor: "middle",
85
- dominantBaseline: "middle",
86
- className: "bear-fill-[var(--bear-text-secondary)]",
87
- fontSize: 4,
88
- children: [
89
- e.label,
90
- h ? ` ${e.value}` : ""
91
- ]
92
- },
93
- `${e.label}-label`
94
- );
95
- })
96
- ] }) });
32
+ );
33
+ const B = Math.max(...l.map((e) => e.value), f), n = a.FULL_SWEEP / d, u = l.map((e, r) => {
34
+ const t = a.DEFAULT_START_ANGLE + r * n, o = e.value / B * a.OUTER_RADIUS;
35
+ return i(t, o);
36
+ }), D = u.map((e) => `${e.x},${e.y}`).join(" "), L = Array.from({ length: a.RADAR_RINGS }, (e, r) => {
37
+ const t = (r + f) / a.RADAR_RINGS * a.OUTER_RADIUS;
38
+ return Array.from({ length: d }, (o, b) => {
39
+ const v = a.DEFAULT_START_ANGLE + b * n;
40
+ return i(v, t);
41
+ });
42
+ });
43
+ return /* @__PURE__ */ s(
44
+ "div",
45
+ {
46
+ id: T,
47
+ "data-testid": E,
48
+ className: A("Bear-Chart Bear-Chart--radar", h),
49
+ style: _,
50
+ ...p,
51
+ children: /* @__PURE__ */ y("svg", { viewBox: `0 0 ${a.VIEWBOX} ${a.VIEWBOX}`, className: "Bear-Chart__svg", children: [
52
+ L.map((e, r) => /* @__PURE__ */ s(
53
+ "polygon",
54
+ {
55
+ points: e.map((t) => `${t.x},${t.y}`).join(" "),
56
+ fill: "none",
57
+ stroke: "var(--bear-border-default, #e5e5e5)",
58
+ strokeWidth: 0.4
59
+ },
60
+ r
61
+ )),
62
+ l.map((e, r) => {
63
+ const t = a.DEFAULT_START_ANGLE + r * n, o = i(t, a.OUTER_RADIUS);
64
+ return /* @__PURE__ */ s(
65
+ "line",
66
+ {
67
+ x1: a.CENTER,
68
+ y1: a.CENTER,
69
+ x2: o.x,
70
+ y2: o.y,
71
+ stroke: "var(--bear-border-default, #e5e5e5)",
72
+ strokeWidth: 0.4
73
+ },
74
+ e.label
75
+ );
76
+ }),
77
+ /* @__PURE__ */ s(
78
+ "polygon",
79
+ {
80
+ points: D,
81
+ fill: R(m, c),
82
+ fillOpacity: 0.25,
83
+ stroke: R(m, c),
84
+ strokeWidth: 0.8,
85
+ className: A(I && "animate-scale-in")
86
+ }
87
+ ),
88
+ u.map((e, r) => /* @__PURE__ */ s(
89
+ "circle",
90
+ {
91
+ cx: e.x,
92
+ cy: e.y,
93
+ r: a.DOT_RADIUS,
94
+ fill: R(r, l[r].color || c)
95
+ },
96
+ l[r].label
97
+ )),
98
+ S && l.map((e, r) => {
99
+ const t = a.DEFAULT_START_ANGLE + r * n, o = i(t, a.OUTER_RADIUS + a.RADAR_LABEL_OFFSET);
100
+ return /* @__PURE__ */ y(
101
+ "text",
102
+ {
103
+ x: o.x,
104
+ y: o.y,
105
+ textAnchor: "middle",
106
+ dominantBaseline: "middle",
107
+ className: "bear-fill-[var(--bear-text-secondary)]",
108
+ fontSize: 4,
109
+ children: [
110
+ e.label,
111
+ C ? ` ${e.value}` : ""
112
+ ]
113
+ },
114
+ `${e.label}-label`
115
+ );
116
+ })
117
+ ] })
118
+ }
119
+ );
97
120
  };
98
121
  export {
99
- $ as RadarChart
122
+ P as RadarChart
100
123
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),d=require("../../utils/cn.cjs"),D=require("../../context/BearProvider.cjs"),I=require("../Button/Button.cjs"),q=require("../Input/Input.cjs"),B=require("../Avatar/Avatar.cjs");require("../Box/Box.cjs");const u=require("../Typography/Typography.cjs"),_=require("@forgedevstack/bear-icons"),x=require("./Chat.const.cjs"),R=({message:r,showTimestamp:n=!0,showStatus:s=!0,showAvatar:b=!0,userAvatar:y,botAvatar:m})=>{var c;const a=r.sender==="user",f=r.sender==="system",l=x.SENDER_COLORS[r.sender];if(f)return e.jsx("div",{className:"flex justify-center my-2",children:e.jsx(u.Typography,{variant:"caption",className:"px-3 py-1 rounded-full bg-gray-100 dark:bg-gray-800",style:{color:l.text},children:r.content})});const v=a?y:m,p=r.status?x.MESSAGE_STATUS_ICONS[r.status]:null;return e.jsxs("div",{className:d.cn("flex gap-2 mb-3",a?"flex-row-reverse":"flex-row"),children:[b&&e.jsx(B.Avatar,{src:v,initials:((c=r.name)==null?void 0:c[0])||(a?"U":"B"),size:"sm",className:"flex-shrink-0"}),e.jsxs("div",{className:d.cn("flex flex-col max-w-[70%]",a?"items-end":"items-start"),children:[r.name&&e.jsx(u.Typography,{variant:"caption",className:"mb-1 opacity-60",children:r.name}),e.jsx("div",{className:d.cn("px-4 py-2 rounded-2xl",a?"rounded-br-sm":"rounded-bl-sm"),style:{backgroundColor:l.bg,color:l.text},children:typeof r.content=="string"?e.jsx(u.Typography,{variant:"body2",children:r.content}):r.content}),e.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[n&&r.timestamp&&e.jsx(u.Typography,{variant:"caption",className:"opacity-50 text-xs",children:r.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),s&&p&&a&&e.jsx("span",{className:d.cn("text-xs",r.status==="read"?"text-blue-500":"opacity-50",r.status==="error"&&"text-red-500"),children:p})]})]})]})},H=({text:r=x.CHAT_DEFAULTS.TYPING_TEXT})=>e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsxs("div",{className:"flex gap-1 px-4 py-3 bg-gray-100 dark:bg-gray-800 rounded-2xl rounded-bl-sm",children:[e.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),e.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),e.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),e.jsx(u.Typography,{variant:"caption",className:"opacity-50",children:r})]}),U=({messages:r,onSend:n,isLoading:s=!1,placeholder:b=x.CHAT_DEFAULTS.PLACEHOLDER,header:y,footer:m,showTimestamps:a=!0,showStatus:f=!0,showAvatars:l=!0,userAvatar:v,botAvatar:p,isTyping:c=!1,typingText:C,className:S,height:j=x.CHAT_DEFAULTS.HEIGHT,testId:w,disabled:h=!1})=>{const{mode:E}=D.useBear(),k=E==="dark",[o,g]=i.useState(""),T=i.useRef(null);i.useEffect(()=>{var t;(t=T.current)==null||t.scrollIntoView({behavior:"smooth"})},[r,c]);const N=i.useCallback(()=>{o.trim()&&n&&!h&&!s&&(n(o.trim()),g(""))},[o,n,h,s]),A=i.useCallback(t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),N())},[N]);return e.jsxs("div",{className:d.cn("Bear-Chat","flex flex-col rounded-xl overflow-hidden border",k?"bg-gray-900 border-gray-700":"bg-white border-gray-200",S),style:{height:typeof j=="number"?`${j}px`:j},"data-testid":w,children:[y&&e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:y}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4",children:[r.map(t=>e.jsx(R,{message:t,showTimestamp:a,showStatus:f,showAvatar:l,userAvatar:v,botAvatar:p},t.id)),c&&e.jsx(H,{text:C}),e.jsx("div",{ref:T})]}),e.jsxs("div",{className:"p-3 border-t border-gray-200 dark:border-gray-700",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(q.Input,{value:o,onChange:t=>g(t.target.value),onKeyDown:A,placeholder:b,disabled:h||s,className:"flex-1"}),e.jsx(I.Button,{variant:"primary",onClick:N,disabled:!o.trim()||h||s,children:e.jsx(_.BearIcons.SendIcon,{size:18})})]}),m&&e.jsx("div",{className:"mt-2",children:m})]})]})};exports.Chat=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("react"),r=require("../../constants/generals.const.cjs"),Z=require("../../utils/cn.cjs"),$=require("../../utils/generateBearId.utils.cjs"),ee=require("../../utils/useBearId.cjs"),te=require("../../utils/liveRegion.utils.cjs"),o=require("../Box/Box.cjs"),se=require("../Button/Button.cjs"),re=require("../ChatBubble/ChatBubble.cjs"),oe=require("../ChatError/ChatError.cjs"),ne=require("../PromptComposer/PromptComposer.cjs"),ae=require("../PromptSuggestions/PromptSuggestions.cjs"),n=require("./Chat.const.cjs"),S=require("./Chat.utils.cjs"),ce=require("./helpers/ChatTypingIndicator.cjs"),ie=E=>{const{id:C,testId:p,messages:c,onSend:L,onStop:O,onAttach:x,isLoading:N=r.BOOLEAN_FALSE,isStreaming:f=r.BOOLEAN_FALSE,isTyping:R=r.BOOLEAN_FALSE,placeholder:q,header:T,footer:H,showTimestamps:I=n.CHAT_DEFAULT_SHOW_TIMESTAMPS,showStatus:j=n.CHAT_DEFAULT_SHOW_STATUS,showAvatars:v=n.CHAT_DEFAULT_SHOW_AVATARS,userAvatar:F,botAvatar:b,typingText:y,className:w,height:U=n.CHAT_DEFAULTS.HEIGHT,disabled:P=n.CHAT_DEFAULT_DISABLED,allowAttach:D,suggestions:l,onSuggestionSelect:M,errorTitle:W,errorMessage:g,onRetry:V,translations:k}=E,z=ee.useBearId(r.COMPONENT_NAME_CHAT),G=$.resolveBearId(C,z),u=a.useRef(null),h=a.useRef(r.BOOLEAN_TRUE),A=a.useRef(null),[J,d]=a.useState(r.BOOLEAN_FALSE),_={...n.CHAT_DEFAULT_TRANSLATIONS,...k},B=f||N,s=c[c.length-1],K=B&&typeof(s==null?void 0:s.content)=="string"?s.content:void 0,Q=te.getBearLiveRegionProps("info"),m=()=>{const e=u.current;e&&(e.scrollTop=e.scrollHeight,h.current=r.BOOLEAN_TRUE,d(r.BOOLEAN_FALSE))},X=()=>{const e=u.current;if(!e)return;const i=S.isChatScrollerAtBottom(e);h.current=i,i&&d(r.BOOLEAN_FALSE)};return a.useEffect(()=>{const e=(s==null?void 0:s.id)??null,i=A.current===null,Y=e!==null&&e!==A.current;if(A.current=e,!!Y){if(i||h.current){m();return}d(r.BOOLEAN_TRUE)}},[c,s==null?void 0:s.id]),t.jsxs(o.Box,{id:G,"data-testid":p,className:Z.cn("Bear-Chat",w),style:S.resolveChatHeightVar(U),children:[T&&t.jsx(o.Box,{className:"Bear-Chat__header",children:T}),t.jsxs(o.Box,{ref:u,className:"Bear-Chat__messages",onScroll:X,children:[t.jsx(o.Box,{className:"Bear-Chat__live",...Q,children:K}),c.map(e=>t.jsx(re.ChatBubble,{message:e,showTimestamp:I,showStatus:j,showAvatar:v,userAvatar:F,botAvatar:b},e.id)),R&&!B&&t.jsx(ce.ChatTypingIndicator,{text:y??_.typingText}),g&&t.jsx(oe.ChatError,{title:W,onRetry:V,children:g}),J&&t.jsx(se.Button,{type:"button",variant:"primary",size:"sm",className:"Bear-Chat__new-messages",onClick:m,children:_.newMessagesLabel})]}),l&&l.length>0&&t.jsx(o.Box,{className:"Bear-Chat__suggestions",children:t.jsx(ae.PromptSuggestions,{suggestions:l,onSelect:M})}),t.jsxs(o.Box,{className:"Bear-Chat__composer",children:[t.jsx(ne.PromptComposer,{onSubmit:L,onStop:O,onAttach:x,isStreaming:B,disabled:P,allowAttach:D,placeholder:q??_.placeholder}),H]})]})};exports.Chat=ie;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={PLACEHOLDER:"Type a message...",HEIGHT:400,TYPING_TEXT:"is typing..."},t={sending:"○",sent:"✓",delivered:"✓✓",read:"✓✓",error:"!"},r={user:{bg:"var(--bear-primary-500)",text:"white"},bot:{bg:"var(--bear-bg-secondary)",text:"var(--bear-text-primary)"},system:{bg:"transparent",text:"var(--bear-text-tertiary, var(--bear-text-muted))"}};exports.CHAT_DEFAULTS=e;exports.MESSAGE_STATUS_ICONS=t;exports.SENDER_COLORS=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../constants/numbers.const.cjs"),T=require("../../constants/generals.const.cjs"),A={PLACEHOLDER:T.PLACEHOLDER_START_TYPING,HEIGHT:_.FOUR_HUNDRED,TYPING_TEXT:"is typing..."},E={placeholder:A.PLACEHOLDER,typingText:A.TYPING_TEXT,newMessagesLabel:T.LABEL_NEW_MESSAGES},H=_.CHAT_STICK_THRESHOLD_PX,S=T.BOOLEAN_TRUE,L=T.BOOLEAN_TRUE,C=T.BOOLEAN_TRUE,D=T.BOOLEAN_FALSE,O="--Bear-Chat-height";exports.CHAT_DEFAULTS=A;exports.CHAT_DEFAULT_DISABLED=D;exports.CHAT_DEFAULT_SHOW_AVATARS=C;exports.CHAT_DEFAULT_SHOW_STATUS=L;exports.CHAT_DEFAULT_SHOW_TIMESTAMPS=S;exports.CHAT_DEFAULT_TRANSLATIONS=E;exports.CHAT_HEIGHT_VAR=O;exports.CHAT_STICK_THRESHOLD=H;
@@ -1,26 +1,13 @@
1
+ import { ChatTranslations } from './Chat.types';
1
2
  export declare const CHAT_DEFAULTS: {
2
- readonly PLACEHOLDER: "Type a message...";
3
+ readonly PLACEHOLDER: "Start typing...";
3
4
  readonly HEIGHT: 400;
4
5
  readonly TYPING_TEXT: "is typing...";
5
6
  };
6
- export declare const MESSAGE_STATUS_ICONS: {
7
- readonly sending: "○";
8
- readonly sent: "✓";
9
- readonly delivered: "✓✓";
10
- readonly read: "✓✓";
11
- readonly error: "!";
12
- };
13
- export declare const SENDER_COLORS: {
14
- readonly user: {
15
- readonly bg: "var(--bear-primary-500)";
16
- readonly text: "white";
17
- };
18
- readonly bot: {
19
- readonly bg: "var(--bear-bg-secondary)";
20
- readonly text: "var(--bear-text-primary)";
21
- };
22
- readonly system: {
23
- readonly bg: "transparent";
24
- readonly text: "var(--bear-text-tertiary, var(--bear-text-muted))";
25
- };
26
- };
7
+ export declare const CHAT_DEFAULT_TRANSLATIONS: ChatTranslations;
8
+ export declare const CHAT_STICK_THRESHOLD = 16;
9
+ export declare const CHAT_DEFAULT_SHOW_TIMESTAMPS = true;
10
+ export declare const CHAT_DEFAULT_SHOW_STATUS = true;
11
+ export declare const CHAT_DEFAULT_SHOW_AVATARS = true;
12
+ export declare const CHAT_DEFAULT_DISABLED = false;
13
+ export declare const CHAT_HEIGHT_VAR = "--Bear-Chat-height";
@@ -1,29 +1,21 @@
1
- const e = {
2
- PLACEHOLDER: "Type a message...",
3
- HEIGHT: 400,
1
+ import { FOUR_HUNDRED as _, CHAT_STICK_THRESHOLD_PX as E } from "../../constants/numbers.const.js";
2
+ import { BOOLEAN_TRUE as T, BOOLEAN_FALSE as H, LABEL_NEW_MESSAGES as L, PLACEHOLDER_START_TYPING as S } from "../../constants/generals.const.js";
3
+ const A = {
4
+ PLACEHOLDER: S,
5
+ HEIGHT: _,
4
6
  TYPING_TEXT: "is typing..."
5
- }, r = {
6
- sending: "○",
7
- sent: "✓",
8
- delivered: "✓✓",
9
- read: "✓✓",
10
- error: "!"
11
- }, t = {
12
- user: {
13
- bg: "var(--bear-primary-500)",
14
- text: "white"
15
- },
16
- bot: {
17
- bg: "var(--bear-bg-secondary)",
18
- text: "var(--bear-text-primary)"
19
- },
20
- system: {
21
- bg: "transparent",
22
- text: "var(--bear-text-tertiary, var(--bear-text-muted))"
23
- }
24
- };
7
+ }, D = {
8
+ placeholder: A.PLACEHOLDER,
9
+ typingText: A.TYPING_TEXT,
10
+ newMessagesLabel: L
11
+ }, o = E, O = T, s = T, R = T, n = H, e = "--Bear-Chat-height";
25
12
  export {
26
- e as CHAT_DEFAULTS,
27
- r as MESSAGE_STATUS_ICONS,
28
- t as SENDER_COLORS
13
+ A as CHAT_DEFAULTS,
14
+ n as CHAT_DEFAULT_DISABLED,
15
+ R as CHAT_DEFAULT_SHOW_AVATARS,
16
+ s as CHAT_DEFAULT_SHOW_STATUS,
17
+ O as CHAT_DEFAULT_SHOW_TIMESTAMPS,
18
+ D as CHAT_DEFAULT_TRANSLATIONS,
19
+ e as CHAT_HEIGHT_VAR,
20
+ o as CHAT_STICK_THRESHOLD
29
21
  };
@@ -1,21 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { ChatProps } from './Chat.types';
3
- /**
4
- * Chat - Chat interface component
5
- *
6
- * @example
7
- * ```tsx
8
- * const [messages, setMessages] = useState<ChatMessage[]>([
9
- * { id: '1', content: 'Hello!', sender: 'bot', timestamp: new Date() },
10
- * ]);
11
- *
12
- * <Chat
13
- * messages={messages}
14
- * onSend={(msg) => setMessages([...messages, { id: Date.now().toString(), content: msg, sender: 'user' }])}
15
- * isTyping={false}
16
- * showAvatars
17
- * />
18
- * ```
19
- */
20
- export declare const Chat: FC<ChatProps>;
21
- export default Chat;
2
+ export declare const Chat: (props: ChatProps) => import("react/jsx-runtime").JSX.Element;