@forgedevstack/bear 1.0.7 → 1.0.9

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 (348) hide show
  1. package/dist/components/ActivityItem/ActivityItem.cjs +1 -1
  2. package/dist/components/ActivityItem/ActivityItem.js +1 -0
  3. package/dist/components/Alert/Alert.cjs +1 -1
  4. package/dist/components/Alert/Alert.const.cjs +1 -1
  5. package/dist/components/Alert/Alert.const.d.ts +4 -0
  6. package/dist/components/Alert/Alert.const.js +10 -15
  7. package/dist/components/Alert/Alert.js +43 -38
  8. package/dist/components/AppBar/AppBar.cjs +1 -1
  9. package/dist/components/AppBar/AppBar.js +19 -14
  10. package/dist/components/BackTop/BackTop.cjs +1 -0
  11. package/dist/components/BackTop/BackTop.const.cjs +1 -0
  12. package/dist/components/BackTop/BackTop.const.d.ts +34 -0
  13. package/dist/components/BackTop/BackTop.const.js +29 -0
  14. package/dist/components/BackTop/BackTop.d.ts +21 -0
  15. package/dist/components/BackTop/BackTop.js +87 -0
  16. package/dist/components/BackTop/BackTop.types.d.ts +28 -0
  17. package/dist/components/BackTop/index.d.ts +3 -0
  18. package/dist/components/Badge/Badge.cjs +1 -1
  19. package/dist/components/Badge/Badge.constants.d.ts +4 -4
  20. package/dist/components/Badge/Badge.js +15 -14
  21. package/dist/components/Badge/Badge.types.d.ts +3 -3
  22. package/dist/components/BearLogo/EmberLogo.cjs +1 -1
  23. package/dist/components/BearLogo/EmberLogo.js +3 -2
  24. package/dist/components/BottomNavigation/BottomNavigation.cjs +1 -1
  25. package/dist/components/BottomNavigation/BottomNavigation.js +3 -2
  26. package/dist/components/BottomSheet/BottomSheet.cjs +1 -1
  27. package/dist/components/BottomSheet/BottomSheet.js +39 -38
  28. package/dist/components/Button/Button.cjs +1 -1
  29. package/dist/components/Button/Button.constants.cjs +38 -48
  30. package/dist/components/Button/Button.constants.d.ts +22 -3
  31. package/dist/components/Button/Button.constants.js +51 -50
  32. package/dist/components/Button/Button.d.ts +14 -7
  33. package/dist/components/Button/Button.js +123 -45
  34. package/dist/components/Button/Button.types.d.ts +22 -4
  35. package/dist/components/Calendar/Calendar.cjs +1 -1
  36. package/dist/components/Calendar/Calendar.js +3 -2
  37. package/dist/components/Card/Card.const.d.ts +2 -2
  38. package/dist/components/Card/Card.types.d.ts +2 -2
  39. package/dist/components/Carousel/Carousel.cjs +1 -1
  40. package/dist/components/Carousel/Carousel.const.cjs +1 -0
  41. package/dist/components/Carousel/Carousel.const.d.ts +12 -0
  42. package/dist/components/Carousel/Carousel.const.js +9 -0
  43. package/dist/components/Carousel/Carousel.d.ts +14 -3
  44. package/dist/components/Carousel/Carousel.js +222 -75
  45. package/dist/components/Carousel/Carousel.types.d.ts +32 -2
  46. package/dist/components/Carousel/index.d.ts +1 -1
  47. package/dist/components/Chat/Chat.cjs +1 -0
  48. package/dist/components/Chat/Chat.const.cjs +1 -0
  49. package/dist/components/Chat/Chat.const.d.ts +26 -0
  50. package/dist/components/Chat/Chat.const.js +29 -0
  51. package/dist/components/Chat/Chat.d.ts +21 -0
  52. package/dist/components/Chat/Chat.js +179 -0
  53. package/dist/components/Chat/Chat.types.d.ts +55 -0
  54. package/dist/components/Chat/index.d.ts +2 -0
  55. package/dist/components/Chip/Chip.cjs +1 -1
  56. package/dist/components/Chip/Chip.js +3 -2
  57. package/dist/components/CodeEditor/CodeEditor.cjs +5 -0
  58. package/dist/components/CodeEditor/CodeEditor.const.cjs +1 -0
  59. package/dist/components/CodeEditor/CodeEditor.const.d.ts +21 -0
  60. package/dist/components/CodeEditor/CodeEditor.const.js +119 -0
  61. package/dist/components/CodeEditor/CodeEditor.d.ts +22 -0
  62. package/dist/components/CodeEditor/CodeEditor.js +250 -0
  63. package/dist/components/CodeEditor/CodeEditor.types.d.ts +80 -0
  64. package/dist/components/CodeEditor/CodeEditor.utils.cjs +1 -0
  65. package/dist/components/CodeEditor/CodeEditor.utils.d.ts +6 -0
  66. package/dist/components/CodeEditor/CodeEditor.utils.js +75 -0
  67. package/dist/components/CodeEditor/index.d.ts +2 -0
  68. package/dist/components/Columns/Columns.cjs +1 -1
  69. package/dist/components/Columns/Columns.js +9 -8
  70. package/dist/components/Confetti/Confetti.cjs +1 -0
  71. package/dist/components/Confetti/Confetti.const.cjs +1 -0
  72. package/dist/components/Confetti/Confetti.const.d.ts +16 -0
  73. package/dist/components/Confetti/Confetti.const.js +36 -0
  74. package/dist/components/Confetti/Confetti.d.ts +23 -0
  75. package/dist/components/Confetti/Confetti.js +94 -0
  76. package/dist/components/Confetti/Confetti.types.d.ts +50 -0
  77. package/dist/components/Confetti/index.d.ts +4 -0
  78. package/dist/components/Confetti/useConfetti.cjs +1 -0
  79. package/dist/components/Confetti/useConfetti.d.ts +13 -0
  80. package/dist/components/Confetti/useConfetti.js +12 -0
  81. package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -0
  82. package/dist/components/CountdownTimer/CountdownTimer.const.cjs +1 -0
  83. package/dist/components/CountdownTimer/CountdownTimer.const.d.ts +27 -0
  84. package/dist/components/CountdownTimer/CountdownTimer.const.js +35 -0
  85. package/dist/components/CountdownTimer/CountdownTimer.d.ts +7 -0
  86. package/dist/components/CountdownTimer/CountdownTimer.js +115 -0
  87. package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +56 -0
  88. package/dist/components/CountdownTimer/index.d.ts +2 -0
  89. package/dist/components/Cropper/Cropper.cjs +1 -0
  90. package/dist/components/Cropper/Cropper.const.cjs +1 -0
  91. package/dist/components/Cropper/Cropper.const.d.ts +31 -0
  92. package/dist/components/Cropper/Cropper.const.js +33 -0
  93. package/dist/components/Cropper/Cropper.d.ts +21 -0
  94. package/dist/components/Cropper/Cropper.js +362 -0
  95. package/dist/components/Cropper/Cropper.types.d.ts +72 -0
  96. package/dist/components/Cropper/index.d.ts +2 -0
  97. package/dist/components/DataTable/DataTable.cjs +1 -1
  98. package/dist/components/DataTable/DataTable.js +5 -4
  99. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  100. package/dist/components/DatePicker/DatePicker.js +3 -2
  101. package/dist/components/DiffViewer/DiffViewer.cjs +1 -0
  102. package/dist/components/DiffViewer/DiffViewer.const.cjs +1 -0
  103. package/dist/components/DiffViewer/DiffViewer.const.d.ts +18 -0
  104. package/dist/components/DiffViewer/DiffViewer.const.js +21 -0
  105. package/dist/components/DiffViewer/DiffViewer.d.ts +18 -0
  106. package/dist/components/DiffViewer/DiffViewer.js +127 -0
  107. package/dist/components/DiffViewer/DiffViewer.types.d.ts +40 -0
  108. package/dist/components/DiffViewer/DiffViewer.utils.cjs +3 -0
  109. package/dist/components/DiffViewer/DiffViewer.utils.d.ts +9 -0
  110. package/dist/components/DiffViewer/DiffViewer.utils.js +39 -0
  111. package/dist/components/DiffViewer/index.d.ts +2 -0
  112. package/dist/components/Divider/Divider.cjs +1 -1
  113. package/dist/components/Divider/Divider.js +15 -14
  114. package/dist/components/Dock/Dock.cjs +1 -0
  115. package/dist/components/Dock/Dock.const.cjs +1 -0
  116. package/dist/components/Dock/Dock.const.d.ts +25 -0
  117. package/dist/components/Dock/Dock.const.js +22 -0
  118. package/dist/components/Dock/Dock.d.ts +7 -0
  119. package/dist/components/Dock/Dock.js +144 -0
  120. package/dist/components/Dock/Dock.types.d.ts +42 -0
  121. package/dist/components/Dock/index.d.ts +2 -0
  122. package/dist/components/Drawer/Drawer.cjs +1 -1
  123. package/dist/components/Drawer/Drawer.js +35 -35
  124. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  125. package/dist/components/EmptyState/EmptyState.js +7 -6
  126. package/dist/components/FloatingChat/FloatingChat.cjs +1 -0
  127. package/dist/components/FloatingChat/FloatingChat.const.cjs +1 -0
  128. package/dist/components/FloatingChat/FloatingChat.const.d.ts +12 -0
  129. package/dist/components/FloatingChat/FloatingChat.const.js +15 -0
  130. package/dist/components/FloatingChat/FloatingChat.d.ts +19 -0
  131. package/dist/components/FloatingChat/FloatingChat.js +144 -0
  132. package/dist/components/FloatingChat/FloatingChat.types.d.ts +44 -0
  133. package/dist/components/FloatingChat/index.d.ts +2 -0
  134. package/dist/components/GradientText/GradientText.cjs +1 -0
  135. package/dist/components/GradientText/GradientText.const.cjs +1 -0
  136. package/dist/components/GradientText/GradientText.const.d.ts +15 -0
  137. package/dist/components/GradientText/GradientText.const.js +36 -0
  138. package/dist/components/GradientText/GradientText.d.ts +7 -0
  139. package/dist/components/GradientText/GradientText.js +52 -0
  140. package/dist/components/GradientText/GradientText.types.d.ts +27 -0
  141. package/dist/components/GradientText/index.d.ts +2 -0
  142. package/dist/components/Highlight/Highlight.cjs +1 -1
  143. package/dist/components/Highlight/Highlight.const.cjs +1 -0
  144. package/dist/components/Highlight/Highlight.const.d.ts +8 -0
  145. package/dist/components/Highlight/Highlight.const.js +15 -0
  146. package/dist/components/Highlight/Highlight.d.ts +4 -0
  147. package/dist/components/Highlight/Highlight.js +32 -24
  148. package/dist/components/Highlight/Highlight.types.d.ts +9 -1
  149. package/dist/components/Highlight/index.d.ts +1 -1
  150. package/dist/components/Icon/Icon.cjs +1 -1
  151. package/dist/components/Icon/Icon.js +17 -16
  152. package/dist/components/Icon/index.cjs +1 -1
  153. package/dist/components/Icon/index.js +12 -11
  154. package/dist/components/JsonViewer/JsonViewer.cjs +1 -0
  155. package/dist/components/JsonViewer/JsonViewer.const.cjs +1 -0
  156. package/dist/components/JsonViewer/JsonViewer.const.d.ts +4 -0
  157. package/dist/components/JsonViewer/JsonViewer.const.js +24 -0
  158. package/dist/components/JsonViewer/JsonViewer.d.ts +17 -0
  159. package/dist/components/JsonViewer/JsonViewer.js +195 -0
  160. package/dist/components/JsonViewer/JsonViewer.types.d.ts +54 -0
  161. package/dist/components/JsonViewer/index.d.ts +2 -0
  162. package/dist/components/Kanban/Kanban.cjs +1 -1
  163. package/dist/components/Kanban/Kanban.js +18 -17
  164. package/dist/components/Kbd/Kbd.cjs +1 -1
  165. package/dist/components/Kbd/Kbd.js +17 -16
  166. package/dist/components/Map/Map.cjs +1 -0
  167. package/dist/components/Map/Map.const.cjs +1 -0
  168. package/dist/components/Map/Map.const.d.ts +20 -0
  169. package/dist/components/Map/Map.const.js +26 -0
  170. package/dist/components/Map/Map.d.ts +20 -0
  171. package/dist/components/Map/Map.js +259 -0
  172. package/dist/components/Map/Map.types.d.ts +81 -0
  173. package/dist/components/Map/index.d.ts +2 -0
  174. package/dist/components/Marquee/Marquee.cjs +1 -0
  175. package/dist/components/Marquee/Marquee.const.cjs +1 -0
  176. package/dist/components/Marquee/Marquee.const.d.ts +11 -0
  177. package/dist/components/Marquee/Marquee.const.js +12 -0
  178. package/dist/components/Marquee/Marquee.d.ts +7 -0
  179. package/dist/components/Marquee/Marquee.js +106 -0
  180. package/dist/components/Marquee/Marquee.types.d.ts +32 -0
  181. package/dist/components/Marquee/index.d.ts +2 -0
  182. package/dist/components/Masonry/Masonry.cjs +1 -0
  183. package/dist/components/Masonry/Masonry.const.cjs +1 -0
  184. package/dist/components/Masonry/Masonry.const.d.ts +9 -0
  185. package/dist/components/Masonry/Masonry.const.js +9 -0
  186. package/dist/components/Masonry/Masonry.d.ts +7 -0
  187. package/dist/components/Masonry/Masonry.js +51 -0
  188. package/dist/components/Masonry/Masonry.types.d.ts +21 -0
  189. package/dist/components/Masonry/index.d.ts +2 -0
  190. package/dist/components/NavigableSelect/NavigableSelect.cjs +1 -0
  191. package/dist/components/NavigableSelect/NavigableSelect.const.cjs +1 -0
  192. package/dist/components/NavigableSelect/NavigableSelect.const.d.ts +23 -0
  193. package/dist/components/NavigableSelect/NavigableSelect.const.js +33 -0
  194. package/dist/components/NavigableSelect/NavigableSelect.d.ts +7 -0
  195. package/dist/components/NavigableSelect/NavigableSelect.js +361 -0
  196. package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +56 -0
  197. package/dist/components/NavigableSelect/index.d.ts +2 -0
  198. package/dist/components/Progress/Progress.cjs +1 -1
  199. package/dist/components/Progress/Progress.js +3 -2
  200. package/dist/components/QRCode/QRCode.cjs +1 -0
  201. package/dist/components/QRCode/QRCode.const.cjs +1 -0
  202. package/dist/components/QRCode/QRCode.const.d.ts +21 -0
  203. package/dist/components/QRCode/QRCode.const.js +11 -0
  204. package/dist/components/QRCode/QRCode.d.ts +29 -0
  205. package/dist/components/QRCode/QRCode.js +68 -0
  206. package/dist/components/QRCode/QRCode.types.d.ts +32 -0
  207. package/dist/components/QRCode/QRCode.utils.cjs +1 -0
  208. package/dist/components/QRCode/QRCode.utils.d.ts +12 -0
  209. package/dist/components/QRCode/QRCode.utils.js +74 -0
  210. package/dist/components/QRCode/index.d.ts +3 -0
  211. package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
  212. package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +3 -2
  213. package/dist/components/ScrollArea/ScrollArea.cjs +1 -1
  214. package/dist/components/ScrollArea/ScrollArea.js +3 -2
  215. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  216. package/dist/components/Sidebar/Sidebar.js +13 -12
  217. package/dist/components/Spinner/Spinner.cjs +1 -1
  218. package/dist/components/Spinner/Spinner.js +3 -2
  219. package/dist/components/Spinner/Spinner.types.d.ts +2 -2
  220. package/dist/components/Spotlight/Spotlight.cjs +1 -0
  221. package/dist/components/Spotlight/Spotlight.const.cjs +1 -0
  222. package/dist/components/Spotlight/Spotlight.const.d.ts +18 -0
  223. package/dist/components/Spotlight/Spotlight.const.js +9 -0
  224. package/dist/components/Spotlight/Spotlight.d.ts +7 -0
  225. package/dist/components/Spotlight/Spotlight.js +220 -0
  226. package/dist/components/Spotlight/Spotlight.types.d.ts +51 -0
  227. package/dist/components/Spotlight/index.d.ts +2 -0
  228. package/dist/components/StatCard/StatCard.cjs +1 -1
  229. package/dist/components/StatCard/StatCard.js +9 -8
  230. package/dist/components/Statistic/Statistic.cjs +1 -1
  231. package/dist/components/Statistic/Statistic.js +7 -6
  232. package/dist/components/Switch/Switch.cjs +1 -1
  233. package/dist/components/Switch/Switch.js +11 -10
  234. package/dist/components/Terminal/Terminal.cjs +1 -0
  235. package/dist/components/Terminal/Terminal.const.cjs +1 -0
  236. package/dist/components/Terminal/Terminal.const.d.ts +32 -0
  237. package/dist/components/Terminal/Terminal.const.js +42 -0
  238. package/dist/components/Terminal/Terminal.d.ts +27 -0
  239. package/dist/components/Terminal/Terminal.js +155 -0
  240. package/dist/components/Terminal/Terminal.types.d.ts +49 -0
  241. package/dist/components/Terminal/index.d.ts +2 -0
  242. package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.cjs +1 -1
  243. package/dist/components/TimePicker/components/TimePickerColumnsDropdown/TimePickerColumnsDropdown.js +16 -15
  244. package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
  245. package/dist/components/TimePicker/helpers/ClockFaceSvg.js +13 -12
  246. package/dist/components/Tour/Tour.cjs +1 -0
  247. package/dist/components/Tour/Tour.const.cjs +1 -0
  248. package/dist/components/Tour/Tour.const.d.ts +25 -0
  249. package/dist/components/Tour/Tour.const.js +38 -0
  250. package/dist/components/Tour/Tour.d.ts +17 -0
  251. package/dist/components/Tour/Tour.js +179 -0
  252. package/dist/components/Tour/Tour.types.d.ts +80 -0
  253. package/dist/components/Tour/index.d.ts +4 -0
  254. package/dist/components/Tour/useTour.cjs +1 -0
  255. package/dist/components/Tour/useTour.d.ts +14 -0
  256. package/dist/components/Tour/useTour.js +27 -0
  257. package/dist/components/Transition/Transition.cjs +1 -0
  258. package/dist/components/Transition/Transition.const.cjs +1 -0
  259. package/dist/components/Transition/Transition.const.d.ts +15 -0
  260. package/dist/components/Transition/Transition.const.js +73 -0
  261. package/dist/components/Transition/Transition.d.ts +37 -0
  262. package/dist/components/Transition/Transition.js +107 -0
  263. package/dist/components/Transition/Transition.types.d.ts +69 -0
  264. package/dist/components/Transition/index.d.ts +2 -0
  265. package/dist/components/Typewriter/Typewriter.cjs +1 -0
  266. package/dist/components/Typewriter/Typewriter.const.cjs +1 -0
  267. package/dist/components/Typewriter/Typewriter.const.d.ts +22 -0
  268. package/dist/components/Typewriter/Typewriter.const.js +11 -0
  269. package/dist/components/Typewriter/Typewriter.d.ts +7 -0
  270. package/dist/components/Typewriter/Typewriter.js +88 -0
  271. package/dist/components/Typewriter/Typewriter.types.d.ts +32 -0
  272. package/dist/components/Typewriter/index.d.ts +2 -0
  273. package/dist/components/Typography/Typography.cjs +1 -1
  274. package/dist/components/Typography/Typography.d.ts +5 -1
  275. package/dist/components/Typography/Typography.js +93 -57
  276. package/dist/components/Typography/Typography.types.d.ts +29 -2
  277. package/dist/components/Watermark/Watermark.cjs +1 -0
  278. package/dist/components/Watermark/Watermark.const.cjs +1 -0
  279. package/dist/components/Watermark/Watermark.const.d.ts +30 -0
  280. package/dist/components/Watermark/Watermark.const.js +18 -0
  281. package/dist/components/Watermark/Watermark.d.ts +7 -0
  282. package/dist/components/Watermark/Watermark.js +96 -0
  283. package/dist/components/Watermark/Watermark.types.d.ts +35 -0
  284. package/dist/components/Watermark/index.d.ts +2 -0
  285. package/dist/components/index.cjs +1 -1
  286. package/dist/components/index.d.ts +46 -2
  287. package/dist/components/index.js +288 -237
  288. package/dist/context/BearProvider.cjs +1 -1
  289. package/dist/context/BearProvider.d.ts +110 -5
  290. package/dist/context/BearProvider.js +198 -53
  291. package/dist/context/defaultTheme.cjs +1 -1
  292. package/dist/context/defaultTheme.js +11 -11
  293. package/dist/hooks/index.cjs +1 -1
  294. package/dist/hooks/index.d.ts +18 -0
  295. package/dist/hooks/index.js +61 -39
  296. package/dist/hooks/useAnimate.cjs +1 -0
  297. package/dist/hooks/useAnimate.d.ts +61 -0
  298. package/dist/hooks/useAnimate.js +125 -0
  299. package/dist/hooks/useBearComponent/index.d.ts +2 -0
  300. package/dist/hooks/useBearComponent/useBearComponent.cjs +1 -0
  301. package/dist/hooks/useBearComponent/useBearComponent.d.ts +71 -0
  302. package/dist/hooks/useBearComponent/useBearComponent.js +54 -0
  303. package/dist/hooks/useBearComponent/useBearComponent.types.d.ts +40 -0
  304. package/dist/hooks/useIdle/index.d.ts +2 -0
  305. package/dist/hooks/useIdle/useIdle.cjs +1 -0
  306. package/dist/hooks/useIdle/useIdle.d.ts +22 -0
  307. package/dist/hooks/useIdle/useIdle.js +66 -0
  308. package/dist/hooks/useIdle/useIdle.types.d.ts +29 -0
  309. package/dist/hooks/useLongPress/index.d.ts +2 -0
  310. package/dist/hooks/useLongPress/useLongPress.cjs +1 -0
  311. package/dist/hooks/useLongPress/useLongPress.d.ts +17 -0
  312. package/dist/hooks/useLongPress/useLongPress.js +44 -0
  313. package/dist/hooks/useLongPress/useLongPress.types.d.ts +26 -0
  314. package/dist/hooks/useOnline/index.d.ts +2 -0
  315. package/dist/hooks/useOnline/useOnline.cjs +1 -0
  316. package/dist/hooks/useOnline/useOnline.d.ts +16 -0
  317. package/dist/hooks/useOnline/useOnline.js +25 -0
  318. package/dist/hooks/useOnline/useOnline.types.d.ts +15 -0
  319. package/dist/hooks/usePageVisibility/index.d.ts +2 -0
  320. package/dist/hooks/usePageVisibility/usePageVisibility.cjs +1 -0
  321. package/dist/hooks/usePageVisibility/usePageVisibility.d.ts +19 -0
  322. package/dist/hooks/usePageVisibility/usePageVisibility.js +26 -0
  323. package/dist/hooks/usePageVisibility/usePageVisibility.types.d.ts +15 -0
  324. package/dist/hooks/useResponsive.cjs +1 -0
  325. package/dist/hooks/useResponsive.d.ts +35 -0
  326. package/dist/hooks/useResponsive.js +74 -0
  327. package/dist/hooks/useSpotlight/index.d.ts +2 -0
  328. package/dist/hooks/useSpotlight/useSpotlight.cjs +1 -0
  329. package/dist/hooks/useSpotlight/useSpotlight.d.ts +24 -0
  330. package/dist/hooks/useSpotlight/useSpotlight.js +49 -0
  331. package/dist/hooks/useSpotlight/useSpotlight.types.d.ts +23 -0
  332. package/dist/hooks/useWebSocket/index.d.ts +2 -0
  333. package/dist/hooks/useWebSocket/useWebSocket.cjs +1 -0
  334. package/dist/hooks/useWebSocket/useWebSocket.d.ts +22 -0
  335. package/dist/hooks/useWebSocket/useWebSocket.js +75 -0
  336. package/dist/hooks/useWebSocket/useWebSocket.types.d.ts +44 -0
  337. package/dist/index.cjs +1 -1
  338. package/dist/index.js +363 -288
  339. package/dist/styles.css +1 -1
  340. package/dist/types/component.types.d.ts +125 -42
  341. package/dist/types/theme.types.d.ts +82 -0
  342. package/dist/utils/createSlots.cjs +1 -0
  343. package/dist/utils/createSlots.d.ts +70 -0
  344. package/dist/utils/createSlots.js +65 -0
  345. package/dist/utils/index.cjs +1 -1
  346. package/dist/utils/index.d.ts +2 -0
  347. package/dist/utils/index.js +4 -2
  348. package/package.json +1 -1
