@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
@@ -0,0 +1,12 @@
1
+ import { ChatMessage } from '../Chat/Chat.types';
2
+ export interface ChatBubbleProps {
3
+ id?: string;
4
+ testId?: string;
5
+ message: ChatMessage;
6
+ showTimestamp?: boolean;
7
+ showStatus?: boolean;
8
+ showAvatar?: boolean;
9
+ userAvatar?: string;
10
+ botAvatar?: string;
11
+ className?: string;
12
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ChatBubble.const.cjs"),r=e=>e==="user",o=e=>e==="system",i=(e,n,a)=>e.avatar?e.avatar:r(e.sender)?n:a,u=e=>e.name?e.name[0]:r(e.sender)?t.CHAT_BUBBLE_USER_INITIAL:t.CHAT_BUBBLE_BOT_INITIAL,B=e=>{if(e)return e.toLocaleTimeString([],{hour:t.CHAT_BUBBLE_TIME_DIGIT,minute:t.CHAT_BUBBLE_TIME_DIGIT})};exports.formatChatBubbleTime=B;exports.isChatSystemSender=o;exports.isChatUserSender=r;exports.resolveChatBubbleAvatar=i;exports.resolveChatBubbleInitial=u;
@@ -0,0 +1,6 @@
1
+ import { ChatMessage } from '../Chat/Chat.types';
2
+ export declare const isChatUserSender: (sender: ChatMessage["sender"]) => sender is "user";
3
+ export declare const isChatSystemSender: (sender: ChatMessage["sender"]) => sender is "system";
4
+ export declare const resolveChatBubbleAvatar: (message: ChatMessage, userAvatar?: string, botAvatar?: string) => string | undefined;
5
+ export declare const resolveChatBubbleInitial: (message: ChatMessage) => string;
6
+ export declare const formatChatBubbleTime: (timestamp?: Date) => string | undefined;
@@ -0,0 +1,15 @@
1
+ import { CHAT_BUBBLE_TIME_DIGIT as t, CHAT_BUBBLE_USER_INITIAL as a, CHAT_BUBBLE_BOT_INITIAL as B } from "./ChatBubble.const.js";
2
+ const e = (r) => r === "user", u = (r) => r === "system", I = (r, n, o) => r.avatar ? r.avatar : e(r.sender) ? n : o, T = (r) => r.name ? r.name[0] : e(r.sender) ? a : B, _ = (r) => {
3
+ if (r)
4
+ return r.toLocaleTimeString([], {
5
+ hour: t,
6
+ minute: t
7
+ });
8
+ };
9
+ export {
10
+ _ as formatChatBubbleTime,
11
+ u as isChatSystemSender,
12
+ e as isChatUserSender,
13
+ I as resolveChatBubbleAvatar,
14
+ T as resolveChatBubbleInitial
15
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../Flex/Flex.cjs"),u=require("../../Typography/Typography.cjs"),l=require("../../../utils/cn.cjs");require("react");const b=t=>{const{id:r,testId:s,message:a,className:n}=t;return e.jsx(c.Flex,{id:r,testId:s,className:l.cn("Bear-ChatBubble","Bear-ChatBubble--system",n),justify:"center",children:e.jsx(u.Typography,{variant:"caption",className:"Bear-ChatBubble__bubble",children:a.content})})};exports.ChatBubbleSystem=b;
@@ -0,0 +1,2 @@
1
+ import { ChatBubbleProps } from '../ChatBubble.types';
2
+ export declare const ChatBubbleSystem: (props: Pick<ChatBubbleProps, "id" | "testId" | "message" | "className">) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Flex as o } from "../../Flex/Flex.js";
3
+ import { Typography as b } from "../../Typography/Typography.js";
4
+ import { cn as c } from "../../../utils/cn.js";
5
+ import "react";
6
+ const u = (t) => {
7
+ const { id: r, testId: a, message: s, className: m } = t;
8
+ return /* @__PURE__ */ e(
9
+ o,
10
+ {
11
+ id: r,
12
+ testId: a,
13
+ className: c("Bear-ChatBubble", "Bear-ChatBubble--system", m),
14
+ justify: "center",
15
+ children: /* @__PURE__ */ e(b, { variant: "caption", className: "Bear-ChatBubble__bubble", children: s.content })
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ u as ChatBubbleSystem
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),_=require("../../Avatar/Avatar.cjs"),l=require("../../../utils/cn.cjs");require("react");require("../../Box/Box.cjs");const r=require("../../Flex/Flex.cjs"),t=require("../../Typography/Typography.cjs"),v=require("../ChatBubble.const.cjs"),s=require("../ChatBubble.utils.cjs"),y=o=>{const{domId:u,testId:c,message:e,showTimestamp:b,showStatus:h,showAvatar:d,userAvatar:m,botAvatar:B,className:p}=o,C=s.isChatUserSender(e.sender),n=s.formatChatBubbleTime(e.timestamp),i=e.status?v.CHAT_BUBBLE_STATUS_MARK[e.status]:void 0;return a.jsxs(r.Flex,{id:u,testId:c,className:l.cn("Bear-ChatBubble",`Bear-ChatBubble--${e.sender}`,p),align:"start",gap:2,children:[d&&a.jsx(_.Avatar,{src:s.resolveChatBubbleAvatar(e,m,B),initials:s.resolveChatBubbleInitial(e),size:"sm"}),a.jsxs(r.Flex,{className:"Bear-ChatBubble__body",direction:"column",gap:1,children:[e.name&&a.jsx(t.Typography,{variant:"caption",color:"muted",children:e.name}),a.jsx(t.Typography,{variant:"body2",className:"Bear-ChatBubble__bubble",children:e.content}),a.jsxs(r.Flex,{className:"Bear-ChatBubble__meta",align:"center",gap:1,children:[b&&n&&a.jsx(t.Typography,{variant:"caption",color:"muted",children:n}),h&&i&&C&&a.jsx(t.Typography,{variant:"caption",className:l.cn("Bear-ChatBubble__status",e.status&&`Bear-ChatBubble__status--${e.status}`),children:i})]})]})]})};exports.ChatBubbleThread=y;
@@ -0,0 +1,4 @@
1
+ import { ChatBubbleProps } from '../ChatBubble.types';
2
+ export declare const ChatBubbleThread: (props: ChatBubbleProps & {
3
+ domId: string;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,63 @@
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
+ import { Avatar as _ } from "../../Avatar/Avatar.js";
3
+ import { cn as m } from "../../../utils/cn.js";
4
+ import "react";
5
+ import "../../Box/Box.js";
6
+ import { Flex as s } from "../../Flex/Flex.js";
7
+ import { Typography as e } from "../../Typography/Typography.js";
8
+ import { CHAT_BUBBLE_STATUS_MARK as v } from "../ChatBubble.const.js";
9
+ import { isChatUserSender as f, formatChatBubbleTime as A, resolveChatBubbleInitial as g, resolveChatBubbleAvatar as T } from "../ChatBubble.utils.js";
10
+ const M = (l) => {
11
+ const {
12
+ domId: n,
13
+ testId: b,
14
+ message: a,
15
+ showTimestamp: c,
16
+ showStatus: u,
17
+ showAvatar: h,
18
+ userAvatar: d,
19
+ botAvatar: B,
20
+ className: p
21
+ } = l, C = f(a.sender), o = A(a.timestamp), i = a.status ? v[a.status] : void 0;
22
+ return /* @__PURE__ */ r(
23
+ s,
24
+ {
25
+ id: n,
26
+ testId: b,
27
+ className: m("Bear-ChatBubble", `Bear-ChatBubble--${a.sender}`, p),
28
+ align: "start",
29
+ gap: 2,
30
+ children: [
31
+ h && /* @__PURE__ */ t(
32
+ _,
33
+ {
34
+ src: T(a, d, B),
35
+ initials: g(a),
36
+ size: "sm"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ r(s, { className: "Bear-ChatBubble__body", direction: "column", gap: 1, children: [
40
+ a.name && /* @__PURE__ */ t(e, { variant: "caption", color: "muted", children: a.name }),
41
+ /* @__PURE__ */ t(e, { variant: "body2", className: "Bear-ChatBubble__bubble", children: a.content }),
42
+ /* @__PURE__ */ r(s, { className: "Bear-ChatBubble__meta", align: "center", gap: 1, children: [
43
+ c && o && /* @__PURE__ */ t(e, { variant: "caption", color: "muted", children: o }),
44
+ u && i && C && /* @__PURE__ */ t(
45
+ e,
46
+ {
47
+ variant: "caption",
48
+ className: m(
49
+ "Bear-ChatBubble__status",
50
+ a.status && `Bear-ChatBubble__status--${a.status}`
51
+ ),
52
+ children: i
53
+ }
54
+ )
55
+ ] })
56
+ ] })
57
+ ]
58
+ }
59
+ );
60
+ };
61
+ export {
62
+ M as ChatBubbleThread
63
+ };
@@ -0,0 +1,2 @@
1
+ export { ChatBubble } from './ChatBubble';
2
+ export type { ChatBubbleProps } from './ChatBubble.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../constants/generals.const.cjs"),p=require("../../utils/cn.cjs");require("react");const R=require("../../utils/generateBearId.utils.cjs"),x=require("../../utils/useBearId.cjs"),B=require("../../utils/liveRegion.utils.cjs"),T=require("../Box/Box.cjs"),_=require("../Button/Button.cjs"),E=require("../Flex/Flex.cjs"),o=require("../Typography/Typography.cjs"),v=require("./ChatError.const.cjs"),C=s=>{const{id:i,testId:a,title:c,children:r,onRetry:t,translations:l,className:u}=s,d=x.useBearId(y.COMPONENT_NAME_CHAT_ERROR),g=R.resolveBearId(i,d),n={...v.CHAT_ERROR_DEFAULT_TRANSLATIONS,...l},h=c??n.title,q=B.getBearLiveRegionProps("error");return e.jsx(T.Box,{id:g,"data-testid":a,className:p.cn("Bear-ChatError",u),...q,children:e.jsxs(E.Flex,{direction:"column",gap:2,align:"start",children:[e.jsx(o.Typography,{variant:"subtitle2",children:h}),r&&e.jsx(o.Typography,{variant:"body2",children:r}),t&&e.jsx(_.Button,{type:"button",variant:"outline",size:"sm",onClick:t,children:n.retryLabel})]})})};exports.ChatError=C;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/generals.const.cjs"),t={title:"Something went wrong",retryLabel:e.LABEL_RETRY};exports.CHAT_ERROR_DEFAULT_TRANSLATIONS=t;
@@ -0,0 +1,2 @@
1
+ import { ChatErrorTranslations } from './ChatError.types';
2
+ export declare const CHAT_ERROR_DEFAULT_TRANSLATIONS: ChatErrorTranslations;
@@ -0,0 +1,8 @@
1
+ import { LABEL_RETRY as t } from "../../constants/generals.const.js";
2
+ const o = {
3
+ title: "Something went wrong",
4
+ retryLabel: t
5
+ };
6
+ export {
7
+ o as CHAT_ERROR_DEFAULT_TRANSLATIONS
8
+ };
@@ -0,0 +1,2 @@
1
+ import { ChatErrorProps } from './ChatError.types';
2
+ export declare const ChatError: (props: ChatErrorProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { jsx as r, jsxs as R } from "react/jsx-runtime";
2
+ import { COMPONENT_NAME_CHAT_ERROR as g } from "../../constants/generals.const.js";
3
+ import { cn as u } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as E } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as N } from "../../utils/useBearId.js";
7
+ import { getBearLiveRegionProps as T } from "../../utils/liveRegion.utils.js";
8
+ import { Box as v } from "../Box/Box.js";
9
+ import { Button as y } from "../Button/Button.js";
10
+ import { Flex as A } from "../Flex/Flex.js";
11
+ import { Typography as i } from "../Typography/Typography.js";
12
+ import { CHAT_ERROR_DEFAULT_TRANSLATIONS as B } from "./ChatError.const.js";
13
+ const S = (n) => {
14
+ const { id: a, testId: m, title: s, children: t, onRetry: o, translations: l, className: d } = n, p = N(g), c = E(a, p), e = { ...B, ...l }, f = s ?? e.title, h = T("error");
15
+ return /* @__PURE__ */ r(
16
+ v,
17
+ {
18
+ id: c,
19
+ "data-testid": m,
20
+ className: u("Bear-ChatError", d),
21
+ ...h,
22
+ children: /* @__PURE__ */ R(A, { direction: "column", gap: 2, align: "start", children: [
23
+ /* @__PURE__ */ r(i, { variant: "subtitle2", children: f }),
24
+ t && /* @__PURE__ */ r(i, { variant: "body2", children: t }),
25
+ o && /* @__PURE__ */ r(y, { type: "button", variant: "outline", size: "sm", onClick: o, children: e.retryLabel })
26
+ ] })
27
+ }
28
+ );
29
+ };
30
+ export {
31
+ S as ChatError
32
+ };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ChatErrorTranslations {
3
+ title: string;
4
+ retryLabel: string;
5
+ }
6
+ export interface ChatErrorProps {
7
+ id?: string;
8
+ testId?: string;
9
+ title?: string;
10
+ children?: ReactNode;
11
+ onRetry?: () => void;
12
+ translations?: Partial<ChatErrorTranslations>;
13
+ className?: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ export { ChatError } from './ChatError';
2
+ export type { ChatErrorProps, ChatErrorTranslations } from './ChatError.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("../../constants/generals.const.cjs"),d=require("../../utils/cn.cjs");require("react");const l=require("../../utils/generateBearId.utils.cjs"),x=require("../../utils/useBearId.cjs"),m=require("../Box/Box.cjs"),p=require("../Flex/Flex.cjs"),q=require("../Typography/Typography.cjs"),I=require("./helpers/CitationListTitle.cjs"),T=r=>{const{id:i,testId:s,citations:n,className:o}=r,a=x.useBearId(u.COMPONENT_NAME_CITATION_LIST),c=l.resolveBearId(i,a);return t.jsx(p.Flex,{id:c,testId:s,className:d.cn("Bear-CitationList",o),direction:"column",gap:2,children:n.map(e=>t.jsxs(m.Box,{className:"Bear-CitationList__item",children:[t.jsx(I.CitationListTitle,{citation:e}),e.excerpt&&t.jsx(q.Typography,{variant:"caption",color:"muted",children:e.excerpt})]},e.id))})};exports.CitationList=T;
@@ -0,0 +1,2 @@
1
+ import { CitationListProps } from './CitationList.types';
2
+ export declare const CitationList: (props: CitationListProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
+ import { COMPONENT_NAME_CITATION_LIST as c } from "../../constants/generals.const.js";
3
+ import { cn as d } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as l } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as f } from "../../utils/useBearId.js";
7
+ import { Box as I } from "../Box/Box.js";
8
+ import { Flex as x } from "../Flex/Flex.js";
9
+ import { Typography as N } from "../Typography/Typography.js";
10
+ import { CitationListTitle as C } from "./helpers/CitationListTitle.js";
11
+ const y = (t) => {
12
+ const { id: i, testId: e, citations: m, className: s } = t, a = f(c), p = l(i, a);
13
+ return /* @__PURE__ */ o(
14
+ x,
15
+ {
16
+ id: p,
17
+ testId: e,
18
+ className: d("Bear-CitationList", s),
19
+ direction: "column",
20
+ gap: 2,
21
+ children: m.map((r) => /* @__PURE__ */ n(I, { className: "Bear-CitationList__item", children: [
22
+ /* @__PURE__ */ o(C, { citation: r }),
23
+ r.excerpt && /* @__PURE__ */ o(N, { variant: "caption", color: "muted", children: r.excerpt })
24
+ ] }, r.id))
25
+ }
26
+ );
27
+ };
28
+ export {
29
+ y as CitationList
30
+ };
@@ -0,0 +1,15 @@
1
+ export interface CitationItem {
2
+ id: string;
3
+ title: string;
4
+ href?: string;
5
+ excerpt?: string;
6
+ }
7
+ export interface CitationListProps {
8
+ id?: string;
9
+ testId?: string;
10
+ citations: CitationItem[];
11
+ className?: string;
12
+ }
13
+ export interface CitationListTitleProps {
14
+ citation: CitationItem;
15
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../Link/Link.cjs"),n=require("../../Typography/Typography.cjs"),o=i=>{const{citation:t}=i;return t.href?e.jsx(r.Link,{href:t.href,children:t.title}):e.jsx(n.Typography,{variant:"subtitle2",children:t.title})};exports.CitationListTitle=o;
@@ -0,0 +1,2 @@
1
+ import { CitationListTitleProps } from '../CitationList.types';
2
+ export declare const CitationListTitle: (props: CitationListTitleProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Link as e } from "../../Link/Link.js";
3
+ import { Typography as o } from "../../Typography/Typography.js";
4
+ const l = (i) => {
5
+ const { citation: t } = i;
6
+ return t.href ? /* @__PURE__ */ r(e, { href: t.href, children: t.title }) : /* @__PURE__ */ r(o, { variant: "subtitle2", children: t.title });
7
+ };
8
+ export {
9
+ l as CitationListTitle
10
+ };
@@ -0,0 +1 @@
1
+ export { CitationListTitle } from './CitationListTitle';
@@ -0,0 +1,2 @@
1
+ export { CitationList } from './CitationList';
2
+ export type { CitationItem, CitationListProps } from './CitationList.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("../../constants/numbers.const.cjs"),c=require("../../constants/generals.const.cjs"),B=require("../../utils/cn.cjs");require("react");const q=require("../../utils/generateBearId.utils.cjs"),b=require("../../utils/useBearId.cjs"),n=require("../Box/Box.cjs"),g=require("../Flex/Flex.cjs"),i=require("../Typography/Typography.cjs"),l=require("./ContextMeter.const.cjs"),u=require("./ContextMeter.utils.cjs"),m=x=>{const{id:d,testId:T,used:t,max:r=l.CONTEXT_METER_MAX_DEFAULT,translations:_,className:M}=x,C=b.useBearId(c.COMPONENT_NAME_CONTEXT_METER),s=q.resolveBearId(d,C),E={...l.CONTEXT_METER_DEFAULT_TRANSLATIONS,..._},a=u.resolveContextMeterPercent(t,r),N=u.resolveContextMeterTone(a),o=`${s}-label`;return e.jsxs(n.Box,{id:s,"data-testid":T,className:B.cn("Bear-ContextMeter",`Bear-ContextMeter--${N}`,M),style:{"--Bear-ContextMeter-percent":`${a}${c.PERCENT_UNIT}`},children:[e.jsxs(g.Flex,{justify:"between",align:"center",gap:2,children:[e.jsx(i.Typography,{id:o,variant:"caption",children:E.label}),e.jsxs(i.Typography,{variant:"caption",children:[t,"/",r]})]}),e.jsx(n.Box,{className:"Bear-ContextMeter__track",role:"progressbar","aria-labelledby":o,"aria-valuemin":p.ZERO,"aria-valuemax":r,"aria-valuenow":t,children:e.jsx(n.Box,{className:"Bear-ContextMeter__fill"})})]})};exports.ContextMeter=m;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../../constants/numbers.const.cjs"),T={label:"Context"},_=E.CONTEXT_METER_DEFAULT_MAX,N=E.SEVENTY_TWO,R=E.NINETY,C=E.ONE_HUNDRED;exports.CONTEXT_METER_DANGER_PERCENT=R;exports.CONTEXT_METER_DEFAULT_TRANSLATIONS=T;exports.CONTEXT_METER_MAX_DEFAULT=_;exports.CONTEXT_METER_PERCENT_CAP=C;exports.CONTEXT_METER_WARN_PERCENT=N;
@@ -0,0 +1,6 @@
1
+ import { ContextMeterTranslations } from './ContextMeter.types';
2
+ export declare const CONTEXT_METER_DEFAULT_TRANSLATIONS: ContextMeterTranslations;
3
+ export declare const CONTEXT_METER_MAX_DEFAULT = 100;
4
+ export declare const CONTEXT_METER_WARN_PERCENT = 72;
5
+ export declare const CONTEXT_METER_DANGER_PERCENT = 90;
6
+ export declare const CONTEXT_METER_PERCENT_CAP = 100;
@@ -0,0 +1,11 @@
1
+ import { CONTEXT_METER_DEFAULT_MAX as E, ONE_HUNDRED as T, NINETY as _, SEVENTY_TWO as N } from "../../constants/numbers.const.js";
2
+ const C = {
3
+ label: "Context"
4
+ }, A = E, o = N, t = _, O = T;
5
+ export {
6
+ t as CONTEXT_METER_DANGER_PERCENT,
7
+ C as CONTEXT_METER_DEFAULT_TRANSLATIONS,
8
+ A as CONTEXT_METER_MAX_DEFAULT,
9
+ O as CONTEXT_METER_PERCENT_CAP,
10
+ o as CONTEXT_METER_WARN_PERCENT
11
+ };
@@ -0,0 +1,2 @@
1
+ import { ContextMeterProps } from './ContextMeter.types';
2
+ export declare const ContextMeter: (props: ContextMeterProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
+ import { ZERO as N } from "../../constants/numbers.const.js";
3
+ import { COMPONENT_NAME_CONTEXT_METER as _, PERCENT_UNIT as f } from "../../constants/generals.const.js";
4
+ import { cn as C } from "../../utils/cn.js";
5
+ import "react";
6
+ import { resolveBearId as b } from "../../utils/generateBearId.utils.js";
7
+ import { useBearId as v } from "../../utils/useBearId.js";
8
+ import { Box as a } from "../Box/Box.js";
9
+ import { Flex as B } from "../Flex/Flex.js";
10
+ import { Typography as s } from "../Typography/Typography.js";
11
+ import { CONTEXT_METER_MAX_DEFAULT as I, CONTEXT_METER_DEFAULT_TRANSLATIONS as u } from "./ContextMeter.const.js";
12
+ import { resolveContextMeterPercent as O, resolveContextMeterTone as h } from "./ContextMeter.utils.js";
13
+ const D = (m) => {
14
+ const { id: c, testId: p, used: e, max: r = I, translations: d, className: T } = m, E = v(_), n = b(c, E), x = { ...u, ...d }, i = O(e, r), M = h(i), l = `${n}-label`;
15
+ return /* @__PURE__ */ t(
16
+ a,
17
+ {
18
+ id: n,
19
+ "data-testid": p,
20
+ className: C("Bear-ContextMeter", `Bear-ContextMeter--${M}`, T),
21
+ style: { "--Bear-ContextMeter-percent": `${i}${f}` },
22
+ children: [
23
+ /* @__PURE__ */ t(B, { justify: "between", align: "center", gap: 2, children: [
24
+ /* @__PURE__ */ o(s, { id: l, variant: "caption", children: x.label }),
25
+ /* @__PURE__ */ t(s, { variant: "caption", children: [
26
+ e,
27
+ "/",
28
+ r
29
+ ] })
30
+ ] }),
31
+ /* @__PURE__ */ o(
32
+ a,
33
+ {
34
+ className: "Bear-ContextMeter__track",
35
+ role: "progressbar",
36
+ "aria-labelledby": l,
37
+ "aria-valuemin": N,
38
+ "aria-valuemax": r,
39
+ "aria-valuenow": e,
40
+ children: /* @__PURE__ */ o(a, { className: "Bear-ContextMeter__fill" })
41
+ }
42
+ )
43
+ ]
44
+ }
45
+ );
46
+ };
47
+ export {
48
+ D as ContextMeter
49
+ };
@@ -0,0 +1,11 @@
1
+ export interface ContextMeterTranslations {
2
+ label: string;
3
+ }
4
+ export interface ContextMeterProps {
5
+ id?: string;
6
+ testId?: string;
7
+ used: number;
8
+ max?: number;
9
+ translations?: Partial<ContextMeterTranslations>;
10
+ className?: string;
11
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../constants/numbers.const.cjs"),e=require("./ContextMeter.const.cjs"),o=(t,n)=>{if(n<=r.ZERO)return r.ZERO;const E=t/n*e.CONTEXT_METER_PERCENT_CAP;return E<r.ZERO?r.ZERO:E>e.CONTEXT_METER_PERCENT_CAP?e.CONTEXT_METER_PERCENT_CAP:E},T=t=>t>=e.CONTEXT_METER_DANGER_PERCENT?"danger":t>=e.CONTEXT_METER_WARN_PERCENT?"warn":"ok";exports.resolveContextMeterPercent=o;exports.resolveContextMeterTone=T;
@@ -0,0 +1,2 @@
1
+ export declare const resolveContextMeterPercent: (used: number, max: number) => number;
2
+ export declare const resolveContextMeterTone: (percent: number) => "danger" | "warn" | "ok";
@@ -0,0 +1,12 @@
1
+ import { ZERO as e } from "../../constants/numbers.const.js";
2
+ import { CONTEXT_METER_PERCENT_CAP as E, CONTEXT_METER_DANGER_PERCENT as o, CONTEXT_METER_WARN_PERCENT as T } from "./ContextMeter.const.js";
3
+ const _ = (r, n) => {
4
+ if (n <= e)
5
+ return e;
6
+ const t = r / n * E;
7
+ return t < e ? e : t > E ? E : t;
8
+ }, N = (r) => r >= o ? "danger" : r >= T ? "warn" : "ok";
9
+ export {
10
+ _ as resolveContextMeterPercent,
11
+ N as resolveContextMeterTone
12
+ };
@@ -0,0 +1,2 @@
1
+ export { ContextMeter } from './ContextMeter';
2
+ export type { ContextMeterProps, ContextMeterTranslations } from './ContextMeter.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),n=require("react"),U=require("../Input/Input.cjs"),B=require("../Icon/index.cjs"),l=require("./CurrencyInput.const.cjs"),c=require("./CurrencyInput.utils.cjs"),M=({value:p,onChange:u,currency:r=l.DEFAULT_CURRENCY,locale:s=l.DEFAULT_LOCALE,decimals:e=l.DEFAULT_DECIMALS,placeholder:S="0.00",size:f="md",disabled:A=!1,error:F,allowNegative:C=!1,max:o,min:a,testId:L,className:q,...x})=>{const[i,d]=n.useState(()=>c.formatCurrency(p,s,e)),[I,g]=n.useState(!1);n.useEffect(()=>{I||d(c.formatCurrency(p,s,e))},[p,s,e,I]);const D=n.useCallback(t=>{const j=t.target.value,m=C?/[^0-9.,-]/g:/[^0-9.,]/g;d(j.replace(m,""))},[C]),R=n.useCallback(()=>{g(!1);let t=c.parseCurrency(i);t!=null&&(o!=null&&t>o&&(t=o),a!=null&&t<a&&(t=a),t=parseFloat(t.toFixed(e))),u==null||u(t),d(c.formatCurrency(t,s,e))},[i,s,e,o,a,u]),E=typeof r=="string"?l.CURRENCY_SYMBOLS[r]??r:null,_=typeof r!="string"?r:y.jsx(B.BearIcons.DollarSignIcon,{size:f==="sm"?14:f==="lg"?20:16,className:"text-gray-400"}),b=E?y.jsx("span",{className:"text-gray-500 dark:text-gray-400 font-medium select-none",children:E}):_;return y.jsx(U.Input,{...x,size:f,disabled:A,error:F,placeholder:S,value:i,onChange:D,onFocus:()=>g(!0),onBlur:R,inputMode:"decimal",className:q,"data-testid":L,InputProps:{startAdornment:b}})};exports.CurrencyInput=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),n=require("react"),U=require("../Input/Input.cjs"),B=require("@forgedevstack/bear-icons"),c=require("./CurrencyInput.const.cjs"),l=require("./CurrencyInput.utils.cjs"),M=({value:p,onChange:u,currency:r=c.DEFAULT_CURRENCY,locale:s=c.DEFAULT_LOCALE,decimals:e=c.DEFAULT_DECIMALS,placeholder:S="0.00",size:f="md",disabled:A=!1,error:F,allowNegative:C=!1,max:o,min:a,testId:L,className:b,...q})=>{const[i,d]=n.useState(()=>l.formatCurrency(p,s,e)),[I,g]=n.useState(!1);n.useEffect(()=>{I||d(l.formatCurrency(p,s,e))},[p,s,e,I]);const D=n.useCallback(t=>{const m=t.target.value,x=C?/[^0-9.,-]/g:/[^0-9.,]/g;d(m.replace(x,""))},[C]),R=n.useCallback(()=>{g(!1);let t=l.parseCurrency(i);t!=null&&(o!=null&&t>o&&(t=o),a!=null&&t<a&&(t=a),t=parseFloat(t.toFixed(e))),u==null||u(t),d(l.formatCurrency(t,s,e))},[i,s,e,o,a,u]),E=typeof r=="string"?c.CURRENCY_SYMBOLS[r]??r:null,_=typeof r!="string"?r:y.jsx(B.BearIcons.DollarSignIcon,{size:f==="sm"?14:f==="lg"?20:16,className:"text-gray-400"}),j=E?y.jsx("span",{className:"text-gray-500 dark:text-gray-400 font-medium select-none",children:E}):_;return y.jsx(U.Input,{...q,size:f,disabled:A,error:F,placeholder:S,value:i,onChange:D,onFocus:()=>g(!0),onBlur:R,inputMode:"decimal",className:b,"data-testid":L,InputProps:{startAdornment:j}})};exports.CurrencyInput=M;
@@ -1,7 +1,7 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { useState as E, useEffect as M, useCallback as C } from "react";
3
3
  import { Input as N } from "../Input/Input.js";
4
- import { BearIcons as T } from "../Icon/index.js";
4
+ import { BearIcons as T } from "@forgedevstack/bear-icons";
5
5
  import { DEFAULT_LOCALE as Y, DEFAULT_DECIMALS as b, DEFAULT_CURRENCY as k, CURRENCY_SYMBOLS as O } from "./CurrencyInput.const.js";
6
6
  import { formatCurrency as m, parseCurrency as V } from "./CurrencyInput.utils.js";
7
7
  const J = ({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),M=require("../Calendar/Calendar.cjs"),U=require("../Icon/index.cjs"),X=require("../OverlayPortal/OverlayPortal.cjs"),A=require("../../utils/cn.cjs"),Z=require("../../hooks/useClickOutside.cjs"),G=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");require("../../context/BearProvider.cjs");const Y=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),J=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const Q=require("./DatePicker.utils.cjs"),e=require("./DatePicker.const.cjs"),ee=o=>{const{value:s,onChange:t,minDate:C,maxDate:T,disabled:c=!1,placeholder:f=e.DATEPICKER_DEFAULT_PLACEHOLDER,label:u,error:l,helperText:b,format:x=e.DATEPICKER_DEFAULT_FORMAT,clearable:S=!0,className:O,style:P,bis:m,showWeekNumbers:h=!1,disabledDates:I=[],highlightedDates:y=[],slots:k,weekdayLabels:p,firstDayOfWeek:L=e.DATEPICKER_DEFAULT_FIRST_DAY,size:w="md",variant:K="default",icon:N,testId:q}=o,{openEffect:j,closeEffect:v}=J.resolveOverlayEffects(o),[n,_]=a.useState(!1),[z,F]=a.useState(s??new Date),d=a.useRef(null),E=a.useRef(null),R=a.useRef(null),D=G.useBearStyles(m,P),{style:g,ready:$}=Y.useFixedAnchorPosition({anchorRef:E,open:n,estimatedHeightPx:e.DATEPICKER_DROPDOWN_HEIGHT_PX}),H=a.useCallback(()=>_(!1),[]);Z.useClickOutsideMultiple([d,R],H,{enabled:n});const V=a.useCallback(i=>{t==null||t(i),_(!1)},[t]),W=a.useCallback(()=>{t==null||t(null),_(!1)},[t]),B=a.useCallback(i=>{F(i)},[]);return r.jsxs("div",{ref:d,className:A.cn(e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS,"bear-relative",O),style:Object.keys(D).length?D:void 0,"data-testid":q,children:[u&&r.jsx("label",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__label bear-block bear-text-sm bear-font-medium bear-text-zinc-700 dark:bear-text-zinc-300 bear-mb-1.5`,children:u}),r.jsxs("button",{ref:E,type:"button",onClick:()=>!c&&_(!n),disabled:c,className:A.cn(`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__trigger bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-text-left bear-transition-colors`,e.DATEPICKER_SIZE_CLASSES[w],e.DATEPICKER_VARIANT_CLASSES[K],l?"bear-border-red-500":"focus:bear-border-primary-500",c&&"bear-opacity-50 bear-cursor-not-allowed",s?"bear-text-zinc-900 dark:bear-text-white":"bear-text-zinc-500"),children:[r.jsx("span",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__value`,children:s?Q.formatDate(s,x):f}),r.jsx("span",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__icon`,children:N??r.jsx(U.CalendarIcon,{className:"bear-w-5 bear-h-5 bear-text-zinc-400 bear-shrink-0"})})]}),l&&r.jsx("p",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__error bear-mt-1 bear-text-xs bear-text-red-400`,children:l}),b&&!l&&r.jsx("p",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__helper bear-mt-1 bear-text-xs bear-text-zinc-500`,children:b}),r.jsx(X.OverlayPortal,{open:n,ready:$,style:g,zIndex:e.DATEPICKER_DROPDOWN_Z_INDEX,openEffect:j,closeEffect:v,className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__dropdown`,panelRef:R,attributes:{[e.DATEPICKER_CALENDAR_ATTR]:""},children:r.jsx(M.Calendar,{viewDate:z,onViewChange:B,value:s??null,onSelect:V,minDate:C,maxDate:T,disabledDates:I,highlightedDates:y,slots:k,weekdayLabels:p,firstDayOfWeek:L,showWeekNumbers:h,clearable:S,onClear:W,showTodayButton:!0,onToday:()=>{t==null||t(new Date),_(!1)}})})]})};exports.DatePicker=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),M=require("../Calendar/Calendar.cjs"),U=require("@forgedevstack/bear-icons"),X=require("../OverlayPortal/OverlayPortal.cjs"),A=require("../../utils/cn.cjs"),Z=require("../../hooks/useClickOutside.cjs"),G=require("../../hooks/useBearStyles.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");require("../../context/BearProvider.cjs");const Y=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),J=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const Q=require("./DatePicker.utils.cjs"),e=require("./DatePicker.const.cjs"),ee=o=>{const{value:s,onChange:t,minDate:C,maxDate:T,disabled:c=!1,placeholder:f=e.DATEPICKER_DEFAULT_PLACEHOLDER,label:u,error:l,helperText:b,format:S=e.DATEPICKER_DEFAULT_FORMAT,clearable:x=!0,className:O,style:P,bis:m,showWeekNumbers:I=!1,disabledDates:h=[],highlightedDates:y=[],slots:k,weekdayLabels:p,firstDayOfWeek:L=e.DATEPICKER_DEFAULT_FIRST_DAY,size:w="md",variant:K="default",icon:N,testId:q}=o,{openEffect:j,closeEffect:v}=J.resolveOverlayEffects(o),[n,_]=a.useState(!1),[z,F]=a.useState(s??new Date),d=a.useRef(null),E=a.useRef(null),R=a.useRef(null),D=G.useBearStyles(m,P),{style:g,ready:$}=Y.useFixedAnchorPosition({anchorRef:E,open:n,estimatedHeightPx:e.DATEPICKER_DROPDOWN_HEIGHT_PX}),H=a.useCallback(()=>_(!1),[]);Z.useClickOutsideMultiple([d,R],H,{enabled:n});const V=a.useCallback(i=>{t==null||t(i),_(!1)},[t]),W=a.useCallback(()=>{t==null||t(null),_(!1)},[t]),B=a.useCallback(i=>{F(i)},[]);return r.jsxs("div",{ref:d,className:A.cn(e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS,"bear-relative",O),style:Object.keys(D).length?D:void 0,"data-testid":q,children:[u&&r.jsx("label",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__label bear-block bear-text-sm bear-font-medium bear-text-zinc-700 dark:bear-text-zinc-300 bear-mb-1.5`,children:u}),r.jsxs("button",{ref:E,type:"button",onClick:()=>!c&&_(!n),disabled:c,className:A.cn(`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__trigger bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-text-left bear-transition-colors`,e.DATEPICKER_SIZE_CLASSES[w],e.DATEPICKER_VARIANT_CLASSES[K],l?"bear-border-red-500":"focus:bear-border-primary-500",c&&"bear-opacity-50 bear-cursor-not-allowed",s?"bear-text-zinc-900 dark:bear-text-white":"bear-text-zinc-500"),children:[r.jsx("span",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__value`,children:s?Q.formatDate(s,S):f}),r.jsx("span",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__icon`,children:N??r.jsx(U.CalendarIcon,{className:"bear-w-5 bear-h-5 bear-text-zinc-400 bear-shrink-0"})})]}),l&&r.jsx("p",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__error bear-mt-1 bear-text-xs bear-text-red-400`,children:l}),b&&!l&&r.jsx("p",{className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__helper bear-mt-1 bear-text-xs bear-text-zinc-500`,children:b}),r.jsx(X.OverlayPortal,{open:n,ready:$,style:g,zIndex:e.DATEPICKER_DROPDOWN_Z_INDEX,openEffect:j,closeEffect:v,className:`${e.D_A_T_E_P_I_C_K_E_R_ROOT_CLASS}__dropdown`,panelRef:R,attributes:{[e.DATEPICKER_CALENDAR_ATTR]:""},children:r.jsx(M.Calendar,{viewDate:z,onViewChange:B,value:s??null,onSelect:V,minDate:C,maxDate:T,disabledDates:h,highlightedDates:y,slots:k,weekdayLabels:p,firstDayOfWeek:L,showWeekNumbers:I,clearable:x,onClear:W,showTodayButton:!0,onToday:()=>{t==null||t(new Date),_(!1)}})})]})};exports.DatePicker=ee;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as D, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as A, useRef as b, useCallback as n } from "react";
3
3
  import { Calendar as G } from "../Calendar/Calendar.js";
4
- import { CalendarIcon as Y } from "../Icon/index.js";
4
+ import { CalendarIcon as Y } from "@forgedevstack/bear-icons";
5
5
  import { OverlayPortal as q } from "../OverlayPortal/OverlayPortal.js";
6
6
  import { cn as R } from "../../utils/cn.js";
7
7
  import { useClickOutsideMultiple as J } from "../../hooks/useClickOutside.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),O=require("../../utils/cn.cjs"),ae=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const n=require("../../constants/numbers.const.cjs"),c=require("../../constants/generals.const.cjs"),te=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),se=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const ne=require("../Icon/index.cjs"),be=require("../OverlayPortal/OverlayPortal.cjs"),m=require("./DateRangePicker.const.cjs"),o=require("./DateRangePicker.utils.cjs"),q=({year:g,month:d,range:r,onDayClick:p,onNav:y,minDate:u,maxDate:N})=>{const E=o.getCalendarDays(g,d),h=new Date;return h.setHours(n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT),e.jsxs("div",{className:"bear-w-64",children:[e.jsxs("div",{className:"bear-flex bear-items-center bear-justify-between bear-mb-2",children:[e.jsx("button",{type:"button",onClick:()=>y(n.NEGATIVE_ONE),className:"bear-p-1 bear-rounded hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-text-gray-500 dark:bear-text-zinc-400","aria-label":"Previous month",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsxs("span",{className:"bear-text-sm bear-font-semibold bear-text-gray-900 dark:bear-text-white",children:[m.MONTH_LABELS[d]," ",g]}),e.jsx("button",{type:"button",onClick:()=>y(n.ONE),className:"bear-p-1 bear-rounded hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-text-gray-500 dark:bear-text-zinc-400","aria-label":"Next month",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),e.jsx("div",{className:"bear-grid bear-grid-cols-7 bear-gap-0.5 bear-mb-1",children:m.DAY_LABELS.map(t=>e.jsx("div",{className:"bear-text-xs bear-text-center bear-font-medium bear-text-gray-400 dark:bear-text-zinc-500 bear-py-1",children:t},t))}),e.jsx("div",{className:"bear-grid bear-grid-cols-7 bear-gap-0.5",children:E.map((t,j)=>{if(!t)return e.jsx("div",{},`e-${j}`);const f=u&&t<u||N&&t>N,l=o.isSameDay(t,r.start)||o.isSameDay(t,r.end),x=o.isInRange(t,r.start,r.end),T=o.isSameDay(t,h);return e.jsx("button",{type:"button",disabled:!!f,onClick:()=>p(t),className:O.cn("bear-w-8 bear-h-8 bear-text-sm bear-rounded-full bear-transition-colors bear-cursor-pointer",f?"bear-text-gray-300 dark:bear-text-zinc-600 bear-cursor-not-allowed":"hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700",l&&"bear-bg-primary-500 bear-text-white",!l&&x&&"bear-bg-primary-100 dark:bear-bg-primary-900/30 bear-text-primary-800 dark:bear-text-primary-200",!l&&!x&&T&&"bear-ring-1 bear-ring-primary-400",!l&&!x&&!f&&"bear-text-gray-700 dark:bear-text-zinc-300"),children:t.getDate()},t.getTime())})})]})},oe=g=>{const{value:d,onChange:r,label:p,placeholder:y=c.PLACEHOLDER_SELECT_DATE_RANGE,disabled:u=c.BOOLEAN_FALSE,clearable:N=c.BOOLEAN_TRUE,minDate:E,maxDate:h,presets:t,showPresets:j=c.BOOLEAN_TRUE,size:f=c.SIZE_MD,error:l,helperText:x,className:T,testId:G,openEffect:le,closeEffect:ie,effect:ce,...B}=g,{openEffect:W,closeEffect:U}=se.resolveOverlayEffects(g),[R,w]=s.useState(!1),[b,k]=s.useState(d??{start:null,end:null}),[A,_]=s.useState(c.PICKING_START),P=s.useRef(null),I=s.useRef(null),L=s.useRef(null),{style:Y,ready:Z}=te.useFixedAnchorPosition({anchorRef:I,open:R,estimatedHeightPx:m.DATERANGE_DROPDOWN_HEIGHT_PX}),C=new Date,[D,F]=s.useState(C.getMonth()),[v,X]=s.useState(C.getFullYear()),M=o.resolveRightMonth(D),$=M.month,V=v+M.yearDelta;s.useEffect(()=>{d&&k(d)},[d]);const K=s.useCallback(()=>w(!1),[]);ae.useClickOutsideMultiple([P,L],K,{enabled:R});const z=s.useCallback(a=>{if(A==="start")k({start:a,end:null}),_("end");else{const i=a>=(b.start??a)?{start:b.start,end:a}:{start:a,end:b.start};k(i),_("start"),r==null||r(i)}},[A,b.start,r]),J=s.useCallback(a=>{k(a),r==null||r(a),w(!1),_("start")},[r]),Q=s.useCallback(()=>{const a={start:null,end:null};k(a),r==null||r(a),_("start")},[r]),ee=s.useCallback(a=>{let i=D+a,S=v;i<n.ZERO&&(i=n.LAST_MONTH_INDEX,S-=n.ONE),i>n.LAST_MONTH_INDEX&&(i=n.ZERO,S+=n.ONE),F(i),X(S)},[D,v]),H=t??(j?o.getDefaultPresets():[]),re=b.start?`${o.formatDate(b.start)}${b.end?` – ${o.formatDate(b.end)}`:""}`:y;return e.jsxs("div",{ref:P,className:O.cn("Bear-DateRangePicker bear-relative bear-inline-block",T),"data-testid":G,...B,children:[p&&e.jsx("label",{className:"Bear-DateRangePicker__label bear-block bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-zinc-300 bear-mb-1.5",children:p}),e.jsxs("button",{ref:I,type:"button",disabled:u,onClick:()=>!u&&w(!R),className:O.cn("bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-border-gray-300 dark:bear-border-zinc-600 bear-bg-white dark:bear-bg-zinc-800 bear-text-gray-900 dark:bear-text-white bear-transition-colors focus:bear-ring-2 focus:bear-ring-primary-500 bear-outline-none",m.SIZE_CLASSES[f],u&&"bear-opacity-50 bear-cursor-not-allowed"),children:[e.jsx("span",{className:O.cn(!b.start&&"bear-text-gray-400 dark:bear-text-zinc-500"),children:re}),e.jsx(ne.CalendarIcon,{className:"bear-w-4 bear-h-4 bear-ml-2 bear-text-gray-400"})]}),e.jsx(be.OverlayPortal,{open:R,ready:Z,style:Y,zIndex:m.DATERANGE_DROPDOWN_Z_INDEX,openEffect:W,closeEffect:U,panelRef:L,className:"bear-max-w-[calc(100vw-16px)] bear-bg-white dark:bear-bg-zinc-800 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-rounded-xl bear-shadow-xl bear-p-4 bear-overflow-x-auto",attributes:{[m.DATERANGE_DROPDOWN_ATTR]:c.EMPTY_STRING},children:e.jsxs("div",{className:"bear-flex bear-gap-4",children:[H.length>n.ZERO&&e.jsxs("div",{className:"bear-border-r bear-border-gray-200 dark:bear-border-zinc-700 bear-pr-3 bear-space-y-1",style:{minWidth:n.PRESET_SIDEBAR_MIN_WIDTH_PX},children:[H.map(a=>e.jsx("button",{type:"button",onClick:()=>J(a.range()),className:"bear-w-full bear-text-left bear-px-3 bear-py-1.5 bear-text-sm bear-rounded bear-transition-colors hover:bear-bg-primary-50 dark:hover:bear-bg-primary-900/20 bear-text-gray-700 dark:bear-text-zinc-300",children:a.label},a.label)),N&&b.start&&e.jsx("button",{type:"button",onClick:Q,className:"bear-w-full bear-text-left bear-px-3 bear-py-1.5 bear-text-sm bear-rounded bear-transition-colors hover:bear-bg-primary-50 dark:hover:bear-bg-primary-900/20 bear-text-red-500",children:c.LABEL_CLEAR})]}),e.jsx(q,{year:v,month:D,range:b,onDayClick:z,onNav:ee,minDate:E,maxDate:h}),e.jsx(q,{year:V,month:$,range:b,onDayClick:z,onNav:()=>{},minDate:E,maxDate:h})]})}),l&&e.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-red-500",children:l}),!l&&x&&e.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-gray-500 dark:bear-text-zinc-500",children:x})]})};exports.DateRangePicker=oe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),O=require("../../utils/cn.cjs"),ae=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const n=require("../../constants/numbers.const.cjs"),c=require("../../constants/generals.const.cjs"),te=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.cjs"),se=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs");require("../FormControl/FormControl.context.cjs");const ne=require("@forgedevstack/bear-icons"),be=require("../OverlayPortal/OverlayPortal.cjs"),m=require("./DateRangePicker.const.cjs"),o=require("./DateRangePicker.utils.cjs"),q=({year:g,month:d,range:r,onDayClick:p,onNav:y,minDate:u,maxDate:N})=>{const E=o.getCalendarDays(g,d),h=new Date;return h.setHours(n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT,n.HOURS_MIDNIGHT),e.jsxs("div",{className:"bear-w-64",children:[e.jsxs("div",{className:"bear-flex bear-items-center bear-justify-between bear-mb-2",children:[e.jsx("button",{type:"button",onClick:()=>y(n.NEGATIVE_ONE),className:"bear-p-1 bear-rounded hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-text-gray-500 dark:bear-text-zinc-400","aria-label":"Previous month",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsxs("span",{className:"bear-text-sm bear-font-semibold bear-text-gray-900 dark:bear-text-white",children:[m.MONTH_LABELS[d]," ",g]}),e.jsx("button",{type:"button",onClick:()=>y(n.ONE),className:"bear-p-1 bear-rounded hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-text-gray-500 dark:bear-text-zinc-400","aria-label":"Next month",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),e.jsx("div",{className:"bear-grid bear-grid-cols-7 bear-gap-0.5 bear-mb-1",children:m.DAY_LABELS.map(t=>e.jsx("div",{className:"bear-text-xs bear-text-center bear-font-medium bear-text-gray-400 dark:bear-text-zinc-500 bear-py-1",children:t},t))}),e.jsx("div",{className:"bear-grid bear-grid-cols-7 bear-gap-0.5",children:E.map((t,j)=>{if(!t)return e.jsx("div",{},`e-${j}`);const f=u&&t<u||N&&t>N,l=o.isSameDay(t,r.start)||o.isSameDay(t,r.end),x=o.isInRange(t,r.start,r.end),T=o.isSameDay(t,h);return e.jsx("button",{type:"button",disabled:!!f,onClick:()=>p(t),className:O.cn("bear-w-8 bear-h-8 bear-text-sm bear-rounded-full bear-transition-colors bear-cursor-pointer",f?"bear-text-gray-300 dark:bear-text-zinc-600 bear-cursor-not-allowed":"hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700",l&&"bear-bg-primary-500 bear-text-white",!l&&x&&"bear-bg-primary-100 dark:bear-bg-primary-900/30 bear-text-primary-800 dark:bear-text-primary-200",!l&&!x&&T&&"bear-ring-1 bear-ring-primary-400",!l&&!x&&!f&&"bear-text-gray-700 dark:bear-text-zinc-300"),children:t.getDate()},t.getTime())})})]})},oe=g=>{const{value:d,onChange:r,label:p,placeholder:y=c.PLACEHOLDER_SELECT_DATE_RANGE,disabled:u=c.BOOLEAN_FALSE,clearable:N=c.BOOLEAN_TRUE,minDate:E,maxDate:h,presets:t,showPresets:j=c.BOOLEAN_TRUE,size:f=c.SIZE_MD,error:l,helperText:x,className:T,testId:G,openEffect:le,closeEffect:ie,effect:ce,...B}=g,{openEffect:W,closeEffect:U}=se.resolveOverlayEffects(g),[R,w]=s.useState(!1),[b,k]=s.useState(d??{start:null,end:null}),[A,_]=s.useState(c.PICKING_START),P=s.useRef(null),I=s.useRef(null),L=s.useRef(null),{style:Y,ready:Z}=te.useFixedAnchorPosition({anchorRef:I,open:R,estimatedHeightPx:m.DATERANGE_DROPDOWN_HEIGHT_PX}),C=new Date,[D,F]=s.useState(C.getMonth()),[v,X]=s.useState(C.getFullYear()),M=o.resolveRightMonth(D),$=M.month,V=v+M.yearDelta;s.useEffect(()=>{d&&k(d)},[d]);const K=s.useCallback(()=>w(!1),[]);ae.useClickOutsideMultiple([P,L],K,{enabled:R});const z=s.useCallback(a=>{if(A==="start")k({start:a,end:null}),_("end");else{const i=a>=(b.start??a)?{start:b.start,end:a}:{start:a,end:b.start};k(i),_("start"),r==null||r(i)}},[A,b.start,r]),J=s.useCallback(a=>{k(a),r==null||r(a),w(!1),_("start")},[r]),Q=s.useCallback(()=>{const a={start:null,end:null};k(a),r==null||r(a),_("start")},[r]),ee=s.useCallback(a=>{let i=D+a,S=v;i<n.ZERO&&(i=n.LAST_MONTH_INDEX,S-=n.ONE),i>n.LAST_MONTH_INDEX&&(i=n.ZERO,S+=n.ONE),F(i),X(S)},[D,v]),H=t??(j?o.getDefaultPresets():[]),re=b.start?`${o.formatDate(b.start)}${b.end?` – ${o.formatDate(b.end)}`:""}`:y;return e.jsxs("div",{ref:P,className:O.cn("Bear-DateRangePicker bear-relative bear-inline-block",T),"data-testid":G,...B,children:[p&&e.jsx("label",{className:"Bear-DateRangePicker__label bear-block bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-zinc-300 bear-mb-1.5",children:p}),e.jsxs("button",{ref:I,type:"button",disabled:u,onClick:()=>!u&&w(!R),className:O.cn("bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-border-gray-300 dark:bear-border-zinc-600 bear-bg-white dark:bear-bg-zinc-800 bear-text-gray-900 dark:bear-text-white bear-transition-colors focus:bear-ring-2 focus:bear-ring-primary-500 bear-outline-none",m.SIZE_CLASSES[f],u&&"bear-opacity-50 bear-cursor-not-allowed"),children:[e.jsx("span",{className:O.cn(!b.start&&"bear-text-gray-400 dark:bear-text-zinc-500"),children:re}),e.jsx(ne.CalendarIcon,{className:"bear-w-4 bear-h-4 bear-ml-2 bear-text-gray-400"})]}),e.jsx(be.OverlayPortal,{open:R,ready:Z,style:Y,zIndex:m.DATERANGE_DROPDOWN_Z_INDEX,openEffect:W,closeEffect:U,panelRef:L,className:"bear-max-w-[calc(100vw-16px)] bear-bg-white dark:bear-bg-zinc-800 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-rounded-xl bear-shadow-xl bear-p-4 bear-overflow-x-auto",attributes:{[m.DATERANGE_DROPDOWN_ATTR]:c.EMPTY_STRING},children:e.jsxs("div",{className:"bear-flex bear-gap-4",children:[H.length>n.ZERO&&e.jsxs("div",{className:"bear-border-r bear-border-gray-200 dark:bear-border-zinc-700 bear-pr-3 bear-space-y-1",style:{minWidth:n.PRESET_SIDEBAR_MIN_WIDTH_PX},children:[H.map(a=>e.jsx("button",{type:"button",onClick:()=>J(a.range()),className:"bear-w-full bear-text-left bear-px-3 bear-py-1.5 bear-text-sm bear-rounded bear-transition-colors hover:bear-bg-primary-50 dark:hover:bear-bg-primary-900/20 bear-text-gray-700 dark:bear-text-zinc-300",children:a.label},a.label)),N&&b.start&&e.jsx("button",{type:"button",onClick:Q,className:"bear-w-full bear-text-left bear-px-3 bear-py-1.5 bear-text-sm bear-rounded bear-transition-colors hover:bear-bg-primary-50 dark:hover:bear-bg-primary-900/20 bear-text-red-500",children:c.LABEL_CLEAR})]}),e.jsx(q,{year:v,month:D,range:b,onDayClick:z,onNav:ee,minDate:E,maxDate:h}),e.jsx(q,{year:V,month:$,range:b,onDayClick:z,onNav:()=>{},minDate:E,maxDate:h})]})}),l&&e.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-red-500",children:l}),!l&&x&&e.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-gray-500 dark:bear-text-zinc-500",children:x})]})};exports.DateRangePicker=oe;
@@ -9,7 +9,7 @@ import { PLACEHOLDER_SELECT_DATE_RANGE as me, BOOLEAN_FALSE as fe, BOOLEAN_TRUE
9
9
  import { useFixedAnchorPosition as xe } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.js";
10
10
  import { resolveOverlayEffects as ye } from "../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.js";
11
11
  import "../FormControl/FormControl.context.js";
12
- import { CalendarIcon as ke } from "../Icon/index.js";
12
+ import { CalendarIcon as ke } from "@forgedevstack/bear-icons";
13
13
  import { OverlayPortal as Ne } from "../OverlayPortal/OverlayPortal.js";
14
14
  import { DATERANGE_DROPDOWN_HEIGHT_PX as Ee, SIZE_CLASSES as ve, DATERANGE_DROPDOWN_Z_INDEX as _e, DATERANGE_DROPDOWN_ATTR as De, MONTH_LABELS as Re, DAY_LABELS as we } from "./DateRangePicker.const.js";
15
15
  import { getDefaultPresets as Ae, formatDate as Z, resolveRightMonth as Te, getCalendarDays as Le, isSameDay as z, isInRange as Oe } from "./DateRangePicker.utils.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),M=require("react-dom"),O=require("../../context/BearProvider.cjs"),q=require("../../utils/cn.cjs"),j=require("../../utils/generateBearId.utils.cjs"),B=require("../../utils/useBearId.cjs"),T=require("../Icon/index.cjs"),L=require("../Backdrop/Backdrop.cjs"),e=require("./Drawer.const.cjs"),C=require("./Drawer.utils.cjs"),P=({isOpen:u,onClose:o,title:i,children:I,side:h="right",anchor:k,variant:W="temporary",size:D="md",showCloseButton:m=!0,closeOnBackdrop:A=!0,closeOnEscape:f=!0,className:N,container:R,id:w,testId:g})=>{const y=B.useBearId("Drawer"),c=j.resolveBearId(w,y),{direction:x}=O.useBearDirectionOptional(),l=k??h,n=x==="rtl"&&(l==="left"||l==="right")?l==="left"?"right":"left":l,[s,_]=a.useState(u),[S,b]=a.useState(!1),[v,E]=a.useState(!1);a.useEffect(()=>{if(u){_(!0),b(!1);const t=requestAnimationFrame(()=>E(!0));return()=>cancelAnimationFrame(t)}if(s){E(!1),b(!0);const t=setTimeout(()=>{_(!1),b(!1)},e.DRAWER_ANIMATION_MS);return()=>clearTimeout(t)}},[u,s]);const d=a.useCallback(t=>{f&&t.key==="Escape"&&o()},[f,o]);if(a.useEffect(()=>{if(s){document.addEventListener("keydown",d);const t=C.lockBodyScroll();return()=>{document.removeEventListener("keydown",d),t()}}return()=>{document.removeEventListener("keydown",d)}},[s,d]),!s)return null;const p=r.jsxs("div",{id:c,"data-testid":g,className:e.DRAWER_ROOT_CLASSES,style:{zIndex:e.DRAWER_Z_INDEX},children:[r.jsx(L.Backdrop,{open:v&&!S,keepMounted:!0,blur:!0,nested:!0,transitionDuration:e.DRAWER_ANIMATION_MS,className:"Bear-Drawer__backdrop",onClick:A?()=>o():void 0}),r.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":i?`${c}-title`:void 0,className:q.cn("Bear-Drawer__panel","bear-absolute bear-bg-white dark:bear-bg-neutral-900 bear-shadow-2xl","bear-border-neutral-200 dark:bear-border-neutral-700","bear-flex bear-flex-col bear-overflow-hidden","bear-transform bear-transition-transform",e.BORDER_SIDE_MAP[n],e.POSITION_CLASSES[n],e.SIZE_CLASSES[n][D],v&&!S?e.TRANSFORM_OPEN[n]:e.TRANSFORM_CLOSED[n],N),style:{transitionDuration:`${e.DRAWER_ANIMATION_MS}ms`,zIndex:e.DRAWER_PANEL_Z_INDEX},children:[(i||m)&&r.jsxs("div",{className:"bear-flex bear-items-center bear-justify-between bear-px-4 bear-py-3 bear-border-b bear-border-neutral-200 dark:bear-border-neutral-700 bear-shrink-0",dir:x,children:[i&&r.jsx("h2",{id:`${c}-title`,className:"bear-text-lg bear-font-semibold bear-text-neutral-900 dark:bear-text-white",children:i}),m&&r.jsx("button",{onClick:o,className:"bear-p-1 bear-rounded-lg bear-text-neutral-500 dark:bear-text-neutral-400 hover:bear-text-neutral-900 dark:hover:bear-text-white hover:bear-bg-neutral-100 dark:hover:bear-bg-neutral-700 bear-transition-colors","aria-label":"Close drawer",children:r.jsx(T.XIcon,{className:"bear-w-5 bear-h-5"})})]}),r.jsx("div",{className:"bear-flex-1 bear-min-h-0 bear-overflow-y-auto bear-overscroll-contain bear-p-4 bear-text-neutral-700 dark:bear-text-neutral-300",children:I})]})]});return M.createPortal(p,R??document.body)};exports.Drawer=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),U=require("react-dom"),C=require("../../context/BearProvider.cjs"),R=require("../../utils/cn.cjs");require("react");const j=require("../../utils/generateBearId.utils.cjs"),W=require("../../utils/useBearId.cjs"),e=require("../../constants/generals.const.cjs"),g=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.const.cjs"),$=require("../../hooks/useFixedAnchorPosition/useFixedAnchorPosition.utils.cjs"),V=require("../Backdrop/Backdrop.cjs"),l=require("../Box/Box.cjs"),t=require("./Drawer.const.cjs"),H=require("./helpers/DrawerOptionalHeader.cjs"),Y=require("./hooks/useDrawer.cjs"),z=d=>{const{isOpen:p,onClose:a,title:s,children:N,side:w=t.DRAWER_DEFAULT_SIDE,anchor:T,variant:c=t.DRAWER_DEFAULT_VARIANT,size:L=t.DRAWER_DEFAULT_SIZE,showCloseButton:E=e.BOOLEAN_TRUE,closeOnBackdrop:m=e.BOOLEAN_TRUE,closeOnEscape:q=e.BOOLEAN_TRUE,className:I,container:f,id:x,testId:F}=d,r=c===e.DRAWER_VARIANT_PERMANENT,n=c===e.DRAWER_VARIANT_TEMPORARY,{openEffect:_,closeEffect:u}=$.resolveOverlayEffects(d,g.OVERLAY_OPEN_EFFECT_DEFAULT),P=W.useBearId(e.COMPONENT_NAME_DRAWER),A=j.resolveBearId(x,P),{direction:h}=C.useBearDirectionOptional(),B=T??w,{isMounted:v,isPanelOpen:i}=Y.useDrawer({isOpen:r?e.BOOLEAN_TRUE:p,onClose:a,closeOnEscape:r?e.BOOLEAN_FALSE:q,openEffect:_,closeEffect:u,lockScroll:n,alwaysMounted:r}),y=i?_:u;if(!v)return null;const M=!!s||E,O=`${A}-title`,S=m&&n?()=>a():void 0,b=s?O:void 0,k=r?"complementary":"dialog",D=o.jsxs(l.Box,{id:A,"data-testid":F,className:R.cn("Bear-Drawer",`Bear-Drawer--${c}`),children:[n&&o.jsx(V.Backdrop,{open:i,keepMounted:!0,blur:!0,nested:!0,transitionDuration:t.DRAWER_ANIMATION_MS,className:"Bear-Drawer__backdrop",onClick:S}),o.jsxs(l.Box,{role:k,"aria-modal":n?e.BOOLEAN_TRUE:e.BOOLEAN_FALSE,"aria-labelledby":b,className:R.cn("Bear-Drawer__panel",`Bear-Drawer__panel--${B}`,`Bear-Drawer__panel--${L}`,`Bear-Drawer__panel--effect-${y}`,i&&"Bear-Drawer__panel--open",I),children:[o.jsx(H.DrawerOptionalHeader,{showHeader:M,side:B,title:s,titleId:O,showCloseButton:r?e.BOOLEAN_FALSE:E,onClose:a,direction:h}),o.jsx(l.Box,{className:"Bear-Drawer__body",children:N})]})]});return r?D:U.createPortal(D,f??document.body)};exports.Drawer=z;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=300,a=11e3,r=1,b="Bear-Drawer bear-fixed bear-inset-0",l={left:{sm:"bear-w-full sm:bear-w-64 bear-max-w-full sm:bear-max-w-none",md:"bear-w-full sm:bear-w-80 bear-max-w-full sm:bear-max-w-none",lg:"bear-w-full sm:bear-w-96 bear-max-w-full sm:bear-max-w-none",xl:"bear-w-full sm:bear-w-[32rem] bear-max-w-full sm:bear-max-w-none"},right:{sm:"bear-w-full sm:bear-w-64 bear-max-w-full sm:bear-max-w-none",md:"bear-w-full sm:bear-w-80 bear-max-w-full sm:bear-max-w-none",lg:"bear-w-full sm:bear-w-96 bear-max-w-full sm:bear-max-w-none",xl:"bear-w-full sm:bear-w-[32rem] bear-max-w-full sm:bear-max-w-none"},top:{sm:"bear-h-32",md:"bear-h-48",lg:"bear-h-64",xl:"bear-h-96"},bottom:{sm:"bear-h-32",md:"bear-h-48",lg:"bear-h-64",xl:"bear-h-96"}},t={left:"bear-left-0 bear-top-0 bear-h-full",right:"bear-right-0 bear-top-0 bear-h-full",top:"bear-top-0 bear-left-0 bear-w-full",bottom:"bear-bottom-0 bear-left-0 bear-w-full"},m={left:"bear-translate-x-0",right:"bear-translate-x-0",top:"bear-translate-y-0",bottom:"bear-translate-y-0"},o={left:"-bear-translate-x-full",right:"bear-translate-x-full",top:"-bear-translate-y-full",bottom:"bear-translate-y-full"},s={left:"bear-border-r",right:"bear-border-l",top:"bear-border-b",bottom:"bear-border-t"};exports.BORDER_SIDE_MAP=s;exports.DRAWER_ANIMATION_MS=e;exports.DRAWER_PANEL_Z_INDEX=r;exports.DRAWER_ROOT_CLASSES=b;exports.DRAWER_Z_INDEX=a;exports.POSITION_CLASSES=t;exports.SIZE_CLASSES=l;exports.TRANSFORM_CLOSED=o;exports.TRANSFORM_OPEN=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../../constants/numbers.const.cjs"),A=require("../../constants/generals.const.cjs"),E=R.THREE_HUNDRED,_=A.POSITION_RIGHT,D=A.SIZE_MD,T=A.DRAWER_VARIANT_TEMPORARY;exports.DRAWER_ANIMATION_MS=E;exports.DRAWER_DEFAULT_SIDE=_;exports.DRAWER_DEFAULT_SIZE=D;exports.DRAWER_DEFAULT_VARIANT=T;
