@automa8e/ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/_virtual/index.js +6 -0
  4. package/dist/_virtual/index.js.map +1 -0
  5. package/dist/_virtual/index2.js +5 -0
  6. package/dist/_virtual/index2.js.map +1 -0
  7. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  8. package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
  9. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  10. package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
  11. package/dist/automa8e-ui.css +226 -0
  12. package/dist/components/automation/metric-card.d.ts +19 -0
  13. package/dist/components/automation/metric-card.d.ts.map +1 -0
  14. package/dist/components/automation/metric-card.js +59 -0
  15. package/dist/components/automation/metric-card.js.map +1 -0
  16. package/dist/components/automation/status-badge.d.ts +27 -0
  17. package/dist/components/automation/status-badge.d.ts.map +1 -0
  18. package/dist/components/automation/status-badge.js +112 -0
  19. package/dist/components/automation/status-badge.js.map +1 -0
  20. package/dist/components/automation/task-card.d.ts +14 -0
  21. package/dist/components/automation/task-card.d.ts.map +1 -0
  22. package/dist/components/automation/task-card.js +114 -0
  23. package/dist/components/automation/task-card.js.map +1 -0
  24. package/dist/components/automation/workflow-node.d.ts +20 -0
  25. package/dist/components/automation/workflow-node.d.ts.map +1 -0
  26. package/dist/components/automation/workflow-node.js +132 -0
  27. package/dist/components/automation/workflow-node.js.map +1 -0
  28. package/dist/components/layout/app-shell.d.ts +21 -0
  29. package/dist/components/layout/app-shell.d.ts.map +1 -0
  30. package/dist/components/layout/app-shell.js +35 -0
  31. package/dist/components/layout/app-shell.js.map +1 -0
  32. package/dist/components/layout/header.d.ts +16 -0
  33. package/dist/components/layout/header.d.ts.map +1 -0
  34. package/dist/components/layout/header.js +30 -0
  35. package/dist/components/layout/header.js.map +1 -0
  36. package/dist/components/layout/page-header.d.ts +16 -0
  37. package/dist/components/layout/page-header.d.ts.map +1 -0
  38. package/dist/components/layout/page-header.js +29 -0
  39. package/dist/components/layout/page-header.js.map +1 -0
  40. package/dist/components/layout/sidebar.d.ts +35 -0
  41. package/dist/components/layout/sidebar.d.ts.map +1 -0
  42. package/dist/components/layout/sidebar.js +103 -0
  43. package/dist/components/layout/sidebar.js.map +1 -0
  44. package/dist/components/ui/accordion.d.ts +8 -0
  45. package/dist/components/ui/accordion.d.ts.map +1 -0
  46. package/dist/components/ui/accordion.js +51 -0
  47. package/dist/components/ui/accordion.js.map +1 -0
  48. package/dist/components/ui/alert.d.ts +18 -0
  49. package/dist/components/ui/alert.d.ts.map +1 -0
  50. package/dist/components/ui/alert.js +89 -0
  51. package/dist/components/ui/alert.js.map +1 -0
  52. package/dist/components/ui/avatar.d.ts +20 -0
  53. package/dist/components/ui/avatar.d.ts.map +1 -0
  54. package/dist/components/ui/avatar.js +72 -0
  55. package/dist/components/ui/avatar.js.map +1 -0
  56. package/dist/components/ui/badge.d.ts +13 -0
  57. package/dist/components/ui/badge.d.ts.map +1 -0
  58. package/dist/components/ui/badge.js +54 -0
  59. package/dist/components/ui/badge.js.map +1 -0
  60. package/dist/components/ui/button.d.ts +15 -0
  61. package/dist/components/ui/button.d.ts.map +1 -0
  62. package/dist/components/ui/button.js +96 -0
  63. package/dist/components/ui/button.js.map +1 -0
  64. package/dist/components/ui/card.d.ts +16 -0
  65. package/dist/components/ui/card.d.ts.map +1 -0
  66. package/dist/components/ui/card.js +96 -0
  67. package/dist/components/ui/card.js.map +1 -0
  68. package/dist/components/ui/checkbox.d.ts +9 -0
  69. package/dist/components/ui/checkbox.d.ts.map +1 -0
  70. package/dist/components/ui/checkbox.js +29 -0
  71. package/dist/components/ui/checkbox.js.map +1 -0
  72. package/dist/components/ui/dialog.d.ts +28 -0
  73. package/dist/components/ui/dialog.d.ts.map +1 -0
  74. package/dist/components/ui/dialog.js +105 -0
  75. package/dist/components/ui/dialog.js.map +1 -0
  76. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  77. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  78. package/dist/components/ui/dropdown-menu.js +160 -0
  79. package/dist/components/ui/dropdown-menu.js.map +1 -0
  80. package/dist/components/ui/input.d.ts +14 -0
  81. package/dist/components/ui/input.d.ts.map +1 -0
  82. package/dist/components/ui/input.js +60 -0
  83. package/dist/components/ui/input.js.map +1 -0
  84. package/dist/components/ui/label.d.ts +13 -0
  85. package/dist/components/ui/label.d.ts.map +1 -0
  86. package/dist/components/ui/label.js +26 -0
  87. package/dist/components/ui/label.js.map +1 -0
  88. package/dist/components/ui/popover.d.ts +8 -0
  89. package/dist/components/ui/popover.d.ts.map +1 -0
  90. package/dist/components/ui/popover.js +29 -0
  91. package/dist/components/ui/popover.js.map +1 -0
  92. package/dist/components/ui/progress.d.ts +17 -0
  93. package/dist/components/ui/progress.d.ts.map +1 -0
  94. package/dist/components/ui/progress.js +80 -0
  95. package/dist/components/ui/progress.js.map +1 -0
  96. package/dist/components/ui/scroll-area.d.ts +6 -0
  97. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  98. package/dist/components/ui/scroll-area.js +39 -0
  99. package/dist/components/ui/scroll-area.js.map +1 -0
  100. package/dist/components/ui/select.d.ts +16 -0
  101. package/dist/components/ui/select.d.ts.map +1 -0
  102. package/dist/components/ui/select.js +131 -0
  103. package/dist/components/ui/select.js.map +1 -0
  104. package/dist/components/ui/separator.d.ts +9 -0
  105. package/dist/components/ui/separator.d.ts.map +1 -0
  106. package/dist/components/ui/separator.js +50 -0
  107. package/dist/components/ui/separator.js.map +1 -0
  108. package/dist/components/ui/skeleton.d.ts +10 -0
  109. package/dist/components/ui/skeleton.d.ts.map +1 -0
  110. package/dist/components/ui/skeleton.js +30 -0
  111. package/dist/components/ui/skeleton.js.map +1 -0
  112. package/dist/components/ui/spinner.d.ts +14 -0
  113. package/dist/components/ui/spinner.d.ts.map +1 -0
  114. package/dist/components/ui/spinner.js +44 -0
  115. package/dist/components/ui/spinner.js.map +1 -0
  116. package/dist/components/ui/switch.d.ts +8 -0
  117. package/dist/components/ui/switch.d.ts.map +1 -0
  118. package/dist/components/ui/switch.js +43 -0
  119. package/dist/components/ui/switch.js.map +1 -0
  120. package/dist/components/ui/table.d.ts +11 -0
  121. package/dist/components/ui/table.d.ts.map +1 -0
  122. package/dist/components/ui/table.js +95 -0
  123. package/dist/components/ui/table.js.map +1 -0
  124. package/dist/components/ui/tabs.d.ts +20 -0
  125. package/dist/components/ui/tabs.d.ts.map +1 -0
  126. package/dist/components/ui/tabs.js +92 -0
  127. package/dist/components/ui/tabs.js.map +1 -0
  128. package/dist/components/ui/textarea.d.ts +12 -0
  129. package/dist/components/ui/textarea.d.ts.map +1 -0
  130. package/dist/components/ui/textarea.js +41 -0
  131. package/dist/components/ui/textarea.js.map +1 -0
  132. package/dist/components/ui/toast.d.ts +16 -0
  133. package/dist/components/ui/toast.d.ts.map +1 -0
  134. package/dist/components/ui/toast.js +113 -0
  135. package/dist/components/ui/toast.js.map +1 -0
  136. package/dist/components/ui/tooltip.d.ts +8 -0
  137. package/dist/components/ui/tooltip.d.ts.map +1 -0
  138. package/dist/components/ui/tooltip.js +28 -0
  139. package/dist/components/ui/tooltip.js.map +1 -0
  140. package/dist/hooks/use-debounce.d.ts +15 -0
  141. package/dist/hooks/use-debounce.d.ts.map +1 -0
  142. package/dist/hooks/use-debounce.js +15 -0
  143. package/dist/hooks/use-debounce.js.map +1 -0
  144. package/dist/hooks/use-local-storage.d.ts +9 -0
  145. package/dist/hooks/use-local-storage.d.ts.map +1 -0
  146. package/dist/hooks/use-local-storage.js +49 -0
  147. package/dist/hooks/use-local-storage.js.map +1 -0
  148. package/dist/hooks/use-media-query.d.ts +9 -0
  149. package/dist/hooks/use-media-query.d.ts.map +1 -0
  150. package/dist/hooks/use-media-query.js +20 -0
  151. package/dist/hooks/use-media-query.js.map +1 -0
  152. package/dist/index.d.ts +66 -0
  153. package/dist/index.d.ts.map +1 -0
  154. package/dist/index.js +153 -0
  155. package/dist/index.js.map +1 -0
  156. package/dist/lib/colors.d.ts +73 -0
  157. package/dist/lib/colors.d.ts.map +1 -0
  158. package/dist/lib/colors.js +64 -0
  159. package/dist/lib/colors.js.map +1 -0
  160. package/dist/lib/utils.d.ts +7 -0
  161. package/dist/lib/utils.d.ts.map +1 -0
  162. package/dist/lib/utils.js +9 -0
  163. package/dist/lib/utils.js.map +1 -0
  164. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +729 -0
  165. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
  166. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +630 -0
  167. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
  168. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +325 -0
  169. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
  170. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +177 -0
  171. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
  172. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +152 -0
  173. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
  174. package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
  175. package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
  176. package/dist/node_modules/@radix-ui/primitive/dist/index.js +12 -0
  177. package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
  178. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +319 -0
  179. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
  180. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
  181. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
  182. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +124 -0
  183. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
  184. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +66 -0
  185. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  186. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
  187. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  188. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +280 -0
  189. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
  190. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +152 -0
  191. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
  192. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +71 -0
  193. package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
  194. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
  195. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  196. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +40 -0
  197. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
  198. package/dist/node_modules/@radix-ui/react-context/dist/index.js +82 -0
  199. package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  200. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +342 -0
  201. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
  202. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
  203. package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  204. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
  205. package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
  206. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +217 -0
  207. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
  208. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +299 -0
  209. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
  210. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +30 -0
  211. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
  212. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +209 -0
  213. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
  214. package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
  215. package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
  216. package/dist/node_modules/@radix-ui/react-label/dist/index.js +27 -0
  217. package/dist/node_modules/@radix-ui/react-label/dist/index.js.map +1 -0
  218. package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
  219. package/dist/node_modules/@radix-ui/react-label/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  220. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +881 -0
  221. package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
  222. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
  223. package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  224. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +314 -0
  225. package/dist/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
  226. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
  227. package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  228. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +294 -0
  229. package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
  230. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +19 -0
  231. package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
  232. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
  233. package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
  234. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +44 -0
  235. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  236. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
  237. package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  238. package/dist/node_modules/@radix-ui/react-progress/dist/index.js +97 -0
  239. package/dist/node_modules/@radix-ui/react-progress/dist/index.js.map +1 -0
  240. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js +66 -0
  241. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  242. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
  243. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  244. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +228 -0
  245. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
  246. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +728 -0
  247. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js.map +1 -0
  248. package/dist/node_modules/@radix-ui/react-select/dist/index.js +1200 -0
  249. package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
  250. package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js +90 -0
  251. package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  252. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +31 -0
  253. package/dist/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -0
  254. package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
  255. package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  256. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +107 -0
  257. package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  258. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +156 -0
  259. package/dist/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
  260. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +195 -0
  261. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
  262. package/dist/node_modules/@radix-ui/react-toast/dist/index.js +645 -0
  263. package/dist/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
  264. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +501 -0
  265. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
  266. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js +16 -0
  267. package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  268. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +15 -0
  269. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
  270. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +72 -0
  271. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
  272. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
  273. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
  274. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
  275. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
  276. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  277. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
  278. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
  279. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
  280. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
  281. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
  282. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +37 -0
  283. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
  284. package/dist/node_modules/aria-hidden/dist/es2015/index.js +123 -0
  285. package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
  286. package/dist/node_modules/class-variance-authority/dist/index.js +46 -0
  287. package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
  288. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  289. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  290. package/dist/node_modules/get-nonce/dist/es2015/index.js +10 -0
  291. package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
  292. package/dist/node_modules/lucide-react/dist/esm/Icon.js +43 -0
  293. package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
  294. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +25 -0
  295. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
  296. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +21 -0
  297. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
  298. package/dist/node_modules/lucide-react/dist/esm/icons/ban.js +15 -0
  299. package/dist/node_modules/lucide-react/dist/esm/icons/ban.js.map +1 -0
  300. package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js +17 -0
  301. package/dist/node_modules/lucide-react/dist/esm/icons/calendar.js.map +1 -0
  302. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +12 -0
  303. package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
  304. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
  305. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js.map +1 -0
  306. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +14 -0
  307. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js.map +1 -0
  308. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +14 -0
  309. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
  310. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +12 -0
  311. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js.map +1 -0
  312. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +16 -0
  313. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js.map +1 -0
  314. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +15 -0
  315. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js.map +1 -0
  316. package/dist/node_modules/lucide-react/dist/esm/icons/circle-minus.js +15 -0
  317. package/dist/node_modules/lucide-react/dist/esm/icons/circle-minus.js.map +1 -0
  318. package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js +16 -0
  319. package/dist/node_modules/lucide-react/dist/esm/icons/circle-x.js.map +1 -0
  320. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +14 -0
  321. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
  322. package/dist/node_modules/lucide-react/dist/esm/icons/clock.js +15 -0
  323. package/dist/node_modules/lucide-react/dist/esm/icons/clock.js.map +1 -0
  324. package/dist/node_modules/lucide-react/dist/esm/icons/flag.js +15 -0
  325. package/dist/node_modules/lucide-react/dist/esm/icons/flag.js.map +1 -0
  326. package/dist/node_modules/lucide-react/dist/esm/icons/git-branch.js +17 -0
  327. package/dist/node_modules/lucide-react/dist/esm/icons/git-branch.js.map +1 -0
  328. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +16 -0
  329. package/dist/node_modules/lucide-react/dist/esm/icons/info.js.map +1 -0
  330. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +14 -0
  331. package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js.map +1 -0
  332. package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +12 -0
  333. package/dist/node_modules/lucide-react/dist/esm/icons/minus.js.map +1 -0
  334. package/dist/node_modules/lucide-react/dist/esm/icons/pause.js +15 -0
  335. package/dist/node_modules/lucide-react/dist/esm/icons/pause.js.map +1 -0
  336. package/dist/node_modules/lucide-react/dist/esm/icons/play.js +14 -0
  337. package/dist/node_modules/lucide-react/dist/esm/icons/play.js.map +1 -0
  338. package/dist/node_modules/lucide-react/dist/esm/icons/send.js +21 -0
  339. package/dist/node_modules/lucide-react/dist/esm/icons/send.js.map +1 -0
  340. package/dist/node_modules/lucide-react/dist/esm/icons/tag.js +21 -0
  341. package/dist/node_modules/lucide-react/dist/esm/icons/tag.js.map +1 -0
  342. package/dist/node_modules/lucide-react/dist/esm/icons/timer.js +16 -0
  343. package/dist/node_modules/lucide-react/dist/esm/icons/timer.js.map +1 -0
  344. package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js +15 -0
  345. package/dist/node_modules/lucide-react/dist/esm/icons/trending-down.js.map +1 -0
  346. package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js +15 -0
  347. package/dist/node_modules/lucide-react/dist/esm/icons/trending-up.js.map +1 -0
  348. package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +22 -0
  349. package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js.map +1 -0
  350. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +15 -0
  351. package/dist/node_modules/lucide-react/dist/esm/icons/x.js.map +1 -0
  352. package/dist/node_modules/lucide-react/dist/esm/icons/zap.js +20 -0
  353. package/dist/node_modules/lucide-react/dist/esm/icons/zap.js.map +1 -0
  354. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +15 -0
  355. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
  356. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
  357. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
  358. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +181 -0
  359. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
  360. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
  361. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
  362. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +20 -0
  363. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
  364. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +103 -0
  365. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
  366. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
  367. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
  368. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
  369. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
  370. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +48 -0
  371. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
  372. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
  373. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
  374. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +38 -0
  375. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
  376. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +14 -0
  377. package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
  378. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +17 -0
  379. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
  380. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +49 -0
  381. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
  382. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2467 -0
  383. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  384. package/dist/node_modules/tslib/tslib.es6.js +40 -0
  385. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  386. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +12 -0
  387. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
  388. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +36 -0
  389. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
  390. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +30 -0
  391. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
  392. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
  393. package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
  394. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +89 -0
  395. package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
  396. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +78 -0
  397. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
  398. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +63 -0
  399. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
  400. package/dist/node_modules/use-sync-external-store/shim/index.js +18 -0
  401. package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
  402. package/dist/types/automation.d.ts +59 -0
  403. package/dist/types/automation.d.ts.map +1 -0
  404. package/dist/types/common.d.ts +38 -0
  405. package/dist/types/common.d.ts.map +1 -0
  406. package/package.json +119 -0
  407. package/registry/registry.json +218 -0
  408. package/src/components/automation/metric-card.tsx +113 -0
  409. package/src/components/automation/status-badge.tsx +136 -0
  410. package/src/components/automation/task-card.tsx +164 -0
  411. package/src/components/automation/workflow-node.tsx +186 -0
  412. package/src/components/layout/app-shell.tsx +58 -0
  413. package/src/components/layout/header.tsx +39 -0
  414. package/src/components/layout/page-header.tsx +42 -0
  415. package/src/components/layout/sidebar.tsx +190 -0
  416. package/src/components/ui/accordion.tsx +57 -0
  417. package/src/components/ui/alert.tsx +93 -0
  418. package/src/components/ui/avatar.tsx +94 -0
  419. package/src/components/ui/badge.tsx +69 -0
  420. package/src/components/ui/button.tsx +106 -0
  421. package/src/components/ui/card.tsx +96 -0
  422. package/src/components/ui/checkbox.tsx +40 -0
  423. package/src/components/ui/dialog.tsx +129 -0
  424. package/src/components/ui/dropdown-menu.tsx +194 -0
  425. package/src/components/ui/input.tsx +80 -0
  426. package/src/components/ui/label.tsx +37 -0
  427. package/src/components/ui/popover.tsx +29 -0
  428. package/src/components/ui/progress.tsx +92 -0
  429. package/src/components/ui/scroll-area.tsx +43 -0
  430. package/src/components/ui/select.tsx +157 -0
  431. package/src/components/ui/separator.tsx +56 -0
  432. package/src/components/ui/skeleton.tsx +41 -0
  433. package/src/components/ui/spinner.tsx +50 -0
  434. package/src/components/ui/switch.tsx +46 -0
  435. package/src/components/ui/table.tsx +117 -0
  436. package/src/components/ui/tabs.tsx +107 -0
  437. package/src/components/ui/textarea.tsx +50 -0
  438. package/src/components/ui/toast.tsx +139 -0
  439. package/src/components/ui/tooltip.tsx +28 -0
  440. package/src/hooks/use-debounce.ts +28 -0
  441. package/src/hooks/use-local-storage.ts +63 -0
  442. package/src/hooks/use-media-query.ts +29 -0
  443. package/src/index.ts +197 -0
  444. package/src/lib/colors.ts +102 -0
  445. package/src/lib/utils.ts +10 -0
  446. package/src/styles/globals.css +230 -0
  447. package/src/types/automation.ts +74 -0
  448. package/src/types/common.ts +48 -0
  449. package/tailwind/preset.cjs +98 -0
  450. package/tailwind/preset.css +5 -0
  451. package/tailwind/preset.ts +159 -0
