@kjaniec-dev/ui 0.4.0 → 0.5.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.
- package/dist/index.cjs +343 -91
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -5
- package/dist/index.d.ts +43 -5
- package/dist/index.js +340 -91
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -261,11 +261,12 @@ interface ModalProps {
|
|
|
261
261
|
/** Max width of the panel. Default 440px. */
|
|
262
262
|
width?: number;
|
|
263
263
|
className?: string;
|
|
264
|
+
showClose?: boolean;
|
|
264
265
|
}
|
|
265
|
-
/** Centered overlay dialog. Closes on backdrop click and Escape. */
|
|
266
|
-
declare function Modal({ open, onClose, children, width, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
267
|
-
declare function ModalTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
|
|
268
|
-
declare function ModalDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
|
|
266
|
+
/** Centered overlay dialog. Closes on backdrop click and Escape. Includes focus trap and restore. */
|
|
267
|
+
declare function Modal({ open, onClose, children, width, className, showClose }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
declare function ModalTitle({ className, id, ...props }: React.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
|
|
269
|
+
declare function ModalDescription({ className, id, ...props }: React.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
|
|
269
270
|
declare function ModalActions({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
270
271
|
|
|
271
272
|
type ToastTone = "default" | "success" | "danger";
|
|
@@ -291,4 +292,41 @@ interface PageHeaderProps {
|
|
|
291
292
|
}
|
|
292
293
|
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
293
294
|
|
|
294
|
-
|
|
295
|
+
interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
296
|
+
icon?: React.ReactNode;
|
|
297
|
+
title: string;
|
|
298
|
+
description?: string;
|
|
299
|
+
action?: React.ReactNode;
|
|
300
|
+
}
|
|
301
|
+
declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
302
|
+
|
|
303
|
+
interface MetricCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
304
|
+
title: string;
|
|
305
|
+
value: string | number;
|
|
306
|
+
trend?: string;
|
|
307
|
+
trendDirection?: "up" | "down" | "neutral";
|
|
308
|
+
description?: string;
|
|
309
|
+
icon?: React.ReactNode;
|
|
310
|
+
}
|
|
311
|
+
declare const MetricCard: React.ForwardRefExoticComponent<MetricCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
312
|
+
|
|
313
|
+
interface DataTableColumn<T> {
|
|
314
|
+
header: React.ReactNode;
|
|
315
|
+
accessor: (row: T) => React.ReactNode;
|
|
316
|
+
className?: string;
|
|
317
|
+
}
|
|
318
|
+
interface DataTableProps<T> extends React.HTMLAttributes<HTMLDivElement> {
|
|
319
|
+
columns: DataTableColumn<T>[];
|
|
320
|
+
data: T[];
|
|
321
|
+
loading?: boolean;
|
|
322
|
+
error?: string;
|
|
323
|
+
emptyTitle?: string;
|
|
324
|
+
emptyDescription?: string;
|
|
325
|
+
emptyAction?: React.ReactNode;
|
|
326
|
+
}
|
|
327
|
+
declare function DataTable<T>({ className, columns, data, loading, error, emptyTitle, emptyDescription, emptyAction, ...props }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
328
|
+
declare namespace DataTable {
|
|
329
|
+
var displayName: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, Alert, type AlertProps, Avatar, AvatarGroup, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbSeparator, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, DataTable, type DataTableColumn, type DataTableProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, type EmptyStateProps, Field, Hint, type HintProps, Input, type InputProps, Label, type LabelProps, MetricCard, type MetricCardProps, Modal, ModalActions, ModalDescription, type ModalProps, ModalTitle, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, Progress, type ProgressProps, Radio, type RadioProps, Segmented, type SegmentedOption, type SegmentedProps, Select, type SelectProps, Slider, type SliderProps, Spinner, type SpinnerProps, Stat, type StatProps, Switch, type SwitchProps, Table, TableBody, TableCell, type TableCellProps, TableHead, TableHeader, TableRow, TableWrap, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type ToastOptions, ToastProvider, type ToastTone, Tooltip, type TooltipProps, badgeVariants, buttonVariants, cn, sliderThumbCSS, useToast };
|