@@ -1,13 +1,5 @@
1
- import { DrawerProps } from './Drawer.types';
2
- type DrawerSide = NonNullable<DrawerProps['side']>;
3
- type DrawerSize = NonNullable<DrawerProps['size']>;
1
+ import { DrawerProps, DrawerVariant } from './Drawer.types';
4
2
  export declare const DRAWER_ANIMATION_MS = 300;
5
- export declare const DRAWER_Z_INDEX = 11000;
6
- export declare const DRAWER_PANEL_Z_INDEX = 1;
7
- export declare const DRAWER_ROOT_CLASSES = "Bear-Drawer bear-fixed bear-inset-0";
8
- export declare const SIZE_CLASSES: Record<DrawerSide, Record<DrawerSize, string>>;
9
- export declare const POSITION_CLASSES: Record<DrawerSide, string>;
10
- export declare const TRANSFORM_OPEN: Record<DrawerSide, string>;
11
- export declare const TRANSFORM_CLOSED: Record<DrawerSide, string>;
12
- export declare const BORDER_SIDE_MAP: Record<DrawerSide, string>;
13
- export {};
3
+ export declare const DRAWER_DEFAULT_SIDE: NonNullable<DrawerProps['side']>;
4
+ export declare const DRAWER_DEFAULT_SIZE: NonNullable<DrawerProps['size']>;
5
+ export declare const DRAWER_DEFAULT_VARIANT: DrawerVariant;