@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
@@ -0,0 +1,15 @@
1
+ import { ToggleGroupOrientation, ToggleGroupSize, ToggleGroupVariant } from './ToggleGroup.types';
2
+ export declare const TOGGLE_GROUP_TYPE_SINGLE = "single";
3
+ export declare const TOGGLE_GROUP_TYPE_MULTIPLE = "multiple";
4
+ export declare const TOGGLE_GROUP_ORIENTATION_HORIZONTAL = "horizontal";
5
+ export declare const TOGGLE_GROUP_ORIENTATION_VERTICAL = "vertical";
6
+ export declare const TOGGLE_GROUP_DEFAULT_SIZE: ToggleGroupSize;
7
+ export declare const TOGGLE_GROUP_DEFAULT_VARIANT: ToggleGroupVariant;
8
+ export declare const COMPONENT_NAME_TOGGLE_GROUP = "ToggleGroup";
9
+ export declare const COMPONENT_NAME_TOGGLE_GROUP_ITEM = "ToggleGroupItem";
10
+ export declare const SIZE_CLASS_MAP: Record<ToggleGroupSize, string>;
11
+ export declare const VARIANT_CLASS_MAP: Record<ToggleGroupVariant, {
12
+ base: string;
13
+ active: string;
14
+ }>;
15
+ export declare const ORIENTATION_CLASS_MAP: Record<ToggleGroupOrientation, string>;
@@ -0,0 +1,33 @@
1
+ const r = "single", e = "multiple", t = "horizontal", a = "md", b = "subtle", o = "ToggleGroup", s = "ToggleGroupItem", _ = {
2
+ sm: "h-8 px-2.5 text-xs",
3
+ md: "h-9 px-3 text-sm",
4
+ lg: "h-10 px-4 text-base"
5
+ }, v = {
6
+ subtle: {
7
+ base: "text-[var(--bear-text-secondary)] hover:bg-[var(--bear-bg-subtle)] hover:text-[var(--bear-text-primary)]",
8
+ active: "bg-[var(--bear-bg-subtle)] text-[var(--bear-text-primary)] font-medium"
9
+ },
10
+ outline: {
11
+ base: "text-[var(--bear-text-secondary)] hover:bg-[var(--bear-bg-subtle)] hover:text-[var(--bear-text-primary)] border border-transparent",
12
+ active: "border-[var(--bear-primary-500)] text-[var(--bear-primary-600)] dark:text-[var(--bear-primary-400)] bg-[var(--bear-primary-50)] dark:bg-[var(--bear-primary-950)] font-medium"
13
+ },
14
+ filled: {
15
+ base: "text-[var(--bear-text-secondary)] hover:bg-[var(--bear-bg-subtle)]",
16
+ active: "bg-[var(--bear-primary-500)] text-white hover:bg-[var(--bear-primary-600)] font-medium"
17
+ }
18
+ }, x = {
19
+ horizontal: "flex-row",
20
+ vertical: "flex-col"
21
+ };
22
+ export {
23
+ o as COMPONENT_NAME_TOGGLE_GROUP,
24
+ s as COMPONENT_NAME_TOGGLE_GROUP_ITEM,
25
+ x as ORIENTATION_CLASS_MAP,
26
+ _ as SIZE_CLASS_MAP,
27
+ a as TOGGLE_GROUP_DEFAULT_SIZE,
28
+ b as TOGGLE_GROUP_DEFAULT_VARIANT,
29
+ t as TOGGLE_GROUP_ORIENTATION_HORIZONTAL,
30
+ e as TOGGLE_GROUP_TYPE_MULTIPLE,
31
+ r as TOGGLE_GROUP_TYPE_SINGLE,
32
+ v as VARIANT_CLASS_MAP
33
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(null);exports.ToggleGroupContext=t;
@@ -0,0 +1,2 @@
1
+ import { ToggleGroupContextValue } from './ToggleGroup.types';
2
+ export declare const ToggleGroupContext: import('react').Context<ToggleGroupContextValue | null>;
@@ -0,0 +1,5 @@
1
+ import { createContext as o } from "react";
2
+ const e = o(null);
3
+ export {
4
+ e as ToggleGroupContext
5
+ };
@@ -0,0 +1,2 @@
1
+ import { ToggleGroupProps } from './ToggleGroup.types';
2
+ export declare const ToggleGroup: (props: ToggleGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,86 @@
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import { useState as I, useMemo as Z } from "react";
3
+ import { cn as j } from "../../utils/cn.js";
4
+ import { resolveBearId as z } from "../../utils/generateBearId.utils.js";
5
+ import { useBearId as K } from "../../utils/useBearId.js";
6
+ import { ToggleGroupContext as q } from "./ToggleGroup.context.js";
7
+ import { TOGGLE_GROUP_TYPE_SINGLE as u, TOGGLE_GROUP_ORIENTATION_HORIZONTAL as L, TOGGLE_GROUP_DEFAULT_SIZE as W, TOGGLE_GROUP_DEFAULT_VARIANT as J, COMPONENT_NAME_TOGGLE_GROUP as Q, TOGGLE_GROUP_TYPE_MULTIPLE as X, ORIENTATION_CLASS_MAP as $ } from "./ToggleGroup.const.js";
8
+ import { ONE as m, ZERO as V } from "../../constants/numbers.const.js";
9
+ import { EMPTY_STRING as G } from "../../constants/generals.const.js";
10
+ const dr = (y) => {
11
+ const {
12
+ type: o = u,
13
+ value: O,
14
+ defaultValue: p,
15
+ onChange: l,
16
+ onValueChange: n,
17
+ orientation: f = L,
18
+ size: E = W,
19
+ variant: _ = J,
20
+ disabled: c = !1,
21
+ fullWidth: N = !1,
22
+ className: P,
23
+ children: R,
24
+ id: b,
25
+ testId: U,
26
+ ...w
27
+ } = y, x = K(Q), S = z(b, x), [M, k] = I(() => o === u ? p ?? G : G), [D, h] = I(() => o === X ? p ?? [] : []), T = O !== void 0, i = T ? O : o === u ? M : D, B = (r) => {
28
+ if (!c)
29
+ if (o === u) {
30
+ const e = i === r ? G : r;
31
+ T || k(e), l == null || l(e), n == null || n(e);
32
+ } else {
33
+ const e = Array.isArray(i) ? i : [], t = e.includes(r) ? e.filter((s) => s !== r) : [...e, r];
34
+ T || h(t), l == null || l(t), n == null || n(t);
35
+ }
36
+ }, v = Z(
37
+ () => ({
38
+ type: o,
39
+ value: i,
40
+ onItemToggle: B,
41
+ size: E,
42
+ variant: _,
43
+ disabled: c
44
+ }),
45
+ [o, i, E, _, c]
46
+ ), F = (r) => {
47
+ var g;
48
+ const e = r.target;
49
+ if (!e || e.getAttribute("role") !== "radio") return;
50
+ const t = Array.from(
51
+ r.currentTarget.querySelectorAll('button[role="radio"]:not([disabled])')
52
+ ), s = t.indexOf(e);
53
+ if (s === -1) return;
54
+ const a = f === L, H = a && r.key === "ArrowRight" || !a && r.key === "ArrowDown", Y = a && r.key === "ArrowLeft" || !a && r.key === "ArrowUp";
55
+ let d = s;
56
+ if (H) d = (s + m) % t.length;
57
+ else if (Y) d = (s - m + t.length) % t.length;
58
+ else if (r.key === "Home") d = V;
59
+ else if (r.key === "End") d = t.length - m;
60
+ else return;
61
+ r.preventDefault(), (g = t[d]) == null || g.focus();
62
+ };
63
+ return /* @__PURE__ */ A(q.Provider, { value: v, children: /* @__PURE__ */ A(
64
+ "div",
65
+ {
66
+ id: S,
67
+ "data-testid": U,
68
+ role: "group",
69
+ "aria-orientation": f,
70
+ onKeyDown: F,
71
+ className: j(
72
+ "Bear-ToggleGroup",
73
+ "inline-flex items-center gap-1 rounded-lg border border-[var(--bear-border-subtle)] bg-[var(--bear-surface-base)] p-1",
74
+ $[f],
75
+ N && "w-full justify-stretch",
76
+ c && "opacity-60 cursor-not-allowed",
77
+ P
78
+ ),
79
+ ...w,
80
+ children: R
81
+ }
82
+ ) });
83
+ };
84
+ export {
85
+ dr as ToggleGroup
86
+ };
@@ -0,0 +1,48 @@
1
+ import { ReactNode, HTMLAttributes } from 'react';
2
+ export type ToggleGroupType = 'single' | 'multiple';
3
+ export type ToggleGroupOrientation = 'horizontal' | 'vertical';
4
+ export type ToggleGroupSize = 'sm' | 'md' | 'lg';
5
+ export type ToggleGroupVariant = 'subtle' | 'outline' | 'filled';
6
+ export interface ToggleGroupContextValue {
7
+ type: ToggleGroupType;
8
+ value: string | string[];
9
+ onItemToggle: (itemValue: string) => void;
10
+ size: ToggleGroupSize;
11
+ variant: ToggleGroupVariant;
12
+ disabled?: boolean;
13
+ }
14
+ export interface ToggleGroupSingleProps {
15
+ type?: 'single';
16
+ value?: string;
17
+ defaultValue?: string;
18
+ onChange?: (value: string) => void;
19
+ onValueChange?: (value: string) => void;
20
+ }
21
+ export interface ToggleGroupMultipleProps {
22
+ type: 'multiple';
23
+ value?: string[];
24
+ defaultValue?: string[];
25
+ onChange?: (value: string[]) => void;
26
+ onValueChange?: (value: string[]) => void;
27
+ }
28
+ export type ToggleGroupBaseProps = {
29
+ orientation?: ToggleGroupOrientation;
30
+ size?: ToggleGroupSize;
31
+ variant?: ToggleGroupVariant;
32
+ disabled?: boolean;
33
+ fullWidth?: boolean;
34
+ className?: string;
35
+ children: ReactNode;
36
+ id?: string;
37
+ testId?: string;
38
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'>;
39
+ export type ToggleGroupProps = ToggleGroupBaseProps & (ToggleGroupSingleProps | ToggleGroupMultipleProps);
40
+ export interface ToggleGroupItemProps extends HTMLAttributes<HTMLButtonElement> {
41
+ value: string;
42
+ disabled?: boolean;
43
+ children: ReactNode;
44
+ className?: string;
45
+ id?: string;
46
+ testId?: string;
47
+ ariaLabel?: string;
48
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),f=require("../../utils/cn.cjs");require("react");const m=require("../../utils/generateBearId.utils.cjs"),p=require("../../utils/useBearId.cjs"),P=require("./hooks/useToggleGroupContext.cjs"),s=require("./ToggleGroup.const.cjs"),y=require("../Button/Button.cjs"),R=l=>{const{value:r,disabled:u=!1,children:d,className:c,id:_,testId:G,ariaLabel:T,onClick:i,...g}=l,A=p.useBearId(s.COMPONENT_NAME_TOGGLE_GROUP_ITEM),E=m.resolveBearId(_,A),e=P.useToggleGroupContext(),t=e?e.type===s.TOGGLE_GROUP_TYPE_SINGLE?e.value===r:Array.isArray(e.value)&&e.value.includes(r):!1,n=u||!!(e!=null&&e.disabled),I=(e==null?void 0:e.size)??s.TOGGLE_GROUP_DEFAULT_SIZE,S=(e==null?void 0:e.variant)??s.TOGGLE_GROUP_DEFAULT_VARIANT,b=L=>{!n&&e&&e.onItemToggle(r),i==null||i(L)},a=s.VARIANT_CLASS_MAP[S]??s.VARIANT_CLASS_MAP[s.TOGGLE_GROUP_DEFAULT_VARIANT],v=s.SIZE_CLASS_MAP[I]??s.SIZE_CLASS_MAP[s.TOGGLE_GROUP_DEFAULT_SIZE],o=(e==null?void 0:e.type)===s.TOGGLE_GROUP_TYPE_SINGLE;return O.jsx(y.Button,{type:"button",id:E,testId:G,role:o?"radio":"button","aria-checked":o?t:void 0,"aria-pressed":o?void 0:t,"aria-label":T,disabled:n,onClick:b,variant:"ghost",className:f.cn("Bear-ToggleGroup__item","inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--bear-primary-500)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50 select-none cursor-pointer",v,t?a.active:a.base,c),...g,children:d})};exports.ToggleGroupItem=R;
@@ -0,0 +1,2 @@
1
+ import { ToggleGroupItemProps } from './ToggleGroup.types';
2
+ export declare const ToggleGroupItem: (props: ToggleGroupItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { jsx as O } from "react/jsx-runtime";
2
+ import { cn as N } from "../../utils/cn.js";
3
+ import "react";
4
+ import { resolveBearId as P } from "../../utils/generateBearId.utils.js";
5
+ import { useBearId as R } from "../../utils/useBearId.js";
6
+ import { useToggleGroupContext as U } from "./hooks/useToggleGroupContext.js";
7
+ import { COMPONENT_NAME_TOGGLE_GROUP_ITEM as B, TOGGLE_GROUP_TYPE_SINGLE as n, TOGGLE_GROUP_DEFAULT_SIZE as l, TOGGLE_GROUP_DEFAULT_VARIANT as d, VARIANT_CLASS_MAP as m, SIZE_CLASS_MAP as c } from "./ToggleGroup.const.js";
8
+ import { Button as C } from "../Button/Button.js";
9
+ const Z = (u) => {
10
+ const {
11
+ value: i,
12
+ disabled: f = !1,
13
+ children: p,
14
+ className: _,
15
+ id: v,
16
+ testId: b,
17
+ ariaLabel: G,
18
+ onClick: r,
19
+ ...T
20
+ } = u, g = R(B), A = P(v, g), e = U(), s = e ? e.type === n ? e.value === i : Array.isArray(e.value) && e.value.includes(i) : !1, t = f || !!(e != null && e.disabled), E = (e == null ? void 0 : e.size) ?? l, I = (e == null ? void 0 : e.variant) ?? d, S = (L) => {
21
+ !t && e && e.onItemToggle(i), r == null || r(L);
22
+ }, a = m[I] ?? m[d], y = c[E] ?? c[l], o = (e == null ? void 0 : e.type) === n;
23
+ return /* @__PURE__ */ O(
24
+ C,
25
+ {
26
+ type: "button",
27
+ id: A,
28
+ testId: b,
29
+ role: o ? "radio" : "button",
30
+ "aria-checked": o ? s : void 0,
31
+ "aria-pressed": o ? void 0 : s,
32
+ "aria-label": G,
33
+ disabled: t,
34
+ onClick: S,
35
+ variant: "ghost",
36
+ className: N(
37
+ "Bear-ToggleGroup__item",
38
+ "inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--bear-primary-500)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50 select-none cursor-pointer",
39
+ y,
40
+ s ? a.active : a.base,
41
+ _
42
+ ),
43
+ ...T,
44
+ children: p
45
+ }
46
+ );
47
+ };
48
+ export {
49
+ Z as ToggleGroupItem
50
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../ToggleGroup.context.cjs"),o=()=>e.useContext(t.ToggleGroupContext);exports.useToggleGroupContext=o;
@@ -0,0 +1 @@
1
+ export declare const useToggleGroupContext: () => import('..').ToggleGroupContextValue | null;
@@ -0,0 +1,6 @@
1
+ import { useContext as o } from "react";
2
+ import { ToggleGroupContext as t } from "../ToggleGroup.context.js";
3
+ const n = () => o(t);
4
+ export {
5
+ n as useToggleGroupContext
6
+ };
@@ -0,0 +1,4 @@
1
+ export { ToggleGroup } from './ToggleGroup';
2
+ export { ToggleGroupItem } from './ToggleGroupItem';
3
+ export { useToggleGroupContext } from './hooks/useToggleGroupContext';
4
+ export type { ToggleGroupProps, ToggleGroupItemProps, ToggleGroupType, ToggleGroupOrientation, ToggleGroupSize, ToggleGroupVariant, ToggleGroupContextValue, } from './ToggleGroup.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../constants/generals.const.cjs"),x=require("../../utils/cn.cjs");require("react");const y=require("../../utils/generateBearId.utils.cjs"),A=require("../../utils/useBearId.cjs"),C=require("../Badge/Badge.cjs"),o=require("../Box/Box.cjs"),O=require("../Flex/Flex.cjs"),a=require("../Typography/Typography.cjs"),t=require("./ToolCall.const.cjs"),h=n=>{const{id:i,testId:c,name:u,status:l=t.TOOL_CALL_DEFAULT_STATUS,kind:d=t.TOOL_CALL_DEFAULT_KIND,input:r,output:s,translations:T,className:_}=n,L=A.useBearId(g.COMPONENT_NAME_TOOL_CALL),p=y.resolveBearId(i,L),B={...t.TOOL_CALL_DEFAULT_TRANSLATIONS,...T}[t.TOOL_CALL_STATUS_LABEL_KEY[l]];return e.jsxs(o.Box,{id:p,"data-testid":c,className:x.cn("Bear-ToolCall",`Bear-ToolCall--${l}`,`Bear-ToolCall--${d}`,_),children:[e.jsxs(O.Flex,{align:"center",justify:"between",gap:2,children:[e.jsx(a.Typography,{variant:"subtitle2",children:u}),e.jsx(C.Badge,{size:"sm",children:B})]}),r&&e.jsx(o.Box,{className:"Bear-ToolCall__input",children:typeof r=="string"?e.jsx(a.Typography,{variant:"body2",children:r}):r}),s&&e.jsx(o.Box,{className:"Bear-ToolCall__output",children:typeof s=="string"?e.jsx(a.Typography,{variant:"body2",children:s}):s})]})};exports.ToolCall=h;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L={pendingLabel:"Waiting",runningLabel:"Running",successLabel:"Done",errorLabel:"Failed"},e="pending",n="generic",T={pending:"pendingLabel",running:"runningLabel",success:"successLabel",error:"errorLabel"};exports.TOOL_CALL_DEFAULT_KIND=n;exports.TOOL_CALL_DEFAULT_STATUS=e;exports.TOOL_CALL_DEFAULT_TRANSLATIONS=L;exports.TOOL_CALL_STATUS_LABEL_KEY=T;
@@ -0,0 +1,5 @@
1
+ import { ToolCallKind, ToolCallStatus, ToolCallTranslations } from './ToolCall.types';
2
+ export declare const TOOL_CALL_DEFAULT_TRANSLATIONS: ToolCallTranslations;
3
+ export declare const TOOL_CALL_DEFAULT_STATUS: ToolCallStatus;
4
+ export declare const TOOL_CALL_DEFAULT_KIND: ToolCallKind;
5
+ export declare const TOOL_CALL_STATUS_LABEL_KEY: Record<ToolCallStatus, keyof ToolCallTranslations>;
@@ -0,0 +1,17 @@
1
+ const n = {
2
+ pendingLabel: "Waiting",
3
+ runningLabel: "Running",
4
+ successLabel: "Done",
5
+ errorLabel: "Failed"
6
+ }, L = "pending", e = "generic", r = {
7
+ pending: "pendingLabel",
8
+ running: "runningLabel",
9
+ success: "successLabel",
10
+ error: "errorLabel"
11
+ };
12
+ export {
13
+ e as TOOL_CALL_DEFAULT_KIND,
14
+ L as TOOL_CALL_DEFAULT_STATUS,
15
+ n as TOOL_CALL_DEFAULT_TRANSLATIONS,
16
+ r as TOOL_CALL_STATUS_LABEL_KEY
17
+ };
@@ -0,0 +1,2 @@
1
+ import { ToolCallProps } from './ToolCall.types';
2
+ export declare const ToolCall: (props: ToolCallProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { COMPONENT_NAME_TOOL_CALL as f } from "../../constants/generals.const.js";
3
+ import { cn as O } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as u } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as C } from "../../utils/useBearId.js";
7
+ import { Badge as B } from "../Badge/Badge.js";
8
+ import { Box as e } from "../Box/Box.js";
9
+ import { Flex as N } from "../Flex/Flex.js";
10
+ import { Typography as a } from "../Typography/Typography.js";
11
+ import { TOOL_CALL_DEFAULT_STATUS as h, TOOL_CALL_DEFAULT_KIND as b, TOOL_CALL_DEFAULT_TRANSLATIONS as g, TOOL_CALL_STATUS_LABEL_KEY as y } from "./ToolCall.const.js";
12
+ const k = (s) => {
13
+ const {
14
+ id: n,
15
+ testId: m,
16
+ name: d,
17
+ status: l = h,
18
+ kind: L = b,
19
+ input: r,
20
+ output: t,
21
+ translations: T,
22
+ className: p
23
+ } = s, c = C(f), _ = u(n, c), A = { ...g, ...T }[y[l]];
24
+ return /* @__PURE__ */ i(
25
+ e,
26
+ {
27
+ id: _,
28
+ "data-testid": m,
29
+ className: O("Bear-ToolCall", `Bear-ToolCall--${l}`, `Bear-ToolCall--${L}`, p),
30
+ children: [
31
+ /* @__PURE__ */ i(N, { align: "center", justify: "between", gap: 2, children: [
32
+ /* @__PURE__ */ o(a, { variant: "subtitle2", children: d }),
33
+ /* @__PURE__ */ o(B, { size: "sm", children: A })
34
+ ] }),
35
+ r && /* @__PURE__ */ o(e, { className: "Bear-ToolCall__input", children: typeof r == "string" ? /* @__PURE__ */ o(a, { variant: "body2", children: r }) : r }),
36
+ t && /* @__PURE__ */ o(e, { className: "Bear-ToolCall__output", children: typeof t == "string" ? /* @__PURE__ */ o(a, { variant: "body2", children: t }) : t })
37
+ ]
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ k as ToolCall
43
+ };
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ export type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';
3
+ export type ToolCallKind = 'search' | 'plan' | 'edit' | 'generic';
4
+ export interface ToolCallTranslations {
5
+ pendingLabel: string;
6
+ runningLabel: string;
7
+ successLabel: string;
8
+ errorLabel: string;
9
+ }
10
+ export interface ToolCallProps {
11
+ id?: string;
12
+ testId?: string;
13
+ name: string;
14
+ status?: ToolCallStatus;
15
+ kind?: ToolCallKind;
16
+ input?: ReactNode;
17
+ output?: ReactNode;
18
+ translations?: Partial<ToolCallTranslations>;
19
+ className?: string;
20
+ }
@@ -0,0 +1,2 @@
1
+ export { ToolCall } from './ToolCall';
2
+ export type { ToolCallKind, ToolCallProps, ToolCallStatus, ToolCallTranslations, } from './ToolCall.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),t=require("react"),M=require("react-dom"),B=require("../../utils/cn.cjs"),j=({content:p,children:w,position:x,placement:R,delay:v=200,className:y,disabled:T=!1})=>{const u=R||x||"top",[i,b]=t.useState(!1),[f,E]=t.useState({x:0,y:0}),d=t.useRef(null),h=t.useRef(null),s=t.useRef(),c=t.useCallback(()=>{if(!d.current||!h.current)return;const e=d.current.getBoundingClientRect(),r=h.current.getBoundingClientRect(),l=8;let o=0,n=0;switch(u){case"top":o=e.left+(e.width-r.width)/2,n=e.top-r.height-l;break;case"bottom":o=e.left+(e.width-r.width)/2,n=e.bottom+l;break;case"left":o=e.left-r.width-l,n=e.top+(e.height-r.height)/2;break;case"right":o=e.right+l,n=e.top+(e.height-r.height)/2;break}o=Math.max(8,Math.min(o,window.innerWidth-r.width-8)),n=Math.max(8,Math.min(n,window.innerHeight-r.height-8)),E({x:o,y:n})},[u]),g=()=>{T||(s.current=setTimeout(()=>{b(!0)},v))},m=()=>{s.current&&clearTimeout(s.current),b(!1)};return t.useEffect(()=>{i&&c()},[i,c]),t.useEffect(()=>{if(!i)return;const e=()=>{requestAnimationFrame(()=>c())};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[i,c]),t.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:d,onMouseEnter:g,onMouseLeave:m,onFocus:g,onBlur:m,className:"Bear-Tooltip__trigger bear-inline-block",children:w}),i&&M.createPortal(a.jsx("div",{ref:h,role:"tooltip",style:{left:f.x,top:f.y},className:B.cn("bear-fixed bear-z-[11000]","Bear-Tooltip",`Bear-Tooltip--${u}`,"bear-px-3 bear-py-2 bear-rounded-lg","bear-bg-gray-800 bear-text-white bear-text-sm","bear-border bear-border-gray-700","bear-shadow-lg","bear-animate-in bear-fade-in bear-duration-150",y),children:a.jsx("span",{className:"Bear-Tooltip__content",children:p})}),document.body)]})};exports.Tooltip=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("react"),F=require("react-dom"),B=require("../../utils/cn.cjs"),G=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),e=require("./Tooltip.const.cjs"),a=require("../../constants/numbers.const.cjs"),q=p=>{const{content:L,children:b,position:g,placement:m,delay:x=e.TOOLTIP_DEFAULT_DELAY,className:R,disabled:w=!1,openEffect:y,closeEffect:N,effect:S}=p,T=m||g||e.TOOLTIP_POSITION_TOP,[n,u]=o.useState(!1),[f,A]=o.useState({x:a.ZERO,y:a.ZERO}),l=o.useRef(null),O=o.useRef(null),s=o.useRef(),c=o.useCallback(()=>{if(!l.current||!O.current)return;const t=l.current.getBoundingClientRect(),r=O.current.getBoundingClientRect(),I=t.left+(t.width-r.width)/a.TWO,_=t.top+(t.height-r.height)/a.TWO,E={[e.TOOLTIP_POSITION_TOP]:{x:I,y:t.top-r.height-e.TOOLTIP_SPACING},[e.TOOLTIP_POSITION_BOTTOM]:{x:I,y:t.bottom+e.TOOLTIP_SPACING},[e.TOOLTIP_POSITION_LEFT]:{x:t.left-r.width-e.TOOLTIP_SPACING,y:_},[e.TOOLTIP_POSITION_RIGHT]:{x:t.right+e.TOOLTIP_SPACING,y:_}},h=E[T]??E[e.TOOLTIP_POSITION_TOP],M=Math.max(e.TOOLTIP_VIEWPORT_PADDING,Math.min(h.x,window.innerWidth-r.width-e.TOOLTIP_VIEWPORT_PADDING)),D=Math.max(e.TOOLTIP_VIEWPORT_PADDING,Math.min(h.y,window.innerHeight-r.height-e.TOOLTIP_VIEWPORT_PADDING));A({x:M,y:D})},[T]),P=()=>{w||(s.current=setTimeout(()=>{u(!0)},x))},d=()=>{s.current&&clearTimeout(s.current),u(!1)};o.useEffect(()=>{n&&c()},[n,c]),o.useEffect(()=>{if(!n)return;const t=()=>{requestAnimationFrame(()=>c())};return t(),window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[n,c]),o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const{openEffect:C}=G.resolveOverlayEffects({openEffect:y,closeEffect:N,effect:S},"fade"),v=e.TOOLTIP_EFFECT_CLASS_MAP[C]??e.TOOLTIP_EFFECT_CLASS_MAP.fade;return i.jsxs(i.Fragment,{children:[i.jsx("div",{ref:l,onMouseEnter:P,onMouseLeave:d,onFocus:P,onBlur:d,className:"Bear-Tooltip__trigger bear-inline-block",children:b}),n&&F.createPortal(i.jsx("div",{ref:O,role:"tooltip",style:{left:f.x,top:f.y},className:B.cn("bear-fixed bear-z-[11000]","Bear-Tooltip",`Bear-Tooltip--${T}`,"bear-px-3 bear-py-2 bear-rounded-lg","bear-bg-gray-800 bear-text-white bear-text-sm","bear-border bear-border-gray-700","bear-shadow-lg",v,R),children:i.jsx("span",{className:"Bear-Tooltip__content",children:L})}),document.body)]})};exports.Tooltip=q;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../constants/numbers.const.cjs"),O={scale:"animate-scale-in",fade:"animate-fade-in","slide-down":"animate-grow-up",fold:"animate-alert-dialog-in",none:""},I=T.TWO_HUNDRED,P=T.EIGHT,_=T.EIGHT,t="top",L="bottom",n="left",e="right";exports.TOOLTIP_DEFAULT_DELAY=I;exports.TOOLTIP_EFFECT_CLASS_MAP=O;exports.TOOLTIP_POSITION_BOTTOM=L;exports.TOOLTIP_POSITION_LEFT=n;exports.TOOLTIP_POSITION_RIGHT=e;exports.TOOLTIP_POSITION_TOP=t;exports.TOOLTIP_SPACING=P;exports.TOOLTIP_VIEWPORT_PADDING=_;
@@ -1 +1,9 @@
1
1
  export declare const T_O_O_L_T_I_P_ROOT_CLASS = "Bear-Tooltip";
2
+ export declare const TOOLTIP_EFFECT_CLASS_MAP: Record<string, string>;
3
+ export declare const TOOLTIP_DEFAULT_DELAY = 200;
4
+ export declare const TOOLTIP_SPACING = 8;
5
+ export declare const TOOLTIP_VIEWPORT_PADDING = 8;
6
+ export declare const TOOLTIP_POSITION_TOP = "top";
7
+ export declare const TOOLTIP_POSITION_BOTTOM = "bottom";
8
+ export declare const TOOLTIP_POSITION_LEFT = "left";
9
+ export declare const TOOLTIP_POSITION_RIGHT = "right";
@@ -0,0 +1,18 @@
1
+ import { TWO_HUNDRED as O, EIGHT as T } from "../../constants/numbers.const.js";
2
+ const t = {
3
+ scale: "animate-scale-in",
4
+ fade: "animate-fade-in",
5
+ "slide-down": "animate-grow-up",
6
+ fold: "animate-alert-dialog-in",
7
+ none: ""
8
+ }, o = O, n = T, P = T, _ = "top", a = "bottom", e = "left", L = "right";
9
+ export {
10
+ o as TOOLTIP_DEFAULT_DELAY,
11
+ t as TOOLTIP_EFFECT_CLASS_MAP,
12
+ a as TOOLTIP_POSITION_BOTTOM,
13
+ e as TOOLTIP_POSITION_LEFT,
14
+ L as TOOLTIP_POSITION_RIGHT,
15
+ _ as TOOLTIP_POSITION_TOP,
16
+ n as TOOLTIP_SPACING,
17
+ P as TOOLTIP_VIEWPORT_PADDING
18
+ };
@@ -1,78 +1,76 @@
1
- import { jsxs as k, Fragment as L, jsx as d } from "react/jsx-runtime";
2
- import { useState as w, useRef as h, useCallback as C, useEffect as b } from "react";
3
- import { createPortal as _ } from "react-dom";
4
- import { cn as z } from "../../utils/cn.js";
5
- const V = ({
6
- content: x,
7
- children: v,
8
- position: y,
9
- placement: M,
10
- delay: R = 200,
11
- className: T,
12
- disabled: B = !1
13
- }) => {
14
- const c = M || y || "top", [i, m] = w(!1), [f, E] = w({ x: 0, y: 0 }), l = h(null), u = h(null), n = h(), a = C(() => {
15
- if (!l.current || !u.current) return;
16
- const e = l.current.getBoundingClientRect(), t = u.current.getBoundingClientRect(), s = 8;
17
- let r = 0, o = 0;
18
- switch (c) {
19
- case "top":
20
- r = e.left + (e.width - t.width) / 2, o = e.top - t.height - s;
21
- break;
22
- case "bottom":
23
- r = e.left + (e.width - t.width) / 2, o = e.bottom + s;
24
- break;
25
- case "left":
26
- r = e.left - t.width - s, o = e.top + (e.height - t.height) / 2;
27
- break;
28
- case "right":
29
- r = e.right + s, o = e.top + (e.height - t.height) / 2;
30
- break;
31
- }
32
- r = Math.max(8, Math.min(r, window.innerWidth - t.width - 8)), o = Math.max(8, Math.min(o, window.innerHeight - t.height - 8)), E({ x: r, y: o });
33
- }, [c]), g = () => {
34
- B || (n.current = setTimeout(() => {
1
+ import { jsxs as j, Fragment as k, jsx as f } from "react/jsx-runtime";
2
+ import { useState as I, useRef as d, useCallback as H, useEffect as u } from "react";
3
+ import { createPortal as Y } from "react-dom";
4
+ import { cn as q } from "../../utils/cn.js";
5
+ import { resolveOverlayEffects as U } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
6
+ import { TOOLTIP_DEFAULT_DELAY as X, TOOLTIP_POSITION_RIGHT as Z, TOOLTIP_SPACING as i, TOOLTIP_POSITION_LEFT as $, TOOLTIP_POSITION_BOTTOM as J, TOOLTIP_POSITION_TOP as T, TOOLTIP_VIEWPORT_PADDING as s, TOOLTIP_EFFECT_CLASS_MAP as _ } from "./Tooltip.const.js";
7
+ import { ZERO as w, TWO as L } from "../../constants/numbers.const.js";
8
+ const ie = (x) => {
9
+ const {
10
+ content: y,
11
+ children: v,
12
+ position: R,
13
+ placement: M,
14
+ delay: N = X,
15
+ className: B,
16
+ disabled: C = !1,
17
+ openEffect: S,
18
+ closeEffect: A,
19
+ effect: F
20
+ } = x, c = M || R || T, [o, m] = I(!1), [p, D] = I({ x: w, y: w }), a = d(null), l = d(null), r = d(), n = H(() => {
21
+ if (!a.current || !l.current) return;
22
+ const e = a.current.getBoundingClientRect(), t = l.current.getBoundingClientRect(), g = e.left + (e.width - t.width) / L, P = e.top + (e.height - t.height) / L, b = {
23
+ [T]: { x: g, y: e.top - t.height - i },
24
+ [J]: { x: g, y: e.bottom + i },
25
+ [$]: { x: e.left - t.width - i, y: P },
26
+ [Z]: { x: e.right + i, y: P }
27
+ }, E = b[c] ?? b[T], V = Math.max(s, Math.min(E.x, window.innerWidth - t.width - s)), W = Math.max(s, Math.min(E.y, window.innerHeight - t.height - s));
28
+ D({ x: V, y: W });
29
+ }, [c]), O = () => {
30
+ C || (r.current = setTimeout(() => {
35
31
  m(!0);
36
- }, R));
37
- }, p = () => {
38
- n.current && clearTimeout(n.current), m(!1);
32
+ }, N));
33
+ }, h = () => {
34
+ r.current && clearTimeout(r.current), m(!1);
39
35
  };
40
- return b(() => {
41
- i && a();
42
- }, [i, a]), b(() => {
43
- if (!i) return;
36
+ u(() => {
37
+ o && n();
38
+ }, [o, n]), u(() => {
39
+ if (!o) return;
44
40
  const e = () => {
45
- requestAnimationFrame(() => a());
41
+ requestAnimationFrame(() => n());
46
42
  };
47
43
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
48
44
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
49
45
  };
50
- }, [i, a]), b(() => () => {
51
- n.current && clearTimeout(n.current);
52
- }, []), /* @__PURE__ */ k(L, { children: [
53
- /* @__PURE__ */ d(
46
+ }, [o, n]), u(() => () => {
47
+ r.current && clearTimeout(r.current);
48
+ }, []);
49
+ const { openEffect: z } = U({ openEffect: S, closeEffect: A, effect: F }, "fade"), G = _[z] ?? _.fade;
50
+ return /* @__PURE__ */ j(k, { children: [
51
+ /* @__PURE__ */ f(
54
52
  "div",
55
53
  {
56
- ref: l,
57
- onMouseEnter: g,
58
- onMouseLeave: p,
59
- onFocus: g,
60
- onBlur: p,
54
+ ref: a,
55
+ onMouseEnter: O,
56
+ onMouseLeave: h,
57
+ onFocus: O,
58
+ onBlur: h,
61
59
  className: "Bear-Tooltip__trigger bear-inline-block",
62
60
  children: v
63
61
  }
64
62
  ),
65
- i && _(
66
- /* @__PURE__ */ d(
63
+ o && Y(
64
+ /* @__PURE__ */ f(
67
65
  "div",
68
66
  {
69
- ref: u,
67
+ ref: l,
70
68
  role: "tooltip",
71
69
  style: {
72
- left: f.x,
73
- top: f.y
70
+ left: p.x,
71
+ top: p.y
74
72
  },
75
- className: z(
73
+ className: q(
76
74
  "bear-fixed bear-z-[11000]",
77
75
  "Bear-Tooltip",
78
76
  `Bear-Tooltip--${c}`,
@@ -80,10 +78,10 @@ const V = ({
80
78
  "bear-bg-gray-800 bear-text-white bear-text-sm",
81
79
  "bear-border bear-border-gray-700",
82
80
  "bear-shadow-lg",
83
- "bear-animate-in bear-fade-in bear-duration-150",
84
- T
81
+ G,
82
+ B
85
83
  ),
86
- children: /* @__PURE__ */ d("span", { className: "Bear-Tooltip__content", children: x })
84
+ children: /* @__PURE__ */ f("span", { className: "Bear-Tooltip__content", children: y })
87
85
  }
88
86
  ),
89
87
  document.body
@@ -91,5 +89,5 @@ const V = ({
91
89
  ] });
92
90
  };
93
91
  export {
94
- V as Tooltip
92
+ ie as Tooltip
95
93
  };
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { OverlayMotionEffect, OverlayEffectConfig } from '../../hooks/useFixedAnchorPosition';
2
3
  export interface TooltipProps {
3
4
  testId?: string;
4
5
  id?: string;
@@ -16,4 +17,10 @@ export interface TooltipProps {
16
17
  className?: string;
17
18
  /** Whether tooltip is disabled */
18
19
  disabled?: boolean;
20
+ /** Transition effect when opening */
21
+ openEffect?: OverlayMotionEffect;
22
+ /** Transition effect when closing */
23
+ closeEffect?: OverlayMotionEffect;
24
+ /** Config for open and close transition effects */
25
+ effect?: OverlayEffectConfig;
19
26
  }