@forgedevstack/bear 1.1.3 → 1.1.8

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 (356) hide show
  1. package/README.md +19 -0
  2. package/dist/components/ActionIcon/ActionIcon.cjs +1 -0
  3. package/dist/components/ActionIcon/ActionIcon.const.cjs +1 -0
  4. package/dist/components/ActionIcon/ActionIcon.const.d.ts +7 -0
  5. package/dist/components/ActionIcon/ActionIcon.const.js +68 -0
  6. package/dist/components/ActionIcon/ActionIcon.d.ts +4 -0
  7. package/dist/components/ActionIcon/ActionIcon.js +42 -0
  8. package/dist/components/ActionIcon/ActionIcon.types.d.ts +11 -0
  9. package/dist/components/ActionIcon/index.d.ts +2 -0
  10. package/dist/components/Affix/Affix.cjs +1 -0
  11. package/dist/components/Affix/Affix.const.cjs +1 -0
  12. package/dist/components/Affix/Affix.const.d.ts +6 -0
  13. package/dist/components/Affix/Affix.const.js +9 -0
  14. package/dist/components/Affix/Affix.d.ts +4 -0
  15. package/dist/components/Affix/Affix.js +69 -0
  16. package/dist/components/Affix/Affix.types.d.ts +10 -0
  17. package/dist/components/Affix/index.d.ts +2 -0
  18. package/dist/components/Anchor/Anchor.cjs +1 -0
  19. package/dist/components/Anchor/Anchor.const.cjs +1 -0
  20. package/dist/components/Anchor/Anchor.const.d.ts +9 -0
  21. package/dist/components/Anchor/Anchor.const.js +11 -0
  22. package/dist/components/Anchor/Anchor.d.ts +4 -0
  23. package/dist/components/Anchor/Anchor.js +83 -0
  24. package/dist/components/Anchor/Anchor.types.d.ts +16 -0
  25. package/dist/components/Anchor/Anchor.utils.cjs +1 -0
  26. package/dist/components/Anchor/Anchor.utils.d.ts +2 -0
  27. package/dist/components/Anchor/Anchor.utils.js +12 -0
  28. package/dist/components/Anchor/index.d.ts +2 -0
  29. package/dist/components/Autocomplete/Autocomplete.cjs +1 -1
  30. package/dist/components/Autocomplete/Autocomplete.js +60 -67
  31. package/dist/components/Autocomplete/Autocomplete.utils.cjs +1 -0
  32. package/dist/components/Autocomplete/Autocomplete.utils.d.ts +2 -0
  33. package/dist/components/Autocomplete/Autocomplete.utils.js +12 -0
  34. package/dist/components/BackTop/BackTop.cjs +1 -1
  35. package/dist/components/BackTop/BackTop.js +10 -11
  36. package/dist/components/Blockquote/Blockquote.cjs +1 -0
  37. package/dist/components/Blockquote/Blockquote.const.cjs +1 -0
  38. package/dist/components/Blockquote/Blockquote.const.d.ts +5 -0
  39. package/dist/components/Blockquote/Blockquote.const.js +19 -0
  40. package/dist/components/Blockquote/Blockquote.d.ts +4 -0
  41. package/dist/components/Blockquote/Blockquote.js +56 -0
  42. package/dist/components/Blockquote/Blockquote.types.d.ts +9 -0
  43. package/dist/components/Blockquote/index.d.ts +2 -0
  44. package/dist/components/Button/Button.cjs +1 -1
  45. package/dist/components/Button/Button.constants.cjs +2 -2
  46. package/dist/components/Button/Button.constants.d.ts +1 -0
  47. package/dist/components/Button/Button.constants.js +12 -5
  48. package/dist/components/Button/Button.d.ts +0 -27
  49. package/dist/components/Button/Button.js +93 -105
  50. package/dist/components/Button/Button.types.d.ts +1 -0
  51. package/dist/components/Button/Button.utils.cjs +1 -0
  52. package/dist/components/Button/Button.utils.d.ts +2 -0
  53. package/dist/components/Button/Button.utils.js +5 -0
  54. package/dist/components/Button/useSpotlight.cjs +1 -0
  55. package/dist/components/Button/useSpotlight.d.ts +21 -0
  56. package/dist/components/Button/useSpotlight.js +28 -0
  57. package/dist/components/Chart/Chart.cjs +1 -1
  58. package/dist/components/Chart/Chart.const.cjs +1 -0
  59. package/dist/components/Chart/Chart.const.js +21 -0
  60. package/dist/components/Chart/Chart.js +55 -71
  61. package/dist/components/Chart/Chart.utils.cjs +1 -0
  62. package/dist/components/Chart/Chart.utils.js +5 -0
  63. package/dist/components/CheckboxCard/CheckboxCard.cjs +1 -0
  64. package/dist/components/CheckboxCard/CheckboxCard.const.cjs +1 -0
  65. package/dist/components/CheckboxCard/CheckboxCard.const.d.ts +7 -0
  66. package/dist/components/CheckboxCard/CheckboxCard.const.js +22 -0
  67. package/dist/components/CheckboxCard/CheckboxCard.d.ts +5 -0
  68. package/dist/components/CheckboxCard/CheckboxCard.js +132 -0
  69. package/dist/components/CheckboxCard/CheckboxCard.types.d.ts +21 -0
  70. package/dist/components/CheckboxCard/index.d.ts +2 -0
  71. package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
  72. package/dist/components/ColorPicker/ColorPicker.const.cjs +1 -0
  73. package/dist/components/ColorPicker/ColorPicker.const.d.ts +26 -0
  74. package/dist/components/ColorPicker/ColorPicker.const.js +38 -0
  75. package/dist/components/ColorPicker/ColorPicker.js +61 -78
  76. package/dist/components/ColorSwatch/ColorSwatch.cjs +1 -0
  77. package/dist/components/ColorSwatch/ColorSwatch.const.cjs +1 -0
  78. package/dist/components/ColorSwatch/ColorSwatch.const.d.ts +16 -0
  79. package/dist/components/ColorSwatch/ColorSwatch.const.js +19 -0
  80. package/dist/components/ColorSwatch/ColorSwatch.d.ts +5 -0
  81. package/dist/components/ColorSwatch/ColorSwatch.js +92 -0
  82. package/dist/components/ColorSwatch/ColorSwatch.types.d.ts +23 -0
  83. package/dist/components/ColorSwatch/ColorSwatch.utils.cjs +1 -0
  84. package/dist/components/ColorSwatch/ColorSwatch.utils.d.ts +6 -0
  85. package/dist/components/ColorSwatch/ColorSwatch.utils.js +14 -0
  86. package/dist/components/ColorSwatch/index.d.ts +2 -0
  87. package/dist/components/Confetti/Confetti.cjs +1 -1
  88. package/dist/components/Confetti/Confetti.js +37 -34
  89. package/dist/components/ContextMenu/ContextMenu.cjs +1 -0
  90. package/dist/components/ContextMenu/ContextMenu.const.cjs +1 -0
  91. package/dist/components/ContextMenu/ContextMenu.const.d.ts +9 -0
  92. package/dist/components/ContextMenu/ContextMenu.const.js +12 -0
  93. package/dist/components/ContextMenu/ContextMenu.d.ts +4 -0
  94. package/dist/components/ContextMenu/ContextMenu.js +65 -0
  95. package/dist/components/ContextMenu/ContextMenu.types.d.ts +23 -0
  96. package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -0
  97. package/dist/components/ContextMenu/ContextMenu.utils.d.ts +5 -0
  98. package/dist/components/ContextMenu/ContextMenu.utils.js +4 -0
  99. package/dist/components/ContextMenu/index.d.ts +2 -0
  100. package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -1
  101. package/dist/components/CountdownTimer/CountdownTimer.js +62 -71
  102. package/dist/components/CountdownTimer/CountdownTimer.utils.cjs +1 -0
  103. package/dist/components/CountdownTimer/CountdownTimer.utils.d.ts +3 -0
  104. package/dist/components/CountdownTimer/CountdownTimer.utils.js +16 -0
  105. package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -0
  106. package/dist/components/DateRangePicker/DateRangePicker.const.cjs +1 -0
  107. package/dist/components/DateRangePicker/DateRangePicker.const.d.ts +27 -0
  108. package/dist/components/DateRangePicker/DateRangePicker.const.js +74 -0
  109. package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
  110. package/dist/components/DateRangePicker/DateRangePicker.js +115 -0
  111. package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +26 -0
  112. package/dist/components/DateRangePicker/DateRangePicker.utils.cjs +1 -0
  113. package/dist/components/DateRangePicker/DateRangePicker.utils.d.ts +4 -0
  114. package/dist/components/DateRangePicker/DateRangePicker.utils.js +22 -0
  115. package/dist/components/DateRangePicker/index.d.ts +2 -0
  116. package/dist/components/Descriptions/Descriptions.cjs +1 -0
  117. package/dist/components/Descriptions/Descriptions.const.cjs +1 -0
  118. package/dist/components/Descriptions/Descriptions.const.d.ts +24 -0
  119. package/dist/components/Descriptions/Descriptions.const.js +27 -0
  120. package/dist/components/Descriptions/Descriptions.d.ts +4 -0
  121. package/dist/components/Descriptions/Descriptions.js +65 -0
  122. package/dist/components/Descriptions/Descriptions.types.d.ts +16 -0
  123. package/dist/components/Descriptions/index.d.ts +2 -0
  124. package/dist/components/Dock/Dock.cjs +1 -1
  125. package/dist/components/Dock/Dock.js +38 -43
  126. package/dist/components/Dock/Dock.utils.cjs +1 -0
  127. package/dist/components/Dock/Dock.utils.d.ts +1 -0
  128. package/dist/components/Dock/Dock.utils.js +10 -0
  129. package/dist/components/Dropdown/Dropdown.cjs +1 -1
  130. package/dist/components/Dropdown/Dropdown.js +59 -60
  131. package/dist/components/Fieldset/Fieldset.cjs +1 -0
  132. package/dist/components/Fieldset/Fieldset.const.cjs +1 -0
  133. package/dist/components/Fieldset/Fieldset.const.d.ts +5 -0
  134. package/dist/components/Fieldset/Fieldset.const.js +16 -0
  135. package/dist/components/Fieldset/Fieldset.d.ts +4 -0
  136. package/dist/components/Fieldset/Fieldset.js +47 -0
  137. package/dist/components/Fieldset/Fieldset.types.d.ts +10 -0
  138. package/dist/components/Fieldset/index.d.ts +2 -0
  139. package/dist/components/FileTree/FileTree.cjs +1 -1
  140. package/dist/components/FileTree/FileTree.js +20 -32
  141. package/dist/components/FileTree/FileTree.utils.cjs +1 -0
  142. package/dist/components/FileTree/FileTree.utils.d.ts +4 -0
  143. package/dist/components/FileTree/FileTree.utils.js +15 -0
  144. package/dist/components/GradientText/GradientText.cjs +1 -1
  145. package/dist/components/GradientText/GradientText.js +27 -29
  146. package/dist/components/Icon/icons/bear.cjs +1 -0
  147. package/dist/components/Icon/icons/bear.d.ts +12 -0
  148. package/dist/components/Icon/icons/bear.js +47 -0
  149. package/dist/components/Icon/index.cjs +1 -1
  150. package/dist/components/Icon/index.d.ts +18 -0
  151. package/dist/components/Icon/index.js +17 -15
  152. package/dist/components/ImageGallery/ImageGallery.cjs +1 -0
  153. package/dist/components/ImageGallery/ImageGallery.const.cjs +1 -0
  154. package/dist/components/ImageGallery/ImageGallery.const.d.ts +13 -0
  155. package/dist/components/ImageGallery/ImageGallery.const.js +16 -0
  156. package/dist/components/ImageGallery/ImageGallery.d.ts +4 -0
  157. package/dist/components/ImageGallery/ImageGallery.js +61 -0
  158. package/dist/components/ImageGallery/ImageGallery.types.d.ts +22 -0
  159. package/dist/components/ImageGallery/index.d.ts +2 -0
  160. package/dist/components/Indicator/Indicator.cjs +1 -0
  161. package/dist/components/Indicator/Indicator.const.cjs +1 -0
  162. package/dist/components/Indicator/Indicator.const.d.ts +15 -0
  163. package/dist/components/Indicator/Indicator.const.js +26 -0
  164. package/dist/components/Indicator/Indicator.d.ts +4 -0
  165. package/dist/components/Indicator/Indicator.js +56 -0
  166. package/dist/components/Indicator/Indicator.types.d.ts +16 -0
  167. package/dist/components/Indicator/index.d.ts +2 -0
  168. package/dist/components/InfiniteScroll/InfiniteScroll.cjs +1 -0
  169. package/dist/components/InfiniteScroll/InfiniteScroll.const.cjs +1 -0
  170. package/dist/components/InfiniteScroll/InfiniteScroll.const.d.ts +7 -0
  171. package/dist/components/InfiniteScroll/InfiniteScroll.const.js +9 -0
  172. package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +4 -0
  173. package/dist/components/InfiniteScroll/InfiniteScroll.js +51 -0
  174. package/dist/components/InfiniteScroll/InfiniteScroll.types.d.ts +13 -0
  175. package/dist/components/InfiniteScroll/index.d.ts +2 -0
  176. package/dist/components/Input/Input.cjs +1 -1
  177. package/dist/components/Input/Input.js +99 -66
  178. package/dist/components/Input/Input.types.d.ts +10 -0
  179. package/dist/components/Input/Input.utils.cjs +1 -0
  180. package/dist/components/Input/Input.utils.d.ts +2 -0
  181. package/dist/components/Input/Input.utils.js +15 -0
  182. package/dist/components/Input/index.d.ts +1 -1
  183. package/dist/components/LoadingOverlay/LoadingOverlay.cjs +1 -0
  184. package/dist/components/LoadingOverlay/LoadingOverlay.const.cjs +1 -0
  185. package/dist/components/LoadingOverlay/LoadingOverlay.const.d.ts +6 -0
  186. package/dist/components/LoadingOverlay/LoadingOverlay.const.js +9 -0
  187. package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +4 -0
  188. package/dist/components/LoadingOverlay/LoadingOverlay.js +42 -0
  189. package/dist/components/LoadingOverlay/LoadingOverlay.types.d.ts +11 -0
  190. package/dist/components/LoadingOverlay/index.d.ts +2 -0
  191. package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
  192. package/dist/components/MentionsInput/MentionsInput.js +64 -68
  193. package/dist/components/MentionsInput/MentionsInput.utils.cjs +1 -0
  194. package/dist/components/MentionsInput/MentionsInput.utils.d.ts +2 -0
  195. package/dist/components/MentionsInput/MentionsInput.utils.js +9 -0
  196. package/dist/components/NumberFormatter/NumberFormatter.cjs +1 -0
  197. package/dist/components/NumberFormatter/NumberFormatter.const.cjs +1 -0
  198. package/dist/components/NumberFormatter/NumberFormatter.const.d.ts +5 -0
  199. package/dist/components/NumberFormatter/NumberFormatter.const.js +8 -0
  200. package/dist/components/NumberFormatter/NumberFormatter.d.ts +4 -0
  201. package/dist/components/NumberFormatter/NumberFormatter.js +53 -0
  202. package/dist/components/NumberFormatter/NumberFormatter.types.d.ts +20 -0
  203. package/dist/components/NumberFormatter/NumberFormatter.utils.cjs +1 -0
  204. package/dist/components/NumberFormatter/NumberFormatter.utils.d.ts +2 -0
  205. package/dist/components/NumberFormatter/NumberFormatter.utils.js +19 -0
  206. package/dist/components/NumberFormatter/index.d.ts +2 -0
  207. package/dist/components/PageNav/PageNav.cjs +1 -0
  208. package/dist/components/PageNav/PageNav.const.cjs +1 -0
  209. package/dist/components/PageNav/PageNav.const.d.ts +22 -0
  210. package/dist/components/PageNav/PageNav.const.js +42 -0
  211. package/dist/components/PageNav/PageNav.d.ts +3 -0
  212. package/dist/components/PageNav/PageNav.js +81 -0
  213. package/dist/components/PageNav/PageNav.types.d.ts +17 -0
  214. package/dist/components/PageNav/index.d.ts +2 -0
  215. package/dist/components/Popconfirm/Popconfirm.cjs +1 -0
  216. package/dist/components/Popconfirm/Popconfirm.const.cjs +1 -0
  217. package/dist/components/Popconfirm/Popconfirm.const.d.ts +13 -0
  218. package/dist/components/Popconfirm/Popconfirm.const.js +20 -0
  219. package/dist/components/Popconfirm/Popconfirm.d.ts +4 -0
  220. package/dist/components/Popconfirm/Popconfirm.js +65 -0
  221. package/dist/components/Popconfirm/Popconfirm.types.d.ts +16 -0
  222. package/dist/components/Popconfirm/index.d.ts +2 -0
  223. package/dist/components/Progress/Progress.cjs +1 -1
  224. package/dist/components/Progress/Progress.js +6 -6
  225. package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -0
  226. package/dist/components/PropsPlayground/PropsPlayground.const.cjs +1 -0
  227. package/dist/components/PropsPlayground/PropsPlayground.const.d.ts +11 -0
  228. package/dist/components/PropsPlayground/PropsPlayground.const.js +23 -0
  229. package/dist/components/PropsPlayground/PropsPlayground.d.ts +3 -0
  230. package/dist/components/PropsPlayground/PropsPlayground.js +221 -0
  231. package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +29 -0
  232. package/dist/components/PropsPlayground/PropsPlayground.utils.cjs +1 -0
  233. package/dist/components/PropsPlayground/PropsPlayground.utils.d.ts +2 -0
  234. package/dist/components/PropsPlayground/PropsPlayground.utils.js +9 -0
  235. package/dist/components/PropsPlayground/index.d.ts +2 -0
  236. package/dist/components/RadioCard/RadioCard.cjs +1 -0
  237. package/dist/components/RadioCard/RadioCard.const.cjs +1 -0
  238. package/dist/components/RadioCard/RadioCard.const.d.ts +7 -0
  239. package/dist/components/RadioCard/RadioCard.const.js +22 -0
  240. package/dist/components/RadioCard/RadioCard.d.ts +5 -0
  241. package/dist/components/RadioCard/RadioCard.js +111 -0
  242. package/dist/components/RadioCard/RadioCard.types.d.ts +22 -0
  243. package/dist/components/RadioCard/index.d.ts +2 -0
  244. package/dist/components/Result/Result.cjs +1 -0
  245. package/dist/components/Result/Result.const.cjs +1 -0
  246. package/dist/components/Result/Result.const.d.ts +10 -0
  247. package/dist/components/Result/Result.const.js +20 -0
  248. package/dist/components/Result/Result.d.ts +4 -0
  249. package/dist/components/Result/Result.icons.cjs +1 -0
  250. package/dist/components/Result/Result.icons.d.ts +3 -0
  251. package/dist/components/Result/Result.icons.js +31 -0
  252. package/dist/components/Result/Result.js +35 -0
  253. package/dist/components/Result/Result.types.d.ts +10 -0
  254. package/dist/components/Result/index.d.ts +2 -0
  255. package/dist/components/RingProgress/RingProgress.cjs +1 -0
  256. package/dist/components/RingProgress/RingProgress.const.cjs +1 -0
  257. package/dist/components/RingProgress/RingProgress.const.d.ts +4 -0
  258. package/dist/components/RingProgress/RingProgress.const.js +7 -0
  259. package/dist/components/RingProgress/RingProgress.d.ts +4 -0
  260. package/dist/components/RingProgress/RingProgress.js +67 -0
  261. package/dist/components/RingProgress/RingProgress.types.d.ts +15 -0
  262. package/dist/components/RingProgress/index.d.ts +2 -0
  263. package/dist/components/Select/Select.cjs +1 -1
  264. package/dist/components/Select/Select.js +28 -30
  265. package/dist/components/SignPad/SignPad.cjs +1 -1
  266. package/dist/components/SignPad/SignPad.const.cjs +1 -1
  267. package/dist/components/SignPad/SignPad.const.js +10 -11
  268. package/dist/components/SignPad/SignPad.d.ts +4 -6
  269. package/dist/components/SignPad/SignPad.js +114 -122
  270. package/dist/components/SignPad/SignPad.types.d.ts +2 -2
  271. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  272. package/dist/components/Skeleton/Skeleton.js +89 -94
  273. package/dist/components/Skeleton/Skeleton.utils.cjs +1 -0
  274. package/dist/components/Skeleton/Skeleton.utils.d.ts +1 -0
  275. package/dist/components/Skeleton/Skeleton.utils.js +10 -0
  276. package/dist/components/SliderRange/SliderRange.cjs +1 -1
  277. package/dist/components/SliderRange/SliderRange.js +61 -63
  278. package/dist/components/SliderRange/SliderRange.utils.cjs +1 -0
  279. package/dist/components/SliderRange/SliderRange.utils.d.ts +1 -0
  280. package/dist/components/SliderRange/SliderRange.utils.js +7 -0
  281. package/dist/components/SplitButton/SplitButton.cjs +1 -0
  282. package/dist/components/SplitButton/SplitButton.const.cjs +1 -0
  283. package/dist/components/SplitButton/SplitButton.const.d.ts +25 -0
  284. package/dist/components/SplitButton/SplitButton.const.js +27 -0
  285. package/dist/components/SplitButton/SplitButton.d.ts +4 -0
  286. package/dist/components/SplitButton/SplitButton.js +73 -0
  287. package/dist/components/SplitButton/SplitButton.types.d.ts +21 -0
  288. package/dist/components/SplitButton/index.d.ts +2 -0
  289. package/dist/components/Spoiler/Spoiler.cjs +1 -0
  290. package/dist/components/Spoiler/Spoiler.const.cjs +1 -0
  291. package/dist/components/Spoiler/Spoiler.const.d.ts +6 -0
  292. package/dist/components/Spoiler/Spoiler.const.js +9 -0
  293. package/dist/components/Spoiler/Spoiler.d.ts +4 -0
  294. package/dist/components/Spoiler/Spoiler.js +59 -0
  295. package/dist/components/Spoiler/Spoiler.types.d.ts +10 -0
  296. package/dist/components/Spoiler/index.d.ts +2 -0
  297. package/dist/components/Spotlight/Spotlight.cjs +1 -1
  298. package/dist/components/Spotlight/Spotlight.js +62 -73
  299. package/dist/components/Spotlight/Spotlight.utils.cjs +1 -0
  300. package/dist/components/Spotlight/Spotlight.utils.d.ts +3 -0
  301. package/dist/components/Spotlight/Spotlight.utils.js +18 -0
  302. package/dist/components/Tabs/Tabs.cjs +1 -1
  303. package/dist/components/Tabs/Tabs.js +39 -38
  304. package/dist/components/Tabs/Tabs.types.d.ts +3 -1
  305. package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.cjs +1 -1
  306. package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.js +63 -57
  307. package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
  308. package/dist/components/TimePicker/helpers/ClockFaceSvg.d.ts +0 -7
  309. package/dist/components/TimePicker/helpers/ClockFaceSvg.js +32 -31
  310. package/dist/components/Toast/Toast.cjs +1 -1
  311. package/dist/components/Toast/Toast.js +18 -17
  312. package/dist/components/Toast/Toast.utils.cjs +1 -0
  313. package/dist/components/Toast/Toast.utils.d.ts +1 -0
  314. package/dist/components/Toast/Toast.utils.js +4 -0
  315. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  316. package/dist/components/Tooltip/Tooltip.js +10 -11
  317. package/dist/components/Tour/Tour.cjs +1 -1
  318. package/dist/components/Tour/Tour.js +1 -2
  319. package/dist/components/TreeSelect/TreeSelect.cjs +1 -0
  320. package/dist/components/TreeSelect/TreeSelect.const.cjs +1 -0
  321. package/dist/components/TreeSelect/TreeSelect.const.d.ts +19 -0
  322. package/dist/components/TreeSelect/TreeSelect.const.js +22 -0
  323. package/dist/components/TreeSelect/TreeSelect.d.ts +4 -0
  324. package/dist/components/TreeSelect/TreeSelect.js +128 -0
  325. package/dist/components/TreeSelect/TreeSelect.types.d.ts +25 -0
  326. package/dist/components/TreeSelect/TreeSelect.utils.cjs +1 -0
  327. package/dist/components/TreeSelect/TreeSelect.utils.d.ts +5 -0
  328. package/dist/components/TreeSelect/TreeSelect.utils.js +25 -0
  329. package/dist/components/TreeSelect/index.d.ts +2 -0
  330. package/dist/components/VirtualList/VirtualList.cjs +1 -1
  331. package/dist/components/VirtualList/VirtualList.js +38 -43
  332. package/dist/components/index.cjs +1 -1
  333. package/dist/components/index.d.ts +48 -0
  334. package/dist/components/index.js +351 -300
  335. package/dist/hooks/index.cjs +1 -1
  336. package/dist/hooks/index.d.ts +2 -0
  337. package/dist/hooks/index.js +60 -58
  338. package/dist/hooks/useResizeObserver/index.d.ts +2 -0
  339. package/dist/hooks/useResizeObserver/useResizeObserver.cjs +1 -0
  340. package/dist/hooks/useResizeObserver/useResizeObserver.d.ts +3 -0
  341. package/dist/hooks/useResizeObserver/useResizeObserver.js +20 -0
  342. package/dist/hooks/useResizeObserver/useResizeObserver.types.d.ts +8 -0
  343. package/dist/icons.cjs +1 -0
  344. package/dist/icons.d.ts +2 -0
  345. package/dist/icons.js +6 -0
  346. package/dist/index.cjs +1 -1
  347. package/dist/index.js +443 -390
  348. package/dist/postcss/bear-plugin.cjs +86 -0
  349. package/dist/styles/_alerts.css +14 -0
  350. package/dist/styles/_base.css +60 -0
  351. package/dist/styles/_buttons.css +108 -0
  352. package/dist/styles/_effects.css +90 -0
  353. package/dist/styles/_marquee.css +25 -0
  354. package/dist/styles/main.css +5 -0
  355. package/dist/styles.css +1 -1
  356. package/package.json +15 -3
