@praxical/ui 0.0.0-stage → 0.11.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 (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +23 -2
  3. package/dist/activity-calendar.d.ts +13 -0
  4. package/dist/activity-calendar.js +7 -0
  5. package/dist/activity-heatmap.d.ts +14 -0
  6. package/dist/activity-heatmap.js +13 -0
  7. package/dist/chart-data.d.ts +9 -0
  8. package/dist/chart-data.js +9 -0
  9. package/dist/charts.d.ts +56 -0
  10. package/dist/charts.js +424 -0
  11. package/dist/chunk-7RMPDKZV.js +541 -0
  12. package/dist/chunk-7RTW3X7C.js +142 -0
  13. package/dist/chunk-EBF2F3LN.js +1523 -0
  14. package/dist/chunk-FCYIZANU.js +385 -0
  15. package/dist/chunk-HMO4VQZN.js +58 -0
  16. package/dist/chunk-II677WPC.js +177 -0
  17. package/dist/chunk-KZHUBPY6.js +102 -0
  18. package/dist/chunk-OLGZOPLD.js +166 -0
  19. package/dist/chunk-PDSV773E.js +52 -0
  20. package/dist/chunk-Q4ARHP76.js +457 -0
  21. package/dist/chunk-U5W7O3QV.js +22 -0
  22. package/dist/chunk-V6MXR4P2.js +275 -0
  23. package/dist/chunk-VZZDLRM5.js +152 -0
  24. package/dist/chunk-WEM2UQPR.js +110 -0
  25. package/dist/chunk-XFNDEA5M.js +104 -0
  26. package/dist/chunk-YKFAA7GU.js +72 -0
  27. package/dist/code-editor.css +76 -0
  28. package/dist/code-editor.d.ts +44 -0
  29. package/dist/code-editor.js +287 -0
  30. package/dist/code-value.d.ts +13 -0
  31. package/dist/code-value.js +10 -0
  32. package/dist/code.d.ts +36 -0
  33. package/dist/code.js +198 -0
  34. package/dist/collection.d.ts +21 -0
  35. package/dist/collection.js +48 -0
  36. package/dist/content.d.ts +42 -0
  37. package/dist/content.js +122 -0
  38. package/dist/display.d.ts +58 -0
  39. package/dist/display.js +27 -0
  40. package/dist/feedback.d.ts +34 -0
  41. package/dist/feedback.js +184 -0
  42. package/dist/file-tree.d.ts +17 -0
  43. package/dist/file-tree.js +11 -0
  44. package/dist/forms.d.ts +69 -0
  45. package/dist/forms.js +273 -0
  46. package/dist/git-graph.d.ts +8 -0
  47. package/dist/git-graph.js +15 -0
  48. package/dist/git-layout.d.ts +24 -0
  49. package/dist/git-layout.js +7 -0
  50. package/dist/image-viewer.d.ts +18 -0
  51. package/dist/image-viewer.js +11 -0
  52. package/dist/index.d.ts +363 -0
  53. package/dist/index.js +98 -0
  54. package/dist/inputs.d.ts +112 -0
  55. package/dist/inputs.js +938 -0
  56. package/dist/layout.d.ts +56 -0
  57. package/dist/layout.js +180 -0
  58. package/dist/map-frame.d.ts +37 -0
  59. package/dist/map-frame.js +13 -0
  60. package/dist/media.d.ts +40 -0
  61. package/dist/media.js +19 -0
  62. package/dist/network-layout.d.ts +94 -0
  63. package/dist/network-layout.js +19 -0
  64. package/dist/network.d.ts +111 -0
  65. package/dist/network.js +354 -0
  66. package/dist/overlays.d.ts +95 -0
  67. package/dist/overlays.js +25 -0
  68. package/dist/patterns.d.ts +117 -0
  69. package/dist/patterns.js +387 -0
  70. package/dist/power-layout.d.ts +91 -0
  71. package/dist/power-layout.js +13 -0
  72. package/dist/power.d.ts +91 -0
  73. package/dist/power.js +353 -0
  74. package/dist/signal-context.d.ts +11 -0
  75. package/dist/signal-context.js +15 -0
  76. package/dist/strings-es-419.d.ts +13 -0
  77. package/dist/strings-es-419.js +357 -0
  78. package/dist/strings-fr.d.ts +15 -0
  79. package/dist/strings-fr.js +359 -0
  80. package/dist/strings-ja.d.ts +16 -0
  81. package/dist/strings-ja.js +357 -0
  82. package/dist/strings-pt-BR.d.ts +13 -0
  83. package/dist/strings-pt-BR.js +357 -0
  84. package/dist/strings.d.ts +394 -0
  85. package/dist/strings.js +15 -0
  86. package/dist/styles.css +2 -0
  87. package/dist/tab-bar.d.ts +20 -0
  88. package/dist/tab-bar.js +114 -0
  89. package/package.json +199 -3
package/dist/code.js ADDED
@@ -0,0 +1,198 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ FileTree
5
+ } from "./chunk-7RTW3X7C.js";
6
+ import {
7
+ GitGraph
8
+ } from "./chunk-XFNDEA5M.js";
9
+ import {
10
+ layoutGitGraph
11
+ } from "./chunk-YKFAA7GU.js";
12
+ import {
13
+ ActivityHeatmap
14
+ } from "./chunk-KZHUBPY6.js";
15
+ import {
16
+ activityCalendar
17
+ } from "./chunk-PDSV773E.js";
18
+ import {
19
+ Button
20
+ } from "./chunk-EBF2F3LN.js";
21
+ import {
22
+ useSignalStrings
23
+ } from "./chunk-U5W7O3QV.js";
24
+ import "./chunk-FCYIZANU.js";
25
+
26
+ // packages/ui/src/code.tsx
27
+ import { useState, useRef } from "react";
28
+ import Prism from "prismjs";
29
+ import "prismjs/components/prism-typescript.js";
30
+ import "prismjs/components/prism-jsx.js";
31
+ import "prismjs/components/prism-tsx.js";
32
+ import "prismjs/components/prism-json.js";
33
+ import "prismjs/components/prism-bash.js";
34
+ import "prismjs/components/prism-diff.js";
35
+ import { diffLines } from "diff";
36
+ import { Copy, Check } from "lucide-react";
37
+ import { jsx, jsxs } from "react/jsx-runtime";
38
+ function highlight(code, language) {
39
+ const grammar = Prism.languages[language];
40
+ if (!grammar) return code;
41
+ const render = (token, index) => typeof token === "string" ? token : /* @__PURE__ */ jsx("span", { className: `signal-syntax-${token.type}`, children: Array.isArray(token.content) ? token.content.map(render) : render(token.content, 0) }, index);
42
+ return Prism.tokenize(code, grammar).map(render);
43
+ }
44
+ function SyntaxCodeBlock({
45
+ code,
46
+ language = "text",
47
+ label,
48
+ lineNumbers = false,
49
+ onCopy
50
+ }) {
51
+ const strings = useSignalStrings();
52
+ const name = label ?? strings.code.label;
53
+ const [copied, setCopied] = useState(false), [error, setError] = useState("");
54
+ return /* @__PURE__ */ jsxs("figure", { className: "signal-code-view", children: [
55
+ /* @__PURE__ */ jsxs("figcaption", { children: [
56
+ /* @__PURE__ */ jsx("strong", { children: name }),
57
+ /* @__PURE__ */ jsx("span", { children: language }),
58
+ onCopy && /* @__PURE__ */ jsxs(
59
+ Button,
60
+ {
61
+ variant: "ghost",
62
+ onClick: async () => {
63
+ try {
64
+ await onCopy(code);
65
+ setCopied(true);
66
+ setError("");
67
+ } catch {
68
+ setError(strings.code.copyFailed);
69
+ }
70
+ },
71
+ children: [
72
+ copied ? /* @__PURE__ */ jsx(Check, {}) : /* @__PURE__ */ jsx(Copy, {}),
73
+ copied ? strings.code.copied : strings.code.copy
74
+ ]
75
+ }
76
+ )
77
+ ] }),
78
+ /* @__PURE__ */ jsx("pre", { tabIndex: 0, "aria-label": name, children: /* @__PURE__ */ jsxs("code", { children: [
79
+ lineNumbers && /* @__PURE__ */ jsx("span", { className: "signal-code-gutter", "aria-hidden": "true", children: code.split("\n").map((_, i) => /* @__PURE__ */ jsxs("span", { children: [
80
+ i + 1,
81
+ "\n"
82
+ ] }, i)) }),
83
+ /* @__PURE__ */ jsx("span", { children: highlight(code, language) })
84
+ ] }) }),
85
+ error && /* @__PURE__ */ jsx("p", { role: "alert", children: error })
86
+ ] });
87
+ }
88
+ function DiffViewer({
89
+ before,
90
+ after,
91
+ label,
92
+ beforeLabel,
93
+ afterLabel
94
+ }) {
95
+ const strings = useSignalStrings();
96
+ const name = label ?? strings.diff.label;
97
+ let oldLine = 0, newLine = 0;
98
+ const lines = diffLines(before, after).flatMap((part) => {
99
+ const rows = part.value.split("\n");
100
+ if (rows.at(-1) === "") rows.pop();
101
+ return rows.map((line) => ({
102
+ line,
103
+ kind: part.added ? "added" : part.removed ? "removed" : "same",
104
+ old: part.added ? null : ++oldLine,
105
+ next: part.removed ? null : ++newLine
106
+ }));
107
+ });
108
+ return /* @__PURE__ */ jsxs("figure", { className: "signal-code-view signal-diff", children: [
109
+ /* @__PURE__ */ jsxs("figcaption", { children: [
110
+ /* @__PURE__ */ jsx("strong", { children: name }),
111
+ /* @__PURE__ */ jsxs("span", { children: [
112
+ beforeLabel ?? strings.diff.before,
113
+ " \u2192",
114
+ " ",
115
+ afterLabel ?? strings.diff.after
116
+ ] })
117
+ ] }),
118
+ /* @__PURE__ */ jsx("pre", { tabIndex: 0, "aria-label": strings.diff.unified(name), children: /* @__PURE__ */ jsx("code", { children: lines.map((l, i) => /* @__PURE__ */ jsxs("span", { className: "signal-diff-line", "data-kind": l.kind, children: [
119
+ /* @__PURE__ */ jsx("span", { className: "signal-line-number", "aria-hidden": "true", children: l.old ?? "" }),
120
+ /* @__PURE__ */ jsx("span", { className: "signal-line-number", "aria-hidden": "true", children: l.next ?? "" }),
121
+ /* @__PURE__ */ jsx("span", { className: "signal-diff-marker", children: l.kind === "added" ? "+" : l.kind === "removed" ? "-" : " " }),
122
+ /* @__PURE__ */ jsxs("span", { children: [
123
+ l.line,
124
+ "\n"
125
+ ] })
126
+ ] }, i)) }) }),
127
+ before === after && /* @__PURE__ */ jsx("p", { className: "signal-muted", children: strings.diff.none })
128
+ ] });
129
+ }
130
+ function Heatmap({
131
+ label,
132
+ cells,
133
+ columns = 12,
134
+ onSelect
135
+ }) {
136
+ const strings = useSignalStrings();
137
+ const [focused, setFocused] = useState(0);
138
+ const grid = useRef(null);
139
+ const max = Math.max(
140
+ 1,
141
+ ...cells.map((c) => Number.isFinite(c.value) ? c.value : 0)
142
+ ), cols = Math.max(1, Math.floor(columns));
143
+ return /* @__PURE__ */ jsxs("figure", { className: "signal-heatmap", children: [
144
+ /* @__PURE__ */ jsx("figcaption", { children: label }),
145
+ /* @__PURE__ */ jsx("div", { className: "signal-heatmap-scroll", children: /* @__PURE__ */ jsx(
146
+ "div",
147
+ {
148
+ ref: grid,
149
+ className: "signal-heatmap-grid",
150
+ style: {
151
+ gridTemplateColumns: `repeat(${cols}, minmax(0, 12px))`
152
+ },
153
+ children: cells.map((cell, index) => /* @__PURE__ */ jsx(
154
+ "button",
155
+ {
156
+ type: "button",
157
+ tabIndex: index === Math.min(focused, cells.length - 1) ? 0 : -1,
158
+ onFocus: () => setFocused(index),
159
+ onKeyDown: (event) => {
160
+ const next = {
161
+ ArrowRight: index + 1,
162
+ ArrowLeft: index - 1,
163
+ ArrowDown: index + cols,
164
+ ArrowUp: index - cols,
165
+ Home: 0,
166
+ End: cells.length - 1
167
+ }[event.key];
168
+ if (next !== void 0) {
169
+ event.preventDefault();
170
+ grid.current?.querySelectorAll("button")[Math.max(0, Math.min(cells.length - 1, next))]?.focus();
171
+ }
172
+ },
173
+ title: strings.heatmap.cell(cell.label, String(cell.value)),
174
+ "aria-label": strings.heatmap.cell(cell.label, String(cell.value)),
175
+ "data-level": cell.value <= 0 ? 0 : Math.min(4, Math.ceil(cell.value / max * 4)),
176
+ onClick: () => onSelect?.(cell)
177
+ },
178
+ cell.id
179
+ ))
180
+ }
181
+ ) }),
182
+ /* @__PURE__ */ jsxs("div", { className: "signal-heatmap-scale", "aria-hidden": "true", children: [
183
+ /* @__PURE__ */ jsx("span", { children: strings.heatmap.less }),
184
+ [0, 1, 2, 3, 4].map((level) => /* @__PURE__ */ jsx("i", { "data-level": level }, level)),
185
+ /* @__PURE__ */ jsx("span", { children: strings.heatmap.more })
186
+ ] })
187
+ ] });
188
+ }
189
+ export {
190
+ ActivityHeatmap,
191
+ DiffViewer,
192
+ FileTree,
193
+ GitGraph,
194
+ Heatmap,
195
+ SyntaxCodeBlock,
196
+ activityCalendar,
197
+ layoutGitGraph
198
+ };
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from "react";
2
+ export type CollectionState = "loading" | "error" | "empty" | "ready";
3
+ /** Owns the loading, error, empty and ready sequence of a fetched collection,
4
+ * so a page shows one of them and never three at once. Pagers, headers and
5
+ * filters passed as `chrome` render only when there is something to page. */
6
+ export declare function Collection({ state, shape, loadingLabel, error, onRetry, retryLabel, empty, chrome, className, children, }: {
7
+ state: CollectionState;
8
+ /** Placeholder shape while loading. */
9
+ shape?: "rows" | "table" | "card" | ReactNode;
10
+ loadingLabel?: string;
11
+ /** Message for the error state. */
12
+ error?: ReactNode;
13
+ onRetry?: () => void;
14
+ retryLabel?: string;
15
+ /** An EmptyState (or any node) for the empty state. */
16
+ empty: ReactNode;
17
+ /** Pager, result count, bulk actions: shown only when ready. */
18
+ chrome?: ReactNode;
19
+ className?: string;
20
+ children: ReactNode;
21
+ }): import("react").JSX.Element;
@@ -0,0 +1,48 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ SkeletonCard,
5
+ SkeletonRows,
6
+ SkeletonTable
7
+ } from "./chunk-V6MXR4P2.js";
8
+ import {
9
+ Button
10
+ } from "./chunk-EBF2F3LN.js";
11
+ import {
12
+ useSignalStrings
13
+ } from "./chunk-U5W7O3QV.js";
14
+ import "./chunk-FCYIZANU.js";
15
+
16
+ // packages/ui/src/collection.tsx
17
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
+ var cx = (...values) => values.filter(Boolean).join(" ");
19
+ function Collection({
20
+ state,
21
+ shape = "rows",
22
+ loadingLabel,
23
+ error,
24
+ onRetry,
25
+ retryLabel,
26
+ empty,
27
+ chrome,
28
+ className,
29
+ children
30
+ }) {
31
+ const strings = useSignalStrings();
32
+ const loading = loadingLabel ?? strings.loading.label;
33
+ return /* @__PURE__ */ jsxs("div", { className: cx("signal-collection", className), "data-state": state, children: [
34
+ state === "loading" && (typeof shape === "string" ? shape === "table" ? /* @__PURE__ */ jsx(SkeletonTable, { label: loadingLabel ?? strings.loading.table }) : shape === "card" ? /* @__PURE__ */ jsx(SkeletonCard, { label: loading }) : /* @__PURE__ */ jsx(SkeletonRows, { label: loading }) : /* @__PURE__ */ jsx("div", { role: "status", "aria-label": loading, children: shape })),
35
+ state === "error" && /* @__PURE__ */ jsxs("div", { className: "signal-collection-error", role: "alert", children: [
36
+ /* @__PURE__ */ jsx("p", { children: error ?? strings.collection.error }),
37
+ onRetry && /* @__PURE__ */ jsx(Button, { onClick: onRetry, children: retryLabel ?? strings.collection.retry })
38
+ ] }),
39
+ state === "empty" && empty,
40
+ state === "ready" && /* @__PURE__ */ jsxs(Fragment, { children: [
41
+ chrome && /* @__PURE__ */ jsx("div", { className: "signal-collection-chrome", children: chrome }),
42
+ children
43
+ ] })
44
+ ] });
45
+ }
46
+ export {
47
+ Collection
48
+ };
@@ -0,0 +1,42 @@
1
+ import type { ReactNode, MouseEvent } from "react";
2
+ export interface AccordionItem {
3
+ id: string;
4
+ title: ReactNode;
5
+ content: ReactNode;
6
+ disabled?: boolean;
7
+ }
8
+ export declare function Accordion({ items, multiple, value, defaultValue, onValueChange, label, }: {
9
+ items: readonly AccordionItem[];
10
+ multiple?: boolean;
11
+ value?: string[];
12
+ defaultValue?: string[];
13
+ onValueChange?: (v: string[]) => void;
14
+ label?: string;
15
+ }): import("react").JSX.Element;
16
+ export type EventState = "complete" | "current" | "pending" | "failed";
17
+ export interface EventStep {
18
+ id: string;
19
+ title: ReactNode;
20
+ detail?: ReactNode;
21
+ state: EventState;
22
+ time?: string;
23
+ dateTime?: string;
24
+ action?: ReactNode;
25
+ }
26
+ /** Event history and staged progress share a vertical, connected sequence. */
27
+ export declare function VerticalStepper({ label, items, onStepSelect, }: {
28
+ label: string;
29
+ items: readonly EventStep[];
30
+ onStepSelect?: (id: string) => void;
31
+ }): import("react").JSX.Element;
32
+ export declare function ImageCard({ src, alt, title, children, eyebrow, href, onClick, footer, aspectRatio, }: {
33
+ src: string;
34
+ alt: string;
35
+ title: string;
36
+ children?: ReactNode;
37
+ eyebrow?: ReactNode;
38
+ footer?: ReactNode;
39
+ href?: string;
40
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
41
+ aspectRatio?: string;
42
+ }): import("react").JSX.Element;
@@ -0,0 +1,122 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ Button
5
+ } from "./chunk-EBF2F3LN.js";
6
+ import {
7
+ useSignalStrings
8
+ } from "./chunk-U5W7O3QV.js";
9
+ import "./chunk-FCYIZANU.js";
10
+
11
+ // packages/ui/src/content.tsx
12
+ import { Accordion as BaseAccordion } from "@base-ui/react/accordion";
13
+ import {
14
+ Check,
15
+ ChevronDown,
16
+ CircleAlert,
17
+ Clock,
18
+ LoaderCircle
19
+ } from "lucide-react";
20
+ import { jsx, jsxs } from "react/jsx-runtime";
21
+ function Accordion({
22
+ items,
23
+ multiple = false,
24
+ value,
25
+ defaultValue,
26
+ onValueChange,
27
+ label
28
+ }) {
29
+ const strings = useSignalStrings();
30
+ return /* @__PURE__ */ jsx(
31
+ BaseAccordion.Root,
32
+ {
33
+ className: "signal-accordion",
34
+ multiple,
35
+ value,
36
+ defaultValue,
37
+ onValueChange,
38
+ "aria-label": label ?? strings.accordion.label,
39
+ children: items.map((item) => /* @__PURE__ */ jsxs(
40
+ BaseAccordion.Item,
41
+ {
42
+ value: item.id,
43
+ disabled: item.disabled,
44
+ children: [
45
+ /* @__PURE__ */ jsx(BaseAccordion.Header, { children: /* @__PURE__ */ jsxs(BaseAccordion.Trigger, { children: [
46
+ item.title,
47
+ /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true" })
48
+ ] }) }),
49
+ /* @__PURE__ */ jsx(BaseAccordion.Panel, { children: /* @__PURE__ */ jsx("div", { children: item.content }) })
50
+ ]
51
+ },
52
+ item.id
53
+ ))
54
+ }
55
+ );
56
+ }
57
+ function VerticalStepper({
58
+ label,
59
+ items,
60
+ onStepSelect
61
+ }) {
62
+ const strings = useSignalStrings();
63
+ return /* @__PURE__ */ jsx("ol", { className: "signal-event-steps", "aria-label": label, children: items.map((item, index) => {
64
+ const Icon = item.state === "complete" ? Check : item.state === "failed" ? CircleAlert : item.state === "current" ? LoaderCircle : Clock;
65
+ return /* @__PURE__ */ jsxs(
66
+ "li",
67
+ {
68
+ "data-state": item.state,
69
+ "aria-current": item.state === "current" ? "step" : void 0,
70
+ children: [
71
+ /* @__PURE__ */ jsx("span", { className: "signal-event-marker", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, {}) }),
72
+ /* @__PURE__ */ jsxs("div", { children: [
73
+ /* @__PURE__ */ jsxs("div", { className: "signal-event-title", children: [
74
+ onStepSelect ? /* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: () => onStepSelect(item.id), children: item.title }) : /* @__PURE__ */ jsx("strong", { children: item.title }),
75
+ /* @__PURE__ */ jsx("span", { className: "signal-event-state", children: strings.eventState[item.state] })
76
+ ] }),
77
+ item.detail && /* @__PURE__ */ jsx("div", { className: "signal-event-detail", children: item.detail }),
78
+ item.time && /* @__PURE__ */ jsx("time", { dateTime: item.dateTime, children: item.time }),
79
+ item.action,
80
+ /* @__PURE__ */ jsx("span", { className: "signal-sr-only", children: strings.stepper.position(index + 1, items.length) })
81
+ ] })
82
+ ]
83
+ },
84
+ item.id
85
+ );
86
+ }) });
87
+ }
88
+ function ImageCard({
89
+ src,
90
+ alt,
91
+ title,
92
+ children,
93
+ eyebrow,
94
+ href,
95
+ onClick,
96
+ footer,
97
+ aspectRatio = "16 / 9"
98
+ }) {
99
+ const image = /* @__PURE__ */ jsx("img", { src, alt, loading: "lazy", style: { aspectRatio } });
100
+ return /* @__PURE__ */ jsxs("article", { className: "signal-image-card", children: [
101
+ href ? /* @__PURE__ */ jsx("a", { className: "signal-image-card-cover", href, "aria-label": title, children: image }) : onClick ? /* @__PURE__ */ jsx(
102
+ Button,
103
+ {
104
+ className: "signal-image-card-cover",
105
+ onClick,
106
+ "aria-label": title,
107
+ children: image
108
+ }
109
+ ) : image,
110
+ /* @__PURE__ */ jsxs("div", { className: "signal-image-card-content", children: [
111
+ eyebrow && /* @__PURE__ */ jsx("span", { className: "signal-image-card-eyebrow", children: eyebrow }),
112
+ /* @__PURE__ */ jsx("h3", { children: href ? /* @__PURE__ */ jsx("a", { href, children: title }) : title }),
113
+ children && /* @__PURE__ */ jsx("div", { children }),
114
+ footer && /* @__PURE__ */ jsx("footer", { children: footer })
115
+ ] })
116
+ ] });
117
+ }
118
+ export {
119
+ Accordion,
120
+ ImageCard,
121
+ VerticalStepper
122
+ };
@@ -0,0 +1,58 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ export type Tone = "neutral" | "accent" | "success" | "warning" | "danger";
3
+ /** A text link. `action` renders it at control weight for row and pane actions;
4
+ * `quiet` inherits the surrounding colour and underlines on hover only. */
5
+ export declare function Link({ external, variant, className, children, ...props }: ComponentProps<"a"> & {
6
+ external?: boolean;
7
+ variant?: "inline" | "action" | "quiet";
8
+ }): import("react").JSX.Element;
9
+ /** A removable label for filters, categories and selections. Badges describe
10
+ * state; tags describe membership. */
11
+ export declare function Tag({ tone, icon, onRemove, removeLabel, className, children, ...props }: ComponentProps<"span"> & {
12
+ tone?: Tone;
13
+ icon?: ReactNode;
14
+ onRemove?: () => void;
15
+ removeLabel?: string;
16
+ }): import("react").JSX.Element;
17
+ /** A small square indicator with an accessible name. Never the only cue: pair it with text. */
18
+ export declare function StatusDot({ tone, label, pulse, className, ...props }: ComponentProps<"span"> & {
19
+ tone?: Tone;
20
+ label: string;
21
+ pulse?: boolean;
22
+ }): import("react").JSX.Element;
23
+ /** A formatted `<time>` with the exact instant in its title. Relative output
24
+ * is computed when rendered; pass `now` for deterministic tests. */
25
+ export declare function Time({ value, format, timeZone, now, className, ...props }: Omit<ComponentProps<"time">, "dateTime"> & {
26
+ value: string | Date;
27
+ format?: "datetime" | "date" | "time" | "relative" | "utc";
28
+ timeZone?: string;
29
+ now?: Date;
30
+ }): import("react").JSX.Element;
31
+ /** A page-level notice that spans its container: configuration missing,
32
+ * service degraded, action required. It is flat, edge to edge, and dismissable. */
33
+ export declare function Banner({ tone, title, action, onDismiss, dismissLabel, className, children, ...props }: ComponentProps<"div"> & {
34
+ tone?: Tone;
35
+ title?: ReactNode;
36
+ action?: ReactNode;
37
+ onDismiss?: () => void;
38
+ dismissLabel?: string;
39
+ }): import("react").JSX.Element;
40
+ /** A quiet aside beside the content it explains. Not a warning: use Alert or Banner for those. */
41
+ export declare function Callout({ tone, title, className, children, ...props }: ComponentProps<"aside"> & {
42
+ tone?: "neutral" | "accent";
43
+ title?: ReactNode;
44
+ }): import("react").JSX.Element;
45
+ /** Loading placeholders that match the shape of what arrives. */
46
+ export declare function SkeletonRows({ rows, label, avatar, }: {
47
+ rows?: number;
48
+ label?: string;
49
+ avatar?: boolean;
50
+ }): import("react").JSX.Element;
51
+ export declare function SkeletonTable({ rows, columns, label, }: {
52
+ rows?: number;
53
+ columns?: number;
54
+ label?: string;
55
+ }): import("react").JSX.Element;
56
+ export declare function SkeletonCard({ label }: {
57
+ label?: string;
58
+ }): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+ "use client";
3
+ import {
4
+ Banner,
5
+ Callout,
6
+ Link,
7
+ SkeletonCard,
8
+ SkeletonRows,
9
+ SkeletonTable,
10
+ StatusDot,
11
+ Tag,
12
+ Time
13
+ } from "./chunk-V6MXR4P2.js";
14
+ import "./chunk-EBF2F3LN.js";
15
+ import "./chunk-U5W7O3QV.js";
16
+ import "./chunk-FCYIZANU.js";
17
+ export {
18
+ Banner,
19
+ Callout,
20
+ Link,
21
+ SkeletonCard,
22
+ SkeletonRows,
23
+ SkeletonTable,
24
+ StatusDot,
25
+ Tag,
26
+ Time
27
+ };
@@ -0,0 +1,34 @@
1
+ import { type ReactNode } from "react";
2
+ import { Toast } from "@base-ui/react/toast";
3
+ export type FeedbackTone = "neutral" | "accent" | "success" | "warning" | "danger";
4
+ export declare const useToast: typeof Toast.useToastManager;
5
+ export declare function ToastProvider({ children, timeout, limit, }: {
6
+ children: ReactNode;
7
+ timeout?: number;
8
+ limit?: number;
9
+ }): import("react").JSX.Element;
10
+ export interface ResourceSegment {
11
+ id: string;
12
+ label: string;
13
+ value: number;
14
+ tone?: FeedbackTone;
15
+ detail?: ReactNode;
16
+ pattern?: "solid" | "striped" | "dotted";
17
+ }
18
+ export declare function ResourceBar({ label, segments, max, formatValue, segmented, limit, }: {
19
+ label: string;
20
+ segments: readonly ResourceSegment[];
21
+ max?: number;
22
+ formatValue?: (value: number) => string;
23
+ segmented?: boolean;
24
+ /** A soft limit below the capacity, on the same scale, such as 80% of a breaker's rating: marked on the bar. */
25
+ limit?: number;
26
+ }): import("react").JSX.Element;
27
+ export declare function CircularGauge({ label, value, max, tone, formatValue, children, }: {
28
+ label: string;
29
+ value: number;
30
+ max?: number;
31
+ tone?: FeedbackTone;
32
+ formatValue?: (value: number) => string;
33
+ children?: ReactNode;
34
+ }): import("react").JSX.Element;