@@ -1,2 +1,6 @@
1
1
  import { HighlightProps } from './Highlight.types';
2
+ /**
3
+ * Highlight - Inline text highlight with theme-aware colors.
4
+ * 'primary' color uses BearProvider's primary palette.
5
+ */
2
6
  export declare const Highlight: import('react').ForwardRefExoticComponent<HighlightProps & import('react').RefAttributes<HTMLSpanElement>>;
@@ -1,28 +1,36 @@
1
- import { jsx as b } from "react/jsx-runtime";
1
+ import { jsx as d } from "react/jsx-runtime";
2
2
  import { forwardRef as p } from "react";
3
- const n = {
4
- yellow: "bg-yellow-200 dark:bg-yellow-500/30",
5
- pink: "bg-pink-200 dark:bg-pink-500/30",
6
- blue: "bg-blue-200 dark:bg-blue-500/30",
7
- green: "bg-green-200 dark:bg-green-500/30",
8
- purple: "bg-purple-200 dark:bg-purple-500/30",
9
- orange: "bg-orange-200 dark:bg-orange-500/30"
10
- }, i = p(({
11
- children: e,
12
- color: r = "yellow",
13
- animated: g = !1,
14
- className: l = "",
15
- ...a
16
- }, o) => /* @__PURE__ */ b(
17
- "span",
18
- {
19
- ref: o,
20
- className: `bear-highlight px-1 rounded ${n[r]} ${g ? "animate-pulse" : ""} ${l}`.trim(),
21
- ...a,
22
- children: e
3
+ import { cn as f } from "../../utils/cn.js";
4
+ import { DEFAULT_COLOR as r, HIGHLIGHT_COLOR_CLASSES as t } from "./Highlight.const.js";
5
+ const h = p(
6
+ (a, e) => {
7
+ const {
8
+ children: o,
9
+ color: s = r,
10
+ animated: i = !1,
11
+ className: m,
12
+ testId: l,
13
+ ...n
14
+ } = a, c = t[s] ?? t[r];
15
+ return /* @__PURE__ */ d(
16
+ "span",
17
+ {
18
+ ref: e,
19
+ className: f(
20
+ "Bear-Highlight",
21
+ "bear-px-1 bear-rounded",
22
+ c,
23
+ i && "bear-animate-pulse",
24
+ m
25
+ ),
26
+ "data-testid": l,
27
+ ...n,
28
+ children: o
29
+ }
30
+ );
23
31
  }
24
- ));
25
- i.displayName = "Highlight";
32
+ );
33
+ h.displayName = "Highlight";
26
34
  export {
27
- i as Highlight
35
+ h as Highlight
28
36
  };
@@ -1,6 +1,14 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
+ export type HighlightColor = 'primary' | 'yellow' | 'pink' | 'blue' | 'green' | 'purple' | 'orange' | 'red' | 'cyan';
2
3
  export interface HighlightProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /** Content to highlight */
3
5
  children?: ReactNode;
4
- color?: 'yellow' | 'pink' | 'blue' | 'green' | 'purple' | 'orange';
6
+ /** Highlight color 'primary' uses theme color from BearProvider */
7
+ color?: HighlightColor;
8
+ /** Whether to animate with pulse */
5
9
  animated?: boolean;
10
+ /** Additional class name */
11
+ className?: string;
12
+ /** Test ID */
13
+ testId?: string;
6
14
  }