@@ -1,169 +1,161 @@
1
- import { jsxs as p, jsx as l } from "react/jsx-runtime";
2
- import { useRef as J, useState as m, useEffect as L, useCallback as u } from "react";
3
- import { cn as d } from "../../utils/cn.js";
4
- import { Button as O } from "../Button/Button.js";
5
- import { SIGN_PAD_DEFAULT_WIDTH as q, 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 ne, SIGN_PAD_BG_DARK as re, SIGN_PAD_BG_LIGHT as oe, SIGN_PAD_STROKE_DARK as ae, SIGN_PAD_STROKE_LIGHT as se, 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 Se } from "./SignPad.const.js";
6
- const ve = (U) => {
1
+ import { jsxs as T, jsx as d } from "react/jsx-runtime";
2
+ import { useRef as p, useState as B, useEffect as D, useCallback as l } from "react";
3
+ import { cn as _ } from "../../utils/cn.js";
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) => {
7
7
  const {
8
8
  onChange: o,
9
- width: S = q,
10
- height: h = Z,
11
- strokeColor: B,
12
- strokeWidth: N = $,
13
- backgroundColor: M,
14
- placeholder: F = ee,
15
- disabled: r = !1,
16
- readOnly: a = !1,
17
- showClear: I = !0,
18
- showSave: b = !1,
19
- clearText: H = "Clear",
20
- saveText: K = "Save",
9
+ width: w,
10
+ height: m = Z,
11
+ strokeColor: F,
12
+ strokeWidth: C = $,
13
+ backgroundColor: H,
14
+ placeholder: K = ee,
15
+ disabled: n = !1,
16
+ readOnly: s = !1,
17
+ showClear: L = !0,
18
+ showSave: R = !1,
19
+ clearText: W = "Clear",
20
+ saveText: z = "Save",
21
21
  outputFormat: f = te,
22
- outputQuality: A = ne,
23
- className: W,
24
- testId: X,
25
- id: Y,
26
- ...V
27
- } = U, s = J(null), [D, C] = m(!1), [c, R] = m(!1), [P, E] = m(null), [g, j] = m(!1);
28
- L(() => {
22
+ outputQuality: v = re,
23
+ className: X,
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);
28
+ D(() => {
29
29
  const e = () => {
30
- const n = document.documentElement.classList.contains("dark");
31
- j(n);
30
+ Q(document.documentElement.classList.contains("dark"));
32
31
  };
33
32
  e();
34
33
  const t = new MutationObserver(e);
35
34
  return t.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] }), () => t.disconnect();
36
35
  }, []);
