@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,45 +1,34 @@
1
1
  import { ReactNode } from 'react';
2
- import { ChatMessage } from '../Chat/Chat.types';
2
+ import { ChatMessage, ChatTranslations } from '../Chat/Chat.types';
3
+ export interface FloatingChatTranslations extends ChatTranslations {
4
+ closeLabel: string;
5
+ openLabel: string;
6
+ }
3
7
  export interface FloatingChatProps {
4
8
  id?: string;
5
- /** Chat messages */
9
+ testId?: string;
6
10
  messages: ChatMessage[];
7
- /** Callback when user sends a message */
8
11
  onSend?: (message: string) => void;
9
- /** Loading state */
12
+ onStop?: () => void;
13
+ onAttach?: (files: File[]) => void;
10
14
  isLoading?: boolean;
11
- /** Typing indicator */
15
+ isStreaming?: boolean;
12
16
  isTyping?: boolean;
13
- /** Chat title */
14
17
  title?: string;
15
- /** Chat subtitle */
16
18
  subtitle?: string;
17
- /** Avatar URL */
18
19
  avatar?: string;
19
- /** Position on screen */
20
20
  position?: 'bottom-right' | 'bottom-left';
21
- /** Distance from bottom */
22
21
  bottom?: number;
23
- /** Distance from side */
24
22
  side?: number;
25
- /** Initial open state */
26
23
  defaultOpen?: boolean;
27
- /** Controlled open state */
28
24
  open?: boolean;
29
- /** Callback when open state changes */
30
25
  onOpenChange?: (open: boolean) => void;
31
- /** Custom trigger button */
32
26
  trigger?: ReactNode;
33
- /** Badge count (e.g., unread messages) */
34
27
  badgeCount?: number;
35
- /** Header content */
36
28
  header?: ReactNode;
37
- /** Welcome message */
38
29
  welcomeMessage?: string;
39
- /** Show powered by */
40
30
  poweredBy?: string;
41
- /** Custom class name */
31
+ allowAttach?: boolean;
42
32
  className?: string;
43
- /** Test ID */
44
- testId?: string;
33
+ translations?: Partial<FloatingChatTranslations>;
45
34
  }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/generals.const.cjs"),e=require("./FloatingChat.const.cjs"),T=(t,_)=>({[e.FLOATING_CHAT_BOTTOM_VAR]:`${t}${r.UNIT_PX}`,[e.FLOATING_CHAT_SIDE_VAR]:`${_}${r.UNIT_PX}`,[e.FLOATING_CHAT_WIDTH_VAR]:`${e.CHAT_WINDOW_SIZE.width}${r.UNIT_PX}`,[e.FLOATING_CHAT_HEIGHT_VAR]:`${e.CHAT_WINDOW_SIZE.height}${r.UNIT_PX}`}),o=(t,_)=>t>_?`${_}+`:String(t);exports.resolveFloatingChatBadge=o;exports.resolveFloatingChatVars=T;
