@reifydb/ui 0.4.7

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.
package/dist/index.cjs ADDED
@@ -0,0 +1,684 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Badge: () => Badge,
34
+ Button: () => Button,
35
+ Card: () => Card,
36
+ CardContent: () => CardContent,
37
+ CardDescription: () => CardDescription,
38
+ CardFooter: () => CardFooter,
39
+ CardHeader: () => CardHeader,
40
+ CardTitle: () => CardTitle,
41
+ Chip: () => Chip,
42
+ ChipGroup: () => ChipGroup,
43
+ CodeBlock: () => CodeBlock,
44
+ CopyButton: () => CopyButton,
45
+ Dialog: () => Dialog,
46
+ DialogClose: () => DialogClose,
47
+ DialogContent: () => DialogContent,
48
+ DialogDescription: () => DialogDescription,
49
+ DialogFooter: () => DialogFooter,
50
+ DialogHeader: () => DialogHeader,
51
+ DialogTitle: () => DialogTitle,
52
+ EmptyState: () => EmptyState,
53
+ Input: () => Input,
54
+ Kbd: () => Kbd,
55
+ Loading: () => Loading,
56
+ Modal: () => Modal,
57
+ NavTabs: () => NavTabs,
58
+ SectionHeader: () => SectionHeader,
59
+ Select: () => Select,
60
+ Separator: () => Separator,
61
+ Skeleton: () => Skeleton,
62
+ Sparkline: () => Sparkline,
63
+ Spinner: () => Spinner,
64
+ StatusBar: () => StatusBar,
65
+ Table: () => Table,
66
+ TableBody: () => TableBody,
67
+ TableCell: () => TableCell,
68
+ TableHead: () => TableHead,
69
+ TableHeader: () => TableHeader,
70
+ TableRow: () => TableRow,
71
+ Tabs: () => Tabs,
72
+ Toggle: () => Toggle
73
+ });
74
+ module.exports = __toCommonJS(index_exports);
75
+
76
+ // src/components/badge/badge.tsx
77
+ var import_jsx_runtime = require("react/jsx-runtime");
78
+ var variantStyles = {
79
+ active: "font-bold text-primary",
80
+ inactive: "text-text-secondary",
81
+ "coming-soon": "text-text-secondary",
82
+ default: "text-text-primary",
83
+ signal: "font-bold text-primary",
84
+ success: "text-[11px] font-medium rounded-full border px-2.5 py-0.5 bg-status-success/15 text-status-success border-status-success/30",
85
+ danger: "text-[11px] font-medium rounded-full border px-2.5 py-0.5 bg-status-error/15 text-status-error border-status-error/30",
86
+ warning: "text-[11px] font-medium rounded-full border px-2.5 py-0.5 bg-status-warning/15 text-status-warning border-status-warning/30",
87
+ error: "text-[11px] font-medium rounded-full border px-2.5 py-0.5 bg-status-error/15 text-status-error border-status-error/30",
88
+ outline: "text-text-muted"
89
+ };
90
+ function Badge({ variant = "default", children, className = "", onClick }) {
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ "span",
93
+ {
94
+ className: `inline-flex items-center ${variantStyles[variant]} ${className}`,
95
+ onClick,
96
+ children
97
+ }
98
+ );
99
+ }
100
+
101
+ // src/components/button/button.tsx
102
+ var import_react = require("react");
103
+ var import_jsx_runtime2 = require("react/jsx-runtime");
104
+ var variantStyles2 = {
105
+ primary: "bg-primary text-[var(--accent-text,#1a1a1a)] font-semibold border-primary hover:brightness-110 hover:shadow-[0_0_16px_rgba(255,255,255,0.1)]",
106
+ secondary: "bg-transparent text-text-secondary border-border-default font-medium hover:border-primary hover:text-primary",
107
+ ghost: "text-text-secondary border-transparent hover:bg-white/[0.04] hover:text-text-primary",
108
+ danger: "bg-status-error/10 text-status-error border-status-error/30 hover:bg-status-error/20",
109
+ destructive: "bg-status-error text-white font-semibold border-status-error hover:bg-status-error/90",
110
+ link: "text-primary border-transparent underline-offset-4 hover:underline"
111
+ };
112
+ var sizeStyles = {
113
+ sm: "h-8 px-3 text-xs gap-1.5",
114
+ md: "h-9 px-4 text-sm gap-2",
115
+ lg: "h-11 px-6 text-sm gap-2",
116
+ icon: "h-9 w-9 p-0"
117
+ };
118
+ var Button = (0, import_react.forwardRef)(
119
+ ({ variant = "primary", size = "md", className = "", children, disabled, ...props }, ref) => {
120
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
121
+ "button",
122
+ {
123
+ ref,
124
+ className: `inline-flex items-center justify-center font-medium transition-all duration-200
125
+ rounded-lg border
126
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary
127
+ disabled:pointer-events-none disabled:opacity-50
128
+ ${variantStyles2[variant]} ${sizeStyles[size]} ${className}`,
129
+ disabled,
130
+ ...props,
131
+ children
132
+ }
133
+ );
134
+ }
135
+ );
136
+ Button.displayName = "Button";
137
+
138
+ // src/components/card/card.tsx
139
+ var import_jsx_runtime3 = require("react/jsx-runtime");
140
+ function Card({ children, className = "" }) {
141
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `glass-card p-6 ${className}`, children });
142
+ }
143
+ function CardHeader({ children, className = "" }) {
144
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `mb-4 ${className}`, children });
145
+ }
146
+ function CardTitle({ children, className = "" }) {
147
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h3", { className: `text-sm font-medium text-text-primary ${className}`, children });
148
+ }
149
+ function CardDescription({ children, className = "" }) {
150
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: `mt-1 text-xs text-text-muted ${className}`, children });
151
+ }
152
+ function CardContent({ children, className = "" }) {
153
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className, children });
154
+ }
155
+ function CardFooter({ children, className = "" }) {
156
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `pt-4 mt-4 border-t border-white/[0.06] ${className}`, children });
157
+ }
158
+
159
+ // src/components/chip/chip.tsx
160
+ var import_jsx_runtime4 = require("react/jsx-runtime");
161
+ function Chip({ active, onClick, children, className = "" }) {
162
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
163
+ "button",
164
+ {
165
+ onClick,
166
+ className: `text-xs font-medium px-3 py-1 rounded-lg border cursor-pointer whitespace-nowrap transition-all ${active ? "text-primary border-primary/30 bg-primary/10" : "text-text-secondary bg-white/[0.04] border-white/[0.08] hover:text-text-primary hover:border-white/[0.12]"} ${className}`,
167
+ children
168
+ }
169
+ );
170
+ }
171
+
172
+ // src/components/chip-group/chip-group.tsx
173
+ var import_jsx_runtime5 = require("react/jsx-runtime");
174
+ function ChipGroup(props) {
175
+ const { options, className = "" } = props;
176
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: `flex items-center gap-2 ${className}`, children: options.map((option) => {
177
+ const isActive = props.multiple ? props.value.includes(option.value) : props.value === option.value;
178
+ const handleClick = () => {
179
+ if (props.multiple) {
180
+ const next = props.value.includes(option.value) ? props.value.filter((v) => v !== option.value) : [...props.value, option.value];
181
+ props.onChange(next);
182
+ } else {
183
+ props.onChange(option.value);
184
+ }
185
+ };
186
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Chip, { active: isActive, onClick: handleClick, children: option.label }, option.value);
187
+ }) });
188
+ }
189
+
190
+ // src/components/code-block/code-block.tsx
191
+ var import_react3 = require("react");
192
+ var import_prismjs = __toESM(require("prismjs"), 1);
193
+ var import_prism_json = require("prismjs/components/prism-json");
194
+ var import_prism_bash = require("prismjs/components/prism-bash");
195
+ var import_prism_python = require("prismjs/components/prism-python");
196
+ var import_prism_javascript = require("prismjs/components/prism-javascript");
197
+ var import_prism_typescript = require("prismjs/components/prism-typescript");
198
+ var import_prism_rust = require("prismjs/components/prism-rust");
199
+
200
+ // src/components/copy-button/copy-button.tsx
201
+ var import_react2 = require("react");
202
+ var import_jsx_runtime6 = require("react/jsx-runtime");
203
+ function CopyButton({ text, className = "", label, onCopy }) {
204
+ const [copied, setCopied] = (0, import_react2.useState)(false);
205
+ const handleCopy = (0, import_react2.useCallback)(async () => {
206
+ await navigator.clipboard.writeText(text);
207
+ setCopied(true);
208
+ setTimeout(() => setCopied(false), 2e3);
209
+ onCopy?.();
210
+ }, [text, onCopy]);
211
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
212
+ "button",
213
+ {
214
+ onClick: handleCopy,
215
+ className: `inline-flex items-center gap-1.5 px-2 py-1 text-xs text-text-muted
216
+ rounded-sm border border-white/[0.08] transition-colors duration-75 hover:bg-white/[0.06] hover:text-text-primary ${className}`,
217
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
218
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 8.5l3 3 7-7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }),
219
+ label ? "Copied!" : null
220
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
221
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", children: [
222
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "5", y: "5", width: "8", height: "8", rx: "1.5", stroke: "currentColor", strokeWidth: "1.5" }),
223
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M3 11V3.5A.5.5 0 013.5 3H11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
224
+ ] }),
225
+ label ?? null
226
+ ] })
227
+ }
228
+ );
229
+ }
230
+
231
+ // src/components/code-block/code-block.tsx
232
+ var import_jsx_runtime7 = require("react/jsx-runtime");
233
+ function CodeBlock({ code, language = "bash", showCopy = true, className = "" }) {
234
+ const highlightedHtml = (0, import_react3.useMemo)(() => {
235
+ if (code.length >= 5e4 || !import_prismjs.default.languages[language]) return null;
236
+ return import_prismjs.default.highlight(code, import_prismjs.default.languages[language], language);
237
+ }, [code, language]);
238
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `group relative bg-code-bg ${className}`, children: [
239
+ showCopy && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute right-2 top-2 opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CopyButton, { text: code }) }),
240
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("pre", { className: `language-${language} !bg-code-bg !m-0`, children: highlightedHtml != null ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { className: `language-${language}`, dangerouslySetInnerHTML: { __html: highlightedHtml } }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("code", { className: `language-${language}`, children: code }) })
241
+ ] });
242
+ }
243
+
244
+ // src/components/dialog/dialog.tsx
245
+ var import_react4 = require("react");
246
+ var import_jsx_runtime8 = require("react/jsx-runtime");
247
+ function Dialog({ open, onOpenChange, children }) {
248
+ (0, import_react4.useEffect)(() => {
249
+ if (open) {
250
+ document.body.style.overflow = "hidden";
251
+ } else {
252
+ document.body.style.overflow = "unset";
253
+ }
254
+ return () => {
255
+ document.body.style.overflow = "unset";
256
+ };
257
+ }, [open]);
258
+ (0, import_react4.useEffect)(() => {
259
+ const handleEscape = (e) => {
260
+ if (e.key === "Escape") onOpenChange(false);
261
+ };
262
+ if (open) {
263
+ document.addEventListener("keydown", handleEscape);
264
+ }
265
+ return () => {
266
+ document.removeEventListener("keydown", handleEscape);
267
+ };
268
+ }, [open, onOpenChange]);
269
+ if (!open) return null;
270
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
271
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "fixed inset-0 bg-black/60", onClick: () => onOpenChange(false) }),
272
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "relative z-50", children })
273
+ ] });
274
+ }
275
+ var DialogContent = (0, import_react4.forwardRef)(
276
+ ({ className = "", children }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
277
+ "div",
278
+ {
279
+ ref,
280
+ className: `relative w-full max-w-lg mx-4 bg-white/[0.04] backdrop-blur-2xl border border-white/[0.10] rounded-[var(--radius-lg)] shadow-xl ${className}`,
281
+ onClick: (e) => e.stopPropagation(),
282
+ children
283
+ }
284
+ )
285
+ );
286
+ DialogContent.displayName = "DialogContent";
287
+ function DialogHeader({ children, className = "" }) {
288
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `flex flex-col gap-1.5 p-6 border-b border-white/[0.06] ${className}`, children });
289
+ }
290
+ var DialogTitle = (0, import_react4.forwardRef)(
291
+ ({ children, className = "" }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { ref, className: `text-base font-semibold text-text-primary ${className}`, children })
292
+ );
293
+ DialogTitle.displayName = "DialogTitle";
294
+ var DialogDescription = (0, import_react4.forwardRef)(
295
+ ({ children, className = "" }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { ref, className: `text-sm text-text-muted ${className}`, children })
296
+ );
297
+ DialogDescription.displayName = "DialogDescription";
298
+ var DialogClose = (0, import_react4.forwardRef)(
299
+ ({ className = "", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
300
+ "button",
301
+ {
302
+ ref,
303
+ className: `absolute right-4 top-4 h-6 w-6 flex items-center justify-center text-text-muted hover:text-text-primary transition-colors ${className}`,
304
+ "aria-label": "Close",
305
+ ...props,
306
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
307
+ }
308
+ )
309
+ );
310
+ DialogClose.displayName = "DialogClose";
311
+ function DialogFooter({ children, className = "" }) {
312
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `flex justify-end gap-3 p-6 border-t border-white/[0.06] ${className}`, children });
313
+ }
314
+
315
+ // src/components/empty-state/empty-state.tsx
316
+ var import_jsx_runtime9 = require("react/jsx-runtime");
317
+ function EmptyState({ icon, title, description, action }) {
318
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
319
+ icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mb-4 text-text-muted", children: icon }),
320
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h3", { className: "text-sm font-medium text-text-primary", children: title }),
321
+ description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: "mt-1 text-sm text-text-muted", children: description }),
322
+ action && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-4", children: action })
323
+ ] });
324
+ }
325
+
326
+ // src/components/input/input.tsx
327
+ var import_react5 = require("react");
328
+ var import_jsx_runtime10 = require("react/jsx-runtime");
329
+ var Input = (0, import_react5.forwardRef)(
330
+ ({ label, error, className = "", id, ...props }, ref) => {
331
+ const inputId = id || label?.toLowerCase().replace(/\s+/g, "-");
332
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
333
+ label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("label", { htmlFor: inputId, className: "text-sm font-medium text-text-secondary", children: label }),
334
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
335
+ "input",
336
+ {
337
+ ref,
338
+ id: inputId,
339
+ className: `h-9 rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 text-sm text-text-primary
340
+ placeholder:text-text-muted
341
+ focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary
342
+ disabled:cursor-not-allowed disabled:opacity-50
343
+ ${error ? "border-status-error" : ""} ${className}`,
344
+ ...props
345
+ }
346
+ ),
347
+ error && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-xs text-status-error", children: error })
348
+ ] });
349
+ }
350
+ );
351
+ Input.displayName = "Input";
352
+
353
+ // src/components/kbd/kbd.tsx
354
+ var import_jsx_runtime11 = require("react/jsx-runtime");
355
+ function Kbd({ children, className = "" }) {
356
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
357
+ "kbd",
358
+ {
359
+ className: `inline-flex h-5 min-w-5 items-center justify-center rounded border border-white/[0.08]
360
+ bg-white/[0.06] px-1.5 font-mono text-[10px] font-medium text-text-muted ${className}`,
361
+ children
362
+ }
363
+ );
364
+ }
365
+
366
+ // src/components/loading/loading.tsx
367
+ var import_jsx_runtime12 = require("react/jsx-runtime");
368
+ function Loading({ text = "Loading", className = "" }) {
369
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: `flex items-center gap-1 text-text-muted text-sm font-mono ${className}`, children: [
370
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: text }),
371
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "flex gap-0.5", children: [
372
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "animate-pulse", style: { animationDelay: "0ms" }, children: "." }),
373
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "animate-pulse", style: { animationDelay: "200ms" }, children: "." }),
374
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "animate-pulse", style: { animationDelay: "400ms" }, children: "." })
375
+ ] })
376
+ ] });
377
+ }
378
+
379
+ // src/components/modal/modal.tsx
380
+ var import_react6 = require("react");
381
+ var import_jsx_runtime13 = require("react/jsx-runtime");
382
+ function Modal({ open, onClose, title, children, className = "" }) {
383
+ const handleKeyDown = (0, import_react6.useCallback)(
384
+ (e) => {
385
+ if (e.key === "Escape") onClose();
386
+ },
387
+ [onClose]
388
+ );
389
+ (0, import_react6.useEffect)(() => {
390
+ if (open) {
391
+ document.addEventListener("keydown", handleKeyDown);
392
+ document.body.style.overflow = "hidden";
393
+ }
394
+ return () => {
395
+ document.removeEventListener("keydown", handleKeyDown);
396
+ document.body.style.overflow = "";
397
+ };
398
+ }, [open, handleKeyDown]);
399
+ if (!open) return null;
400
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "fixed inset-0 z-50 flex items-center justify-center", children: [
401
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "absolute inset-0 bg-black/60", onClick: onClose }),
402
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
403
+ "div",
404
+ {
405
+ className: `relative w-full max-w-md rounded-[var(--radius-lg)] border border-white/[0.10] bg-white/[0.04] backdrop-blur-2xl p-6 shadow-xl ${className}`,
406
+ children: [
407
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
408
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h2", { className: "text-base font-semibold text-text-primary", children: title }),
409
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
410
+ "button",
411
+ {
412
+ onClick: onClose,
413
+ className: "p-1 text-text-muted transition-colors rounded-sm hover:bg-white/[0.06]",
414
+ "aria-label": "Close",
415
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
416
+ }
417
+ )
418
+ ] }),
419
+ children
420
+ ]
421
+ }
422
+ )
423
+ ] });
424
+ }
425
+
426
+ // src/components/nav-tabs/nav-tabs.tsx
427
+ var import_jsx_runtime14 = require("react/jsx-runtime");
428
+ var variantStyles3 = {
429
+ underline: {
430
+ container: "flex border-b border-white/[0.06] bg-white/[0.04]",
431
+ item: "px-5 py-2.5 font-mono text-xs uppercase tracking-wider transition-colors border-b-2",
432
+ active: "border-primary font-bold text-text-primary",
433
+ inactive: "border-transparent text-text-muted hover:text-text-primary"
434
+ },
435
+ pill: {
436
+ container: "flex items-center gap-1",
437
+ item: "px-3 py-2 text-sm font-medium transition-colors rounded-lg",
438
+ active: "bg-white/[0.06] text-text-primary",
439
+ inactive: "text-text-muted hover:bg-white/[0.04] hover:text-text-primary"
440
+ }
441
+ };
442
+ function NavTabs({ items, variant = "underline", className = "", renderLink }) {
443
+ const styles = variantStyles3[variant];
444
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("nav", { className: `${styles.container} ${className}`, children: items.map((item) => {
445
+ const itemClassName = `${styles.item} ${item.isActive ? styles.active : styles.inactive}`;
446
+ if (renderLink) {
447
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: renderLink({ href: item.href, className: itemClassName, children: item.label }) }, item.href);
448
+ }
449
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: item.href, className: itemClassName, children: item.label }, item.href);
450
+ }) });
451
+ }
452
+
453
+ // src/components/section-header/section-header.tsx
454
+ var import_jsx_runtime15 = require("react/jsx-runtime");
455
+ function SectionHeader({ title, badge, className = "" }) {
456
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: `flex items-center justify-between bg-white/[0.06] px-3 py-2.5 rounded-t-xl ${className}`, children: [
457
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs font-semibold text-text-secondary", children: title }),
458
+ badge
459
+ ] });
460
+ }
461
+
462
+ // src/components/select/select.tsx
463
+ var import_react7 = require("react");
464
+ var import_jsx_runtime16 = require("react/jsx-runtime");
465
+ var Select = (0, import_react7.forwardRef)(
466
+ ({ label, options, className = "", id, ...props }, ref) => {
467
+ const selectId = id || label?.toLowerCase().replace(/\s+/g, "-");
468
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
469
+ label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: selectId, className: "text-sm font-medium text-text-secondary", children: label }),
470
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
471
+ "select",
472
+ {
473
+ ref,
474
+ id: selectId,
475
+ className: `h-9 rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 text-sm text-text-primary
476
+ focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary
477
+ disabled:cursor-not-allowed disabled:opacity-50
478
+ ${className}`,
479
+ ...props,
480
+ children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
481
+ }
482
+ )
483
+ ] });
484
+ }
485
+ );
486
+ Select.displayName = "Select";
487
+
488
+ // src/components/separator/separator.tsx
489
+ var import_jsx_runtime17 = require("react/jsx-runtime");
490
+ function Separator({ className = "" }) {
491
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `mx-1 h-5 w-px shrink-0 bg-white/[0.12] ${className}` });
492
+ }
493
+
494
+ // src/components/skeleton/skeleton.tsx
495
+ var import_jsx_runtime18 = require("react/jsx-runtime");
496
+ function Skeleton({ className = "" }) {
497
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
498
+ "div",
499
+ {
500
+ className: `rounded-lg bg-white/[0.06] animate-pulse ${className}`
501
+ }
502
+ );
503
+ }
504
+
505
+ // src/components/sparkline/sparkline.tsx
506
+ var import_jsx_runtime19 = require("react/jsx-runtime");
507
+ function Sparkline({ trend, className = "" }) {
508
+ const max = Math.max(...trend);
509
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: `flex items-end gap-px h-4 ${className}`, children: trend.map((v, i) => {
510
+ const h = Math.max(2, Math.round(v / max * 14));
511
+ const col = v >= 10 ? "bg-status-error" : v >= 7 ? "bg-status-warning" : "bg-text-muted";
512
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: `w-[3px] rounded-full ${col}`, style: { height: `${h}px` } }, i);
513
+ }) });
514
+ }
515
+
516
+ // src/components/spinner/spinner.tsx
517
+ var import_jsx_runtime20 = require("react/jsx-runtime");
518
+ var sizeMap = { sm: "h-4 w-4", md: "h-5 w-5", lg: "h-6 w-6" };
519
+ function Spinner({ size = "md", className = "" }) {
520
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
521
+ "svg",
522
+ {
523
+ className: `animate-spin text-text-muted ${sizeMap[size]} ${className}`,
524
+ viewBox: "0 0 24 24",
525
+ fill: "none",
526
+ role: "status",
527
+ "aria-label": "Loading",
528
+ children: [
529
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2.5", opacity: "0.2" }),
530
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
531
+ "path",
532
+ {
533
+ d: "M12 2a10 10 0 019.95 9",
534
+ stroke: "currentColor",
535
+ strokeWidth: "2.5",
536
+ strokeLinecap: "round"
537
+ }
538
+ )
539
+ ]
540
+ }
541
+ );
542
+ }
543
+
544
+ // src/components/status-bar/status-bar.tsx
545
+ var import_jsx_runtime21 = require("react/jsx-runtime");
546
+ var dotColors = {
547
+ success: "bg-status-success",
548
+ warning: "bg-status-warning",
549
+ danger: "bg-status-error",
550
+ idle: "bg-text-muted"
551
+ };
552
+ function StatusBar({ items, trailing, className = "" }) {
553
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `flex h-7 shrink-0 items-center gap-4 border-t border-white/[0.06] bg-white/[0.04] px-4 ${className}`, children: [
554
+ items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center gap-1.5 text-xs text-text-muted", children: [
555
+ item.dot && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: `inline-block h-1.5 w-1.5 rounded-full ${dotColors[item.dot]}` }),
556
+ item.label
557
+ ] }, i)),
558
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "ml-auto text-xs text-text-muted", children: trailing })
559
+ ] });
560
+ }
561
+
562
+ // src/components/table/table.tsx
563
+ var import_jsx_runtime22 = require("react/jsx-runtime");
564
+ function Table({ children, className = "" }) {
565
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "w-full overflow-x-auto rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("table", { className: `w-full text-sm ${className}`, children }) });
566
+ }
567
+ function TableHead({ children }) {
568
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("thead", { className: "border-b border-white/[0.06]", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children }) });
569
+ }
570
+ function TableHeader({ children, className = "", onClick }) {
571
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
572
+ "th",
573
+ {
574
+ className: `px-4 py-3 text-left text-xs font-medium text-text-muted ${onClick ? "cursor-pointer select-none hover:text-text-primary" : ""} ${className}`,
575
+ onClick,
576
+ children
577
+ }
578
+ );
579
+ }
580
+ function TableBody({ children }) {
581
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { className: "divide-y divide-white/[0.06]", children });
582
+ }
583
+ function TableRow({ children, className = "", onClick }) {
584
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { className: `hover:bg-white/[0.04] transition-colors ${onClick ? "cursor-pointer" : ""} ${className}`, onClick, children });
585
+ }
586
+ function TableCell({ children, className = "" }) {
587
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: `px-4 py-3.5 text-text-secondary ${className}`, children });
588
+ }
589
+
590
+ // src/components/tabs/tabs.tsx
591
+ var import_jsx_runtime23 = require("react/jsx-runtime");
592
+ function Tabs({ tabs, value, onChange, className = "" }) {
593
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: `flex gap-1 rounded-[var(--radius-lg)] border border-white/[0.08] bg-white/[0.04] p-1 ${className}`, children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
594
+ "button",
595
+ {
596
+ onClick: () => onChange(tab.value),
597
+ className: `px-3 py-1.5 text-sm font-medium transition-all rounded-md
598
+ ${value === tab.value ? "bg-white/[0.08] text-text-primary" : "text-text-muted hover:bg-white/[0.04] hover:text-text-primary"}`,
599
+ children: tab.label
600
+ },
601
+ tab.value
602
+ )) });
603
+ }
604
+
605
+ // src/components/toggle/toggle.tsx
606
+ var import_jsx_runtime24 = require("react/jsx-runtime");
607
+ function Toggle({ options, value, onChange, className = "" }) {
608
+ const [left, right] = options;
609
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: `inline-flex items-center gap-2 text-sm ${className}`, children: [
610
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
611
+ "span",
612
+ {
613
+ className: `cursor-pointer transition-colors ${value === left ? "text-text-primary" : "text-text-muted"}`,
614
+ onClick: () => onChange(left),
615
+ children: left
616
+ }
617
+ ),
618
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
619
+ "button",
620
+ {
621
+ onClick: () => onChange(value === left ? right : left),
622
+ className: `relative w-10 h-5 rounded-none transition-colors border-2 border-white/[0.08] ${value === right ? "bg-primary" : "bg-white/[0.04]"}`,
623
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
624
+ "span",
625
+ {
626
+ className: `absolute top-0.5 w-4 h-4 rounded-none transition-transform bg-text-primary ${value === right ? "translate-x-5" : "translate-x-0.5"}`
627
+ }
628
+ )
629
+ }
630
+ ),
631
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
632
+ "span",
633
+ {
634
+ className: `cursor-pointer transition-colors ${value === right ? "text-text-primary" : "text-text-muted"}`,
635
+ onClick: () => onChange(right),
636
+ children: right
637
+ }
638
+ )
639
+ ] });
640
+ }
641
+ // Annotate the CommonJS export names for ESM import in node:
642
+ 0 && (module.exports = {
643
+ Badge,
644
+ Button,
645
+ Card,
646
+ CardContent,
647
+ CardDescription,
648
+ CardFooter,
649
+ CardHeader,
650
+ CardTitle,
651
+ Chip,
652
+ ChipGroup,
653
+ CodeBlock,
654
+ CopyButton,
655
+ Dialog,
656
+ DialogClose,
657
+ DialogContent,
658
+ DialogDescription,
659
+ DialogFooter,
660
+ DialogHeader,
661
+ DialogTitle,
662
+ EmptyState,
663
+ Input,
664
+ Kbd,
665
+ Loading,
666
+ Modal,
667
+ NavTabs,
668
+ SectionHeader,
669
+ Select,
670
+ Separator,
671
+ Skeleton,
672
+ Sparkline,
673
+ Spinner,
674
+ StatusBar,
675
+ Table,
676
+ TableBody,
677
+ TableCell,
678
+ TableHead,
679
+ TableHeader,
680
+ TableRow,
681
+ Tabs,
682
+ Toggle
683
+ });
684
+ //# sourceMappingURL=index.cjs.map