@gv-tech/design-system 2.29.0 → 2.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.cjs.map +1 -1
  3. package/dist/accordion.mjs +11 -11
  4. package/dist/accordion.mjs.map +1 -1
  5. package/dist/alert-dialog.cjs +1 -1
  6. package/dist/alert-dialog.cjs.map +1 -1
  7. package/dist/alert-dialog.mjs +15 -15
  8. package/dist/alert-dialog.mjs.map +1 -1
  9. package/dist/alert.cjs +1 -1
  10. package/dist/alert.cjs.map +1 -1
  11. package/dist/alert.mjs +3 -3
  12. package/dist/alert.mjs.map +1 -1
  13. package/dist/aspect-ratio.cjs +1 -1
  14. package/dist/aspect-ratio.cjs.map +1 -1
  15. package/dist/aspect-ratio.mjs +1 -1
  16. package/dist/aspect-ratio.mjs.map +1 -1
  17. package/dist/attachment.cjs +1 -1
  18. package/dist/attachment.cjs.map +1 -1
  19. package/dist/attachment.mjs +3 -3
  20. package/dist/attachment.mjs.map +1 -1
  21. package/dist/avatar.cjs +1 -1
  22. package/dist/avatar.cjs.map +1 -1
  23. package/dist/avatar.mjs +2 -2
  24. package/dist/avatar.mjs.map +1 -1
  25. package/dist/badge.cjs +1 -1
  26. package/dist/badge.cjs.map +1 -1
  27. package/dist/badge.mjs +3 -3
  28. package/dist/badge.mjs.map +1 -1
  29. package/dist/breadcrumb.cjs +1 -1
  30. package/dist/breadcrumb.cjs.map +1 -1
  31. package/dist/breadcrumb.mjs +1 -3
  32. package/dist/breadcrumb.mjs.map +1 -1
  33. package/dist/bubble.cjs +1 -1
  34. package/dist/bubble.cjs.map +1 -1
  35. package/dist/bubble.mjs +4 -4
  36. package/dist/bubble.mjs.map +1 -1
  37. package/dist/button-group.cjs +1 -1
  38. package/dist/button-group.cjs.map +1 -1
  39. package/dist/button-group.mjs +2 -3
  40. package/dist/button-group.mjs.map +1 -1
  41. package/dist/button.cjs +1 -1
  42. package/dist/button.cjs.map +1 -1
  43. package/dist/button.mjs +3 -3
  44. package/dist/button.mjs.map +1 -1
  45. package/dist/calendar.cjs +1 -1
  46. package/dist/calendar.cjs.map +1 -1
  47. package/dist/calendar.mjs +8 -8
  48. package/dist/calendar.mjs.map +1 -1
  49. package/dist/card.cjs +1 -1
  50. package/dist/card.cjs.map +1 -1
  51. package/dist/card.mjs +1 -1
  52. package/dist/card.mjs.map +1 -1
  53. package/dist/carousel.cjs +1 -1
  54. package/dist/carousel.cjs.map +1 -1
  55. package/dist/carousel.mjs +3 -5
  56. package/dist/carousel.mjs.map +1 -1
  57. package/dist/chart.cjs +1 -1
  58. package/dist/chart.mjs +1 -1
  59. package/dist/checkbox.cjs +1 -1
  60. package/dist/checkbox.cjs.map +1 -1
  61. package/dist/checkbox.mjs +1 -1
  62. package/dist/checkbox.mjs.map +1 -1
  63. package/dist/collapsible.cjs +1 -1
  64. package/dist/collapsible.cjs.map +1 -1
  65. package/dist/collapsible.mjs +4 -4
  66. package/dist/collapsible.mjs.map +1 -1
  67. package/dist/combobox.cjs +1 -1
  68. package/dist/combobox.cjs.map +1 -1
  69. package/dist/combobox.mjs +1 -1
  70. package/dist/combobox.mjs.map +1 -1
  71. package/dist/command.cjs +1 -1
  72. package/dist/command.cjs.map +1 -1
  73. package/dist/command.mjs +1 -1
  74. package/dist/command.mjs.map +1 -1
  75. package/dist/context-menu.cjs +1 -1
  76. package/dist/context-menu.cjs.map +1 -1
  77. package/dist/context-menu.mjs +23 -23
  78. package/dist/context-menu.mjs.map +1 -1
  79. package/dist/design-system.css +1 -1
  80. package/dist/dialog.cjs +1 -1
  81. package/dist/dialog.cjs.map +1 -1
  82. package/dist/dialog.mjs +1 -1
  83. package/dist/dialog.mjs.map +1 -1
  84. package/dist/direction.cjs +1 -1
  85. package/dist/direction.cjs.map +1 -1
  86. package/dist/direction.mjs +1 -1
  87. package/dist/direction.mjs.map +1 -1
  88. package/dist/drawer.cjs +1 -1
  89. package/dist/drawer.cjs.map +1 -1
  90. package/dist/drawer.mjs +1 -1
  91. package/dist/drawer.mjs.map +1 -1
  92. package/dist/dropdown-menu.cjs +1 -1
  93. package/dist/dropdown-menu.cjs.map +1 -1
  94. package/dist/dropdown-menu.mjs +23 -23
  95. package/dist/dropdown-menu.mjs.map +1 -1
  96. package/dist/empty.cjs +1 -1
  97. package/dist/empty.cjs.map +1 -1
  98. package/dist/empty.mjs +2 -2
  99. package/dist/empty.mjs.map +1 -1
  100. package/dist/field.cjs +1 -1
  101. package/dist/field.cjs.map +1 -1
  102. package/dist/field.mjs +3 -4
  103. package/dist/field.mjs.map +1 -1
  104. package/dist/form.cjs +1 -1
  105. package/dist/form.cjs.map +1 -1
  106. package/dist/form.mjs +2 -2
  107. package/dist/form.mjs.map +1 -1
  108. package/dist/hover-card.cjs +1 -1
  109. package/dist/hover-card.cjs.map +1 -1
  110. package/dist/hover-card.mjs +6 -6
  111. package/dist/hover-card.mjs.map +1 -1
  112. package/dist/index.cjs +1 -1
  113. package/dist/index.mjs +5 -5
  114. package/dist/input-group.cjs +1 -1
  115. package/dist/input-group.cjs.map +1 -1
  116. package/dist/input-group.mjs +4 -9
  117. package/dist/input-group.mjs.map +1 -1
  118. package/dist/input-otp.cjs +1 -1
  119. package/dist/input-otp.cjs.map +1 -1
  120. package/dist/input-otp.mjs +2 -2
  121. package/dist/input-otp.mjs.map +1 -1
  122. package/dist/input.cjs +1 -1
  123. package/dist/input.cjs.map +1 -1
  124. package/dist/input.mjs +1 -1
  125. package/dist/input.mjs.map +1 -1
  126. package/dist/item.cjs +1 -1
  127. package/dist/item.cjs.map +1 -1
  128. package/dist/item.mjs +4 -5
  129. package/dist/item.mjs.map +1 -1
  130. package/dist/kbd.cjs +1 -1
  131. package/dist/kbd.cjs.map +1 -1
  132. package/dist/kbd.mjs +1 -1
  133. package/dist/kbd.mjs.map +1 -1
  134. package/dist/label.cjs +1 -1
  135. package/dist/label.cjs.map +1 -1
  136. package/dist/label.mjs +1 -1
  137. package/dist/label.mjs.map +1 -1
  138. package/dist/marker.cjs +1 -1
  139. package/dist/marker.cjs.map +1 -1
  140. package/dist/marker.mjs +4 -4
  141. package/dist/marker.mjs.map +1 -1
  142. package/dist/menubar.cjs +1 -1
  143. package/dist/menubar.cjs.map +1 -1
  144. package/dist/menubar.mjs +20 -20
  145. package/dist/menubar.mjs.map +1 -1
  146. package/dist/message-scroller.cjs +1 -1
  147. package/dist/message-scroller.cjs.map +1 -1
  148. package/dist/message-scroller.mjs +1 -1
  149. package/dist/message-scroller.mjs.map +1 -1
  150. package/dist/message.cjs +1 -1
  151. package/dist/message.cjs.map +1 -1
  152. package/dist/message.mjs +1 -1
  153. package/dist/message.mjs.map +1 -1
  154. package/dist/native-select.cjs +1 -1
  155. package/dist/native-select.cjs.map +1 -1
  156. package/dist/native-select.mjs +1 -1
  157. package/dist/native-select.mjs.map +1 -1
  158. package/dist/navigation-menu.cjs +1 -1
  159. package/dist/navigation-menu.cjs.map +1 -1
  160. package/dist/navigation-menu.mjs +8 -8
  161. package/dist/navigation-menu.mjs.map +1 -1
  162. package/dist/packages/ui-core/src/contracts/scroll-to-top.d.ts +1 -2
  163. package/dist/packages/ui-core/src/contracts/table-of-contents.d.ts +5 -18
  164. package/dist/packages/ui-web/src/__contracts.d.ts +0 -1
  165. package/dist/packages/ui-web/src/accordion.d.ts +1 -1
  166. package/dist/packages/ui-web/src/alert-dialog.d.ts +1 -1
  167. package/dist/packages/ui-web/src/alert.d.ts +1 -1
  168. package/dist/packages/ui-web/src/aspect-ratio.d.ts +2 -2
  169. package/dist/packages/ui-web/src/attachment.d.ts +1 -1
  170. package/dist/packages/ui-web/src/avatar.d.ts +1 -1
  171. package/dist/packages/ui-web/src/badge.d.ts +1 -1
  172. package/dist/packages/ui-web/src/bubble.d.ts +1 -1
  173. package/dist/packages/ui-web/src/button-group.d.ts +3 -3
  174. package/dist/packages/ui-web/src/button.d.ts +1 -1
  175. package/dist/packages/ui-web/src/calendar.d.ts +1 -1
  176. package/dist/packages/ui-web/src/carousel.d.ts +3 -3
  177. package/dist/packages/ui-web/src/checkbox.d.ts +1 -1
  178. package/dist/packages/ui-web/src/collapsible.d.ts +4 -4
  179. package/dist/packages/ui-web/src/command.d.ts +1 -1
  180. package/dist/packages/ui-web/src/context-menu.d.ts +1 -1
  181. package/dist/packages/ui-web/src/dialog.d.ts +1 -1
  182. package/dist/packages/ui-web/src/direction.d.ts +1 -1
  183. package/dist/packages/ui-web/src/drawer.d.ts +1 -1
  184. package/dist/packages/ui-web/src/dropdown-menu.d.ts +1 -1
  185. package/dist/packages/ui-web/src/empty.d.ts +7 -7
  186. package/dist/packages/ui-web/src/field.d.ts +11 -11
  187. package/dist/packages/ui-web/src/form.d.ts +3 -3
  188. package/dist/packages/ui-web/src/hover-card.d.ts +1 -1
  189. package/dist/packages/ui-web/src/input-group.d.ts +3 -3
  190. package/dist/packages/ui-web/src/input-otp.d.ts +1 -1
  191. package/dist/packages/ui-web/src/item.d.ts +2 -2
  192. package/dist/packages/ui-web/src/kbd.d.ts +2 -2
  193. package/dist/packages/ui-web/src/label.d.ts +1 -1
  194. package/dist/packages/ui-web/src/marker.d.ts +1 -1
  195. package/dist/packages/ui-web/src/menubar.d.ts +1 -1
  196. package/dist/packages/ui-web/src/message-scroller.d.ts +1 -1
  197. package/dist/packages/ui-web/src/navigation-menu.d.ts +1 -1
  198. package/dist/packages/ui-web/src/pagination.d.ts +2 -2
  199. package/dist/packages/ui-web/src/popover.d.ts +1 -1
  200. package/dist/packages/ui-web/src/progress.d.ts +1 -1
  201. package/dist/packages/ui-web/src/questionnaire.d.ts +1 -1
  202. package/dist/packages/ui-web/src/resizable.d.ts +3 -3
  203. package/dist/packages/ui-web/src/scroll-area.d.ts +1 -1
  204. package/dist/packages/ui-web/src/select.d.ts +1 -1
  205. package/dist/packages/ui-web/src/separator.d.ts +1 -1
  206. package/dist/packages/ui-web/src/sheet.d.ts +1 -1
  207. package/dist/packages/ui-web/src/sidebar.d.ts +1 -1
  208. package/dist/packages/ui-web/src/skeleton.d.ts +1 -1
  209. package/dist/packages/ui-web/src/slider.d.ts +1 -1
  210. package/dist/packages/ui-web/src/sonner.d.ts +1 -1
  211. package/dist/packages/ui-web/src/spinner.d.ts +2 -1
  212. package/dist/packages/ui-web/src/switch.d.ts +1 -1
  213. package/dist/packages/ui-web/src/table-of-contents.d.ts +5 -10
  214. package/dist/packages/ui-web/src/tabs.d.ts +1 -1
  215. package/dist/packages/ui-web/src/text.d.ts +1 -1
  216. package/dist/packages/ui-web/src/theme-provider.d.ts +1 -1
  217. package/dist/packages/ui-web/src/theme-toggle.d.ts +1 -1
  218. package/dist/packages/ui-web/src/toast.d.ts +1 -1
  219. package/dist/packages/ui-web/src/toaster.d.ts +1 -1
  220. package/dist/packages/ui-web/src/toggle-group.d.ts +1 -1
  221. package/dist/packages/ui-web/src/toggle.d.ts +1 -1
  222. package/dist/packages/ui-web/src/tooltip.d.ts +1 -1
  223. package/dist/pagination.cjs +1 -1
  224. package/dist/pagination.cjs.map +1 -1
  225. package/dist/pagination.mjs +4 -3
  226. package/dist/pagination.mjs.map +1 -1
  227. package/dist/popover.cjs +1 -1
  228. package/dist/popover.cjs.map +1 -1
  229. package/dist/popover.mjs +7 -7
  230. package/dist/popover.mjs.map +1 -1
  231. package/dist/progress.cjs +1 -1
  232. package/dist/progress.cjs.map +1 -1
  233. package/dist/progress.mjs +3 -3
  234. package/dist/progress.mjs.map +1 -1
  235. package/dist/questionnaire.cjs +1 -1
  236. package/dist/questionnaire.cjs.map +1 -1
  237. package/dist/questionnaire.mjs +1 -1
  238. package/dist/questionnaire.mjs.map +1 -1
  239. package/dist/radio-group.cjs +1 -1
  240. package/dist/radio-group.mjs +1 -1
  241. package/dist/resizable.cjs +1 -1
  242. package/dist/resizable.mjs +1 -1
  243. package/dist/scroll-area.cjs +1 -1
  244. package/dist/scroll-area.cjs.map +1 -1
  245. package/dist/scroll-area.mjs +3 -3
  246. package/dist/scroll-area.mjs.map +1 -1
  247. package/dist/scroll-to-top.cjs +1 -1
  248. package/dist/scroll-to-top.cjs.map +1 -1
  249. package/dist/scroll-to-top.mjs +9 -7
  250. package/dist/scroll-to-top.mjs.map +1 -1
  251. package/dist/search.cjs +1 -1
  252. package/dist/search.cjs.map +1 -1
  253. package/dist/search.mjs +2 -2
  254. package/dist/search.mjs.map +1 -1
  255. package/dist/select.cjs +1 -1
  256. package/dist/select.cjs.map +1 -1
  257. package/dist/select.mjs +1 -1
  258. package/dist/select.mjs.map +1 -1
  259. package/dist/separator.cjs +1 -1
  260. package/dist/separator.cjs.map +1 -1
  261. package/dist/separator.mjs +1 -1
  262. package/dist/separator.mjs.map +1 -1
  263. package/dist/sheet.cjs +1 -1
  264. package/dist/sheet.cjs.map +1 -1
  265. package/dist/sheet.mjs +1 -1
  266. package/dist/sheet.mjs.map +1 -1
  267. package/dist/{sidebar-C5ukZKYH.mjs → sidebar-Cl3zXgaX.mjs} +5 -5
  268. package/dist/sidebar-Cl3zXgaX.mjs.map +1 -0
  269. package/dist/sidebar-DQzY8XPP.js +2 -0
  270. package/dist/sidebar-DQzY8XPP.js.map +1 -0
  271. package/dist/sidebar.cjs +1 -1
  272. package/dist/sidebar.mjs +1 -1
  273. package/dist/skeleton.cjs +1 -1
  274. package/dist/skeleton.cjs.map +1 -1
  275. package/dist/skeleton.mjs +1 -1
  276. package/dist/skeleton.mjs.map +1 -1
  277. package/dist/slider.cjs +1 -1
  278. package/dist/slider.cjs.map +1 -1
  279. package/dist/slider.mjs +1 -1
  280. package/dist/slider.mjs.map +1 -1
  281. package/dist/sonner.cjs +1 -1
  282. package/dist/sonner.mjs +1 -1
  283. package/dist/spinner.cjs +1 -1
  284. package/dist/spinner.cjs.map +1 -1
  285. package/dist/spinner.mjs +9 -5
  286. package/dist/spinner.mjs.map +1 -1
  287. package/dist/support-fab.cjs +1 -1
  288. package/dist/support-fab.cjs.map +1 -1
  289. package/dist/support-fab.mjs +2 -2
  290. package/dist/support-fab.mjs.map +1 -1
  291. package/dist/switch.cjs +1 -1
  292. package/dist/switch.cjs.map +1 -1
  293. package/dist/switch.mjs +1 -1
  294. package/dist/switch.mjs.map +1 -1
  295. package/dist/table-of-contents.cjs +1 -1
  296. package/dist/table-of-contents.cjs.map +1 -1
  297. package/dist/table-of-contents.mjs +3 -2
  298. package/dist/table-of-contents.mjs.map +1 -1
  299. package/dist/table.cjs +1 -1
  300. package/dist/table.cjs.map +1 -1
  301. package/dist/table.mjs +1 -1
  302. package/dist/table.mjs.map +1 -1
  303. package/dist/tabs.cjs +1 -1
  304. package/dist/tabs.cjs.map +1 -1
  305. package/dist/tabs.mjs +7 -7
  306. package/dist/tabs.mjs.map +1 -1
  307. package/dist/text.cjs +1 -1
  308. package/dist/text.cjs.map +1 -1
  309. package/dist/text.mjs +5 -5
  310. package/dist/text.mjs.map +1 -1
  311. package/dist/textarea.cjs +1 -1
  312. package/dist/textarea.cjs.map +1 -1
  313. package/dist/textarea.mjs +1 -1
  314. package/dist/textarea.mjs.map +1 -1
  315. package/dist/theme-provider.cjs +1 -1
  316. package/dist/theme-provider.cjs.map +1 -1
  317. package/dist/theme-provider.mjs +1 -1
  318. package/dist/theme-provider.mjs.map +1 -1
  319. package/dist/{theme-toggle-BGVdrh4J.mjs → theme-toggle-ldAbIn1Q.mjs} +22 -13
  320. package/dist/{theme-toggle-BGVdrh4J.mjs.map → theme-toggle-ldAbIn1Q.mjs.map} +1 -1
  321. package/dist/{theme-toggle-CMdzi7Y8.js → theme-toggle-nNtzABo6.js} +2 -2
  322. package/dist/{theme-toggle-CMdzi7Y8.js.map → theme-toggle-nNtzABo6.js.map} +1 -1
  323. package/dist/theme-toggle.cjs +1 -1
  324. package/dist/theme-toggle.mjs +1 -1
  325. package/dist/toast.cjs +1 -1
  326. package/dist/toast.cjs.map +1 -1
  327. package/dist/toast.mjs +19 -19
  328. package/dist/toast.mjs.map +1 -1
  329. package/dist/{toaster-D9OZF7hL.js → toaster-BRNNfjp9.js} +2 -2
  330. package/dist/{toaster-D9OZF7hL.js.map → toaster-BRNNfjp9.js.map} +1 -1
  331. package/dist/{toaster-CfNd-vsx.mjs → toaster-_FgrA-3c.mjs} +2 -2
  332. package/dist/{toaster-CfNd-vsx.mjs.map → toaster-_FgrA-3c.mjs.map} +1 -1
  333. package/dist/toaster.cjs +1 -1
  334. package/dist/toaster.mjs +1 -1
  335. package/dist/toggle-group.cjs +1 -1
  336. package/dist/toggle-group.cjs.map +1 -1
  337. package/dist/toggle-group.mjs +1 -1
  338. package/dist/toggle-group.mjs.map +1 -1
  339. package/dist/toggle.cjs +1 -1
  340. package/dist/toggle.cjs.map +1 -1
  341. package/dist/toggle.mjs +3 -3
  342. package/dist/toggle.mjs.map +1 -1
  343. package/dist/tooltip.cjs +1 -1
  344. package/dist/tooltip.cjs.map +1 -1
  345. package/dist/tooltip.mjs +6 -6
  346. package/dist/tooltip.mjs.map +1 -1
  347. package/dist/{utils-CnOgTvBJ.js → utils-BROwqSso.js} +2 -2
  348. package/dist/{utils-CnOgTvBJ.js.map → utils-BROwqSso.js.map} +1 -1
  349. package/dist/{utils-BtHTUEvP.mjs → utils-BurmJD8d.mjs} +2 -2
  350. package/dist/{utils-BtHTUEvP.mjs.map → utils-BurmJD8d.mjs.map} +1 -1
  351. package/dist/{vendor-D9rWr_E8.mjs → vendor-0E4gGRxj.mjs} +13885 -12065
  352. package/dist/vendor-0E4gGRxj.mjs.map +1 -0
  353. package/dist/vendor-Bz5F_va8.js +101 -0
  354. package/dist/vendor-Bz5F_va8.js.map +1 -0
  355. package/package.json +44 -49
  356. package/dist/sidebar-C5ukZKYH.mjs.map +0 -1
  357. package/dist/sidebar-DyP2Q-Ru.js +0 -2
  358. package/dist/sidebar-DyP2Q-Ru.js.map +0 -1
  359. package/dist/vendor-D9rWr_E8.mjs.map +0 -1
  360. package/dist/vendor-i1KCLryV.js +0 -101
  361. package/dist/vendor-i1KCLryV.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.cjs","names":[],"sources":["../packages/ui-web/src/combobox.tsx"],"sourcesContent":["'use client';\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react';\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronDownIcon, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/./input-group';\n\nimport type {\n ComboboxChipBaseProps,\n ComboboxChipsBaseProps,\n ComboboxChipsInputBaseProps,\n ComboboxClearBaseProps,\n ComboboxCollectionBaseProps,\n ComboboxContentBaseProps,\n ComboboxEmptyBaseProps,\n ComboboxGroupBaseProps,\n ComboboxInputBaseProps,\n ComboboxItemBaseProps,\n ComboboxLabelBaseProps,\n ComboboxListBaseProps,\n ComboboxSeparatorBaseProps,\n ComboboxTriggerBaseProps,\n ComboboxValueBaseProps,\n} from '@gv-tech/ui-core';\n\nconst Combobox = ComboboxPrimitive.Root;\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props & ComboboxValueBaseProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props & ComboboxTriggerBaseProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4\" />\n </ComboboxPrimitive.Trigger>\n );\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props & ComboboxClearBaseProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n );\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & ComboboxInputBaseProps) {\n return (\n <InputGroup className={cn('w-auto', className)}>\n <ComboboxPrimitive.Input render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n );\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n ComboboxContentBaseProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none',\n className,\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props & ComboboxListBaseProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props & ComboboxItemBaseProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute end-2 flex size-4 items-center justify-center\" />}\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props & ComboboxGroupBaseProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />;\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props & ComboboxLabelBaseProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props & ComboboxCollectionBaseProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />;\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props & ComboboxEmptyBaseProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props & ComboboxSeparatorBaseProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props &\n ComboboxChipsBaseProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & ComboboxChipBaseProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0',\n className,\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ms-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\nfunction ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props & ComboboxChipsInputBaseProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null);\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n};\n"],"mappings":"uRA4BM,EAAA,EAAA,EAEN,SAAS,EAAc,CAAE,GAAG,GAAiE,CAC3F,OAAO,EAAA,EAAA,KAAA,EAAA,EAAA,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,EAAgB,CACvB,YACA,WACA,GAAG,GAC0D,CAC7D,OACE,EAAA,EAAA,MAAA,EAAA,EAAA,CACE,YAAU,mBACV,UAAW,EAAA,GAAG,uCAAwC,CAAS,EAC/D,GAAI,WAHN,CAKG,GACD,EAAA,EAAA,KAAC,EAAA,GAAD,CAAiB,UAAU,kDAAoD,CAAA,CACtD,GAE/B,CAEA,SAAS,EAAc,CAAE,YAAW,GAAG,GAAiE,CACtG,OACE,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,CACL,CAAA,CAEL,CAEA,SAAS,EAAc,CACrB,YACA,GAAG,GAGqB,CACxB,OACE,EAAA,EAAA,KAAA,EAAA,EAAA,CACE,YAAU,iBACV,UAAW,EAAA,GACT,kcACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAa,CACpB,YACA,WACA,aAAa,GACb,GAAG,GACoD,CACvD,OACE,EAAA,EAAA,MAAA,EAAA,EAAA,CACE,YAAU,gBACV,UAAW,EAAA,GACT,6RACA,CACF,EACA,GAAI,WANN,CAQG,EACA,IACC,EAAA,EAAA,KAAA,EAAA,EAAA,CACE,QAAQ,EAAA,EAAA,KAAC,EAAA,OAAD,CAAQ,QAAQ,QAAQ,KAAK,SAAW,CAAA,EAChD,UAAU,qCACV,YAAU,iCAEV,EAAA,EAAA,KAAC,EAAA,GAAD,CAAO,UAAU,qBAAuB,CAAA,CACZ,CAAA,CAEV,GAE5B,CAEA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAsE,CAChH,OACE,EAAA,EAAA,KAAA,EAAA,EAAA,CACE,YAAU,sBACV,UAAW,EAAA,GAAG,+BAAgC,CAAS,EACvD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,GAAoB,CAC3B,OAAO,EAAM,OAA8B,IAAI,CACjD"}
