@forgedevstack/bear 1.2.3 → 1.2.4

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 (448) hide show
  1. package/dist/components/Accordion/Accordion.cjs +1 -1
  2. package/dist/components/Accordion/Accordion.js +45 -47
  3. package/dist/components/ActionIcon/ActionIcon.types.d.ts +1 -0
  4. package/dist/components/ActiveBar/ActiveBar.const.d.ts +1 -0
  5. package/dist/components/ActiveBar/ActiveBar.types.d.ts +2 -0
  6. package/dist/components/ActivityItem/ActivityItem.const.d.ts +1 -0
  7. package/dist/components/ActivityItem/ActivityItem.types.d.ts +2 -0
  8. package/dist/components/Affix/Affix.types.d.ts +1 -0
  9. package/dist/components/Alert/Alert.cjs +1 -1
  10. package/dist/components/Alert/Alert.js +16 -18
  11. package/dist/components/AlertDialog/AlertDialog.types.d.ts +1 -0
  12. package/dist/components/Anchor/Anchor.types.d.ts +1 -0
  13. package/dist/components/AnimatedCounter/AnimatedCounter.types.d.ts +1 -0
  14. package/dist/components/AppBar/AppBar.const.d.ts +1 -0
  15. package/dist/components/AppBar/AppBar.types.d.ts +2 -0
  16. package/dist/components/AspectRatio/AspectRatio.cjs +1 -1
  17. package/dist/components/AspectRatio/AspectRatio.const.d.ts +1 -0
  18. package/dist/components/AspectRatio/AspectRatio.js +9 -1
  19. package/dist/components/AspectRatio/AspectRatio.types.d.ts +2 -0
  20. package/dist/components/Autocomplete/Autocomplete.types.d.ts +1 -0
  21. package/dist/components/Avatar/Avatar.types.d.ts +1 -0
  22. package/dist/components/BackTop/BackTop.types.d.ts +1 -0
  23. package/dist/components/Badge/Badge.types.d.ts +1 -0
  24. package/dist/components/BearLoader/BearLoader.const.d.ts +1 -0
  25. package/dist/components/BearLoader/BearLoader.types.d.ts +1 -0
  26. package/dist/components/BearLogo/BearLogo.const.d.ts +1 -0
  27. package/dist/components/BearLogo/BearLogo.types.d.ts +2 -0
  28. package/dist/components/Biometric/Biometric.const.d.ts +1 -0
  29. package/dist/components/Biometric/Biometric.types.d.ts +1 -0
  30. package/dist/components/Blockquote/Blockquote.types.d.ts +1 -0
  31. package/dist/components/BottomNavigation/BottomNavigation.const.d.ts +1 -0
  32. package/dist/components/BottomNavigation/BottomNavigation.types.d.ts +2 -0
  33. package/dist/components/BottomSheet/BottomSheet.const.d.ts +1 -0
  34. package/dist/components/BottomSheet/BottomSheet.types.d.ts +2 -0
  35. package/dist/components/Box/Box.const.d.ts +1 -0
  36. package/dist/components/Box/Box.types.d.ts +3 -1
  37. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
  38. package/dist/components/Breadcrumbs/Breadcrumbs.js +21 -23
  39. package/dist/components/Button/Button.cjs +1 -1
  40. package/dist/components/Button/Button.js +112 -100
  41. package/dist/components/Button/Button.types.d.ts +5 -1
  42. package/dist/components/ButtonGroup/ButtonGroup.const.d.ts +1 -0
  43. package/dist/components/ButtonGroup/ButtonGroup.types.d.ts +1 -0
  44. package/dist/components/Calendar/Calendar.cjs +1 -1
  45. package/dist/components/Calendar/Calendar.js +3 -2
  46. package/dist/components/Calendar/Calendar.types.d.ts +1 -0
  47. package/dist/components/Card/Card.cjs +1 -1
  48. package/dist/components/Card/Card.js +15 -17
  49. package/dist/components/Card/Card.types.d.ts +1 -0
  50. package/dist/components/CardSkeleton/CardSkeleton.const.d.ts +1 -0
  51. package/dist/components/CardSkeleton/index.d.ts +2 -0
  52. package/dist/components/Carousel/Carousel.types.d.ts +1 -0
  53. package/dist/components/Cascader/Cascader.cjs +1 -1
  54. package/dist/components/Cascader/Cascader.d.ts +1 -2
  55. package/dist/components/Cascader/Cascader.js +3 -3
  56. package/dist/components/Cascader/Cascader.types.d.ts +1 -0
  57. package/dist/components/Chart/Chart.cjs +1 -1
  58. package/dist/components/Chart/Chart.js +6 -2
  59. package/dist/components/Chart/Chart.types.d.ts +1 -0
  60. package/dist/components/Chat/Chat.types.d.ts +1 -0
  61. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  62. package/dist/components/Checkbox/Checkbox.const.cjs +1 -0
  63. package/dist/components/Checkbox/Checkbox.const.d.ts +30 -0
  64. package/dist/components/Checkbox/Checkbox.const.js +58 -0
  65. package/dist/components/Checkbox/Checkbox.d.ts +0 -11
  66. package/dist/components/Checkbox/Checkbox.js +67 -110
  67. package/dist/components/Checkbox/Checkbox.types.d.ts +3 -12
  68. package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.cjs +1 -0
  69. package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.d.ts +2 -0
  70. package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.js +18 -0
  71. package/dist/components/Checkbox/helpers/CheckboxIndicatorIcon.types.d.ts +6 -0
  72. package/dist/components/Checkbox/helpers/index.d.ts +1 -0
  73. package/dist/components/Checkbox/index.d.ts +2 -2
  74. package/dist/components/CheckboxCard/CheckboxCard.types.d.ts +1 -0
  75. package/dist/components/Chip/Chip.const.d.ts +1 -0
  76. package/dist/components/Chip/Chip.types.d.ts +2 -0
  77. package/dist/components/CloseButton/CloseButton.const.d.ts +1 -0
  78. package/dist/components/CloseButton/CloseButton.types.d.ts +1 -0
  79. package/dist/components/CodeBlock/CodeBlock.cjs +2 -2
  80. package/dist/components/CodeBlock/CodeBlock.const.d.ts +1 -0
  81. package/dist/components/CodeBlock/CodeBlock.js +22 -24
  82. package/dist/components/CodeEditor/CodeEditor.types.d.ts +1 -0
  83. package/dist/components/Collapsible/Collapsible.const.d.ts +1 -0
  84. package/dist/components/Collapsible/Collapsible.types.d.ts +2 -0
  85. package/dist/components/ColorPicker/ColorPicker.types.d.ts +2 -0
  86. package/dist/components/ColorSwatch/ColorSwatch.types.d.ts +1 -0
  87. package/dist/components/Columns/Columns.const.d.ts +1 -0
  88. package/dist/components/Columns/Columns.types.d.ts +2 -0
  89. package/dist/components/CommandPalette/CommandPalette.types.d.ts +1 -0
  90. package/dist/components/Confetti/Confetti.types.d.ts +1 -0
  91. package/dist/components/Container/Container.const.d.ts +1 -0
  92. package/dist/components/Container/Container.types.d.ts +1 -0
  93. package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
  94. package/dist/components/ContextMenu/ContextMenu.const.cjs +1 -1
  95. package/dist/components/ContextMenu/ContextMenu.const.d.ts +3 -0
  96. package/dist/components/ContextMenu/ContextMenu.const.js +13 -10
  97. package/dist/components/ContextMenu/ContextMenu.d.ts +1 -3
  98. package/dist/components/ContextMenu/ContextMenu.js +30 -59
  99. package/dist/components/ContextMenu/ContextMenu.types.d.ts +1 -0
  100. package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -1
  101. package/dist/components/ContextMenu/ContextMenu.utils.d.ts +7 -0
  102. package/dist/components/ContextMenu/ContextMenu.utils.js +11 -2
  103. package/dist/components/ContextMenu/components/ContextMenuMenuList/ContextMenuMenuList.cjs +1 -0
  104. package/dist/components/ContextMenu/components/ContextMenuMenuList/ContextMenuMenuList.d.ts +11 -0
  105. package/dist/components/ContextMenu/components/ContextMenuMenuList/ContextMenuMenuList.js +69 -0
  106. package/dist/components/ContextMenu/components/ContextMenuMenuList/index.d.ts +1 -0
  107. package/dist/components/CopyButton/CopyButton.const.d.ts +1 -0
  108. package/dist/components/CopyButton/CopyButton.types.d.ts +2 -0
  109. package/dist/components/CountdownTimer/CountdownTimer.types.d.ts +1 -0
  110. package/dist/components/CreditInput/CreditInput.types.d.ts +1 -0
  111. package/dist/components/CssBaseline/CssBaseline.cjs +1 -0
  112. package/dist/components/CssBaseline/CssBaseline.const.cjs +5 -0
  113. package/dist/components/CssBaseline/CssBaseline.const.d.ts +2 -0
  114. package/dist/components/CssBaseline/CssBaseline.const.js +9 -0
  115. package/dist/components/CssBaseline/CssBaseline.d.ts +2 -0
  116. package/dist/components/CssBaseline/CssBaseline.js +24 -0
  117. package/dist/components/CssBaseline/CssBaseline.types.d.ts +4 -0
  118. package/dist/components/CssBaseline/index.d.ts +2 -0
  119. package/dist/components/CurrencyInput/CurrencyInput.types.d.ts +1 -0
  120. package/dist/components/DataTable/DataTable.const.d.ts +1 -0
  121. package/dist/components/DataTable/DataTable.types.d.ts +1 -0
  122. package/dist/components/DatePicker/DatePicker.cjs +1 -1
  123. package/dist/components/DatePicker/DatePicker.const.d.ts +1 -0
  124. package/dist/components/DatePicker/DatePicker.js +12 -11
  125. package/dist/components/DatePicker/DatePicker.types.d.ts +2 -0
  126. package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +1 -0
  127. package/dist/components/Descriptions/Descriptions.types.d.ts +1 -0
  128. package/dist/components/DiffSquares/DiffSquares.types.d.ts +1 -0
  129. package/dist/components/DiffViewer/DiffViewer.types.d.ts +1 -0
  130. package/dist/components/Divider/Divider.const.d.ts +1 -0
  131. package/dist/components/Divider/Divider.types.d.ts +1 -0
  132. package/dist/components/Dock/Dock.types.d.ts +1 -0
  133. package/dist/components/Drawer/Drawer.cjs +1 -1
  134. package/dist/components/Drawer/Drawer.js +44 -39
  135. package/dist/components/Drawer/Drawer.types.d.ts +5 -10
  136. package/dist/components/Dropdown/Dropdown.cjs +1 -1
  137. package/dist/components/Dropdown/Dropdown.js +3 -2
  138. package/dist/components/Dropdown/Dropdown.types.d.ts +1 -0
  139. package/dist/components/Editable/Editable.const.d.ts +1 -0
  140. package/dist/components/Editable/Editable.types.d.ts +2 -0
  141. package/dist/components/Em/Em.const.d.ts +1 -0
  142. package/dist/components/Em/Em.types.d.ts +2 -0
  143. package/dist/components/EmojiPicker/EmojiPicker.types.d.ts +2 -0
  144. package/dist/components/EmptyState/EmptyState.const.d.ts +1 -0
  145. package/dist/components/EmptyState/EmptyState.types.d.ts +2 -0
  146. package/dist/components/Fab/Fab.const.d.ts +1 -0
  147. package/dist/components/Fab/Fab.types.d.ts +1 -0
  148. package/dist/components/Fieldset/Fieldset.types.d.ts +1 -0
  149. package/dist/components/FileTree/FileTree.const.d.ts +1 -0
  150. package/dist/components/FileTree/FileTree.types.d.ts +1 -0
  151. package/dist/components/FileUpload/FileUpload.const.d.ts +1 -0
  152. package/dist/components/FileUpload/FileUpload.types.d.ts +2 -0
  153. package/dist/components/Flex/Flex.cjs +1 -1
  154. package/dist/components/Flex/Flex.const.cjs +1 -0
  155. package/dist/components/Flex/Flex.const.d.ts +6 -0
  156. package/dist/components/Flex/Flex.const.js +42 -0
  157. package/dist/components/Flex/Flex.d.ts +0 -11
  158. package/dist/components/Flex/Flex.js +28 -67
  159. package/dist/components/Flex/Flex.types.d.ts +1 -0
  160. package/dist/components/FloatingChat/FloatingChat.types.d.ts +1 -0
  161. package/dist/components/Form/Form.types.d.ts +1 -0
  162. package/dist/components/FormControl/FormControl.cjs +1 -0
  163. package/dist/components/FormControl/FormControl.const.cjs +1 -0
  164. package/dist/components/FormControl/FormControl.const.d.ts +5 -0
  165. package/dist/components/FormControl/FormControl.const.js +8 -0
  166. package/dist/components/FormControl/FormControl.context.cjs +1 -0
  167. package/dist/components/FormControl/FormControl.context.d.ts +2 -0
  168. package/dist/components/FormControl/FormControl.context.js +5 -0
  169. package/dist/components/FormControl/FormControl.d.ts +2 -0
  170. package/dist/components/FormControl/FormControl.js +90 -0
  171. package/dist/components/FormControl/FormControl.types.d.ts +19 -0
  172. package/dist/components/FormControl/index.d.ts +4 -0
  173. package/dist/components/FormField/FormField.cjs +1 -1
  174. package/dist/components/FormField/FormField.js +70 -67
  175. package/dist/components/FormField/FormField.types.d.ts +2 -0
  176. package/dist/components/FormSkeleton/FormSkeleton.cjs +1 -0
  177. package/dist/components/FormSkeleton/FormSkeleton.const.cjs +1 -0
  178. package/dist/components/FormSkeleton/FormSkeleton.const.d.ts +5 -0
  179. package/dist/components/FormSkeleton/FormSkeleton.const.js +8 -0
  180. package/dist/components/FormSkeleton/FormSkeleton.d.ts +2 -0
  181. package/dist/components/FormSkeleton/FormSkeleton.js +32 -0
  182. package/dist/components/FormSkeleton/FormSkeleton.types.d.ts +8 -0
  183. package/dist/components/FormSkeleton/index.d.ts +2 -0
  184. package/dist/components/Gauge/Gauge.cjs +1 -1
  185. package/dist/components/Gauge/Gauge.const.cjs +1 -0
  186. package/dist/components/Gauge/Gauge.const.d.ts +9 -0
  187. package/dist/components/Gauge/Gauge.const.js +12 -0
  188. package/dist/components/Gauge/Gauge.js +71 -95
  189. package/dist/components/Gauge/Gauge.types.d.ts +2 -0
  190. package/dist/components/Gauge/helpers/GaugeArcSvg.cjs +1 -0
  191. package/dist/components/Gauge/helpers/GaugeArcSvg.d.ts +14 -0
  192. package/dist/components/Gauge/helpers/GaugeArcSvg.js +65 -0
  193. package/dist/components/Gauge/hooks/useGauge.cjs +1 -0
  194. package/dist/components/Gauge/hooks/useGauge.d.ts +14 -0
  195. package/dist/components/Gauge/hooks/useGauge.js +42 -0
  196. package/dist/components/GlowCard/GlowCard.types.d.ts +1 -0
  197. package/dist/components/GradientText/GradientText.types.d.ts +1 -0
  198. package/dist/components/Grid/Grid.const.d.ts +1 -0
  199. package/dist/components/Grid/Grid.types.d.ts +1 -0
  200. package/dist/components/Heatmap/Heatmap.types.d.ts +1 -0
  201. package/dist/components/Highlight/Highlight.types.d.ts +1 -0
  202. package/dist/components/HoverCard/HoverCard.const.d.ts +1 -0
  203. package/dist/components/HoverCard/HoverCard.types.d.ts +2 -0
  204. package/dist/components/Icon/Icon.const.d.ts +1 -0
  205. package/dist/components/Icon/Icon.types.d.ts +1 -0
  206. package/dist/components/Icon/icons/misc.cjs +1 -1
  207. package/dist/components/Icon/icons/misc.d.ts +3 -0
  208. package/dist/components/Icon/icons/misc.js +118 -104
  209. package/dist/components/Icon/index.d.ts +3 -0
  210. package/dist/components/Image/Image.const.d.ts +1 -0
  211. package/dist/components/Image/Image.types.d.ts +2 -0
  212. package/dist/components/ImageAnnotation/ImageAnnotation.types.d.ts +1 -0
  213. package/dist/components/ImageGallery/ImageGallery.types.d.ts +1 -0
  214. package/dist/components/Indicator/Indicator.types.d.ts +1 -0
  215. package/dist/components/InfiniteScroll/InfiniteScroll.types.d.ts +1 -0
  216. package/dist/components/Input/Input.cjs +1 -1
  217. package/dist/components/Input/Input.const.cjs +1 -0
  218. package/dist/components/Input/Input.const.d.ts +13 -0
  219. package/dist/components/Input/Input.const.js +16 -0
  220. package/dist/components/Input/Input.js +216 -177
  221. package/dist/components/Input/Input.types.d.ts +8 -27
  222. package/dist/components/InputGroup/InputGroup.const.d.ts +1 -0
  223. package/dist/components/InputGroup/InputGroup.types.d.ts +1 -0
  224. package/dist/components/JsonViewer/JsonViewer.types.d.ts +1 -0
  225. package/dist/components/Kanban/Kanban.cjs +1 -1
  226. package/dist/components/Kanban/Kanban.const.d.ts +1 -0
  227. package/dist/components/Kanban/Kanban.js +9 -8
  228. package/dist/components/Kanban/Kanban.types.d.ts +2 -0
  229. package/dist/components/Kbd/Kbd.const.d.ts +1 -0
  230. package/dist/components/Kbd/Kbd.types.d.ts +2 -0
  231. package/dist/components/Link/Link.const.d.ts +1 -0
  232. package/dist/components/Link/Link.types.d.ts +1 -0
  233. package/dist/components/List/List.cjs +1 -1
  234. package/dist/components/List/List.const.cjs +1 -0
  235. package/dist/components/List/List.const.d.ts +11 -0
  236. package/dist/components/List/List.const.js +18 -0
  237. package/dist/components/List/List.js +96 -105
  238. package/dist/components/List/List.types.d.ts +2 -1
  239. package/dist/components/LoadingOverlay/LoadingOverlay.types.d.ts +1 -0
  240. package/dist/components/Map/Map.types.d.ts +1 -0
  241. package/dist/components/Mark/Mark.const.d.ts +1 -0
  242. package/dist/components/Mark/Mark.types.d.ts +2 -0
  243. package/dist/components/Marquee/Marquee.types.d.ts +1 -0
  244. package/dist/components/Masonry/Masonry.types.d.ts +1 -0
  245. package/dist/components/MediaPlayer/MediaPlayer.types.d.ts +1 -0
  246. package/dist/components/MentionsInput/MentionsInput.const.d.ts +1 -0
  247. package/dist/components/MentionsInput/MentionsInput.types.d.ts +2 -0
  248. package/dist/components/Menu/Menu.const.d.ts +1 -0
  249. package/dist/components/Menu/Menu.types.d.ts +1 -0
  250. package/dist/components/Modal/Modal.cjs +1 -1
  251. package/dist/components/Modal/Modal.js +46 -43
  252. package/dist/components/Modal/Modal.types.d.ts +3 -1
  253. package/dist/components/MultiSelect/MultiSelect.const.d.ts +1 -0
  254. package/dist/components/MultiSelect/MultiSelect.types.d.ts +1 -0
  255. package/dist/components/NavigableSelect/NavigableSelect.types.d.ts +1 -0
  256. package/dist/components/NotificationCenter/NotificationCenter.types.d.ts +1 -0
  257. package/dist/components/NumberFormatter/NumberFormatter.types.d.ts +1 -0
  258. package/dist/components/NumberInput/NumberInput.const.d.ts +1 -0
  259. package/dist/components/NumberInput/NumberInput.types.d.ts +2 -0
  260. package/dist/components/OTPInput/OTPInput.types.d.ts +2 -0
  261. package/dist/components/Overlay/Overlay.const.d.ts +1 -0
  262. package/dist/components/Overlay/Overlay.types.d.ts +1 -0
  263. package/dist/components/PageNav/PageNav.types.d.ts +1 -0
  264. package/dist/components/Pagination/Pagination.const.d.ts +1 -0
  265. package/dist/components/Pagination/Pagination.types.d.ts +1 -0
  266. package/dist/components/Paper/Paper.const.d.ts +1 -0
  267. package/dist/components/Paper/Paper.types.d.ts +1 -0
  268. package/dist/components/PasswordInput/PasswordInput.const.d.ts +1 -0
  269. package/dist/components/PasswordInput/PasswordInput.types.d.ts +2 -0
  270. package/dist/components/PhoneInput/PhoneInput.types.d.ts +1 -0
  271. package/dist/components/Popconfirm/Popconfirm.types.d.ts +1 -0
  272. package/dist/components/Popover/Popover.const.d.ts +1 -0
  273. package/dist/components/Popover/Popover.types.d.ts +2 -0
  274. package/dist/components/Portal/Portal.const.d.ts +1 -0
  275. package/dist/components/Progress/Progress.const.d.ts +1 -0
  276. package/dist/components/Progress/Progress.types.d.ts +1 -0
  277. package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +1 -0
  278. package/dist/components/QRCode/QRCode.types.d.ts +1 -0
  279. package/dist/components/Radio/Radio.cjs +1 -1
  280. package/dist/components/Radio/Radio.const.d.ts +1 -0
  281. package/dist/components/Radio/Radio.js +99 -96
  282. package/dist/components/Radio/Radio.types.d.ts +1 -0
  283. package/dist/components/RadioCard/RadioCard.types.d.ts +1 -0
  284. package/dist/components/Rating/Rating.types.d.ts +1 -0
  285. package/dist/components/ResizablePanel/ResizablePanel.types.d.ts +1 -0
  286. package/dist/components/ResizableTextarea/ResizableTextarea.types.d.ts +1 -0
  287. package/dist/components/Result/Result.types.d.ts +1 -0
  288. package/dist/components/RichEditor/RichEditor.cjs +1 -1
  289. package/dist/components/RichEditor/RichEditor.js +69 -71
  290. package/dist/components/RingProgress/RingProgress.types.d.ts +1 -0
  291. package/dist/components/ScrollArea/ScrollArea.const.d.ts +1 -0
  292. package/dist/components/ScrollArea/ScrollArea.types.d.ts +2 -0
  293. package/dist/components/SegmentedControl/SegmentedControl.const.d.ts +1 -0
  294. package/dist/components/SegmentedControl/SegmentedControl.types.d.ts +2 -0
  295. package/dist/components/Select/Select.cjs +1 -1
  296. package/dist/components/Select/Select.const.d.ts +1 -0
  297. package/dist/components/Select/Select.js +3 -2
  298. package/dist/components/Select/Select.types.d.ts +6 -1
  299. package/dist/components/Sidebar/Sidebar.cjs +1 -1
  300. package/dist/components/Sidebar/Sidebar.js +15 -17
  301. package/dist/components/SignPad/SignPad.cjs +1 -1
  302. package/dist/components/SignPad/SignPad.js +24 -26
  303. package/dist/components/Skeleton/Skeleton.types.d.ts +1 -0
  304. package/dist/components/Slider/Slider.const.d.ts +1 -0
  305. package/dist/components/Slider/Slider.types.d.ts +1 -0
  306. package/dist/components/SliderRange/SliderRange.const.d.ts +1 -0
  307. package/dist/components/SliderRange/SliderRange.types.d.ts +2 -0
  308. package/dist/components/Snackbar/Snackbar.cjs +1 -0
  309. package/dist/components/Snackbar/Snackbar.const.cjs +1 -0
  310. package/dist/components/Snackbar/Snackbar.const.d.ts +13 -0
  311. package/dist/components/Snackbar/Snackbar.const.js +18 -0
  312. package/dist/components/Snackbar/Snackbar.d.ts +2 -0
  313. package/dist/components/Snackbar/Snackbar.js +114 -0
  314. package/dist/components/Snackbar/Snackbar.types.d.ts +44 -0
  315. package/dist/components/Snackbar/hooks/index.d.ts +1 -0
  316. package/dist/components/Snackbar/hooks/useSnackbar.cjs +1 -0
  317. package/dist/components/Snackbar/hooks/useSnackbar.d.ts +2 -0
  318. package/dist/components/Snackbar/hooks/useSnackbar.js +42 -0
  319. package/dist/components/Snackbar/index.d.ts +3 -0
  320. package/dist/components/Sparkline/Sparkline.types.d.ts +2 -0
  321. package/dist/components/SpeedDial/SpeedDial.types.d.ts +1 -0
  322. package/dist/components/Spinner/Spinner.const.d.ts +1 -0
  323. package/dist/components/Spinner/Spinner.types.d.ts +2 -0
  324. package/dist/components/SplitButton/SplitButton.types.d.ts +1 -0
  325. package/dist/components/Spoiler/Spoiler.types.d.ts +1 -0
  326. package/dist/components/Spotlight/Spotlight.types.d.ts +1 -0
  327. package/dist/components/StatCard/StatCard.const.d.ts +1 -0
  328. package/dist/components/StatCard/StatCard.types.d.ts +2 -0
  329. package/dist/components/Statistic/Statistic.const.d.ts +1 -0
  330. package/dist/components/Statistic/Statistic.types.d.ts +2 -0
  331. package/dist/components/Stepper/Stepper.types.d.ts +1 -0
  332. package/dist/components/Switch/Switch.cjs +1 -1
  333. package/dist/components/Switch/Switch.const.cjs +1 -0
  334. package/dist/components/Switch/Switch.const.d.ts +54 -0
  335. package/dist/components/Switch/Switch.const.js +37 -0
  336. package/dist/components/Switch/Switch.d.ts +1 -2
  337. package/dist/components/Switch/Switch.js +51 -80
  338. package/dist/components/Switch/Switch.types.d.ts +18 -10
  339. package/dist/components/Switch/SwitchGroup.cjs +1 -0
  340. package/dist/components/Switch/SwitchGroup.d.ts +2 -0
  341. package/dist/components/Switch/SwitchGroup.js +50 -0
  342. package/dist/components/Switch/index.d.ts +2 -1
  343. package/dist/components/TableSkeleton/TableSkeleton.cjs +1 -0
  344. package/dist/components/TableSkeleton/TableSkeleton.const.cjs +1 -0
  345. package/dist/components/TableSkeleton/TableSkeleton.const.d.ts +6 -0
  346. package/dist/components/TableSkeleton/TableSkeleton.const.js +9 -0
  347. package/dist/components/TableSkeleton/TableSkeleton.d.ts +2 -0
  348. package/dist/components/TableSkeleton/TableSkeleton.js +51 -0
  349. package/dist/components/TableSkeleton/TableSkeleton.types.d.ts +9 -0
  350. package/dist/components/TableSkeleton/index.d.ts +2 -0
  351. package/dist/components/Tabs/Tabs.const.d.ts +1 -0
  352. package/dist/components/Tabs/Tabs.types.d.ts +1 -0
  353. package/dist/components/TagCloud/TagCloud.types.d.ts +1 -0
  354. package/dist/components/TagsInput/TagsInput.const.d.ts +1 -0
  355. package/dist/components/TagsInput/TagsInput.types.d.ts +2 -0
  356. package/dist/components/Terminal/Terminal.types.d.ts +1 -0
  357. package/dist/components/ThemeIcon/ThemeIcon.const.d.ts +1 -0
  358. package/dist/components/ThemeIcon/ThemeIcon.types.d.ts +1 -0
  359. package/dist/components/TimePicker/TimePicker.types.d.ts +2 -0
  360. package/dist/components/Timeline/Timeline.cjs +1 -1
  361. package/dist/components/Timeline/Timeline.const.cjs +1 -1
  362. package/dist/components/Timeline/Timeline.const.d.ts +21 -0
  363. package/dist/components/Timeline/Timeline.const.js +41 -20
  364. package/dist/components/Timeline/Timeline.d.ts +0 -15
  365. package/dist/components/Timeline/Timeline.js +133 -132
  366. package/dist/components/Timeline/Timeline.types.d.ts +7 -0
  367. package/dist/components/TimelineChart/TimelineChart.types.d.ts +1 -0
  368. package/dist/components/Toast/Toast.cjs +1 -1
  369. package/dist/components/Toast/Toast.const.d.ts +1 -0
  370. package/dist/components/Toast/Toast.js +6 -6
  371. package/dist/components/Toast/Toast.types.d.ts +1 -0
  372. package/dist/components/ToggleButton/ToggleButton.cjs +1 -0
  373. package/dist/components/ToggleButton/ToggleButton.const.cjs +1 -0
  374. package/dist/components/ToggleButton/ToggleButton.const.d.ts +6 -0
  375. package/dist/components/ToggleButton/ToggleButton.const.js +15 -0
  376. package/dist/components/ToggleButton/ToggleButton.d.ts +3 -0
  377. package/dist/components/ToggleButton/ToggleButton.js +89 -0
  378. package/dist/components/ToggleButton/ToggleButton.types.d.ts +30 -0
  379. package/dist/components/ToggleButton/index.d.ts +2 -0
  380. package/dist/components/Tooltip/Tooltip.const.d.ts +1 -0
  381. package/dist/components/Tooltip/Tooltip.types.d.ts +2 -0
  382. package/dist/components/Tour/Tour.types.d.ts +1 -0
  383. package/dist/components/TransferList/TransferList.const.d.ts +1 -0
  384. package/dist/components/TransferList/TransferList.types.d.ts +1 -0
  385. package/dist/components/Transition/Transition.types.d.ts +1 -0
  386. package/dist/components/TreeSelect/TreeSelect.types.d.ts +1 -0
  387. package/dist/components/TreeView/TreeView.const.d.ts +1 -0
  388. package/dist/components/TreeView/TreeView.types.d.ts +2 -0
  389. package/dist/components/Typewriter/Typewriter.types.d.ts +1 -0
  390. package/dist/components/Typography/Typography.types.d.ts +1 -0
  391. package/dist/components/VirtualList/VirtualList.cjs +1 -1
  392. package/dist/components/VirtualList/VirtualList.const.cjs +1 -0
  393. package/dist/components/VirtualList/VirtualList.const.d.ts +2 -0
  394. package/dist/components/VirtualList/VirtualList.const.js +4 -0
  395. package/dist/components/VirtualList/VirtualList.js +18 -39
  396. package/dist/components/VirtualList/VirtualList.types.d.ts +2 -0
  397. package/dist/components/VisuallyHidden/VisuallyHidden.const.d.ts +1 -0
  398. package/dist/components/Watermark/Watermark.types.d.ts +1 -0
  399. package/dist/components/index.cjs +1 -1
  400. package/dist/components/index.d.ts +15 -2
  401. package/dist/components/index.js +421 -402
  402. package/dist/context/BearProvider.cjs +1 -1
  403. package/dist/context/BearProvider.d.ts +21 -43
  404. package/dist/context/BearProvider.js +208 -163
  405. package/dist/context/bearProvider.const.cjs +1 -0
  406. package/dist/context/bearProvider.const.d.ts +7 -0
  407. package/dist/context/bearProvider.const.js +8 -0
  408. package/dist/context/bearProvider.types.d.ts +6 -0
  409. package/dist/context/index.cjs +1 -1
  410. package/dist/context/index.d.ts +2 -1
  411. package/dist/context/index.js +8 -6
  412. package/dist/hooks/index.cjs +1 -1
  413. package/dist/hooks/index.d.ts +2 -0
  414. package/dist/hooks/index.js +31 -27
  415. package/dist/hooks/useBearComponent/useBearComponent.cjs +1 -1
  416. package/dist/hooks/useBearComponent/useBearComponent.js +45 -44
  417. package/dist/hooks/useBearDefaultProps.cjs +1 -0
  418. package/dist/hooks/useBearDefaultProps.d.ts +2 -0
  419. package/dist/hooks/useBearDefaultProps.js +8 -0
  420. package/dist/hooks/useFormControl/index.d.ts +1 -0
  421. package/dist/hooks/useFormControl/useFormControl.cjs +1 -0
  422. package/dist/hooks/useFormControl/useFormControl.d.ts +2 -0
  423. package/dist/hooks/useFormControl/useFormControl.js +6 -0
  424. package/dist/index.cjs +1 -1
  425. package/dist/index.js +516 -479
  426. package/dist/styles.css +25 -21
  427. package/dist/types/base.types.d.ts +5 -0
  428. package/dist/types/component.types.d.ts +5 -0
  429. package/dist/types/index.d.ts +1 -0
  430. package/dist/utils/generateBearId.const.cjs +1 -0
  431. package/dist/utils/generateBearId.const.d.ts +5 -0
  432. package/dist/utils/generateBearId.const.js +8 -0
  433. package/dist/utils/generateBearId.types.d.ts +4 -0
  434. package/dist/utils/generateBearId.utils.cjs +1 -0
  435. package/dist/utils/generateBearId.utils.d.ts +4 -0
  436. package/dist/utils/generateBearId.utils.js +29 -0
  437. package/dist/utils/getResponsiveClass.utils.cjs +1 -0
  438. package/dist/utils/getResponsiveClass.utils.d.ts +2 -0
  439. package/dist/utils/getResponsiveClass.utils.js +12 -0
  440. package/dist/utils/index.cjs +1 -1
  441. package/dist/utils/index.d.ts +5 -0
  442. package/dist/utils/index.js +19 -5
  443. package/dist/utils/useBearId.cjs +1 -0
  444. package/dist/utils/useBearId.d.ts +1 -0
  445. package/dist/utils/useBearId.js +15 -0
  446. package/package.json +1 -1
  447. package/dist/components/Toast/Toast.utils.cjs +0 -1
  448. package/dist/components/Toast/Toast.utils.js +0 -4
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),r=require("react"),S=require("../../utils/cn.cjs"),y=require("../Button/Button.cjs"),s=require("./SignPad.const.cjs"),V=B=>{const{onChange:o,width:p,height:D=s.SIGN_PAD_DEFAULT_HEIGHT,strokeColor:O,strokeWidth:T=s.SIGN_PAD_DEFAULT_STROKE_WIDTH,backgroundColor:M,placeholder:U=s.SIGN_PAD_DEFAULT_PLACEHOLDER,disabled:a=!1,readOnly:c=!1,showClear:N=!0,showSave:m=!1,clearText:j="Clear",saveText:F="Save",outputFormat:P=s.SIGN_PAD_DEFAULT_OUTPUT_FORMAT,outputQuality:v=s.SIGN_PAD_DEFAULT_OUTPUT_QUALITY,className:H,testId:K,id:q,...W}=B,i=r.useRef(null),w=r.useRef(null),A=r.useRef(null),g=r.useRef(!1),[h,L]=r.useState(!1),[E,z]=r.useState(!1);r.useEffect(()=>{const e=()=>{z(document.documentElement.classList.contains("dark"))};e();const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[]);const k=O||(E?s.SIGN_PAD_STROKE_DARK:s.SIGN_PAD_STROKE_LIGHT),C=M||(E?s.SIGN_PAD_BG_DARK:s.SIGN_PAD_BG_LIGHT),_=r.useCallback(()=>{const e=i.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.fillStyle=C==="transparent"?"rgba(0,0,0,0)":C,t.fillRect(0,0,e.width,e.height))},[C]);r.useEffect(()=>{const e=i.current,t=w.current;if(!e||!t)return;const n=()=>{const d=t.getBoundingClientRect(),f=p??Math.round(d.width),G=D;(e.width!==f||e.height!==G)&&(e.width=f,e.height=G,_())};n();const l=new ResizeObserver(n);return l.observe(t),()=>l.disconnect()},[p,D,_]),r.useEffect(()=>{_()},[_,E]),r.useEffect(()=>{const e=i.current;if(!e||a||c)return;const t=n=>n.preventDefault();return e.addEventListener("touchstart",t,{passive:!1}),e.addEventListener("touchmove",t,{passive:!1}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",t)}},[a,c]);const b=r.useCallback(e=>{const t=i.current;if(!t)return{x:0,y:0};const n=t.getBoundingClientRect(),l=t.width/n.width,d=t.height/n.height;if("touches"in e){const f=e.touches[0];return{x:(f.clientX-n.left)*l,y:(f.clientY-n.top)*d}}return{x:(e.clientX-n.left)*l,y:(e.clientY-n.top)*d}},[]),I=r.useCallback(e=>{if(a||c)return;const t=b(e);g.current=!0,A.current=t},[a,c,b]),x=r.useCallback(e=>{if(!g.current||a||c)return;const t=i.current,n=t==null?void 0:t.getContext("2d"),l=A.current;if(!t||!n||!l)return;const d=b(e);n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(d.x,d.y),n.strokeStyle=k,n.lineWidth=T,n.lineCap="round",n.lineJoin="round",n.stroke(),A.current=d,L(!0)},[a,c,k,T,b]),R=r.useCallback(()=>{if(g.current){const e=i.current;if(e&&o){const t=e.toDataURL(P,v);o(t)}}g.current=!1,A.current=null},[o,P,v]),X=r.useCallback(()=>{const e=i.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.clearRect(0,0,e.width,e.height),_(),L(!1),o==null||o(null))},[_,o]),Y=r.useCallback(()=>{const e=i.current;if(!e||!h)return;const t=e.toDataURL(P,v);o==null||o(t)},[h,o,P,v]);return u.jsxs("div",{id:q,"data-testid":K,className:S.cn("Bear-SignPad bear-w-full",s.SIGN_PAD_ROOT_CLASSES,a&&"Bear-SignPad--disabled bear-opacity-50",c&&"Bear-SignPad--readonly",H),...W,children:[u.jsxs("div",{ref:w,className:S.cn("Bear-SignPad__canvas-wrapper bear-w-full bear-overflow-hidden","bear-touch-none",s.SIGN_PAD_CANVAS_WRAPPER_CLASSES,!a&&!c&&s.SIGN_PAD_CANVAS_WRAPPER_HOVER,a&&"bear-cursor-not-allowed",!a&&!c&&"bear-cursor-crosshair"),children:[u.jsx("canvas",{ref:i,className:"Bear-SignPad__canvas bear-block bear-rounded-lg bear-w-full bear-touch-none",style:{height:D},onMouseDown:I,onMouseMove:x,onMouseUp:R,onMouseLeave:R,onTouchStart:I,onTouchMove:x,onTouchEnd:R}),!h&&u.jsx("div",{className:S.cn("Bear-SignPad__placeholder",s.SIGN_PAD_PLACEHOLDER_CLASSES),children:U}),u.jsx("div",{className:S.cn("Bear-SignPad__line",s.SIGN_PAD_LINE_CLASSES)}),u.jsx("span",{className:S.cn("Bear-SignPad__x-mark",s.SIGN_PAD_X_MARK_CLASSES),children:"×"})]}),(N||m)&&u.jsxs("div",{className:S.cn("Bear-SignPad__actions",s.SIGN_PAD_ACTIONS_CLASSES),children:[N&&u.jsx(y.Button,{size:"sm",variant:"ghost",onClick:X,disabled:a||!h,children:j}),m&&u.jsx(y.Button,{size:"sm",variant:"primary",onClick:Y,disabled:a||!h,children:F})]})]})};exports.SignPad=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),r=require("react"),S=require("../../utils/cn.cjs"),y=require("../Button/Button.cjs"),s=require("./SignPad.const.cjs"),Y=B=>{const{onChange:o,width:p,height:D=s.SIGN_PAD_DEFAULT_HEIGHT,strokeColor:O,strokeWidth:T=s.SIGN_PAD_DEFAULT_STROKE_WIDTH,backgroundColor:M,placeholder:U=s.SIGN_PAD_DEFAULT_PLACEHOLDER,disabled:a=!1,readOnly:c=!1,showClear:N=!0,showSave:m=!1,clearText:j="Clear",saveText:F="Save",outputFormat:P=s.SIGN_PAD_DEFAULT_OUTPUT_FORMAT,outputQuality:v=s.SIGN_PAD_DEFAULT_OUTPUT_QUALITY,className:H,testId:K,...q}=B,i=r.useRef(null),w=r.useRef(null),A=r.useRef(null),g=r.useRef(!1),[h,L]=r.useState(!1),[E,W]=r.useState(!1);r.useEffect(()=>{const e=()=>{W(document.documentElement.classList.contains("dark"))};e();const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[]);const k=O||(E?s.SIGN_PAD_STROKE_DARK:s.SIGN_PAD_STROKE_LIGHT),C=M||(E?s.SIGN_PAD_BG_DARK:s.SIGN_PAD_BG_LIGHT),_=r.useCallback(()=>{const e=i.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.fillStyle=C==="transparent"?"rgba(0,0,0,0)":C,t.fillRect(0,0,e.width,e.height))},[C]);r.useEffect(()=>{const e=i.current,t=w.current;if(!e||!t)return;const n=()=>{const d=t.getBoundingClientRect(),f=p??Math.round(d.width),G=D;(e.width!==f||e.height!==G)&&(e.width=f,e.height=G,_())};n();const l=new ResizeObserver(n);return l.observe(t),()=>l.disconnect()},[p,D,_]),r.useEffect(()=>{_()},[_,E]),r.useEffect(()=>{const e=i.current;if(!e||a||c)return;const t=n=>n.preventDefault();return e.addEventListener("touchstart",t,{passive:!1}),e.addEventListener("touchmove",t,{passive:!1}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",t)}},[a,c]);const b=r.useCallback(e=>{const t=i.current;if(!t)return{x:0,y:0};const n=t.getBoundingClientRect(),l=t.width/n.width,d=t.height/n.height;if("touches"in e){const f=e.touches[0];return{x:(f.clientX-n.left)*l,y:(f.clientY-n.top)*d}}return{x:(e.clientX-n.left)*l,y:(e.clientY-n.top)*d}},[]),I=r.useCallback(e=>{if(a||c)return;const t=b(e);g.current=!0,A.current=t},[a,c,b]),x=r.useCallback(e=>{if(!g.current||a||c)return;const t=i.current,n=t==null?void 0:t.getContext("2d"),l=A.current;if(!t||!n||!l)return;const d=b(e);n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(d.x,d.y),n.strokeStyle=k,n.lineWidth=T,n.lineCap="round",n.lineJoin="round",n.stroke(),A.current=d,L(!0)},[a,c,k,T,b]),R=r.useCallback(()=>{if(g.current){const e=i.current;if(e&&o){const t=e.toDataURL(P,v);o(t)}}g.current=!1,A.current=null},[o,P,v]),z=r.useCallback(()=>{const e=i.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.clearRect(0,0,e.width,e.height),_(),L(!1),o==null||o(null))},[_,o]),X=r.useCallback(()=>{const e=i.current;if(!e||!h)return;const t=e.toDataURL(P,v);o==null||o(t)},[h,o,P,v]);return u.jsxs("div",{"data-testid":K,className:S.cn("Bear-SignPad bear-w-full",s.SIGN_PAD_ROOT_CLASSES,a&&"Bear-SignPad--disabled bear-opacity-50",c&&"Bear-SignPad--readonly",H),...q,children:[u.jsxs("div",{ref:w,className:S.cn("Bear-SignPad__canvas-wrapper bear-w-full bear-overflow-hidden","bear-touch-none",s.SIGN_PAD_CANVAS_WRAPPER_CLASSES,!a&&!c&&s.SIGN_PAD_CANVAS_WRAPPER_HOVER,a&&"bear-cursor-not-allowed",!a&&!c&&"bear-cursor-crosshair"),children:[u.jsx("canvas",{ref:i,className:"Bear-SignPad__canvas bear-block bear-rounded-lg bear-w-full bear-touch-none",style:{height:D},onMouseDown:I,onMouseMove:x,onMouseUp:R,onMouseLeave:R,onTouchStart:I,onTouchMove:x,onTouchEnd:R}),!h&&u.jsx("div",{className:S.cn("Bear-SignPad__placeholder",s.SIGN_PAD_PLACEHOLDER_CLASSES),children:U}),u.jsx("div",{className:S.cn("Bear-SignPad__line",s.SIGN_PAD_LINE_CLASSES)}),u.jsx("span",{className:S.cn("Bear-SignPad__x-mark",s.SIGN_PAD_X_MARK_CLASSES),children:"×"})]}),(N||m)&&u.jsxs("div",{className:S.cn("Bear-SignPad__actions",s.SIGN_PAD_ACTIONS_CLASSES),children:[N&&u.jsx(y.Button,{size:"sm",variant:"ghost",onClick:z,disabled:a||!h,children:j}),m&&u.jsx(y.Button,{size:"sm",variant:"primary",onClick:X,disabled:a||!h,children:F})]})]})};exports.SignPad=Y;
@@ -2,38 +2,37 @@ import { jsxs as T, jsx as d } from "react/jsx-runtime";
2
2
  import { useRef as p, useState as B, useEffect as D, useCallback as l } from "react";
