@lego-box/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.
@@ -0,0 +1,998 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { ClassValue } from 'clsx';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+
7
+ declare const buttonVariants: (props?: ({
8
+ variant?: "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
9
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
10
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
11
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
12
+ asChild?: boolean;
13
+ shimmer?: boolean;
14
+ }
15
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
16
+
17
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
18
+ variant?: 'default' | 'elevated' | 'glass';
19
+ }
20
+ declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
21
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
22
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
23
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
24
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
25
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
26
+
27
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
28
+ label?: string;
29
+ }
30
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
31
+
32
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
33
+ wrapperClassName?: string;
34
+ }
35
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
36
+
37
+ interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
38
+ required?: boolean;
39
+ }
40
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
41
+
42
+ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
43
+ variant?: 'default' | 'primary' | 'muted';
44
+ }
45
+ declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
46
+
47
+ interface PasswordInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
48
+ wrapperClassName?: string;
49
+ }
50
+ declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
51
+
52
+ declare function cn(...inputs: ClassValue[]): string;
53
+
54
+ interface StatsCardProps extends React.HTMLAttributes<HTMLDivElement> {
55
+ value: string | number;
56
+ label: string;
57
+ icon?: React.ReactNode;
58
+ trend?: {
59
+ value: string;
60
+ positive?: boolean;
61
+ };
62
+ }
63
+ /**
64
+ * StatsCard - Displays a statistic with an icon and optional trend indicator
65
+ *
66
+ * Design specs from Pencil:
67
+ * - White background with rounded corners (16px)
68
+ * - Large value (32px, bold)
69
+ * - Label below (14px, muted)
70
+ * - Icon in top-right with colored background
71
+ * - Optional trend indicator with green/red color
72
+ */
73
+ declare const StatsCard: React.ForwardRefExoticComponent<StatsCardProps & React.RefAttributes<HTMLDivElement>>;
74
+
75
+ declare const badgeVariants: (props?: ({
76
+ variant?: "default" | "destructive" | "success" | "outline" | "secondary" | "muted" | "warning" | "info" | null | undefined;
77
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
78
+ interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
79
+ }
80
+ /**
81
+ * Badge - Small status indicator component
82
+ *
83
+ * Used for:
84
+ * - User status (Active, Inactive, Pending)
85
+ * - Roles (Admin, Editor, Viewer, etc.)
86
+ * - Filter chips
87
+ * - Status indicators
88
+ */
89
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
90
+
91
+ interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
92
+ value: string;
93
+ onValueChange: (value: string) => void;
94
+ children: React.ReactNode;
95
+ }
96
+ interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
97
+ children: React.ReactNode;
98
+ }
99
+ interface TabsTriggerProps extends React.HTMLAttributes<HTMLButtonElement> {
100
+ value: string;
101
+ children: React.ReactNode;
102
+ /** Optional badge (number or node) - active tab shows blue badge, inactive shows grey */
103
+ badge?: React.ReactNode | number;
104
+ /** When true, tab cannot be selected */
105
+ disabled?: boolean;
106
+ }
107
+ /**
108
+ * Tabs - Tab navigation component
109
+ *
110
+ * Design specs from Pencil:
111
+ * - Container with gray background and rounded corners
112
+ * - Active tab has white background with shadow
113
+ * - Inactive tabs are transparent with hover state
114
+ * - Gap between tabs
115
+ */
116
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
117
+ declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & {
118
+ selectedValue?: string;
119
+ onValueChange?: (value: string) => void;
120
+ } & React.RefAttributes<HTMLDivElement>>;
121
+ declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & {
122
+ selectedValue?: string;
123
+ onValueChange?: (value: string) => void;
124
+ } & React.RefAttributes<HTMLButtonElement>>;
125
+
126
+ interface DataTableColumn<T> {
127
+ key: string;
128
+ header: string;
129
+ width?: string;
130
+ cell: (row: T) => React.ReactNode;
131
+ }
132
+ interface DataTableProps<T> extends React.HTMLAttributes<HTMLDivElement> {
133
+ columns: DataTableColumn<T>[];
134
+ data: T[];
135
+ keyExtractor: (row: T) => string;
136
+ selectable?: boolean;
137
+ selectedRows?: Set<string>;
138
+ onSelectRow?: (id: string, selected: boolean) => void;
139
+ onSelectAll?: (selected: boolean) => void;
140
+ /**
141
+ * Layout variant:
142
+ * - "card": Wraps table in bordered card (matches /migrations style). Use for standalone tables.
143
+ * - "inline": No wrapper. Use when table is inside Card or other container.
144
+ */
145
+ variant?: 'card' | 'inline';
146
+ }
147
+ /**
148
+ * DataTable - Flexible table component for displaying tabular data
149
+ *
150
+ * Consistent design across pages (User Management, Migrations, etc.):
151
+ * - Card variant: Bordered card wrapper with rounded corners
152
+ * - Header row with muted background
153
+ * - Row dividers (divide-y)
154
+ * - Hover states
155
+ */
156
+ declare function DataTable<T>({ columns, data, keyExtractor, selectable, selectedRows, onSelectRow, onSelectAll, variant, className, ...props }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
157
+
158
+ interface GroupedTableColumn<T> {
159
+ key: string;
160
+ header: string;
161
+ /** Width: Tailwind class (e.g. 'w-32') or CSS value (e.g. '8rem') */
162
+ width?: string;
163
+ cell: (row: T) => React.ReactNode;
164
+ }
165
+ interface GroupedTableProps<T> {
166
+ /** Data to display */
167
+ data: T[];
168
+ /** Extract the group key from each row (e.g. perm => perm.collection, log => log.resource) */
169
+ groupBy: (row: T) => string;
170
+ /** Unique key for each row */
171
+ keyExtractor: (row: T) => string;
172
+ /** Column definitions for child rows */
173
+ columns: GroupedTableColumn<T>[];
174
+ /** Message when data is empty */
175
+ emptyMessage?: string;
176
+ /** Customize group header label. Default: "{groupKey} ({count} item(s))" */
177
+ groupLabel?: (groupKey: string, count: number) => string;
178
+ /** Whether to expand all groups by default */
179
+ expandByDefault?: boolean;
180
+ }
181
+ /**
182
+ * GroupedTable - Reusable table with expand/collapse grouping
183
+ *
184
+ * Use for data that should be grouped by a key (e.g. permissions by collection,
185
+ * audit logs by resource). Groups are expandable/collapsible.
186
+ *
187
+ * Same visual design as DataTable card variant.
188
+ */
189
+ declare function GroupedTable<T>({ data, groupBy, keyExtractor, columns, emptyMessage, groupLabel, expandByDefault, }: GroupedTableProps<T>): react_jsx_runtime.JSX.Element;
190
+
191
+ interface SearchInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
192
+ icon?: React.ReactNode;
193
+ }
194
+ /**
195
+ * SearchInput - Search input with icon
196
+ *
197
+ * Design specs from Pencil:
198
+ * - Gray background (muted)
199
+ * - Search icon on left
200
+ * - Rounded corners
201
+ * - Placeholder text
202
+ */
203
+ declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
204
+
205
+ interface FilterChipProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
206
+ active?: boolean;
207
+ count?: number;
208
+ }
209
+ /**
210
+ * FilterChip - Chip button for filtering data
211
+ *
212
+ * Design specs from Pencil:
213
+ * - Rounded pill shape
214
+ * - Active state has gray background
215
+ * - Inactive state has white background with border
216
+ * - Optional count badge
217
+ */
218
+ declare const FilterChip: React.ForwardRefExoticComponent<FilterChipProps & React.RefAttributes<HTMLButtonElement>>;
219
+
220
+ type StatusType = 'applied' | 'pending' | 'failed' | 'success' | 'warning' | 'error' | 'info';
221
+ interface StatusBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
222
+ status: StatusType;
223
+ label?: string;
224
+ showDot?: boolean;
225
+ }
226
+ /**
227
+ * StatusBadge - Displays status with colored badge and dot
228
+ *
229
+ * Design specs from Pencil:
230
+ * - Colored background matching status
231
+ * - Small colored dot on the left
232
+ * - Rounded corners
233
+ * - Text label
234
+ *
235
+ * Statuses:
236
+ * - applied/success: Green background with green dot
237
+ * - pending/warning: Amber/Yellow background with amber dot
238
+ * - failed/error: Red background with red dot
239
+ */
240
+ declare const StatusBadge: React.ForwardRefExoticComponent<StatusBadgeProps & React.RefAttributes<HTMLDivElement>>;
241
+
242
+ interface PaginationProps {
243
+ currentPage: number;
244
+ totalPages: number;
245
+ totalItems: number;
246
+ perPage: number;
247
+ onPageChange: (page: number) => void;
248
+ onPerPageChange?: (perPage: number) => void;
249
+ pageSizeOptions?: number[];
250
+ showPageSizeSelector?: boolean;
251
+ /** Label for items, e.g. "users" for "Showing 1-5 of 248 users" */
252
+ itemsLabel?: string;
253
+ }
254
+ /**
255
+ * Reusable pagination component with page navigation and optional page size selector.
256
+ *
257
+ * @example
258
+ * <Pagination
259
+ * currentPage={1}
260
+ * totalPages={10}
261
+ * totalItems={250}
262
+ * perPage={25}
263
+ * onPageChange={(page) => setPage(page)}
264
+ * onPerPageChange={(size) => setPerPage(size)}
265
+ * showPageSizeSelector={true}
266
+ * pageSizeOptions={[10, 25, 50, 100]}
267
+ * />
268
+ */
269
+ declare function Pagination({ currentPage, totalPages, totalItems, perPage, onPageChange, onPerPageChange, pageSizeOptions, showPageSizeSelector, itemsLabel, }: PaginationProps): react_jsx_runtime.JSX.Element;
270
+
271
+ interface SelectOption {
272
+ value: string;
273
+ label: string;
274
+ }
275
+ interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
276
+ options: SelectOption[];
277
+ label?: string;
278
+ }
279
+ /**
280
+ * Select - Dropdown select component
281
+ *
282
+ * Design specs from Pencil:
283
+ * - White background (light mode) / Dark background (dark mode)
284
+ * - Border
285
+ * - Rounded corners
286
+ * - Label support
287
+ */
288
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
289
+
290
+ interface LogEntry {
291
+ text: string;
292
+ color?: string;
293
+ type?: 'info' | 'success' | 'error' | 'warning' | 'command';
294
+ }
295
+ interface ConsoleLogProps extends React.HTMLAttributes<HTMLDivElement> {
296
+ logs: LogEntry[];
297
+ title?: string;
298
+ onClear?: () => void;
299
+ onCopy?: () => void;
300
+ }
301
+ /**
302
+ * ConsoleLog - Terminal-style log display component
303
+ *
304
+ * Design specs from Pencil:
305
+ * - Dark background (slate-800/900)
306
+ * - Monospace font
307
+ * - Optional title and action buttons (Clear, Copy)
308
+ * - Color-coded log entries
309
+ */
310
+ declare const ConsoleLog: React.ForwardRefExoticComponent<ConsoleLogProps & React.RefAttributes<HTMLDivElement>>;
311
+
312
+ interface UserFormData {
313
+ name: string;
314
+ email: string;
315
+ role: string;
316
+ status: 'Active' | 'Inactive';
317
+ password?: string;
318
+ passwordConfirm?: string;
319
+ }
320
+ interface UserFormDialogProps {
321
+ isOpen: boolean;
322
+ onClose: () => void;
323
+ onSubmit: (data: UserFormData) => Promise<void>;
324
+ user?: {
325
+ id: string;
326
+ name: string;
327
+ email: string;
328
+ roleId?: string;
329
+ status?: 'Active' | 'Inactive';
330
+ } | null;
331
+ roles: Array<{
332
+ id: string;
333
+ name: string;
334
+ }>;
335
+ loading?: boolean;
336
+ existingEmails?: string[];
337
+ }
338
+ declare function UserFormDialog({ isOpen, onClose, onSubmit, user, roles, loading, existingEmails, }: UserFormDialogProps): react_jsx_runtime.JSX.Element | null;
339
+
340
+ interface Permission {
341
+ id: string;
342
+ name: string;
343
+ collection: string;
344
+ action: string;
345
+ description?: string;
346
+ }
347
+ interface RoleFormData {
348
+ name: string;
349
+ description: string;
350
+ permissions: string[];
351
+ }
352
+ interface RoleFormDialogProps {
353
+ isOpen: boolean;
354
+ onClose: () => void;
355
+ onSubmit: (data: RoleFormData) => Promise<void>;
356
+ role?: {
357
+ id: string;
358
+ name: string;
359
+ description?: string;
360
+ permissions?: string[];
361
+ } | null;
362
+ permissions: Permission[];
363
+ loading?: boolean;
364
+ /** Loading state for permissions list (e.g. when fetching for role form) */
365
+ permissionsLoading?: boolean;
366
+ /** Permission names that are mandatory for every role. Auto-selected and cannot be unchecked. */
367
+ mandatoryPermissionNames?: readonly string[];
368
+ }
369
+ declare function RoleFormDialog({ isOpen, onClose, onSubmit, role, permissions, loading, permissionsLoading, mandatoryPermissionNames, }: RoleFormDialogProps): react_jsx_runtime.JSX.Element | null;
370
+
371
+ interface UserForAssign {
372
+ id: string;
373
+ name: string;
374
+ email: string;
375
+ roleId?: string;
376
+ roleName?: string;
377
+ is_superuser?: boolean;
378
+ }
379
+ interface AssignUsersToRoleDialogProps {
380
+ isOpen: boolean;
381
+ onClose: () => void;
382
+ role: {
383
+ id: string;
384
+ name: string;
385
+ } | null;
386
+ users: UserForAssign[];
387
+ onAssign: (userId: string) => Promise<void>;
388
+ loading?: boolean;
389
+ /** Loading state when fetching users */
390
+ usersLoading?: boolean;
391
+ }
392
+ declare function AssignUsersToRoleDialog({ isOpen, onClose, role, users, onAssign, loading, usersLoading, }: AssignUsersToRoleDialogProps): react_jsx_runtime.JSX.Element;
393
+
394
+ interface PermissionFormData {
395
+ name: string;
396
+ collection: string;
397
+ action: string;
398
+ description: string;
399
+ resourceType: 'collection' | 'field' | 'custom';
400
+ resourceName: string;
401
+ }
402
+ interface PermissionFormDialogProps {
403
+ isOpen: boolean;
404
+ onClose: () => void;
405
+ onSubmit: (data: PermissionFormData) => Promise<void>;
406
+ permission?: {
407
+ id: string;
408
+ name: string;
409
+ collection: string;
410
+ action: string;
411
+ description?: string;
412
+ resourceType: 'collection' | 'field' | 'custom';
413
+ resourceName?: string;
414
+ } | null;
415
+ loading?: boolean;
416
+ /** Existing collection names for autocomplete suggestions */
417
+ existingCollections?: string[];
418
+ }
419
+ declare function PermissionFormDialog({ isOpen, onClose, onSubmit, permission, loading, existingCollections, }: PermissionFormDialogProps): react_jsx_runtime.JSX.Element | null;
420
+
421
+ interface DeleteConfirmationDialogProps {
422
+ isOpen: boolean;
423
+ onClose: () => void;
424
+ onConfirm: () => Promise<void>;
425
+ title?: string;
426
+ description?: string;
427
+ itemName?: string;
428
+ loading?: boolean;
429
+ }
430
+ declare function DeleteConfirmationDialog({ isOpen, onClose, onConfirm, title, description, itemName, loading, }: DeleteConfirmationDialogProps): react_jsx_runtime.JSX.Element | null;
431
+
432
+ interface ChangePasswordDialogProps {
433
+ isOpen: boolean;
434
+ onClose: () => void;
435
+ onSubmit: (password: string, passwordConfirm: string) => Promise<void>;
436
+ userName?: string;
437
+ loading?: boolean;
438
+ }
439
+ declare function ChangePasswordDialog({ isOpen, onClose, onSubmit, userName, loading, }: ChangePasswordDialogProps): react_jsx_runtime.JSX.Element | null;
440
+
441
+ interface BulkActionToolbarProps {
442
+ selectedCount: number;
443
+ onActivate?: () => void;
444
+ onDeactivate?: () => void;
445
+ onDelete?: () => void;
446
+ onAssignRole?: () => void;
447
+ onClearSelection: () => void;
448
+ }
449
+ declare function BulkActionToolbar({ selectedCount, onActivate, onDeactivate, onDelete, onAssignRole, onClearSelection, }: BulkActionToolbarProps): react_jsx_runtime.JSX.Element | null;
450
+
451
+ interface BulkConfirmationDialogProps {
452
+ isOpen: boolean;
453
+ onClose: () => void;
454
+ onConfirm: () => void;
455
+ title: string;
456
+ description?: string;
457
+ itemCount: number;
458
+ actionType: 'delete' | 'activate' | 'deactivate' | 'assign-role';
459
+ loading?: boolean;
460
+ affectedItems?: string[];
461
+ }
462
+ declare function BulkConfirmationDialog({ isOpen, onClose, onConfirm, title, description, itemCount, actionType, loading, affectedItems, }: BulkConfirmationDialogProps): react_jsx_runtime.JSX.Element | null;
463
+
464
+ /**
465
+ * CanGuard - Renders children only when allowed. Use for hiding menus/items.
466
+ */
467
+ interface CanGuardProps {
468
+ /** Whether the action is allowed */
469
+ allowed: boolean;
470
+ /** Content to render when allowed */
471
+ children: React.ReactNode;
472
+ /** Optional fallback when not allowed (default: null) */
473
+ fallback?: React.ReactNode;
474
+ }
475
+ declare function CanGuard({ allowed, children, fallback }: CanGuardProps): react_jsx_runtime.JSX.Element;
476
+ /**
477
+ * CanDisable - Disables children when not allowed and shows tooltip on hover.
478
+ * Use for tabs, buttons, and actions that should be disabled (not hidden) when lacking permission.
479
+ * Forwards all additional props (e.g. selectedValue, onValueChange from TabsList) to the child.
480
+ */
481
+ interface CanDisableProps {
482
+ /** Whether the action is allowed */
483
+ allowed: boolean;
484
+ /** Content to render (typically Button, TabsTrigger, or other interactive element) */
485
+ children: React.ReactNode;
486
+ /** Tooltip message when disabled (default: "You do not have access") */
487
+ disabledTooltip?: string;
488
+ }
489
+ declare function CanDisable({ allowed, children, disabledTooltip, ...rest }: CanDisableProps): react_jsx_runtime.JSX.Element;
490
+
491
+ interface TooltipProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'content'> {
492
+ /** Content shown on hover */
493
+ content: React.ReactNode;
494
+ /** Optional side for tooltip placement */
495
+ side?: 'top' | 'bottom' | 'left' | 'right';
496
+ children: React.ReactNode;
497
+ }
498
+ /** Default message when user lacks permission */
499
+ declare const NO_ACCESS_MESSAGE = "You do not have access";
500
+ /**
501
+ * Tooltip - Shows content on hover. Uses CSS for positioning.
502
+ * Wraps children in a span to ensure hover works even when child is disabled.
503
+ */
504
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
505
+
506
+ interface QuickActionCardProps extends React.HTMLAttributes<HTMLDivElement> {
507
+ title: string;
508
+ description: string;
509
+ icon: React.ReactNode;
510
+ variant: 'bug' | 'feature' | 'inquiry';
511
+ onClick: () => void;
512
+ }
513
+ declare function QuickActionCard({ title, description, icon, variant, onClick, className, ...props }: QuickActionCardProps): react_jsx_runtime.JSX.Element;
514
+
515
+ interface TicketStatsCardProps extends React.HTMLAttributes<HTMLDivElement> {
516
+ value: string | number;
517
+ label: string;
518
+ icon: React.ReactNode;
519
+ iconBgColor: string;
520
+ iconColor: string;
521
+ badge?: {
522
+ icon: React.ReactNode;
523
+ text: string;
524
+ bgColor: string;
525
+ textColor: string;
526
+ };
527
+ }
528
+ declare function TicketStatsCard({ value, label, icon, iconBgColor, iconColor, badge, className, ...props }: TicketStatsCardProps): react_jsx_runtime.JSX.Element;
529
+
530
+ interface TicketFormData {
531
+ title: string;
532
+ description: string;
533
+ category: 'bug' | 'feature' | 'inquiry';
534
+ priority: 'low' | 'medium' | 'high';
535
+ status: 'open' | 'in_progress' | 'resolved' | 'closed';
536
+ }
537
+ interface TicketFormDialogProps {
538
+ isOpen: boolean;
539
+ onClose: () => void;
540
+ onSubmit: (data: TicketFormData) => Promise<void>;
541
+ ticket?: {
542
+ id: string;
543
+ title: string;
544
+ description: string;
545
+ category: string;
546
+ priority: string;
547
+ status: string;
548
+ } | null;
549
+ loading?: boolean;
550
+ initialCategory?: 'bug' | 'feature' | 'inquiry';
551
+ }
552
+ declare function TicketFormDialog({ isOpen, onClose, onSubmit, ticket, loading, initialCategory, }: TicketFormDialogProps): react_jsx_runtime.JSX.Element | null;
553
+
554
+ interface HealthStatusCardProps extends React.HTMLAttributes<HTMLDivElement> {
555
+ /**
556
+ * Overall health status
557
+ */
558
+ status: 'healthy' | 'degraded' | 'unhealthy' | 'checking';
559
+ /**
560
+ * Health percentage (0-100)
561
+ */
562
+ percentage?: number;
563
+ /**
564
+ * Uptime information
565
+ */
566
+ uptime?: {
567
+ days: number;
568
+ hours: number;
569
+ minutes: number;
570
+ };
571
+ /**
572
+ * Last check timestamp
573
+ */
574
+ lastCheck?: string;
575
+ }
576
+ /**
577
+ * HealthStatusCard - Displays overall system health with a circular progress indicator
578
+ *
579
+ * Shows overall health percentage, uptime stats, and service count
580
+ */
581
+ declare const HealthStatusCard: React.ForwardRefExoticComponent<HealthStatusCardProps & React.RefAttributes<HTMLDivElement>>;
582
+
583
+ interface ServiceStatusCardProps extends React.HTMLAttributes<HTMLDivElement> {
584
+ /**
585
+ * Service name
586
+ */
587
+ name: string;
588
+ /**
589
+ * Service description
590
+ */
591
+ description?: string;
592
+ /**
593
+ * Current status of the service
594
+ */
595
+ status: 'operational' | 'degraded' | 'down' | 'checking';
596
+ /**
597
+ * Response time in milliseconds
598
+ */
599
+ responseTime?: number;
600
+ /**
601
+ * Service icon
602
+ */
603
+ icon?: React.ReactNode;
604
+ /**
605
+ * Additional details about the service
606
+ */
607
+ details?: string;
608
+ /**
609
+ * Last checked timestamp
610
+ */
611
+ lastChecked?: string;
612
+ }
613
+ /**
614
+ * ServiceStatusCard - Displays the status of an individual service
615
+ *
616
+ * Shows service name, status badge, response time, and additional details
617
+ */
618
+ declare const ServiceStatusCard: React.ForwardRefExoticComponent<ServiceStatusCardProps & React.RefAttributes<HTMLDivElement>>;
619
+
620
+ interface TopBarNavItem {
621
+ id: string;
622
+ label: string;
623
+ href: string;
624
+ }
625
+ interface TopBarMoreItem {
626
+ id: string;
627
+ label: string;
628
+ href: string;
629
+ }
630
+ interface TopBarProps extends React.HTMLAttributes<HTMLDivElement> {
631
+ /**
632
+ * Logo configuration
633
+ */
634
+ logo?: {
635
+ icon?: React.ReactNode;
636
+ text?: string;
637
+ href?: string;
638
+ };
639
+ /**
640
+ * Navigation items for the topbar center menu
641
+ */
642
+ navItems?: TopBarNavItem[];
643
+ /**
644
+ * Additional items for the "More" dropdown
645
+ */
646
+ moreItems?: TopBarMoreItem[];
647
+ /**
648
+ * User info for the profile section
649
+ */
650
+ user?: {
651
+ name?: string;
652
+ email?: string;
653
+ avatar?: string;
654
+ role?: string;
655
+ };
656
+ /**
657
+ * Currently active navigation item ID
658
+ */
659
+ activeItemId?: string | null;
660
+ /**
661
+ * Callback when active item changes
662
+ */
663
+ onActiveItemChange?: (itemId: string | null) => void;
664
+ /**
665
+ * Callback for navigation
666
+ */
667
+ onNavigate?: (href: string) => void;
668
+ /**
669
+ * Callback for mobile menu toggle
670
+ */
671
+ onMobileMenuToggle?: () => void;
672
+ /**
673
+ * Callback for logout
674
+ */
675
+ onLogout?: () => void;
676
+ /**
677
+ * Callback when Profile menu item is clicked
678
+ */
679
+ onProfileClick?: () => void;
680
+ /**
681
+ * Callback when Settings menu item is clicked
682
+ */
683
+ onSettingsClick?: () => void;
684
+ /**
685
+ * Callback when Help & Support menu item is clicked
686
+ */
687
+ onHelpSupportClick?: () => void;
688
+ }
689
+ /**
690
+ * TopBar - Global topbar component
691
+ *
692
+ * Props-driven component that accepts logo, navigation items, user info, and more
693
+ * via props for maximum reusability
694
+ */
695
+ declare const TopBar: React.ForwardRefExoticComponent<TopBarProps & React.RefAttributes<HTMLDivElement>>;
696
+
697
+ interface MenuItem {
698
+ id: string;
699
+ label: string;
700
+ href?: string;
701
+ icon?: React.ReactNode;
702
+ children?: MenuItem[];
703
+ }
704
+ interface SideNavProps extends React.HTMLAttributes<HTMLDivElement> {
705
+ /**
706
+ * Menu items to display in the sidebar
707
+ */
708
+ menuItems?: MenuItem[];
709
+ /**
710
+ * Header title displayed at the top of the sidebar
711
+ */
712
+ headerTitle?: string;
713
+ /**
714
+ * Support section configuration
715
+ */
716
+ supportSection?: {
717
+ title: string;
718
+ subtitle: string;
719
+ buttonText: string;
720
+ icon?: React.ReactNode;
721
+ onClick?: () => void;
722
+ } | null;
723
+ /**
724
+ * Callback for navigation
725
+ */
726
+ onNavigate?: (href: string) => void;
727
+ /**
728
+ * Callback when sidebar collapse state changes
729
+ */
730
+ onCollapseChange?: (collapsed: boolean) => void;
731
+ /**
732
+ * Whether the sidebar is collapsed
733
+ */
734
+ collapsed?: boolean;
735
+ /**
736
+ * Initially expanded section IDs
737
+ */
738
+ defaultExpandedSections?: string[];
739
+ }
740
+ /**
741
+ * SideNav - Sidebar navigation component
742
+ *
743
+ * Props-driven component that accepts menu items, header title, and support section
744
+ * via props for maximum reusability
745
+ */
746
+ declare const SideNav: React.ForwardRefExoticComponent<SideNavProps & React.RefAttributes<HTMLDivElement>>;
747
+
748
+ interface AdminShellProps extends React.HTMLAttributes<HTMLDivElement> {
749
+ children: React.ReactNode;
750
+ /**
751
+ * Navigation items for the topbar center menu
752
+ */
753
+ topBarNavItems?: TopBarNavItem[];
754
+ /**
755
+ * Additional items for the topbar "More" dropdown
756
+ */
757
+ topBarMoreItems?: TopBarMoreItem[];
758
+ /**
759
+ * Menu items for the sidebar
760
+ */
761
+ sideNavMenuItems?: MenuItem[];
762
+ /**
763
+ * Sidebar header title
764
+ */
765
+ sideNavHeaderTitle?: string;
766
+ /**
767
+ * Sidebar support section configuration
768
+ */
769
+ sideNavSupportSection?: {
770
+ title: string;
771
+ subtitle: string;
772
+ buttonText: string;
773
+ icon?: React.ReactNode;
774
+ onClick?: () => void;
775
+ } | null;
776
+ /**
777
+ * Logo configuration
778
+ */
779
+ logo?: {
780
+ icon?: React.ReactNode;
781
+ text?: string;
782
+ href?: string;
783
+ };
784
+ /**
785
+ * User info for the profile section
786
+ */
787
+ user?: {
788
+ name?: string;
789
+ email?: string;
790
+ avatar?: string;
791
+ role?: string;
792
+ };
793
+ /**
794
+ * Callback for navigation
795
+ */
796
+ onNavigate?: (href: string) => void;
797
+ /**
798
+ * Callback for logout
799
+ */
800
+ onLogout?: () => void;
801
+ /**
802
+ * Callback when Profile menu item is clicked
803
+ */
804
+ onProfileClick?: () => void;
805
+ /**
806
+ * Callback when Settings menu item is clicked
807
+ */
808
+ onSettingsClick?: () => void;
809
+ /**
810
+ * Callback when Help & Support menu item is clicked
811
+ */
812
+ onHelpSupportClick?: () => void;
813
+ }
814
+ /**
815
+ * AdminShell - Main layout wrapper with fixed positioning.
816
+ *
817
+ * Layout Structure (matching Pencil design exactly):
818
+ * - Topbar: Fixed at top, full width, 68px height, z-50
819
+ * - Sidebar: Fixed below topbar, 260px width (72px collapsed), full height minus topbar
820
+ * - Content: Absolute positioned with left offset for sidebar, top offset for topbar
821
+ */
822
+ declare const AdminShell: React.ForwardRefExoticComponent<AdminShellProps & React.RefAttributes<HTMLDivElement>>;
823
+
824
+ interface ThemeToggleProps extends React.HTMLAttributes<HTMLButtonElement> {
825
+ }
826
+ /**
827
+ * ThemeToggle - Toggle between light and dark themes.
828
+ * 40px square button with icon.
829
+ * Persists theme preference to localStorage.
830
+ */
831
+ declare const ThemeToggle: React.ForwardRefExoticComponent<ThemeToggleProps & React.RefAttributes<HTMLButtonElement>>;
832
+
833
+ interface ProfileDropdownProps extends React.HTMLAttributes<HTMLDivElement> {
834
+ user?: {
835
+ name?: string;
836
+ email?: string;
837
+ avatar?: string;
838
+ };
839
+ onLogout?: () => void;
840
+ onProfileClick?: () => void;
841
+ onSettingsClick?: () => void;
842
+ onHelpSupportClick?: () => void;
843
+ }
844
+ /**
845
+ * ProfileDropdown - User profile dropdown menu.
846
+ * Shows avatar/name and dropdown with options.
847
+ */
848
+ declare const ProfileDropdown: React.ForwardRefExoticComponent<ProfileDropdownProps & React.RefAttributes<HTMLDivElement>>;
849
+
850
+ interface DialogProps {
851
+ isOpen: boolean;
852
+ onClose: () => void;
853
+ title?: string;
854
+ description?: string;
855
+ children?: React.ReactNode;
856
+ /** Optional className for the dialog container (e.g. max-w-2xl for wider modals) */
857
+ className?: string;
858
+ }
859
+ interface DialogTriggerProps {
860
+ children: React.ReactNode;
861
+ onClick: () => void;
862
+ }
863
+ declare const Dialog: React.FC<{
864
+ children: React.ReactNode;
865
+ }>;
866
+ declare const DialogTrigger: React.FC<DialogTriggerProps>;
867
+ declare const DialogContent: React.FC<DialogProps>;
868
+ declare const DialogHeader: React.FC<{
869
+ children: React.ReactNode;
870
+ className?: string;
871
+ }>;
872
+ declare const DialogFooter: React.FC<{
873
+ children: React.ReactNode;
874
+ className?: string;
875
+ }>;
876
+ declare const DialogTitle: React.FC<{
877
+ children: React.ReactNode;
878
+ className?: string;
879
+ }>;
880
+ declare const DialogDescription: React.FC<{
881
+ children: React.ReactNode;
882
+ className?: string;
883
+ }>;
884
+
885
+ interface WelcomeBannerProps extends React.HTMLAttributes<HTMLDivElement> {
886
+ userName?: string;
887
+ subtitle?: string;
888
+ badge?: string;
889
+ }
890
+ /**
891
+ * WelcomeBanner - Hero section with user personalization
892
+ *
893
+ * Features gradient background, backdrop blur, and theme-aware styling
894
+ */
895
+ declare const WelcomeBanner: React.ForwardRefExoticComponent<WelcomeBannerProps & React.RefAttributes<HTMLDivElement>>;
896
+
897
+ interface TechStackCardProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
898
+ name: string;
899
+ description: string;
900
+ icon: React.ReactNode;
901
+ }
902
+ /**
903
+ * TechStackCard - Technology stack item with external link
904
+ *
905
+ * Features hover effects, external link indicator, and theme-aware styling
906
+ */
907
+ declare const TechStackCard: React.ForwardRefExoticComponent<TechStackCardProps & React.RefAttributes<HTMLAnchorElement>>;
908
+
909
+ interface FeatureCardProps extends React.HTMLAttributes<HTMLDivElement> {
910
+ title: string;
911
+ description?: string;
912
+ icon?: React.ReactNode;
913
+ iconClassName?: string;
914
+ variant?: 'default' | 'primary' | 'secondary';
915
+ children?: React.ReactNode;
916
+ }
917
+ /**
918
+ * FeatureCard - Reusable card for displaying features/info
919
+ *
920
+ * Supports different color variants and theme-aware styling
921
+ */
922
+ declare const FeatureCard: React.ForwardRefExoticComponent<FeatureCardProps & React.RefAttributes<HTMLDivElement>>;
923
+
924
+ interface LoadingProps extends React.HTMLAttributes<HTMLDivElement> {
925
+ /**
926
+ * Size of the loading spinner
927
+ */
928
+ size?: 'sm' | 'md' | 'lg';
929
+ /**
930
+ * Message to display below the spinner
931
+ */
932
+ message?: string;
933
+ /**
934
+ * Whether to show the full page overlay
935
+ */
936
+ fullPage?: boolean;
937
+ }
938
+ /**
939
+ * Loading - Professional loading component with animated spinner
940
+ *
941
+ * Features gradient background matching the Lego Box design system,
942
+ * smooth animations, and theme-aware styling
943
+ */
944
+ declare const Loading: React.ForwardRefExoticComponent<LoadingProps & React.RefAttributes<HTMLDivElement>>;
945
+
946
+ interface NotFoundProps extends React.HTMLAttributes<HTMLDivElement> {
947
+ /**
948
+ * Title text for the 404 page
949
+ */
950
+ title?: string;
951
+ /**
952
+ * Description message
953
+ */
954
+ description?: string;
955
+ /**
956
+ * Callback when home button is clicked
957
+ */
958
+ onNavigateHome?: () => void;
959
+ /**
960
+ * Home button text
961
+ */
962
+ homeButtonText?: string;
963
+ }
964
+ /**
965
+ * NotFound - Professional 404 error page component
966
+ *
967
+ * Features animated 404 display, gradient styling matching Lego Box design system,
968
+ * glassmorphism effects, and clear navigation options
969
+ */
970
+ declare const NotFound: React.ForwardRefExoticComponent<NotFoundProps & React.RefAttributes<HTMLDivElement>>;
971
+
972
+ interface AccessDeniedProps extends React.HTMLAttributes<HTMLDivElement> {
973
+ /**
974
+ * Title text for the access denied page
975
+ */
976
+ title?: string;
977
+ /**
978
+ * Description message
979
+ */
980
+ description?: string;
981
+ /**
982
+ * Callback when home button is clicked
983
+ */
984
+ onNavigateHome?: () => void;
985
+ /**
986
+ * Home button text
987
+ */
988
+ homeButtonText?: string;
989
+ }
990
+ /**
991
+ * AccessDenied - Professional access denied / 403 error page component
992
+ *
993
+ * Matches the NotFound design with gradient styling, Lego Box branding,
994
+ * and clear navigation options
995
+ */
996
+ declare const AccessDenied: React.ForwardRefExoticComponent<AccessDeniedProps & React.RefAttributes<HTMLDivElement>>;
997
+
998
+ export { AccessDenied, type AccessDeniedProps, AdminShell, type AdminShellProps, AssignUsersToRoleDialog, type AssignUsersToRoleDialogProps, Badge, type BadgeProps, BulkActionToolbar, type BulkActionToolbarProps, BulkConfirmationDialog, type BulkConfirmationDialogProps, Button, type ButtonProps, CanDisable, type CanDisableProps, CanGuard, type CanGuardProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, ChangePasswordDialog, type ChangePasswordDialogProps, Checkbox, type CheckboxProps, ConsoleLog, type ConsoleLogProps, DataTable, type DataTableColumn, type DataTableProps, DeleteConfirmationDialog, type DeleteConfirmationDialogProps, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, type DialogProps, DialogTitle, DialogTrigger, FeatureCard, type FeatureCardProps, FilterChip, type FilterChipProps, GroupedTable, type GroupedTableColumn, type GroupedTableProps, HealthStatusCard, type HealthStatusCardProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, Loading, type LoadingProps, type LogEntry, type MenuItem, NO_ACCESS_MESSAGE, NotFound, type NotFoundProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, type Permission, type PermissionFormData, PermissionFormDialog, type PermissionFormDialogProps, ProfileDropdown, type ProfileDropdownProps, QuickActionCard, type QuickActionCardProps, type RoleFormData, RoleFormDialog, type RoleFormDialogProps, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, ServiceStatusCard, type ServiceStatusCardProps, SideNav, type SideNavProps, StatsCard, type StatsCardProps, StatusBadge, type StatusBadgeProps, Tabs, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TechStackCard, type TechStackCardProps, ThemeToggle, type ThemeToggleProps, type TicketFormData, TicketFormDialog, type TicketFormDialogProps, TicketStatsCard, type TicketStatsCardProps, Tooltip, type TooltipProps, TopBar, type TopBarMoreItem, type TopBarNavItem, type TopBarProps, type UserForAssign, type UserFormData, UserFormDialog, type UserFormDialogProps, WelcomeBanner, type WelcomeBannerProps, badgeVariants, cn };