@@ -0,0 +1,2 @@
1
+ export declare const resolveFloatingChatVars: (bottom: number, side: number) => Record<string, string>;
2
+ export declare const resolveFloatingChatBadge: (count: number, max: number) => string;
@@ -0,0 +1,12 @@
1
+ import { UNIT_PX as r } from "../../constants/generals.const.js";
2
+ import { CHAT_WINDOW_SIZE as t, FLOATING_CHAT_HEIGHT_VAR as A, FLOATING_CHAT_WIDTH_VAR as o, FLOATING_CHAT_SIDE_VAR as I, FLOATING_CHAT_BOTTOM_VAR as e } from "./FloatingChat.const.js";
3
+ const H = (_, T) => ({
4
+ [e]: `${_}${r}`,
5
+ [I]: `${T}${r}`,
6
+ [o]: `${t.width}${r}`,
7
+ [A]: `${t.height}${r}`
8
+ }), C = (_, T) => _ > T ? `${T}+` : String(_);
9
+ export {
10
+ C as resolveFloatingChatBadge,
11
+ H as resolveFloatingChatVars
12
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Avatar/Avatar.cjs");require("react");const r=require("../../Box/Box.cjs"),h=require("../../CloseButton/CloseButton.cjs"),g=require("../../Flex/Flex.cjs"),s=require("../../Typography/Typography.cjs"),x=i=>{const{header:a,title:t,subtitle:l,avatar:n,closeLabel:o,onClose:c}=i;return a?e.jsx(r.Box,{className:"Bear-FloatingChat__header",children:a}):e.jsxs(g.Flex,{className:"Bear-FloatingChat__header",align:"center",gap:3,children:[e.jsx(u.Avatar,{src:n,initials:t[0],size:"sm"}),e.jsxs(r.Box,{children:[e.jsx(s.Typography,{variant:"subtitle2",className:"Bear-FloatingChat__title",children:t}),e.jsx(s.Typography,{variant:"caption",className:"Bear-FloatingChat__subtitle",children:l})]}),e.jsx(h.CloseButton,{"aria-label":o,onClick:c})]})};exports.FloatingChatHeader=x;
@@ -0,0 +1,9 @@
1
+ import { FloatingChatProps } from '../FloatingChat.types';
2
+ export declare const FloatingChatHeader: (props: {
3
+ header?: FloatingChatProps["header"];
4
+ title: string;
5
+ subtitle: string;
6
+ avatar?: string;
7
+ closeLabel: string;
8
+ onClose: () => void;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as a, jsxs as e } from "react/jsx-runtime";
2
+ import { Avatar as h } from "../../Avatar/Avatar.js";
3
+ import "react";
4
+ import { Box as i } from "../../Box/Box.js";
5
+ import { CloseButton as p } from "../../CloseButton/CloseButton.js";
6
+ import { Flex as d } from "../../Flex/Flex.js";
7
+ import { Typography as o } from "../../Typography/Typography.js";
8
+ const b = (l) => {
9
+ const { header: t, title: r, subtitle: n, avatar: s, closeLabel: m, onClose: c } = l;
10
+ return t ? /* @__PURE__ */ a(i, { className: "Bear-FloatingChat__header", children: t }) : /* @__PURE__ */ e(d, { className: "Bear-FloatingChat__header", align: "center", gap: 3, children: [
11
+ /* @__PURE__ */ a(h, { src: s, initials: r[0], size: "sm" }),
12
+ /* @__PURE__ */ e(i, { children: [
13
+ /* @__PURE__ */ a(o, { variant: "subtitle2", className: "Bear-FloatingChat__title", children: r }),
14
+ /* @__PURE__ */ a(o, { variant: "caption", className: "Bear-FloatingChat__subtitle", children: n })
15
+ ] }),
16
+ /* @__PURE__ */ a(p, { "aria-label": m, onClick: c })
17
+ ] });
18
+ };
19
+ export {
20
+ b as FloatingChatHeader
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../Badge/Badge.cjs"),i=require("../../Box/Box.cjs"),B=require("../../Button/Button.cjs"),C=require("../../CloseButton/CloseButton.cjs"),d=require("../FloatingChat.const.cjs"),h=require("../FloatingChat.utils.cjs"),_=s=>{const{isOpen:a,trigger:r,badgeCount:l,openLabel:n,closeLabel:g,onToggle:t}=s,o=l??0,c=!a&&o>0;return r?e.jsx(i.Box,{className:"Bear-FloatingChat__trigger",onClick:t,children:r}):e.jsxs(i.Box,{className:"Bear-FloatingChat__trigger",children:[a?e.jsx(C.CloseButton,{"aria-label":g,onClick:t,size:"lg"}):e.jsx(B.Button,{type:"button",variant:"primary","aria-label":n,onClick:t,children:n}),c&&e.jsx(u.Badge,{variant:"danger",size:"sm",className:"Bear-FloatingChat__badge",children:h.resolveFloatingChatBadge(o,d.FLOATING_CHAT_BADGE_MAX)})]})};exports.FloatingChatTrigger=_;
@@ -0,0 +1,9 @@
1
+ import { FloatingChatProps } from '../FloatingChat.types';
2
+ export declare const FloatingChatTrigger: (props: {
3
+ isOpen: boolean;
4
+ trigger?: FloatingChatProps["trigger"];
5
+ badgeCount?: number;
6
+ openLabel: string;
7
+ closeLabel: string;
8
+ onToggle: () => void;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import { Badge as p } from "../../Badge/Badge.js";
3
+ import { Box as n } from "../../Box/Box.js";
4
+ import { Button as C } from "../../Button/Button.js";
5
+ import { CloseButton as d } from "../../CloseButton/CloseButton.js";
6
+ import { FLOATING_CHAT_BADGE_MAX as h } from "../FloatingChat.const.js";
7
+ import { resolveFloatingChatBadge as B } from "../FloatingChat.utils.js";
8
+ const N = (l) => {
9
+ const { isOpen: a, trigger: t, badgeCount: g, openLabel: e, closeLabel: s, onToggle: o } = l, i = g ?? 0, m = !a && i > 0;
10
+ return t ? /* @__PURE__ */ r(n, { className: "Bear-FloatingChat__trigger", onClick: o, children: t }) : /* @__PURE__ */ c(n, { className: "Bear-FloatingChat__trigger", children: [
11
+ a ? /* @__PURE__ */ r(d, { "aria-label": s, onClick: o, size: "lg" }) : /* @__PURE__ */ r(C, { type: "button", variant: "primary", "aria-label": e, onClick: o, children: e }),
12
+ m && /* @__PURE__ */ r(p, { variant: "danger", size: "sm", className: "Bear-FloatingChat__badge", children: B(i, h) })
13
+ ] });
14
+ };
15
+ export {
16
+ N as FloatingChatTrigger
17
+ };
@@ -1,2 +1,2 @@
1
1
  export { FloatingChat } from './FloatingChat';
2
- export type { FloatingChatProps } from './FloatingChat.types';
2
+ export type { FloatingChatProps, FloatingChatTranslations } from './FloatingChat.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),E=require("../../utils/useBearId.cjs"),o=require("../Skeleton/Skeleton.cjs"),e=require("./FormSkeleton.const.cjs"),u=({fields:s=e.FORM_SKELETON_DEFAULT_FIELDS,animation:t="pulse",id:l,testId:n,className:_})=>{const a=E.useBearId("FormSkeleton"),i=S.resolveBearId(l,a);return r.jsx("div",{id:i,"data-testid":n,className:c.cn(e.FORM_SKELETON_ROOT_CLASS,"bear-flex bear-flex-col",_),style:{gap:e.FORM_SKELETON_FIELD_GAP_PX},children:Array.from({length:s}).map((F,d)=>r.jsxs("div",{className:"Bear-FormSkeleton__field bear-flex bear-flex-col bear-gap-2",children:[r.jsx(o.Skeleton,{animation:t,width:"30%",height:e.FORM_SKELETON_LABEL_HEIGHT_PX}),r.jsx(o.Skeleton,{animation:t,width:"100%",height:e.FORM_SKELETON_FIELD_HEIGHT_PX})]},`field-${d}`))})};exports.FormSkeleton=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../constants/numbers.const.cjs"),u=require("../../constants/generals.const.cjs"),d=require("../../utils/cn.cjs");require("react");const S=require("../../utils/generateBearId.utils.cjs"),F=require("../../utils/useBearId.cjs"),n=require("../Flex/Flex.cjs"),t=require("../Skeleton/Skeleton.cjs"),_=s=>{const{fields:l=r.THREE,animation:o=u.ANIMATION_PULSE,id:a,testId:i,className:c}=s;return e.jsx(n.Flex,{id:S.resolveBearId(a,F.useBearId("FormSkeleton")),testId:i,direction:"column",gap:4,className:d.cn("Bear-FormSkeleton",c),children:Array.from({length:l}).map((k,m)=>e.jsxs(n.Flex,{direction:"column",gap:2,className:"Bear-FormSkeleton__field",children:[e.jsx(t.Skeleton,{animation:o,height:r.FOURTEEN,className:"Bear-FormSkeleton__label"}),e.jsx(t.Skeleton,{animation:o,height:r.FORTY,className:"Bear-FormSkeleton__control"})]},`field-${m}`))})};exports.FormSkeleton=_;
@@ -1,2 +1,2 @@
1
1
  import { FormSkeletonProps } from './FormSkeleton.types';
2
- export declare const FormSkeleton: ({ fields, animation, id, testId, className, }: FormSkeletonProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const FormSkeleton: (props: FormSkeletonProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,32 +1,43 @@
1
- import { jsx as e, jsxs as E } from "react/jsx-runtime";
2
- import { cn as s } from "../../utils/cn.js";
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { THREE as p, FOURTEEN as d, FORTY as f } from "../../constants/numbers.const.js";
3
+ import { ANIMATION_PULSE as F } from "../../constants/generals.const.js";
4
+ import { cn as N } from "../../utils/cn.js";
3
5
  import "react";
4
- import { resolveBearId as f } from "../../utils/generateBearId.utils.js";
5
- import { useBearId as p } from "../../utils/useBearId.js";
6
- import { Skeleton as o } from "../Skeleton/Skeleton.js";
7
- import { FORM_SKELETON_FIELD_GAP_PX as F, FORM_SKELETON_DEFAULT_FIELDS as L, FORM_SKELETON_LABEL_HEIGHT_PX as O, FORM_SKELETON_FIELD_HEIGHT_PX as S, FORM_SKELETON_ROOT_CLASS as n } from "./FormSkeleton.const.js";
8
- const b = ({
9
- fields: t = L,
10
- animation: r = "pulse",
11
- id: _,
12
- testId: l,
13
- className: m
14
- }) => {
15
- const a = p("FormSkeleton"), d = f(_, a);
6
+ import { resolveBearId as S } from "../../utils/generateBearId.utils.js";
7
+ import { useBearId as _ } from "../../utils/useBearId.js";
8
+ import { Flex as r } from "../Flex/Flex.js";
9
+ import { Skeleton as m } from "../Skeleton/Skeleton.js";
10
+ const O = (t) => {
11
+ const { fields: l = p, animation: o = F, id: i, testId: a, className: n } = t;
16
12
  return /* @__PURE__ */ e(
17
- "div",
13
+ r,
18
14
  {
19
- id: d,
20
- "data-testid": l,
21
- className: s(n, "bear-flex bear-flex-col", m),
22
- style: { gap: F },
23
- children: Array.from({ length: t }).map((c, i) => /* @__PURE__ */ E("div", { className: "Bear-FormSkeleton__field bear-flex bear-flex-col bear-gap-2", children: [
24
- /* @__PURE__ */ e(o, { animation: r, width: "30%", height: O }),
25
- /* @__PURE__ */ e(o, { animation: r, width: "100%", height: S })
26
- ] }, `field-${i}`))
15
+ id: S(i, _("FormSkeleton")),
16
+ testId: a,
17
+ direction: "column",
18
+ gap: 4,
19
+ className: N("Bear-FormSkeleton", n),
20
+ children: Array.from({ length: l }).map((h, s) => /* @__PURE__ */ c(r, { direction: "column", gap: 2, className: "Bear-FormSkeleton__field", children: [
21
+ /* @__PURE__ */ e(
22
+ m,
23
+ {
24
+ animation: o,
25
+ height: d,
26
+ className: "Bear-FormSkeleton__label"
27
+ }
28
+ ),
29
+ /* @__PURE__ */ e(
30
+ m,
31
+ {
32
+ animation: o,
33
+ height: f,
34
+ className: "Bear-FormSkeleton__control"
35
+ }
36
+ )
37
+ ] }, `field-${s}`))
27
38
  }
28
39
  );
29
40
  };
30
41
  export {
31
- b as FormSkeleton
42
+ O as FormSkeleton
32
43
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),T=require("../../utils/cn.cjs");require("react");const x=require("../../utils/useBearId.cjs"),D=require("../Typography/Typography.cjs"),i=require("../Flex/Flex.cjs"),r=require("./Gauge.const.cjs"),L=require("./hooks/useGauge.cjs"),b=require("./helpers/GaugeArcSvg.cjs"),F=u=>{const{value:c,min:l=r.GAUGE_DEFAULT_MIN,max:o=r.GAUGE_DEFAULT_MAX,size:t=r.GAUGE_DEFAULT_SIZE,strokeWidth:s=r.GAUGE_DEFAULT_STROKE_WIDTH,color:g=r.GAUGE_DEFAULT_COLOR,trackColor:d,showLabel:A=!0,label:G,animated:_=!0,fillDurationMs:E=r.GAUGE_DEFAULT_FILL_DURATION_MS,arcAngle:U=r.GAUGE_DEFAULT_ARC_ANGLE,gradient:n,className:h,...m}=u,f=x.useBearId("Gauge","gradient"),e=L.useGauge({value:c,min:l,max:o,strokeWidth:s,arcAngle:U,animated:_,fillDurationMs:E});return a.jsxs(i.Flex,{align:"center",justify:"center",className:T.cn("bear-relative bear-inline-flex",h),style:{width:t,height:t},...m,children:[a.jsx(b.GaugeArcSvg,{radius:e.radius,strokeWidth:s,circumference:e.circumference,dashOffset:e.dashOffset,startAngle:e.startAngle,color:g,trackColor:d,gradientId:n?f:void 0,gradient:n,animated:e.animated,fillDurationMs:e.fillDurationMs}),A&&a.jsx(i.Flex,{align:"center",justify:"center",className:"bear-absolute bear-inset-0",children:G||a.jsxs(D.Typography,{variant:"h4",className:"bear-text-[var(--bear-text-primary)]",children:[Math.round(e.percentage),"%"]})})]})};exports.Gauge=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),_=require("../../utils/cn.cjs");require("react");const I=require("../../utils/useBearId.cjs"),N=require("../Typography/Typography.cjs"),i=require("../Flex/Flex.cjs"),e=require("./Gauge.const.cjs"),D=require("./hooks/useGauge.cjs"),b=require("./helpers/GaugeArcSvg.cjs"),R=require("./helpers/GaugeLinearBar.cjs"),y=s=>{const{value:E,min:U=e.GAUGE_DEFAULT_MIN,max:f=e.GAUGE_DEFAULT_MAX,size:t=e.GAUGE_DEFAULT_SIZE,strokeWidth:c=e.GAUGE_DEFAULT_STROKE_WIDTH,color:l=e.GAUGE_DEFAULT_COLOR,trackColor:u,showLabel:A=!0,label:G,animated:m=!0,fillDurationMs:h=e.GAUGE_DEFAULT_FILL_DURATION_MS,arcAngle:x=e.GAUGE_DEFAULT_ARC_ANGLE,variant:g=e.GAUGE_VARIANT_ARC,gradient:n,className:o,...d}=s,L=g===e.GAUGE_VARIANT_RING?s.arcAngle??e.GAUGE_RING_ARC_ANGLE:x,T=I.useBearId("Gauge","gradient"),r=D.useGauge({value:E,min:U,max:f,strokeWidth:c,arcAngle:L,animated:m,fillDurationMs:h});return g===e.GAUGE_VARIANT_LINEAR?a.jsx(i.Flex,{align:"center",justify:"center",className:_.cn("bear-relative bear-inline-flex",o),style:{width:t},...d,children:a.jsx(R.GaugeLinearBar,{percentage:r.percentage,color:l,trackColor:u,gradient:n,animated:r.animated,fillDurationMs:r.fillDurationMs,showLabel:A,label:G})}):a.jsxs(i.Flex,{align:"center",justify:"center",className:_.cn("bear-relative bear-inline-flex",o),style:{width:t,height:t},...d,children:[a.jsx(b.GaugeArcSvg,{radius:r.radius,strokeWidth:c,circumference:r.circumference,dashOffset:r.dashOffset,startAngle:r.startAngle,color:l,trackColor:u,gradientId:n?T:void 0,gradient:n,animated:r.animated,fillDurationMs:r.fillDurationMs}),A&&a.jsx(i.Flex,{align:"center",justify:"center",className:"bear-absolute bear-inset-0",children:G||a.jsxs(N.Typography,{variant:"h4",className:"bear-text-[var(--bear-text-primary)]",children:[Math.round(r.percentage),"%"]})})]})};exports.Gauge=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=0,E=100,_=120,G=10,U="var(--bear-primary-500, #ec4899)",T=270,L=900,D=50,I="cubic-bezier(0.4, 0, 0.2, 1)";exports.GAUGE_ANIMATION_EASING=I;exports.GAUGE_DEFAULT_ARC_ANGLE=T;exports.GAUGE_DEFAULT_COLOR=U;exports.GAUGE_DEFAULT_FILL_DURATION_MS=L;exports.GAUGE_DEFAULT_MAX=E;exports.GAUGE_DEFAULT_MIN=A;exports.GAUGE_DEFAULT_SIZE=_;exports.GAUGE_DEFAULT_STROKE_WIDTH=G;exports.GAUGE_VIEWBOX_CENTER=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=0,G=100,_=120,E=10,U="var(--bear-primary-500, #ec4899)",T=270,I=900,N=50,R="cubic-bezier(0.4, 0, 0.2, 1)",L="arc",c="linear",t="ring",n=360,o=8;exports.GAUGE_ANIMATION_EASING=R;exports.GAUGE_DEFAULT_ARC_ANGLE=T;exports.GAUGE_DEFAULT_COLOR=U;exports.GAUGE_DEFAULT_FILL_DURATION_MS=I;exports.GAUGE_DEFAULT_MAX=G;exports.GAUGE_DEFAULT_MIN=A;exports.GAUGE_DEFAULT_SIZE=_;exports.GAUGE_DEFAULT_STROKE_WIDTH=E;exports.GAUGE_LINEAR_TRACK_HEIGHT=o;exports.GAUGE_RING_ARC_ANGLE=n;exports.GAUGE_VARIANT_ARC=L;exports.GAUGE_VARIANT_LINEAR=c;exports.GAUGE_VARIANT_RING=t;exports.GAUGE_VIEWBOX_CENTER=N;
@@ -7,3 +7,8 @@ export declare const GAUGE_DEFAULT_ARC_ANGLE = 270;
7
7
  export declare const GAUGE_DEFAULT_FILL_DURATION_MS = 900;
8
8
  export declare const GAUGE_VIEWBOX_CENTER = 50;
9
9
  export declare const GAUGE_ANIMATION_EASING = "cubic-bezier(0.4, 0, 0.2, 1)";
10
+ export declare const GAUGE_VARIANT_ARC = "arc";
11
+ export declare const GAUGE_VARIANT_LINEAR = "linear";
12
+ export declare const GAUGE_VARIANT_RING = "ring";
13
+ export declare const GAUGE_RING_ARC_ANGLE = 360;
14
+ export declare const GAUGE_LINEAR_TRACK_HEIGHT = 8;
@@ -1,12 +1,17 @@
1
- const A = 0, E = 100, _ = 120, G = 10, U = "var(--bear-primary-500, #ec4899)", c = 270, T = 900, L = 50, o = "cubic-bezier(0.4, 0, 0.2, 1)";
1
+ const A = 0, G = 100, _ = 120, E = 10, U = "var(--bear-primary-500, #ec4899)", c = 270, I = 900, T = 50, n = "cubic-bezier(0.4, 0, 0.2, 1)", o = "arc", t = "linear", N = "ring", R = 360, s = 8;
2
2
  export {
3
- o as GAUGE_ANIMATION_EASING,
3
+ n as GAUGE_ANIMATION_EASING,
4
4
  c as GAUGE_DEFAULT_ARC_ANGLE,
5
5
  U as GAUGE_DEFAULT_COLOR,
6
- T as GAUGE_DEFAULT_FILL_DURATION_MS,
7
- E as GAUGE_DEFAULT_MAX,
6
+ I as GAUGE_DEFAULT_FILL_DURATION_MS,
7
+ G as GAUGE_DEFAULT_MAX,
8
8
  A as GAUGE_DEFAULT_MIN,
9
9
  _ as GAUGE_DEFAULT_SIZE,
10
- G as GAUGE_DEFAULT_STROKE_WIDTH,
11
- L as GAUGE_VIEWBOX_CENTER
10
+ E as GAUGE_DEFAULT_STROKE_WIDTH,
11
+ s as GAUGE_LINEAR_TRACK_HEIGHT,
12
+ R as GAUGE_RING_ARC_ANGLE,
13
+ o as GAUGE_VARIANT_ARC,
14
+ t as GAUGE_VARIANT_LINEAR,
15
+ N as GAUGE_VARIANT_RING,
16
+ T as GAUGE_VIEWBOX_CENTER
12
17
  };
@@ -1,3 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { GaugeProps } from './Gauge.types';
3
- export declare const Gauge: FC<GaugeProps>;
2
+ export declare const Gauge: (props: GaugeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,70 +1,94 @@
1
- import { jsxs as i, jsx as n } from "react/jsx-runtime";
2
- import { cn as h } from "../../utils/cn.js";
1
+ import { jsx as r, jsxs as _ } from "react/jsx-runtime";
2
+ import { cn as d } from "../../utils/cn.js";
3
3
  import "react";
4
4
  import { useBearId as D } from "../../utils/useBearId.js";
5
- import { Typography as L } from "../Typography/Typography.js";
6
- import { Flex as s } from "../Flex/Flex.js";
7
- import { GAUGE_DEFAULT_MIN as T, GAUGE_DEFAULT_MAX as b, GAUGE_DEFAULT_SIZE as F, GAUGE_DEFAULT_STROKE_WIDTH as x, GAUGE_DEFAULT_COLOR as I, GAUGE_DEFAULT_FILL_DURATION_MS as M, GAUGE_DEFAULT_ARC_ANGLE as N } from "./Gauge.const.js";
8
- import { useGauge as v } from "./hooks/useGauge.js";
9
- import { GaugeArcSvg as y } from "./helpers/GaugeArcSvg.js";
10
- const B = (o) => {
5
+ import { Typography as I } from "../Typography/Typography.js";
6
+ import { Flex as i } from "../Flex/Flex.js";
7
+ import { GAUGE_DEFAULT_MIN as T, GAUGE_DEFAULT_MAX as R, GAUGE_DEFAULT_SIZE as b, GAUGE_DEFAULT_STROKE_WIDTH as v, GAUGE_DEFAULT_COLOR as x, GAUGE_DEFAULT_FILL_DURATION_MS as F, GAUGE_DEFAULT_ARC_ANGLE as M, GAUGE_VARIANT_ARC as y, GAUGE_VARIANT_RING as O, GAUGE_RING_ARC_ANGLE as j, GAUGE_VARIANT_LINEAR as C } from "./Gauge.const.js";
8
+ import { useGauge as S } from "./hooks/useGauge.js";
9
+ import { GaugeArcSvg as w } from "./helpers/GaugeArcSvg.js";
10
+ import { GaugeLinearBar as V } from "./helpers/GaugeLinearBar.js";
11
+ const P = (n) => {
11
12
  const {
12
- value: l,
13
- min: m = T,
14
- max: c = b,
15
- size: r = F,
16
- strokeWidth: a = x,
17
- color: u = I,
18
- trackColor: A,
19
- showLabel: d = !0,
20
- label: f,
21
- animated: g = !0,
22
- fillDurationMs: G = M,
23
- arcAngle: _ = N,
13
+ value: f,
14
+ min: g = T,
15
+ max: E = R,
16
+ size: a = b,
17
+ strokeWidth: l = v,
18
+ color: s = x,
19
+ trackColor: o,
20
+ showLabel: A = !0,
21
+ label: c,
22
+ animated: U = !0,
23
+ fillDurationMs: h = F,
24
+ arcAngle: p = M,
25
+ variant: m = y,
24
26
  gradient: t,
25
- className: E,
26
- ...U
27
- } = o, p = D("Gauge", "gradient"), e = v({
28
- value: l,
29
- min: m,
30
- max: c,
31
- strokeWidth: a,
32
- arcAngle: _,
33
- animated: g,
34
- fillDurationMs: G
27
+ className: G,
28
+ ...u
29
+ } = n, L = m === O ? n.arcAngle ?? j : p, N = D("Gauge", "gradient"), e = S({
30
+ value: f,
31
+ min: g,
32
+ max: E,
33
+ strokeWidth: l,
34
+ arcAngle: L,
35
+ animated: U,
36
+ fillDurationMs: h
35
37
  });
36
- return /* @__PURE__ */ i(
37
- s,
38
+ return m === C ? /* @__PURE__ */ r(
39
+ i,
38
40
  {
39
41
  align: "center",
40
42
  justify: "center",
41
- className: h("bear-relative bear-inline-flex", E),
42
- style: { width: r, height: r },
43
- ...U,
43
+ className: d("bear-relative bear-inline-flex", G),
44
+ style: { width: a },
45
+ ...u,
46
+ children: /* @__PURE__ */ r(
47
+ V,
48
+ {
49
+ percentage: e.percentage,
50
+ color: s,
51
+ trackColor: o,
52
+ gradient: t,
53
+ animated: e.animated,
54
+ fillDurationMs: e.fillDurationMs,
55
+ showLabel: A,
56
+ label: c
57
+ }
58
+ )
59
+ }
60
+ ) : /* @__PURE__ */ _(
61
+ i,
62
+ {
63
+ align: "center",
64
+ justify: "center",
65
+ className: d("bear-relative bear-inline-flex", G),
66
+ style: { width: a, height: a },
67
+ ...u,
44
68
  children: [
45
- /* @__PURE__ */ n(
46
- y,
69
+ /* @__PURE__ */ r(
70
+ w,
47
71
  {
48
72
  radius: e.radius,
49
- strokeWidth: a,
73
+ strokeWidth: l,
50
74
  circumference: e.circumference,
51
75
  dashOffset: e.dashOffset,
52
76
  startAngle: e.startAngle,
53
- color: u,
54
- trackColor: A,
55
- gradientId: t ? p : void 0,
77
+ color: s,
78
+ trackColor: o,
79
+ gradientId: t ? N : void 0,
56
80
  gradient: t,
57
81
  animated: e.animated,
58
82
  fillDurationMs: e.fillDurationMs
59
83
  }
60
84
  ),
61
- d && /* @__PURE__ */ n(
62
- s,
85
+ A && /* @__PURE__ */ r(
86
+ i,
63
87
  {
64
88
  align: "center",
65
89
  justify: "center",
66
90
  className: "bear-absolute bear-inset-0",
67
- children: f || /* @__PURE__ */ i(L, { variant: "h4", className: "bear-text-[var(--bear-text-primary)]", children: [
91
+ children: c || /* @__PURE__ */ _(I, { variant: "h4", className: "bear-text-[var(--bear-text-primary)]", children: [
68
92
  Math.round(e.percentage),
69
93
  "%"
70
94
  ] })
@@ -75,5 +99,5 @@ const B = (o) => {
75
99
  );
76
100
  };
77
101
  export {
78
- B as Gauge
102
+ P as Gauge
79
103
  };
@@ -24,8 +24,17 @@ export interface GaugeProps extends HTMLAttributes<HTMLDivElement> {
24
24
  animated?: boolean;
25
25
  /** Fill transition duration in ms when animated */
26
26
  fillDurationMs?: number;
27
- /** Arc angle (180 for half, 270 for 3/4, 360 for full) */
28
27
  arcAngle?: number;
29
- /** Gradient colors [start, end] */
28
+ variant?: 'arc' | 'linear' | 'ring';
30
29
  gradient?: [string, string];
31
30
  }
31
+ export interface GaugeLinearBarProps {
32
+ percentage: number;
33
+ color: string;
34
+ trackColor?: string;
35
+ gradient?: [string, string];
36
+ animated: boolean;
37
+ fillDurationMs: number;
38
+ showLabel: boolean;
39
+ label?: ReactNode;
40
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("../../Flex/Flex.cjs"),n=require("../../Box/Box.cjs"),b=require("../../Typography/Typography.cjs"),i=require("../Gauge.const.cjs"),h=t=>{const{percentage:o,color:l,trackColor:u,gradient:r,animated:a,fillDurationMs:s,showLabel:c,label:d}=t;return e.jsxs(g.Flex,{direction:"column",gap:2,className:"Bear-Gauge Bear-Gauge--linear bear-w-full",children:[e.jsx(n.Box,{className:"Bear-Gauge__linear-track bear-w-full bear-overflow-hidden bear-rounded-full",style:{height:i.GAUGE_LINEAR_TRACK_HEIGHT,backgroundColor:u??"var(--bear-border-default)"},children:e.jsx(n.Box,{className:"Bear-Gauge__linear-fill bear-h-full bear-rounded-full",style:{width:`${o}%`,background:r?`linear-gradient(90deg, ${r[0]}, ${r[1]})`:l,transitionProperty:a?"width":void 0,transitionDuration:a?`${s}ms`:void 0,transitionTimingFunction:a?i.GAUGE_ANIMATION_EASING:void 0}})}),c&&(d||e.jsxs(b.Typography,{variant:"caption",color:"muted",children:[Math.round(o),"%"]}))]})};exports.GaugeLinearBar=h;
@@ -0,0 +1,2 @@
1
+ import { GaugeLinearBarProps } from '../Gauge.types';
2
+ export declare const GaugeLinearBar: (props: GaugeLinearBarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
+ import { Flex as m } from "../../Flex/Flex.js";
3
+ import { Box as l } from "../../Box/Box.js";
4
+ import { Typography as g } from "../../Typography/Typography.js";
5
+ import { GAUGE_LINEAR_TRACK_HEIGHT as f, GAUGE_ANIMATION_EASING as b } from "../Gauge.const.js";
6
+ const N = (n) => {
7
+ const { percentage: e, color: t, trackColor: d, gradient: r, animated: a, fillDurationMs: u, showLabel: c, label: s } = n;
8
+ return /* @__PURE__ */ o(m, { direction: "column", gap: 2, className: "Bear-Gauge Bear-Gauge--linear bear-w-full", children: [
9
+ /* @__PURE__ */ i(
10
+ l,
11
+ {
12
+ className: "Bear-Gauge__linear-track bear-w-full bear-overflow-hidden bear-rounded-full",
13
+ style: {
14
+ height: f,
15
+ backgroundColor: d ?? "var(--bear-border-default)"
16
+ },
17
+ children: /* @__PURE__ */ i(
18
+ l,
19
+ {
20
+ className: "Bear-Gauge__linear-fill bear-h-full bear-rounded-full",
21
+ style: {
22
+ width: `${e}%`,
23
+ background: r ? `linear-gradient(90deg, ${r[0]}, ${r[1]})` : t,
24
+ transitionProperty: a ? "width" : void 0,
25
+ transitionDuration: a ? `${u}ms` : void 0,
26
+ transitionTimingFunction: a ? b : void 0
27
+ }
28
+ }
29
+ )
30
+ }
31
+ ),
32
+ c && (s || /* @__PURE__ */ o(g, { variant: "caption", color: "muted", children: [
33
+ Math.round(e),
34
+ "%"
35
+ ] }))
36
+ ] });
37
+ };
38
+ export {
39
+ N as GaugeLinearBar
40
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),S=require("../../utils/cn.cjs"),W=require("../Popover/Popover.cjs"),N=require("../Typography/Typography.cjs"),o=require("./Heatmap.const.cjs"),k=require("./Heatmap.utils.cjs"),I=({data:v,startDate:d,endDate:h,colorScale:u=o.DEFAULT_COLOR_SCALE,cellSize:m=o.DEFAULT_CELL_SIZE,cellGap:p=o.DEFAULT_CELL_GAP,showDayLabels:y=!0,showMonthLabels:b=!0,emptyColor:L,tooltipFormat:E,onCellClick:x,renderTooltip:i,testId:D,className:O,...q})=>{const[g,H]=l.useState(null),[P,_]=l.useState(!1),R=l.useRef(new Map),{weeks:M,dataMap:T,maxValue:f}=l.useMemo(()=>{const e=h?new Date(h):new Date,a=d?new Date(d):new Date(e.getFullYear()-1,e.getMonth(),e.getDate()),c=new Map;let r=0;for(const n of v)c.set(n.date,n),n.value>r&&(r=n.value);return{weeks:k.getWeeks(a,e),dataMap:c,maxValue:r}},[v,d,h]),C=l.useCallback(e=>{if(e===0||f===0)return L??o.DEFAULT_EMPTY_COLOR;const a=Math.min(Math.floor(e/f*(u.length-1)),u.length-1);return u[a]},[f,L,u]),j=y?28:0,F=l.useCallback(e=>{!e||!i||(H(e),_(!0))},[i]),U=l.useCallback(()=>{_(!1),H(null)},[]);return s.jsxs("div",{className:S.cn("Bear-Heatmap relative inline-block",O),"data-testid":D,...q,children:[b&&s.jsx("div",{className:"Bear-Heatmap__months flex mb-1",style:{paddingLeft:j},children:M.map((e,a)=>{const c=e[0],r=a===0||c.getDate()<=o.DAYS_IN_WEEK;return s.jsx(N.Typography,{variant:"caption",className:"Bear-Heatmap__month text-gray-400 dark:text-gray-500 text-[10px]",style:{width:m+p,textAlign:"left"},children:r?o.MONTH_LABELS[c.getMonth()]:""},a)})}),s.jsxs("div",{className:"Bear-Heatmap__grid flex",children:[y&&s.jsx("div",{className:"Bear-Heatmap__days flex flex-col mr-1",style:{gap:p},children:o.DAY_LABELS.map((e,a)=>s.jsx(N.Typography,{variant:"caption",className:"Bear-Heatmap__day text-gray-400 dark:text-gray-500 text-[10px] flex items-center justify-end",style:{height:m,width:j-o.LABEL_PAD},children:e},a))}),s.jsx("div",{className:"Bear-Heatmap__weeks flex",style:{gap:p},children:M.map((e,a)=>s.jsx("div",{className:"Bear-Heatmap__week flex flex-col",style:{gap:p},children:e.map((c,r)=>{const n=k.toKey(c),t=T.get(n),w=(t==null?void 0:t.value)??0,Y=C(w),A=s.jsx("div",{ref:B=>{B&&R.current.set(n,B)},className:"Bear-Heatmap__cell rounded-sm cursor-pointer transition-transform hover:scale-125",style:{width:m,height:m,backgroundColor:Y},title:i?void 0:t?E?E(t):`${n}: ${w}`:n,onClick:()=>t&&(x==null?void 0:x(t)),onMouseEnter:()=>F(t),onMouseLeave:U},r);return i&&t&&(g==null?void 0:g.date)===t.date?s.jsx(W.Popover,{content:i(t),trigger:"hover",placement:"top",open:P,onOpenChange:_,arrow:!1,children:A},r):A})},a))})]})]})};exports.Heatmap=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),N=require("../../utils/cn.cjs"),W=require("../Popover/Popover.cjs"),k=require("../Typography/Typography.cjs"),n=require("./Heatmap.const.cjs"),b=require("./Heatmap.utils.cjs"),K=({data:L,startDate:p,endDate:_,colorScale:u=n.DEFAULT_COLOR_SCALE,cellSize:d=n.DEFAULT_CELL_SIZE,cellGap:m=n.DEFAULT_CELL_GAP,showDayLabels:v=!0,showMonthLabels:C=!0,emptyColor:y,tooltipFormat:E,onCellClick:h,renderTooltip:i,cellShape:D=n.CELL_SHAPE_SQUARE,testId:O,className:P,...R})=>{const[x,H]=l.useState(null),[q,g]=l.useState(!1),S=l.useRef(new Map),{weeks:A,dataMap:T,maxValue:f}=l.useMemo(()=>{const e=_?new Date(_):new Date,a=p?new Date(p):new Date(e.getFullYear()-1,e.getMonth(),e.getDate()),c=new Map;let o=0;for(const r of L)c.set(r.date,r),r.value>o&&(o=r.value);return{weeks:b.getWeeks(a,e),dataMap:c,maxValue:o}},[L,p,_]),U=l.useCallback(e=>{if(e===0||f===0)return y??n.DEFAULT_EMPTY_COLOR;const a=Math.min(Math.floor(e/f*(u.length-1)),u.length-1);return u[a]},[f,y,u]),M=v?28:0,F=l.useCallback(e=>{!e||!i||(H(e),g(!0))},[i]),Y=l.useCallback(()=>{g(!1),H(null)},[]);return s.jsxs("div",{className:N.cn("Bear-Heatmap relative inline-block",P),"data-testid":O,...R,children:[C&&s.jsx("div",{className:"Bear-Heatmap__months flex mb-1",style:{paddingLeft:M},children:A.map((e,a)=>{const c=e[0],o=a===0||c.getDate()<=n.DAYS_IN_WEEK;return s.jsx(k.Typography,{variant:"caption",className:"Bear-Heatmap__month text-gray-400 dark:text-gray-500 text-[10px]",style:{width:d+m,textAlign:"left"},children:o?n.MONTH_LABELS[c.getMonth()]:""},a)})}),s.jsxs("div",{className:"Bear-Heatmap__grid flex",children:[v&&s.jsx("div",{className:"Bear-Heatmap__days flex flex-col mr-1",style:{gap:m},children:n.DAY_LABELS.map((e,a)=>s.jsx(k.Typography,{variant:"caption",className:"Bear-Heatmap__day text-gray-400 dark:text-gray-500 text-[10px] flex items-center justify-end",style:{height:d,width:M-n.LABEL_PAD},children:e},a))}),s.jsx("div",{className:"Bear-Heatmap__weeks flex",style:{gap:m},children:A.map((e,a)=>s.jsx("div",{className:"Bear-Heatmap__week flex flex-col",style:{gap:m},children:e.map((c,o)=>{const r=b.toKey(c),t=T.get(r),j=(t==null?void 0:t.value)??0,I=U(j),w=s.jsx("div",{ref:B=>{B&&S.current.set(r,B)},className:N.cn("Bear-Heatmap__cell cursor-pointer transition-transform hover:scale-125",D===n.CELL_SHAPE_CIRCLE?"rounded-full":"rounded-sm"),style:{width:d,height:d,backgroundColor:I},title:i?void 0:t?E?E(t):`${r}: ${j}`:r,onClick:()=>t&&(h==null?void 0:h(t)),onMouseEnter:()=>F(t),onMouseLeave:Y},o);return i&&t&&(x==null?void 0:x.date)===t.date?s.jsx(W.Popover,{content:i(t),trigger:"hover",placement:"top",open:q,onOpenChange:g,arrow:!1,children:w},o):w})},a))})]})]})};exports.Heatmap=K;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=12,E=3,A=["#161b22","#0e4429","#006d32","#26a641","#39d353"],_="#ebedf0",t=["","Mon","","Wed","","Fri",""],D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=7,o=4;exports.DAYS_IN_WEEK=e;exports.DAY_LABELS=t;exports.DEFAULT_CELL_GAP=E;exports.DEFAULT_CELL_SIZE=L;exports.DEFAULT_COLOR_SCALE=A;exports.DEFAULT_EMPTY_COLOR=_;exports.LABEL_PAD=o;exports.MONTH_LABELS=D;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=12,E=3,_=["#161b22","#0e4429","#006d32","#26a641","#39d353"],A="#ebedf0",S=["","Mon","","Wed","","Fri",""],C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=7,c=4,e="square",o="circle";exports.CELL_SHAPE_CIRCLE=o;exports.CELL_SHAPE_SQUARE=e;exports.DAYS_IN_WEEK=t;exports.DAY_LABELS=S;exports.DEFAULT_CELL_GAP=E;exports.DEFAULT_CELL_SIZE=L;exports.DEFAULT_COLOR_SCALE=_;exports.DEFAULT_EMPTY_COLOR=A;exports.LABEL_PAD=c;exports.MONTH_LABELS=C;
@@ -6,3 +6,5 @@ export declare const DAY_LABELS: string[];
6
6
  export declare const MONTH_LABELS: string[];
7
7
  export declare const DAYS_IN_WEEK = 7;
8
8
  export declare const LABEL_PAD = 4;
9
+ export declare const CELL_SHAPE_SQUARE = "square";
10
+ export declare const CELL_SHAPE_CIRCLE = "circle";
@@ -1,11 +1,13 @@
1
- const L = 12, A = 3, E = ["#161b22", "#0e4429", "#006d32", "#26a641", "#39d353"], _ = "#ebedf0", n = ["", "Mon", "", "Wed", "", "Fri", ""], o = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], c = 7, t = 4;
1
+ const L = 12, E = 3, A = ["#161b22", "#0e4429", "#006d32", "#26a641", "#39d353"], _ = "#ebedf0", c = ["", "Mon", "", "Wed", "", "Fri", ""], n = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], o = 7, t = 4, s = "square", e = "circle";
2
2
  export {
3
- c as DAYS_IN_WEEK,
4
- n as DAY_LABELS,
5
- A as DEFAULT_CELL_GAP,
3
+ e as CELL_SHAPE_CIRCLE,
4
+ s as CELL_SHAPE_SQUARE,
5
+ o as DAYS_IN_WEEK,
6
+ c as DAY_LABELS,
7
+ E as DEFAULT_CELL_GAP,
6
8
  L as DEFAULT_CELL_SIZE,
7
- E as DEFAULT_COLOR_SCALE,
9
+ A as DEFAULT_COLOR_SCALE,
8
10
  _ as DEFAULT_EMPTY_COLOR,
9
11
  t as LABEL_PAD,
10
- o as MONTH_LABELS
12
+ n as MONTH_LABELS
11
13
  };