@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,73 +1,95 @@
1
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
- import { useMemo as R } from "react";
3
- import { cn as i } from "../../utils/cn.js";
4
- import { SPARKLINE as t } from "./Sparkline.const.js";
5
- import { calculateSparklinePathData as T } from "./Sparkline.utils.js";
6
- const u = (p) => {
1
+ import { jsx as t, jsxs as f, Fragment as g } from "react/jsx-runtime";
2
+ import { cn as l } from "../../utils/cn.js";
3
+ import "react";
4
+ import { SPARKLINE as e, SPARKLINE_VARIANT_LINE as y, SPARKLINE_VARIANT_BARS as P, SPARKLINE_VARIANT_AREA as u } from "./Sparkline.const.js";
5
+ import { calculateSparklinePathData as v, calculateSparklineBars as w, calculateSparklinePoints as C } from "./Sparkline.utils.js";
6
+ const B = (h) => {
7
7
  const {
8
- data: s,
9
- width: m = t.DEFAULT_WIDTH,
10
- height: d = t.DEFAULT_HEIGHT,
11
- color: o = t.DEFAULT_COLOR,
12
- fill: I = !1,
13
- strokeWidth: h = t.DEFAULT_STROKE_WIDTH,
14
- showExtremes: l = !1,
15
- animated: n = !0,
16
- className: A,
17
- ...D
18
- } = p, { path: O, areaPath: x, minPoint: r, maxPoint: a } = R(
19
- () => T(s),
20
- [s]
21
- ), c = `sparkline-gradient-${o.replace("#", "")}`;
22
- return /* @__PURE__ */ e(
8
+ data: o,
9
+ width: m = e.DEFAULT_WIDTH,
10
+ height: R = e.DEFAULT_HEIGHT,
11
+ color: a = e.DEFAULT_COLOR,
12
+ fill: N = !1,
13
+ strokeWidth: _ = e.DEFAULT_STROKE_WIDTH,
14
+ showExtremes: p = !1,
15
+ animated: s = !0,
16
+ variant: A = y,
17
+ showLastPoint: E = !1,
18
+ className: T,
19
+ ...x
20
+ } = h, L = N || A === u, { path: k, areaPath: D, minPoint: n, maxPoint: r } = v(o), O = w(o), d = C(o), c = d[d.length - 1], I = `sparkline-gradient-${a.replace("#", "")}`;
21
+ return /* @__PURE__ */ t(
23
22
  "div",
24
23
  {
25
- className: i("inline-block", A),
26
- style: { width: m, height: d },
27
- ...D,
24
+ className: l("inline-block", T),
25
+ style: { width: m, height: R },
26
+ ...x,
28
27
  children: /* @__PURE__ */ f("svg", { viewBox: "0 0 100 100", preserveAspectRatio: "none", className: "w-full h-full", children: [
29
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ f("linearGradient", { id: c, x1: "0%", y1: "0%", x2: "0%", y2: "100%", children: [
30
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: o, stopOpacity: "0.4" }),
31
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: o, stopOpacity: "0" })
28
+ /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ f("linearGradient", { id: I, x1: "0%", y1: "0%", x2: "0%", y2: "100%", children: [
29
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: a, stopOpacity: "0.4" }),
30
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: a, stopOpacity: "0" })
32
31
  ] }) }),
33
- I && /* @__PURE__ */ e(
34
- "path",
32
+ A === P ? O.map((i, S) => /* @__PURE__ */ t(
33
+ "rect",
35
34
  {
36
- d: x,
37
- fill: `url(#${c})`,
38
- className: i(n && "animate-fade-in")
39
- }
40
- ),
41
- /* @__PURE__ */ e(
42
- "path",
35
+ x: i.x,
36
+ y: i.y,
37
+ width: i.width,
38
+ height: i.height,
39
+ fill: a,
40
+ className: l(s && "animate-grow-up")
41
+ },
42
+ S
43
+ )) : /* @__PURE__ */ f(g, { children: [
44
+ L && /* @__PURE__ */ t(
45
+ "path",
46
+ {
47
+ d: D,
48
+ fill: `url(#${I})`,
49
+ className: l(s && "animate-fade-in")
50
+ }
51
+ ),
52
+ /* @__PURE__ */ t(
53
+ "path",
54
+ {
55
+ d: k,
56
+ fill: "none",
57
+ stroke: a,
58
+ strokeWidth: _,
59
+ strokeLinecap: "round",
60
+ strokeLinejoin: "round",
61
+ vectorEffect: "non-scaling-stroke",
62
+ className: l(s && "animate-draw-line")
63
+ }
64
+ )
65
+ ] }),
66
+ p && n && /* @__PURE__ */ t(
67
+ "circle",
43
68
  {
44
- d: O,
45
- fill: "none",
46
- stroke: o,
47
- strokeWidth: h,
48
- strokeLinecap: "round",
49
- strokeLinejoin: "round",
50
- vectorEffect: "non-scaling-stroke",
51
- className: i(n && "animate-draw-line")
69
+ cx: n.x,
70
+ cy: n.y,
71
+ r: e.INDICATOR_RADIUS,
72
+ fill: e.MIN_INDICATOR_COLOR,
73
+ vectorEffect: "non-scaling-stroke"
52
74
  }
53
75
  ),
