@forgedevstack/bear 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. package/README.md +30 -0
  2. package/dist/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
  3. package/dist/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
  4. package/dist/components/Alert/Alert.cjs +1 -1
  5. package/dist/components/Alert/Alert.js +1 -1
  6. package/dist/components/ApprovalCard/ApprovalCard.cjs +1 -0
  7. package/dist/components/ApprovalCard/ApprovalCard.const.cjs +1 -0
  8. package/dist/components/ApprovalCard/ApprovalCard.const.d.ts +2 -0
  9. package/dist/components/ApprovalCard/ApprovalCard.const.js +8 -0
  10. package/dist/components/ApprovalCard/ApprovalCard.d.ts +2 -0
  11. package/dist/components/ApprovalCard/ApprovalCard.js +25 -0
  12. package/dist/components/ApprovalCard/ApprovalCard.types.d.ts +15 -0
  13. package/dist/components/ApprovalCard/index.d.ts +2 -0
  14. package/dist/components/ArtifactCard/ArtifactCard.cjs +1 -0
  15. package/dist/components/ArtifactCard/ArtifactCard.const.cjs +1 -0
  16. package/dist/components/ArtifactCard/ArtifactCard.const.d.ts +3 -0
  17. package/dist/components/ArtifactCard/ArtifactCard.const.js +8 -0
  18. package/dist/components/ArtifactCard/ArtifactCard.d.ts +2 -0
  19. package/dist/components/ArtifactCard/ArtifactCard.js +43 -0
  20. package/dist/components/ArtifactCard/ArtifactCard.types.d.ts +15 -0
  21. package/dist/components/ArtifactCard/index.d.ts +2 -0
  22. package/dist/components/Avatar/Avatar.cjs +1 -1
  23. package/dist/components/Avatar/Avatar.js +1 -1
  24. package/dist/components/BackTop/BackTop.cjs +1 -1
  25. package/dist/components/BackTop/BackTop.js +1 -1
  26. package/dist/components/Banner/Banner.const.cjs +1 -1
  27. package/dist/components/Banner/Banner.const.js +10 -9
  28. package/dist/components/Blockquote/Blockquote.cjs +1 -1
  29. package/dist/components/Blockquote/Blockquote.js +1 -1
  30. package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
  31. package/dist/components/BottomSheet/BottomSheet.js +1 -1
  32. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
  33. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  34. package/dist/components/Calendar/Calendar.cjs +1 -1
  35. package/dist/components/Calendar/Calendar.js +1 -1
  36. package/dist/components/Chart/BarChart.cjs +1 -1
  37. package/dist/components/Chart/BarChart.d.ts +1 -2
  38. package/dist/components/Chart/BarChart.js +74 -61
  39. package/dist/components/Chart/Chart.cjs +1 -1
  40. package/dist/components/Chart/Chart.const.cjs +1 -1
  41. package/dist/components/Chart/Chart.const.d.ts +24 -3
  42. package/dist/components/Chart/Chart.const.js +39 -16
  43. package/dist/components/Chart/Chart.d.ts +1 -5
  44. package/dist/components/Chart/Chart.js +23 -24
  45. package/dist/components/Chart/Chart.types.d.ts +12 -20
  46. package/dist/components/Chart/Chart.utils.cjs +1 -1
  47. package/dist/components/Chart/Chart.utils.d.ts +8 -18
  48. package/dist/components/Chart/Chart.utils.js +39 -3
  49. package/dist/components/Chart/FunnelChart.cjs +1 -0
  50. package/dist/components/Chart/FunnelChart.d.ts +2 -0
  51. package/dist/components/Chart/FunnelChart.js +61 -0
  52. package/dist/components/Chart/LineChart.cjs +1 -1
  53. package/dist/components/Chart/LineChart.d.ts +1 -2
  54. package/dist/components/Chart/LineChart.js +80 -70
  55. package/dist/components/Chart/PieChart.cjs +1 -1
  56. package/dist/components/Chart/PieChart.d.ts +1 -2
  57. package/dist/components/Chart/PieChart.js +140 -105
  58. package/dist/components/Chart/PieChart.types.d.ts +8 -0
  59. package/dist/components/Chart/RadarChart.cjs +1 -0
  60. package/dist/components/Chart/RadarChart.d.ts +2 -0
  61. package/dist/components/Chart/RadarChart.js +123 -0
  62. package/dist/components/Chart/index.d.ts +3 -1
  63. package/dist/components/Chat/Chat.cjs +1 -1
  64. package/dist/components/Chat/Chat.const.cjs +1 -1
  65. package/dist/components/Chat/Chat.const.d.ts +9 -22
  66. package/dist/components/Chat/Chat.const.js +18 -26
  67. package/dist/components/Chat/Chat.d.ts +1 -20
  68. package/dist/components/Chat/Chat.js +107 -162
  69. package/dist/components/Chat/Chat.types.d.ts +20 -27
  70. package/dist/components/Chat/Chat.utils.cjs +1 -0
  71. package/dist/components/Chat/Chat.utils.d.ts +2 -0
  72. package/dist/components/Chat/Chat.utils.js +10 -0
  73. package/dist/components/Chat/helpers/ChatTypingIndicator.cjs +1 -0
  74. package/dist/components/Chat/helpers/ChatTypingIndicator.d.ts +3 -0
  75. package/dist/components/Chat/helpers/ChatTypingIndicator.js +14 -0
  76. package/dist/components/Chat/index.d.ts +2 -1
  77. package/dist/components/ChatBubble/ChatBubble.cjs +1 -0
  78. package/dist/components/ChatBubble/ChatBubble.const.cjs +1 -0
  79. package/dist/components/ChatBubble/ChatBubble.const.d.ts +13 -0
  80. package/dist/components/ChatBubble/ChatBubble.const.js +17 -0
  81. package/dist/components/ChatBubble/ChatBubble.d.ts +2 -0
  82. package/dist/components/ChatBubble/ChatBubble.js +32 -0
  83. package/dist/components/ChatBubble/ChatBubble.types.d.ts +12 -0
  84. package/dist/components/ChatBubble/ChatBubble.utils.cjs +1 -0
  85. package/dist/components/ChatBubble/ChatBubble.utils.d.ts +6 -0
  86. package/dist/components/ChatBubble/ChatBubble.utils.js +15 -0
  87. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.cjs +1 -0
  88. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.d.ts +2 -0
  89. package/dist/components/ChatBubble/helpers/ChatBubbleSystem.js +21 -0
  90. package/dist/components/ChatBubble/helpers/ChatBubbleThread.cjs +1 -0
  91. package/dist/components/ChatBubble/helpers/ChatBubbleThread.d.ts +4 -0
  92. package/dist/components/ChatBubble/helpers/ChatBubbleThread.js +63 -0
  93. package/dist/components/ChatBubble/index.d.ts +2 -0
  94. package/dist/components/ChatError/ChatError.cjs +1 -0
  95. package/dist/components/ChatError/ChatError.const.cjs +1 -0
  96. package/dist/components/ChatError/ChatError.const.d.ts +2 -0
  97. package/dist/components/ChatError/ChatError.const.js +8 -0
  98. package/dist/components/ChatError/ChatError.d.ts +2 -0
  99. package/dist/components/ChatError/ChatError.js +32 -0
  100. package/dist/components/ChatError/ChatError.types.d.ts +14 -0
  101. package/dist/components/ChatError/index.d.ts +2 -0
  102. package/dist/components/CitationList/CitationList.cjs +1 -0
  103. package/dist/components/CitationList/CitationList.d.ts +2 -0
  104. package/dist/components/CitationList/CitationList.js +30 -0
  105. package/dist/components/CitationList/CitationList.types.d.ts +15 -0
  106. package/dist/components/CitationList/helpers/CitationListTitle.cjs +1 -0
  107. package/dist/components/CitationList/helpers/CitationListTitle.d.ts +2 -0
  108. package/dist/components/CitationList/helpers/CitationListTitle.js +10 -0
  109. package/dist/components/CitationList/helpers/index.d.ts +1 -0
  110. package/dist/components/CitationList/index.d.ts +2 -0
  111. package/dist/components/ContextMeter/ContextMeter.cjs +1 -0
  112. package/dist/components/ContextMeter/ContextMeter.const.cjs +1 -0
  113. package/dist/components/ContextMeter/ContextMeter.const.d.ts +6 -0
  114. package/dist/components/ContextMeter/ContextMeter.const.js +11 -0
  115. package/dist/components/ContextMeter/ContextMeter.d.ts +2 -0
  116. package/dist/components/ContextMeter/ContextMeter.js +49 -0
  117. package/dist/components/ContextMeter/ContextMeter.types.d.ts +11 -0
  118. package/dist/components/ContextMeter/ContextMeter.utils.cjs +1 -0
  119. package/dist/components/ContextMeter/ContextMeter.utils.d.ts +2 -0
  120. package/dist/components/ContextMeter/ContextMeter.utils.js +12 -0
  121. package/dist/components/ContextMeter/index.d.ts +2 -0
  122. package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -1
  123. package/dist/components/CurrencyInput/CurrencyInput.js +1 -1
  124. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  125. package/dist/components/DatePicker/DatePicker.js +1 -1
  126. package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -1
  127. package/dist/components/DateRangePicker/DateRangePicker.js +1 -1
  128. package/dist/components/Drawer/Drawer.cjs +1 -1
  129. package/dist/components/Drawer/Drawer.const.cjs +1 -1
  130. package/dist/components/Drawer/Drawer.const.d.ts +4 -12
  131. package/dist/components/Drawer/Drawer.const.js +7 -55
  132. package/dist/components/Drawer/Drawer.d.ts +1 -2
  133. package/dist/components/Drawer/Drawer.js +78 -112
  134. package/dist/components/Drawer/Drawer.types.d.ts +20 -4
  135. package/dist/components/Drawer/Drawer.utils.d.ts +0 -4
  136. package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.cjs +1 -0
  137. package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.d.ts +2 -0
  138. package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.js +26 -0
  139. package/dist/components/Drawer/components/DrawerHeader/DrawerHeader.types.d.ts +20 -0
  140. package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.cjs +1 -0
  141. package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.d.ts +2 -0
  142. package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderClose.js +17 -0
  143. package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.cjs +1 -0
  144. package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.d.ts +2 -0
  145. package/dist/components/Drawer/components/DrawerHeader/DrawerHeaderTitle.js +9 -0
  146. package/dist/components/Drawer/components/DrawerHeader/index.d.ts +2 -0
  147. package/dist/components/Drawer/components/index.d.ts +1 -0
  148. package/dist/components/Drawer/helpers/DrawerOptionalHeader.cjs +1 -0
  149. package/dist/components/Drawer/helpers/DrawerOptionalHeader.d.ts +2 -0
  150. package/dist/components/Drawer/helpers/DrawerOptionalHeader.js +9 -0
  151. package/dist/components/Drawer/helpers/index.d.ts +1 -0
  152. package/dist/components/Drawer/hooks/index.d.ts +1 -0
  153. package/dist/components/Drawer/hooks/useDrawer.cjs +1 -0
  154. package/dist/components/Drawer/hooks/useDrawer.d.ts +2 -0
  155. package/dist/components/Drawer/hooks/useDrawer.js +50 -0
  156. package/dist/components/Drawer/index.d.ts +1 -1
  157. package/dist/components/Editable/Editable.cjs +1 -1
  158. package/dist/components/Editable/Editable.js +1 -1
  159. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  160. package/dist/components/EmptyState/EmptyState.const.cjs +1 -1
  161. package/dist/components/EmptyState/EmptyState.const.d.ts +8 -6
  162. package/dist/components/EmptyState/EmptyState.const.js +15 -8
  163. package/dist/components/EmptyState/EmptyState.d.ts +1 -2
  164. package/dist/components/EmptyState/EmptyState.js +39 -43
  165. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
  166. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.cjs +1 -0
  167. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.d.ts +3 -0
  168. package/dist/components/EmptyState/helpers/EmptyStateErrorSvg.js +8 -0
  169. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.cjs +1 -0
  170. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.d.ts +3 -0
  171. package/dist/components/EmptyState/helpers/EmptyStateInboxSvg.js +8 -0
  172. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.cjs +1 -0
  173. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.d.ts +3 -0
  174. package/dist/components/EmptyState/helpers/EmptyStateSearchSvg.js +8 -0
  175. package/dist/components/EmptyState/helpers/index.d.ts +3 -0
  176. package/dist/components/EmptyState/index.d.ts +1 -1
  177. package/dist/components/FileTree/FileTree.cjs +1 -1
  178. package/dist/components/FileTree/FileTree.js +1 -1
  179. package/dist/components/FloatingChat/FloatingChat.cjs +1 -1
  180. package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -1
  181. package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -1
  182. package/dist/components/FloatingChat/FloatingChat.const.js +25 -7
  183. package/dist/components/FloatingChat/FloatingChat.d.ts +1 -18
  184. package/dist/components/FloatingChat/FloatingChat.js +93 -124
  185. package/dist/components/FloatingChat/FloatingChat.types.d.ts +11 -22
  186. package/dist/components/FloatingChat/FloatingChat.utils.cjs +1 -0
  187. package/dist/components/FloatingChat/FloatingChat.utils.d.ts +2 -0
  188. package/dist/components/FloatingChat/FloatingChat.utils.js +12 -0
  189. package/dist/components/FloatingChat/helpers/FloatingChatHeader.cjs +1 -0
  190. package/dist/components/FloatingChat/helpers/FloatingChatHeader.d.ts +9 -0
  191. package/dist/components/FloatingChat/helpers/FloatingChatHeader.js +21 -0
  192. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.cjs +1 -0
  193. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.d.ts +9 -0
  194. package/dist/components/FloatingChat/helpers/FloatingChatTrigger.js +17 -0
  195. package/dist/components/FloatingChat/index.d.ts +1 -1
  196. package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -1
  197. package/dist/components/FormSkeleton/FormSkeleton.d.ts +1 -1
  198. package/dist/components/FormSkeleton/FormSkeleton.js +35 -24
  199. package/dist/components/Gauge/Gauge.cjs +1 -1
  200. package/dist/components/Gauge/Gauge.const.cjs +1 -1
  201. package/dist/components/Gauge/Gauge.const.d.ts +5 -0
  202. package/dist/components/Gauge/Gauge.const.js +11 -6
  203. package/dist/components/Gauge/Gauge.d.ts +1 -2
  204. package/dist/components/Gauge/Gauge.js +69 -45
  205. package/dist/components/Gauge/Gauge.types.d.ts +11 -2
  206. package/dist/components/Gauge/helpers/GaugeLinearBar.cjs +1 -0
  207. package/dist/components/Gauge/helpers/GaugeLinearBar.d.ts +2 -0
  208. package/dist/components/Gauge/helpers/GaugeLinearBar.js +40 -0
  209. package/dist/components/Heatmap/Heatmap.cjs +1 -1
  210. package/dist/components/Heatmap/Heatmap.const.cjs +1 -1
  211. package/dist/components/Heatmap/Heatmap.const.d.ts +2 -0
  212. package/dist/components/Heatmap/Heatmap.const.js +8 -6
  213. package/dist/components/Heatmap/Heatmap.js +51 -47
  214. package/dist/components/Heatmap/Heatmap.types.d.ts +1 -1
  215. package/dist/components/Icon/Icon.d.ts +2 -39
  216. package/dist/components/Icon/Icon.types.d.ts +1 -17
  217. package/dist/components/Icon/icons/action.d.ts +1 -85
  218. package/dist/components/Icon/icons/bear.d.ts +1 -12
  219. package/dist/components/Icon/icons/charts.d.ts +1 -0
  220. package/dist/components/Icon/icons/commerce.d.ts +1 -25
  221. package/dist/components/Icon/icons/communication.d.ts +1 -48
  222. package/dist/components/Icon/icons/content.d.ts +1 -53
  223. package/dist/components/Icon/icons/device.d.ts +1 -27
  224. package/dist/components/Icon/icons/editor.d.ts +1 -54
  225. package/dist/components/Icon/icons/file.d.ts +1 -25
  226. package/dist/components/Icon/icons/index.d.ts +1 -9
  227. package/dist/components/Icon/icons/media.d.ts +1 -64
  228. package/dist/components/Icon/icons/misc.d.ts +1 -96
  229. package/dist/components/Icon/icons/navigation.d.ts +1 -56
  230. package/dist/components/Icon/icons/social.d.ts +1 -24
  231. package/dist/components/Icon/icons/status.d.ts +1 -61
  232. package/dist/components/Icon/index.d.ts +3 -605
  233. package/dist/components/Icon/productIcons.cjs +1 -0
  234. package/dist/components/Icon/productIcons.d.ts +7 -0
  235. package/dist/components/Icon/productIcons.js +25 -0
  236. package/dist/components/ImageAnnotation/ImageAnnotation.cjs +1 -1
  237. package/dist/components/ImageAnnotation/ImageAnnotation.js +1 -1
  238. package/dist/components/JsonViewer/JsonViewer.cjs +1 -1
  239. package/dist/components/JsonViewer/JsonViewer.js +1 -1
  240. package/dist/components/MediaPlayer/MediaPlayer.cjs +1 -1
  241. package/dist/components/MediaPlayer/MediaPlayer.js +1 -1
  242. package/dist/components/MessageActions/MessageActions.cjs +1 -0
  243. package/dist/components/MessageActions/MessageActions.const.cjs +1 -0
  244. package/dist/components/MessageActions/MessageActions.const.d.ts +2 -0
  245. package/dist/components/MessageActions/MessageActions.const.js +10 -0
  246. package/dist/components/MessageActions/MessageActions.d.ts +2 -0
  247. package/dist/components/MessageActions/MessageActions.js +31 -0
  248. package/dist/components/MessageActions/MessageActions.types.d.ts +16 -0
  249. package/dist/components/MessageActions/index.d.ts +2 -0
  250. package/dist/components/Modal/Modal.cjs +1 -1
  251. package/dist/components/Modal/Modal.js +1 -1
  252. package/dist/components/ModelSelect/ModelSelect.cjs +1 -0
  253. package/dist/components/ModelSelect/ModelSelect.const.cjs +1 -0
  254. package/dist/components/ModelSelect/ModelSelect.const.d.ts +1 -0
  255. package/dist/components/ModelSelect/ModelSelect.const.js +4 -0
  256. package/dist/components/ModelSelect/ModelSelect.d.ts +2 -0
  257. package/dist/components/ModelSelect/ModelSelect.js +41 -0
  258. package/dist/components/ModelSelect/ModelSelect.types.d.ts +16 -0
  259. package/dist/components/ModelSelect/index.d.ts +2 -0
  260. package/dist/components/OverlayPortal/OverlayPortal.const.cjs +1 -1
  261. package/dist/components/OverlayPortal/OverlayPortal.const.js +6 -5
  262. package/dist/components/PageNav/PageNav.cjs +1 -1
  263. package/dist/components/PageNav/PageNav.js +1 -1
  264. package/dist/components/PasswordInput/PasswordInput.cjs +1 -1
  265. package/dist/components/PasswordInput/PasswordInput.js +1 -1
  266. package/dist/components/PromptComposer/PromptComposer.cjs +1 -0
  267. package/dist/components/PromptComposer/PromptComposer.const.cjs +1 -0
  268. package/dist/components/PromptComposer/PromptComposer.const.d.ts +6 -0
  269. package/dist/components/PromptComposer/PromptComposer.const.js +14 -0
  270. package/dist/components/PromptComposer/PromptComposer.d.ts +2 -0
  271. package/dist/components/PromptComposer/PromptComposer.js +132 -0
  272. package/dist/components/PromptComposer/PromptComposer.types.d.ts +45 -0
  273. package/dist/components/PromptComposer/PromptComposer.utils.cjs +1 -0
  274. package/dist/components/PromptComposer/PromptComposer.utils.d.ts +5 -0
  275. package/dist/components/PromptComposer/PromptComposer.utils.js +16 -0
  276. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.cjs +1 -0
  277. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.d.ts +1 -0
  278. package/dist/components/PromptComposer/helpers/PromptComposerAttachSvg.js +6 -0
  279. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.cjs +1 -0
  280. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.d.ts +2 -0
  281. package/dist/components/PromptComposer/helpers/PromptComposerFileChip.js +18 -0
  282. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.cjs +1 -0
  283. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.d.ts +1 -0
  284. package/dist/components/PromptComposer/helpers/PromptComposerSendSvg.js +9 -0
  285. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.cjs +1 -0
  286. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.d.ts +1 -0
  287. package/dist/components/PromptComposer/helpers/PromptComposerStopSvg.js +6 -0
  288. package/dist/components/PromptComposer/helpers/index.d.ts +4 -0
  289. package/dist/components/PromptComposer/index.d.ts +2 -0
  290. package/dist/components/PromptSuggestions/PromptSuggestions.cjs +1 -0
  291. package/dist/components/PromptSuggestions/PromptSuggestions.d.ts +2 -0
  292. package/dist/components/PromptSuggestions/PromptSuggestions.js +39 -0
  293. package/dist/components/PromptSuggestions/PromptSuggestions.types.d.ts +13 -0
  294. package/dist/components/PromptSuggestions/index.d.ts +2 -0
  295. package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -1
  296. package/dist/components/PropsPlayground/PropsPlayground.js +1 -1
  297. package/dist/components/Rating/components/StarIcon/StarIcon.cjs +1 -1
  298. package/dist/components/Rating/components/StarIcon/StarIcon.js +1 -1
  299. package/dist/components/Result/Result.utils.cjs +1 -1
  300. package/dist/components/Result/Result.utils.js +1 -1
  301. package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -1
  302. package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +1 -1
  303. package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
  304. package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +1 -1
  305. package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -1
  306. package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +1 -1
  307. package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.cjs +1 -1
  308. package/dist/components/RichEditor/components/ToolbarSignature/ToolbarSignature.js +1 -1
  309. package/dist/components/RichEditor/helpers/IconRender.cjs +1 -1
  310. package/dist/components/RichEditor/helpers/IconRender.js +1 -1
  311. package/dist/components/RichEditor/helpers/toolbarItemRender.cjs +1 -1
  312. package/dist/components/RichEditor/helpers/toolbarItemRender.js +1 -1
  313. package/dist/components/RingProgress/RingProgress.cjs +1 -1
  314. package/dist/components/RingProgress/RingProgress.const.cjs +1 -1
  315. package/dist/components/RingProgress/RingProgress.const.d.ts +3 -0
  316. package/dist/components/RingProgress/RingProgress.const.js +7 -4
  317. package/dist/components/RingProgress/RingProgress.js +38 -37
  318. package/dist/components/RingProgress/RingProgress.types.d.ts +1 -0
  319. package/dist/components/Select/Select.cjs +1 -1
  320. package/dist/components/Select/Select.js +23 -23
  321. package/dist/components/Select/helpers/SelectCheckSvg.cjs +1 -0
  322. package/dist/components/Select/helpers/SelectCheckSvg.d.ts +3 -0
  323. package/dist/components/Select/helpers/SelectCheckSvg.js +8 -0
  324. package/dist/components/Select/helpers/SelectChevronDownSvg.cjs +1 -0
  325. package/dist/components/Select/helpers/SelectChevronDownSvg.d.ts +3 -0
  326. package/dist/components/Select/helpers/SelectChevronDownSvg.js +8 -0
  327. package/dist/components/Select/helpers/index.d.ts +2 -0
  328. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  329. package/dist/components/Sidebar/Sidebar.js +16 -15
  330. package/dist/components/Sidebar/Sidebar.types.d.ts +1 -1
  331. package/dist/components/Sidebar/Sidebar.utils.cjs +1 -0
  332. package/dist/components/Sidebar/Sidebar.utils.d.ts +2 -0
  333. package/dist/components/Sidebar/Sidebar.utils.js +11 -0
  334. package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.cjs +1 -1
  335. package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.js +1 -1
  336. package/dist/components/Sidebar/components/SidebarItem/SidebarItem.cjs +1 -1
  337. package/dist/components/Sidebar/components/SidebarItem/SidebarItem.js +55 -51
  338. package/dist/components/Sidebar/index.d.ts +1 -0
  339. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  340. package/dist/components/Skeleton/Skeleton.const.cjs +2 -2
  341. package/dist/components/Skeleton/Skeleton.const.js +5 -6
  342. package/dist/components/Skeleton/Skeleton.js +59 -59
  343. package/dist/components/SliderRange/SliderRange.cjs +1 -1
  344. package/dist/components/SliderRange/SliderRange.js +19 -19
  345. package/dist/components/Sparkline/Sparkline.cjs +1 -1
  346. package/dist/components/Sparkline/Sparkline.const.cjs +1 -1
  347. package/dist/components/Sparkline/Sparkline.const.d.ts +5 -0
  348. package/dist/components/Sparkline/Sparkline.const.js +9 -4
  349. package/dist/components/Sparkline/Sparkline.d.ts +1 -2
  350. package/dist/components/Sparkline/Sparkline.js +75 -53
  351. package/dist/components/Sparkline/Sparkline.types.d.ts +2 -0
  352. package/dist/components/Sparkline/Sparkline.utils.cjs +1 -1
  353. package/dist/components/Sparkline/Sparkline.utils.d.ts +7 -12
  354. package/dist/components/Sparkline/Sparkline.utils.js +33 -20
  355. package/dist/components/Sparkline/index.d.ts +2 -2
  356. package/dist/components/StatCard/StatCard.cjs +1 -1
  357. package/dist/components/StatCard/StatCard.const.cjs +1 -1
  358. package/dist/components/StatCard/StatCard.const.d.ts +0 -7
  359. package/dist/components/StatCard/StatCard.const.js +5 -12
  360. package/dist/components/StatCard/StatCard.d.ts +1 -2
  361. package/dist/components/StatCard/StatCard.js +48 -37
  362. package/dist/components/StatCard/StatCard.utils.cjs +1 -0
  363. package/dist/components/StatCard/StatCard.utils.d.ts +2 -0
  364. package/dist/components/StatCard/StatCard.utils.js +7 -0
  365. package/dist/components/Stepper/Stepper.cjs +1 -1
  366. package/dist/components/Stepper/Stepper.js +1 -1
  367. package/dist/components/StreamingMessage/StreamingMessage.cjs +1 -0
  368. package/dist/components/StreamingMessage/StreamingMessage.const.cjs +1 -0
  369. package/dist/components/StreamingMessage/StreamingMessage.const.d.ts +5 -0
  370. package/dist/components/StreamingMessage/StreamingMessage.const.js +10 -0
  371. package/dist/components/StreamingMessage/StreamingMessage.d.ts +2 -0
  372. package/dist/components/StreamingMessage/StreamingMessage.js +48 -0
  373. package/dist/components/StreamingMessage/StreamingMessage.types.d.ts +15 -0
  374. package/dist/components/StreamingMessage/index.d.ts +2 -0
  375. package/dist/components/Tabs/TabList.cjs +1 -1
  376. package/dist/components/Tabs/TabList.js +1 -1
  377. package/dist/components/ThemeSwitcher/ThemeSwitcher.cjs +1 -0
  378. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.cjs +1 -0
  379. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.d.ts +7 -0
  380. package/dist/components/ThemeSwitcher/ThemeSwitcher.const.js +14 -0
  381. package/dist/components/ThemeSwitcher/ThemeSwitcher.d.ts +2 -0
  382. package/dist/components/ThemeSwitcher/ThemeSwitcher.js +39 -0
  383. package/dist/components/ThemeSwitcher/ThemeSwitcher.types.d.ts +14 -0
  384. package/dist/components/ThemeSwitcher/index.d.ts +2 -0
  385. package/dist/components/ThinkingBlock/ThinkingBlock.cjs +1 -0
  386. package/dist/components/ThinkingBlock/ThinkingBlock.const.cjs +1 -0
  387. package/dist/components/ThinkingBlock/ThinkingBlock.const.d.ts +4 -0
  388. package/dist/components/ThinkingBlock/ThinkingBlock.const.js +9 -0
  389. package/dist/components/ThinkingBlock/ThinkingBlock.d.ts +2 -0
  390. package/dist/components/ThinkingBlock/ThinkingBlock.js +45 -0
  391. package/dist/components/ThinkingBlock/ThinkingBlock.types.d.ts +16 -0
  392. package/dist/components/ThinkingBlock/index.d.ts +2 -0
  393. package/dist/components/TimePicker/TimePicker.cjs +1 -1
  394. package/dist/components/TimePicker/TimePicker.js +1 -1
  395. package/dist/components/TimelineChart/TimelineChart.cjs +1 -1
  396. package/dist/components/TimelineChart/TimelineChart.const.cjs +1 -1
  397. package/dist/components/TimelineChart/TimelineChart.const.d.ts +3 -0
  398. package/dist/components/TimelineChart/TimelineChart.const.js +7 -4
  399. package/dist/components/TimelineChart/TimelineChart.js +56 -42
  400. package/dist/components/TimelineChart/TimelineChart.types.d.ts +1 -1
  401. package/dist/components/ToolCall/ToolCall.cjs +1 -0
  402. package/dist/components/ToolCall/ToolCall.const.cjs +1 -0
  403. package/dist/components/ToolCall/ToolCall.const.d.ts +5 -0
  404. package/dist/components/ToolCall/ToolCall.const.js +17 -0
  405. package/dist/components/ToolCall/ToolCall.d.ts +2 -0
  406. package/dist/components/ToolCall/ToolCall.js +43 -0
  407. package/dist/components/ToolCall/ToolCall.types.d.ts +20 -0
  408. package/dist/components/ToolCall/index.d.ts +2 -0
  409. package/dist/components/Transition/Transition.const.cjs +1 -1
  410. package/dist/components/Transition/Transition.const.js +12 -6
  411. package/dist/components/Transition/Transition.types.d.ts +1 -1
  412. package/dist/components/TreeSelect/TreeSelect.cjs +1 -1
  413. package/dist/components/TreeSelect/TreeSelect.js +1 -1
  414. package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.cjs +1 -1
  415. package/dist/components/TreeSelect/components/TreeSelectExpandControl/TreeSelectExpandControl.js +1 -1
  416. package/dist/components/TreeView/TreeView.cjs +1 -1
  417. package/dist/components/TreeView/TreeView.js +3 -2
  418. package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.cjs +1 -1
  419. package/dist/components/TreeView/components/TreeViewExpandControl/TreeViewExpandControl.js +1 -1
  420. package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.cjs +1 -1
  421. package/dist/components/TreeView/components/TreeViewNodeIcon/TreeViewNodeIcon.js +1 -1
  422. package/dist/components/index.cjs +1 -1
  423. package/dist/components/index.d.ts +39 -11
  424. package/dist/components/index.js +455 -420
  425. package/dist/constants/generals.const.cjs +1 -1
  426. package/dist/constants/generals.const.d.ts +50 -0
  427. package/dist/constants/generals.const.js +154 -108
  428. package/dist/constants/keys.const.cjs +1 -1
  429. package/dist/constants/keys.const.js +2 -1
  430. package/dist/constants/numbers.const.cjs +1 -1
  431. package/dist/constants/numbers.const.d.ts +7 -0
  432. package/dist/constants/numbers.const.js +60 -52
  433. package/dist/context/BearProvider.cjs +1 -1
  434. package/dist/context/BearProvider.d.ts +19 -44
  435. package/dist/context/BearProvider.js +223 -208
  436. package/dist/context/bearProvider.types.d.ts +4 -0
  437. package/dist/context/index.d.ts +1 -1
  438. package/dist/hooks/useFixedAnchorPosition/index.d.ts +1 -1
  439. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs +1 -1
  440. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.d.ts +2 -1
  441. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.js +12 -11
  442. package/dist/hooks/useFixedAnchorPosition/useFixedAnchorPosition.types.d.ts +1 -1
  443. package/dist/icons.cjs +1 -1
  444. package/dist/icons.d.ts +2 -2
  445. package/dist/icons.js +1 -6
  446. package/dist/index.cjs +1 -1
  447. package/dist/index.js +597 -562
  448. package/dist/styles/_ai-chat.css +487 -0
  449. package/dist/styles/_base.css +2 -0
  450. package/dist/styles/_chart.css +144 -0
  451. package/dist/styles/_drawer.css +213 -0
  452. package/dist/styles/_effects.css +8 -4
  453. package/dist/styles/_overlays.css +0 -1
  454. package/dist/styles/_skeleton.css +90 -0
  455. package/dist/styles/main.css +4 -0
  456. package/dist/styles.css +1089 -186
  457. package/package.json +5 -1
  458. package/dist/components/FormSkeleton/FormSkeleton.const.cjs +0 -1
  459. package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +0 -5
  460. package/dist/components/FormSkeleton/FormSkeleton.const.js +0 -8
  461. package/dist/components/Icon/Icon.cjs +0 -1
  462. package/dist/components/Icon/Icon.const.d.ts +0 -1
  463. package/dist/components/Icon/Icon.js +0 -45
  464. package/dist/components/Icon/icons/action.cjs +0 -1
  465. package/dist/components/Icon/icons/action.js +0 -351
  466. package/dist/components/Icon/icons/bear.cjs +0 -1
  467. package/dist/components/Icon/icons/bear.js +0 -47
  468. package/dist/components/Icon/icons/commerce.cjs +0 -1
  469. package/dist/components/Icon/icons/commerce.js +0 -124
  470. package/dist/components/Icon/icons/communication.cjs +0 -1
  471. package/dist/components/Icon/icons/communication.js +0 -184
  472. package/dist/components/Icon/icons/content.cjs +0 -1
  473. package/dist/components/Icon/icons/content.js +0 -231
  474. package/dist/components/Icon/icons/device.cjs +0 -1
  475. package/dist/components/Icon/icons/device.js +0 -122
  476. package/dist/components/Icon/icons/editor.cjs +0 -1
  477. package/dist/components/Icon/icons/editor.js +0 -285
  478. package/dist/components/Icon/icons/file.cjs +0 -1
  479. package/dist/components/Icon/icons/file.js +0 -120
  480. package/dist/components/Icon/icons/media.cjs +0 -1
  481. package/dist/components/Icon/icons/media.js +0 -306
  482. package/dist/components/Icon/icons/misc.cjs +0 -1
  483. package/dist/components/Icon/icons/misc.js +0 -450
  484. package/dist/components/Icon/icons/navigation.cjs +0 -1
  485. package/dist/components/Icon/icons/navigation.js +0 -215
  486. package/dist/components/Icon/icons/social.cjs +0 -1
  487. package/dist/components/Icon/icons/social.js +0 -89
  488. package/dist/components/Icon/icons/status.cjs +0 -1
  489. package/dist/components/Icon/icons/status.js +0 -271
  490. package/dist/components/Icon/index.cjs +0 -1
  491. package/dist/components/Icon/index.js +0 -79