@@ -1,2 +1,2 @@
1
1
  export { Highlight } from './Highlight';
2
- export type { HighlightProps } from './Highlight.types';
2
+ export type { HighlightProps, HighlightColor } from './Highlight.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("../../utils/cn.cjs"),d={xs:12,sm:16,md:20,lg:24,xl:32},m=({size:e="md",color:t="currentColor",strokeWidth:o=2,spin:r=!1,className:s,children:i,testId:a,...c})=>{const n=typeof e=="number"?e:d[e];return l.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:o,strokeLinecap:"round",strokeLinejoin:"round",className:u.cn("bear-inline-block bear-shrink-0",r&&"bear-animate-spin",s),"data-testid":a,...c,children:i})};exports.Icon=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("../../utils/cn.cjs");require("react");const d={xs:12,sm:16,md:20,lg:24,xl:32},m=({size:e="md",color:r="currentColor",strokeWidth:t=2,spin:o=!1,className:s,children:i,testId:a,...c})=>{const n=typeof e=="number"?e:d[e];return l.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round",className:u.cn("bear-inline-block bear-shrink-0",o&&"bear-animate-spin",s),"data-testid":a,...c,children:i})};exports.Icon=m;
@@ -1,44 +1,45 @@
1
- import { jsx as m } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
2
  import { cn as c } from "../../utils/cn.js";
