@getloopscale/ui 0.0.0-stage → 0.38.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 (239) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +91 -2
  3. package/dist/base.css +110 -0
  4. package/dist/components/composites/account-menu/account-menu.d.ts +43 -0
  5. package/dist/components/composites/account-menu/index.d.ts +1 -0
  6. package/dist/components/composites/annotation-input/annotation-input.d.ts +38 -0
  7. package/dist/components/composites/annotation-input/index.d.ts +4 -0
  8. package/dist/components/composites/annotation-input/types.d.ts +31 -0
  9. package/dist/components/composites/annotation-summary-group/annotation-summary-group.d.ts +28 -0
  10. package/dist/components/composites/annotation-summary-group/index.d.ts +1 -0
  11. package/dist/components/composites/attributes-table/attributes-table.d.ts +20 -0
  12. package/dist/components/composites/attributes-table/index.d.ts +1 -0
  13. package/dist/components/composites/chat-message-card/chat-message-card.d.ts +14 -0
  14. package/dist/components/composites/chat-message-card/index.d.ts +1 -0
  15. package/dist/components/composites/code-block/code-block.d.ts +29 -0
  16. package/dist/components/composites/code-block/index.d.ts +1 -0
  17. package/dist/components/composites/command-palette/command-palette.d.ts +41 -0
  18. package/dist/components/composites/command-palette/index.d.ts +1 -0
  19. package/dist/components/composites/comment-thread/comment-thread.d.ts +24 -0
  20. package/dist/components/composites/comment-thread/index.d.ts +2 -0
  21. package/dist/components/composites/confirm-dialog/confirm-dialog.d.ts +41 -0
  22. package/dist/components/composites/confirm-dialog/index.d.ts +1 -0
  23. package/dist/components/composites/data-table/compare-values.d.ts +2 -0
  24. package/dist/components/composites/data-table/data-table-loading.d.ts +10 -0
  25. package/dist/components/composites/data-table/data-table-parts.d.ts +16 -0
  26. package/dist/components/composites/data-table/data-table-virtualized.d.ts +32 -0
  27. package/dist/components/composites/data-table/data-table.d.ts +82 -0
  28. package/dist/components/composites/data-table/index.d.ts +2 -0
  29. package/dist/components/composites/data-table/use-data-table-sort.d.ts +19 -0
  30. package/dist/components/composites/dataset-item-diff/dataset-item-diff.d.ts +19 -0
  31. package/dist/components/composites/dataset-item-diff/index.d.ts +4 -0
  32. package/dist/components/composites/dataset-item-diff/to-diff-text.d.ts +22 -0
  33. package/dist/components/composites/deployment-row/deployment-row.d.ts +28 -0
  34. package/dist/components/composites/deployment-row/index.d.ts +1 -0
  35. package/dist/components/composites/diff-view/diff-section.d.ts +19 -0
  36. package/dist/components/composites/diff-view/diff-view.d.ts +39 -0
  37. package/dist/components/composites/diff-view/index.d.ts +2 -0
  38. package/dist/components/composites/domain-config/domain-config.d.ts +34 -0
  39. package/dist/components/composites/domain-config/index.d.ts +1 -0
  40. package/dist/components/composites/env-var-editor/env-var-editor.d.ts +35 -0
  41. package/dist/components/composites/env-var-editor/index.d.ts +1 -0
  42. package/dist/components/composites/evaluator-form/evaluator-form.d.ts +25 -0
  43. package/dist/components/composites/evaluator-form/index.d.ts +3 -0
  44. package/dist/components/composites/evaluator-form/types.d.ts +41 -0
  45. package/dist/components/composites/histogram/histogram.d.ts +19 -0
  46. package/dist/components/composites/histogram/index.d.ts +2 -0
  47. package/dist/components/composites/io-cards/index.d.ts +2 -0
  48. package/dist/components/composites/io-cards/io-cards.d.ts +17 -0
  49. package/dist/components/composites/io-cards/message-card.d.ts +21 -0
  50. package/dist/components/composites/message-branch-selector/index.d.ts +1 -0
  51. package/dist/components/composites/message-branch-selector/message-branch-selector.d.ts +27 -0
  52. package/dist/components/composites/metric-card/index.d.ts +2 -0
  53. package/dist/components/composites/metric-card/metric-card.d.ts +46 -0
  54. package/dist/components/composites/page-shell/index.d.ts +1 -0
  55. package/dist/components/composites/page-shell/page-shell.d.ts +68 -0
  56. package/dist/components/composites/percentile-chart/index.d.ts +2 -0
  57. package/dist/components/composites/percentile-chart/percentile-chart.d.ts +37 -0
  58. package/dist/components/composites/preview-env-card/index.d.ts +1 -0
  59. package/dist/components/composites/preview-env-card/preview-env-card.d.ts +36 -0
  60. package/dist/components/composites/price-breakdown/index.d.ts +2 -0
  61. package/dist/components/composites/price-breakdown/price-breakdown.d.ts +21 -0
  62. package/dist/components/composites/project-card/index.d.ts +1 -0
  63. package/dist/components/composites/project-card/project-card.d.ts +32 -0
  64. package/dist/components/composites/prompt-template-editor/extract-vars.d.ts +1 -0
  65. package/dist/components/composites/prompt-template-editor/index.d.ts +2 -0
  66. package/dist/components/composites/prompt-template-editor/prompt-template-editor.d.ts +24 -0
  67. package/dist/components/composites/prompt-version-diff/index.d.ts +4 -0
  68. package/dist/components/composites/prompt-version-diff/prompt-version-diff.d.ts +20 -0
  69. package/dist/components/composites/prompt-version-diff/to-diff-text.d.ts +26 -0
  70. package/dist/components/composites/rollback-ui/index.d.ts +1 -0
  71. package/dist/components/composites/rollback-ui/rollback-ui.d.ts +32 -0
  72. package/dist/components/composites/session-summary/index.d.ts +1 -0
  73. package/dist/components/composites/session-summary/session-summary.d.ts +18 -0
  74. package/dist/components/composites/session-timeline/index.d.ts +1 -0
  75. package/dist/components/composites/session-timeline/session-timeline.d.ts +22 -0
  76. package/dist/components/composites/severity-badge/index.d.ts +2 -0
  77. package/dist/components/composites/severity-badge/severity-badge.d.ts +33 -0
  78. package/dist/components/composites/span-graph/index.d.ts +1 -0
  79. package/dist/components/composites/span-graph/span-graph.d.ts +19 -0
  80. package/dist/components/composites/span-tree/index.d.ts +2 -0
  81. package/dist/components/composites/span-tree/span-tree-row.d.ts +22 -0
  82. package/dist/components/composites/span-tree/span-tree-virtual.d.ts +7 -0
  83. package/dist/components/composites/span-tree/span-tree.d.ts +34 -0
  84. package/dist/components/composites/span-waterfall/index.d.ts +1 -0
  85. package/dist/components/composites/span-waterfall/span-waterfall.d.ts +28 -0
  86. package/dist/components/composites/status-indicator/index.d.ts +2 -0
  87. package/dist/components/composites/status-indicator/status-indicator.d.ts +31 -0
  88. package/dist/components/composites/stepper/index.d.ts +1 -0
  89. package/dist/components/composites/stepper/stepper.d.ts +53 -0
  90. package/dist/components/composites/tag-input/index.d.ts +2 -0
  91. package/dist/components/composites/tag-input/tag-input.d.ts +32 -0
  92. package/dist/components/composites/task-header/index.d.ts +1 -0
  93. package/dist/components/composites/task-header/task-header.d.ts +20 -0
  94. package/dist/components/composites/token-cost-breakdown/index.d.ts +2 -0
  95. package/dist/components/composites/token-cost-breakdown/token-cost-breakdown.d.ts +26 -0
  96. package/dist/components/composites/trace-compare/index.d.ts +1 -0
  97. package/dist/components/composites/trace-compare/trace-compare.d.ts +27 -0
  98. package/dist/components/composites/trace-transcript/index.d.ts +1 -0
  99. package/dist/components/composites/trace-transcript/trace-transcript.d.ts +26 -0
  100. package/dist/components/composites/trend-chart/index.d.ts +1 -0
  101. package/dist/components/composites/trend-chart/trend-chart.d.ts +117 -0
  102. package/dist/components/primitives/action-bar/action-bar.d.ts +36 -0
  103. package/dist/components/primitives/action-bar/index.d.ts +1 -0
  104. package/dist/components/primitives/alert/alert.d.ts +31 -0
  105. package/dist/components/primitives/alert/index.d.ts +1 -0
  106. package/dist/components/primitives/avatar/avatar.d.ts +26 -0
  107. package/dist/components/primitives/avatar/index.d.ts +1 -0
  108. package/dist/components/primitives/badge/badge.d.ts +33 -0
  109. package/dist/components/primitives/badge/index.d.ts +1 -0
  110. package/dist/components/primitives/breadcrumb/breadcrumb.d.ts +15 -0
  111. package/dist/components/primitives/breadcrumb/index.d.ts +1 -0
  112. package/dist/components/primitives/button/button.d.ts +26 -0
  113. package/dist/components/primitives/button/index.d.ts +1 -0
  114. package/dist/components/primitives/card/card.d.ts +59 -0
  115. package/dist/components/primitives/card/index.d.ts +1 -0
  116. package/dist/components/primitives/checkbox/checkbox.d.ts +20 -0
  117. package/dist/components/primitives/checkbox/index.d.ts +1 -0
  118. package/dist/components/primitives/combobox/combobox.d.ts +53 -0
  119. package/dist/components/primitives/combobox/index.d.ts +1 -0
  120. package/dist/components/primitives/copy-button/copy-button.d.ts +17 -0
  121. package/dist/components/primitives/copy-button/index.d.ts +1 -0
  122. package/dist/components/primitives/danger-zone/danger-zone.d.ts +40 -0
  123. package/dist/components/primitives/danger-zone/index.d.ts +1 -0
  124. package/dist/components/primitives/description-list/description-list.d.ts +33 -0
  125. package/dist/components/primitives/description-list/index.d.ts +1 -0
  126. package/dist/components/primitives/dialog/dialog.d.ts +31 -0
  127. package/dist/components/primitives/dialog/index.d.ts +1 -0
  128. package/dist/components/primitives/dropdown-menu/dropdown-menu.d.ts +68 -0
  129. package/dist/components/primitives/dropdown-menu/index.d.ts +1 -0
  130. package/dist/components/primitives/empty-state/empty-state.d.ts +22 -0
  131. package/dist/components/primitives/empty-state/index.d.ts +1 -0
  132. package/dist/components/primitives/file-dropzone/file-dropzone.d.ts +26 -0
  133. package/dist/components/primitives/file-dropzone/index.d.ts +1 -0
  134. package/dist/components/primitives/file-dropzone/validate.d.ts +40 -0
  135. package/dist/components/primitives/form-field/form-field.d.ts +44 -0
  136. package/dist/components/primitives/form-field/index.d.ts +1 -0
  137. package/dist/components/primitives/input/index.d.ts +1 -0
  138. package/dist/components/primitives/input/input.d.ts +24 -0
  139. package/dist/components/primitives/json-viewer/index.d.ts +1 -0
  140. package/dist/components/primitives/json-viewer/json-viewer.d.ts +32 -0
  141. package/dist/components/primitives/label/index.d.ts +1 -0
  142. package/dist/components/primitives/label/label.d.ts +15 -0
  143. package/dist/components/primitives/login-split/index.d.ts +1 -0
  144. package/dist/components/primitives/login-split/login-split.d.ts +24 -0
  145. package/dist/components/primitives/metrics-panel/index.d.ts +1 -0
  146. package/dist/components/primitives/metrics-panel/metrics-panel.d.ts +62 -0
  147. package/dist/components/primitives/pagination/index.d.ts +1 -0
  148. package/dist/components/primitives/pagination/pagination.d.ts +44 -0
  149. package/dist/components/primitives/pin-input/index.d.ts +1 -0
  150. package/dist/components/primitives/pin-input/pin-input.d.ts +41 -0
  151. package/dist/components/primitives/plan-badge/index.d.ts +1 -0
  152. package/dist/components/primitives/plan-badge/plan-badge.d.ts +35 -0
  153. package/dist/components/primitives/progress/index.d.ts +1 -0
  154. package/dist/components/primitives/progress/progress.d.ts +44 -0
  155. package/dist/components/primitives/radio-group/index.d.ts +1 -0
  156. package/dist/components/primitives/radio-group/radio-group.d.ts +5 -0
  157. package/dist/components/primitives/scroll-area/index.d.ts +2 -0
  158. package/dist/components/primitives/scroll-area/scroll-area.d.ts +40 -0
  159. package/dist/components/primitives/scroll-area/use-stick-to-bottom.d.ts +20 -0
  160. package/dist/components/primitives/select/index.d.ts +1 -0
  161. package/dist/components/primitives/select/select.d.ts +50 -0
  162. package/dist/components/primitives/sheet/index.d.ts +1 -0
  163. package/dist/components/primitives/sheet/sheet.d.ts +33 -0
  164. package/dist/components/primitives/sidebar/index.d.ts +1 -0
  165. package/dist/components/primitives/sidebar/sidebar.d.ts +76 -0
  166. package/dist/components/primitives/skeleton/index.d.ts +1 -0
  167. package/dist/components/primitives/skeleton/skeleton.d.ts +21 -0
  168. package/dist/components/primitives/slider/index.d.ts +1 -0
  169. package/dist/components/primitives/slider/slider.d.ts +24 -0
  170. package/dist/components/primitives/social-auth-row/index.d.ts +1 -0
  171. package/dist/components/primitives/social-auth-row/social-auth-row.d.ts +24 -0
  172. package/dist/components/primitives/stat-tile/index.d.ts +1 -0
  173. package/dist/components/primitives/stat-tile/stat-tile.d.ts +28 -0
  174. package/dist/components/primitives/status-dot/index.d.ts +1 -0
  175. package/dist/components/primitives/status-dot/status-dot.d.ts +31 -0
  176. package/dist/components/primitives/switch/index.d.ts +1 -0
  177. package/dist/components/primitives/switch/switch.d.ts +20 -0
  178. package/dist/components/primitives/table/index.d.ts +1 -0
  179. package/dist/components/primitives/table/table.d.ts +61 -0
  180. package/dist/components/primitives/tabs/index.d.ts +1 -0
  181. package/dist/components/primitives/tabs/tabs.d.ts +7 -0
  182. package/dist/components/primitives/textarea/index.d.ts +1 -0
  183. package/dist/components/primitives/textarea/textarea.d.ts +20 -0
  184. package/dist/components/primitives/timestamp/index.d.ts +1 -0
  185. package/dist/components/primitives/timestamp/timestamp.d.ts +34 -0
  186. package/dist/components/primitives/toast/index.d.ts +2 -0
  187. package/dist/components/primitives/toast/toast.d.ts +34 -0
  188. package/dist/components/primitives/toast/toaster.d.ts +38 -0
  189. package/dist/components/primitives/tooltip/index.d.ts +1 -0
  190. package/dist/components/primitives/tooltip/tooltip.d.ts +33 -0
  191. package/dist/components/primitives/topnav/index.d.ts +1 -0
  192. package/dist/components/primitives/topnav/topnav.d.ts +29 -0
  193. package/dist/components/primitives/update-banner/index.d.ts +1 -0
  194. package/dist/components/primitives/update-banner/update-banner.d.ts +16 -0
  195. package/dist/components.css +2 -0
  196. package/dist/fonts/LICENSE-hanken-grotesk.txt +93 -0
  197. package/dist/fonts/LICENSE-jetbrains-mono.txt +93 -0
  198. package/dist/fonts/hanken-grotesk-latin-ext-wght-normal.woff2 +0 -0
  199. package/dist/fonts/hanken-grotesk-latin-wght-normal.woff2 +0 -0
  200. package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
  201. package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
  202. package/dist/fonts-cdn.css +16 -0
  203. package/dist/fonts.css +59 -0
  204. package/dist/index.d.ts +116 -0
  205. package/dist/index.js +9271 -0
  206. package/dist/lib/chart/histogram.d.ts +21 -0
  207. package/dist/lib/chart/index.d.ts +1 -0
  208. package/dist/lib/cn.d.ts +6 -0
  209. package/dist/lib/diff/diff-lines.d.ts +23 -0
  210. package/dist/lib/diff/index.d.ts +1 -0
  211. package/dist/lib/env.d.ts +55 -0
  212. package/dist/lib/live-region-context.d.ts +2 -0
  213. package/dist/lib/safe-href.d.ts +27 -0
  214. package/dist/lib/session/aggregate.d.ts +18 -0
  215. package/dist/lib/session/index.d.ts +2 -0
  216. package/dist/lib/session/types.d.ts +30 -0
  217. package/dist/lib/trace/align.d.ts +41 -0
  218. package/dist/lib/trace/attributes.d.ts +11 -0
  219. package/dist/lib/trace/bar-layout.d.ts +52 -0
  220. package/dist/lib/trace/chat.d.ts +14 -0
  221. package/dist/lib/trace/cost.d.ts +24 -0
  222. package/dist/lib/trace/duration.d.ts +18 -0
  223. package/dist/lib/trace/flatten.d.ts +28 -0
  224. package/dist/lib/trace/graph-layout.d.ts +52 -0
  225. package/dist/lib/trace/index.d.ts +9 -0
  226. package/dist/lib/trace/types.d.ts +85 -0
  227. package/dist/lib/types.d.ts +10 -0
  228. package/dist/preset.css +13 -0
  229. package/dist/styles/tailwind-preset.d.ts +29 -0
  230. package/dist/styles-v3-legacy.css +85 -0
  231. package/dist/styles.css +23 -0
  232. package/dist/tailwind-preset.js +166 -0
  233. package/dist/test/a11y.d.ts +13 -0
  234. package/dist/test/fixtures/trace.d.ts +19 -0
  235. package/dist/test/setup.d.ts +1 -0
  236. package/dist/tokens-v4.css +222 -0
  237. package/dist/tokens.css +288 -0
  238. package/dist/types/task.d.ts +9 -0
  239. package/package.json +127 -4
