@arolariu/components 1.0.0 → 2.0.0

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 (451) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/EXAMPLES.md +2510 -0
  3. package/dist/components/ui/accordion.js +3 -3
  4. package/dist/components/ui/accordion.js.map +1 -1
  5. package/dist/components/ui/accordion_module.css.map +1 -1
  6. package/dist/components/ui/alert-dialog.d.ts +4 -16
  7. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  8. package/dist/components/ui/alert-dialog.js +21 -17
  9. package/dist/components/ui/alert-dialog.js.map +1 -1
  10. package/dist/components/ui/alert-dialog_module.css +1 -1
  11. package/dist/components/ui/alert-dialog_module.css.map +1 -1
  12. package/dist/components/ui/alert.js +4 -4
  13. package/dist/components/ui/alert.js.map +1 -1
  14. package/dist/components/ui/alert_module.css.map +1 -1
  15. package/dist/components/ui/aspect-ratio.js +2 -2
  16. package/dist/components/ui/aspect-ratio.js.map +1 -1
  17. package/dist/components/ui/aspect-ratio_module.css.map +1 -1
  18. package/dist/components/ui/async-boundary.js +2 -2
  19. package/dist/components/ui/async-boundary.js.map +1 -1
  20. package/dist/components/ui/avatar.d.ts +3 -12
  21. package/dist/components/ui/avatar.d.ts.map +1 -1
  22. package/dist/components/ui/avatar.js +18 -15
  23. package/dist/components/ui/avatar.js.map +1 -1
  24. package/dist/components/ui/avatar_module.css.map +1 -1
  25. package/dist/components/ui/background-beams.js +3 -3
  26. package/dist/components/ui/background-beams.js.map +1 -1
  27. package/dist/components/ui/background-beams_module.css.map +1 -1
  28. package/dist/components/ui/badge.js +2 -2
  29. package/dist/components/ui/badge.js.map +1 -1
  30. package/dist/components/ui/badge_module.css.map +1 -1
  31. package/dist/components/ui/breadcrumb.js +10 -10
  32. package/dist/components/ui/breadcrumb.js.map +1 -1
  33. package/dist/components/ui/breadcrumb_module.css.map +1 -1
  34. package/dist/components/ui/bubble-background.js +5 -5
  35. package/dist/components/ui/bubble-background.js.map +1 -1
  36. package/dist/components/ui/bubble-background_module.css.map +1 -1
  37. package/dist/components/ui/button-group.d.ts +1 -1
  38. package/dist/components/ui/button-group.d.ts.map +1 -1
  39. package/dist/components/ui/button-group.js +6 -6
  40. package/dist/components/ui/button-group.js.map +1 -1
  41. package/dist/components/ui/button-group_module.css.map +1 -1
  42. package/dist/components/ui/button.js +4 -4
  43. package/dist/components/ui/button.js.map +1 -1
  44. package/dist/components/ui/button_module.css.map +1 -1
  45. package/dist/components/ui/calendar.d.ts +3 -5
  46. package/dist/components/ui/calendar.d.ts.map +1 -1
  47. package/dist/components/ui/calendar.js +9 -9
  48. package/dist/components/ui/calendar.js.map +1 -1
  49. package/dist/components/ui/calendar_module.css.map +1 -1
  50. package/dist/components/ui/card-skeleton.js +2 -2
  51. package/dist/components/ui/card-skeleton.js.map +1 -1
  52. package/dist/components/ui/card-skeleton_module.css.map +1 -1
  53. package/dist/components/ui/card.js +8 -8
  54. package/dist/components/ui/card.js.map +1 -1
  55. package/dist/components/ui/card_module.css.map +1 -1
  56. package/dist/components/ui/carousel.d.ts.map +1 -1
  57. package/dist/components/ui/carousel.js +16 -16
  58. package/dist/components/ui/carousel.js.map +1 -1
  59. package/dist/components/ui/carousel_module.css +1 -1
  60. package/dist/components/ui/carousel_module.css.map +1 -1
  61. package/dist/components/ui/chart.d.ts +6 -3
  62. package/dist/components/ui/chart.d.ts.map +1 -1
  63. package/dist/components/ui/chart.js +70 -70
  64. package/dist/components/ui/chart.js.map +1 -1
  65. package/dist/components/ui/chart_module.css.map +1 -1
  66. package/dist/components/ui/checkbox-group.d.ts +2 -6
  67. package/dist/components/ui/checkbox-group.d.ts.map +1 -1
  68. package/dist/components/ui/checkbox-group.js +8 -7
  69. package/dist/components/ui/checkbox-group.js.map +1 -1
  70. package/dist/components/ui/checkbox-group_module.css.map +1 -1
  71. package/dist/components/ui/checkbox.d.ts +3 -1
  72. package/dist/components/ui/checkbox.d.ts.map +1 -1
  73. package/dist/components/ui/checkbox.js +6 -3
  74. package/dist/components/ui/checkbox.js.map +1 -1
  75. package/dist/components/ui/checkbox_module.css.map +1 -1
  76. package/dist/components/ui/collapsible.d.ts.map +1 -1
  77. package/dist/components/ui/collapsible.js +4 -4
  78. package/dist/components/ui/collapsible.js.map +1 -1
  79. package/dist/components/ui/collapsible_module.css.map +1 -1
  80. package/dist/components/ui/combobox.d.ts +335 -0
  81. package/dist/components/ui/combobox.d.ts.map +1 -0
  82. package/dist/components/ui/combobox.js +206 -0
  83. package/dist/components/ui/combobox.js.map +1 -0
  84. package/dist/components/ui/combobox.module.js +23 -0
  85. package/dist/components/ui/combobox.module.js.map +1 -0
  86. package/dist/components/ui/combobox_module.css +142 -0
  87. package/dist/components/ui/combobox_module.css.map +1 -0
  88. package/dist/components/ui/command.d.ts.map +1 -1
  89. package/dist/components/ui/command.js +62 -53
  90. package/dist/components/ui/command.js.map +1 -1
  91. package/dist/components/ui/command_module.css +1 -1
  92. package/dist/components/ui/command_module.css.map +1 -1
  93. package/dist/components/ui/context-menu.d.ts.map +1 -1
  94. package/dist/components/ui/context-menu.js +6 -6
  95. package/dist/components/ui/context-menu.js.map +1 -1
  96. package/dist/components/ui/context-menu_module.css.map +1 -1
  97. package/dist/components/ui/copy-button.js +6 -6
  98. package/dist/components/ui/copy-button.js.map +1 -1
  99. package/dist/components/ui/copy-button_module.css.map +1 -1
  100. package/dist/components/ui/counting-number.js +6 -6
  101. package/dist/components/ui/counting-number.js.map +1 -1
  102. package/dist/components/ui/counting-number_module.css.map +1 -1
  103. package/dist/components/ui/dialog.js +6 -6
  104. package/dist/components/ui/dialog.js.map +1 -1
  105. package/dist/components/ui/dialog_module.css +1 -1
  106. package/dist/components/ui/dialog_module.css.map +1 -1
  107. package/dist/components/ui/dot-background_module.css.map +1 -1
  108. package/dist/components/ui/drawer.d.ts.map +1 -1
  109. package/dist/components/ui/drawer.js +5 -5
  110. package/dist/components/ui/drawer.js.map +1 -1
  111. package/dist/components/ui/drawer_module.css.map +1 -1
  112. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  113. package/dist/components/ui/dropdown-menu.js +6 -6
  114. package/dist/components/ui/dropdown-menu.js.map +1 -1
  115. package/dist/components/ui/dropdown-menu_module.css.map +1 -1
  116. package/dist/components/ui/dropdrawer.d.ts +10 -16
  117. package/dist/components/ui/dropdrawer.d.ts.map +1 -1
  118. package/dist/components/ui/dropdrawer.js +73 -65
  119. package/dist/components/ui/dropdrawer.js.map +1 -1
  120. package/dist/components/ui/dropdrawer_module.css.map +1 -1
  121. package/dist/components/ui/empty.js +7 -7
  122. package/dist/components/ui/empty.js.map +1 -1
  123. package/dist/components/ui/empty_module.css.map +1 -1
  124. package/dist/components/ui/error-boundary.js +2 -2
  125. package/dist/components/ui/error-boundary.js.map +1 -1
  126. package/dist/components/ui/error-boundary_module.css.map +1 -1
  127. package/dist/components/ui/field.js +12 -12
  128. package/dist/components/ui/field.js.map +1 -1
  129. package/dist/components/ui/field_module.css.map +1 -1
  130. package/dist/components/ui/fireworks-background.js +6 -6
  131. package/dist/components/ui/fireworks-background.js.map +1 -1
  132. package/dist/components/ui/fireworks-background_module.css.map +1 -1
  133. package/dist/components/ui/flip-button.js +5 -5
  134. package/dist/components/ui/flip-button.js.map +1 -1
  135. package/dist/components/ui/flip-button_module.css.map +1 -1
  136. package/dist/components/ui/focus-scope.js +6 -6
  137. package/dist/components/ui/focus-scope.js.map +1 -1
  138. package/dist/components/ui/focus-scope_module.css.map +1 -1
  139. package/dist/components/ui/form-skeleton.js +2 -2
  140. package/dist/components/ui/form-skeleton.js.map +1 -1
  141. package/dist/components/ui/form-skeleton_module.css.map +1 -1
  142. package/dist/components/ui/form.d.ts +3 -3
  143. package/dist/components/ui/form.d.ts.map +1 -1
  144. package/dist/components/ui/form.js +13 -13
  145. package/dist/components/ui/form.js.map +1 -1
  146. package/dist/components/ui/form_module.css.map +1 -1
  147. package/dist/components/ui/gradient-background.js +2 -2
  148. package/dist/components/ui/gradient-background.js.map +1 -1
  149. package/dist/components/ui/gradient-background_module.css.map +1 -1
  150. package/dist/components/ui/gradient-text.js +2 -2
  151. package/dist/components/ui/gradient-text.js.map +1 -1
  152. package/dist/components/ui/gradient-text_module.css.map +1 -1
  153. package/dist/components/ui/highlight-text.js +4 -4
  154. package/dist/components/ui/highlight-text.js.map +1 -1
  155. package/dist/components/ui/highlight-text_module.css.map +1 -1
  156. package/dist/components/ui/hole-background.js +21 -21
  157. package/dist/components/ui/hole-background.js.map +1 -1
  158. package/dist/components/ui/hole-background_module.css.map +1 -1
  159. package/dist/components/ui/hover-card.js +3 -3
  160. package/dist/components/ui/hover-card.js.map +1 -1
  161. package/dist/components/ui/hover-card_module.css.map +1 -1
  162. package/dist/components/ui/input-group.js +7 -7
  163. package/dist/components/ui/input-group.js.map +1 -1
  164. package/dist/components/ui/input-group_module.css.map +1 -1
  165. package/dist/components/ui/input-otp.d.ts +3 -3
  166. package/dist/components/ui/input-otp.d.ts.map +1 -1
  167. package/dist/components/ui/input-otp.js +6 -6
  168. package/dist/components/ui/input-otp.js.map +1 -1
  169. package/dist/components/ui/input-otp_module.css.map +1 -1
  170. package/dist/components/ui/input.js +2 -2
  171. package/dist/components/ui/input.js.map +1 -1
  172. package/dist/components/ui/input_module.css.map +1 -1
  173. package/dist/components/ui/item.d.ts +1 -1
  174. package/dist/components/ui/item.d.ts.map +1 -1
  175. package/dist/components/ui/item.js +13 -13
  176. package/dist/components/ui/item.js.map +1 -1
  177. package/dist/components/ui/item_module.css.map +1 -1
  178. package/dist/components/ui/kbd.js +3 -3
  179. package/dist/components/ui/kbd.js.map +1 -1
  180. package/dist/components/ui/kbd_module.css.map +1 -1
  181. package/dist/components/ui/label.js +2 -2
  182. package/dist/components/ui/label.js.map +1 -1
  183. package/dist/components/ui/label_module.css.map +1 -1
  184. package/dist/components/ui/list-skeleton.js +2 -2
  185. package/dist/components/ui/list-skeleton.js.map +1 -1
  186. package/dist/components/ui/list-skeleton_module.css.map +1 -1
  187. package/dist/components/ui/loading-overlay.js +2 -2
  188. package/dist/components/ui/loading-overlay.js.map +1 -1
  189. package/dist/components/ui/loading-overlay_module.css.map +1 -1
  190. package/dist/components/ui/menubar.d.ts +11 -13
  191. package/dist/components/ui/menubar.d.ts.map +1 -1
  192. package/dist/components/ui/menubar.js +4 -4
  193. package/dist/components/ui/menubar.js.map +1 -1
  194. package/dist/components/ui/menubar_module.css.map +1 -1
  195. package/dist/components/ui/meter.d.ts +8 -24
  196. package/dist/components/ui/meter.d.ts.map +1 -1
  197. package/dist/components/ui/meter.js +23 -19
  198. package/dist/components/ui/meter.js.map +1 -1
  199. package/dist/components/ui/meter_module.css.map +1 -1
  200. package/dist/components/ui/navigation-menu.d.ts +3 -12
  201. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  202. package/dist/components/ui/navigation-menu.js +15 -12
  203. package/dist/components/ui/navigation-menu.js.map +1 -1
  204. package/dist/components/ui/navigation-menu_module.css +1 -1
  205. package/dist/components/ui/navigation-menu_module.css.map +1 -1
  206. package/dist/components/ui/number-field.d.ts +6 -12
  207. package/dist/components/ui/number-field.d.ts.map +1 -1
  208. package/dist/components/ui/number-field.js +3 -3
  209. package/dist/components/ui/number-field.js.map +1 -1
  210. package/dist/components/ui/number-field_module.css.map +1 -1
  211. package/dist/components/ui/pagination.js +8 -8
  212. package/dist/components/ui/pagination.js.map +1 -1
  213. package/dist/components/ui/pagination_module.css.map +1 -1
  214. package/dist/components/ui/popover.js +5 -5
  215. package/dist/components/ui/popover.js.map +1 -1
  216. package/dist/components/ui/popover_module.css.map +1 -1
  217. package/dist/components/ui/progress.d.ts +1 -4
  218. package/dist/components/ui/progress.d.ts.map +1 -1
  219. package/dist/components/ui/progress.js +10 -9
  220. package/dist/components/ui/progress.js.map +1 -1
  221. package/dist/components/ui/progress_module.css.map +1 -1
  222. package/dist/components/ui/radio-group.d.ts +2 -4
  223. package/dist/components/ui/radio-group.d.ts.map +1 -1
  224. package/dist/components/ui/radio-group.js +3 -3
  225. package/dist/components/ui/radio-group.js.map +1 -1
  226. package/dist/components/ui/radio-group_module.css.map +1 -1
  227. package/dist/components/ui/resizable.d.ts +13 -29
  228. package/dist/components/ui/resizable.d.ts.map +1 -1
  229. package/dist/components/ui/resizable.js +8 -7
  230. package/dist/components/ui/resizable.js.map +1 -1
  231. package/dist/components/ui/resizable_module.css.map +1 -1
  232. package/dist/components/ui/ripple-button.js +9 -9
  233. package/dist/components/ui/ripple-button.js.map +1 -1
  234. package/dist/components/ui/ripple-button_module.css.map +1 -1
  235. package/dist/components/ui/scratcher.d.ts +1 -1
  236. package/dist/components/ui/scratcher.d.ts.map +1 -1
  237. package/dist/components/ui/scratcher.js +5 -4
  238. package/dist/components/ui/scratcher.js.map +1 -1
  239. package/dist/components/ui/scratcher_module.css.map +1 -1
  240. package/dist/components/ui/scroll-area.d.ts +2 -4
  241. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  242. package/dist/components/ui/scroll-area.js +2 -2
  243. package/dist/components/ui/scroll-area.js.map +1 -1
  244. package/dist/components/ui/scroll-area_module.css.map +1 -1
  245. package/dist/components/ui/select.js +4 -4
  246. package/dist/components/ui/select.js.map +1 -1
  247. package/dist/components/ui/select_module.css.map +1 -1
  248. package/dist/components/ui/separator.d.ts +1 -4
  249. package/dist/components/ui/separator.d.ts.map +1 -1
  250. package/dist/components/ui/separator.js +9 -8
  251. package/dist/components/ui/separator.js.map +1 -1
  252. package/dist/components/ui/separator_module.css.map +1 -1
  253. package/dist/components/ui/sheet.d.ts.map +1 -1
  254. package/dist/components/ui/sheet.js +6 -6
  255. package/dist/components/ui/sheet.js.map +1 -1
  256. package/dist/components/ui/sheet_module.css.map +1 -1
  257. package/dist/components/ui/sidebar.d.ts +1 -1
  258. package/dist/components/ui/sidebar.d.ts.map +1 -1
  259. package/dist/components/ui/sidebar.js +36 -36
  260. package/dist/components/ui/sidebar.js.map +1 -1
  261. package/dist/components/ui/sidebar_module.css.map +1 -1
  262. package/dist/components/ui/skeleton.js +2 -2
  263. package/dist/components/ui/skeleton.js.map +1 -1
  264. package/dist/components/ui/skeleton_module.css.map +1 -1
  265. package/dist/components/ui/slider.js +2 -2
  266. package/dist/components/ui/slider.js.map +1 -1
  267. package/dist/components/ui/slider_module.css.map +1 -1
  268. package/dist/components/ui/spinner.js +2 -2
  269. package/dist/components/ui/spinner.js.map +1 -1
  270. package/dist/components/ui/spinner_module.css.map +1 -1
  271. package/dist/components/ui/stepper.js +2 -2
  272. package/dist/components/ui/stepper.js.map +1 -1
  273. package/dist/components/ui/stepper_module.css.map +1 -1
  274. package/dist/components/ui/switch.js +2 -2
  275. package/dist/components/ui/switch.js.map +1 -1
  276. package/dist/components/ui/switch_module.css.map +1 -1
  277. package/dist/components/ui/table-skeleton.js +2 -2
  278. package/dist/components/ui/table-skeleton.js.map +1 -1
  279. package/dist/components/ui/table-skeleton_module.css.map +1 -1
  280. package/dist/components/ui/table.js +9 -9
  281. package/dist/components/ui/table.js.map +1 -1
  282. package/dist/components/ui/table_module.css.map +1 -1
  283. package/dist/components/ui/tabs.js +3 -3
  284. package/dist/components/ui/tabs.js.map +1 -1
  285. package/dist/components/ui/tabs_module.css.map +1 -1
  286. package/dist/components/ui/textarea.js +2 -2
  287. package/dist/components/ui/textarea.js.map +1 -1
  288. package/dist/components/ui/textarea_module.css.map +1 -1
  289. package/dist/components/ui/timeline.js +5 -5
  290. package/dist/components/ui/timeline.js.map +1 -1
  291. package/dist/components/ui/timeline_module.css.map +1 -1
  292. package/dist/components/ui/{sonner.d.ts → toast.d.ts} +15 -6
  293. package/dist/components/ui/toast.d.ts.map +1 -0
  294. package/dist/components/ui/{sonner.js → toast.js} +43 -42
  295. package/dist/components/ui/toast.js.map +1 -0
  296. package/dist/components/ui/toast.module.js +34 -0
  297. package/dist/components/ui/toast.module.js.map +1 -0
  298. package/dist/components/ui/{sonner_module.css → toast_module.css} +35 -35
  299. package/dist/components/ui/toast_module.css.map +1 -0
  300. package/dist/components/ui/toggle-group.d.ts +2 -8
  301. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  302. package/dist/components/ui/toggle-group.js +14 -12
  303. package/dist/components/ui/toggle-group.js.map +1 -1
  304. package/dist/components/ui/toggle-group_module.css.map +1 -1
  305. package/dist/components/ui/toggle.js +2 -2
  306. package/dist/components/ui/toggle.js.map +1 -1
  307. package/dist/components/ui/toggle_module.css.map +1 -1
  308. package/dist/components/ui/toolbar.d.ts +10 -30
  309. package/dist/components/ui/toolbar.d.ts.map +1 -1
  310. package/dist/components/ui/toolbar.js +28 -23
  311. package/dist/components/ui/toolbar.js.map +1 -1
  312. package/dist/components/ui/toolbar_module.css.map +1 -1
  313. package/dist/components/ui/tooltip.js +4 -4
  314. package/dist/components/ui/tooltip.js.map +1 -1
  315. package/dist/components/ui/tooltip_module.css.map +1 -1
  316. package/dist/components/ui/typewriter.js +4 -4
  317. package/dist/components/ui/typewriter.js.map +1 -1
  318. package/dist/components/ui/typewriter_module.css.map +1 -1
  319. package/dist/components/ui/visually-hidden.js +2 -2
  320. package/dist/components/ui/visually-hidden.js.map +1 -1
  321. package/dist/components/ui/visually-hidden_module.css.map +1 -1
  322. package/dist/hooks/useAnnounce.js +5 -5
  323. package/dist/hooks/useAnnounce.js.map +1 -1
  324. package/dist/hooks/useClipboard.d.ts +77 -0
  325. package/dist/hooks/useClipboard.d.ts.map +1 -0
  326. package/dist/hooks/useClipboard.js +42 -0
  327. package/dist/hooks/useClipboard.js.map +1 -0
  328. package/dist/hooks/useControllableState.d.ts +54 -0
  329. package/dist/hooks/useControllableState.d.ts.map +1 -0
  330. package/dist/hooks/useControllableState.js +29 -0
  331. package/dist/hooks/useControllableState.js.map +1 -0
  332. package/dist/hooks/useDebounce.d.ts +33 -0
  333. package/dist/hooks/useDebounce.d.ts.map +1 -0
  334. package/dist/hooks/useDebounce.js +20 -0
  335. package/dist/hooks/useDebounce.js.map +1 -0
  336. package/dist/hooks/useEventCallback.d.ts +34 -0
  337. package/dist/hooks/useEventCallback.d.ts.map +1 -0
  338. package/dist/hooks/useEventCallback.js +12 -0
  339. package/dist/hooks/useEventCallback.js.map +1 -0
  340. package/dist/hooks/useFocusManager.js +6 -6
  341. package/dist/hooks/useFocusManager.js.map +1 -1
  342. package/dist/hooks/useFocusVisible.js +5 -5
  343. package/dist/hooks/useFocusVisible.js.map +1 -1
  344. package/dist/hooks/useId.d.ts +30 -0
  345. package/dist/hooks/useId.d.ts.map +1 -0
  346. package/dist/hooks/useId.js +9 -0
  347. package/dist/hooks/useId.js.map +1 -0
  348. package/dist/hooks/useIntersectionObserver.d.ts +51 -0
  349. package/dist/hooks/useIntersectionObserver.d.ts.map +1 -0
  350. package/dist/hooks/useIntersectionObserver.js +25 -0
  351. package/dist/hooks/useIntersectionObserver.js.map +1 -0
  352. package/dist/hooks/useInterval.d.ts +55 -0
  353. package/dist/hooks/useInterval.d.ts.map +1 -0
  354. package/dist/hooks/useInterval.js +24 -0
  355. package/dist/hooks/useInterval.js.map +1 -0
  356. package/dist/hooks/useLocalStorage.d.ts +43 -0
  357. package/dist/hooks/useLocalStorage.d.ts.map +1 -0
  358. package/dist/hooks/useLocalStorage.js +53 -0
  359. package/dist/hooks/useLocalStorage.js.map +1 -0
  360. package/dist/hooks/useMediaQuery.js +3 -3
  361. package/dist/hooks/useMediaQuery.js.map +1 -1
  362. package/dist/hooks/useMergedRefs.d.ts +27 -0
  363. package/dist/hooks/useMergedRefs.d.ts.map +1 -0
  364. package/dist/hooks/useMergedRefs.js +11 -0
  365. package/dist/hooks/useMergedRefs.js.map +1 -0
  366. package/dist/hooks/useOnClickOutside.d.ts +32 -0
  367. package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
  368. package/dist/hooks/useOnClickOutside.js +23 -0
  369. package/dist/hooks/useOnClickOutside.js.map +1 -0
  370. package/dist/hooks/usePrevious.d.ts +33 -0
  371. package/dist/hooks/usePrevious.d.ts.map +1 -0
  372. package/dist/hooks/usePrevious.js +14 -0
  373. package/dist/hooks/usePrevious.js.map +1 -0
  374. package/dist/hooks/useThrottle.d.ts +37 -0
  375. package/dist/hooks/useThrottle.d.ts.map +1 -0
  376. package/dist/hooks/useThrottle.js +34 -0
  377. package/dist/hooks/useThrottle.js.map +1 -0
  378. package/dist/hooks/useTimeout.d.ts +28 -0
  379. package/dist/hooks/useTimeout.d.ts.map +1 -0
  380. package/dist/hooks/useTimeout.js +24 -0
  381. package/dist/hooks/useTimeout.js.map +1 -0
  382. package/dist/index.css.map +1 -1
  383. package/dist/index.d.ts +17 -3
  384. package/dist/index.d.ts.map +1 -1
  385. package/dist/index.js +15 -1
  386. package/dist/lib/utilities.d.ts +2 -3
  387. package/dist/lib/utilities.d.ts.map +1 -1
  388. package/dist/lib/utilities.js.map +1 -1
  389. package/dist/motion/Collapse.js +2 -2
  390. package/dist/motion/Collapse.js.map +1 -1
  391. package/dist/motion/Collapse_module.css.map +1 -1
  392. package/dist/motion/tokens.js +5 -5
  393. package/dist/motion/tokens.js.map +1 -1
  394. package/package.json +88 -10
  395. package/src/components/ui/alert-dialog.tsx +15 -8
  396. package/src/components/ui/avatar.tsx +9 -6
  397. package/src/components/ui/calendar.tsx +9 -14
  398. package/src/components/ui/carousel.tsx +2 -0
  399. package/src/components/ui/chart.tsx +65 -62
  400. package/src/components/ui/checkbox-group.tsx +4 -5
  401. package/src/components/ui/checkbox.tsx +10 -2
  402. package/src/components/ui/collapsible.tsx +1 -0
  403. package/src/components/ui/combobox.module.css +158 -0
  404. package/src/components/ui/combobox.tsx +569 -0
  405. package/src/components/ui/command.tsx +31 -15
  406. package/src/components/ui/context-menu.tsx +3 -0
  407. package/src/components/ui/drawer.tsx +2 -0
  408. package/src/components/ui/dropdown-menu.tsx +3 -0
  409. package/src/components/ui/dropdrawer.tsx +80 -62
  410. package/src/components/ui/form.tsx +28 -3
  411. package/src/components/ui/input-otp.tsx +3 -3
  412. package/src/components/ui/menubar.tsx +9 -10
  413. package/src/components/ui/meter.tsx +16 -17
  414. package/src/components/ui/navigation-menu.tsx +41 -33
  415. package/src/components/ui/number-field.tsx +6 -13
  416. package/src/components/ui/progress.tsx +3 -2
  417. package/src/components/ui/radio-group.tsx +2 -5
  418. package/src/components/ui/resizable.tsx +15 -18
  419. package/src/components/ui/scratcher.tsx +6 -10
  420. package/src/components/ui/scroll-area.tsx +2 -5
  421. package/src/components/ui/separator.tsx +4 -3
  422. package/src/components/ui/sheet.tsx +3 -0
  423. package/src/components/ui/sidebar.tsx +1 -0
  424. package/src/components/ui/{sonner.module.css → toast.module.css} +1 -1
  425. package/src/components/ui/{sonner.tsx → toast.tsx} +22 -14
  426. package/src/components/ui/toggle-group.tsx +6 -4
  427. package/src/components/ui/toolbar.tsx +20 -21
  428. package/src/hooks/useClipboard.tsx +137 -0
  429. package/src/hooks/useControllableState.tsx +81 -0
  430. package/src/hooks/useDebounce.tsx +50 -0
  431. package/src/hooks/useEventCallback.tsx +47 -0
  432. package/src/hooks/useId.tsx +36 -0
  433. package/src/hooks/useIntersectionObserver.tsx +81 -0
  434. package/src/hooks/useInterval.tsx +80 -0
  435. package/src/hooks/useLocalStorage.tsx +111 -0
  436. package/src/hooks/useMergedRefs.tsx +48 -0
  437. package/src/hooks/useOnClickOutside.tsx +55 -0
  438. package/src/hooks/usePrevious.tsx +44 -0
  439. package/src/hooks/useThrottle.tsx +78 -0
  440. package/src/hooks/useTimeout.tsx +51 -0
  441. package/src/index.ts +27 -4
  442. package/src/lib/utilities.ts +4 -4
  443. package/src/motion/tokens.ts +4 -4
  444. package/src/stories/DesignPrinciples.mdx +48 -0
  445. package/src/stories/GettingStarted.mdx +92 -0
  446. package/src/stories/Welcome.mdx +44 -0
  447. package/dist/components/ui/sonner.d.ts.map +0 -1
  448. package/dist/components/ui/sonner.js.map +0 -1
  449. package/dist/components/ui/sonner.module.js +0 -34
  450. package/dist/components/ui/sonner.module.js.map +0 -1
  451. package/dist/components/ui/sonner_module.css.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/command.js","sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\r\nimport {Separator as BaseSeparator} from \"@base-ui/react/separator\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./command.module.css\";\r\n\r\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\r\n\r\ninterface CommandProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Command palette content.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible label announced for the command region.\r\n * @default undefined\r\n */\r\n label?: string;\r\n /**\r\n * Whether items should be filtered automatically as the search value changes.\r\n * @default true\r\n */\r\n shouldFilter?: boolean;\r\n /**\r\n * Custom scoring function used to determine whether an item matches the current search value.\r\n * @default undefined\r\n */\r\n filter?: CommandFilter;\r\n /**\r\n * Deprecated uncontrolled search value placeholder retained for API compatibility.\r\n * @default undefined\r\n */\r\n defaultValue?: string;\r\n /**\r\n * Deprecated controlled search value placeholder retained for API compatibility.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Deprecated change callback retained for API compatibility.\r\n * @default undefined\r\n */\r\n onValueChange?: (value: string) => void;\r\n /**\r\n * Whether keyboard navigation should wrap from the last item to the first.\r\n * @default false\r\n */\r\n loop?: boolean;\r\n /**\r\n * Whether pointer hover should avoid changing the active item.\r\n * @default false\r\n */\r\n disablePointerSelection?: boolean;\r\n /**\r\n * Deprecated Vim keybinding toggle retained for API compatibility.\r\n * @default undefined\r\n */\r\n vimBindings?: boolean;\r\n}\r\n\r\ninterface CommandDialogProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseDialog.Root>, \"children\"> {\r\n /**\r\n * Command palette content rendered inside the dialog popup.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible dialog title announced to assistive technologies.\r\n * @default \"Command menu\"\r\n */\r\n title?: React.ReactNode;\r\n}\r\n\r\ninterface CommandInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"type\" | \"value\"> {\r\n /**\r\n * Controlled search value.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Native input change handler invoked before the command-specific callback.\r\n * @default undefined\r\n */\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n /**\r\n * Callback fired when the command search value changes.\r\n * @default undefined\r\n */\r\n onValueChange?: (search: string) => void;\r\n}\r\n\r\ninterface CommandListProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Command items and groups.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible label for the listbox container.\r\n * @default undefined\r\n */\r\n label?: string;\r\n}\r\n\r\ninterface CommandGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"value\"> {\r\n /**\r\n * Group contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Optional visual heading displayed above the group items.\r\n * @default undefined\r\n */\r\n heading?: React.ReactNode;\r\n /**\r\n * Optional stable value retained for API compatibility.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Whether the group should remain rendered even when it has no visible items.\r\n * @default false\r\n */\r\n forceMount?: boolean;\r\n}\r\n\r\ninterface CommandSeparatorProps extends React.ComponentPropsWithoutRef<typeof BaseSeparator> {\r\n /**\r\n * Whether the separator should remain visible while filtering is active.\r\n * @default false\r\n */\r\n alwaysRender?: boolean;\r\n}\r\n\r\ninterface CommandItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\r\n /**\r\n * Item contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Whether the item is disabled and should be skipped by selection logic.\r\n * @default false\r\n */\r\n disabled?: boolean;\r\n /**\r\n * Callback invoked when the item is selected.\r\n * @default undefined\r\n */\r\n onSelect?: (value: string) => void;\r\n /**\r\n * Optional value used for filtering and selection callbacks.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Additional search keywords included in the filter match set.\r\n * @default []\r\n */\r\n keywords?: string[];\r\n /**\r\n * Whether the item should remain rendered even when filtered out.\r\n * @default false\r\n */\r\n forceMount?: boolean;\r\n}\r\n\r\ninterface CommandRegisteredItem {\r\n disabled: boolean;\r\n forceMount: boolean;\r\n groupId: string | null;\r\n id: string;\r\n keywords: string[];\r\n order: number;\r\n ref: React.RefObject<HTMLDivElement | null>;\r\n textValue: string;\r\n value?: string;\r\n}\r\n\r\ninterface CommandContextValue {\r\n activeItemId: string | null;\r\n disablePointerSelection: boolean;\r\n getVisibleItemCount: () => number;\r\n hasVisibleItemsInGroup: (groupId: string) => boolean;\r\n isFiltering: boolean;\r\n isItemVisible: (itemId: string) => boolean;\r\n listId: string;\r\n loop: boolean;\r\n registerItem: (item: Omit<CommandRegisteredItem, \"order\">) => void;\r\n search: string;\r\n setSearch: (value: string) => void;\r\n selectNextItem: () => void;\r\n selectPreviousItem: () => void;\r\n selectSpecificItem: (itemId: string | null) => void;\r\n shouldFilter: boolean;\r\n triggerActiveItem: () => void;\r\n unregisterItem: (itemId: string) => void;\r\n}\r\n\r\nconst CommandContext = React.createContext<CommandContextValue | null>(null);\r\nconst CommandGroupContext = React.createContext<string | null>(null);\r\n\r\nfunction assignRef<TValue>(ref: React.ForwardedRef<TValue>, value: TValue): void {\r\n if (typeof ref === \"function\") {\r\n ref(value);\r\n return;\r\n }\r\n\r\n if (ref) {\r\n ref.current = value;\r\n }\r\n}\r\n\r\nfunction normalizeCommandValue(value: string): string {\r\n return value.trim().toLowerCase();\r\n}\r\n\r\nfunction defaultCommandFilter(value: string, search: string, keywords: string[] = []): number {\r\n if (search.length === 0) {\r\n return 1;\r\n }\r\n\r\n const normalizedSearch = normalizeCommandValue(search);\r\n const normalizedValue = normalizeCommandValue([value, ...keywords].join(\" \"));\r\n\r\n return normalizedValue.includes(normalizedSearch) ? 1 : 0;\r\n}\r\n\r\nfunction useCommandContext(componentName: string): CommandContextValue {\r\n const context = React.useContext(CommandContext);\r\n\r\n if (!context) {\r\n throw new Error(`${componentName} must be used within Command.`);\r\n }\r\n\r\n return context;\r\n}\r\n\r\n/**\r\n * Provides a lightweight, filterable command surface without depending on cmdk.\r\n *\r\n * @remarks\r\n * This wrapper preserves the existing compound-component API while replacing the\r\n * underlying implementation with a small context-driven registry. It supports\r\n * text filtering, arrow-key navigation, Enter-to-select, and pointer hover\r\n * selection for common command palette use cases.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Command label='Quick actions'>\r\n * <CommandInput placeholder='Search actions...' />\r\n * <CommandList>\r\n * <CommandItem onSelect={() => console.log(\"Open\")}>Open</CommandItem>\r\n * </CommandList>\r\n * </Command>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog Docs}\r\n */\r\nconst Command = React.forwardRef<HTMLDivElement, CommandProps>(\r\n (\r\n {\r\n children,\r\n className,\r\n defaultValue: _defaultValue,\r\n disablePointerSelection = false,\r\n filter,\r\n label,\r\n loop = false,\r\n onKeyDown,\r\n onValueChange: _onValueChange,\r\n shouldFilter = true,\r\n value: _value,\r\n vimBindings: _vimBindings,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const [activeItemId, setActiveItemId] = React.useState<string | null>(null);\r\n const [search, setSearch] = React.useState(\"\");\r\n const itemOrderReference = React.useRef(0);\r\n const itemsReference = React.useRef(new Map<string, CommandRegisteredItem>());\r\n const [itemsVersion, setItemsVersion] = React.useState(0);\r\n const listId = React.useId();\r\n\r\n const registerItem = React.useCallback((item: Omit<CommandRegisteredItem, \"order\">): void => {\r\n const existingItem = itemsReference.current.get(item.id);\r\n const nextItem: CommandRegisteredItem = {\r\n ...item,\r\n order: existingItem?.order ?? itemOrderReference.current++,\r\n };\r\n\r\n const hasChanged =\r\n !existingItem\r\n || existingItem.disabled !== nextItem.disabled\r\n || existingItem.forceMount !== nextItem.forceMount\r\n || existingItem.groupId !== nextItem.groupId\r\n || existingItem.keywords.join(\"\\u0000\") !== nextItem.keywords.join(\"\\u0000\")\r\n || existingItem.ref !== nextItem.ref\r\n || existingItem.textValue !== nextItem.textValue\r\n || existingItem.value !== nextItem.value;\r\n\r\n if (!hasChanged) {\r\n return;\r\n }\r\n\r\n itemsReference.current.set(item.id, nextItem);\r\n setItemsVersion((currentVersion) => currentVersion + 1);\r\n }, []);\r\n\r\n const unregisterItem = React.useCallback((itemId: string): void => {\r\n if (!itemsReference.current.delete(itemId)) {\r\n return;\r\n }\r\n\r\n setItemsVersion((currentVersion) => currentVersion + 1);\r\n }, []);\r\n\r\n const items = React.useMemo(() => {\r\n return [...itemsReference.current.values()].sort((firstItem, secondItem) => firstItem.order - secondItem.order);\r\n }, [itemsVersion]);\r\n\r\n const isFiltering = shouldFilter && search.trim().length > 0;\r\n\r\n const isItemVisible = React.useCallback(\r\n (itemId: string): boolean => {\r\n const item = itemsReference.current.get(itemId);\r\n\r\n if (!item) {\r\n return false;\r\n }\r\n\r\n if (item.forceMount || !shouldFilter || search.trim().length === 0) {\r\n return true;\r\n }\r\n\r\n const itemValue = item.value ?? item.textValue;\r\n const itemFilter = filter ?? defaultCommandFilter;\r\n\r\n return itemFilter(itemValue, search, item.keywords) > 0;\r\n },\r\n [filter, search, shouldFilter],\r\n );\r\n\r\n const visibleItems = React.useMemo(() => items.filter((item) => isItemVisible(item.id)), [isItemVisible, items]);\r\n\r\n const selectableItems = React.useMemo(() => visibleItems.filter((item) => !item.disabled), [visibleItems]);\r\n\r\n React.useEffect(() => {\r\n if (selectableItems.length === 0) {\r\n setActiveItemId(null);\r\n return;\r\n }\r\n\r\n if (!activeItemId || !selectableItems.some((item) => item.id === activeItemId)) {\r\n setActiveItemId(selectableItems[0].id);\r\n }\r\n }, [activeItemId, selectableItems]);\r\n\r\n React.useEffect(() => {\r\n if (!activeItemId) {\r\n return;\r\n }\r\n\r\n itemsReference.current.get(activeItemId)?.ref.current?.scrollIntoView({\r\n block: \"nearest\",\r\n });\r\n }, [activeItemId]);\r\n\r\n const selectSpecificItem = React.useCallback((itemId: string | null): void => {\r\n setActiveItemId(itemId);\r\n }, []);\r\n\r\n const selectNextItem = React.useCallback((): void => {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n const currentIndex = selectableItems.findIndex((item) => item.id === activeItemId);\r\n\r\n if (currentIndex === -1) {\r\n setActiveItemId(selectableItems[0].id);\r\n return;\r\n }\r\n\r\n const nextIndex = currentIndex + 1;\r\n\r\n if (nextIndex >= selectableItems.length) {\r\n setActiveItemId(loop ? selectableItems[0].id : selectableItems[currentIndex].id);\r\n return;\r\n }\r\n\r\n setActiveItemId(selectableItems[nextIndex].id);\r\n }, [activeItemId, loop, selectableItems]);\r\n\r\n const selectPreviousItem = React.useCallback((): void => {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n const currentIndex = selectableItems.findIndex((item) => item.id === activeItemId);\r\n\r\n if (currentIndex === -1) {\r\n setActiveItemId(selectableItems[0].id);\r\n return;\r\n }\r\n\r\n const previousIndex = currentIndex - 1;\r\n\r\n if (previousIndex < 0) {\r\n setActiveItemId(loop ? (selectableItems.at(-1)?.id ?? selectableItems[0].id) : selectableItems[currentIndex].id);\r\n return;\r\n }\r\n\r\n setActiveItemId(selectableItems[previousIndex].id);\r\n }, [activeItemId, loop, selectableItems]);\r\n\r\n const triggerActiveItem = React.useCallback((): void => {\r\n if (!activeItemId) {\r\n return;\r\n }\r\n\r\n itemsReference.current.get(activeItemId)?.ref.current?.click();\r\n }, [activeItemId]);\r\n\r\n const hasVisibleItemsInGroup = React.useCallback(\r\n (groupId: string): boolean => visibleItems.some((item) => item.groupId === groupId),\r\n [visibleItems],\r\n );\r\n\r\n const getVisibleItemCount = React.useCallback((): number => visibleItems.length, [visibleItems.length]);\r\n\r\n const contextValue = React.useMemo<CommandContextValue>(\r\n () => ({\r\n activeItemId,\r\n disablePointerSelection,\r\n getVisibleItemCount,\r\n hasVisibleItemsInGroup,\r\n isFiltering,\r\n isItemVisible,\r\n listId,\r\n loop,\r\n registerItem,\r\n search,\r\n setSearch,\r\n selectNextItem,\r\n selectPreviousItem,\r\n selectSpecificItem,\r\n shouldFilter,\r\n triggerActiveItem,\r\n unregisterItem,\r\n }),\r\n [\r\n activeItemId,\r\n disablePointerSelection,\r\n getVisibleItemCount,\r\n hasVisibleItemsInGroup,\r\n isFiltering,\r\n isItemVisible,\r\n listId,\r\n loop,\r\n registerItem,\r\n search,\r\n setSearch,\r\n selectNextItem,\r\n selectPreviousItem,\r\n selectSpecificItem,\r\n shouldFilter,\r\n triggerActiveItem,\r\n unregisterItem,\r\n ],\r\n );\r\n\r\n return (\r\n <CommandContext.Provider value={contextValue}>\r\n <div\r\n ref={ref}\r\n aria-label={label}\r\n className={cn(styles.command, className)}\r\n onKeyDown={(event) => {\r\n onKeyDown?.(event);\r\n\r\n if (event.defaultPrevented) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\": {\r\n event.preventDefault();\r\n selectNextItem();\r\n break;\r\n }\r\n\r\n case \"ArrowUp\": {\r\n event.preventDefault();\r\n selectPreviousItem();\r\n break;\r\n }\r\n\r\n case \"Home\": {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n setActiveItemId(selectableItems[0].id);\r\n break;\r\n }\r\n\r\n case \"End\": {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n setActiveItemId(selectableItems.at(-1)?.id ?? selectableItems[0].id);\r\n break;\r\n }\r\n\r\n case \"Enter\": {\r\n if (event.nativeEvent.isComposing) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n triggerActiveItem();\r\n break;\r\n }\r\n\r\n default: {\r\n break;\r\n }\r\n }\r\n }}\r\n {...props}>\r\n {children}\r\n </div>\r\n </CommandContext.Provider>\r\n );\r\n },\r\n);\r\nCommand.displayName = \"Command\";\r\n\r\n/**\r\n * Renders the command surface inside a modal dialog.\r\n *\r\n * @remarks\r\n * - Renders a Base UI dialog popup\r\n * - Built on Base UI Dialog primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandDialog open={open} onOpenChange={setOpen}>\r\n * <CommandInput placeholder='Search...' />\r\n * </CommandDialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog Docs}\r\n */\r\nfunction CommandDialog({children, open, onOpenChange, title = \"Command menu\", ...props}: Readonly<CommandDialogProps>): React.JSX.Element {\r\n return (\r\n <BaseDialog.Root\r\n open={open}\r\n onOpenChange={onOpenChange}\r\n {...props}>\r\n <BaseDialog.Portal>\r\n <BaseDialog.Backdrop className={styles.backdrop} />\r\n <BaseDialog.Popup className={styles.dialogPopup}>\r\n <BaseDialog.Title className={styles.srOnly}>{title}</BaseDialog.Title>\r\n <Command>{children}</Command>\r\n </BaseDialog.Popup>\r\n </BaseDialog.Portal>\r\n </BaseDialog.Root>\r\n );\r\n}\r\nCommandDialog.displayName = \"CommandDialog\";\r\n\r\n/**\r\n * Provides the searchable input surface for a command palette.\r\n *\r\n * @remarks\r\n * - Renders an `<input>` element inside a wrapper `<div>`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandInput placeholder='Search...' />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/combobox_role | ARIA Combobox Role}\r\n */\r\nconst CommandInput = React.forwardRef<HTMLInputElement, CommandInputProps>(({className, onChange, onValueChange, value, ...props}, ref) => {\r\n const {activeItemId, listId, search, selectSpecificItem, setSearch} = useCommandContext(\"CommandInput\");\r\n const isControlled = value !== undefined;\r\n const inputValue = isControlled ? value : search;\r\n\r\n React.useEffect(() => {\r\n if (!isControlled) {\r\n return;\r\n }\r\n\r\n setSearch(value ?? \"\");\r\n }, [isControlled, setSearch, value]);\r\n\r\n return (\r\n <div className={styles.inputWrapper}>\r\n <Search className={styles.searchIcon} />\r\n <input\r\n ref={ref}\r\n aria-activedescendant={activeItemId ?? undefined}\r\n aria-autocomplete='list'\r\n aria-controls={listId}\r\n aria-expanded='true'\r\n className={cn(styles.input, className)}\r\n onChange={(event) => {\r\n onChange?.(event);\r\n\r\n const nextSearchValue = event.currentTarget.value;\r\n setSearch(nextSearchValue);\r\n onValueChange?.(nextSearchValue);\r\n selectSpecificItem(null);\r\n }}\r\n role='combobox'\r\n type='text'\r\n value={inputValue}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCommandInput.displayName = \"CommandInput\";\r\n\r\n/**\r\n * Renders the listbox container that hosts command items and groups.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"listbox\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandList>\r\n * <CommandItem>Settings</CommandItem>\r\n * </CommandList>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/listbox_role | ARIA Listbox Role}\r\n */\r\nconst CommandList = React.forwardRef<HTMLDivElement, CommandListProps>(({className, label, ...props}, ref) => {\r\n const {listId} = useCommandContext(\"CommandList\");\r\n\r\n return (\r\n <div\r\n aria-label={label}\r\n ref={ref}\r\n className={cn(styles.list, className)}\r\n id={listId}\r\n role='listbox'\r\n {...props}\r\n />\r\n );\r\n});\r\nCommandList.displayName = \"CommandList\";\r\n\r\n/**\r\n * Renders a fallback empty-state message when no command items are visible.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"status\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandEmpty>No results found.</CommandEmpty>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/status_role | ARIA Status Role}\r\n */\r\nconst CommandEmpty = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {getVisibleItemCount} = useCommandContext(\"CommandEmpty\");\r\n\r\n if (getVisibleItemCount() > 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(styles.empty, className)}\r\n role='status'\r\n {...props}\r\n />\r\n );\r\n});\r\nCommandEmpty.displayName = \"CommandEmpty\";\r\n\r\n/**\r\n * Groups related command items under an optional heading.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandGroup heading='Suggestions'>\r\n * <CommandItem>Profile</CommandItem>\r\n * </CommandGroup>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/group_role | ARIA Group Role}\r\n */\r\nconst CommandGroup = React.forwardRef<HTMLDivElement, CommandGroupProps>(\r\n ({children, className, forceMount = false, heading, value: _value, ...props}, ref) => {\r\n const groupId = React.useId();\r\n const {hasVisibleItemsInGroup, isFiltering} = useCommandContext(\"CommandGroup\");\r\n\r\n if (!forceMount && isFiltering && !hasVisibleItemsInGroup(groupId)) {\r\n return null;\r\n }\r\n\r\n return (\r\n <CommandGroupContext.Provider value={groupId}>\r\n <div\r\n ref={ref}\r\n className={cn(styles.group, className)}\r\n data-command-group=''\r\n {...props}>\r\n {heading ? <div className={styles.groupHeading}>{heading}</div> : null}\r\n {children}\r\n </div>\r\n </CommandGroupContext.Provider>\r\n );\r\n },\r\n);\r\nCommandGroup.displayName = \"CommandGroup\";\r\n\r\n/**\r\n * Renders a separator between command groups or item sections.\r\n *\r\n * @remarks\r\n * - Renders the shared separator primitive\r\n * - Built on Base UI Separator\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/separator | Base UI Separator Docs}\r\n */\r\nconst CommandSeparator = React.forwardRef<HTMLDivElement, CommandSeparatorProps>(\r\n ({alwaysRender = false, className, orientation = \"horizontal\", ...props}, ref) => {\r\n const {isFiltering} = useCommandContext(\"CommandSeparator\");\r\n\r\n if (isFiltering && !alwaysRender) {\r\n return null;\r\n }\r\n\r\n return (\r\n <BaseSeparator\r\n ref={ref}\r\n className={cn(styles.separator, className)}\r\n orientation={orientation}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nCommandSeparator.displayName = \"CommandSeparator\";\r\n\r\n/**\r\n * Renders a selectable command option with filtering metadata and keyboard support.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"option\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandItem keywords={[\"preferences\"]}>Settings</CommandItem>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/option_role | ARIA Option Role}\r\n */\r\nconst CommandItem = React.forwardRef<HTMLDivElement, CommandItemProps>(\r\n ({children, className, disabled = false, forceMount = false, keywords = [], onClick, onMouseEnter, onSelect, value, ...props}, ref) => {\r\n const {activeItemId, disablePointerSelection, isFiltering, isItemVisible, registerItem, selectSpecificItem, unregisterItem} =\r\n useCommandContext(\"CommandItem\");\r\n const groupId = React.useContext(CommandGroupContext);\r\n const generatedId = React.useId();\r\n const itemReference = React.useRef<HTMLDivElement | null>(null);\r\n const keywordSignature = React.useMemo(() => keywords.join(\"\\u0000\"), [keywords]);\r\n\r\n React.useLayoutEffect(() => {\r\n const textValue = value ?? itemReference.current?.textContent?.trim() ?? \"\";\r\n\r\n registerItem({\r\n disabled,\r\n forceMount,\r\n groupId,\r\n id: generatedId,\r\n keywords,\r\n ref: itemReference,\r\n textValue,\r\n value,\r\n });\r\n }, [children, disabled, forceMount, generatedId, groupId, keywordSignature, keywords, registerItem, value]);\r\n\r\n React.useEffect(() => {\r\n return () => {\r\n unregisterItem(generatedId);\r\n };\r\n }, [generatedId, unregisterItem]);\r\n\r\n const isVisible = forceMount || !isFiltering || isItemVisible(generatedId);\r\n\r\n if (!isVisible) {\r\n return null;\r\n }\r\n\r\n const isSelected = activeItemId === generatedId;\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(node) => {\r\n itemReference.current = node;\r\n assignRef(ref, node);\r\n }}\r\n aria-disabled={disabled || undefined}\r\n aria-selected={isSelected}\r\n className={cn(styles.item, className)}\r\n data-disabled={disabled ? \"true\" : undefined}\r\n data-selected={isSelected ? \"true\" : undefined}\r\n id={generatedId}\r\n onClick={(event) => {\r\n if (disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n onSelect?.(value ?? itemReference.current?.textContent?.trim() ?? \"\");\r\n onClick?.(event);\r\n }}\r\n onFocus={() => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n }}\r\n onMouseEnter={(event) => {\r\n onMouseEnter?.(event);\r\n\r\n if (disabled || disablePointerSelection) {\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n }}\r\n role='option'\r\n tabIndex={disabled ? -1 : 0}>\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\nCommandItem.displayName = \"CommandItem\";\r\n\r\n/**\r\n * Renders auxiliary shortcut text aligned to the edge of a command item.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element\r\n * - Built as a lightweight presentational helper for command menus\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandShortcut>⌘K</CommandShortcut>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/HTML/Element/span | HTML span element}\r\n */\r\nconst CommandShortcut = ({className, ...props}: Readonly<React.HTMLAttributes<HTMLSpanElement>>): React.JSX.Element => {\r\n return (\r\n <span\r\n className={cn(styles.shortcut, className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["CommandContext","React","CommandGroupContext","assignRef","ref","value","normalizeCommandValue","defaultCommandFilter","search","keywords","normalizedSearch","normalizedValue","useCommandContext","componentName","context","Error","Command","children","className","_defaultValue","disablePointerSelection","filter","label","loop","onKeyDown","_onValueChange","shouldFilter","_value","_vimBindings","props","activeItemId","setActiveItemId","setSearch","itemOrderReference","itemsReference","Map","itemsVersion","setItemsVersion","listId","registerItem","item","existingItem","nextItem","hasChanged","currentVersion","unregisterItem","itemId","items","firstItem","secondItem","isFiltering","isItemVisible","itemValue","itemFilter","visibleItems","selectableItems","selectSpecificItem","selectNextItem","currentIndex","nextIndex","selectPreviousItem","previousIndex","triggerActiveItem","hasVisibleItemsInGroup","groupId","getVisibleItemCount","contextValue","cn","styles","event","CommandDialog","open","onOpenChange","title","BaseDialog","CommandInput","onChange","onValueChange","isControlled","undefined","inputValue","Search","nextSearchValue","CommandList","CommandEmpty","CommandGroup","forceMount","heading","CommandSeparator","alwaysRender","orientation","BaseSeparator","CommandItem","disabled","onClick","onMouseEnter","onSelect","generatedId","itemReference","keywordSignature","textValue","isVisible","isSelected","node","CommandShortcut"],"mappings":";;;;;;;;AA8MA,MAAMA,iBAAiB,WAAHA,GAAGC,cAAgD;AACvE,MAAMC,sBAAsB,WAAHA,GAAGD,cAAmC;AAE/D,SAASE,UAAkBC,GAA+B,EAAEC,KAAa;IACvE,IAAI,AAAe,cAAf,OAAOD,KAAoB,YAC7BA,IAAIC;IAIN,IAAID,KACFA,IAAI,OAAO,GAAGC;AAElB;AAEA,SAASC,sBAAsBD,KAAa;IAC1C,OAAOA,MAAM,IAAI,GAAG,WAAW;AACjC;AAEA,SAASE,qBAAqBF,KAAa,EAAEG,MAAc,EAAEC,WAAqB,EAAE;IAClF,IAAID,AAAkB,MAAlBA,OAAO,MAAM,EACf,OAAO;IAGT,MAAME,mBAAmBJ,sBAAsBE;IAC/C,MAAMG,kBAAkBL,sBAAsB;QAACD;WAAUI;KAAS,CAAC,IAAI,CAAC;IAExE,OAAOE,gBAAgB,QAAQ,CAACD,oBAAoB,IAAI;AAC1D;AAEA,SAASE,kBAAkBC,aAAqB;IAC9C,MAAMC,UAAUb,WA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,GAAG;AAgB1B,MAAMY,kBAAkB,CAAC,EAACtF,SAAS,EAAE,GAAGW,OAAuD,GACtF,WAAP,GACE,IAAC;QACC,WAAWsC,GAAGC,eAAAA,QAAe,EAAElD;QAC9B,GAAGW,KAAK;;AAIf2E,gBAAgB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/command.js","sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Dialog as BaseDialog} from \"@base-ui/react/dialog\";\r\nimport {Separator as BaseSeparator} from \"@base-ui/react/separator\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./command.module.css\";\r\n\r\ntype CommandFilter = (value: string, search: string, keywords?: string[]) => number;\r\n\r\ninterface CommandProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Command palette content.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible label announced for the command region.\r\n * @default undefined\r\n */\r\n label?: string;\r\n /**\r\n * Whether items should be filtered automatically as the search value changes.\r\n * @default true\r\n */\r\n shouldFilter?: boolean;\r\n /**\r\n * Custom scoring function used to determine whether an item matches the current search value.\r\n * @default undefined\r\n */\r\n filter?: CommandFilter;\r\n /**\r\n * Deprecated uncontrolled search value placeholder retained for API compatibility.\r\n * @default undefined\r\n */\r\n defaultValue?: string;\r\n /**\r\n * Deprecated controlled search value placeholder retained for API compatibility.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Deprecated change callback retained for API compatibility.\r\n * @default undefined\r\n */\r\n onValueChange?: (value: string) => void;\r\n /**\r\n * Whether keyboard navigation should wrap from the last item to the first.\r\n * @default false\r\n */\r\n loop?: boolean;\r\n /**\r\n * Whether pointer hover should avoid changing the active item.\r\n * @default false\r\n */\r\n disablePointerSelection?: boolean;\r\n /**\r\n * Deprecated Vim keybinding toggle retained for API compatibility.\r\n * @default undefined\r\n */\r\n vimBindings?: boolean;\r\n}\r\n\r\ninterface CommandDialogProps extends Omit<React.ComponentPropsWithoutRef<typeof BaseDialog.Root>, \"children\"> {\r\n /**\r\n * Command palette content rendered inside the dialog popup.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible dialog title announced to assistive technologies.\r\n * @default \"Command menu\"\r\n */\r\n title?: React.ReactNode;\r\n}\r\n\r\ninterface CommandInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"onChange\" | \"type\" | \"value\"> {\r\n /**\r\n * Controlled search value.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Native input change handler invoked before the command-specific callback.\r\n * @default undefined\r\n */\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n /**\r\n * Callback fired when the command search value changes.\r\n * @default undefined\r\n */\r\n onValueChange?: (search: string) => void;\r\n}\r\n\r\ninterface CommandListProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Command items and groups.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Accessible label for the listbox container.\r\n * @default undefined\r\n */\r\n label?: string;\r\n}\r\n\r\ninterface CommandGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"value\"> {\r\n /**\r\n * Group contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Optional visual heading displayed above the group items.\r\n * @default undefined\r\n */\r\n heading?: React.ReactNode;\r\n /**\r\n * Optional stable value retained for API compatibility.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Whether the group should remain rendered even when it has no visible items.\r\n * @default false\r\n */\r\n forceMount?: boolean;\r\n}\r\n\r\ninterface CommandSeparatorProps extends React.ComponentPropsWithoutRef<typeof BaseSeparator> {\r\n /**\r\n * Whether the separator should remain visible while filtering is active.\r\n * @default false\r\n */\r\n alwaysRender?: boolean;\r\n}\r\n\r\ninterface CommandItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onSelect\"> {\r\n /**\r\n * Item contents.\r\n * @default undefined\r\n */\r\n children?: React.ReactNode;\r\n /**\r\n * Whether the item is disabled and should be skipped by selection logic.\r\n * @default false\r\n */\r\n disabled?: boolean;\r\n /**\r\n * Callback invoked when the item is selected.\r\n * @default undefined\r\n */\r\n onSelect?: (value: string) => void;\r\n /**\r\n * Optional value used for filtering and selection callbacks.\r\n * @default undefined\r\n */\r\n value?: string;\r\n /**\r\n * Additional search keywords included in the filter match set.\r\n * @default []\r\n */\r\n keywords?: string[];\r\n /**\r\n * Whether the item should remain rendered even when filtered out.\r\n * @default false\r\n */\r\n forceMount?: boolean;\r\n}\r\n\r\ninterface CommandRegisteredItem {\r\n disabled: boolean;\r\n forceMount: boolean;\r\n groupId: string | null;\r\n id: string;\r\n keywords: string[];\r\n order: number;\r\n ref: React.RefObject<HTMLDivElement | null>;\r\n textValue: string;\r\n value?: string;\r\n}\r\n\r\ninterface CommandContextValue {\r\n activeItemId: string | null;\r\n disablePointerSelection: boolean;\r\n getVisibleItemCount: () => number;\r\n hasVisibleItemsInGroup: (groupId: string) => boolean;\r\n isFiltering: boolean;\r\n isItemVisible: (itemId: string) => boolean;\r\n listId: string;\r\n loop: boolean;\r\n registerItem: (item: Omit<CommandRegisteredItem, \"order\">) => void;\r\n search: string;\r\n setSearch: (value: string) => void;\r\n selectNextItem: () => void;\r\n selectPreviousItem: () => void;\r\n selectSpecificItem: (itemId: string | null) => void;\r\n shouldFilter: boolean;\r\n triggerActiveItem: () => void;\r\n unregisterItem: (itemId: string) => void;\r\n}\r\n\r\nconst CommandContext = React.createContext<CommandContextValue | null>(null);\r\nconst CommandGroupContext = React.createContext<string | null>(null);\r\n\r\nfunction assignRef<TValue>(ref: React.ForwardedRef<TValue>, value: TValue): void {\r\n if (typeof ref === \"function\") {\r\n ref(value);\r\n return;\r\n }\r\n\r\n if (ref) {\r\n ref.current = value;\r\n }\r\n}\r\n\r\nfunction normalizeCommandValue(value: string): string {\r\n return value.trim().toLowerCase();\r\n}\r\n\r\nfunction defaultCommandFilter(value: string, search: string, keywords: string[] = []): number {\r\n if (search.length === 0) {\r\n return 1;\r\n }\r\n\r\n const normalizedSearch = normalizeCommandValue(search);\r\n const normalizedValue = normalizeCommandValue([value, ...keywords].join(\" \"));\r\n\r\n return normalizedValue.includes(normalizedSearch) ? 1 : 0;\r\n}\r\n\r\nfunction useCommandContext(componentName: string): CommandContextValue {\r\n const context = React.useContext(CommandContext);\r\n\r\n if (!context) {\r\n throw new Error(`${componentName} must be used within Command.`);\r\n }\r\n\r\n return context;\r\n}\r\n\r\n/**\r\n * Provides a lightweight, filterable command surface without depending on cmdk.\r\n *\r\n * @remarks\r\n * This wrapper preserves the existing compound-component API while replacing the\r\n * underlying implementation with a small context-driven registry. It supports\r\n * text filtering, arrow-key navigation, Enter-to-select, and pointer hover\r\n * selection for common command palette use cases.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Command label='Quick actions'>\r\n * <CommandInput placeholder='Search actions...' />\r\n * <CommandList>\r\n * <CommandItem onSelect={() => console.log(\"Open\")}>Open</CommandItem>\r\n * </CommandList>\r\n * </Command>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog Docs}\r\n */\r\nconst Command = React.forwardRef<HTMLDivElement, CommandProps>(\r\n (\r\n {\r\n children,\r\n className,\r\n defaultValue: _defaultValue,\r\n disablePointerSelection = false,\r\n filter,\r\n label,\r\n loop = false,\r\n onKeyDown,\r\n onValueChange: _onValueChange,\r\n shouldFilter = true,\r\n value: _value,\r\n vimBindings: _vimBindings,\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const [activeItemId, setActiveItemId] = React.useState<string | null>(null);\r\n const [search, setSearch] = React.useState(\"\");\r\n const itemOrderRef = React.useRef(0);\r\n const itemsRef = React.useRef(new Map<string, CommandRegisteredItem>());\r\n const [itemsVersion, setItemsVersion] = React.useState(0);\r\n const listId = React.useId();\r\n\r\n const registerItem = React.useCallback((item: Omit<CommandRegisteredItem, \"order\">): void => {\r\n const existingItem = itemsRef.current.get(item.id);\r\n const nextItem: CommandRegisteredItem = {\r\n ...item,\r\n order: existingItem?.order ?? itemOrderRef.current++,\r\n };\r\n\r\n const hasChanged =\r\n !existingItem\r\n || existingItem.disabled !== nextItem.disabled\r\n || existingItem.forceMount !== nextItem.forceMount\r\n || existingItem.groupId !== nextItem.groupId\r\n || existingItem.keywords.join(\"\\u0000\") !== nextItem.keywords.join(\"\\u0000\")\r\n || existingItem.ref !== nextItem.ref\r\n || existingItem.textValue !== nextItem.textValue\r\n || existingItem.value !== nextItem.value;\r\n\r\n if (!hasChanged) {\r\n return;\r\n }\r\n\r\n itemsRef.current.set(item.id, nextItem);\r\n setItemsVersion((currentVersion) => currentVersion + 1);\r\n }, []);\r\n\r\n const unregisterItem = React.useCallback((itemId: string): void => {\r\n if (!itemsRef.current.delete(itemId)) {\r\n return;\r\n }\r\n\r\n setItemsVersion((currentVersion) => currentVersion + 1);\r\n }, []);\r\n\r\n const items = React.useMemo(() => {\r\n return [...itemsRef.current.values()].toSorted((firstItem, secondItem) => firstItem.order - secondItem.order);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps -- itemsVersion is an intentional change counter\r\n }, [itemsVersion]);\r\n\r\n const isFiltering = shouldFilter && search.trim().length > 0;\r\n\r\n const isItemVisible = React.useCallback(\r\n (itemId: string): boolean => {\r\n const item = itemsRef.current.get(itemId);\r\n\r\n if (!item) {\r\n return false;\r\n }\r\n\r\n if (item.forceMount || !shouldFilter || search.trim().length === 0) {\r\n return true;\r\n }\r\n\r\n const itemValue = item.value ?? item.textValue;\r\n const itemFilter = filter ?? defaultCommandFilter;\r\n\r\n return itemFilter(itemValue, search, item.keywords) > 0;\r\n },\r\n [filter, search, shouldFilter],\r\n );\r\n\r\n const visibleItems = React.useMemo(() => items.filter((item) => isItemVisible(item.id)), [isItemVisible, items]);\r\n\r\n const selectableItems = React.useMemo(() => visibleItems.filter((item) => !item.disabled), [visibleItems]);\r\n\r\n React.useEffect(() => {\r\n if (selectableItems.length === 0) {\r\n // eslint-disable-next-line react-hooks-extra/no-direct-set-state-in-use-effect\r\n setActiveItemId(null);\r\n return;\r\n }\r\n\r\n if (!activeItemId || !selectableItems.some((item) => item.id === activeItemId)) {\r\n // eslint-disable-next-line react-hooks-extra/no-direct-set-state-in-use-effect\r\n setActiveItemId(selectableItems[0].id);\r\n }\r\n }, [activeItemId, selectableItems]);\r\n\r\n React.useEffect(() => {\r\n if (!activeItemId) {\r\n return;\r\n }\r\n\r\n itemsRef.current.get(activeItemId)?.ref.current?.scrollIntoView({\r\n block: \"nearest\",\r\n });\r\n }, [activeItemId]);\r\n\r\n const selectSpecificItem = React.useCallback((itemId: string | null): void => {\r\n setActiveItemId(itemId);\r\n }, []);\r\n\r\n const selectNextItem = React.useCallback((): void => {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n const currentIndex = selectableItems.findIndex((item) => item.id === activeItemId);\r\n\r\n if (currentIndex === -1) {\r\n setActiveItemId(selectableItems[0].id);\r\n return;\r\n }\r\n\r\n const nextIndex = currentIndex + 1;\r\n\r\n if (nextIndex >= selectableItems.length) {\r\n setActiveItemId(loop ? selectableItems[0].id : selectableItems[currentIndex].id);\r\n return;\r\n }\r\n\r\n setActiveItemId(selectableItems[nextIndex].id);\r\n }, [activeItemId, loop, selectableItems]);\r\n\r\n const selectPreviousItem = React.useCallback((): void => {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n const currentIndex = selectableItems.findIndex((item) => item.id === activeItemId);\r\n\r\n if (currentIndex === -1) {\r\n setActiveItemId(selectableItems[0].id);\r\n return;\r\n }\r\n\r\n const previousIndex = currentIndex - 1;\r\n\r\n if (previousIndex < 0) {\r\n setActiveItemId(loop ? (selectableItems.at(-1)?.id ?? selectableItems[0].id) : selectableItems[currentIndex].id);\r\n return;\r\n }\r\n\r\n setActiveItemId(selectableItems[previousIndex].id);\r\n }, [activeItemId, loop, selectableItems]);\r\n\r\n const triggerActiveItem = React.useCallback((): void => {\r\n if (!activeItemId) {\r\n return;\r\n }\r\n\r\n itemsRef.current.get(activeItemId)?.ref.current?.click();\r\n }, [activeItemId]);\r\n\r\n const hasVisibleItemsInGroup = React.useCallback(\r\n (groupId: string): boolean => visibleItems.some((item) => item.groupId === groupId),\r\n [visibleItems],\r\n );\r\n\r\n const getVisibleItemCount = React.useCallback((): number => visibleItems.length, [visibleItems.length]);\r\n\r\n const contextValue = React.useMemo<CommandContextValue>(\r\n () => ({\r\n activeItemId,\r\n disablePointerSelection,\r\n getVisibleItemCount,\r\n hasVisibleItemsInGroup,\r\n isFiltering,\r\n isItemVisible,\r\n listId,\r\n loop,\r\n registerItem,\r\n search,\r\n setSearch,\r\n selectNextItem,\r\n selectPreviousItem,\r\n selectSpecificItem,\r\n shouldFilter,\r\n triggerActiveItem,\r\n unregisterItem,\r\n }),\r\n [\r\n activeItemId,\r\n disablePointerSelection,\r\n getVisibleItemCount,\r\n hasVisibleItemsInGroup,\r\n isFiltering,\r\n isItemVisible,\r\n listId,\r\n loop,\r\n registerItem,\r\n search,\r\n setSearch,\r\n selectNextItem,\r\n selectPreviousItem,\r\n selectSpecificItem,\r\n shouldFilter,\r\n triggerActiveItem,\r\n unregisterItem,\r\n ],\r\n );\r\n\r\n return (\r\n <CommandContext.Provider value={contextValue}>\r\n <div\r\n ref={ref}\r\n aria-label={label}\r\n className={cn(styles.command, className)}\r\n role='toolbar'\r\n onKeyDown={(event) => {\r\n onKeyDown?.(event);\r\n\r\n if (event.defaultPrevented) {\r\n return;\r\n }\r\n\r\n switch (event.key) {\r\n case \"ArrowDown\": {\r\n event.preventDefault();\r\n selectNextItem();\r\n break;\r\n }\r\n\r\n case \"ArrowUp\": {\r\n event.preventDefault();\r\n selectPreviousItem();\r\n break;\r\n }\r\n\r\n case \"Home\": {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n setActiveItemId(selectableItems[0].id);\r\n break;\r\n }\r\n\r\n case \"End\": {\r\n if (selectableItems.length === 0) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n setActiveItemId(selectableItems.at(-1)?.id ?? selectableItems[0].id);\r\n break;\r\n }\r\n\r\n case \"Enter\": {\r\n if (event.nativeEvent.isComposing) {\r\n return;\r\n }\r\n\r\n event.preventDefault();\r\n triggerActiveItem();\r\n break;\r\n }\r\n\r\n default: {\r\n break;\r\n }\r\n }\r\n }}\r\n {...props}>\r\n {children}\r\n </div>\r\n </CommandContext.Provider>\r\n );\r\n },\r\n);\r\nCommand.displayName = \"Command\";\r\n\r\n/**\r\n * Renders the command surface inside a modal dialog.\r\n *\r\n * @remarks\r\n * - Renders a Base UI dialog popup\r\n * - Built on Base UI Dialog primitives\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandDialog open={open} onOpenChange={setOpen}>\r\n * <CommandInput placeholder='Search...' />\r\n * </CommandDialog>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog Docs}\r\n */\r\nfunction CommandDialog({children, open, onOpenChange, title = \"Command menu\", ...props}: Readonly<CommandDialogProps>): React.JSX.Element {\r\n return (\r\n <BaseDialog.Root\r\n open={open}\r\n onOpenChange={onOpenChange}\r\n {...props}>\r\n <BaseDialog.Portal>\r\n <BaseDialog.Backdrop className={styles.backdrop} />\r\n <BaseDialog.Popup className={styles.dialogPopup}>\r\n <BaseDialog.Title className={styles.srOnly}>{title}</BaseDialog.Title>\r\n <Command>{children}</Command>\r\n </BaseDialog.Popup>\r\n </BaseDialog.Portal>\r\n </BaseDialog.Root>\r\n );\r\n}\r\nCommandDialog.displayName = \"CommandDialog\";\r\n\r\n/**\r\n * Provides the searchable input surface for a command palette.\r\n *\r\n * @remarks\r\n * - Renders an `<input>` element inside a wrapper `<div>`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandInput placeholder='Search...' />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/combobox_role | ARIA Combobox Role}\r\n */\r\nconst CommandInput = React.forwardRef<HTMLInputElement, CommandInputProps>(({className, onChange, onValueChange, value, ...props}, ref) => {\r\n const {activeItemId, listId, search, selectSpecificItem, setSearch} = useCommandContext(\"CommandInput\");\r\n const isControlled = value !== undefined;\r\n const inputValue = isControlled ? value : search;\r\n\r\n React.useEffect(() => {\r\n if (!isControlled) {\r\n return;\r\n }\r\n\r\n setSearch(value ?? \"\");\r\n }, [isControlled, setSearch, value]);\r\n\r\n return (\r\n <div className={styles.inputWrapper}>\r\n <Search className={styles.searchIcon} />\r\n <input\r\n ref={ref}\r\n aria-activedescendant={activeItemId ?? undefined}\r\n aria-autocomplete='list'\r\n aria-controls={listId}\r\n aria-expanded='true'\r\n className={cn(styles.input, className)}\r\n onChange={(event) => {\r\n onChange?.(event);\r\n\r\n const nextSearchValue = event.currentTarget.value;\r\n setSearch(nextSearchValue);\r\n onValueChange?.(nextSearchValue);\r\n selectSpecificItem(null);\r\n }}\r\n role='combobox'\r\n type='text'\r\n value={inputValue}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCommandInput.displayName = \"CommandInput\";\r\n\r\n/**\r\n * Renders the listbox container that hosts command items and groups.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"listbox\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandList>\r\n * <CommandItem>Settings</CommandItem>\r\n * </CommandList>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/listbox_role | ARIA Listbox Role}\r\n */\r\nconst CommandList = React.forwardRef<HTMLDivElement, CommandListProps>(({className, label, ...props}, ref) => {\r\n const {listId} = useCommandContext(\"CommandList\");\r\n\r\n return (\r\n <div\r\n aria-label={label}\r\n ref={ref}\r\n className={cn(styles.list, className)}\r\n id={listId}\r\n role='listbox'\r\n {...props}\r\n />\r\n );\r\n});\r\nCommandList.displayName = \"CommandList\";\r\n\r\n/**\r\n * Renders a fallback empty-state message when no command items are visible.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"status\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandEmpty>No results found.</CommandEmpty>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/status_role | ARIA Status Role}\r\n */\r\nconst CommandEmpty = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {getVisibleItemCount} = useCommandContext(\"CommandEmpty\");\r\n\r\n if (getVisibleItemCount() > 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(styles.empty, className)}\r\n role='status'\r\n {...props}\r\n />\r\n );\r\n});\r\nCommandEmpty.displayName = \"CommandEmpty\";\r\n\r\n/**\r\n * Groups related command items under an optional heading.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandGroup heading='Suggestions'>\r\n * <CommandItem>Profile</CommandItem>\r\n * </CommandGroup>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/group_role | ARIA Group Role}\r\n */\r\nconst CommandGroup = React.forwardRef<HTMLDivElement, CommandGroupProps>(\r\n ({children, className, forceMount = false, heading, value: _value, ...props}, ref) => {\r\n const groupId = React.useId();\r\n const {hasVisibleItemsInGroup, isFiltering} = useCommandContext(\"CommandGroup\");\r\n\r\n if (!forceMount && isFiltering && !hasVisibleItemsInGroup(groupId)) {\r\n return null;\r\n }\r\n\r\n return (\r\n <CommandGroupContext.Provider value={groupId}>\r\n <div\r\n ref={ref}\r\n className={cn(styles.group, className)}\r\n data-command-group=''\r\n {...props}>\r\n {heading ? <div className={styles.groupHeading}>{heading}</div> : null}\r\n {children}\r\n </div>\r\n </CommandGroupContext.Provider>\r\n );\r\n },\r\n);\r\nCommandGroup.displayName = \"CommandGroup\";\r\n\r\n/**\r\n * Renders a separator between command groups or item sections.\r\n *\r\n * @remarks\r\n * - Renders the shared separator primitive\r\n * - Built on Base UI Separator\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandSeparator />\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/separator | Base UI Separator Docs}\r\n */\r\nconst CommandSeparator = React.forwardRef<HTMLDivElement, CommandSeparatorProps>(\r\n ({alwaysRender = false, className, orientation = \"horizontal\", ...props}, ref) => {\r\n const {isFiltering} = useCommandContext(\"CommandSeparator\");\r\n\r\n if (isFiltering && !alwaysRender) {\r\n return null;\r\n }\r\n\r\n return (\r\n <BaseSeparator\r\n ref={ref}\r\n className={cn(styles.separator, className)}\r\n orientation={orientation}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\nCommandSeparator.displayName = \"CommandSeparator\";\r\n\r\n/**\r\n * Renders a selectable command option with filtering metadata and keyboard support.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element with `role=\"option\"`\r\n * - Built on the shared command registry context\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandItem keywords={[\"preferences\"]}>Settings</CommandItem>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/option_role | ARIA Option Role}\r\n */\r\nconst CommandItem = React.forwardRef<HTMLDivElement, CommandItemProps>(\r\n ({children, className, disabled = false, forceMount = false, keywords = [], onClick, onMouseEnter, onSelect, value, ...props}, ref) => {\r\n const {activeItemId, disablePointerSelection, isFiltering, isItemVisible, registerItem, selectSpecificItem, unregisterItem} =\r\n useCommandContext(\"CommandItem\");\r\n const groupId = React.useContext(CommandGroupContext);\r\n const generatedId = React.useId();\r\n const itemRef = React.useRef<HTMLDivElement | null>(null);\r\n const keywordSignature = React.useMemo(() => keywords.join(\"\\u0000\"), [keywords]);\r\n\r\n React.useLayoutEffect(() => {\r\n const textValue = value ?? itemRef.current?.textContent?.trim() ?? \"\";\r\n\r\n registerItem({\r\n disabled,\r\n forceMount,\r\n groupId,\r\n id: generatedId,\r\n keywords,\r\n ref: itemRef,\r\n textValue,\r\n value,\r\n });\r\n }, [children, disabled, forceMount, generatedId, groupId, keywordSignature, keywords, registerItem, value]);\r\n\r\n React.useEffect(() => {\r\n return () => {\r\n unregisterItem(generatedId);\r\n };\r\n }, [generatedId, unregisterItem]);\r\n\r\n const isVisible = forceMount || !isFiltering || isItemVisible(generatedId);\r\n\r\n if (!isVisible) {\r\n return null;\r\n }\r\n\r\n const isSelected = activeItemId === generatedId;\r\n\r\n return (\r\n <div\r\n {...props}\r\n ref={(node) => {\r\n itemRef.current = node;\r\n assignRef(ref, node);\r\n }}\r\n aria-disabled={disabled || undefined}\r\n aria-selected={isSelected}\r\n className={cn(styles.item, className)}\r\n data-disabled={disabled ? \"true\" : undefined}\r\n data-selected={isSelected ? \"true\" : undefined}\r\n id={generatedId}\r\n onClick={(event) => {\r\n if (disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n onSelect?.(value ?? itemRef.current?.textContent?.trim() ?? \"\");\r\n onClick?.(event);\r\n }}\r\n onKeyDown={(event) => {\r\n if (disabled) {\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n if (event.key === \"Enter\" || event.key === \" \") {\r\n event.preventDefault();\r\n selectSpecificItem(generatedId);\r\n onSelect?.(value ?? itemRef.current?.textContent?.trim() ?? \"\");\r\n }\r\n }}\r\n onFocus={() => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n }}\r\n onMouseEnter={(event) => {\r\n onMouseEnter?.(event);\r\n\r\n if (disabled || disablePointerSelection) {\r\n return;\r\n }\r\n\r\n selectSpecificItem(generatedId);\r\n }}\r\n role='option'\r\n tabIndex={disabled ? -1 : 0}>\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\nCommandItem.displayName = \"CommandItem\";\r\n\r\n/**\r\n * Renders auxiliary shortcut text aligned to the edge of a command item.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element\r\n * - Built as a lightweight presentational helper for command menus\r\n *\r\n * @example\r\n * ```tsx\r\n * <CommandShortcut>⌘K</CommandShortcut>\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/docs/Web/HTML/Element/span | HTML span element}\r\n */\r\nconst CommandShortcut = ({className, ...props}: Readonly<React.HTMLAttributes<HTMLSpanElement>>): React.JSX.Element => {\r\n return (\r\n <span\r\n className={cn(styles.shortcut, className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["CommandContext","React","CommandGroupContext","assignRef","ref","value","normalizeCommandValue","defaultCommandFilter","search","keywords","normalizedSearch","normalizedValue","useCommandContext","componentName","context","Error","Command","children","className","_defaultValue","disablePointerSelection","filter","label","loop","onKeyDown","_onValueChange","shouldFilter","_value","_vimBindings","props","activeItemId","setActiveItemId","setSearch","itemOrderRef","itemsRef","Map","itemsVersion","setItemsVersion","listId","registerItem","item","existingItem","nextItem","hasChanged","currentVersion","unregisterItem","itemId","items","firstItem","secondItem","isFiltering","isItemVisible","itemValue","itemFilter","visibleItems","selectableItems","selectSpecificItem","selectNextItem","currentIndex","nextIndex","selectPreviousItem","previousIndex","triggerActiveItem","hasVisibleItemsInGroup","groupId","getVisibleItemCount","contextValue","cn","styles","event","CommandDialog","open","onOpenChange","title","BaseDialog","CommandInput","onChange","onValueChange","isControlled","undefined","inputValue","Search","nextSearchValue","CommandList","CommandEmpty","CommandGroup","forceMount","heading","CommandSeparator","alwaysRender","orientation","BaseSeparator","CommandItem","disabled","onClick","onMouseEnter","onSelect","generatedId","itemRef","keywordSignature","textValue","isVisible","isSelected","node","CommandShortcut"],"mappings":";;;;;;;;AA8MA,MAAMA,iBAAiB,W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,UACF;YAGFrC,mBAAmByC;QACrB;QACA,cAAc,CAAC5B;YACb0B,eAAe1B;YAEf,IAAIwB,YAAYzE,yBACd;YAGFoC,mBAAmByC;QACrB;QACA,MAAK;QACL,UAAUJ,WAAW,KAAK;kBACzB5E;;AAGP;AAEF2E,YAAY,WAAW,GAAG;AAgB1B,MAAMY,kBAAkB,CAAC,EAACtF,SAAS,EAAE,GAAGW,OAAuD,GACtF,WAAP,GACE,IAAC;QACC,WAAWsC,GAAGC,eAAAA,QAAe,EAAElD;QAC9B,GAAGW,KAAK;;AAIf2E,gBAAgB,WAAW,GAAG"}
@@ -62,7 +62,7 @@
62
62
 
63
63
  &[data-ending-style], &[data-starting-style] {
64
64
  opacity: 0;
65
- transform: translate(-50%, -50%)scale(.95);
65
+ transform: translate(-50%, -50%) scale(.95);
66
66
  }
67
67
  }
68
68
 
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/command.module.css","webpack://./src/components/ui/command.module.css"],"names":[],"mappings":"AADA;ECEE,sCAAsC;EACtC,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB;;AAEA;EACE,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,+CAA+C;EAC/C,aAAa;EACb,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;EAER;IACE,kBAAkB;EACpB;;EAEA;IACE,UAAU;EACZ;AACF;;AAEA;EACE,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,sBAAsB;EACtB,2BAA2B;EAC3B,4BAA4B;EAC5B,qFAAqF;EACrF,cAAc;EACd,sBAAsB;EACtB,+BAA+B;EAC/B,UAAU;EACV,a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ACjB;;AAEA;EACE,iCAAiC;EACjC,4BAA4B;EAC5B,oBAAoB;EACpB,iBAAiB;AACnB","sourcesContent":[".command{background-color:var(--ac-background);border-radius:var(--ac-radius-md);color:var(--ac-foreground);display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;width:100%}.srOnly{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}.backdrop{background-color:rgba(0,0,0,.5);inset:0;min-height:100dvh;position:fixed;touch-action:none;transition:opacity var(--ac-transition-normal);z-index:9999;@supports (-webkit-touch-callout:none){position:absolute}&[data-ending-style],&[data-starting-style]{opacity:0}}.dialogPopup{background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);box-shadow:0 10px 30px -5px rgba(0,0,0,.1),0 4px 10px -5px rgba(0,0,0,.04);box-sizing:border-box;color:var(--ac-foreground);display:flex;flex-direction:column;left:50%;max-height:min(90vh,44rem);overflow:hidden;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:min(34rem,calc(100vw - 2rem));z-index:10000;&[data-ending-style],&[data-starting-style]{opacity:0;transform:translate(-50%,-50%) scale(.95)}}.inputWrapper{align-items:center;border-bottom:1px solid var(--ac-border);display:flex;padding-inline:var(--ac-space-4)}.searchIcon{flex-shrink:0;height:1.25rem;margin-right:var(--ac-space-3);opacity:.5;width:1.25rem}.input{background-color:transparent;border:0;border-radius:var(--ac-radius-md);color:inherit;font-size:1rem;height:3rem;outline:none;padding-block:var(--ac-space-3);width:100%;&::placeholder{color:var(--ac-muted-foreground)}&:disabled{cursor:not-allowed;opacity:.5}}.list{display:flex;flex:1;flex-direction:column;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:var(--ac-space-2);scroll-padding-block:var(--ac-space-1);-webkit-overflow-scrolling:touch}.empty{font-size:var(--ac-text-sm);padding-block:var(--ac-space-6);text-align:center}.group{color:inherit;overflow:hidden;padding:2px 0;&+.group{border-top:1px solid var(--ac-border);margin-top:2px;padding-top:var(--ac-space-1)}}.groupHeading{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);font-weight:500;letter-spacing:.02em;padding:var(--ac-space-1) var(--ac-space-3)}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) var(--ac-space-1)}.item{align-items:center;border-radius:var(--ac-radius-sm);cursor:pointer;display:flex;font-size:var(--ac-text-sm);gap:var(--ac-space-3);line-height:1.5;outline:none;padding:.5rem var(--ac-space-3);position:relative;transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast);user-select:none}.item[data-selected=true]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled=true]{opacity:.5;pointer-events:none}.item:focus-visible{box-shadow:inset 0 0 0 2px var(--ac-ring)}.item svg{flex-shrink:0;height:1.25rem;pointer-events:none;width:1.25rem}.shortcut{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);letter-spacing:.2em;margin-left:auto}",".command {\n background-color: var(--ac-background);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n flex-direction: column;\n flex: 1;\n width: 100%;\n min-height: 0;\n display: flex;\n overflow: hidden;\n}\n\n.srOnly {\n clip: rect(0,0,0,0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.backdrop {\n touch-action: none;\n min-height: 100dvh;\n transition: opacity var(--ac-transition-normal);\n z-index: 9999;\n background-color: #00000080;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n }\n}\n\n.dialogPopup {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n box-sizing: border-box;\n color: var(--ac-foreground);\n max-height: min(90vh, 44rem);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n z-index: 10000;\n flex-direction: column;\n width: min(34rem, 100vw - 2rem);\n padding: 0;\n display: flex;\n position: fixed;\n top: 50%;\n left: 50%;\n overflow: hidden;\n transform: translate(-50%, -50%);\n box-shadow: 0 10px 30px -5px #0000001a, 0 4px 10px -5px #0000000a;\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n transform: translate(-50%, -50%)scale(.95);\n }\n}\n\n.inputWrapper {\n border-bottom: 1px solid var(--ac-border);\n padding-inline: var(--ac-space-4);\n align-items: center;\n display: flex;\n}\n\n.searchIcon {\n height: 1.25rem;\n margin-right: var(--ac-space-3);\n opacity: .5;\n flex-shrink: 0;\n width: 1.25rem;\n}\n\n.input {\n border-radius: var(--ac-radius-md);\n color: inherit;\n height: 3rem;\n padding-block: var(--ac-space-3);\n background-color: #0000;\n border: 0;\n outline: none;\n width: 100%;\n font-size: 1rem;\n\n &::placeholder {\n color: var(--ac-muted-foreground);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: .5;\n }\n}\n\n.list {\n overscroll-behavior: contain;\n min-height: 0;\n padding: var(--ac-space-2);\n scroll-padding-block: var(--ac-space-1);\n -webkit-overflow-scrolling: touch;\n flex-direction: column;\n flex: 1;\n display: flex;\n overflow: hidden auto;\n}\n\n.empty {\n font-size: var(--ac-text-sm);\n padding-block: var(--ac-space-6);\n text-align: center;\n}\n\n.group {\n color: inherit;\n padding: 2px 0;\n overflow: hidden;\n\n & + .group {\n border-top: 1px solid var(--ac-border);\n padding-top: var(--ac-space-1);\n margin-top: 2px;\n }\n}\n\n.groupHeading {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .02em;\n padding: var(--ac-space-1) var(--ac-space-3);\n font-weight: 500;\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) var(--ac-space-1);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-3);\n padding: .5rem var(--ac-space-3);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n line-height: 1.5;\n display: flex;\n position: relative;\n}\n\n.item[data-selected=\"true\"] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled=\"true\"] {\n opacity: .5;\n pointer-events: none;\n}\n\n.item:focus-visible {\n box-shadow: inset 0 0 0 2px var(--ac-ring);\n}\n\n.item svg {\n pointer-events: none;\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n}\n\n.shortcut {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .2em;\n margin-left: auto;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/command.module.css","webpack://./src/components/ui/command.module.css"],"names":[],"mappings":"AAAA;ECCE,sCAAsC;EACtC,kCAAkC;EAClC,2BAA2B;EAC3B,sBAAsB;EACtB,OAAO;EACP,WAAW;EACX,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB;;ADV8L;ECa5L,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB;;ADtBkU;ECyBhU,kBAAkB;EAClB,kBAAkB;EAClB,+CAA+C;EAC/C,aAAa;EACb,2BAA2B;EAC3B,eAAe;EACf,QAAQ;;ED/Byd;IAAuC,kBAAA;ECmCxgB;;EDnC0hB;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EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,gCAAgC;EAChC,sFAAsF;EACtF,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;EACb,gBAAgB;EAChB,aAAa;EACb,kBAAkB;AACpB;;ADlKwqF;ECqKtqF,kCAAkC;EAClC,kCAAkC;AACpC;;ADvKswF;EC0KpwF,WAAW;EACX,oBAAoB;AACtB;;AD5K+zF;EC+K7zF,0CAA0C;AAC5C;;ADhL63F;ECmL33F,oBAAoB;EACpB,cAAc;EACd,cAAc;EACd,eAAe;AACjB;;ADvLs8F;EC0Lp8F,iCAAiC;EACjC,4BAA4B;EAC5B,oBAAoB;EACpB,iBAAiB;AACnB","sourcesContent":[".command{background-color:var(--ac-background);border-radius:var(--ac-radius-md);color:var(--ac-foreground);display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;width:100%}.srOnly{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}.backdrop{background-color:rgba(0,0,0,.5);inset:0;min-height:100dvh;position:fixed;touch-action:none;transition:opacity var(--ac-transition-normal);z-index:9999;@supports (-webkit-touch-callout:none){position:absolute}&[data-ending-style],&[data-starting-style]{opacity:0}}.dialogPopup{background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);box-shadow:0 10px 30px -5px rgba(0,0,0,.1),0 4px 10px -5px rgba(0,0,0,.04);box-sizing:border-box;color:var(--ac-foreground);display:flex;flex-direction:column;left:50%;max-height:min(90vh,44rem);overflow:hidden;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:min(34rem,calc(100vw - 2rem));z-index:10000;&[data-ending-style],&[data-starting-style]{opacity:0;transform:translate(-50%,-50%) scale(.95)}}.inputWrapper{align-items:center;border-bottom:1px solid var(--ac-border);display:flex;padding-inline:var(--ac-space-4)}.searchIcon{flex-shrink:0;height:1.25rem;margin-right:var(--ac-space-3);opacity:.5;width:1.25rem}.input{background-color:transparent;border:0;border-radius:var(--ac-radius-md);color:inherit;font-size:1rem;height:3rem;outline:none;padding-block:var(--ac-space-3);width:100%;&::placeholder{color:var(--ac-muted-foreground)}&:disabled{cursor:not-allowed;opacity:.5}}.list{display:flex;flex:1;flex-direction:column;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:var(--ac-space-2);scroll-padding-block:var(--ac-space-1);-webkit-overflow-scrolling:touch}.empty{font-size:var(--ac-text-sm);padding-block:var(--ac-space-6);text-align:center}.group{color:inherit;overflow:hidden;padding:2px 0;&+.group{border-top:1px solid var(--ac-border);margin-top:2px;padding-top:var(--ac-space-1)}}.groupHeading{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);font-weight:500;letter-spacing:.02em;padding:var(--ac-space-1) var(--ac-space-3)}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) var(--ac-space-1)}.item{align-items:center;border-radius:var(--ac-radius-sm);cursor:pointer;display:flex;font-size:var(--ac-text-sm);gap:var(--ac-space-3);line-height:1.5;outline:none;padding:.5rem var(--ac-space-3);position:relative;transition:background-color var(--ac-transition-fast),color var(--ac-transition-fast);user-select:none}.item[data-selected=true]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled=true]{opacity:.5;pointer-events:none}.item:focus-visible{box-shadow:inset 0 0 0 2px var(--ac-ring)}.item svg{flex-shrink:0;height:1.25rem;pointer-events:none;width:1.25rem}.shortcut{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);letter-spacing:.2em;margin-left:auto}",".command {\n background-color: var(--ac-background);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n flex-direction: column;\n flex: 1;\n width: 100%;\n min-height: 0;\n display: flex;\n overflow: hidden;\n}\n\n.srOnly {\n clip: rect(0,0,0,0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.backdrop {\n touch-action: none;\n min-height: 100dvh;\n transition: opacity var(--ac-transition-normal);\n z-index: 9999;\n background-color: #00000080;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n }\n}\n\n.dialogPopup {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n box-sizing: border-box;\n color: var(--ac-foreground);\n max-height: min(90vh, 44rem);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n z-index: 10000;\n flex-direction: column;\n width: min(34rem, 100vw - 2rem);\n padding: 0;\n display: flex;\n position: fixed;\n top: 50%;\n left: 50%;\n overflow: hidden;\n transform: translate(-50%, -50%);\n box-shadow: 0 10px 30px -5px #0000001a, 0 4px 10px -5px #0000000a;\n\n &[data-ending-style], &[data-starting-style] {\n opacity: 0;\n transform: translate(-50%, -50%) scale(.95);\n }\n}\n\n.inputWrapper {\n border-bottom: 1px solid var(--ac-border);\n padding-inline: var(--ac-space-4);\n align-items: center;\n display: flex;\n}\n\n.searchIcon {\n height: 1.25rem;\n margin-right: var(--ac-space-3);\n opacity: .5;\n flex-shrink: 0;\n width: 1.25rem;\n}\n\n.input {\n border-radius: var(--ac-radius-md);\n color: inherit;\n height: 3rem;\n padding-block: var(--ac-space-3);\n background-color: #0000;\n border: 0;\n outline: none;\n width: 100%;\n font-size: 1rem;\n\n &::placeholder {\n color: var(--ac-muted-foreground);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: .5;\n }\n}\n\n.list {\n overscroll-behavior: contain;\n min-height: 0;\n padding: var(--ac-space-2);\n scroll-padding-block: var(--ac-space-1);\n -webkit-overflow-scrolling: touch;\n flex-direction: column;\n flex: 1;\n display: flex;\n overflow: hidden auto;\n}\n\n.empty {\n font-size: var(--ac-text-sm);\n padding-block: var(--ac-space-6);\n text-align: center;\n}\n\n.group {\n color: inherit;\n padding: 2px 0;\n overflow: hidden;\n\n & + .group {\n border-top: 1px solid var(--ac-border);\n padding-top: var(--ac-space-1);\n margin-top: 2px;\n }\n}\n\n.groupHeading {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .02em;\n padding: var(--ac-space-1) var(--ac-space-3);\n font-weight: 500;\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) var(--ac-space-1);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-3);\n padding: .5rem var(--ac-space-3);\n transition: background-color var(--ac-transition-fast),color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n line-height: 1.5;\n display: flex;\n position: relative;\n}\n\n.item[data-selected=\"true\"] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled=\"true\"] {\n opacity: .5;\n pointer-events: none;\n}\n\n.item:focus-visible {\n box-shadow: inset 0 0 0 2px var(--ac-ring);\n}\n\n.item svg {\n pointer-events: none;\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n}\n\n.shortcut {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .2em;\n margin-left: auto;\n}\n"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,IAAI,eAAe,EAAC,MAAM,6BAA6B,CAAC;AAE3E,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,gBAAiB,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;CAAG;AAE9F,UAAU,uBAAwB,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAA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f,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,CAAC"}
@@ -4,9 +4,9 @@ import { ContextMenu } from "@base-ui/react/context-menu";
4
4
  import { mergeProps } from "@base-ui/react/merge-props";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
  import { Check, ChevronRight, Circle } from "lucide-react";
7
- import { forwardRef, isValidElement } from "react";
8
7
  import { cn } from "../../lib/utilities.js";
9
8
  import context_menu_module from "./context-menu.module.js";
9
+ import * as __rspack_external_react from "react";
10
10
  function context_menu_ContextMenu(props) {
11
11
  return /*#__PURE__*/ jsx(ContextMenu.Root, {
12
12
  ...props
@@ -16,9 +16,9 @@ const ContextMenuGroup = ContextMenu.Group;
16
16
  const ContextMenuPortal = ContextMenu.Portal;
17
17
  const ContextMenuRadioGroup = ContextMenu.RadioGroup;
18
18
  const ContextMenuSub = ContextMenu.SubmenuRoot;
19
- const ContextMenuTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
19
+ const ContextMenuTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
20
20
  const { asChild = false, children, className, render, ...otherProps } = props;
21
- const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
21
+ const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
22
22
  return /*#__PURE__*/ jsx(ContextMenu.Trigger, {
23
23
  ref: ref,
24
24
  ...otherProps,
@@ -73,7 +73,7 @@ function ContextMenuSubContent(props) {
73
73
  })
74
74
  });
75
75
  }
76
- const ContextMenuContent = /*#__PURE__*/ forwardRef((props, ref)=>{
76
+ const ContextMenuContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
77
77
  const { className, children, render, ...otherProps } = props;
78
78
  return /*#__PURE__*/ jsx(ContextMenuPortal, {
79
79
  children: /*#__PURE__*/ jsx(ContextMenu.Positioner, {
@@ -100,7 +100,7 @@ const ContextMenuContent = /*#__PURE__*/ forwardRef((props, ref)=>{
100
100
  });
101
101
  function ContextMenuItem(props) {
102
102
  const { asChild = false, children, className, inset = false, render, ...otherProps } = props;
103
- const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
103
+ const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
104
104
  return /*#__PURE__*/ jsx(ContextMenu.Item, {
105
105
  ...otherProps,
106
106
  render: useRender({
@@ -190,7 +190,7 @@ function ContextMenuSeparator(props) {
190
190
  }
191
191
  function ContextMenuShortcut(props) {
192
192
  const { asChild = false, children, className, render, ...otherProps } = props;
193
- const renderProp = asChild && /*#__PURE__*/ isValidElement(children) ? children : render;
193
+ const renderProp = asChild && /*#__PURE__*/ __rspack_external_react.isValidElement(children) ? children : render;
194
194
  return useRender({
195
195
  defaultTagName: "span",
196
196
  render: renderProp,
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/context-menu.js","sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {ContextMenu as BaseContextMenu} from \"@base-ui/react/context-menu\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./context-menu.module.css\";\r\n\r\ninterface ContextMenuProps extends React.ComponentPropsWithRef<typeof BaseContextMenu.Root> {}\r\n\r\ninterface ContextMenuTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface ContextMenuSubTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.SubmenuTrigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Positioner>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Item>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface ContextMenuCheckboxItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.CheckboxItem>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuRadioItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.RadioItem>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuLabelProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.GroupLabel>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuSeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Separator>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuShortcutProps extends React.ComponentPropsWithRef<\"span\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\n/**\r\n * Coordinates context menu state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenu>Content</ContextMenu>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenu(props: Readonly<ContextMenu.Props>): React.ReactElement {\r\n return <BaseContextMenu.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the context menu group.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuGroup>Content</ContextMenuGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuGroup = BaseContextMenu.Group;\r\n/**\r\n * Provides the context menu portal container.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuPortal>Content</ContextMenuPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuPortal = BaseContextMenu.Portal;\r\n/**\r\n * Coordinates the context menu radio group.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioGroup>Content</ContextMenuRadioGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuRadioGroup = BaseContextMenu.RadioGroup;\r\n/**\r\n * Coordinates the context menu sub.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSub>Content</ContextMenuSub>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuSub: typeof BaseContextMenu.SubmenuRoot & {displayName?: string} = BaseContextMenu.SubmenuRoot;\r\n\r\n/**\r\n * Renders the context menu trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuTrigger>Content</ContextMenuTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuTrigger = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Trigger>, ContextMenuTrigger.Props>(\r\n (props: Readonly<ContextMenuTrigger.Props>, ref): React.ReactElement => {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseContextMenu.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu sub trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubTrigger>Content</ContextMenuSubTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubTrigger(props: Readonly<ContextMenuSubTrigger.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.SubmenuTrigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.subTrigger, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronRight className={styles.subTriggerIcon} />\r\n </BaseContextMenu.SubmenuTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu sub content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubContent>Content</ContextMenuSubContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubContent(props: Readonly<ContextMenuContent.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuContent>Content</ContextMenuContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuContent = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Popup>, ContextMenuContent.Props>(\r\n (props: Readonly<ContextMenuContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <ContextMenuPortal>\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n </ContextMenuPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuItem>Content</ContextMenuItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuItem(props: Readonly<ContextMenuItem.Props>): React.ReactElement {\r\n const {asChild = false, children, className, inset = false, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseContextMenu.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.item, inset && styles.inset, className)}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Item>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu checkbox item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuCheckboxItem>Content</ContextMenuCheckboxItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuCheckboxItem(props: Readonly<ContextMenuCheckboxItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.CheckboxItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.CheckboxItemIndicator>\r\n <Check className={styles.indicatorIcon} />\r\n </BaseContextMenu.CheckboxItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.CheckboxItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu radio item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioItem>Content</ContextMenuRadioItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuRadioItem(props: Readonly<ContextMenuRadioItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.RadioItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.RadioItemIndicator>\r\n <Circle className={styles.radioIndicatorIcon} />\r\n </BaseContextMenu.RadioItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.RadioItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu label.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuLabel>Content</ContextMenuLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuLabel(props: Readonly<ContextMenuLabel.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.GroupLabel>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu separator.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSeparator>Content</ContextMenuSeparator>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSeparator(props: Readonly<ContextMenuSeparator.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.separator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu shortcut.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuShortcut>Content</ContextMenuShortcut>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuShortcut(props: Readonly<ContextMenuShortcut.Props>): React.ReactElement {\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"span\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.shortcut, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenu {\r\n export type Props = ContextMenuProps;\r\n export type State = BaseContextMenu.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuTrigger {\r\n export type Props = ContextMenuTriggerProps;\r\n export type State = BaseContextMenu.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubTrigger {\r\n export type Props = ContextMenuSubTriggerProps;\r\n export type State = BaseContextMenu.SubmenuTrigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuItem {\r\n export type Props = ContextMenuItemProps;\r\n export type State = BaseContextMenu.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuCheckboxItem {\r\n export type Props = ContextMenuCheckboxItemProps;\r\n export type State = BaseContextMenu.CheckboxItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuRadioItem {\r\n export type Props = ContextMenuRadioItemProps;\r\n export type State = BaseContextMenu.RadioItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuLabel {\r\n export type Props = ContextMenuLabelProps;\r\n export type State = BaseContextMenu.GroupLabel.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSeparator {\r\n export type Props = ContextMenuSeparatorProps;\r\n export type State = BaseContextMenu.Separator.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuShortcut {\r\n export type Props = ContextMenuShortcutProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\nContextMenu.displayName = \"ContextMenu\";\r\nContextMenuGroup.displayName = \"ContextMenuGroup\";\r\nContextMenuPortal.displayName = \"ContextMenuPortal\";\r\nContextMenuRadioGroup.displayName = \"ContextMenuRadioGroup\";\r\nContextMenuSub.displayName = \"ContextMenuSub\";\r\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\r\nContextMenuSubTrigger.displayName = \"ContextMenuSubTrigger\";\r\nContextMenuSubContent.displayName = \"ContextMenuSubContent\";\r\nContextMenuContent.displayName = \"ContextMenuContent\";\r\nContextMenuItem.displayName = \"ContextMenuItem\";\r\nContextMenuCheckboxItem.displayName = \"ContextMenuCheckboxItem\";\r\nContextMenuRadioItem.displayName = \"ContextMenuRadioItem\";\r\nContextMenuLabel.displayName = \"ContextMenuLabel\";\r\nContextMenuSeparator.displayName = \"ContextMenuSeparator\";\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","props","BaseContextMenu","ContextMenuGroup","ContextMenuPortal","ContextMenuRadioGroup","ContextMenuSub","ContextMenuTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","ContextMenuSubTrigger","inset","cn","styles","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;;;;AA0IA,SAASA,yBAAYC,KAAkC;IACrD,OAAO,WAAP,GAAO,IAACC,YAAAA,IAAoB;QAAE,GAAGD,KAAK;;AACxC;AAiBA,MAAME,mBAAmBD,YAAAA,KAAqB;AAgB9C,MAAME,oBAAoBF,YAAAA,MAAsB;AAgBhD,MAAMG,wBAAwBH,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;AAGP;AAiBA,SAASqB,qBAAqB/B,KAA2C;IACvE,MAAM,EAACW,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGb;IAE3C,OAAO,WAAP,GACE,IAACC,YAAAA,SAAyB;QACvB,GAAGY,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWI,GAAGC,oBAAAA,SAAgB,EAAEV;YAAU,GAAG,CAAC;QACnE;;AAGN;AAiBA,SAASqB,oBAAoBhC,KAA0C;IACrE,MAAM,EAACS,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGb;IACtE,MAAMc,aAAaL,WAAW,WAAXA,GAAWF,eAAqBG,YAAYA,WAAWE;IAE1E,OAAOG,UAAU;QACf,gBAAgB;QAChB,QAAQD;QACR,OAAOE,WAAW;YAAC,WAAWI,GAAGC,oBAAAA,QAAe,EAAEV;QAAU,GAAGE,YAAY;YACzE,UAAUC,aAAaG,SAAYP;QACrC;IACF;AACF;AAoEAX,yBAAY,WAAW,GAAG;AAC1BG,iBAAiB,WAAW,GAAG;AAC/BC,kBAAkB,WAAW,GAAG;AAChCC,sBAAsB,WAAW,GAAG;AACpCC,eAAe,WAAW,GAAG;AAC7BC,mBAAmB,WAAW,GAAG;AACjCY,sBAAsB,WAAW,GAAG;AACpCK,sBAAsB,WAAW,GAAG;AACpCC,mBAAmB,WAAW,GAAG;AACjCC,gBAAgB,WAAW,GAAG;AAC9BC,wBAAwB,WAAW,GAAG;AACtCE,qBAAqB,WAAW,GAAG;AACnCE,iBAAiB,WAAW,GAAG;AAC/BC,qBAAqB,WAAW,GAAG;AACnCC,oBAAoB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/context-menu.js","sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {ContextMenu as BaseContextMenu} from \"@base-ui/react/context-menu\";\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./context-menu.module.css\";\r\n\r\ninterface ContextMenuProps extends React.ComponentPropsWithRef<typeof BaseContextMenu.Root> {}\r\n\r\ninterface ContextMenuTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Trigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface ContextMenuSubTriggerProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.SubmenuTrigger>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuContentProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Positioner>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Item>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\ninterface ContextMenuCheckboxItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.CheckboxItem>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuRadioItemProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.RadioItem>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuLabelProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.GroupLabel>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Applies inset spacing to align nested content.\r\n * @default false\r\n */\r\n inset?: boolean;\r\n}\r\n\r\ninterface ContextMenuSeparatorProps extends Omit<React.ComponentPropsWithRef<typeof BaseContextMenu.Separator>, \"className\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n}\r\n\r\ninterface ContextMenuShortcutProps extends React.ComponentPropsWithRef<\"span\"> {\r\n /**\r\n * Applies additional CSS classes to the component root element.\r\n * @default undefined\r\n */\r\n className?: string;\r\n /**\r\n * Overrides the default rendered element while preserving component behavior.\r\n * @default undefined\r\n */\r\n render?: useRender.RenderProp<Record<string, never>>;\r\n /**\r\n * Enables child element composition instead of rendering the default wrapper.\r\n * @default false\r\n * @deprecated Prefer Base UI's `render` prop.\r\n */\r\n asChild?: boolean;\r\n}\r\n\r\n/**\r\n * Coordinates context menu state and accessibility behavior.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenu>Content</ContextMenu>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenu(props: Readonly<ContextMenu.Props>): React.ReactElement {\r\n return <BaseContextMenu.Root {...props} />;\r\n}\r\n\r\n/**\r\n * Renders the context menu group.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuGroup>Content</ContextMenuGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuGroup = BaseContextMenu.Group;\r\n/**\r\n * Provides the context menu portal container.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuPortal>Content</ContextMenuPortal>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuPortal = BaseContextMenu.Portal;\r\n/**\r\n * Coordinates the context menu radio group.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioGroup>Content</ContextMenuRadioGroup>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuRadioGroup = BaseContextMenu.RadioGroup;\r\n/**\r\n * Coordinates the context menu sub.\r\n *\r\n * @remarks\r\n * - Delegates structure and state to the underlying Base UI primitive\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Preserves the underlying primitive API for advanced composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSub>Content</ContextMenuSub>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuSub: typeof BaseContextMenu.SubmenuRoot & {displayName?: string} = BaseContextMenu.SubmenuRoot;\r\n\r\n/**\r\n * Renders the context menu trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuTrigger>Content</ContextMenuTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuTrigger = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Trigger>, ContextMenuTrigger.Props>(\r\n (props: Readonly<ContextMenuTrigger.Props>, ref): React.ReactElement => {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseContextMenu.Trigger\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Trigger>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu sub trigger.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubTrigger>Content</ContextMenuSubTrigger>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubTrigger(props: Readonly<ContextMenuSubTrigger.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.SubmenuTrigger\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.subTrigger, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n <ChevronRight className={styles.subTriggerIcon} />\r\n </BaseContextMenu.SubmenuTrigger>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu sub content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSubContent>Content</ContextMenuSubContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSubContent(props: Readonly<ContextMenuContent.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu content.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuContent>Content</ContextMenuContent>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nconst ContextMenuContent = React.forwardRef<React.ComponentRef<typeof BaseContextMenu.Popup>, ContextMenuContent.Props>(\r\n (props: Readonly<ContextMenuContent.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <ContextMenuPortal>\r\n <BaseContextMenu.Positioner\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n props: mergeProps({className: styles.positioner}, {}),\r\n })}>\r\n <BaseContextMenu.Popup\r\n ref={ref}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.content, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.Popup>\r\n </BaseContextMenu.Positioner>\r\n </ContextMenuPortal>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the context menu item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuItem>Content</ContextMenuItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuItem(props: Readonly<ContextMenuItem.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, inset = false, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return (\r\n <BaseContextMenu.Item\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.item, inset && styles.inset, className)}, {}),\r\n })}>\r\n {renderProp ? undefined : children}\r\n </BaseContextMenu.Item>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu checkbox item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuCheckboxItem>Content</ContextMenuCheckboxItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuCheckboxItem(props: Readonly<ContextMenuCheckboxItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.CheckboxItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.CheckboxItemIndicator>\r\n <Check className={styles.indicatorIcon} />\r\n </BaseContextMenu.CheckboxItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.CheckboxItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu radio item.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuRadioItem>Content</ContextMenuRadioItem>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuRadioItem(props: Readonly<ContextMenuRadioItem.Props>): React.ReactElement {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.RadioItem\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.item, styles.indicatorItem, className)}, {}),\r\n })}>\r\n <span className={styles.indicatorSlot}>\r\n <BaseContextMenu.RadioItemIndicator>\r\n <Circle className={styles.radioIndicatorIcon} />\r\n </BaseContextMenu.RadioItemIndicator>\r\n </span>\r\n {children}\r\n </BaseContextMenu.RadioItem>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu label.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuLabel>Content</ContextMenuLabel>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuLabel(props: Readonly<ContextMenuLabel.Props>): React.ReactElement {\r\n const {className, children, inset = false, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.GroupLabel\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.label, inset && styles.inset, className)}, {}),\r\n })}>\r\n {children}\r\n </BaseContextMenu.GroupLabel>\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu separator.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuSeparator>Content</ContextMenuSeparator>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuSeparator(props: Readonly<ContextMenuSeparator.Props>): React.ReactElement {\r\n const {className, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseContextMenu.Separator\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.separator, className)}, {}),\r\n })}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Renders the context menu shortcut.\r\n *\r\n * @remarks\r\n * - Renders a `<span>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/context-menu | Base UI Context Menu}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ContextMenuShortcut>Content</ContextMenuShortcut>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/context-menu | Base UI Documentation}\r\n */\r\nfunction ContextMenuShortcut(props: Readonly<ContextMenuShortcut.Props>): React.ReactElement {\r\n // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API\r\n const {asChild = false, children, className, render, ...otherProps} = props;\r\n const renderProp = asChild && React.isValidElement(children) ? children : render;\r\n\r\n return useRender({\r\n defaultTagName: \"span\",\r\n render: renderProp as never,\r\n props: mergeProps({className: cn(styles.shortcut, className)}, otherProps, {\r\n children: renderProp ? undefined : children,\r\n }),\r\n });\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenu {\r\n export type Props = ContextMenuProps;\r\n export type State = BaseContextMenu.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuTrigger {\r\n export type Props = ContextMenuTriggerProps;\r\n export type State = BaseContextMenu.Trigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubTrigger {\r\n export type Props = ContextMenuSubTriggerProps;\r\n export type State = BaseContextMenu.SubmenuTrigger.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSubContent {\r\n export type Props = ContextMenuContentProps;\r\n export type State = BaseContextMenu.Popup.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuItem {\r\n export type Props = ContextMenuItemProps;\r\n export type State = BaseContextMenu.Item.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuCheckboxItem {\r\n export type Props = ContextMenuCheckboxItemProps;\r\n export type State = BaseContextMenu.CheckboxItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuRadioItem {\r\n export type Props = ContextMenuRadioItemProps;\r\n export type State = BaseContextMenu.RadioItem.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuLabel {\r\n export type Props = ContextMenuLabelProps;\r\n export type State = BaseContextMenu.GroupLabel.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuSeparator {\r\n export type Props = ContextMenuSeparatorProps;\r\n export type State = BaseContextMenu.Separator.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ContextMenuShortcut {\r\n export type Props = ContextMenuShortcutProps;\r\n export type State = Record<string, never>;\r\n}\r\n\r\nContextMenu.displayName = \"ContextMenu\";\r\nContextMenuGroup.displayName = \"ContextMenuGroup\";\r\nContextMenuPortal.displayName = \"ContextMenuPortal\";\r\nContextMenuRadioGroup.displayName = \"ContextMenuRadioGroup\";\r\nContextMenuSub.displayName = \"ContextMenuSub\";\r\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\r\nContextMenuSubTrigger.displayName = \"ContextMenuSubTrigger\";\r\nContextMenuSubContent.displayName = \"ContextMenuSubContent\";\r\nContextMenuContent.displayName = \"ContextMenuContent\";\r\nContextMenuItem.displayName = \"ContextMenuItem\";\r\nContextMenuCheckboxItem.displayName = \"ContextMenuCheckboxItem\";\r\nContextMenuRadioItem.displayName = \"ContextMenuRadioItem\";\r\nContextMenuLabel.displayName = \"ContextMenuLabel\";\r\nContextMenuSeparator.displayName = \"ContextMenuSeparator\";\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","props","BaseContextMenu","ContextMenuGroup","ContextMenuPortal","ContextMenuRadioGroup","ContextMenuSub","ContextMenuTrigger","React","ref","asChild","children","className","render","otherProps","renderProp","useRender","mergeProps","undefined","ContextMenuSubTrigger","inset","cn","styles","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;;;;AA0IA,SAASA,yBAAYC,KAAkC;IACrD,OAAO,WAAP,GAAO,IAACC,YAAAA,IAAoB;QAAE,GAAGD,KAAK;;AACxC;AAiBA,MAAME,mBAAmBD,YAAAA,KAAqB;AAgB9C,MAAME,oBAAoBF,YAAAA,MAAsB;AAgBhD,MAAMG,wBAAwBH,YAAAA,UAA0B;AAgBxD,MAAMI,iBAA8EJ,YAAAA,WAA2B;AAiB/G,MAAMK,qBAAqB,WAAHA,GAAGC,wBAAAA,UAAgB,CACzC,CAACP,OAA2CQ;IAE1C,MAAM,EAACC,UAAU,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGb;IACtE,MAAMc,aAAaL,WAAW,WAAXA,GAAWF,wBAAAA,cAAoB,CAACG,YAAYA,WAAWE;IAE1E,OAAO,WAAP,GACE,IAACX,YAAAA,OAAuB;QACtB,KAAKO;QACJ,GAAGK,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQD;YACR,OAAOE,WAAW;gBAACL;YAAS,GAAG,CAAC;QAClC;kBACCG,aAAaG,SAAYP;;AAGhC;AAkBF,SAASQ,sBAAsBlB,KAA4C;IACzE,MAAM,EAACW,SAAS,EAAED,QAAQ,EAAES,QAAQ,KAAK,EAAEP,MAAM,EAAE,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;QACR,OAAOE,WAAW;YAAC,WAAWI,GAAGC,oBAAAA,QAAe,EAAEV;QAAU,GAAGE,YAAY;YACzE,UAAUC,aAAaG,SAAYP;QACrC;IACF;AACF;AAoEAX,yBAAY,WAAW,GAAG;AAC1BG,iBAAiB,WAAW,GAAG;AAC/BC,kBAAkB,WAAW,GAAG;AAChCC,sBAAsB,WAAW,GAAG;AACpCC,eAAe,WAAW,GAAG;AAC7BC,mBAAmB,WAAW,GAAG;AACjCY,sBAAsB,WAAW,GAAG;AACpCK,sBAAsB,WAAW,GAAG;AACpCC,mBAAmB,WAAW,GAAG;AACjCC,gBAAgB,WAAW,GAAG;AAC9BC,wBAAwB,WAAW,GAAG;AACtCE,qBAAqB,WAAW,GAAG;AACnCE,iBAAiB,WAAW,GAAG;AAC/BC,qBAAqB,WAAW,GAAG;AACnCC,oBAAoB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/context-menu.module.css","webpack://./src/components/ui/context-menu.module.css"],"names":[],"mappings":"AADA;ECEE,WAAW;AACb;;AAEA;EACE,mCAAmC;EACnC,kCAAkC;EAClC,kCAAkC;EAClC,mCAAmC;EACnC,mCAAmC;EACnC,gBAAgB;EAChB,0BAA0B;EAC1B,yCAAyC;EACzC,qFAAqF;EACrF,qBAAqB;EACrB,uCAAuC;AACzC;;AAEA;EACE,UAAU;EACV,qBAAqB;AACvB;;AAEA;EACE,kCAAkC;EAClC,cAAc;EACd,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,kCAAkC;EAClC,4CAA4C;EAC5C,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;EACb,WAAW;EACX,aAAa;AACf;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,WAAW;EACX,oBAAoB;AACtB;;AAEA;EACE,gCAAgC;AAClC;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;AACpC;;AAEA;EACE,cAAc;EACd,WAAW;EACX,YAAY;EACZ,iBAAiB;AACnB;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,YAAY;EACZ,uBAAuB;EACvB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,oBAAoB;EACpB,kBAAkB;AACpB;;AAEA;EACE,cAAc;EACd,eAAe;AACjB;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,2BAA2B;EAC3B,4BAA4B;EAC5B,4CAA4C;EAC5C,gBAAgB;AAClB;;AAEA;EACE,+CAA+C;AACjD;;AAEA;EACE,kCAAkC;EAClC,WAAW;EACX,oDAAoD;AACtD;;AAEA;EACE,iCAAiC;EACjC,4BAA4B;EAC5B,qBAAqB;EACrB,iBAAiB;AACnB","sourcesContent":[".positioner{z-index:50}.content{background-color:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);max-height:var(--available-height);min-width:12rem;overflow-x:hidden;overflow-y:auto;padding:var(--ac-space-1);transform-origin:var(--transform-origin);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal)}.content[data-ending-style],.content[data-starting-style]{opacity:0;transform:scale(.96)}.item{align-items:center;border-radius:var(--ac-radius-sm);color:inherit;cursor:default;display:flex;font-size:var(--ac-text-sm);gap:var(--ac-space-2);min-height:var(--ac-size-default);outline:none;padding:var(--ac-space-1) var(--ac-space-2);user-select:none;width:100%}.item[data-highlighted]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled]{opacity:.5;pointer-events:none}.subTrigger{padding-right:var(--ac-space-3)}.subTrigger[data-popup-open]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.subTriggerIcon{flex-shrink:0;height:1rem;margin-left:auto;width:1rem}.indicatorItem{padding-left:calc(var(--ac-space-2) + 1.25rem)}.indicatorSlot{align-items:center;display:inline-flex;height:1rem;justify-content:center;left:var(--ac-space-2);position:absolute;width:1rem}.indicatorIcon,.radioIndicatorIcon{height:.875rem;width:.875rem}.radioIndicatorIcon{fill:currentcolor}.label{color:var(--ac-foreground);font-size:var(--ac-text-sm);font-weight:600;padding:var(--ac-space-1) var(--ac-space-2)}.inset{padding-left:calc(var(--ac-space-2) + 1.25rem)}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) calc(var(--ac-space-1)*-1)}.shortcut{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);letter-spacing:.08em;margin-left:auto}",".positioner {\n z-index: 50;\n}\n\n.content {\n background-color: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-popover-foreground);\n max-height: var(--available-height);\n min-width: 12rem;\n padding: var(--ac-space-1);\n transform-origin: var(--transform-origin);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n overflow: hidden auto;\n box-shadow: 0 16px 40px -16px #00000059;\n}\n\n.content[data-ending-style], .content[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n color: inherit;\n cursor: default;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-2);\n min-height: var(--ac-size-default);\n padding: var(--ac-space-1) var(--ac-space-2);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n width: 100%;\n display: flex;\n}\n\n.item[data-highlighted] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled] {\n opacity: .5;\n pointer-events: none;\n}\n\n.subTrigger {\n padding-right: var(--ac-space-3);\n}\n\n.subTrigger[data-popup-open] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.subTriggerIcon {\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n margin-left: auto;\n}\n\n.indicatorItem {\n padding-left: calc(var(--ac-space-2) + 1.25rem);\n}\n\n.indicatorSlot {\n height: 1rem;\n left: var(--ac-space-2);\n justify-content: center;\n align-items: center;\n width: 1rem;\n display: inline-flex;\n position: absolute;\n}\n\n.indicatorIcon, .radioIndicatorIcon {\n width: .875rem;\n height: .875rem;\n}\n\n.radioIndicatorIcon {\n fill: currentColor;\n}\n\n.label {\n color: var(--ac-foreground);\n font-size: var(--ac-text-sm);\n padding: var(--ac-space-1) var(--ac-space-2);\n font-weight: 600;\n}\n\n.inset {\n padding-left: calc(var(--ac-space-2) + 1.25rem);\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) calc(var(--ac-space-1)*-1);\n}\n\n.shortcut {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .08em;\n margin-left: auto;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/context-menu.module.css","webpack://./src/components/ui/context-menu.module.css"],"names":[],"mappings":"AAAA;ECCE,WAAW;AACb;;ADFuB;ECKrB,mCAAmC;EACnC,kCAAkC;EAClC,kCAAkC;EAClC,mCAAmC;EACnC,mCAAmC;EACnC,gBAAgB;EAChB,0BAA0B;EAC1B,yCAAyC;EACzC,qFAAqF;EACrF,qBAAqB;EACrB,uCAAuC;AACzC;;ADhBoc;ECmBlc,UAAU;EACV,qBAAqB;AACvB;;ADrB6hB;ECwB3hB,kCAAkC;EAClC,cAAc;EACd,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,kCAAkC;EAClC,4CAA4C;EAC5C,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;EACb,WAAW;EACX,aAAa;AACf;;ADrC2yB;ECwCzyB,kCAAkC;EAClC,kCAAkC;AACpC;;AD1Cu4B;EC6Cr4B,WAAW;EACX,oBAAoB;AACtB;;AD/C27B;ECkDz7B,gCAAgC;AAClC;;ADnDu+B;ECsDr+B,kCAAkC;EAClC,kCAAkC;AACpC;;ADxDwkC;EC2DtkC,cAAc;EACd,WAAW;EACX,YAAY;EACZ,iBAAiB;AACnB;;AD/D8oC;ECkE5oC,+CAA+C;AACjD;;ADnE4sC;ECsE1sC,YAAY;EACZ,uBAAuB;EACvB,uBAAuB;EACvB,mBAAmB;EACnB,WAAW;EACX,oBAAoB;EACpB,kBAAkB;AACpB;;AD7Ey1C;ECgFv1C,cAAc;EACd,eAAe;AACjB;;ADlFy5C;ECqFv5C,kBAAkB;AACpB;;ADtF+7C;ECyF77C,2BAA2B;EAC3B,4BAA4B;EAC5B,4CAA4C;EAC5C,gBAAgB;AAClB;;AD7FyjD;ECgGvjD,+CAA+C;AACjD;;ADjG+mD;ECoG7mD,kCAAkC;EAClC,WAAW;EACX,oDAAoD;AACtD;;ADvG2tD;EC0GztD,iCAAiC;EACjC,4BAA4B;EAC5B,qBAAqB;EACrB,iBAAiB;AACnB","sourcesContent":[".positioner{z-index:50}.content{background-color:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);max-height:var(--available-height);min-width:12rem;overflow-x:hidden;overflow-y:auto;padding:var(--ac-space-1);transform-origin:var(--transform-origin);transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal)}.content[data-ending-style],.content[data-starting-style]{opacity:0;transform:scale(.96)}.item{align-items:center;border-radius:var(--ac-radius-sm);color:inherit;cursor:default;display:flex;font-size:var(--ac-text-sm);gap:var(--ac-space-2);min-height:var(--ac-size-default);outline:none;padding:var(--ac-space-1) var(--ac-space-2);user-select:none;width:100%}.item[data-highlighted]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.item[data-disabled]{opacity:.5;pointer-events:none}.subTrigger{padding-right:var(--ac-space-3)}.subTrigger[data-popup-open]{background-color:var(--ac-accent);color:var(--ac-accent-foreground)}.subTriggerIcon{flex-shrink:0;height:1rem;margin-left:auto;width:1rem}.indicatorItem{padding-left:calc(var(--ac-space-2) + 1.25rem)}.indicatorSlot{align-items:center;display:inline-flex;height:1rem;justify-content:center;left:var(--ac-space-2);position:absolute;width:1rem}.indicatorIcon,.radioIndicatorIcon{height:.875rem;width:.875rem}.radioIndicatorIcon{fill:currentcolor}.label{color:var(--ac-foreground);font-size:var(--ac-text-sm);font-weight:600;padding:var(--ac-space-1) var(--ac-space-2)}.inset{padding-left:calc(var(--ac-space-2) + 1.25rem)}.separator{background-color:var(--ac-border);height:1px;margin:var(--ac-space-1) calc(var(--ac-space-1)*-1)}.shortcut{color:var(--ac-muted-foreground);font-size:var(--ac-text-xs);letter-spacing:.08em;margin-left:auto}",".positioner {\n z-index: 50;\n}\n\n.content {\n background-color: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-popover-foreground);\n max-height: var(--available-height);\n min-width: 12rem;\n padding: var(--ac-space-1);\n transform-origin: var(--transform-origin);\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n overflow: hidden auto;\n box-shadow: 0 16px 40px -16px #00000059;\n}\n\n.content[data-ending-style], .content[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n\n.item {\n border-radius: var(--ac-radius-sm);\n color: inherit;\n cursor: default;\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-2);\n min-height: var(--ac-size-default);\n padding: var(--ac-space-1) var(--ac-space-2);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n width: 100%;\n display: flex;\n}\n\n.item[data-highlighted] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.item[data-disabled] {\n opacity: .5;\n pointer-events: none;\n}\n\n.subTrigger {\n padding-right: var(--ac-space-3);\n}\n\n.subTrigger[data-popup-open] {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.subTriggerIcon {\n flex-shrink: 0;\n width: 1rem;\n height: 1rem;\n margin-left: auto;\n}\n\n.indicatorItem {\n padding-left: calc(var(--ac-space-2) + 1.25rem);\n}\n\n.indicatorSlot {\n height: 1rem;\n left: var(--ac-space-2);\n justify-content: center;\n align-items: center;\n width: 1rem;\n display: inline-flex;\n position: absolute;\n}\n\n.indicatorIcon, .radioIndicatorIcon {\n width: .875rem;\n height: .875rem;\n}\n\n.radioIndicatorIcon {\n fill: currentColor;\n}\n\n.label {\n color: var(--ac-foreground);\n font-size: var(--ac-text-sm);\n padding: var(--ac-space-1) var(--ac-space-2);\n font-weight: 600;\n}\n\n.inset {\n padding-left: calc(var(--ac-space-2) + 1.25rem);\n}\n\n.separator {\n background-color: var(--ac-border);\n height: 1px;\n margin: var(--ac-space-1) calc(var(--ac-space-1)*-1);\n}\n\n.shortcut {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-xs);\n letter-spacing: .08em;\n margin-left: auto;\n}\n"],"sourceRoot":""}
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { Check, Copy } from "lucide-react";
4
- import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
5
4
  import { cn } from "../../lib/utilities.js";
6
5
  import copy_button_module from "./copy-button.module.js";
7
- const CopyButton = /*#__PURE__*/ forwardRef(({ value, timeout = 2000, className, onClick, disabled, ...props }, ref)=>{
8
- const [copied, setCopied] = useState(false);
9
- const timeoutRef = useRef(null);
10
- useEffect(()=>()=>{
6
+ import * as __rspack_external_react from "react";
7
+ const CopyButton = /*#__PURE__*/ __rspack_external_react.forwardRef(({ value, timeout = 2000, className, onClick, disabled, ...props }, ref)=>{
8
+ const [copied, setCopied] = __rspack_external_react.useState(false);
9
+ const timeoutRef = __rspack_external_react.useRef(null);
10
+ __rspack_external_react.useEffect(()=>()=>{
11
11
  if (null !== timeoutRef.current) globalThis.clearTimeout(timeoutRef.current);
12
12
  }, []);
13
- const handleCopy = useCallback(async (event)=>{
13
+ const handleCopy = __rspack_external_react.useCallback(async (event)=>{
14
14
  onClick?.(event);
15
15
  const { clipboard } = globalThis.navigator;
16
16
  if (event.defaultPrevented || disabled || !clipboard?.writeText) return;
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/copy-button.js","sources":["../../../src/components/ui/copy-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Check, Copy} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./copy-button.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link CopyButton} component.\r\n *\r\n * @remarks\r\n * Extends native `<button>` attributes while reserving `children` for the internal icon\r\n * swap and exposing a required clipboard value.\r\n */\r\ninterface CopyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\r\n /**\r\n * The text value copied to the clipboard when the button is activated.\r\n */\r\n value: string;\r\n /**\r\n * Duration in milliseconds to show the success state before restoring the copy icon.\r\n *\r\n * @default 2000\r\n */\r\n timeout?: number;\r\n}\r\n\r\n/**\r\n * A compact icon button that copies text to the clipboard.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Client component.\r\n *\r\n * Uses `navigator.clipboard.writeText` when available and swaps from a copy icon to a\r\n * confirmation icon for a configurable duration after a successful copy. If clipboard\r\n * access fails, the button remains interactive without throwing to the UI.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CopyButton value=\"npm install @arolariu/components\" />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText | MDN Clipboard.writeText}\r\n */\r\nconst CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(\r\n ({value, timeout = 2000, className, onClick, disabled, ...props}, ref) => {\r\n const [copied, setCopied] = React.useState(false);\r\n const timeoutRef = React.useRef<ReturnType<typeof globalThis.setTimeout> | null>(null);\r\n\r\n React.useEffect(\r\n () => () => {\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n },\r\n [],\r\n );\r\n\r\n const handleCopy = React.useCallback(\r\n async (event: React.MouseEvent<HTMLButtonElement>) => {\r\n onClick?.(event);\r\n\r\n // eslint-disable-next-line n/no-unsupported-features/node-builtins -- Clipboard access is browser-only and required for this client component.\r\n const {clipboard} = globalThis.navigator;\r\n\r\n if (event.defaultPrevented || disabled || !clipboard?.writeText) {\r\n return;\r\n }\r\n\r\n try {\r\n await clipboard.writeText(value);\r\n setCopied(true);\r\n\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n\r\n timeoutRef.current = globalThis.setTimeout(() => {\r\n setCopied(false);\r\n }, timeout);\r\n } catch {\r\n // Clipboard access can fail in unsupported or insecure contexts.\r\n }\r\n },\r\n [disabled, onClick, timeout, value],\r\n );\r\n\r\n return (\r\n <button\r\n ref={ref}\r\n type='button'\r\n aria-label={copied ? \"Copied\" : \"Copy to clipboard\"}\r\n className={cn(styles.copyButton, className)}\r\n disabled={disabled}\r\n onClick={handleCopy}\r\n {...props}>\r\n {copied ? (\r\n <Check\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ) : (\r\n <Copy\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n )}\r\n </button>\r\n );\r\n },\r\n);\r\nCopyButton.displayName = \"CopyButton\";\r\n\r\nexport {CopyButton};\r\nexport type {CopyButtonProps};\r\n"],"names":["CopyButton","React","value","timeout","className","onClick","disabled","props","ref","copied","setCopied","timeoutRef","globalThis","handleCopy","event","clipboard","cn","styles","Check","Copy"],"mappings":";;;;;;AA6CA,MAAMA,aAAa,WAAHA,GAAGC,WACjB,CAAC,EAACC,KAAK,EAAEC,UAAU,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IAChE,MAAM,CAACC,QAAQC,UAAU,GAAGT,SAAe;IAC3C,MAAMU,aAAaV,OAA8D;IAEjFA,UACE,IAAM;YACJ,IAAIU,AAAuB,SAAvBA,WAAW,OAAO,EACpBC,WAAW,YAAY,CAACD,WAAW,OAAO;QAE9C,GACA,EAAE;IAGJ,MAAME,aAAaZ,YACjB,OAAOa;QACLT,UAAUS;QAGV,MAAM,EAACC,SAAS,EAAC,GAAGH,WAAW,SAAS;QAExC,IAAIE,MAAM,gBAAgB,IAAIR,YAAY,CAACS,WAAW,WACpD;QAGF,IAAI;YACF,MAAMA,UAAU,SAAS,CAACb;YAC1BQ,UAAU;YAEV,IAAIC,AAAuB,SAAvBA,WAAW,OAAO,EACpBC,WAAW,YAAY,CAACD,WAAW,OAAO;YAG5CA,WAAW,OAAO,GAAGC,WAAW,UAAU,CAAC;gBACzCF,UAAU;YACZ,GAAGP;QACL,EAAE,OAAM,CAER;IACF,GACA;QAACG;QAAUD;QAASF;QAASD;KAAM;IAGrC,OAAO,WAAP,GACE,IAAC;QACC,KAAKM;QACL,MAAK;QACL,cAAYC,SAAS,WAAW;QAChC,WAAWO,GAAGC,mBAAAA,UAAiB,EAAEb;QACjC,UAAUE;QACV,SAASO;QACR,GAAGN,KAAK;kBACRE,SAAS,WAATA,GACC,IAACS,OAAKA;YACJ,eAAY;YACZ,WAAWD,mBAAAA,IAAW;2BAGxB,IAACE,MAAIA;YACH,eAAY;YACZ,WAAWF,mBAAAA,IAAW;;;AAKhC;AAEFjB,WAAW,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/copy-button.js","sources":["../../../src/components/ui/copy-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {Check, Copy} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./copy-button.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link CopyButton} component.\r\n *\r\n * @remarks\r\n * Extends native `<button>` attributes while reserving `children` for the internal icon\r\n * swap and exposing a required clipboard value.\r\n */\r\ninterface CopyButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\r\n /**\r\n * The text value copied to the clipboard when the button is activated.\r\n */\r\n value: string;\r\n /**\r\n * Duration in milliseconds to show the success state before restoring the copy icon.\r\n *\r\n * @default 2000\r\n */\r\n timeout?: number;\r\n}\r\n\r\n/**\r\n * A compact icon button that copies text to the clipboard.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Client component.\r\n *\r\n * Uses `navigator.clipboard.writeText` when available and swaps from a copy icon to a\r\n * confirmation icon for a configurable duration after a successful copy. If clipboard\r\n * access fails, the button remains interactive without throwing to the UI.\r\n *\r\n * @example\r\n * ```tsx\r\n * <CopyButton value=\"npm install @arolariu/components\" />\r\n * ```\r\n *\r\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText | MDN Clipboard.writeText}\r\n */\r\nconst CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(\r\n ({value, timeout = 2000, className, onClick, disabled, ...props}, ref) => {\r\n const [copied, setCopied] = React.useState(false);\r\n const timeoutRef = React.useRef<ReturnType<typeof globalThis.setTimeout> | null>(null);\r\n\r\n React.useEffect(\r\n () => () => {\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n },\r\n [],\r\n );\r\n\r\n const handleCopy = React.useCallback(\r\n async (event: React.MouseEvent<HTMLButtonElement>) => {\r\n onClick?.(event);\r\n\r\n // eslint-disable-next-line n/no-unsupported-features/node-builtins -- Clipboard access is browser-only and required for this client component.\r\n const {clipboard} = globalThis.navigator;\r\n\r\n if (event.defaultPrevented || disabled || !clipboard?.writeText) {\r\n return;\r\n }\r\n\r\n try {\r\n await clipboard.writeText(value);\r\n setCopied(true);\r\n\r\n if (timeoutRef.current !== null) {\r\n globalThis.clearTimeout(timeoutRef.current);\r\n }\r\n\r\n timeoutRef.current = globalThis.setTimeout(() => {\r\n setCopied(false);\r\n }, timeout);\r\n } catch {\r\n // Clipboard access can fail in unsupported or insecure contexts.\r\n }\r\n },\r\n [disabled, onClick, timeout, value],\r\n );\r\n\r\n return (\r\n <button\r\n ref={ref}\r\n type='button'\r\n aria-label={copied ? \"Copied\" : \"Copy to clipboard\"}\r\n className={cn(styles.copyButton, className)}\r\n disabled={disabled}\r\n onClick={handleCopy}\r\n {...props}>\r\n {copied ? (\r\n <Check\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n ) : (\r\n <Copy\r\n aria-hidden='true'\r\n className={styles.icon}\r\n />\r\n )}\r\n </button>\r\n );\r\n },\r\n);\r\nCopyButton.displayName = \"CopyButton\";\r\n\r\nexport {CopyButton};\r\nexport type {CopyButtonProps};\r\n"],"names":["CopyButton","React","value","timeout","className","onClick","disabled","props","ref","copied","setCopied","timeoutRef","globalThis","handleCopy","event","clipboard","cn","styles","Check","Copy"],"mappings":";;;;;;AA6CA,MAAMA,aAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAAC,EAACC,KAAK,EAAEC,UAAU,IAAI,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IAChE,MAAM,CAACC,QAAQC,UAAU,GAAGT,wBAAAA,QAAc,CAAC;IAC3C,MAAMU,aAAaV,wBAAAA,MAAY,CAAkD;IAEjFA,wBAAAA,SAAe,CACb,IAAM;YACJ,IAAIU,AAAuB,SAAvBA,WAAW,OAAO,EACpBC,WAAW,YAAY,CAACD,WAAW,OAAO;QAE9C,GACA,EAAE;IAGJ,MAAME,aAAaZ,wBAAAA,WAAiB,CAClC,OAAOa;QACLT,UAAUS;QAGV,MAAM,EAACC,SAAS,EAAC,GAAGH,WAAW,SAAS;QAExC,IAAIE,MAAM,gBAAgB,IAAIR,YAAY,CAACS,WAAW,WACpD;QAGF,IAAI;YACF,MAAMA,UAAU,SAAS,CAACb;YAC1BQ,UAAU;YAEV,IAAIC,AAAuB,SAAvBA,WAAW,OAAO,EACpBC,WAAW,YAAY,CAACD,WAAW,OAAO;YAG5CA,WAAW,OAAO,GAAGC,WAAW,UAAU,CAAC;gBACzCF,UAAU;YACZ,GAAGP;QACL,EAAE,OAAM,CAER;IACF,GACA;QAACG;QAAUD;QAASF;QAASD;KAAM;IAGrC,OAAO,WAAP,GACE,IAAC;QACC,KAAKM;QACL,MAAK;QACL,cAAYC,SAAS,WAAW;QAChC,WAAWO,GAAGC,mBAAAA,UAAiB,EAAEb;QACjC,UAAUE;QACV,SAASO;QACR,GAAGN,KAAK;kBACRE,SAAS,WAATA,GACC,IAACS,OAAKA;YACJ,eAAY;YACZ,WAAWD,mBAAAA,IAAW;2BAGxB,IAACE,MAAIA;YACH,eAAY;YACZ,WAAWF,mBAAAA,IAAW;;;AAKhC;AAEFjB,WAAW,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/copy-button.module.css","webpack://./src/components/ui/copy-button.module.css"],"names":[],"mappings":"AADA;ECEE,kCAAkC;EAClC,kCAAkC;EAClC,iCAAiC;EACjC,eAAe;EACf,0BAA0B;EAC1B,sFAAsF;EACtF,uBAAuB;EACvB,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;;EAEpB;IACE,iCAAiC;IACjC,mBAAmB;EACrB;;EAEA;IACE,mBAAmB;IACnB,WAAW;EACb;;EAEA;IACE;MACE,kCAAkC;MAClC,kCAAkC;IACpC;EACF;AACF;;AAEA;EACE,WAAW;EACX,YAAY;AACd","sourcesContent":[".copyButton{align-items:center;background-color:transparent;border:1px solid var(--ac-border);border-radius:var(--ac-radius-sm);color:var(--ac-muted-foreground);cursor:pointer;display:inline-flex;justify-content:center;padding:var(--ac-space-2);transition:color var(--ac-transition-fast),background-color var(--ac-transition-fast);&:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}&:disabled{cursor:not-allowed;opacity:.6}@media (hover:hover){&:hover:not(:disabled){background-color:var(--ac-accent);color:var(--ac-accent-foreground)}}}.icon{height:1rem;width:1rem}",".copyButton {\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-sm);\n color: var(--ac-muted-foreground);\n cursor: pointer;\n padding: var(--ac-space-2);\n transition: color var(--ac-transition-fast),background-color var(--ac-transition-fast);\n background-color: #0000;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n\n &:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: .6;\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n }\n }\n}\n\n.icon {\n width: 1rem;\n height: 1rem;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/copy-button.module.css","webpack://./src/components/ui/copy-button.module.css"],"names":[],"mappings":"AAAA;ECCE,kCAAkC;EAClC,kCAAkC;EAClC,iCAAiC;EACjC,eAAe;EACf,0BAA0B;EAC1B,sFAAsF;EACtF,uBAAuB;EACvB,uBAAuB;EACvB,mBAAmB;EACnB,oBAAoB;;EDVqT;ICavU,iCAAiC;IACjC,mBAAmB;EACrB;;EDf6Y;ICkB3Y,mBAAmB;IACnB,WAAW;EACb;;EDpBsb;IAAqB;MCwBvc,kCAAkC;MAClC,kCAAkC;IACpC;EACF;AACF;;AD5B0iB;EC+BxiB,WAAW;EACX,YAAY;AACd","sourcesContent":[".copyButton{align-items:center;background-color:transparent;border:1px solid var(--ac-border);border-radius:var(--ac-radius-sm);color:var(--ac-muted-foreground);cursor:pointer;display:inline-flex;justify-content:center;padding:var(--ac-space-2);transition:color var(--ac-transition-fast),background-color var(--ac-transition-fast);&:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}&:disabled{cursor:not-allowed;opacity:.6}@media (hover:hover){&:hover:not(:disabled){background-color:var(--ac-accent);color:var(--ac-accent-foreground)}}}.icon{height:1rem;width:1rem}",".copyButton {\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-sm);\n color: var(--ac-muted-foreground);\n cursor: pointer;\n padding: var(--ac-space-2);\n transition: color var(--ac-transition-fast),background-color var(--ac-transition-fast);\n background-color: #0000;\n justify-content: center;\n align-items: center;\n display: inline-flex;\n\n &:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: .6;\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background-color: var(--ac-accent);\n color: var(--ac-accent-foreground);\n }\n }\n}\n\n.icon {\n width: 1rem;\n height: 1rem;\n}\n"],"sourceRoot":""}