@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,130 +1,126 @@
1
- import { jsxs as M, jsx as x } from "react/jsx-runtime";
2
- import { useState as u, useRef as k, useCallback as G, useEffect as p } from "react";
3
- import { cn as z } from "../../utils/cn.js";
4
- const J = {
1
+ import { jsxs as L, jsx as f } from "react/jsx-runtime";
2
+ import { useState as b, useRef as v, useCallback as P, useEffect as h } from "react";
3
+ import { cn as k } from "../../utils/cn.js";
4
+ import { defaultFilter as S } from "./MentionsInput.utils.js";
5
+ const W = {
5
6
  sm: "bear-h-8 bear-text-sm bear-px-3",
6
7
  md: "bear-h-10 bear-text-base bear-px-4",
7
8
  lg: "bear-h-12 bear-text-lg bear-px-5"
8
- }, P = (o, m) => {
9
- const t = m.toLowerCase();
10
- return o.filter(
11
- (s) => s.value.toLowerCase().includes(t) || String(s.label).toLowerCase().includes(t)
12
- );
13
- }, Z = ({
14
- value: o,
15
- defaultValue: m = "",
16
- onChange: t,
17
- onMentionSelect: s,
9
+ }, C = ({
10
+ value: p,
11
+ defaultValue: M = "",
12
+ onChange: n,
13
+ onMentionSelect: m,
18
14
  options: T,
19
- trigger: l = "@",
15
+ trigger: s = "@",
20
16
  placeholder: $ = "Type @ to mention...",
21
- disabled: I = !1,
17
+ disabled: z = !1,
22
18
  maxSuggestions: j = 5,
23
- filterOptions: A = P,
19
+ filterOptions: A = S,
24
20
  size: K = "md",
25
21
  fullWidth: Q = !1,
26
22
  className: B
27
23
  }) => {
28
- const [F, q] = u(m), [d, H] = u(""), [S, f] = u(!1), [c, h] = u(0), [g, U] = u(null), w = k(null), E = k(null), y = k(null), a = o ?? F, b = A(T, d).slice(0, j), D = S && d.length >= 0, L = G(() => {
29
- const e = a.lastIndexOf(l);
24
+ const [F, I] = b(M), [i, H] = b(""), [U, u] = b(!1), [l, d] = b(0), [x, V] = b(null), g = v(null), q = v(null), y = v(null), t = p ?? F, o = A(T, i).slice(0, j), E = U && i.length >= 0, D = P(() => {
25
+ const e = t.lastIndexOf(s);
30
26
  if (e === -1) return { query: "", start: null };
31
- const r = a.slice(e + l.length), n = r.indexOf(" ");
32
- return { query: n === -1 ? r : r.slice(0, n), start: e };
33
- }, [a, l]);
34
- p(() => {
35
- const { query: e, start: r } = L();
36
- H(e), U(r), f(r !== null && !e.includes(" "));
37
- }, [a, L]), p(() => {
38
- h(0);
39
- }, [d]), p(() => {
40
- if (c >= 0 && y.current) {
41
- const e = y.current.children[c];
27
+ const r = t.slice(e + s.length), a = r.indexOf(" ");
28
+ return { query: a === -1 ? r : r.slice(0, a), start: e };
29
+ }, [t, s]);
30
+ h(() => {
31
+ const { query: e, start: r } = D();
32
+ H(e), V(r), u(r !== null && !e.includes(" "));
33
+ }, [t, D]), h(() => {
34
+ d(0);
35
+ }, [i]), h(() => {
36
+ if (l >= 0 && y.current) {
37
+ const e = y.current.children[l];
42
38
  e == null || e.scrollIntoView({ block: "nearest" });
43
39
  }
44
- }, [c]), p(() => {
40
+ }, [l]), h(() => {
45
41
  const e = (r) => {
46
- w.current && !w.current.contains(r.target) && f(!1);
42
+ g.current && !g.current.contains(r.target) && u(!1);
47
43
  };
48
44
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
49
45
  }, []);
50
46
  const O = (e) => {
51
- const r = new RegExp(`${l}(\\w+)`, "g"), n = [];
52
- let i;
53
- for (; (i = r.exec(e)) !== null; )
54
- n.push(i[1]);
55
- return [...new Set(n)];
56
- }, V = (e) => {
47
+ const r = new RegExp(`${s}(\\w+)`, "g"), a = [];
48
+ let c;
49
+ for (; (c = r.exec(e)) !== null; )
50
+ a.push(c[1]);
51
+ return [...new Set(a)];
52
+ }, G = (e) => {
57
53
  const r = e.target.value;
58
- o === void 0 && q(r), t == null || t(r, O(r));
54
+ p === void 0 && I(r), n == null || n(r, O(r));
59
55
  }, N = (e) => {
60
56
  var R;
61
- if (g == null) return;
62
- const r = a.slice(0, g), n = a.slice(g + l.length + d.length), i = `${l}${e.value}`, v = r + i + " " + n;
63
- o === void 0 && q(v), t == null || t(v, O(v)), s == null || s(e), f(!1), (R = E.current) == null || R.focus();
64
- }, C = (e) => {
65
- if (!(!D || b.length === 0)) {
57
+ if (x == null) return;
58
+ const r = t.slice(0, x), a = t.slice(x + s.length + i.length), c = `${s}${e.value}`, w = r + c + " " + a;
59
+ p === void 0 && I(w), n == null || n(w, O(w)), m == null || m(e), u(!1), (R = q.current) == null || R.focus();
60
+ }, J = (e) => {
61
+ if (!(!E || o.length === 0)) {
66
62
  if (e.key === "ArrowDown") {
67
- e.preventDefault(), h((r) => Math.min(r + 1, b.length - 1));
63
+ e.preventDefault(), d((r) => Math.min(r + 1, o.length - 1));
68
64
  return;
69
65
  }
70
66
  if (e.key === "ArrowUp") {
71
- e.preventDefault(), h((r) => Math.max(r - 1, 0));
67
+ e.preventDefault(), d((r) => Math.max(r - 1, 0));
72
68
  return;
73
69
  }
74
70
  if (e.key === "Enter" || e.key === "Tab") {
75
71
  e.preventDefault();
76
- const r = b[c];
72
+ const r = o[l];
77
73
  r && N(r);
78
74
  return;
79
75
  }
80
- e.key === "Escape" && f(!1);
76
+ e.key === "Escape" && u(!1);
81
77
  }
82
78
  };
83
- return /* @__PURE__ */ M(
79
+ return /* @__PURE__ */ L(
84
80
  "div",
85
81
  {
86
- ref: w,
87
- className: z(
82
+ ref: g,
83
+ className: k(
88
84
  "Bear-MentionsInput bear-relative",
89
85
  Q && "bear-w-full",
90
86
  B
91
87
  ),
92
88
  children: [
93
- /* @__PURE__ */ x(
89
+ /* @__PURE__ */ f(
94
90
  "input",
95
91
  {
96
- ref: E,
92
+ ref: q,
97
93
  type: "text",
98
- value: a,
99
- onChange: V,
100
- onKeyDown: C,
94
+ value: t,
95
+ onChange: G,
96
+ onKeyDown: J,
101
97
  placeholder: $,
102
- disabled: I,
103
- className: z(
98
+ disabled: z,
99
+ className: k(
104
100
  "bear-w-full bear-rounded-lg bear-border bear-border-gray-300 dark:bear-border-zinc-600 bear-bg-white dark:bear-bg-zinc-900 bear-text-gray-900 dark:bear-text-white placeholder:bear-text-gray-500 dark:placeholder:bear-text-zinc-500 bear-outline-none bear-transition-colors focus:bear-border-bear-500 focus:bear-ring-2 focus:bear-ring-bear-500/20",
105
- I && "bear-opacity-50 bear-cursor-not-allowed",
106
- J[K]
101
+ z && "bear-opacity-50 bear-cursor-not-allowed",
102
+ W[K]
107
103
  )
108
104
  }
109
105
  ),
110
- D && b.length > 0 && /* @__PURE__ */ x(
106
+ E && o.length > 0 && /* @__PURE__ */ f(
111
107
  "div",
112
108
  {
113
109
  ref: y,
114
110
  className: "bear-absolute bear-z-50 bear-mt-1 bear-w-full bear-max-h-48 bear-overflow-auto bear-rounded-lg bear-border bear-border-gray-200 dark:bear-border-zinc-600 bear-bg-white dark:bear-bg-zinc-800 bear-py-1 bear-shadow-lg",
115
- children: b.map((e, r) => /* @__PURE__ */ M(
111
+ children: o.map((e, r) => /* @__PURE__ */ L(
116
112
  "button",
117
113
  {
118
114
  type: "button",
119
- className: z(
115
+ className: k(
120
116
  "bear-w-full bear-flex bear-items-center bear-gap-2 bear-px-3 bear-py-2 bear-text-left bear-text-gray-800 dark:bear-text-zinc-200 hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700 bear-transition-colors",
121
- r === c && "bear-bg-gray-100 dark:bear-bg-zinc-700"
117
+ r === l && "bear-bg-gray-100 dark:bear-bg-zinc-700"
122
118
  ),
123
- onMouseEnter: () => h(r),
119
+ onMouseEnter: () => d(r),
124
120
  onClick: () => N(e),
125
121
  children: [
126
- e.avatar && /* @__PURE__ */ x("span", { className: "bear-shrink-0", children: e.avatar }),
127
- /* @__PURE__ */ x("span", { children: e.label })
122
+ e.avatar && /* @__PURE__ */ f("span", { className: "bear-shrink-0", children: e.avatar }),
123
+ /* @__PURE__ */ f("span", { children: e.label })
128
124
  ]
129
125
  },
130
126
  e.value
@@ -136,5 +132,5 @@ const J = {
136
132
  );
137
133
  };
138
134
  export {
139
- Z as MentionsInput
135
+ C as MentionsInput
140
136
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(l,r)=>{const e=r.toLowerCase();return l.filter(t=>t.value.toLowerCase().includes(e)||String(t.label).toLowerCase().includes(e))};exports.defaultFilter=o;
@@ -0,0 +1,2 @@
1
+ import { MentionOption } from './MentionsInput.types';
2
+ export declare const defaultFilter: (options: MentionOption[], query: string) => MentionOption[];
@@ -0,0 +1,9 @@
1
+ const o = (t, l) => {
2
+ const e = l.toLowerCase();
3
+ return t.filter(
4
+ (r) => r.value.toLowerCase().includes(e) || String(r.label).toLowerCase().includes(e)
5
+ );
6
+ };
7
+ export {
8
+ o as defaultFilter
9
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react/jsx-runtime"),r=require("react"),T=require("../../utils/cn.cjs"),u=require("./NumberFormatter.const.cjs"),_=require("./NumberFormatter.utils.cjs"),g=t=>{const{value:e,prefix:A="",suffix:F="",animated:c=!1,animationDuration:o=u.DEFAULT_ANIMATION_DURATION,className:N,testId:y,...D}=t,M=r.useMemo(()=>_.buildFormatter(t),[t.formatStyle,t.locale,t.currency,t.currencyDisplay,t.unit,t.unitDisplay,t.notation,t.minimumFractionDigits,t.maximumFractionDigits,t.signDisplay]),[R,n]=r.useState(e),a=r.useRef(e),i=r.useRef(0);r.useEffect(()=>{if(!c){n(e),a.current=e;return}const m=a.current,l=e-m;if(l===0)return;const f=Math.max(1,Math.round(o/u.ANIMATION_FRAME_RATE));let s=0;const d=()=>{s++;const q=s/f,I=1-Math.pow(1-q,3);n(m+l*I),s<f?i.current=requestAnimationFrame(d):(n(e),a.current=e)};return i.current=requestAnimationFrame(d),()=>cancelAnimationFrame(i.current)},[e,c,o]);const b=M.format(R);return S.jsxs("span",{className:T.cn(u.ROOT_CLASSES,N),"data-testid":y,...D,children:[A,b,F]})};exports.NumberFormatter=g;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A="en-US",T="USD",E=400,e=16,t="Bear-NumberFormatter bear-inline bear-tabular-nums";exports.ANIMATION_FRAME_RATE=e;exports.DEFAULT_ANIMATION_DURATION=E;exports.DEFAULT_CURRENCY=T;exports.DEFAULT_LOCALE=A;exports.ROOT_CLASSES=t;
@@ -0,0 +1,5 @@
1
+ export declare const DEFAULT_LOCALE = "en-US";
2
+ export declare const DEFAULT_CURRENCY = "USD";
3
+ export declare const DEFAULT_ANIMATION_DURATION = 400;
4
+ export declare const ANIMATION_FRAME_RATE = 16;
5
+ export declare const ROOT_CLASSES = "Bear-NumberFormatter bear-inline bear-tabular-nums";
@@ -0,0 +1,8 @@
1
+ const A = "en-US", n = "USD", t = 400, e = 16, r = "Bear-NumberFormatter bear-inline bear-tabular-nums";
2
+ export {
3
+ e as ANIMATION_FRAME_RATE,
4
+ t as DEFAULT_ANIMATION_DURATION,
5
+ n as DEFAULT_CURRENCY,
6
+ A as DEFAULT_LOCALE,
7
+ r as ROOT_CLASSES
8
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { NumberFormatterProps } from './NumberFormatter.types';
3
+ export declare const NumberFormatter: FC<NumberFormatterProps>;
4
+ export default NumberFormatter;
@@ -0,0 +1,53 @@
1
+ import { jsxs as E } from "react/jsx-runtime";
2
+ import { useMemo as O, useState as R, useRef as l, useEffect as S } from "react";
3
+ import { cn as _ } from "../../utils/cn.js";
4
+ import { DEFAULT_ANIMATION_DURATION as g, ROOT_CLASSES as h, ANIMATION_FRAME_RATE as V } from "./NumberFormatter.const.js";
5
+ import { buildFormatter as b } from "./NumberFormatter.utils.js";
6
+ const k = (t) => {
7
+ const {
8
+ value: e,
9
+ prefix: d = "",
10
+ suffix: A = "",
11
+ animated: m = !1,
12
+ animationDuration: s = g,
13
+ className: D,
14
+ testId: F,
15
+ ...y
16
+ } = t, N = O(() => b(t), [
17
+ t.formatStyle,
18
+ t.locale,
19
+ t.currency,
20
+ t.currencyDisplay,
21
+ t.unit,
22
+ t.unitDisplay,
23
+ t.notation,
24
+ t.minimumFractionDigits,
25
+ t.maximumFractionDigits,
26
+ t.signDisplay
27
+ ]), [I, r] = R(e), n = l(e), a = l(0);
28
+ S(() => {
29
+ if (!m) {
30
+ r(e), n.current = e;
31
+ return;
32
+ }
33
+ const c = n.current, o = e - c;
34
+ if (o === 0) return;
35
+ const u = Math.max(1, Math.round(s / V));
36
+ let i = 0;
37
+ const f = () => {
38
+ i++;
39
+ const x = i / u, T = 1 - Math.pow(1 - x, 3);
40
+ r(c + o * T), i < u ? a.current = requestAnimationFrame(f) : (r(e), n.current = e);
41
+ };
42
+ return a.current = requestAnimationFrame(f), () => cancelAnimationFrame(a.current);
43
+ }, [e, m, s]);
44
+ const M = N.format(I);
45
+ return /* @__PURE__ */ E("span", { className: _(h, D), "data-testid": F, ...y, children: [
46
+ d,
47
+ M,
48
+ A
49
+ ] });
50
+ };
51
+ export {
52
+ k as NumberFormatter
53
+ };
@@ -0,0 +1,20 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export type NumberFormatStyle = 'decimal' | 'currency' | 'percent' | 'compact' | 'unit';
3
+ export interface NumberFormatterProps extends HTMLAttributes<HTMLSpanElement> {
4
+ value: number;
5
+ formatStyle?: NumberFormatStyle;
6
+ locale?: string;
7
+ currency?: string;
8
+ currencyDisplay?: 'symbol' | 'code' | 'name' | 'narrowSymbol';
9
+ unit?: string;
10
+ unitDisplay?: 'short' | 'long' | 'narrow';
11
+ notation?: 'standard' | 'scientific' | 'engineering' | 'compact';
12
+ minimumFractionDigits?: number;
13
+ maximumFractionDigits?: number;
14
+ signDisplay?: 'auto' | 'never' | 'always' | 'exceptZero';
15
+ prefix?: string;
16
+ suffix?: string;
17
+ animated?: boolean;
18
+ animationDuration?: number;
19
+ testId?: string;
20
+ }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./NumberFormatter.const.cjs"),p=m=>{const{formatStyle:t="decimal",locale:s=u.DEFAULT_LOCALE,currency:l=u.DEFAULT_CURRENCY,currencyDisplay:e,unit:n,unitDisplay:r,notation:c,minimumFractionDigits:o,maximumFractionDigits:a,signDisplay:y}=m,i={signDisplay:y};return t==="currency"?(i.style="currency",i.currency=l,e&&(i.currencyDisplay=e)):t==="percent"?i.style="percent":t==="compact"?i.notation="compact":t==="unit"&&n&&(i.style="unit",i.unit=n,r&&(i.unitDisplay=r)),c&&t!=="compact"&&(i.notation=c),o!==void 0&&(i.minimumFractionDigits=o),a!==void 0&&(i.maximumFractionDigits=a),new Intl.NumberFormat(s,i)};exports.buildFormatter=p;
@@ -0,0 +1,2 @@
1
+ import { NumberFormatterProps } from './NumberFormatter.types';
2
+ export declare const buildFormatter: (props: NumberFormatterProps) => Intl.NumberFormat;
@@ -0,0 +1,19 @@
1
+ import { DEFAULT_LOCALE as y, DEFAULT_CURRENCY as p } from "./NumberFormatter.const.js";
2
+ const D = (m) => {
3
+ const {
4
+ formatStyle: t = "decimal",
5
+ locale: s = y,
6
+ currency: u = p,
7
+ currencyDisplay: n,
8
+ unit: c,
9
+ unitDisplay: r,
10
+ notation: e,
11
+ minimumFractionDigits: o,
12
+ maximumFractionDigits: a,
13
+ signDisplay: l
14
+ } = m, i = { signDisplay: l };
15
+ return t === "currency" ? (i.style = "currency", i.currency = u, n && (i.currencyDisplay = n)) : t === "percent" ? i.style = "percent" : t === "compact" ? i.notation = "compact" : t === "unit" && c && (i.style = "unit", i.unit = c, r && (i.unitDisplay = r)), e && t !== "compact" && (i.notation = e), o !== void 0 && (i.minimumFractionDigits = o), a !== void 0 && (i.maximumFractionDigits = a), new Intl.NumberFormat(s, i);
16
+ };
17
+ export {
18
+ D as buildFormatter
19
+ };
@@ -0,0 +1,2 @@
1
+ export { NumberFormatter } from './NumberFormatter';
2
+ export type { NumberFormatterProps, NumberFormatStyle } from './NumberFormatter.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs");require("react");const u=require("../Icon/Icon.cjs"),r=require("./PageNav.const.cjs"),p=({size:a})=>e.jsx(u.Icon,{size:a,children:e.jsx("polyline",{points:"15 18 9 12 15 6"})}),h=({size:a})=>e.jsx(u.Icon,{size:a,children:e.jsx("polyline",{points:"9 6 15 12 9 18"})}),d=({item:a,direction:l,linkClass:n,labelClass:b,iconClass:t,sizeClass:x,iconSize:c})=>{const s=l==="prev",o=a.href?"a":"button",j=a.href?{href:a.href}:{type:"button",onClick:a.onClick};return e.jsxs(o,{...j,className:i.cn("bear-flex bear-flex-col bear-gap-1 bear-no-underline bear-min-w-0",s?"bear-items-start":"bear-items-end bear-ml-auto",n,x),children:[e.jsx("span",{className:i.cn("bear-text-[10px] bear-font-semibold bear-uppercase bear-tracking-wider",b),children:s?"Previous":"Next"}),e.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1.5 bear-font-medium",children:[s&&e.jsx("span",{className:i.cn("bear-flex-shrink-0",t),children:a.icon??e.jsx(p,{size:c})}),e.jsx("span",{className:"bear-truncate",children:a.label}),!s&&e.jsx("span",{className:i.cn("bear-flex-shrink-0",t),children:a.icon??e.jsx(h,{size:c})})]})]})},f=({prev:a,next:l,size:n="md",variant:b="default",className:t,testId:x,"aria-label":c="Page navigation"})=>{if(!a&&!l)return null;const s=r.VARIANT_CLASSES[b],o=r.ICON_SIZE[n];return e.jsxs("nav",{"data-testid":x,className:i.cn(r.ROOT_CLASS,"bear-flex bear-items-start bear-justify-between bear-gap-4 bear-border-t bear-border-zinc-700/50",r.SIZE_CLASSES[n],t),"aria-label":c,children:[a?e.jsx(d,{item:a,direction:"prev",linkClass:s.link,labelClass:s.label,iconClass:s.icon,sizeClass:r.LINK_SIZE[n],iconSize:o}):e.jsx("span",{}),l?e.jsx(d,{item:l,direction:"next",linkClass:s.link,labelClass:s.label,iconClass:s.icon,sizeClass:r.LINK_SIZE[n],iconSize:o}):e.jsx("span",{})]})};exports.PageNav=f;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Bear-PageNav",r={xs:"bear-text-xs bear-py-3",sm:"bear-text-sm bear-py-4",md:"bear-text-sm bear-py-6",lg:"bear-text-base bear-py-8",xl:"bear-text-lg bear-py-10"},a={xs:"bear-px-2 bear-py-1",sm:"bear-px-3 bear-py-1.5",md:"bear-px-4 bear-py-2",lg:"bear-px-5 bear-py-2.5",xl:"bear-px-6 bear-py-3"},b={default:{link:"bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors",label:"bear-text-zinc-500",icon:"bear-text-pink-500"},outlined:{link:"bear-border bear-border-zinc-700 bear-rounded-lg hover:bear-border-pink-500 hover:bear-text-pink-400 bear-transition-all",label:"bear-text-zinc-500",icon:"bear-text-pink-500"},filled:{link:"bear-bg-zinc-800/50 bear-rounded-lg hover:bear-bg-pink-500/10 hover:bear-text-pink-400 bear-transition-all",label:"bear-text-zinc-500",icon:"bear-text-pink-500"}},t={xs:12,sm:14,md:16,lg:18,xl:20};exports.ICON_SIZE=t;exports.LINK_SIZE=a;exports.ROOT_CLASS=e;exports.SIZE_CLASSES=r;exports.VARIANT_CLASSES=b;
@@ -0,0 +1,22 @@
1
+ import { BearSize } from '../../types';
2
+ export declare const ROOT_CLASS = "Bear-PageNav";
3
+ export declare const SIZE_CLASSES: Record<BearSize, string>;
4
+ export declare const LINK_SIZE: Record<BearSize, string>;
5
+ export declare const VARIANT_CLASSES: {
6
+ default: {
7
+ link: string;
8
+ label: string;
9
+ icon: string;
10
+ };
11
+ outlined: {
12
+ link: string;
13
+ label: string;
14
+ icon: string;
15
+ };
16
+ filled: {
17
+ link: string;
18
+ label: string;
19
+ icon: string;
20
+ };
21
+ };
22
+ export declare const ICON_SIZE: Record<BearSize, number>;
@@ -0,0 +1,42 @@
1
+ const e = "Bear-PageNav", r = {
2
+ xs: "bear-text-xs bear-py-3",
3
+ sm: "bear-text-sm bear-py-4",
4
+ md: "bear-text-sm bear-py-6",
5
+ lg: "bear-text-base bear-py-8",
6
+ xl: "bear-text-lg bear-py-10"
7
+ }, a = {
8
+ xs: "bear-px-2 bear-py-1",
9
+ sm: "bear-px-3 bear-py-1.5",
10
+ md: "bear-px-4 bear-py-2",
11
+ lg: "bear-px-5 bear-py-2.5",
12
+ xl: "bear-px-6 bear-py-3"
13
+ }, b = {
14
+ default: {
15
+ link: "bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors",
16
+ label: "bear-text-zinc-500",
17
+ icon: "bear-text-pink-500"
18
+ },
19
+ outlined: {
20
+ link: "bear-border bear-border-zinc-700 bear-rounded-lg hover:bear-border-pink-500 hover:bear-text-pink-400 bear-transition-all",
21
+ label: "bear-text-zinc-500",
22
+ icon: "bear-text-pink-500"
23
+ },
24
+ filled: {
25
+ link: "bear-bg-zinc-800/50 bear-rounded-lg hover:bear-bg-pink-500/10 hover:bear-text-pink-400 bear-transition-all",
26
+ label: "bear-text-zinc-500",
27
+ icon: "bear-text-pink-500"
28
+ }
29
+ }, t = {
30
+ xs: 12,
31
+ sm: 14,
32
+ md: 16,
33
+ lg: 18,
34
+ xl: 20
35
+ };
36
+ export {
37
+ t as ICON_SIZE,
38
+ a as LINK_SIZE,
39
+ e as ROOT_CLASS,
40
+ r as SIZE_CLASSES,
41
+ b as VARIANT_CLASSES
42
+ };
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { PageNavProps } from './PageNav.types';
3
+ export declare const PageNav: FC<PageNavProps>;
@@ -0,0 +1,81 @@
1
+ import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
+ import { cn as l } from "../../utils/cn.js";
3
+ import "react";
4
+ import { Icon as f } from "../Icon/Icon.js";
5
+ import { ICON_SIZE as C, LINK_SIZE as d, VARIANT_CLASSES as u, SIZE_CLASSES as N, ROOT_CLASS as x } from "./PageNav.const.js";
6
+ const S = ({ size: e }) => /* @__PURE__ */ a(f, { size: e, children: /* @__PURE__ */ a("polyline", { points: "15 18 9 12 15 6" }) }), g = ({ size: e }) => /* @__PURE__ */ a(f, { size: e, children: /* @__PURE__ */ a("polyline", { points: "9 6 15 12 9 18" }) }), m = ({ item: e, direction: s, linkClass: n, labelClass: c, iconClass: i, sizeClass: b, iconSize: t }) => {
7
+ const r = s === "prev", o = e.href ? "a" : "button", h = e.href ? { href: e.href } : { type: "button", onClick: e.onClick };
8
+ return /* @__PURE__ */ p(
9
+ o,
10
+ {
11
+ ...h,
12
+ className: l(
13
+ "bear-flex bear-flex-col bear-gap-1 bear-no-underline bear-min-w-0",
14
+ r ? "bear-items-start" : "bear-items-end bear-ml-auto",
15
+ n,
16
+ b
17
+ ),
18
+ children: [
19
+ /* @__PURE__ */ a("span", { className: l("bear-text-[10px] bear-font-semibold bear-uppercase bear-tracking-wider", c), children: r ? "Previous" : "Next" }),
20
+ /* @__PURE__ */ p("span", { className: "bear-flex bear-items-center bear-gap-1.5 bear-font-medium", children: [
21
+ r && /* @__PURE__ */ a("span", { className: l("bear-flex-shrink-0", i), children: e.icon ?? /* @__PURE__ */ a(S, { size: t }) }),
22
+ /* @__PURE__ */ a("span", { className: "bear-truncate", children: e.label }),
23
+ !r && /* @__PURE__ */ a("span", { className: l("bear-flex-shrink-0", i), children: e.icon ?? /* @__PURE__ */ a(g, { size: t }) })
24
+ ] })
25
+ ]
26
+ }
27
+ );
28
+ }, E = ({
29
+ prev: e,
30
+ next: s,
31
+ size: n = "md",
32
+ variant: c = "default",
33
+ className: i,
34
+ testId: b,
35
+ "aria-label": t = "Page navigation"
36
+ }) => {
37
+ if (!e && !s) return null;
38
+ const r = u[c], o = C[n];
39
+ return /* @__PURE__ */ p(
40
+ "nav",
41
+ {
42
+ "data-testid": b,
43
+ className: l(
44
+ x,
45
+ "bear-flex bear-items-start bear-justify-between bear-gap-4 bear-border-t bear-border-zinc-700/50",
46
+ N[n],
47
+ i
48
+ ),
49
+ "aria-label": t,
50
+ children: [
51
+ e ? /* @__PURE__ */ a(
52
+ m,
53
+ {
54
+ item: e,
55
+ direction: "prev",
56
+ linkClass: r.link,
57
+ labelClass: r.label,
58
+ iconClass: r.icon,
59
+ sizeClass: d[n],
60
+ iconSize: o
61
+ }
62
+ ) : /* @__PURE__ */ a("span", {}),
63
+ s ? /* @__PURE__ */ a(
64
+ m,
65
+ {
66
+ item: s,
67
+ direction: "next",
68
+ linkClass: r.link,
69
+ labelClass: r.label,
70
+ iconClass: r.icon,
71
+ sizeClass: d[n],
72
+ iconSize: o
73
+ }
74
+ ) : /* @__PURE__ */ a("span", {})
75
+ ]
76
+ }
77
+ );
78
+ };
79
+ export {
80
+ E as PageNav
81
+ };
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { BearSize } from '../../types';
3
+ export interface PageNavItem {
4
+ label: string;
5
+ href?: string;
6
+ onClick?: () => void;
7
+ icon?: ReactNode;
8
+ }
9
+ export interface PageNavProps {
10
+ prev?: PageNavItem | null;
11
+ next?: PageNavItem | null;
12
+ size?: BearSize;
13
+ variant?: 'default' | 'outlined' | 'filled';
14
+ className?: string;
15
+ testId?: string;
16
+ 'aria-label'?: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { PageNav } from './PageNav';
2
+ export type { PageNavProps, PageNavItem } from './PageNav.types';
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),d=require("../../utils/cn.cjs"),S=require("../Typography/Typography.cjs"),n=require("./Popconfirm.const.cjs"),j=e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),O=C=>{const{title:N,description:u,onConfirm:a,onCancel:o,confirmText:h=n.DEFAULT_CONFIRM_TEXT,cancelText:T=n.DEFAULT_CANCEL_TEXT,icon:p=j,placement:L="bottom",disabled:m=!1,children:_,variant:f="default",testId:b}=C,[s,E]=c.useState(!1),i=c.useRef(null),t=c.useCallback(()=>E(!1),[]);c.useEffect(()=>{const r=l=>{i.current&&!i.current.contains(l.target)&&t()};return s&&document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[s,t]),c.useEffect(()=>{const r=l=>{l.key==="Escape"&&t()};return s&&document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[s,t]);const v=()=>{m||E(!s)},A=()=>{a==null||a(),t()},x=()=>{o==null||o(),t()},y=f==="danger"?n.CONFIRM_BTN_DANGER_CLASSES:n.CONFIRM_BTN_DEFAULT_CLASSES;return e.jsxs("div",{ref:i,className:d.cn(n.ROOT_CLASS,"bear-relative bear-inline-block"),"data-testid":b,children:[e.jsx("div",{onClick:v,className:d.cn("bear-cursor-pointer",m&&"bear-opacity-50 bear-cursor-not-allowed bear-pointer-events-none"),children:_}),s&&e.jsxs("div",{className:d.cn(n.POPUP_CLASSES,n.PLACEMENT_OFFSETS[L]),children:[e.jsxs("div",{className:n.ICON_AREA_CLASSES,children:[e.jsx("div",{className:n.ICON_WRAPPER_CLASSES,children:p}),e.jsxs("div",{className:n.CONTENT_CLASSES,children:[e.jsx(S.Typography,{variant:"body2",className:"bear-text-gray-900 dark:bear-text-zinc-100",children:N}),u&&e.jsx(S.Typography,{variant:"caption",color:"secondary",className:"bear-mt-0.5",children:u})]})]}),e.jsxs("div",{className:n.BUTTONS_WRAPPER_CLASSES,children:[e.jsx("button",{type:"button",className:n.CANCEL_BTN_CLASSES,onClick:x,children:T}),e.jsx("button",{type:"button",className:y,onClick:A,children:h})]})]})]})};exports.Popconfirm=O;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Bear-Popconfirm",r="bear-absolute bear-z-[9999] bear-bg-white dark:bear-bg-zinc-800 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-rounded-lg bear-shadow-xl bear-p-4 bear-min-w-[220px] bear-max-w-[320px]",a={top:"bear-bottom-full bear-left-1/2 -bear-translate-x-1/2 bear-mb-2",bottom:"bear-top-full bear-left-1/2 -bear-translate-x-1/2 bear-mt-2",left:"bear-right-full bear-top-1/2 -bear-translate-y-1/2 bear-mr-2",right:"bear-left-full bear-top-1/2 -bear-translate-y-1/2 bear-ml-2"},b="bear-flex bear-items-center bear-gap-3 bear-mb-3",t="bear-flex-shrink-0 bear-w-8 bear-h-8 bear-flex bear-items-center bear-justify-center bear-rounded-full bear-bg-amber-100 dark:bear-bg-amber-900/30 bear-text-amber-600 dark:bear-text-amber-400",S="bear-flex-1 bear-min-w-0",o="bear-flex bear-justify-end bear-gap-2 bear-mt-4",n="bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-pink-500 bear-text-white hover:bear-bg-pink-600 dark:hover:bear-bg-pink-600",E="bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-red-500 bear-text-white hover:bear-bg-red-600 dark:hover:bear-bg-red-600",_="bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-white dark:bear-bg-zinc-700 bear-text-gray-700 dark:bear-text-zinc-300 bear-border bear-border-gray-300 dark:bear-border-zinc-600 hover:bear-bg-gray-50 dark:hover:bear-bg-zinc-600",C="Confirm",A="Cancel";exports.BUTTONS_WRAPPER_CLASSES=o;exports.CANCEL_BTN_CLASSES=_;exports.CONFIRM_BTN_DANGER_CLASSES=E;exports.CONFIRM_BTN_DEFAULT_CLASSES=n;exports.CONTENT_CLASSES=S;exports.DEFAULT_CANCEL_TEXT=A;exports.DEFAULT_CONFIRM_TEXT=C;exports.ICON_AREA_CLASSES=b;exports.ICON_WRAPPER_CLASSES=t;exports.PLACEMENT_OFFSETS=a;exports.POPUP_CLASSES=r;exports.ROOT_CLASS=e;
@@ -0,0 +1,13 @@
1
+ import { PopconfirmPlacement } from './Popconfirm.types';
2
+ export declare const ROOT_CLASS = "Bear-Popconfirm";
3
+ export declare const POPUP_CLASSES = "bear-absolute bear-z-[9999] bear-bg-white dark:bear-bg-zinc-800 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-rounded-lg bear-shadow-xl bear-p-4 bear-min-w-[220px] bear-max-w-[320px]";
4
+ export declare const PLACEMENT_OFFSETS: Record<PopconfirmPlacement, string>;
5
+ export declare const ICON_AREA_CLASSES = "bear-flex bear-items-center bear-gap-3 bear-mb-3";
6
+ export declare const ICON_WRAPPER_CLASSES = "bear-flex-shrink-0 bear-w-8 bear-h-8 bear-flex bear-items-center bear-justify-center bear-rounded-full bear-bg-amber-100 dark:bear-bg-amber-900/30 bear-text-amber-600 dark:bear-text-amber-400";
7
+ export declare const CONTENT_CLASSES = "bear-flex-1 bear-min-w-0";
8
+ export declare const BUTTONS_WRAPPER_CLASSES = "bear-flex bear-justify-end bear-gap-2 bear-mt-4";
9
+ export declare const CONFIRM_BTN_DEFAULT_CLASSES = "bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-pink-500 bear-text-white hover:bear-bg-pink-600 dark:hover:bear-bg-pink-600";
10
+ export declare const CONFIRM_BTN_DANGER_CLASSES = "bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-red-500 bear-text-white hover:bear-bg-red-600 dark:hover:bear-bg-red-600";
11
+ export declare const CANCEL_BTN_CLASSES = "bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-white dark:bear-bg-zinc-700 bear-text-gray-700 dark:bear-text-zinc-300 bear-border bear-border-gray-300 dark:bear-border-zinc-600 hover:bear-bg-gray-50 dark:hover:bear-bg-zinc-600";
12
+ export declare const DEFAULT_CONFIRM_TEXT = "Confirm";
13
+ export declare const DEFAULT_CANCEL_TEXT = "Cancel";
@@ -0,0 +1,20 @@
1
+ const e = "Bear-Popconfirm", r = "bear-absolute bear-z-[9999] bear-bg-white dark:bear-bg-zinc-800 bear-border bear-border-gray-200 dark:bear-border-zinc-700 bear-rounded-lg bear-shadow-xl bear-p-4 bear-min-w-[220px] bear-max-w-[320px]", a = {
2
+ top: "bear-bottom-full bear-left-1/2 -bear-translate-x-1/2 bear-mb-2",
3
+ bottom: "bear-top-full bear-left-1/2 -bear-translate-x-1/2 bear-mt-2",
4
+ left: "bear-right-full bear-top-1/2 -bear-translate-y-1/2 bear-mr-2",
5
+ right: "bear-left-full bear-top-1/2 -bear-translate-y-1/2 bear-ml-2"
6
+ }, b = "bear-flex bear-items-center bear-gap-3 bear-mb-3", t = "bear-flex-shrink-0 bear-w-8 bear-h-8 bear-flex bear-items-center bear-justify-center bear-rounded-full bear-bg-amber-100 dark:bear-bg-amber-900/30 bear-text-amber-600 dark:bear-text-amber-400", o = "bear-flex-1 bear-min-w-0", n = "bear-flex bear-justify-end bear-gap-2 bear-mt-4", d = "bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-pink-500 bear-text-white hover:bear-bg-pink-600 dark:hover:bear-bg-pink-600", i = "bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-red-500 bear-text-white hover:bear-bg-red-600 dark:hover:bear-bg-red-600", s = "bear-px-3 bear-py-1.5 bear-text-sm bear-font-medium bear-rounded-md bear-transition-colors bear-bg-white dark:bear-bg-zinc-700 bear-text-gray-700 dark:bear-text-zinc-300 bear-border bear-border-gray-300 dark:bear-border-zinc-600 hover:bear-bg-gray-50 dark:hover:bear-bg-zinc-600", l = "Confirm", m = "Cancel";
7
+ export {
8
+ n as BUTTONS_WRAPPER_CLASSES,
9
+ s as CANCEL_BTN_CLASSES,
10
+ i as CONFIRM_BTN_DANGER_CLASSES,
11
+ d as CONFIRM_BTN_DEFAULT_CLASSES,
12
+ o as CONTENT_CLASSES,
13
+ m as DEFAULT_CANCEL_TEXT,
14
+ l as DEFAULT_CONFIRM_TEXT,
15
+ b as ICON_AREA_CLASSES,
16
+ t as ICON_WRAPPER_CLASSES,
17
+ a as PLACEMENT_OFFSETS,
18
+ r as POPUP_CLASSES,
19
+ e as ROOT_CLASS
20
+ };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { PopconfirmProps } from './Popconfirm.types';
3
+ export declare const Popconfirm: FC<PopconfirmProps>;
4
+ export default Popconfirm;