@dudousxd/nestjs-telescope-ui 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/CHANGELOG.md +771 -0
  2. package/README.md +35 -0
  3. package/dist/client/console-url.d.ts +11 -0
  4. package/dist/client/console-url.d.ts.map +1 -0
  5. package/dist/client/console-url.js +21 -0
  6. package/dist/client/console-url.js.map +1 -0
  7. package/dist/client/index.d.ts +3 -2
  8. package/dist/client/index.d.ts.map +1 -1
  9. package/dist/client/index.js +4 -1
  10. package/dist/client/index.js.map +1 -1
  11. package/dist/client/telescope-client.d.ts +82 -11
  12. package/dist/client/telescope-client.d.ts.map +1 -1
  13. package/dist/client/telescope-client.js +101 -54
  14. package/dist/client/telescope-client.js.map +1 -1
  15. package/dist/client/types.d.ts +431 -30
  16. package/dist/client/types.d.ts.map +1 -1
  17. package/dist/react/components/batch-timeline.js +2 -2
  18. package/dist/react/components/batch-timeline.js.map +1 -1
  19. package/dist/react/components/cache-badge.d.ts +14 -6
  20. package/dist/react/components/cache-badge.d.ts.map +1 -1
  21. package/dist/react/components/cache-badge.js +26 -12
  22. package/dist/react/components/cache-badge.js.map +1 -1
  23. package/dist/react/components/charts/area-chart-card.d.ts +11 -3
  24. package/dist/react/components/charts/area-chart-card.d.ts.map +1 -1
  25. package/dist/react/components/charts/area-chart-card.js +33 -6
  26. package/dist/react/components/charts/area-chart-card.js.map +1 -1
  27. package/dist/react/components/charts/bar-chart-card.d.ts +18 -7
  28. package/dist/react/components/charts/bar-chart-card.d.ts.map +1 -1
  29. package/dist/react/components/charts/bar-chart-card.js +18 -9
  30. package/dist/react/components/charts/bar-chart-card.js.map +1 -1
  31. package/dist/react/components/charts/breakdown-card.d.ts +17 -0
  32. package/dist/react/components/charts/breakdown-card.d.ts.map +1 -0
  33. package/dist/react/components/charts/breakdown-card.js +43 -0
  34. package/dist/react/components/charts/breakdown-card.js.map +1 -0
  35. package/dist/react/components/charts/chart-card.d.ts +7 -0
  36. package/dist/react/components/charts/chart-card.d.ts.map +1 -1
  37. package/dist/react/components/charts/chart-card.js +10 -3
  38. package/dist/react/components/charts/chart-card.js.map +1 -1
  39. package/dist/react/components/charts/chart-selection.d.ts +44 -0
  40. package/dist/react/components/charts/chart-selection.d.ts.map +1 -0
  41. package/dist/react/components/charts/chart-selection.js +36 -0
  42. package/dist/react/components/charts/chart-selection.js.map +1 -0
  43. package/dist/react/components/charts/chart-theme.d.ts +62 -19
  44. package/dist/react/components/charts/chart-theme.d.ts.map +1 -1
  45. package/dist/react/components/charts/chart-theme.js +72 -13
  46. package/dist/react/components/charts/chart-theme.js.map +1 -1
  47. package/dist/react/components/charts/distribution-chart-card.d.ts +17 -0
  48. package/dist/react/components/charts/distribution-chart-card.d.ts.map +1 -0
  49. package/dist/react/components/charts/distribution-chart-card.js +46 -0
  50. package/dist/react/components/charts/distribution-chart-card.js.map +1 -0
  51. package/dist/react/components/charts/gauge-card.d.ts +12 -0
  52. package/dist/react/components/charts/gauge-card.d.ts.map +1 -0
  53. package/dist/react/components/charts/gauge-card.js +17 -0
  54. package/dist/react/components/charts/gauge-card.js.map +1 -0
  55. package/dist/react/components/charts/index.d.ts +1 -0
  56. package/dist/react/components/charts/index.d.ts.map +1 -1
  57. package/dist/react/components/charts/index.js +1 -0
  58. package/dist/react/components/charts/index.js.map +1 -1
  59. package/dist/react/components/charts/stacked-area-chart-card.d.ts +17 -3
  60. package/dist/react/components/charts/stacked-area-chart-card.d.ts.map +1 -1
  61. package/dist/react/components/charts/stacked-area-chart-card.js +31 -8
  62. package/dist/react/components/charts/stacked-area-chart-card.js.map +1 -1
  63. package/dist/react/components/entries-table.d.ts.map +1 -1
  64. package/dist/react/components/entries-table.js +17 -3
  65. package/dist/react/components/entries-table.js.map +1 -1
  66. package/dist/react/components/entry-detail.d.ts +2 -0
  67. package/dist/react/components/entry-detail.d.ts.map +1 -1
  68. package/dist/react/components/entry-detail.js +186 -20
  69. package/dist/react/components/entry-detail.js.map +1 -1
  70. package/dist/react/components/entry-insights.d.ts.map +1 -1
  71. package/dist/react/components/entry-insights.js +28 -17
  72. package/dist/react/components/entry-insights.js.map +1 -1
  73. package/dist/react/components/entry-types.d.ts +29 -0
  74. package/dist/react/components/entry-types.d.ts.map +1 -1
  75. package/dist/react/components/entry-types.js +60 -0
  76. package/dist/react/components/entry-types.js.map +1 -1
  77. package/dist/react/components/export-json-toolbar.js +2 -2
  78. package/dist/react/components/export-json-toolbar.js.map +1 -1
  79. package/dist/react/components/extensions/panel-column-menu.d.ts +19 -0
  80. package/dist/react/components/extensions/panel-column-menu.d.ts.map +1 -0
  81. package/dist/react/components/extensions/panel-column-menu.js +47 -0
  82. package/dist/react/components/extensions/panel-column-menu.js.map +1 -0
  83. package/dist/react/components/extensions/panel-renderer.d.ts +46 -0
  84. package/dist/react/components/extensions/panel-renderer.d.ts.map +1 -0
  85. package/dist/react/components/extensions/panel-renderer.js +122 -0
  86. package/dist/react/components/extensions/panel-renderer.js.map +1 -0
  87. package/dist/react/components/extensions/panel-table-header.d.ts +18 -0
  88. package/dist/react/components/extensions/panel-table-header.d.ts.map +1 -0
  89. package/dist/react/components/extensions/panel-table-header.js +82 -0
  90. package/dist/react/components/extensions/panel-table-header.js.map +1 -0
  91. package/dist/react/components/extensions/panel-table.d.ts +27 -0
  92. package/dist/react/components/extensions/panel-table.d.ts.map +1 -0
  93. package/dist/react/components/extensions/panel-table.js +87 -0
  94. package/dist/react/components/extensions/panel-table.js.map +1 -0
  95. package/dist/react/components/extensions/stat-card.d.ts +18 -0
  96. package/dist/react/components/extensions/stat-card.d.ts.map +1 -0
  97. package/dist/react/components/extensions/stat-card.js +44 -0
  98. package/dist/react/components/extensions/stat-card.js.map +1 -0
  99. package/dist/react/components/extensions/table-columns.d.ts +32 -0
  100. package/dist/react/components/extensions/table-columns.d.ts.map +1 -0
  101. package/dist/react/components/extensions/table-columns.js +51 -0
  102. package/dist/react/components/extensions/table-columns.js.map +1 -0
  103. package/dist/react/components/extensions/table-features.d.ts +47 -0
  104. package/dist/react/components/extensions/table-features.d.ts.map +1 -0
  105. package/dist/react/components/extensions/table-features.js +45 -0
  106. package/dist/react/components/extensions/table-features.js.map +1 -0
  107. package/dist/react/components/extensions/table-query.d.ts +53 -0
  108. package/dist/react/components/extensions/table-query.d.ts.map +1 -0
  109. package/dist/react/components/extensions/table-query.js +51 -0
  110. package/dist/react/components/extensions/table-query.js.map +1 -0
  111. package/dist/react/components/flamegraph-view.d.ts +18 -0
  112. package/dist/react/components/flamegraph-view.d.ts.map +1 -0
  113. package/dist/react/components/flamegraph-view.js +48 -0
  114. package/dist/react/components/flamegraph-view.js.map +1 -0
  115. package/dist/react/components/flamegraph.d.ts +34 -0
  116. package/dist/react/components/flamegraph.d.ts.map +1 -0
  117. package/dist/react/components/flamegraph.js +54 -0
  118. package/dist/react/components/flamegraph.js.map +1 -0
  119. package/dist/react/components/inertia-badge.d.ts +33 -0
  120. package/dist/react/components/inertia-badge.d.ts.map +1 -0
  121. package/dist/react/components/inertia-badge.js +72 -0
  122. package/dist/react/components/inertia-badge.js.map +1 -0
  123. package/dist/react/components/inertia-body.d.ts +11 -0
  124. package/dist/react/components/inertia-body.d.ts.map +1 -0
  125. package/dist/react/components/inertia-body.js +127 -0
  126. package/dist/react/components/inertia-body.js.map +1 -0
  127. package/dist/react/components/official-event.d.ts +16 -0
  128. package/dist/react/components/official-event.d.ts.map +1 -0
  129. package/dist/react/components/official-event.js +88 -0
  130. package/dist/react/components/official-event.js.map +1 -0
  131. package/dist/react/components/pulse-panel.d.ts.map +1 -1
  132. package/dist/react/components/pulse-panel.js +6 -6
  133. package/dist/react/components/pulse-panel.js.map +1 -1
  134. package/dist/react/components/queues/EnqueueJobForm.d.ts.map +1 -1
  135. package/dist/react/components/queues/EnqueueJobForm.js +2 -1
  136. package/dist/react/components/queues/EnqueueJobForm.js.map +1 -1
  137. package/dist/react/components/queues/JobActions.d.ts.map +1 -1
  138. package/dist/react/components/queues/JobActions.js +11 -9
  139. package/dist/react/components/queues/JobActions.js.map +1 -1
  140. package/dist/react/components/queues/JobDetailDrawer.d.ts.map +1 -1
  141. package/dist/react/components/queues/JobDetailDrawer.js +8 -13
  142. package/dist/react/components/queues/JobDetailDrawer.js.map +1 -1
  143. package/dist/react/components/queues/JobTable.d.ts.map +1 -1
  144. package/dist/react/components/queues/JobTable.js +0 -0
  145. package/dist/react/components/queues/JobTable.js.map +1 -1
  146. package/dist/react/components/queues/QueueList.d.ts.map +1 -1
  147. package/dist/react/components/queues/QueueList.js +6 -6
  148. package/dist/react/components/queues/QueueList.js.map +1 -1
  149. package/dist/react/components/queues/QueueStateTabs.d.ts.map +1 -1
  150. package/dist/react/components/queues/QueueStateTabs.js +9 -7
  151. package/dist/react/components/queues/QueueStateTabs.js.map +1 -1
  152. package/dist/react/components/queues/queue-format.d.ts +5 -1
  153. package/dist/react/components/queues/queue-format.d.ts.map +1 -1
  154. package/dist/react/components/queues/queue-format.js +11 -7
  155. package/dist/react/components/queues/queue-format.js.map +1 -1
  156. package/dist/react/components/queues-panel.js +1 -1
  157. package/dist/react/components/queues-panel.js.map +1 -1
  158. package/dist/react/components/request-timeline.d.ts.map +1 -1
  159. package/dist/react/components/request-timeline.js +2 -2
  160. package/dist/react/components/request-timeline.js.map +1 -1
  161. package/dist/react/components/retention-indicator.d.ts.map +1 -1
  162. package/dist/react/components/retention-indicator.js +1 -1
  163. package/dist/react/components/retention-indicator.js.map +1 -1
  164. package/dist/react/components/sparkline.d.ts.map +1 -1
  165. package/dist/react/components/sparkline.js +1 -1
  166. package/dist/react/components/sparkline.js.map +1 -1
  167. package/dist/react/components/tag-autocomplete.d.ts +21 -4
  168. package/dist/react/components/tag-autocomplete.d.ts.map +1 -1
  169. package/dist/react/components/tag-autocomplete.js +57 -29
  170. package/dist/react/components/tag-autocomplete.js.map +1 -1
  171. package/dist/react/components/to-csv.d.ts +25 -0
  172. package/dist/react/components/to-csv.d.ts.map +1 -0
  173. package/dist/react/components/to-csv.js +78 -0
  174. package/dist/react/components/to-csv.js.map +1 -0
  175. package/dist/react/components/user-tag.d.ts +15 -0
  176. package/dist/react/components/user-tag.d.ts.map +1 -1
  177. package/dist/react/components/user-tag.js +19 -0
  178. package/dist/react/components/user-tag.js.map +1 -1
  179. package/dist/react/components/waterfall-view.d.ts +13 -0
  180. package/dist/react/components/waterfall-view.d.ts.map +1 -0
  181. package/dist/react/components/waterfall-view.js +58 -0
  182. package/dist/react/components/waterfall-view.js.map +1 -0
  183. package/dist/react/components/window-select.d.ts.map +1 -1
  184. package/dist/react/components/window-select.js +6 -2
  185. package/dist/react/components/window-select.js.map +1 -1
  186. package/dist/react/index.d.ts +7 -1
  187. package/dist/react/index.d.ts.map +1 -1
  188. package/dist/react/index.js +11 -1
  189. package/dist/react/index.js.map +1 -1
  190. package/dist/react/ui/badge.d.ts +16 -0
  191. package/dist/react/ui/badge.d.ts.map +1 -0
  192. package/dist/react/ui/badge.js +28 -0
  193. package/dist/react/ui/badge.js.map +1 -0
  194. package/dist/react/ui/button.d.ts +17 -0
  195. package/dist/react/ui/button.d.ts.map +1 -0
  196. package/dist/react/ui/button.js +35 -0
  197. package/dist/react/ui/button.js.map +1 -0
  198. package/dist/react/ui/chart.d.ts +116 -0
  199. package/dist/react/ui/chart.d.ts.map +1 -0
  200. package/dist/react/ui/chart.js +191 -0
  201. package/dist/react/ui/chart.js.map +1 -0
  202. package/dist/react/ui/cn.d.ts +8 -0
  203. package/dist/react/ui/cn.d.ts.map +1 -0
  204. package/dist/react/ui/cn.js +11 -0
  205. package/dist/react/ui/cn.js.map +1 -0
  206. package/dist/react/ui/dialog.d.ts +26 -0
  207. package/dist/react/ui/dialog.d.ts.map +1 -0
  208. package/dist/react/ui/dialog.js +40 -0
  209. package/dist/react/ui/dialog.js.map +1 -0
  210. package/dist/react/ui/index.d.ts +24 -0
  211. package/dist/react/ui/index.d.ts.map +1 -0
  212. package/dist/react/ui/index.js +24 -0
  213. package/dist/react/ui/index.js.map +1 -0
  214. package/dist/react/ui/input.d.ts +3 -0
  215. package/dist/react/ui/input.d.ts.map +1 -0
  216. package/dist/react/ui/input.js +8 -0
  217. package/dist/react/ui/input.js.map +1 -0
  218. package/dist/react/ui/select.d.ts +20 -0
  219. package/dist/react/ui/select.d.ts.map +1 -0
  220. package/dist/react/ui/select.js +27 -0
  221. package/dist/react/ui/select.js.map +1 -0
  222. package/dist/react/ui/table.d.ts +27 -0
  223. package/dist/react/ui/table.d.ts.map +1 -0
  224. package/dist/react/ui/table.js +22 -0
  225. package/dist/react/ui/table.js.map +1 -0
  226. package/dist/react/ui/tabs.d.ts +12 -0
  227. package/dist/react/ui/tabs.d.ts.map +1 -0
  228. package/dist/react/ui/tabs.js +20 -0
  229. package/dist/react/ui/tabs.js.map +1 -0
  230. package/dist/react/ui/tooltip.d.ts +10 -0
  231. package/dist/react/ui/tooltip.d.ts.map +1 -0
  232. package/dist/react/ui/tooltip.js +12 -0
  233. package/dist/react/ui/tooltip.js.map +1 -0
  234. package/dist/react/use-telescope-queries.d.ts +129 -130
  235. package/dist/react/use-telescope-queries.d.ts.map +1 -1
  236. package/dist/react/use-telescope-queries.js +146 -1
  237. package/dist/react/use-telescope-queries.js.map +1 -1
  238. package/dist/react/use-telescope-stream.d.ts +10 -0
  239. package/dist/react/use-telescope-stream.d.ts.map +1 -0
  240. package/dist/react/use-telescope-stream.js +40 -0
  241. package/dist/react/use-telescope-stream.js.map +1 -0
  242. package/dist/server/index.d.ts +3 -1
  243. package/dist/server/index.d.ts.map +1 -1
  244. package/dist/server/index.js +5 -0
  245. package/dist/server/index.js.map +1 -1
  246. package/dist/server/telescope-ui.controller.d.ts.map +1 -1
  247. package/dist/server/telescope-ui.controller.js +3 -1
  248. package/dist/server/telescope-ui.controller.js.map +1 -1
  249. package/dist/server/telescope-ui.module.d.ts +28 -1
  250. package/dist/server/telescope-ui.module.d.ts.map +1 -1
  251. package/dist/server/telescope-ui.module.js +48 -4
  252. package/dist/server/telescope-ui.module.js.map +1 -1
  253. package/dist/server/telescope-ui.options.d.ts +63 -0
  254. package/dist/server/telescope-ui.options.d.ts.map +1 -1
  255. package/dist/server/telescope-ui.options.js.map +1 -1
  256. package/dist/spa/assets/index-BfyQ_2IN.css +1 -0
  257. package/dist/spa/assets/index-EBJiTdQF.js +159 -0
  258. package/dist/spa/index.html +2 -2
  259. package/package.json +75 -36
  260. package/skills/telescope-ui-dashboard/SKILL.md +203 -0
  261. package/dist/react/components/type-tabs.d.ts +0 -5
  262. package/dist/react/components/type-tabs.d.ts.map +0 -1
  263. package/dist/react/components/type-tabs.js +0 -8
  264. package/dist/react/components/type-tabs.js.map +0 -1
  265. package/dist/spa/assets/index-CCzTpxj3.css +0 -1
  266. package/dist/spa/assets/index-w0XTI5OM.js +0 -135
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from 'class-variance-authority';
3
+ import { forwardRef } from 'react';
4
+ import { cn } from './cn.js';
5
+ /**
6
+ * Vendored shadcn `Button`, retuned to the Aviary tokens.
7
+ *
8
+ * The console's real button vocabulary is small and uniform: bordered, low-key,
9
+ * xs/uppercase. `outline` is the default because that is what every toolbar,
10
+ * header control and row action already looked like; `accent`/`good`/`warn`/
11
+ * `bad` are the tinted states those controls toggle into.
12
+ */
13
+ export const buttonVariants = cva('inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded border font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', {
14
+ variants: {
15
+ variant: {
16
+ outline: 'border-line bg-transparent text-foreground hover:bg-panel-2',
17
+ ghost: 'border-transparent bg-transparent text-muted-foreground hover:bg-panel-2 hover:text-foreground',
18
+ solid: 'border-transparent bg-primary text-primary-foreground hover:opacity-90',
19
+ brand: 'tint-brand hover:brightness-125',
20
+ good: 'tint-good hover:brightness-125',
21
+ warn: 'tint-warn hover:brightness-125',
22
+ bad: 'tint-bad hover:brightness-125',
23
+ },
24
+ size: {
25
+ xs: 'px-2 py-0.5 text-[10px] uppercase tracking-wide',
26
+ sm: 'px-2.5 py-1 text-xs',
27
+ md: 'px-3 py-1.5 text-sm',
28
+ },
29
+ },
30
+ defaultVariants: { variant: 'outline', size: 'sm' },
31
+ });
32
+ export const Button = forwardRef(function Button({ className, variant, size, type = 'button', ...props }, ref) {
33
+ return (_jsx("button", { ref: ref, type: type, className: cn(buttonVariants({ variant, size }), className), ...props }));
34
+ });
35
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/react/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,kPAAkP,EAClP;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,6DAA6D;YACtE,KAAK,EACH,gGAAgG;YAClG,KAAK,EAAE,wEAAwE;YAC/E,KAAK,EAAE,iCAAiC;YACxC,IAAI,EAAE,gCAAgC;YACtC,IAAI,EAAE,gCAAgC;YACtC,GAAG,EAAE,+BAA+B;SACrC;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,iDAAiD;YACrD,EAAE,EAAE,qBAAqB;YACzB,EAAE,EAAE,qBAAqB;SAC1B;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE;CACpD,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAiC,SAAS,MAAM,CAC9E,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,KAAK,EAAE,EACvD,GAAG;IAEH,OAAO,CACL,iBACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KACvD,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,116 @@
1
+ import type { JSX, ReactElement, ReactNode } from 'react';
2
+ import { Legend, Tooltip } from 'recharts';
3
+ /**
4
+ * Vendored shadcn `Chart` layer, retuned to the Aviary tokens.
5
+ *
6
+ * Same shape as the other primitives in this folder: shadcn source adapted to the
7
+ * console palette rather than shadcn's default CSS variables. Two deliberate
8
+ * departures from upstream, both because upstream is solving a problem this
9
+ * console does not have:
10
+ *
11
+ * 1. **No injected `<style>` tag.** shadcn's `ChartStyle` writes a per-chart
12
+ * stylesheet through `dangerouslySetInnerHTML` so a config can carry one
13
+ * colour per theme. Our colours are already tokens (`var(--accent)`) or
14
+ * categorical hexes that mean the same thing in both themes, so the same
15
+ * `--color-<key>` custom properties are set inline on the container. That
16
+ * removes an HTML-injection-shaped API from a component whose config can
17
+ * come from an extension-authored dashboard spec.
18
+ * 2. **Chart chrome is styled by class, not by props.** Grid, axis lines, tick
19
+ * text, brush and radial background are selected off Recharts' own class
20
+ * names on the container, so a card is `ChartContainer` + marks and does not
21
+ * restate six stroke colours. `chart-theme.ts` keeps the *data* colours; this
22
+ * file owns the chrome.
23
+ *
24
+ * INTERNAL, like the rest of `src/react/ui/` — see this folder's `index.ts` for
25
+ * why the barrel is not re-exported from the package's public React surface.
26
+ */
27
+ /** One series' presentation: what to call it and what colour to draw it. */
28
+ export interface ChartSeriesConfig {
29
+ /** Human label shown in the tooltip and legend. Defaults to the series key. */
30
+ label?: ReactNode;
31
+ /** Any CSS colour — an Aviary token (`var(--accent)`) or a categorical hex. */
32
+ color?: string;
33
+ }
34
+ /** Keyed by the series' `dataKey`, exactly as Recharts reports it back. */
35
+ export type ChartConfig = Record<string, ChartSeriesConfig>;
36
+ /**
37
+ * Props for a token-styled `<Brush>`. Exported as a props object rather than a
38
+ * wrapper component on purpose: Recharts finds the brush by scanning its own
39
+ * children for the `Brush` element type, so a wrapper compiles fine and then
40
+ * silently renders nothing. Spread this onto a real `<Brush>`.
41
+ */
42
+ export declare const chartBrushProps: {
43
+ readonly height: 18;
44
+ readonly travellerWidth: 8;
45
+ readonly stroke: "var(--accent)";
46
+ readonly fill: "color-mix(in srgb, var(--panel-2) 80%, transparent)";
47
+ };
48
+ /** Reference a configured series' colour from inside a chart. */
49
+ export declare function chartColorVar(key: string): string;
50
+ /**
51
+ * The framed chart body: publishes the config to tooltip/legend content, exposes
52
+ * each series colour as a `--color-<key>` custom property, and sizes the chart to
53
+ * its parent (the card's fixed-height body).
54
+ */
55
+ export declare function ChartContainer({ config, className, children, }: {
56
+ config: ChartConfig;
57
+ className?: string;
58
+ children: ReactElement;
59
+ }): JSX.Element;
60
+ /** Recharts' own `Tooltip`, re-exported so the element type Recharts scans for is unchanged. */
61
+ export declare const ChartTooltip: typeof Tooltip;
62
+ /** Recharts' own `Legend`, re-exported for the same reason as {@link ChartTooltip}. */
63
+ export declare const ChartLegend: typeof Legend;
64
+ export interface ChartTooltipContentProps {
65
+ /** Injected by Recharts. */
66
+ active?: boolean;
67
+ /** Injected by Recharts: one entry per series under the cursor. */
68
+ payload?: unknown;
69
+ /** Injected by Recharts: the category/x value under the cursor. */
70
+ label?: unknown;
71
+ /** Hide the label row (single-value charts where the label repeats the series). */
72
+ hideLabel?: boolean;
73
+ /** Hide the colour swatch. */
74
+ hideIndicator?: boolean;
75
+ /** Format the label row — e.g. a bucket label into a duration. */
76
+ labelFormatter?: (label: string) => ReactNode;
77
+ /** Format each series value — e.g. a count into `1.2s`. */
78
+ valueFormatter?: (value: number, key: string) => ReactNode;
79
+ className?: string;
80
+ }
81
+ /**
82
+ * The hover card: label row, then one row per series with its colour swatch,
83
+ * configured name and formatted value. Replaces the three `contentStyle` /
84
+ * `labelStyle` / `itemStyle` objects each card used to pass to Recharts, which
85
+ * could only ever produce a single flat line of text.
86
+ */
87
+ export declare function ChartTooltipContent({ active, payload, label, hideLabel, hideIndicator, labelFormatter, valueFormatter, className, }: ChartTooltipContentProps): JSX.Element | null;
88
+ export interface ChartLegendContentProps {
89
+ /** Injected by Recharts: one entry per series. */
90
+ payload?: unknown;
91
+ /** Series keys currently hidden. Rendered dimmed and `aria-pressed={false}`. */
92
+ hidden?: ReadonlySet<string>;
93
+ /**
94
+ * Called with a series key when its legend entry is activated. Presence of this
95
+ * callback is what turns the legend from a caption into controls — without it
96
+ * the entries stay plain text, because a `<button>` that does nothing is worse
97
+ * for a screen reader than a label.
98
+ */
99
+ onToggle?: (key: string) => void;
100
+ className?: string;
101
+ }
102
+ /** Legend row: a colour swatch + the configured label per series, optionally clickable. */
103
+ export declare function ChartLegendContent({ payload, hidden, onToggle, className, }: ChartLegendContentProps): JSX.Element | null;
104
+ /** Hidden-series state for a chart with a clickable legend. */
105
+ export interface SeriesToggle {
106
+ hidden: ReadonlySet<string>;
107
+ toggle: (key: string) => void;
108
+ isHidden: (key: string) => boolean;
109
+ }
110
+ /**
111
+ * Which series a clickable legend has switched off. Kept as component state
112
+ * rather than pushed up to the panel spec: hiding a series is a reading aid for
113
+ * the person at the screen, not a property of the dashboard.
114
+ */
115
+ export declare function useSeriesToggle(): SeriesToggle;
116
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/react/ui/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAuB,OAAO,EAAE,MAAM,UAAU,CAAC;AAIhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;I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AK,EACL,SAAiB,EACjB,aAAqB,EACrB,cAAc,EACd,cAAc,EACd,SAAS,GACV,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA+C/C;AAED,MAAM,WAAW,uBAAuB;IACtC,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2FAA2F;AAC3F,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,GACV,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA8C9C;AAED,+DAA+D;AAC/D,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAW9C"}
@@ -0,0 +1,191 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { createContext, useCallback, useContext, useMemo, useState } from 'react';
3
+ import { Legend, ResponsiveContainer, Tooltip } from 'recharts';
4
+ import { Button } from './button.js';
5
+ import { cn } from './cn.js';
6
+ const ChartContext = createContext(null);
7
+ /**
8
+ * The active chart's config. Recharts renders tooltip/legend content inside the
9
+ * chart's own React subtree, so context reaches them even though they are handed
10
+ * to Recharts as elements rather than rendered by the card directly.
11
+ */
12
+ function useChartConfig() {
13
+ return useContext(ChartContext) ?? {};
14
+ }
15
+ /**
16
+ * Recharts chrome, expressed against the Aviary tokens.
17
+ *
18
+ * These select Recharts' own class names because Recharts paints most chrome as
19
+ * SVG presentation attributes (`stroke="#ccc"`), and a stylesheet rule beats a
20
+ * presentation attribute — which is what lets one class list replace the stroke
21
+ * props every card used to repeat.
22
+ */
23
+ const CHART_CHROME = [
24
+ 'h-full w-full text-[10px]',
25
+ '[&_.recharts-cartesian-grid_line]:stroke-line',
26
+ '[&_.recharts-cartesian-axis-line]:stroke-line',
27
+ '[&_.recharts-cartesian-axis-tick-line]:stroke-line',
28
+ '[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground',
29
+ '[&_.recharts-radial-bar-background-sector]:fill-panel-2',
30
+ '[&_.recharts-reference-line_line]:stroke-line',
31
+ '[&_.recharts-brush-texts_text]:fill-muted-foreground',
32
+ // Clicking a sector/bar leaves a focus ring on a target that is not keyboard
33
+ // focusable; the drill-down affordance is the pointer cursor.
34
+ '[&_.recharts-sector]:outline-none',
35
+ '[&_.recharts-layer]:outline-none',
36
+ '[&_.recharts-surface]:outline-none',
37
+ ].join(' ');
38
+ /**
39
+ * Props for a token-styled `<Brush>`. Exported as a props object rather than a
40
+ * wrapper component on purpose: Recharts finds the brush by scanning its own
41
+ * children for the `Brush` element type, so a wrapper compiles fine and then
42
+ * silently renders nothing. Spread this onto a real `<Brush>`.
43
+ */
44
+ export const chartBrushProps = {
45
+ height: 18,
46
+ travellerWidth: 8,
47
+ // `stroke` colours the travellers and the outline; the accent makes the two
48
+ // drag handles read as the interactive part of an otherwise static chart.
49
+ stroke: 'var(--accent)',
50
+ fill: 'color-mix(in srgb, var(--panel-2) 80%, transparent)',
51
+ };
52
+ function chartCssVars(config) {
53
+ const vars = {};
54
+ for (const [key, series] of Object.entries(config)) {
55
+ if (series.color)
56
+ vars[`--color-${key}`] = series.color;
57
+ }
58
+ return vars;
59
+ }
60
+ /** Reference a configured series' colour from inside a chart. */
61
+ export function chartColorVar(key) {
62
+ return `var(--color-${key})`;
63
+ }
64
+ /**
65
+ * The framed chart body: publishes the config to tooltip/legend content, exposes
66
+ * each series colour as a `--color-<key>` custom property, and sizes the chart to
67
+ * its parent (the card's fixed-height body).
68
+ */
69
+ export function ChartContainer({ config, className, children, }) {
70
+ const style = useMemo(() => chartCssVars(config), [config]);
71
+ return (_jsx(ChartContext.Provider, { value: config, children: _jsx("div", { "data-chart": "", className: cn(CHART_CHROME, className), style: style, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: children }) }) }));
72
+ }
73
+ /** Recharts' own `Tooltip`, re-exported so the element type Recharts scans for is unchanged. */
74
+ export const ChartTooltip = Tooltip;
75
+ /** Recharts' own `Legend`, re-exported for the same reason as {@link ChartTooltip}. */
76
+ export const ChartLegend = Legend;
77
+ function isPayloadItem(value) {
78
+ return typeof value === 'object' && value !== null;
79
+ }
80
+ function payloadItems(payload) {
81
+ return Array.isArray(payload) ? payload.filter(isPayloadItem) : [];
82
+ }
83
+ /** A displayable string, or undefined when the value is not one. */
84
+ function text(value) {
85
+ if (typeof value === 'string')
86
+ return value;
87
+ if (typeof value === 'number' && Number.isFinite(value))
88
+ return String(value);
89
+ return undefined;
90
+ }
91
+ function numeric(value) {
92
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
93
+ }
94
+ /** Nested `payload.payload` is where Recharts keeps the original datum. */
95
+ function datumOf(item) {
96
+ return isPayloadItem(item.payload) ? item.payload : undefined;
97
+ }
98
+ /** The key a payload item is configured under: its `dataKey`, else its `name`. */
99
+ function seriesKey(item) {
100
+ return text(item.dataKey) ?? text(item.name);
101
+ }
102
+ /**
103
+ * The same thing for a LEGEND payload, where `value` holds the series name rather
104
+ * than a number. Pie sectors report only that — no `dataKey`, no `name` — so a
105
+ * legend that reused {@link seriesKey} rendered a donut's entries blank and
106
+ * un-clickable.
107
+ */
108
+ function legendKey(item) {
109
+ return text(item.dataKey) ?? text(item.name) ?? text(item.value);
110
+ }
111
+ /**
112
+ * React key for one tooltip/legend row. The series key is the row's identity;
113
+ * position is the fallback for an entry that has none (a pie sector in a payload
114
+ * Recharts rebuilds wholesale on every hover anyway, so nothing is preserved
115
+ * across renders that reordering could corrupt).
116
+ */
117
+ function rowKey(key, index) {
118
+ return key ?? `series-${index}`;
119
+ }
120
+ function seriesColor(item, key, config) {
121
+ const configured = key ? config[key]?.color : undefined;
122
+ // The datum's own colour comes first: a provider that colours a row (a topN
123
+ // bar, a breakdown segment) means it, and Recharts reports the *series* colour
124
+ // in `color`/`fill` — per-cell fills never reach it, so a donut of five hues
125
+ // would otherwise draw five identical swatches.
126
+ return text(datumOf(item)?.color) ?? configured ?? text(item.color) ?? text(item.fill);
127
+ }
128
+ function seriesLabel(item, key, config) {
129
+ const configured = key ? config[key]?.label : undefined;
130
+ return configured ?? text(item.name) ?? key ?? '';
131
+ }
132
+ /**
133
+ * The hover card: label row, then one row per series with its colour swatch,
134
+ * configured name and formatted value. Replaces the three `contentStyle` /
135
+ * `labelStyle` / `itemStyle` objects each card used to pass to Recharts, which
136
+ * could only ever produce a single flat line of text.
137
+ */
138
+ export function ChartTooltipContent({ active, payload, label, hideLabel = false, hideIndicator = false, labelFormatter, valueFormatter, className, }) {
139
+ const config = useChartConfig();
140
+ const items = payloadItems(payload);
141
+ if (!active || items.length === 0)
142
+ return null;
143
+ const labelText = text(label);
144
+ const labelNode = labelText === undefined ? null : (labelFormatter?.(labelText) ?? labelText);
145
+ return (_jsxs("div", { className: cn('min-w-[8rem] rounded border border-line bg-popover px-2 py-1.5 text-[11px] text-popover-foreground shadow-lg', className), children: [!hideLabel && labelNode !== null && (_jsx("p", { className: "mb-1 text-[10px] uppercase tracking-wide text-muted-foreground", children: labelNode })), _jsx("div", { className: "grid gap-0.5", children: items.map((item, index) => {
146
+ const key = seriesKey(item);
147
+ const value = numeric(item.value);
148
+ const formatted = value !== undefined && valueFormatter
149
+ ? valueFormatter(value, key ?? '')
150
+ : (text(item.value) ?? '—');
151
+ const color = seriesColor(item, key, config);
152
+ return (_jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("span", { className: "flex items-center gap-1.5 text-muted-foreground", children: [!hideIndicator && (_jsx("span", { className: "h-2 w-2 shrink-0 rounded-[2px] border border-line", style: color ? { background: color } : undefined })), seriesLabel(item, key, config)] }), _jsx("span", { className: "font-mono tabular-nums text-foreground", children: formatted })] }, rowKey(key, index)));
153
+ }) })] }));
154
+ }
155
+ /** Legend row: a colour swatch + the configured label per series, optionally clickable. */
156
+ export function ChartLegendContent({ payload, hidden, onToggle, className, }) {
157
+ const config = useChartConfig();
158
+ const items = payloadItems(payload);
159
+ if (items.length === 0)
160
+ return null;
161
+ return (_jsx("div", { className: cn('flex flex-wrap items-center justify-center gap-x-2 gap-y-1', className), children: items.map((item, index) => {
162
+ const key = legendKey(item);
163
+ const isHidden = key !== undefined && hidden?.has(key) === true;
164
+ const color = seriesColor(item, key, config);
165
+ const swatch = (_jsx("span", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: color ? { background: color } : undefined }));
166
+ const label = seriesLabel(item, key, config);
167
+ if (!onToggle || key === undefined) {
168
+ return (_jsxs("span", { className: "flex items-center gap-1.5 px-1 text-[10px] text-muted-foreground", children: [swatch, label] }, rowKey(key, index)));
169
+ }
170
+ return (_jsxs(Button, { variant: "ghost", size: "xs", "aria-pressed": !isHidden, title: isHidden ? `Show ${key}` : `Hide ${key}`, className: cn('gap-1.5 normal-case tracking-normal', isHidden && 'opacity-40'), onClick: () => onToggle(key), children: [swatch, label] }, rowKey(key, index)));
171
+ }) }));
172
+ }
173
+ /**
174
+ * Which series a clickable legend has switched off. Kept as component state
175
+ * rather than pushed up to the panel spec: hiding a series is a reading aid for
176
+ * the person at the screen, not a property of the dashboard.
177
+ */
178
+ export function useSeriesToggle() {
179
+ const [hidden, setHidden] = useState(() => new Set());
180
+ const toggle = useCallback((key) => {
181
+ setHidden((previous) => {
182
+ const next = new Set(previous);
183
+ if (!next.delete(key))
184
+ next.add(key);
185
+ return next;
186
+ });
187
+ }, []);
188
+ const isHidden = useCallback((key) => hidden.has(key), [hidden]);
189
+ return { hidden, toggle, isHidden };
190
+ }
191
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["../../../src/react/ui/chart.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAsC7B,MAAM,YAAY,GAAG,aAAa,CAAqB,IAAI,CAAC,CAAC;AAE7D;;;;GAIG;AACH,SAAS,cAAc;IACrB,OAAO,UAAU,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG;IACnB,2BAA2B;IAC3B,+CAA+C;IAC/C,+CAA+C;IAC/C,oDAAoD;IACpD,8DAA8D;IAC9D,yDAAyD;IACzD,+CAA+C;IAC/C,sDAAsD;IACtD,6EAA6E;IAC7E,8DAA8D;IAC9D,mCAAmC;IACnC,kCAAkC;IAClC,oCAAoC;CACrC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM,EAAE,EAAE;IACV,cAAc,EAAE,CAAC;IACjB,4EAA4E;IAC5E,0EAA0E;IAC1E,MAAM,EAAE,eAAe;IACvB,IAAI,EAAE,qDAAqD;CACnD,CAAC;AASX,SAAS,YAAY,CAAC,MAAmB;IACvC,MAAM,IAAI,GAAiB,EAAE,CAAC;IAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,IAAI,MAAM,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GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAsB,GAAG,EAAE,CAAC,IAAI,GAAG,EAAU,CAAC,CAAC;IACnF,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,GAAW,EAAE,EAAE;QACzC,SAAS,CAAC,CAAC,QAAQ,EAAE,EAAE;YACrB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;gBAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACzE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACtC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * The shadcn class helper: `clsx` for conditional/array/object class values,
4
+ * `tailwind-merge` to make a later conflicting utility win instead of both
5
+ * landing in the class list and losing to source order in the stylesheet.
6
+ */
7
+ export declare function cn(...inputs: ClassValue[]): string;
8
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/react/ui/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
@@ -0,0 +1,11 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ /**
4
+ * The shadcn class helper: `clsx` for conditional/array/object class values,
5
+ * `tailwind-merge` to make a later conflicting utility win instead of both
6
+ * landing in the class list and losing to source order in the stylesheet.
7
+ */
8
+ export function cn(...inputs) {
9
+ return twMerge(clsx(inputs));
10
+ }
11
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","sourceRoot":"","sources":["../../../src/react/ui/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;;;GAIG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
2
+ /**
3
+ * Vendored shadcn `Dialog` on Base UI, retuned to the Aviary tokens.
4
+ *
5
+ * Used uniformly for both modal shapes in this console — the command palette and
6
+ * the queue job drawer — so overlay behaviour (focus trap, scroll lock, Esc,
7
+ * outside-press) is one implementation rather than two hand-rolled ones.
8
+ *
9
+ * Base UI keeps the popup in normal flow with an ordinary `z-index` rather than
10
+ * the browser top layer, so anything that must outrank a modal (a toast, say)
11
+ * still can. See AVIARY-UI.md — this is why it is not a native `<dialog>`.
12
+ */
13
+ export declare const Dialog: <Payload>(props: DialogPrimitive.Root.Props<Payload>) => import("react").JSX.Element;
14
+ export declare const DialogTrigger: DialogPrimitive.Trigger;
15
+ export declare const DialogClose: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/dialog").DialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
16
+ export declare const DialogBackdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
+ /**
18
+ * The popup surface. `placement` covers the two layouts the console needs: a
19
+ * centred command palette and a right-hand drawer.
20
+ */
21
+ export declare const DialogContent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
22
+ placement?: "center" | "top" | "right";
23
+ } & import("react").RefAttributes<HTMLDivElement>>;
24
+ export declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
25
+ export declare const DialogDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/dialog").DialogDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
26
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/react/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIlE;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,MAAM,sFAAuB,CAAC;AAC3C,eAAO,MAAM,aAAa,yBAA0B,CAAC;AACrD,eAAO,MAAM,WAAW,6JAAwB,CAAC;AAEjD,eAAO,MAAM,cAAc,0NAWzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa;gBAGV,QAAQ,GAAG,KAAK,GAAG,OAAO;kDA0BxC,CAAC;AAEH,eAAO,MAAM,WAAW,+NAWtB,CAAC;AAEH,eAAO,MAAM,iBAAiB,yOAW5B,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
3
+ import { forwardRef } from 'react';
4
+ import { cn } from './cn.js';
5
+ /**
6
+ * Vendored shadcn `Dialog` on Base UI, retuned to the Aviary tokens.
7
+ *
8
+ * Used uniformly for both modal shapes in this console — the command palette and
9
+ * the queue job drawer — so overlay behaviour (focus trap, scroll lock, Esc,
10
+ * outside-press) is one implementation rather than two hand-rolled ones.
11
+ *
12
+ * Base UI keeps the popup in normal flow with an ordinary `z-index` rather than
13
+ * the browser top layer, so anything that must outrank a modal (a toast, say)
14
+ * still can. See AVIARY-UI.md — this is why it is not a native `<dialog>`.
15
+ */
16
+ export const Dialog = DialogPrimitive.Root;
17
+ export const DialogTrigger = DialogPrimitive.Trigger;
18
+ export const DialogClose = DialogPrimitive.Close;
19
+ export const DialogBackdrop = forwardRef(function DialogBackdrop({ className, ...props }, ref) {
20
+ return (_jsx(DialogPrimitive.Backdrop, { ref: ref, className: cn('fixed inset-0 z-40 bg-black/60 backdrop-blur-[2px]', className), ...props }));
21
+ });
22
+ /**
23
+ * The popup surface. `placement` covers the two layouts the console needs: a
24
+ * centred command palette and a right-hand drawer.
25
+ */
26
+ export const DialogContent = forwardRef(function DialogContent({ className, placement = 'center', children, ...props }, ref) {
27
+ const placementClass = placement === 'right'
28
+ ? 'inset-y-0 right-0 w-full max-w-xl border-l'
29
+ : placement === 'top'
30
+ ? 'left-1/2 top-[12vh] w-[min(36rem,92vw)] -translate-x-1/2 rounded-lg border'
31
+ : 'left-1/2 top-1/2 w-[min(36rem,92vw)] -translate-x-1/2 -translate-y-1/2 rounded-lg border';
32
+ return (_jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogBackdrop, {}), _jsx(DialogPrimitive.Popup, { ref: ref, className: cn('fixed z-50 border-line bg-panel-2 text-foreground shadow-2xl focus:outline-none font-mono', placementClass, className), ...props, children: children })] }));
33
+ });
34
+ export const DialogTitle = forwardRef(function DialogTitle({ className, ...props }, ref) {
35
+ return (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-sm font-semibold text-foreground', className), ...props }));
36
+ });
37
+ export const DialogDescription = forwardRef(function DialogDescription({ className, ...props }, ref) {
38
+ return (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-xs text-muted-foreground', className), ...props }));
39
+ });
40
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/react/ui/dialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC;AACrD,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAGtC,SAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACpD,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,IACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,oDAAoD,EAAE,SAAS,CAAC,KAC1E,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAKrC,SAAS,aAAa,CAAC,EAAE,SAAS,EAAE,SAAS,GAAG,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACnF,MAAM,cAAc,GAClB,SAAS,KAAK,OAAO;QACnB,CAAC,CAAC,4CAA4C;QAC9C,CAAC,CAAC,SAAS,KAAK,KAAK;YACnB,CAAC,CAAC,4EAA4E;YAC9E,CAAC,CAAC,0FAA0F,CAAC;IAEnG,OAAO,CACL,MAAC,eAAe,CAAC,MAAM,eACrB,KAAC,cAAc,KAAG,EAClB,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,cAAc,EACd,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACa,IACD,CAC1B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAGnC,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACjD,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAC7D,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAGzC,SAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACvD,OAAO,CACL,KAAC,eAAe,CAAC,WAAW,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Vendored shadcn primitives, generated against the Aviary tokens (see
3
+ * `../../app/index.css` and `../../../tailwind.config.ts`).
4
+ *
5
+ * Primitive layer is Base UI — one package, declared explicitly in this
6
+ * package's `package.json`. See ../../../../../AVIARY-UI.md.
7
+ *
8
+ * INTERNAL. This barrel is deliberately NOT re-exported from `src/react/index.ts`:
9
+ * every module a public barrel re-exports is *resolved* by a host's bundler even
10
+ * when nothing imports it, so exporting these would put `@base-ui/react`
11
+ * into the dependency graph of every host that touches the barrel. The guard for
12
+ * that lives in `../console-subpath.spec.ts`.
13
+ */
14
+ export { cn } from './cn.js';
15
+ export { Badge, badgeVariants, type BadgeProps } from './badge.js';
16
+ export { Button, buttonVariants, type ButtonProps } from './button.js';
17
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, chartBrushProps, chartColorVar, useSeriesToggle, type ChartConfig, type ChartLegendContentProps, type ChartSeriesConfig, type ChartTooltipContentProps, type SeriesToggle, } from './chart.js';
18
+ export { Dialog, DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, } from './dialog.js';
19
+ export { Input } from './input.js';
20
+ export { Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectTrigger, SelectValue, } from './select.js';
21
+ export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, type TableProps, } from './table.js';
22
+ export { Tabs, TabsList, TabsPanel, TabsTab } from './tabs.js';
23
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip.js';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,MAAM,EACN,cAAc,EACd,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Vendored shadcn primitives, generated against the Aviary tokens (see
3
+ * `../../app/index.css` and `../../../tailwind.config.ts`).
4
+ *
5
+ * Primitive layer is Base UI — one package, declared explicitly in this
6
+ * package's `package.json`. See ../../../../../AVIARY-UI.md.
7
+ *
8
+ * INTERNAL. This barrel is deliberately NOT re-exported from `src/react/index.ts`:
9
+ * every module a public barrel re-exports is *resolved* by a host's bundler even
10
+ * when nothing imports it, so exporting these would put `@base-ui/react`
11
+ * into the dependency graph of every host that touches the barrel. The guard for
12
+ * that lives in `../console-subpath.spec.ts`.
13
+ */
14
+ export { cn } from './cn.js';
15
+ export { Badge, badgeVariants } from './badge.js';
16
+ export { Button, buttonVariants } from './button.js';
17
+ export { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, chartBrushProps, chartColorVar, useSeriesToggle, } from './chart.js';
18
+ export { Dialog, DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger, } from './dialog.js';
19
+ export { Input } from './input.js';
20
+ export { Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectTrigger, SelectValue, } from './select.js';
21
+ export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from './table.js';
22
+ export { Tabs, TabsList, TabsPanel, TabsTab } from './tabs.js';
23
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip.js';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAmB,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAoB,MAAM,aAAa,CAAC;AACvE,OAAO,EACL,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,eAAe,GAMhB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,MAAM,EACN,cAAc,EACd,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,GAET,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Vendored shadcn `Input`, retuned to the Aviary tokens. */
2
+ export declare const Input: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
3
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/react/ui/input.tsx"],"names":[],"mappings":"AAGA,6DAA6D;AAC7D,eAAO,MAAM,KAAK,oJAajB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { cn } from './cn.js';
4
+ /** Vendored shadcn `Input`, retuned to the Aviary tokens. */
5
+ export const Input = forwardRef(function Input({ className, ...props }, ref) {
6
+ return (_jsx("input", { ref: ref, className: cn('rounded border border-input bg-panel px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
7
+ });
8
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/react/ui/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,6DAA6D;AAC7D,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IACzC,OAAO,CACL,gBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,kOAAkO,EAClO,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Select as SelectPrimitive } from '@base-ui/react/select';
2
+ /**
3
+ * Vendored shadcn `Select` on Base UI, retuned to the Aviary tokens.
4
+ *
5
+ * A native `<select>` draws its popup with the OS, so it cannot be themed and was
6
+ * the one control that broke the console's look in both light and dark. Base UI
7
+ * gives a themable listbox with the keyboard and typeahead behaviour intact.
8
+ */
9
+ export declare const Select: typeof SelectPrimitive.Root;
10
+ export declare const SelectValue: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/select").SelectValueProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
11
+ export declare const SelectGroup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/select").SelectGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
+ export declare const SelectTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/select").SelectTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
13
+ export declare const SelectContent: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/select").SelectPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
14
+ /** Forwarded to `Select.Positioner` — the side the popup opens on. */
15
+ side?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Positioner>["side"];
16
+ align?: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Positioner>["align"];
17
+ } & import("react").RefAttributes<HTMLDivElement>>;
18
+ export declare const SelectItem: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/select").SelectItemProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
19
+ export declare const SelectGroupLabel: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react/select").SelectGroupLabelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
20
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/react/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIlE;;;;;;GAMG;AAEH,eAAO,MAAM,MAAM,6BAAuB,CAAC;AAC3C,eAAO,MAAM,WAAW,2JAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,0JAAwB,CAAC;AAEjD,eAAO,MAAM,aAAa,+NAmBxB,CAAC;AAEH,eAAO,MAAM,aAAa;IAGtB,sEAAsE;WAC/D,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC;YACxE,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;kDAmBpF,CAAC;AAEH,eAAO,MAAM,UAAU,mNAgBrB,CAAC;AAEH,eAAO,MAAM,gBAAgB,4NAc3B,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Select as SelectPrimitive } from '@base-ui/react/select';
3
+ import { forwardRef } from 'react';
4
+ import { cn } from './cn.js';
5
+ /**
6
+ * Vendored shadcn `Select` on Base UI, retuned to the Aviary tokens.
7
+ *
8
+ * A native `<select>` draws its popup with the OS, so it cannot be themed and was
9
+ * the one control that broke the console's look in both light and dark. Base UI
10
+ * gives a themable listbox with the keyboard and typeahead behaviour intact.
11
+ */
12
+ export const Select = SelectPrimitive.Root;
13
+ export const SelectValue = SelectPrimitive.Value;
14
+ export const SelectGroup = SelectPrimitive.Group;
15
+ export const SelectTrigger = forwardRef(function SelectTrigger({ className, children, ...props }, ref) {
16
+ return (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn('inline-flex items-center justify-between gap-1.5 rounded border border-line bg-panel px-2 py-1 text-xs text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50', className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { className: "text-muted-foreground", "aria-hidden": "true", children: "\u25BE" })] }));
17
+ });
18
+ export const SelectContent = forwardRef(function SelectContent({ className, children, side = 'bottom', align = 'start', ...props }, ref) {
19
+ return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, align: align, sideOffset: 4, className: "z-50", children: _jsx(SelectPrimitive.Popup, { ref: ref, className: cn('min-w-[6rem] overflow-hidden rounded border border-line bg-popover p-1 text-popover-foreground shadow-lg font-mono', className), ...props, children: children }) }) }));
20
+ });
21
+ export const SelectItem = forwardRef(function SelectItem({ className, children, ...props }, ref) {
22
+ return (_jsx(SelectPrimitive.Item, { ref: ref, className: cn('relative flex cursor-default select-none items-center rounded-sm px-2 py-1 text-xs text-foreground outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-panel data-[selected]:text-brand', className), ...props, children: _jsx(SelectPrimitive.ItemText, { children: children }) }));
23
+ });
24
+ export const SelectGroupLabel = forwardRef(function SelectGroupLabel({ className, ...props }, ref) {
25
+ return (_jsx(SelectPrimitive.GroupLabel, { ref: ref, className: cn('px-2 py-1 text-[10px] uppercase tracking-wide text-muted-foreground', className), ...props }));
26
+ });
27
+ //# sourceMappingURL=select.js.map