37
- const w = B || (g ? ae : se), _ = M || (g ? re : oe);
38
- L(() => {
39
- const e = s.current;
40
- if (!e) return;
41
- const t = e.getContext("2d");
42
- t && (e.width = S, e.height = h, t.fillStyle = _, t.fillRect(0, 0, S, h));
43
- }, [S, h, _, g]), L(() => {
44
- const e = s.current;
45
- if (!e || r || a) return;
46
- const t = (n) => n.preventDefault();
36
+ const k = F || (E ? se : ae), b = H || (E ? ne : oe), u = l(() => {
37
+ const e = a.current, t = e == null ? void 0 : e.getContext("2d");
38
+ !e || !t || (t.fillStyle = b === "transparent" ? "rgba(0,0,0,0)" : b, t.fillRect(0, 0, e.width, e.height));
39
+ }, [b]);
40
+ D(() => {
41
+ const e = a.current, t = I.current;
42
+ if (!e || !t) return;
43
+ const r = () => {
44
+ const i = t.getBoundingClientRect(), S = w ?? Math.round(i.width), y = m;
45
+ (e.width !== S || e.height !== y) && (e.width = S, e.height = y, u());
46
+ };
47
+ r();
48
+ const c = new ResizeObserver(r);
49
+ return c.observe(t), () => c.disconnect();
50
+ }, [w, m, u]), D(() => {
51
+ u();
52
+ }, [u, E]), D(() => {
53
+ const e = a.current;
54
+ if (!e || n || s) return;
55
+ const t = (r) => r.preventDefault();
47
56
  return e.addEventListener("touchstart", t, { passive: !1 }), e.addEventListener("touchmove", t, { passive: !1 }), () => {
48
57
  e.removeEventListener("touchstart", t), e.removeEventListener("touchmove", t);
49
58
  };
50
- }, [r, a]);
51
- const v = u((e) => {
52
- const t = s.current;
59
+ }, [n, s]);
60
+ const g = l((e) => {
61
+ const t = a.current;
53
62
  if (!t) return { x: 0, y: 0 };
54
- const n = t.getBoundingClientRect(), i = t.width / n.width, x = t.height / n.height;
63
+ const r = t.getBoundingClientRect(), c = t.width / r.width, i = t.height / r.height;
55
64
  if ("touches" in e) {
56
- const y = e.touches[0];
65
+ const S = e.touches[0];
57
66
  return {
58
- x: (y.clientX - n.left) * i,
59
- y: (y.clientY - n.top) * x
67
+ x: (S.clientX - r.left) * c,
68
+ y: (S.clientY - r.top) * i
60
69
  };
61
70
  }
62
71
  return {
63
- x: (e.clientX - n.left) * i,
64
- y: (e.clientY - n.top) * x
72
+ x: (e.clientX - r.left) * c,
73
+ y: (e.clientY - r.top) * i
65
74
  };
66
- }, []), G = u((e) => {
67
- if (r || a) return;
68
- const t = v(e);
69
- C(!0), E(t);
70
- }, [r, a, v]), k = u((e) => {
71
- if (!D || r || a) return;
72
- const t = s.current, n = t == null ? void 0 : t.getContext("2d");
73
- if (!t || !n || !P) return;
74
- const i = v(e);
75
- n.beginPath(), n.moveTo(P.x, P.y), n.lineTo(i.x, i.y), n.strokeStyle = w, n.lineWidth = N, n.lineCap = "round", n.lineJoin = "round", n.stroke(), E(i), R(!0);
76
- }, [D, r, a, P, w, N, v]), T = u(() => {
77
- if (D && c) {
78
- const e = s.current;
75
+ }, []), x = l((e) => {
76
+ if (n || s) return;
77
+ const t = g(e);
78
+ P.current = !0, A.current = t;
79
+ }, [n, s, g]), O = l((e) => {
80
+ if (!P.current || n || s) return;
81
+ const t = a.current, r = t == null ? void 0 : t.getContext("2d"), c = A.current;
82
+ if (!t || !r || !c) return;
83
+ const i = g(e);
84
+ r.beginPath(), r.moveTo(c.x, c.y), r.lineTo(i.x, i.y), r.strokeStyle = k, r.lineWidth = C, r.lineCap = "round", r.lineJoin = "round", r.stroke(), A.current = i, G(!0);
85
+ }, [n, s, k, C, g]), N = l(() => {
86
+ if (P.current) {
87
+ const e = a.current;
79
88
  if (e && o) {
80
- const t = e.toDataURL(f, A);
89
+ const t = e.toDataURL(f, v);
81
90
  o(t);
82
91
  }
83
92
  }
84
- C(!1), E(null);
85
- }, [D, c, o, f, A]), z = u(() => {
86
- const e = s.current, t = e == null ? void 0 : e.getContext("2d");
87
- !e || !t || (t.fillStyle = _ === "transparent" ? "rgba(0,0,0,0)" : _, t.clearRect(0, 0, e.width, e.height), t.fillRect(0, 0, e.width, e.height), R(!1), o == null || o(null));
88
- }, [_, o]), Q = u(() => {
89
- const e = s.current;
90
- if (!e || !c) return;
91
- const t = e.toDataURL(f, A);
93
+ P.current = !1, A.current = null;
94
+ }, [o, f, v]), J = l(() => {
95
+ const e = a.current, t = e == null ? void 0 : e.getContext("2d");
96
+ !e || !t || (t.clearRect(0, 0, e.width, e.height), u(), G(!1), o == null || o(null));
97
+ }, [u, o]), q = l(() => {
98
+ const e = a.current;
99
+ if (!e || !h) return;
100
+ const t = e.toDataURL(f, v);
92
101
  o == null || o(t);
93
- }, [c, o, f, A]);
94
- return /* @__PURE__ */ p(
102
+ }, [h, o, f, v]);
103
+ return /* @__PURE__ */ T(
95
104
  "div",
96
105
  {
97
- id: Y,
98
- "data-testid": X,
99
- className: d(
100
- "Bear-SignPad bear-max-w-full bear-w-full",
101
- Se,
102
- r && "Bear-SignPad--disabled bear-opacity-50",
103
- a && "Bear-SignPad--readonly",
104
- W
106
+ id: V,
107
+ "data-testid": Y,
108
+ className: _(
109
+ "Bear-SignPad bear-w-full",
110
+ he,
111
+ n && "Bear-SignPad--disabled bear-opacity-50",
112
+ s && "Bear-SignPad--readonly",
113
+ X
105
114
  ),
106
- ...V,
115
+ ...j,
107
116
  children: [
108
- /* @__PURE__ */ p(
117
+ /* @__PURE__ */ T(
109
118
  "div",
110
119
  {
111
- className: d(
112
- "Bear-SignPad__canvas-wrapper bear-max-w-full bear-overflow-hidden",
113
- "touch-none",
120
+ ref: I,
121
+ className: _(
122
+ "Bear-SignPad__canvas-wrapper bear-w-full bear-overflow-hidden",
123
+ "bear-touch-none",
114
124
  de,
115
- !r && !a && ue,
116
- r && "bear-cursor-not-allowed",
117
- !r && !a && "bear-cursor-crosshair"
125
+ !n && !s && ue,
126
+ n && "bear-cursor-not-allowed",
127
+ !n && !s && "bear-cursor-crosshair"
118
128
  ),
119
129
  children: [
120
- /* @__PURE__ */ l(
130
+ /* @__PURE__ */ d(
121
131
  "canvas",
122
132
  {
123
- ref: s,
124
- className: "Bear-SignPad__canvas bear-block bear-rounded-lg bear-max-w-full touch-none",
125
- style: { width: S, height: h, touchAction: "none" },
126
- onMouseDown: G,
127
- onMouseMove: k,
128
- onMouseUp: T,
129
- onMouseLeave: T,
130
- onTouchStart: G,
131
- onTouchMove: k,
132
- onTouchEnd: T
133
+ ref: a,
134
+ className: "Bear-SignPad__canvas bear-block bear-rounded-lg bear-w-full bear-touch-none",
135
+ style: { height: m },
136
+ onMouseDown: x,
137
+ onMouseMove: O,
138
+ onMouseUp: N,
139
+ onMouseLeave: N,
140
+ onTouchStart: x,
141
+ onTouchMove: O,
142
+ onTouchEnd: N
133
143
  }
134
144
  ),
135
- !c && /* @__PURE__ */ l("div", { className: d("Bear-SignPad__placeholder", ce), children: F }),
136
- /* @__PURE__ */ l("div", { className: d("Bear-SignPad__line", ie) }),
137
- /* @__PURE__ */ l("span", { className: d("Bear-SignPad__x-mark", le), children: "×" })
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: "×" })
138
148
  ]
139
149
  }
140
150
  ),
141
- (I || b) && /* @__PURE__ */ p("div", { className: d("Bear-SignPad__actions", _e), children: [
142
- I && /* @__PURE__ */ l(
143
- O,
144
- {
145
- size: "sm",
146
- variant: "ghost",
147
- onClick: z,
148
- disabled: r || !c,
149
- children: H
150
- }
151
- ),
152
- b && /* @__PURE__ */ l(
153
- O,
154
- {
155
- size: "sm",
156
- variant: "primary",
157
- onClick: Q,
158
- disabled: r || !c,
159
- children: K
160
- }
161
- )
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 })
162
154
  ] })
163
155
  ]
164
156
  }
165
157
  );
166
158
  };
167
159
  export {
168
- ve as SignPad
160
+ ge as SignPad
169
161
  };
@@ -2,9 +2,9 @@ import { HTMLAttributes } from 'react';
2
2
  export interface SignPadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
3
3
  /** Callback when signature changes - receives base64 image data */
4
4
  onChange?: (signature: string | null) => void;
5
- /** Width of the canvas */
5
+ /** Canvas resolution width (internal pixels). CSS width is always 100% of container. */
6
6
  width?: number;
7
- /** Height of the canvas */
7
+ /** Canvas resolution height (internal pixels). Also sets the CSS height. */
8
8
  height?: number;
9
9
  /** Stroke color */
10
10
  strokeColor?: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),T=require("../../utils/cn.cjs"),d=require("./Skeleton.const.cjs"),_=()=>{const e="bear-skeleton-styles";if(typeof document<"u"&&!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=d.SKELETON_WAVE_STYLES,document.head.appendChild(t)}},a=c.forwardRef(({variant:e="text",animation:t="pulse",width:l,height:s,borderRadius:n,count:i=1,gap:E=8,className:o,style:f,testId:y,...h},p)=>{c.useEffect(()=>{t==="wave"&&_()},[t]);const x=S=>{if(S!==void 0)return typeof S=="number"?`${S}px`:S},N={width:x(l),height:x(s)||(e==="text"?d.SKELETON_TEXT_HEIGHT:void 0),borderRadius:n?x(n):void 0,...f},k=T.cn(d.SKELETON_BASE_CLASSES,d.SKELETON_VARIANT_CLASSES[e],d.SKELETON_ANIMATION_CLASSES[t],d.SKELETON_BG_CLASSES,o);return i>1?r.jsx("div",{className:"Bear-Skeleton__group flex flex-col",style:{gap:x(E)},"data-testid":y,children:Array.from({length:i}).map((S,g)=>r.jsx("div",{ref:g===0?p:void 0,className:k,style:N,...h},g))}):r.jsx("div",{ref:p,className:k,style:N,"data-testid":y,...h})});a.displayName="Skeleton";const u=c.forwardRef(({lines:e=3,lastLineWidth:t="80%",gap:l=8,animation:s="pulse",...n},i)=>{c.useEffect(()=>{s==="wave"&&_()},[s]);const E=o=>{if(o!==void 0)return typeof o=="number"?`${o}px`:o};return r.jsx("div",{ref:i,className:"Bear-SkeletonText flex flex-col",style:{gap:E(l)},children:Array.from({length:e}).map((o,f)=>r.jsx(a,{variant:"text",animation:s,width:f===e-1?t:"100%",...n},f))})});u.displayName="SkeletonText";const m=c.forwardRef(({size:e="md",animation:t="pulse",...l},s)=>{const n=typeof e=="number"?e:d.SKELETON_AVATAR_SIZES[e];return r.jsx(a,{ref:s,variant:"circular",animation:t,width:n,height:n,...l})});m.displayName="SkeletonAvatar";const A=c.forwardRef(({animation:e="pulse",className:t,...l},s)=>r.jsxs("div",{ref:s,className:T.cn("Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",t),...l,children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx(m,{animation:e}),r.jsxs("div",{className:"flex-1",children:[r.jsx(a,{animation:e,width:"60%",height:16,className:"mb-2"}),r.jsx(a,{animation:e,width:"40%",height:12})]})]}),r.jsx(u,{animation:e,lines:3})]}));A.displayName="SkeletonCard";exports.Skeleton=a;exports.SkeletonAvatar=m;exports.SkeletonCard=A;exports.SkeletonText=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),_=require("../../utils/cn.cjs"),d=require("./Skeleton.const.cjs"),j=require("./Skeleton.utils.cjs"),a=S.forwardRef(({variant:e="text",animation:r="pulse",width:l,height:s,borderRadius:o,count:i=1,gap:u=8,className:n,style:f,testId:k,...N},m)=>{S.useEffect(()=>{r==="wave"&&j.injectStyles()},[r]);const x=c=>{if(c!==void 0)return typeof c=="number"?`${c}px`:c},p={width:x(l),height:x(s)||(e==="text"?d.SKELETON_TEXT_HEIGHT:void 0),borderRadius:o?x(o):void 0,...f},y=_.cn(d.SKELETON_BASE_CLASSES,d.SKELETON_VARIANT_CLASSES[e],d.SKELETON_ANIMATION_CLASSES[r],d.SKELETON_BG_CLASSES,n);return i>1?t.jsx("div",{className:"Bear-Skeleton__group flex flex-col",style:{gap:x(u)},"data-testid":k,children:Array.from({length:i}).map((c,g)=>t.jsx("div",{ref:g===0?m:void 0,className:y,style:p,...N},g))}):t.jsx("div",{ref:m,className:y,style:p,"data-testid":k,...N})});a.displayName="Skeleton";const E=S.forwardRef(({lines:e=3,lastLineWidth:r="80%",gap:l=8,animation:s="pulse",...o},i)=>{S.useEffect(()=>{s==="wave"&&j.injectStyles()},[s]);const u=n=>{if(n!==void 0)return typeof n=="number"?`${n}px`:n};return t.jsx("div",{ref:i,className:"Bear-SkeletonText flex flex-col",style:{gap:u(l)},children:Array.from({length:e}).map((n,f)=>t.jsx(a,{variant:"text",animation:s,width:f===e-1?r:"100%",...o},f))})});E.displayName="SkeletonText";const h=S.forwardRef(({size:e="md",animation:r="pulse",...l},s)=>{const o=typeof e=="number"?e:d.SKELETON_AVATAR_SIZES[e];return t.jsx(a,{ref:s,variant:"circular",animation:r,width:o,height:o,...l})});h.displayName="SkeletonAvatar";const A=S.forwardRef(({animation:e="pulse",className:r,...l},s)=>t.jsxs("div",{ref:s,className:_.cn("Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",r),...l,children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx(h,{animation:e}),t.jsxs("div",{className:"flex-1",children:[t.jsx(a,{animation:e,width:"60%",height:16,className:"mb-2"}),t.jsx(a,{animation:e,width:"40%",height:12})]})]}),t.jsx(E,{animation:e,lines:3})]}));A.displayName="SkeletonCard";exports.Skeleton=a;exports.SkeletonAvatar=h;exports.SkeletonCard=A;exports.SkeletonText=E;