@@ -1,65 +1,78 @@
1
- import { jsx as l, jsxs as f } from "react/jsx-runtime";
2
- import { cn as n } from "../../utils/cn.js";
1
+ import { jsx as t, jsxs as F } from "react/jsx-runtime";
2
+ import { ONE as _, ZERO as h } from "../../constants/numbers.const.js";
3
+ import { cn as u } from "../../utils/cn.js";
3
4
  import "react";
4
- import { getChartColor as h } from "./Chart.utils.js";
5
- const C = ({
6
- data: r,
7
- height: p = 200,
8
- showLabels: o = !0,
9
- showValues: i = !1,
10
- animated: x = !0,
11
- color: d,
12
- orientation: g = "vertical",
13
- barRadius: a = 4,
14
- barGap: m = 0.2,
15
- className: v,
16
- ...y
17
- }) => {
18
- const u = Math.max(...r.map((e) => e.value));
19
- return /* @__PURE__ */ l("div", { className: n("w-full", v), style: { height: p }, ...y, children: g === "vertical" ? /* @__PURE__ */ l("div", { className: "flex items-end justify-between h-full", style: { gap: `${m}rem` }, children: r.map((e, t) => {
20
- const s = e.value / u * 100, c = h(t, e.color || d);
21
- return /* @__PURE__ */ f("div", { className: "flex-1 flex flex-col items-center gap-1", children: [
22
- /* @__PURE__ */ l("div", { className: "w-full flex-1 flex items-end", children: /* @__PURE__ */ l(
23
- "div",
24
- {
25
- className: n(
26
- "w-full transition-all duration-500 ease-out",
27
- x && "animate-grow-up"
28
- ),
29
- style: {
30
- height: `${s}%`,
31
- backgroundColor: c,
32
- borderRadius: `${a}px ${a}px 0 0`,
33
- opacity: 0.9
34
- }
35
- }
36
- ) }),
37
- i && /* @__PURE__ */ l("span", { className: "text-xs text-gray-500 dark:text-slate-400", children: e.value }),
38
- o && /* @__PURE__ */ l("span", { className: "text-xs text-gray-600 dark:text-slate-300 truncate max-w-full", children: e.label })
39
- ] }, t);
40
- }) }) : /* @__PURE__ */ l("div", { className: "flex flex-col justify-between h-full", style: { gap: `${m}rem` }, children: r.map((e, t) => {
41
- const s = e.value / u * 100, c = h(t, e.color || d);
42
- return /* @__PURE__ */ f("div", { className: "flex-1 flex items-center gap-2", children: [
43
- o && /* @__PURE__ */ l("span", { className: "text-xs text-gray-600 dark:text-slate-300 w-16 truncate", children: e.label }),
44
- /* @__PURE__ */ l("div", { className: "flex-1 h-full flex items-center", children: /* @__PURE__ */ l(
45
- "div",
46
- {
47
- className: n(
48
- "h-3/4 transition-all duration-500 ease-out",
49
- x && "animate-grow-right"
50
- ),
51
- style: {
52
- width: `${s}%`,
53
- backgroundColor: c,
54
- borderRadius: `0 ${a}px ${a}px 0`,
55
- opacity: 0.9
56
- }
57
- }
58
- ) }),
59
- i && /* @__PURE__ */ l("span", { className: "text-xs text-gray-500 dark:text-slate-400 w-10 text-right", children: e.value })
60
- ] }, t);
61
- }) }) });
5
+ import { resolveBearId as O } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as P } from "../../utils/useBearId.js";
7
+ import { CHART as s } from "./Chart.const.js";
8
+ import { getStackTotal as U, getChartColor as G } from "./Chart.utils.js";
9
+ const Q = ($) => {
10
+ const {
11
+ data: n,
12
+ height: g = s.DEFAULT_HEIGHT,
13
+ showLabels: i = !0,
14
+ showValues: v = !1,
15
+ animated: N = !0,
16
+ color: b,
17
+ orientation: x = "vertical",
18
+ barRadius: r = s.DEFAULT_BAR_RADIUS,
19
+ barGap: f = s.DEFAULT_BAR_GAP,
20
+ stacked: l = !1,
21
+ className: k,
22
+ id: A,
23
+ testId: E,
24
+ ...y
25
+ } = $, I = P("BarChart"), R = O(A, I), m = n.map((a) => U(a.stacks, a.value)), T = Math.max(...m, _), e = x === "vertical", L = {
26
+ "--Bear-Chart-height": `${g}px`,
27
+ "--Bear-Chart-gap": `${f}rem`
28
+ };
29
+ return /* @__PURE__ */ t(
30
+ "div",
31
+ {
32
+ id: R,
33
+ "data-testid": E,
34
+ className: u(
35
+ "Bear-Chart Bear-Chart--bar",
36
+ e ? "Bear-Chart--vertical" : "Bear-Chart--horizontal",
37
+ k
38
+ ),
39
+ style: L,
40
+ ...y,
41
+ children: /* @__PURE__ */ t("div", { className: "Bear-Chart__track", children: n.map((a, p) => {
42
+ const d = l && a.stacks && a.stacks.length > h ? a.stacks : [a.value], o = m[p], S = {
43
+ "--Bear-Chart-size": `${o / T * s.VIEWBOX}%`
44
+ };
45
+ return /* @__PURE__ */ F("div", { className: "Bear-Chart__col", children: [
46
+ i && !e && /* @__PURE__ */ t("span", { className: "Bear-Chart__label", children: a.label }),
47
+ /* @__PURE__ */ t("div", { className: "Bear-Chart__plot", children: /* @__PURE__ */ t(
48
+ "div",
49
+ {
50
+ className: u("Bear-Chart__stack", N && (e ? "animate-grow-up" : "animate-grow-right")),
51
+ style: S,
52
+ children: d.map((V, c) => {
53
+ const w = o > h ? V / o * s.VIEWBOX : h, z = c === h, B = c === d.length - _, C = l ? e ? B ? `${r}px ${r}px 0 0` : "0" : B ? `0 ${r}px ${r}px 0` : "0" : e ? `${r}px ${r}px 0 0` : `0 ${r}px ${r}px 0`, D = {
54
+ "--Bear-Chart-segment": `${w}%`,
55
+ "--Bear-Chart-color": G(l ? c : p, a.color || b),
56
+ "--Bear-Chart-radius": C
57
+ };
58
+ return /* @__PURE__ */ t(
59
+ "div",
60
+ {
61
+ className: "Bear-Chart__segment",
62
+ style: D
63
+ },
64
+ `${a.label}-${c}`
65
+ );
66
+ })
67
+ }
68
+ ) }),
69
+ v && /* @__PURE__ */ t("span", { className: "Bear-Chart__value", children: o }),
70
+ i && e && /* @__PURE__ */ t("span", { className: "Bear-Chart__label", children: a.label })
71
+ ] }, a.label);
72
+ }) })
73
+ }
74
+ );
62
75
  };
