@annondeveloper/ui-kit 0.1.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 (69) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +215 -0
  3. package/dist/chunk-5OKSXPWK.js +270 -0
  4. package/dist/chunk-5OKSXPWK.js.map +1 -0
  5. package/dist/cli/index.js +430 -0
  6. package/dist/form.d.ts +65 -0
  7. package/dist/form.js +148 -0
  8. package/dist/form.js.map +1 -0
  9. package/dist/index.d.ts +942 -0
  10. package/dist/index.js +2812 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/select-nnBJUO8U.d.ts +26 -0
  13. package/package.json +114 -0
  14. package/src/components/animated-counter.stories.tsx +68 -0
  15. package/src/components/animated-counter.tsx +85 -0
  16. package/src/components/avatar.tsx +106 -0
  17. package/src/components/badge.stories.tsx +70 -0
  18. package/src/components/badge.tsx +97 -0
  19. package/src/components/button.stories.tsx +101 -0
  20. package/src/components/button.tsx +67 -0
  21. package/src/components/card.tsx +128 -0
  22. package/src/components/checkbox.stories.tsx +64 -0
  23. package/src/components/checkbox.tsx +58 -0
  24. package/src/components/confirm-dialog.stories.tsx +96 -0
  25. package/src/components/confirm-dialog.tsx +145 -0
  26. package/src/components/data-table.stories.tsx +125 -0
  27. package/src/components/data-table.tsx +791 -0
  28. package/src/components/dropdown-menu.tsx +111 -0
  29. package/src/components/empty-state.stories.tsx +42 -0
  30. package/src/components/empty-state.tsx +43 -0
  31. package/src/components/filter-pill.stories.tsx +71 -0
  32. package/src/components/filter-pill.tsx +45 -0
  33. package/src/components/form-input.stories.tsx +91 -0
  34. package/src/components/form-input.tsx +77 -0
  35. package/src/components/log-viewer.tsx +212 -0
  36. package/src/components/metric-card.tsx +141 -0
  37. package/src/components/pipeline-stage.tsx +134 -0
  38. package/src/components/popover.tsx +72 -0
  39. package/src/components/port-status-grid.tsx +102 -0
  40. package/src/components/progress.tsx +128 -0
  41. package/src/components/radio-group.tsx +162 -0
  42. package/src/components/select.stories.tsx +52 -0
  43. package/src/components/select.tsx +92 -0
  44. package/src/components/severity-timeline.tsx +125 -0
  45. package/src/components/sheet.tsx +164 -0
  46. package/src/components/skeleton.stories.tsx +64 -0
  47. package/src/components/skeleton.tsx +62 -0
  48. package/src/components/slider.tsx +208 -0
  49. package/src/components/sparkline.tsx +104 -0
  50. package/src/components/status-badge.stories.tsx +84 -0
  51. package/src/components/status-badge.tsx +71 -0
  52. package/src/components/status-pulse.stories.tsx +56 -0
  53. package/src/components/status-pulse.tsx +78 -0
  54. package/src/components/success-checkmark.stories.tsx +67 -0
  55. package/src/components/success-checkmark.tsx +53 -0
  56. package/src/components/tabs.tsx +177 -0
  57. package/src/components/threshold-gauge.tsx +149 -0
  58. package/src/components/time-range-selector.tsx +86 -0
  59. package/src/components/toast.stories.tsx +70 -0
  60. package/src/components/toast.tsx +48 -0
  61. package/src/components/toggle-switch.stories.tsx +66 -0
  62. package/src/components/toggle-switch.tsx +51 -0
  63. package/src/components/tooltip.tsx +62 -0
  64. package/src/components/truncated-text.stories.tsx +56 -0
  65. package/src/components/truncated-text.tsx +80 -0
  66. package/src/components/uptime-tracker.tsx +138 -0
  67. package/src/components/utilization-bar.tsx +103 -0
  68. package/src/theme.css +178 -0
  69. package/src/utils.ts +123 -0
