@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,100 +1,89 @@
1
- import { jsxs as b, jsx as t, Fragment as G } from "react/jsx-runtime";
2
- import { useState as w, useRef as E, useCallback as D, useEffect as v, useMemo as T } from "react";
3
- import { cn as m } from "../../utils/cn.js";
4
- import { DEFAULT_PLACEHOLDER as P, DEFAULT_SHORTCUT_KEY as Y, DEFAULT_NOTHING_FOUND as z, DEFAULT_LIMIT as Q, FOCUS_DELAY as V, SPOTLIGHT_Z_INDEX as W } from "./Spotlight.const.js";
5
- const X = (l, s) => {
6
- var o, u;
7
- const i = s.toLowerCase();
8
- return !!(l.label.toLowerCase().includes(i) || (o = l.description) != null && o.toLowerCase().includes(i) || (u = l.keywords) != null && u.some((y) => y.toLowerCase().includes(i)));
9
- }, I = (l, s) => {
10
- if (!s) return l;
11
- const i = l.toLowerCase().indexOf(s.toLowerCase());
12
- return i === -1 ? l : /* @__PURE__ */ b(G, { children: [
13
- l.slice(0, i),
14
- /* @__PURE__ */ t("mark", { className: "Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5", children: l.slice(i, i + s.length) }),
15
- l.slice(i + s.length)
16
- ] });
17
- }, ee = (l) => {
1
+ import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
+ import { useState as u, useRef as B, useCallback as E, useEffect as f, useMemo as D } from "react";
3
+ import { cn as h } from "../../utils/cn.js";
4
+ import { DEFAULT_PLACEHOLDER as q, DEFAULT_SHORTCUT_KEY as G, DEFAULT_NOTHING_FOUND as P, DEFAULT_LIMIT as Y, FOCUS_DELAY as z, SPOTLIGHT_Z_INDEX as Q } from "./Spotlight.const.js";
5
+ import { matchAction as V, highlightText as T } from "./Spotlight.utils.js";
6
+ const ee = (I) => {
18
7
  const {
19
- actions: s,
20
- open: i,
21
- onOpenChange: o,
22
- placeholder: u = P,
23
- shortcutKey: y = Y,
24
- shortcutMod: N = !0,
25
- nothingFoundMessage: A = z,
26
- highlightMatches: S = !0,
27
- limit: x = Q,
28
- filter: f,
8
+ actions: c,
9
+ open: L,
10
+ onOpenChange: g,
11
+ placeholder: A = q,
12
+ shortcutKey: k = G,
13
+ shortcutMod: _ = !0,
14
+ nothingFoundMessage: C = P,
15
+ highlightMatches: v = !0,
16
+ limit: p = Y,
17
+ filter: y,
29
18
  className: O,
30
19
  style: M,
31
- testId: F
32
- } = l, [U, K] = w(!1), [n, L] = w(""), [p, h] = w(0), B = E(null), C = E(null), g = i ?? U, d = D(
20
+ testId: U
21
+ } = I, [F, K] = u(!1), [l, w] = u(""), [n, d] = u(0), N = B(null), S = B(null), o = L ?? F, s = E(
33
22
  (e) => {
34
- K(e), o == null || o(e), e || (L(""), h(0));
23
+ K(e), g == null || g(e), e || (w(""), d(0));
35
24
  },
36
- [o]
25
+ [g]
37
26
  );
38
- v(() => {
27
+ f(() => {
39
28
  const e = (r) => {
40
- (N ? r.metaKey || r.ctrlKey : !0) && r.key.toLowerCase() === y.toLowerCase() && (r.preventDefault(), d(!g)), r.key === "Escape" && g && d(!1);
29
+ (_ ? r.metaKey || r.ctrlKey : !0) && r.key.toLowerCase() === k.toLowerCase() && (r.preventDefault(), s(!o)), r.key === "Escape" && o && s(!1);
41
30
  };
42
31
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
43
- }, [y, N, g, d]), v(() => {
44
- g && setTimeout(() => {
32
+ }, [k, _, o, s]), f(() => {
33
+ o && setTimeout(() => {
45
34
  var e;
46
- return (e = B.current) == null ? void 0 : e.focus();
47
- }, V);
48
- }, [g]);
49
- const c = T(() => f ? f(n, s).slice(0, x) : n ? s.filter((e) => X(e, n)).slice(0, x) : s.slice(0, x), [s, n, f, x]), R = T(() => {
35
+ return (e = N.current) == null ? void 0 : e.focus();
36
+ }, z);
37
+ }, [o]);
38
+ const i = D(() => y ? y(l, c).slice(0, p) : l ? c.filter((e) => V(e, l)).slice(0, p) : c.slice(0, p), [c, l, y, p]), R = D(() => {
50
39
  const e = /* @__PURE__ */ new Map();
51
- return c.forEach((r) => {
40
+ return i.forEach((r) => {
52
41
  const a = r.group || "";
53
42
  e.has(a) || e.set(a, []), e.get(a).push(r);
54
43
  }), e;
55
- }, [c]), H = D(
44
+ }, [i]), H = E(
56
45
  (e) => {
57
46
  if (e.key === "ArrowDown")
58
- e.preventDefault(), h((r) => Math.min(r + 1, c.length - 1));
47
+ e.preventDefault(), d((r) => Math.min(r + 1, i.length - 1));
59
48
  else if (e.key === "ArrowUp")
60
- e.preventDefault(), h((r) => Math.max(r - 1, 0));
61
- else if (e.key === "Enter" && c[p]) {
49
+ e.preventDefault(), d((r) => Math.max(r - 1, 0));
50
+ else if (e.key === "Enter" && i[n]) {
62
51
  e.preventDefault();
63
- const r = c[p];
64
- r.disabled || (r.onTrigger(), d(!1));
52
+ const r = i[n];
53
+ r.disabled || (r.onTrigger(), s(!1));
65
54
  }
66
55
  },
67
- [c, p, d]
56
+ [i, n, s]
68
57
  );
69
- if (v(() => {
70
- const e = C.current;
58
+ if (f(() => {
59
+ const e = S.current;
71
60
  if (!e) return;
72
61
  const r = e.querySelector('[data-active="true"]');
73
62
  r == null || r.scrollIntoView({ block: "nearest" });
74
- }, [p]), !g) return null;
75
- let k = -1;
63
+ }, [n]), !o) return null;
64
+ let x = -1;
76
65
  return /* @__PURE__ */ b(
77
66
  "div",
78
67
  {
79
- className: m(
68
+ className: h(
80
69
  "Bear-Spotlight",
81
70
  "bear-fixed bear-inset-0 bear-flex bear-items-start bear-justify-center bear-pt-[15vh]"
82
71
  ),
83
- style: { zIndex: W },
84
- "data-testid": F,
72
+ style: { zIndex: Q },
73
+ "data-testid": U,
85
74
  children: [
86
75
  /* @__PURE__ */ t(
87
76
  "div",
88
77
  {
89
78
  className: "Bear-Spotlight__backdrop bear-absolute bear-inset-0 bear-bg-black/50 dark:bear-bg-black/70 bear-backdrop-blur-sm",
90
- onClick: () => d(!1),
79
+ onClick: () => s(!1),
91
80
  "aria-hidden": "true"
92
81
  }
93
82
  ),
94
83
  /* @__PURE__ */ b(
95
84
  "div",
96
85
  {
97
- className: m(
86
+ className: h(
98
87
  "Bear-Spotlight__dialog",
99
88
  "bear-relative bear-w-full bear-max-w-[560px] bear-mx-4",
100
89
  "bear-bg-white dark:bear-bg-gray-900",
@@ -127,15 +116,15 @@ const X = (l, s) => {
127
116
  /* @__PURE__ */ t(
128
117
  "input",
129
118
  {
130
- ref: B,
119
+ ref: N,
131
120
  type: "text",
132
- value: n,
121
+ value: l,
133
122
  onChange: (e) => {
134
- L(e.target.value), h(0);
123
+ w(e.target.value), d(0);
135
124
  },
136
125
  onKeyDown: H,
137
- placeholder: u,
138
- className: m(
126
+ placeholder: A,
127
+ className: h(
139
128
  "Bear-Spotlight__input",
140
129
  "bear-flex-1 bear-bg-transparent bear-outline-none bear-text-base",
141
130
  "bear-text-gray-900 dark:bear-text-white",
@@ -150,39 +139,39 @@ const X = (l, s) => {
150
139
  /* @__PURE__ */ b(
151
140
  "div",
152
141
  {
153
- ref: C,
142
+ ref: S,
154
143
  className: "Bear-Spotlight__results bear-max-h-[400px] bear-overflow-y-auto bear-py-2",
155
144
  role: "listbox",
156
145
  children: [
157
- c.length === 0 && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__empty bear-px-4 bear-py-8 bear-text-center bear-text-gray-500 dark:bear-text-gray-400 bear-text-sm", children: A }),
146
+ i.length === 0 && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__empty bear-px-4 bear-py-8 bear-text-center bear-text-gray-500 dark:bear-text-gray-400 bear-text-sm", children: C }),
158
147
  Array.from(R.entries()).map(([e, r]) => /* @__PURE__ */ b("div", { className: "Bear-Spotlight__group", children: [
159
148
  e && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__group-title bear-px-4 bear-py-1.5 bear-text-xs bear-font-semibold bear-uppercase bear-tracking-wider bear-text-gray-400 dark:bear-text-gray-500", children: e }),
160
149
  r.map((a) => {
161
- k++;
162
- const _ = k === p, j = k;
150
+ x++;
151
+ const m = x === n, j = x;
163
152
  return /* @__PURE__ */ b(
164
153
  "button",
165
154
  {
166
- className: m(
155
+ className: h(
167
156
  "Bear-Spotlight__action",
168
157
  "bear-w-full bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2.5 bear-text-left bear-cursor-pointer",
169
158
  "bear-transition-colors bear-duration-100",
170
- _ ? "bear-bg-gray-100 dark:bear-bg-gray-800" : "hover:bear-bg-gray-50 dark:hover:bear-bg-gray-800/50",
159
+ m ? "bear-bg-gray-100 dark:bear-bg-gray-800" : "hover:bear-bg-gray-50 dark:hover:bear-bg-gray-800/50",
171
160
  a.disabled && "bear-opacity-50 bear-cursor-not-allowed"
172
161
  ),
173
- "data-active": _,
174
- onMouseEnter: () => h(j),
162
+ "data-active": m,
163
+ onMouseEnter: () => d(j),
175
164
  onClick: () => {
176
- a.disabled || (a.onTrigger(), d(!1));
165
+ a.disabled || (a.onTrigger(), s(!1));
177
166
  },
178
167
  role: "option",
179
- "aria-selected": _,
168
+ "aria-selected": m,
180
169
  "aria-disabled": a.disabled,
181
170
  children: [
182
171
  a.icon && /* @__PURE__ */ t("span", { className: "Bear-Spotlight__action-icon bear-text-gray-500 dark:bear-text-gray-400 bear-shrink-0", children: a.icon }),
183
172
  /* @__PURE__ */ b("div", { className: "Bear-Spotlight__action-body bear-flex-1 bear-min-w-0", children: [
184
- /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-label bear-text-sm bear-font-medium bear-text-gray-900 dark:bear-text-white bear-truncate", children: S ? I(a.label, n) : a.label }),
185
- a.description && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-desc bear-text-xs bear-text-gray-500 dark:bear-text-gray-400 bear-truncate", children: S ? I(a.description, n) : a.description })
173
+ /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-label bear-text-sm bear-font-medium bear-text-gray-900 dark:bear-text-white bear-truncate", children: v ? T(a.label, l) : a.label }),
174
+ a.description && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-desc bear-text-xs bear-text-gray-500 dark:bear-text-gray-400 bear-truncate", children: v ? T(a.description, l) : a.description })
186
175
  ] }),
187
176
  a.rightSection && /* @__PURE__ */ t("span", { className: "Bear-Spotlight__action-right bear-shrink-0", children: a.rightSection })
188
177
  ]
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=(e,t)=>{var s,o;const r=t.toLowerCase();return!!(e.label.toLowerCase().includes(r)||(s=e.description)!=null&&s.toLowerCase().includes(r)||(o=e.keywords)!=null&&o.some(n=>n.toLowerCase().includes(r)))},a=(e,t)=>{if(!t)return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?e:i.jsxs(i.Fragment,{children:[e.slice(0,r),i.jsx("mark",{className:"Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5",children:e.slice(r,r+t.length)}),e.slice(r+t.length)]})};exports.highlightText=a;exports.matchAction=l;
@@ -0,0 +1,3 @@
1
+ import { SpotlightAction } from './Spotlight.types';
2
+ export declare const matchAction: (action: SpotlightAction, query: string) => boolean;
3
+ export declare const highlightText: (text: string, query: string) => React.ReactNode;
@@ -0,0 +1,18 @@
1
+ import { jsxs as n, Fragment as l, jsx as a } from "react/jsx-runtime";
2
+ const h = (e, s) => {
3
+ var o, i;
4
+ const r = s.toLowerCase();
5
+ return !!(e.label.toLowerCase().includes(r) || (o = e.description) != null && o.toLowerCase().includes(r) || (i = e.keywords) != null && i.some((t) => t.toLowerCase().includes(r)));
6
+ }, d = (e, s) => {
7
+ if (!s) return e;
8
+ const r = e.toLowerCase().indexOf(s.toLowerCase());
9
+ return r === -1 ? e : /* @__PURE__ */ n(l, { children: [
10
+ e.slice(0, r),
11
+ /* @__PURE__ */ a("mark", { className: "Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5", children: e.slice(r, r + s.length) }),
12
+ e.slice(r + s.length)
13
+ ] });
14
+ };
15
+ export {
16
+ d as highlightText,
17
+ h as matchAction
18
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),s=require("../../utils/cn.cjs"),d=i.createContext(null),T=({children:a,defaultTab:t,variant:r="line",onChange:e,className:o,testId:l})=>{const[x,g]=i.useState(t),b=c=>{g(c),e==null||e(c)};return n.jsx(d.Provider,{value:{activeTab:x,setActiveTab:b,variant:r},children:n.jsx("div",{className:s.cn("Bear-Tabs",o),"data-testid":l,children:a})})},y=({children:a,className:t})=>{const r=i.useContext(d);if(!r)throw new Error("TabList must be used within Tabs");const{variant:e}=r;return n.jsx("div",{role:"tablist",className:s.cn("Bear-Tabs__list",`Bear-Tabs__list--${e}`,"bear-flex bear-gap-1",e==="line"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",e==="pills"&&"bear-bg-gray-100 dark:bear-bg-gray-800 bear-p-1 bear-rounded-lg",e==="enclosed"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",t),children:a})},v=({id:a,children:t,disabled:r=!1,icon:e})=>{const o=i.useContext(d);if(!o)throw new Error("Tab must be used within Tabs");const{activeTab:l,setActiveTab:x,variant:g}=o,b=l===a,c="bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors",u={line:s.cn("bear-border-b-2 bear--mb-px",b?"bear-border-pink-500 bear-text-pink-600 dark:bear-text-pink-400":"bear-border-transparent bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white hover:bear-border-gray-300"),pills:s.cn("bear-rounded-md",b?"bear-bg-white dark:bear-bg-gray-700 bear-text-gray-900 dark:bear-text-white bear-shadow-sm":"bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"),enclosed:s.cn("bear-rounded-t-lg bear-border bear-border-transparent",b?"bear-bg-white dark:bear-bg-gray-900 bear-border-gray-200 dark:bear-border-gray-700 bear-border-b-white dark:bear-border-b-gray-900 bear--mb-px bear-text-gray-900 dark:bear-text-white":"bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white")};return n.jsxs("button",{role:"tab","aria-selected":b,disabled:r,onClick:()=>!r&&x(a),className:s.cn("Bear-Tabs__tab",b&&"Bear-Tabs__tab--active",c,u[g],r&&"Bear-Tabs__tab--disabled bear-opacity-50 bear-cursor-not-allowed"),children:[e&&n.jsx("span",{className:"Bear-Tabs__tab-icon",children:e}),n.jsx("span",{className:"Bear-Tabs__tab-label",children:t})]})},h=({tabId:a,children:t,className:r})=>{const e=i.useContext(d);if(!e)throw new Error("TabPanel must be used within Tabs");const{activeTab:o}=e;return o!==a?null:n.jsx("div",{role:"tabpanel",className:s.cn("Bear-Tabs__panel bear-py-4",r),children:t})};exports.Tab=v;exports.TabList=y;exports.TabPanel=h;exports.Tabs=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),n=require("../../utils/cn.cjs"),d=i.createContext(null),v=({children:a,value:t,defaultTab:r,variant:e="line",onChange:b,className:l,testId:x})=>{const[T,s]=i.useState(r),c=t!==void 0,g=c?t:T,y=u=>{c||s(u),b==null||b(u)};return o.jsx(d.Provider,{value:{activeTab:g,setActiveTab:y,variant:e},children:o.jsx("div",{className:n.cn("Bear-Tabs",l),"data-testid":x,children:a})})},h=({children:a,className:t})=>{const r=i.useContext(d);if(!r)throw new Error("TabList must be used within Tabs");const{variant:e}=r;return o.jsx("div",{role:"tablist",className:n.cn("Bear-Tabs__list",`Bear-Tabs__list--${e}`,"bear-flex bear-gap-1",e==="line"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",e==="pills"&&"bear-bg-gray-100 dark:bear-bg-gray-800 bear-p-1 bear-rounded-lg",e==="enclosed"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",t),children:a})},p=({id:a,children:t,disabled:r=!1,icon:e})=>{const b=i.useContext(d);if(!b)throw new Error("Tab must be used within Tabs");const{activeTab:l,setActiveTab:x,variant:T}=b,s=l===a,c="bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors",g={line:n.cn("bear-border-b-2 bear--mb-px",s?"bear-border-pink-500 bear-text-pink-600 dark:bear-text-pink-400":"bear-border-transparent bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white hover:bear-border-gray-300"),pills:n.cn("bear-rounded-md",s?"bear-bg-white dark:bear-bg-gray-700 bear-text-gray-900 dark:bear-text-white bear-shadow-sm":"bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"),enclosed:n.cn("bear-rounded-t-lg bear-border bear-border-transparent",s?"bear-bg-white dark:bear-bg-gray-900 bear-border-gray-200 dark:bear-border-gray-700 bear-border-b-white dark:bear-border-b-gray-900 bear--mb-px bear-text-gray-900 dark:bear-text-white":"bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white")};return o.jsxs("button",{role:"tab","aria-selected":s,disabled:r,onClick:()=>!r&&x(a),className:n.cn("Bear-Tabs__tab",s&&"Bear-Tabs__tab--active",c,g[T],r&&"Bear-Tabs__tab--disabled bear-opacity-50 bear-cursor-not-allowed"),children:[e&&o.jsx("span",{className:"Bear-Tabs__tab-icon",children:e}),o.jsx("span",{className:"Bear-Tabs__tab-label",children:t})]})},k=({tabId:a,children:t,className:r})=>{const e=i.useContext(d);if(!e)throw new Error("TabPanel must be used within Tabs");const{activeTab:b}=e;return b!==a?null:o.jsx("div",{role:"tabpanel",className:n.cn("Bear-Tabs__panel bear-py-4",r),children:t})};exports.Tab=p;exports.TabList=h;exports.TabPanel=k;exports.Tabs=v;
@@ -1,27 +1,28 @@
1
- import { jsxs as T, jsx as n } from "react/jsx-runtime";
2
- import { createContext as p, useContext as g, useState as m } from "react";
3
- import { cn as s } from "../../utils/cn.js";
4
- const d = p(null), k = ({
1
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
+ import { createContext as v, useContext as T, useState as h } from "react";
3
+ import { cn as o } from "../../utils/cn.js";
4
+ const d = v(null), _ = ({
5
5
  children: a,
6
- defaultTab: t,
7
- variant: e = "line",
8
- onChange: r,
9
- className: o,
6
+ value: t,
7
+ defaultTab: e,
8
+ variant: r = "line",
9
+ onChange: b,
10
+ className: l,
10
11
  testId: c
11
12
  }) => {
12
- const [l, x] = m(t), b = (i) => {
13
- x(i), r == null || r(i);
13
+ const [x, s] = h(e), i = t !== void 0, g = i ? t : x, p = (y) => {
14
+ i || s(y), b == null || b(y);
14
15
  };
15
- return /* @__PURE__ */ n(d.Provider, { value: { activeTab: l, setActiveTab: b, variant: e }, children: /* @__PURE__ */ n("div", { className: s("Bear-Tabs", o), "data-testid": c, children: a }) });
16
- }, w = ({ children: a, className: t }) => {
17
- const e = g(d);
16
+ return /* @__PURE__ */ n(d.Provider, { value: { activeTab: g, setActiveTab: p, variant: r }, children: /* @__PURE__ */ n("div", { className: o("Bear-Tabs", l), "data-testid": c, children: a }) });
17
+ }, f = ({ children: a, className: t }) => {
18
+ const e = T(d);
18
19
  if (!e) throw new Error("TabList must be used within Tabs");
19
20
  const { variant: r } = e;
20
21
  return /* @__PURE__ */ n(
21
22
  "div",
22
23
  {
23
24
  role: "tablist",
24
- className: s(
25
+ className: o(
25
26
  "Bear-Tabs__list",
26
27
  `Bear-Tabs__list--${r}`,
27
28
  "bear-flex bear-gap-1",
@@ -33,35 +34,35 @@ const d = p(null), k = ({
33
34
  children: a
34
35
  }
35
36
  );
36
- }, _ = ({ id: a, children: t, disabled: e = !1, icon: r }) => {
37
- const o = g(d);
38
- if (!o) throw new Error("Tab must be used within Tabs");
39
- const { activeTab: c, setActiveTab: l, variant: x } = o, b = c === a, i = "bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors", y = {
40
- line: s(
37
+ }, B = ({ id: a, children: t, disabled: e = !1, icon: r }) => {
38
+ const b = T(d);
39
+ if (!b) throw new Error("Tab must be used within Tabs");
40
+ const { activeTab: l, setActiveTab: c, variant: x } = b, s = l === a, i = "bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors", g = {
41
+ line: o(
41
42
  "bear-border-b-2 bear--mb-px",
42
- b ? "bear-border-pink-500 bear-text-pink-600 dark:bear-text-pink-400" : "bear-border-transparent bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white hover:bear-border-gray-300"
43
+ s ? "bear-border-pink-500 bear-text-pink-600 dark:bear-text-pink-400" : "bear-border-transparent bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white hover:bear-border-gray-300"
43
44
  ),
44
- pills: s(
45
+ pills: o(
45
46
  "bear-rounded-md",
46
- b ? "bear-bg-white dark:bear-bg-gray-700 bear-text-gray-900 dark:bear-text-white bear-shadow-sm" : "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"
47
+ s ? "bear-bg-white dark:bear-bg-gray-700 bear-text-gray-900 dark:bear-text-white bear-shadow-sm" : "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"
47
48
  ),
48
- enclosed: s(
49
+ enclosed: o(
49
50
  "bear-rounded-t-lg bear-border bear-border-transparent",
50
- b ? "bear-bg-white dark:bear-bg-gray-900 bear-border-gray-200 dark:bear-border-gray-700 bear-border-b-white dark:bear-border-b-gray-900 bear--mb-px bear-text-gray-900 dark:bear-text-white" : "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"
51
+ s ? "bear-bg-white dark:bear-bg-gray-900 bear-border-gray-200 dark:bear-border-gray-700 bear-border-b-white dark:bear-border-b-gray-900 bear--mb-px bear-text-gray-900 dark:bear-text-white" : "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"
51
52
  )
52
53
  };
53
- return /* @__PURE__ */ T(
54
+ return /* @__PURE__ */ m(
54
55
  "button",
55
56
  {
56
57
  role: "tab",
57
- "aria-selected": b,
58
+ "aria-selected": s,
58
59
  disabled: e,
59
- onClick: () => !e && l(a),
60
- className: s(
60
+ onClick: () => !e && c(a),
61
+ className: o(
61
62
  "Bear-Tabs__tab",
62
- b && "Bear-Tabs__tab--active",
63
+ s && "Bear-Tabs__tab--active",
63
64
  i,
64
- y[x],
65
+ g[x],
65
66
  e && "Bear-Tabs__tab--disabled bear-opacity-50 bear-cursor-not-allowed"
66
67
  ),
67
68
  children: [
@@ -70,15 +71,15 @@ const d = p(null), k = ({
70
71
  ]
71
72
  }
72
73
  );
73
- }, f = ({ tabId: a, children: t, className: e }) => {
74
- const r = g(d);
74
+ }, N = ({ tabId: a, children: t, className: e }) => {
75
+ const r = T(d);
75
76
  if (!r) throw new Error("TabPanel must be used within Tabs");
76
- const { activeTab: o } = r;
77
- return o !== a ? null : /* @__PURE__ */ n("div", { role: "tabpanel", className: s("Bear-Tabs__panel bear-py-4", e), children: t });
77
+ const { activeTab: b } = r;
78
+ return b !== a ? null : /* @__PURE__ */ n("div", { role: "tabpanel", className: o("Bear-Tabs__panel bear-py-4", e), children: t });
78
79
  };
79
80
  export {
80
- _ as Tab,
81
- w as TabList,
82
- f as TabPanel,
83
- k as Tabs
81
+ B as Tab,
82
+ f as TabList,
83
+ N as TabPanel,
84
+ _ as Tabs
84
85
  };
@@ -7,7 +7,9 @@ export interface TabsContextValue {
7
7
  export interface TabsProps {
8
8
  /** Tab panels */
9
9
  children: ReactNode;
10
- /** Default active tab */
10
+ /** Controlled active tab (when set, defaultTab is ignored) */
11
+ value?: string;
12
+ /** Default active tab (uncontrolled) */
11
13
  defaultTab: string;
12
14
  /** Visual variant */
13
15
  variant?: 'line' | 'pills' | 'enclosed';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("react"),b=require("../../../../utils/cn.cjs"),a=require("../../TimePicker.constants.cjs"),B=require("../../helpers/ClockFaceSvg.cjs"),R=({selectedHour:i,setSelectedHour:d,selectedMinute:n,setSelectedMinute:m,period:x,setPeriod:u,format:t,hours:k,minutes:_,timeValue:h,clearable:T,onChange:s,onConfirm:p,onClose:S,translations:j})=>{const[N,l]=M.useState("hour"),c={...a.TIMEPICKER_DEFAULT_TRANSLATIONS,...j},P=t==="12h"?i===12?12:i%12:i,v=n,g=`${P.toString().padStart(2,"0")}:${v.toString().padStart(2,"0")}`,y=t==="12h"?[...a.CLOCK_HOURS_12]:k,o=N==="hour",C=o?y:_,E=o?r=>d(t==="12h"&&r===0?12:r):m;return e.jsxs("div",{className:b.cn(a.TIMEPICKER_DROPDOWN_CLASSES,"Bear-TimePicker__dial bear-w-72"),children:[e.jsx("div",{className:"Bear-TimePicker__dial-title bear-text-center bear-uppercase bear-text-xs bear-text-gray-500 dark:bear-text-zinc-400 bear-mb-2",children:c.selectTime}),e.jsxs("div",{className:"Bear-TimePicker__dial-display bear-flex bear-items-center bear-justify-center bear-gap-3 bear-mb-4",children:[e.jsx("span",{className:"Bear-TimePicker__dial-time bear-text-2xl bear-font-bold bear-text-gray-900 dark:bear-text-white",children:g}),t==="12h"&&e.jsx("div",{className:"Bear-TimePicker__dial-period bear-flex bear-flex-col bear-gap-0.5",children:["AM","PM"].map(r=>e.jsx("button",{onClick:()=>u(r),className:b.cn("Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",x===r?"bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium":"bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"),children:r},r))})]}),e.jsxs("div",{className:"Bear-TimePicker__dial-mode bear-flex bear-items-center bear-justify-center bear-gap-2 bear-mb-2",children:[e.jsx("button",{type:"button",onClick:()=>l("hour"),className:"Bear-TimePicker__dial-mode-btn bear-p-1 bear-rounded bear-text-gray-500 hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700","aria-label":"Hour mode",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{type:"button",onClick:()=>l("minute"),className:"Bear-TimePicker__dial-mode-btn bear-p-1 bear-rounded bear-text-gray-500 hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700","aria-label":"Minute mode",children:e.jsx("svg",{className:"bear-w-4 bear-h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),e.jsx("div",{className:"Bear-TimePicker__dial-face bear-relative bear-w-48 bear-h-48 bear-mx-auto bear-mb-4",children:e.jsx(B.ClockFaceSvg,{values:C,isHourMode:o,format:t,selectedHour:i,selectedMinute:n,onSelect:E})}),e.jsxs("div",{className:a.TIMEPICKER_FOOTER_CLASSES,children:[T&&h&&e.jsx("button",{onClick:()=>{s==null||s(null),S()},className:a.TIMEPICKER_CLEAR_BUTTON_CLASSES,children:c.cancel}),e.jsx("button",{onClick:p,className:a.TIMEPICKER_CONFIRM_BUTTON_CLASSES,children:c.ok})]})]})};exports.TimePickerDialDropdown=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),n=require("../../../../utils/cn.cjs"),i=require("../../TimePicker.constants.cjs"),v=require("../../helpers/ClockFaceSvg.cjs"),m="bear-text-blue-600 dark:bear-text-blue-400 bear-font-bold bear-bg-blue-50 dark:bear-bg-blue-900/30 bear-rounded bear-px-1",_="bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-300 bear-cursor-pointer bear-px-1",D=({selectedHour:c,setSelectedHour:o,selectedMinute:d,setSelectedMinute:x,period:k,setPeriod:T,format:a,hours:S,minutes:h,timeValue:p,clearable:E,onChange:l,onConfirm:C,onClose:N,translations:P})=>{const[I,s]=u.useState("hour"),b={...i.TIMEPICKER_DEFAULT_TRANSLATIONS,...P},j=a==="12h"?c===12?12:c%12:c,y=d,g=j.toString().padStart(2,"0"),A=y.toString().padStart(2,"0"),M=a==="12h"?[...i.CLOCK_HOURS_12]:S,t=I==="hour",O=t?M:h,R=u.useCallback(r=>{t?(o(a==="12h"&&r===0?12:r),s("minute")):x(r)},[t,a,o,x]);return e.jsxs("div",{className:n.cn(i.TIMEPICKER_DROPDOWN_CLASSES,"Bear-TimePicker__dial bear-w-72"),children:[e.jsx("div",{className:"Bear-TimePicker__dial-title bear-text-center bear-uppercase bear-text-xs bear-text-gray-500 dark:bear-text-zinc-400 bear-mb-2",children:b.selectTime}),e.jsxs("div",{className:"Bear-TimePicker__dial-display bear-flex bear-items-center bear-justify-center bear-gap-1 bear-mb-4",children:[e.jsx("button",{type:"button",onClick:()=>s("hour"),className:n.cn("Bear-TimePicker__dial-hour-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",t?m:_),"aria-label":b.hour,children:g}),e.jsx("span",{className:"bear-text-2xl bear-font-bold bear-text-gray-900 dark:bear-text-white",children:":"}),e.jsx("button",{type:"button",onClick:()=>s("minute"),className:n.cn("Bear-TimePicker__dial-minute-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",t?_:m),"aria-label":b.minute,children:A}),a==="12h"&&e.jsx("div",{className:"Bear-TimePicker__dial-period bear-flex bear-flex-col bear-gap-0.5 bear-ml-2",children:["AM","PM"].map(r=>e.jsx("button",{onClick:()=>T(r),className:n.cn("Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",k===r?"bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium":"bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"),children:r},r))})]}),e.jsx("div",{className:"Bear-TimePicker__dial-face bear-relative bear-w-48 bear-h-48 bear-mx-auto bear-mb-4",children:e.jsx(v.ClockFaceSvg,{values:O,isHourMode:t,format:a,selectedHour:c,selectedMinute:d,onSelect:R})}),e.jsxs("div",{className:i.TIMEPICKER_FOOTER_CLASSES,children:[E&&p&&e.jsx("button",{onClick:()=>{l==null||l(null),N()},className:i.TIMEPICKER_CLEAR_BUTTON_CLASSES,children:b.cancel}),e.jsx("button",{onClick:C,className:i.TIMEPICKER_CONFIRM_BUTTON_CLASSES,children:b.ok})]})]})};exports.TimePickerDialDropdown=D;
@@ -1,84 +1,90 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { useState as M } from "react";
3
- import { cn as s } from "../../../../utils/cn.js";
4
- import { TIMEPICKER_DEFAULT_TRANSLATIONS as f, CLOCK_HOURS_12 as I, TIMEPICKER_FOOTER_CLASSES as L, TIMEPICKER_CLEAR_BUTTON_CLASSES as R, TIMEPICKER_CONFIRM_BUTTON_CLASSES as O, TIMEPICKER_DROPDOWN_CLASSES as A } from "../../TimePicker.constants.js";
5
- import { ClockFaceSvg as w } from "../../helpers/ClockFaceSvg.js";
6
- const U = ({
7
- selectedHour: t,
8
- setSelectedHour: d,
9
- selectedMinute: b,
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { useState as R, useCallback as v } from "react";
3
+ import { cn as o } from "../../../../utils/cn.js";
4
+ import { TIMEPICKER_DEFAULT_TRANSLATIONS as B, CLOCK_HOURS_12 as L, TIMEPICKER_FOOTER_CLASSES as D, TIMEPICKER_CLEAR_BUTTON_CLASSES as K, TIMEPICKER_CONFIRM_BUTTON_CLASSES as z, TIMEPICKER_DROPDOWN_CLASSES as w } from "../../TimePicker.constants.js";
5
+ import { ClockFaceSvg as F } from "../../helpers/ClockFaceSvg.js";
6
+ const x = "bear-text-blue-600 dark:bear-text-blue-400 bear-font-bold bear-bg-blue-50 dark:bear-bg-blue-900/30 bear-rounded bear-px-1", _ = "bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-300 bear-cursor-pointer bear-px-1", G = ({
7
+ selectedHour: i,
8
+ setSelectedHour: s,
9
+ selectedMinute: d,
10
10
  setSelectedMinute: m,
11
- period: k,
12
- setPeriod: _,
11
+ period: u,
12
+ setPeriod: k,
13
13
  format: a,
14
- hours: u,
14
+ hours: p,
15
15
  minutes: h,
16
- timeValue: p,
17
- clearable: x,
18
- onChange: o,
19
- onConfirm: T,
20
- onClose: S,
16
+ timeValue: T,
17
+ clearable: S,
18
+ onChange: l,
19
+ onConfirm: E,
20
+ onClose: C,
21
21
  translations: N
22
22
  }) => {
23
- const [v, n] = M("hour"), c = { ...f, ...N }, C = a === "12h" ? t === 12 ? 12 : t % 12 : t, P = b, y = `${C.toString().padStart(2, "0")}:${P.toString().padStart(2, "0")}`, E = a === "12h" ? [...I] : u, l = v === "hour", g = l ? E : h, B = l ? (r) => d(a === "12h" && r === 0 ? 12 : r) : m;
24
- return /* @__PURE__ */ i("div", { className: s(A, "Bear-TimePicker__dial bear-w-72"), children: [
25
- /* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-title bear-text-center bear-uppercase bear-text-xs bear-text-gray-500 dark:bear-text-zinc-400 bear-mb-2", children: c.selectTime }),
26
- /* @__PURE__ */ i("div", { className: "Bear-TimePicker__dial-display bear-flex bear-items-center bear-justify-center bear-gap-3 bear-mb-4", children: [
27
- /* @__PURE__ */ e("span", { className: "Bear-TimePicker__dial-time bear-text-2xl bear-font-bold bear-text-gray-900 dark:bear-text-white", children: y }),
28
- a === "12h" && /* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-period bear-flex bear-flex-col bear-gap-0.5", children: ["AM", "PM"].map((r) => /* @__PURE__ */ e(
29
- "button",
30
- {
31
- onClick: () => _(r),
32
- className: s(
33
- "Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",
34
- k === r ? "bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium" : "bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"
35
- ),
36
- children: r
37
- },
38
- r
39
- )) })
40
- ] }),
41
- /* @__PURE__ */ i("div", { className: "Bear-TimePicker__dial-mode bear-flex bear-items-center bear-justify-center bear-gap-2 bear-mb-2", children: [
23
+ const [I, c] = R("hour"), b = { ...B, ...N }, P = a === "12h" ? i === 12 ? 12 : i % 12 : i, y = d, A = P.toString().padStart(2, "0"), M = y.toString().padStart(2, "0"), O = a === "12h" ? [...L] : p, t = I === "hour", f = t ? O : h, g = v((r) => {
24
+ t ? (s(a === "12h" && r === 0 ? 12 : r), c("minute")) : m(r);
25
+ }, [t, a, s, m]);
26
+ return /* @__PURE__ */ n("div", { className: o(w, "Bear-TimePicker__dial bear-w-72"), children: [
27
+ /* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-title bear-text-center bear-uppercase bear-text-xs bear-text-gray-500 dark:bear-text-zinc-400 bear-mb-2", children: b.selectTime }),
28
+ /* @__PURE__ */ n("div", { className: "Bear-TimePicker__dial-display bear-flex bear-items-center bear-justify-center bear-gap-1 bear-mb-4", children: [
42
29
  /* @__PURE__ */ e(
43
30
  "button",
44
31
  {
45
32
  type: "button",
46
- onClick: () => n("hour"),
47
- className: "Bear-TimePicker__dial-mode-btn bear-p-1 bear-rounded bear-text-gray-500 hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700",
48
- "aria-label": "Hour mode",
49
- children: /* @__PURE__ */ e("svg", { className: "bear-w-4 bear-h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
33
+ onClick: () => c("hour"),
34
+ className: o(
35
+ "Bear-TimePicker__dial-hour-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",
36
+ t ? x : _
37
+ ),
38
+ "aria-label": b.hour,
39
+ children: A
50
40
  }
51
41
  ),
42
+ /* @__PURE__ */ e("span", { className: "bear-text-2xl bear-font-bold bear-text-gray-900 dark:bear-text-white", children: ":" }),
52
43
  /* @__PURE__ */ e(
53
44
  "button",
54
45
  {
55
46
  type: "button",
56
- onClick: () => n("minute"),
57
- className: "Bear-TimePicker__dial-mode-btn bear-p-1 bear-rounded bear-text-gray-500 hover:bear-bg-gray-100 dark:hover:bear-bg-zinc-700",
58
- "aria-label": "Minute mode",
59
- children: /* @__PURE__ */ e("svg", { className: "bear-w-4 bear-h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
47
+ onClick: () => c("minute"),
48
+ className: o(
49
+ "Bear-TimePicker__dial-minute-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",
50
+ t ? _ : x
51
+ ),
52
+ "aria-label": b.minute,
53
+ children: M
60
54
  }
61
- )
55
+ ),
56
+ a === "12h" && /* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-period bear-flex bear-flex-col bear-gap-0.5 bear-ml-2", children: ["AM", "PM"].map((r) => /* @__PURE__ */ e(
57
+ "button",
58
+ {
59
+ onClick: () => k(r),
60
+ className: o(
61
+ "Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",
62
+ u === r ? "bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium" : "bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"
63
+ ),
64
+ children: r
65
+ },
66
+ r
67
+ )) })
62
68
  ] }),
63
69
  /* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-face bear-relative bear-w-48 bear-h-48 bear-mx-auto bear-mb-4", children: /* @__PURE__ */ e(
64
- w,
70
+ F,
65
71
  {
66
- values: g,
67
- isHourMode: l,
72
+ values: f,
73
+ isHourMode: t,
68
74
  format: a,
69
- selectedHour: t,
70
- selectedMinute: b,
71
- onSelect: B
75
+ selectedHour: i,
76
+ selectedMinute: d,
77
+ onSelect: g
72
78
  }
73
79
  ) }),
74
- /* @__PURE__ */ i("div", { className: L, children: [
75
- x && p && /* @__PURE__ */ e("button", { onClick: () => {
76
- o == null || o(null), S();
77
- }, className: R, children: c.cancel }),
78
- /* @__PURE__ */ e("button", { onClick: T, className: O, children: c.ok })
80
+ /* @__PURE__ */ n("div", { className: D, children: [
81
+ S && T && /* @__PURE__ */ e("button", { onClick: () => {
82
+ l == null || l(null), C();
83
+ }, className: K, children: b.cancel }),
84
+ /* @__PURE__ */ e("button", { onClick: E, className: z, children: b.ok })
79
85
  ] })
80
86
  ] });
81
87
  };
82
88
  export {
83
- U as TimePickerDialDropdown
89
+ G as TimePickerDialDropdown
84
90
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("../../../utils/cn.cjs");require("react");const e=require("../TimePicker.constants.cjs"),E=({values:t,isHourMode:n,format:i,selectedHour:r,selectedMinute:l,onSelect:b,className:h})=>{const f=c=>n?(c*30-90)*(Math.PI/180):(c*(360/t.length)-90)*(Math.PI/180),s=(n?(i==="12h"?r===12?0:r%12:r)*30-90:l*6-90)*Math.PI/180;return a.jsxs("svg",{viewBox:"0 0 200 200",className:m.cn("Bear-TimePicker__clock-face bear-w-full bear-h-full",h),children:[a.jsx("circle",{cx:e.CLOCK_CENTER,cy:e.CLOCK_CENTER,r:e.CLOCK_RADIUS,className:"Bear-TimePicker__clock-face-circle bear-fill-none bear-stroke-gray-200 dark:bear-stroke-zinc-700 bear-stroke-2"}),t.map((c,x)=>{const C=f(x),o=e.CLOCK_CENTER+e.CLOCK_RADIUS*.85*Math.cos(C),_=e.CLOCK_CENTER+e.CLOCK_RADIUS*.85*Math.sin(C),k=n?i==="12h"?c===12?r===12:r%12===c:r===c:l===c;return a.jsxs("g",{onClick:()=>b(c),className:"Bear-TimePicker__clock-face-item bear-cursor-pointer",children:[k&&a.jsx("circle",{cx:o,cy:_,r:14,className:"Bear-TimePicker__clock-face-dot bear-fill-blue-500"}),a.jsx("text",{x:o,y:_,textAnchor:"middle",dominantBaseline:"middle",className:m.cn("Bear-TimePicker__clock-face-text bear-text-sm bear-font-medium bear-pointer-events-none",k?"bear-fill-white":"bear-fill-gray-700 dark:bear-fill-zinc-300"),children:typeof c=="number"?c.toString().padStart(2,"0"):c})]},c)}),a.jsx("line",{x1:e.CLOCK_CENTER,y1:e.CLOCK_CENTER,x2:e.CLOCK_CENTER+e.CLOCK_RADIUS*.6*Math.cos(s),y2:e.CLOCK_CENTER+e.CLOCK_RADIUS*.6*Math.sin(s),className:"Bear-TimePicker__clock-face-hand bear-stroke-blue-500 bear-stroke-2",strokeLinecap:"round"})]})};exports.ClockFaceSvg=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("../../../utils/cn.cjs");require("react");const e=require("../TimePicker.constants.cjs"),x=16,S=14,O=.85,R=.6,b=30,n=90,l=Math.PI/180,f=({values:o,isHourMode:t,format:_,selectedHour:a,selectedMinute:C,onSelect:A,className:L})=>{const N=c=>t?(c*b-n)*l:(c*(360/o.length)-n)*l,E=(t?(_==="12h"?a===12?0:a%12:a)*b-n:C*6-n)*l;return r.jsxs("svg",{viewBox:"0 0 200 200",className:m.cn("Bear-TimePicker__clock-face bear-w-full bear-h-full",L),children:[r.jsx("circle",{cx:e.CLOCK_CENTER,cy:e.CLOCK_CENTER,r:e.CLOCK_RADIUS,className:"Bear-TimePicker__clock-face-circle bear-fill-none bear-stroke-gray-200 dark:bear-stroke-zinc-700 bear-stroke-2"}),o.map((c,h)=>{const T=N(h),s=e.CLOCK_CENTER+e.CLOCK_RADIUS*O*Math.cos(T),i=e.CLOCK_CENTER+e.CLOCK_RADIUS*O*Math.sin(T),k=t?_==="12h"?c===12?a===12:a%12===c:a===c:C===c;return r.jsxs("g",{onClick:()=>A(c),className:"Bear-TimePicker__clock-face-item bear-cursor-pointer",children:[r.jsx("circle",{cx:s,cy:i,r:x,fill:"transparent"}),k&&r.jsx("circle",{cx:s,cy:i,r:S,className:"Bear-TimePicker__clock-face-dot bear-fill-blue-500"}),r.jsx("text",{x:s,y:i,textAnchor:"middle",dominantBaseline:"middle",className:m.cn("Bear-TimePicker__clock-face-text bear-text-sm bear-font-medium bear-pointer-events-none",k?"bear-fill-white":"bear-fill-gray-700 dark:bear-fill-zinc-300"),children:typeof c=="number"?c.toString().padStart(2,"0"):c})]},c)}),r.jsx("line",{x1:e.CLOCK_CENTER,y1:e.CLOCK_CENTER,x2:e.CLOCK_CENTER+e.CLOCK_RADIUS*R*Math.cos(E),y2:e.CLOCK_CENTER+e.CLOCK_RADIUS*R*Math.sin(E),className:"Bear-TimePicker__clock-face-hand bear-stroke-blue-500 bear-stroke-2",strokeLinecap:"round"})]})};exports.ClockFaceSvg=f;
@@ -1,18 +1,11 @@
1
1
  import { FC } from 'react';
2
2
  export interface ClockFaceSvgProps {
3
- /** Clock face values (hours or minutes) */
4
3
  values: readonly number[] | number[];
5
- /** Whether in hour mode (different angle calc) */
6
4
  isHourMode: boolean;
7
- /** Format: 12h or 24h */
8
5
  format: '12h' | '24h';
9
- /** Current selected hour (for hour mode) */
10
6
  selectedHour: number;
11
- /** Current selected minute (for minute mode) */
12
7
  selectedMinute: number;
13
- /** Callback when value is clicked */
14
8
  onSelect: (v: number) => void;
15
- /** Optional class name */
16
9
  className?: string;
17
10
  }
18
11
  export declare const ClockFaceSvg: FC<ClockFaceSvgProps>;