63
76
  export {
64
- C as BarChart
77
+ Q as BarChart
65
78
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./BarChart.cjs"),s=require("./LineChart.cjs"),n=require("./PieChart.cjs"),r=require("./Chart.const.cjs"),C=({id:u,type:a,...e})=>{switch(a){case r.CHART_TYPES.BAR:return t.jsx(i.BarChart,{...e});case r.CHART_TYPES.LINE:case r.CHART_TYPES.AREA:return t.jsx(s.LineChart,{...e,fill:a===r.CHART_TYPES.AREA});case r.CHART_TYPES.PIE:return t.jsx(n.PieChart,{...e});case r.CHART_TYPES.DONUT:return t.jsx(n.PieChart,{...e,innerRadius:r.CHART.DEFAULT_INNER_RADIUS});default:return t.jsx(i.BarChart,{...e})}};exports.Chart=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const A=require("../../utils/generateBearId.utils.cjs"),c=require("../../utils/useBearId.cjs"),a=require("./BarChart.cjs"),s=require("./LineChart.cjs"),n=require("./PieChart.cjs"),E=require("./RadarChart.cjs"),d=require("./FunnelChart.cjs"),e=require("./Chart.const.cjs"),C={[e.CHART_TYPES.BAR]:r=>t.jsx(a.BarChart,{...r}),[e.CHART_TYPES.STACKED]:r=>t.jsx(a.BarChart,{...r,stacked:!0}),[e.CHART_TYPES.LINE]:r=>t.jsx(s.LineChart,{...r}),[e.CHART_TYPES.AREA]:r=>t.jsx(s.LineChart,{...r,fill:!0}),[e.CHART_TYPES.PIE]:r=>t.jsx(n.PieChart,{...r}),[e.CHART_TYPES.DONUT]:r=>t.jsx(n.PieChart,{...r,innerRadius:e.CHART.DEFAULT_INNER_RADIUS}),[e.CHART_TYPES.RADAR]:r=>t.jsx(E.RadarChart,{...r}),[e.CHART_TYPES.FUNNEL]:r=>t.jsx(d.FunnelChart,{...r})},h=r=>{const{type:R=e.CHART_TYPES.BAR,id:i,...T}=r,o=c.useBearId("Chart"),u=A.resolveBearId(i,o);return(C[R]??C[e.CHART_TYPES.BAR])({...T,id:u})};exports.Chart=h;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={DEFAULT_INNER_RADIUS:.6},A={BAR:"bar",LINE:"line",AREA:"area",PIE:"pie",DONUT:"donut"},T=["#ec4899","#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#06b6d4","#84cc16"];exports.CHART=e;exports.CHART_TYPES=A;exports.DEFAULT_COLORS=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E={DEFAULT_HEIGHT:200,DEFAULT_BAR_RADIUS:4,DEFAULT_BAR_GAP:.2,DEFAULT_STROKE_WIDTH:2,DEFAULT_INNER_RADIUS:.6,DEFAULT_START_ANGLE:-90,DEFAULT_PAD_ANGLE:2,OUTER_RADIUS:45,CENTER:50,HALF_SWEEP:180,FULL_SWEEP:360,EXPLODE_OFFSET:4,ROSE_MIN_RADIUS:14,RADAR_RINGS:4,RADAR_LABEL_OFFSET:8,FUNNEL_MIN_WIDTH:18,SLICE_DELAY_MS:100,DOT_RADIUS:1.5,VIEWBOX:100,LINE_Y_RANGE:80,LINE_Y_PAD:10,BEZIER_DIVISOR:3,LARGE_ARC_THRESHOLD:180,HALF_PIE_START:-180},_={BAR:"bar",LINE:"line",AREA:"area",PIE:"pie",DONUT:"donut",RADAR:"radar",FUNNEL:"funnel",STACKED:"stacked"},A="full",R="half",T="rose",L="bottom",I="none",D=["#ec4899","#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#06b6d4","#84cc16"];exports.CHART=E;exports.CHART_LEGEND_BOTTOM=L;exports.CHART_LEGEND_NONE=I;exports.CHART_TYPES=_;exports.DEFAULT_COLORS=D;exports.PIE_VIEW_FULL=A;exports.PIE_VIEW_HALF=R;exports.PIE_VIEW_ROSE=T;
@@ -1,6 +1,3 @@
1
- /**
2
- * Chart constants
3
- */
4
1
  export declare const CHART: {
5
2
  readonly DEFAULT_HEIGHT: 200;
6
3
  readonly DEFAULT_BAR_RADIUS: 4;
@@ -11,6 +8,21 @@ export declare const CHART: {
11
8
  readonly DEFAULT_PAD_ANGLE: 2;
12
9
  readonly OUTER_RADIUS: 45;
13
10
  readonly CENTER: 50;
11
+ readonly HALF_SWEEP: 180;
12
+ readonly FULL_SWEEP: 360;
13
+ readonly EXPLODE_OFFSET: 4;
14
+ readonly ROSE_MIN_RADIUS: 14;
15
+ readonly RADAR_RINGS: 4;
16
+ readonly RADAR_LABEL_OFFSET: 8;
17
+ readonly FUNNEL_MIN_WIDTH: 18;
18
+ readonly SLICE_DELAY_MS: 100;
19
+ readonly DOT_RADIUS: 1.5;
20
+ readonly VIEWBOX: 100;
21
+ readonly LINE_Y_RANGE: 80;
22
+ readonly LINE_Y_PAD: 10;
23
+ readonly BEZIER_DIVISOR: 3;
24
+ readonly LARGE_ARC_THRESHOLD: 180;
25
+ readonly HALF_PIE_START: -180;
14
26
  };
15
27
  export declare const CHART_TYPES: {
16
28
  readonly BAR: "bar";
@@ -18,5 +30,14 @@ export declare const CHART_TYPES: {
18
30
  readonly AREA: "area";
19
31
  readonly PIE: "pie";
20
32
  readonly DONUT: "donut";
33
+ readonly RADAR: "radar";
34
+ readonly FUNNEL: "funnel";
35
+ readonly STACKED: "stacked";
21
36
  };
37
+ export declare const PIE_VIEW_FULL = "full";
38
+ export declare const PIE_VIEW_HALF = "half";
39
+ export declare const PIE_VIEW_ROSE = "rose";
40
+ export declare const CHART_LEGEND_RIGHT = "right";
41
+ export declare const CHART_LEGEND_BOTTOM = "bottom";
42
+ export declare const CHART_LEGEND_NONE = "none";
22
43
  export declare const DEFAULT_COLORS: readonly ["#ec4899", "#8b5cf6", "#3b82f6", "#10b981", "#f59e0b", "#ef4444", "#06b6d4", "#84cc16"];
@@ -1,31 +1,54 @@
1
- const A = {
2
- DEFAULT_INNER_RADIUS: 0.6
3
- }, c = {
1
+ const E = {
2
+ DEFAULT_HEIGHT: 200,
3
+ DEFAULT_BAR_RADIUS: 4,
4
+ DEFAULT_BAR_GAP: 0.2,
5
+ DEFAULT_STROKE_WIDTH: 2,
6
+ DEFAULT_INNER_RADIUS: 0.6,
7
+ DEFAULT_START_ANGLE: -90,
8
+ DEFAULT_PAD_ANGLE: 2,
9
+ OUTER_RADIUS: 45,
10
+ CENTER: 50,
11
+ HALF_SWEEP: 180,
12
+ FULL_SWEEP: 360,
13
+ EXPLODE_OFFSET: 4,
14
+ ROSE_MIN_RADIUS: 14,
15
+ RADAR_RINGS: 4,
16
+ RADAR_LABEL_OFFSET: 8,
17
+ FUNNEL_MIN_WIDTH: 18,
18
+ SLICE_DELAY_MS: 100,
19
+ DOT_RADIUS: 1.5,
20
+ VIEWBOX: 100,
21
+ LINE_Y_RANGE: 80,
22
+ LINE_Y_PAD: 10,
23
+ BEZIER_DIVISOR: 3,
24
+ LARGE_ARC_THRESHOLD: 180,
25
+ HALF_PIE_START: -180
26
+ }, _ = {
4
27
  BAR: "bar",
5
28
  LINE: "line",
6
29
  AREA: "area",
7
30
  PIE: "pie",
8
- DONUT: "donut"
9
- }, e = [
31
+ DONUT: "donut",
32
+ RADAR: "radar",
33
+ FUNNEL: "funnel",
34
+ STACKED: "stacked"
35
+ }, A = "full", R = "half", L = "rose", T = "bottom", D = "none", I = [
10
36
  "#ec4899",
11
- // pink
12
37
  "#8b5cf6",
13
- // purple
14
38
  "#3b82f6",
15
- // blue
16
39
  "#10b981",
17
- // emerald
18
40
  "#f59e0b",
19
- // amber
20
41
  "#ef4444",
21
- // red
22
42
  "#06b6d4",
23
- // cyan
24
43
  "#84cc16"
25
- // lime
26
44
  ];
27
45
  export {
28
- A as CHART,
29
- c as CHART_TYPES,
30
- e as DEFAULT_COLORS
46
+ E as CHART,
47
+ T as CHART_LEGEND_BOTTOM,
48
+ D as CHART_LEGEND_NONE,
49
+ _ as CHART_TYPES,
50
+ I as DEFAULT_COLORS,
51
+ A as PIE_VIEW_FULL,
52
+ R as PIE_VIEW_HALF,
53
+ L as PIE_VIEW_ROSE
31
54
  };
@@ -1,6 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { ChartProps } from './Chart.types';
3
- /**
4
- * Main Chart Component
5
- */
6
- export declare const Chart: FC<ChartProps>;
2
+ export declare const Chart: (props: ChartProps) => JSX.Element;
@@ -1,27 +1,26 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { BarChart as i } from "./BarChart.js";
3
- import { LineChart as n } from "./LineChart.js";
4
- import { PieChart as m } from "./PieChart.js";
5
- import { CHART_TYPES as r, CHART as A } from "./Chart.const.js";
6
- const C = ({
7
- id: o,
8
- type: a,
9
- ...t
10
- }) => {
11
- switch (a) {
12
- case r.BAR:
13
- return /* @__PURE__ */ e(i, { ...t });
14
- case r.LINE:
15
- case r.AREA:
16
- return /* @__PURE__ */ e(n, { ...t, fill: a === r.AREA });
17
- case r.PIE:
18
- return /* @__PURE__ */ e(m, { ...t });
19
- case r.DONUT:
20
- return /* @__PURE__ */ e(m, { ...t, innerRadius: A.DEFAULT_INNER_RADIUS });
21
- default:
22
- return /* @__PURE__ */ e(i, { ...t });
23
- }
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import "react";
3
+ import { resolveBearId as s } from "../../utils/generateBearId.utils.js";
4
+ import { useBearId as C } from "../../utils/useBearId.js";
5
+ import { BarChart as e } from "./BarChart.js";
6
+ import { LineChart as m } from "./LineChart.js";
7
+ import { PieChart as i } from "./PieChart.js";
8
+ import { RadarChart as E } from "./RadarChart.js";
9
+ import { FunnelChart as f } from "./FunnelChart.js";
10
+ import { CHART_TYPES as t, CHART as c } from "./Chart.const.js";
11
+ const a = {
12
+ [t.BAR]: (r) => /* @__PURE__ */ o(e, { ...r }),
13
+ [t.STACKED]: (r) => /* @__PURE__ */ o(e, { ...r, stacked: !0 }),
14
+ [t.LINE]: (r) => /* @__PURE__ */ o(m, { ...r }),
15
+ [t.AREA]: (r) => /* @__PURE__ */ o(m, { ...r, fill: !0 }),
16
+ [t.PIE]: (r) => /* @__PURE__ */ o(i, { ...r }),
17
+ [t.DONUT]: (r) => /* @__PURE__ */ o(i, { ...r, innerRadius: c.DEFAULT_INNER_RADIUS }),
18
+ [t.RADAR]: (r) => /* @__PURE__ */ o(E, { ...r }),
19
+ [t.FUNNEL]: (r) => /* @__PURE__ */ o(f, { ...r })
20
+ }, U = (r) => {
21
+ const { type: R = t.BAR, id: n, ...d } = r, p = C("Chart"), A = s(n, p);
22
+ return (a[R] ?? a[t.BAR])({ ...d, id: A });
24
23
  };
25
24
  export {
26
- C as Chart
25
+ U as Chart
27
26
  };
@@ -1,53 +1,43 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
- export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'donut';
2
+ export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'donut' | 'radar' | 'funnel' | 'stacked';
3
+ export type PieView = 'full' | 'half' | 'rose';
4
+ export type ChartLegendPosition = 'right' | 'bottom' | 'none';
3
5
  export interface ChartDataPoint {
4
6
  label: string;
5
7
  value: number;
6
8
  color?: string;
9
+ stacks?: number[];
7
10
  }
8
11
  export interface ChartProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
9
12
  testId?: string;
10
- /** Chart type */
11
- type: ChartType;
12
- /** Data points */
13
+ type?: ChartType;
13
14
  data: ChartDataPoint[];
14
- /** Chart height */
15
15
  height?: number;
16
- /** Show labels */
17
16
  showLabels?: boolean;
18
- /** Show values */
19
17
  showValues?: boolean;
20
- /** Animate on render */
21
18
  animated?: boolean;
22
- /** Primary color (used for single-color charts) */
23
19
  color?: string;
24
- /** Show grid lines */
25
20
  showGrid?: boolean;
21
+ pieView?: PieView;
22
+ explodeIndex?: number;
23
+ legendPosition?: ChartLegendPosition;
24
+ stepped?: boolean;
25
+ stacked?: boolean;
26
26
  }
27
27
  export interface BarChartProps extends Omit<ChartProps, 'type'> {
28
- /** Bar orientation */
29
28
  orientation?: 'vertical' | 'horizontal';
30
- /** Bar border radius */
31
29
  barRadius?: number;
32
- /** Gap between bars (0-1) */
33
30
  barGap?: number;
34
31
  }
35
32
  export interface LineChartProps extends Omit<ChartProps, 'type'> {
36
- /** Show area fill */
37
33
  fill?: boolean;
38
- /** Line width */
39
34
  strokeWidth?: number;
40
- /** Show dots at data points */
41
35
  showDots?: boolean;
42
- /** Smooth curve */
43
36
  smooth?: boolean;
44
37
  }
45
38
  export interface PieChartProps extends Omit<ChartProps, 'type'> {
46
- /** Inner radius for donut chart (0-1) */
47
39
  innerRadius?: number;
48
- /** Start angle in degrees */
49
40
  startAngle?: number;
50
- /** Padding between slices */
51
41
  padAngle?: number;
52
42
  onSliceClick?: (item: ChartDataPoint, index: number) => void;
53
43
  onSliceHover?: (item: ChartDataPoint | null, index: number | null) => void;
@@ -56,3 +46,5 @@ export interface PieChartProps extends Omit<ChartProps, 'type'> {
56
46
  sliceTooltipDescription?: (item: ChartDataPoint, index: number) => ReactNode;
57
47
  sliceTooltipContent?: (item: ChartDataPoint, index: number) => ReactNode;
58
48
  }
49
+ export type RadarChartProps = Omit<ChartProps, 'type'>;
50
+ export type FunnelChartProps = Omit<ChartProps, 'type'>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./Chart.const.cjs"),o=(e,r)=>r||t.DEFAULT_COLORS[e%t.DEFAULT_COLORS.length];exports.getChartColor=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/numbers.const.cjs"),a=require("./Chart.const.cjs"),x=(r,c)=>c||a.DEFAULT_COLORS[r%a.DEFAULT_COLORS.length],o=(r,c,$=a.CHART.CENTER)=>{const t=r*Math.PI/a.CHART.HALF_SWEEP;return{x:$+c*Math.cos(t),y:$+c*Math.sin(t)}},T=(r,c)=>{const $=r*Math.PI/a.CHART.HALF_SWEEP;return{x:c*Math.cos($),y:c*Math.sin($)}},A=(r,c,$=E.ZERO,t=a.CHART.OUTER_RADIUS)=>{const e=$*t,n=o(r,t),R=o(c,t),O=o(r,e),s=o(c,e),C=c-r>a.CHART.LARGE_ARC_THRESHOLD?E.ONE:E.ZERO;return $>E.ZERO?`M ${n.x},${n.y} A ${t},${t} 0 ${C},1 ${R.x},${R.y} L ${s.x},${s.y} A ${e},${e} 0 ${C},0 ${O.x},${O.y} Z`:`M ${a.CHART.CENTER},${a.CHART.CENTER} L ${n.x},${n.y} A ${t},${t} 0 ${C},1 ${R.x},${R.y} Z`},l=(r,c=!0,$=!1)=>r.length===E.ZERO?"":$?r.reduce((t,e,n,R)=>{if(n===E.ZERO)return`M ${e.x},${e.y}`;const O=R[n-E.ONE];return`${t} L ${e.x},${O.y} L ${e.x},${e.y}`},""):c?r.reduce((t,e,n,R)=>{if(n===E.ZERO)return`M ${e.x},${e.y}`;const O=R[n-E.ONE],s=O.x+(e.x-O.x)/a.CHART.BEZIER_DIVISOR,C=e.x-(e.x-O.x)/a.CHART.BEZIER_DIVISOR;return`${t} C ${s},${O.y} ${C},${e.y} ${e.x},${e.y}`},""):r.reduce((t,e,n)=>`${t} ${n===E.ZERO?"M":"L"} ${e.x},${e.y}`,""),u=r=>{const c=Math.max(...r.map(n=>n.value)),$=Math.min(...r.map(n=>n.value)),t=c-$||E.ONE,e=r.length-E.ONE||E.ONE;return r.map((n,R)=>({x:R/e*a.CHART.VIEWBOX,y:a.CHART.VIEWBOX-(n.value-$)/t*a.CHART.LINE_Y_RANGE-a.CHART.LINE_Y_PAD}))},h=(r,c)=>!r||r.length===E.ZERO?c:r.reduce(($,t)=>$+t,E.ZERO);exports.calculateLinePoints=u;exports.createArcPath=A;exports.generateLinePath=l;exports.getChartColor=x;exports.getStackTotal=h;exports.polarOffset=T;exports.polarToCartesian=o;
@@ -1,31 +1,21 @@
1
- /**
2
- * Get color for chart element by index
3
- */
4
1
  export declare const getChartColor: (index: number, customColor?: string) => string;
5
- /**
6
- * Convert polar coordinates to cartesian
7
- */
8
- export declare const polarToCartesian: (angle: number, radius: number) => {
2
+ export declare const polarToCartesian: (angle: number, radius: number, center?: number) => {
9
3
  x: number;
10
4
  y: number;
11
5
  };
12
- /**
13
- * Create SVG arc path for pie/donut charts
14
- */
15
- export declare const createArcPath: (startAngle: number, endAngle: number, innerRadius?: number) => string;
16
- /**
17
- * Generate smooth bezier line path
18
- */
6
+ export declare const polarOffset: (angle: number, distance: number) => {
7
+ x: number;
8
+ y: number;
9
+ };
10
+ export declare const createArcPath: (startAngle: number, endAngle: number, innerRadius?: number, outerRadius?: number) => string;
19
11
  export declare const generateLinePath: (points: Array<{
20
12
  x: number;
21
13
  y: number;
22
- }>, smooth?: boolean) => string;
23
- /**
24
- * Calculate line chart points from data
25
- */
14
+ }>, smooth?: boolean, stepped?: boolean) => string;
26
15
  export declare const calculateLinePoints: (data: Array<{
27
16
  value: number;
28
17
  }>) => Array<{
29
18
  x: number;
30
19
  y: number;
31
20
  }>;
21
+ export declare const getStackTotal: (stacks: number[] | undefined, value: number) => number;
@@ -1,5 +1,41 @@
1
- import { DEFAULT_COLORS as r } from "./Chart.const.js";
2
- const n = (t, o) => o || r[t % r.length];
1
+ import { ZERO as y, ONE as o } from "../../constants/numbers.const.js";
2
+ import { DEFAULT_COLORS as L, CHART as x } from "./Chart.const.js";
3
+ const M = ($, n) => n || L[$ % L.length], h = ($, n, c = x.CENTER) => {
4
+ const e = $ * Math.PI / x.HALF_SWEEP;
5
+ return {
6
+ x: c + n * Math.cos(e),
7
+ y: c + n * Math.sin(e)
8
+ };
9
+ }, f = ($, n) => {
10
+ const c = $ * Math.PI / x.HALF_SWEEP;
11
+ return {
12
+ x: n * Math.cos(c),
13
+ y: n * Math.sin(c)
14
+ };
15
+ }, _ = ($, n, c = y, e = x.OUTER_RADIUS) => {
16
+ const r = c * e, t = h($, e), E = h(n, e), a = h($, r), I = h(n, r), s = n - $ > x.LARGE_ARC_THRESHOLD ? o : y;
17
+ return c > y ? `M ${t.x},${t.y} A ${e},${e} 0 ${s},1 ${E.x},${E.y} L ${I.x},${I.y} A ${r},${r} 0 ${s},0 ${a.x},${a.y} Z` : `M ${x.CENTER},${x.CENTER} L ${t.x},${t.y} A ${e},${e} 0 ${s},1 ${E.x},${E.y} Z`;
18
+ }, m = ($, n = !0, c = !1) => $.length === y ? "" : c ? $.reduce((e, r, t, E) => {
19
+ if (t === y) return `M ${r.x},${r.y}`;
20
+ const a = E[t - o];
21
+ return `${e} L ${r.x},${a.y} L ${r.x},${r.y}`;
22
+ }, "") : n ? $.reduce((e, r, t, E) => {
23
+ if (t === y) return `M ${r.x},${r.y}`;
24
+ const a = E[t - o], I = a.x + (r.x - a.x) / x.BEZIER_DIVISOR, s = r.x - (r.x - a.x) / x.BEZIER_DIVISOR;
25
+ return `${e} C ${I},${a.y} ${s},${r.y} ${r.x},${r.y}`;
26
+ }, "") : $.reduce((e, r, t) => `${e} ${t === y ? "M" : "L"} ${r.x},${r.y}`, ""), O = ($) => {
27
+ const n = Math.max(...$.map((t) => t.value)), c = Math.min(...$.map((t) => t.value)), e = n - c || o, r = $.length - o || o;
28
+ return $.map((t, E) => ({
29
+ x: E / r * x.VIEWBOX,
30
+ y: x.VIEWBOX - (t.value - c) / e * x.LINE_Y_RANGE - x.LINE_Y_PAD
31
+ }));
32
+ }, A = ($, n) => !$ || $.length === y ? n : $.reduce((c, e) => c + e, y);
3
33
  export {
4
- n as getChartColor
34
+ O as calculateLinePoints,
35
+ _ as createArcPath,
36
+ m as generateLinePath,
37
+ M as getChartColor,
38
+ A as getStackTotal,
39
+ f as polarOffset,
40
+ h as polarToCartesian
5
41
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("../../constants/numbers.const.cjs"),s=require("../../utils/cn.cjs");require("react");const N=require("../../utils/generateBearId.utils.cjs"),_=require("../../utils/useBearId.cjs"),b=require("../Box/Box.cjs"),o=require("../Flex/Flex.cjs"),F=require("../Typography/Typography.cjs"),t=require("./Chart.const.cjs"),j=require("./Chart.utils.cjs"),E=l=>{const{data:a,height:c=t.CHART.DEFAULT_HEIGHT,showLabels:u=!0,showValues:i=!0,animated:h=!0,color:d,className:C,id:g,testId:m,...x}=l,B=_.useBearId("FunnelChart"),p=N.resolveBearId(g,B),I=Math.max(...a.map(e=>e.value),n.ONE),q={"--Bear-Chart-height":`${c}px`};return r.jsx(o.Flex,{id:p,"data-testid":m,direction:"column",gap:1,justify:"center",className:s.cn("Bear-Chart Bear-Chart--funnel",C),style:q,...x,children:a.map((e,y)=>{const T={"--Bear-Chart-size":`${Math.max(e.value/I*t.CHART.VIEWBOX,t.CHART.FUNNEL_MIN_WIDTH)}%`,"--Bear-Chart-step-height":`${t.CHART.VIEWBOX/Math.max(a.length,n.ONE)/2}%`,"--Bear-Chart-color":j.getChartColor(y,e.color||d)};return r.jsxs(o.Flex,{direction:"column",align:"center",gap:1,className:"bear-w-full",children:[r.jsx(b.Box,{className:s.cn("Bear-Chart__funnel-step bear-rounded-md",h&&"animate-grow-right"),style:T}),u&&r.jsxs(F.Typography,{variant:"caption",color:"muted",children:[e.label,i?` · ${e.value}`:""]})]},e.label)})})};exports.FunnelChart=E;
@@ -0,0 +1,2 @@
1
+ import { FunnelChartProps } from './Chart.types';
2
+ export declare const FunnelChart: (props: FunnelChartProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,61 @@
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import { ONE as l } from "../../constants/numbers.const.js";
3
+ import { cn as n } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as E } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as b } from "../../utils/useBearId.js";
7
+ import { Box as v } from "../Box/Box.js";
8
+ import { Flex as s } from "../Flex/Flex.js";
9
+ import { Typography as F } from "../Typography/Typography.js";
10
+ import { CHART as t } from "./Chart.const.js";
11
+ import { getChartColor as T } from "./Chart.utils.js";
12
+ const S = (m) => {
13
+ const {
14
+ data: e,
15
+ height: i = t.DEFAULT_HEIGHT,
16
+ showLabels: c = !0,
17
+ showValues: h = !0,
18
+ animated: d = !0,
19
+ color: p,
20
+ className: u,
21
+ id: f,
22
+ testId: g,
23
+ ...B
24
+ } = m, C = b("FunnelChart"), x = E(f, C), I = Math.max(...e.map((r) => r.value), l), N = { "--Bear-Chart-height": `${i}px` };
25
+ return /* @__PURE__ */ a(
26
+ s,
27
+ {
28
+ id: x,
29
+ "data-testid": g,
30
+ direction: "column",
31
+ gap: 1,
32
+ justify: "center",
33
+ className: n("Bear-Chart Bear-Chart--funnel", u),
34
+ style: N,
35
+ ...B,
36
+ children: e.map((r, y) => {
37
+ const w = {
38
+ "--Bear-Chart-size": `${Math.max(r.value / I * t.VIEWBOX, t.FUNNEL_MIN_WIDTH)}%`,
39
+ "--Bear-Chart-step-height": `${t.VIEWBOX / Math.max(e.length, l) / 2}%`,
40
+ "--Bear-Chart-color": T(y, r.color || p)
41
+ };
42
+ return /* @__PURE__ */ o(s, { direction: "column", align: "center", gap: 1, className: "bear-w-full", children: [
43
+ /* @__PURE__ */ a(
44
+ v,
45
+ {
46
+ className: n("Bear-Chart__funnel-step bear-rounded-md", d && "animate-grow-right"),
47
+ style: w
48
+ }
49
+ ),
50
+ c && /* @__PURE__ */ o(F, { variant: "caption", color: "muted", children: [
51
+ r.label,
52
+ h ? ` · ${r.value}` : ""
53
+ ] })
54
+ ] }, r.label);
55
+ })
56
+ }
57
+ );
58
+ };
59
+ export {
60
+ S as FunnelChart
61
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("react"),u=require("../../utils/cn.cjs"),N=({data:a,height:y=200,showLabels:d=!0,showDots:h=!0,smooth:f=!0,fill:p=!1,strokeWidth:j=2,color:i="var(--bear-primary-500, #ec4899)",animated:x=!0,className:$,...v})=>{const n=m.useMemo(()=>{const r=Math.max(...a.map(t=>t.value)),e=Math.min(...a.map(t=>t.value)),l=r-e||1;return a.map((t,c)=>({x:c/(a.length-1||1)*100,y:100-(t.value-e)/l*80-10,...t}))},[a]),o=m.useMemo(()=>n.length===0?"":f?n.reduce((r,e,l,t)=>{if(l===0)return`M ${e.x},${e.y}`;const c=t[l-1],M=c.x+(e.x-c.x)/3,L=e.x-(e.x-c.x)/3;return`${r} C ${M},${c.y} ${L},${e.y} ${e.x},${e.y}`},""):n.reduce((r,e,l)=>`${r} ${l===0?"M":"L"} ${e.x},${e.y}`,""),[n,f]),g=m.useMemo(()=>n.length===0?"":`${o} L 100,100 L 0,100 Z`,[o,n]);return s.jsxs("div",{className:u.cn("w-full",$),style:{height:y},...v,children:[s.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",className:"w-full h-full",children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"line-gradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[s.jsx("stop",{offset:"0%",stopColor:i,stopOpacity:"0.3"}),s.jsx("stop",{offset:"100%",stopColor:i,stopOpacity:"0"})]})}),p&&s.jsx("path",{d:g,fill:"url(#line-gradient)",className:u.cn(x&&"animate-fade-in")}),s.jsx("path",{d:o,fill:"none",stroke:i,strokeWidth:j/10,strokeLinecap:"round",strokeLinejoin:"round",className:u.cn(x&&"animate-draw-line")}),h&&n.map((r,e)=>s.jsx("circle",{cx:r.x,cy:r.y,r:1.5,fill:i,className:u.cn(x&&"animate-scale-in"),style:{animationDelay:`${e*50}ms`}},e))]}),d&&s.jsx("div",{className:"flex justify-between mt-2",children:a.map((r,e)=>s.jsx("span",{className:"text-xs text-gray-600 dark:text-slate-300",children:r.label},e))})]})};exports.LineChart=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../constants/numbers.const.cjs"),r=require("../../utils/cn.cjs");require("react");const O=require("../../utils/generateBearId.utils.cjs"),b=require("../../utils/useBearId.cjs"),t=require("./Chart.const.cjs"),C=require("./Chart.utils.cjs"),$=I=>{const{data:n,height:T=t.CHART.DEFAULT_HEIGHT,showLabels:x=!0,showDots:B=!0,smooth:j=!0,fill:_=!1,stepped:d=!1,strokeWidth:f=t.CHART.DEFAULT_STROKE_WIDTH,color:a="var(--bear-primary-500, #ec4899)",animated:i=!0,className:y,id:R,testId:g,...A}=I,L=b.useBearId("LineChart"),h=O.resolveBearId(R,L),u=`${h}-gradient`,o=C.calculateLinePoints(n),p=C.generateLinePath(o,j&&!d,d),E=o.length===c.ZERO?"":`${p} L ${t.CHART.VIEWBOX},${t.CHART.VIEWBOX} L 0,${t.CHART.VIEWBOX} Z`,H={"--Bear-Chart-height":`${T}px`};return e.jsxs("div",{id:h,"data-testid":g,className:r.cn("Bear-Chart Bear-Chart--line",y),style:H,...A,children:[e.jsxs("svg",{viewBox:`0 0 ${t.CHART.VIEWBOX} ${t.CHART.VIEWBOX}`,preserveAspectRatio:"none",className:"Bear-Chart__svg",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:u,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[e.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:"0.3"}),e.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:"0"})]})}),_&&e.jsx("path",{d:E,fill:`url(#${u})`,className:r.cn(i&&"animate-fade-in")}),e.jsx("path",{d:p,fill:"none",stroke:a,strokeWidth:f/c.TEN,strokeLinecap:"round",strokeLinejoin:"round",className:r.cn(i&&"animate-draw-line")}),B&&o.map((s,l)=>{var m;return e.jsx("circle",{cx:s.x,cy:s.y,r:t.CHART.DOT_RADIUS,fill:a,className:r.cn(i&&"animate-scale-in"),style:{animationDelay:`${l*c.FIFTY}ms`}},((m=n[l])==null?void 0:m.label)??l)})]}),x&&e.jsx("div",{className:"Bear-Chart__labels",children:n.map(s=>e.jsx("span",{className:"Bear-Chart__label",children:s.label},s.label))})]})};exports.LineChart=$;
@@ -1,3 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { LineChartProps } from './Chart.types';
3
- export declare const LineChart: FC<LineChartProps>;
2
+ export declare const LineChart: (props: LineChartProps) => import("react/jsx-runtime").JSX.Element;