@@ -0,0 +1,217 @@
1
+ import * as React from "react";
2
+ import { composeEventHandlers } from "../../primitive/dist/index.js";
3
+ import { Primitive, dispatchDiscreteCustomEvent } from "../../react-primitive/dist/index.js";
4
+ import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
5
+ import { useCallbackRef } from "../../react-use-callback-ref/dist/index.js";
6
+ import { useEscapeKeydown } from "../../react-use-escape-keydown/dist/index.js";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
9
+ var CONTEXT_UPDATE = "dismissableLayer.update";
10
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
11
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
12
+ var originalBodyPointerEvents;
13
+ var DismissableLayerContext = React.createContext({
14
+ layers: /* @__PURE__ */ new Set(),
15
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
16
+ branches: /* @__PURE__ */ new Set()
17
+ });
18
+ var DismissableLayer = React.forwardRef(
19
+ (props, forwardedRef) => {
20
+ const {
21
+ disableOutsidePointerEvents = false,
22
+ onEscapeKeyDown,
23
+ onPointerDownOutside,
24
+ onFocusOutside,
25
+ onInteractOutside,
26
+ onDismiss,
27
+ ...layerProps
28
+ } = props;
29
+ const context = React.useContext(DismissableLayerContext);
30
+ const [node, setNode] = React.useState(null);
31
+ const ownerDocument = (node == null ? void 0 : node.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document);
32
+ const [, force] = React.useState({});
33
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
34
+ const layers = Array.from(context.layers);
35
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
36
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
37
+ const index = node ? layers.indexOf(node) : -1;
38
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
39
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
40
+ const pointerDownOutside = usePointerDownOutside((event) => {
41
+ const target = event.target;
42
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
43
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
44
+ onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
45
+ onInteractOutside == null ? void 0 : onInteractOutside(event);
46
+ if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
47
+ }, ownerDocument);
48
+ const focusOutside = useFocusOutside((event) => {
49
+ const target = event.target;
50
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
51
+ if (isFocusInBranch) return;
52
+ onFocusOutside == null ? void 0 : onFocusOutside(event);
53
+ onInteractOutside == null ? void 0 : onInteractOutside(event);
54
+ if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
55
+ }, ownerDocument);
56
+ useEscapeKeydown((event) => {
57
+ const isHighestLayer = index === context.layers.size - 1;
58
+ if (!isHighestLayer) return;
59
+ onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
60
+ if (!event.defaultPrevented && onDismiss) {
61
+ event.preventDefault();
62
+ onDismiss();
63
+ }
64
+ }, ownerDocument);
65
+ React.useEffect(() => {
66
+ if (!node) return;
67
+ if (disableOutsidePointerEvents) {
68
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
69
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
70
+ ownerDocument.body.style.pointerEvents = "none";
71
+ }
72
+ context.layersWithOutsidePointerEventsDisabled.add(node);
73
+ }
74
+ context.layers.add(node);
75
+ dispatchUpdate();
76
+ return () => {
77
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
78
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
79
+ }
80
+ };
81
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
82
+ React.useEffect(() => {
83
+ return () => {
84
+ if (!node) return;
85
+ context.layers.delete(node);
86
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
87
+ dispatchUpdate();
88
+ };
89
+ }, [node, context]);
90
+ React.useEffect(() => {
91
+ const handleUpdate = () => force({});
92
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
93
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
94
+ }, []);
95
+ return /* @__PURE__ */ jsx(
96
+ Primitive.div,
97
+ {
98
+ ...layerProps,
99
+ ref: composedRefs,
100
+ style: {
101
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
102
+ ...props.style
103
+ },
104
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
105
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
106
+ onPointerDownCapture: composeEventHandlers(
107
+ props.onPointerDownCapture,
108
+ pointerDownOutside.onPointerDownCapture
109
+ )
110
+ }
111
+ );
112
+ }
113
+ );
114
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
115
+ var BRANCH_NAME = "DismissableLayerBranch";
116
+ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
117
+ const context = React.useContext(DismissableLayerContext);
118
+ const ref = React.useRef(null);
119
+ const composedRefs = useComposedRefs(forwardedRef, ref);
120
+ React.useEffect(() => {
121
+ const node = ref.current;
122
+ if (node) {
123
+ context.branches.add(node);
124
+ return () => {
125
+ context.branches.delete(node);
126
+ };
127
+ }
128
+ }, [context.branches]);
129
+ return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
130
+ });
131
+ DismissableLayerBranch.displayName = BRANCH_NAME;
132
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
133
+ const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
134
+ const isPointerInsideReactTreeRef = React.useRef(false);
135
+ const handleClickRef = React.useRef(() => {
136
+ });
137
+ React.useEffect(() => {
138
+ const handlePointerDown = (event) => {
139
+ if (event.target && !isPointerInsideReactTreeRef.current) {
140
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
141
+ handleAndDispatchCustomEvent(
142
+ POINTER_DOWN_OUTSIDE,
143
+ handlePointerDownOutside,
144
+ eventDetail,
145
+ { discrete: true }
146
+ );
147
+ };
148
+ const eventDetail = { originalEvent: event };
149
+ if (event.pointerType === "touch") {
150
+ ownerDocument.removeEventListener("click", handleClickRef.current);
151
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
152
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
153
+ } else {
154
+ handleAndDispatchPointerDownOutsideEvent2();
155
+ }
156
+ } else {
157
+ ownerDocument.removeEventListener("click", handleClickRef.current);
158
+ }
159
+ isPointerInsideReactTreeRef.current = false;
160
+ };
161
+ const timerId = window.setTimeout(() => {
162
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
163
+ }, 0);
164
+ return () => {
165
+ window.clearTimeout(timerId);
166
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
167
+ ownerDocument.removeEventListener("click", handleClickRef.current);
168
+ };
169
+ }, [ownerDocument, handlePointerDownOutside]);
170
+ return {
171
+ // ensures we check React component tree (not just DOM tree)
172
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
173
+ };
174
+ }
175
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
176
+ const handleFocusOutside = useCallbackRef(onFocusOutside);
177
+ const isFocusInsideReactTreeRef = React.useRef(false);
178
+ React.useEffect(() => {
179
+ const handleFocus = (event) => {
180
+ if (event.target && !isFocusInsideReactTreeRef.current) {
181
+ const eventDetail = { originalEvent: event };
182
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
183
+ discrete: false
184
+ });
185
+ }
186
+ };
187
+ ownerDocument.addEventListener("focusin", handleFocus);
188
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
189
+ }, [ownerDocument, handleFocusOutside]);
190
+ return {
191
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
192
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
193
+ };
194
+ }
195
+ function dispatchUpdate() {
196
+ const event = new CustomEvent(CONTEXT_UPDATE);
197
+ document.dispatchEvent(event);
198
+ }
199
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
200
+ const target = detail.originalEvent.target;
201
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
202
+ if (handler) target.addEventListener(name, handler, { once: true });
203
+ if (discrete) {
204
+ dispatchDiscreteCustomEvent(target, event);
205
+ } else {
206
+ target.dispatchEvent(event);
207
+ }
208
+ }
209
+ var Root = DismissableLayer;
210
+ var Branch = DismissableLayerBranch;
211
+ export {
212
+ Branch,
213
+ DismissableLayer,
214
+ DismissableLayerBranch,
215
+ Root
216
+ };
217
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;AAUA,IAAI,yBAAyB;AAC7B,IAAI,iBAAiB;AACrB,IAAI,uBAAuB;AAC3B,IAAI,gBAAgB;AACpB,IAAI;AACJ,IAAI,0BAA0B,MAAM,cAAc;AAAA,EAChD,QAAwB,oBAAI,IAAG;AAAA,EAC/B,wCAAwD,oBAAI,IAAG;AAAA,EAC/D,UAA0B,oBAAI,IAAG;AACnC,CAAC;AACE,IAAC,mBAAmB,MAAM;AAAA,EAC3B,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ,8BAA8B;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACT,IAAQ;AACJ,UAAM,UAAU,MAAM,WAAW,uBAAuB;AACxD,UAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,IAAI;AAC3C,UAAM,iBAAgB,6BAAM,m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AQ,KAAK;AAAA,EAC3C,OAAO;AACL,WAAO,cAAc,KAAK;AAAA,EAC5B;AACF;AACG,IAAC,OAAO;AACR,IAAC,SAAS;","x_google_ignoreList":[0]}
@@ -0,0 +1,299 @@
1
+ import * as React from "react";
2
+ import { composeEventHandlers } from "../../primitive/dist/index.js";
3
+ import { composeRefs } from "../../react-compose-refs/dist/index.js";
4
+ import { createContextScope } from "../../react-context/dist/index.js";
5
+ import { useControllableState } from "../../react-use-controllable-state/dist/index.js";
6
+ import { Primitive } from "../../react-primitive/dist/index.js";
7
+ import { Root as Root3, Group, Portal, RadioGroup, Sub, Anchor as Anchor2, createMenuScope, CheckboxItem, ItemIndicator, Content as Content2$1, Item as Item2$1, Label, RadioItem, Separator, SubContent, SubTrigger, Arrow as Arrow2 } from "../../react-menu/dist/index.js";
8
+ import { useId } from "../../react-id/dist/index.js";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var DROPDOWN_MENU_NAME = "DropdownMenu";
11
+ var [createDropdownMenuContext] = createContextScope(
12
+ DROPDOWN_MENU_NAME,
13
+ [createMenuScope]
14
+ );
15
+ var useMenuScope = createMenuScope();
16
+ var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
17
+ var DropdownMenu = (props) => {
18
+ const {
19
+ __scopeDropdownMenu,
20
+ children,
21
+ dir,
22
+ open: openProp,
23
+ defaultOpen,
24
+ onOpenChange,
25
+ modal = true
26
+ } = props;
27
+ const menuScope = useMenuScope(__scopeDropdownMenu);
28
+ const triggerRef = React.useRef(null);
29
+ const [open, setOpen] = useControllableState({
30
+ prop: openProp,
31
+ defaultProp: defaultOpen ?? false,
32
+ onChange: onOpenChange,
33
+ caller: DROPDOWN_MENU_NAME
34
+ });
35
+ return /* @__PURE__ */ jsx(
36
+ DropdownMenuProvider,
37
+ {
38
+ scope: __scopeDropdownMenu,
39
+ triggerId: useId(),
40
+ triggerRef,
41
+ contentId: useId(),
42
+ open,
43
+ onOpenChange: setOpen,
44
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
45
+ modal,
46
+ children: /* @__PURE__ */ jsx(Root3, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
47
+ }
48
+ );
49
+ };
50
+ DropdownMenu.displayName = DROPDOWN_MENU_NAME;
51
+ var TRIGGER_NAME = "DropdownMenuTrigger";
52
+ var DropdownMenuTrigger = React.forwardRef(
53
+ (props, forwardedRef) => {
54
+ const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
55
+ const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
56
+ const menuScope = useMenuScope(__scopeDropdownMenu);
57
+ return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
58
+ Primitive.button,
59
+ {
60
+ type: "button",
61
+ id: context.triggerId,
62
+ "aria-haspopup": "menu",
63
+ "aria-expanded": context.open,
64
+ "aria-controls": context.open ? context.contentId : void 0,
65
+ "data-state": context.open ? "open" : "closed",
66
+ "data-disabled": disabled ? "" : void 0,
67
+ disabled,
68
+ ...triggerProps,
69
+ ref: composeRefs(forwardedRef, context.triggerRef),
70
+ onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
71
+ if (!disabled && event.button === 0 && event.ctrlKey === false) {
72
+ context.onOpenToggle();
73
+ if (!context.open) event.preventDefault();
74
+ }
75
+ }),
76
+ onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
77
+ if (disabled) return;
78
+ if (["Enter", " "].includes(event.key)) context.onOpenToggle();
79
+ if (event.key === "ArrowDown") context.onOpenChange(true);
80
+ if (["Enter", " ", "ArrowDown"].includes(event.key)) event.preventDefault();
81
+ })
82
+ }
83
+ ) });
84
+ }
85
+ );
86
+ DropdownMenuTrigger.displayName = TRIGGER_NAME;
87
+ var PORTAL_NAME = "DropdownMenuPortal";
88
+ var DropdownMenuPortal = (props) => {
89
+ const { __scopeDropdownMenu, ...portalProps } = props;
90
+ const menuScope = useMenuScope(__scopeDropdownMenu);
91
+ return /* @__PURE__ */ jsx(Portal, { ...menuScope, ...portalProps });
92
+ };
93
+ DropdownMenuPortal.displayName = PORTAL_NAME;
94
+ var CONTENT_NAME = "DropdownMenuContent";
95
+ var DropdownMenuContent = React.forwardRef(
96
+ (props, forwardedRef) => {
97
+ const { __scopeDropdownMenu, ...contentProps } = props;
98
+ const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
99
+ const menuScope = useMenuScope(__scopeDropdownMenu);
100
+ const hasInteractedOutsideRef = React.useRef(false);
101
+ return /* @__PURE__ */ jsx(
102
+ Content2$1,
103
+ {
104
+ id: context.contentId,
105
+ "aria-labelledby": context.triggerId,
106
+ ...menuScope,
107
+ ...contentProps,
108
+ ref: forwardedRef,
109
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
110
+ var _a;
111
+ if (!hasInteractedOutsideRef.current) (_a = context.triggerRef.current) == null ? void 0 : _a.focus();
112
+ hasInteractedOutsideRef.current = false;
113
+ event.preventDefault();
114
+ }),
115
+ onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {
116
+ const originalEvent = event.detail.originalEvent;
117
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
118
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
119
+ if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;
120
+ }),
121
+ style: {
122
+ ...props.style,
123
+ // re-namespace exposed content custom properties
124
+ ...{
125
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
126
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
127
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
128
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
129
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
130
+ }
131
+ }
132
+ }
133
+ );
134
+ }
135
+ );
136
+ DropdownMenuContent.displayName = CONTENT_NAME;
137
+ var GROUP_NAME = "DropdownMenuGroup";
138
+ var DropdownMenuGroup = React.forwardRef(
139
+ (props, forwardedRef) => {
140
+ const { __scopeDropdownMenu, ...groupProps } = props;
141
+ const menuScope = useMenuScope(__scopeDropdownMenu);
142
+ return /* @__PURE__ */ jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
143
+ }
144
+ );
145
+ DropdownMenuGroup.displayName = GROUP_NAME;
146
+ var LABEL_NAME = "DropdownMenuLabel";
147
+ var DropdownMenuLabel = React.forwardRef(
148
+ (props, forwardedRef) => {
149
+ const { __scopeDropdownMenu, ...labelProps } = props;
150
+ const menuScope = useMenuScope(__scopeDropdownMenu);
151
+ return /* @__PURE__ */ jsx(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
152
+ }
153
+ );
154
+ DropdownMenuLabel.displayName = LABEL_NAME;
155
+ var ITEM_NAME = "DropdownMenuItem";
156
+ var DropdownMenuItem = React.forwardRef(
157
+ (props, forwardedRef) => {
158
+ const { __scopeDropdownMenu, ...itemProps } = props;
159
+ const menuScope = useMenuScope(__scopeDropdownMenu);
160
+ return /* @__PURE__ */ jsx(Item2$1, { ...menuScope, ...itemProps, ref: forwardedRef });
161
+ }
162
+ );
163
+ DropdownMenuItem.displayName = ITEM_NAME;
164
+ var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
165
+ var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {
166
+ const { __scopeDropdownMenu, ...checkboxItemProps } = props;
167
+ const menuScope = useMenuScope(__scopeDropdownMenu);
168
+ return /* @__PURE__ */ jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
169
+ });
170
+ DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
171
+ var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
172
+ var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {
173
+ const { __scopeDropdownMenu, ...radioGroupProps } = props;
174
+ const menuScope = useMenuScope(__scopeDropdownMenu);
175
+ return /* @__PURE__ */ jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
176
+ });
177
+ DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
178
+ var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
179
+ var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {
180
+ const { __scopeDropdownMenu, ...radioItemProps } = props;
181
+ const menuScope = useMenuScope(__scopeDropdownMenu);
182
+ return /* @__PURE__ */ jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
183
+ });
184
+ DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
185
+ var INDICATOR_NAME = "DropdownMenuItemIndicator";
186
+ var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {
187
+ const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
188
+ const menuScope = useMenuScope(__scopeDropdownMenu);
189
+ return /* @__PURE__ */ jsx(ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
190
+ });
191
+ DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
192
+ var SEPARATOR_NAME = "DropdownMenuSeparator";
193
+ var DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {
194
+ const { __scopeDropdownMenu, ...separatorProps } = props;
195
+ const menuScope = useMenuScope(__scopeDropdownMenu);
196
+ return /* @__PURE__ */ jsx(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
197
+ });
198
+ DropdownMenuSeparator.displayName = SEPARATOR_NAME;
199
+ var ARROW_NAME = "DropdownMenuArrow";
200
+ var DropdownMenuArrow = React.forwardRef(
201
+ (props, forwardedRef) => {
202
+ const { __scopeDropdownMenu, ...arrowProps } = props;
203
+ const menuScope = useMenuScope(__scopeDropdownMenu);
204
+ return /* @__PURE__ */ jsx(Arrow2, { ...menuScope, ...arrowProps, ref: forwardedRef });
205
+ }
206
+ );
207
+ DropdownMenuArrow.displayName = ARROW_NAME;
208
+ var DropdownMenuSub = (props) => {
209
+ const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;
210
+ const menuScope = useMenuScope(__scopeDropdownMenu);
211
+ const [open, setOpen] = useControllableState({
212
+ prop: openProp,
213
+ defaultProp: defaultOpen ?? false,
214
+ onChange: onOpenChange,
215
+ caller: "DropdownMenuSub"
216
+ });
217
+ return /* @__PURE__ */ jsx(Sub, { ...menuScope, open, onOpenChange: setOpen, children });
218
+ };
219
+ var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
220
+ var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {
221
+ const { __scopeDropdownMenu, ...subTriggerProps } = props;
222
+ const menuScope = useMenuScope(__scopeDropdownMenu);
223
+ return /* @__PURE__ */ jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
224
+ });
225
+ DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
226
+ var SUB_CONTENT_NAME = "DropdownMenuSubContent";
227
+ var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {
228
+ const { __scopeDropdownMenu, ...subContentProps } = props;
229
+ const menuScope = useMenuScope(__scopeDropdownMenu);
230
+ return /* @__PURE__ */ jsx(
231
+ SubContent,
232
+ {
233
+ ...menuScope,
234
+ ...subContentProps,
235
+ ref: forwardedRef,
236
+ style: {
237
+ ...props.style,
238
+ // re-namespace exposed content custom properties
239
+ ...{
240
+ "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
241
+ "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
242
+ "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
243
+ "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
244
+ "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
245
+ }
246
+ }
247
+ }
248
+ );
249
+ });
250
+ DropdownMenuSubContent.displayName = SUB_CONTENT_NAME;
251
+ var Root2 = DropdownMenu;
252
+ var Trigger = DropdownMenuTrigger;
253
+ var Portal2 = DropdownMenuPortal;
254
+ var Content2 = DropdownMenuContent;
255
+ var Group2 = DropdownMenuGroup;
256
+ var Label2 = DropdownMenuLabel;
257
+ var Item2 = DropdownMenuItem;
258
+ var CheckboxItem2 = DropdownMenuCheckboxItem;
259
+ var RadioGroup2 = DropdownMenuRadioGroup;
260
+ var RadioItem2 = DropdownMenuRadioItem;
261
+ var ItemIndicator2 = DropdownMenuItemIndicator;
262
+ var Separator2 = DropdownMenuSeparator;
263
+ var Sub2 = DropdownMenuSub;
264
+ var SubTrigger2 = DropdownMenuSubTrigger;
265
+ var SubContent2 = DropdownMenuSubContent;
266
+ export {
267
+ CheckboxItem2 as CheckboxItem,
268
+ Content2 as Content,
269
+ DropdownMenu,
270
+ DropdownMenuArrow,
271
+ DropdownMenuCheckboxItem,
272
+ DropdownMenuContent,
273
+ DropdownMenuGroup,
274
+ DropdownMenuItem,
275
+ DropdownMenuItemIndicator,
276
+ DropdownMenuLabel,
277
+ DropdownMenuPortal,
278
+ DropdownMenuRadioGroup,
279
+ DropdownMenuRadioItem,
280
+ DropdownMenuSeparator,
281
+ DropdownMenuSub,
282
+ DropdownMenuSubContent,
283
+ DropdownMenuSubTrigger,
284
+ DropdownMenuTrigger,
285
+ Group2 as Group,
286
+ Item2 as Item,
287
+ ItemIndicator2 as ItemIndicator,
288
+ Label2 as Label,
289
+ Portal2 as Portal,
290
+ RadioGroup2 as RadioGroup,
291
+ RadioItem2 as RadioItem,
292
+ Root2 as Root,
293
+ Separator2 as Separator,
294
+ Sub2 as Sub,
295
+ SubContent2 as SubContent,
296
+ SubTrigger2 as SubTrigger,
297
+ Trigger
298
+ };
299
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// 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, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DROPDOWN_MENU_NAME\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, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: \"DropdownMenuSub\"\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":["MenuPrimitive.Root","MenuPrimitive.Anchor","MenuPrimitive.Portal","MenuPrimitive.Content","MenuPrimitive.Group","MenuPrimitive.Label","MenuPrimitive.Item","MenuPrimitive.CheckboxItem","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.ItemIndicator","MenuPrimitive.Separator","MenuPrimitive.Arrow","MenuPrimitive.Sub","MenuPrimitive.SubTrigger","MenuPrimitive.SubContent"],"mappings":";;;;;;;;;AAaA,IAAI,qBAAqB;AACzB,IAAI,CAAC,yBAAkD,IAAI;AAAA,EACzD;AAAA,EACA,CAAC,eAAe;AAClB;AACA,IAAI,eAAe,gBAAe;AAClC,IAAI,CAAC,sBAAsB,sBAAsB,IAAI,0BAA0B,kBAAkB;AAC9F,IAAC,eAAe,CAAC,UAAU;AAC5B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACZ,IAAM;AACJ,QAAM,YAAY,aAAa,mBAAmB;AAClD,QAAM,aAAa,MAAM,OAAO,IAAI;AACpC,QAAM,CAAC,MAAM,OAAO,IAAI,qBAAqB;AAAA,IAC3C,MAAM;AAAA,IACN,aAAa,eAAe;AAAA,IAC5B,UAAU;AAAA,IACV,QAAQ;AAAA,EACZ,CAAG;AACD,SAAuB;AAAA,IACrB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,WAAW,MAAK;AAAA,MAChB;AAAA,MACA,WAAW,MAAK;AAAA,MAChB;AAAA,MACA,cAAc;AAAA,MACd,cAAc,MAAM,YAAY,MAAM,QAAQ,CAAC,aAAa,CAAC,QAAQ,GAAG,CAAC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;AACd,IAAC,iBAAiB;AAClB,IAAC,aAAa;AAEd,IAAC,OAAO;AACR,IAAC,cAAc;AACf,IAAC,cAAc;","x_google_ignoreList":[0]}
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ var count = 0;
3
+ function useFocusGuards() {
4
+ React.useEffect(() => {
5
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
6
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
7
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
8
+ count++;
9
+ return () => {
10
+ if (count === 1) {
11
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
12
+ }
13
+ count--;
14
+ };
15
+ }, []);
16
+ }
17
+ function createFocusGuard() {
18
+ const element = document.createElement("span");
19
+ element.setAttribute("data-radix-focus-guard", "");
20
+ element.tabIndex = 0;
21
+ element.style.outline = "none";
22
+ element.style.opacity = "0";
23
+ element.style.position = "fixed";
24
+ element.style.pointerEvents = "none";
25
+ return element;
26
+ }
27
+ export {
28
+ useFocusGuards
29
+ };
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";AAIA,IAAI,QAAQ;AAKZ,SAAS,iBAAiB;AACxB,QAAM,UAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,kBAAkB;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,kBAAkB;AACpF;AACA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,QAAQ;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAA,CAAE;AACP;AACA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;","x_google_ignoreList":[0]}