@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,90 @@
1
+ import * as React from "react";
2
+ import { composeRefs } from "../../../../../react-compose-refs/dist/index.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function createSlot(ownerName) {
6
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
7
+ const Slot2 = React.forwardRef((props, forwardedRef) => {
8
+ const { children, ...slotProps } = props;
9
+ const childrenArray = React.Children.toArray(children);
10
+ const slottable = childrenArray.find(isSlottable);
11
+ if (slottable) {
12
+ const newElement = slottable.props.children;
13
+ const newChildren = childrenArray.map((child) => {
14
+ if (child === slottable) {
15
+ if (React.Children.count(newElement) > 1) return React.Children.only(null);
16
+ return React.isValidElement(newElement) ? newElement.props.children : null;
17
+ } else {
18
+ return child;
19
+ }
20
+ });
21
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
22
+ }
23
+ return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
24
+ });
25
+ Slot2.displayName = `${ownerName}.Slot`;
26
+ return Slot2;
27
+ }
28
+ // @__NO_SIDE_EFFECTS__
29
+ function createSlotClone(ownerName) {
30
+ const SlotClone = React.forwardRef((props, forwardedRef) => {
31
+ const { children, ...slotProps } = props;
32
+ if (React.isValidElement(children)) {
33
+ const childrenRef = getElementRef(children);
34
+ const props2 = mergeProps(slotProps, children.props);
35
+ if (children.type !== React.Fragment) {
36
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
37
+ }
38
+ return React.cloneElement(children, props2);
39
+ }
40
+ return React.Children.count(children) > 1 ? React.Children.only(null) : null;
41
+ });
42
+ SlotClone.displayName = `${ownerName}.SlotClone`;
43
+ return SlotClone;
44
+ }
45
+ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
46
+ function isSlottable(child) {
47
+ return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
48
+ }
49
+ function mergeProps(slotProps, childProps) {
50
+ const overrideProps = { ...childProps };
51
+ for (const propName in childProps) {
52
+ const slotPropValue = slotProps[propName];
53
+ const childPropValue = childProps[propName];
54
+ const isHandler = /^on[A-Z]/.test(propName);
55
+ if (isHandler) {
56
+ if (slotPropValue && childPropValue) {
57
+ overrideProps[propName] = (...args) => {
58
+ const result = childPropValue(...args);
59
+ slotPropValue(...args);
60
+ return result;
61
+ };
62
+ } else if (slotPropValue) {
63
+ overrideProps[propName] = slotPropValue;
64
+ }
65
+ } else if (propName === "style") {
66
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
67
+ } else if (propName === "className") {
68
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
69
+ }
70
+ }
71
+ return { ...slotProps, ...overrideProps };
72
+ }
73
+ function getElementRef(element) {
74
+ var _a, _b;
75
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
76
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
77
+ if (mayWarn) {
78
+ return element.ref;
79
+ }
80
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
81
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
82
+ if (mayWarn) {
83
+ return element.props.ref;
84
+ }
85
+ return element.props.ref || element.ref;
86
+ }
87
+ export {
88
+ createSlot
89
+ };
90
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;AAKA,SAAS,WAAW,WAAW;AAC7B,QAAM,YAA4B,gCAAgB,SAAS;AAC3D,QAAM,QAAQ,MAAM,WAAW,CAAC,OAAO,iBAAiB;AACtD,UAAM,EAAE,UAAU,GAAG,UAAS,IAAK;AACnC,UAAM,gBAAgB,MAAM,SAAS,QAAQ,QAAQ;AACrD,UAAM,YAAY,cAAc,KAAK,WAAW;AAChD,QAAI,WAAW;AACb,YAAM,aAAa,UAAU,MAAM;AACnC,YAAM,cAAc,cAAc,IAAI,CAAC,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,GAAG,WAAU;AACrC,aAAW,YAAY,YAAY;AACjC,UAAM,gBAAgB,UAAU,QAAQ;AACxC,UAAM,iBAAiB,WAAW,QAAQ;AAC1C,UAAM,YAAY,WAAW,KAAK,QAAQ;AAC1C,QAAI,WAAW;AACb,UAAI,iBAAiB,gBAAgB;AACnC,sBAAc,QAAQ,IAAI,IAAI,SAAS;AACrC,gBAAM,SAAS,eAAe,GAAG,IAAI;AACrC,wBAAc,GAAG,IAAI;AACrB,iBAAO;AAAA,QACT;AAAA,MACF,WAAW,eAAe;AACxB,sBAAc,QAAQ,IAAI;AAAA,MAC5B;AAAA,IACF,WAAW,aAAa,SAAS;AAC/B,oBAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAc;AAAA,IACjE,WAAW,aAAa,aAAa;AACnC,oBAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,IACpF;AAAA,EACF;AACA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAa;AACzC;AACA,SAAS,cAAc,SAAS;;AAC9B,MAAI,UAAS,YAAO,yBAAyB,QAAQ,OAAO,KAAK,MAApD,mBAAuD;AACpE,MAAI,UAAU,UAAU,oBAAoB,UAAU,OAAO;AAC7D,MAAI,SAAS;AACX,WAAO,QAAQ;AAAA,EACjB;AACA,YAAS,YAAO,yBAAyB,SAAS,KAAK,MAA9C,mBAAiD;AAC1D,YAAU,UAAU,oBAAoB,UAAU,OAAO;AACzD,MAAI,SAAS;AACX,WAAO,QAAQ,MAAM;AAAA,EACvB;AACA,SAAO,QAAQ,MAAM,OAAO,QAAQ;AACtC;","x_google_ignoreList":[0]}
@@ -0,0 +1,294 @@
1
+ import * as React from "react";
2
+ import { useFloating, offset, shift, flip, size, arrow, hide, limitShift } from "../../../@floating-ui/react-dom/dist/floating-ui.react-dom.js";
3
+ import { Root } from "../../react-arrow/dist/index.js";
4
+ import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
5
+ import { createContextScope } from "../../react-context/dist/index.js";
6
+ import { Primitive } from "../../react-primitive/dist/index.js";
7
+ import { useCallbackRef } from "../../react-use-callback-ref/dist/index.js";
8
+ import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
9
+ import { useSize } from "../../react-use-size/dist/index.js";
10
+ import { jsx } from "react/jsx-runtime";
11
+ import { autoUpdate } from "../../../@floating-ui/dom/dist/floating-ui.dom.js";
12
+ var POPPER_NAME = "Popper";
13
+ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
14
+ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
15
+ var Popper = (props) => {
16
+ const { __scopePopper, children } = props;
17
+ const [anchor, setAnchor] = React.useState(null);
18
+ return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
19
+ };
20
+ Popper.displayName = POPPER_NAME;
21
+ var ANCHOR_NAME = "PopperAnchor";
22
+ var PopperAnchor = React.forwardRef(
23
+ (props, forwardedRef) => {
24
+ const { __scopePopper, virtualRef, ...anchorProps } = props;
25
+ const context = usePopperContext(ANCHOR_NAME, __scopePopper);
26
+ const ref = React.useRef(null);
27
+ const composedRefs = useComposedRefs(forwardedRef, ref);
28
+ const anchorRef = React.useRef(null);
29
+ React.useEffect(() => {
30
+ const previousAnchor = anchorRef.current;
31
+ anchorRef.current = (virtualRef == null ? void 0 : virtualRef.current) || ref.current;
32
+ if (previousAnchor !== anchorRef.current) {
33
+ context.onAnchorChange(anchorRef.current);
34
+ }
35
+ });
36
+ return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
37
+ }
38
+ );
39
+ PopperAnchor.displayName = ANCHOR_NAME;
40
+ var CONTENT_NAME = "PopperContent";
41
+ var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
42
+ var PopperContent = React.forwardRef(
43
+ (props, forwardedRef) => {
44
+ var _a, _b, _c, _d, _e, _f;
45
+ const {
46
+ __scopePopper,
47
+ side = "bottom",
48
+ sideOffset = 0,
49
+ align = "center",
50
+ alignOffset = 0,
51
+ arrowPadding = 0,
52
+ avoidCollisions = true,
53
+ collisionBoundary = [],
54
+ collisionPadding: collisionPaddingProp = 0,
55
+ sticky = "partial",
56
+ hideWhenDetached = false,
57
+ updatePositionStrategy = "optimized",
58
+ onPlaced,
59
+ ...contentProps
60
+ } = props;
61
+ const context = usePopperContext(CONTENT_NAME, __scopePopper);
62
+ const [content, setContent] = React.useState(null);
63
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
64
+ const [arrow$1, setArrow] = React.useState(null);
65
+ const arrowSize = useSize(arrow$1);
66
+ const arrowWidth = (arrowSize == null ? void 0 : arrowSize.width) ?? 0;
67
+ const arrowHeight = (arrowSize == null ? void 0 : arrowSize.height) ?? 0;
68
+ const desiredPlacement = side + (align !== "center" ? "-" + align : "");
69
+ const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
70
+ const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
71
+ const hasExplicitBoundaries = boundary.length > 0;
72
+ const detectOverflowOptions = {
73
+ padding: collisionPadding,
74
+ boundary: boundary.filter(isNotNull),
75
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
76
+ altBoundary: hasExplicitBoundaries
77
+ };
78
+ const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
79
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
80
+ strategy: "fixed",
81
+ placement: desiredPlacement,
82
+ whileElementsMounted: (...args) => {
83
+ const cleanup = autoUpdate(...args, {
84
+ animationFrame: updatePositionStrategy === "always"
85
+ });
86
+ return cleanup;
87
+ },
88
+ elements: {
89
+ reference: context.anchor
90
+ },
91
+ middleware: [
92
+ offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),
93
+ avoidCollisions && shift({
94
+ mainAxis: true,
95
+ crossAxis: false,
96
+ limiter: sticky === "partial" ? limitShift() : void 0,
97
+ ...detectOverflowOptions
98
+ }),
99
+ avoidCollisions && flip({ ...detectOverflowOptions }),
100
+ size({
101
+ ...detectOverflowOptions,
102
+ apply: ({ elements, rects, availableWidth, availableHeight }) => {
103
+ const { width: anchorWidth, height: anchorHeight } = rects.reference;
104
+ const contentStyle = elements.floating.style;
105
+ contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
106
+ contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
107
+ contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
108
+ contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
109
+ }
110
+ }),
111
+ arrow$1 && arrow({ element: arrow$1, padding: arrowPadding }),
112
+ transformOrigin({ arrowWidth, arrowHeight }),
113
+ hideWhenDetached && hide({ strategy: "referenceHidden", ...detectOverflowOptions })
114
+ ]
115
+ });
116
+ const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
117
+ const handlePlaced = useCallbackRef(onPlaced);
118
+ useLayoutEffect2(() => {
119
+ if (isPositioned) {
120
+ handlePlaced == null ? void 0 : handlePlaced();
121
+ }
122
+ }, [isPositioned, handlePlaced]);
123
+ const arrowX = (_a = middlewareData.arrow) == null ? void 0 : _a.x;
124
+ const arrowY = (_b = middlewareData.arrow) == null ? void 0 : _b.y;
125
+ const cannotCenterArrow = ((_c = middlewareData.arrow) == null ? void 0 : _c.centerOffset) !== 0;
126
+ const [contentZIndex, setContentZIndex] = React.useState();
127
+ useLayoutEffect2(() => {
128
+ if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
129
+ }, [content]);
130
+ return /* @__PURE__ */ jsx(
131
+ "div",
132
+ {
133
+ ref: refs.setFloating,
134
+ "data-radix-popper-content-wrapper": "",
135
+ style: {
136
+ ...floatingStyles,
137
+ transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)",
138
+ // keep off the page when measuring
139
+ minWidth: "max-content",
140
+ zIndex: contentZIndex,
141
+ ["--radix-popper-transform-origin"]: [
142
+ (_d = middlewareData.transformOrigin) == null ? void 0 : _d.x,
143
+ (_e = middlewareData.transformOrigin) == null ? void 0 : _e.y
144
+ ].join(" "),
145
+ // hide the content if using the hide middleware and should be hidden
146
+ // set visibility to hidden and disable pointer events so the UI behaves
147
+ // as if the PopperContent isn't there at all
148
+ ...((_f = middlewareData.hide) == null ? void 0 : _f.referenceHidden) && {
149
+ visibility: "hidden",
150
+ pointerEvents: "none"
151
+ }
152
+ },
153
+ dir: props.dir,
154
+ children: /* @__PURE__ */ jsx(
155
+ PopperContentProvider,
156
+ {
157
+ scope: __scopePopper,
158
+ placedSide,
159
+ onArrowChange: setArrow,
160
+ arrowX,
161
+ arrowY,
162
+ shouldHideArrow: cannotCenterArrow,
163
+ children: /* @__PURE__ */ jsx(
164
+ Primitive.div,
165
+ {
166
+ "data-side": placedSide,
167
+ "data-align": placedAlign,
168
+ ...contentProps,
169
+ ref: composedRefs,
170
+ style: {
171
+ ...contentProps.style,
172
+ // if the PopperContent hasn't been placed yet (not all measurements done)
173
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
174
+ animation: !isPositioned ? "none" : void 0
175
+ }
176
+ }
177
+ )
178
+ }
179
+ )
180
+ }
181
+ );
182
+ }
183
+ );
184
+ PopperContent.displayName = CONTENT_NAME;
185
+ var ARROW_NAME = "PopperArrow";
186
+ var OPPOSITE_SIDE = {
187
+ top: "bottom",
188
+ right: "left",
189
+ bottom: "top",
190
+ left: "right"
191
+ };
192
+ var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
193
+ const { __scopePopper, ...arrowProps } = props;
194
+ const contentContext = useContentContext(ARROW_NAME, __scopePopper);
195
+ const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
196
+ return (
197
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
198
+ // doesn't report size as we'd expect on SVG elements.
199
+ // it reports their bounding box which is effectively the largest path inside the SVG.
200
+ /* @__PURE__ */ jsx(
201
+ "span",
202
+ {
203
+ ref: contentContext.onArrowChange,
204
+ style: {
205
+ position: "absolute",
206
+ left: contentContext.arrowX,
207
+ top: contentContext.arrowY,
208
+ [baseSide]: 0,
209
+ transformOrigin: {
210
+ top: "",
211
+ right: "0 0",
212
+ bottom: "center 0",
213
+ left: "100% 0"
214
+ }[contentContext.placedSide],
215
+ transform: {
216
+ top: "translateY(100%)",
217
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
218
+ bottom: `rotate(180deg)`,
219
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
220
+ }[contentContext.placedSide],
221
+ visibility: contentContext.shouldHideArrow ? "hidden" : void 0
222
+ },
223
+ children: /* @__PURE__ */ jsx(
224
+ Root,
225
+ {
226
+ ...arrowProps,
227
+ ref: forwardedRef,
228
+ style: {
229
+ ...arrowProps.style,
230
+ // ensures the element can be measured correctly (mostly for if SVG)
231
+ display: "block"
232
+ }
233
+ }
234
+ )
235
+ }
236
+ )
237
+ );
238
+ });
239
+ PopperArrow.displayName = ARROW_NAME;
240
+ function isNotNull(value) {
241
+ return value !== null;
242
+ }
243
+ var transformOrigin = (options) => ({
244
+ name: "transformOrigin",
245
+ options,
246
+ fn(data) {
247
+ var _a, _b, _c;
248
+ const { placement, rects, middlewareData } = data;
249
+ const cannotCenterArrow = ((_a = middlewareData.arrow) == null ? void 0 : _a.centerOffset) !== 0;
250
+ const isArrowHidden = cannotCenterArrow;
251
+ const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;
252
+ const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;
253
+ const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
254
+ const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
255
+ const arrowXCenter = (((_b = middlewareData.arrow) == null ? void 0 : _b.x) ?? 0) + arrowWidth / 2;
256
+ const arrowYCenter = (((_c = middlewareData.arrow) == null ? void 0 : _c.y) ?? 0) + arrowHeight / 2;
257
+ let x = "";
258
+ let y = "";
259
+ if (placedSide === "bottom") {
260
+ x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
261
+ y = `${-arrowHeight}px`;
262
+ } else if (placedSide === "top") {
263
+ x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
264
+ y = `${rects.floating.height + arrowHeight}px`;
265
+ } else if (placedSide === "right") {
266
+ x = `${-arrowHeight}px`;
267
+ y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
268
+ } else if (placedSide === "left") {
269
+ x = `${rects.floating.width + arrowHeight}px`;
270
+ y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
271
+ }
272
+ return { data: { x, y } };
273
+ }
274
+ });
275
+ function getSideAndAlignFromPlacement(placement) {
276
+ const [side, align = "center"] = placement.split("-");
277
+ return [side, align];
278
+ }
279
+ var Root2 = Popper;
280
+ var Anchor = PopperAnchor;
281
+ var Content = PopperContent;
282
+ var Arrow = PopperArrow;
283
+ export {
284
+ Anchor,
285
+ Arrow,
286
+ Content,
287
+ Popper,
288
+ PopperAnchor,
289
+ PopperArrow,
290
+ PopperContent,
291
+ Root2 as Root,
292
+ createPopperScope
293
+ };
294
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n context.onAnchorChange(anchorRef.current);\n }\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["arrow","floatingUIarrow","useLayoutEffect","ArrowPrimitive.Root"],"mappings":";;;;;;;;;;;AAyBA,IAAI,cAAc;AACf,IAAC,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,WAAW;AAC7E,IAAI,CAAC,gBAAgB,gBAAgB,IAAI,oBAAoB,WAAW;AACrE,IAAC,SAAS,CAAC,UAAU;AACtB,QAAM,EAAE,eAAe,SAAQ,IAAK;AACpC,QAAM,CAAC,QAAQ,SAAS,IAAI,MAAM,SAAS,IAAI;AAC/C,SAAuB,oBAAI,gBAAgB,EAAE,OAAO,eAAe,QAAQ,gBAAgB,WAAW,UAAU;AAClH;AACA,OA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,IACpD,WAAW,eAAe,QAAQ;AAChC,UAAI,GAAG,MAAM,SAAS,QAAQ,WAAW;AACzC,UAAI,gBAAgB,eAAe,GAAG,YAAY;AAAA,IACpD;AACA,WAAO,EAAE,MAAM,EAAE,GAAG,EAAC,EAAE;AAAA,EACzB;AACF;AACA,SAAS,6BAA6B,WAAW;AAC/C,QAAM,CAAC,MAAM,QAAQ,QAAQ,IAAI,UAAU,MAAM,GAAG;AACpD,SAAO,CAAC,MAAM,KAAK;AACrB;AACG,IAAC,QAAQ;AACT,IAAC,SAAS;AACV,IAAC,UAAU;AACX,IAAC,QAAQ;","x_google_ignoreList":[0]}
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import ReactDOM__default from "react-dom";
3
+ import { Primitive } from "../../react-primitive/dist/index.js";
4
+ import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var PORTAL_NAME = "Portal";
7
+ var Portal = React.forwardRef((props, forwardedRef) => {
8
+ var _a;
9
+ const { container: containerProp, ...portalProps } = props;
10
+ const [mounted, setMounted] = React.useState(false);
11
+ useLayoutEffect2(() => setMounted(true), []);
12
+ const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
13
+ return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
14
+ });
15
+ Portal.displayName = PORTAL_NAME;
16
+ export {
17
+ Portal
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect","ReactDOM"],"mappings":";;;;;AAQA,IAAI,cAAc;AACf,IAAC,SAAS,MAAM,WAAW,CAAC,OAAO,iBAAiB;;AACrD,QAAM,EAAE,WAAW,eAAe,GAAG,YAAW,IAAK;AACrD,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM,SAAS,KAAK;AAClDA,mBAAgB,MAAM,WAAW,IAAI,GAAG,CAAA,CAAE;AAC1C,QAAM,YAAY,iBAAiB,aAAW,8CAAY,aAAZ,mBAAsB;AACpE,SAAO,YAAYC,kBAAS,aAA6B,oBAAI,UAAU,KAAK,EAAE,GAAG,aAAa,KAAK,aAAY,CAAE,GAAG,SAAS,IAAI;AACnI,CAAC;AACD,OAAO,cAAc;","x_google_ignoreList":[0]}
@@ -0,0 +1,130 @@
1
+ import * as React from "react";
2
+ import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
3
+ import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
4
+ function useStateMachine(initialState, machine) {
5
+ return React.useReducer((state, event) => {
6
+ const nextState = machine[state][event];
7
+ return nextState ?? state;
8
+ }, initialState);
9
+ }
10
+ var Presence = (props) => {
11
+ const { present, children } = props;
12
+ const presence = usePresence(present);
13
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
14
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
15
+ const forceMount = typeof children === "function";
16
+ return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
17
+ };
18
+ Presence.displayName = "Presence";
19
+ function usePresence(present) {
20
+ const [node, setNode] = React.useState();
21
+ const stylesRef = React.useRef(null);
22
+ const prevPresentRef = React.useRef(present);
23
+ const prevAnimationNameRef = React.useRef("none");
24
+ const initialState = present ? "mounted" : "unmounted";
25
+ const [state, send] = useStateMachine(initialState, {
26
+ mounted: {
27
+ UNMOUNT: "unmounted",
28
+ ANIMATION_OUT: "unmountSuspended"
29
+ },
30
+ unmountSuspended: {
31
+ MOUNT: "mounted",
32
+ ANIMATION_END: "unmounted"
33
+ },
34
+ unmounted: {
35
+ MOUNT: "mounted"
36
+ }
37
+ });
38
+ React.useEffect(() => {
39
+ const currentAnimationName = getAnimationName(stylesRef.current);
40
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
41
+ }, [state]);
42
+ useLayoutEffect2(() => {
43
+ const styles = stylesRef.current;
44
+ const wasPresent = prevPresentRef.current;
45
+ const hasPresentChanged = wasPresent !== present;
46
+ if (hasPresentChanged) {
47
+ const prevAnimationName = prevAnimationNameRef.current;
48
+ const currentAnimationName = getAnimationName(styles);
49
+ if (present) {
50
+ send("MOUNT");
51
+ } else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
52
+ send("UNMOUNT");
53
+ } else {
54
+ const isAnimating = prevAnimationName !== currentAnimationName;
55
+ if (wasPresent && isAnimating) {
56
+ send("ANIMATION_OUT");
57
+ } else {
58
+ send("UNMOUNT");
59
+ }
60
+ }
61
+ prevPresentRef.current = present;
62
+ }
63
+ }, [present, send]);
64
+ useLayoutEffect2(() => {
65
+ if (node) {
66
+ let timeoutId;
67
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
68
+ const handleAnimationEnd = (event) => {
69
+ const currentAnimationName = getAnimationName(stylesRef.current);
70
+ const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
71
+ if (event.target === node && isCurrentAnimation) {
72
+ send("ANIMATION_END");
73
+ if (!prevPresentRef.current) {
74
+ const currentFillMode = node.style.animationFillMode;
75
+ node.style.animationFillMode = "forwards";
76
+ timeoutId = ownerWindow.setTimeout(() => {
77
+ if (node.style.animationFillMode === "forwards") {
78
+ node.style.animationFillMode = currentFillMode;
79
+ }
80
+ });
81
+ }
82
+ }
83
+ };
84
+ const handleAnimationStart = (event) => {
85
+ if (event.target === node) {
86
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
87
+ }
88
+ };
89
+ node.addEventListener("animationstart", handleAnimationStart);
90
+ node.addEventListener("animationcancel", handleAnimationEnd);
91
+ node.addEventListener("animationend", handleAnimationEnd);
92
+ return () => {
93
+ ownerWindow.clearTimeout(timeoutId);
94
+ node.removeEventListener("animationstart", handleAnimationStart);
95
+ node.removeEventListener("animationcancel", handleAnimationEnd);
96
+ node.removeEventListener("animationend", handleAnimationEnd);
97
+ };
98
+ } else {
99
+ send("ANIMATION_END");
100
+ }
101
+ }, [node, send]);
102
+ return {
103
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
104
+ ref: React.useCallback((node2) => {
105
+ stylesRef.current = node2 ? getComputedStyle(node2) : null;
106
+ setNode(node2);
107
+ }, [])
108
+ };
109
+ }
110
+ function getAnimationName(styles) {
111
+ return (styles == null ? void 0 : styles.animationName) || "none";
112
+ }
113
+ function getElementRef(element) {
114
+ var _a, _b;
115
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
116
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
117
+ if (mayWarn) {
118
+ return element.ref;
119
+ }
120
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
121
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
122
+ if (mayWarn) {
123
+ return element.props.ref;
124
+ }
125
+ return element.props.ref || element.ref;
126
+ }
127
+ export {
128
+ Presence
129
+ };
130
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["React2","useLayoutEffect"],"mappings":";;;AASA,SAAS,gBAAgB,cAAc,SAAS;AAC9C,SAAO,MAAM,WAAW,CAAC,OAAO,UAAU;AACxC,UAAM,YAAY,QAAQ,KAAK,EAAE,KAAK;AACtC,WAAO,aAAa;AAAA,EACtB,GAAG,YAAY;AACjB;AAGG,IAAC,WAAW,CAAC,UAAU;AACxB,QAAM,EAAE,SAAS,SAAQ,IAAK;AAC9B,QAAM,WAAW,YAAY,OAAO;AACpC,QAAM,QAAQ,OAAO,aAAa,aAAa,SAAS,EAAE,SAAS,SAAS,UAAS,CAAE,IAAIA,MAAO,SAAS,KAAK,QAAQ;AACxH,QAAM,MAAM,gBAAgB,SAAS,KAAK,cAAc,KAAK,CAAC;AAC9D,QAAM,aAAa,OAAO,aAAa;AACvC,SAAO,cAAc,SAAS,YAAYA,MAAO,aAAa,OAAO,EAAE,IAAG,CAAE,IAAI;AAClF;AACA,SAAS,cAAc;AACvB,SAAS,YAAY,SAAS;AAC5B,QAAM,CAAC,MAAM,OAAO,IAAIA,MAAO,SAAQ;AACvC,QAAM,YAAYA,MAAO,OAAO,IAAI;AACpC,QAAM,iBAAiBA,MAAO,OAAO,OAAO;AAC5C,QAAM,uBAAuBA,MAAO,OAAO,MAAM;AACjD,QAAM,eAAe,UAAU,YAAY;AAC3C,QAAM,CAAC,OAAO,IAAI,IAAI,gBAAgB,cAAc;AAAA,IAClD,SAAS;AAAA,MACP,SAAS;AAAA,MACT,eAAe;AAAA,IACrB;AAAA,IACI,kBAAkB;AAAA,MAChB,OAAO;AAAA,MACP,eAAe;AAAA,IACrB;AAAA,IACI,WAAW;AAAA,MACT,OAAO;AAAA,IACb;AAAA,EACA,CAAG;AACDA,QAAO,UAAU,MAAM;AACrB,UAAM,uBAAuB,iBAAiB,UAAU,OAAO;A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