@@ -0,0 +1,62 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export interface Metric {
3
+ /**
4
+ * Short label, e.g. "Requests/s", "p95 latency", "Error rate".
5
+ */
6
+ label: string;
7
+ /**
8
+ * Pre-formatted value string, e.g. "1.2k", "182ms", "0.03%".
9
+ * Consumer formats; the component does not parse.
10
+ */
11
+ value: string;
12
+ /**
13
+ * Optional unit suffix appended after value with .9 opacity.
14
+ */
15
+ unit?: string;
16
+ /**
17
+ * Optional change vs comparison period, e.g. "+12%", "-4ms", "+0.01pp".
18
+ */
19
+ delta?: string;
20
+ /**
21
+ * If true, delta is "good" (success color); if false, "bad" (destructive).
22
+ * If omitted, delta is rendered in muted (neutral).
23
+ *
24
+ * Caller decides semantics — "more requests" is good but "more errors" is bad.
25
+ */
26
+ deltaGood?: boolean;
27
+ /**
28
+ * Optional sparkline data, 0..1 normalized. Consumer is responsible for normalization.
29
+ */
30
+ sparkline?: number[];
31
+ /**
32
+ * Optional onClick to drill into the metric.
33
+ */
34
+ onClick?: () => void;
35
+ /**
36
+ * Optional override for the clickable tile's accessible name. When the
37
+ * tile is interactive (`onClick` set), defaults to `View <label> details`.
38
+ * Has no effect when `onClick` is absent (tile is rendered as a non-link
39
+ * `<div>` with no button semantics). T4.3.
40
+ */
41
+ actionLabel?: string;
42
+ }
43
+ interface MetricsPanelProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
44
+ title?: ReactNode;
45
+ description?: ReactNode;
46
+ metrics: Metric[];
47
+ /**
48
+ * Grid columns. Defaults to auto-fit ~180px min.
49
+ */
50
+ columns?: number;
51
+ }
52
+ /**
53
+ * MetricsPanel — grid of metric tiles for observability dashboards.
54
+ *
55
+ * Visual: each tile is a soft surface with a big value (font-display),
56
+ * label uppercase muted, optional delta with arrow icon + tone color,
57
+ * optional CSS-only sparkline drawn as flexed bars.
58
+ *
59
+ * No external chart lib — keeps the registry copy-pasteable.
60
+ */
61
+ declare const MetricsPanel: import("react").ForwardRefExoticComponent<MetricsPanelProps & import("react").RefAttributes<HTMLDivElement>>;
62
+ export { MetricsPanel };
@@ -0,0 +1 @@
1
+ export { Pagination, computePageRange, type PaginationProps, } from "./pagination.js";
@@ -0,0 +1,44 @@
1
+ import type { HTMLAttributes } from "react";
2
+ /**
3
+ * Pagination — accessible page-number navigation primitive.
4
+ *
5
+ * Renders a `<nav aria-label="Pagination">` containing a button group:
6
+ * `[<<] [<] 1 ... 5 6 [7] 8 9 ... 42 [>] [>>]`. The active page carries
7
+ * `aria-current="page"`. Keyboard navigation (ArrowLeft / ArrowRight /
8
+ * Home / End) is wired on the nav. Ellipses are rendered as
9
+ * non-interactive `<span>` elements with `aria-hidden`.
10
+ *
11
+ * Renders nothing when `totalPages <= 1` (the page is the whole list).
12
+ *
13
+ * `siblingCount` controls how many neighbors of the current page are
14
+ * always visible (default 1 → "5 6 [7] 8 9"). `showJumpButtons`
15
+ * toggles the first/last `<<` / `>>` buttons.
16
+ *
17
+ * Consumers control state (`currentPage`) and are responsible for any
18
+ * URL routing — the buttons are `<button>`, not `<a>`.
19
+ *
20
+ * @example
21
+ * <Pagination
22
+ * currentPage={page}
23
+ * totalPages={42}
24
+ * onPageChange={setPage}
25
+ * />
26
+ */
27
+ export interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, "onChange"> {
28
+ currentPage: number;
29
+ totalPages: number;
30
+ onPageChange: (page: number) => void;
31
+ /** Neighbors of current page that stay visible. Default 1. */
32
+ siblingCount?: number;
33
+ /** Render `<<` / `>>` first/last buttons. Default true. */
34
+ showJumpButtons?: boolean;
35
+ /** Size variant. Default md. */
36
+ size?: "sm" | "md";
37
+ }
38
+ /**
39
+ * Pure helper: compute the visible page-range with ellipses.
40
+ * Exported for unit testing — most pagination bugs live here.
41
+ */
42
+ export declare function computePageRange(currentPage: number, totalPages: number, siblingCount?: number): Array<number | "ellipsis-start" | "ellipsis-end">;
43
+ declare const Pagination: import("react").ForwardRefExoticComponent<PaginationProps & import("react").RefAttributes<HTMLElement>>;
44
+ export { Pagination };
@@ -0,0 +1 @@
1
+ export { PinInput, type PinInputProps } from "./pin-input.js";
@@ -0,0 +1,41 @@
1
+ import type { HTMLAttributes } from "react";
2
+ /**
3
+ * PinInput — multi-slot OTP / code input primitive.
4
+ *
5
+ * Renders N separate boxes (default 6) that auto-advance focus on
6
+ * input. Paste handling fills all slots from clipboard (whitespace
7
+ * stripped). Arrow keys navigate; backspace clears current slot
8
+ * then moves focus back when empty.
9
+ *
10
+ * Industry-standard pattern for email verification codes (Apple,
11
+ * Stripe, Clerk, Auth0, GitHub two-factor).
12
+ *
13
+ * @example
14
+ * <PinInput
15
+ * length={6}
16
+ * value={code}
17
+ * onChange={setCode}
18
+ * onComplete={(v) => verify(v)}
19
+ * inputMode="numeric"
20
+ * aria-label="Verification code"
21
+ * />
22
+ *
23
+ * Note: value is treated as controlled. If you pass a complete value
24
+ * on mount, onComplete will NOT fire — onComplete fires only on
25
+ * transitions from incomplete → complete.
26
+ */
27
+ export interface PinInputProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "inputMode"> {
28
+ length?: number;
29
+ value?: string;
30
+ onChange?: (value: string) => void;
31
+ onComplete?: (value: string) => void;
32
+ inputMode?: "numeric" | "alphanumeric";
33
+ size?: "sm" | "md" | "lg";
34
+ disabled?: boolean;
35
+ error?: boolean;
36
+ "aria-label": string;
37
+ autoFocus?: boolean;
38
+ mask?: boolean;
39
+ }
40
+ declare const PinInput: import("react").ForwardRefExoticComponent<PinInputProps & import("react").RefAttributes<HTMLDivElement>>;
41
+ export { PinInput };
@@ -0,0 +1 @@
1
+ export { PlanBadge, type PlanBadgeProps, type PlanTier } from "./plan-badge.js";
@@ -0,0 +1,35 @@
1
+ import type { HTMLAttributes } from "react";
2
+ /**
3
+ * PlanBadge — semantic pricing-tier badge.
4
+ *
5
+ * Five canonical tiers (`free` / `hobby` / `pro` / `team` / `enterprise`) with
6
+ * distinct color tokens. Consumers self-document intent with `plan="hobby"`
7
+ * instead of mapping a generic `<Badge variant="outline">` to colors per app.
8
+ * Future rebrand / dark-mode tweaks propagate automatically — no consumer
9
+ * code change.
10
+ *
11
+ * Visual spec (per `loopzero/docs/handoff/2026-05-23-ui-cloud-dashboard-gaps-brief.md`):
12
+ *
13
+ * | tier | bg | border | text |
14
+ * |--------------|---------------------|--------------------------|-----------------------|
15
+ * | free | bg-muted/40 | border-muted-foreground/20 | text-muted-foreground |
16
+ * | hobby | bg-warning/10 | border-warning/30 | text-warning |
17
+ * | pro | bg-primary/10 | border-primary/30 | text-primary |
18
+ * | team | bg-success/10 | border-success/30 | text-success |
19
+ * | enterprise | bg-foreground/5 | border-foreground/20 | text-foreground |
20
+ *
21
+ * Default label capitalizes the tier (`hobby → "Hobby"`, `enterprise → "Enterprise"`).
22
+ *
23
+ * Used by `<AccountMenu>` inline with the user name; usable standalone.
24
+ */
25
+ export type PlanTier = "free" | "hobby" | "pro" | "team" | "enterprise";
26
+ export interface PlanBadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
27
+ /** Plan tier identifier. */
28
+ plan: PlanTier;
29
+ /** Override the display label. Defaults to the capitalized tier name. */
30
+ label?: string;
31
+ /** Size variant. */
32
+ size?: "sm" | "md";
33
+ }
34
+ declare const PlanBadge: import("react").ForwardRefExoticComponent<PlanBadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
35
+ export { PlanBadge };
@@ -0,0 +1 @@
1
+ export { Progress, type ProgressProps } from "./progress.js";
@@ -0,0 +1,44 @@
1
+ import type { HTMLAttributes } from "react";
2
+ /**
3
+ * Progress — accessible progress bar primitive.
4
+ *
5
+ * Built on `<div role="progressbar">` (NOT native `<progress>`) so Tailwind
6
+ * classes can style the track + fill cross-browser (Chrome/Safari/Firefox
7
+ * shadow-DOM hooks for `<progress>` diverge). Matches Radix / shadcn /
8
+ * Mantine convention.
9
+ *
10
+ * Variants:
11
+ * - intent: `default` | `success` | `warning` | `destructive` — controls fill color
12
+ * - height: `h-1` (4px, default) | `h-1.5` | `h-2` | `h-3`
13
+ * - indeterminate: animated bar, no value (e.g. "uploading…", "building…")
14
+ *
15
+ * Composition:
16
+ * <Progress value={42} max={100} intent="success" aria-label="Upload" />
17
+ * <Progress indeterminate aria-label="Building" />
18
+ *
19
+ * A11y:
20
+ * - role="progressbar"
21
+ * - aria-valuenow / aria-valuemin / aria-valuemax (determinate)
22
+ * - aria-busy="true" when indeterminate
23
+ * - Respects `prefers-reduced-motion` (no animation when set)
24
+ *
25
+ * Used by `<UsageMeter>` to render each metric's fill bar, but ships as a
26
+ * standalone primitive for direct consumer use (deploy phase, file upload,
27
+ * build progress, quota fill).
28
+ */
29
+ export interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, "role"> {
30
+ /** Current value (0..max). Values outside the range are clamped. */
31
+ value?: number;
32
+ /** Maximum value. Defaults to 100. */
33
+ max?: number;
34
+ /** Visual intent — controls fill color. */
35
+ intent?: "default" | "success" | "warning" | "destructive";
36
+ /** Bar height in tailwind units. Defaults to `"h-1"` (4px). */
37
+ height?: "h-1" | "h-1.5" | "h-2" | "h-3";
38
+ /** When true, animated bar with no value. Omits `aria-valuenow`, adds `aria-busy`. */
39
+ indeterminate?: boolean;
40
+ /** Accessible label. Required if not preceded by an `aria-labelledby` element. */
41
+ "aria-label"?: string;
42
+ }
43
+ declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<HTMLDivElement>>;
44
+ export { Progress };
@@ -0,0 +1 @@
1
+ export { RadioGroup } from "./radio-group.js";
@@ -0,0 +1,5 @@
1
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
2
+ declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
3
+ Item: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
4
+ };
5
+ export { RadioGroup };
@@ -0,0 +1,2 @@
1
+ export { ScrollArea } from "./scroll-area.js";
2
+ export { isNearBottom, type StickToBottomMetrics, useStickToBottom, type UseStickToBottomOptions, type UseStickToBottomReturn, } from "./use-stick-to-bottom.js";
@@ -0,0 +1,40 @@
1
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
2
+ import type { ComponentPropsWithoutRef } from "react";
3
+ /**
4
+ * ScrollArea — custom scroller styled from the tokens.
5
+ *
6
+ * Built on Radix ScrollArea so the native scrollbar is always hidden and the
7
+ * custom thumb stays consistent across Chrome/Firefox/Safari/macOS-trackpad.
8
+ *
9
+ * Visual:
10
+ * - track is transparent, only the thumb is visible.
11
+ * - thumb is `--primary` at 25% opacity by default; on hover, 45% with a glow.
12
+ * - active drag bumps to 60%.
13
+ * - the rounded full pill thumb plays well with the brutalist border language
14
+ * but stays subtle (1.5px wide on rest, 3px on hover).
15
+ *
16
+ * Modes (via `type`):
17
+ * - "hover" (default) — scrollbar fades in on hover/focus, otherwise hidden.
18
+ * - "always" — scrollbar always visible.
19
+ * - "auto" — scrollbar visible only when content overflows.
20
+ * - "scroll" — Radix-managed: visible only while scrolling.
21
+ */
22
+ interface ScrollAreaProps extends ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
23
+ /**
24
+ * Optional override for which scrollbar(s) to render.
25
+ * Defaults: vertical only. Set to "both" for grids/tables with overflow-x.
26
+ */
27
+ orientation?: "vertical" | "horizontal" | "both";
28
+ /**
29
+ * Thickness of the scrollbar. Default "thin" (2.5px → 3.5px on hover).
30
+ * Use "regular" (8px) for content where the scrollbar should be a more prominent target.
31
+ */
32
+ size?: "thin" | "regular";
33
+ }
34
+ interface ScrollBarProps extends ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> {
35
+ size?: "thin" | "regular";
36
+ }
37
+ declare const ScrollArea: import("react").ForwardRefExoticComponent<ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>> & {
38
+ Bar: import("react").ForwardRefExoticComponent<ScrollBarProps & import("react").RefAttributes<HTMLDivElement>>;
39
+ };
40
+ export { ScrollArea };
@@ -0,0 +1,20 @@
1
+ export interface StickToBottomMetrics {
2
+ scrollTop: number;
3
+ scrollHeight: number;
4
+ clientHeight: number;
5
+ }
6
+ /** Pure: is the scroll position within `threshold` px of the bottom? */
7
+ export declare function isNearBottom(metrics: StickToBottomMetrics, threshold: number): boolean;
8
+ export interface UseStickToBottomOptions {
9
+ /** Px distance from the bottom under which the view is considered pinned. */
10
+ threshold?: number;
11
+ }
12
+ export interface UseStickToBottomReturn<T extends HTMLElement = HTMLElement> {
13
+ /** Attach to the `<ScrollArea>` root (or any element). */
14
+ scrollRef: (node: T | null) => void;
15
+ /** Whether the view is currently pinned near the bottom. */
16
+ isPinned: boolean;
17
+ /** Force-scroll to the bottom and re-pin. */
18
+ scrollToBottom: () => void;
19
+ }
20
+ export declare function useStickToBottom<T extends HTMLElement = HTMLElement>(options?: UseStickToBottomOptions): UseStickToBottomReturn<T>;
@@ -0,0 +1 @@
1
+ export { Select } from "./select.js";
@@ -0,0 +1,50 @@
1
+ import * as SelectPrimitive from "@radix-ui/react-select";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import type { ComponentPropsWithoutRef } from "react";
4
+ /**
5
+ * Trigger size variant (theming-and-sizes plan T1.9).
6
+ * Items inside Select.Content stay md-equivalent regardless — the floating
7
+ * menu is isolated from the trigger context (documented decision).
8
+ *
9
+ * EC-2 guard: `<Select.Trigger>` is a Radix `<button>` — no SelectHTMLAttributes
10
+ * conflict to Omit. Verified before implementation.
11
+ */
12
+ declare const selectTriggerVariants: (props?: ({
13
+ size?: "sm" | "md" | "lg" | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ /**
16
+ * Select — styled wrapper around Radix Select.
17
+ *
18
+ * Composition:
19
+ * <Select value={value} onValueChange={setValue}>
20
+ * <Select.Trigger>
21
+ * <Select.Value placeholder="Pick…" />
22
+ * </Select.Trigger>
23
+ * <Select.Content>
24
+ * <Select.Group>
25
+ * <Select.Label>Group</Select.Label>
26
+ * <Select.Item value="a">A</Select.Item>
27
+ * </Select.Group>
28
+ * </Select.Content>
29
+ * </Select>
30
+ *
31
+ * Trigger matches Input height and focus ring. Content uses popover
32
+ * surface with check on the selected item.
33
+ */
34
+ interface SelectTriggerProps extends ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, VariantProps<typeof selectTriggerVariants> {
35
+ }
36
+ declare const SelectTrigger: import("react").ForwardRefExoticComponent<SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
37
+ declare const SelectContent: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
38
+ declare const SelectLabel: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
39
+ declare const SelectItem: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
40
+ declare const SelectSeparator: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
41
+ declare const Select: typeof SelectPrimitive.Root & {
42
+ Trigger: typeof SelectTrigger;
43
+ Value: typeof SelectPrimitive.Value;
44
+ Content: typeof SelectContent;
45
+ Group: typeof SelectPrimitive.Group;
46
+ Label: typeof SelectLabel;
47
+ Item: typeof SelectItem;
48
+ Separator: typeof SelectSeparator;
49
+ };
50
+ export { Select };
@@ -0,0 +1 @@
1
+ export { Sheet, sheetVariants } from "./sheet.js";
@@ -0,0 +1,33 @@
1
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import type { ComponentPropsWithoutRef, HTMLAttributes } from "react";
4
+ declare const sheetVariants: (props?: ({
5
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ interface ContentProps extends ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
8
+ hideCloseButton?: boolean;
9
+ }
10
+ declare const Sheet: {
11
+ (props: ComponentPropsWithoutRef<typeof DialogPrimitive.Root>): import("react").JSX.Element;
12
+ displayName: string;
13
+ } & {
14
+ Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
15
+ Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
16
+ Content: import("react").ForwardRefExoticComponent<ContentProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ Overlay: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
+ Header: {
19
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
20
+ displayName: string;
21
+ };
22
+ Body: {
23
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
24
+ displayName: string;
25
+ };
26
+ Footer: {
27
+ ({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
28
+ displayName: string;
29
+ };
30
+ Title: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
31
+ Description: import("react").ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
32
+ };
33
+ export { Sheet, sheetVariants };
@@ -0,0 +1 @@
1
+ export { Sidebar } from "./sidebar.js";
@@ -0,0 +1,76 @@
1
+ import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, HTMLAttributes, ReactNode } from "react";
2
+ interface SectionProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
3
+ title?: ReactNode;
4
+ }
5
+ interface ItemBaseProps {
6
+ icon?: ElementType;
7
+ active?: boolean;
8
+ count?: number | string;
9
+ }
10
+ /**
11
+ * The `<button>` arm. `type` is owned by the component, so it is not offered.
12
+ *
13
+ * `href?: never` is what makes the union discriminate on a mistake rather than on the `as` alone:
14
+ * `<Sidebar.Item href="/x">` without `as="a"` renders a button that ignores the href, and used to
15
+ * type-check.
16
+ */
17
+ type ItemButtonProps = ItemBaseProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> & {
18
+ as?: "button";
19
+ href?: never;
20
+ asChild?: never;
21
+ };
22
+ /**
23
+ * The `<a>` arm — anchor attributes, and `href` REQUIRED.
24
+ *
25
+ * The requirement is not pedantry: an anchor without `href` is not keyboard focusable and not
26
+ * announced as a link, so `as="a"` with the href forgotten produced a nav row that a keyboard user
27
+ * could not reach. It type-checked before, because both fields were optional on one shape.
28
+ */
29
+ type ItemAnchorProps = ItemBaseProps & AnchorHTMLAttributes<HTMLAnchorElement> & {
30
+ as: "a";
31
+ href: string;
32
+ asChild?: never;
33
+ };
34
+ /**
35
+ * The `asChild` arm — the component renders whatever element the child is (issue #31).
36
+ *
37
+ * The case it exists for is a router link. `as="a" href={to}` plus an `onClick` that calls
38
+ * `navigate()` works, and it is what consumers write today, but the router never sees the link, so
39
+ * it cannot prefetch it. On a sidebar — where hover precedes click almost every time — that is
40
+ * exactly where prefetch paid. Wrapping the item in a `<Link>` instead nests an `<a>` inside an
41
+ * `<a>`, which is invalid.
42
+ *
43
+ * <Sidebar.Item asChild icon={Home} active>
44
+ * <Link to="/feedback" prefetch="intent">Feedback</Link>
45
+ * </Sidebar.Item>
46
+ *
47
+ * `as` and `href` are `never` here because the child owns the element and its href. Offering both
48
+ * would let `<Sidebar.Item asChild as="a" href="/x">` type-check while the `as` silently did
49
+ * nothing — the same class of defect the `href?: never` on the button arm exists to prevent.
50
+ *
51
+ * The icon, the count and `aria-current` still come from the component: `Slottable` marks which
52
+ * child becomes the host element, and the rest render inside it.
53
+ */
54
+ type ItemAsChildProps = ItemBaseProps & HTMLAttributes<HTMLElement> & {
55
+ asChild: true;
56
+ as?: never;
57
+ href?: never;
58
+ };
59
+ /**
60
+ * Props of `Sidebar.Item`.
61
+ *
62
+ * A discriminated union rather than one shape with `as?: "button" | "a"`, because the runtime has
63
+ * always branched on `as` — it casts to `AnchorHTMLAttributes` in the anchor path — while the type
64
+ * described a button in both. The consequence was that no anchor attribute could be passed:
65
+ * `target`, `rel`, `download`, `hrefLang` all failed to compile on an element that renders them
66
+ * fine. A sidebar link to another site, which almost always wants `target="_blank" rel="noreferrer"`,
67
+ * could not be written with this component at all (getloopscale/ui#27).
68
+ */
69
+ type ItemProps = ItemButtonProps | ItemAnchorProps | ItemAsChildProps;
70
+ declare const Sidebar: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>> & {
71
+ Header: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
72
+ Section: import("react").ForwardRefExoticComponent<SectionProps & import("react").RefAttributes<HTMLDivElement>>;
73
+ Item: import("react").ForwardRefExoticComponent<ItemProps & import("react").RefAttributes<HTMLElement>>;
74
+ Footer: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
75
+ };
76
+ export { Sidebar };
@@ -0,0 +1 @@
1
+ export { Skeleton } from "./skeleton.js";
@@ -0,0 +1,21 @@
1
+ import type { HTMLAttributes } from "react";
2
+ /**
3
+ * Skeleton — placeholder block shown while content is loading.
4
+ *
5
+ * Uses --muted as base + a subtle shimmer that follows the theme.
6
+ * Compose multiple Skeletons to mirror your component layout while loading.
7
+ *
8
+ * Accessibility (LOW-004): the default `role="status"` + `aria-live="polite"`
9
+ * announces "Loading" to screen readers. In loops or grids where many
10
+ * Skeletons mount simultaneously, this can be noisy. Override per-instance
11
+ * with `aria-live="off"` and/or `aria-hidden` when only one container-level
12
+ * loading announcement is desired:
13
+ *
14
+ * <div role="status" aria-live="polite" aria-label="Loading deployments">
15
+ * {placeholders.map(id => (
16
+ * <Skeleton key={id} aria-live="off" aria-hidden="true" className="h-8" />
17
+ * ))}
18
+ * </div>
19
+ */
20
+ declare const Skeleton: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
21
+ export { Skeleton };
@@ -0,0 +1 @@
1
+ export { Slider, type SliderMark, type SliderProps } from "./slider.js";
@@ -0,0 +1,24 @@
1
+ import * as SliderPrimitive from "@radix-ui/react-slider";
2
+ import type { ComponentPropsWithoutRef, ReactNode } from "react";
3
+ /**
4
+ * Slider — range input primitive over Radix Slider.
5
+ *
6
+ * Single thumb: `defaultValue={[5]}`. Range: `defaultValue={[20, 80]}` (one
7
+ * thumb per array entry). `marks` renders labelled, clickable points over the
8
+ * track (Mantine-shaped `{value, label?}`); clicking a mark sets the value in
9
+ * single mode and is a no-op in range mode (which thumb to move is ambiguous).
10
+ *
11
+ * <Slider aria-label="Top K" min={1} max={100} defaultValue={[5]}
12
+ * marks={[{ value: 1 }, { value: 50 }, { value: 100 }]} />
13
+ */
14
+ interface SliderMark {
15
+ value: number;
16
+ label?: ReactNode;
17
+ }
18
+ interface SliderProps extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
19
+ /** Labelled, clickable points rendered over the track. Values outside [min, max] are skipped. */
20
+ marks?: SliderMark[];
21
+ }
22
+ declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HTMLSpanElement>>;
23
+ export { Slider };
24
+ export type { SliderMark, SliderProps };
@@ -0,0 +1 @@
1
+ export { SocialAuthRow, type SocialProvider } from "./social-auth-row.js";
@@ -0,0 +1,24 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { IconComponent } from "../../../lib/types.js";
3
+ export interface SocialProvider {
4
+ id: string;
5
+ label: ReactNode;
6
+ /** Icon component (e.g. brand-specific SVG). */
7
+ icon: IconComponent;
8
+ }
9
+ interface SocialAuthRowProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
10
+ providers: SocialProvider[];
11
+ onSelect?: (id: string) => void;
12
+ /**
13
+ * Stack vertically instead of horizontally (single-column flow).
14
+ */
15
+ vertical?: boolean;
16
+ }
17
+ /**
18
+ * SocialAuthRow — row of OAuth provider buttons.
19
+ *
20
+ * Stateless; caller wires the redirect on `onSelect`. Buttons share the LoopScale button
21
+ * styling but with provider icon prominently on the left.
22
+ */
23
+ declare const SocialAuthRow: import("react").ForwardRefExoticComponent<SocialAuthRowProps & import("react").RefAttributes<HTMLDivElement>>;
24
+ export { SocialAuthRow };
@@ -0,0 +1 @@
1
+ export { StatTile, type StatTileProps } from "./stat-tile.js";
@@ -0,0 +1,28 @@
1
+ import type { ButtonHTMLAttributes, ElementType, ReactNode } from "react";
2
+ /**
3
+ * StatTile — big number + label + optional delta + optional icon.
4
+ *
5
+ * Dual mode based on `onClick`:
6
+ * - With onClick → renders as `<button>` with hover state + trailing
7
+ * ArrowUpRight chevron (navigation affordance).
8
+ * - Without onClick → renders as static `<div>`.
9
+ *
10
+ * Delta trend drives icon + color: up=success/TrendingUp, down=destructive/
11
+ * TrendingDown, flat=muted/Minus. Big value uses font-display + tabular-nums.
12
+ *
13
+ * @example
14
+ * <StatTile value="42" label="Projects" />
15
+ * <StatTile value="$1,234" label="MRR" icon={DollarSign}
16
+ * delta={{ value: "+12%", trend: "up" }} onClick={openBilling} />
17
+ */
18
+ export interface StatTileProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "value" | "children"> {
19
+ value: ReactNode;
20
+ label: ReactNode;
21
+ icon?: ElementType;
22
+ delta?: {
23
+ value: ReactNode;
24
+ trend: "up" | "down" | "flat";
25
+ };
26
+ }
27
+ declare const StatTile: import("react").ForwardRefExoticComponent<StatTileProps & import("react").RefAttributes<HTMLElement>>;
28
+ export { StatTile };
@@ -0,0 +1 @@
1
+ export { StatusDot, type StatusDotProps, type StatusKind } from "./status-dot.js";
@@ -0,0 +1,31 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ /**
3
+ * StatusDot — semantic status indicator (colored circle + optional label).
4
+ *
5
+ * Five status kinds:
6
+ * - `live` — deployed / verified / healthy (success)
7
+ * - `building` — in-progress / queued (warning, auto-pulses)
8
+ * - `failed` — error / down / rejected (destructive)
9
+ * - `idle` — pending / offline (muted)
10
+ * - `warning` — degraded but functional (warning, static)
11
+ *
12
+ * Three sizes (xs 6px, sm 8px default, md 10px). `pulse` defaults to
13
+ * `true` for `building` and `false` otherwise; passing `pulse` explicitly
14
+ * overrides the auto behavior. When no visible `label` AND no `aria-label`
15
+ * are provided, the component auto-applies `aria-label={status}` and
16
+ * emits a dev-mode warning (a status communicated only by color is
17
+ * invisible to screen readers).
18
+ *
19
+ * @example
20
+ * <StatusDot status="live" label="Production" />
21
+ * <StatusDot status="building" /> // auto-pulses + auto-aria-label
22
+ */
23
+ export type StatusKind = "live" | "building" | "failed" | "idle" | "warning";
24
+ export interface StatusDotProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
25
+ status: StatusKind;
26
+ label?: ReactNode;
27
+ size?: "xs" | "sm" | "md";
28
+ pulse?: boolean;
29
+ }
30
+ declare const StatusDot: import("react").ForwardRefExoticComponent<StatusDotProps & import("react").RefAttributes<HTMLSpanElement>>;
31
+ export { StatusDot };