@@ -0,0 +1,942 @@
1
+ import { ClassValue } from 'clsx';
2
+ import * as react from 'react';
3
+ import { ButtonHTMLAttributes, InputHTMLAttributes, ReactNode, HTMLAttributes, ElementType } from 'react';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { LucideIcon } from 'lucide-react';
6
+ export { a as Select, S as SelectOption, b as SelectProps } from './select-nnBJUO8U.js';
7
+ import { ColumnDef } from '@tanstack/react-table';
8
+ export { toast } from 'sonner';
9
+
10
+ /** Merge Tailwind CSS class names with conflict resolution. */
11
+ declare function cn(...inputs: ClassValue[]): string;
12
+ /** Format bits/sec into human-readable string (clamps negative to 0). */
13
+ declare function fmtBps(bps: number): string;
14
+ /** Format link speed for interface display (e.g. 1000000000 -> "1G"). */
15
+ declare function fmtSpeed(bps: number): string;
16
+ /** Format utilization as percentage of link speed. */
17
+ declare function fmtUtil(bps: number, speedBps: number): string;
18
+ /** Format bytes into human-readable string. */
19
+ declare function fmtBytes(bytes: number): string;
20
+ /** Format percent. */
21
+ declare function fmtPct(v: number, decimals?: number): string;
22
+ /** Format duration in seconds to human-readable uptime string. */
23
+ declare function fmtUptime(secs: number): string;
24
+ /** Format ISO timestamp to relative time ("3m ago"). */
25
+ declare function fmtRelative(isoStr: string): string;
26
+ /** Format large numbers compactly (e.g. 480933305 -> "480.9M", 1234 -> "1.2K"). */
27
+ declare function fmtCompact(n: number): string;
28
+ /** Format seconds duration compactly (e.g. for replication lag display). */
29
+ declare function fmtDuration(secs: number): string;
30
+ /** Strip CIDR suffix from IP address (e.g. "10.0.0.1/32" -> "10.0.0.1"). */
31
+ declare function stripCidr(ip: string): string;
32
+ /** Clamp a number between min and max. */
33
+ declare function clamp(v: number, min: number, max: number): number;
34
+ /** Color thresholds for utilization percentage mapping. */
35
+ interface UtilColorMap {
36
+ high: {
37
+ threshold: number;
38
+ className: string;
39
+ };
40
+ medium: {
41
+ threshold: number;
42
+ className: string;
43
+ };
44
+ low: {
45
+ className: string;
46
+ };
47
+ }
48
+ /** Default utilization color map using CSS custom property token classes. */
49
+ declare const defaultUtilColorMap: UtilColorMap;
50
+ /**
51
+ * Get utilization color class from value 0-100.
52
+ * Accepts an optional color map to override the default thresholds and classes.
53
+ */
54
+ declare function utilColor(pct: number, colorMap?: UtilColorMap): string;
55
+
56
+ type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'outline' | 'ghost';
57
+ type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
58
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
59
+ /** Visual variant of the button. */
60
+ variant?: ButtonVariant;
61
+ /** Size preset. */
62
+ size?: ButtonSize;
63
+ /** Show a loading spinner and disable interaction. */
64
+ loading?: boolean;
65
+ }
66
+ /**
67
+ * @description A themed button with variant, size, and loading support.
68
+ * Uses CSS custom property tokens for dark/light mode compatibility.
69
+ */
70
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
71
+
72
+ type BadgeColor = 'brand' | 'blue' | 'green' | 'yellow' | 'red' | 'orange' | 'purple' | 'pink' | 'teal' | 'gray';
73
+ interface BadgeProps {
74
+ children: React.ReactNode;
75
+ /** Color preset for the badge. */
76
+ color?: BadgeColor;
77
+ /** Optional icon displayed before the label. */
78
+ icon?: LucideIcon;
79
+ /** Size variant. */
80
+ size?: 'xs' | 'sm' | 'md';
81
+ className?: string;
82
+ }
83
+ /**
84
+ * @description A themed pill badge with color presets and optional icon.
85
+ * Supports xs, sm, and md sizes with dark/light mode via CSS tokens.
86
+ */
87
+ declare function Badge({ children, color, icon: Icon, size, className, }: BadgeProps): react_jsx_runtime.JSX.Element;
88
+ interface BadgeVariantConfig<T extends string> {
89
+ /** Map from value to BadgeColor. */
90
+ colorMap: Partial<Record<T, BadgeColor>>;
91
+ /** Map from value to display label. Falls back to the value itself. */
92
+ labelMap?: Partial<Record<T, string>>;
93
+ /** Default color when value is not found in colorMap. */
94
+ defaultColor?: BadgeColor;
95
+ /** Default size for the badge. */
96
+ defaultSize?: 'xs' | 'sm' | 'md';
97
+ }
98
+ /**
99
+ * @description Factory function to create domain-specific badge components.
100
+ * Accepts a color map and optional label map, returns a typed Badge component.
101
+ *
102
+ * @example
103
+ * ```tsx
104
+ * const SeverityBadge = createBadgeVariant({
105
+ * colorMap: { critical: 'red', warning: 'yellow', info: 'blue' },
106
+ * labelMap: { critical: 'Critical', warning: 'Warning', info: 'Info' },
107
+ * })
108
+ * // Usage: <SeverityBadge value="critical" />
109
+ * ```
110
+ */
111
+ declare function createBadgeVariant<T extends string>(config: BadgeVariantConfig<T>): ({ value, className }: {
112
+ value: T;
113
+ className?: string;
114
+ }) => react_jsx_runtime.JSX.Element;
115
+
116
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
117
+ /** Show an indeterminate (minus) indicator instead of a checkmark. */
118
+ indeterminate?: boolean;
119
+ /** Size variant. */
120
+ size?: 'sm' | 'md';
121
+ }
122
+ /**
123
+ * @description A themed checkbox with indeterminate state support.
124
+ * Uses CSS custom property tokens for dark/light mode compatibility.
125
+ */
126
+ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
127
+
128
+ interface ToggleSwitchProps {
129
+ /** Whether the toggle is on. */
130
+ enabled: boolean;
131
+ /** Callback when toggled. */
132
+ onChange: (enabled: boolean) => void;
133
+ /** Size variant. */
134
+ size?: 'sm' | 'md';
135
+ /** Disable the toggle. */
136
+ disabled?: boolean;
137
+ /** Accessible label. */
138
+ label?: string;
139
+ className?: string;
140
+ }
141
+ /**
142
+ * @description A themed toggle switch using lucide icons for on/off states.
143
+ * Supports dark/light mode via CSS custom property tokens.
144
+ */
145
+ declare function ToggleSwitch({ enabled, onChange, size, disabled, label, className, }: ToggleSwitchProps): react_jsx_runtime.JSX.Element;
146
+
147
+ declare const INPUT_CLS: string;
148
+ declare const LABEL_CLS: string;
149
+ declare const TEXTAREA_CLS: string;
150
+ interface FormInputProps {
151
+ /** Label text displayed above the input. */
152
+ label: string;
153
+ /** Current input value. */
154
+ value: string;
155
+ /** Callback when value changes. */
156
+ onChange: (value: string) => void;
157
+ /** HTML input type. */
158
+ type?: string;
159
+ /** Placeholder text. */
160
+ placeholder?: string;
161
+ /** Mark the field as required. */
162
+ required?: boolean;
163
+ /** Disable the input. */
164
+ disabled?: boolean;
165
+ /** Help text shown below the input. */
166
+ hint?: string;
167
+ className?: string;
168
+ /** HTML autocomplete attribute. */
169
+ autoComplete?: string;
170
+ }
171
+ /**
172
+ * @description A themed form input with label, validation indicator, and optional hint text.
173
+ * Uses CSS custom property tokens for dark/light mode compatibility.
174
+ */
175
+ declare function FormInput({ label, value, onChange, type, placeholder, required, disabled, hint, className, autoComplete, }: FormInputProps): react_jsx_runtime.JSX.Element;
176
+
177
+ interface FilterPillProps {
178
+ /** Label text for the pill. */
179
+ label: string;
180
+ /** Optional count displayed after the label. */
181
+ count?: number;
182
+ /** Whether this pill is currently active/selected. */
183
+ active: boolean;
184
+ /** Click handler. */
185
+ onClick: () => void;
186
+ className?: string;
187
+ }
188
+ /**
189
+ * @description A rounded pill-style filter toggle with active state and optional count.
190
+ * Uses CSS custom property tokens for dark/light mode compatibility.
191
+ */
192
+ declare function FilterPill({ label, count, active, onClick, className }: FilterPillProps): react_jsx_runtime.JSX.Element;
193
+
194
+ interface EmptyStateProps {
195
+ /** Icon component displayed in the center. */
196
+ icon: LucideIcon;
197
+ /** Title text. */
198
+ title: string;
199
+ /** Description text. */
200
+ description: string;
201
+ /** Optional action buttons rendered below the description. */
202
+ actions?: React.ReactNode;
203
+ className?: string;
204
+ }
205
+ /**
206
+ * @description A decorative empty state placeholder with icon, title, description, and optional actions.
207
+ * Features a subtle gradient background and glass-morphism styling.
208
+ */
209
+ declare function EmptyState({ icon: Icon, title, description, actions, className }: EmptyStateProps): react_jsx_runtime.JSX.Element;
210
+
211
+ /**
212
+ * @description A shimmer skeleton loader block. Requires the `skeleton-shimmer` CSS class
213
+ * from theme.css to animate.
214
+ */
215
+ declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
216
+ interface SkeletonTextProps {
217
+ /** Number of text lines to render. */
218
+ lines?: number;
219
+ className?: string;
220
+ }
221
+ /**
222
+ * @description A multi-line skeleton text placeholder. The last line renders shorter
223
+ * for a natural paragraph appearance.
224
+ */
225
+ declare function SkeletonText({ lines, className }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
226
+ /**
227
+ * @description A card-shaped skeleton placeholder with header area and content bars.
228
+ */
229
+ declare function SkeletonCard({ className }: {
230
+ className?: string;
231
+ }): react_jsx_runtime.JSX.Element;
232
+
233
+ interface TruncatedTextProps {
234
+ /** The full text to display (truncated if it overflows). */
235
+ text: string;
236
+ /** Max width constraint for truncation. */
237
+ maxWidth?: string | number;
238
+ className?: string;
239
+ }
240
+ /**
241
+ * @description A text element that truncates with ellipsis and shows a tooltip with the
242
+ * full text on hover when truncated. Includes a copy-to-clipboard button in the tooltip.
243
+ */
244
+ declare function TruncatedText({ text, maxWidth, className }: TruncatedTextProps): react_jsx_runtime.JSX.Element;
245
+
246
+ interface ConfirmDialogProps {
247
+ /** Whether the dialog is open. */
248
+ open: boolean;
249
+ /** Callback to control open state. */
250
+ onOpenChange: (open: boolean) => void;
251
+ /** Dialog title. */
252
+ title: string;
253
+ /** Dialog description text. */
254
+ description: string;
255
+ /** Label for the confirm button. */
256
+ confirmLabel?: string;
257
+ /** Label for the cancel button. */
258
+ cancelLabel?: string;
259
+ /** Visual variant affecting the icon and confirm button color. */
260
+ variant?: 'danger' | 'warning' | 'default';
261
+ /** Show a loading spinner on the confirm button. */
262
+ loading?: boolean;
263
+ /** Callback when confirmed. */
264
+ onConfirm: () => void;
265
+ }
266
+ /**
267
+ * @description A confirmation dialog built on Radix AlertDialog with Framer Motion animations.
268
+ * Supports danger, warning, and default variants with loading state.
269
+ */
270
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, variant, loading, onConfirm, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
271
+
272
+ interface AnimatedCounterProps {
273
+ /** The target numeric value to animate to. */
274
+ value: number;
275
+ /** Animation duration in milliseconds. */
276
+ duration?: number;
277
+ className?: string;
278
+ /** Custom formatting function for the displayed number. */
279
+ format?: (n: number) => string;
280
+ }
281
+ /**
282
+ * @description An animated number counter that transitions smoothly between values
283
+ * using requestAnimationFrame. Respects prefers-reduced-motion.
284
+ */
285
+ declare function AnimatedCounter({ value, duration, className, format, }: AnimatedCounterProps): react_jsx_runtime.JSX.Element;
286
+
287
+ interface SuccessCheckmarkProps {
288
+ /** Size of the SVG in pixels. */
289
+ size?: number;
290
+ className?: string;
291
+ }
292
+ /**
293
+ * @description An animated success checkmark SVG with circle and path draw animations.
294
+ * Uses Framer Motion spring physics. Respects prefers-reduced-motion.
295
+ */
296
+ declare function SuccessCheckmark({ size, className }: SuccessCheckmarkProps): react_jsx_runtime.JSX.Element;
297
+
298
+ /** Configuration for a single status entry in a StatusBadge. */
299
+ interface StatusConfig {
300
+ /** Display label. */
301
+ label: string;
302
+ /** CSS class for the status dot. */
303
+ dot: string;
304
+ /** CSS class for the text color. */
305
+ text: string;
306
+ /** CSS class for the background color. */
307
+ bg: string;
308
+ }
309
+ /** A sensible default status map covering common statuses. */
310
+ declare const defaultStatusMap: Record<string, StatusConfig>;
311
+ interface StatusBadgeProps {
312
+ /** Status key to look up in the status map. */
313
+ status: string;
314
+ /** Override display label. */
315
+ label?: string;
316
+ /** Size variant. */
317
+ size?: 'sm' | 'md';
318
+ /** Show a CSS pulse animation on the dot. */
319
+ pulse?: boolean;
320
+ /** Custom status map. Falls back to defaultStatusMap. */
321
+ statusMap?: Record<string, StatusConfig>;
322
+ className?: string;
323
+ }
324
+ /**
325
+ * @description A status badge with colored dot indicator and label.
326
+ * Accepts a configurable statusMap to define custom status values and their appearance.
327
+ * Falls back to a built-in default map if none is provided.
328
+ */
329
+ declare function StatusBadge({ status, label, size, pulse, statusMap, className, }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
330
+
331
+ /** Configuration for a single status in StatusPulse. */
332
+ interface PulseConfig {
333
+ /** CSS class for the solid dot. */
334
+ dot: string;
335
+ /** CSS class for the pulse ring. */
336
+ ring: string;
337
+ /** Whether to show the pulse ring animation. */
338
+ pulse: boolean;
339
+ /** Use faster animation (e.g. for degraded states). */
340
+ fast: boolean;
341
+ }
342
+ /** Default pulse configuration map for common statuses. */
343
+ declare const defaultPulseConfigMap: Record<string, PulseConfig>;
344
+ interface StatusPulseProps {
345
+ /** Status key to look up in the config map. */
346
+ status: string;
347
+ /** Whether to show the status label text. */
348
+ label?: boolean;
349
+ /** Custom pulse configuration map. Falls back to defaultPulseConfigMap. */
350
+ configMap?: Record<string, PulseConfig>;
351
+ className?: string;
352
+ }
353
+ /**
354
+ * @description An animated status indicator dot with optional pulse ring and label.
355
+ * Accepts a configurable map to define custom statuses. Respects prefers-reduced-motion.
356
+ */
357
+ declare function StatusPulse({ status, label, configMap, className }: StatusPulseProps): react_jsx_runtime.JSX.Element;
358
+
359
+ interface ToasterProps {
360
+ /** Theme mode. Controls Sonner's internal theming. */
361
+ theme?: 'dark' | 'light';
362
+ /** Toast position on screen. */
363
+ position?: 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center';
364
+ /** Auto-dismiss duration in milliseconds. */
365
+ duration?: number;
366
+ }
367
+ /**
368
+ * @description A pre-themed Sonner toast container. Accepts theme as a prop
369
+ * instead of reading from a hook, making it portable across applications.
370
+ * Import this Toaster once in your app layout, then use `toast()` from sonner anywhere.
371
+ */
372
+ declare function Toaster({ theme, position, duration }: ToasterProps): react_jsx_runtime.JSX.Element;
373
+
374
+ type Density = 'compact' | 'comfortable' | 'spacious';
375
+ interface DataTableProps<T> {
376
+ /** Column definitions from @tanstack/react-table. */
377
+ columns: ColumnDef<T, unknown>[];
378
+ /** Row data array. */
379
+ data: T[];
380
+ /** Show loading skeleton. */
381
+ isLoading?: boolean;
382
+ /** Custom empty state configuration. */
383
+ emptyState?: {
384
+ icon: LucideIcon;
385
+ title: string;
386
+ description: string;
387
+ };
388
+ /** Placeholder text for the search input. */
389
+ searchPlaceholder?: string;
390
+ /** Callback when a row is clicked. */
391
+ onRowClick?: (row: T) => void;
392
+ /** Default sorting configuration. */
393
+ defaultSort?: {
394
+ id: string;
395
+ desc: boolean;
396
+ };
397
+ /** Default number of rows per page. */
398
+ defaultPageSize?: number;
399
+ /** Filename for CSV export (enables export button when set). */
400
+ exportFilename?: string;
401
+ /** Make the first column sticky on horizontal scroll. */
402
+ stickyFirstColumn?: boolean;
403
+ /** Override the density setting. */
404
+ density?: Density;
405
+ }
406
+ /**
407
+ * @description A full-featured data table with search, column filters, sorting, pagination,
408
+ * density control, column visibility/reorder, CSV export, and Framer Motion row animations.
409
+ * Built on @tanstack/react-table v8.
410
+ */
411
+ declare function DataTable<T>({ columns, data, isLoading, emptyState: emptyStateProps, searchPlaceholder, onRowClick, defaultSort, defaultPageSize, exportFilename, stickyFirstColumn, density: densityProp, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
412
+
413
+ /** A single tab definition. */
414
+ interface Tab {
415
+ /** Unique value for this tab. */
416
+ value: string;
417
+ /** Display label. */
418
+ label: string;
419
+ /** Optional icon component. */
420
+ icon?: LucideIcon;
421
+ /** Whether this tab is disabled. */
422
+ disabled?: boolean;
423
+ }
424
+ interface TabsProps {
425
+ /** Array of tab definitions. */
426
+ tabs: Tab[];
427
+ /** Currently selected tab value. */
428
+ value: string;
429
+ /** Callback when a tab is selected. */
430
+ onChange: (value: string) => void;
431
+ /** Visual variant. */
432
+ variant?: 'underline' | 'pills' | 'enclosed';
433
+ /** Size preset. */
434
+ size?: 'sm' | 'md';
435
+ /** Additional class name for the root element. */
436
+ className?: string;
437
+ }
438
+ /**
439
+ * @description Accessible tabbed interface with three visual variants.
440
+ * Uses Framer Motion layoutId for animated indicator sliding between tabs.
441
+ * Supports keyboard navigation (arrow keys) and ARIA roles.
442
+ */
443
+ declare function Tabs({ tabs, value, onChange, variant, size, className, }: TabsProps): react_jsx_runtime.JSX.Element;
444
+
445
+ /** A single menu item definition. */
446
+ interface MenuItem {
447
+ /** Display label. */
448
+ label: string;
449
+ /** Optional icon component. */
450
+ icon?: LucideIcon;
451
+ /** Callback when item is clicked. */
452
+ onClick: () => void;
453
+ /** Visual variant — danger for destructive actions. */
454
+ variant?: 'default' | 'danger';
455
+ /** Whether this item is disabled. */
456
+ disabled?: boolean;
457
+ }
458
+ interface DropdownMenuProps {
459
+ /** Trigger element that opens the menu. */
460
+ trigger: ReactNode;
461
+ /** Array of menu item definitions. */
462
+ items: MenuItem[];
463
+ /** Alignment of the menu relative to the trigger. */
464
+ align?: 'start' | 'center' | 'end';
465
+ /** Additional class name for the content container. */
466
+ className?: string;
467
+ }
468
+ /**
469
+ * @description A context/action dropdown menu built on Radix DropdownMenu.
470
+ * Features Framer Motion entry/exit animations, keyboard accessibility,
471
+ * and a danger variant for destructive actions.
472
+ */
473
+ declare function DropdownMenu({ trigger, items, align, className }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
474
+
475
+ interface SheetProps {
476
+ /** Whether the sheet is open. */
477
+ open: boolean;
478
+ /** Callback to close the sheet. */
479
+ onClose: () => void;
480
+ /** Edge from which the sheet slides in. */
481
+ side?: 'right' | 'left' | 'top' | 'bottom';
482
+ /** Title displayed in the sheet header. */
483
+ title?: string;
484
+ /** Description text below the title. */
485
+ description?: string;
486
+ /** Width class for left/right sheets, height class for top/bottom. */
487
+ width?: string;
488
+ /** Sheet content. */
489
+ children: ReactNode;
490
+ /** Additional class name for the panel. */
491
+ className?: string;
492
+ }
493
+ /**
494
+ * @description A slide-over panel (drawer) from any edge of the screen.
495
+ * Features backdrop overlay, spring animation, Escape to close, backdrop click to close,
496
+ * and focus trapping within the panel.
497
+ */
498
+ declare function Sheet({ open, onClose, side, title, description, width, children, className, }: SheetProps): react_jsx_runtime.JSX.Element;
499
+
500
+ interface ProgressProps {
501
+ /** Current progress value (0-100 by default). */
502
+ value: number;
503
+ /** Maximum value. */
504
+ max?: number;
505
+ /** Optional label displayed above the bar. */
506
+ label?: string;
507
+ /** Show the current percentage value. */
508
+ showValue?: boolean;
509
+ /** Color variant. */
510
+ variant?: 'default' | 'success' | 'warning' | 'danger';
511
+ /** Height preset. */
512
+ size?: 'sm' | 'md' | 'lg';
513
+ /** Animate the fill width on value changes. */
514
+ animated?: boolean;
515
+ /** Show an indeterminate shimmer animation (ignores value). */
516
+ indeterminate?: boolean;
517
+ /** Additional class name for the root element. */
518
+ className?: string;
519
+ }
520
+ /**
521
+ * @description A progress bar with optional label, animated fill, and indeterminate mode.
522
+ * Supports multiple color variants and size presets.
523
+ */
524
+ declare function Progress({ value, max, label, showValue, variant, size, animated, indeterminate, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
525
+
526
+ interface AvatarProps {
527
+ /** Image source URL. */
528
+ src?: string;
529
+ /** Alt text for the image; used for accessibility. */
530
+ alt: string;
531
+ /** Initials fallback (e.g. "JD"). Derived from alt if not provided. */
532
+ fallback?: string;
533
+ /** Size preset. */
534
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
535
+ /** Optional status dot overlay. */
536
+ status?: 'online' | 'offline' | 'busy' | 'away';
537
+ /** Additional class name for the root element. */
538
+ className?: string;
539
+ }
540
+ /**
541
+ * @description User/entity avatar with image support and initials fallback.
542
+ * Optional status dot overlay for presence indication.
543
+ */
544
+ declare function Avatar({ src, alt, fallback, size, status, className, }: AvatarProps): react_jsx_runtime.JSX.Element;
545
+
546
+ interface PopoverProps {
547
+ /** Trigger element that opens the popover. */
548
+ trigger: ReactNode;
549
+ /** Popover content. */
550
+ children: ReactNode;
551
+ /** Side of the trigger to display the popover. */
552
+ side?: 'top' | 'right' | 'bottom' | 'left';
553
+ /** Alignment of the popover relative to the trigger. */
554
+ align?: 'start' | 'center' | 'end';
555
+ /** Additional class name for the content container. */
556
+ className?: string;
557
+ }
558
+ /**
559
+ * @description A popover wrapper built on Radix Popover with Framer Motion entry animation.
560
+ * Closes on outside click. Includes an arrow pointer.
561
+ */
562
+ declare function Popover({ trigger, children, side, align, className }: PopoverProps): react_jsx_runtime.JSX.Element;
563
+
564
+ interface SliderProps {
565
+ /** Current value. */
566
+ value: number;
567
+ /** Callback when value changes. */
568
+ onChange: (value: number) => void;
569
+ /** Minimum value. */
570
+ min?: number;
571
+ /** Maximum value. */
572
+ max?: number;
573
+ /** Step increment. */
574
+ step?: number;
575
+ /** Optional label displayed above the slider. */
576
+ label?: string;
577
+ /** Show the current value. */
578
+ showValue?: boolean;
579
+ /** Additional class name for the root element. */
580
+ className?: string;
581
+ }
582
+ /**
583
+ * @description A custom-styled range slider with keyboard accessibility.
584
+ * Features a styled track, filled portion, and draggable thumb.
585
+ * Shows current value on hover/drag via a tooltip above the thumb.
586
+ */
587
+ declare function Slider({ value, onChange, min, max, step, label, showValue, className, }: SliderProps): react_jsx_runtime.JSX.Element;
588
+
589
+ declare const variantClasses: {
590
+ readonly default: "bg-[hsl(var(--bg-surface))] border border-[hsl(var(--border-subtle))] shadow-sm";
591
+ readonly elevated: "bg-[hsl(var(--bg-elevated))] border border-[hsl(var(--border-default))] shadow-lg";
592
+ readonly outlined: "bg-transparent border border-[hsl(var(--border-default))]";
593
+ readonly interactive: "bg-[hsl(var(--bg-surface))] border border-[hsl(var(--border-subtle))] shadow-sm hover:bg-[hsl(var(--bg-elevated))] hover:border-[hsl(var(--border-default))] hover:shadow-md transition-all duration-150 cursor-pointer";
594
+ };
595
+ declare const paddingClasses: {
596
+ readonly none: "";
597
+ readonly sm: "p-3";
598
+ readonly md: "p-5";
599
+ readonly lg: "p-6";
600
+ };
601
+ interface CardProps extends HTMLAttributes<HTMLDivElement> {
602
+ /** Visual variant. */
603
+ variant?: keyof typeof variantClasses;
604
+ /** Padding preset. */
605
+ padding?: keyof typeof paddingClasses;
606
+ /** Card content. */
607
+ children: ReactNode;
608
+ }
609
+ /**
610
+ * @description A styled card container with variant and padding presets.
611
+ * Use with CardHeader, CardTitle, CardDescription, CardContent, and CardFooter
612
+ * subcomponents for semantic structure.
613
+ */
614
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
615
+ interface CardSubProps extends HTMLAttributes<HTMLDivElement> {
616
+ children: ReactNode;
617
+ }
618
+ /** Header section of a Card (flex row for title + actions). */
619
+ declare const CardHeader: react.ForwardRefExoticComponent<CardSubProps & react.RefAttributes<HTMLDivElement>>;
620
+ /** Title within a CardHeader. */
621
+ declare const CardTitle: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
622
+ children: ReactNode;
623
+ } & react.RefAttributes<HTMLHeadingElement>>;
624
+ /** Description text within a CardHeader. */
625
+ declare const CardDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & {
626
+ children: ReactNode;
627
+ } & react.RefAttributes<HTMLParagraphElement>>;
628
+ /** Main content area of a Card. */
629
+ declare const CardContent: react.ForwardRefExoticComponent<CardSubProps & react.RefAttributes<HTMLDivElement>>;
630
+ /** Footer section of a Card (typically for actions). */
631
+ declare const CardFooter: react.ForwardRefExoticComponent<CardSubProps & react.RefAttributes<HTMLDivElement>>;
632
+
633
+ /** A single radio option definition. */
634
+ interface RadioOption {
635
+ /** Unique value. */
636
+ value: string;
637
+ /** Display label. */
638
+ label: string;
639
+ /** Optional description text below the label. */
640
+ description?: string;
641
+ /** Whether this option is disabled. */
642
+ disabled?: boolean;
643
+ }
644
+ interface RadioGroupProps {
645
+ /** Array of radio option definitions. */
646
+ options: RadioOption[];
647
+ /** Currently selected value. */
648
+ value: string;
649
+ /** Callback when selection changes. */
650
+ onChange: (value: string) => void;
651
+ /** Layout direction. */
652
+ orientation?: 'horizontal' | 'vertical';
653
+ /** Additional class name for the root element. */
654
+ className?: string;
655
+ }
656
+ /**
657
+ * @description A custom-styled radio button group with Framer Motion selection indicator.
658
+ * Supports keyboard navigation (arrow keys, Home, End) and ARIA roles.
659
+ */
660
+ declare function RadioGroup({ options, value, onChange, orientation, className, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
661
+
662
+ interface TooltipProps {
663
+ /** Tooltip content (can be text or ReactNode). */
664
+ content: ReactNode;
665
+ /** Trigger element. */
666
+ children: ReactNode;
667
+ /** Side of the trigger to display the tooltip. */
668
+ side?: 'top' | 'right' | 'bottom' | 'left';
669
+ /** Delay in milliseconds before the tooltip appears. */
670
+ delay?: number;
671
+ /** Additional class name for the tooltip content. */
672
+ className?: string;
673
+ }
674
+ /**
675
+ * @description A simple tooltip wrapper built on Radix Tooltip.
676
+ * Theme-styled content with arrow pointer and configurable delay.
677
+ * Requires a TooltipProvider ancestor (included by default).
678
+ */
679
+ declare function Tooltip({ content, children, side, delay, className, }: TooltipProps): react_jsx_runtime.JSX.Element;
680
+
681
+ interface MetricCardProps {
682
+ /** Metric display label. */
683
+ label: string;
684
+ /** Current numeric value. */
685
+ value: number;
686
+ /** Custom formatter for the displayed value (e.g. fmtBytes, fmtBps). */
687
+ format?: (n: number) => string;
688
+ /** Previous value for trend calculation. */
689
+ previousValue?: number;
690
+ /** Interpret trend direction for coloring. */
691
+ trendDirection?: 'up-good' | 'up-bad' | 'down-good' | 'down-bad';
692
+ /** Lucide icon component to display. */
693
+ icon?: ElementType;
694
+ /** Status determines left border accent color. */
695
+ status?: 'ok' | 'warning' | 'critical';
696
+ /** Recent values to render an inline sparkline. */
697
+ sparklineData?: number[];
698
+ className?: string;
699
+ }
700
+ /**
701
+ * @description A dashboard stat tile showing a metric value with animated counter,
702
+ * trend indicator, optional sparkline, and status-colored left border.
703
+ * Designed for monitoring dashboards and overview panels.
704
+ */
705
+ declare function MetricCard({ label, value, format, previousValue, trendDirection, icon: Icon, status, sparklineData, className, }: MetricCardProps): react_jsx_runtime.JSX.Element;
706
+
707
+ interface UtilizationBarProps {
708
+ /** Utilization value from 0 to 100. */
709
+ value: number;
710
+ /** Warning and critical thresholds. */
711
+ thresholds?: {
712
+ warning: number;
713
+ critical: number;
714
+ };
715
+ /** Optional label displayed to the left. */
716
+ label?: string;
717
+ /** Show percentage value text to the right. */
718
+ showValue?: boolean;
719
+ /** Bar height size. */
720
+ size?: 'sm' | 'md' | 'lg';
721
+ /** Animate the fill width on mount. */
722
+ animated?: boolean;
723
+ className?: string;
724
+ }
725
+ /**
726
+ * @description A segmented horizontal bar showing resource utilization with
727
+ * color-coded thresholds (green/yellow/red). Supports animated fill on mount.
728
+ */
729
+ declare function UtilizationBar({ value: rawValue, thresholds, label, showValue, size, animated, className, }: UtilizationBarProps): react_jsx_runtime.JSX.Element;
730
+
731
+ interface SparklineProps {
732
+ /** Array of numeric values to plot. */
733
+ data: number[];
734
+ /** SVG width in pixels. */
735
+ width?: number;
736
+ /** SVG height in pixels. */
737
+ height?: number;
738
+ /** Line color — must use hsl(var(--token)) format. */
739
+ color?: string;
740
+ /** Opacity for the gradient fill below the line (0 to disable). */
741
+ fillOpacity?: number;
742
+ /** Show dots on first and last data points. */
743
+ showDots?: boolean;
744
+ className?: string;
745
+ }
746
+ /**
747
+ * @description A tiny inline SVG sparkline chart for embedding in tables, cards,
748
+ * and metric tiles. Pure SVG with no external dependencies.
749
+ */
750
+ declare function Sparkline({ data, width, height, color, fillOpacity, showDots, className, }: SparklineProps): react_jsx_runtime.JSX.Element | null;
751
+
752
+ interface ThresholdGaugeProps {
753
+ /** Gauge value from 0 to 100. */
754
+ value: number;
755
+ /** Label displayed below the gauge. */
756
+ label?: string;
757
+ /** Warning and critical thresholds. */
758
+ thresholds?: {
759
+ warning: number;
760
+ critical: number;
761
+ };
762
+ /** Gauge diameter in pixels. */
763
+ size?: number;
764
+ /** Show the numeric value in the center. */
765
+ showValue?: boolean;
766
+ /** Custom formatter for the center value. */
767
+ format?: (n: number) => string;
768
+ className?: string;
769
+ }
770
+ /**
771
+ * @description A semicircular SVG gauge with color-coded threshold zones
772
+ * (green/yellow/red). Animates the arc on mount. Displays value in center.
773
+ */
774
+ declare function ThresholdGauge({ value: rawValue, label, thresholds, size, showValue, format, className, }: ThresholdGaugeProps): react_jsx_runtime.JSX.Element;
775
+
776
+ interface TimelineEvent {
777
+ /** ISO 8601 timestamp. */
778
+ time: string;
779
+ /** Short event label. */
780
+ label: string;
781
+ /** Severity determines dot color. */
782
+ severity: 'critical' | 'warning' | 'info' | 'ok';
783
+ /** Optional detail text shown on click/hover. */
784
+ detail?: string;
785
+ }
786
+ interface SeverityTimelineProps {
787
+ /** Events to display (most recent should be first). */
788
+ events: TimelineEvent[];
789
+ /** Maximum number of visible events. */
790
+ maxVisible?: number;
791
+ /** Callback when an event dot/label is clicked. */
792
+ onEventClick?: (event: TimelineEvent) => void;
793
+ className?: string;
794
+ }
795
+ /**
796
+ * @description A horizontal scrollable timeline showing events with severity-colored
797
+ * dots. Most recent events appear on the left. Click events for detail callbacks.
798
+ * Designed for alert timelines and incident history strips.
799
+ */
800
+ declare function SeverityTimeline({ events, maxVisible, onEventClick, className, }: SeverityTimelineProps): react_jsx_runtime.JSX.Element | null;
801
+
802
+ interface LogEntry {
803
+ /** ISO 8601 timestamp. */
804
+ time: string;
805
+ /** Log level. */
806
+ level: 'error' | 'warn' | 'info' | 'debug' | 'trace';
807
+ /** Log message content. */
808
+ message: string;
809
+ /** Optional source identifier. */
810
+ source?: string;
811
+ }
812
+ interface LogViewerProps {
813
+ /** Log entries to display. */
814
+ entries: LogEntry[];
815
+ /** Maximum container height in pixels. */
816
+ maxHeight?: number;
817
+ /** Auto-scroll to bottom on new entries. */
818
+ autoScroll?: boolean;
819
+ /** Show timestamps column. */
820
+ showTimestamps?: boolean;
821
+ /** Show level badge. */
822
+ showLevel?: boolean;
823
+ /** Callback when a log entry is clicked. */
824
+ onEntryClick?: (entry: LogEntry) => void;
825
+ className?: string;
826
+ }
827
+ /**
828
+ * @description A log stream viewer with severity-colored borders, auto-scroll,
829
+ * search filtering, and a "new entries" indicator when scrolled up.
830
+ * Designed for real-time log tailing in monitoring dashboards.
831
+ */
832
+ declare function LogViewer({ entries, maxHeight, autoScroll, showTimestamps, showLevel, onEntryClick, className, }: LogViewerProps): react_jsx_runtime.JSX.Element;
833
+
834
+ interface PortStatus {
835
+ /** Unique port identifier. */
836
+ id: string;
837
+ /** Display label (e.g. "Gi1/0/1"). */
838
+ label: string;
839
+ /** Port operational status. */
840
+ status: 'up' | 'down' | 'disabled' | 'error';
841
+ /** Link speed display string (e.g. "10G", "1G"). */
842
+ speed?: string;
843
+ /** Port utilization 0-100 percentage. */
844
+ utilization?: number;
845
+ }
846
+ interface PortStatusGridProps {
847
+ /** Array of port status objects. */
848
+ ports: PortStatus[];
849
+ /** Number of columns. Defaults to auto-fit. */
850
+ columns?: number;
851
+ /** Dot/rectangle size. */
852
+ size?: 'sm' | 'md';
853
+ /** Callback when a port is clicked. */
854
+ onPortClick?: (port: PortStatus) => void;
855
+ className?: string;
856
+ }
857
+ /**
858
+ * @description A grid of small colored indicators representing network ports or
859
+ * interfaces. Each port is colored by operational status with hover tooltips showing
860
+ * label, speed, and utilization. Designed for switch/router faceplate visualizations.
861
+ */
862
+ declare function PortStatusGrid({ ports, columns, size, onPortClick, className, }: PortStatusGridProps): react_jsx_runtime.JSX.Element;
863
+
864
+ interface TimeRange {
865
+ /** Display label (e.g. "1h", "24h"). */
866
+ label: string;
867
+ /** Unique value identifier. */
868
+ value: string;
869
+ /** Duration in seconds represented by this range. */
870
+ seconds: number;
871
+ }
872
+ interface TimeRangeSelectorProps {
873
+ /** Currently selected range value. */
874
+ value: string;
875
+ /** Callback when a range is selected. */
876
+ onChange: (value: string, range: TimeRange) => void;
877
+ /** Custom range options. Defaults to 1h, 6h, 24h, 7d, 30d. */
878
+ ranges?: TimeRange[];
879
+ className?: string;
880
+ }
881
+ /**
882
+ * @description A compact horizontal pill-group time range selector for dashboards.
883
+ * Active selection is highlighted with a sliding indicator using the brand color.
884
+ * Common in monitoring dashboards for controlling chart time windows.
885
+ */
886
+ declare function TimeRangeSelector({ value, onChange, ranges, className, }: TimeRangeSelectorProps): react_jsx_runtime.JSX.Element;
887
+
888
+ interface StageInfo {
889
+ /** Stage display name. */
890
+ name: string;
891
+ /** Current stage status. */
892
+ status: 'active' | 'idle' | 'error' | 'disabled';
893
+ /** Optional metric to display inside the stage box. */
894
+ metric?: {
895
+ label: string;
896
+ value: string;
897
+ };
898
+ /** Lucide icon component for the stage. */
899
+ icon?: ElementType;
900
+ }
901
+ interface PipelineStageProps {
902
+ /** Ordered array of processing stages. */
903
+ stages: StageInfo[];
904
+ /** Callback when a stage is clicked. */
905
+ onStageClick?: (stage: StageInfo, index: number) => void;
906
+ className?: string;
907
+ }
908
+ /**
909
+ * @description A horizontal data pipeline visualization showing processing stages
910
+ * connected by animated chevron arrows. Each stage displays name, status dot,
911
+ * optional icon, and optional metric. Designed for data pipeline monitoring views.
912
+ */
913
+ declare function PipelineStage({ stages, onStageClick, className, }: PipelineStageProps): react_jsx_runtime.JSX.Element;
914
+
915
+ interface DayStatus {
916
+ /** Date in YYYY-MM-DD format. */
917
+ date: string;
918
+ /** Operational status for that day. */
919
+ status: 'ok' | 'degraded' | 'outage' | 'no-data';
920
+ /** Uptime percentage for that day (0-100). */
921
+ uptime?: number;
922
+ }
923
+ interface UptimeTrackerProps {
924
+ /** Array of day-status entries (oldest first). */
925
+ days: DayStatus[];
926
+ /** Show overall uptime percentage. */
927
+ showPercentage?: boolean;
928
+ /** Optional label displayed above the bar. */
929
+ label?: string;
930
+ /** Callback when a day bar is clicked. */
931
+ onDayClick?: (day: DayStatus) => void;
932
+ className?: string;
933
+ }
934
+ /**
935
+ * @description A row of thin vertical bars representing daily uptime status,
936
+ * inspired by GitHub/Statuspage uptime indicators. Each bar is colored by
937
+ * operational status (ok/degraded/outage/no-data). Hover shows date and uptime
938
+ * percentage. Designed for SLA and availability tracking displays.
939
+ */
940
+ declare function UptimeTracker({ days, showPercentage, label, onDayClick, className, }: UptimeTrackerProps): react_jsx_runtime.JSX.Element;
941
+
942
+ export { AnimatedCounter, type AnimatedCounterProps, Avatar, type AvatarProps, Badge, type BadgeColor, type BadgeProps, type BadgeVariantConfig, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSubProps, CardTitle, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, DataTable, type DataTableProps, type DayStatus, type Density, DropdownMenu, type DropdownMenuProps, EmptyState, type EmptyStateProps, FilterPill, type FilterPillProps, FormInput, type FormInputProps, INPUT_CLS, LABEL_CLS, type LogEntry, LogViewer, type LogViewerProps, type MenuItem, MetricCard, type MetricCardProps, PipelineStage, type PipelineStageProps, Popover, type PopoverProps, type PortStatus, PortStatusGrid, type PortStatusGridProps, Progress, type ProgressProps, type PulseConfig, RadioGroup, type RadioGroupProps, type RadioOption, SeverityTimeline, type SeverityTimelineProps, Sheet, type SheetProps, Skeleton, SkeletonCard, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, Sparkline, type SparklineProps, type StageInfo, StatusBadge, type StatusBadgeProps, type StatusConfig, StatusPulse, type StatusPulseProps, SuccessCheckmark, type SuccessCheckmarkProps, TEXTAREA_CLS, type Tab, Tabs, type TabsProps, ThresholdGauge, type ThresholdGaugeProps, type TimeRange, TimeRangeSelector, type TimeRangeSelectorProps, type TimelineEvent, Toaster, type ToasterProps, ToggleSwitch, type ToggleSwitchProps, Tooltip, type TooltipProps, TruncatedText, type TruncatedTextProps, UptimeTracker, type UptimeTrackerProps, type UtilColorMap, UtilizationBar, type UtilizationBarProps, clamp, cn, createBadgeVariant, defaultPulseConfigMap, defaultStatusMap, defaultUtilColorMap, fmtBps, fmtBytes, fmtCompact, fmtDuration, fmtPct, fmtRelative, fmtSpeed, fmtUptime, fmtUtil, stripCidr, utilColor };