54
- l && r && /* @__PURE__ */ e(
76
+ p && r && /* @__PURE__ */ t(
55
77
  "circle",
56
78
  {
57
79
  cx: r.x,
58
80
  cy: r.y,
59
- r: t.INDICATOR_RADIUS,
60
- fill: t.MIN_INDICATOR_COLOR,
81
+ r: e.INDICATOR_RADIUS,
82
+ fill: e.MAX_INDICATOR_COLOR,
61
83
  vectorEffect: "non-scaling-stroke"
62
84
  }
63
85
  ),
64
- l && a && /* @__PURE__ */ e(
86
+ E && c && /* @__PURE__ */ t(
65
87
  "circle",
66
88
  {
67
- cx: a.x,
68
- cy: a.y,
69
- r: t.INDICATOR_RADIUS,
70
- fill: t.MAX_INDICATOR_COLOR,
89
+ cx: c.x,
90
+ cy: c.y,
91
+ r: e.LAST_POINT_RADIUS,
92
+ fill: a,
71
93
  vectorEffect: "non-scaling-stroke"
72
94
  }
73
95
  )
@@ -76,5 +98,5 @@ const u = (p) => {
76
98
  );
77
99
  };
78
100
  export {
79
- u as Sparkline
101
+ B as Sparkline
80
102
  };
@@ -18,4 +18,6 @@ export interface SparklineProps extends HTMLAttributes<HTMLDivElement> {
18
18
  showExtremes?: boolean;
19
19
  /** Animate on render */
20
20
  animated?: boolean;
21
+ variant?: 'line' | 'area' | 'bars';
22
+ showLastPoint?: boolean;
21
23
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./Sparkline.const.cjs"),I=n=>{if(n.length===0)return[];const a=Math.max(...n),e=Math.min(...n),c=a-e||1;return n.map((t,l)=>({x:l/(n.length-1||1)*r.SPARKLINE.VIEWBOX_SIZE,y:r.SPARKLINE.VIEWBOX_SIZE-(t-e)/c*r.SPARKLINE.Y_RANGE-r.SPARKLINE.Y_PADDING,value:t}))},S=n=>n.length===0?"":n.reduce((a,e,c)=>{if(c===0)return`M ${e.x},${e.y}`;const t=n[c-1],l=t.x+(e.x-t.x)/r.SPARKLINE.CONTROL_POINT_FACTOR,P=e.x-(e.x-t.x)/r.SPARKLINE.CONTROL_POINT_FACTOR;return`${a} C ${l},${t.y} ${P},${e.y} ${e.x},${e.y}`},""),s=n=>n?`${n} L ${r.SPARKLINE.VIEWBOX_SIZE},${r.SPARKLINE.VIEWBOX_SIZE} L 0,${r.SPARKLINE.VIEWBOX_SIZE} Z`:"",x=n=>{if(n.length===0)return{path:"",areaPath:"",minPoint:null,maxPoint:null};const a=I(n),e=Math.max(...n),c=Math.min(...n),t=n.indexOf(c),l=n.indexOf(e),P=S(a),u=s(P);return{path:P,areaPath:u,minPoint:a[t]||null,maxPoint:a[l]||null}};exports.calculateSparklinePathData=x;exports.calculateSparklinePoints=I;exports.generateAreaPath=s;exports.generateSparklinePath=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Sparkline.const.cjs"),S=n=>{if(n.length===0)return[];const c=Math.max(...n),t=Math.min(...n),a=c-t||1;return n.map((r,l)=>({x:l/(n.length-1||1)*e.SPARKLINE.VIEWBOX_SIZE,y:e.SPARKLINE.VIEWBOX_SIZE-(r-t)/a*e.SPARKLINE.Y_RANGE-e.SPARKLINE.Y_PADDING,value:r}))},o=n=>n.length===0?"":n.reduce((c,t,a)=>{if(a===0)return`M ${t.x},${t.y}`;const r=n[a-1],l=r.x+(t.x-r.x)/e.SPARKLINE.CONTROL_POINT_FACTOR,I=t.x-(t.x-r.x)/e.SPARKLINE.CONTROL_POINT_FACTOR;return`${c} C ${l},${r.y} ${I},${t.y} ${t.x},${t.y}`},""),E=n=>n?`${n} L ${e.SPARKLINE.VIEWBOX_SIZE},${e.SPARKLINE.VIEWBOX_SIZE} L 0,${e.SPARKLINE.VIEWBOX_SIZE} Z`:"",u=n=>{if(n.length===0)return{path:"",areaPath:"",minPoint:null,maxPoint:null};const c=S(n),t=Math.max(...n),a=Math.min(...n),r=n.indexOf(a),l=n.indexOf(t),I=o(c),s=E(I);return{path:I,areaPath:s,minPoint:c[r]||null,maxPoint:c[l]||null}},x=n=>{if(n.length===0)return[];const c=Math.max(...n),t=Math.min(...n),a=c-t||1,r=e.SPARKLINE.VIEWBOX_SIZE/n.length,l=r*e.SPARKLINE.BAR_GAP_RATIO,I=r-l;return n.map((s,i)=>{const P=(s-t)/a*e.SPARKLINE.Y_RANGE;return{x:i*r+l/2,y:e.SPARKLINE.VIEWBOX_SIZE-e.SPARKLINE.Y_PADDING-P,width:I,height:P}})};exports.calculateSparklineBars=x;exports.calculateSparklinePathData=u;exports.calculateSparklinePoints=S;exports.generateAreaPath=E;exports.generateSparklinePath=o;
@@ -9,19 +9,14 @@ export interface SparklinePathData {
9
9
  minPoint: SparklinePoint | null;
10
10
  maxPoint: SparklinePoint | null;
11
11
  }
12
- /**
13
- * Calculate points for sparkline from data array
14
- */
12
+ export interface SparklineBar {
13
+ x: number;
14
+ y: number;
15
+ width: number;
16
+ height: number;
17
+ }
15
18
  export declare const calculateSparklinePoints: (data: number[]) => SparklinePoint[];
16
- /**
17
- * Generate smooth bezier curve path from points
18
- */
19
19
  export declare const generateSparklinePath: (points: SparklinePoint[]) => string;
20
- /**
21
- * Generate area path for filled sparkline
22
- */
23
20
  export declare const generateAreaPath: (linePath: string) => string;
24
- /**
25
- * Calculate all sparkline path data from raw data
26
- */
27
21
  export declare const calculateSparklinePathData: (data: number[]) => SparklinePathData;
22
+ export declare const calculateSparklineBars: (data: number[]) => SparklineBar[];
@@ -1,30 +1,43 @@
1
- import { SPARKLINE as e } from "./Sparkline.const.js";
2
- const s = (n) => {
1
+ import { SPARKLINE as r } from "./Sparkline.const.js";
2
+ const h = (n) => {
3
3
  if (n.length === 0) return [];
4
- const c = Math.max(...n), t = Math.min(...n), x = c - t || 1;
5
- return n.map((r, l) => ({
6
- x: l / (n.length - 1 || 1) * e.VIEWBOX_SIZE,
7
- y: e.VIEWBOX_SIZE - (r - t) / x * e.Y_RANGE - e.Y_PADDING,
8
- value: r
4
+ const c = Math.max(...n), t = Math.min(...n), s = c - t || 1;
5
+ return n.map((e, o) => ({
6
+ x: o / (n.length - 1 || 1) * r.VIEWBOX_SIZE,
7
+ y: r.VIEWBOX_SIZE - (e - t) / s * r.Y_RANGE - r.Y_PADDING,
8
+ value: e
9
9
  }));
10
- }, a = (n) => n.length === 0 ? "" : n.reduce((c, t, x) => {
11
- if (x === 0) return `M ${t.x},${t.y}`;
12
- const r = n[x - 1], l = r.x + (t.x - r.x) / e.CONTROL_POINT_FACTOR, m = t.x - (t.x - r.x) / e.CONTROL_POINT_FACTOR;
13
- return `${c} C ${l},${r.y} ${m},${t.y} ${t.x},${t.y}`;
14
- }, ""), u = (n) => n ? `${n} L ${e.VIEWBOX_SIZE},${e.VIEWBOX_SIZE} L 0,${e.VIEWBOX_SIZE} Z` : "", O = (n) => {
10
+ }, u = (n) => n.length === 0 ? "" : n.reduce((c, t, s) => {
11
+ if (s === 0) return `M ${t.x},${t.y}`;
12
+ const e = n[s - 1], o = e.x + (t.x - e.x) / r.CONTROL_POINT_FACTOR, x = t.x - (t.x - e.x) / r.CONTROL_POINT_FACTOR;
13
+ return `${c} C ${o},${e.y} ${x},${t.y} ${t.x},${t.y}`;
14
+ }, ""), a = (n) => n ? `${n} L ${r.VIEWBOX_SIZE},${r.VIEWBOX_SIZE} L 0,${r.VIEWBOX_SIZE} Z` : "", O = (n) => {
15
15
  if (n.length === 0)
16
16
  return { path: "", areaPath: "", minPoint: null, maxPoint: null };
17
- const c = s(n), t = Math.max(...n), x = Math.min(...n), r = n.indexOf(x), l = n.indexOf(t), m = a(c), o = u(m);
17
+ const c = h(n), t = Math.max(...n), s = Math.min(...n), e = n.indexOf(s), o = n.indexOf(t), x = u(c), l = a(x);
18
18
  return {
19
- path: m,
20
- areaPath: o,
21
- minPoint: c[r] || null,
22
- maxPoint: c[l] || null
19
+ path: x,
20
+ areaPath: l,
21
+ minPoint: c[e] || null,
22
+ maxPoint: c[o] || null
23
23
  };
24
+ }, E = (n) => {
25
+ if (n.length === 0) return [];
26
+ const c = Math.max(...n), t = Math.min(...n), s = c - t || 1, e = r.VIEWBOX_SIZE / n.length, o = e * r.BAR_GAP_RATIO, x = e - o;
27
+ return n.map((l, I) => {
28
+ const m = (l - t) / s * r.Y_RANGE;
29
+ return {
30
+ x: I * e + o / 2,
31
+ y: r.VIEWBOX_SIZE - r.Y_PADDING - m,
32
+ width: x,
33
+ height: m
34
+ };
35
+ });
24
36
  };
25
37
  export {
38
+ E as calculateSparklineBars,
26
39
  O as calculateSparklinePathData,
27
- s as calculateSparklinePoints,
28
- u as generateAreaPath,
29
- a as generateSparklinePath
40
+ h as calculateSparklinePoints,
41
+ a as generateAreaPath,
42
+ u as generateSparklinePath
30
43
  };
@@ -1,5 +1,5 @@
1
1
  export { Sparkline } from './Sparkline';
2
2
  export type { SparklineProps } from './Sparkline.types';
3
3
  export { SPARKLINE } from './Sparkline.const';
4
- export { calculateSparklinePoints, calculateSparklinePathData, generateSparklinePath, generateAreaPath, } from './Sparkline.utils';
5
- export type { SparklinePoint, SparklinePathData } from './Sparkline.utils';
4
+ export { calculateSparklinePoints, calculateSparklinePathData, generateSparklinePath, generateAreaPath, calculateSparklineBars, } from './Sparkline.utils';
5
+ export type { SparklinePoint, SparklinePathData, SparklineBar } from './Sparkline.utils';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react/jsx-runtime"),D=require("../../utils/cn.cjs");require("react");const o=require("../../utils/generateBearId.utils.cjs"),R=require("../../utils/useBearId.cjs"),e=require("./StatCard.const.cjs"),L=({title:_,value:a,color:s=e.DEFAULT_STAT_CARD_COLOR,icon:T,onClick:t,className:S,id:d,testId:n,...i})=>{const u=R.useBearId("StatCard"),C=o.resolveBearId(d,u),c=`linear-gradient(135deg, ${s}${e.STAT_CARD_GRADIENT_START_ALPHA}, ${s}${e.STAT_CARD_GRADIENT_END_ALPHA})`;return A.jsxs("div",{id:C,"data-testid":n,role:t?"button":void 0,tabIndex:t?0:void 0,className:D.cn(e.STAT_CARD_ROOT_CLASS,e.STAT_CARD_BASE_CLASSES,S),style:{background:c},onClick:t,onKeyDown:r=>{t&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),t())},...i,children:[A.jsx("div",{className:e.STAT_CARD_DECORATION_CLASS,"aria-hidden":!0}),A.jsxs("div",{className:e.STAT_CARD_BODY_CLASS,children:[A.jsx("p",{className:e.STAT_CARD_TITLE_CLASS,children:_}),A.jsx("p",{className:e.STAT_CARD_VALUE_CLASS,children:a}),t&&A.jsxs("button",{type:"button",className:e.STAT_CARD_ACTION_CLASS,children:[T,e.DEFAULT_STAT_CARD_ACTION_LABEL]})]})]})};exports.StatCard=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),y=require("../../utils/cn.cjs");require("react");const B=require("../../utils/generateBearId.utils.cjs"),g=require("../../utils/useBearId.cjs"),h=require("../Button/Button.cjs"),o=require("../Typography/Typography.cjs"),a=require("./StatCard.const.cjs"),m=require("./StatCard.utils.cjs"),p=n=>{const{title:d,value:i,color:s=a.DEFAULT_STAT_CARD_COLOR,icon:c,onClick:e,className:l,id:_,testId:u,...C}=n,A=g.useBearId("StatCard"),S=B.resolveBearId(_,A),T=`linear-gradient(135deg, ${s}${a.STAT_CARD_GRADIENT_START_ALPHA}, ${s}${a.STAT_CARD_GRADIENT_END_ALPHA})`;return t.jsxs("div",{id:S,"data-testid":u,role:e?"button":void 0,tabIndex:e?0:void 0,className:y.cn("Bear-StatCard",l),style:{background:T},onClick:e,onKeyDown:r=>m.handleStatCardKeyDown(r,e),...C,children:[t.jsx("div",{className:"Bear-StatCard__decoration","aria-hidden":!0}),t.jsxs("div",{className:"Bear-StatCard__body",children:[t.jsx(o.Typography,{className:"Bear-StatCard__title",children:d}),t.jsx(o.Typography,{className:"Bear-StatCard__value",children:i}),e&&t.jsx(h.Button,{type:"button",size:"sm",variant:"ghost",className:"Bear-StatCard__action",icon:c,onClick:r=>{r.stopPropagation(),e()},children:a.DEFAULT_STAT_CARD_ACTION_LABEL})]})]})};exports.StatCard=p;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Bear-StatCard",A="bear-relative bear-overflow-hidden bear-rounded-2xl bear-p-6 bear-transition-transform hover:bear-scale-105 bear-cursor-pointer bear-border bear-border-[var(--bear-border-default)]",r="Bear-StatCard__decoration bear-absolute bear-top-0 bear-right-0 bear-w-32 bear-h-32 -bear-mr-8 -bear-mt-8 bear-rounded-full bear-opacity-20 bear-bg-white",_="Bear-StatCard__body bear-relative bear-z-10",a="Bear-StatCard__title bear-text-white/80 bear-text-sm bear-font-medium bear-mb-1",t="Bear-StatCard__value bear-text-white bear-text-3xl bear-font-bold bear-mb-4",T="Bear-StatCard__action bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-1.5 bear-bg-white/20 hover:bear-bg-white/30 bear-rounded-full bear-text-white bear-text-sm bear-font-medium bear-transition-colors bear-border-0",S="#6366f1",b="dd",C="99",o="View All";exports.DEFAULT_STAT_CARD_ACTION_LABEL=o;exports.DEFAULT_STAT_CARD_COLOR=S;exports.STAT_CARD_ACTION_CLASS=T;exports.STAT_CARD_BASE_CLASSES=A;exports.STAT_CARD_BODY_CLASS=_;exports.STAT_CARD_DECORATION_CLASS=r;exports.STAT_CARD_GRADIENT_END_ALPHA=C;exports.STAT_CARD_GRADIENT_START_ALPHA=b;exports.STAT_CARD_ROOT_CLASS=e;exports.STAT_CARD_TITLE_CLASS=a;exports.STAT_CARD_VALUE_CLASS=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A="#6366f1",T="dd",_="99",D="View All";exports.DEFAULT_STAT_CARD_ACTION_LABEL=D;exports.DEFAULT_STAT_CARD_COLOR=A;exports.STAT_CARD_GRADIENT_END_ALPHA=_;exports.STAT_CARD_GRADIENT_START_ALPHA=T;
@@ -1,10 +1,3 @@
1
- export declare const STAT_CARD_ROOT_CLASS = "Bear-StatCard";
2
- export declare const STAT_CARD_BASE_CLASSES = "bear-relative bear-overflow-hidden bear-rounded-2xl bear-p-6 bear-transition-transform hover:bear-scale-105 bear-cursor-pointer bear-border bear-border-[var(--bear-border-default)]";
3
- export declare const STAT_CARD_DECORATION_CLASS = "Bear-StatCard__decoration bear-absolute bear-top-0 bear-right-0 bear-w-32 bear-h-32 -bear-mr-8 -bear-mt-8 bear-rounded-full bear-opacity-20 bear-bg-white";
4
- export declare const STAT_CARD_BODY_CLASS = "Bear-StatCard__body bear-relative bear-z-10";
5
- export declare const STAT_CARD_TITLE_CLASS = "Bear-StatCard__title bear-text-white/80 bear-text-sm bear-font-medium bear-mb-1";
6
- export declare const STAT_CARD_VALUE_CLASS = "Bear-StatCard__value bear-text-white bear-text-3xl bear-font-bold bear-mb-4";
7
- export declare const STAT_CARD_ACTION_CLASS = "Bear-StatCard__action bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-1.5 bear-bg-white/20 hover:bear-bg-white/30 bear-rounded-full bear-text-white bear-text-sm bear-font-medium bear-transition-colors bear-border-0";
8
1
  export declare const DEFAULT_STAT_CARD_COLOR = "#6366f1";
9
2
  export declare const STAT_CARD_GRADIENT_START_ALPHA = "dd";
10
3
  export declare const STAT_CARD_GRADIENT_END_ALPHA = "99";
@@ -1,14 +1,7 @@
1
- const e = "Bear-StatCard", r = "bear-relative bear-overflow-hidden bear-rounded-2xl bear-p-6 bear-transition-transform hover:bear-scale-105 bear-cursor-pointer bear-border bear-border-[var(--bear-border-default)]", a = "Bear-StatCard__decoration bear-absolute bear-top-0 bear-right-0 bear-w-32 bear-h-32 -bear-mr-8 -bear-mt-8 bear-rounded-full bear-opacity-20 bear-bg-white", t = "Bear-StatCard__body bear-relative bear-z-10", b = "Bear-StatCard__title bear-text-white/80 bear-text-sm bear-font-medium bear-mb-1", _ = "Bear-StatCard__value bear-text-white bear-text-3xl bear-font-bold bear-mb-4", A = "Bear-StatCard__action bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-1.5 bear-bg-white/20 hover:bear-bg-white/30 bear-rounded-full bear-text-white bear-text-sm bear-font-medium bear-transition-colors bear-border-0", o = "#6366f1", S = "dd", T = "99", C = "View All";
1
+ const A = "#6366f1", T = "dd", _ = "99", D = "View All";
2
2
  export {
3
- C as DEFAULT_STAT_CARD_ACTION_LABEL,
4
- o as DEFAULT_STAT_CARD_COLOR,
5
- A as STAT_CARD_ACTION_CLASS,
6
- r as STAT_CARD_BASE_CLASSES,
7
- t as STAT_CARD_BODY_CLASS,
8
- a as STAT_CARD_DECORATION_CLASS,
9
- T as STAT_CARD_GRADIENT_END_ALPHA,
10
- S as STAT_CARD_GRADIENT_START_ALPHA,
11
- e as STAT_CARD_ROOT_CLASS,
12
- b as STAT_CARD_TITLE_CLASS,
13
- _ as STAT_CARD_VALUE_CLASS
3
+ D as DEFAULT_STAT_CARD_ACTION_LABEL,
4
+ A as DEFAULT_STAT_CARD_COLOR,
5
+ _ as STAT_CARD_GRADIENT_END_ALPHA,
6
+ T as STAT_CARD_GRADIENT_START_ALPHA
14
7
  };
@@ -1,3 +1,2 @@
1
- import { FC } from 'react';
2
1
  import { StatCardProps } from './StatCard.types';
3
- export declare const StatCard: FC<StatCardProps>;
2
+ export declare const StatCard: (props: StatCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,49 +1,60 @@
1
- import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { cn as n } from "../../utils/cn.js";
1
+ import { jsxs as e, jsx as a } from "react/jsx-runtime";
2
+ import { cn as S } from "../../utils/cn.js";
3
3
  import "react";
4
- import { resolveBearId as R } from "../../utils/generateBearId.utils.js";
5
- import { useBearId as L } from "../../utils/useBearId.js";
6
- import { DEFAULT_STAT_CARD_COLOR as E, STAT_CARD_GRADIENT_START_ALPHA as N, STAT_CARD_GRADIENT_END_ALPHA as c, STAT_CARD_DECORATION_CLASS as p, STAT_CARD_BODY_CLASS as I, STAT_CARD_TITLE_CLASS as l, STAT_CARD_VALUE_CLASS as u, DEFAULT_STAT_CARD_ACTION_LABEL as O, STAT_CARD_ACTION_CLASS as f, STAT_CARD_BASE_CLASSES as h, STAT_CARD_ROOT_CLASS as b } from "./StatCard.const.js";
7
- const U = ({
8
- title: t,
9
- value: S,
10
- color: T = E,
11
- icon: a,
12
- onClick: A,
13
- className: d,
14
- id: s,
15
- testId: o,
16
- ...D
17
- }) => {
18
- const i = L("StatCard"), C = R(s, i), m = `linear-gradient(135deg, ${T}${N}, ${T}${c})`;
4
+ import { resolveBearId as D } from "../../utils/generateBearId.utils.js";
5
+ import { useBearId as N } from "../../utils/useBearId.js";
6
+ import { Button as h } from "../Button/Button.js";
7
+ import { Typography as d } from "../Typography/Typography.js";
8
+ import { DEFAULT_STAT_CARD_COLOR as B, STAT_CARD_GRADIENT_START_ALPHA as u, STAT_CARD_GRADIENT_END_ALPHA as v, DEFAULT_STAT_CARD_ACTION_LABEL as I } from "./StatCard.const.js";
9
+ import { handleStatCardKeyDown as f } from "./StatCard.utils.js";
10
+ const k = (i) => {
11
+ const {
12
+ title: n,
13
+ value: s,
14
+ color: o = B,
15
+ icon: m,
16
+ onClick: t,
17
+ className: c,
18
+ id: l,
19
+ testId: _,
20
+ ...A
21
+ } = i, C = N("StatCard"), p = D(l, C), T = `linear-gradient(135deg, ${o}${u}, ${o}${v})`;
19
22
  return /* @__PURE__ */ e(
20
23
  "div",
21
24
  {
22
- id: C,
23
- "data-testid": o,
24
- role: A ? "button" : void 0,
25
- tabIndex: A ? 0 : void 0,
26
- className: n(b, h, d),
27
- style: { background: m },
28
- onClick: A,
29
- onKeyDown: (_) => {
30
- A && (_.key === "Enter" || _.key === " ") && (_.preventDefault(), A());
31
- },
32
- ...D,
25
+ id: p,
26
+ "data-testid": _,
27
+ role: t ? "button" : void 0,
28
+ tabIndex: t ? 0 : void 0,
29
+ className: S("Bear-StatCard", c),
30
+ style: { background: T },
31
+ onClick: t,
32
+ onKeyDown: (r) => f(r, t),
33
+ ...A,
33
34
  children: [
34
- /* @__PURE__ */ r("div", { className: p, "aria-hidden": !0 }),
35
- /* @__PURE__ */ e("div", { className: I, children: [
36
- /* @__PURE__ */ r("p", { className: l, children: t }),
37
- /* @__PURE__ */ r("p", { className: u, children: S }),
38
- A && /* @__PURE__ */ e("button", { type: "button", className: f, children: [
39
- a,
40
- O
41
- ] })
35
+ /* @__PURE__ */ a("div", { className: "Bear-StatCard__decoration", "aria-hidden": !0 }),
36
+ /* @__PURE__ */ e("div", { className: "Bear-StatCard__body", children: [
37
+ /* @__PURE__ */ a(d, { className: "Bear-StatCard__title", children: n }),
38
+ /* @__PURE__ */ a(d, { className: "Bear-StatCard__value", children: s }),
39
+ t && /* @__PURE__ */ a(
40
+ h,
41
+ {
42
+ type: "button",
43
+ size: "sm",
44
+ variant: "ghost",
45
+ className: "Bear-StatCard__action",
46
+ icon: m,
47
+ onClick: (r) => {
48
+ r.stopPropagation(), t();
49
+ },
50
+ children: I
51
+ }
52
+ )
42
53
  ] })
43
54
  ]
44
55
  }
45
56
  );
46
57
  };
47
58
  export {
48
- U as StatCard
59
+ k as StatCard
49
60
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/keys.const.cjs"),a=(e,t)=>{t&&(e.key!==r.KEY_ENTER&&e.key!==r.KEY_SPACE||(e.preventDefault(),t()))};exports.handleStatCardKeyDown=a;
@@ -0,0 +1,2 @@
1
+ import { KeyboardEvent } from 'react';
2
+ export declare const handleStatCardKeyDown: (event: KeyboardEvent<HTMLDivElement>, onClick?: () => void) => void;
@@ -0,0 +1,7 @@
1
+ import { KEY_ENTER as e, KEY_SPACE as E } from "../../constants/keys.const.js";
2
+ const f = (r, t) => {
3
+ t && (r.key !== e && r.key !== E || (r.preventDefault(), t()));
4
+ };
5
+ export {
6
+ f as handleStatCardKeyDown
7
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),H=require("../../context/BearProvider.cjs"),ee=require("../../utils/maxVisible.utils.cjs"),E=require("../../utils/cn.cjs"),F=require("../Typography/Typography.cjs"),ne=require("../Dropdown/Dropdown.cjs"),re=require("../Icon/index.cjs"),e=require("./Stepper.const.cjs"),L=require("./Stepper.utils.cjs"),te=1200,se=16,oe=640,U=3,ie=()=>r.jsx("svg",{width:e.CHECK_ICON_SIZE,height:e.CHECK_ICON_SIZE,viewBox:e.CHECK_ICON_VIEWBOX,fill:"none",stroke:"currentColor",strokeWidth:"3",children:r.jsx("polyline",{points:e.CHECK_ICON_POINTS})}),Ee=()=>r.jsxs("svg",{width:e.ERROR_ICON_SIZE,height:e.ERROR_ICON_SIZE,viewBox:e.ERROR_ICON_VIEWBOX,fill:"none",stroke:"currentColor",strokeWidth:"3",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),V=T.forwardRef(({steps:o,activeStep:_,onStepClick:d,orientation:W=e.DEFAULT_ORIENTATION,size:u=e.DEFAULT_SIZE,showNumbers:M=e.DEFAULT_SHOW_NUMBERS,clickable:R=e.DEFAULT_CLICKABLE,showConnectors:q=e.DEFAULT_SHOW_CONNECTORS,connectorStyle:m=e.DEFAULT_CONNECTOR_STYLE,alternativeLabel:g=e.DEFAULT_ALTERNATIVE_LABEL,completedIcon:Z,errorIcon:z,labelTypographyProps:K,descriptionTypographyProps:X,maxVisibleSteps:N,testId:Y,className:$,...k},G)=>{const P=H.useBearThemeOptional(),{direction:f}=H.useBearDirectionOptional(),[A,J]=T.useState(()=>typeof window<"u"?window.innerWidth:te);T.useEffect(()=>{const n=()=>J(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const S=T.useMemo(()=>{if(N!=null)return ee.resolveMaxVisible(N,{width:A,theme:P});if(A<oe&&o.length>U)return U},[N,A,P,o.length]),a=W==="horizontal",v=e.STEP_INDICATOR_SIZES[u],j=e.STEP_LABEL_SIZES[u],C=a&&S!=null&&o.length>S,{visibleIndices:B,leftHidden:w,rightHidden:h}=T.useMemo(()=>{if(!C||S==null)return{visibleIndices:o.map((l,I)=>I),leftHidden:[],rightHidden:[]};const n=S,t=Math.floor(n/2),s=Math.max(0,Math.min(_-t,o.length-n)),i=Array.from({length:n},(l,I)=>s+I),c=[],p=[];for(let l=0;l<s;l++)c.push(l);for(let l=s+n;l<o.length;l++)p.push(l);return{visibleIndices:i,leftHidden:c,rightHidden:p}},[C,S,o,_]),b=(n,t,s)=>{const i=e.STEP_STATUS_CLASSES[s],c=L.resolveIndicatorContent(n,t,s,M,Z,z,r.jsx(ie,{}),r.jsx(Ee,{}));return r.jsx("div",{className:E.cn(e.STEP_INDICATOR_BASE,v,i.indicator,R&&!n.disabled&&e.STEP_CLICKABLE_CLASSES),onClick:()=>{R&&!n.disabled&&d&&d(t)},children:c})},O=(n,t)=>{if(!q||t)return null;const s=n<_;return a?r.jsx("div",{className:E.cn(e.CONNECTOR_HORIZONTAL_LAYOUT,s?e.CONNECTOR_STATUS.completed:e.CONNECTOR_STATUS.pending,m==="dashed"&&e.CONNECTOR_DASHED_CLASSES)}):r.jsx("div",{className:E.cn(e.CONNECTOR_BASE,e.CONNECTOR_VERTICAL,s?e.CONNECTOR_STATUS.completed:e.CONNECTOR_STATUS.pending,m==="dashed"&&e.CONNECTOR_DASHED_CLASSES)})},x=(n,t)=>{const s=e.STEP_STATUS_CLASSES[t],i={...K,...n.labelTypographyProps},c={...X,...n.descriptionTypographyProps};return r.jsxs(r.Fragment,{children:[r.jsx(F.Typography,{variant:"body2",...i,className:E.cn(e.STEP_LABEL_BASE,j.label,s.label,i==null?void 0:i.className),children:n.label}),n.description&&r.jsx(F.Typography,{variant:"caption",...c,className:E.cn(e.STEP_DESCRIPTION_CLASSES,j.description,c==null?void 0:c.className),children:n.description})]})},y=(n,t)=>{const s=L.resolveStepStatus(n,t,_);return r.jsxs("div",{className:E.cn(e.STEP_CONTENT_BASE,g?e.STEP_CONTENT_ALTERNATIVE:e.STEP_CONTENT_INLINE),children:[b(n,t,s),r.jsx("div",{className:E.cn(g?e.STEP_LABEL_ALTERNATIVE:e.STEP_LABEL_INLINE),children:x(n,s)})]})},Q=(n,t)=>{const s=L.resolveStepStatus(n,t,_);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:e.STEP_VERTICAL_INDICATOR_WRAP,children:b(n,t,s)}),r.jsxs("div",{className:e.STEP_VERTICAL_BODY,children:[x(n,s),n.content&&s==="active"&&r.jsx("div",{className:e.STEP_VERTICAL_CONTENT,children:n.content})]})]})},D=(n,t)=>r.jsx("div",{className:e.STEP_OVERFLOW_ROOT,children:r.jsx(ne.Dropdown,{placement:"bottom-start",closeOnSelect:!0,trigger:r.jsx("button",{type:"button",className:E.cn(e.STEP_INDICATOR_BASE,v,e.STEP_STATUS_CLASSES.pending.indicator,"bear-cursor-pointer bear-border-0"),"aria-label":t==="left"?e.OVERFLOW_LEFT_LABEL:e.OVERFLOW_RIGHT_LABEL,children:r.jsx(re.BearIcons.MoreHorizIcon,{size:se})}),items:n.map(s=>({key:`step-${s}`,label:o[s].label,disabled:o[s].disabled,onClick:()=>{o[s].disabled||d==null||d(s)}}))})},`overflow-${t}`);return r.jsxs("div",{ref:G,dir:f,className:E.cn(e.STEPPER_BASE_CLASSES,a?e.STEPPER_HORIZONTAL_CLASSES:e.STEPPER_VERTICAL_CLASSES,f==="rtl"&&a&&"bear-flex-row-reverse",$),"data-testid":Y,...k,children:[a&&!C&&o.map((n,t)=>r.jsxs(T.Fragment,{children:[y(n,t),O(t,t===o.length-1)]},t)),a&&C&&r.jsxs(r.Fragment,{children:[w.length>0&&r.jsxs(r.Fragment,{children:[D(w,"left"),O(-1,!1)]}),B.map((n,t)=>{const s=o[n],i=t===B.length-1&&h.length===0;return r.jsxs(T.Fragment,{children:[y(s,n),O(n,i)]},n)}),h.length>0&&D(h,"right")]}),!a&&o.map((n,t)=>r.jsxs("div",{className:E.cn("Bear-Stepper__step",e.STEP_WRAPPER_VERTICAL),children:[Q(n,t),O(t,t===o.length-1)]},t))]})});V.displayName="Stepper";exports.Stepper=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),H=require("../../context/BearProvider.cjs"),ee=require("../../utils/maxVisible.utils.cjs"),E=require("../../utils/cn.cjs"),F=require("../Typography/Typography.cjs"),ne=require("../Dropdown/Dropdown.cjs"),re=require("@forgedevstack/bear-icons"),e=require("./Stepper.const.cjs"),L=require("./Stepper.utils.cjs"),te=1200,se=16,oe=640,U=3,ie=()=>r.jsx("svg",{width:e.CHECK_ICON_SIZE,height:e.CHECK_ICON_SIZE,viewBox:e.CHECK_ICON_VIEWBOX,fill:"none",stroke:"currentColor",strokeWidth:"3",children:r.jsx("polyline",{points:e.CHECK_ICON_POINTS})}),Ee=()=>r.jsxs("svg",{width:e.ERROR_ICON_SIZE,height:e.ERROR_ICON_SIZE,viewBox:e.ERROR_ICON_VIEWBOX,fill:"none",stroke:"currentColor",strokeWidth:"3",children:[r.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),V=T.forwardRef(({steps:o,activeStep:_,onStepClick:S,orientation:W=e.DEFAULT_ORIENTATION,size:u=e.DEFAULT_SIZE,showNumbers:M=e.DEFAULT_SHOW_NUMBERS,clickable:R=e.DEFAULT_CLICKABLE,showConnectors:q=e.DEFAULT_SHOW_CONNECTORS,connectorStyle:m=e.DEFAULT_CONNECTOR_STYLE,alternativeLabel:g=e.DEFAULT_ALTERNATIVE_LABEL,completedIcon:Z,errorIcon:z,labelTypographyProps:K,descriptionTypographyProps:X,maxVisibleSteps:N,testId:Y,className:$,...k},G)=>{const P=H.useBearThemeOptional(),{direction:f}=H.useBearDirectionOptional(),[A,J]=T.useState(()=>typeof window<"u"?window.innerWidth:te);T.useEffect(()=>{const n=()=>J(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const d=T.useMemo(()=>{if(N!=null)return ee.resolveMaxVisible(N,{width:A,theme:P});if(A<oe&&o.length>U)return U},[N,A,P,o.length]),a=W==="horizontal",v=e.STEP_INDICATOR_SIZES[u],j=e.STEP_LABEL_SIZES[u],C=a&&d!=null&&o.length>d,{visibleIndices:B,leftHidden:b,rightHidden:h}=T.useMemo(()=>{if(!C||d==null)return{visibleIndices:o.map((l,I)=>I),leftHidden:[],rightHidden:[]};const n=d,t=Math.floor(n/2),s=Math.max(0,Math.min(_-t,o.length-n)),i=Array.from({length:n},(l,I)=>s+I),c=[],p=[];for(let l=0;l<s;l++)c.push(l);for(let l=s+n;l<o.length;l++)p.push(l);return{visibleIndices:i,leftHidden:c,rightHidden:p}},[C,d,o,_]),w=(n,t,s)=>{const i=e.STEP_STATUS_CLASSES[s],c=L.resolveIndicatorContent(n,t,s,M,Z,z,r.jsx(ie,{}),r.jsx(Ee,{}));return r.jsx("div",{className:E.cn(e.STEP_INDICATOR_BASE,v,i.indicator,R&&!n.disabled&&e.STEP_CLICKABLE_CLASSES),onClick:()=>{R&&!n.disabled&&S&&S(t)},children:c})},O=(n,t)=>{if(!q||t)return null;const s=n<_;return a?r.jsx("div",{className:E.cn(e.CONNECTOR_HORIZONTAL_LAYOUT,s?e.CONNECTOR_STATUS.completed:e.CONNECTOR_STATUS.pending,m==="dashed"&&e.CONNECTOR_DASHED_CLASSES)}):r.jsx("div",{className:E.cn(e.CONNECTOR_BASE,e.CONNECTOR_VERTICAL,s?e.CONNECTOR_STATUS.completed:e.CONNECTOR_STATUS.pending,m==="dashed"&&e.CONNECTOR_DASHED_CLASSES)})},x=(n,t)=>{const s=e.STEP_STATUS_CLASSES[t],i={...K,...n.labelTypographyProps},c={...X,...n.descriptionTypographyProps};return r.jsxs(r.Fragment,{children:[r.jsx(F.Typography,{variant:"body2",...i,className:E.cn(e.STEP_LABEL_BASE,j.label,s.label,i==null?void 0:i.className),children:n.label}),n.description&&r.jsx(F.Typography,{variant:"caption",...c,className:E.cn(e.STEP_DESCRIPTION_CLASSES,j.description,c==null?void 0:c.className),children:n.description})]})},y=(n,t)=>{const s=L.resolveStepStatus(n,t,_);return r.jsxs("div",{className:E.cn(e.STEP_CONTENT_BASE,g?e.STEP_CONTENT_ALTERNATIVE:e.STEP_CONTENT_INLINE),children:[w(n,t,s),r.jsx("div",{className:E.cn(g?e.STEP_LABEL_ALTERNATIVE:e.STEP_LABEL_INLINE),children:x(n,s)})]})},Q=(n,t)=>{const s=L.resolveStepStatus(n,t,_);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:e.STEP_VERTICAL_INDICATOR_WRAP,children:w(n,t,s)}),r.jsxs("div",{className:e.STEP_VERTICAL_BODY,children:[x(n,s),n.content&&s==="active"&&r.jsx("div",{className:e.STEP_VERTICAL_CONTENT,children:n.content})]})]})},D=(n,t)=>r.jsx("div",{className:e.STEP_OVERFLOW_ROOT,children:r.jsx(ne.Dropdown,{placement:"bottom-start",closeOnSelect:!0,trigger:r.jsx("button",{type:"button",className:E.cn(e.STEP_INDICATOR_BASE,v,e.STEP_STATUS_CLASSES.pending.indicator,"bear-cursor-pointer bear-border-0"),"aria-label":t==="left"?e.OVERFLOW_LEFT_LABEL:e.OVERFLOW_RIGHT_LABEL,children:r.jsx(re.BearIcons.MoreHorizIcon,{size:se})}),items:n.map(s=>({key:`step-${s}`,label:o[s].label,disabled:o[s].disabled,onClick:()=>{o[s].disabled||S==null||S(s)}}))})},`overflow-${t}`);return r.jsxs("div",{ref:G,dir:f,className:E.cn(e.STEPPER_BASE_CLASSES,a?e.STEPPER_HORIZONTAL_CLASSES:e.STEPPER_VERTICAL_CLASSES,f==="rtl"&&a&&"bear-flex-row-reverse",$),"data-testid":Y,...k,children:[a&&!C&&o.map((n,t)=>r.jsxs(T.Fragment,{children:[y(n,t),O(t,t===o.length-1)]},t)),a&&C&&r.jsxs(r.Fragment,{children:[b.length>0&&r.jsxs(r.Fragment,{children:[D(b,"left"),O(-1,!1)]}),B.map((n,t)=>{const s=o[n],i=t===B.length-1&&h.length===0;return r.jsxs(T.Fragment,{children:[y(s,n),O(n,i)]},n)}),h.length>0&&D(h,"right")]}),!a&&o.map((n,t)=>r.jsxs("div",{className:E.cn("Bear-Stepper__step",e.STEP_WRAPPER_VERTICAL),children:[Q(n,t),O(t,t===o.length-1)]},t))]})});V.displayName="Stepper";exports.Stepper=V;
@@ -5,7 +5,7 @@ import { resolveMaxVisible as de } from "../../utils/maxVisible.utils.js";
5
5
  import { cn as E } from "../../utils/cn.js";
6
6
  import { Typography as M } from "../Typography/Typography.js";
7
7
  import { Dropdown as _e } from "../Dropdown/Dropdown.js";
8
- import { BearIcons as Te } from "../Icon/index.js";
8
+ import { BearIcons as Te } from "@forgedevstack/bear-icons";
9
9
  import { STEP_WRAPPER_VERTICAL as he, STEPPER_HORIZONTAL_CLASSES as Ne, STEPPER_VERTICAL_CLASSES as Oe, STEPPER_BASE_CLASSES as Se, DEFAULT_ORIENTATION as Ce, DEFAULT_SIZE as Ie, DEFAULT_SHOW_NUMBERS as Ae, DEFAULT_CLICKABLE as Le, DEFAULT_SHOW_CONNECTORS as me, DEFAULT_CONNECTOR_STYLE as Re, DEFAULT_ALTERNATIVE_LABEL as fe, STEP_LABEL_ALTERNATIVE as ue, STEP_LABEL_INLINE as ge, STEP_CONTENT_ALTERNATIVE as Pe, STEP_CONTENT_INLINE as ve, STEP_CONTENT_BASE as Be, CONNECTOR_DASHED_CLASSES as Z, CONNECTOR_STATUS as S, CONNECTOR_HORIZONTAL_LAYOUT as we, CONNECTOR_VERTICAL as be, CONNECTOR_BASE as pe, STEP_OVERFLOW_ROOT as He, OVERFLOW_LEFT_LABEL as We, OVERFLOW_RIGHT_LABEL as De, STEP_STATUS_CLASSES as m, STEP_INDICATOR_SIZES as Ve, STEP_INDICATOR_BASE as z, STEP_VERTICAL_INDICATOR_WRAP as ye, STEP_VERTICAL_BODY as Fe, STEP_VERTICAL_CONTENT as Ue, STEP_CLICKABLE_CLASSES as Me, STEP_LABEL_SIZES as Ze, STEP_LABEL_BASE as ze, STEP_DESCRIPTION_CLASSES as Ke, ERROR_ICON_VIEWBOX as Xe, ERROR_ICON_SIZE as K, CHECK_ICON_VIEWBOX as Ye, CHECK_ICON_SIZE as X, CHECK_ICON_POINTS as je } from "./Stepper.const.js";
10
10
  import { resolveStepStatus as Y, resolveIndicatorContent as $e } from "./Stepper.utils.js";
11
11
  const ke = 1200, Ge = 16, qe = 640, j = 3, Je = () => /* @__PURE__ */ t("svg", { width: X, height: X, viewBox: Ye, fill: "none", stroke: "currentColor", strokeWidth: "3", children: /* @__PURE__ */ t("polyline", { points: je }) }), Qe = () => /* @__PURE__ */ i("svg", { width: K, height: K, viewBox: Xe, fill: "none", stroke: "currentColor", strokeWidth: "3", children: [
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../constants/generals.const.cjs"),N=require("../../utils/cn.cjs");require("react");const m=require("../../utils/generateBearId.utils.cjs"),I=require("../../utils/useBearId.cjs"),B=require("../../utils/liveRegion.utils.cjs"),n=require("../Box/Box.cjs"),i=require("../Typography/Typography.cjs"),s=require("./StreamingMessage.const.cjs"),p=o=>{const{id:c,testId:S,content:r,isStreaming:t=s.STREAMING_MESSAGE_DEFAULT_STREAMING,sender:g=s.STREAMING_MESSAGE_DEFAULT_SENDER,live:E=s.STREAMING_MESSAGE_DEFAULT_LIVE,translations:_,className:d}=o,l=I.useBearId(a.COMPONENT_NAME_STREAMING_MESSAGE),u=m.resolveBearId(c,l),M={...s.STREAMING_MESSAGE_DEFAULT_TRANSLATIONS,..._},A=E&&t?B.getBearLiveRegionProps("info"):{},T=typeof r=="string"?r:void 0;return e.jsxs(n.Box,{id:u,"data-testid":S,className:N.cn("Bear-StreamingMessage",`Bear-StreamingMessage--${g}`,d),...A,children:[e.jsxs(i.Typography,{variant:"body2",children:[r,t&&e.jsx(n.Box,{as:"span",className:"Bear-StreamingMessage__cursor","aria-hidden":a.BOOLEAN_FALSE})]}),t&&T&&e.jsx(i.Typography,{variant:"caption",className:"Bear-StreamingMessage__status",children:M.streamingLabel})]})};exports.StreamingMessage=p;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/generals.const.cjs"),S={streamingLabel:"Streaming"},A="assistant",_=E.BOOLEAN_FALSE,T=E.BOOLEAN_TRUE;exports.STREAMING_MESSAGE_DEFAULT_LIVE=T;exports.STREAMING_MESSAGE_DEFAULT_SENDER=A;exports.STREAMING_MESSAGE_DEFAULT_STREAMING=_;exports.STREAMING_MESSAGE_DEFAULT_TRANSLATIONS=S;
@@ -0,0 +1,5 @@
1
+ import { StreamingMessageSender, StreamingMessageTranslations } from './StreamingMessage.types';
2
+ export declare const STREAMING_MESSAGE_DEFAULT_TRANSLATIONS: StreamingMessageTranslations;
3
+ export declare const STREAMING_MESSAGE_DEFAULT_SENDER: StreamingMessageSender;
4
+ export declare const STREAMING_MESSAGE_DEFAULT_STREAMING = false;
5
+ export declare const STREAMING_MESSAGE_DEFAULT_LIVE = true;
@@ -0,0 +1,10 @@
1
+ import { BOOLEAN_FALSE as E, BOOLEAN_TRUE as A } from "../../constants/generals.const.js";
2
+ const _ = {
3
+ streamingLabel: "Streaming"
4
+ }, T = "assistant", t = E, L = A;
5
+ export {
6
+ L as STREAMING_MESSAGE_DEFAULT_LIVE,
7
+ T as STREAMING_MESSAGE_DEFAULT_SENDER,
8
+ t as STREAMING_MESSAGE_DEFAULT_STREAMING,
9
+ _ as STREAMING_MESSAGE_DEFAULT_TRANSLATIONS
10
+ };
@@ -0,0 +1,2 @@
1
+ import { StreamingMessageProps } from './StreamingMessage.types';
2
+ export declare const StreamingMessage: (props: StreamingMessageProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
+ import { COMPONENT_NAME_STREAMING_MESSAGE as N, BOOLEAN_FALSE as T } from "../../constants/generals.const.js";
3
+ import { cn as l } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as I } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as f } from "../../utils/useBearId.js";
7
+ import { getBearLiveRegionProps as G } from "../../utils/liveRegion.utils.js";
8
+ import { Box as a } from "../Box/Box.js";
9
+ import { Typography as o } from "../Typography/Typography.js";
10
+ import { STREAMING_MESSAGE_DEFAULT_STREAMING as L, STREAMING_MESSAGE_DEFAULT_SENDER as B, STREAMING_MESSAGE_DEFAULT_LIVE as R, STREAMING_MESSAGE_DEFAULT_TRANSLATIONS as v } from "./StreamingMessage.const.js";
11
+ const j = (i) => {
12
+ const {
13
+ id: n,
14
+ testId: m,
15
+ content: e,
16
+ isStreaming: r = L,
17
+ sender: E = B,
18
+ live: S = R,
19
+ translations: A,
20
+ className: _
21
+ } = i, c = f(N), d = I(n, c), p = { ...v, ...A }, M = S && r ? G("info") : {}, g = typeof e == "string" ? e : void 0;
22
+ return /* @__PURE__ */ t(
23
+ a,
24
+ {
25
+ id: d,
26
+ "data-testid": m,
27
+ className: l("Bear-StreamingMessage", `Bear-StreamingMessage--${E}`, _),
28
+ ...M,
29
+ children: [
30
+ /* @__PURE__ */ t(o, { variant: "body2", children: [
31
+ e,
32
+ r && /* @__PURE__ */ s(
33
+ a,
34
+ {
35
+ as: "span",
36
+ className: "Bear-StreamingMessage__cursor",
37
+ "aria-hidden": T
38
+ }
39
+ )
40
+ ] }),
41
+ r && g && /* @__PURE__ */ s(o, { variant: "caption", className: "Bear-StreamingMessage__status", children: p.streamingLabel })
42
+ ]
43
+ }
44
+ );
45
+ };
46
+ export {
47
+ j as StreamingMessage
48
+ };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ export type StreamingMessageSender = 'user' | 'assistant' | 'bot' | 'system';
3
+ export interface StreamingMessageTranslations {
4
+ streamingLabel: string;
5
+ }
6
+ export interface StreamingMessageProps {
7
+ id?: string;
8
+ testId?: string;
9
+ content: ReactNode;
10
+ isStreaming?: boolean;
11
+ sender?: StreamingMessageSender;
12
+ live?: boolean;
13
+ translations?: Partial<StreamingMessageTranslations>;
14
+ className?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ export { StreamingMessage } from './StreamingMessage';
2
+ export type { StreamingMessageProps, StreamingMessageSender, StreamingMessageTranslations, } from './StreamingMessage.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),C=require("../../utils/cn.cjs"),z=require("../../context/BearProvider.cjs"),B=require("../../utils/maxVisible.utils.cjs"),I=require("../Dropdown/Dropdown.cjs"),L=require("../Icon/index.cjs"),N=require("./Tabs.cjs");function S(n){var l;return o.isValidElement(n)&&typeof n.type!="string"&&((l=n.props)==null?void 0:l.id)!=null}const _=({children:n,maxVisibleTabs:l,wrap:i=!1,className:q})=>{const f=o.useContext(N.TabsContext);if(!f)throw new Error("TabList must be used within Tabs");const v=z.useBearThemeOptional(),[x,E]=o.useState(()=>typeof window<"u"?window.innerWidth:1200);o.useEffect(()=>{const e=()=>E(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const a=o.useMemo(()=>B.resolveMaxVisible(l,{width:x,theme:v}),[l,x,v]),{activeTab:b,setActiveTab:M,variant:s}=f,w=o.Children.toArray(n).filter(S),c=w.map(e=>({id:e.props.id,label:e.props.children,disabled:e.props.disabled})),d=b?[b,...c.map(e=>e.id).filter(e=>e!==b)]:c.map(e=>e.id),h=a??d.length,k=d.slice(0,h),u=d.slice(h),p=u.includes(b),y=C.cn("Bear-Tabs__list",`Bear-Tabs__list--${s}`,a!=null&&!i&&"bear-flex bear-w-full bear-min-w-0 bear-items-stretch",(!a||i)&&"bear-flex bear-gap-1",i&&"bear-flex-wrap",!i&&!a&&"bear-gap-1",s==="line"&&"bear-border-b",s==="pills"&&"bear-p-1 bear-rounded-lg",s==="enclosed"&&"bear-border-b",q),g={...s==="line"||s==="enclosed"?{borderColor:"var(--bear-border-default)"}:{},...s==="pills"?{backgroundColor:"var(--bear-bg-tertiary)"}:{}},T=t.jsx(t.Fragment,{children:a!=null?k.map(e=>{const r=w.find(m=>m.props.id===e);return r?o.cloneElement(r,{key:r.props.id}):null}):n}),j=a!=null&&u.length>0?t.jsx("div",{className:"bear-flex bear-h-full bear-flex-shrink-0 bear-items-stretch",children:t.jsx(I.Dropdown,{placement:"bottom-end",closeOnSelect:!0,trigger:t.jsx("button",{type:"button",role:"tab","aria-haspopup":"listbox","aria-label":"More tabs",className:C.cn("bear-flex bear-h-full bear-items-center bear-gap-2 bear-px-3 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors bear-border-0 bear-cursor-pointer",s==="pills"&&"bear-rounded-md",p&&"bear-shadow-sm",!p&&"hover:bear-bg-[var(--bear-bg-tertiary)] hover:bear-text-[var(--bear-text-primary)]"),style:p?{backgroundColor:"var(--bear-bg-primary)",color:"var(--bear-text-primary)"}:{color:"var(--bear-text-muted)"},children:t.jsx(L.BearIcons.MoreHorizIcon,{size:18})}),items:u.map(e=>{const r=c.find(m=>m.id===e);return{key:e,label:(r==null?void 0:r.label)??e,disabled:r==null?void 0:r.disabled,onClick:()=>M(e)}})})}):null;return a!=null&&!i?t.jsxs("div",{role:"tablist",className:y,style:g,children:[t.jsx("div",{className:"bear-flex bear-min-w-0 bear-flex-1 bear-items-center bear-gap-1 bear-overflow-x-auto bear-overflow-y-visible bear-flex-nowrap",children:T}),j]}):t.jsxs("div",{role:"tablist",className:y,style:g,children:[T,j]})};exports.TabList=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),C=require("../../utils/cn.cjs"),I=require("../../context/BearProvider.cjs"),z=require("../../utils/maxVisible.utils.cjs"),B=require("../Dropdown/Dropdown.cjs"),L=require("@forgedevstack/bear-icons"),N=require("./Tabs.cjs");function S(n){var l;return o.isValidElement(n)&&typeof n.type!="string"&&((l=n.props)==null?void 0:l.id)!=null}const _=({children:n,maxVisibleTabs:l,wrap:i=!1,className:q})=>{const f=o.useContext(N.TabsContext);if(!f)throw new Error("TabList must be used within Tabs");const v=I.useBearThemeOptional(),[x,E]=o.useState(()=>typeof window<"u"?window.innerWidth:1200);o.useEffect(()=>{const e=()=>E(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const a=o.useMemo(()=>z.resolveMaxVisible(l,{width:x,theme:v}),[l,x,v]),{activeTab:b,setActiveTab:M,variant:s}=f,w=o.Children.toArray(n).filter(S),c=w.map(e=>({id:e.props.id,label:e.props.children,disabled:e.props.disabled})),d=b?[b,...c.map(e=>e.id).filter(e=>e!==b)]:c.map(e=>e.id),h=a??d.length,k=d.slice(0,h),u=d.slice(h),p=u.includes(b),y=C.cn("Bear-Tabs__list",`Bear-Tabs__list--${s}`,a!=null&&!i&&"bear-flex bear-w-full bear-min-w-0 bear-items-stretch",(!a||i)&&"bear-flex bear-gap-1",i&&"bear-flex-wrap",!i&&!a&&"bear-gap-1",s==="line"&&"bear-border-b",s==="pills"&&"bear-p-1 bear-rounded-lg",s==="enclosed"&&"bear-border-b",q),g={...s==="line"||s==="enclosed"?{borderColor:"var(--bear-border-default)"}:{},...s==="pills"?{backgroundColor:"var(--bear-bg-tertiary)"}:{}},T=t.jsx(t.Fragment,{children:a!=null?k.map(e=>{const r=w.find(m=>m.props.id===e);return r?o.cloneElement(r,{key:r.props.id}):null}):n}),j=a!=null&&u.length>0?t.jsx("div",{className:"bear-flex bear-h-full bear-flex-shrink-0 bear-items-stretch",children:t.jsx(B.Dropdown,{placement:"bottom-end",closeOnSelect:!0,trigger:t.jsx("button",{type:"button",role:"tab","aria-haspopup":"listbox","aria-label":"More tabs",className:C.cn("bear-flex bear-h-full bear-items-center bear-gap-2 bear-px-3 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors bear-border-0 bear-cursor-pointer",s==="pills"&&"bear-rounded-md",p&&"bear-shadow-sm",!p&&"hover:bear-bg-[var(--bear-bg-tertiary)] hover:bear-text-[var(--bear-text-primary)]"),style:p?{backgroundColor:"var(--bear-bg-primary)",color:"var(--bear-text-primary)"}:{color:"var(--bear-text-muted)"},children:t.jsx(L.BearIcons.MoreHorizIcon,{size:18})}),items:u.map(e=>{const r=c.find(m=>m.id===e);return{key:e,label:(r==null?void 0:r.label)??e,disabled:r==null?void 0:r.disabled,onClick:()=>M(e)}})})}):null;return a!=null&&!i?t.jsxs("div",{role:"tablist",className:y,style:g,children:[t.jsx("div",{className:"bear-flex bear-min-w-0 bear-flex-1 bear-items-center bear-gap-1 bear-overflow-x-auto bear-overflow-y-visible bear-flex-nowrap",children:T}),j]}):t.jsxs("div",{role:"tablist",className:y,style:g,children:[T,j]})};exports.TabList=_;