1
+ {"version":3,"file":"combobox.cjs","names":[],"sources":["../packages/ui-web/src/combobox.tsx"],"sourcesContent":["'use client';\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react';\nimport type {\n ComboboxChipBaseProps,\n ComboboxChipsBaseProps,\n ComboboxChipsInputBaseProps,\n ComboboxClearBaseProps,\n ComboboxCollectionBaseProps,\n ComboboxContentBaseProps,\n ComboboxEmptyBaseProps,\n ComboboxGroupBaseProps,\n ComboboxInputBaseProps,\n ComboboxItemBaseProps,\n ComboboxLabelBaseProps,\n ComboboxListBaseProps,\n ComboboxSeparatorBaseProps,\n ComboboxTriggerBaseProps,\n ComboboxValueBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronDownIcon, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/./input-group';\n\nconst Combobox = ComboboxPrimitive.Root;\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props & ComboboxValueBaseProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props & ComboboxTriggerBaseProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4\" />\n </ComboboxPrimitive.Trigger>\n );\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props & ComboboxClearBaseProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n );\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & ComboboxInputBaseProps) {\n return (\n <InputGroup className={cn('w-auto', className)}>\n <ComboboxPrimitive.Input render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n );\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n ComboboxContentBaseProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none',\n className,\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props & ComboboxListBaseProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props & ComboboxItemBaseProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute end-2 flex size-4 items-center justify-center\" />}\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props & ComboboxGroupBaseProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />;\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props & ComboboxLabelBaseProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props & ComboboxCollectionBaseProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />;\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props & ComboboxEmptyBaseProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props & ComboboxSeparatorBaseProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props &\n ComboboxChipsBaseProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & ComboboxChipBaseProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0',\n className,\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ms-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\nfunction ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props & ComboboxChipsInputBaseProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null);\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n};\n"],"mappings":"uRA2BM,EAAA,EAAA,EAEN,SAAS,EAAc,CAAE,GAAG,GAAiE,CAC3F,OAAO,EAAA,EAAA,KAAA,EAAA,EAAA,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,EAAgB,CACvB,YACA,WACA,GAAG,GAC0D,CAC7D,OACE,EAAA,EAAA,MAAA,EAAA,EAAA,CACE,YAAU,mBACV,UAAW,EAAA,GAAG,uCAAwC,CAAS,EAC/D,GAAI,WAHN,CAKG,GACD,EAAA,EAAA,KAAC,EAAA,GAAD,CAAiB,UAAU,kDAAoD,CAAA,CACtD,GAE/B,CAEA,SAAS,EAAc,CAAE,YAAW,GAAG,GAAiE,CACtG,OACE,EAAA,EAAA,KAAA,EAAA,EAAA,CACE,YAAU,iBACV,QAAQ,EAAA,EAAA,KAAC,EAAA,iBAAD,CAAkB,QAAQ,QAAQ,KAAK,SAAW,CAAA,EAC1D,UAAW,EAAA,GAAG,CAAS,EACvB,GAAI,YAEJ,EAAA,EAAA,KAAC,EAAA,GAAD,CAAO,UAAU,qBAAuB,CAAA,CACjB,CAAA,CAE7B,CAEA,SAAS,EAAc,CACrB,YACA,WACA,WAAW,GACX,cAAc,GACd,YAAY,GACZ,GAAG,GACsD,CACzD,OACE,EAAA,EAAA,MAAC,EAAA,WAAD,CAAY,UAAW,EAAA,GAAG,SAAU,CAAS,WAA7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OAAD,CAAQ,QAAQ,QAAQ,KAAK,SAAW,CAAA,EAChD,UAAU,qCACV,YAAU,iCAEV,EAAA,EAAA,KAAC,EAAA,GAAD,CAAO,UAAU,qBAAuB,CAAA,CACZ,CAAA,CAEV,GAE5B,CAEA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAsE,CAChH,OACE,EAAA,EAAA,KAAA,EAAA,EAAA,CACE,YAAU,sBACV,UAAW,EAAA,GAAG,+BAAgC,CAAS,EACvD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,GAAoB,CAC3B,OAAO,EAAM,OAA8B,IAAI,CACjD"}
package/dist/combobox.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  "use client";
3
- import { Ar as e, C as t, E as n, Mr as r, S as i, T as a, Xr as o, Zr as s, _ as c, b as l, c as u, d, ei as f, f as p, g as m, h, l as g, m as _, p as v, u as y, v as b, w as x, x as S, y as C } from "./vendor-D9rWr_E8.mjs";
3
+ import { Ar as e, C as t, E as n, Mr as r, S as i, T as a, Xr as o, Zr as s, _ as c, b as l, c as u, d, ei as f, f as p, g as m, h, l as g, m as _, p as v, u as y, v as b, w as x, x as S, y as C } from "./vendor-0E4gGRxj.mjs";
4
4
  import { Button as w } from "./button.mjs";
