@bioturing/components 0.32.0 → 0.32.2

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 (511) hide show
  1. package/README.md +29 -0
  2. package/dist/components/badge/component.d.ts +7 -0
  3. package/dist/components/badge/component.d.ts.map +1 -0
  4. package/dist/components/badge/component.js.map +1 -1
  5. package/dist/components/badge/index.d.ts +2 -0
  6. package/dist/components/badge/index.d.ts.map +1 -0
  7. package/dist/components/breadcrumb/component.d.ts +6 -0
  8. package/dist/components/breadcrumb/component.d.ts.map +1 -0
  9. package/dist/components/breadcrumb/component.js.map +1 -1
  10. package/dist/components/breadcrumb/index.d.ts +3 -0
  11. package/dist/components/breadcrumb/index.d.ts.map +1 -0
  12. package/dist/components/breadcrumb/types.d.ts +19 -0
  13. package/dist/components/breadcrumb/types.d.ts.map +1 -0
  14. package/dist/components/breadcrumb/useItemRender.d.ts +7 -0
  15. package/dist/components/breadcrumb/useItemRender.d.ts.map +1 -0
  16. package/dist/components/breadcrumb/useItemRender.js.map +1 -1
  17. package/dist/components/button/component.d.ts +14 -0
  18. package/dist/components/button/component.d.ts.map +1 -0
  19. package/dist/components/button/component.js.map +1 -1
  20. package/dist/components/button/index.d.ts +2 -0
  21. package/dist/components/button/index.d.ts.map +1 -0
  22. package/dist/components/checkbox/component.d.ts +16 -0
  23. package/dist/components/checkbox/component.d.ts.map +1 -0
  24. package/dist/components/checkbox/component.js.map +1 -1
  25. package/dist/components/checkbox/index.d.ts +2 -0
  26. package/dist/components/checkbox/index.d.ts.map +1 -0
  27. package/dist/components/choice-list/component.d.ts +35 -0
  28. package/dist/components/choice-list/component.d.ts.map +1 -0
  29. package/dist/components/choice-list/component.js.map +1 -1
  30. package/dist/components/choice-list/index.d.ts +2 -0
  31. package/dist/components/choice-list/index.d.ts.map +1 -0
  32. package/dist/components/cmdk/command-score.d.ts +2 -0
  33. package/dist/components/cmdk/command-score.d.ts.map +1 -0
  34. package/dist/components/cmdk/command-score.js.map +1 -1
  35. package/dist/components/cmdk/index.d.ts +440 -0
  36. package/dist/components/cmdk/index.d.ts.map +1 -0
  37. package/dist/components/cmdk/index.js +332 -348
  38. package/dist/components/cmdk/index.js.map +1 -1
  39. package/dist/components/code-block/component.d.ts +3 -0
  40. package/dist/components/code-block/component.d.ts.map +1 -0
  41. package/dist/components/code-block/component.js +83 -84
  42. package/dist/components/code-block/component.js.map +1 -1
  43. package/dist/components/code-block/index.d.ts +3 -0
  44. package/dist/components/code-block/index.d.ts.map +1 -0
  45. package/dist/components/code-block/types.d.ts +64 -0
  46. package/dist/components/code-block/types.d.ts.map +1 -0
  47. package/dist/components/collapse/component.d.ts +14 -0
  48. package/dist/components/collapse/component.d.ts.map +1 -0
  49. package/dist/components/collapse/component.js.map +1 -1
  50. package/dist/components/collapse/index.d.ts +2 -0
  51. package/dist/components/collapse/index.d.ts.map +1 -0
  52. package/dist/components/color-select/component.d.ts +36 -0
  53. package/dist/components/color-select/component.d.ts.map +1 -0
  54. package/dist/components/color-select/component.js +28 -30
  55. package/dist/components/color-select/component.js.map +1 -1
  56. package/dist/components/color-select/index.d.ts +2 -0
  57. package/dist/components/color-select/index.d.ts.map +1 -0
  58. package/dist/components/combobox/component.d.ts +119 -0
  59. package/dist/components/combobox/component.d.ts.map +1 -0
  60. package/dist/components/combobox/component.js +129 -129
  61. package/dist/components/combobox/component.js.map +1 -1
  62. package/dist/components/combobox/index.d.ts +3 -0
  63. package/dist/components/combobox/index.d.ts.map +1 -0
  64. package/dist/components/command-palette/component.d.ts +41 -0
  65. package/dist/components/command-palette/component.d.ts.map +1 -0
  66. package/dist/components/command-palette/component.js +36 -36
  67. package/dist/components/command-palette/component.js.map +1 -1
  68. package/dist/components/command-palette/index.d.ts +2 -0
  69. package/dist/components/command-palette/index.d.ts.map +1 -0
  70. package/dist/components/command-palette/style.css +1 -1
  71. package/dist/components/drag-drop/context.d.ts +10 -0
  72. package/dist/components/drag-drop/context.d.ts.map +1 -0
  73. package/dist/components/drag-drop/context.js.map +1 -1
  74. package/dist/components/drag-drop/draggable.d.ts +6 -0
  75. package/dist/components/drag-drop/draggable.d.ts.map +1 -0
  76. package/dist/components/drag-drop/draggable.js.map +1 -1
  77. package/dist/components/drag-drop/droppable.d.ts +9 -0
  78. package/dist/components/drag-drop/droppable.d.ts.map +1 -0
  79. package/dist/components/drag-drop/droppable.js.map +1 -1
  80. package/dist/components/drag-drop/hooks.d.ts +42 -0
  81. package/dist/components/drag-drop/hooks.d.ts.map +1 -0
  82. package/dist/components/drag-drop/hooks.js +71 -73
  83. package/dist/components/drag-drop/hooks.js.map +1 -1
  84. package/dist/components/drag-drop/index.d.ts +26 -0
  85. package/dist/components/drag-drop/index.d.ts.map +1 -0
  86. package/dist/components/drag-drop/index.js.map +1 -1
  87. package/dist/components/drag-drop/types.d.ts +232 -0
  88. package/dist/components/drag-drop/types.d.ts.map +1 -0
  89. package/dist/components/drag-drop/value.d.ts +8 -0
  90. package/dist/components/drag-drop/value.d.ts.map +1 -0
  91. package/dist/components/drag-drop/value.js +66 -66
  92. package/dist/components/drag-drop/value.js.map +1 -1
  93. package/dist/components/dropdown-menu/component.d.ts +79 -0
  94. package/dist/components/dropdown-menu/component.d.ts.map +1 -0
  95. package/dist/components/dropdown-menu/component.js +108 -108
  96. package/dist/components/dropdown-menu/component.js.map +1 -1
  97. package/dist/components/dropdown-menu/divider.d.ts +6 -0
  98. package/dist/components/dropdown-menu/divider.d.ts.map +1 -0
  99. package/dist/components/dropdown-menu/divider.js.map +1 -1
  100. package/dist/components/dropdown-menu/index.d.ts +4 -0
  101. package/dist/components/dropdown-menu/index.d.ts.map +1 -0
  102. package/dist/components/dropdown-menu/item.d.ts +56 -0
  103. package/dist/components/dropdown-menu/item.d.ts.map +1 -0
  104. package/dist/components/dropdown-menu/item.js +75 -78
  105. package/dist/components/dropdown-menu/item.js.map +1 -1
  106. package/dist/components/dropdown-menu/types.d.ts +88 -0
  107. package/dist/components/dropdown-menu/types.d.ts.map +1 -0
  108. package/dist/components/dropdown-menu/useDropdownMenu.d.ts +58 -0
  109. package/dist/components/dropdown-menu/useDropdownMenu.d.ts.map +1 -0
  110. package/dist/components/dropdown-menu/useDropdownMenu.js +80 -80
  111. package/dist/components/dropdown-menu/useDropdownMenu.js.map +1 -1
  112. package/dist/components/ds-root/component.d.ts +14 -0
  113. package/dist/components/ds-root/component.d.ts.map +1 -0
  114. package/dist/components/ds-root/component.js.map +1 -1
  115. package/dist/components/ds-root/context.d.ts +8 -0
  116. package/dist/components/ds-root/context.d.ts.map +1 -0
  117. package/dist/components/ds-root/index.d.ts +3 -0
  118. package/dist/components/ds-root/index.d.ts.map +1 -0
  119. package/dist/components/empty/component.d.ts +13 -0
  120. package/dist/components/empty/component.d.ts.map +1 -0
  121. package/dist/components/empty/component.js.map +1 -1
  122. package/dist/components/empty/index.d.ts +2 -0
  123. package/dist/components/empty/index.d.ts.map +1 -0
  124. package/dist/components/field/component.d.ts +42 -0
  125. package/dist/components/field/component.d.ts.map +1 -0
  126. package/dist/components/field/component.js.map +1 -1
  127. package/dist/components/field/index.d.ts +2 -0
  128. package/dist/components/field/index.d.ts.map +1 -0
  129. package/dist/components/form/component.d.ts +22 -0
  130. package/dist/components/form/component.d.ts.map +1 -0
  131. package/dist/components/form/component.js.map +1 -1
  132. package/dist/components/form/index.d.ts +2 -0
  133. package/dist/components/form/index.d.ts.map +1 -0
  134. package/dist/components/form/item.d.ts +24 -0
  135. package/dist/components/form/item.d.ts.map +1 -0
  136. package/dist/components/form/item.js +24 -24
  137. package/dist/components/form/item.js.map +1 -1
  138. package/dist/components/form/label.d.ts +32 -0
  139. package/dist/components/form/label.d.ts.map +1 -0
  140. package/dist/components/form/label.js.map +1 -1
  141. package/dist/components/hooks/antd.d.ts +11 -0
  142. package/dist/components/hooks/antd.d.ts.map +1 -0
  143. package/dist/components/hooks/antd.js +9 -12
  144. package/dist/components/hooks/antd.js.map +1 -1
  145. package/dist/components/hooks/base-ui.d.ts +11 -0
  146. package/dist/components/hooks/base-ui.d.ts.map +1 -0
  147. package/dist/components/hooks/base-ui.js +22 -25
  148. package/dist/components/hooks/base-ui.js.map +1 -1
  149. package/dist/components/hooks/index.d.ts +11 -0
  150. package/dist/components/hooks/index.d.ts.map +1 -0
  151. package/dist/components/hooks/useBreakpoint.d.ts +39 -0
  152. package/dist/components/hooks/useBreakpoint.d.ts.map +1 -0
  153. package/dist/components/hooks/useBreakpoint.js +14 -15
  154. package/dist/components/hooks/useBreakpoint.js.map +1 -1
  155. package/dist/components/hooks/useCSSVariables.d.ts +7 -0
  156. package/dist/components/hooks/useCSSVariables.d.ts.map +1 -0
  157. package/dist/components/hooks/useCSSVariables.js.map +1 -1
  158. package/dist/components/hooks/useCharts.d.ts +41 -0
  159. package/dist/components/hooks/useCharts.d.ts.map +1 -0
  160. package/dist/components/hooks/useCharts.js.map +1 -1
  161. package/dist/components/hooks/useControlledState.d.ts +13 -0
  162. package/dist/components/hooks/useControlledState.d.ts.map +1 -0
  163. package/dist/components/hooks/useControlledState.js.map +1 -1
  164. package/dist/components/hooks/useDraggable.d.ts +4 -0
  165. package/dist/components/hooks/useDraggable.d.ts.map +1 -0
  166. package/dist/components/hooks/useDraggable.js +19 -20
  167. package/dist/components/hooks/useDraggable.js.map +1 -1
  168. package/dist/components/hooks/useHover.d.ts +5 -0
  169. package/dist/components/hooks/useHover.d.ts.map +1 -0
  170. package/dist/components/hooks/useHover.js +16 -17
  171. package/dist/components/hooks/useHover.js.map +1 -1
  172. package/dist/components/hooks/useResizeObserver.d.ts +9 -0
  173. package/dist/components/hooks/useResizeObserver.d.ts.map +1 -0
  174. package/dist/components/hooks/useResizeObserver.js +29 -30
  175. package/dist/components/hooks/useResizeObserver.js.map +1 -1
  176. package/dist/components/hooks/useTransitionStatus.d.ts +13 -0
  177. package/dist/components/hooks/useTransitionStatus.d.ts.map +1 -0
  178. package/dist/components/hooks/useTransitionStatus.js.map +1 -1
  179. package/dist/components/hooks/useWindowSize.d.ts +5 -0
  180. package/dist/components/hooks/useWindowSize.d.ts.map +1 -0
  181. package/dist/components/hooks/useWindowSize.js.map +1 -1
  182. package/dist/components/icon-button/component.d.ts +45 -0
  183. package/dist/components/icon-button/component.d.ts.map +1 -0
  184. package/dist/components/icon-button/component.js.map +1 -1
  185. package/dist/components/icon-button/index.d.ts +2 -0
  186. package/dist/components/icon-button/index.d.ts.map +1 -0
  187. package/dist/components/index.d.ts +53 -0
  188. package/dist/components/index.d.ts.map +1 -0
  189. package/dist/components/input/component.d.ts +29 -0
  190. package/dist/components/input/component.d.ts.map +1 -0
  191. package/dist/components/input/component.js +46 -46
  192. package/dist/components/input/component.js.map +1 -1
  193. package/dist/components/input/index.d.ts +2 -0
  194. package/dist/components/input/index.d.ts.map +1 -0
  195. package/dist/components/keyboard-shortcut/component.d.ts +15 -0
  196. package/dist/components/keyboard-shortcut/component.d.ts.map +1 -0
  197. package/dist/components/keyboard-shortcut/component.js.map +1 -1
  198. package/dist/components/keyboard-shortcut/index.d.ts +2 -0
  199. package/dist/components/keyboard-shortcut/index.d.ts.map +1 -0
  200. package/dist/components/loader/component.d.ts +5 -0
  201. package/dist/components/loader/component.d.ts.map +1 -0
  202. package/dist/components/loader/component.js.map +1 -1
  203. package/dist/components/loader/index.d.ts +2 -0
  204. package/dist/components/loader/index.d.ts.map +1 -0
  205. package/dist/components/modal/Modal.d.ts +85 -0
  206. package/dist/components/modal/Modal.d.ts.map +1 -0
  207. package/dist/components/modal/Modal.js +75 -75
  208. package/dist/components/modal/Modal.js.map +1 -1
  209. package/dist/components/modal/ModalProvider.d.ts +6 -0
  210. package/dist/components/modal/ModalProvider.d.ts.map +1 -0
  211. package/dist/components/modal/ModalProvider.js +25 -25
  212. package/dist/components/modal/ModalProvider.js.map +1 -1
  213. package/dist/components/modal/ModalService.d.ts +34 -0
  214. package/dist/components/modal/ModalService.d.ts.map +1 -0
  215. package/dist/components/modal/ModalService.js +5 -10
  216. package/dist/components/modal/ModalService.js.map +1 -1
  217. package/dist/components/modal/constants.d.ts +10 -0
  218. package/dist/components/modal/constants.d.ts.map +1 -0
  219. package/dist/components/modal/constants.js.map +1 -1
  220. package/dist/components/modal/functions.d.ts +28 -0
  221. package/dist/components/modal/functions.d.ts.map +1 -0
  222. package/dist/components/modal/functions.js.map +1 -1
  223. package/dist/components/modal/index.d.ts +16 -0
  224. package/dist/components/modal/index.d.ts.map +1 -0
  225. package/dist/components/modal/index.js.map +1 -1
  226. package/dist/components/nav/context.d.ts +10 -0
  227. package/dist/components/nav/context.d.ts.map +1 -0
  228. package/dist/components/nav/context.js.map +1 -1
  229. package/dist/components/nav/group.d.ts +15 -0
  230. package/dist/components/nav/group.d.ts.map +1 -0
  231. package/dist/components/nav/group.js.map +1 -1
  232. package/dist/components/nav/heading.d.ts +6 -0
  233. package/dist/components/nav/heading.d.ts.map +1 -0
  234. package/dist/components/nav/heading.js.map +1 -1
  235. package/dist/components/nav/index.d.ts +12 -0
  236. package/dist/components/nav/index.d.ts.map +1 -0
  237. package/dist/components/nav/item.d.ts +35 -0
  238. package/dist/components/nav/item.d.ts.map +1 -0
  239. package/dist/components/nav/item.js.map +1 -1
  240. package/dist/components/popover/component.d.ts +10 -0
  241. package/dist/components/popover/component.d.ts.map +1 -0
  242. package/dist/components/popover/component.js.map +1 -1
  243. package/dist/components/popover/index.d.ts +2 -0
  244. package/dist/components/popover/index.d.ts.map +1 -0
  245. package/dist/components/popup-panel/component.d.ts +100 -0
  246. package/dist/components/popup-panel/component.d.ts.map +1 -0
  247. package/dist/components/popup-panel/component.js +105 -105
  248. package/dist/components/popup-panel/component.js.map +1 -1
  249. package/dist/components/popup-panel/constants.d.ts +8 -0
  250. package/dist/components/popup-panel/constants.d.ts.map +1 -0
  251. package/dist/components/popup-panel/constants.js.map +1 -1
  252. package/dist/components/popup-panel/index.d.ts +2 -0
  253. package/dist/components/popup-panel/index.d.ts.map +1 -0
  254. package/dist/components/radio/component.d.ts +8 -0
  255. package/dist/components/radio/component.d.ts.map +1 -0
  256. package/dist/components/radio/component.js.map +1 -1
  257. package/dist/components/radio/index.d.ts +3 -0
  258. package/dist/components/radio/index.d.ts.map +1 -0
  259. package/dist/components/radio/interface.d.ts +6 -0
  260. package/dist/components/radio/interface.d.ts.map +1 -0
  261. package/dist/components/resizable/component.d.ts +70 -0
  262. package/dist/components/resizable/component.d.ts.map +1 -0
  263. package/dist/components/resizable/component.js +146 -147
  264. package/dist/components/resizable/component.js.map +1 -1
  265. package/dist/components/resizable/index.d.ts +3 -0
  266. package/dist/components/resizable/index.d.ts.map +1 -0
  267. package/dist/components/scroll-area/component.d.ts +67 -0
  268. package/dist/components/scroll-area/component.d.ts.map +1 -0
  269. package/dist/components/scroll-area/component.js +69 -69
  270. package/dist/components/scroll-area/component.js.map +1 -1
  271. package/dist/components/scroll-area/index.d.ts +2 -0
  272. package/dist/components/scroll-area/index.d.ts.map +1 -0
  273. package/dist/components/segmented/component.d.ts +10 -0
  274. package/dist/components/segmented/component.d.ts.map +1 -0
  275. package/dist/components/segmented/component.js.map +1 -1
  276. package/dist/components/segmented/index.d.ts +2 -0
  277. package/dist/components/segmented/index.d.ts.map +1 -0
  278. package/dist/components/select/component.d.ts +48 -0
  279. package/dist/components/select/component.d.ts.map +1 -0
  280. package/dist/components/select/component.js +93 -94
  281. package/dist/components/select/component.js.map +1 -1
  282. package/dist/components/select/index.d.ts +2 -0
  283. package/dist/components/select/index.d.ts.map +1 -0
  284. package/dist/components/select/item.d.ts +14 -0
  285. package/dist/components/select/item.d.ts.map +1 -0
  286. package/dist/components/select/item.js.map +1 -1
  287. package/dist/components/select-trigger/component.d.ts +45 -0
  288. package/dist/components/select-trigger/component.d.ts.map +1 -0
  289. package/dist/components/select-trigger/component.js +96 -96
  290. package/dist/components/select-trigger/component.js.map +1 -1
  291. package/dist/components/select-trigger/index.d.ts +3 -0
  292. package/dist/components/select-trigger/index.d.ts.map +1 -0
  293. package/dist/components/slider/component.d.ts +6 -0
  294. package/dist/components/slider/component.d.ts.map +1 -0
  295. package/dist/components/slider/component.js.map +1 -1
  296. package/dist/components/slider/index.d.ts +2 -0
  297. package/dist/components/slider/index.d.ts.map +1 -0
  298. package/dist/components/spin/component.d.ts +6 -0
  299. package/dist/components/spin/component.d.ts.map +1 -0
  300. package/dist/components/spin/component.js.map +1 -1
  301. package/dist/components/spin/index.d.ts +2 -0
  302. package/dist/components/spin/index.d.ts.map +1 -0
  303. package/dist/components/splitter/component.d.ts +10 -0
  304. package/dist/components/splitter/component.d.ts.map +1 -0
  305. package/dist/components/splitter/component.js +7 -7
  306. package/dist/components/splitter/component.js.map +1 -1
  307. package/dist/components/splitter/context.d.ts +5 -0
  308. package/dist/components/splitter/context.d.ts.map +1 -0
  309. package/dist/components/splitter/context.js.map +1 -1
  310. package/dist/components/splitter/index.d.ts +2 -0
  311. package/dist/components/splitter/index.d.ts.map +1 -0
  312. package/dist/components/splitter/splitter-panel.d.ts +12 -0
  313. package/dist/components/splitter/splitter-panel.d.ts.map +1 -0
  314. package/dist/components/splitter/splitter-panel.js.map +1 -1
  315. package/dist/components/splitter/splitter.d.ts +11 -0
  316. package/dist/components/splitter/splitter.d.ts.map +1 -0
  317. package/dist/components/splitter/splitter.js +112 -112
  318. package/dist/components/splitter/splitter.js.map +1 -1
  319. package/dist/components/splitter/useSizes.d.ts +9 -0
  320. package/dist/components/splitter/useSizes.d.ts.map +1 -0
  321. package/dist/components/splitter/useSizes.js +35 -35
  322. package/dist/components/splitter/useSizes.js.map +1 -1
  323. package/dist/components/stack/Stack.d.ts +40 -0
  324. package/dist/components/stack/Stack.d.ts.map +1 -0
  325. package/dist/components/stack/Stack.js.map +1 -1
  326. package/dist/components/stack/StackChild.d.ts +31 -0
  327. package/dist/components/stack/StackChild.d.ts.map +1 -0
  328. package/dist/components/stack/StackChild.js.map +1 -1
  329. package/dist/components/stack/index.d.ts +8 -0
  330. package/dist/components/stack/index.d.ts.map +1 -0
  331. package/dist/components/stack/index.js.map +1 -1
  332. package/dist/components/status-icon/component.d.ts +23 -0
  333. package/dist/components/status-icon/component.d.ts.map +1 -0
  334. package/dist/components/status-icon/component.js.map +1 -1
  335. package/dist/components/status-icon/index.d.ts +2 -0
  336. package/dist/components/status-icon/index.d.ts.map +1 -0
  337. package/dist/components/switch/component.d.ts +9 -0
  338. package/dist/components/switch/component.d.ts.map +1 -0
  339. package/dist/components/switch/component.js.map +1 -1
  340. package/dist/components/switch/index.d.ts +2 -0
  341. package/dist/components/switch/index.d.ts.map +1 -0
  342. package/dist/components/table/component.d.ts +32 -0
  343. package/dist/components/table/component.d.ts.map +1 -0
  344. package/dist/components/table/component.js +57 -58
  345. package/dist/components/table/component.js.map +1 -1
  346. package/dist/components/table/index.d.ts +2 -0
  347. package/dist/components/table/index.d.ts.map +1 -0
  348. package/dist/components/tag/component.d.ts +22 -0
  349. package/dist/components/tag/component.d.ts.map +1 -0
  350. package/dist/components/tag/component.js.map +1 -1
  351. package/dist/components/tag/index.d.ts +2 -0
  352. package/dist/components/tag/index.d.ts.map +1 -0
  353. package/dist/components/theme-provider/component.d.ts +7 -0
  354. package/dist/components/theme-provider/component.d.ts.map +1 -0
  355. package/dist/components/theme-provider/component.js.map +1 -1
  356. package/dist/components/theme-provider/index.d.ts +2 -0
  357. package/dist/components/theme-provider/index.d.ts.map +1 -0
  358. package/dist/components/toast/component.d.ts +15 -0
  359. package/dist/components/toast/component.d.ts.map +1 -0
  360. package/dist/components/toast/component.js +49 -50
  361. package/dist/components/toast/component.js.map +1 -1
  362. package/dist/components/toast/function.d.ts +11 -0
  363. package/dist/components/toast/function.d.ts.map +1 -0
  364. package/dist/components/toast/function.js.map +1 -1
  365. package/dist/components/toast/index.d.ts +4 -0
  366. package/dist/components/toast/index.d.ts.map +1 -0
  367. package/dist/components/toast/types.d.ts +4 -0
  368. package/dist/components/toast/types.d.ts.map +1 -0
  369. package/dist/components/tooltip/component.d.ts +10 -0
  370. package/dist/components/tooltip/component.d.ts.map +1 -0
  371. package/dist/components/tooltip/component.js.map +1 -1
  372. package/dist/components/tooltip/index.d.ts +2 -0
  373. package/dist/components/tooltip/index.d.ts.map +1 -0
  374. package/dist/components/tour/component.d.ts +8 -0
  375. package/dist/components/tour/component.d.ts.map +1 -0
  376. package/dist/components/tour/component.js.map +1 -1
  377. package/dist/components/tour/index.d.ts +2 -0
  378. package/dist/components/tour/index.d.ts.map +1 -0
  379. package/dist/components/transition/component.d.ts +30 -0
  380. package/dist/components/transition/component.d.ts.map +1 -0
  381. package/dist/components/transition/component.js +32 -32
  382. package/dist/components/transition/component.js.map +1 -1
  383. package/dist/components/transition/index.d.ts +2 -0
  384. package/dist/components/transition/index.d.ts.map +1 -0
  385. package/dist/components/tree/components.d.ts +14 -0
  386. package/dist/components/tree/components.d.ts.map +1 -0
  387. package/dist/components/tree/components.js.map +1 -1
  388. package/dist/components/tree/helpers.d.ts +6 -0
  389. package/dist/components/tree/helpers.d.ts.map +1 -0
  390. package/dist/components/tree/helpers.js.map +1 -1
  391. package/dist/components/tree/index.d.ts +5 -0
  392. package/dist/components/tree/index.d.ts.map +1 -0
  393. package/dist/components/tree/types.d.ts +56 -0
  394. package/dist/components/tree/types.d.ts.map +1 -0
  395. package/dist/components/tree/useTreeCommon.d.ts +179 -0
  396. package/dist/components/tree/useTreeCommon.d.ts.map +1 -0
  397. package/dist/components/tree/useTreeCommon.js +29 -29
  398. package/dist/components/tree/useTreeCommon.js.map +1 -1
  399. package/dist/components/tree/useUniqueKeysTree.d.ts +34 -0
  400. package/dist/components/tree/useUniqueKeysTree.d.ts.map +1 -0
  401. package/dist/components/tree/useUniqueKeysTree.js.map +1 -1
  402. package/dist/components/truncate/component.d.ts +17 -0
  403. package/dist/components/truncate/component.d.ts.map +1 -0
  404. package/dist/components/truncate/component.js +38 -39
  405. package/dist/components/truncate/component.js.map +1 -1
  406. package/dist/components/truncate/helpers.d.ts +17 -0
  407. package/dist/components/truncate/helpers.d.ts.map +1 -0
  408. package/dist/components/truncate/helpers.js +27 -30
  409. package/dist/components/truncate/helpers.js.map +1 -1
  410. package/dist/components/truncate/index.d.ts +2 -0
  411. package/dist/components/truncate/index.d.ts.map +1 -0
  412. package/dist/components/upload/component.d.ts +17 -0
  413. package/dist/components/upload/component.d.ts.map +1 -0
  414. package/dist/components/upload/component.js.map +1 -1
  415. package/dist/components/upload/dragger.d.ts +14 -0
  416. package/dist/components/upload/dragger.d.ts.map +1 -0
  417. package/dist/components/upload/dragger.js.map +1 -1
  418. package/dist/components/upload/hooks.d.ts +6 -0
  419. package/dist/components/upload/hooks.d.ts.map +1 -0
  420. package/dist/components/upload/hooks.js.map +1 -1
  421. package/dist/components/upload/index.d.ts +4 -0
  422. package/dist/components/upload/index.d.ts.map +1 -0
  423. package/dist/components/upload/item.d.ts +12 -0
  424. package/dist/components/upload/item.d.ts.map +1 -0
  425. package/dist/components/upload/item.js.map +1 -1
  426. package/dist/components/upload/utils.d.ts +2 -0
  427. package/dist/components/upload/utils.d.ts.map +1 -0
  428. package/dist/components/upload/utils.js.map +1 -1
  429. package/dist/components/utils/WithAntdTokens.d.ts +8 -0
  430. package/dist/components/utils/WithAntdTokens.d.ts.map +1 -0
  431. package/dist/components/utils/WithAntdTokens.js.map +1 -1
  432. package/dist/components/utils/WithRenderProp.d.ts +14 -0
  433. package/dist/components/utils/WithRenderProp.d.ts.map +1 -0
  434. package/dist/components/utils/WithRenderProp.js.map +1 -1
  435. package/dist/components/utils/antdUtils.d.ts +11 -0
  436. package/dist/components/utils/antdUtils.d.ts.map +1 -0
  437. package/dist/components/utils/antdUtils.js +9 -12
  438. package/dist/components/utils/antdUtils.js.map +1 -1
  439. package/dist/components/utils/client.d.ts +6 -0
  440. package/dist/components/utils/client.d.ts.map +1 -0
  441. package/dist/components/utils/cn.d.ts +5 -0
  442. package/dist/components/utils/cn.d.ts.map +1 -0
  443. package/dist/components/utils/cn.js.map +1 -1
  444. package/dist/components/utils/colors.d.ts +2 -0
  445. package/dist/components/utils/colors.d.ts.map +1 -0
  446. package/dist/components/utils/constants.d.ts +15 -0
  447. package/dist/components/utils/constants.d.ts.map +1 -0
  448. package/dist/components/utils/index.d.ts +6 -0
  449. package/dist/components/utils/index.d.ts.map +1 -0
  450. package/dist/components/utils/isTracebackError.d.ts +2 -0
  451. package/dist/components/utils/isTracebackError.d.ts.map +1 -0
  452. package/dist/components/utils/isTracebackError.js.map +1 -1
  453. package/dist/components/utils/main.d.ts +7 -0
  454. package/dist/components/utils/main.d.ts.map +1 -0
  455. package/dist/components/utils/placement.d.ts +21 -0
  456. package/dist/components/utils/placement.d.ts.map +1 -0
  457. package/dist/components/utils/placement.js.map +1 -1
  458. package/dist/components/utils/reactElement.d.ts +2 -0
  459. package/dist/components/utils/reactElement.d.ts.map +1 -0
  460. package/dist/components/utils/reactToString.d.ts +3 -0
  461. package/dist/components/utils/reactToString.d.ts.map +1 -0
  462. package/dist/components/utils/reactToString.js.map +1 -1
  463. package/dist/components/utils/selectionRange.d.ts +2 -0
  464. package/dist/components/utils/selectionRange.d.ts.map +1 -0
  465. package/dist/components/utils/selectionRange.js.map +1 -1
  466. package/dist/components/utils/theme.d.ts +6 -0
  467. package/dist/components/utils/theme.d.ts.map +1 -0
  468. package/dist/components/utils/theme.js.map +1 -1
  469. package/dist/components/utils/types.d.ts +12 -0
  470. package/dist/components/utils/types.d.ts.map +1 -0
  471. package/dist/components/vertical-collapsible-panel/component.d.ts +65 -0
  472. package/dist/components/vertical-collapsible-panel/component.d.ts.map +1 -0
  473. package/dist/components/vertical-collapsible-panel/component.js.map +1 -1
  474. package/dist/components/vertical-collapsible-panel/index.d.ts +2 -0
  475. package/dist/components/vertical-collapsible-panel/index.d.ts.map +1 -0
  476. package/dist/index.d.ts +4 -4431
  477. package/dist/index.d.ts.map +1 -0
  478. package/dist/index.js +166 -164
  479. package/dist/index.js.map +1 -1
  480. package/dist/metadata.d.ts +446 -0
  481. package/dist/metadata.d.ts.map +1 -0
  482. package/dist/metadata.js.map +1 -1
  483. package/dist/stats.html +4949 -0
  484. package/dist/tailwind.css +1 -1
  485. package/dist/tokens/and-theme/index.d.ts +2 -0
  486. package/dist/tokens/and-theme/index.d.ts.map +1 -0
  487. package/dist/tokens/and-theme/tokens.d.ts +6 -0
  488. package/dist/tokens/and-theme/tokens.d.ts.map +1 -0
  489. package/dist/tokens/and-theme/tokens.js.map +1 -1
  490. package/dist/tokens/charts/index.d.ts +5 -0
  491. package/dist/tokens/charts/index.d.ts.map +1 -0
  492. package/dist/tokens/charts/palettes/cloudscape.d.ts +460 -0
  493. package/dist/tokens/charts/palettes/cloudscape.d.ts.map +1 -0
  494. package/dist/tokens/charts/palettes/cloudscape.js.map +1 -1
  495. package/dist/tokens/charts/palettes/colorbrewer.d.ts +338 -0
  496. package/dist/tokens/charts/palettes/colorbrewer.d.ts.map +1 -0
  497. package/dist/tokens/charts/palettes/colorbrewer.js.map +1 -1
  498. package/dist/tokens/charts/palettes/index.d.ts +24 -0
  499. package/dist/tokens/charts/palettes/index.d.ts.map +1 -0
  500. package/dist/tokens/charts/palettes/index.js.map +1 -1
  501. package/dist/tokens/charts/palettes/tableau.d.ts +11 -0
  502. package/dist/tokens/charts/palettes/tableau.d.ts.map +1 -0
  503. package/dist/tokens/index.d.ts +5 -0
  504. package/dist/tokens/index.d.ts.map +1 -0
  505. package/dist/tokens/types.d.ts +10 -0
  506. package/dist/tokens/types.d.ts.map +1 -0
  507. package/dist/tokens/utils.d.ts +9 -0
  508. package/dist/tokens/utils.d.ts.map +1 -0
  509. package/dist/tokens/utils.js.map +1 -1
  510. package/package.json +2 -2
  511. package/dist/tailwind.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useHover.js","sources":["../../../src/components/hooks/useHover.ts"],"sourcesContent":["\"use client\";\n\nimport { useState, useCallback, useRef } from \"react\";\n\nexport function useHover<T extends HTMLElement>(): [\n (node: T) => void,\n boolean\n] {\n const [hovering, setHovering] = useState(false);\n const previousNode = useRef(null);\n\n const handleMouseEnter = useCallback(() => {\n setHovering(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setHovering(false);\n }, []);\n\n const customRef = useCallback(\n (node: T) => {\n if (previousNode.current?.nodeType === Node.ELEMENT_NODE) {\n previousNode.current.removeEventListener(\n \"mouseenter\",\n handleMouseEnter\n );\n previousNode.current.removeEventListener(\n \"mouseleave\",\n handleMouseLeave\n );\n }\n\n if (node?.nodeType === Node.ELEMENT_NODE) {\n node.addEventListener(\"mouseenter\", handleMouseEnter);\n node.addEventListener(\"mouseleave\", handleMouseLeave);\n }\n\n previousNode.current = node;\n },\n [handleMouseEnter, handleMouseLeave]\n );\n\n return [customRef, hovering];\n}\n"],"names":["useHover","hovering","setHovering","useState","previousNode","useRef","handleMouseEnter","useCallback","handleMouseLeave","node","_a"],"mappings":";;AAIO,SAASA,IAGd;AACA,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxCC,IAAeC,EAAO,IAAI,GAE1BC,IAAmBC,EAAY,MAAM;AACzC,IAAAL,EAAY,EAAI;AAAA,EAClB,GAAG,EAAE,GAECM,IAAmBD,EAAY,MAAM;AACzC,IAAAL,EAAY,EAAK;AAAA,EACnB,GAAG,EAAE;AAyBE,SAAA,CAvBWK;AAAA,IAChB,CAACE,MAAY;;AACX,QAAIC,IAAAN,EAAa,YAAb,gBAAAM,EAAsB,cAAa,KAAK,iBAC1CN,EAAa,QAAQ;AAAA,QACnB;AAAA,QACAE;AAAA,MACF,GACAF,EAAa,QAAQ;AAAA,QACnB;AAAA,QACAI;AAAA,MACF,KAGEC,KAAA,gBAAAA,EAAM,cAAa,KAAK,iBACrBA,EAAA,iBAAiB,cAAcH,CAAgB,GAC/CG,EAAA,iBAAiB,cAAcD,CAAgB,IAGtDJ,EAAa,UAAUK;AAAA,IACzB;AAAA,IACA,CAACH,GAAkBE,CAAgB;AAAA,EACrC,GAEmBP,CAAQ;AAC7B;"}
