@bioturing/components 0.31.0 → 0.32.1

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 (507) hide show
  1. package/dist/components/badge/component.d.ts +7 -0
  2. package/dist/components/badge/component.d.ts.map +1 -0
  3. package/dist/components/badge/component.js.map +1 -1
  4. package/dist/components/badge/index.d.ts +2 -0
  5. package/dist/components/badge/index.d.ts.map +1 -0
  6. package/dist/components/breadcrumb/component.d.ts +6 -0
  7. package/dist/components/breadcrumb/component.d.ts.map +1 -0
  8. package/dist/components/breadcrumb/component.js.map +1 -1
  9. package/dist/components/breadcrumb/index.d.ts +3 -0
  10. package/dist/components/breadcrumb/index.d.ts.map +1 -0
  11. package/dist/components/breadcrumb/types.d.ts +19 -0
  12. package/dist/components/breadcrumb/types.d.ts.map +1 -0
  13. package/dist/components/breadcrumb/useItemRender.d.ts +7 -0
  14. package/dist/components/breadcrumb/useItemRender.d.ts.map +1 -0
  15. package/dist/components/breadcrumb/useItemRender.js.map +1 -1
  16. package/dist/components/button/component.d.ts +14 -0
  17. package/dist/components/button/component.d.ts.map +1 -0
  18. package/dist/components/button/component.js.map +1 -1
  19. package/dist/components/button/index.d.ts +2 -0
  20. package/dist/components/button/index.d.ts.map +1 -0
  21. package/dist/components/checkbox/component.d.ts +16 -0
  22. package/dist/components/checkbox/component.d.ts.map +1 -0
  23. package/dist/components/checkbox/component.js.map +1 -1
  24. package/dist/components/checkbox/index.d.ts +2 -0
  25. package/dist/components/checkbox/index.d.ts.map +1 -0
  26. package/dist/components/choice-list/component.d.ts +35 -0
  27. package/dist/components/choice-list/component.d.ts.map +1 -0
  28. package/dist/components/choice-list/component.js.map +1 -1
  29. package/dist/components/choice-list/index.d.ts +2 -0
  30. package/dist/components/choice-list/index.d.ts.map +1 -0
  31. package/dist/components/cmdk/command-score.d.ts +2 -0
  32. package/dist/components/cmdk/command-score.d.ts.map +1 -0
  33. package/dist/components/cmdk/command-score.js.map +1 -1
  34. package/dist/components/cmdk/index.d.ts +440 -0
  35. package/dist/components/cmdk/index.d.ts.map +1 -0
  36. package/dist/components/cmdk/index.js +332 -348
  37. package/dist/components/cmdk/index.js.map +1 -1
  38. package/dist/components/code-block/component.d.ts +3 -0
  39. package/dist/components/code-block/component.d.ts.map +1 -0
  40. package/dist/components/code-block/component.js +83 -84
  41. package/dist/components/code-block/component.js.map +1 -1
  42. package/dist/components/code-block/index.d.ts +3 -0
  43. package/dist/components/code-block/index.d.ts.map +1 -0
  44. package/dist/components/code-block/types.d.ts +64 -0
  45. package/dist/components/code-block/types.d.ts.map +1 -0
  46. package/dist/components/collapse/component.d.ts +14 -0
  47. package/dist/components/collapse/component.d.ts.map +1 -0
  48. package/dist/components/collapse/component.js.map +1 -1
  49. package/dist/components/collapse/index.d.ts +2 -0
  50. package/dist/components/collapse/index.d.ts.map +1 -0
  51. package/dist/components/color-select/component.d.ts +36 -0
  52. package/dist/components/color-select/component.d.ts.map +1 -0
  53. package/dist/components/color-select/component.js +28 -30
  54. package/dist/components/color-select/component.js.map +1 -1
  55. package/dist/components/color-select/index.d.ts +2 -0
  56. package/dist/components/color-select/index.d.ts.map +1 -0
  57. package/dist/components/combobox/component.d.ts +119 -0
  58. package/dist/components/combobox/component.d.ts.map +1 -0
  59. package/dist/components/combobox/component.js +166 -162
  60. package/dist/components/combobox/component.js.map +1 -1
  61. package/dist/components/combobox/index.d.ts +3 -0
  62. package/dist/components/combobox/index.d.ts.map +1 -0
  63. package/dist/components/command-palette/component.d.ts +41 -0
  64. package/dist/components/command-palette/component.d.ts.map +1 -0
  65. package/dist/components/command-palette/component.js +36 -36
  66. package/dist/components/command-palette/component.js.map +1 -1
  67. package/dist/components/command-palette/index.d.ts +2 -0
  68. package/dist/components/command-palette/index.d.ts.map +1 -0
  69. package/dist/components/command-palette/style.css +1 -1
  70. package/dist/components/drag-drop/context.d.ts +10 -0
  71. package/dist/components/drag-drop/context.d.ts.map +1 -0
  72. package/dist/components/drag-drop/context.js.map +1 -1
  73. package/dist/components/drag-drop/draggable.d.ts +6 -0
  74. package/dist/components/drag-drop/draggable.d.ts.map +1 -0
  75. package/dist/components/drag-drop/draggable.js.map +1 -1
  76. package/dist/components/drag-drop/droppable.d.ts +9 -0
  77. package/dist/components/drag-drop/droppable.d.ts.map +1 -0
  78. package/dist/components/drag-drop/droppable.js.map +1 -1
  79. package/dist/components/drag-drop/hooks.d.ts +42 -0
  80. package/dist/components/drag-drop/hooks.d.ts.map +1 -0
  81. package/dist/components/drag-drop/hooks.js +71 -73
  82. package/dist/components/drag-drop/hooks.js.map +1 -1
  83. package/dist/components/drag-drop/index.d.ts +26 -0
  84. package/dist/components/drag-drop/index.d.ts.map +1 -0
  85. package/dist/components/drag-drop/index.js.map +1 -1
  86. package/dist/components/drag-drop/types.d.ts +232 -0
  87. package/dist/components/drag-drop/types.d.ts.map +1 -0
  88. package/dist/components/drag-drop/value.d.ts +8 -0
  89. package/dist/components/drag-drop/value.d.ts.map +1 -0
  90. package/dist/components/drag-drop/value.js +66 -66
  91. package/dist/components/drag-drop/value.js.map +1 -1
  92. package/dist/components/dropdown-menu/component.d.ts +79 -0
  93. package/dist/components/dropdown-menu/component.d.ts.map +1 -0
  94. package/dist/components/dropdown-menu/component.js +108 -106
  95. package/dist/components/dropdown-menu/component.js.map +1 -1
  96. package/dist/components/dropdown-menu/divider.d.ts +6 -0
  97. package/dist/components/dropdown-menu/divider.d.ts.map +1 -0
  98. package/dist/components/dropdown-menu/divider.js.map +1 -1
  99. package/dist/components/dropdown-menu/index.d.ts +4 -0
  100. package/dist/components/dropdown-menu/index.d.ts.map +1 -0
  101. package/dist/components/dropdown-menu/item.d.ts +56 -0
  102. package/dist/components/dropdown-menu/item.d.ts.map +1 -0
  103. package/dist/components/dropdown-menu/item.js +72 -66
  104. package/dist/components/dropdown-menu/item.js.map +1 -1
  105. package/dist/components/dropdown-menu/types.d.ts +88 -0
  106. package/dist/components/dropdown-menu/types.d.ts.map +1 -0
  107. package/dist/components/dropdown-menu/useDropdownMenu.d.ts +58 -0
  108. package/dist/components/dropdown-menu/useDropdownMenu.d.ts.map +1 -0
  109. package/dist/components/dropdown-menu/useDropdownMenu.js +80 -77
  110. package/dist/components/dropdown-menu/useDropdownMenu.js.map +1 -1
  111. package/dist/components/ds-root/component.d.ts +14 -0
  112. package/dist/components/ds-root/component.d.ts.map +1 -0
  113. package/dist/components/ds-root/component.js.map +1 -1
  114. package/dist/components/ds-root/context.d.ts +8 -0
  115. package/dist/components/ds-root/context.d.ts.map +1 -0
  116. package/dist/components/ds-root/index.d.ts +3 -0
  117. package/dist/components/ds-root/index.d.ts.map +1 -0
  118. package/dist/components/empty/component.d.ts +13 -0
  119. package/dist/components/empty/component.d.ts.map +1 -0
  120. package/dist/components/empty/component.js.map +1 -1
  121. package/dist/components/empty/index.d.ts +2 -0
  122. package/dist/components/empty/index.d.ts.map +1 -0
  123. package/dist/components/field/component.d.ts +42 -0
  124. package/dist/components/field/component.d.ts.map +1 -0
  125. package/dist/components/field/component.js.map +1 -1
  126. package/dist/components/field/index.d.ts +2 -0
  127. package/dist/components/field/index.d.ts.map +1 -0
  128. package/dist/components/form/component.d.ts +22 -0
  129. package/dist/components/form/component.d.ts.map +1 -0
  130. package/dist/components/form/component.js.map +1 -1
  131. package/dist/components/form/index.d.ts +2 -0
  132. package/dist/components/form/index.d.ts.map +1 -0
  133. package/dist/components/form/item.d.ts +24 -0
  134. package/dist/components/form/item.d.ts.map +1 -0
  135. package/dist/components/form/item.js +24 -24
  136. package/dist/components/form/item.js.map +1 -1
  137. package/dist/components/form/label.d.ts +32 -0
  138. package/dist/components/form/label.d.ts.map +1 -0
  139. package/dist/components/form/label.js.map +1 -1
  140. package/dist/components/hooks/antd.d.ts +11 -0
  141. package/dist/components/hooks/antd.d.ts.map +1 -0
  142. package/dist/components/hooks/antd.js.map +1 -1
  143. package/dist/components/hooks/base-ui.d.ts +11 -0
  144. package/dist/components/hooks/base-ui.d.ts.map +1 -0
  145. package/dist/components/hooks/base-ui.js +22 -25
  146. package/dist/components/hooks/base-ui.js.map +1 -1
  147. package/dist/components/hooks/index.d.ts +11 -0
  148. package/dist/components/hooks/index.d.ts.map +1 -0
  149. package/dist/components/hooks/useBreakpoint.d.ts +39 -0
  150. package/dist/components/hooks/useBreakpoint.d.ts.map +1 -0
  151. package/dist/components/hooks/useBreakpoint.js +14 -15
  152. package/dist/components/hooks/useBreakpoint.js.map +1 -1
  153. package/dist/components/hooks/useCSSVariables.d.ts +7 -0
  154. package/dist/components/hooks/useCSSVariables.d.ts.map +1 -0
  155. package/dist/components/hooks/useCSSVariables.js.map +1 -1
  156. package/dist/components/hooks/useCharts.d.ts +41 -0
  157. package/dist/components/hooks/useCharts.d.ts.map +1 -0
  158. package/dist/components/hooks/useCharts.js.map +1 -1
  159. package/dist/components/hooks/useControlledState.d.ts +13 -0
  160. package/dist/components/hooks/useControlledState.d.ts.map +1 -0
  161. package/dist/components/hooks/useControlledState.js.map +1 -1
  162. package/dist/components/hooks/useDraggable.d.ts +4 -0
  163. package/dist/components/hooks/useDraggable.d.ts.map +1 -0
  164. package/dist/components/hooks/useDraggable.js +19 -20
  165. package/dist/components/hooks/useDraggable.js.map +1 -1
  166. package/dist/components/hooks/useHover.d.ts +5 -0
  167. package/dist/components/hooks/useHover.d.ts.map +1 -0
  168. package/dist/components/hooks/useHover.js +16 -17
  169. package/dist/components/hooks/useHover.js.map +1 -1
  170. package/dist/components/hooks/useResizeObserver.d.ts +9 -0
  171. package/dist/components/hooks/useResizeObserver.d.ts.map +1 -0
  172. package/dist/components/hooks/useResizeObserver.js +29 -30
  173. package/dist/components/hooks/useResizeObserver.js.map +1 -1
  174. package/dist/components/hooks/useTransitionStatus.d.ts +13 -0
  175. package/dist/components/hooks/useTransitionStatus.d.ts.map +1 -0
  176. package/dist/components/hooks/useTransitionStatus.js.map +1 -1
  177. package/dist/components/hooks/useWindowSize.d.ts +5 -0
  178. package/dist/components/hooks/useWindowSize.d.ts.map +1 -0
  179. package/dist/components/hooks/useWindowSize.js.map +1 -1
  180. package/dist/components/icon-button/component.d.ts +45 -0
  181. package/dist/components/icon-button/component.d.ts.map +1 -0
  182. package/dist/components/icon-button/component.js.map +1 -1
  183. package/dist/components/icon-button/index.d.ts +2 -0
  184. package/dist/components/icon-button/index.d.ts.map +1 -0
  185. package/dist/components/index.d.ts +53 -0
  186. package/dist/components/index.d.ts.map +1 -0
  187. package/dist/components/input/component.d.ts +29 -0
  188. package/dist/components/input/component.d.ts.map +1 -0
  189. package/dist/components/input/component.js +42 -41
  190. package/dist/components/input/component.js.map +1 -1
  191. package/dist/components/input/index.d.ts +2 -0
  192. package/dist/components/input/index.d.ts.map +1 -0
  193. package/dist/components/keyboard-shortcut/component.d.ts +15 -0
  194. package/dist/components/keyboard-shortcut/component.d.ts.map +1 -0
  195. package/dist/components/keyboard-shortcut/component.js.map +1 -1
  196. package/dist/components/keyboard-shortcut/index.d.ts +2 -0
  197. package/dist/components/keyboard-shortcut/index.d.ts.map +1 -0
  198. package/dist/components/loader/component.d.ts +5 -0
  199. package/dist/components/loader/component.d.ts.map +1 -0
  200. package/dist/components/loader/component.js.map +1 -1
  201. package/dist/components/loader/index.d.ts +2 -0
  202. package/dist/components/loader/index.d.ts.map +1 -0
  203. package/dist/components/modal/Modal.d.ts +85 -0
  204. package/dist/components/modal/Modal.d.ts.map +1 -0
  205. package/dist/components/modal/Modal.js +75 -75
  206. package/dist/components/modal/Modal.js.map +1 -1
  207. package/dist/components/modal/ModalProvider.d.ts +6 -0
  208. package/dist/components/modal/ModalProvider.d.ts.map +1 -0
  209. package/dist/components/modal/ModalProvider.js +25 -25
  210. package/dist/components/modal/ModalProvider.js.map +1 -1
  211. package/dist/components/modal/ModalService.d.ts +34 -0
  212. package/dist/components/modal/ModalService.d.ts.map +1 -0
  213. package/dist/components/modal/ModalService.js +5 -10
  214. package/dist/components/modal/ModalService.js.map +1 -1
  215. package/dist/components/modal/constants.d.ts +10 -0
  216. package/dist/components/modal/constants.d.ts.map +1 -0
  217. package/dist/components/modal/constants.js.map +1 -1
  218. package/dist/components/modal/functions.d.ts +28 -0
  219. package/dist/components/modal/functions.d.ts.map +1 -0
  220. package/dist/components/modal/functions.js.map +1 -1
  221. package/dist/components/modal/index.d.ts +16 -0
  222. package/dist/components/modal/index.d.ts.map +1 -0
  223. package/dist/components/modal/index.js.map +1 -1
  224. package/dist/components/nav/context.d.ts +10 -0
  225. package/dist/components/nav/context.d.ts.map +1 -0
  226. package/dist/components/nav/context.js.map +1 -1
  227. package/dist/components/nav/group.d.ts +15 -0
  228. package/dist/components/nav/group.d.ts.map +1 -0
  229. package/dist/components/nav/group.js.map +1 -1
  230. package/dist/components/nav/heading.d.ts +6 -0
  231. package/dist/components/nav/heading.d.ts.map +1 -0
  232. package/dist/components/nav/heading.js.map +1 -1
  233. package/dist/components/nav/index.d.ts +12 -0
  234. package/dist/components/nav/index.d.ts.map +1 -0
  235. package/dist/components/nav/item.d.ts +35 -0
  236. package/dist/components/nav/item.d.ts.map +1 -0
  237. package/dist/components/nav/item.js.map +1 -1
  238. package/dist/components/popover/component.d.ts +10 -0
  239. package/dist/components/popover/component.d.ts.map +1 -0
  240. package/dist/components/popover/component.js.map +1 -1
  241. package/dist/components/popover/index.d.ts +2 -0
  242. package/dist/components/popover/index.d.ts.map +1 -0
  243. package/dist/components/popup-panel/component.d.ts +100 -0
  244. package/dist/components/popup-panel/component.d.ts.map +1 -0
  245. package/dist/components/popup-panel/component.js +105 -105
  246. package/dist/components/popup-panel/component.js.map +1 -1
  247. package/dist/components/popup-panel/constants.d.ts +8 -0
  248. package/dist/components/popup-panel/constants.d.ts.map +1 -0
  249. package/dist/components/popup-panel/constants.js.map +1 -1
  250. package/dist/components/popup-panel/index.d.ts +2 -0
  251. package/dist/components/popup-panel/index.d.ts.map +1 -0
  252. package/dist/components/radio/component.d.ts +8 -0
  253. package/dist/components/radio/component.d.ts.map +1 -0
  254. package/dist/components/radio/component.js.map +1 -1
  255. package/dist/components/radio/index.d.ts +3 -0
  256. package/dist/components/radio/index.d.ts.map +1 -0
  257. package/dist/components/radio/interface.d.ts +6 -0
  258. package/dist/components/radio/interface.d.ts.map +1 -0
  259. package/dist/components/resizable/component.d.ts +70 -0
  260. package/dist/components/resizable/component.d.ts.map +1 -0
  261. package/dist/components/resizable/component.js +147 -147
  262. package/dist/components/resizable/component.js.map +1 -1
  263. package/dist/components/resizable/index.d.ts +3 -0
  264. package/dist/components/resizable/index.d.ts.map +1 -0
  265. package/dist/components/scroll-area/component.d.ts +67 -0
  266. package/dist/components/scroll-area/component.d.ts.map +1 -0
  267. package/dist/components/scroll-area/component.js +75 -56
  268. package/dist/components/scroll-area/component.js.map +1 -1
  269. package/dist/components/scroll-area/index.d.ts +2 -0
  270. package/dist/components/scroll-area/index.d.ts.map +1 -0
  271. package/dist/components/segmented/component.d.ts +10 -0
  272. package/dist/components/segmented/component.d.ts.map +1 -0
  273. package/dist/components/segmented/component.js.map +1 -1
  274. package/dist/components/segmented/index.d.ts +2 -0
  275. package/dist/components/segmented/index.d.ts.map +1 -0
  276. package/dist/components/select/component.d.ts +48 -0
  277. package/dist/components/select/component.d.ts.map +1 -0
  278. package/dist/components/select/component.js +93 -94
  279. package/dist/components/select/component.js.map +1 -1
  280. package/dist/components/select/index.d.ts +2 -0
  281. package/dist/components/select/index.d.ts.map +1 -0
  282. package/dist/components/select/item.d.ts +14 -0
  283. package/dist/components/select/item.d.ts.map +1 -0
  284. package/dist/components/select/item.js.map +1 -1
  285. package/dist/components/select-trigger/component.d.ts +45 -0
  286. package/dist/components/select-trigger/component.d.ts.map +1 -0
  287. package/dist/components/select-trigger/component.js +96 -96
  288. package/dist/components/select-trigger/component.js.map +1 -1
  289. package/dist/components/select-trigger/index.d.ts +3 -0
  290. package/dist/components/select-trigger/index.d.ts.map +1 -0
  291. package/dist/components/slider/component.d.ts +6 -0
  292. package/dist/components/slider/component.d.ts.map +1 -0
  293. package/dist/components/slider/component.js.map +1 -1
  294. package/dist/components/slider/index.d.ts +2 -0
  295. package/dist/components/slider/index.d.ts.map +1 -0
  296. package/dist/components/spin/component.d.ts +6 -0
  297. package/dist/components/spin/component.d.ts.map +1 -0
  298. package/dist/components/spin/component.js.map +1 -1
  299. package/dist/components/spin/index.d.ts +2 -0
  300. package/dist/components/spin/index.d.ts.map +1 -0
  301. package/dist/components/splitter/component.d.ts +10 -0
  302. package/dist/components/splitter/component.d.ts.map +1 -0
  303. package/dist/components/splitter/component.js +7 -7
  304. package/dist/components/splitter/component.js.map +1 -1
  305. package/dist/components/splitter/context.d.ts +5 -0
  306. package/dist/components/splitter/context.d.ts.map +1 -0
  307. package/dist/components/splitter/context.js.map +1 -1
  308. package/dist/components/splitter/index.d.ts +2 -0
  309. package/dist/components/splitter/index.d.ts.map +1 -0
  310. package/dist/components/splitter/splitter-panel.d.ts +12 -0
  311. package/dist/components/splitter/splitter-panel.d.ts.map +1 -0
  312. package/dist/components/splitter/splitter-panel.js.map +1 -1
  313. package/dist/components/splitter/splitter.d.ts +11 -0
  314. package/dist/components/splitter/splitter.d.ts.map +1 -0
  315. package/dist/components/splitter/splitter.js +112 -112
  316. package/dist/components/splitter/splitter.js.map +1 -1
  317. package/dist/components/splitter/useSizes.d.ts +9 -0
  318. package/dist/components/splitter/useSizes.d.ts.map +1 -0
  319. package/dist/components/splitter/useSizes.js +35 -35
  320. package/dist/components/splitter/useSizes.js.map +1 -1
  321. package/dist/components/stack/Stack.d.ts +40 -0
  322. package/dist/components/stack/Stack.d.ts.map +1 -0
  323. package/dist/components/stack/Stack.js.map +1 -1
  324. package/dist/components/stack/StackChild.d.ts +31 -0
  325. package/dist/components/stack/StackChild.d.ts.map +1 -0
  326. package/dist/components/stack/StackChild.js.map +1 -1
  327. package/dist/components/stack/index.d.ts +8 -0
  328. package/dist/components/stack/index.d.ts.map +1 -0
  329. package/dist/components/stack/index.js.map +1 -1
  330. package/dist/components/status-icon/component.d.ts +23 -0
  331. package/dist/components/status-icon/component.d.ts.map +1 -0
  332. package/dist/components/status-icon/component.js.map +1 -1
  333. package/dist/components/status-icon/index.d.ts +2 -0
  334. package/dist/components/status-icon/index.d.ts.map +1 -0
  335. package/dist/components/switch/component.d.ts +9 -0
  336. package/dist/components/switch/component.d.ts.map +1 -0
  337. package/dist/components/switch/component.js.map +1 -1
  338. package/dist/components/switch/index.d.ts +2 -0
  339. package/dist/components/switch/index.d.ts.map +1 -0
  340. package/dist/components/table/component.d.ts +32 -0
  341. package/dist/components/table/component.d.ts.map +1 -0
  342. package/dist/components/table/component.js +57 -58
  343. package/dist/components/table/component.js.map +1 -1
  344. package/dist/components/table/index.d.ts +2 -0
  345. package/dist/components/table/index.d.ts.map +1 -0
  346. package/dist/components/tag/component.d.ts +22 -0
  347. package/dist/components/tag/component.d.ts.map +1 -0
  348. package/dist/components/tag/component.js.map +1 -1
  349. package/dist/components/tag/index.d.ts +2 -0
  350. package/dist/components/tag/index.d.ts.map +1 -0
  351. package/dist/components/theme-provider/component.d.ts +7 -0
  352. package/dist/components/theme-provider/component.d.ts.map +1 -0
  353. package/dist/components/theme-provider/component.js.map +1 -1
  354. package/dist/components/theme-provider/index.d.ts +2 -0
  355. package/dist/components/theme-provider/index.d.ts.map +1 -0
  356. package/dist/components/toast/component.d.ts +15 -0
  357. package/dist/components/toast/component.d.ts.map +1 -0
  358. package/dist/components/toast/component.js +49 -50
  359. package/dist/components/toast/component.js.map +1 -1
  360. package/dist/components/toast/function.d.ts +11 -0
  361. package/dist/components/toast/function.d.ts.map +1 -0
  362. package/dist/components/toast/function.js.map +1 -1
  363. package/dist/components/toast/index.d.ts +4 -0
  364. package/dist/components/toast/index.d.ts.map +1 -0
  365. package/dist/components/toast/types.d.ts +4 -0
  366. package/dist/components/toast/types.d.ts.map +1 -0
  367. package/dist/components/tooltip/component.d.ts +10 -0
  368. package/dist/components/tooltip/component.d.ts.map +1 -0
  369. package/dist/components/tooltip/component.js.map +1 -1
  370. package/dist/components/tooltip/index.d.ts +2 -0
  371. package/dist/components/tooltip/index.d.ts.map +1 -0
  372. package/dist/components/tour/component.d.ts +8 -0
  373. package/dist/components/tour/component.d.ts.map +1 -0
  374. package/dist/components/tour/component.js.map +1 -1
  375. package/dist/components/tour/index.d.ts +2 -0
  376. package/dist/components/tour/index.d.ts.map +1 -0
  377. package/dist/components/transition/component.d.ts +30 -0
  378. package/dist/components/transition/component.d.ts.map +1 -0
  379. package/dist/components/transition/component.js +32 -32
  380. package/dist/components/transition/component.js.map +1 -1
  381. package/dist/components/transition/index.d.ts +2 -0
  382. package/dist/components/transition/index.d.ts.map +1 -0
  383. package/dist/components/tree/components.d.ts +14 -0
  384. package/dist/components/tree/components.d.ts.map +1 -0
  385. package/dist/components/tree/components.js.map +1 -1
  386. package/dist/components/tree/helpers.d.ts +6 -0
  387. package/dist/components/tree/helpers.d.ts.map +1 -0
  388. package/dist/components/tree/helpers.js.map +1 -1
  389. package/dist/components/tree/index.d.ts +5 -0
  390. package/dist/components/tree/index.d.ts.map +1 -0
  391. package/dist/components/tree/types.d.ts +56 -0
  392. package/dist/components/tree/types.d.ts.map +1 -0
  393. package/dist/components/tree/useTreeCommon.d.ts +179 -0
  394. package/dist/components/tree/useTreeCommon.d.ts.map +1 -0
  395. package/dist/components/tree/useTreeCommon.js +29 -29
  396. package/dist/components/tree/useTreeCommon.js.map +1 -1
  397. package/dist/components/tree/useUniqueKeysTree.d.ts +34 -0
  398. package/dist/components/tree/useUniqueKeysTree.d.ts.map +1 -0
  399. package/dist/components/tree/useUniqueKeysTree.js.map +1 -1
  400. package/dist/components/truncate/component.d.ts +17 -0
  401. package/dist/components/truncate/component.d.ts.map +1 -0
  402. package/dist/components/truncate/component.js +38 -39
  403. package/dist/components/truncate/component.js.map +1 -1
  404. package/dist/components/truncate/helpers.d.ts +17 -0
  405. package/dist/components/truncate/helpers.d.ts.map +1 -0
  406. package/dist/components/truncate/helpers.js +27 -30
  407. package/dist/components/truncate/helpers.js.map +1 -1
  408. package/dist/components/truncate/index.d.ts +2 -0
  409. package/dist/components/truncate/index.d.ts.map +1 -0
  410. package/dist/components/upload/component.d.ts +17 -0
  411. package/dist/components/upload/component.d.ts.map +1 -0
  412. package/dist/components/upload/component.js.map +1 -1
  413. package/dist/components/upload/dragger.d.ts +14 -0
  414. package/dist/components/upload/dragger.d.ts.map +1 -0
  415. package/dist/components/upload/dragger.js.map +1 -1
  416. package/dist/components/upload/hooks.d.ts +6 -0
  417. package/dist/components/upload/hooks.d.ts.map +1 -0
  418. package/dist/components/upload/hooks.js.map +1 -1
  419. package/dist/components/upload/index.d.ts +4 -0
  420. package/dist/components/upload/index.d.ts.map +1 -0
  421. package/dist/components/upload/item.d.ts +12 -0
  422. package/dist/components/upload/item.d.ts.map +1 -0
  423. package/dist/components/upload/item.js.map +1 -1
  424. package/dist/components/upload/utils.d.ts +2 -0
  425. package/dist/components/upload/utils.d.ts.map +1 -0
  426. package/dist/components/upload/utils.js.map +1 -1
  427. package/dist/components/utils/WithAntdTokens.d.ts +8 -0
  428. package/dist/components/utils/WithAntdTokens.d.ts.map +1 -0
  429. package/dist/components/utils/WithAntdTokens.js.map +1 -1
  430. package/dist/components/utils/WithRenderProp.d.ts +14 -0
  431. package/dist/components/utils/WithRenderProp.d.ts.map +1 -0
  432. package/dist/components/utils/WithRenderProp.js.map +1 -1
  433. package/dist/components/utils/antdUtils.d.ts +11 -0
  434. package/dist/components/utils/antdUtils.d.ts.map +1 -0
  435. package/dist/components/utils/antdUtils.js +9 -12
  436. package/dist/components/utils/antdUtils.js.map +1 -1
  437. package/dist/components/utils/client.d.ts +6 -0
  438. package/dist/components/utils/client.d.ts.map +1 -0
  439. package/dist/components/utils/cn.d.ts +5 -0
  440. package/dist/components/utils/cn.d.ts.map +1 -0
  441. package/dist/components/utils/cn.js.map +1 -1
  442. package/dist/components/utils/colors.d.ts +2 -0
  443. package/dist/components/utils/colors.d.ts.map +1 -0
  444. package/dist/components/utils/constants.d.ts +15 -0
  445. package/dist/components/utils/constants.d.ts.map +1 -0
  446. package/dist/components/utils/index.d.ts +6 -0
  447. package/dist/components/utils/index.d.ts.map +1 -0
  448. package/dist/components/utils/isTracebackError.d.ts +2 -0
  449. package/dist/components/utils/isTracebackError.d.ts.map +1 -0
  450. package/dist/components/utils/isTracebackError.js.map +1 -1
  451. package/dist/components/utils/main.d.ts +7 -0
  452. package/dist/components/utils/main.d.ts.map +1 -0
  453. package/dist/components/utils/placement.d.ts +21 -0
  454. package/dist/components/utils/placement.d.ts.map +1 -0
  455. package/dist/components/utils/placement.js.map +1 -1
  456. package/dist/components/utils/reactElement.d.ts +2 -0
  457. package/dist/components/utils/reactElement.d.ts.map +1 -0
  458. package/dist/components/utils/reactToString.d.ts +3 -0
  459. package/dist/components/utils/reactToString.d.ts.map +1 -0
  460. package/dist/components/utils/reactToString.js.map +1 -1
  461. package/dist/components/utils/selectionRange.d.ts +2 -0
  462. package/dist/components/utils/selectionRange.d.ts.map +1 -0
  463. package/dist/components/utils/selectionRange.js.map +1 -1
  464. package/dist/components/utils/theme.d.ts +6 -0
  465. package/dist/components/utils/theme.d.ts.map +1 -0
  466. package/dist/components/utils/theme.js.map +1 -1
  467. package/dist/components/utils/types.d.ts +12 -0
  468. package/dist/components/utils/types.d.ts.map +1 -0
  469. package/dist/components/vertical-collapsible-panel/component.d.ts +65 -0
  470. package/dist/components/vertical-collapsible-panel/component.d.ts.map +1 -0
  471. package/dist/components/vertical-collapsible-panel/component.js.map +1 -1
  472. package/dist/components/vertical-collapsible-panel/index.d.ts +2 -0
  473. package/dist/components/vertical-collapsible-panel/index.d.ts.map +1 -0
  474. package/dist/index.d.ts +4 -4390
  475. package/dist/index.d.ts.map +1 -0
  476. package/dist/index.js +166 -164
  477. package/dist/index.js.map +1 -1
  478. package/dist/metadata.d.ts +446 -0
  479. package/dist/metadata.d.ts.map +1 -0
  480. package/dist/metadata.js.map +1 -1
  481. package/dist/tokens/and-theme/index.d.ts +2 -0
  482. package/dist/tokens/and-theme/index.d.ts.map +1 -0
  483. package/dist/tokens/and-theme/tokens.d.ts +6 -0
  484. package/dist/tokens/and-theme/tokens.d.ts.map +1 -0
  485. package/dist/tokens/and-theme/tokens.js.map +1 -1
  486. package/dist/tokens/charts/index.d.ts +5 -0
  487. package/dist/tokens/charts/index.d.ts.map +1 -0
  488. package/dist/tokens/charts/palettes/cloudscape.d.ts +460 -0
  489. package/dist/tokens/charts/palettes/cloudscape.d.ts.map +1 -0
  490. package/dist/tokens/charts/palettes/cloudscape.js.map +1 -1
  491. package/dist/tokens/charts/palettes/colorbrewer.d.ts +338 -0
  492. package/dist/tokens/charts/palettes/colorbrewer.d.ts.map +1 -0
  493. package/dist/tokens/charts/palettes/colorbrewer.js.map +1 -1
  494. package/dist/tokens/charts/palettes/index.d.ts +24 -0
  495. package/dist/tokens/charts/palettes/index.d.ts.map +1 -0
  496. package/dist/tokens/charts/palettes/index.js.map +1 -1
  497. package/dist/tokens/charts/palettes/tableau.d.ts +11 -0
  498. package/dist/tokens/charts/palettes/tableau.d.ts.map +1 -0
  499. package/dist/tokens/index.d.ts +5 -0
  500. package/dist/tokens/index.d.ts.map +1 -0
  501. package/dist/tokens/types.d.ts +10 -0
  502. package/dist/tokens/types.d.ts.map +1 -0
  503. package/dist/tokens/utils.d.ts +9 -0
  504. package/dist/tokens/utils.d.ts.map +1 -0
  505. package/dist/tokens/utils.js.map +1 -1
  506. package/package.json +2 -2
  507. package/dist/tailwind.d.ts +0 -1