5
5
  import { InputGroup as T, InputGroupAddon as E, InputGroupButton as D, InputGroupInput as O } from "./input-group.mjs";
6
6
  import * as k from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.mjs","names":[],"sources":["../packages/ui-web/src/combobox.tsx"],"sourcesContent":["'use client';\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react';\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronDownIcon, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/./input-group';\n\nimport type {\n ComboboxChipBaseProps,\n ComboboxChipsBaseProps,\n ComboboxChipsInputBaseProps,\n ComboboxClearBaseProps,\n ComboboxCollectionBaseProps,\n ComboboxContentBaseProps,\n ComboboxEmptyBaseProps,\n ComboboxGroupBaseProps,\n ComboboxInputBaseProps,\n ComboboxItemBaseProps,\n ComboboxLabelBaseProps,\n ComboboxListBaseProps,\n ComboboxSeparatorBaseProps,\n ComboboxTriggerBaseProps,\n ComboboxValueBaseProps,\n} from '@gv-tech/ui-core';\n\nconst Combobox = ComboboxPrimitive.Root;\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props & ComboboxValueBaseProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props & ComboboxTriggerBaseProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4\" />\n </ComboboxPrimitive.Trigger>\n );\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props & ComboboxClearBaseProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n );\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & ComboboxInputBaseProps) {\n return (\n <InputGroup className={cn('w-auto', className)}>\n <ComboboxPrimitive.Input render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n );\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n ComboboxContentBaseProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none',\n className,\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props & ComboboxListBaseProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props & ComboboxItemBaseProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute end-2 flex size-4 items-center justify-center\" />}\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props & ComboboxGroupBaseProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />;\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props & ComboboxLabelBaseProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props & ComboboxCollectionBaseProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />;\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props & ComboboxEmptyBaseProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props & ComboboxSeparatorBaseProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props &\n ComboboxChipsBaseProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & ComboboxChipBaseProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0',\n className,\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ms-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\nfunction ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props & ComboboxChipsInputBaseProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null);\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n};\n"],"mappings":";;;;;;;aA4BM,IAAW;AAEjB,SAAS,EAAc,EAAE,GAAG,KAAiE;CAC3F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,EAAgB,EACvB,cACA,aACA,GAAG,KAC0D;CAC7D,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,wCAAwC,CAAS;EAC/D,GAAI;YAHN,CAKG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAiB,WAAU,mDAAoD,CAAA,CACtD;;AAE/B;AAEA,SAAS,EAAc,EAAE,cAAW,GAAG,KAAiE;CACtG,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,QAAQ,iBAAA,GAAA,EAAA,KAAC,GAAD;GAAkB,SAAQ;GAAQ,MAAK;EAAW,CAAA;EAC1D,WAAW,EAAG,CAAS;EACvB,GAAI;YAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAO,WAAU,sBAAuB,CAAA;CACjB,CAAA;AAE7B;AAEA,SAAS,EAAc,EACrB,cACA,aACA,cAAW,IACX,iBAAc,IACd,eAAY,IACZ,GAAG,KACs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EAAA,KAAC,GAAD;GACE,QAAQ,iBAAA,GAAA,EAAA,KAAC,GAAD;IAAQ,SAAQ;IAAQ,MAAK;GAAW,CAAA;GAChD,WAAU;GACV,aAAU;aAEV,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAO,WAAU,sBAAuB,CAAA;EACZ,CAAA,CAEV;;AAE5B;AAEA,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAsE;CAChH,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,gCAAgC,CAAS;EACvD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,IAAoB;CAC3B,OAAO,EAAM,OAA8B,IAAI;AACjD"}