3
3
  import { cn as _ } from "../../utils/cn.js";
4
4
  import { Button as M } from "../Button/Button.js";
5
- import { SIGN_PAD_DEFAULT_HEIGHT as Z, SIGN_PAD_DEFAULT_STROKE_WIDTH as $, SIGN_PAD_DEFAULT_PLACEHOLDER as ee, SIGN_PAD_DEFAULT_OUTPUT_FORMAT as te, SIGN_PAD_DEFAULT_OUTPUT_QUALITY as re, SIGN_PAD_BG_DARK as ne, SIGN_PAD_BG_LIGHT as oe, SIGN_PAD_STROKE_DARK as se, SIGN_PAD_STROKE_LIGHT as ae, SIGN_PAD_PLACEHOLDER_CLASSES as ce, SIGN_PAD_LINE_CLASSES as ie, SIGN_PAD_X_MARK_CLASSES as le, SIGN_PAD_CANVAS_WRAPPER_HOVER as ue, SIGN_PAD_CANVAS_WRAPPER_CLASSES as de, SIGN_PAD_ACTIONS_CLASSES as _e, SIGN_PAD_ROOT_CLASSES as he } from "./SignPad.const.js";
6
- const ge = (U) => {
5
+ import { SIGN_PAD_DEFAULT_HEIGHT as q, SIGN_PAD_DEFAULT_STROKE_WIDTH as Z, SIGN_PAD_DEFAULT_PLACEHOLDER as $, SIGN_PAD_DEFAULT_OUTPUT_FORMAT as ee, SIGN_PAD_DEFAULT_OUTPUT_QUALITY as te, SIGN_PAD_BG_DARK as re, SIGN_PAD_BG_LIGHT as ne, SIGN_PAD_STROKE_DARK as oe, SIGN_PAD_STROKE_LIGHT as se, SIGN_PAD_PLACEHOLDER_CLASSES as ae, SIGN_PAD_LINE_CLASSES as ce, SIGN_PAD_X_MARK_CLASSES as ie, SIGN_PAD_CANVAS_WRAPPER_HOVER as le, SIGN_PAD_CANVAS_WRAPPER_CLASSES as ue, SIGN_PAD_ACTIONS_CLASSES as de, SIGN_PAD_ROOT_CLASSES as _e } from "./SignPad.const.js";
6
+ const Pe = (U) => {
7
7
  const {
8
8
  onChange: o,
9
9
  width: w,
10
- height: m = Z,
10
+ height: m = q,
11
11
  strokeColor: F,
12
- strokeWidth: C = $,
12
+ strokeWidth: C = Z,
13
13
  backgroundColor: H,
14
- placeholder: K = ee,
14
+ placeholder: K = $,
15
15
  disabled: n = !1,
16
16
  readOnly: s = !1,
17
17
  showClear: L = !0,
18
18
  showSave: R = !1,
19
19
  clearText: W = "Clear",
20
20
  saveText: z = "Save",
21
- outputFormat: f = te,
22
- outputQuality: v = re,
21
+ outputFormat: f = ee,
22
+ outputQuality: v = te,
23
23
  className: X,
24
24
  testId: Y,
25
- id: V,
26
- ...j
27
- } = U, a = p(null), I = p(null), A = p(null), P = p(!1), [h, G] = B(!1), [E, Q] = B(!1);
25
+ ...V
26
+ } = U, a = p(null), I = p(null), A = p(null), P = p(!1), [h, G] = B(!1), [E, j] = B(!1);
28
27
  D(() => {
29
28
  const e = () => {
30
- Q(document.documentElement.classList.contains("dark"));
29
+ j(document.documentElement.classList.contains("dark"));
31
30
  };
32
31
  e();
33
32
  const t = new MutationObserver(e);
34
33
  return t.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] }), () => t.disconnect();