@@ -0,0 +1,26 @@
1
+ import { DragEndEvent, DragStartEvent, Data as DragData, DragDropDraggableProps, DragDropDroppableProps, DragDropProps } from './types';
2
+ /**
3
+ * The root component for the drag and drop functionality
4
+ */
5
+ export declare function DragDropRoot<T extends DragData = DragData>({ children, onDragEnd: _onDragEnd, onDragStart: _onDragStart, onDrop: _onDrop, className, }: DragDropProps<T>): import("react/jsx-runtime").JSX.Element;
6
+ /**
7
+ * Drag component with subcomponents
8
+ */
9
+ export declare const DragDrop: typeof DragDropRoot & {
10
+ /**
11
+ * Item that can be dragged
12
+ */
13
+ Draggable: <T extends DragData = unknown>({ id, children, className, disabled, data, style, render, onDragEnd, onDragStart, indicator, onlyIndicatorDraggable, ...rest }: DragDropDraggableProps<T>) => null;
14
+ /**
15
+ * Zone where items can be dropped
16
+ */
17
+ Droppable: <T extends DragData = unknown, M extends boolean = false>({ id, children, className, disabled, placeholder, icon, render, onDrop, validate, multiple, value, onChange, maxItems, renderValueLabel, renderValueIcon, ...rest }: DragDropDroppableProps<T, M>) => null;
18
+ /**
19
+ * Value component to display the value of the dragged item
20
+ */
21
+ Value: <T extends DragData, M extends boolean>(props: import('./types').DragDropValueProps<T, M> & {
22
+ ref?: import('react').ForwardedRef<HTMLDivElement>;
23
+ }) => ReturnType<(<T_1 extends DragData, M_1 extends boolean>({ value, onChange, multiple, renderValueLabel, renderValueIcon, className, style, maxItems, ...rest }: import('./types').DragDropValueProps<T_1, M_1>, ref: import('react').ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element)>;
24
+ };
25
+ export type { DragEndEvent, DragStartEvent, DragDropDraggableProps, DragDropDroppableProps, DragData, DragDropProps, };
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drag-drop/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,IAAI,IAAI,QAAQ,EAErB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EACnB,MAAM,SAAS,CAAC;AASjB,OAAO,aAAa,CAAC;AAErB;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAAE,EAC1D,QAAQ,EAER,SAAS,EAAE,UAAU,EACrB,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,OAAO,EACf,SAAS,GACV,EAAE,aAAa,CAAC,CAAC,CAAC,2CA6BlB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;IACnB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;WAY+rD,CAAC;;CAVnsD,CAAC;AAEH,YAAY,EACV,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,QAAQ,EACR,aAAa,GACd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/drag-drop/index.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type DragEndEvent,\n type DragStartEvent,\n type Data as DragData,\n type UniqueIdentifier,\n type DragDropDraggableProps,\n type DragDropDroppableProps,\n type DragDropProps,\n} from \"./types\";\nimport { useState } from \"react\";\nimport { clsx, useCls } from \"../utils\";\nimport { Draggable } from \"./draggable\";\nimport { Droppable } from \"./droppable\";\nimport { Value } from \"./value\";\nimport { DragDropContext } from \"./context\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n/**\n * The root component for the drag and drop functionality\n */\nexport function DragDropRoot<T extends DragData = DragData>({\n children,\n // These callbacks are passed to child components via context\n onDragEnd: _onDragEnd,\n onDragStart: _onDragStart,\n onDrop: _onDrop,\n className,\n}: DragDropProps<T>) {\n const cls = useCls();\n const [active, setActive] = useState<{\n data: T;\n id: UniqueIdentifier;\n } | null>(null);\n\n const [isDragging, setIsDragging] = useState(false);\n\n // These functions are now handled directly in the Item and DropZone components\n\n // Create context value for child components\n const contextValue = {\n active,\n setActive: (item: { data: unknown; id: UniqueIdentifier } | null) => {\n setActive(item as { data: T; id: UniqueIdentifier } | null);\n },\n isDragging,\n setIsDragging,\n onDragStart: _onDragStart,\n onDragEnd: _onDragEnd,\n onDrop: _onDrop,\n };\n\n return (\n <DragDropContext.Provider value={contextValue}>\n <div className={clsx(cls(\"drag-container\"), className)}>{children}</div>\n </DragDropContext.Provider>\n );\n}\n\n/**\n * Drag component with subcomponents\n */\nexport const DragDrop = Object.assign(DragDropRoot, {\n /**\n * Item that can be dragged\n */\n Draggable,\n\n /**\n * Zone where items can be dropped\n */\n Droppable,\n\n /**\n * Value component to display the value of the dragged item\n */\n Value,\n});\n\nexport type {\n DragEndEvent,\n DragStartEvent,\n DragDropDraggableProps,\n DragDropDroppableProps,\n DragData,\n DragDropProps,\n};\n"],"names":["DragDropRoot","children","_onDragEnd","_onDragStart","_onDrop","className","cls","useCls","active","setActive","useState","isDragging","setIsDragging","contextValue","item","DragDropContext","jsx","clsx","DragDrop","Draggable","Droppable","Value"],"mappings":";;;;;;;;;;AAwBO,SAASA,EAA4C;AAAA,EAC1D,UAAAC;AAAA;AAAA,EAEA,WAAWC;AAAA,EACX,aAAaC;AAAA,EACb,QAAQC;AAAA,EACR,WAAAC;AACF,GAAqB;AACnB,QAAMC,IAAMC,EAAO,GACb,CAACC,GAAQC,CAAS,IAAIC,EAGlB,IAAI,GAER,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAK5CG,IAAe;AAAA,IACnB,QAAAL;AAAA,IACA,WAAW,CAACM,MAAyD;AACnE,MAAAL,EAAUK,CAAgD;AAAA,IAC5D;AAAA,IACA,YAAAH;AAAA,IACA,eAAAC;AAAA,IACA,aAAaT;AAAA,IACb,WAAWD;AAAA,IACX,QAAQE;AAAA,EACV;AAEA,2BACGW,EAAgB,UAAhB,EAAyB,OAAOF,GAC/B,UAAC,gBAAAG,EAAA,OAAA,EAAI,WAAWC,EAAKX,EAAI,gBAAgB,GAAGD,CAAS,GAAI,UAAAJ,EAAS,CAAA,GACpE;AAEJ;AAKa,MAAAiB,IAAW,OAAO,OAAOlB,GAAc;AAAA;AAAA;AAAA;AAAA,EAIlD,WAAAmB;AAAA;AAAA;AAAA;AAAA,EAKA,WAAAC;AAAA;AAAA;AAAA;AAAA,EAKA,OAAAC;AACF,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/drag-drop/index.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type DragEndEvent,\n type DragStartEvent,\n type Data as DragData,\n type UniqueIdentifier,\n type DragDropDraggableProps,\n type DragDropDroppableProps,\n type DragDropProps,\n} from \"./types\";\nimport { useState } from \"react\";\nimport { clsx, useCls } from \"../utils\";\nimport { Draggable } from \"./draggable\";\nimport { Droppable } from \"./droppable\";\nimport { Value } from \"./value\";\nimport { DragDropContext } from \"./context\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n/**\n * The root component for the drag and drop functionality\n */\nexport function DragDropRoot<T extends DragData = DragData>({\n children,\n // These callbacks are passed to child components via context\n onDragEnd: _onDragEnd,\n onDragStart: _onDragStart,\n onDrop: _onDrop,\n className,\n}: DragDropProps<T>) {\n const cls = useCls();\n const [active, setActive] = useState<{\n data: T;\n id: UniqueIdentifier;\n } | null>(null);\n\n const [isDragging, setIsDragging] = useState(false);\n\n // These functions are now handled directly in the Item and DropZone components\n\n // Create context value for child components\n const contextValue = {\n active,\n setActive: (item: { data: unknown; id: UniqueIdentifier } | null) => {\n setActive(item as { data: T; id: UniqueIdentifier } | null);\n },\n isDragging,\n setIsDragging,\n onDragStart: _onDragStart,\n onDragEnd: _onDragEnd,\n onDrop: _onDrop,\n };\n\n return (\n <DragDropContext.Provider value={contextValue}>\n <div className={clsx(cls(\"drag-container\"), className)}>{children}</div>\n </DragDropContext.Provider>\n );\n}\n\n/**\n * Drag component with subcomponents\n */\nexport const DragDrop = Object.assign(DragDropRoot, {\n /**\n * Item that can be dragged\n */\n Draggable,\n\n /**\n * Zone where items can be dropped\n */\n Droppable,\n\n /**\n * Value component to display the value of the dragged item\n */\n Value,\n});\n\nexport type {\n DragEndEvent,\n DragStartEvent,\n DragDropDraggableProps,\n DragDropDroppableProps,\n DragData,\n DragDropProps,\n};\n"],"names":["DragDropRoot","children","_onDragEnd","_onDragStart","_onDrop","className","cls","useCls","active","setActive","useState","isDragging","setIsDragging","contextValue","item","DragDropContext","jsx","clsx","DragDrop","Draggable","Droppable","Value"],"mappings":";;;;;;;;;;AAwBO,SAASA,EAA4C;AAAA,EAC1D,UAAAC;AAAA;AAAA,EAEA,WAAWC;AAAA,EACX,aAAaC;AAAA,EACb,QAAQC;AAAA,EACR,WAAAC;AACF,GAAqB;AACnB,QAAMC,IAAMC,EAAA,GACN,CAACC,GAAQC,CAAS,IAAIC,EAGlB,IAAI,GAER,CAACC,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAK5CG,IAAe;AAAA,IACnB,QAAAL;AAAA,IACA,WAAW,CAACM,MAAyD;AACnE,MAAAL,EAAUK,CAAgD;AAAA,IAC5D;AAAA,IACA,YAAAH;AAAA,IACA,eAAAC;AAAA,IACA,aAAaT;AAAA,IACb,WAAWD;AAAA,IACX,QAAQE;AAAA,EAAA;AAGV,2BACGW,EAAgB,UAAhB,EAAyB,OAAOF,GAC/B,UAAA,gBAAAG,EAAC,OAAA,EAAI,WAAWC,EAAKX,EAAI,gBAAgB,GAAGD,CAAS,GAAI,UAAAJ,GAAS,GACpE;AAEJ;AAKO,MAAMiB,IAAW,OAAO,OAAOlB,GAAc;AAAA;AAAA;AAAA;AAAA,EAIlD,WAAAmB;AAAA;AAAA;AAAA;AAAA,EAKA,WAAAC;AAAA;AAAA;AAAA;AAAA,EAKA,OAAAC;AACF,CAAC;"}
@@ -0,0 +1,232 @@
1
+ import { HTMLAttributes, ReactElement, ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ import { useRender } from '@base-ui-components/react/use-render';
3
+ /**
4
+ * Base data type for drag and drop operations
5
+ */
6
+ export type UniqueIdentifier = string | number;
7
+ export type Data = unknown;
8
+ export type DraggableInfo<T extends Data = Data> = {
9
+ id: UniqueIdentifier;
10
+ data: T;
11
+ };
12
+ /**
13
+ * Event types for drag and drop operations
14
+ */
15
+ export interface DragStartEvent<T extends Data = Data> {
16
+ active: {
17
+ id: UniqueIdentifier;
18
+ data: T;
19
+ };
20
+ }
21
+ export interface DragEndEvent<T extends Data = Data> {
22
+ active: {
23
+ id: UniqueIdentifier;
24
+ data: T;
25
+ };
26
+ over: {
27
+ id: UniqueIdentifier;
28
+ } | null;
29
+ }
30
+ /**
31
+ * Props for useDraggable hook
32
+ */
33
+ export interface UseDraggableProps<T extends Data = Data> {
34
+ id: UniqueIdentifier;
35
+ data?: T;
36
+ disabled?: boolean;
37
+ onDragStart?: (event: DragStartEvent<T>) => void;
38
+ onDragEnd?: (event: DragEndEvent<T>) => void;
39
+ }
40
+ /**
41
+ * Props for useDroppable hook
42
+ */
43
+ export interface UseDroppableProps<T extends Data = Data> {
44
+ id: UniqueIdentifier;
45
+ disabled?: boolean;
46
+ onDrop?: (item: DraggableInfo<T>) => void;
47
+ validate?: (item: DraggableInfo<T>) => boolean;
48
+ }
49
+ /**
50
+ * Function to render the item
51
+ */
52
+ export type ItemRenderFn<T extends Data = Data> = (state: {
53
+ data: T;
54
+ id: UniqueIdentifier;
55
+ }, props: HTMLAttributes<HTMLElement>) => ReactElement;
56
+ /**
57
+ * Context for the Drag component to share state between components
58
+ */
59
+ export interface DragDropContextType<T extends Data = Data> {
60
+ /**
61
+ * The currently active (dragging) info
62
+ */
63
+ active: DraggableInfo<T> | null;
64
+ /**
65
+ * Set the currently active info
66
+ */
67
+ setActive: (id: DraggableInfo<T> | null) => void;
68
+ /**
69
+ * Whether an item is being dragged
70
+ */
71
+ isDragging: boolean;
72
+ /**
73
+ * Set whether an item is being dragged
74
+ */
75
+ setIsDragging: (dragging: boolean) => void;
76
+ /**
77
+ * Callback fired when a drag operation starts
78
+ */
79
+ onDragStart?: (event: DragStartEvent<T>) => void;
80
+ /**
81
+ * Callback fired when a drag operation ends
82
+ */
83
+ onDragEnd?: (event: DragEndEvent<T>) => void;
84
+ /**
85
+ * Callback fired when an item is dropped on this zone
86
+ */
87
+ onDrop?: (item: DraggableInfo<T>) => void;
88
+ }
89
+ /**
90
+ * Props for the draggable item component
91
+ */
92
+ export interface DragDropDraggableProps<T extends Data = Data> extends Omit<React.ComponentPropsWithoutRef<"div">, "id" | "onDragEnd" | "onDragStart"> {
93
+ /**
94
+ * Unique identifier for the draggable item
95
+ */
96
+ id: UniqueIdentifier;
97
+ /**
98
+ * Whether the item is disabled from being dragged
99
+ * @default false
100
+ */
101
+ disabled?: boolean;
102
+ /**
103
+ * Data to be passed to the drag event
104
+ */
105
+ data?: T;
106
+ /**
107
+ * Function to render the item
108
+ */
109
+ render?: useRender.RenderProp<DraggableInfo<T> & {
110
+ isDragging: boolean;
111
+ }>;
112
+ /**
113
+ * Callback fired when the drag operation ends
114
+ */
115
+ onDragEnd?: (event: DragEndEvent<T>) => void;
116
+ /**
117
+ * Callback fired when the drag operation starts
118
+ */
119
+ onDragStart?: (event: DragStartEvent<T>) => void;
120
+ /**
121
+ * Indicator to display if item is draggable
122
+ * @default false
123
+ */
124
+ indicator?: ReactNode | boolean;
125
+ /**
126
+ * Whether if only indicator is draggable
127
+ * @default false
128
+ */
129
+ onlyIndicatorDraggable?: boolean;
130
+ }
131
+ export type DragDropDropableRenderFnProps<T extends Data = Data, M extends boolean = false> = {
132
+ isOver: boolean;
133
+ id: UniqueIdentifier;
134
+ value: M extends true ? T[] : T;
135
+ onChange: (value: M extends true ? T[] : T) => void;
136
+ };
137
+ /**
138
+ * Props for the DropZone component
139
+ */
140
+ export interface DragDropDroppableProps<T extends Data = Data, M extends boolean = false> extends Omit<React.ComponentPropsWithoutRef<"div">, "id" | "onDragEnter" | "onDragOver" | "onDragLeave" | "onDrop" | "onChange">, Omit<DragDropValueProps<T, M>, "id"> {
141
+ /**
142
+ * Unique identifier for the droppable area
143
+ */
144
+ id: UniqueIdentifier;
145
+ /**
146
+ * Whether the drop zone is disabled
147
+ * @default false
148
+ */
149
+ disabled?: boolean;
150
+ /**
151
+ * Text to display when no children are provided
152
+ * @default "Drop items here"
153
+ */
154
+ placeholder?: ReactNode;
155
+ /**
156
+ * Icon to display when no children are provided
157
+ */
158
+ icon?: ReactNode;
159
+ /**
160
+ * Custom render function
161
+ */
162
+ render?: useRender.RenderProp<DragDropDropableRenderFnProps<T, M>>;
163
+ /**
164
+ * Callback fired when an item is dropped on this zone
165
+ */
166
+ onDrop?: (item: {
167
+ id: UniqueIdentifier;
168
+ data: T;
169
+ }) => void;
170
+ /**
171
+ * Validate if the item can be dropped
172
+ */
173
+ validate?: (item: DraggableInfo<T>) => boolean;
174
+ }
175
+ /**
176
+ * Props for the Drag component
177
+ */
178
+ export interface DragDropProps<T extends Data = Data> {
179
+ /**
180
+ * Children of the component
181
+ */
182
+ children: ReactNode;
183
+ /**
184
+ * Callback fired when a drag operation ends
185
+ */
186
+ onDragEnd?: (event: DragEndEvent<T>) => void;
187
+ /**
188
+ * Callback fired when a drag operation starts
189
+ */
190
+ onDragStart?: (event: DragStartEvent<T>) => void;
191
+ /**
192
+ * Callback fired when an item is dropped on this zone
193
+ */
194
+ onDrop?: (item: DraggableInfo<T>) => void;
195
+ /**
196
+ * Additional class name
197
+ */
198
+ className?: string;
199
+ /**
200
+ * Whether to cancel drops on containers that don't handle the dropped item type
201
+ * @default true
202
+ */
203
+ cancelDrop?: boolean;
204
+ }
205
+ export interface DragDropValueProps<T extends Data = Data, M extends boolean = false> extends Omit<ComponentPropsWithoutRef<"div">, "onDragEnter" | "onDragOver" | "onDragLeave" | "onDrop" | "onChange"> {
206
+ /**
207
+ * Whether to allow multiple values
208
+ * @default false
209
+ */
210
+ multiple?: M;
211
+ /**
212
+ * The current value(s) of the drop zone
213
+ */
214
+ value?: M extends true ? T[] : T;
215
+ /**
216
+ * Callback fired when the value changes
217
+ */
218
+ onChange?: M extends true ? (value: T[]) => void : (value: T) => void;
219
+ /**
220
+ * Function to render the label for a single value
221
+ */
222
+ renderValueLabel?: (singleValue: T) => ReactElement | string;
223
+ /**
224
+ * Function to render the icon for a single value
225
+ */
226
+ renderValueIcon?: (singleValue: T) => ReactElement;
227
+ /**
228
+ * Maximum number of items that can be dropped
229
+ */
230
+ maxItems?: number;
231
+ }
232
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/drag-drop/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EAEZ,SAAS,EACT,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,wBAAwB,CAAC,KAAK,CAAC,EAC/B,aAAa,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CACrE;IACD;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IACtE;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,YAAY,GAAG,MAAM,CAAC;IAC7D;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,YAAY,CAAC;IACnD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,8 @@
1
+ import { ForwardedRef } from 'react';
2
+ import { DragDropValueProps, Data } from './types';
3
+ declare function ValueInner<T extends Data, M extends boolean>({ value, onChange, multiple, renderValueLabel, renderValueIcon, className, style, maxItems, ...rest }: DragDropValueProps<T, M>, ref: ForwardedRef<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
4
+ export declare const Value: <T extends Data, M extends boolean>(props: DragDropValueProps<T, M> & {
5
+ ref?: ForwardedRef<HTMLDivElement>;
6
+ }) => ReturnType<typeof ValueInner>;
7
+ export {};
8
+ //# sourceMappingURL=value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../src/components/drag-drop/value.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,kBAAkB,EAAE,KAAK,IAAI,EAAE,MAAM,SAAS,CAAC;AAGxD,iBAAS,UAAU,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,SAAS,OAAO,EACnD,EACE,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC3B,GAAG,EAAE,YAAY,CAAC,cAAc,CAAC,2CAwHlC;AAED,eAAO,MAAM,KAAK,EAAmC,CACnD,CAAC,SAAS,IAAI,EACd,CAAC,SAAS,OAAO,EAEjB,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;CAAE,KACrE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -1,78 +1,78 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as T, Fragment as R } from "react/jsx-runtime";
3
- import { FileIcon as h, XIcon as q } from "@bioturing/assets";
4
- import { isEqual as x } from "es-toolkit";
5
- import { memo as y, forwardRef as B, useState as X, useCallback as t, cloneElement as v } from "react";
6
- import { Stack as A } from "../stack/index.js";
7
- import D from "merge-refs";
8
- import { Tag as G } from "../tag/component.js";
9
- import { useCls as H } from "../utils/antdUtils.js";
10
- import { Truncate as J } from "../truncate/component.js";
11
- import { IconButton as K } from "../icon-button/component.js";
12
- function L({
2
+ import { jsx as o, jsxs as I, Fragment as h } from "react/jsx-runtime";
3
+ import { FileIcon as M, XIcon as T } from "@bioturing/assets";
4
+ import { isEqual as q } from "es-toolkit";
5
+ import { memo as x, forwardRef as y, useState as B, useCallback as n, cloneElement as C } from "react";
6
+ import { Stack as X } from "../stack/index.js";
7
+ import v from "merge-refs";
8
+ import { Tag as A } from "../tag/component.js";
9
+ import { useCls as D } from "../utils/antdUtils.js";
10
+ import { Truncate as G } from "../truncate/component.js";
11
+ import { IconButton as H } from "../icon-button/component.js";
12
+ function J({
13
13
  value: s,
14
- onChange: n,
15
- multiple: l,
14
+ onChange: c,
15
+ multiple: t,
16
16
  renderValueLabel: d,
17
17
  renderValueIcon: f,
18
- className: E,
19
- style: N,
18
+ className: R,
19
+ style: E,
20
20
  maxItems: m,
21
- ...S
22
- }, k) {
23
- const c = H(), [u, j] = X(null), w = t((r) => {
24
- j(r);
25
- }, []), i = t(
26
- (r) => {
27
- const e = d(r);
28
- return typeof e == "string" ? /* @__PURE__ */ o(
29
- J,
21
+ ...N
22
+ }, S) {
23
+ const l = D(), [u, k] = B(null), g = n((e) => {
24
+ k(e);
25
+ }, []), i = n(
26
+ (e) => {
27
+ const r = d(e);
28
+ return typeof r == "string" ? /* @__PURE__ */ o(
29
+ G,
30
30
  {
31
31
  position: "middle",
32
- className: c("dropzone-value-label"),
32
+ className: l("dropzone-value-label"),
33
33
  container: u,
34
- children: e
34
+ children: r
35
35
  }
36
- ) : /* @__PURE__ */ o("span", { className: c("dropzone-value-label"), children: e });
36
+ ) : /* @__PURE__ */ o("span", { className: l("dropzone-value-label"), children: r });
37
37
  },
38
- [c, u, d]
39
- ), a = t(
40
- (r) => v(f(r) || /* @__PURE__ */ o(h, {}), {
41
- className: c("dropzone-value-icon")
38
+ [l, u, d]
39
+ ), a = n(
40
+ (e) => C(f(e) || /* @__PURE__ */ o(M, {}), {
41
+ className: l("dropzone-value-icon")
42
42
  }),
43
- [c, f]
44
- ), b = t(
45
- (r) => {
46
- n(
47
- s.filter((e) => !x(e, r))
43
+ [l, f]
44
+ ), b = n(
45
+ (e) => {
46
+ c(
47
+ s.filter((r) => !q(r, e))
48
48
  );
49
49
  },
50
- [n, s]
51
- ), z = t(() => {
52
- l ? n([]) : n == null || n(null);
53
- }, [n, l]), p = t(
54
- (r) => {
55
- const e = i(r);
56
- return /* @__PURE__ */ T(R, { children: [
57
- a(r),
58
- e,
59
- /* @__PURE__ */ o(K, { size: "small", onClick: z, children: /* @__PURE__ */ o(q, {}) })
50
+ [c, s]
51
+ ), z = n(() => {
52
+ t ? c([]) : c?.(null);
53
+ }, [c, t]), p = n(
54
+ (e) => {
55
+ const r = i(e);
56
+ return /* @__PURE__ */ I(h, { children: [
57
+ a(e),
58
+ r,
59
+ /* @__PURE__ */ o(H, { size: "small", onClick: z, children: /* @__PURE__ */ o(T, {}) })
60
60
  ] });
61
61
  },
62
62
  [i, a, z]
63
- ), F = t(
64
- (r) => m == 1 ? p(r[0]) : /* @__PURE__ */ o(R, { children: (r || []).map((e, I) => {
65
- const M = i(e);
63
+ ), j = n(
64
+ (e) => m == 1 ? p(e[0]) : /* @__PURE__ */ o(h, { children: (e || []).map((r, w) => {
65
+ const F = i(r);
66
66
  return /* @__PURE__ */ o(
67
- G,
67
+ A,
68
68
  {
69
- icon: a(e),
69
+ icon: a(r),
70
70
  size: "large",
71
71
  closable: !0,
72
- onClose: () => b(e),
73
- children: M
72
+ onClose: () => b(r),
73
+ children: F
74
74
  },
75
- I
75
+ w
76
76
  );
77
77
  }) }),
78
78
  [
@@ -84,25 +84,25 @@ function L({
84
84
  ]
85
85
  );
86
86
  return /* @__PURE__ */ o(
87
- A,
87
+ X,
88
88
  {
89
- ref: D(k, w),
90
- gap: l ? 4 : 8,
89
+ ref: v(S, g),
90
+ gap: t ? 4 : 8,
91
91
  align: "center",
92
- wrap: l && m !== 1,
93
- className: c(
92
+ wrap: t && m !== 1,
93
+ className: l(
94
94
  "dropzone-value",
95
- l && "dropzone-value-multiple",
96
- E
95
+ t && "dropzone-value-multiple",
96
+ R
97
97
  ),
98
- style: N,
99
- ...S,
100
- children: l ? F(s) : p(s)
98
+ style: E,
99
+ ...N,
100
+ children: t ? j(s) : p(s)
101
101
  }
102
102
  );
103
103
  }
104
- const g = y(B(L));
104
+ const $ = x(y(J));
105
105
  export {
106
- g as Value
106
+ $ as Value
107
107
  };
108
108
  //# sourceMappingURL=value.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"value.js","sources":["../../../src/components/drag-drop/value.tsx"],"sourcesContent":["\"use client\";\nimport { FileIcon, XIcon } from \"@bioturing/assets\";\nimport { isEqual } from \"es-toolkit\";\nimport {\n cloneElement,\n forwardRef,\n memo,\n useCallback,\n type ForwardedRef,\n useState,\n} from \"react\";\nimport { IconButton } from \"../icon-button\";\nimport { Stack } from \"../stack\";\nimport { Tag } from \"../tag\";\nimport { Truncate } from \"../truncate\";\nimport { useCls } from \"../utils\";\nimport { DragDropValueProps, type Data } from \"./types\";\nimport mergeRefs from \"merge-refs\";\n\nfunction ValueInner<T extends Data, M extends boolean>(\n {\n value,\n onChange,\n multiple,\n renderValueLabel,\n renderValueIcon,\n className,\n style,\n maxItems,\n ...rest\n }: DragDropValueProps<T, M>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n const cls = useCls();\n\n // todo: make this as reusable hook\n const [containerEl, setContainerEl] = useState<HTMLDivElement>(null);\n const containerRef = useCallback((el: HTMLDivElement | null) => {\n setContainerEl(el);\n }, []);\n\n const renderLabel = useCallback(\n (value: T) => {\n const label = renderValueLabel(value);\n return typeof label === \"string\" ? (\n <Truncate\n position=\"middle\"\n className={cls(\"dropzone-value-label\")}\n container={containerEl}\n >\n {label}\n </Truncate>\n ) : (\n <span className={cls(\"dropzone-value-label\")}>{label}</span>\n );\n },\n [cls, containerEl, renderValueLabel]\n );\n\n const renderedValueIcon = useCallback(\n (value: T) => {\n return cloneElement(renderValueIcon(value) || <FileIcon />, {\n className: cls(\"dropzone-value-icon\"),\n });\n },\n [cls, renderValueIcon]\n );\n\n const handleResetMultiple = useCallback(\n (singleValue: T) => {\n (onChange as (value: T[]) => void)(\n (value as T[]).filter((v) => !isEqual(v, singleValue))\n );\n },\n [onChange, value]\n );\n\n const handleResetSingle = useCallback(() => {\n if (multiple) {\n (onChange as (value: T[]) => void)([] as T[]);\n } else {\n onChange?.(null);\n }\n }, [onChange, multiple]);\n\n const renderSingle = useCallback(\n (value: T) => {\n const label = renderLabel(value as T);\n return (\n <>\n {renderedValueIcon(value as T)}\n {label}\n <IconButton size=\"small\" onClick={handleResetSingle}>\n <XIcon />\n </IconButton>\n </>\n );\n },\n [renderLabel, renderedValueIcon, handleResetSingle]\n );\n\n const renderMultiple = useCallback(\n (value: T[]) => {\n if (maxItems == 1) {\n return renderSingle(value[0]);\n }\n return (\n <>\n {((value as T[]) || []).map((singleValue, index) => {\n const label = renderLabel(singleValue);\n return (\n <Tag\n key={index}\n icon={renderedValueIcon(singleValue)}\n size=\"large\"\n closable\n onClose={() => handleResetMultiple(singleValue)}\n >\n {label}\n </Tag>\n );\n })}\n </>\n );\n },\n [\n renderLabel,\n renderedValueIcon,\n maxItems,\n renderSingle,\n handleResetMultiple,\n ]\n );\n\n return (\n <Stack\n ref={mergeRefs(ref, containerRef)}\n gap={multiple ? 4 : 8}\n align=\"center\"\n wrap={multiple && maxItems !== 1}\n className={cls(\n \"dropzone-value\",\n multiple && \"dropzone-value-multiple\",\n className\n )}\n style={style}\n {...rest}\n >\n {multiple ? renderMultiple(value as T[]) : renderSingle(value as T)}\n </Stack>\n );\n}\n\nexport const Value = memo(forwardRef(ValueInner)) as <\n T extends Data,\n M extends boolean\n>(\n props: DragDropValueProps<T, M> & { ref?: ForwardedRef<HTMLDivElement> }\n) => ReturnType<typeof ValueInner>;\n"],"names":["ValueInner","value","onChange","multiple","renderValueLabel","renderValueIcon","className","style","maxItems","rest","ref","cls","useCls","containerEl","setContainerEl","useState","containerRef","useCallback","el","renderLabel","label","jsx","Truncate","renderedValueIcon","cloneElement","FileIcon","handleResetMultiple","singleValue","v","isEqual","handleResetSingle","renderSingle","jsxs","Fragment","IconButton","XIcon","renderMultiple","index","Tag","Stack","mergeRefs","Value","memo","forwardRef"],"mappings":";;;;;;;;;;;AAmBA,SAASA,EACP;AAAA,EACE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAA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,QACD,gBAAAC,EAACa,KAAW,MAAK,SAAQ,SAASJ,GAChC,UAAA,gBAAAT,EAACc,IAAM,CAAA,EACT,CAAA;AAAA,MAAA,GACF;AAAA,IAEJ;AAAA,IACA,CAAChB,GAAaI,GAAmBO,CAAiB;AAAA,EACpD,GAEMM,IAAiBnB;AAAA,IACrB,CAAChB,MACKO,KAAY,IACPuB,EAAa9B,EAAM,CAAC,CAAC,IAG5B,gBAAAoB,EAAAY,GAAA,EACK,WAAAhC,KAAiB,CAAA,GAAI,IAAI,CAAC0B,GAAaU,MAAU;AAC5C,YAAAjB,IAAQD,EAAYQ,CAAW;AAEnC,aAAA,gBAAAN;AAAA,QAACiB;AAAA,QAAA;AAAA,UAEC,MAAMf,EAAkBI,CAAW;AAAA,UACnC,MAAK;AAAA,UACL,UAAQ;AAAA,UACR,SAAS,MAAMD,EAAoBC,CAAW;AAAA,UAE7C,UAAAP;AAAA,QAAA;AAAA,QANIiB;AAAA,MAOP;AAAA,IAEH,CAAA,GACH;AAAA,IAGJ;AAAA,MACElB;AAAA,MACAI;AAAA,MACAf;AAAA,MACAuB;AAAA,MACAL;AAAA,IAAA;AAAA,EAEJ;AAGE,SAAA,gBAAAL;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,KAAKC,EAAU9B,GAAKM,CAAY;AAAA,MAChC,KAAKb,IAAW,IAAI;AAAA,MACpB,OAAM;AAAA,MACN,MAAMA,KAAYK,MAAa;AAAA,MAC/B,WAAWG;AAAA,QACT;AAAA,QACAR,KAAY;AAAA,QACZG;AAAA,MACF;AAAA,MACA,OAAAC;AAAA,MACC,GAAGE;AAAA,MAEH,UAAWN,IAAAiC,EAAenC,CAAY,IAAI8B,EAAa9B,CAAU;AAAA,IAAA;AAAA,EACpE;AAEJ;AAEO,MAAMwC,IAAQC,EAAKC,EAAW3C,CAAU,CAAC;"}
1
+ {"version":3,"file":"value.js","sources":["../../../src/components/drag-drop/value.tsx"],"sourcesContent":["\"use client\";\nimport { FileIcon, XIcon } from \"@bioturing/assets\";\nimport { isEqual } from \"es-toolkit\";\nimport {\n cloneElement,\n forwardRef,\n memo,\n useCallback,\n type ForwardedRef,\n useState,\n} from \"react\";\nimport { IconButton } from \"../icon-button\";\nimport { Stack } from \"../stack\";\nimport { Tag } from \"../tag\";\nimport { Truncate } from \"../truncate\";\nimport { useCls } from \"../utils\";\nimport { DragDropValueProps, type Data } from \"./types\";\nimport mergeRefs from \"merge-refs\";\n\nfunction ValueInner<T extends Data, M extends boolean>(\n {\n value,\n onChange,\n multiple,\n renderValueLabel,\n renderValueIcon,\n className,\n style,\n maxItems,\n ...rest\n }: DragDropValueProps<T, M>,\n ref: ForwardedRef<HTMLDivElement>\n) {\n const cls = useCls();\n\n // todo: make this as reusable hook\n const [containerEl, setContainerEl] = useState<HTMLDivElement>(null);\n const containerRef = useCallback((el: HTMLDivElement | null) => {\n setContainerEl(el);\n }, []);\n\n const renderLabel = useCallback(\n (value: T) => {\n const label = renderValueLabel(value);\n return typeof label === \"string\" ? (\n <Truncate\n position=\"middle\"\n className={cls(\"dropzone-value-label\")}\n container={containerEl}\n >\n {label}\n </Truncate>\n ) : (\n <span className={cls(\"dropzone-value-label\")}>{label}</span>\n );\n },\n [cls, containerEl, renderValueLabel]\n );\n\n const renderedValueIcon = useCallback(\n (value: T) => {\n return cloneElement(renderValueIcon(value) || <FileIcon />, {\n className: cls(\"dropzone-value-icon\"),\n });\n },\n [cls, renderValueIcon]\n );\n\n const handleResetMultiple = useCallback(\n (singleValue: T) => {\n (onChange as (value: T[]) => void)(\n (value as T[]).filter((v) => !isEqual(v, singleValue))\n );\n },\n [onChange, value]\n );\n\n const handleResetSingle = useCallback(() => {\n if (multiple) {\n (onChange as (value: T[]) => void)([] as T[]);\n } else {\n onChange?.(null);\n }\n }, [onChange, multiple]);\n\n const renderSingle = useCallback(\n (value: T) => {\n const label = renderLabel(value as T);\n return (\n <>\n {renderedValueIcon(value as T)}\n {label}\n <IconButton size=\"small\" onClick={handleResetSingle}>\n <XIcon />\n </IconButton>\n </>\n );\n },\n [renderLabel, renderedValueIcon, handleResetSingle]\n );\n\n const renderMultiple = useCallback(\n (value: T[]) => {\n if (maxItems == 1) {\n return renderSingle(value[0]);\n }\n return (\n <>\n {((value as T[]) || []).map((singleValue, index) => {\n const label = renderLabel(singleValue);\n return (\n <Tag\n key={index}\n icon={renderedValueIcon(singleValue)}\n size=\"large\"\n closable\n onClose={() => handleResetMultiple(singleValue)}\n >\n {label}\n </Tag>\n );\n })}\n </>\n );\n },\n [\n renderLabel,\n renderedValueIcon,\n maxItems,\n renderSingle,\n handleResetMultiple,\n ]\n );\n\n return (\n <Stack\n ref={mergeRefs(ref, containerRef)}\n gap={multiple ? 4 : 8}\n align=\"center\"\n wrap={multiple && maxItems !== 1}\n className={cls(\n \"dropzone-value\",\n multiple && \"dropzone-value-multiple\",\n className\n )}\n style={style}\n {...rest}\n >\n {multiple ? renderMultiple(value as T[]) : renderSingle(value as T)}\n </Stack>\n );\n}\n\nexport const Value = memo(forwardRef(ValueInner)) as <\n T extends Data,\n M extends boolean\n>(\n props: DragDropValueProps<T, M> & { ref?: ForwardedRef<HTMLDivElement> }\n) => ReturnType<typeof ValueInner>;\n"],"names":["ValueInner","value","onChange","multiple","renderValueLabel","renderValueIcon","className","style","maxItems","rest","ref","cls","useCls","containerEl","setContainerEl","useState","containerRef","useCallback","el","renderLabel","label","jsx","Truncate","renderedValueIcon","cloneElement","FileIcon","handleResetMultiple","singleValue","v","isEqual","handleResetSingle","renderSingle","jsxs","Fragment","IconButton","XIcon","renderMultiple","index","Tag","Stack","mergeRefs","Value","memo","forwardRef"],"mappings":";;;;;;;;;;;AAmBA,SAASA,EACP;AAAA,EACE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,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
3
+ import { Command } from '../cmdk';
4
+ import { PopupPanelSize } from '../popup-panel/constants';
5
+ import { DropdownMenuItemType } from './types';
6
+ import { UseDropdownMenuProps } from './useDropdownMenu';
7
+ export interface DropdownMenuProps extends Omit<UseDropdownMenuProps, "classNames"> {
8
+ /** Array of menu items to be displayed in the dropdown */
9
+ items: DropdownMenuItemType[];
10
+ /** Custom render function for the trigger element */
11
+ children?: React.ComponentProps<typeof Menu.Trigger>["render"];
12
+ /**
13
+ * Placement of the dropdown relative to the trigger element
14
+ * @default "bottomLeft"
15
+ */
16
+ placement?: PopoverProps["placement"];
17
+ /**
18
+ * Whether to open the dropdown on hover instead of click
19
+ * @default false
20
+ */
21
+ openOnHover?: boolean;
22
+ /**
23
+ * Controlled open state of the dropdown
24
+ */
25
+ open?: boolean;
26
+ /**
27
+ * Callback fired when the dropdown open state changes
28
+ */
29
+ onOpenChange?: (open: boolean) => void;
30
+ /**
31
+ * Default open state of the dropdown
32
+ */
33
+ defaultOpen?: boolean;
34
+ /**
35
+ * Additional CSS class for the dropdown component
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Custom class names for different parts of the dropdown
40
+ * @default {}
41
+ */
42
+ classNames?: {
43
+ root?: string;
44
+ trigger?: string;
45
+ popup?: string;
46
+ itemIcon?: string;
47
+ itemText?: string;
48
+ positioner?: string;
49
+ } & UseDropdownMenuProps["classNames"];
50
+ /**
51
+ * Whether to show search input
52
+ * @default false
53
+ */
54
+ showSearch?: boolean;
55
+ /**
56
+ * Size of the dropdown menu
57
+ * @default "auto"
58
+ */
59
+ size?: "auto" | keyof typeof PopupPanelSize;
60
+ /**
61
+ * Search placeholder
62
+ */
63
+ searchProps?: Omit<React.ComponentProps<typeof Command.Input>, "size" | "ref">;
64
+ /**
65
+ * Whether to match the width of the popup with the trigger
66
+ * @default false
67
+ */
68
+ popupMatchTriggerWidth?: boolean;
69
+ /**
70
+ * Content to display before the list
71
+ */
72
+ beforeList?: React.ReactNode;
73
+ /**
74
+ * Content to display after the list
75
+ */
76
+ afterList?: React.ReactNode;
77
+ }
78
+ export declare const DropdownMenu: ({ children, items, placement, openOnHover, open: outsideOpen, onOpenChange: outsideOnOpenChange, defaultOpen, className, itemRender, classNames, size, showSearch, inCombobox: inComboboxProp, searchProps, popupMatchTriggerWidth, beforeList, afterList, keepOpenOnSelect, highlightedItemKey, selectedItemKeys, getItemKeywords, showCheckbox, itemLabelRender, }: DropdownMenuProps) => import("react/jsx-runtime").JSX.Element;
79
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu/component.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAEtD,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AASpD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAMlC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAmB,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG1E,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC;IAChD,0DAA0D;IAC1D,KAAK,EAAE,oBAAoB,EAAE,CAAC;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC/D;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAA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