1
+ {"version":3,"file":"combobox.mjs","names":[],"sources":["../packages/ui-web/src/combobox.tsx"],"sourcesContent":["'use client';\n\nimport { Combobox as ComboboxPrimitive } from '@base-ui/react';\nimport type {\n ComboboxChipBaseProps,\n ComboboxChipsBaseProps,\n ComboboxChipsInputBaseProps,\n ComboboxClearBaseProps,\n ComboboxCollectionBaseProps,\n ComboboxContentBaseProps,\n ComboboxEmptyBaseProps,\n ComboboxGroupBaseProps,\n ComboboxInputBaseProps,\n ComboboxItemBaseProps,\n ComboboxLabelBaseProps,\n ComboboxListBaseProps,\n ComboboxSeparatorBaseProps,\n ComboboxTriggerBaseProps,\n ComboboxValueBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronDownIcon, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Button } from '@/./button';\nimport { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from '@/./input-group';\n\nconst Combobox = ComboboxPrimitive.Root;\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props & ComboboxValueBaseProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props & ComboboxTriggerBaseProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4\" />\n </ComboboxPrimitive.Trigger>\n );\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props & ComboboxClearBaseProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n );\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & ComboboxInputBaseProps) {\n return (\n <InputGroup className={cn('w-auto', className)}>\n <ComboboxPrimitive.Input render={<InputGroupInput disabled={disabled} />} {...props} />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n asChild\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n >\n <ComboboxTrigger />\n </InputGroupButton>\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n );\n}\n\nfunction ComboboxContent({\n className,\n side = 'bottom',\n sideOffset = 6,\n align = 'start',\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'> &\n ComboboxContentBaseProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n 'group/combobox-content bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg shadow-md ring-1 duration-100 data-[chips=true]:min-w-(--anchor-width) *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none',\n className,\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props & ComboboxListBaseProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n 'no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props & ComboboxItemBaseProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={<span className=\"pointer-events-none absolute end-2 flex size-4 items-center justify-center\" />}\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props & ComboboxGroupBaseProps) {\n return <ComboboxPrimitive.Group data-slot=\"combobox-group\" className={cn(className)} {...props} />;\n}\n\nfunction ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props & ComboboxLabelBaseProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props & ComboboxCollectionBaseProps) {\n return <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />;\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props & ComboboxEmptyBaseProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n 'text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props & ComboboxSeparatorBaseProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props &\n ComboboxChipsBaseProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n 'border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & ComboboxChipBaseProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n 'bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0',\n className,\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ms-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\nfunction ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props & ComboboxChipsInputBaseProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn('min-w-16 flex-1 outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null);\n}\n\nexport {\n Combobox,\n ComboboxChip,\n ComboboxChips,\n ComboboxChipsInput,\n ComboboxCollection,\n ComboboxContent,\n ComboboxEmpty,\n ComboboxGroup,\n ComboboxInput,\n ComboboxItem,\n ComboboxLabel,\n ComboboxList,\n ComboboxSeparator,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n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 -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js"),n=require("./dialog.cjs"),r=require("./input-group.cjs");let i=require("react");i=e.r(i);var a=t.Ar();function o({className:e,...n}){return(0,a.jsx)(t.F,{"data-slot":`command`,className:t.ei(`bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1`,e),...n})}function s({title:e=`Command Palette`,description:r=`Search for a command to run...`,children:i,className:s,showCloseButton:c=!1,...l}){return(0,a.jsxs)(n.Dialog,{...l,children:[(0,a.jsxs)(n.DialogHeader,{className:`sr-only`,children:[(0,a.jsx)(n.DialogTitle,{children:e}),(0,a.jsx)(n.DialogDescription,{children:r})]}),(0,a.jsx)(n.DialogContent,{className:t.ei(`top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0`,s),showCloseButton:c,children:(0,a.jsx)(o,{className:`[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5`,children:i})})]})}function c({className:e,...n}){return(0,a.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,a.jsxs)(r.InputGroup,{className:`border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!`,children:[(0,a.jsx)(t.F.Input,{"data-slot":`command-input`,className:t.ei(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...n}),(0,a.jsx)(r.InputGroupAddon,{children:(0,a.jsx)(t.Ir,{className:`size-4 shrink-0 opacity-50`})})]})})}function l({className:e,...n}){return(0,a.jsx)(t.F.List,{"data-slot":`command-list`,className:t.ei(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,e),...n})}function u({className:e,...n}){return(0,a.jsx)(t.F.Empty,{"data-slot":`command-empty`,className:t.ei(`py-6 text-center text-sm`,e),...n})}function d({className:e,...n}){return(0,a.jsx)(t.F.Group,{"data-slot":`command-group`,className:t.ei(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,e),...n})}function f({className:e,...n}){return(0,a.jsx)(t.F.Separator,{"data-slot":`command-separator`,className:t.ei(`bg-border -mx-1 h-px`,e),...n})}function p({className:e,children:n,...r}){return(0,a.jsxs)(t.F.Item,{"data-slot":`command-item`,className:t.ei(`group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,a.jsx)(t.Zr,{className:`ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}function m({className:e,...n}){return(0,a.jsx)(`span`,{"data-slot":`command-shortcut`,className:t.ei(`text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest`,e),...n})}exports.Command=o,exports.CommandDialog=s,exports.CommandEmpty=u,exports.CommandGroup=d,exports.CommandInput=c,exports.CommandItem=p,exports.CommandList=l,exports.CommandSeparator=f,exports.CommandShortcut=m;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js"),n=require("./dialog.cjs"),r=require("./input-group.cjs");let i=require("react");i=e.r(i);var a=t.Ar();function o({className:e,...n}){return(0,a.jsx)(t.F,{"data-slot":`command`,className:t.ei(`bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1`,e),...n})}function s({title:e=`Command Palette`,description:r=`Search for a command to run...`,children:i,className:s,showCloseButton:c=!1,...l}){return(0,a.jsxs)(n.Dialog,{...l,children:[(0,a.jsxs)(n.DialogHeader,{className:`sr-only`,children:[(0,a.jsx)(n.DialogTitle,{children:e}),(0,a.jsx)(n.DialogDescription,{children:r})]}),(0,a.jsx)(n.DialogContent,{className:t.ei(`top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0`,s),showCloseButton:c,children:(0,a.jsx)(o,{className:`[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5`,children:i})})]})}function c({className:e,...n}){return(0,a.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,a.jsxs)(r.InputGroup,{className:`border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!`,children:[(0,a.jsx)(t.F.Input,{"data-slot":`command-input`,className:t.ei(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,e),...n}),(0,a.jsx)(r.InputGroupAddon,{children:(0,a.jsx)(t.Ir,{className:`size-4 shrink-0 opacity-50`})})]})})}function l({className:e,...n}){return(0,a.jsx)(t.F.List,{"data-slot":`command-list`,className:t.ei(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,e),...n})}function u({className:e,...n}){return(0,a.jsx)(t.F.Empty,{"data-slot":`command-empty`,className:t.ei(`py-6 text-center text-sm`,e),...n})}function d({className:e,...n}){return(0,a.jsx)(t.F.Group,{"data-slot":`command-group`,className:t.ei(`text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,e),...n})}function f({className:e,...n}){return(0,a.jsx)(t.F.Separator,{"data-slot":`command-separator`,className:t.ei(`bg-border -mx-1 h-px`,e),...n})}function p({className:e,children:n,...r}){return(0,a.jsxs)(t.F.Item,{"data-slot":`command-item`,className:t.ei(`group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,a.jsx)(t.Zr,{className:`ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`})]})}function m({className:e,...n}){return(0,a.jsx)(`span`,{"data-slot":`command-shortcut`,className:t.ei(`text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest`,e),...n})}exports.Command=o,exports.CommandDialog=s,exports.CommandEmpty=u,exports.CommandGroup=d,exports.CommandInput=c,exports.CommandItem=p,exports.CommandList=l,exports.CommandSeparator=f,exports.CommandShortcut=m;
2
2
  //# sourceMappingURL=command.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from 'cn';\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/./dialog';\nimport { InputGroup, InputGroupAddon } from '@/./input-group';\n\nimport type { CommandBaseProps } from '@gv-tech/ui-core';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCommandContract = React.ComponentProps<typeof Command> extends CommandBaseProps ? true : false;\n"],"mappings":"0QAUA,SAAS,EAAQ,CAAE,YAAW,GAAG,GAAwD,CACvF,OACE,EAAA,EAAA,KAAC,EAAA,EAAD,CACE,YAAU,UACV,UAAW,EAAA,GACT,6FACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAc,CACrB,QAAQ,kBACR,cAAc,iCACd,WACA,YACA,kBAAkB,GAClB,GAAG,GAMF,CACD,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CAAQ,GAAI,WAAZ,EACE,EAAA,EAAA,MAAC,EAAA,aAAD,CAAc,UAAU,mBAAxB,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,GACjC,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAA,SAAoB,CAA+B,CAAA,CACvC,KACd,EAAA,EAAA,KAAC,EAAA,cAAD,CACE,UAAW,EAAA,GAAG,wDAAyD,CAAS,EAC/D,4BAEjB,EAAA,EAAA,KAAC,EAAD,CAAS,UAAU,2TAChB,UACM,CAAA,CACI,CAAA,CACT,GAEZ,CAEA,SAAS,EAAa,CAAE,YAAW,GAAG,GAA8D,CAClG,OACE,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,wBAAwB,UAAU,qBAC/C,EAAA,EAAA,MAAC,EAAA,WAAD,C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AuC,CAC9E,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,mBACV,UAAW,EAAA,GACT,yGACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import type { CommandBaseProps } from '@gv-tech/ui-core';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from 'cn';\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/./dialog';\nimport { InputGroup, InputGroupAddon } from '@/./input-group';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCommandContract = React.ComponentProps<typeof Command> extends CommandBaseProps ? true : false;\n"],"mappings":"0QASA,SAAS,EAAQ,CAAE,YAAW,GAAG,GAAwD,CACvF,OACE,EAAA,EAAA,KAAC,EAAA,EAAD,CACE,YAAU,UACV,UAAW,EAAA,GACT,6FACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAc,CACrB,QAAQ,kBACR,cAAc,iCACd,WACA,YACA,kBAAkB,GAClB,GAAG,GAMF,CACD,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CAAQ,GAAI,WAAZ,EACE,EAAA,EAAA,MAAC,EAAA,aAAD,CAAc,UAAU,mBAAxB,EACE,EAAA,EAAA,KAAC,EAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,GACjC,EAAA,EAAA,KAAC,EAAA,kBAAD,CAAA,SAAoB,CAA+B,CAAA,CACvC,KACd,EAAA,EAAA,KAA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A,CAEL,CAEA,SAAS,EAAY,CAAE,YAAW,WAAU,GAAG,GAA6D,CAC1G,OACE,EAAA,EAAA,MAAC,EAAA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EAAA,GACT,+ZACA,CACF,EACA,GAAI,WANN,CAQG,GACD,EAAA,EAAA,KAAC,EAAA,GAAD,CAAW,UAAU,iIAAmI,CAAA,CACnI,GAE3B,CAEA,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAuC,CAC9E,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,mBACV,UAAW,EAAA,GACT,yGACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
package/dist/command.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Ar as e, F as t, Ir as n, Zr as r, ei as i } from "./vendor-D9rWr_E8.mjs";
2
+ import { Ar as e, F as t, Ir as n, Zr as r, ei as i } from "./vendor-0E4gGRxj.mjs";
3
3
  import { Dialog as a, DialogContent as o, DialogDescription as s, DialogHeader as c, DialogTitle as l } from "./dialog.mjs";
4
4
  import { InputGroup as u, InputGroupAddon as d } from "./input-group.mjs";
5
5
  import "react";
@@ -1 +1 @@
1
- {"version":3,"file":"command.mjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from 'cn';\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/./dialog';\nimport { InputGroup, InputGroupAddon } from '@/./input-group';\n\nimport type { CommandBaseProps } from '@gv-tech/ui-core';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCommandContract = React.ComponentProps<typeof Command> extends CommandBaseProps ? true : false;\n"],"mappings":";;;;;;;AAUA,SAAS,EAAQ,EAAE,cAAW,GAAG,KAAwD;CACvF,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,8FACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAQ,mBACR,iBAAc,kCACd,aACA,cACA,qBAAkB,IAClB,GAAG,KAMF;CACD,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EAAQ,GAAI;YAAZ,CACE,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAc,WAAU;aAAxB,CACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAc,EAAmB,CAAA,GACjC,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAoB,EAA+B,CAAA,CACvC;MACd,iBAAA,GAAA,EAAA,KAAC,GAAD;GACE,WAAW,EAAG,yDAAyD,CAAS;GAC/D;aAEjB,iBAAA,GAAA,EAAA,KAAC,GAAD;IAAS,WAAU;IAChB;GACM,CAAA;EACI,CAAA,CACT;;AAEZ;AAEA,SAAS,EAAa,EAAE,cAAW,GAAG,KAA8D;CAClG,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EAAK,aAAU;EAAwB,WAAU;YAC/C,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAY,WAAU;aAAtB,CACE,iBAAA,GAAA,EAAA,KAAC,EAAiB,OAAlB;IACE,aAAU;IACV,WAAW,EAAG,iFAAiF,CAAS;IACxG,GAAI;GACL,CAAA,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAY,WAAU,6BAA8B,CAAA,EACrC,CAAA,CACP;;CACT,CAAA;AAET;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAA6D;CAChG,OACE,iBAAA,GAAA,EAAA,KAAC,EAAiB,MAAlB;EACE,aAAU;EACV,WAAW,EAAG,oFAAoF,CAAS;EAC3G,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAa,EAAE,cAAW,GAAG,KAA8D;CAClG,OACE,iBAAA,GAAA,EAAA,KAAC,EAAiB,OAAlB;EACE,aAAU;EACV,WAAW,EAAG,4BAA4B,CAAS;EACnD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAa,EAAE,cAAW,GAAG,KAA8D;CAClG,OACE,iBAAA,GAAA,EAAA,KAAC,EAAiB,OAAlB;EACE,aAAU;EACV,WAAW,EACT,+NACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAiB,EAAE,cAAW,GAAG,KAAkE;CAC1G,OACE,iBAAA,GAAA,EAAA,KAAC,EAAiB,WAAlB;EACE,aAAU;EACV,WAAW,EAAG,wBAAwB,CAAS;EAC/C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,aAAU,GAAG,KAA6D;CAC1G,OACE,iBAAA,GAAA,EAAA,MAAC,EAAiB,MAAlB;EACE,aAAU;EACV,WAAW,EACT,gaACA,CACF;EACA,GAAI;YANN,CAQG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAW,WAAU,kIAAmI,CAAA,CACnI;;AAE3B;AAEA,SAAS,EAAgB,EAAE,cAAW,GAAG,KAAuC;CAC9E,OACE,iBAAA,GAAA,EAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAW,EACT,0GACA,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"command.mjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import type { CommandBaseProps } from '@gv-tech/ui-core';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from 'cn';\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/./dialog';\nimport { InputGroup, InputGroupAddon } from '@/./input-group';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"group/command-item data-selected:bg-muted data-selected:text-foreground data-selected:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-selected/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCommandContract = React.ComponentProps<typeof Command> extends CommandBaseProps ? true : false;\n"],"mappings":";;;;;;;AASA,SAAS,EAAQ,EAAE,cAAW,GAAG,KAAwD;CACvF,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,8FACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAQ,mBACR,iBAAc,kCACd,aACA,cACA,qBAAkB,IAClB,GAAG,KAMF;CACD,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EAAQ,GAAI;YAAZ,CACE,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAc,WAAU;aAAxB,CACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAc,EAAmB,CAAA,GACjC,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAoB,EAA+B,CAAA,CACvC;MACd,iBAAA,GAAA,EAAA,KAAC,GAAD;GACE,WAAW,EAAG,yDAAyD,CAAS;GAC/D;aAEjB,iBAAA,GAAA,EAAA,KAAC,GAAD;IAAS,WAAU;IAChB;GACM,CAAA;EACI,CAAA,CACT;;AAEZ;AAEA,SAAS,EAAa,EAAE,cAAW,GAAG,KAA8D;CAClG,OACE,iBAAA,GAAA,EAAA,KAAC,OAAD;EAAK,aAAU;EAAwB,WAAU;YAC/C,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAY,WAAU;aAAtB,CACE,iBAAA,GAAA,EAAA,KAA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ACA,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -1,2 +1,2 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-i1KCLryV.js");let n=require("react");n=e.r(n);var r=t.Ar();function i({...e}){return(0,r.jsx)(t.Gn,{"data-slot":`context-menu`,...e})}function a({className:e,...n}){return(0,r.jsx)(t.Xn,{"data-slot":`context-menu-trigger`,className:t.ei(`select-none`,e),...n})}function o({...e}){return(0,r.jsx)(t.Rn,{"data-slot":`context-menu-group`,...e})}function s({...e}){return(0,r.jsx)(t.Hn,{"data-slot":`context-menu-portal`,...e})}function c({...e}){return(0,r.jsx)(t.qn,{"data-slot":`context-menu-sub`,...e})}function l({...e}){return(0,r.jsx)(t.Un,{"data-slot":`context-menu-radio-group`,...e})}function u({className:e,...n}){return(0,r.jsx)(t.Hn,{children:(0,r.jsx)(t.Ln,{"data-slot":`context-menu-content`,className:t.ei(`bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100`,e),...n})})}function d({className:e,inset:n,variant:i=`default`,...a}){return(0,r.jsx)(t.zn,{"data-slot":`context-menu-item`,"data-inset":n,"data-variant":i,className:t.ei(`group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...a})}function f({className:e,inset:n,children:i,...a}){return(0,r.jsxs)(t.Yn,{"data-slot":`context-menu-sub-trigger`,"data-inset":n,className:t.ei(`focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...a,children:[i,(0,r.jsx)(t.Jr,{className:`ms-auto rtl:rotate-180`})]})}function p({className:e,...n}){return(0,r.jsx)(t.Jn,{"data-slot":`context-menu-sub-content`,className:t.ei(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100`,e),...n})}function m({className:e,children:n,checked:i,inset:a,...o}){return(0,r.jsxs)(t.In,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:t.ei(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:i,...o,children:[(0,r.jsx)(`span`,{className:`pointer-events-none absolute end-2`,children:(0,r.jsx)(t.Bn,{children:(0,r.jsx)(t.Zr,{})})}),n]})}function h({className:e,children:n,inset:i,...a}){return(0,r.jsxs)(t.Wn,{"data-slot":`context-menu-radio-item`,"data-inset":i,className:t.ei(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...a,children:[(0,r.jsx)(`span`,{className:`pointer-events-none absolute end-2`,children:(0,r.jsx)(t.Bn,{children:(0,r.jsx)(t.Zr,{})})}),n]})}function g({className:e,inset:n,...i}){return(0,r.jsx)(t.Vn,{"data-slot":`context-menu-label`,"data-inset":n,className:t.ei(`text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7`,e),...i})}function _({className:e,...n}){return(0,r.jsx)(t.Kn,{"data-slot":`context-menu-separator`,className:t.ei(`bg-border -mx-1 my-1 h-px`,e),...n})}function v({className:e,...n}){return(0,r.jsx)(`span`,{"data-slot":`context-menu-shortcut`,className:t.ei(`text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest`,e),...n})}exports.ContextMenu=i,exports.ContextMenuCheckboxItem=m,exports.ContextMenuContent=u,exports.ContextMenuGroup=o,exports.ContextMenuItem=d,exports.ContextMenuLabel=g,exports.ContextMenuPortal=s,exports.ContextMenuRadioGroup=l,exports.ContextMenuRadioItem=h,exports.ContextMenuSeparator=_,exports.ContextMenuShortcut=v,exports.ContextMenuSub=c,exports.ContextMenuSubContent=p,exports.ContextMenuSubTrigger=f,exports.ContextMenuTrigger=a;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-mLOUI7ql.js"),t=require("./vendor-Bz5F_va8.js");let n=require("react");n=e.r(n);var r=t.Ar();function i({...e}){return(0,r.jsx)(t.In,{"data-slot":`context-menu`,...e})}function a({className:e,...n}){return(0,r.jsx)(t.Xn,{"data-slot":`context-menu-trigger`,className:t.ei(`select-none`,e),...n})}function o({...e}){return(0,r.jsx)(t.zn,{"data-slot":`context-menu-group`,...e})}function s({...e}){return(0,r.jsx)(t.Un,{"data-slot":`context-menu-portal`,...e})}function c({...e}){return(0,r.jsx)(t.qn,{"data-slot":`context-menu-sub`,...e})}function l({...e}){return(0,r.jsx)(t.Wn,{"data-slot":`context-menu-radio-group`,...e})}function u({className:e,...n}){return(0,r.jsx)(t.Un,{children:(0,r.jsx)(t.Rn,{"data-slot":`context-menu-content`,className:t.ei(`bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100`,e),...n})})}function d({className:e,inset:n,variant:i=`default`,...a}){return(0,r.jsx)(t.Bn,{"data-slot":`context-menu-item`,"data-inset":n,"data-variant":i,className:t.ei(`group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...a})}function f({className:e,inset:n,children:i,...a}){return(0,r.jsxs)(t.Yn,{"data-slot":`context-menu-sub-trigger`,"data-inset":n,className:t.ei(`focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...a,children:[i,(0,r.jsx)(t.Jr,{className:`ms-auto rtl:rotate-180`})]})}function p({className:e,...n}){return(0,r.jsx)(t.Jn,{"data-slot":`context-menu-sub-content`,className:t.ei(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100`,e),...n})}function m({className:e,children:n,checked:i,inset:a,...o}){return(0,r.jsxs)(t.Ln,{"data-slot":`context-menu-checkbox-item`,"data-inset":a,className:t.ei(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:i,...o,children:[(0,r.jsx)(`span`,{className:`pointer-events-none absolute end-2`,children:(0,r.jsx)(t.Vn,{children:(0,r.jsx)(t.Zr,{})})}),n]})}function h({className:e,children:n,inset:i,...a}){return(0,r.jsxs)(t.Gn,{"data-slot":`context-menu-radio-item`,"data-inset":i,className:t.ei(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...a,children:[(0,r.jsx)(`span`,{className:`pointer-events-none absolute end-2`,children:(0,r.jsx)(t.Vn,{children:(0,r.jsx)(t.Zr,{})})}),n]})}function g({className:e,inset:n,...i}){return(0,r.jsx)(t.Hn,{"data-slot":`context-menu-label`,"data-inset":n,className:t.ei(`text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7`,e),...i})}function _({className:e,...n}){return(0,r.jsx)(t.Kn,{"data-slot":`context-menu-separator`,className:t.ei(`bg-border -mx-1 my-1 h-px`,e),...n})}function v({className:e,...n}){return(0,r.jsx)(`span`,{"data-slot":`context-menu-shortcut`,className:t.ei(`text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest`,e),...n})}exports.ContextMenu=i,exports.ContextMenuCheckboxItem=m,exports.ContextMenuContent=u,exports.ContextMenuGroup=o,exports.ContextMenuItem=d,exports.ContextMenuLabel=g,exports.ContextMenuPortal=s,exports.ContextMenuRadioGroup=l,exports.ContextMenuRadioItem=h,exports.ContextMenuSeparator=_,exports.ContextMenuShortcut=v,exports.ContextMenuSub=c,exports.ContextMenuSubContent=p,exports.ContextMenuSubTrigger=f,exports.ContextMenuTrigger=a;
2
2
  //# sourceMappingURL=context-menu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.cjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport type { ContextMenuBaseProps } from '@gv-tech/ui-core';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto rtl:rotate-180\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyContextMenuContract =\n React.ComponentProps<typeof ContextMenu> extends ContextMenuBaseProps ? true : false;\n"],"mappings":"iNAOA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,uBACV,UAAW,EAAA,GAAG,cAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAiB,CAAE,GAAG,GAAkE,CAC/F,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA4B,YAAU,qBAAqB,GAAI,CAAQ,CAAA,CAChF,CAEA,SAAS,EAAkB,CAAE,GAAG,GA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AAA,MAAA,EAAA,GAAA,CACE,YAAU,6BACV,aAAY,EACZ,UAAW,EAAA,GACT,6TACA,CACF,EACS,UACT,GAAI,WARN,EAUE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,+CACd,EAAA,EAAA,KAAA,EAAA,GAAA,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,CAAA,CACsB,CAAA,CAChC,CAAA,EACL,CACgC,GAEvC,CAEA,SAAS,EAAqB,CAC5B,YACA,WACA,QACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,MAAA,EAAA,GAAA,CACE,YAAU,0BACV,aAAY,EACZ,UAAW,EAAA,GACT,6TACA,CACF,EACA,GAAI,WAPN,EASE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,+CACd,EAAA,EAAA,KAAA,EAAA,GAAA,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,CAAA,CACsB,CAAA,CAChC,CAAA,EACL,CAC6B,GAEpC,CAEA,SAAS,EAAiB,CACxB,YACA,QACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,qBACV,aAAY,EACZ,UAAW,EAAA,GAAG,wEAAyE,CAAS,EAChG,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAqB,CAAE,YAAW,GAAG,GAAsE,CAClH,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,yBACV,UAAW,EAAA,GAAG,4BAA6B,CAAS,EACpD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAoB,CAAE,YAAW,GAAG,GAAuC,CAClF,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,wBACV,UAAW,EAAA,GACT,6GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
1
+ {"version":3,"file":"context-menu.cjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import type { ContextMenuBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto rtl:rotate-180\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyContextMenuContract =\n React.ComponentProps<typeof ContextMenu> extends ContextMenuBaseProps ? true : false;\n"],"mappings":"iNAMA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA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,KAAA,EAAA,GAAA,CACE,YAAU,yBACV,UAAW,EAAA,GAAG,4BAA6B,CAAS,EACpD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAoB,CAAE,YAAW,GAAG,GAAuC,CAClF,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,wBACV,UAAW,EAAA,GACT,6GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { Ar as e, Bn as t, Gn as n, Hn as r, In as i, Jn as a, Jr as o, Kn as s, Ln as c, Rn as l, Un as u, Vn as d, Wn as f, Xn as p, Yn as m, Zr as h, ei as g, qn as _, zn as v } from "./vendor-D9rWr_E8.mjs";
2
+ import { Ar as e, Bn as t, Gn as n, Hn as r, In as i, Jn as a, Jr as o, Kn as s, Ln as c, Rn as l, Un as u, Vn as d, Wn as f, Xn as p, Yn as m, Zr as h, ei as g, qn as _, zn as v } from "./vendor-0E4gGRxj.mjs";
3
3
  import "react";
4
4
  //#region packages/ui-web/src/context-menu.tsx
5
5
  var y = e();
6
6
  function b({ ...e }) {
7
- return /* @__PURE__ */ (0, y.jsx)(n, {
7
+ return /* @__PURE__ */ (0, y.jsx)(i, {
8
8
  "data-slot": "context-menu",
9
9
  ...e
10
10
  });
@@ -17,13 +17,13 @@ function x({ className: e, ...t }) {
17
17
  });
18
18
  }
19
19
  function S({ ...e }) {
20
- return /* @__PURE__ */ (0, y.jsx)(l, {
20
+ return /* @__PURE__ */ (0, y.jsx)(v, {
21
21
  "data-slot": "context-menu-group",
22
22
  ...e
23
23
  });
24
24
  }
25
25
  function C({ ...e }) {
26
- return /* @__PURE__ */ (0, y.jsx)(r, {
26
+ return /* @__PURE__ */ (0, y.jsx)(u, {
27
27
  "data-slot": "context-menu-portal",
28
28
  ...e
29
29
  });
@@ -35,25 +35,25 @@ function w({ ...e }) {
35
35
  });
36
36
  }
37
37
  function T({ ...e }) {
38
- return /* @__PURE__ */ (0, y.jsx)(u, {
38
+ return /* @__PURE__ */ (0, y.jsx)(f, {
39
39
  "data-slot": "context-menu-radio-group",
40
40
  ...e
41
41
  });
42
42
  }
43
43
  function E({ className: e, ...t }) {
44
- return /* @__PURE__ */ (0, y.jsx)(r, { children: /* @__PURE__ */ (0, y.jsx)(c, {
44
+ return /* @__PURE__ */ (0, y.jsx)(u, { children: /* @__PURE__ */ (0, y.jsx)(l, {
45
45
  "data-slot": "context-menu-content",
46
46
  className: g("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100", e),
47
47
  ...t
48
48
  }) });
49
49
  }
50
- function D({ className: e, inset: t, variant: n = "default", ...r }) {
51
- return /* @__PURE__ */ (0, y.jsx)(v, {
50
+ function D({ className: e, inset: n, variant: r = "default", ...i }) {
51
+ return /* @__PURE__ */ (0, y.jsx)(t, {
52
52
  "data-slot": "context-menu-item",
53
- "data-inset": t,
54
- "data-variant": n,
53
+ "data-inset": n,
54
+ "data-variant": r,
55
55
  className: g("group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
56
- ...r
56
+ ...i
57
57
  });
58
58
  }
59
59
  function O({ className: e, inset: t, children: n, ...r }) {
@@ -72,33 +72,33 @@ function k({ className: e, ...t }) {
72
72
  ...t
73
73
  });
74
74
  }
75
- function A({ className: e, children: n, checked: r, inset: a, ...o }) {
76
- return /* @__PURE__ */ (0, y.jsxs)(i, {
75
+ function A({ className: e, children: t, checked: n, inset: r, ...i }) {
76
+ return /* @__PURE__ */ (0, y.jsxs)(c, {
77
77
  "data-slot": "context-menu-checkbox-item",
78
- "data-inset": a,
78
+ "data-inset": r,
79
79
  className: g("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
80
- checked: r,
81
- ...o,
80
+ checked: n,
81
+ ...i,
82
82
  children: [/* @__PURE__ */ (0, y.jsx)("span", {
83
83
  className: "pointer-events-none absolute end-2",
84
- children: /* @__PURE__ */ (0, y.jsx)(t, { children: /* @__PURE__ */ (0, y.jsx)(h, {}) })
85
- }), n]
84
+ children: /* @__PURE__ */ (0, y.jsx)(d, { children: /* @__PURE__ */ (0, y.jsx)(h, {}) })
85
+ }), t]
86
86
  });
87
87
  }
88
- function j({ className: e, children: n, inset: r, ...i }) {
89
- return /* @__PURE__ */ (0, y.jsxs)(f, {
88
+ function j({ className: e, children: t, inset: r, ...i }) {
89
+ return /* @__PURE__ */ (0, y.jsxs)(n, {
90
90
  "data-slot": "context-menu-radio-item",
91
91
  "data-inset": r,
92
92
  className: g("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
93
93
  ...i,
94
94
  children: [/* @__PURE__ */ (0, y.jsx)("span", {
95
95
  className: "pointer-events-none absolute end-2",
96
- children: /* @__PURE__ */ (0, y.jsx)(t, { children: /* @__PURE__ */ (0, y.jsx)(h, {}) })
97
- }), n]
96
+ children: /* @__PURE__ */ (0, y.jsx)(d, { children: /* @__PURE__ */ (0, y.jsx)(h, {}) })
97
+ }), t]
98
98
  });
99
99
  }
100
100
  function M({ className: e, inset: t, ...n }) {
101
- return /* @__PURE__ */ (0, y.jsx)(d, {
101
+ return /* @__PURE__ */ (0, y.jsx)(r, {
102
102
  "data-slot": "context-menu-label",
103
103
  "data-inset": t,
104
104
  className: g("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7", e),
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.mjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import { cn } from 'cn';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport type { ContextMenuBaseProps } from '@gv-tech/ui-core';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto rtl:rotate-180\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyContextMenuContract =\n React.ComponentProps<typeof ContextMenu> extends ContextMenuBaseProps ? true : false;\n"],"mappings":";;;;;AAOA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAoE;CAC9G,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,eAAe,CAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAiB,EAAE,GAAG,KAAkE;CAC/F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA4B,aAAU;EAAqB,GAAI;CAAQ,CAAA;AAChF;AAEA,SAAS,EAAkB,EAAE,GAAG,KAAmE;CACjG,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,EAAe,EAAE,GAAG,KAAgE;CAC3F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA0B,aAAU;EAAmB,GAAI;CAAQ,CAAA;AAC5E;AAEA,SAAS,EAAsB,EAAE,GAAG,KAAuE;CACzG,OAAO,iBAAA,GAA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B,cACA,aACA,UACA,GAAG,KAGF;CACD,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,EACT,8TACA,CACF;EACA,GAAI;YAPN,CASE,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aACd,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UACE,iBAAA,GAAA,EAAA,KAAC,GAAD,CAAY,CAAA,EACsB,CAAA;EAChC,CAAA,GACL,CAC6B;;AAEpC;AAEA,SAAS,EAAiB,EACxB,cACA,UACA,GAAG,KAGF;CACD,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,cAAY;EACZ,WAAW,EAAG,yEAAyE,CAAS;EAChG,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAqB,EAAE,cAAW,GAAG,KAAsE;CAClH,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,6BAA6B,CAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAoB,EAAE,cAAW,GAAG,KAAuC;CAClF,OACE,iBAAA,GAAA,EAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAW,EACT,8GACA,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"context-menu.mjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import type { ContextMenuBaseProps } from '@gv-tech/ui-core';\nimport { cn } from 'cn';\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto rtl:rotate-180\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyContextMenuContract =\n React.ComponentProps<typeof ContextMenu> extends ContextMenuBaseProps ? true : false;\n"],"mappings":";;;;;AAMA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAoE;CAC9G,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,eAAe,CAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAiB,EAAE,GAAG,KAAkE;CAC/F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA4B,aA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