35
34
  }, []);
36
- const k = F || (E ? se : ae), b = H || (E ? ne : oe), u = l(() => {
35
+ const k = F || (E ? oe : se), b = H || (E ? re : ne), u = l(() => {
37
36
  const e = a.current, t = e == null ? void 0 : e.getContext("2d");
38
37
  !e || !t || (t.fillStyle = b === "transparent" ? "rgba(0,0,0,0)" : b, t.fillRect(0, 0, e.width, e.height));
39
38
  }, [b]);
@@ -91,10 +90,10 @@ const ge = (U) => {
91
90
  }
92
91
  }
93
92
  P.current = !1, A.current = null;
94
- }, [o, f, v]), J = l(() => {
93
+ }, [o, f, v]), Q = l(() => {
95
94
  const e = a.current, t = e == null ? void 0 : e.getContext("2d");
96
95
  !e || !t || (t.clearRect(0, 0, e.width, e.height), u(), G(!1), o == null || o(null));
97
- }, [u, o]), q = l(() => {
96
+ }, [u, o]), J = l(() => {
98
97
  const e = a.current;
99
98
  if (!e || !h) return;
100
99
  const t = e.toDataURL(f, v);
@@ -103,16 +102,15 @@ const ge = (U) => {
103
102
  return /* @__PURE__ */ T(
104
103
  "div",
105
104
  {
106
- id: V,
107
105
  "data-testid": Y,
108
106
  className: _(
109
107
  "Bear-SignPad bear-w-full",
110
- he,
108
+ _e,
111
109
  n && "Bear-SignPad--disabled bear-opacity-50",
112
110
  s && "Bear-SignPad--readonly",
113
111
  X
114
112
  ),
115
- ...j,
113
+ ...V,
116
114
  children: [
117
115
  /* @__PURE__ */ T(
118
116
  "div",
@@ -121,8 +119,8 @@ const ge = (U) => {
121
119
  className: _(
122
120
  "Bear-SignPad__canvas-wrapper bear-w-full bear-overflow-hidden",
123
121
  "bear-touch-none",
124
- de,
125
- !n && !s && ue,
122
+ ue,
123
+ !n && !s && le,
126
124
  n && "bear-cursor-not-allowed",
127
125
  !n && !s && "bear-cursor-crosshair"
128
126
  ),
@@ -142,20 +140,20 @@ const ge = (U) => {
142
140
  onTouchEnd: N
143
141
  }
144
142
  ),
145
- !h && /* @__PURE__ */ d("div", { className: _("Bear-SignPad__placeholder", ce), children: K }),
146
- /* @__PURE__ */ d("div", { className: _("Bear-SignPad__line", ie) }),
147
- /* @__PURE__ */ d("span", { className: _("Bear-SignPad__x-mark", le), children: "×" })
143
+ !h && /* @__PURE__ */ d("div", { className: _("Bear-SignPad__placeholder", ae), children: K }),
144
+ /* @__PURE__ */ d("div", { className: _("Bear-SignPad__line", ce) }),
145
+ /* @__PURE__ */ d("span", { className: _("Bear-SignPad__x-mark", ie), children: "×" })
148
146
  ]
149
147
  }
150
148
  ),
151
- (L || R) && /* @__PURE__ */ T("div", { className: _("Bear-SignPad__actions", _e), children: [
152
- L && /* @__PURE__ */ d(M, { size: "sm", variant: "ghost", onClick: J, disabled: n || !h, children: W }),
153
- R && /* @__PURE__ */ d(M, { size: "sm", variant: "primary", onClick: q, disabled: n || !h, children: z })
149
+ (L || R) && /* @__PURE__ */ T("div", { className: _("Bear-SignPad__actions", de), children: [
150
+ L && /* @__PURE__ */ d(M, { size: "sm", variant: "ghost", onClick: Q, disabled: n || !h, children: W }),
151
+ R && /* @__PURE__ */ d(M, { size: "sm", variant: "primary", onClick: J, disabled: n || !h, children: z })
154
152
  ] })
155
153
  ]
156
154
  }
157
155
  );
158
156
  };
159
157
  export {
160
- ge as SignPad
158
+ Pe as SignPad
161
159
  };
@@ -2,6 +2,7 @@ import { HTMLAttributes } from 'react';
2
2
  export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
3
3
  export type SkeletonAnimation = 'pulse' | 'wave' | 'none';
4
4
  export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
5
+ id?: string;
5
6
  /** Variant type */
6
7
  variant?: SkeletonVariant;
7
8
  /** Animation type */
@@ -0,0 +1 @@
1
+ export declare const S_L_I_D_E_R_ROOT_CLASS = "Bear-Slider";
@@ -1,6 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { BearSize, BearVariant } from '../../types';
3
3
  export interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
4
+ id?: string;
4
5
  /** Current value (controlled) */
5
6
  value?: number;
6
7
  /** Default value (uncontrolled) */
@@ -0,0 +1 @@
1
+ export declare const S_L_I_D_E_R_R_A_N_G_E_ROOT_CLASS = "Bear-SliderRange";
@@ -2,6 +2,8 @@ import { HTMLAttributes } from 'react';
2
2
  import { BearSize, BearVariant } from '../../types';
3
3
  export type SliderRangeValue = [number, number];
4
4
  export interface SliderRangeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
5
+ testId?: string;
6
+ id?: string;
5
7
  value?: SliderRangeValue;
6
8
  defaultValue?: SliderRangeValue;
7
9
  min?: number;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),E=require("react-dom"),T=require("../../utils/cn.cjs");require("react");const K=require("../../utils/generateBearId.utils.cjs"),w=require("../../utils/useBearId.cjs"),z=require("../Paper/Paper.cjs"),d=require("../Flex/Flex.cjs"),p=require("../Typography/Typography.cjs"),L=require("../Progress/Progress.cjs"),U=require("../CloseButton/CloseButton.cjs"),s=require("./Snackbar.const.cjs"),X=require("./hooks/useSnackbar.cjs"),Z=(c,a,o,t)=>{const e={zIndex:s.SNACKBAR_Z_INDEX};return c==="top"?e.top=t:e.bottom=t,a==="left"?(e.left=o,e.right="auto"):a==="right"?(e.right=o,e.left="auto"):(e.left="50%",e.right="auto",e.transform="translateX(-50%)"),e},H=c=>{const{open:a,message:o,description:t,action:e,autoHideDuration:f=s.SNACKBAR_DEFAULT_AUTO_HIDE_MS,onClose:i,anchorOrigin:u={vertical:"bottom",horizontal:"center"},offsetX:h=s.SNACKBAR_DEFAULT_OFFSET_X,offsetY:A=s.SNACKBAR_DEFAULT_OFFSET_Y,size:B="md",progress:x=null,progressPosition:b="bottom",progressColor:C="default",countdownProgress:N=!1,showCloseButton:k,closeOnClickOutside:y,container:I,id:O,testId:q,className:D}=c,F=w.useBearId("Snackbar"),R=K.resolveBearId(O,F),_=I??(typeof document<"u"?document.body:null),n=!!i,j=k??n,S=y??n,{surfaceRef:v,progressValue:g}=X.useSnackbar({open:a,autoHideDuration:f,onClose:i,countdownProgress:N,staticProgress:x,closeOnClickOutside:S});if(!a||!_)return null;const l=typeof g=="number",m=l?r.jsx(L.Progress,{value:g,size:"sm",color:C,className:"Bear-Snackbar__progress"}):null,P=r.jsxs(r.Fragment,{children:[S&&n&&r.jsx("div",{className:"Bear-Snackbar__backdrop bear-fixed bear-inset-0",style:{zIndex:s.SNACKBAR_BACKDROP_Z_INDEX},"aria-hidden":!0}),r.jsxs(z.Paper,{ref:v,id:R,"data-testid":q,role:"status","aria-live":"polite",elevation:4,rounded:"lg",padding:"none",background:"transparent",className:T.cn(s.SNACKBAR_ROOT_CLASS,s.SNACKBAR_SURFACE_CLASSES,"bear-fixed bear-flex bear-flex-col bear-overflow-hidden","bear-border bear-border-[var(--bear-border-default)]",s.SNACKBAR_SIZE_PADDING[B],D),style:Z(u.vertical,u.horizontal,h,A),children:[l&&b==="top"&&m,r.jsxs(d.Flex,{className:"Bear-Snackbar__content bear-w-full",align:"center",gap:3,children:[r.jsxs(d.Flex,{direction:"column",className:"Bear-Snackbar__text bear-flex-1 bear-min-w-0",gap:1,children:[o&&r.jsx(p.Typography,{variant:"body2",className:"Bear-Snackbar__message",children:o}),t&&r.jsx(p.Typography,{variant:"caption",color:"muted",className:"Bear-Snackbar__description",children:t})]}),e&&r.jsx(d.Flex,{className:"Bear-Snackbar__action bear-shrink-0",align:"center",children:e}),j&&n&&r.jsx(U.CloseButton,{size:"sm",onClick:i,"aria-label":"Dismiss notification",className:"Bear-Snackbar__close bear-shrink-0"})]}),l&&b==="bottom"&&m]})]});return E.createPortal(P,_)};exports.Snackbar=H;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A="Bear-Snackbar",_=6e3,S=24,R=24,C=1400,N=1399,E={sm:"bear-px-3 bear-py-2",md:"bear-px-4 bear-py-3",lg:"bear-px-5 bear-py-4"},K="bear-bg-[var(--bear-bg-primary)] bear-text-[var(--bear-text-primary)]",B=50,r=100,e=0;exports.SNACKBAR_BACKDROP_Z_INDEX=N;exports.SNACKBAR_COUNTDOWN_TICK_MS=B;exports.SNACKBAR_DEFAULT_AUTO_HIDE_MS=_;exports.SNACKBAR_DEFAULT_OFFSET_X=S;exports.SNACKBAR_DEFAULT_OFFSET_Y=R;exports.SNACKBAR_PROGRESS_MAX=r;exports.SNACKBAR_PROGRESS_MIN=e;exports.SNACKBAR_ROOT_CLASS=A;exports.SNACKBAR_SIZE_PADDING=E;exports.SNACKBAR_SURFACE_CLASSES=K;exports.SNACKBAR_Z_INDEX=C;
@@ -0,0 +1,13 @@
1
+ export declare const SNACKBAR_ROOT_CLASS = "Bear-Snackbar";
2
+ export declare const SNACKBAR_DEFAULT_AUTO_HIDE_MS = 6000;
3
+ export declare const SNACKBAR_DEFAULT_OFFSET_X = 24;
4
+ export declare const SNACKBAR_DEFAULT_OFFSET_Y = 24;
5
+ export declare const SNACKBAR_Z_INDEX = 1400;
6
+ export declare const SNACKBAR_BACKDROP_Z_INDEX = 1399;
7
+ export declare const SNACKBAR_ENTER_MS = 200;
8
+ export declare const SNACKBAR_EXIT_MS = 150;
9
+ export declare const SNACKBAR_SIZE_PADDING: Record<'sm' | 'md' | 'lg', string>;
10
+ export declare const SNACKBAR_SURFACE_CLASSES = "bear-bg-[var(--bear-bg-primary)] bear-text-[var(--bear-text-primary)]";
11
+ export declare const SNACKBAR_COUNTDOWN_TICK_MS = 50;
12
+ export declare const SNACKBAR_PROGRESS_MAX = 100;
13
+ export declare const SNACKBAR_PROGRESS_MIN = 0;
@@ -0,0 +1,18 @@
1
+ const A = "Bear-Snackbar", _ = 6e3, S = 24, r = 24, R = 1400, a = 1399, C = {
2
+ sm: "bear-px-3 bear-py-2",
3
+ md: "bear-px-4 bear-py-3",
4
+ lg: "bear-px-5 bear-py-4"
5
+ }, N = "bear-bg-[var(--bear-bg-primary)] bear-text-[var(--bear-text-primary)]", t = 50, e = 100, b = 0;
6
+ export {
7
+ a as SNACKBAR_BACKDROP_Z_INDEX,
8
+ t as SNACKBAR_COUNTDOWN_TICK_MS,
9
+ _ as SNACKBAR_DEFAULT_AUTO_HIDE_MS,
10
+ S as SNACKBAR_DEFAULT_OFFSET_X,
11
+ r as SNACKBAR_DEFAULT_OFFSET_Y,
12
+ e as SNACKBAR_PROGRESS_MAX,
13
+ b as SNACKBAR_PROGRESS_MIN,
14
+ A as SNACKBAR_ROOT_CLASS,
15
+ C as SNACKBAR_SIZE_PADDING,
16
+ N as SNACKBAR_SURFACE_CLASSES,
17
+ R as SNACKBAR_Z_INDEX
18
+ };
@@ -0,0 +1,2 @@
1
+ import { SnackbarProps } from './Snackbar.types';
2
+ export declare const Snackbar: (props: SnackbarProps) => import('react').ReactPortal | null;
@@ -0,0 +1,114 @@
1
+ import { jsxs as n, Fragment as T, jsx as r } from "react/jsx-runtime";
2
+ import { createPortal as w } from "react-dom";
3
+ import { cn as z } from "../../utils/cn.js";
4
+ import "react";
5
+ import { resolveBearId as L } from "../../utils/generateBearId.utils.js";
6
+ import { useBearId as U } from "../../utils/useBearId.js";
7
+ import { Paper as X } from "../Paper/Paper.js";
8
+ import { Flex as d } from "../Flex/Flex.js";
9
+ import { Typography as S } from "../Typography/Typography.js";
10
+ import { Progress as Z } from "../Progress/Progress.js";
11
+ import { CloseButton as j } from "../CloseButton/CloseButton.js";
12
+ import { SNACKBAR_DEFAULT_AUTO_HIDE_MS as H, SNACKBAR_DEFAULT_OFFSET_X as G, SNACKBAR_DEFAULT_OFFSET_Y as M, SNACKBAR_BACKDROP_Z_INDEX as V, SNACKBAR_SIZE_PADDING as Y, SNACKBAR_SURFACE_CLASSES as q, SNACKBAR_ROOT_CLASS as J, SNACKBAR_Z_INDEX as Q } from "./Snackbar.const.js";
13
+ import { useSnackbar as W } from "./hooks/useSnackbar.js";
14
+ const $ = (i, o, a, t) => {
15
+ const e = { zIndex: Q };
16
+ return i === "top" ? e.top = t : e.bottom = t, o === "left" ? (e.left = a, e.right = "auto") : o === "right" ? (e.right = a, e.left = "auto") : (e.left = "50%", e.right = "auto", e.transform = "translateX(-50%)"), e;
17
+ }, be = (i) => {
18
+ const {
19
+ open: o,
20
+ message: a,
21
+ description: t,
22
+ action: e,
23
+ autoHideDuration: g = H,
24
+ onClose: l,
25
+ anchorOrigin: m = { vertical: "bottom", horizontal: "center" },
26
+ offsetX: A = G,
27
+ offsetY: h = M,
28
+ size: B = "md",
29
+ progress: N = null,
30
+ progressPosition: u = "bottom",
31
+ progressColor: C = "default",
32
+ countdownProgress: k = !1,
33
+ showCloseButton: O,
34
+ closeOnClickOutside: x,
35
+ container: D,
36
+ id: I,
37
+ testId: R,
38
+ className: v
39
+ } = i, E = U("Snackbar"), y = L(I, E), b = D ?? (typeof document < "u" ? document.body : null), s = !!l, F = O ?? s, f = x ?? s, { surfaceRef: K, progressValue: p } = W({
40
+ open: o,
41
+ autoHideDuration: g,
42
+ onClose: l,
43
+ countdownProgress: k,
44
+ staticProgress: N,
45
+ closeOnClickOutside: f
46
+ });
47
+ if (!o || !b)
48
+ return null;
49
+ const c = typeof p == "number", _ = c ? /* @__PURE__ */ r(
50
+ Z,
51
+ {
52
+ value: p,
53
+ size: "sm",
54
+ color: C,
55
+ className: "Bear-Snackbar__progress"
56
+ }
57
+ ) : null, P = /* @__PURE__ */ n(T, { children: [
58
+ f && s && /* @__PURE__ */ r(
59
+ "div",
60
+ {
61
+ className: "Bear-Snackbar__backdrop bear-fixed bear-inset-0",
62
+ style: { zIndex: V },
63
+ "aria-hidden": !0
64
+ }
65
+ ),
66
+ /* @__PURE__ */ n(
67
+ X,
68
+ {
69
+ ref: K,
70
+ id: y,
71
+ "data-testid": R,
72
+ role: "status",
73
+ "aria-live": "polite",
74
+ elevation: 4,
75
+ rounded: "lg",
76
+ padding: "none",
77
+ background: "transparent",
78
+ className: z(
79
+ J,
80
+ q,
81
+ "bear-fixed bear-flex bear-flex-col bear-overflow-hidden",
82
+ "bear-border bear-border-[var(--bear-border-default)]",
83
+ Y[B],
84
+ v
85
+ ),
86
+ style: $(m.vertical, m.horizontal, A, h),
87
+ children: [
88
+ c && u === "top" && _,
89
+ /* @__PURE__ */ n(d, { className: "Bear-Snackbar__content bear-w-full", align: "center", gap: 3, children: [
90
+ /* @__PURE__ */ n(d, { direction: "column", className: "Bear-Snackbar__text bear-flex-1 bear-min-w-0", gap: 1, children: [
91
+ a && /* @__PURE__ */ r(S, { variant: "body2", className: "Bear-Snackbar__message", children: a }),
92
+ t && /* @__PURE__ */ r(S, { variant: "caption", color: "muted", className: "Bear-Snackbar__description", children: t })
93
+ ] }),
94
+ e && /* @__PURE__ */ r(d, { className: "Bear-Snackbar__action bear-shrink-0", align: "center", children: e }),
95
+ F && s && /* @__PURE__ */ r(
96
+ j,
97
+ {
98
+ size: "sm",
99
+ onClick: l,
100
+ "aria-label": "Dismiss notification",
101
+ className: "Bear-Snackbar__close bear-shrink-0"
102
+ }
103
+ )
104
+ ] }),
105
+ c && u === "bottom" && _
106
+ ]
107
+ }
108
+ )
109
+ ] });
110
+ return w(P, b);
111
+ };
112
+ export {
113
+ be as Snackbar
114
+ };
@@ -0,0 +1,44 @@
1
+ import { ReactNode, RefObject } from 'react';
2
+ import { BearSize } from '../../types';
3
+ export type SnackbarAnchorOriginVertical = 'top' | 'bottom';
4
+ export type SnackbarAnchorOriginHorizontal = 'left' | 'center' | 'right';
5
+ export type SnackbarProgressPosition = 'top' | 'bottom';
6
+ export type SnackbarSize = Extract<BearSize, 'sm' | 'md' | 'lg'>;
7
+ export type SnackbarProgressColor = 'default' | 'success' | 'warning' | 'danger' | 'info';
8
+ export interface SnackbarProps {
9
+ open: boolean;
10
+ message?: ReactNode;
11
+ description?: ReactNode;
12
+ action?: ReactNode;
13
+ autoHideDuration?: number | null;
14
+ onClose?: () => void;
15
+ anchorOrigin?: {
16
+ vertical: SnackbarAnchorOriginVertical;
17
+ horizontal: SnackbarAnchorOriginHorizontal;
18
+ };
19
+ offsetX?: number;
20
+ offsetY?: number;
21
+ size?: SnackbarSize;
22
+ progress?: number | null;
23
+ progressPosition?: SnackbarProgressPosition;
24
+ progressColor?: SnackbarProgressColor;
25
+ countdownProgress?: boolean;
26
+ showCloseButton?: boolean;
27
+ closeOnClickOutside?: boolean;
28
+ container?: Element | DocumentFragment | null;
29
+ className?: string;
30
+ id?: string;
31
+ testId?: string;
32
+ }
33
+ export interface UseSnackbarOptions {
34
+ open: boolean;
35
+ autoHideDuration: number | null;
36
+ onClose?: () => void;
37
+ countdownProgress?: boolean;
38
+ staticProgress?: number | null;
39
+ closeOnClickOutside?: boolean;
40
+ }
41
+ export interface UseSnackbarResult {
42
+ surfaceRef: RefObject<HTMLDivElement>;
43
+ progressValue: number | null;
44
+ }
@@ -0,0 +1 @@
1
+ export { useSnackbar } from './useSnackbar';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),r=require("../Snackbar.const.cjs"),_=R=>{const{open:t,autoHideDuration:e,onClose:n,countdownProgress:u=!1,staticProgress:i=null,closeOnClickOutside:S=!1}=R,a=s.useRef(null),[f,d]=s.useState(r.SNACKBAR_PROGRESS_MAX);return s.useEffect(()=>{if(!t||e===null||!n)return;const o=window.setTimeout(n,e);return()=>window.clearTimeout(o)},[t,e,n]),s.useEffect(()=>{if(!t||!u||e===null||e<=0)return;const o=Date.now();d(r.SNACKBAR_PROGRESS_MAX);const c=window.setInterval(()=>{const l=Date.now()-o,A=Math.min(1,l/e),w=Math.max(r.SNACKBAR_PROGRESS_MIN,r.SNACKBAR_PROGRESS_MAX-A*r.SNACKBAR_PROGRESS_MAX);d(w)},r.SNACKBAR_COUNTDOWN_TICK_MS);return()=>window.clearInterval(c)},[t,u,e]),s.useEffect(()=>{if(!t||!S||!n)return;const o=c=>{const l=c.target;a.current&&!a.current.contains(l)&&n()};return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[t,S,n]),{surfaceRef:a,progressValue:u?f:typeof i=="number"?i:null}};exports.useSnackbar=_;
@@ -0,0 +1,2 @@
1
+ import { UseSnackbarOptions, UseSnackbarResult } from '../Snackbar.types';
2
+ export declare const useSnackbar: (options: UseSnackbarOptions) => UseSnackbarResult;
@@ -0,0 +1,42 @@
1
+ import { useRef as p, useState as A, useEffect as l } from "react";
2
+ import { SNACKBAR_PROGRESS_MAX as r, SNACKBAR_COUNTDOWN_TICK_MS as C, SNACKBAR_PROGRESS_MIN as _ } from "../Snackbar.const.js";
3
+ const O = (m) => {
4
+ const {
5
+ open: t,
6
+ autoHideDuration: e,
7
+ onClose: n,
8
+ countdownProgress: s = !1,
9
+ staticProgress: i = null,
10
+ closeOnClickOutside: d = !1
11
+ } = m, u = p(null), [f, w] = A(r);
12
+ return l(() => {
13
+ if (!t || e === null || !n)
14
+ return;
15
+ const o = window.setTimeout(n, e);
16
+ return () => window.clearTimeout(o);
17
+ }, [t, e, n]), l(() => {
18
+ if (!t || !s || e === null || e <= 0)
19
+ return;
20
+ const o = Date.now();
21
+ w(r);
22
+ const a = window.setInterval(() => {
23
+ const c = Date.now() - o, S = Math.min(1, c / e), R = Math.max(
24
+ _,
25
+ r - S * r
26
+ );
27
+ w(R);
28
+ }, C);
29
+ return () => window.clearInterval(a);
30
+ }, [t, s, e]), l(() => {
31
+ if (!t || !d || !n)
32
+ return;
33
+ const o = (a) => {
34
+ const c = a.target;
35
+ u.current && !u.current.contains(c) && n();
36
+ };
37
+ return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
38
+ }, [t, d, n]), { surfaceRef: u, progressValue: s ? f : typeof i == "number" ? i : null };
39
+ };
40
+ export {
41
+ O as useSnackbar
42
+ };
@@ -0,0 +1,3 @@
1
+ export { Snackbar } from './Snackbar';
2
+ export { useSnackbar } from './hooks';
3
+ export type { SnackbarProps, SnackbarAnchorOriginVertical, SnackbarAnchorOriginHorizontal, SnackbarProgressColor, SnackbarProgressPosition, SnackbarSize, } from './Snackbar.types';
@@ -1,5 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export interface SparklineProps extends HTMLAttributes<HTMLDivElement> {
3
+ testId?: string;
4
+ id?: string;
3
5
  /** Data points (array of numbers) */
4
6
  data: number[];
5
7
  /** Width of the sparkline */
@@ -16,6 +16,7 @@ export interface SpeedDialAction {
16
16
  tooltipPosition?: 'left' | 'right' | 'top' | 'bottom';
17
17
  }
18
18
  export interface SpeedDialProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
19
+ id?: string;
19
20
  /** Array of actions */
20
21
  actions: SpeedDialAction[];
21
22
  /** Main button icon (when closed) */
@@ -0,0 +1 @@
1
+ export declare const S_P_I_N_N_E_R_ROOT_CLASS = "Bear-Spinner";
@@ -1,5 +1,7 @@
1
1
  import { BearSize } from '../../types';
2
2
  export interface SpinnerProps {
3
+ testId?: string;
4
+ id?: string;
3
5
  /** Spinner size */
4
6
  size?: BearSize;
5
7
  /** Additional class names */
@@ -8,6 +8,7 @@ export interface SplitButtonOption {
8
8
  onClick: () => void;
9
9
  }
10
10
  export interface SplitButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
11
+ id?: string;
11
12
  label: string;
12
13
  icon?: ReactNode;
13
14
  options: SplitButtonOption[];
@@ -1,5 +1,6 @@
1
1
  import { ReactNode, HTMLAttributes } from 'react';
2
2
  export interface SpoilerProps extends HTMLAttributes<HTMLDivElement> {
3
+ id?: string;
3
4
  maxHeight: number;
4
5
  showLabel?: string;
5
6
  hideLabel?: string;
@@ -22,6 +22,7 @@ export interface SpotlightAction {
22
22
  children?: SpotlightAction[];
23
23
  }
24
24
  export interface SpotlightProps {
25
+ id?: string;
25
26
  /** Available actions */
26
27
  actions: SpotlightAction[];
27
28
  /** Whether spotlight is open */
@@ -0,0 +1 @@
1
+ export declare const S_T_A_T_C_A_R_D_ROOT_CLASS = "Bear-StatCard";
@@ -1,5 +1,7 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface StatCardProps extends HTMLAttributes<HTMLDivElement> {
3
+ testId?: string;
4
+ id?: string;
3
5
  /** Card title */
4
6
  title: string;
5
7
  /** Main value to display */
@@ -0,0 +1 @@
1
+ export declare const S_T_A_T_I_S_T_I_C_ROOT_CLASS = "Bear-Statistic";
@@ -1,5 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface StatisticProps {
3
+ testId?: string;
4
+ id?: string;
3
5
  title: string;
4
6
  value: string | number;
5
7
  prefix?: ReactNode;
@@ -23,6 +23,7 @@ export interface Step {
23
23
  descriptionTypographyProps?: Partial<TypographyProps>;
24
24
  }
25
25
  export interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
26
+ id?: string;
26
27
  /** Array of steps */
27
28
  steps: Step[];
28
29
  /** Current active step (0-indexed) */
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("../../utils/cn.cjs");require("react");const g="Bear-Switch bear-inline-flex bear-items-center bear-gap-3 bear-cursor-pointer",h="bear-opacity-50 bear-cursor-not-allowed",C="Bear-Switch__track bear-relative bear-inline-flex bear-items-center bear-shrink-0 bear-rounded-full bear-transition-colors bear-duration-200 focus-within:bear-ring-2 focus-within:bear-ring-primary-500 focus-within:bear-ring-offset-2 focus-within:bear-ring-offset-white dark:focus-within:bear-ring-offset-zinc-900",p="bear-bg-primary-500",y="bear-bg-gray-300 dark:bear-bg-gray-600",E="Bear-Switch__thumb bear-absolute bear-top-0.5 bear-left-0.5 bear-rounded-full bear-bg-white bear-shadow bear-transition-transform bear-duration-200 bear-flex bear-items-center bear-justify-center",A="Bear-Switch__label bear-text-sm bear-text-gray-700 dark:bear-text-gray-300",l="Bear-Switch__icon bear-flex bear-items-center bear-justify-center",j={sm:{track:"bear-w-8 bear-h-4",thumb:"bear-w-3 bear-h-3",translate:"bear-translate-x-4",iconSize:8},md:{track:"bear-w-11 bear-h-6",thumb:"bear-w-5 bear-h-5",translate:"bear-translate-x-5",iconSize:12},lg:{track:"bear-w-14 bear-h-7",thumb:"bear-w-6 bear-h-6",translate:"bear-translate-x-7",iconSize:16}},T=({label:o,checked:a=!1,onCheckedChange:t,size:u="md",disabled:s=!1,uncheckedIcon:n,checkedIcon:b,showIconsInThumb:S=!1,className:f,testId:x,id:_,...m})=>{const w=()=>{s||t==null||t(!a)},i=j[u],c=n||b;return r.jsxs("label",{id:_,"data-testid":x,className:e.cn(g,s&&h,f),children:[r.jsx("input",{type:"checkbox",checked:a,onChange:w,disabled:s,className:"bear-sr-only",...m}),r.jsxs("span",{className:e.cn(C,a?p:y,i.track),children:[c&&!S&&r.jsxs(r.Fragment,{children:[r.jsx("span",{className:e.cn(l,"bear-absolute bear-left-1",a?"bear-text-white":"bear-text-transparent","bear-transition-colors bear-duration-200"),children:b}),r.jsx("span",{className:e.cn(l,"bear-absolute bear-right-1",a?"bear-text-transparent":"bear-text-gray-600 dark:bear-text-gray-400","bear-transition-colors bear-duration-200"),children:n})]}),r.jsx("span",{className:e.cn(E,a&&i.translate,i.thumb),children:c&&S&&r.jsx("span",{className:e.cn(l,a?"bear-text-primary-500":"bear-text-gray-400"),children:a?b:n})})]}),o&&r.jsx("span",{className:A,children:o})]})};exports.Switch=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),_=require("../../utils/cn.cjs");require("react");const S=require("./Switch.const.cjs"),O=i=>{const{label:T,checked:s=!1,onCheckedChange:e,size:t="md",orientation:o="horizontal",disabled:c=!1,uncheckedIcon:I,checkedIcon:n,showIconsInThumb:E=!1,className:N,testId:A,onChange:a,...W}=i,h=l=>{c||(e==null||e(l.target.checked),a==null||a(l))},H=S.SWITCH_SIZE_CLASSES[t],r=I||n,L=s?S.SWITCH_THUMB_TRANSLATE_PX[t]:0;return C.jsxs("label",{"data-testid":A,className:_.cn(S.SWITCH_ROOT_CLASSES,o==="vertical"?S.SWITCH_ROOT_VERTICAL:S.SWITCH_ROOT_HORIZONTAL,c&&S.SWITCH_DISABLED_CLASSES,N),children:[C.jsx("input",{type:"checkbox",checked:s,onChange:h,disabled:c,className:"bear-sr-only",...W}),C.jsxs("span",{className:_.cn(S.SWITCH_TRACK_BASE_CLASSES,s?S.SWITCH_TRACK_CHECKED_CLASSES:S.SWITCH_TRACK_UNCHECKED_CLASSES,H.track),children:[r&&!E&&C.jsxs(C.Fragment,{children:[C.jsx("span",{className:_.cn(S.SWITCH_ICON_CLASSES,S.SWITCH_ICON_LEFT_CLASSES,s?S.SWITCH_ICON_CHECKED_VISIBLE:S.SWITCH_ICON_CHECKED_HIDDEN),children:n}),C.jsx("span",{className:_.cn(S.SWITCH_ICON_CLASSES,S.SWITCH_ICON_RIGHT_CLASSES,s?S.SWITCH_ICON_CHECKED_HIDDEN:S.SWITCH_ICON_UNCHECKED_VISIBLE),children:I})]}),C.jsx("span",{className:_.cn(S.SWITCH_THUMB_BASE_CLASSES,H.thumb),style:{top:`${S.SWITCH_THUMB_OFFSET_PX}px`,left:`${S.SWITCH_THUMB_OFFSET_PX}px`,transform:`translateX(${L}px)`},children:r&&E&&C.jsx("span",{className:_.cn(S.SWITCH_ICON_CLASSES,s?S.SWITCH_ICON_THUMB_CHECKED:S.SWITCH_ICON_THUMB_UNCHECKED),children:s?n:I})})]}),T&&C.jsx("span",{className:S.SWITCH_LABEL_CLASSES,children:T})]})};exports.Switch=O;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={sm:16,md:20,lg:28},e=2,a="Bear-Switch bear-inline-flex bear-cursor-pointer",S="bear-items-center bear-gap-3",t="bear-flex-col bear-items-start bear-gap-2",_="bear-opacity-50 bear-cursor-not-allowed",C="Bear-Switch__track bear-relative bear-inline-flex bear-items-center bear-shrink-0 bear-rounded-full bear-transition-colors bear-duration-200 focus-within:bear-ring-2 focus-within:bear-ring-primary-500 focus-within:bear-ring-offset-2 focus-within:bear-ring-offset-white dark:focus-within:bear-ring-offset-zinc-900",b="bear-bg-primary-500",I="bear-bg-gray-300 dark:bear-bg-gray-600",T="Bear-Switch__thumb bear-absolute bear-rounded-full bear-bg-white bear-shadow bear-transition-transform bear-duration-200 bear-flex bear-items-center bear-justify-center bear-will-change-transform",o="Bear-Switch__label bear-text-sm bear-text-gray-700 dark:bear-text-gray-300",n="Bear-Switch__icon bear-flex bear-items-center bear-justify-center",E="bear-absolute bear-left-1 bear-transition-colors bear-duration-200",H="bear-absolute bear-right-1 bear-transition-colors bear-duration-200",i="bear-text-white",s="bear-text-transparent",c="bear-text-gray-600 dark:bear-text-gray-400",O="bear-text-primary-500",A="bear-text-gray-400",W={sm:{track:"bear-w-8 bear-h-4",thumb:"bear-w-3 bear-h-3"},md:{track:"bear-w-11 bear-h-6",thumb:"bear-w-5 bear-h-5"},lg:{track:"bear-w-14 bear-h-7",thumb:"bear-w-6 bear-h-6"}},L="Bear-SwitchGroup bear-inline-flex bear-rounded-full bear-bg-gray-200 dark:bear-bg-gray-700 bear-p-0.5",l="bear-flex-col bear-rounded-lg",g="bear-opacity-50 bear-pointer-events-none",u="Bear-SwitchGroup__option bear-relative bear-z-[1] bear-px-3 bear-py-1.5 bear-text-xs bear-font-medium bear-rounded-full bear-transition-colors bear-cursor-pointer bear-border-0 bear-bg-transparent",N="bear-bg-white dark:bear-bg-gray-900 bear-text-gray-900 dark:bear-text-white bear-shadow-sm",R="bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white";exports.SWITCH_DISABLED_CLASSES=_;exports.SWITCH_GROUP_DISABLED=g;exports.SWITCH_GROUP_OPTION=u;exports.SWITCH_GROUP_OPTION_ACTIVE=N;exports.SWITCH_GROUP_OPTION_INACTIVE=R;exports.SWITCH_GROUP_ROOT=L;exports.SWITCH_GROUP_VERTICAL=l;exports.SWITCH_ICON_CHECKED_HIDDEN=s;exports.SWITCH_ICON_CHECKED_VISIBLE=i;exports.SWITCH_ICON_CLASSES=n;exports.SWITCH_ICON_LEFT_CLASSES=E;exports.SWITCH_ICON_RIGHT_CLASSES=H;exports.SWITCH_ICON_THUMB_CHECKED=O;exports.SWITCH_ICON_THUMB_UNCHECKED=A;exports.SWITCH_ICON_UNCHECKED_VISIBLE=c;exports.SWITCH_LABEL_CLASSES=o;exports.SWITCH_ROOT_CLASSES=a;exports.SWITCH_ROOT_HORIZONTAL=S;exports.SWITCH_ROOT_VERTICAL=t;exports.SWITCH_SIZE_CLASSES=W;exports.SWITCH_THUMB_BASE_CLASSES=T;exports.SWITCH_THUMB_OFFSET_PX=e;exports.SWITCH_THUMB_TRANSLATE_PX=r;exports.SWITCH_TRACK_BASE_CLASSES=C;exports.SWITCH_TRACK_CHECKED_CLASSES=b;exports.SWITCH_TRACK_UNCHECKED_CLASSES=I;
@@ -0,0 +1,54 @@
1
+ export declare const S_W_I_T_C_H_ROOT_CLASS = "Bear-Switch";
2
+ export declare const SWITCH_THUMB_TRANSLATE_PX: {
3
+ readonly sm: 16;
4
+ readonly md: 20;
5
+ readonly lg: 28;
6
+ };
7
+ export declare const SWITCH_TRACK_WIDTH_PX: {
8
+ readonly sm: 32;
9
+ readonly md: 44;
10
+ readonly lg: 56;
11
+ };
12
+ export declare const SWITCH_THUMB_SIZE_PX: {
13
+ readonly sm: 12;
14
+ readonly md: 20;
15
+ readonly lg: 24;
16
+ };
17
+ export declare const SWITCH_THUMB_OFFSET_PX = 2;
18
+ export declare const SWITCH_ROOT_CLASSES = "Bear-Switch bear-inline-flex bear-cursor-pointer";
19
+ export declare const SWITCH_ROOT_HORIZONTAL = "bear-items-center bear-gap-3";
20
+ export declare const SWITCH_ROOT_VERTICAL = "bear-flex-col bear-items-start bear-gap-2";
21
+ export declare const SWITCH_DISABLED_CLASSES = "bear-opacity-50 bear-cursor-not-allowed";
22
+ export declare const SWITCH_TRACK_BASE_CLASSES = "Bear-Switch__track bear-relative bear-inline-flex bear-items-center bear-shrink-0 bear-rounded-full bear-transition-colors bear-duration-200 focus-within:bear-ring-2 focus-within:bear-ring-primary-500 focus-within:bear-ring-offset-2 focus-within:bear-ring-offset-white dark:focus-within:bear-ring-offset-zinc-900";
23
+ export declare const SWITCH_TRACK_CHECKED_CLASSES = "bear-bg-primary-500";
24
+ export declare const SWITCH_TRACK_UNCHECKED_CLASSES = "bear-bg-gray-300 dark:bear-bg-gray-600";
25
+ export declare const SWITCH_THUMB_BASE_CLASSES = "Bear-Switch__thumb bear-absolute bear-rounded-full bear-bg-white bear-shadow bear-transition-transform bear-duration-200 bear-flex bear-items-center bear-justify-center bear-will-change-transform";
26
+ export declare const SWITCH_LABEL_CLASSES = "Bear-Switch__label bear-text-sm bear-text-gray-700 dark:bear-text-gray-300";
27
+ export declare const SWITCH_ICON_CLASSES = "Bear-Switch__icon bear-flex bear-items-center bear-justify-center";
28
+ export declare const SWITCH_ICON_LEFT_CLASSES = "bear-absolute bear-left-1 bear-transition-colors bear-duration-200";
29
+ export declare const SWITCH_ICON_RIGHT_CLASSES = "bear-absolute bear-right-1 bear-transition-colors bear-duration-200";
30
+ export declare const SWITCH_ICON_CHECKED_VISIBLE = "bear-text-white";
31
+ export declare const SWITCH_ICON_CHECKED_HIDDEN = "bear-text-transparent";
32
+ export declare const SWITCH_ICON_UNCHECKED_VISIBLE = "bear-text-gray-600 dark:bear-text-gray-400";
33
+ export declare const SWITCH_ICON_THUMB_CHECKED = "bear-text-primary-500";
34
+ export declare const SWITCH_ICON_THUMB_UNCHECKED = "bear-text-gray-400";
35
+ export declare const SWITCH_SIZE_CLASSES: {
36
+ readonly sm: {
37
+ readonly track: "bear-w-8 bear-h-4";
38
+ readonly thumb: "bear-w-3 bear-h-3";
39
+ };
40
+ readonly md: {
41
+ readonly track: "bear-w-11 bear-h-6";
42
+ readonly thumb: "bear-w-5 bear-h-5";
43
+ };
44
+ readonly lg: {
45
+ readonly track: "bear-w-14 bear-h-7";
46
+ readonly thumb: "bear-w-6 bear-h-6";
47
+ };
48
+ };
49
+ export declare const SWITCH_GROUP_ROOT = "Bear-SwitchGroup bear-inline-flex bear-rounded-full bear-bg-gray-200 dark:bear-bg-gray-700 bear-p-0.5";
50
+ export declare const SWITCH_GROUP_VERTICAL = "bear-flex-col bear-rounded-lg";
51
+ export declare const SWITCH_GROUP_DISABLED = "bear-opacity-50 bear-pointer-events-none";
52
+ export declare const SWITCH_GROUP_OPTION = "Bear-SwitchGroup__option bear-relative bear-z-[1] bear-px-3 bear-py-1.5 bear-text-xs bear-font-medium bear-rounded-full bear-transition-colors bear-cursor-pointer bear-border-0 bear-bg-transparent";
53
+ export declare const SWITCH_GROUP_OPTION_ACTIVE = "bear-bg-white dark:bear-bg-gray-900 bear-text-gray-900 dark:bear-text-white bear-shadow-sm";
54
+ export declare const SWITCH_GROUP_OPTION_INACTIVE = "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white";