1
+ {"version":3,"file":"useHover.js","sources":["../../../src/components/hooks/useHover.ts"],"sourcesContent":["\"use client\";\n\nimport { useState, useCallback, useRef } from \"react\";\n\nexport function useHover<T extends HTMLElement>(): [\n (node: T) => void,\n boolean\n] {\n const [hovering, setHovering] = useState(false);\n const previousNode = useRef(null);\n\n const handleMouseEnter = useCallback(() => {\n setHovering(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setHovering(false);\n }, []);\n\n const customRef = useCallback(\n (node: T) => {\n if (previousNode.current?.nodeType === Node.ELEMENT_NODE) {\n previousNode.current.removeEventListener(\n \"mouseenter\",\n handleMouseEnter\n );\n previousNode.current.removeEventListener(\n \"mouseleave\",\n handleMouseLeave\n );\n }\n\n if (node?.nodeType === Node.ELEMENT_NODE) {\n node.addEventListener(\"mouseenter\", handleMouseEnter);\n node.addEventListener(\"mouseleave\", handleMouseLeave);\n }\n\n previousNode.current = node;\n },\n [handleMouseEnter, handleMouseLeave]\n );\n\n return [customRef, hovering];\n}\n"],"names":["useHover","hovering","setHovering","useState","previousNode","useRef","handleMouseEnter","useCallback","handleMouseLeave","node"],"mappings":";;AAIO,SAASA,IAGd;AACA,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxCC,IAAeC,EAAO,IAAI,GAE1BC,IAAmBC,EAAY,MAAM;AACzC,IAAAL,EAAY,EAAI;AAAA,EAClB,GAAG,CAAA,CAAE,GAECM,IAAmBD,EAAY,MAAM;AACzC,IAAAL,EAAY,EAAK;AAAA,EACnB,GAAG,CAAA,CAAE;AAyBL,SAAO,CAvBWK;AAAA,IAChB,CAACE,MAAY;AACX,MAAIL,EAAa,SAAS,aAAa,KAAK,iBAC1CA,EAAa,QAAQ;AAAA,QACnB;AAAA,QACAE;AAAA,MAAA,GAEFF,EAAa,QAAQ;AAAA,QACnB;AAAA,QACAI;AAAA,MAAA,IAIAC,GAAM,aAAa,KAAK,iBAC1BA,EAAK,iBAAiB,cAAcH,CAAgB,GACpDG,EAAK,iBAAiB,cAAcD,CAAgB,IAGtDJ,EAAa,UAAUK;AAAA,IACzB;AAAA,IACA,CAACH,GAAkBE,CAAgB;AAAA,EAAA,GAGlBP,CAAQ;AAC7B;"}
@@ -0,0 +1,9 @@
1
+ type ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;
2
+ export declare function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions): readonly [import('react').RefObject<T>, ObserverRect];
3
+ export declare function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions): {
4
+ ref: import('react').RefObject<T>;
5
+ width: number;
6
+ height: number;
7
+ };
8
+ export {};
9
+ //# sourceMappingURL=useResizeObserver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useResizeObserver.ts"],"names":[],"mappings":"AAGA,KAAK,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAapD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE,qBAAqB,yDA0D7F;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,GAAG,EAAE,OAAO,CAAC,EAAE,qBAAqB;;;;EAG1F"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { useRef as l, useState as R, useMemo as d, useEffect as z } from "react";
3
- const S = {
2
+ import { useRef as u, useState as a, useMemo as h, useEffect as R } from "react";
3
+ const b = {
4
4
  x: 0,
5
5
  y: 0,
6
6
  width: 0,
@@ -10,43 +10,42 @@ const S = {
10
10
  bottom: 0,
11
11
  right: 0
12
12
  };
13
- function x(o) {
14
- const n = l(0), e = l(null), [r, u] = R(S), c = d(
15
- () => typeof window < "u" ? new ResizeObserver((m) => {
16
- const t = m[0];
17
- t && (cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
18
- var s, f;
19
- if (e.current) {
20
- const i = ((s = t.borderBoxSize) == null ? void 0 : s[0]) || ((f = t.contentBoxSize) == null ? void 0 : f[0]);
21
- if (i) {
22
- const a = i.inlineSize, h = i.blockSize;
23
- u({
24
- width: a,
25
- height: h,
26
- x: t.contentRect.x,
27
- y: t.contentRect.y,
28
- top: t.contentRect.top,
29
- left: t.contentRect.left,
30
- bottom: t.contentRect.bottom,
31
- right: t.contentRect.right
13
+ function d(c) {
14
+ const n = u(0), t = u(null), [o, i] = a(b), s = h(
15
+ () => typeof window < "u" ? new ResizeObserver((f) => {
16
+ const e = f[0];
17
+ e && (cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
18
+ if (t.current) {
19
+ const r = e.borderBoxSize?.[0] || e.contentBoxSize?.[0];
20
+ if (r) {
21
+ const l = r.inlineSize, m = r.blockSize;
22
+ i({
23
+ width: l,
24
+ height: m,
25
+ x: e.contentRect.x,
26
+ y: e.contentRect.y,
27
+ top: e.contentRect.top,
28
+ left: e.contentRect.left,
29
+ bottom: e.contentRect.bottom,
30
+ right: e.contentRect.right
32
31
  });
33
32
  } else
34
- u(t.contentRect);
33
+ i(e.contentRect);
35
34
  }
36
35
  }));
37
36
  }) : null,
38
37
  []
39
38
  );
40
- return z(() => (e.current && (c == null || c.observe(e.current, o)), () => {
41
- c == null || c.disconnect(), n.current && cancelAnimationFrame(n.current);
42
- }), [e.current]), [e, r];
39
+ return R(() => (t.current && s?.observe(t.current, c), () => {
40
+ s?.disconnect(), n.current && cancelAnimationFrame(n.current);
41
+ }), [t.current]), [t, o];
43
42
  }
44
- function g(o) {
45
- const [n, { width: e, height: r }] = x(o);
46
- return { ref: n, width: e, height: r };
43
+ function S(c) {
44
+ const [n, { width: t, height: o }] = d(c);
45
+ return { ref: n, width: t, height: o };
47
46
  }
48
47
  export {
49
- g as useElementSize,
50
- x as useResizeObserver
48
+ S as useElementSize,
49
+ d as useResizeObserver
51
50
  };
52
51
  //# sourceMappingURL=useResizeObserver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useResizeObserver.js","sources":["../../../src/components/hooks/useResizeObserver.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo, useRef, useState } from 'react';\n\ntype ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;\n\nconst defaultState: ObserverRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n};\n\nexport function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const frameID = useRef(0);\n const ref = useRef<T>(null);\n\n const [rect, setRect] = useState<ObserverRect>(defaultState);\n\n const observer = useMemo(\n () =>\n typeof window !== 'undefined'\n ? new ResizeObserver((entries) => {\n const entry = entries[0];\n\n if (entry) {\n cancelAnimationFrame(frameID.current);\n\n frameID.current = requestAnimationFrame(() => {\n if (ref.current) {\n const boxSize = entry.borderBoxSize?.[0] || entry.contentBoxSize?.[0];\n if (boxSize) {\n const width = boxSize.inlineSize;\n const height = boxSize.blockSize;\n\n setRect({\n width,\n height,\n x: entry.contentRect.x,\n y: entry.contentRect.y,\n top: entry.contentRect.top,\n left: entry.contentRect.left,\n bottom: entry.contentRect.bottom,\n right: entry.contentRect.right,\n });\n } else {\n setRect(entry.contentRect);\n }\n }\n });\n }\n })\n : null,\n []\n );\n\n useEffect(() => {\n if (ref.current) {\n observer?.observe(ref.current, options);\n }\n\n return () => {\n observer?.disconnect();\n\n if (frameID.current) {\n cancelAnimationFrame(frameID.current);\n }\n };\n }, [ref.current]);\n\n return [ref, rect] as const;\n}\n\nexport function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const [ref, { width, height }] = useResizeObserver<T>(options);\n return { ref, width, height };\n}\n"],"names":["defaultState","useResizeObserver","options","frameID","useRef","ref","rect","setRect","useState","observer","useMemo","entries","entry","boxSize","_a","_b","width","height","useEffect","useElementSize"],"mappings":";;AAKA,MAAMA,IAA6B;AAAA,EACjC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AACT;AAEO,SAASC,EAA+CC,GAAiC;AACxF,QAAAC,IA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AAW,GAAO,QAAAC,EAAO;AAC9B;"}
1
+ {"version":3,"file":"useResizeObserver.js","sources":["../../../src/components/hooks/useResizeObserver.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useMemo, useRef, useState } from 'react';\n\ntype ObserverRect = Omit<DOMRectReadOnly, 'toJSON'>;\n\nconst defaultState: ObserverRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n};\n\nexport function useResizeObserver<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const frameID = useRef(0);\n const ref = useRef<T>(null);\n\n const [rect, setRect] = useState<ObserverRect>(defaultState);\n\n const observer = useMemo(\n () =>\n typeof window !== 'undefined'\n ? new ResizeObserver((entries) => {\n const entry = entries[0];\n\n if (entry) {\n cancelAnimationFrame(frameID.current);\n\n frameID.current = requestAnimationFrame(() => {\n if (ref.current) {\n const boxSize = entry.borderBoxSize?.[0] || entry.contentBoxSize?.[0];\n if (boxSize) {\n const width = boxSize.inlineSize;\n const height = boxSize.blockSize;\n\n setRect({\n width,\n height,\n x: entry.contentRect.x,\n y: entry.contentRect.y,\n top: entry.contentRect.top,\n left: entry.contentRect.left,\n bottom: entry.contentRect.bottom,\n right: entry.contentRect.right,\n });\n } else {\n setRect(entry.contentRect);\n }\n }\n });\n }\n })\n : null,\n []\n );\n\n useEffect(() => {\n if (ref.current) {\n observer?.observe(ref.current, options);\n }\n\n return () => {\n observer?.disconnect();\n\n if (frameID.current) {\n cancelAnimationFrame(frameID.current);\n }\n };\n }, [ref.current]);\n\n return [ref, rect] as const;\n}\n\nexport function useElementSize<T extends HTMLElement = any>(options?: ResizeObserverOptions) {\n const [ref, { width, height }] = useResizeObserver<T>(options);\n return { ref, width, height };\n}\n"],"names":["defaultState","useResizeObserver","options","frameID","useRef","ref","rect","setRect","useState","observer","useMemo","entries","entry","boxSize","width","height","useEffect","useElementSize"],"mappings":";;AAKA,MAAMA,IAA6B;AAAA,EACjC,GAAG;AA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cf,GAAiC;AAC3F,QAAM,CAACG,GAAK,EAAE,OAAAS,GAAO,QAAAC,GAAQ,IAAId,EAAqBC,CAAO;AAC7D,SAAO,EAAE,KAAAG,GAAK,OAAAS,GAAO,QAAAC,EAAA;AACvB;"}
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ export type TransitionStatus = "starting" | "ending" | "idle" | undefined;
3
+ /**
4
+ * Provides a status string for CSS animations.
5
+ * @param open - a boolean that determines if the element is open.
6
+ * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`
7
+ */
8
+ export declare function useTransitionStatus(open: boolean, enableIdleState?: boolean, deferEndingState?: boolean): {
9
+ mounted: boolean;
10
+ setMounted: React.Dispatch<React.SetStateAction<boolean>>;
11
+ transitionStatus: TransitionStatus;
12
+ };
13
+ //# sourceMappingURL=useTransitionStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTransitionStatus.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useTransitionStatus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;AAE1E;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,eAAe,GAAE,OAAe,EAChC,gBAAgB,GAAE,OAAe;;;;EA6ElC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useTransitionStatus.js","sources":["../../../src/components/hooks/useTransitionStatus.ts"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useIsoLayoutEffect } from \"@base-ui-components/utils/useIsoLayoutEffect\";\nimport { AnimationFrame } from \"@base-ui-components/utils/useAnimationFrame\";\n\nexport type TransitionStatus = \"starting\" | \"ending\" | \"idle\" | undefined;\n\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(\n open: boolean,\n enableIdleState: boolean = false,\n deferEndingState: boolean = false\n) {\n const [transitionStatus, setTransitionStatus] =\n React.useState<TransitionStatus>(\n open && enableIdleState ? \"idle\" : undefined\n );\n const [mounted, setMounted] = React.useState(open);\n\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus(\"starting\");\n }\n\n if (!open && mounted && transitionStatus !== \"ending\" && !deferEndingState) {\n setTransitionStatus(\"ending\");\n }\n\n if (!open && !mounted && transitionStatus === \"ending\") {\n setTransitionStatus(undefined);\n }\n\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== \"ending\" && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"ending\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n\n const frame = AnimationFrame.request(() => {\n ReactDOM.flushSync(() => {\n setTransitionStatus(undefined);\n });\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n\n if (open && mounted && transitionStatus !== \"idle\") {\n setTransitionStatus(\"starting\");\n }\n\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"idle\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);\n\n return React.useMemo(\n () => ({\n mounted,\n setMounted,\n transitionStatus,\n }),\n [mounted, transitionStatus]\n );\n}\n"],"names":["useTransitionStatus","open","enableIdleState","deferEndingState","transitionStatus","setTransitionStatus","React","mounted","setMounted","useIsoLayoutEffect","frame","AnimationFrame","ReactDOM"],"mappings":";;;;;AAaO,SAASA,EACdC,GACAC,IAA2B,IAC3BC,IA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GAASF,GAAqBD,CAAgB,CAAC,GAEnEE,EAAM;AAAA,IACX,OAAO;AAAA,MACL,SAAAC;AAAA,MACA,YAAAC;AAAA,MACA,kBAAAJ;AAAA,IAAA;AAAA,IAEF,CAACG,GAASH,CAAgB;AAAA,EAC5B;AACF;"}
1
+ {"version":3,"file":"useTransitionStatus.js","sources":["../../../src/components/hooks/useTransitionStatus.ts"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useIsoLayoutEffect } from \"@base-ui-components/utils/useIsoLayoutEffect\";\nimport { AnimationFrame } from \"@base-ui-components/utils/useAnimationFrame\";\n\nexport type TransitionStatus = \"starting\" | \"ending\" | \"idle\" | undefined;\n\n/**\n * Provides a status string for CSS animations.\n * @param open - a boolean that determines if the element is open.\n * @param enableIdleState - a boolean that enables the `'idle'` state between `'starting'` and `'ending'`\n */\nexport function useTransitionStatus(\n open: boolean,\n enableIdleState: boolean = false,\n deferEndingState: boolean = false\n) {\n const [transitionStatus, setTransitionStatus] =\n React.useState<TransitionStatus>(\n open && enableIdleState ? \"idle\" : undefined\n );\n const [mounted, setMounted] = React.useState(open);\n\n if (open && !mounted) {\n setMounted(true);\n setTransitionStatus(\"starting\");\n }\n\n if (!open && mounted && transitionStatus !== \"ending\" && !deferEndingState) {\n setTransitionStatus(\"ending\");\n }\n\n if (!open && !mounted && transitionStatus === \"ending\") {\n setTransitionStatus(undefined);\n }\n\n useIsoLayoutEffect(() => {\n if (!open && mounted && transitionStatus !== \"ending\" && deferEndingState) {\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"ending\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }\n\n return undefined;\n }, [open, mounted, transitionStatus, deferEndingState]);\n\n useIsoLayoutEffect(() => {\n if (!open || enableIdleState) {\n return undefined;\n }\n\n const frame = AnimationFrame.request(() => {\n ReactDOM.flushSync(() => {\n setTransitionStatus(undefined);\n });\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open]);\n\n useIsoLayoutEffect(() => {\n if (!open || !enableIdleState) {\n return undefined;\n }\n\n if (open && mounted && transitionStatus !== \"idle\") {\n setTransitionStatus(\"starting\");\n }\n\n const frame = AnimationFrame.request(() => {\n setTransitionStatus(\"idle\");\n });\n\n return () => {\n AnimationFrame.cancel(frame);\n };\n }, [enableIdleState, open, mounted, setTransitionStatus, transitionStatus]);\n\n return React.useMemo(\n () => ({\n mounted,\n setMounted,\n transitionStatus,\n }),\n [mounted, transitionStatus]\n );\n}\n"],"names":["useTransitionStatus","open","enableIdleState","deferEndingState","transitionStatus","setTransitionStatus","React","mounted","setMounted","useIsoLayoutEffect","frame","AnimationFrame","ReactDOM"],"mappings":";;;;;AAaO,SAASA,EACdC,GACAC,IAA2B,IAC3BC,IAA4B,IAC5B;AACA,QAAM,CAACC,GAAkBC,CAAmB,IAC1CC,EAAM;AAAA,IACJL,KAAQC,IAAkB,SAAS;AAAA,EAAA,GAEjC,CAACK,GAASC,CAAU,IAAIF,EAAM,SAASL,CAAI;AAEjD,SAAIA,KAAQ,CAACM,MACXC,EAAW,EAAI,GACfH,EAAoB,UAAU,IAG5B,CAACJ,KAAQM,KAAWH,MAAqB,YAAY,CAACD,KACxDE,EAAoB,QAAQ,GAG1B,CAACJ,KAAQ,CAACM,KAAWH,MAAqB,YAC5CC,EAAoB,MAAS,GAG/BI,EAAmB,MAAM;AACvB,QAAI,CAACR,KAAQM,KAAWH,MAAqB,YAAYD,GAAkB;AACzE,YAAMO,IAAQC,EAAe,QAAQ,MAAM;AACzC,QAAAN,EAAoB,QAAQ;AAAA,MAC9B,CAAC;AAED,aAAO,MAAM;AACX,QAAAM,EAAe,OAAOD,CAAK;AAAA,MAC7B;AAAA,IACF;AAAA,EAGF,GAAG,CAACT,GAAMM,GAASH,GAAkBD,CAAgB,CAAC,GAEtDM,EAAmB,MAAM;AACvB,QAAI,CAACR,KAAQC;AACX;AAGF,UAAMQ,IAAQC,EAAe,QAAQ,MAAM;AACzC,MAAAC,EAAS,UAAU,MAAM;AACvB,QAAAP,EAAoB,MAAS;AAAA,MAC/B,CAAC;AAAA,IACH,CAAC;AAED,WAAO,MAAM;AACX,MAAAM,EAAe,OAAOD,CAAK;AAAA,IAC7B;AAAA,EACF,GAAG,CAACR,GAAiBD,CAAI,CAAC,GAE1BQ,EAAmB,MAAM;AACvB,QAAI,CAACR,KAAQ,CAACC;AACZ;AAGF,IAAID,KAAQM,KAAWH,MAAqB,UAC1CC,EAAoB,UAAU;AAGhC,UAAMK,IAAQC,EAAe,QAAQ,MAAM;AACzC,MAAAN,EAAoB,MAAM;AAAA,IAC5B,CAAC;AAED,WAAO,MAAM;AACX,MAAAM,EAAe,OAAOD,CAAK;AAAA,IAC7B;AAAA,EACF,GAAG,CAACR,GAAiBD,GAAMM,GAASF,GAAqBD,CAAgB,CAAC,GAEnEE,EAAM;AAAA,IACX,OAAO;AAAA,MACL,SAAAC;AAAA,MACA,YAAAC;AAAA,MACA,kBAAAJ;AAAA,IAAA;AAAA,IAEF,CAACG,GAASH,CAAgB;AAAA,EAAA;AAE9B;"}
@@ -0,0 +1,5 @@
1
+ export declare function useWindowSize(): {
2
+ width: any;
3
+ height: any;
4
+ };
5
+ //# sourceMappingURL=useWindowSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWindowSize.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useWindowSize.ts"],"names":[],"mappings":"AAGA,wBAAgB,aAAa;;;EAuB5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"useWindowSize.js","sources":["../../../src/components/hooks/useWindowSize.ts"],"sourcesContent":["\"use client\";\nimport React from 'react';\n\nexport function useWindowSize() {\n const [size, setSize] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return size;\n}\n"],"names":["useWindowSize","size","setSize","React","handleResize"],"mappings":";;AAGO,SAASA,IAAgB;AAC9B,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS;AAAA,IACrC,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA,CACT;AAEDA,SAAAA,EAAM,gBAAgB,MAAM;AAC1B,UAAMC,IAAe,MAAM;AACjB,MAAAF,EAAA;AAAA,QACN,OAAO,OAAO;AAAA,QACd,QAAQ,OAAO;AAAA,MAAA,CAChB;AAAA,IACH;AAEa,WAAAE,EAAA,GACN,OAAA,iBAAiB,UAAUA,CAAY,GAEvC,MAAM;AACJ,aAAA,oBAAoB,UAAUA,CAAY;AAAA,IACnD;AAAA,EACF,GAAG,EAAE,GAEEH;AACT;"}
1
+ {"version":3,"file":"useWindowSize.js","sources":["../../../src/components/hooks/useWindowSize.ts"],"sourcesContent":["\"use client\";\nimport React from 'react';\n\nexport function useWindowSize() {\n const [size, setSize] = React.useState({\n width: null,\n height: null,\n });\n\n React.useLayoutEffect(() => {\n const handleResize = () => {\n setSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n return size;\n}\n"],"names":["useWindowSize","size","setSize","React","handleResize"],"mappings":";;AAGO,SAASA,IAAgB;AAC9B,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS;AAAA,IACrC,OAAO;AAAA,IACP,QAAQ;AAAA,EAAA,CACT;AAEDA,SAAAA,EAAM,gBAAgB,MAAM;AAC1B,UAAMC,IAAe,MAAM;AACzB,MAAAF,EAAQ;AAAA,QACN,OAAO,OAAO;AAAA,QACd,QAAQ,OAAO;AAAA,MAAA,CAChB;AAAA,IACH;AAEA,WAAAE,EAAA,GACA,OAAO,iBAAiB,UAAUA,CAAY,GAEvC,MAAM;AACX,aAAO,oBAAoB,UAAUA,CAAY;AAAA,IACnD;AAAA,EACF,GAAG,CAAA,CAAE,GAEEH;AACT;"}
@@ -0,0 +1,45 @@
1
+ import { default as React, ElementType, Ref, ComponentPropsWithRef } from 'react';
2
+ import { TooltipProps } from '../tooltip';
3
+ import { WithRenderPropProps, ElementTypeToDOMType } from '../utils';
4
+ export type IconButtonProps<E extends ElementType = "button"> = WithRenderPropProps<E, {
5
+ loading: boolean;
6
+ }> & {
7
+ /**
8
+ * Label text or element to display within tooltip
9
+ * @default undefined
10
+ */
11
+ label?: React.ReactNode;
12
+ /**
13
+ * Size of the icon button: small (1.25rem) or medium (1.5rem)
14
+ * @default medium
15
+ */
16
+ size?: "small" | "medium";
17
+ /**
18
+ * Whether to apply negative margin for better visual alignment
19
+ * @default true
20
+ */
21
+ negativeMargin?: boolean;
22
+ /**
23
+ * Whether to show loading state
24
+ * @default false
25
+ */
26
+ loading?: boolean;
27
+ /**
28
+ * Props to pass to the Tooltip component when wrapping the button
29
+ */
30
+ tooltipProps?: TooltipProps;
31
+ /**
32
+ * Whether to show active state
33
+ * @default false
34
+ */
35
+ active?: boolean;
36
+ };
37
+ /**
38
+ * Implementation of the IconButton component
39
+ */
40
+ declare const IconButtonImpl: <E extends ElementType = "button">({ label, size, negativeMargin, children, className, tooltipProps, active, as, href, target, rel, download, hrefLang, referrerPolicy, loading, render, ...rest }: IconButtonProps<E>, ref: Ref<ElementTypeToDOMType<E>>) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const IconButton: <E extends ElementType = "button">(props: IconButtonProps<E> & {
42
+ ref?: ComponentPropsWithRef<E>["ref"];
43
+ }) => ReturnType<typeof IconButtonImpl>;
44
+ export {};
45
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAEZ,KAAK,WAAW,EAChB,KAAK,GAAG,EACR,qBAAqB,EACtB,MAAM,OAAO,CAAC;AACf,OAAO,EAAW,YAAY,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAGL,mBAAmB,EAEnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAIlB,OAAO,aAAa,CAAC;AAGrB,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IAC1D,mBAAmB,CAAC,CAAC,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG;IAC7C;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEJ;;GAEG;AACH,QAAA,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,GAAG,QAAQ,EACtD,iKAmBG,eAAe,CAAC,CAAC,CAAC,EACrB,KAAK,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,4CAqDlC,CAAC;AAGF,eAAO,MAAM,UAAU,EAAiC,CACtD,CAAC,SAAS,WAAW,GAAG,QAAQ,EAEhC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,KAClE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/icon-button/component.tsx"],"sourcesContent":["\"use client\";\nimport React, {\n forwardRef,\n type ElementType,\n type Ref,\n ComponentPropsWithRef,\n} from \"react\";\nimport { Tooltip, TooltipProps } from \"../tooltip\";\nimport {\n useCls,\n clsx,\n WithRenderPropProps,\n WithRenderProp,\n ElementTypeToDOMType,\n} from \"../utils\";\nimport { Spin } from \"../spin\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Base props without href/as handling\nexport type IconButtonProps<E extends ElementType = \"button\"> =\n WithRenderPropProps<E, { loading: boolean }> & {\n /**\n * Label text or element to display within tooltip\n * @default undefined\n */\n label?: React.ReactNode;\n /**\n * Size of the icon button: small (1.25rem) or medium (1.5rem)\n * @default medium\n */\n size?: \"small\" | \"medium\";\n /**\n * Whether to apply negative margin for better visual alignment\n * @default true\n */\n negativeMargin?: boolean;\n /**\n * Whether to show loading state\n * @default false\n */\n loading?: boolean;\n /**\n * Props to pass to the Tooltip component when wrapping the button\n */\n tooltipProps?: TooltipProps;\n /**\n * Whether to show active state\n * @default false\n */\n active?: boolean;\n };\n\n/**\n * Implementation of the IconButton component\n */\nconst IconButtonImpl = <E extends ElementType = \"button\">(\n {\n label,\n size = \"medium\",\n negativeMargin = true,\n children,\n className,\n tooltipProps = {},\n active = false,\n as,\n href,\n // Extract anchor-specific props\n target,\n rel,\n download,\n hrefLang,\n referrerPolicy,\n loading,\n render,\n ...rest\n }: IconButtonProps<E>,\n ref: Ref<ElementTypeToDOMType<E>>\n) => {\n const cls = useCls();\n const buttonClasses = clsx(\n cls(\n \"icon-button\",\n `icon-button-${size}`,\n active && \"icon-button-active\",\n negativeMargin && \"icon-button-negative-margin\"\n ),\n className\n );\n\n // Use a type assertion for the component to avoid TypeScript errors\n const Component = (as || (href ? \"a\" : \"button\")) as ElementType;\n\n const elementProps = {\n ref,\n className: buttonClasses,\n ...(Component === \"button\" && { type: \"button\" }),\n ...(Component === \"a\"\n ? {\n ...(href && { href }),\n ...(target !== undefined && { target }),\n ...(rel !== undefined && { rel }),\n ...(download !== undefined && { download }),\n ...(hrefLang !== undefined && { hrefLang }),\n ...(referrerPolicy !== undefined && { referrerPolicy }),\n }\n : {}),\n \"data-loading\": loading,\n children: loading ? <Spin /> : children,\n ...rest,\n };\n\n const element = (\n <WithRenderProp\n as={Component}\n render={render}\n {...elementProps}\n state={{\n loading,\n }}\n />\n );\n\n return label ? (\n <Tooltip title={label} arrow={false} {...tooltipProps}>\n {element}\n </Tooltip>\n ) : (\n element\n );\n};\n\n// Export with correct typing\nexport const IconButton = forwardRef(IconButtonImpl) as <\n E extends ElementType = \"button\"\n>(\n props: IconButtonProps<E> & { ref?: ComponentPropsWithRef<E>[\"ref\"] }\n) => ReturnType<typeof IconButtonImpl>;\n"],"names":["IconButtonImpl","label","size","negativeMargin","children","className","tooltipProps","active","as","href","target","rel","download","hrefLang","referrerPolicy","loading","render","rest","ref","cls","useCls","buttonClasses","clsx","Component","elementProps","jsx","Spin","element","WithRenderProp","Tooltip","IconButton","forwardRef"],"mappings":";;;;;;;;;AAyDA,MAAMA,IAAiB,CACrB;AAAA,EACE,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,gBAAAC,IAAiB;AAAA,EACjB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC,IAAe,CAAC;AAAA,EAChB,QAAAC,IAAS;AAAA,EACT,IAAAC;AAAA,EACA,MAAAC;AAAA;AAAA,EAEA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IAAMC,EAAO,GACbC,IAAgBC;AAAA,IACpBH;AAAA,MACE;AAAA,MACA,eAAejB,CAAI;AAAA,MACnBK,KAAU;AAAA,MACVJ,KAAkB;AAAA,IACpB;AAAA,IACAE;AAAA,EACF,GAGMkB,IAAaf,MAAOC,IAAO,MAAM,WAEjCe,IAAe;AAAA,IACnB,KAAAN;AAAA,IACA,WAAWG;AAAA,IACX,GAAIE,MAAc,YAAY,EAAE,MAAM,SAAS;AAAA,IAC/C,GAAIA,MAAc,MACd;AAAA,MACE,GAAId,KAAQ,EAAE,MAAAA,EAAK;AAAA,MACnB,GAAIC,MAAW,UAAa,EAAE,QAAAA,EAAO;AAAA,MACrC,GAAIC,MAAQ,UAAa,EAAE,KAAAA,EAAI;AAAA,MAC/B,GAAIC,MAAa,UAAa,EAAE,UAAAA,EAAS;AAAA,MACzC,GAAIC,MAAa,UAAa,EAAE,UAAAA,EAAS;AAAA,MACzC,GAAIC,MAAmB,UAAa,EAAE,gBAAAA,EAAe;AAAA,IAAA,IAEvD,CAAC;AAAA,IACL,gBAAgBC;AAAA,IAChB,UAAUA,IAAW,gBAAAU,EAAAC,GAAA,CAAA,CAAK,IAAKtB;AAAA,IAC/B,GAAGa;AAAA,EACL,GAEMU,IACJ,gBAAAF;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIL;AAAA,MACJ,QAAAP;AAAA,MACC,GAAGQ;AAAA,MACJ,OAAO;AAAA,QACL,SAAAT;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAGK,SAAAd,IACJ,gBAAAwB,EAAAI,GAAA,EAAQ,OAAO5B,GAAO,OAAO,IAAQ,GAAGK,GACtC,UAAAqB,EAAA,CACH,IAEAA;AAEJ,GAGaG,IAAaC,EAAW/B,CAAc;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/icon-button/component.tsx"],"sourcesContent":["\"use client\";\nimport React, {\n forwardRef,\n type ElementType,\n type Ref,\n ComponentPropsWithRef,\n} from \"react\";\nimport { Tooltip, TooltipProps } from \"../tooltip\";\nimport {\n useCls,\n clsx,\n WithRenderPropProps,\n WithRenderProp,\n ElementTypeToDOMType,\n} from \"../utils\";\nimport { Spin } from \"../spin\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Base props without href/as handling\nexport type IconButtonProps<E extends ElementType = \"button\"> =\n WithRenderPropProps<E, { loading: boolean }> & {\n /**\n * Label text or element to display within tooltip\n * @default undefined\n */\n label?: React.ReactNode;\n /**\n * Size of the icon button: small (1.25rem) or medium (1.5rem)\n * @default medium\n */\n size?: \"small\" | \"medium\";\n /**\n * Whether to apply negative margin for better visual alignment\n * @default true\n */\n negativeMargin?: boolean;\n /**\n * Whether to show loading state\n * @default false\n */\n loading?: boolean;\n /**\n * Props to pass to the Tooltip component when wrapping the button\n */\n tooltipProps?: TooltipProps;\n /**\n * Whether to show active state\n * @default false\n */\n active?: boolean;\n };\n\n/**\n * Implementation of the IconButton component\n */\nconst IconButtonImpl = <E extends ElementType = \"button\">(\n {\n label,\n size = \"medium\",\n negativeMargin = true,\n children,\n className,\n tooltipProps = {},\n active = false,\n as,\n href,\n // Extract anchor-specific props\n target,\n rel,\n download,\n hrefLang,\n referrerPolicy,\n loading,\n render,\n ...rest\n }: IconButtonProps<E>,\n ref: Ref<ElementTypeToDOMType<E>>\n) => {\n const cls = useCls();\n const buttonClasses = clsx(\n cls(\n \"icon-button\",\n `icon-button-${size}`,\n active && \"icon-button-active\",\n negativeMargin && \"icon-button-negative-margin\"\n ),\n className\n );\n\n // Use a type assertion for the component to avoid TypeScript errors\n const Component = (as || (href ? \"a\" : \"button\")) as ElementType;\n\n const elementProps = {\n ref,\n className: buttonClasses,\n ...(Component === \"button\" && { type: \"button\" }),\n ...(Component === \"a\"\n ? {\n ...(href && { href }),\n ...(target !== undefined && { target }),\n ...(rel !== undefined && { rel }),\n ...(download !== undefined && { download }),\n ...(hrefLang !== undefined && { hrefLang }),\n ...(referrerPolicy !== undefined && { referrerPolicy }),\n }\n : {}),\n \"data-loading\": loading,\n children: loading ? <Spin /> : children,\n ...rest,\n };\n\n const element = (\n <WithRenderProp\n as={Component}\n render={render}\n {...elementProps}\n state={{\n loading,\n }}\n />\n );\n\n return label ? (\n <Tooltip title={label} arrow={false} {...tooltipProps}>\n {element}\n </Tooltip>\n ) : (\n element\n );\n};\n\n// Export with correct typing\nexport const IconButton = forwardRef(IconButtonImpl) as <\n E extends ElementType = \"button\"\n>(\n props: IconButtonProps<E> & { ref?: ComponentPropsWithRef<E>[\"ref\"] }\n) => ReturnType<typeof IconButtonImpl>;\n"],"names":["IconButtonImpl","label","size","negativeMargin","children","className","tooltipProps","active","as","href","target","rel","download","hrefLang","referrerPolicy","loading","render","rest","ref","cls","useCls","buttonClasses","clsx","Component","elementProps","jsx","Spin","element","WithRenderProp","Tooltip","IconButton","forwardRef"],"mappings":";;;;;;;;;AAyDA,MAAMA,IAAiB,CACrB;AAAA,EACE,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,gBAAAC,IAAiB;AAAA,EACjB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,cAAAC,IAAe,CAAA;AAAA,EACf,QAAAC,IAAS;AAAA,EACT,IAAAC;AAAA,EACA,MAAAC;AAAA;AAAA,EAEA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,GAAGC;AACL,GACAC,MACG;AACH,QAAMC,IAAMC,EAAA,GACNC,IAAgBC;AAAA,IACpBH;AAAA,MACE;AAAA,MACA,eAAejB,CAAI;AAAA,MACnBK,KAAU;AAAA,MACVJ,KAAkB;AAAA,IAAA;AAAA,IAEpBE;AAAA,EAAA,GAIIkB,IAAaf,MAAOC,IAAO,MAAM,WAEjCe,IAAe;AAAA,IACnB,KAAAN;AAAA,IACA,WAAWG;AAAA,IACX,GAAIE,MAAc,YAAY,EAAE,MAAM,SAAA;AAAA,IACtC,GAAIA,MAAc,MACd;AAAA,MACE,GAAId,KAAQ,EAAE,MAAAA,EAAA;AAAA,MACd,GAAIC,MAAW,UAAa,EAAE,QAAAA,EAAA;AAAA,MAC9B,GAAIC,MAAQ,UAAa,EAAE,KAAAA,EAAA;AAAA,MAC3B,GAAIC,MAAa,UAAa,EAAE,UAAAA,EAAA;AAAA,MAChC,GAAIC,MAAa,UAAa,EAAE,UAAAA,EAAA;AAAA,MAChC,GAAIC,MAAmB,UAAa,EAAE,gBAAAA,EAAA;AAAA,IAAe,IAEvD,CAAA;AAAA,IACJ,gBAAgBC;AAAA,IAChB,UAAUA,IAAU,gBAAAU,EAACC,GAAA,CAAA,CAAK,IAAKtB;AAAA,IAC/B,GAAGa;AAAA,EAAA,GAGCU,IACJ,gBAAAF;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIL;AAAA,MACJ,QAAAP;AAAA,MACC,GAAGQ;AAAA,MACJ,OAAO;AAAA,QACL,SAAAT;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAIJ,SAAOd,IACL,gBAAAwB,EAACI,GAAA,EAAQ,OAAO5B,GAAO,OAAO,IAAQ,GAAGK,GACtC,UAAAqB,EAAA,CACH,IAEAA;AAEJ,GAGaG,IAAaC,EAAW/B,CAAc;"}
@@ -0,0 +1,2 @@
1
+ export * from './component';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,53 @@
1
+ export { Affix, Alert, Anchor, App, AutoComplete, Avatar, BackTop, Calendar, Card, Carousel, Cascader, Col, ColorPicker, ConfigProvider, DatePicker, Descriptions, Divider, Drawer, Dropdown, Flex, FloatButton, Grid, InputNumber, Layout, List, Mentions, Menu, message, notification, Pagination, Popconfirm, Progress, QRCode, Rate, Result, Row, Skeleton, Space, Statistic, Steps, Tabs, theme, TimePicker, Timeline, Transfer, TreeSelect, Typography, version, Watermark, unstableSetRender, } from 'antd';
2
+ export type { AffixProps, AffixRef, AlertProps, AnchorLinkProps, AnchorProps, AppProps, AutoCompleteProps, AvatarProps, BackTopProps, CalendarMode, CalendarProps, CardProps, CarouselProps, CascaderProps, CascaderAutoProps, CascaderPanelProps, CascaderPanelAutoProps, CheckboxChangeEvent, CheckboxOptionType, CheckboxRef, ColProps, ColorPickerProps, ConfigProviderProps, ThemeConfig, DatePickerProps, DescriptionsProps, DividerProps, DrawerProps, DropDownProps, DropdownProps, FlexProps, FloatButtonGroupProps, FloatButtonProps, FloatButtonRef, FormInstance, FormListFieldData, FormListOperation, FormProps, InputNumberProps, LayoutProps, SiderProps, ListProps, MentionProps, MentionsProps, MenuItemProps, MenuProps, MenuRef, MenuTheme, SubMenuProps, MessageArgsProps, ModalFuncProps, NotificationArgsProps, PaginationProps, PopconfirmProps, ProgressProps, QRCodeProps, QRPropsCanvas, QRPropsSvg, RateProps, ResultProps, RowProps, RefSelectProps, SkeletonProps, SliderSingleProps, SpaceProps, CountdownProps, StatisticProps, StepProps, StepsProps, TableColumnGroupType, TableColumnProps, TableColumnType, TableColumnsType, TablePaginationConfig, TabPaneProps, TabsProps, TagType, GlobalToken, MappingAlgorithm, TimePickerProps, TimeRangePickerProps, TimelineItemProps, TimelineProps, TransferProps, TreeSelectProps, TypographyProps, UploadFile, WatermarkProps, } from 'antd';
3
+ export * from './select/index';
4
+ export * from './modal/index';
5
+ export * from './icon-button/index';
6
+ export * from './switch/component';
7
+ export * from './checkbox/index';
8
+ export * from './segmented/index';
9
+ export * from './table/component';
10
+ export * from './tag/component';
11
+ export * from './theme-provider/component';
12
+ export * from './splitter/component';
13
+ export * from './truncate/component';
14
+ export * from './dropdown-menu/index';
15
+ export * from './command-palette/index';
16
+ export * from './keyboard-shortcut/index';
17
+ export * from './transition/index';
18
+ export * from './upload/index';
19
+ export * from './scroll-area/index';
20
+ export * from './popover/index';
21
+ export * from './slider/component';
22
+ export * from './tooltip/component';
23
+ export * from './breadcrumb/index';
24
+ export * from './tree/index';
25
+ export * from './spin/index';
26
+ export * from './empty/component';
27
+ export * from './form/component';
28
+ export * from './field/component';
29
+ export * from './tour/component';
30
+ export * from './toast/index';
31
+ export * from './vertical-collapsible-panel/index';
32
+ export * from './popup-panel/index';
33
+ export * from './code-block/index';
34
+ export * from './stack/index';
35
+ export * from './collapse/index';
36
+ export * from './empty/index';
37
+ export * from './input/index';
38
+ export * from './badge/component';
39
+ export * from './radio/index';
40
+ export * from './button/component';
41
+ export * from './ds-root/index';
42
+ export * from './drag-drop/index';
43
+ export * from './color-select/index';
44
+ export * from './nav/index';
45
+ export * from './choice-list/index';
46
+ export * from './status-icon/index';
47
+ export * from './resizable/index';
48
+ export * from './combobox/index';
49
+ export * from './select-trigger/index';
50
+ export * from './loader/index';
51
+ export * from './utils/index';
52
+ export * from './hooks/index';
53
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,EACH,YAAY,EACZ,MAAM,EACN,OAAO,EAIP,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,EAER,GAAG,EAEH,WAAW,EACX,cAAc,EACd,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,QAAQ,EAER,IAAI,EACJ,WAAW,EAEX,IAAI,EAGJ,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,EAEP,YAAY,EACZ,UAAU,EACV,UAAU,EAEV,QAAQ,EACR,MAAM,EAEN,IAAI,EACJ,MAAM,EACN,GAAG,EAGH,QAAQ,EAER,KAAK,EAEL,SAAS,EACT,KAAK,EAGL,IAAI,EAEJ,KAAK,EACL,UAAU,EACV,QAAQ,EAGR,QAAQ,EAER,UAAU,EACV,UAAU,EAEV,OAAO,EACP,SAAS,EAET,iBAAiB,GAClB,MAAM,MAAM,CAAC;AAEd,YAAY,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,YAAY,EAKZ,YAAY,EACZ,aAAa,EACb,SAAS,EACT,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,kB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,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,oCAAoC,CAAC;AACnD,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { InputProps as AntInputProps, InputRef } from 'antd';
2
+ import { PasswordProps as AntPasswordProps, SearchProps as AntSearchProps, TextAreaProps as AntTextAreaProps } from 'antd/es/input';
3
+ export interface InputProps extends AntInputProps {
4
+ }
5
+ export interface PasswordProps extends AntPasswordProps {
6
+ }
7
+ export interface TextAreaProps extends AntTextAreaProps {
8
+ }
9
+ export interface SearchProps extends AntSearchProps {
10
+ }
11
+ declare const MainInputInner: (props: InputProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
12
+ declare const PasswordInner: (props: PasswordProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
13
+ declare const SearchInner: ({ enterButton, onSearch, prefix, onPressEnter, onClear, loading, ...rest }: SearchProps, ref: React.Ref<InputRef>) => import("react/jsx-runtime").JSX.Element;
14
+ declare const TextAreaInner: (props: TextAreaProps, ref: React.Ref<HTMLTextAreaElement>) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Input: ((props: InputProps & {
16
+ ref?: React.ForwardedRef<InputRef>;
17
+ }) => ReturnType<typeof MainInputInner>) & {
18
+ Password: (props: PasswordProps & {
19
+ ref?: React.ForwardedRef<InputRef>;
20
+ }) => ReturnType<typeof PasswordInner>;
21
+ Search: (props: SearchProps & {
22
+ ref?: React.ForwardedRef<InputRef>;
23
+ }) => ReturnType<typeof SearchInner>;
24
+ TextArea: (props: TextAreaProps & {
25
+ ref?: React.ForwardedRef<HTMLTextAreaElement>;
26
+ }) => ReturnType<typeof TextAreaInner>;
27
+ };
28
+ export {};
29
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/input/component.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,UAAU,IAAI,aAAa,EAChC,KAAK,QAAQ,EACd,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,KAAK,aAAa,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,KAAK,WAAW,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,KAAK,aAAa,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKvE,OAAO,aAAa,CAAC;AAIrB,MAAM,WAAW,UAAW,SAAQ,aAAa;CAAG;AACpD,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CAAG;AAC1D,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CAAG;AAC1D,MAAM,WAAW,WAAY,SAAQ,cAAc;CAAG;AAGtD,QAAA,MAAM,cAAc,GAAI,OAAO,UAAU,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,4CAElE,CAAC;AAGF,QAAA,MAAM,aAAa,GAAI,OAAO,aAAa,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,4CAiBpE,CAAC;AAGF,QAAA,MAAM,WAAW,GACf,4EAQG,WAAW,EACd,KAAK,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,4CA6CzB,CAAC;AAGF,QAAA,MAAM,aAAa,GACjB,OAAO,aAAa,EACpB,KAAK,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,4CAGpC,CAAC;AA+BF,eAAO,MAAM,KAAK,WA3BT,UAAU,GAAG;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;CACpC,KACE,UAAU,CAAC,OAAO,cAAc,CAAC;sBAI7B,aAAa,GAAG;QACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACpC,KACE,UAAU,CAAC,OAAO,aAAa,CAAC;oBAI5B,WAAW,GAAG;QACnB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;KACpC,KACE,UAAU,CAAC,OAAO,WAAW,CAAC;sBAI1B,aAAa,GAAG;QACrB,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;KAC/C,KACE,UAAU,CAAC,OAAO,aAAa,CAAC;CAOnC,CAAC"}
@@ -1,71 +1,71 @@
1
1
  "use client";
2
- import { jsx as r } from "react/jsx-runtime";
2
+ import { jsx as e } from "react/jsx-runtime";
3
3
  import { MagnifyingGlassIcon as p, EyeIcon as x, EyeClosedIcon as C } from "@bioturing/assets";
4
- import { Input as n } from "antd";
5
- import { forwardRef as i, useCallback as d, useMemo as P } from "react";
4
+ import { Input as o } from "antd";
5
+ import { forwardRef as a, useCallback as d, useMemo as P } from "react";
6
6
  import './style.css';/* empty css */
7
7
  import { useCls as g } from "../utils/antdUtils.js";
8
- import { Spin as z } from "../spin/component.js";
9
- import { IconButton as M } from "../icon-button/component.js";
10
- const T = (t, s) => /* @__PURE__ */ r(n, { ref: s, ...t }), y = (t, s) => {
11
- const o = P(() => ({
12
- iconRender: (e) => /* @__PURE__ */ r(
13
- M,
8
+ import { Spin as h } from "../spin/component.js";
9
+ import { IconButton as z } from "../icon-button/component.js";
10
+ const M = (s, r) => /* @__PURE__ */ e(o, { ref: r, ...s }), T = (s, r) => {
11
+ const t = P(() => ({
12
+ iconRender: (n) => /* @__PURE__ */ e(
13
+ z,
14
14
  {
15
15
  size: "small",
16
- label: e ? "Hide password" : "Show password",
17
- children: e ? /* @__PURE__ */ r(x, {}) : /* @__PURE__ */ r(C, {})
16
+ label: n ? "Hide password" : "Show password",
17
+ children: n ? /* @__PURE__ */ e(x, {}) : /* @__PURE__ */ e(C, {})
18
18
  }
19
19
  ),
20
- ...t
21
- }), [t]);
22
- return /* @__PURE__ */ r(n.Password, { ref: s, ...o });
23
- }, A = ({
24
- enterButton: t = !1,
25
- onSearch: s,
26
- prefix: o,
27
- onPressEnter: e,
28
- onClear: a,
29
- loading: u,
30
- ...c
20
+ ...s
21
+ }), [s]);
22
+ return /* @__PURE__ */ e(o.Password, { ref: r, ...t });
23
+ }, y = ({
24
+ enterButton: s = !1,
25
+ onSearch: r,
26
+ prefix: t,
27
+ onPressEnter: n,
28
+ onClear: c,
29
+ loading: i,
30
+ ...u
31
31
  }, l) => {
32
32
  const I = g(), f = d(
33
33
  (m) => {
34
- s == null || s(m.currentTarget.value, m, { source: "input" });
34
+ r?.(m.currentTarget.value, m, { source: "input" });
35
35
  },
36
- [s]
36
+ [r]
37
37
  ), w = d(() => {
38
- s == null || s("", void 0, { source: "clear" });
39
- }, [s]);
40
- return t === !1 ? /* @__PURE__ */ r(
41
- n,
38
+ r?.("", void 0, { source: "clear" });
39
+ }, [r]);
40
+ return s === !1 ? /* @__PURE__ */ e(
41
+ o,
42
42
  {
43
43
  ref: l,
44
- prefix: o || (u ? /* @__PURE__ */ r(z, { size: 16 }) : /* @__PURE__ */ r(p, { size: 16, className: I("input-search-icon") })),
45
- onPressEnter: e || f,
46
- onClear: a || w,
44
+ prefix: t || (i ? /* @__PURE__ */ e(h, { size: 16 }) : /* @__PURE__ */ e(p, { size: 16, className: I("input-search-icon") })),
45
+ onPressEnter: n || f,
46
+ onClear: c || w,
47
47
  allowClear: !0,
48
- ...c
48
+ ...u
49
49
  }
50
- ) : /* @__PURE__ */ r(
51
- n.Search,
50
+ ) : /* @__PURE__ */ e(
51
+ o.Search,
52
52
  {
53
53
  ref: l,
54
- prefix: o,
55
- onPressEnter: e,
56
- onSearch: s,
57
- onClear: a,
58
- loading: u,
59
- enterButton: t === !0 ? /* @__PURE__ */ r(p, { size: 16 }) : t,
60
- ...c
54
+ prefix: t,
55
+ onPressEnter: n,
56
+ onSearch: r,
57
+ onClear: c,
58
+ loading: i,
59
+ enterButton: s === !0 ? /* @__PURE__ */ e(p, { size: 16 }) : s,
60
+ ...u
61
61
  }
62
62
  );
63
- }, E = (t, s) => /* @__PURE__ */ r(n.TextArea, { ref: s, ...t }), b = i(T), j = i(y), R = i(A), k = i(E), D = Object.assign(b, {
64
- Password: j,
65
- Search: R,
66
- TextArea: k
63
+ }, A = (s, r) => /* @__PURE__ */ e(o.TextArea, { ref: r, ...s }), E = a(M), b = a(T), j = a(y), R = a(A), v = Object.assign(E, {
64
+ Password: b,
65
+ Search: j,
66
+ TextArea: R
67
67
  });
68
68
  export {
69
- D as Input
69
+ v as Input
70
70
  };
71
71
  //# sourceMappingURL=component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/input/component.tsx"],"sourcesContent":["\"use client\";\nimport { EyeIcon, EyeClosedIcon, MagnifyingGlassIcon } from \"@bioturing/assets\";\nimport {\n Input as AntInput,\n type InputProps as AntInputProps,\n type InputRef,\n} from \"antd\";\nimport { type PasswordProps as AntPasswordProps } from \"antd/es/input\";\nimport { type SearchProps as AntSearchProps } from \"antd/es/input\";\nimport { type TextAreaProps as AntTextAreaProps } from \"antd/es/input\";\nimport { forwardRef, useCallback, useMemo } from \"react\";\nimport { useCls } from \"../utils\";\nimport { Spin } from \"../spin\";\n\nimport \"./style.css\";\nimport { IconButton } from \"../icon-button\";\n\n// Define props interfaces\nexport interface InputProps extends AntInputProps {}\nexport interface PasswordProps extends AntPasswordProps {}\nexport interface TextAreaProps extends AntTextAreaProps {}\nexport interface SearchProps extends AntSearchProps {}\n\n// Create inner function for main Input\nconst MainInputInner = (props: InputProps, ref: React.Ref<InputRef>) => {\n return <AntInput ref={ref} {...props} />;\n};\n\n// Create inner function for Password\nconst PasswordInner = (props: PasswordProps, ref: React.Ref<InputRef>) => {\n // Apply default iconRender unless overridden by props\n const mergedProps = useMemo(() => {\n return {\n iconRender: (visible: boolean) => (\n <IconButton\n size=\"small\"\n label={visible ? \"Hide password\" : \"Show password\"}\n >\n {visible ? <EyeIcon /> : <EyeClosedIcon />}\n </IconButton>\n ),\n ...props,\n };\n }, [props]);\n\n return <AntInput.Password ref={ref} {...mergedProps} />;\n};\n\n// Create inner function for Search\nconst SearchInner = (\n {\n enterButton = false,\n onSearch,\n prefix,\n onPressEnter,\n onClear,\n loading,\n ...rest\n }: SearchProps,\n ref: React.Ref<InputRef>\n) => {\n const cls = useCls();\n\n const handlePressEnter = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value, event, { source: \"input\" });\n },\n [onSearch]\n );\n\n const handleClear = useCallback(() => {\n onSearch?.(\"\", undefined, { source: \"clear\" });\n }, [onSearch]);\n\n return enterButton === false ? (\n <AntInput\n ref={ref}\n prefix={\n prefix ||\n (loading ? (\n <Spin size={16} />\n ) : (\n <MagnifyingGlassIcon size={16} className={cls(\"input-search-icon\")} />\n ))\n }\n onPressEnter={onPressEnter || handlePressEnter}\n onClear={onClear || handleClear}\n allowClear\n {...rest}\n />\n ) : (\n <AntInput.Search\n ref={ref}\n prefix={prefix}\n onPressEnter={onPressEnter}\n onSearch={onSearch}\n onClear={onClear}\n loading={loading}\n enterButton={\n enterButton === true ? <MagnifyingGlassIcon size={16} /> : enterButton\n }\n {...rest}\n />\n );\n};\n\n// Create inner function for TextArea\nconst TextAreaInner = (\n props: TextAreaProps,\n ref: React.Ref<HTMLTextAreaElement>\n) => {\n return <AntInput.TextArea ref={ref} {...props} />;\n};\n\n// Use forwardRef with type assertion for main Input\nconst MainInput = forwardRef(MainInputInner) as (\n props: InputProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof MainInputInner>;\n\n// Use forwardRef with type assertion for Password\nconst Password = forwardRef(PasswordInner) as (\n props: PasswordProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof PasswordInner>;\n\n// Use forwardRef with type assertion for Search\nconst Search = forwardRef(SearchInner) as (\n props: SearchProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof SearchInner>;\n\n// Use forwardRef with type assertion for TextArea\nconst TextArea = forwardRef(TextAreaInner) as (\n props: TextAreaProps & {\n ref?: React.ForwardedRef<HTMLTextAreaElement>;\n }\n) => ReturnType<typeof TextAreaInner>;\n\n// Export the final composed component\nexport const Input = Object.assign(MainInput, {\n Password,\n Search,\n TextArea,\n});\n"],"names":["MainInputInner","props","ref","jsx","AntInput","PasswordInner","mergedProps","useMemo","visible","IconButton","EyeIcon","EyeClosedIcon","SearchInner","enterButton","onSearch","prefix","onPressEnter","onClear","loading","rest","cls","useCls","handlePressEnter","useCallback","event","handleClear","Spin","MagnifyingGlassIcon","TextAreaInner","MainInput","forwardRef","Password","Search","TextArea","Input"],"mappings":";;;;;;;;;AAwBA,MAAMA,IAAiB,CAACC,GAAmB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YAAU;AAAA,MACT,GAAGN;AAAA,IAAA;AAAA,EAAA,IAGN,gBAAAhB;AAAA,IAACC,EAAS;AAAA,IAAT;AAAA,MACC,KAAAF;AAAA,MACA,QAAAa;AAAA,MACA,cAAAC;AAAA,MACA,UAAAF;AAAA,MACA,SAAAG;AAAA,MACA,SAAAC;AAAA,MACA,aACEL,MAAgB,uBAAQc,GAAoB,EAAA,MAAM,GAAI,CAAA,IAAKd;AAAA,MAE5D,GAAGM;AAAA,IAAA;AAAA,EACN;AAEJ,GAGMS,IAAgB,CACpB3B,GACAC,wBAEQE,EAAS,UAAT,EAAkB,KAAAF,GAAW,GAAGD,GAAO,GAI3C4B,IAAYC,EAAW9B,CAAc,GAOrC+B,IAAWD,EAAWzB,CAAa,GAOnC2B,IAASF,EAAWlB,CAAW,GAO/BqB,IAAWH,EAAWF,CAAa,GAO5BM,IAAQ,OAAO,OAAOL,GAAW;AAAA,EAC5C,UAAAE;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AACF,CAAC;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/input/component.tsx"],"sourcesContent":["\"use client\";\nimport { EyeIcon, EyeClosedIcon, MagnifyingGlassIcon } from \"@bioturing/assets\";\nimport {\n Input as AntInput,\n type InputProps as AntInputProps,\n type InputRef,\n} from \"antd\";\nimport { type PasswordProps as AntPasswordProps } from \"antd/es/input\";\nimport { type SearchProps as AntSearchProps } from \"antd/es/input\";\nimport { type TextAreaProps as AntTextAreaProps } from \"antd/es/input\";\nimport { forwardRef, useCallback, useMemo } from \"react\";\nimport { useCls } from \"../utils\";\nimport { Spin } from \"../spin\";\n\nimport \"./style.css\";\nimport { IconButton } from \"../icon-button\";\n\n// Define props interfaces\nexport interface InputProps extends AntInputProps {}\nexport interface PasswordProps extends AntPasswordProps {}\nexport interface TextAreaProps extends AntTextAreaProps {}\nexport interface SearchProps extends AntSearchProps {}\n\n// Create inner function for main Input\nconst MainInputInner = (props: InputProps, ref: React.Ref<InputRef>) => {\n return <AntInput ref={ref} {...props} />;\n};\n\n// Create inner function for Password\nconst PasswordInner = (props: PasswordProps, ref: React.Ref<InputRef>) => {\n // Apply default iconRender unless overridden by props\n const mergedProps = useMemo(() => {\n return {\n iconRender: (visible: boolean) => (\n <IconButton\n size=\"small\"\n label={visible ? \"Hide password\" : \"Show password\"}\n >\n {visible ? <EyeIcon /> : <EyeClosedIcon />}\n </IconButton>\n ),\n ...props,\n };\n }, [props]);\n\n return <AntInput.Password ref={ref} {...mergedProps} />;\n};\n\n// Create inner function for Search\nconst SearchInner = (\n {\n enterButton = false,\n onSearch,\n prefix,\n onPressEnter,\n onClear,\n loading,\n ...rest\n }: SearchProps,\n ref: React.Ref<InputRef>\n) => {\n const cls = useCls();\n\n const handlePressEnter = useCallback(\n (event: React.KeyboardEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value, event, { source: \"input\" });\n },\n [onSearch]\n );\n\n const handleClear = useCallback(() => {\n onSearch?.(\"\", undefined, { source: \"clear\" });\n }, [onSearch]);\n\n return enterButton === false ? (\n <AntInput\n ref={ref}\n prefix={\n prefix ||\n (loading ? (\n <Spin size={16} />\n ) : (\n <MagnifyingGlassIcon size={16} className={cls(\"input-search-icon\")} />\n ))\n }\n onPressEnter={onPressEnter || handlePressEnter}\n onClear={onClear || handleClear}\n allowClear\n {...rest}\n />\n ) : (\n <AntInput.Search\n ref={ref}\n prefix={prefix}\n onPressEnter={onPressEnter}\n onSearch={onSearch}\n onClear={onClear}\n loading={loading}\n enterButton={\n enterButton === true ? <MagnifyingGlassIcon size={16} /> : enterButton\n }\n {...rest}\n />\n );\n};\n\n// Create inner function for TextArea\nconst TextAreaInner = (\n props: TextAreaProps,\n ref: React.Ref<HTMLTextAreaElement>\n) => {\n return <AntInput.TextArea ref={ref} {...props} />;\n};\n\n// Use forwardRef with type assertion for main Input\nconst MainInput = forwardRef(MainInputInner) as (\n props: InputProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof MainInputInner>;\n\n// Use forwardRef with type assertion for Password\nconst Password = forwardRef(PasswordInner) as (\n props: PasswordProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof PasswordInner>;\n\n// Use forwardRef with type assertion for Search\nconst Search = forwardRef(SearchInner) as (\n props: SearchProps & {\n ref?: React.ForwardedRef<InputRef>;\n }\n) => ReturnType<typeof SearchInner>;\n\n// Use forwardRef with type assertion for TextArea\nconst TextArea = forwardRef(TextAreaInner) as (\n props: TextAreaProps & {\n ref?: React.ForwardedRef<HTMLTextAreaElement>;\n }\n) => ReturnType<typeof TextAreaInner>;\n\n// Export the final composed component\nexport const Input = Object.assign(MainInput, {\n Password,\n Search,\n TextArea,\n});\n"],"names":["MainInputInner","props","ref","jsx","AntInput","PasswordInner","mergedProps","useMemo","visible","IconButton","EyeIcon","EyeClosedIcon","SearchInner","enterButton","onSearch","prefix","onPressEnter","onClear","loading","rest","cls","useCls","handlePressEnter","useCallback","event","handleClear","Spin","MagnifyingGlassIcon","TextAreaInner","MainInput","forwardRef","Password","Search","TextArea","Input"],"mappings":";;;;;;;;;AAwBA,MAAMA,IAAiB,CAACC,GAAmBC,MAClC,gBAAAC,EAACC,GAAA,EAAS,KAAAF,GAAW,GAAGD,EAAA,CAAO,GAIlCI,IAAgB,CAACJ,GAAsBC,MAA6B;AAExE,QAAMI,IAAcC,EAAQ,OACnB;AAAA,IACL,YAAY,CAACC,MACX,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOD,IAAU,kBAAkB;AAAA,QAElC,UAAAA,IAAU,gBAAAL,EAACO,GAAA,CAAA,CAAQ,sBAAMC,GAAA,CAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,IAG5C,GAAGV;AAAA,EAAA,IAEJ,CAACA,CAAK,CAAC;AAEV,2BAAQG,EAAS,UAAT,EAAkB,KAAAF,GAAW,GAAGI,GAAa;AACvD,GAGMM,IAAc,CAClB;AAAA,EACE,a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WF,CAAa,GAO5BM,IAAQ,OAAO,OAAOL,GAAW;AAAA,EAC5C,UAAAE;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AACF,CAAC;"}
@@ -0,0 +1,2 @@
1
+ export * from './component';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/input/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ export interface KeyboardShortcutProps {
3
+ /** The keyboard shortcut keys to display (optional if using children) */
4
+ keys?: string[];
5
+ /** Custom className */
6
+ className?: string;
7
+ /** Custom style */
8
+ style?: React.CSSProperties;
9
+ /** Size variant */
10
+ size?: "small" | "medium" | "large";
11
+ /** Children to display as keyboard shortcuts */
12
+ children?: React.ReactNode;
13
+ }
14
+ export declare const KeyboardShortcut: React.FC<KeyboardShortcutProps>;
15
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/keyboard-shortcut/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,mBAAmB;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsF5D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../../../src/components/keyboard-shortcut/component.tsx"],"sourcesContent":["import React from \"react\";\nimport { useCls, clsx } from \"../utils\";\nimport \"./style.css\";\n\nexport interface KeyboardShortcutProps {\n /** The keyboard shortcut keys to display (optional if using children) */\n keys?: string[];\n /** Custom className */\n className?: string;\n /** Custom style */\n style?: React.CSSProperties;\n /** Size variant */\n size?: \"small\" | \"medium\" | \"large\";\n /** Children to display as keyboard shortcuts */\n children?: React.ReactNode;\n}\n\nexport const KeyboardShortcut: React.FC<KeyboardShortcutProps> = ({\n keys,\n className,\n style,\n size = \"medium\",\n children,\n}) => {\n const cls = useCls();\n\n const formatKey = (key: string): string => {\n // Common key mappings for better display\n const keyMap: Record<string, string> = {\n meta: \"⌘\",\n cmd: \"⌘\",\n command: \"⌘\",\n ctrl: \"Ctrl\",\n control: \"Ctrl\",\n shift: \"⇧\",\n alt: \"⌥\",\n option: \"⌥\",\n enter: \"↵\",\n return: \"↵\",\n space: \"Space\",\n tab: \"⇥\",\n escape: \"Esc\",\n esc: \"Esc\",\n delete: \"⌫\",\n backspace: \"⌫\",\n arrowup: \"↑\",\n arrowdown: \"↓\",\n arrowleft: \"←\",\n arrowright: \"→\",\n up: \"↑\",\n down: \"↓\",\n left: \"←\",\n right: \"→\",\n };\n\n const lowerKey = key.toLowerCase();\n return keyMap[lowerKey] || key.toUpperCase();\n };\n\n // If children are provided, use them directly\n if (children) {\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {children}\n </kbd>\n </span>\n );\n }\n\n // If no keys provided, return null\n if (!keys || keys.length === 0) {\n return null;\n }\n\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n {keys.map((key, index) => (\n <React.Fragment key={index}>\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {formatKey(key)}\n </kbd>\n {index < keys.length - 1 && (\n <span className={cls(\"keyboard-shortcut-separator\")}>+</span>\n )}\n </React.Fragment>\n ))}\n </span>\n );\n};"],"names":["KeyboardShortcut","keys","className","style","size","children","cls","useCls","formatKey","key","keyMap","lowerKey","jsx","clsx","index","jsxs","React"],"mappings":";;;;;AAiBO,MAAMA,IAAoD,CAAC;AAAA,EAChE,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAMC,EAAO,GAEbC,IAAY,CAACC,MAAwB;AAEzC,UAAMC,IAAiC;AAAA,MACrC,MAAM;AAAA,MACN,KAAK;AAAA,MACL,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,MACP,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT,GAEMC,IAAWF,EAAI,YAAY;AACjC,WAAOC,EAAOC,CAAQ,KAAKF,EAAI,YAAY;AAAA,EAC7C;AAGA,SAAIJ,IAEA,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTP,EAAI,mBAAmB;AAAA,QACvBA,EAAI,qBAAqBF,CAAI,EAAE;AAAA,QAC/BF;AAAA,MACF;AAAA,MACA,OAAAC;AAAA,MAEA,4BAAC,OAAI,EAAA,WAAWG,EAAI,uBAAuB,GACxC,UAAAD,EACH,CAAA;AAAA,IAAA;AAAA,EACF,IAKA,CAACJ,KAAQA,EAAK,WAAW,IACpB,OAIP,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTP,EAAI,mBAAmB;AAAA,QACvBA,EAAI,qBAAqBF,CAAI,EAAE;AAAA,QAC/BF;AAAA,MACF;AAAA,MACA,OAAAC;AAAA,MAEC,UAAAF,EAAK,IAAI,CAACQ,GAAKK,MACb,gBAAAC,EAAAC,EAAM,UAAN,EACC,UAAA;AAAA,QAAA,gBAAAJ,EAAC,SAAI,WAAWN,EAAI,uBAAuB,GACxC,UAAAE,EAAUC,CAAG,GAChB;AAAA,QACCK,IAAQb,EAAK,SAAS,KACrB,gBAAAW,EAAC,UAAK,WAAWN,EAAI,6BAA6B,GAAG,UAAC,IAAA,CAAA;AAAA,MAAA,EAAA,GALrCQ,CAOrB,CACD;AAAA,IAAA;AAAA,EACH;AAEJ;"}
1
+ {"version":3,"file":"component.js","sources":["../../../src/components/keyboard-shortcut/component.tsx"],"sourcesContent":["import React from \"react\";\nimport { useCls, clsx } from \"../utils\";\nimport \"./style.css\";\n\nexport interface KeyboardShortcutProps {\n /** The keyboard shortcut keys to display (optional if using children) */\n keys?: string[];\n /** Custom className */\n className?: string;\n /** Custom style */\n style?: React.CSSProperties;\n /** Size variant */\n size?: \"small\" | \"medium\" | \"large\";\n /** Children to display as keyboard shortcuts */\n children?: React.ReactNode;\n}\n\nexport const KeyboardShortcut: React.FC<KeyboardShortcutProps> = ({\n keys,\n className,\n style,\n size = \"medium\",\n children,\n}) => {\n const cls = useCls();\n\n const formatKey = (key: string): string => {\n // Common key mappings for better display\n const keyMap: Record<string, string> = {\n meta: \"⌘\",\n cmd: \"⌘\",\n command: \"⌘\",\n ctrl: \"Ctrl\",\n control: \"Ctrl\",\n shift: \"⇧\",\n alt: \"⌥\",\n option: \"⌥\",\n enter: \"↵\",\n return: \"↵\",\n space: \"Space\",\n tab: \"⇥\",\n escape: \"Esc\",\n esc: \"Esc\",\n delete: \"⌫\",\n backspace: \"⌫\",\n arrowup: \"↑\",\n arrowdown: \"↓\",\n arrowleft: \"←\",\n arrowright: \"→\",\n up: \"↑\",\n down: \"↓\",\n left: \"←\",\n right: \"→\",\n };\n\n const lowerKey = key.toLowerCase();\n return keyMap[lowerKey] || key.toUpperCase();\n };\n\n // If children are provided, use them directly\n if (children) {\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {children}\n </kbd>\n </span>\n );\n }\n\n // If no keys provided, return null\n if (!keys || keys.length === 0) {\n return null;\n }\n\n return (\n <span\n className={clsx(\n cls(\"keyboard-shortcut\"),\n cls(`keyboard-shortcut-${size}`),\n className\n )}\n style={style}\n >\n {keys.map((key, index) => (\n <React.Fragment key={index}>\n <kbd className={cls(\"keyboard-shortcut-key\")}>\n {formatKey(key)}\n </kbd>\n {index < keys.length - 1 && (\n <span className={cls(\"keyboard-shortcut-separator\")}>+</span>\n )}\n </React.Fragment>\n ))}\n </span>\n );\n};"],"names":["KeyboardShortcut","keys","className","style","size","children","cls","useCls","formatKey","key","keyMap","lowerKey","jsx","clsx","index","jsxs","React"],"mappings":";;;;;AAiBO,MAAMA,IAAoD,CAAC;AAAA,EAChE,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAMC,EAAA,GAENC,IAAY,CAACC,MAAwB;AAEzC,UAAMC,IAAiC;AAAA,MACrC,MAAM;AAAA,MACN,KAAK;AAAA,MACL,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,MACP,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,KAAK;AAAA,MACL,QAAQ;AAAA,MAC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