@arolariu/components 0.0.30 → 0.0.32

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 (476) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/components/ui/accordion.cjs +1 -1
  3. package/dist/cjs/components/ui/accordion.cjs.map +1 -1
  4. package/dist/cjs/components/ui/alert-dialog.cjs +1 -1
  5. package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
  6. package/dist/cjs/components/ui/alert.cjs +1 -1
  7. package/dist/cjs/components/ui/alert.cjs.map +1 -1
  8. package/dist/cjs/components/ui/aspect-ratio.cjs +1 -1
  9. package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
  10. package/dist/cjs/components/ui/avatar.cjs +1 -1
  11. package/dist/cjs/components/ui/avatar.cjs.map +1 -1
  12. package/dist/cjs/components/ui/badge.cjs +1 -1
  13. package/dist/cjs/components/ui/badge.cjs.map +1 -1
  14. package/dist/cjs/components/ui/breadcrumb.cjs +1 -1
  15. package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
  16. package/dist/cjs/components/ui/button.cjs +1 -1
  17. package/dist/cjs/components/ui/button.cjs.map +1 -1
  18. package/dist/cjs/components/ui/calendar.cjs +1 -1
  19. package/dist/cjs/components/ui/calendar.cjs.map +1 -1
  20. package/dist/cjs/components/ui/card.cjs +1 -1
  21. package/dist/cjs/components/ui/card.cjs.map +1 -1
  22. package/dist/cjs/components/ui/carousel.cjs +1 -1
  23. package/dist/cjs/components/ui/carousel.cjs.map +1 -1
  24. package/dist/cjs/components/ui/chart.cjs +3 -3
  25. package/dist/cjs/components/ui/chart.cjs.map +1 -1
  26. package/dist/cjs/components/ui/checkbox.cjs +1 -1
  27. package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
  28. package/dist/cjs/components/ui/collapsible.cjs +1 -1
  29. package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
  30. package/dist/cjs/components/ui/command.cjs +1 -1
  31. package/dist/cjs/components/ui/command.cjs.map +1 -1
  32. package/dist/cjs/components/ui/context-menu.cjs +1 -1
  33. package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
  34. package/dist/cjs/components/ui/dialog.cjs +1 -1
  35. package/dist/cjs/components/ui/dialog.cjs.map +1 -1
  36. package/dist/cjs/components/ui/drawer.cjs +1 -1
  37. package/dist/cjs/components/ui/drawer.cjs.map +1 -1
  38. package/dist/cjs/components/ui/dropdown-menu.cjs +1 -1
  39. package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
  40. package/dist/cjs/components/ui/form.cjs +1 -1
  41. package/dist/cjs/components/ui/form.cjs.map +1 -1
  42. package/dist/cjs/components/ui/hover-card.cjs +1 -1
  43. package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
  44. package/dist/cjs/components/ui/input-otp.cjs +1 -1
  45. package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
  46. package/dist/cjs/components/ui/input.cjs +1 -1
  47. package/dist/cjs/components/ui/input.cjs.map +1 -1
  48. package/dist/cjs/components/ui/label.cjs +1 -1
  49. package/dist/cjs/components/ui/label.cjs.map +1 -1
  50. package/dist/cjs/components/ui/menubar.cjs +1 -1
  51. package/dist/cjs/components/ui/menubar.cjs.map +1 -1
  52. package/dist/cjs/components/ui/navigation-menu.cjs +1 -1
  53. package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
  54. package/dist/cjs/components/ui/pagination.cjs +1 -1
  55. package/dist/cjs/components/ui/pagination.cjs.map +1 -1
  56. package/dist/cjs/components/ui/popover.cjs +1 -1
  57. package/dist/cjs/components/ui/popover.cjs.map +1 -1
  58. package/dist/cjs/components/ui/progress.cjs +1 -1
  59. package/dist/cjs/components/ui/progress.cjs.map +1 -1
  60. package/dist/cjs/components/ui/radio-group.cjs +1 -1
  61. package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
  62. package/dist/cjs/components/ui/resizable.cjs +1 -1
  63. package/dist/cjs/components/ui/resizable.cjs.map +1 -1
  64. package/dist/cjs/components/ui/scroll-area.cjs +1 -1
  65. package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
  66. package/dist/cjs/components/ui/select.cjs +1 -1
  67. package/dist/cjs/components/ui/select.cjs.map +1 -1
  68. package/dist/cjs/components/ui/separator.cjs +1 -1
  69. package/dist/cjs/components/ui/separator.cjs.map +1 -1
  70. package/dist/cjs/components/ui/sheet.cjs +1 -1
  71. package/dist/cjs/components/ui/sheet.cjs.map +1 -1
  72. package/dist/cjs/components/ui/sidebar.cjs +1 -1
  73. package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
  74. package/dist/cjs/components/ui/skeleton.cjs +1 -1
  75. package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
  76. package/dist/cjs/components/ui/slider.cjs +1 -1
  77. package/dist/cjs/components/ui/slider.cjs.map +1 -1
  78. package/dist/cjs/components/ui/sonner.cjs +1 -1
  79. package/dist/cjs/components/ui/sonner.cjs.map +1 -1
  80. package/dist/cjs/components/ui/switch.cjs +1 -1
  81. package/dist/cjs/components/ui/switch.cjs.map +1 -1
  82. package/dist/cjs/components/ui/table.cjs +1 -1
  83. package/dist/cjs/components/ui/table.cjs.map +1 -1
  84. package/dist/cjs/components/ui/tabs.cjs +1 -1
  85. package/dist/cjs/components/ui/tabs.cjs.map +1 -1
  86. package/dist/cjs/components/ui/textarea.cjs +1 -1
  87. package/dist/cjs/components/ui/textarea.cjs.map +1 -1
  88. package/dist/cjs/components/ui/toggle-group.cjs +1 -1
  89. package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
  90. package/dist/cjs/components/ui/toggle.cjs +1 -1
  91. package/dist/cjs/components/ui/toggle.cjs.map +1 -1
  92. package/dist/cjs/components/ui/tooltip.cjs +1 -1
  93. package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
  94. package/dist/cjs/index.cjs +1 -1
  95. package/dist/cjs/index.css +1 -0
  96. package/dist/cjs/node_modules/@radix-ui/react-accordion/dist/index.cjs +1 -1
  97. package/dist/cjs/node_modules/@radix-ui/react-accordion/dist/index.cjs.map +1 -1
  98. package/dist/cjs/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs +3 -3
  99. package/dist/cjs/node_modules/@radix-ui/react-alert-dialog/dist/index.cjs.map +1 -1
  100. package/dist/cjs/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
  101. package/dist/cjs/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
  102. package/dist/cjs/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs +1 -1
  103. package/dist/cjs/node_modules/@radix-ui/react-aspect-ratio/dist/index.cjs.map +1 -1
  104. package/dist/cjs/node_modules/@radix-ui/react-avatar/dist/index.cjs +1 -1
  105. package/dist/cjs/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -1
  106. package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.cjs +1 -1
  107. package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.cjs.map +1 -1
  108. package/dist/cjs/node_modules/@radix-ui/react-collapsible/dist/index.cjs +1 -1
  109. package/dist/cjs/node_modules/@radix-ui/react-collapsible/dist/index.cjs.map +1 -1
  110. package/dist/cjs/node_modules/@radix-ui/react-collection/dist/index.cjs +1 -1
  111. package/dist/cjs/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -1
  112. package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
  113. package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  114. package/dist/cjs/node_modules/@radix-ui/react-context-menu/dist/index.cjs +1 -1
  115. package/dist/cjs/node_modules/@radix-ui/react-context-menu/dist/index.cjs.map +1 -1
  116. package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/index.cjs +2 -2
  117. package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
  118. package/dist/cjs/node_modules/@radix-ui/react-direction/dist/index.cjs +1 -1
  119. package/dist/cjs/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -1
  120. package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -1
  121. package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
  122. package/dist/cjs/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +1 -1
  123. package/dist/cjs/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -1
  124. package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
  125. package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  126. package/dist/cjs/node_modules/@radix-ui/react-hover-card/dist/index.cjs +1 -1
  127. package/dist/cjs/node_modules/@radix-ui/react-hover-card/dist/index.cjs.map +1 -1
  128. package/dist/cjs/node_modules/@radix-ui/react-label/dist/index.cjs +1 -1
  129. package/dist/cjs/node_modules/@radix-ui/react-label/dist/index.cjs.map +1 -1
  130. package/dist/cjs/node_modules/@radix-ui/react-menu/dist/index.cjs +1 -1
  131. package/dist/cjs/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
  132. package/dist/cjs/node_modules/@radix-ui/react-menubar/dist/index.cjs +1 -1
  133. package/dist/cjs/node_modules/@radix-ui/react-menubar/dist/index.cjs.map +1 -1
  134. package/dist/cjs/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs +1 -1
  135. package/dist/cjs/node_modules/@radix-ui/react-navigation-menu/dist/index.cjs.map +1 -1
  136. package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.cjs +1 -1
  137. package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.cjs.map +1 -1
  138. package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.cjs +1 -1
  139. package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
  140. package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -1
  141. package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
  142. package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
  143. package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  144. package/dist/cjs/node_modules/@radix-ui/react-progress/dist/index.cjs +2 -2
  145. package/dist/cjs/node_modules/@radix-ui/react-progress/dist/index.cjs.map +1 -1
  146. package/dist/cjs/node_modules/@radix-ui/react-radio-group/dist/index.cjs +1 -1
  147. package/dist/cjs/node_modules/@radix-ui/react-radio-group/dist/index.cjs.map +1 -1
  148. package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +1 -1
  149. package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -1
  150. package/dist/cjs/node_modules/@radix-ui/react-scroll-area/dist/index.cjs +1 -1
  151. package/dist/cjs/node_modules/@radix-ui/react-scroll-area/dist/index.cjs.map +1 -1
  152. package/dist/cjs/node_modules/@radix-ui/react-select/dist/index.cjs +1 -1
  153. package/dist/cjs/node_modules/@radix-ui/react-select/dist/index.cjs.map +1 -1
  154. package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.cjs +1 -1
  155. package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.cjs.map +1 -1
  156. package/dist/cjs/node_modules/@radix-ui/react-slider/dist/index.cjs +1 -1
  157. package/dist/cjs/node_modules/@radix-ui/react-slider/dist/index.cjs.map +1 -1
  158. package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  159. package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  160. package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.cjs +1 -1
  161. package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.cjs.map +1 -1
  162. package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.cjs +1 -1
  163. package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.cjs.map +1 -1
  164. package/dist/cjs/node_modules/@radix-ui/react-toggle/dist/index.cjs +1 -1
  165. package/dist/cjs/node_modules/@radix-ui/react-toggle/dist/index.cjs.map +1 -1
  166. package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.cjs +1 -1
  167. package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.cjs.map +1 -1
  168. package/dist/cjs/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
  169. package/dist/cjs/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
  170. package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  171. package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
  172. package/dist/cjs/node_modules/react-day-picker/dist/index.esm.cjs +1 -1
  173. package/dist/cjs/node_modules/react-day-picker/dist/index.esm.cjs.map +1 -1
  174. package/dist/esm/components/ui/accordion.js +20 -20
  175. package/dist/esm/components/ui/accordion.js.map +1 -1
  176. package/dist/esm/components/ui/alert-dialog.js +53 -50
  177. package/dist/esm/components/ui/alert-dialog.js.map +1 -1
  178. package/dist/esm/components/ui/alert.js +10 -10
  179. package/dist/esm/components/ui/alert.js.map +1 -1
  180. package/dist/esm/components/ui/aspect-ratio.js +4 -4
  181. package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
  182. package/dist/esm/components/ui/avatar.js +7 -7
  183. package/dist/esm/components/ui/avatar.js.map +1 -1
  184. package/dist/esm/components/ui/badge.js +9 -10
  185. package/dist/esm/components/ui/badge.js.map +1 -1
  186. package/dist/esm/components/ui/breadcrumb.js +36 -31
  187. package/dist/esm/components/ui/breadcrumb.js.map +1 -1
  188. package/dist/esm/components/ui/button.js +9 -10
  189. package/dist/esm/components/ui/button.js.map +1 -1
  190. package/dist/esm/components/ui/calendar.js +4 -4
  191. package/dist/esm/components/ui/calendar.js.map +1 -1
  192. package/dist/esm/components/ui/card.js +15 -12
  193. package/dist/esm/components/ui/card.js.map +1 -1
  194. package/dist/esm/components/ui/carousel.js +83 -83
  195. package/dist/esm/components/ui/carousel.js.map +1 -1
  196. package/dist/esm/components/ui/chart.js +80 -80
  197. package/dist/esm/components/ui/chart.js.map +1 -1
  198. package/dist/esm/components/ui/checkbox.js +4 -4
  199. package/dist/esm/components/ui/checkbox.js.map +1 -1
  200. package/dist/esm/components/ui/collapsible.js +10 -10
  201. package/dist/esm/components/ui/collapsible.js.map +1 -1
  202. package/dist/esm/components/ui/command.js +53 -53
  203. package/dist/esm/components/ui/command.js.map +1 -1
  204. package/dist/esm/components/ui/context-menu.js +80 -77
  205. package/dist/esm/components/ui/context-menu.js.map +1 -1
  206. package/dist/esm/components/ui/dialog.js +48 -45
  207. package/dist/esm/components/ui/dialog.js.map +1 -1
  208. package/dist/esm/components/ui/drawer.js +55 -49
  209. package/dist/esm/components/ui/drawer.js.map +1 -1
  210. package/dist/esm/components/ui/dropdown-menu.js +67 -64
  211. package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
  212. package/dist/esm/components/ui/form.js +44 -38
  213. package/dist/esm/components/ui/form.js.map +1 -1
  214. package/dist/esm/components/ui/hover-card.js +6 -6
  215. package/dist/esm/components/ui/hover-card.js.map +1 -1
  216. package/dist/esm/components/ui/input-otp.js +19 -19
  217. package/dist/esm/components/ui/input-otp.js.map +1 -1
  218. package/dist/esm/components/ui/input.js +2 -2
  219. package/dist/esm/components/ui/input.js.map +1 -1
  220. package/dist/esm/components/ui/label.js +4 -4
  221. package/dist/esm/components/ui/label.js.map +1 -1
  222. package/dist/esm/components/ui/menubar.js +94 -91
  223. package/dist/esm/components/ui/menubar.js.map +1 -1
  224. package/dist/esm/components/ui/navigation-menu.js +44 -44
  225. package/dist/esm/components/ui/navigation-menu.js.map +1 -1
  226. package/dist/esm/components/ui/pagination.js +39 -39
  227. package/dist/esm/components/ui/pagination.js.map +1 -1
  228. package/dist/esm/components/ui/popover.js +9 -9
  229. package/dist/esm/components/ui/popover.js.map +1 -1
  230. package/dist/esm/components/ui/progress.js +9 -9
  231. package/dist/esm/components/ui/progress.js.map +1 -1
  232. package/dist/esm/components/ui/radio-group.js +8 -8
  233. package/dist/esm/components/ui/radio-group.js.map +1 -1
  234. package/dist/esm/components/ui/resizable.js +8 -8
  235. package/dist/esm/components/ui/resizable.js.map +1 -1
  236. package/dist/esm/components/ui/scroll-area.js +22 -22
  237. package/dist/esm/components/ui/scroll-area.js.map +1 -1
  238. package/dist/esm/components/ui/select.js +81 -78
  239. package/dist/esm/components/ui/select.js.map +1 -1
  240. package/dist/esm/components/ui/separator.js +4 -4
  241. package/dist/esm/components/ui/separator.js.map +1 -1
  242. package/dist/esm/components/ui/sheet.js +50 -44
  243. package/dist/esm/components/ui/sheet.js.map +1 -1
  244. package/dist/esm/components/ui/sidebar.js +178 -179
  245. package/dist/esm/components/ui/sidebar.js.map +1 -1
  246. package/dist/esm/components/ui/skeleton.js +8 -5
  247. package/dist/esm/components/ui/skeleton.js.map +1 -1
  248. package/dist/esm/components/ui/slider.js +21 -21
  249. package/dist/esm/components/ui/slider.js.map +1 -1
  250. package/dist/esm/components/ui/sonner.js +2 -2
  251. package/dist/esm/components/ui/sonner.js.map +1 -1
  252. package/dist/esm/components/ui/switch.js +3 -3
  253. package/dist/esm/components/ui/switch.js.map +1 -1
  254. package/dist/esm/components/ui/table.js +20 -17
  255. package/dist/esm/components/ui/table.js.map +1 -1
  256. package/dist/esm/components/ui/tabs.js +5 -5
  257. package/dist/esm/components/ui/tabs.js.map +1 -1
  258. package/dist/esm/components/ui/textarea.js +2 -2
  259. package/dist/esm/components/ui/textarea.js.map +1 -1
  260. package/dist/esm/components/ui/toggle-group.js +7 -7
  261. package/dist/esm/components/ui/toggle-group.js.map +1 -1
  262. package/dist/esm/components/ui/toggle.js +5 -5
  263. package/dist/esm/components/ui/toggle.js.map +1 -1
  264. package/dist/esm/components/ui/tooltip.js +19 -19
  265. package/dist/esm/components/ui/tooltip.js.map +1 -1
  266. package/dist/esm/index.css +1 -0
  267. package/dist/esm/index.js +294 -293
  268. package/dist/esm/index.js.map +1 -1
  269. package/dist/esm/node_modules/@radix-ui/react-accordion/dist/index.js +74 -74
  270. package/dist/esm/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -1
  271. package/dist/esm/node_modules/@radix-ui/react-alert-dialog/dist/index.js +69 -69
  272. package/dist/esm/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map +1 -1
  273. package/dist/esm/node_modules/@radix-ui/react-arrow/dist/index.js +6 -6
  274. package/dist/esm/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
  275. package/dist/esm/node_modules/@radix-ui/react-aspect-ratio/dist/index.js +12 -12
  276. package/dist/esm/node_modules/@radix-ui/react-aspect-ratio/dist/index.js.map +1 -1
  277. package/dist/esm/node_modules/@radix-ui/react-avatar/dist/index.js +29 -29
  278. package/dist/esm/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
  279. package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.js +62 -62
  280. package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -1
  281. package/dist/esm/node_modules/@radix-ui/react-collapsible/dist/index.js +46 -46
  282. package/dist/esm/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -1
  283. package/dist/esm/node_modules/@radix-ui/react-collection/dist/index.js +26 -26
  284. package/dist/esm/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
  285. package/dist/esm/node_modules/@radix-ui/react-context/dist/index.js +21 -21
  286. package/dist/esm/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
  287. package/dist/esm/node_modules/@radix-ui/react-context-menu/dist/index.js +115 -115
  288. package/dist/esm/node_modules/@radix-ui/react-context-menu/dist/index.js.map +1 -1
  289. package/dist/esm/node_modules/@radix-ui/react-dialog/dist/index.js +100 -100
  290. package/dist/esm/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -1
  291. package/dist/esm/node_modules/@radix-ui/react-direction/dist/index.js +1 -1
  292. package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +38 -38
  293. package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
  294. package/dist/esm/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +105 -105
  295. package/dist/esm/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -1
  296. package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/index.js +9 -9
  297. package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
  298. package/dist/esm/node_modules/@radix-ui/react-hover-card/dist/index.js +41 -41
  299. package/dist/esm/node_modules/@radix-ui/react-hover-card/dist/index.js.map +1 -1
  300. package/dist/esm/node_modules/@radix-ui/react-label/dist/index.js +3 -3
  301. package/dist/esm/node_modules/@radix-ui/react-label/dist/index.js.map +1 -1
  302. package/dist/esm/node_modules/@radix-ui/react-menu/dist/index.js +198 -198
  303. package/dist/esm/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -1
  304. package/dist/esm/node_modules/@radix-ui/react-menubar/dist/index.js +96 -96
  305. package/dist/esm/node_modules/@radix-ui/react-menubar/dist/index.js.map +1 -1
  306. package/dist/esm/node_modules/@radix-ui/react-navigation-menu/dist/index.js +236 -236
  307. package/dist/esm/node_modules/@radix-ui/react-navigation-menu/dist/index.js.map +1 -1
  308. package/dist/esm/node_modules/@radix-ui/react-popover/dist/index.js +90 -90
  309. package/dist/esm/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
  310. package/dist/esm/node_modules/@radix-ui/react-popper/dist/index.js +49 -49
  311. package/dist/esm/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
  312. package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.js +8 -8
  313. package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
  314. package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.js +10 -10
  315. package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
  316. package/dist/esm/node_modules/@radix-ui/react-progress/dist/index.js +18 -18
  317. package/dist/esm/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -1
  318. package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/index.js +86 -86
  319. package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/index.js.map +1 -1
  320. package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.js +29 -29
  321. package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
  322. package/dist/esm/node_modules/@radix-ui/react-scroll-area/dist/index.js +170 -170
  323. package/dist/esm/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -1
  324. package/dist/esm/node_modules/@radix-ui/react-select/dist/index.js +350 -350
  325. package/dist/esm/node_modules/@radix-ui/react-select/dist/index.js.map +1 -1
  326. package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.js +6 -6
  327. package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -1
  328. package/dist/esm/node_modules/@radix-ui/react-slider/dist/index.js +114 -114
  329. package/dist/esm/node_modules/@radix-ui/react-slider/dist/index.js.map +1 -1
  330. package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.js +14 -14
  331. package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
  332. package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.js +48 -48
  333. package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -1
  334. package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.js +48 -48
  335. package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -1
  336. package/dist/esm/node_modules/@radix-ui/react-toggle/dist/index.js +6 -6
  337. package/dist/esm/node_modules/@radix-ui/react-toggle/dist/index.js.map +1 -1
  338. package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.js +67 -71
  339. package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.js.map +1 -1
  340. package/dist/esm/node_modules/@radix-ui/react-tooltip/dist/index.js +97 -97
  341. package/dist/esm/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -1
  342. package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.js +4 -4
  343. package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -1
  344. package/dist/esm/node_modules/react-day-picker/dist/index.esm.js +483 -483
  345. package/dist/esm/node_modules/react-day-picker/dist/index.esm.js.map +1 -1
  346. package/dist/index.css +1 -0
  347. package/dist/index.js +298 -0
  348. package/dist/types/components/ui/accordion.d.ts.map +1 -1
  349. package/dist/types/components/ui/alert-dialog.d.ts.map +1 -1
  350. package/dist/types/components/ui/alert.d.ts.map +1 -1
  351. package/dist/types/components/ui/avatar.d.ts.map +1 -1
  352. package/dist/types/components/ui/badge.d.ts.map +1 -1
  353. package/dist/types/components/ui/breadcrumb.d.ts.map +1 -1
  354. package/dist/types/components/ui/button.d.ts.map +1 -1
  355. package/dist/types/components/ui/calendar.d.ts.map +1 -1
  356. package/dist/types/components/ui/card.d.ts +1 -1
  357. package/dist/types/components/ui/card.d.ts.map +1 -1
  358. package/dist/types/components/ui/carousel.d.ts +1 -1
  359. package/dist/types/components/ui/carousel.d.ts.map +1 -1
  360. package/dist/types/components/ui/chart.d.ts.map +1 -1
  361. package/dist/types/components/ui/checkbox.d.ts.map +1 -1
  362. package/dist/types/components/ui/command.d.ts +1 -1
  363. package/dist/types/components/ui/command.d.ts.map +1 -1
  364. package/dist/types/components/ui/context-menu.d.ts.map +1 -1
  365. package/dist/types/components/ui/dialog.d.ts.map +1 -1
  366. package/dist/types/components/ui/drawer.d.ts.map +1 -1
  367. package/dist/types/components/ui/dropdown-menu.d.ts.map +1 -1
  368. package/dist/types/components/ui/form.d.ts.map +1 -1
  369. package/dist/types/components/ui/hover-card.d.ts.map +1 -1
  370. package/dist/types/components/ui/input-otp.d.ts.map +1 -1
  371. package/dist/types/components/ui/input.d.ts.map +1 -1
  372. package/dist/types/components/ui/label.d.ts.map +1 -1
  373. package/dist/types/components/ui/menubar.d.ts.map +1 -1
  374. package/dist/types/components/ui/navigation-menu.d.ts.map +1 -1
  375. package/dist/types/components/ui/pagination.d.ts +1 -1
  376. package/dist/types/components/ui/pagination.d.ts.map +1 -1
  377. package/dist/types/components/ui/popover.d.ts.map +1 -1
  378. package/dist/types/components/ui/progress.d.ts.map +1 -1
  379. package/dist/types/components/ui/radio-group.d.ts.map +1 -1
  380. package/dist/types/components/ui/resizable.d.ts.map +1 -1
  381. package/dist/types/components/ui/scroll-area.d.ts.map +1 -1
  382. package/dist/types/components/ui/select.d.ts.map +1 -1
  383. package/dist/types/components/ui/separator.d.ts.map +1 -1
  384. package/dist/types/components/ui/sheet.d.ts.map +1 -1
  385. package/dist/types/components/ui/sidebar.d.ts +5 -5
  386. package/dist/types/components/ui/sidebar.d.ts.map +1 -1
  387. package/dist/types/components/ui/skeleton.d.ts.map +1 -1
  388. package/dist/types/components/ui/slider.d.ts.map +1 -1
  389. package/dist/types/components/ui/switch.d.ts.map +1 -1
  390. package/dist/types/components/ui/table.d.ts.map +1 -1
  391. package/dist/types/components/ui/tabs.d.ts.map +1 -1
  392. package/dist/types/components/ui/textarea.d.ts.map +1 -1
  393. package/dist/types/components/ui/toggle-group.d.ts +1 -1
  394. package/dist/types/components/ui/toggle-group.d.ts.map +1 -1
  395. package/dist/types/components/ui/toggle.d.ts.map +1 -1
  396. package/dist/types/components/ui/tooltip.d.ts.map +1 -1
  397. package/package.json +237 -442
  398. package/src/components/ui/accordion.tsx +10 -11
  399. package/src/components/ui/alert-dialog.tsx +160 -157
  400. package/src/components/ui/alert.tsx +11 -9
  401. package/src/components/ui/aspect-ratio.tsx +12 -12
  402. package/src/components/ui/avatar.tsx +52 -53
  403. package/src/components/ui/badge.tsx +47 -48
  404. package/src/components/ui/breadcrumb.tsx +116 -111
  405. package/src/components/ui/button.tsx +60 -60
  406. package/src/components/ui/calendar.tsx +75 -75
  407. package/src/components/ui/card.tsx +79 -70
  408. package/src/components/ui/carousel.tsx +240 -241
  409. package/src/components/ui/chart.tsx +352 -353
  410. package/src/components/ui/checkbox.tsx +31 -32
  411. package/src/components/ui/collapsible.tsx +34 -34
  412. package/src/components/ui/command.tsx +176 -177
  413. package/src/components/ui/context-menu.tsx +254 -252
  414. package/src/components/ui/dialog.tsx +20 -18
  415. package/src/components/ui/drawer.tsx +137 -132
  416. package/src/components/ui/dropdown-menu.tsx +259 -257
  417. package/src/components/ui/form.tsx +173 -167
  418. package/src/components/ui/hover-card.tsx +41 -42
  419. package/src/components/ui/input-otp.tsx +77 -78
  420. package/src/components/ui/input.tsx +22 -23
  421. package/src/components/ui/label.tsx +23 -24
  422. package/src/components/ui/menubar.tsx +278 -276
  423. package/src/components/ui/navigation-menu.tsx +170 -170
  424. package/src/components/ui/pagination.tsx +128 -129
  425. package/src/components/ui/popover.tsx +47 -48
  426. package/src/components/ui/progress.tsx +30 -31
  427. package/src/components/ui/radio-group.tsx +44 -45
  428. package/src/components/ui/resizable.tsx +55 -56
  429. package/src/components/ui/scroll-area.tsx +57 -58
  430. package/src/components/ui/select.tsx +183 -181
  431. package/src/components/ui/separator.tsx +27 -28
  432. package/src/components/ui/sheet.tsx +144 -139
  433. package/src/components/ui/sidebar.tsx +725 -723
  434. package/src/components/ui/skeleton.tsx +17 -14
  435. package/src/components/ui/slider.tsx +62 -63
  436. package/src/components/ui/sonner.tsx +30 -30
  437. package/src/components/ui/switch.tsx +30 -31
  438. package/src/components/ui/table.tsx +118 -116
  439. package/src/components/ui/tabs.tsx +65 -66
  440. package/src/components/ui/textarea.tsx +19 -19
  441. package/src/components/ui/toggle-group.tsx +72 -73
  442. package/src/components/ui/toggle.tsx +46 -47
  443. package/src/components/ui/tooltip.tsx +60 -61
  444. package/src/index.css +3 -107
  445. package/src/index.ts +2 -0
  446. package/tailwind.config.mjs +67 -0
  447. package/tsconfig.json +50 -0
  448. package/dist/cjs/_virtual/jsx-runtime.cjs +0 -2
  449. package/dist/cjs/_virtual/jsx-runtime.cjs.map +0 -1
  450. package/dist/cjs/_virtual/jsx-runtime2.cjs +0 -2
  451. package/dist/cjs/_virtual/jsx-runtime2.cjs.map +0 -1
  452. package/dist/cjs/_virtual/react-jsx-runtime.development.cjs +0 -2
  453. package/dist/cjs/_virtual/react-jsx-runtime.development.cjs.map +0 -1
  454. package/dist/cjs/_virtual/react-jsx-runtime.production.cjs +0 -2
  455. package/dist/cjs/_virtual/react-jsx-runtime.production.cjs.map +0 -1
  456. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -24
  457. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.development.cjs.map +0 -1
  458. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.cjs +0 -10
  459. package/dist/cjs/node_modules/react/cjs/react-jsx-runtime.production.cjs.map +0 -1
  460. package/dist/cjs/node_modules/react/jsx-runtime.cjs +0 -2
  461. package/dist/cjs/node_modules/react/jsx-runtime.cjs.map +0 -1
  462. package/dist/esm/_virtual/jsx-runtime.js +0 -7
  463. package/dist/esm/_virtual/jsx-runtime.js.map +0 -1
  464. package/dist/esm/_virtual/jsx-runtime2.js +0 -6
  465. package/dist/esm/_virtual/jsx-runtime2.js.map +0 -1
  466. package/dist/esm/_virtual/react-jsx-runtime.development.js +0 -6
  467. package/dist/esm/_virtual/react-jsx-runtime.development.js.map +0 -1
  468. package/dist/esm/_virtual/react-jsx-runtime.production.js +0 -6
  469. package/dist/esm/_virtual/react-jsx-runtime.production.js.map +0 -1
  470. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.development.js +0 -410
  471. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.development.js.map +0 -1
  472. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.js +0 -37
  473. package/dist/esm/node_modules/react/cjs/react-jsx-runtime.production.js.map +0 -1
  474. package/dist/esm/node_modules/react/jsx-runtime.js +0 -12
  475. package/dist/esm/node_modules/react/jsx-runtime.js.map +0 -1
  476. package/src/global.d.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dropdown-menu/src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","createContextScope","createMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","dir","openProp","defaultOpen","onOpenChange","modal","menuScope","triggerRef","React","open","setOpen","useControllableState","jsx","useId","prevOpen","MenuPrimitive.Root","TRIGGER_NAME","DropdownMenuTrigger","forwardedRef","disabled","triggerProps","context","MenuPrimitive.Anchor","Primitive","composeRefs","composeEventHandlers","event","PORTAL_NAME","DropdownMenuPortal","portalProps","MenuPrimitive.Portal","CONTENT_NAME","DropdownMenuContent","contentProps","hasInteractedOutsideRef","MenuPrimitive.Content","originalEvent","ctrlLeftClick","isRightClick","GROUP_NAME","DropdownMenuGroup","groupProps","MenuPrimitive.Group","LABEL_NAME","DropdownMenuLabel","labelProps","MenuPrimitive.Label","ITEM_NAME","DropdownMenuItem","itemProps","MenuPrimitive.Item","CHECKBOX_ITEM_NAME","DropdownMenuCheckboxItem","checkboxItemProps","MenuPrimitive.CheckboxItem","RADIO_GROUP_NAME","DropdownMenuRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","RADIO_ITEM_NAME","DropdownMenuRadioItem","radioItemProps","MenuPrimitive.RadioItem","INDICATOR_NAME","DropdownMenuItemIndicator","itemIndicatorProps","MenuPrimitive.ItemIndicator","SEPARATOR_NAME","DropdownMenuSeparator","separatorProps","MenuPrimitive.Separator","ARROW_NAME","DropdownMenuArrow","arrowProps","MenuPrimitive.Arrow","DropdownMenuSub","MenuPrimitive.Sub","SUB_TRIGGER_NAME","DropdownMenuSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","SUB_CONTENT_NAME","DropdownMenuSubContent","subContentProps","MenuPrimitive.SubContent","Root2","Trigger","Portal2","Content2","Group2","Label2","Item2","CheckboxItem2","RadioGroup2","RadioItem2","ItemIndicator2","Separator2","Sub2","SubTrigger2","SubContent2"],"mappings":"4xBAaA,IAAIA,EAAqB,eACrB,CAACC,EAA2BC,CAAuB,EAAIC,EAAkB,mBAC3EH,EACA,CAACI,EAAe,eAAA,CAClB,EACIC,EAAeD,EAAAA,gBAAiB,EAChC,CAACE,EAAsBC,CAAsB,EAAIN,EAA0BD,CAAkB,EAC7FQ,EAAgBC,GAAU,CAC5B,KAAM,CACJ,oBAAAC,EACA,SAAAC,EACA,IAAAC,EACA,KAAMC,EACN,YAAAC,EACA,aAAAC,EACA,MAAAC,EAAQ,EACZ,EAAMP,EACEQ,EAAYZ,EAAaK,CAAmB,EAC5CQ,EAAaC,EAAM,OAAO,IAAI,EAC9B,CAACC,EAAO,GAAOC,CAAO,EAAIC,EAAAA,qBAAqB,CACnD,KAAMT,EACN,YAAaC,EACb,SAAUC,CACd,CAAG,EACD,OAAuBQ,EAAG,kBAAA,IACxBjB,EACA,CACE,MAAOI,EACP,UAAWc,EAAAA,MAAO,EAClB,WAAAN,EACA,UAAWM,EAAAA,MAAO,EAClB,KAAAJ,EACA,aAAcC,EACd,aAAcF,EAAM,YAAY,IAAME,EAASI,GAAa,CAACA,CAAQ,EAAG,CAACJ,CAAO,CAAC,EACjF,MAAAL,EACA,SAA0BO,EAAG,kBAAA,IAACG,OAAoB,CAAE,GAAGT,EAAW,KAAAG,EAAM,aAAcC,EAAS,IAAAT,EAAK,MAAAI,EAAO,SAAAL,CAAU,CAAA,CAC3H,CACG,CACH,EACAH,EAAa,YAAcR,EAC3B,IAAI2B,EAAe,sBACfC,EAAsBT,EAAM,WAC9B,CAACV,EAAOoB,IAAiB,CACvB,KAAM,CAAE,oBAAAnB,EAAqB,SAAAoB,EAAW,GAAO,GA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AAO,EAAIC,EAAAA,qBAAqB,CACnD,KAAMT,EACN,YAAaC,EACb,SAAUC,CACd,CAAG,EACD,OAAuBQ,EAAG,kBAAA,IAACgE,EAAiB,IAAE,CAAE,GAAGtE,EAAW,KAAAG,EAAM,aAAcC,EAAS,SAAAV,EAAU,CACvG,EACI6E,GAAmB,yBACnBC,EAAyBtE,EAAM,WAAW,CAACV,EAAOoB,IAAiB,CACrE,KAAM,CAAE,oBAAAnB,EAAqB,GAAGgF,CAAe,EAAKjF,EAC9CQ,EAAYZ,EAAaK,CAAmB,EAClD,OAAuBa,EAAG,kBAAA,IAACoE,EAAwB,WAAE,CAAE,GAAG1E,EAAW,GAAGyE,EAAiB,IAAK7D,EAAc,CAC9G,CAAC,EACD4D,EAAuB,YAAcD,GACrC,IAAII,GAAmB,yBACnBC,EAAyB1E,EAAM,WAAW,CAACV,EAAOoB,IAAiB,CACrE,KAAM,CAAE,oBAAAnB,EAAqB,GAAGoF,CAAe,EAAKrF,EAC9CQ,EAAYZ,EAAaK,CAAmB,EAClD,OAAuBa,EAAG,kBAAA,IACxBwE,EAAwB,WACxB,CACE,GAAG9E,EACH,GAAG6E,EACH,IAAKjE,EACL,MAAO,CACL,GAAGpB,EAAM,MAGP,iDAAkD,uCAClD,gDAAiD,sCACjD,iDAAkD,uCAClD,sCAAuC,mCACvC,uCAAwC,mCAElD,CACA,CACG,CACH,CAAC,EACDoF,EAAuB,YAAcD,GAClC,IAACI,GAAQxF,EACRyF,GAAUrE,EACVsE,GAAU3D,EACV4D,GAAWxD,EACXyD,GAASjD,EACTkD,GAAS9C,EACT+C,GAAQ3C,EACR4C,GAAgBxC,EAChByC,GAAcrC,EACdsC,GAAalC,EACbmC,GAAiB/B,EACjBgC,GAAa5B,EAEb6B,GAAOtB,EACPuB,GAAcpB,EACdqB,GAAcjB","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dropdown-menu/src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","createContextScope","createMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","props","__scopeDropdownMenu","children","dir","openProp","defaultOpen","onOpenChange","modal","menuScope","triggerRef","React","open","setOpen","useControllableState","jsx","useId","prevOpen","MenuPrimitive.Root","TRIGGER_NAME","DropdownMenuTrigger","forwardedRef","disabled","triggerProps","context","MenuPrimitive.Anchor","Primitive","composeRefs","composeEventHandlers","event","PORTAL_NAME","DropdownMenuPortal","portalProps","MenuPrimitive.Portal","CONTENT_NAME","DropdownMenuContent","contentProps","hasInteractedOutsideRef","MenuPrimitive.Content","originalEvent","ctrlLeftClick","isRightClick","GROUP_NAME","DropdownMenuGroup","groupProps","MenuPrimitive.Group","LABEL_NAME","DropdownMenuLabel","labelProps","MenuPrimitive.Label","ITEM_NAME","DropdownMenuItem","itemProps","MenuPrimitive.Item","CHECKBOX_ITEM_NAME","DropdownMenuCheckboxItem","checkboxItemProps","MenuPrimitive.CheckboxItem","RADIO_GROUP_NAME","DropdownMenuRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","RADIO_ITEM_NAME","DropdownMenuRadioItem","radioItemProps","MenuPrimitive.RadioItem","INDICATOR_NAME","DropdownMenuItemIndicator","itemIndicatorProps","MenuPrimitive.ItemIndicator","SEPARATOR_NAME","DropdownMenuSeparator","separatorProps","MenuPrimitive.Separator","ARROW_NAME","DropdownMenuArrow","arrowProps","MenuPrimitive.Arrow","DropdownMenuSub","MenuPrimitive.Sub","SUB_TRIGGER_NAME","DropdownMenuSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","SUB_CONTENT_NAME","DropdownMenuSubContent","subContentProps","MenuPrimitive.SubContent","Root2","Trigger","Portal2","Content2","Group2","Label2","Item2","CheckboxItem2","RadioGroup2","RadioItem2","ItemIndicator2","Separator2","Sub2","SubTrigger2","SubContent2"],"mappings":"ywBAaA,IAAIA,EAAqB,eACrB,CAACC,EAA2BC,CAAuB,EAAIC,EAAkB,mBAC3EH,EACA,CAACI,EAAe,eAAA,CAClB,EACIC,EAAeD,EAAAA,gBAAiB,EAChC,CAACE,EAAsBC,CAAsB,EAAIN,EAA0BD,CAAkB,EAC7FQ,EAAgBC,GAAU,CAC5B,KAAM,CACJ,oBAAAC,EACA,SAAAC,EACA,IAAAC,EACA,KAAMC,EACN,YAAAC,EACA,aAAAC,EACA,MAAAC,EAAQ,EACZ,EAAMP,EACEQ,EAAYZ,EAAaK,CAAmB,EAC5CQ,EAAaC,EAAM,OAAO,IAAI,EAC9B,CAACC,EAAO,GAAOC,CAAO,EAAIC,EAAAA,qBAAqB,CACnD,KAAMT,EACN,YAAaC,EACb,SAAUC,CACd,CAAG,EACD,OAAuBQ,EAAG,IACxBjB,EACA,CACE,MAAOI,EACP,UAAWc,EAAAA,MAAO,EAClB,WAAAN,EACA,UAAWM,EAAAA,MAAO,EAClB,KAAAJ,EACA,aAAcC,EACd,aAAcF,EAAM,YAAY,IAAME,EAASI,GAAa,CAACA,CAAQ,EAAG,CAACJ,CAAO,CAAC,EACjF,MAAAL,EACA,SAA0BO,EAAG,IAACG,OAAoB,CAAE,GAAGT,EAAW,KAAAG,EAAM,aAAcC,EAAS,IAAAT,EAAK,MAAAI,EAAO,SAAAL,CAAU,CAAA,CAC3H,CACG,CACH,EACAH,EAAa,YAAcR,EAC3B,IAAI2B,EAAe,sBACfC,EAAsBT,EAAM,WAC9B,CAACV,EAAOoB,IAAiB,CACvB,KAAM,CAAE,oBAAAnB,EAAqB,SAAAoB,EAAW,GAAO,GAAGC,CAAc,EAAGtB,EAC7DuB,EAAUzB,EAAuBoB,EAAcjB,CAAmB,E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AS,SAAAV,EAAU,CACvG,EACI6E,GAAmB,yBACnBC,EAAyBtE,EAAM,WAAW,CAACV,EAAOoB,IAAiB,CACrE,KAAM,CAAE,oBAAAnB,EAAqB,GAAGgF,CAAe,EAAKjF,EAC9CQ,EAAYZ,EAAaK,CAAmB,EAClD,OAAuBa,EAAG,IAACoE,EAAwB,WAAE,CAAE,GAAG1E,EAAW,GAAGyE,EAAiB,IAAK7D,EAAc,CAC9G,CAAC,EACD4D,EAAuB,YAAcD,GACrC,IAAII,GAAmB,yBACnBC,EAAyB1E,EAAM,WAAW,CAACV,EAAOoB,IAAiB,CACrE,KAAM,CAAE,oBAAAnB,EAAqB,GAAGoF,CAAe,EAAKrF,EAC9CQ,EAAYZ,EAAaK,CAAmB,EAClD,OAAuBa,EAAG,IACxBwE,EAAwB,WACxB,CACE,GAAG9E,EACH,GAAG6E,EACH,IAAKjE,EACL,MAAO,CACL,GAAGpB,EAAM,MAGP,iDAAkD,uCAClD,gDAAiD,sCACjD,iDAAkD,uCAClD,sCAAuC,mCACvC,uCAAwC,mCAElD,CACA,CACG,CACH,CAAC,EACDoF,EAAuB,YAAcD,GAClC,IAACI,GAAQxF,EACRyF,GAAUrE,EACVsE,GAAU3D,EACV4D,GAAWxD,EACXyD,GAASjD,EACTkD,GAAS9C,EACT+C,GAAQ3C,EACR4C,GAAgBxC,EAChByC,GAAcrC,EACdsC,GAAalC,EACbmC,GAAiB/B,EACjBgC,GAAa5B,EAEb6B,GAAOtB,EACPuB,GAAcpB,EACdqB,GAAcjB","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react"),x=require("../../react-compose-refs/dist/index.cjs"),A=require("../../react-primitive/dist/index.cjs"),T=require("../../react-use-callback-ref/dist/index.cjs"),k=require("../../../../_virtual/jsx-runtime.cjs");function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=w(U);var F="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",O={bubbles:!1,cancelable:!0},K="FocusScope",C=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:p,onUnmountAutoFocus:I,...L}=e,[s,P]=f.useState(null),v=T.useCallbackRef(p),E=T.useCallbackRef(I),b=f.useRef(null),_=x.useComposedRefs(t,u=>P(u)),a=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(o){let u=function(i){if(a.paused||!s)return;const c=i.target;s.contains(c)?b.current=c:d(b.current,{select:!0})},l=function(i){if(a.paused||!s)return;const c=i.relatedTarget;c!==null&&(s.contains(c)||d(b.current,{select:!0}))},r=function(i){if(document.activeElement===document.body)for(const S of i)S.removedNodes.length>0&&d(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",l);const m=new MutationObserver(r);return s&&m.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",l),m.disconnect()}}},[o,s,a.paused]),f.useEffect(()=>{if(s){N.add(a);const u=document.activeElement;if(!s.contains(u)){const r=new CustomEvent(F,O);s.addEventListener(F,v),s.dispatchEvent(r),r.defaultPrevented||(j(W(R(s)),{select:!0}),document.activeElement===u&&d(s))}return()=>{s.removeEventListener(F,v),setTimeout(()=>{const r=new CustomEvent(y,O);s.addEventListener(y,E),s.dispatchEvent(r),r.defaultPrevented||d(u??document.body,{select:!0}),s.removeEventListener(y,E),N.remove(a)},0)}}},[s,v,E,a]);const M=f.useCallback(u=>{if(!n&&!o||a.paused)return;const l=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,r=document.activeElement;if(l&&r){const m=u.currentTarget,[i,c]=D(m);i&&c?!u.shiftKey&&r===c?(u.preventDefault(),n&&d(i,{select:!0})):u.shiftKey&&r===i&&(u.preventDefault(),n&&d(c,{select:!0})):r===m&&u.preventDefault()}},[n,o,a.paused]);return k.jsxRuntimeExports.jsx(A.Primitive.div,{tabIndex:-1,...L,ref:_,onKeyDown:M})});C.displayName=K;function j(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(d(o,{select:t}),document.activeElement!==n)return}function D(e){const t=R(e),n=h(t,e),o=h(t.reverse(),e);return[n,o]}function R(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const p=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||p?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h(e,t){for(const n of e)if(!q(n,{upTo:t}))return n}function q(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function H(e){return e instanceof HTMLInputElement&&"select"in e}function d(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&H(e)&&t&&e.select()}}var N=V();function V(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=g(e,t),e.unshift(t)},remove(t){e=g(e,t),e[0]?.resume()}}}function g(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function W(e){return e.filter(t=>t.tagName!=="A")}exports.FocusScope=C;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const U=require("react"),A=require("../../react-compose-refs/dist/index.cjs"),k=require("../../react-primitive/dist/index.cjs"),T=require("../../react-use-callback-ref/dist/index.cjs"),w=require("react/jsx-runtime");function x(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=x(U);var F="focusScope.autoFocusOnMount",y="focusScope.autoFocusOnUnmount",O={bubbles:!1,cancelable:!0},K="FocusScope",C=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:p,onUnmountAutoFocus:L,...P}=e,[s,R]=f.useState(null),v=T.useCallbackRef(p),E=T.useCallbackRef(L),b=f.useRef(null),_=A.useComposedRefs(t,u=>R(u)),a=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(o){let u=function(i){if(a.paused||!s)return;const r=i.target;s.contains(r)?b.current=r:d(b.current,{select:!0})},l=function(i){if(a.paused||!s)return;const r=i.relatedTarget;r!==null&&(s.contains(r)||d(b.current,{select:!0}))},c=function(i){if(document.activeElement===document.body)for(const S of i)S.removedNodes.length>0&&d(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",l);const m=new MutationObserver(c);return s&&m.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",l),m.disconnect()}}},[o,s,a.paused]),f.useEffect(()=>{if(s){N.add(a);const u=document.activeElement;if(!s.contains(u)){const c=new CustomEvent(F,O);s.addEventListener(F,v),s.dispatchEvent(c),c.defaultPrevented||(j(W(I(s)),{select:!0}),document.activeElement===u&&d(s))}return()=>{s.removeEventListener(F,v),setTimeout(()=>{const c=new CustomEvent(y,O);s.addEventListener(y,E),s.dispatchEvent(c),c.defaultPrevented||d(u??document.body,{select:!0}),s.removeEventListener(y,E),N.remove(a)},0)}}},[s,v,E,a]);const M=f.useCallback(u=>{if(!n&&!o||a.paused)return;const l=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,c=document.activeElement;if(l&&c){const m=u.currentTarget,[i,r]=D(m);i&&r?!u.shiftKey&&c===r?(u.preventDefault(),n&&d(i,{select:!0})):u.shiftKey&&c===i&&(u.preventDefault(),n&&d(r,{select:!0})):c===m&&u.preventDefault()}},[n,o,a.paused]);return w.jsx(k.Primitive.div,{tabIndex:-1,...P,ref:_,onKeyDown:M})});C.displayName=K;function j(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(d(o,{select:t}),document.activeElement!==n)return}function D(e){const t=I(e),n=h(t,e),o=h(t.reverse(),e);return[n,o]}function I(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const p=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||p?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function h(e,t){for(const n of e)if(!q(n,{upTo:t}))return n}function q(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function H(e){return e instanceof HTMLInputElement&&"select"in e}function d(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&H(e)&&t&&e.select()}}var N=V();function V(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=g(e,t),e.unshift(t)},remove(t){e=g(e,t),e[0]?.resume()}}}function g(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function W(e){return e.filter(t=>t.tagName!=="A")}exports.FocusScope=C;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-scope/src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","React","props","forwardedRef","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","useCallbackRef","onUnmountAutoFocus","lastFocusedElementRef","composedRefs","useComposedRefs","node","focusScope","handleFocusIn2","event","target","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","handleKeyDown","isTabKey","focusedElement","container2","first","last","getTabbableEdges","jsx","Primitive","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","element","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","array","item","updatedArray","index","items"],"mappings":"kmBAQA,IAAIA,EAAqB,8BACrBC,EAAuB,gCACvBC,EAAgB,CAAE,QAAS,GAAO,WAAY,EAAM,EACpDC,EAAmB,aACnBC,EAAaC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACzD,KAAM,CACJ,KAAAC,EAAO,GACP,QAAAC,EAAU,GACV,iBAAkBC,EAClB,mBAAoBC,EACpB,GAAGC,CACP,EAAMN,EACE,CAACO,EAAWC,CAAY,EAAIT,EAAM,SAAS,IAAI,EAC/CU,EAAmBC,EAAc,eAACN,CAAoB,EACtDO,EAAqBD,EAAc,eAACL,CAAsB,EAC1D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I,EAAE,aAAe,SAAU,MAAO,GAC3D,KAAOA,GAAM,CACX,GAAIsC,IAAS,QAAUtC,IAASsC,EAAM,MAAO,GAC7C,GAAI,iBAAiBtC,CAAI,EAAE,UAAY,OAAQ,MAAO,GACtDA,EAAOA,EAAK,aAChB,CACE,MAAO,EACT,CACA,SAASuC,EAAkBH,EAAS,CAClC,OAAOA,aAAmB,kBAAoB,WAAYA,CAC5D,CACA,SAAS/B,EAAM+B,EAAS,CAAE,OAAAP,EAAS,EAAK,EAAK,CAAA,EAAI,CAC/C,GAAIO,GAAWA,EAAQ,MAAO,CAC5B,MAAMvB,EAA2B,SAAS,cAC1CuB,EAAQ,MAAM,CAAE,cAAe,EAAI,CAAE,EACjCA,IAAYvB,GAA4B0B,EAAkBH,CAAO,GAAKP,GACxEO,EAAQ,OAAQ,CACtB,CACA,CACA,IAAIxB,EAAmB4B,EAAwB,EAC/C,SAASA,GAAyB,CAChC,IAAIC,EAAQ,CAAE,EACd,MAAO,CACL,IAAIxC,EAAY,CACd,MAAMyC,EAAmBD,EAAM,CAAC,EAC5BxC,IAAeyC,GACjBA,GAAkB,MAAO,EAE3BD,EAAQE,EAAYF,EAAOxC,CAAU,EACrCwC,EAAM,QAAQxC,CAAU,CACzB,EACD,OAAOA,EAAY,CACjBwC,EAAQE,EAAYF,EAAOxC,CAAU,EACrCwC,EAAM,CAAC,GAAG,OAAQ,CACxB,CACG,CACH,CACA,SAASE,EAAYC,EAAOC,EAAM,CAChC,MAAMC,EAAe,CAAC,GAAGF,CAAK,EACxBG,EAAQD,EAAa,QAAQD,CAAI,EACvC,OAAIE,IAAU,IACZD,EAAa,OAAOC,EAAO,CAAC,EAEvBD,CACT,CACA,SAAS9B,EAAYgC,EAAO,CAC1B,OAAOA,EAAM,OAAQH,GAASA,EAAK,UAAY,GAAG,CACpD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/focus-scope/src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["AUTOFOCUS_ON_MOUNT","AUTOFOCUS_ON_UNMOUNT","EVENT_OPTIONS","FOCUS_SCOPE_NAME","FocusScope","React","props","forwardedRef","loop","trapped","onMountAutoFocusProp","onUnmountAutoFocusProp","scopeProps","container","setContainer","onMountAutoFocus","useCallbackRef","onUnmountAutoFocus","lastFocusedElementRef","composedRefs","useComposedRefs","node","focusScope","handleFocusIn2","event","target","focus","handleFocusOut2","relatedTarget","handleMutations2","mutations","mutation","mutationObserver","focusScopesStack","previouslyFocusedElement","mountEvent","focusFirst","removeLinks","getTabbableCandidates","unmountEvent","handleKeyDown","isTabKey","focusedElement","container2","first","last","getTabbableEdges","jsx","Primitive","candidates","select","candidate","findVisible","nodes","walker","isHiddenInput","elements","element","isHidden","upTo","isSelectableInput","createFocusScopesStack","stack","activeFocusScope","arrayRemove","array","item","updatedArray","index","items"],"mappings":"+kBAQA,IAAIA,EAAqB,8BACrBC,EAAuB,gCACvBC,EAAgB,CAAE,QAAS,GAAO,WAAY,EAAM,EACpDC,EAAmB,aACnBC,EAAaC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACzD,KAAM,CACJ,KAAAC,EAAO,GACP,QAAAC,EAAU,G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AS9B,EAAYgC,EAAO,CAC1B,OAAOA,EAAM,OAAQH,GAASA,EAAK,UAAY,GAAG,CACpD","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),l=require("../../primitive/dist/index.cjs"),L=require("../../react-context/dist/index.cjs"),M=require("../../react-use-controllable-state/dist/index.cjs"),k=require("../../react-compose-refs/dist/index.cjs"),C=require("../../react-popper/dist/index.cjs"),q=require("../../react-presence/dist/index.cjs"),F=require("../../react-primitive/dist/index.cjs"),I=require("../../react-dismissable-layer/dist/index.cjs"),u=require("../../../../_virtual/jsx-runtime.cjs");function $(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const n=$(A);var g,b="HoverCard",[y,U]=L.createContextScope(b,[C.createPopperScope]),S=C.createPopperScope(),[W,H]=y(b),w=e=>{const{__scopeHoverCard:t,children:o,open:s,defaultOpen:a,onOpenChange:i,openDelay:v=700,closeDelay:f=300}=e,c=S(t),x=n.useRef(0),d=n.useRef(0),m=n.useRef(!1),p=n.useRef(!1),[h=!1,r]=M.useControllableState({prop:s,defaultProp:a,onChange:i}),R=n.useCallback(()=>{clearTimeout(d.current),x.current=window.setTimeout(()=>r(!0),v)},[v,r]),D=n.useCallback(()=>{clearTimeout(x.current),!m.current&&!p.current&&(d.current=window.setTimeout(()=>r(!1),f))},[f,r]),N=n.useCallback(()=>r(!1),[r]);return n.useEffect(()=>()=>{clearTimeout(x.current),clearTimeout(d.current)},[]),u.jsxRuntimeExports.jsx(W,{scope:t,open:h,onOpenChange:r,onOpen:R,onClose:D,onDismiss:N,hasSelectionRef:m,isPointerDownOnContentRef:p,children:u.jsxRuntimeExports.jsx(C.Root,{...c,children:o})})};w.displayName=b;var j="HoverCardTrigger",T=n.forwardRef((e,t)=>{const{__scopeHoverCard:o,...s}=e,a=H(j,o),i=S(o);return u.jsxRuntimeExports.jsx(C.Anchor,{asChild:!0,...i,children:u.jsxRuntimeExports.jsx(F.Primitive.a,{"data-state":a.open?"open":"closed",...s,ref:t,onPointerEnter:l.composeEventHandlers(e.onPointerEnter,P(a.onOpen)),onPointerLeave:l.composeEventHandlers(e.onPointerLeave,P(a.onClose)),onFocus:l.composeEventHandlers(e.onFocus,a.onOpen),onBlur:l.composeEventHandlers(e.onBlur,a.onClose),onTouchStart:l.composeEventHandlers(e.onTouchStart,v=>v.preventDefault())})})});T.displayName=j;var B="HoverCardPortal",[Y,G]=y(B,{forceMount:void 0}),E="HoverCardContent",O=n.forwardRef((e,t)=>{const o=G(E,e.__scopeHoverCard),{forceMount:s=o.forceMount,...a}=e,i=H(E,e.__scopeHoverCard);return u.jsxRuntimeExports.jsx(q.Presence,{present:s||i.open,children:u.jsxRuntimeExports.jsx(K,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l.composeEventHandlers(e.onPointerEnter,P(i.onOpen)),onPointerLeave:l.composeEventHandlers(e.onPointerLeave,P(i.onClose)),ref:t})})});O.displayName=E;var K=n.forwardRef((e,t)=>{const{__scopeHoverCard:o,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:v,...f}=e,c=H(E,o),x=S(o),d=n.useRef(null),m=k.useComposedRefs(t,d),[p,h]=n.useState(!1);return n.useEffect(()=>{if(p){const r=document.body;return g=r.style.userSelect||r.style.webkitUserSelect,r.style.userSelect="none",r.style.webkitUserSelect="none",()=>{r.style.userSelect=g,r.style.webkitUserSelect=g}}},[p]),n.useEffect(()=>{if(d.current){const r=()=>{h(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",r),()=>{document.removeEventListener("pointerup",r),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),n.useEffect(()=>{d.current&&V(d.current).forEach(R=>R.setAttribute("tabindex","-1"))}),u.jsxRuntimeExports.jsx(I.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:v,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l.composeEventHandlers(i,r=>{r.preventDefault()}),onDismiss:c.onDismiss,children:u.jsxRuntimeExports.jsx(C.Content,{...x,...f,onPointerDown:l.composeEventHandlers(f.onPointerDown,r=>{r.currentTarget.contains(r.target)&&h(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:m,style:{...f.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),z="HoverCardArrow",_=n.forwardRef((e,t)=>{const{__scopeHoverCard:o,...s}=e,a=S(o);return u.jsxRuntimeExports.jsx(C.Arrow,{...a,...s,ref:t})});_.displayName=z;function P(e){return t=>t.pointerType==="touch"?void 0:e()}function V(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)t.push(o.currentNode);return t}var J=w,Q=T,X=O;exports.Content=X;exports.HoverCard=w;exports.HoverCardArrow=_;exports.HoverCardContent=O;exports.HoverCardTrigger=T;exports.Root=J;exports.Trigger=Q;exports.createHoverCardScope=U;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("react"),l=require("../../primitive/dist/index.cjs"),L=require("../../react-context/dist/index.cjs"),M=require("../../react-use-controllable-state/dist/index.cjs"),k=require("../../react-compose-refs/dist/index.cjs"),C=require("../../react-popper/dist/index.cjs"),q=require("../../react-presence/dist/index.cjs"),F=require("../../react-primitive/dist/index.cjs"),I=require("../../react-dismissable-layer/dist/index.cjs"),d=require("react/jsx-runtime");function $(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const n=$(A);var b,E="HoverCard",[y,U]=L.createContextScope(E,[C.createPopperScope]),R=C.createPopperScope(),[W,H]=y(E),w=e=>{const{__scopeHoverCard:t,children:o,open:a,defaultOpen:s,onOpenChange:i,openDelay:v=700,closeDelay:f=300}=e,c=R(t),h=n.useRef(0),u=n.useRef(0),m=n.useRef(!1),p=n.useRef(!1),[x=!1,r]=M.useControllableState({prop:a,defaultProp:s,onChange:i}),P=n.useCallback(()=>{clearTimeout(u.current),h.current=window.setTimeout(()=>r(!0),v)},[v,r]),N=n.useCallback(()=>{clearTimeout(h.current),!m.current&&!p.current&&(u.current=window.setTimeout(()=>r(!1),f))},[f,r]),j=n.useCallback(()=>r(!1),[r]);return n.useEffect(()=>()=>{clearTimeout(h.current),clearTimeout(u.current)},[]),d.jsx(W,{scope:t,open:x,onOpenChange:r,onOpen:P,onClose:N,onDismiss:j,hasSelectionRef:m,isPointerDownOnContentRef:p,children:d.jsx(C.Root,{...c,children:o})})};w.displayName=E;var _="HoverCardTrigger",T=n.forwardRef((e,t)=>{const{__scopeHoverCard:o,...a}=e,s=H(_,o),i=R(o);return d.jsx(C.Anchor,{asChild:!0,...i,children:d.jsx(F.Primitive.a,{"data-state":s.open?"open":"closed",...a,ref:t,onPointerEnter:l.composeEventHandlers(e.onPointerEnter,g(s.onOpen)),onPointerLeave:l.composeEventHandlers(e.onPointerLeave,g(s.onClose)),onFocus:l.composeEventHandlers(e.onFocus,s.onOpen),onBlur:l.composeEventHandlers(e.onBlur,s.onClose),onTouchStart:l.composeEventHandlers(e.onTouchStart,v=>v.preventDefault())})})});T.displayName=_;var B="HoverCardPortal",[Y,G]=y(B,{forceMount:void 0}),S="HoverCardContent",O=n.forwardRef((e,t)=>{const o=G(S,e.__scopeHoverCard),{forceMount:a=o.forceMount,...s}=e,i=H(S,e.__scopeHoverCard);return d.jsx(q.Presence,{present:a||i.open,children:d.jsx(K,{"data-state":i.open?"open":"closed",...s,onPointerEnter:l.composeEventHandlers(e.onPointerEnter,g(i.onOpen)),onPointerLeave:l.composeEventHandlers(e.onPointerLeave,g(i.onClose)),ref:t})})});O.displayName=S;var K=n.forwardRef((e,t)=>{const{__scopeHoverCard:o,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:v,...f}=e,c=H(S,o),h=R(o),u=n.useRef(null),m=k.useComposedRefs(t,u),[p,x]=n.useState(!1);return n.useEffect(()=>{if(p){const r=document.body;return b=r.style.userSelect||r.style.webkitUserSelect,r.style.userSelect="none",r.style.webkitUserSelect="none",()=>{r.style.userSelect=b,r.style.webkitUserSelect=b}}},[p]),n.useEffect(()=>{if(u.current){const r=()=>{x(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",r),()=>{document.removeEventListener("pointerup",r),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),n.useEffect(()=>{u.current&&V(u.current).forEach(P=>P.setAttribute("tabindex","-1"))}),d.jsx(I.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:v,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l.composeEventHandlers(i,r=>{r.preventDefault()}),onDismiss:c.onDismiss,children:d.jsx(C.Content,{...h,...f,onPointerDown:l.composeEventHandlers(f.onPointerDown,r=>{r.currentTarget.contains(r.target)&&x(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:m,style:{...f.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),z="HoverCardArrow",D=n.forwardRef((e,t)=>{const{__scopeHoverCard:o,...a}=e,s=R(o);return d.jsx(C.Arrow,{...s,...a,ref:t})});D.displayName=z;function g(e){return t=>t.pointerType==="touch"?void 0:e()}function V(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)t.push(o.currentNode);return t}var J=w,Q=T,X=O;exports.Content=X;exports.HoverCard=w;exports.HoverCardArrow=D;exports.HoverCardContent=O;exports.HoverCardTrigger=T;exports.Root=J;exports.Trigger=Q;exports.createHoverCardScope=U;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-hover-card/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/hover-card/src/hover-card.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { jsx } from \"react/jsx-runtime\";\nvar originalBodyUserSelect;\nvar HOVERCARD_NAME = \"HoverCard\";\nvar [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME);\nvar HoverCard = (props) => {\n const {\n __scopeHoverCard,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n openDelay = 700,\n closeDelay = 300\n } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const hasSelectionRef = React.useRef(false);\n const isPointerDownOnContentRef = React.useRef(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const handleOpen = React.useCallback(() => {\n clearTimeout(closeTimerRef.current);\n openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);\n }, [openDelay, setOpen]);\n const handleClose = React.useCallback(() => {\n clearTimeout(openTimerRef.current);\n if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {\n closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);\n }\n }, [closeDelay, setOpen]);\n const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);\n React.useEffect(() => {\n return () => {\n clearTimeout(openTimerRef.current);\n clearTimeout(closeTimerRef.current);\n };\n }, []);\n return /* @__PURE__ */ jsx(\n HoverCardProvider,\n {\n scope: __scopeHoverCard,\n open,\n onOpenChange: setOpen,\n onOpen: handleOpen,\n onClose: handleClose,\n onDismiss: handleDismiss,\n hasSelectionRef,\n isPointerDownOnContentRef,\n children: /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children })\n }\n );\n};\nHoverCard.displayName = HOVERCARD_NAME;\nvar TRIGGER_NAME = \"HoverCardTrigger\";\nvar HoverCardTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeHoverCard, ...triggerProps } = props;\n const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.a,\n {\n \"data-state\": context.open ? \"open\" : \"closed\",\n ...triggerProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),\n onFocus: composeEventHandlers(props.onFocus, context.onOpen),\n onBlur: composeEventHandlers(props.onBlur, context.onClose),\n onTouchStart: composeEventHandlers(props.onTouchStart, (event) => event.preventDefault())\n }\n ) });\n }\n);\nHoverCardTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"HoverCardPortal\";\nvar [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar HoverCardPortal = (props) => {\n const { __scopeHoverCard, forceMount, children, container } = props;\n const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nHoverCardPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"HoverCardContent\";\nvar HoverCardContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(\n HoverCardContentImpl,\n {\n \"data-state\": context.open ? \"open\" : \"closed\",\n ...contentProps,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),\n ref: forwardedRef\n }\n ) });\n }\n);\nHoverCardContent.displayName = CONTENT_NAME;\nvar HoverCardContentImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeHoverCard,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [containSelection, setContainSelection] = React.useState(false);\n React.useEffect(() => {\n if (containSelection) {\n const body = document.body;\n originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;\n body.style.userSelect = \"none\";\n body.style.webkitUserSelect = \"none\";\n return () => {\n body.style.userSelect = originalBodyUserSelect;\n body.style.webkitUserSelect = originalBodyUserSelect;\n };\n }\n }, [containSelection]);\n React.useEffect(() => {\n if (ref.current) {\n const handlePointerUp = () => {\n setContainSelection(false);\n context.isPointerDownOnContentRef.current = false;\n setTimeout(() => {\n const hasSelection = document.getSelection()?.toString() !== \"\";\n if (hasSelection) context.hasSelectionRef.current = true;\n });\n };\n document.addEventListener(\"pointerup\", handlePointerUp);\n return () => {\n document.removeEventListener(\"pointerup\", handlePointerUp);\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = false;\n };\n }\n }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);\n React.useEffect(() => {\n if (ref.current) {\n const tabbables = getTabbableNodes(ref.current);\n tabbables.forEach((tabbable) => tabbable.setAttribute(\"tabindex\", \"-1\"));\n }\n });\n return /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: false,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: composeEventHandlers(onFocusOutside, (event) => {\n event.preventDefault();\n }),\n onDismiss: context.onDismiss,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n ...popperScope,\n ...contentProps,\n onPointerDown: composeEventHandlers(contentProps.onPointerDown, (event) => {\n if (event.currentTarget.contains(event.target)) {\n setContainSelection(true);\n }\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = true;\n }),\n ref: composedRefs,\n style: {\n ...contentProps.style,\n userSelect: containSelection ? \"text\" : void 0,\n // Safari requires prefix\n WebkitUserSelect: containSelection ? \"text\" : void 0,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-hover-card-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-hover-card-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-hover-card-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-hover-card-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-hover-card-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n );\n});\nvar ARROW_NAME = \"HoverCardArrow\";\nvar HoverCardArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeHoverCard, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nHoverCardArrow.displayName = ARROW_NAME;\nfunction excludeTouch(eventHandler) {\n return (event) => event.pointerType === \"touch\" ? void 0 : eventHandler();\n}\nfunction getTabbableNodes(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nvar Root2 = HoverCard;\nvar Trigger = HoverCardTrigger;\nvar Portal = HoverCardPortal;\nvar Content2 = HoverCardContent;\nvar Arrow2 = HoverCardArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n HoverCard,\n HoverCardArrow,\n HoverCardContent,\n HoverCardPortal,\n HoverCardTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createHoverCardScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyUserSelect","HOVERCARD_NAME","createHoverCardContext","createHoverCardScope","createContextScope","createPopperScope","usePopperScope","HoverCardProvider","useHoverCardContext","HoverCard","props","__scopeHoverCard","children","openProp","defaultOpen","onOpenChange","openDelay","closeDelay","popperScope","openTimerRef","React","closeTimerRef","hasSelectionRef","isPointerDownOnContentRef","open","setOpen","useControllableState","handleOpen","handleClose","handleDismiss","jsx","PopperPrimitive.Root","TRIGGER_NAME","HoverCardTrigger","forwardedRef","triggerProps","context","PopperPrimitive.Anchor","Primitive","composeEventHandlers","excludeTouch","event","PORTAL_NAME","PortalProvider","usePortalContext","CONTENT_NAME","HoverCardContent","portalContext","forceMount","contentProps","Presence","HoverCardContentImpl","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","ref","composedRefs","useComposedRefs","containSelection","setContainSelection","body","handlePointerUp","getTabbableNodes","tabbable","DismissableLayer","PopperPrimitive.Content","ARROW_NAME","HoverCardArrow","arrowProps","PopperPrimitive.Arrow","eventHandler","container","nodes","walker","node","Root2","Trigger","Content2"],"mappings":"81BAeA,IAAIA,EACAC,EAAiB,YACjB,CAACC,EAAwBC,CAAoB,EAAIC,EAAAA,mBAAmBH,EAAgB,CACtFI,EAAAA,iBACF,CAAC,EACGC,EAAiBD,EAAAA,kBAAmB,EACpC,CAACE,EAAmBC,CAAmB,EAAIN,EAAuBD,CAAc,EAChFQ,EAAaC,GAAU,CACzB,KAAM,CACJ,iBAAAC,EACA,SAAAC,EACA,KAAMC,EACN,YAAAC,EACA,aAAAC,EACA,UAAAC,EAAY,IACZ,WAAAC,EAAa,GACjB,EAAMP,EACEQ,EAAcZ,EAAeK,CAAgB,EAC7CQ,EAAeC,EAAM,OAAO,CAA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AAgB,WAAW,WAExE,CAAG,EACD,KAAOD,EAAO,SAAU,GAAED,EAAM,KAAKC,EAAO,WAAW,EACvD,OAAOD,CACT,CACG,IAACG,EAAQnE,EACRoE,EAAU5C,EAEV6C,EAAWhC","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-hover-card/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/hover-card/src/hover-card.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { jsx } from \"react/jsx-runtime\";\nvar originalBodyUserSelect;\nvar HOVERCARD_NAME = \"HoverCard\";\nvar [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME);\nvar HoverCard = (props) => {\n const {\n __scopeHoverCard,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n openDelay = 700,\n closeDelay = 300\n } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const hasSelectionRef = React.useRef(false);\n const isPointerDownOnContentRef = React.useRef(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const handleOpen = React.useCallback(() => {\n clearTimeout(closeTimerRef.current);\n openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);\n }, [openDelay, setOpen]);\n const handleClose = React.useCallback(() => {\n clearTimeout(openTimerRef.current);\n if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {\n closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);\n }\n }, [closeDelay, setOpen]);\n const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);\n React.useEffect(() => {\n return () => {\n clearTimeout(openTimerRef.current);\n clearTimeout(closeTimerRef.current);\n };\n }, []);\n return /* @__PURE__ */ jsx(\n HoverCardProvider,\n {\n scope: __scopeHoverCard,\n open,\n onOpenChange: setOpen,\n onOpen: handleOpen,\n onClose: handleClose,\n onDismiss: handleDismiss,\n hasSelectionRef,\n isPointerDownOnContentRef,\n children: /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children })\n }\n );\n};\nHoverCard.displayName = HOVERCARD_NAME;\nvar TRIGGER_NAME = \"HoverCardTrigger\";\nvar HoverCardTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeHoverCard, ...triggerProps } = props;\n const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.a,\n {\n \"data-state\": context.open ? \"open\" : \"closed\",\n ...triggerProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),\n onFocus: composeEventHandlers(props.onFocus, context.onOpen),\n onBlur: composeEventHandlers(props.onBlur, context.onClose),\n onTouchStart: composeEventHandlers(props.onTouchStart, (event) => event.preventDefault())\n }\n ) });\n }\n);\nHoverCardTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"HoverCardPortal\";\nvar [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar HoverCardPortal = (props) => {\n const { __scopeHoverCard, forceMount, children, container } = props;\n const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nHoverCardPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"HoverCardContent\";\nvar HoverCardContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(\n HoverCardContentImpl,\n {\n \"data-state\": context.open ? \"open\" : \"closed\",\n ...contentProps,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),\n ref: forwardedRef\n }\n ) });\n }\n);\nHoverCardContent.displayName = CONTENT_NAME;\nvar HoverCardContentImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeHoverCard,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [containSelection, setContainSelection] = React.useState(false);\n React.useEffect(() => {\n if (containSelection) {\n const body = document.body;\n originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;\n body.style.userSelect = \"none\";\n body.style.webkitUserSelect = \"none\";\n return () => {\n body.style.userSelect = originalBodyUserSelect;\n body.style.webkitUserSelect = originalBodyUserSelect;\n };\n }\n }, [containSelection]);\n React.useEffect(() => {\n if (ref.current) {\n const handlePointerUp = () => {\n setContainSelection(false);\n context.isPointerDownOnContentRef.current = false;\n setTimeout(() => {\n const hasSelection = document.getSelection()?.toString() !== \"\";\n if (hasSelection) context.hasSelectionRef.current = true;\n });\n };\n document.addEventListener(\"pointerup\", handlePointerUp);\n return () => {\n document.removeEventListener(\"pointerup\", handlePointerUp);\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = false;\n };\n }\n }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);\n React.useEffect(() => {\n if (ref.current) {\n const tabbables = getTabbableNodes(ref.current);\n tabbables.forEach((tabbable) => tabbable.setAttribute(\"tabindex\", \"-1\"));\n }\n });\n return /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: false,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: composeEventHandlers(onFocusOutside, (event) => {\n event.preventDefault();\n }),\n onDismiss: context.onDismiss,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n ...popperScope,\n ...contentProps,\n onPointerDown: composeEventHandlers(contentProps.onPointerDown, (event) => {\n if (event.currentTarget.contains(event.target)) {\n setContainSelection(true);\n }\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = true;\n }),\n ref: composedRefs,\n style: {\n ...contentProps.style,\n userSelect: containSelection ? \"text\" : void 0,\n // Safari requires prefix\n WebkitUserSelect: containSelection ? \"text\" : void 0,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-hover-card-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-hover-card-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-hover-card-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-hover-card-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-hover-card-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n );\n});\nvar ARROW_NAME = \"HoverCardArrow\";\nvar HoverCardArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeHoverCard, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nHoverCardArrow.displayName = ARROW_NAME;\nfunction excludeTouch(eventHandler) {\n return (event) => event.pointerType === \"touch\" ? void 0 : eventHandler();\n}\nfunction getTabbableNodes(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nvar Root2 = HoverCard;\nvar Trigger = HoverCardTrigger;\nvar Portal = HoverCardPortal;\nvar Content2 = HoverCardContent;\nvar Arrow2 = HoverCardArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n HoverCard,\n HoverCardArrow,\n HoverCardContent,\n HoverCardPortal,\n HoverCardTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createHoverCardScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyUserSelect","HOVERCARD_NAME","createHoverCardContext","createHoverCardScope","createContextScope","createPopperScope","usePopperScope","HoverCardProvider","useHoverCardContext","HoverCard","props","__scopeHoverCard","children","openProp","defaultOpen","onOpenChange","openDelay","closeDelay","popperScope","openTimerRef","React","closeTimerRef","hasSelectionRef","isPointerDownOnContentRef","open","setOpen","useControllableState","handleOpen","handleClose","handleDismiss","jsx","PopperPrimitive.Root","TRIGGER_NAME","HoverCardTrigger","forwardedRef","triggerProps","context","PopperPrimitive.Anchor","Primitive","composeEventHandlers","excludeTouch","event","PORTAL_NAME","PortalProvider","usePortalContext","CONTENT_NAME","HoverCardContent","portalContext","forceMount","contentProps","Presence","HoverCardContentImpl","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","ref","composedRefs","useComposedRefs","containSelection","setContainSelection","body","handlePointerUp","getTabbableNodes","tabbable","DismissableLayer","PopperPrimitive.Content","ARROW_NAME","HoverCardArrow","arrowProps","PopperPrimitive.Arrow","eventHandler","container","nodes","walker","node","Root2","Trigger","Content2"],"mappings":"20BAeA,IAAIA,EACAC,EAAiB,YACjB,CAACC,EAAwBC,CAAoB,EAAIC,EAAAA,mBAAmBH,EAAgB,CACtFI,EAAAA,iBACF,CAAC,EACGC,EAAiBD,EAAAA,kBAAmB,EACpC,CAACE,EAAmBC,CAAmB,EAAIN,EAAuBD,CAAc,EAChFQ,EAAaC,GAAU,CACzB,KAAM,CACJ,iBAAAC,EACA,SAAAC,EACA,KAAMC,EACN,YAAAC,EACA,aAAAC,EACA,UAAAC,EAAY,IACZ,WAAAC,EAAa,GACjB,EAAMP,EACEQ,EAAcZ,EAAeK,CAAgB,EAC7CQ,EAAeC,EAAM,OAAO,CAAC,EAC7BC,EAAgBD,EAAM,OAAO,CAAC,EAC9BE,EAAkBF,EAAM,OAAO,EAAK,EACpCG,EAA4BH,EAAM,OAAO,EAAK,EAC9C,CAACI,EAAO,GAAOC,CAAO,EAAIC,EAAAA,qBAAqB,CACnD,KAAMb,EACN,YAAaC,EACb,SAAUC,CACd,CAAG,EACKY,EAAaP,EAAM,YAAY,IAAM,CACzC,aAAaC,EAAc,OAAO,EAClCF,EAAa,QAAU,OAAO,WAAW,IAAMM,EAAQ,EAAI,EAAGT,CAAS,CAC3E,EAAK,CAACA,EAAWS,CAAO,CAAC,EACjBG,EAAcR,EAAM,YAAY,IAAM,CAC1C,aAAaD,EAAa,OAAO,EAC7B,CAACG,EAAgB,SAAW,CAACC,EAA0B,UACzDF,EAAc,QAAU,OAAO,WAAW,IAAMI,EAAQ,EAAK,EAAGR,CAAU,EAEhF,EAAK,CAACA,EAAYQ,CAAO,CAAC,EAClBI,EAAgBT,EAAM,Y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,mCACpC,oCAAqC,mCAEnD,CACA,CACA,CACA,CACG,CACH,CAAC,EACGQ,EAAa,iBACbC,EAAiBhD,EAAM,WACzB,CAACV,EAAOwB,IAAiB,CACvB,KAAM,CAAE,iBAAAvB,EAAkB,GAAG0D,CAAU,EAAK3D,EACtCQ,EAAcZ,EAAeK,CAAgB,EACnD,OAAuBmB,EAAG,IAACwC,EAAqB,MAAE,CAAE,GAAGpD,EAAa,GAAGmD,EAAY,IAAKnC,EAAc,CAC1G,CACA,EACAkC,EAAe,YAAcD,EAC7B,SAAS3B,EAAa+B,EAAc,CAClC,OAAQ9B,GAAUA,EAAM,cAAgB,QAAU,OAAS8B,EAAc,CAC3E,CACA,SAASR,EAAiBS,EAAW,CACnC,MAAMC,EAAQ,CAAE,EACVC,EAAS,SAAS,iBAAiBF,EAAW,WAAW,aAAc,CAC3E,WAAaG,GACJA,EAAK,UAAY,EAAI,WAAW,cAAgB,WAAW,WAExE,CAAG,EACD,KAAOD,EAAO,SAAU,GAAED,EAAM,KAAKC,EAAO,WAAW,EACvD,OAAOD,CACT,CACG,IAACG,EAAQnE,EACRoE,EAAU5C,EAEV6C,EAAWhC","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("../../react-primitive/dist/index.cjs"),i=require("../../../../_virtual/jsx-runtime.cjs");function c(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const l=c(n);var s="Label",a=l.forwardRef((t,r)=>i.jsxRuntimeExports.jsx(u.Primitive.label,{...t,ref:r,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));a.displayName=s;var f=a;exports.Label=a;exports.Root=f;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),u=require("../../react-primitive/dist/index.cjs"),i=require("react/jsx-runtime");function c(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const l=c(n);var s="Label",o=l.forwardRef((t,r)=>i.jsx(u.Primitive.label,{...t,ref:r,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));o.displayName=s;var f=o;exports.Label=o;exports.Root=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-label/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/label/src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAME","Label","React","props","forwardedRef","jsx","Primitive","event","Root"],"mappings":"ofAMA,IAAIA,EAAO,QACPC,EAAQC,EAAM,WAAW,CAACC,EAAOC,IACZC,EAAG,kBAAA,IACxBC,EAAAA,UAAU,MACV,CACE,GAAGH,EACH,IAAKC,EACL,YAAcG,GAAU,CACPA,EAAM,OACV,QAAQ,iCAAiC,IACpDJ,EAAM,cAAcI,CAAK,EACrB,CAACA,EAAM,kBAAoBA,EAAM,OAAS,GAAGA,EAAM,eAAgB,EAC/E,CACA,CACG,CACF,EACDN,EAAM,YAAcD,EACjB,IAACQ,EAAOP","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@radix-ui/react-label/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/label/src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAME","Label","React","props","forwardedRef","jsx","Primitive","event","Root"],"mappings":"ieAMA,IAAIA,EAAO,QACPC,EAAQC,EAAM,WAAW,CAACC,EAAOC,IACZC,EAAG,IACxBC,EAAAA,UAAU,MACV,CACE,GAAGH,EACH,IAAKC,EACL,YAAcG,GAAU,CACPA,EAAM,OACV,QAAQ,iCAAiC,IACpDJ,EAAM,cAAcI,CAAK,EACrB,CAACA,EAAM,kBAAoBA,EAAM,OAAS,GAAGA,EAAM,eAAgB,EAC/E,CACA,CACG,CACF,EACDN,EAAM,YAAcD,EACjB,IAACQ,EAAOP","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ye=require("react"),R=require("../../primitive/dist/index.cjs"),Xe=require("../../react-collection/dist/index.cjs"),w=require("../../react-compose-refs/dist/index.cjs"),We=require("../../react-context/dist/index.cjs"),ze=require("../../react-direction/dist/index.cjs"),Ze=require("../../react-dismissable-layer/dist/index.cjs"),Je=require("../../react-focus-guards/dist/index.cjs"),Qe=require("../../react-focus-scope/dist/index.cjs"),Pe=require("../../react-id/dist/index.cjs"),_=require("../../react-popper/dist/index.cjs"),et=require("../../react-portal/dist/index.cjs"),V=require("../../react-presence/dist/index.cjs"),y=require("../../react-primitive/dist/index.cjs"),Y=require("../../react-roving-focus/dist/index.cjs"),tt=require("../../react-slot/dist/index.cjs"),te=require("../../react-use-callback-ref/dist/index.cjs"),nt=require("../../../aria-hidden/dist/es2015/index.cjs"),ot=require("../../../react-remove-scroll/dist/es2015/Combination.cjs"),u=require("../../../../_virtual/jsx-runtime.cjs");function rt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=rt(Ye);var ee=["Enter"," "],st=["ArrowDown","PageUp","Home"],be=["ArrowUp","PageDown","End"],ct=[...st,...be],ut={ltr:[...ee,"ArrowRight"],rtl:[...ee,"ArrowLeft"]},at={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[D,it,lt]=Xe.createCollection(F),[S,dt]=We.createContextScope(F,[lt,_.createPopperScope,Y.createRovingFocusGroupScope]),L=_.createPopperScope(),we=Y.createRovingFocusGroupScope(),[ye,h]=S(F),[ft,G]=S(F),ne=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:a,onOpenChange:s,modal:l=!0}=e,f=L(n),[p,m]=r.useState(null),d=r.useRef(!1),c=te.useCallbackRef(s),x=ze.useDirection(a);return r.useEffect(()=>{const C=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),u.jsxRuntimeExports.jsx(_.Root,{...f,children:u.jsxRuntimeExports.jsx(ye,{scope:n,open:t,onOpenChange:c,content:p,onContentChange:m,children:u.jsxRuntimeExports.jsx(ft,{scope:n,onClose:r.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:d,dir:x,modal:l,children:o})})})};ne.displayName=F;var pt="MenuAnchor",X=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=L(t);return u.jsxRuntimeExports.jsx(_.Anchor,{...a,...o,ref:n})});X.displayName=pt;var oe="MenuPortal",[mt,Te]=S(oe,{forceMount:void 0}),re=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:a}=e,s=h(oe,n);return u.jsxRuntimeExports.jsx(mt,{scope:n,forceMount:t,children:u.jsxRuntimeExports.jsx(V.Presence,{present:t||s.open,children:u.jsxRuntimeExports.jsx(et.Portal,{asChild:!0,container:a,children:o})})})};re.displayName=oe;var E="MenuContent",[xt,se]=S(E),ce=r.forwardRef((e,n)=>{const t=Te(E,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,s=h(E,e.__scopeMenu),l=G(E,e.__scopeMenu);return u.jsxRuntimeExports.jsx(D.Provider,{scope:e.__scopeMenu,children:u.jsxRuntimeExports.jsx(V.Presence,{present:o||s.open,children:u.jsxRuntimeExports.jsx(D.Slot,{scope:e.__scopeMenu,children:l.modal?u.jsxRuntimeExports.jsx(vt,{...a,ref:n}):u.jsxRuntimeExports.jsx(Rt,{...a,ref:n})})})})}),vt=r.forwardRef((e,n)=>{const t=h(E,e.__scopeMenu),o=r.useRef(null),a=w.useComposedRefs(n,o);return r.useEffect(()=>{const s=o.current;if(s)return nt.hideOthers(s)},[]),u.jsxRuntimeExports.jsx(ue,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:R.composeEventHandlers(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),Rt=r.forwardRef((e,n)=>{const t=h(E,e.__scopeMenu);return u.jsxRuntimeExports.jsx(ue,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),ue=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:m,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:x,onDismiss:C,disableOutsideScroll:v,...j}=e,T=h(E,t),P=G(E,t),Ge=L(t),Ke=we(t),he=it(t),[He,ge]=r.useState(null),H=r.useRef(null),qe=w.useComposedRefs(n,H,T.onContentChange),q=r.useRef(0),U=r.useRef(""),Ue=r.useRef(0),z=r.useRef(null),_e=r.useRef("right"),Z=r.useRef(0),$e=v?ot.default:r.Fragment,Be=v?{as:tt.Slot,allowPinchZoom:!0}:void 0,Ve=i=>{const b=U.current+i,g=he().filter(M=>!M.disabled),O=document.activeElement,J=g.find(M=>M.ref.current===O)?.textValue,Q=g.map(M=>M.textValue),Se=wt(Q,b,J),A=g.find(M=>M.textValue===Se)?.ref.current;(function M(je){U.current=je,window.clearTimeout(q.current),je!==""&&(q.current=window.setTimeout(()=>M(""),1e3))})(b),A&&setTimeout(()=>A.focus())};r.useEffect(()=>()=>window.clearTimeout(q.current),[]),Je.useFocusGuards();const I=r.useCallback(i=>_e.current===z.current?.side&&Tt(i,z.current?.area),[]);return u.jsxRuntimeExports.jsx(xt,{scope:t,searchRef:U,onItemEnter:r.useCallback(i=>{I(i)&&i.preventDefault()},[I]),onItemLeave:r.useCallback(i=>{I(i)||(H.current?.focus(),ge(null))},[I]),onTriggerLeave:r.useCallback(i=>{I(i)&&i.preventDefault()},[I]),pointerGraceTimerRef:Ue,onPointerGraceIntentChange:r.useCallback(i=>{z.current=i},[]),children:u.jsxRuntimeExports.jsx($e,{...Be,children:u.jsxRuntimeExports.jsx(Qe.FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:R.composeEventHandlers(s,i=>{i.preventDefault(),H.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:u.jsxRuntimeExports.jsx(Ze.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:d,onFocusOutside:c,onInteractOutside:x,onDismiss:C,children:u.jsxRuntimeExports.jsx(Y.Root,{asChild:!0,...Ke,dir:P.dir,orientation:"vertical",loop:o,currentTabStopId:He,onCurrentTabStopIdChange:ge,onEntryFocus:R.composeEventHandlers(p,i=>{P.isUsingKeyboardRef.current||i.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsxRuntimeExports.jsx(_.Content,{role:"menu","aria-orientation":"vertical","data-state":Le(T.open),"data-radix-menu-content":"",dir:P.dir,...Ge,...j,ref:qe,style:{outline:"none",...j.style},onKeyDown:R.composeEventHandlers(j.onKeyDown,i=>{const g=i.target.closest("[data-radix-menu-content]")===i.currentTarget,O=i.ctrlKey||i.altKey||i.metaKey,J=i.key.length===1;g&&(i.key==="Tab"&&i.preventDefault(),!O&&J&&Ve(i.key));const Q=H.current;if(i.target!==Q||!ct.includes(i.key))return;i.preventDefault();const A=he().filter(M=>!M.disabled).map(M=>M.ref.current);be.includes(i.key)&&A.reverse(),It(A)}),onBlur:R.composeEventHandlers(e.onBlur,i=>{i.currentTarget.contains(i.target)||(window.clearTimeout(q.current),U.current="")}),onPointerMove:R.composeEventHandlers(e.onPointerMove,N(i=>{const b=i.target,g=Z.current!==i.clientX;if(i.currentTarget.contains(b)&&g){const O=i.clientX>Z.current?"right":"left";_e.current=O,Z.current=i.clientX}}))})})})})})})});ce.displayName=E;var Mt="MenuGroup",W=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsxRuntimeExports.jsx(y.Primitive.div,{role:"group",...o,ref:n})});W.displayName=Mt;var Et="MenuLabel",ae=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsxRuntimeExports.jsx(y.Primitive.div,{...o,ref:n})});ae.displayName=Et;var $="MenuItem",Ie="menu.itemSelect",K=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...a}=e,s=r.useRef(null),l=G($,e.__scopeMenu),f=se($,e.__scopeMenu),p=w.useComposedRefs(n,s),m=r.useRef(!1),d=()=>{const c=s.current;if(!t&&c){const x=new CustomEvent(Ie,{bubbles:!0,cancelable:!0});c.addEventListener(Ie,C=>o?.(C),{once:!0}),y.dispatchDiscreteCustomEvent(c,x),x.defaultPrevented?m.current=!1:l.onClose()}};return u.jsxRuntimeExports.jsx(Oe,{...a,ref:p,disabled:t,onClick:R.composeEventHandlers(e.onClick,d),onPointerDown:c=>{e.onPointerDown?.(c),m.current=!0},onPointerUp:R.composeEventHandlers(e.onPointerUp,c=>{m.current||c.currentTarget?.click()}),onKeyDown:R.composeEventHandlers(e.onKeyDown,c=>{const x=f.searchRef.current!=="";t||x&&c.key===" "||ee.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});K.displayName=$;var Oe=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:a,...s}=e,l=se($,t),f=we(t),p=r.useRef(null),m=w.useComposedRefs(n,p),[d,c]=r.useState(!1),[x,C]=r.useState("");return r.useEffect(()=>{const v=p.current;v&&C((v.textContent??"").trim())},[s.children]),u.jsxRuntimeExports.jsx(D.ItemSlot,{scope:t,disabled:o,textValue:a??x,children:u.jsxRuntimeExports.jsx(Y.Item,{asChild:!0,...f,focusable:!o,children:u.jsxRuntimeExports.jsx(y.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:m,onPointerMove:R.composeEventHandlers(e.onPointerMove,N(v=>{o?l.onItemLeave(v):(l.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R.composeEventHandlers(e.onPointerLeave,N(v=>l.onItemLeave(v))),onFocus:R.composeEventHandlers(e.onFocus,()=>c(!0)),onBlur:R.composeEventHandlers(e.onBlur,()=>c(!1))})})})}),Ct="MenuCheckboxItem",ie=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...a}=e;return u.jsxRuntimeExports.jsx(De,{scope:e.__scopeMenu,checked:t,children:u.jsxRuntimeExports.jsx(K,{role:"menuitemcheckbox","aria-checked":B(t)?"mixed":t,...a,ref:n,"data-state":Ce(t),onSelect:R.composeEventHandlers(a.onSelect,()=>o?.(B(t)?!0:!t),{checkForDefaultPrevented:!1})})})});ie.displayName=Ct;var Ae="MenuRadioGroup",[ht,gt]=S(Ae,{value:void 0,onValueChange:()=>{}}),le=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...a}=e,s=te.useCallbackRef(o);return u.jsxRuntimeExports.jsx(ht,{scope:e.__scopeMenu,value:t,onValueChange:s,children:u.jsxRuntimeExports.jsx(W,{...a,ref:n})})});le.displayName=Ae;var ke="MenuRadioItem",de=r.forwardRef((e,n)=>{const{value:t,...o}=e,a=gt(ke,e.__scopeMenu),s=t===a.value;return u.jsxRuntimeExports.jsx(De,{scope:e.__scopeMenu,checked:s,children:u.jsxRuntimeExports.jsx(K,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":Ce(s),onSelect:R.composeEventHandlers(o.onSelect,()=>a.onValueChange?.(t),{checkForDefaultPrevented:!1})})})});de.displayName=ke;var fe="MenuItemIndicator",[De,_t]=S(fe,{checked:!1}),pe=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...a}=e,s=_t(fe,t);return u.jsxRuntimeExports.jsx(V.Presence,{present:o||B(s.checked)||s.checked===!0,children:u.jsxRuntimeExports.jsx(y.Primitive.span,{...a,ref:n,"data-state":Ce(s.checked)})})});pe.displayName=fe;var St="MenuSeparator",me=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return u.jsxRuntimeExports.jsx(y.Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});me.displayName=St;var jt="MenuArrow",xe=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=L(t);return u.jsxRuntimeExports.jsx(_.Arrow,{...a,...o,ref:n})});xe.displayName=jt;var ve="MenuSub",[Pt,Ne]=S(ve),Re=e=>{const{__scopeMenu:n,children:t,open:o=!1,onOpenChange:a}=e,s=h(ve,n),l=L(n),[f,p]=r.useState(null),[m,d]=r.useState(null),c=te.useCallbackRef(a);return r.useEffect(()=>(s.open===!1&&c(!1),()=>c(!1)),[s.open,c]),u.jsxRuntimeExports.jsx(_.Root,{...l,children:u.jsxRuntimeExports.jsx(ye,{scope:n,open:o,onOpenChange:c,content:m,onContentChange:d,children:u.jsxRuntimeExports.jsx(Pt,{scope:n,contentId:Pe.useId(),triggerId:Pe.useId(),trigger:f,onTriggerChange:p,children:t})})})};Re.displayName=ve;var k="MenuSubTrigger",Me=r.forwardRef((e,n)=>{const t=h(k,e.__scopeMenu),o=G(k,e.__scopeMenu),a=Ne(k,e.__scopeMenu),s=se(k,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=s,m={__scopeMenu:e.__scopeMenu},d=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>d,[d]),r.useEffect(()=>{const c=f.current;return()=>{window.clearTimeout(c),p(null)}},[f,p]),u.jsxRuntimeExports.jsx(X,{asChild:!0,...m,children:u.jsxRuntimeExports.jsx(Oe,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":a.contentId,"data-state":Le(t.open),...e,ref:w.composeRefs(n,a.onTriggerChange),onClick:c=>{e.onClick?.(c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:R.composeEventHandlers(e.onPointerMove,N(c=>{s.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),d()},100))})),onPointerLeave:R.composeEventHandlers(e.onPointerLeave,N(c=>{d();const x=t.content?.getBoundingClientRect();if(x){const C=t.content?.dataset.side,v=C==="right",j=v?-5:5,T=x[v?"left":"right"],P=x[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:c.clientX+j,y:c.clientY},{x:T,y:x.top},{x:P,y:x.top},{x:P,y:x.bottom},{x:T,y:x.bottom}],side:C}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(c),c.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R.composeEventHandlers(e.onKeyDown,c=>{const x=s.searchRef.current!=="";e.disabled||x&&c.key===" "||ut[o.dir].includes(c.key)&&(t.onOpenChange(!0),t.content?.focus(),c.preventDefault())})})})});Me.displayName=k;var Fe="MenuSubContent",Ee=r.forwardRef((e,n)=>{const t=Te(E,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,s=h(E,e.__scopeMenu),l=G(E,e.__scopeMenu),f=Ne(Fe,e.__scopeMenu),p=r.useRef(null),m=w.useComposedRefs(n,p);return u.jsxRuntimeExports.jsx(D.Provider,{scope:e.__scopeMenu,children:u.jsxRuntimeExports.jsx(V.Presence,{present:o||s.open,children:u.jsxRuntimeExports.jsx(D.Slot,{scope:e.__scopeMenu,children:u.jsxRuntimeExports.jsx(ue,{id:f.contentId,"aria-labelledby":f.triggerId,...a,ref:m,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{l.isUsingKeyboardRef.current&&p.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R.composeEventHandlers(e.onFocusOutside,d=>{d.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R.composeEventHandlers(e.onEscapeKeyDown,d=>{l.onClose(),d.preventDefault()}),onKeyDown:R.composeEventHandlers(e.onKeyDown,d=>{const c=d.currentTarget.contains(d.target),x=at[l.dir].includes(d.key);c&&x&&(s.onOpenChange(!1),f.trigger?.focus(),d.preventDefault())})})})})})});Ee.displayName=Fe;function Le(e){return e?"open":"closed"}function B(e){return e==="indeterminate"}function Ce(e){return B(e)?"indeterminate":e?"checked":"unchecked"}function It(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function bt(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function wt(e,n,t){const a=n.length>1&&Array.from(n).every(m=>m===n[0])?n[0]:n,s=t?e.indexOf(t):-1;let l=bt(e,Math.max(s,0));a.length===1&&(l=l.filter(m=>m!==t));const p=l.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return p!==t?p:void 0}function yt(e,n){const{x:t,y:o}=e;let a=!1;for(let s=0,l=n.length-1;s<n.length;l=s++){const f=n[s].x,p=n[s].y,m=n[l].x,d=n[l].y;p>o!=d>o&&t<(m-f)*(o-p)/(d-p)+f&&(a=!a)}return a}function Tt(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return yt(t,n)}function N(e){return n=>n.pointerType==="mouse"?e(n):void 0}var Ot=ne,At=X,kt=re,Dt=ce,Nt=W,Ft=ae,Lt=K,Gt=ie,Kt=le,Ht=de,qt=pe,Ut=me,$t=xe,Bt=Re,Vt=Me,Yt=Ee;exports.Anchor=At;exports.Arrow=$t;exports.CheckboxItem=Gt;exports.Content=Dt;exports.Group=Nt;exports.Item=Lt;exports.ItemIndicator=qt;exports.Label=Ft;exports.Menu=ne;exports.MenuAnchor=X;exports.MenuArrow=xe;exports.MenuCheckboxItem=ie;exports.MenuContent=ce;exports.MenuGroup=W;exports.MenuItem=K;exports.MenuItemIndicator=pe;exports.MenuLabel=ae;exports.MenuPortal=re;exports.MenuRadioGroup=le;exports.MenuRadioItem=de;exports.MenuSeparator=me;exports.MenuSub=Re;exports.MenuSubContent=Ee;exports.MenuSubTrigger=Me;exports.Portal=kt;exports.RadioGroup=Kt;exports.RadioItem=Ht;exports.Root=Ot;exports.Separator=Ut;exports.Sub=Bt;exports.SubContent=Yt;exports.SubTrigger=Vt;exports.createMenuScope=dt;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ye=require("react"),C=require("../../primitive/dist/index.cjs"),Xe=require("../../react-collection/dist/index.cjs"),y=require("../../react-compose-refs/dist/index.cjs"),We=require("../../react-context/dist/index.cjs"),ze=require("../../react-direction/dist/index.cjs"),Ze=require("../../react-dismissable-layer/dist/index.cjs"),Je=require("../../react-focus-guards/dist/index.cjs"),Qe=require("../../react-focus-scope/dist/index.cjs"),Ie=require("../../react-id/dist/index.cjs"),E=require("../../react-popper/dist/index.cjs"),en=require("../../react-portal/dist/index.cjs"),V=require("../../react-presence/dist/index.cjs"),T=require("../../react-primitive/dist/index.cjs"),Y=require("../../react-roving-focus/dist/index.cjs"),nn=require("../../react-slot/dist/index.cjs"),ne=require("../../react-use-callback-ref/dist/index.cjs"),tn=require("../../../aria-hidden/dist/es2015/index.cjs"),on=require("../../../react-remove-scroll/dist/es2015/Combination.cjs"),a=require("react/jsx-runtime");function rn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=rn(Ye);var ee=["Enter"," "],cn=["ArrowDown","PageUp","Home"],we=["ArrowUp","PageDown","End"],sn=[...cn,...we],an={ltr:[...ee,"ArrowRight"],rtl:[...ee,"ArrowLeft"]},un={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[D,ln,dn]=Xe.createCollection(F),[S,fn]=We.createContextScope(F,[dn,E.createPopperScope,Y.createRovingFocusGroupScope]),L=E.createPopperScope(),ye=Y.createRovingFocusGroupScope(),[Te,_]=S(F),[pn,G]=S(F),te=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:u,onOpenChange:c,modal:l=!0}=e,f=L(t),[p,m]=r.useState(null),d=r.useRef(!1),s=ne.useCallbackRef(c),v=ze.useDirection(u);return r.useEffect(()=>{const g=()=>{d.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>d.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),a.jsx(E.Root,{...f,children:a.jsx(Te,{scope:t,open:n,onOpenChange:s,content:p,onContentChange:m,children:a.jsx(pn,{scope:t,onClose:r.useCallback(()=>s(!1),[s]),isUsingKeyboardRef:d,dir:v,modal:l,children:o})})})};te.displayName=F;var mn="MenuAnchor",X=r.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,u=L(n);return a.jsx(E.Anchor,{...u,...o,ref:t})});X.displayName=mn;var oe="MenuPortal",[vn,Oe]=S(oe,{forceMount:void 0}),re=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:u}=e,c=_(oe,t);return a.jsx(vn,{scope:t,forceMount:n,children:a.jsx(V.Presence,{present:n||c.open,children:a.jsx(en.Portal,{asChild:!0,container:u,children:o})})})};re.displayName=oe;var x="MenuContent",[Mn,ce]=S(x),se=r.forwardRef((e,t)=>{const n=Oe(x,e.__scopeMenu),{forceMount:o=n.forceMount,...u}=e,c=_(x,e.__scopeMenu),l=G(x,e.__scopeMenu);return a.jsx(D.Provider,{scope:e.__scopeMenu,children:a.jsx(V.Presence,{present:o||c.open,children:a.jsx(D.Slot,{scope:e.__scopeMenu,children:l.modal?a.jsx(Cn,{...u,ref:t}):a.jsx(hn,{...u,ref:t})})})})}),Cn=r.forwardRef((e,t)=>{const n=_(x,e.__scopeMenu),o=r.useRef(null),u=y.useComposedRefs(t,o);return r.useEffect(()=>{const c=o.current;if(c)return tn.hideOthers(c)},[]),a.jsx(ae,{...e,ref:u,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:C.composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),hn=r.forwardRef((e,t)=>{const n=_(x,e.__scopeMenu);return a.jsx(ae,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ae=r.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:u,onOpenAutoFocus:c,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:m,onPointerDownOutside:d,onFocusOutside:s,onInteractOutside:v,onDismiss:g,disableOutsideScroll:M,...P}=e,O=_(x,n),I=G(x,n),Ge=L(n),Ke=ye(n),_e=ln(n),[He,Re]=r.useState(null),H=r.useRef(null),qe=y.useComposedRefs(t,H,O.onContentChange),q=r.useRef(0),U=r.useRef(""),Ue=r.useRef(0),z=r.useRef(null),Ee=r.useRef("right"),Z=r.useRef(0),$e=M?on.default:r.Fragment,Be=M?{as:nn.Slot,allowPinchZoom:!0}:void 0,Ve=i=>{const w=U.current+i,R=_e().filter(h=>!h.disabled),A=document.activeElement,J=R.find(h=>h.ref.current===A)?.textValue,Q=R.map(h=>h.textValue),Se=Tn(Q,w,J),j=R.find(h=>h.textValue===Se)?.ref.current;(function h(Pe){U.current=Pe,window.clearTimeout(q.current),Pe!==""&&(q.current=window.setTimeout(()=>h(""),1e3))})(w),j&&setTimeout(()=>j.focus())};r.useEffect(()=>()=>window.clearTimeout(q.current),[]),Je.useFocusGuards();const b=r.useCallback(i=>Ee.current===z.current?.side&&An(i,z.current?.area),[]);return a.jsx(Mn,{scope:n,searchRef:U,onItemEnter:r.useCallback(i=>{b(i)&&i.preventDefault()},[b]),onItemLeave:r.useCallback(i=>{b(i)||(H.current?.focus(),Re(null))},[b]),onTriggerLeave:r.useCallback(i=>{b(i)&&i.preventDefault()},[b]),pointerGraceTimerRef:Ue,onPointerGraceIntentChange:r.useCallback(i=>{z.current=i},[]),children:a.jsx($e,{...Be,children:a.jsx(Qe.FocusScope,{asChild:!0,trapped:u,onMountAutoFocus:C.composeEventHandlers(c,i=>{i.preventDefault(),H.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:a.jsx(Ze.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:d,onFocusOutside:s,onInteractOutside:v,onDismiss:g,children:a.jsx(Y.Root,{asChild:!0,...Ke,dir:I.dir,orientation:"vertical",loop:o,currentTabStopId:He,onCurrentTabStopIdChange:Re,onEntryFocus:C.composeEventHandlers(p,i=>{I.isUsingKeyboardRef.current||i.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(E.Content,{role:"menu","aria-orientation":"vertical","data-state":Le(O.open),"data-radix-menu-content":"",dir:I.dir,...Ge,...P,ref:qe,style:{outline:"none",...P.style},onKeyDown:C.composeEventHandlers(P.onKeyDown,i=>{const R=i.target.closest("[data-radix-menu-content]")===i.currentTarget,A=i.ctrlKey||i.altKey||i.metaKey,J=i.key.length===1;R&&(i.key==="Tab"&&i.preventDefault(),!A&&J&&Ve(i.key));const Q=H.current;if(i.target!==Q||!sn.includes(i.key))return;i.preventDefault();const j=_e().filter(h=>!h.disabled).map(h=>h.ref.current);we.includes(i.key)&&j.reverse(),wn(j)}),onBlur:C.composeEventHandlers(e.onBlur,i=>{i.currentTarget.contains(i.target)||(window.clearTimeout(q.current),U.current="")}),onPointerMove:C.composeEventHandlers(e.onPointerMove,N(i=>{const w=i.target,R=Z.current!==i.clientX;if(i.currentTarget.contains(w)&&R){const A=i.clientX>Z.current?"right":"left";Ee.current=A,Z.current=i.clientX}}))})})})})})})});se.displayName=x;var xn="MenuGroup",W=r.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(T.Primitive.div,{role:"group",...o,ref:t})});W.displayName=xn;var gn="MenuLabel",ue=r.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(T.Primitive.div,{...o,ref:t})});ue.displayName=gn;var $="MenuItem",be="menu.itemSelect",K=r.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...u}=e,c=r.useRef(null),l=G($,e.__scopeMenu),f=ce($,e.__scopeMenu),p=y.useComposedRefs(t,c),m=r.useRef(!1),d=()=>{const s=c.current;if(!n&&s){const v=new CustomEvent(be,{bubbles:!0,cancelable:!0});s.addEventListener(be,g=>o?.(g),{once:!0}),T.dispatchDiscreteCustomEvent(s,v),v.defaultPrevented?m.current=!1:l.onClose()}};return a.jsx(Ae,{...u,ref:p,disabled:n,onClick:C.composeEventHandlers(e.onClick,d),onPointerDown:s=>{e.onPointerDown?.(s),m.current=!0},onPointerUp:C.composeEventHandlers(e.onPointerUp,s=>{m.current||s.currentTarget?.click()}),onKeyDown:C.composeEventHandlers(e.onKeyDown,s=>{const v=f.searchRef.current!=="";n||v&&s.key===" "||ee.includes(s.key)&&(s.currentTarget.click(),s.preventDefault())})})});K.displayName=$;var Ae=r.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:u,...c}=e,l=ce($,n),f=ye(n),p=r.useRef(null),m=y.useComposedRefs(t,p),[d,s]=r.useState(!1),[v,g]=r.useState("");return r.useEffect(()=>{const M=p.current;M&&g((M.textContent??"").trim())},[c.children]),a.jsx(D.ItemSlot,{scope:n,disabled:o,textValue:u??v,children:a.jsx(Y.Item,{asChild:!0,...f,focusable:!o,children:a.jsx(T.Primitive.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:m,onPointerMove:C.composeEventHandlers(e.onPointerMove,N(M=>{o?l.onItemLeave(M):(l.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:C.composeEventHandlers(e.onPointerLeave,N(M=>l.onItemLeave(M))),onFocus:C.composeEventHandlers(e.onFocus,()=>s(!0)),onBlur:C.composeEventHandlers(e.onBlur,()=>s(!1))})})})}),_n="MenuCheckboxItem",ie=r.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...u}=e;return a.jsx(De,{scope:e.__scopeMenu,checked:n,children:a.jsx(K,{role:"menuitemcheckbox","aria-checked":B(n)?"mixed":n,...u,ref:t,"data-state":ge(n),onSelect:C.composeEventHandlers(u.onSelect,()=>o?.(B(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ie.displayName=_n;var je="MenuRadioGroup",[Rn,En]=S(je,{value:void 0,onValueChange:()=>{}}),le=r.forwardRef((e,t)=>{const{value:n,onValueChange:o,...u}=e,c=ne.useCallbackRef(o);return a.jsx(Rn,{scope:e.__scopeMenu,value:n,onValueChange:c,children:a.jsx(W,{...u,ref:t})})});le.displayName=je;var ke="MenuRadioItem",de=r.forwardRef((e,t)=>{const{value:n,...o}=e,u=En(ke,e.__scopeMenu),c=n===u.value;return a.jsx(De,{scope:e.__scopeMenu,checked:c,children:a.jsx(K,{role:"menuitemradio","aria-checked":c,...o,ref:t,"data-state":ge(c),onSelect:C.composeEventHandlers(o.onSelect,()=>u.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});de.displayName=ke;var fe="MenuItemIndicator",[De,Sn]=S(fe,{checked:!1}),pe=r.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...u}=e,c=Sn(fe,n);return a.jsx(V.Presence,{present:o||B(c.checked)||c.checked===!0,children:a.jsx(T.Primitive.span,{...u,ref:t,"data-state":ge(c.checked)})})});pe.displayName=fe;var Pn="MenuSeparator",me=r.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(T.Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});me.displayName=Pn;var In="MenuArrow",ve=r.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,u=L(n);return a.jsx(E.Arrow,{...u,...o,ref:t})});ve.displayName=In;var Me="MenuSub",[bn,Ne]=S(Me),Ce=e=>{const{__scopeMenu:t,children:n,open:o=!1,onOpenChange:u}=e,c=_(Me,t),l=L(t),[f,p]=r.useState(null),[m,d]=r.useState(null),s=ne.useCallbackRef(u);return r.useEffect(()=>(c.open===!1&&s(!1),()=>s(!1)),[c.open,s]),a.jsx(E.Root,{...l,children:a.jsx(Te,{scope:t,open:o,onOpenChange:s,content:m,onContentChange:d,children:a.jsx(bn,{scope:t,contentId:Ie.useId(),triggerId:Ie.useId(),trigger:f,onTriggerChange:p,children:n})})})};Ce.displayName=Me;var k="MenuSubTrigger",he=r.forwardRef((e,t)=>{const n=_(k,e.__scopeMenu),o=G(k,e.__scopeMenu),u=Ne(k,e.__scopeMenu),c=ce(k,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=c,m={__scopeMenu:e.__scopeMenu},d=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>d,[d]),r.useEffect(()=>{const s=f.current;return()=>{window.clearTimeout(s),p(null)}},[f,p]),a.jsx(X,{asChild:!0,...m,children:a.jsx(Ae,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":u.contentId,"data-state":Le(n.open),...e,ref:y.composeRefs(t,u.onTriggerChange),onClick:s=>{e.onClick?.(s),!(e.disabled||s.defaultPrevented)&&(s.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:C.composeEventHandlers(e.onPointerMove,N(s=>{c.onItemEnter(s),!s.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(c.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:C.composeEventHandlers(e.onPointerLeave,N(s=>{d();const v=n.content?.getBoundingClientRect();if(v){const g=n.content?.dataset.side,M=g==="right",P=M?-5:5,O=v[M?"left":"right"],I=v[M?"right":"left"];c.onPointerGraceIntentChange({area:[{x:s.clientX+P,y:s.clientY},{x:O,y:v.top},{x:I,y:v.top},{x:I,y:v.bottom},{x:O,y:v.bottom}],side:g}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(s),s.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:C.composeEventHandlers(e.onKeyDown,s=>{const v=c.searchRef.current!=="";e.disabled||v&&s.key===" "||an[o.dir].includes(s.key)&&(n.onOpenChange(!0),n.content?.focus(),s.preventDefault())})})})});he.displayName=k;var Fe="MenuSubContent",xe=r.forwardRef((e,t)=>{const n=Oe(x,e.__scopeMenu),{forceMount:o=n.forceMount,...u}=e,c=_(x,e.__scopeMenu),l=G(x,e.__scopeMenu),f=Ne(Fe,e.__scopeMenu),p=r.useRef(null),m=y.useComposedRefs(t,p);return a.jsx(D.Provider,{scope:e.__scopeMenu,children:a.jsx(V.Presence,{present:o||c.open,children:a.jsx(D.Slot,{scope:e.__scopeMenu,children:a.jsx(ae,{id:f.contentId,"aria-labelledby":f.triggerId,...u,ref:m,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{l.isUsingKeyboardRef.current&&p.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:C.composeEventHandlers(e.onFocusOutside,d=>{d.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:C.composeEventHandlers(e.onEscapeKeyDown,d=>{l.onClose(),d.preventDefault()}),onKeyDown:C.composeEventHandlers(e.onKeyDown,d=>{const s=d.currentTarget.contains(d.target),v=un[l.dir].includes(d.key);s&&v&&(c.onOpenChange(!1),f.trigger?.focus(),d.preventDefault())})})})})})});xe.displayName=Fe;function Le(e){return e?"open":"closed"}function B(e){return e==="indeterminate"}function ge(e){return B(e)?"indeterminate":e?"checked":"unchecked"}function wn(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function yn(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Tn(e,t,n){const u=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let l=yn(e,Math.max(c,0));u.length===1&&(l=l.filter(m=>m!==n));const p=l.find(m=>m.toLowerCase().startsWith(u.toLowerCase()));return p!==n?p:void 0}function On(e,t){const{x:n,y:o}=e;let u=!1;for(let c=0,l=t.length-1;c<t.length;l=c++){const f=t[c].x,p=t[c].y,m=t[l].x,d=t[l].y;p>o!=d>o&&n<(m-f)*(o-p)/(d-p)+f&&(u=!u)}return u}function An(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return On(n,t)}function N(e){return t=>t.pointerType==="mouse"?e(t):void 0}var jn=te,kn=X,Dn=re,Nn=se,Fn=W,Ln=ue,Gn=K,Kn=ie,Hn=le,qn=de,Un=pe,$n=me,Bn=ve,Vn=Ce,Yn=he,Xn=xe;exports.Anchor=kn;exports.Arrow=Bn;exports.CheckboxItem=Kn;exports.Content=Nn;exports.Group=Fn;exports.Item=Gn;exports.ItemIndicator=Un;exports.Label=Ln;exports.Menu=te;exports.MenuAnchor=X;exports.MenuArrow=ve;exports.MenuCheckboxItem=ie;exports.MenuContent=se;exports.MenuGroup=W;exports.MenuItem=K;exports.MenuItemIndicator=pe;exports.MenuLabel=ue;exports.MenuPortal=re;exports.MenuRadioGroup=le;exports.MenuRadioItem=de;exports.MenuSeparator=me;exports.MenuSub=Ce;exports.MenuSubContent=xe;exports.MenuSubTrigger=he;exports.Portal=Dn;exports.RadioGroup=Hn;exports.RadioItem=qn;exports.Root=jn;exports.Separator=$n;exports.Sub=Vn;exports.SubContent=Xn;exports.SubTrigger=Yn;exports.createMenuScope=fn;
2
2
  //# sourceMappingURL=index.cjs.map