@@ -1,145 +1,140 @@
1
- import { jsx as r, jsxs as f } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
2
  import { forwardRef as m, useEffect as _ } from "react";
3
- import { cn as A } from "../../utils/cn.js";
4
- import { SKELETON_BG_CLASSES as v, SKELETON_ANIMATION_CLASSES as L, SKELETON_VARIANT_CLASSES as b, SKELETON_BASE_CLASSES as C, SKELETON_TEXT_HEIGHT as w, SKELETON_AVATAR_SIZES as O, SKELETON_WAVE_STYLES as K } from "./Skeleton.const.js";
5
- const T = () => {
6
- const e = "bear-skeleton-styles";
7
- if (typeof document < "u" && !document.getElementById(e)) {
8
- const t = document.createElement("style");
9
- t.id = e, t.textContent = K, document.head.appendChild(t);
10
- }
11
- }, i = m(
3
+ import { cn as k } from "../../utils/cn.js";
4
+ import { SKELETON_BG_CLASSES as v, SKELETON_ANIMATION_CLASSES as b, SKELETON_VARIANT_CLASSES as L, SKELETON_BASE_CLASSES as w, SKELETON_TEXT_HEIGHT as C, SKELETON_AVATAR_SIZES as O } from "./Skeleton.const.js";
5
+ import { injectStyles as x } from "./Skeleton.utils.js";
6
+ const S = m(
12
7
  ({
13
8
  variant: e = "text",
14
- animation: t = "pulse",
15
- width: l,
16
- height: s,
17
- borderRadius: d,
18
- count: S = 1,
19
- gap: E = 8,
20
- className: o,
21
- style: a,
22
- testId: p,
23
- ...h
24
- }, y) => {
9
+ animation: r = "pulse",
10
+ width: s,
11
+ height: l,
12
+ borderRadius: o,
13
+ count: a = 1,
14
+ gap: p = 8,
15
+ className: d,
16
+ style: n,
17
+ testId: h,
18
+ ...E
19
+ }, N) => {
25
20
  _(() => {
26
- t === "wave" && T();
27
- }, [t]);
28
- const c = (n) => {
29
- if (n !== void 0)
30
- return typeof n == "number" ? `${n}px` : n;
31
- }, N = {
32
- width: c(l),
33
- height: c(s) || (e === "text" ? w : void 0),
34
- borderRadius: d ? c(d) : void 0,
35
- ...a
36
- }, g = A(
37
- C,
38
- b[e],
39
- L[t],
21
+ r === "wave" && x();
22
+ }, [r]);
23
+ const c = (i) => {
24
+ if (i !== void 0)
25
+ return typeof i == "number" ? `${i}px` : i;
26
+ }, g = {
27
+ width: c(s),
28
+ height: c(l) || (e === "text" ? C : void 0),
29
+ borderRadius: o ? c(o) : void 0,
30
+ ...n
31
+ }, y = k(
32
+ w,
33
+ L[e],
34
+ b[r],
40
35
  v,
41
- o
36
+ d
42
37
  );
43
- return S > 1 ? /* @__PURE__ */ r(
38
+ return a > 1 ? /* @__PURE__ */ t(
44
39
  "div",
45
40
  {
46
41
  className: "Bear-Skeleton__group flex flex-col",
47
- style: { gap: c(E) },
48
- "data-testid": p,
49
- children: Array.from({ length: S }).map((n, u) => /* @__PURE__ */ r(
42
+ style: { gap: c(p) },
43
+ "data-testid": h,
44
+ children: Array.from({ length: a }).map((i, A) => /* @__PURE__ */ t(
50
45
  "div",
51
46
  {
52
- ref: u === 0 ? y : void 0,
53
- className: g,
54
- style: N,
55
- ...h
47
+ ref: A === 0 ? N : void 0,
48
+ className: y,
49
+ style: g,
50
+ ...E
56
51
  },
57
- u
52
+ A
58
53
  ))
59
54
  }
60
- ) : /* @__PURE__ */ r(
55
+ ) : /* @__PURE__ */ t(
61
56
  "div",
62
57
  {
63
- ref: y,
64
- className: g,
65
- style: N,
66
- "data-testid": p,
67
- ...h
58
+ ref: N,
59
+ className: y,
60
+ style: g,
61
+ "data-testid": h,
62
+ ...E
68
63
  }
69
64
  );
70
65
  }
71
66
  );
72
- i.displayName = "Skeleton";
73
- const k = m(
74
- ({ lines: e = 3, lastLineWidth: t = "80%", gap: l = 8, animation: s = "pulse", ...d }, S) => (_(() => {
75
- s === "wave" && T();
76
- }, [s]), /* @__PURE__ */ r(
67
+ S.displayName = "Skeleton";
68
+ const T = m(
69
+ ({ lines: e = 3, lastLineWidth: r = "80%", gap: s = 8, animation: l = "pulse", ...o }, a) => (_(() => {
70
+ l === "wave" && x();
71
+ }, [l]), /* @__PURE__ */ t(
77
72
  "div",
78
73
  {
79
- ref: S,
74
+ ref: a,
80
75
  className: "Bear-SkeletonText flex flex-col",
81
- style: { gap: ((o) => {
82
- if (o !== void 0)
83
- return typeof o == "number" ? `${o}px` : o;
84
- })(l) },
85
- children: Array.from({ length: e }).map((o, a) => /* @__PURE__ */ r(
86
- i,
76
+ style: { gap: ((d) => {
77
+ if (d !== void 0)
78
+ return typeof d == "number" ? `${d}px` : d;
79
+ })(s) },
80
+ children: Array.from({ length: e }).map((d, n) => /* @__PURE__ */ t(
81
+ S,
87
82
  {
88
83
  variant: "text",
89
- animation: s,
90
- width: a === e - 1 ? t : "100%",
91
- ...d
84
+ animation: l,
85
+ width: n === e - 1 ? r : "100%",
86
+ ...o
92
87
  },
93
- a
88
+ n
94
89
  ))
95
90
  }
96
91
  ))
97
92
  );
98
- k.displayName = "SkeletonText";
99
- const x = m(
100
- ({ size: e = "md", animation: t = "pulse", ...l }, s) => {
101
- const d = typeof e == "number" ? e : O[e];
102
- return /* @__PURE__ */ r(
103
- i,
93
+ T.displayName = "SkeletonText";
94
+ const u = m(
95
+ ({ size: e = "md", animation: r = "pulse", ...s }, l) => {
96
+ const o = typeof e == "number" ? e : O[e];
97
+ return /* @__PURE__ */ t(
98
+ S,
104
99
  {
105
- ref: s,
100
+ ref: l,
106
101
  variant: "circular",
107
- animation: t,
108
- width: d,
109
- height: d,
110
- ...l
102
+ animation: r,
103
+ width: o,
104
+ height: o,
105
+ ...s
111
106
  }
112
107
  );
113
108
  }
114
109
  );
115
- x.displayName = "SkeletonAvatar";
116
- const B = m(
117
- ({ animation: e = "pulse", className: t, ...l }, s) => /* @__PURE__ */ f(
110
+ u.displayName = "SkeletonAvatar";
111
+ const K = m(
112
+ ({ animation: e = "pulse", className: r, ...s }, l) => /* @__PURE__ */ f(
118
113
  "div",
119
114
  {
120
- ref: s,
121
- className: A(
115
+ ref: l,
116
+ className: k(
122
117
  "Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",
123
- t
118
+ r
124
119
  ),
125
- ...l,
120
+ ...s,
126
121
  children: [
127
122
  /* @__PURE__ */ f("div", { className: "flex items-center gap-3 mb-4", children: [
128
- /* @__PURE__ */ r(x, { animation: e }),
123
+ /* @__PURE__ */ t(u, { animation: e }),
129
124
  /* @__PURE__ */ f("div", { className: "flex-1", children: [
130
- /* @__PURE__ */ r(i, { animation: e, width: "60%", height: 16, className: "mb-2" }),
131
- /* @__PURE__ */ r(i, { animation: e, width: "40%", height: 12 })
125
+ /* @__PURE__ */ t(S, { animation: e, width: "60%", height: 16, className: "mb-2" }),
126
+ /* @__PURE__ */ t(S, { animation: e, width: "40%", height: 12 })
132
127
  ] })
133
128
  ] }),
134
- /* @__PURE__ */ r(k, { animation: e, lines: 3 })
129
+ /* @__PURE__ */ t(T, { animation: e, lines: 3 })
135
130
  ]
136
131
  }
137
132
  )
138
133
  );
139
- B.displayName = "SkeletonCard";
134
+ K.displayName = "SkeletonCard";
140
135
  export {
141
- i as Skeleton,
142
- x as SkeletonAvatar,
143
- B as SkeletonCard,
144
- k as SkeletonText
136
+ S as Skeleton,
137
+ u as SkeletonAvatar,
138
+ K as SkeletonCard,
139
+ T as SkeletonText
145
140
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./Skeleton.const.cjs"),t="bear-skeleton-styles",o=()=>{if(typeof document<"u"&&!document.getElementById(t)){const e=document.createElement("style");e.id=t,e.textContent=n.SKELETON_WAVE_STYLES,document.head.appendChild(e)}};exports.injectStyles=o;
@@ -0,0 +1 @@
1
+ export declare const injectStyles: () => void;
@@ -0,0 +1,10 @@
1
+ import { SKELETON_WAVE_STYLES as n } from "./Skeleton.const.js";
2
+ const t = "bear-skeleton-styles", d = () => {
3
+ if (typeof document < "u" && !document.getElementById(t)) {
4
+ const e = document.createElement("style");
5
+ e.id = t, e.textContent = n, document.head.appendChild(e);
6
+ }
7
+ };
8
+ export {
9
+ d as injectStyles
10
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),u=require("react"),d=require("../../utils/cn.cjs"),X={xs:{track:"bear-h-1",thumb:"bear-w-3 bear-h-3",height:"bear-h-6"},sm:{track:"bear-h-1.5",thumb:"bear-w-4 bear-h-4",height:"bear-h-8"},md:{track:"bear-h-2",thumb:"bear-w-5 bear-h-5",height:"bear-h-10"},lg:{track:"bear-h-2.5",thumb:"bear-w-6 bear-h-6",height:"bear-h-12"},xl:{track:"bear-h-3",thumb:"bear-w-7 bear-h-7",height:"bear-h-14"}},Y={primary:{track:"bear-bg-bear-500",thumb:"bear-bg-bear-500 bear-border-bear-600"},secondary:{track:"bear-bg-gray-500",thumb:"bear-bg-gray-500 bear-border-gray-600"},success:{track:"bear-bg-green-500",thumb:"bear-bg-green-500 bear-border-green-600"},warning:{track:"bear-bg-amber-500",thumb:"bear-bg-amber-500 bear-border-amber-600"},error:{track:"bear-bg-red-500",thumb:"bear-bg-red-500 bear-border-red-600"},danger:{track:"bear-bg-red-500",thumb:"bear-bg-red-500 bear-border-red-600"},info:{track:"bear-bg-blue-500",thumb:"bear-bg-blue-500 bear-border-blue-600"},ghost:{track:"bear-bg-gray-400",thumb:"bear-bg-gray-400 bear-border-gray-500"},outline:{track:"bear-bg-gray-600",thumb:"bear-bg-white dark:bear-bg-gray-200 bear-border-gray-600 dark:bear-border-gray-400"}},_=(c,f,e,r)=>{const l=Math.round(c/r)*r;return Math.max(f,Math.min(e,l))},A=({value:c,defaultValue:f=[20,80],min:e=0,max:r=100,step:l=1,size:$="md",color:q="primary",disabled:b=!1,onChange:s,onChangeCommitted:g,valueFormatter:B=w=>String(w),className:z,...O})=>{const[w,L]=u.useState(f),[t,E]=u.useState(null),y=u.useRef(null),k=c??w,[n,o]=k,x=(n-e)/(r-e)*100,j=(o-e)/(r-e)*100,m=X[$],M=Y[q],S=u.useCallback((a,v)=>{if(!y.current||b)return;const T=y.current.getBoundingClientRect(),P=Math.max(0,Math.min(1,(a-T.left)/T.width)),V=e+P*(r-e),D=_(V,e,r,l);if(v==="min"){const i=[Math.min(D,o-l),o];c===void 0&&L(i),s==null||s(i)}else{const I=Math.max(D,n+l),i=[n,I];c===void 0&&L(i),s==null||s(i)}},[e,r,l,n,o,b,c,s]),N=(a,v)=>{b||(a.preventDefault(),E(v),S(a.clientX,v))},p=u.useCallback(a=>{t&&S(a.clientX,t)},[t,S]),R=u.useCallback(()=>{t&&(E(null),g==null||g(k))},[t,k,g]);return u.useEffect(()=>{if(t)return document.addEventListener("mousemove",p),document.addEventListener("mouseup",R),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",R)}},[t,p,R]),h.jsx("div",{className:d.cn("bear-relative bear-w-full bear-flex bear-items-center",m.height,b&&"bear-opacity-50 bear-cursor-not-allowed",z),"data-testid":"slider-range",...O,children:h.jsxs("div",{ref:y,className:d.cn("bear-relative bear-w-full bear-rounded-full bear-bg-gray-200 dark:bear-bg-gray-700",m.track,!b&&"bear-cursor-pointer"),children:[h.jsx("div",{className:d.cn("bear-absolute bear-inset-y-0 bear-left-0 bear-rounded-full",M.track),style:{left:`${x}%`,width:`${j-x}%`}}),h.jsx("div",{role:"slider",tabIndex:b?-1:0,"aria-valuemin":e,"aria-valuemax":r,"aria-valuenow":n,"aria-label":"Range minimum",className:d.cn("bear-absolute bear-top-1/2 bear--translate-y-1/2 bear--translate-x-1/2 bear-rounded-full bear-border-2 bear-shadow-md",m.thumb,M.thumb,!b&&"bear-cursor-grab active:bear-cursor-grabbing hover:bear-scale-110",t==="min"&&"bear-scale-125 bear-z-10"),style:{left:`${x}%`},onMouseDown:a=>N(a,"min")}),h.jsx("div",{role:"slider",tabIndex:b?-1:0,"aria-valuemin":e,"aria-valuemax":r,"aria-valuenow":o,"aria-label":"Range maximum",className:d.cn("bear-absolute bear-top-1/2 bear--translate-y-1/2 bear--translate-x-1/2 bear-rounded-full bear-border-2 bear-shadow-md",m.thumb,M.thumb,!b&&"bear-cursor-grab active:bear-cursor-grabbing hover:bear-scale-110",t==="max"&&"bear-scale-125 bear-z-10"),style:{left:`${j}%`},onMouseDown:a=>N(a,"max")})]})})};exports.SliderRange=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("react"),i=require("../../utils/cn.cjs"),V=require("./SliderRange.utils.cjs"),X={xs:{track:"bear-h-1",thumb:"bear-w-3 bear-h-3",height:"bear-h-6"},sm:{track:"bear-h-1.5",thumb:"bear-w-4 bear-h-4",height:"bear-h-8"},md:{track:"bear-h-2",thumb:"bear-w-5 bear-h-5",height:"bear-h-10"},lg:{track:"bear-h-2.5",thumb:"bear-w-6 bear-h-6",height:"bear-h-12"},xl:{track:"bear-h-3",thumb:"bear-w-7 bear-h-7",height:"bear-h-14"}},Y={primary:{track:"bear-bg-bear-500",thumb:"bear-bg-bear-500 bear-border-bear-600"},secondary:{track:"bear-bg-gray-500",thumb:"bear-bg-gray-500 bear-border-gray-600"},success:{track:"bear-bg-green-500",thumb:"bear-bg-green-500 bear-border-green-600"},warning:{track:"bear-bg-amber-500",thumb:"bear-bg-amber-500 bear-border-amber-600"},error:{track:"bear-bg-red-500",thumb:"bear-bg-red-500 bear-border-red-600"},danger:{track:"bear-bg-red-500",thumb:"bear-bg-red-500 bear-border-red-600"},info:{track:"bear-bg-blue-500",thumb:"bear-bg-blue-500 bear-border-blue-600"},ghost:{track:"bear-bg-gray-400",thumb:"bear-bg-gray-400 bear-border-gray-500"},outline:{track:"bear-bg-gray-600",thumb:"bear-bg-white dark:bear-bg-gray-200 bear-border-gray-600 dark:bear-border-gray-400"}},A=({value:h,defaultValue:D=[20,80],min:e=0,max:t=100,step:d=1,size:I="md",color:$="primary",disabled:a=!1,onChange:s,onChangeCommitted:g,valueFormatter:B=f=>String(f),className:z,...O})=>{const[f,R]=u.useState(D),[b,L]=u.useState(null),w=u.useRef(null),y=h??f,[c,l]=y,k=(c-e)/(t-e)*100,E=(l-e)/(t-e)*100,m=X[I],x=Y[$],S=u.useCallback((r,v)=>{if(!w.current||a)return;const N=w.current.getBoundingClientRect(),P=Math.max(0,Math.min(1,(r-N.left)/N.width)),_=e+P*(t-e),T=V.stepValue(_,e,t,d);if(v==="min"){const n=[Math.min(T,l-d),l];h===void 0&&R(n),s==null||s(n)}else{const q=Math.max(T,c+d),n=[c,q];h===void 0&&R(n),s==null||s(n)}},[e,t,d,c,l,a,h,s]),j=(r,v)=>{a||(r.preventDefault(),L(v),S(r.clientX,v))},p=u.useCallback(r=>{b&&S(r.clientX,b)},[b,S]),M=u.useCallback(()=>{b&&(L(null),g==null||g(y))},[b,y,g]);return u.useEffect(()=>{if(b)return document.addEventListener("mousemove",p),document.addEventListener("mouseup",M),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",M)}},[b,p,M]),o.jsx("div",{className:i.cn("bear-relative bear-w-full bear-flex bear-items-center",m.height,a&&"bear-opacity-50 bear-cursor-not-allowed",z),"data-testid":"slider-range",...O,children:o.jsxs("div",{ref:w,className:i.cn("bear-relative bear-w-full bear-rounded-full bear-bg-gray-200 dark:bear-bg-gray-700",m.track,!a&&"bear-cursor-pointer"),children:[o.jsx("div",{className:i.cn("bear-absolute bear-inset-y-0 bear-left-0 bear-rounded-full",x.track),style:{left:`${k}%`,width:`${E-k}%`}}),o.jsx("div",{role:"slider",tabIndex:a?-1:0,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":c,"aria-label":"Range minimum",className:i.cn("bear-absolute bear-top-1/2 bear--translate-y-1/2 bear--translate-x-1/2 bear-rounded-full bear-border-2 bear-shadow-md",m.thumb,x.thumb,!a&&"bear-cursor-grab active:bear-cursor-grabbing hover:bear-scale-110",b==="min"&&"bear-scale-125 bear-z-10"),style:{left:`${k}%`},onMouseDown:r=>j(r,"min")}),o.jsx("div",{role:"slider",tabIndex:a?-1:0,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":l,"aria-label":"Range maximum",className:i.cn("bear-absolute bear-top-1/2 bear--translate-y-1/2 bear--translate-x-1/2 bear-rounded-full bear-border-2 bear-shadow-md",m.thumb,x.thumb,!a&&"bear-cursor-grab active:bear-cursor-grabbing hover:bear-scale-110",b==="max"&&"bear-scale-125 bear-z-10"),style:{left:`${E}%`},onMouseDown:r=>j(r,"max")})]})})};exports.SliderRange=A;