3
- const d = {
3
+ import "react";
4
+ const p = {
4
5
  xs: 12,
5
6
  sm: 16,
6
7
  md: 20,
7
8
  lg: 24,
8
9
  xl: 32
9
- }, b = ({
10
+ }, f = ({
10
11
  size: e = "md",
11
- color: n = "currentColor",
12
- strokeWidth: r = 2,
12
+ color: r = "currentColor",
13
+ strokeWidth: n = 2,
13
14
  spin: t = !1,
14
- className: s,
15
- children: i,
15
+ className: i,
16
+ children: s,
16
17
  testId: a,
17
- ...l
18
+ ...m
18
19
  }) => {
19
- const o = typeof e == "number" ? e : d[e];
20
- return /* @__PURE__ */ m(
20
+ const o = typeof e == "number" ? e : p[e];
21
+ return /* @__PURE__ */ l(
21
22
  "svg",
22
23
  {
23
24
  width: o,
24
25
  height: o,
25
26
  viewBox: "0 0 24 24",
26
27
  fill: "none",
27
- stroke: n,
28
- strokeWidth: r,
28
+ stroke: r,
29
+ strokeWidth: n,
29
30
  strokeLinecap: "round",
30
31
  strokeLinejoin: "round",
31
32
  className: c(
32
33
  "bear-inline-block bear-shrink-0",
33
34
  t && "bear-animate-spin",
34
- s
35
+ i
35
36
  ),
36
37
  "data-testid": a,
37
- ...l,
38
- children: i
38
+ ...m,
39
+ children: s
39
40
  }
40
41
  );
41
42
  };
42
43
  export {
43
- b as Icon
44
+ f as Icon
44
45
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const n=require("./icons/action.cjs"),o=require("./icons/navigation.cjs"),t=require("./icons/content.cjs"),r=require("./icons/communication.cjs"),c=require("./icons/status.cjs"),i=require("./icons/media.cjs"),s=require("./icons/editor.cjs"),e=require("./icons/misc.cjs"),I=c.CheckIcon,h=o.CloseIcon,C=n.EditIcon,v=o.ChevronDownIcon,u=o.ChevronRightIcon,a=o.ChevronLeftIcon,g=o.ChevronsLeftIcon,d=o.ChevronsRightIcon,q=e.XIcon,f={...n,...o,...t,...r,...c,...i,...s,...e,Action:n,Navigation:o,Content:t,Communication:r,Status:c,Media:i,Editor:s,Misc:e};exports.BearIcons=f;exports.CheckIcon=I;exports.ChevronDownIcon=v;exports.ChevronLeftIcon=a;exports.ChevronRightIcon=u;exports.ChevronsLeftIcon=g;exports.ChevronsRightIcon=d;exports.CloseIcon=h;exports.EditIcon=C;exports.XIcon=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const n=require("./icons/action.cjs"),o=require("./icons/navigation.cjs"),t=require("./icons/content.cjs"),r=require("./icons/communication.cjs"),e=require("./icons/status.cjs"),i=require("./icons/media.cjs"),s=require("./icons/editor.cjs"),c=require("./icons/misc.cjs"),I=e.CheckIcon,h=o.CloseIcon,C=n.EditIcon,v=o.ChevronDownIcon,u=o.ChevronRightIcon,a=o.ChevronLeftIcon,g=o.ChevronsLeftIcon,q=o.ChevronsRightIcon,d=c.XIcon,f={...n,...o,...t,...r,...e,...i,...s,...c,Action:n,Navigation:o,Content:t,Communication:r,Status:e,Media:i,Editor:s,Misc:c};exports.BearIcons=f;exports.CheckIcon=I;exports.ChevronDownIcon=v;exports.ChevronLeftIcon=a;exports.ChevronRightIcon=u;exports.ChevronsLeftIcon=g;exports.ChevronsRightIcon=q;exports.CloseIcon=h;exports.EditIcon=C;exports.XIcon=d;
@@ -1,4 +1,5 @@
1
1
  import "react/jsx-runtime";
2
+ import "react";
2
3
  import * as o from "./icons/action.js";
3
4
  import { EditIcon as m } from "./icons/action.js";
4
5
  import * as n from "./icons/navigation.js";
@@ -11,7 +12,7 @@ import * as s from "./icons/media.js";
11
12
  import * as i from "./icons/editor.js";
12
13
  import * as e from "./icons/misc.js";
13
14
  import { XIcon as $ } from "./icons/misc.js";
14
- const E = p, k = a, l = m, w = I, D = h, X = C, M = f, x = v, A = $, B = {
15
+ const k = p, l = a, w = m, D = I, X = h, M = C, x = f, A = v, B = $, N = {
15
16
  // Flat access to common icons (shortcuts)
16
17
  ...o,
17
18
  ...n,
@@ -32,14 +33,14 @@ const E = p, k = a, l = m, w = I, D = h, X = C, M = f, x = v, A = $, B = {
32
33
  Misc: e
33
34
  };
34
35
  export {
35
- B as BearIcons,
36
- E as CheckIcon,
37
- w as ChevronDownIcon,
38
- X as ChevronLeftIcon,
39
- D as ChevronRightIcon,
40
- M as ChevronsLeftIcon,
41
- x as ChevronsRightIcon,
42
- k as CloseIcon,
43
- l as EditIcon,
44
- A as XIcon
36
+ N as BearIcons,
37
+ k as CheckIcon,
38
+ D as ChevronDownIcon,
39
+ M as ChevronLeftIcon,
40
+ X as ChevronRightIcon,
41
+ x as ChevronsLeftIcon,
42
+ A as ChevronsRightIcon,
43
+ l as CloseIcon,
44
+ w as EditIcon,
45
+ B as XIcon
45
46
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),S=require("../../utils/cn.cjs"),v=require("../../context/BearProvider.cjs"),A=require("../Typography/Typography.cjs"),I=require("../Button/Button.cjs"),g=require("../Icon/index.cjs"),u=require("./JsonViewer.const.cjs"),T=({name:r,value:s,path:d,depth:h,defaultExpandDepth:y,showDataTypes:j,showArrayIndices:x,onValueClick:c})=>{const[o,b]=i.useState(h<y),{mode:N}=v.useBear(),n=N==="dark"?u.DARK_THEME:u.DEFAULT_THEME,t=i.useMemo(()=>s===null?"null":Array.isArray(s)?"array":typeof s,[s]),p=t==="object"||t==="array",a=p&&Object.keys(s).length===0,f=i.useCallback(()=>{b(l=>!l)},[]),m=i.useCallback(()=>{c==null||c(d,s)},[d,s,c]),w=()=>{switch(t){case"string":return e.jsxs("span",{style:{color:n.string},className:"cursor-pointer hover:underline",onClick:m,children:['"',s,'"']});case"number":return e.jsx("span",{style:{color:n.number},className:"cursor-pointer hover:underline",onClick:m,children:String(s)});case"boolean":return e.jsx("span",{style:{color:n.boolean},className:"cursor-pointer hover:underline",onClick:m,children:String(s)});case"null":return e.jsx("span",{style:{color:n.null},className:"cursor-pointer hover:underline",onClick:m,children:"null"});default:return null}},k=()=>{if(!j)return null;const l=t==="array"?`Array(${s.length})`:t==="object"?"Object":t;return e.jsx("span",{className:"text-[10px] opacity-50 ml-1",children:l})};if(!p)return e.jsxs("div",{className:"flex items-center gap-1 py-0.5",children:[e.jsx("span",{className:"w-4"})," ",(x||typeof r=="string")&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:n.key},children:typeof r=="string"?`"${r}"`:r}),e.jsx("span",{style:{color:n.punctuation},children:":"})]}),w(),k()]});const B=Object.entries(s),q=t==="array"?"[":"{",E=t==="array"?"]":"}";return e.jsxs("div",{className:"py-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1 cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 rounded px-1 -mx-1",onClick:f,children:[e.jsx("span",{className:"w-4 flex items-center justify-center text-gray-400",children:a?null:o?e.jsx(g.BearIcons.ChevronDownIcon,{size:12}):e.jsx(g.BearIcons.ChevronRightIcon,{size:12})}),(x||typeof r=="string")&&r!==""&&e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{color:n.key},children:typeof r=="string"?`"${r}"`:r}),e.jsx("span",{style:{color:n.punctuation},children:":"})]}),e.jsx("span",{style:{color:n.bracket},children:q}),!o&&!a&&e.jsx("span",{className:"text-gray-400 text-xs",children:"..."}),(!o||a)&&e.jsx("span",{style:{color:n.bracket},children:E}),k()]}),o&&!a&&e.jsx("div",{className:"ml-4 border-l border-gray-200 dark:border-gray-700 pl-2",children:B.map(([l,C],F)=>e.jsx(T,{name:t==="array"?F:l,value:C,path:[...d,l],depth:h+1,defaultExpandDepth:y,showDataTypes:j,showArrayIndices:x,onValueClick:c},l))}),o&&!a&&e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"w-4"}),e.jsx("span",{style:{color:n.bracket},children:E})]})]})},J=({data:r,defaultExpandDepth:s=u.DEFAULT_EXPAND_DEPTH,showDataTypes:d=!1,showArrayIndices:h=!0,showCopyButton:y=!0,rootName:j="root",onValueClick:x,onCopy:c,className:o,testId:b})=>{const{mode:N}=v.useBear(),n=N==="dark"?u.DARK_THEME:u.DEFAULT_THEME,[t,p]=i.useState(!1),a=i.useCallback(async()=>{try{await navigator.clipboard.writeText(JSON.stringify(r,null,2)),p(!0),c==null||c(r),setTimeout(()=>p(!1),2e3)}catch(f){console.error("Failed to copy:",f)}},[r,c]);return e.jsxs("div",{className:S.cn("Bear-JsonViewer","rounded-lg overflow-hidden font-mono text-sm",o),style:{backgroundColor:n.background},"data-testid":b,children:[y&&e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-gray-200 dark:border-gray-700",children:[e.jsx(A.Typography,{variant:"caption",className:"opacity-60",children:"JSON"}),e.jsx(I.Button,{variant:"ghost",size:"sm",onClick:a,className:"!py-1 !px-2 !text-xs",children:t?e.jsxs(e.Fragment,{children:[e.jsx(g.BearIcons.CheckIcon,{size:12,className:"mr-1"}),"Copied!"]}):e.jsxs(e.Fragment,{children:[e.jsx(g.BearIcons.CopyIcon,{size:12,className:"mr-1"}),"Copy"]})})]}),e.jsx("div",{className:"p-3 overflow-x-auto",children:e.jsx(T,{name:j||"",value:r,path:[],depth:0,defaultExpandDepth:s,showDataTypes:d,showArrayIndices:h,onValueClick:x})})]})};exports.JsonViewer=J;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=2,e={background:"var(--bear-bg-secondary, #f5f5f5)",string:"#22c55e",number:"#3b82f6",boolean:"#f59e0b",null:"#ef4444",key:"#ec4899",bracket:"var(--bear-text-secondary, #737373)",punctuation:"var(--bear-text-tertiary, #a3a3a3)"},r={background:"var(--bear-bg-secondary, #262626)",string:"#4ade80",number:"#60a5fa",boolean:"#fbbf24",null:"#f87171",key:"#f472b6",bracket:"var(--bear-text-secondary, #a3a3a3)",punctuation:"var(--bear-text-tertiary, #737373)"};exports.DARK_THEME=r;exports.DEFAULT_EXPAND_DEPTH=a;exports.DEFAULT_THEME=e;
@@ -0,0 +1,4 @@
1
+ import { JsonViewerTheme } from './JsonViewer.types';
2
+ export declare const DEFAULT_EXPAND_DEPTH = 2;
3
+ export declare const DEFAULT_THEME: JsonViewerTheme;
4
+ export declare const DARK_THEME: JsonViewerTheme;
@@ -0,0 +1,24 @@
1
+ const a = 2, e = {
2
+ background: "var(--bear-bg-secondary, #f5f5f5)",
3
+ string: "#22c55e",
4
+ number: "#3b82f6",
5
+ boolean: "#f59e0b",
6
+ null: "#ef4444",
7
+ key: "#ec4899",
8
+ bracket: "var(--bear-text-secondary, #737373)",
9
+ punctuation: "var(--bear-text-tertiary, #a3a3a3)"
10
+ }, r = {
11
+ background: "var(--bear-bg-secondary, #262626)",
12
+ string: "#4ade80",
13
+ number: "#60a5fa",
14
+ boolean: "#fbbf24",
15
+ null: "#f87171",
16
+ key: "#f472b6",
17
+ bracket: "var(--bear-text-secondary, #a3a3a3)",
18
+ punctuation: "var(--bear-text-tertiary, #737373)"
19
+ };
20
+ export {
21
+ r as DARK_THEME,
22
+ a as DEFAULT_EXPAND_DEPTH,
23
+ e as DEFAULT_THEME
24
+ };
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { JsonViewerProps } from './JsonViewer.types';
3
+ /**
4
+ * JsonViewer - Pretty-print and explore JSON data
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <JsonViewer
9
+ * data={{ name: 'John', age: 30, active: true }}
10
+ * defaultExpandDepth={3}
11
+ * showDataTypes
12
+ * showCopyButton
13
+ * />
14
+ * ```
15
+ */
16
+ export declare const JsonViewer: FC<JsonViewerProps>;
17
+ export default JsonViewer;
@@ -0,0 +1,195 @@
1
+ import { jsxs as o, jsx as e, Fragment as g } from "react/jsx-runtime";
2
+ import { useState as j, useCallback as v, useMemo as F } from "react";
3
+ import { cn as I } from "../../utils/cn.js";
4
+ import { useBear as T } from "../../context/BearProvider.js";
5
+ import { Typography as _ } from "../Typography/Typography.js";
6
+ import { Button as H } from "../Button/Button.js";
7
+ import { BearIcons as b } from "../Icon/index.js";
8
+ import { DARK_THEME as B, DEFAULT_THEME as C, DEFAULT_EXPAND_DEPTH as L } from "./JsonViewer.const.js";
9
+ const z = ({
10
+ name: r,
11
+ value: t,
12
+ path: d,
13
+ depth: h,
14
+ defaultExpandDepth: y,
15
+ showDataTypes: u,
16
+ showArrayIndices: p,
17
+ onValueClick: c
18
+ }) => {
19
+ const [l, x] = j(h < y), { mode: N } = T(), n = N === "dark" ? B : C, s = F(() => t === null ? "null" : Array.isArray(t) ? "array" : typeof t, [t]), m = s === "object" || s === "array", a = m && Object.keys(t).length === 0, k = v(() => {
20
+ x((i) => !i);
21
+ }, []), f = v(() => {
22
+ c == null || c(d, t);
23
+ }, [d, t, c]), A = () => {
24
+ switch (s) {
25
+ case "string":
26
+ return /* @__PURE__ */ o(
27
+ "span",
28
+ {
29
+ style: { color: n.string },
30
+ className: "cursor-pointer hover:underline",
31
+ onClick: f,
32
+ children: [
33
+ '"',
34
+ t,
35
+ '"'
36
+ ]
37
+ }
38
+ );
39
+ case "number":
40
+ return /* @__PURE__ */ e(
41
+ "span",
42
+ {
43
+ style: { color: n.number },
44
+ className: "cursor-pointer hover:underline",
45
+ onClick: f,
46
+ children: String(t)
47
+ }
48
+ );
49
+ case "boolean":
50
+ return /* @__PURE__ */ e(
51
+ "span",
52
+ {
53
+ style: { color: n.boolean },
54
+ className: "cursor-pointer hover:underline",
55
+ onClick: f,
56
+ children: String(t)
57
+ }
58
+ );
59
+ case "null":
60
+ return /* @__PURE__ */ e(
61
+ "span",
62
+ {
63
+ style: { color: n.null },
64
+ className: "cursor-pointer hover:underline",
65
+ onClick: f,
66
+ children: "null"
67
+ }
68
+ );
69
+ default:
70
+ return null;
71
+ }
72
+ }, E = () => {
73
+ if (!u) return null;
74
+ const i = s === "array" ? `Array(${t.length})` : s === "object" ? "Object" : s;
75
+ return /* @__PURE__ */ e("span", { className: "text-[10px] opacity-50 ml-1", children: i });
76
+ };
77
+ if (!m)
78
+ return /* @__PURE__ */ o("div", { className: "flex items-center gap-1 py-0.5", children: [
79
+ /* @__PURE__ */ e("span", { className: "w-4" }),
80
+ " ",
81
+ (p || typeof r == "string") && /* @__PURE__ */ o(g, { children: [
82
+ /* @__PURE__ */ e("span", { style: { color: n.key }, children: typeof r == "string" ? `"${r}"` : r }),
83
+ /* @__PURE__ */ e("span", { style: { color: n.punctuation }, children: ":" })
84
+ ] }),
85
+ A(),
86
+ E()
87
+ ] });
88
+ const J = Object.entries(t), O = s === "array" ? "[" : "{", w = s === "array" ? "]" : "}";
89
+ return /* @__PURE__ */ o("div", { className: "py-0.5", children: [
90
+ /* @__PURE__ */ o(
91
+ "div",
92
+ {
93
+ className: "flex items-center gap-1 cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 rounded px-1 -mx-1",
94
+ onClick: k,
95
+ children: [
96
+ /* @__PURE__ */ e("span", { className: "w-4 flex items-center justify-center text-gray-400", children: a ? null : l ? /* @__PURE__ */ e(b.ChevronDownIcon, { size: 12 }) : /* @__PURE__ */ e(b.ChevronRightIcon, { size: 12 }) }),
97
+ (p || typeof r == "string") && r !== "" && /* @__PURE__ */ o(g, { children: [
98
+ /* @__PURE__ */ e("span", { style: { color: n.key }, children: typeof r == "string" ? `"${r}"` : r }),
99
+ /* @__PURE__ */ e("span", { style: { color: n.punctuation }, children: ":" })
100
+ ] }),
101
+ /* @__PURE__ */ e("span", { style: { color: n.bracket }, children: O }),
102
+ !l && !a && /* @__PURE__ */ e("span", { className: "text-gray-400 text-xs", children: "..." }),
103
+ (!l || a) && /* @__PURE__ */ e("span", { style: { color: n.bracket }, children: w }),
104
+ E()
105
+ ]
106
+ }
107
+ ),
108
+ l && !a && /* @__PURE__ */ e("div", { className: "ml-4 border-l border-gray-200 dark:border-gray-700 pl-2", children: J.map(([i, S], D) => /* @__PURE__ */ e(
109
+ z,
110
+ {
111
+ name: s === "array" ? D : i,
112
+ value: S,
113
+ path: [...d, i],
114
+ depth: h + 1,
115
+ defaultExpandDepth: y,
116
+ showDataTypes: u,
117
+ showArrayIndices: p,
118
+ onValueClick: c
119
+ },
120
+ i
121
+ )) }),
122
+ l && !a && /* @__PURE__ */ o("div", { className: "flex items-center", children: [
123
+ /* @__PURE__ */ e("span", { className: "w-4" }),
124
+ /* @__PURE__ */ e("span", { style: { color: n.bracket }, children: w })
125
+ ] })
126
+ ] });
127
+ }, G = ({
128
+ data: r,
129
+ defaultExpandDepth: t = L,
130
+ showDataTypes: d = !1,
131
+ showArrayIndices: h = !0,
132
+ showCopyButton: y = !0,
133
+ rootName: u = "root",
134
+ onValueClick: p,
135
+ onCopy: c,
136
+ className: l,
137
+ testId: x
138
+ }) => {
139
+ const { mode: N } = T(), n = N === "dark" ? B : C, [s, m] = j(!1), a = v(async () => {
140
+ try {
141
+ await navigator.clipboard.writeText(JSON.stringify(r, null, 2)), m(!0), c == null || c(r), setTimeout(() => m(!1), 2e3);
142
+ } catch (k) {
143
+ console.error("Failed to copy:", k);
144
+ }
145
+ }, [r, c]);
146
+ return /* @__PURE__ */ o(
147
+ "div",
148
+ {
149
+ className: I(
150
+ "Bear-JsonViewer",
151
+ "rounded-lg overflow-hidden font-mono text-sm",
152
+ l
153
+ ),
154
+ style: { backgroundColor: n.background },
155
+ "data-testid": x,
156
+ children: [
157
+ y && /* @__PURE__ */ o("div", { className: "flex items-center justify-between px-3 py-2 border-b border-gray-200 dark:border-gray-700", children: [
158
+ /* @__PURE__ */ e(_, { variant: "caption", className: "opacity-60", children: "JSON" }),
159
+ /* @__PURE__ */ e(
160
+ H,
161
+ {
162
+ variant: "ghost",
163
+ size: "sm",
164
+ onClick: a,
165
+ className: "!py-1 !px-2 !text-xs",
166
+ children: s ? /* @__PURE__ */ o(g, { children: [
167
+ /* @__PURE__ */ e(b.CheckIcon, { size: 12, className: "mr-1" }),
168
+ "Copied!"
169
+ ] }) : /* @__PURE__ */ o(g, { children: [
170
+ /* @__PURE__ */ e(b.CopyIcon, { size: 12, className: "mr-1" }),
171
+ "Copy"
172
+ ] })
173
+ }
174
+ )
175
+ ] }),
176
+ /* @__PURE__ */ e("div", { className: "p-3 overflow-x-auto", children: /* @__PURE__ */ e(
177
+ z,
178
+ {
179
+ name: u || "",
180
+ value: r,
181
+ path: [],
182
+ depth: 0,
183
+ defaultExpandDepth: t,
184
+ showDataTypes: d,
185
+ showArrayIndices: h,
186
+ onValueClick: p
187
+ }
188
+ ) })
189
+ ]
190
+ }
191
+ );
192
+ };
193
+ export {
194
+ G as JsonViewer
195
+ };
@@ -0,0 +1,54 @@
1
+ /**
2
+ * JsonViewer component types
3
+ */
4
+ export interface JsonViewerProps {
5
+ /** JSON data to display */
6
+ data: unknown;
7
+ /** Number of levels to expand by default (default: 2) */
8
+ defaultExpandDepth?: number;
9
+ /** Expand all nodes */
10
+ expandAll?: boolean;
11
+ /** Collapse all nodes */
12
+ collapseAll?: boolean;
13
+ /** Show data types */
14
+ showDataTypes?: boolean;
15
+ /** Show array indices */
16
+ showArrayIndices?: boolean;
17
+ /** Show copy button */
18
+ showCopyButton?: boolean;
19
+ /** Enable search */
20
+ enableSearch?: boolean;
21
+ /** Custom theme colors */
22
+ theme?: JsonViewerTheme;
23
+ /** Root name (default: 'root') */
24
+ rootName?: string | false;
25
+ /** Callback when a value is clicked */
26
+ onValueClick?: (path: string[], value: unknown) => void;
27
+ /** Callback when copied */
28
+ onCopy?: (value: unknown) => void;
29
+ /** Custom class name */
30
+ className?: string;
31
+ /** Test ID */
32
+ testId?: string;
33
+ }
34
+ export interface JsonViewerTheme {
35
+ background?: string;
36
+ text?: string;
37
+ string?: string;
38
+ number?: string;
39
+ boolean?: string;
40
+ null?: string;
41
+ key?: string;
42
+ bracket?: string;
43
+ punctuation?: string;
44
+ }
45
+ export interface JsonNodeProps {
46
+ name: string | number;
47
+ value: unknown;
48
+ path: string[];
49
+ depth: number;
50
+ defaultExpandDepth: number;
51
+ showDataTypes: boolean;
52
+ showArrayIndices: boolean;
53
+ onValueClick?: (path: string[], value: unknown) => void;
54
+ }
@@ -0,0 +1,2 @@
1
+ export { JsonViewer } from './JsonViewer';
2
+ export type { JsonViewerProps, JsonViewerTheme } from './JsonViewer.types';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),K=require("react"),m=require("../../utils/cn.cjs");require("../../context/BearProvider.cjs");const P=require("../../hooks/useDragDrop/useDragDrop.cjs"),S="bear-kanban",$=({columns:n,onColumnsChange:o,onCardMove:p,renderCard:h,renderColumnHeader:u,disabled:y=!1,className:v})=>{const w=K.useCallback((r,e,i,b,d)=>{const l=n.find(a=>a.id===r),s=n.find(a=>a.id===e);if(!l||!s)return;const f=n.map(a=>{if(a.id===r){const c=a.cards.filter((x,g)=>g!==i);return{...a,cards:c}}if(a.id===e){const c=r===e&&i<b?b-1:b,x=[...a.cards];return x.splice(Math.max(0,c),0,d),{...a,cards:x}}return a});o==null||o(f),p==null||p(d.id,r,e,i,b)},[n,o,p]),{getDragProps:N,getDropProps:j,isDragging:_,draggedId:z,dragOverId:k}=P.useDragDrop({disabled:y,dragType:S,onDrop:(r,e,i,b,d)=>{var D;const l=String(r),s=String(e),f=l.split("-")[0],a=parseInt(l.split("-")[1],10)||0,c=s.endsWith("-col")?s.replace("-col",""):s.split("-")[0],x=s.endsWith("-col")?((D=n.find(q=>q.id===c))==null?void 0:D.cards.length)??0:parseInt(s.split("-")[1],10),g=d;g!=null&&g.id&&w(f,c,a,x,g)}});return t.jsx("div",{className:m.cn("Bear-Kanban bear-flex bear-gap-4 bear-overflow-x-auto bear-pb-4",y&&"bear-opacity-50 bear-pointer-events-none",v),children:n.map(r=>t.jsxs("div",{...j(`${r.id}-col`,r,0),className:m.cn("Bear-Kanban__column bear-flex-shrink-0 bear-w-72 bear-flex bear-flex-col bear-rounded-lg bear-bg-gray-100 dark:bear-bg-zinc-800/80 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-transition-colors",k===`${r.id}-col`&&"bear-border-bear-500 bear-bg-bear-500/5"),children:[t.jsx("div",{className:"bear-px-4 bear-py-3 bear-border-b bear-border-gray-200 dark:bear-border-zinc-700",children:u?u(r):t.jsx("h3",{className:"bear-text-sm bear-font-semibold bear-text-gray-900 dark:bear-text-white",children:r.title})}),t.jsx("div",{className:"bear-flex-1 bear-flex bear-flex-col bear-gap-2 bear-p-3 bear-min-h-[120px]",children:r.cards.map((e,i)=>{const b=`${r.id}-${i}`,d=_&&z===b;return t.jsx("div",{...j(b,e,i),...N(b,e,i),className:m.cn("Bear-Kanban__card bear-rounded-lg bear-bg-white dark:bear-bg-zinc-700/80 bear-border bear-border-gray-200 dark:bear-border-zinc-600 bear-p-3 bear-cursor-grab active:bear-cursor-grabbing bear-transition-all bear-shadow-sm",d&&"bear-opacity-50 bear-scale-95",k===b&&"bear-border-bear-500 bear-bg-bear-500/10"),children:h?h(e,r.id):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bear-font-medium bear-text-gray-900 dark:bear-text-white",children:e.title}),e.description&&t.jsx("div",{className:"bear-text-sm bear-text-gray-600 dark:bear-text-zinc-400 bear-mt-1",children:e.description}),e.meta&&t.jsx("div",{className:"bear-text-xs bear-text-gray-500 dark:bear-text-zinc-500 bear-mt-2",children:e.meta})]})},e.id)})})]},r.id))})};exports.Kanban=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),K=require("react"),m=require("../../utils/cn.cjs");require("../../context/BearProvider.cjs");const P=require("../../hooks/useDragDrop/useDragDrop.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const S="bear-kanban",$=({columns:n,onColumnsChange:o,onCardMove:p,renderCard:h,renderColumnHeader:u,disabled:y=!1,className:v})=>{const w=K.useCallback((r,e,i,b,d)=>{const l=n.find(a=>a.id===r),s=n.find(a=>a.id===e);if(!l||!s)return;const f=n.map(a=>{if(a.id===r){const c=a.cards.filter((x,g)=>g!==i);return{...a,cards:c}}if(a.id===e){const c=r===e&&i<b?b-1:b,x=[...a.cards];return x.splice(Math.max(0,c),0,d),{...a,cards:x}}return a});o==null||o(f),p==null||p(d.id,r,e,i,b)},[n,o,p]),{getDragProps:N,getDropProps:j,isDragging:_,draggedId:z,dragOverId:k}=P.useDragDrop({disabled:y,dragType:S,onDrop:(r,e,i,b,d)=>{var D;const l=String(r),s=String(e),f=l.split("-")[0],a=parseInt(l.split("-")[1],10)||0,c=s.endsWith("-col")?s.replace("-col",""):s.split("-")[0],x=s.endsWith("-col")?((D=n.find(q=>q.id===c))==null?void 0:D.cards.length)??0:parseInt(s.split("-")[1],10),g=d;g!=null&&g.id&&w(f,c,a,x,g)}});return t.jsx("div",{className:m.cn("Bear-Kanban bear-flex bear-gap-4 bear-overflow-x-auto bear-pb-4",y&&"bear-opacity-50 bear-pointer-events-none",v),children:n.map(r=>t.jsxs("div",{...j(`${r.id}-col`,r,0),className:m.cn("Bear-Kanban__column bear-flex-shrink-0 bear-w-72 bear-flex bear-flex-col bear-rounded-lg bear-bg-gray-100 dark:bear-bg-zinc-800/80 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-transition-colors",k===`${r.id}-col`&&"bear-border-bear-500 bear-bg-bear-500/5"),children:[t.jsx("div",{className:"bear-px-4 bear-py-3 bear-border-b bear-border-gray-200 dark:bear-border-zinc-700",children:u?u(r):t.jsx("h3",{className:"bear-text-sm bear-font-semibold bear-text-gray-900 dark:bear-text-white",children:r.title})}),t.jsx("div",{className:"bear-flex-1 bear-flex bear-flex-col bear-gap-2 bear-p-3 bear-min-h-[120px]",children:r.cards.map((e,i)=>{const b=`${r.id}-${i}`,d=_&&z===b;return t.jsx("div",{...j(b,e,i),...N(b,e,i),className:m.cn("Bear-Kanban__card bear-rounded-lg bear-bg-white dark:bear-bg-zinc-700/80 bear-border bear-border-gray-200 dark:bear-border-zinc-600 bear-p-3 bear-cursor-grab active:bear-cursor-grabbing bear-transition-all bear-shadow-sm",d&&"bear-opacity-50 bear-scale-95",k===b&&"bear-border-bear-500 bear-bg-bear-500/10"),children:h?h(e,r.id):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bear-font-medium bear-text-gray-900 dark:bear-text-white",children:e.title}),e.description&&t.jsx("div",{className:"bear-text-sm bear-text-gray-600 dark:bear-text-zinc-400 bear-mt-1",children:e.description}),e.meta&&t.jsx("div",{className:"bear-text-xs bear-text-gray-500 dark:bear-text-zinc-500 bear-mt-2",children:e.meta})]})},e.id)})})]},r.id))})};exports.Kanban=$;
@@ -3,9 +3,10 @@ import { useCallback as I } from "react";
3
3
  import { cn as f } from "../../utils/cn.js";
4
4
  import "../../context/BearProvider.js";
5
5
  import { useDragDrop as P } from "../../hooks/useDragDrop/useDragDrop.js";
6
- const S = "bear-kanban", O = ({
6
+ import "../../hooks/useBearComponent/useBearComponent.js";
7
+ const S = "bear-kanban", R = ({
7
8
  columns: d,
8
- onColumnsChange: o,
9
+ onColumnsChange: g,
9
10
  onCardMove: l,
10
11
  renderCard: h,
11
12
  renderColumnHeader: k,
@@ -13,30 +14,30 @@ const S = "bear-kanban", O = ({
13
14
  className: _
14
15
  }) => {
15
16
  const z = I(
16
- (r, e, t, b, n) => {
17
+ (r, e, b, t, n) => {
17
18
  const x = d.find((a) => a.id === r), s = d.find((a) => a.id === e);
18
19
  if (!x || !s) return;
19
20
  const m = d.map((a) => {
20
21
  if (a.id === r) {
21
- const c = a.cards.filter((g, p) => p !== t);
22
+ const c = a.cards.filter((o, p) => p !== b);
22
23
  return { ...a, cards: c };
23
24
  }
24
25
  if (a.id === e) {
25
- const c = r === e && t < b ? b - 1 : b, g = [...a.cards];
26
- return g.splice(Math.max(0, c), 0, n), { ...a, cards: g };
26
+ const c = r === e && b < t ? t - 1 : t, o = [...a.cards];
27
+ return o.splice(Math.max(0, c), 0, n), { ...a, cards: o };
27
28
  }
28
29
  return a;
29
30
  });
30
- o == null || o(m), l == null || l(n.id, r, e, t, b);
31
+ g == null || g(m), l == null || l(n.id, r, e, b, t);
31
32
  },
32
- [d, o, l]
33
+ [d, g, l]
33
34
  ), { getDragProps: u, getDropProps: w, isDragging: K, draggedId: $, dragOverId: N } = P({
34
35
  disabled: y,
35
36
  dragType: S,
36
- onDrop: (r, e, t, b, n) => {
37
+ onDrop: (r, e, b, t, n) => {
37
38
  var v;
38
- const x = String(r), s = String(e), m = x.split("-")[0], a = parseInt(x.split("-")[1], 10) || 0, c = s.endsWith("-col") ? s.replace("-col", "") : s.split("-")[0], g = s.endsWith("-col") ? ((v = d.find((j) => j.id === c)) == null ? void 0 : v.cards.length) ?? 0 : parseInt(s.split("-")[1], 10), p = n;
39
- p != null && p.id && z(m, c, a, g, p);
39
+ const x = String(r), s = String(e), m = x.split("-")[0], a = parseInt(x.split("-")[1], 10) || 0, c = s.endsWith("-col") ? s.replace("-col", "") : s.split("-")[0], o = s.endsWith("-col") ? ((v = d.find((j) => j.id === c)) == null ? void 0 : v.cards.length) ?? 0 : parseInt(s.split("-")[1], 10), p = n;
40
+ p != null && p.id && z(m, c, a, o, p);
40
41
  }
41
42
  });
42
43
  return /* @__PURE__ */ i(
@@ -57,17 +58,17 @@ const S = "bear-kanban", O = ({
57
58
  ),
58
59
  children: [
59
60
  /* @__PURE__ */ i("div", { className: "bear-px-4 bear-py-3 bear-border-b bear-border-gray-200 dark:bear-border-zinc-700", children: k ? k(r) : /* @__PURE__ */ i("h3", { className: "bear-text-sm bear-font-semibold bear-text-gray-900 dark:bear-text-white", children: r.title }) }),
60
- /* @__PURE__ */ i("div", { className: "bear-flex-1 bear-flex bear-flex-col bear-gap-2 bear-p-3 bear-min-h-[120px]", children: r.cards.map((e, t) => {
61
- const b = `${r.id}-${t}`, n = K && $ === b;
61
+ /* @__PURE__ */ i("div", { className: "bear-flex-1 bear-flex bear-flex-col bear-gap-2 bear-p-3 bear-min-h-[120px]", children: r.cards.map((e, b) => {
62
+ const t = `${r.id}-${b}`, n = K && $ === t;
62
63
  return /* @__PURE__ */ i(
63
64
  "div",
64
65
  {
65
- ...w(b, e, t),
66
- ...u(b, e, t),
66
+ ...w(t, e, b),
67
+ ...u(t, e, b),
67
68
  className: f(
68
69
  "Bear-Kanban__card bear-rounded-lg bear-bg-white dark:bear-bg-zinc-700/80 bear-border bear-border-gray-200 dark:bear-border-zinc-600 bear-p-3 bear-cursor-grab active:bear-cursor-grabbing bear-transition-all bear-shadow-sm",
69
70
  n && "bear-opacity-50 bear-scale-95",
70
- N === b && "bear-border-bear-500 bear-bg-bear-500/10"
71
+ N === t && "bear-border-bear-500 bear-bg-bear-500/10"
71
72
  ),
72
73
  children: h ? h(e, r.id) : /* @__PURE__ */ D(B, { children: [
73
74
  /* @__PURE__ */ i("div", { className: "bear-font-medium bear-text-gray-900 dark:bear-text-white", children: e.title }),
@@ -86,5 +87,5 @@ const S = "bear-kanban", O = ({
86
87
  );
87
88
  };
88
89
  export {
89
- O as Kanban
90
+ R as Kanban
90
91
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs"),x={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",shift:"⇧",enter:"↵",return:"↵",tab:"⇥",backspace:"⌫",delete:"⌦",escape:"⎋",esc:"⎋",up:"↑",down:"↓",left:"←",right:"→",space:"␣"},u=({children:l,keys:r,size:b="md",variant:s="default",className:c})=>{const i={sm:"bear-text-xs bear-px-1.5 bear-py-0.5 bear-min-w-[18px]",md:"bear-text-sm bear-px-2 bear-py-1 bear-min-w-[24px]",lg:"bear-text-base bear-px-2.5 bear-py-1.5 bear-min-w-[30px]"},o={default:"bear-bg-zinc-700 bear-border-zinc-600 bear-shadow-[0_1px_0_1px_rgba(0,0,0,0.3)]",outline:"bear-bg-transparent bear-border-zinc-500",ghost:"bear-bg-zinc-800/50 bear-border-transparent"},d=(a,n,m)=>{const p=x[a.toLowerCase()]||a.toUpperCase();return e.jsxs("span",{className:"bear-inline-flex bear-items-center",children:[e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s]),children:p}),!m&&e.jsx("span",{className:"bear-mx-1 bear-text-zinc-500",children:"+"})]},n)};return r&&r.length>0?e.jsx("span",{className:t.cn("bear-inline-flex bear-items-center",c),children:r.map((a,n)=>d(a,n,n===r.length-1))}):e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s],c),children:l})};exports.Kbd=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs");require("react");const x={cmd:"⌘",command:"⌘",ctrl:"⌃",control:"⌃",alt:"⌥",option:"⌥",shift:"⇧",enter:"↵",return:"↵",tab:"⇥",backspace:"⌫",delete:"⌦",escape:"⎋",esc:"⎋",up:"↑",down:"↓",left:"←",right:"→",space:"␣"},u=({children:l,keys:r,size:b="md",variant:s="default",className:c})=>{const i={sm:"bear-text-xs bear-px-1.5 bear-py-0.5 bear-min-w-[18px]",md:"bear-text-sm bear-px-2 bear-py-1 bear-min-w-[24px]",lg:"bear-text-base bear-px-2.5 bear-py-1.5 bear-min-w-[30px]"},o={default:"bear-bg-zinc-700 bear-border-zinc-600 bear-shadow-[0_1px_0_1px_rgba(0,0,0,0.3)]",outline:"bear-bg-transparent bear-border-zinc-500",ghost:"bear-bg-zinc-800/50 bear-border-transparent"},d=(a,n,m)=>{const p=x[a.toLowerCase()]||a.toUpperCase();return e.jsxs("span",{className:"bear-inline-flex bear-items-center",children:[e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s]),children:p}),!m&&e.jsx("span",{className:"bear-mx-1 bear-text-zinc-500",children:"+"})]},n)};return r&&r.length>0?e.jsx("span",{className:t.cn("bear-inline-flex bear-items-center",c),children:r.map((a,n)=>d(a,n,n===r.length-1))}):e.jsx("kbd",{className:t.cn("bear-inline-flex bear-items-center bear-justify-center bear-rounded bear-border bear-font-mono bear-font-medium bear-text-zinc-300",i[b],o[s],c),children:l})};exports.Kbd=u;