@kjaniec-dev/ui 0.4.1 → 0.6.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 +168 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -1
- package/dist/index.d.ts +69 -1
- package/dist/index.js +162 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -292,4 +292,72 @@ interface PageHeaderProps {
|
|
|
292
292
|
}
|
|
293
293
|
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
294
294
|
|
|
295
|
-
|
|
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
|
+
interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
333
|
+
label: string;
|
|
334
|
+
hint?: string;
|
|
335
|
+
error?: string;
|
|
336
|
+
required?: boolean;
|
|
337
|
+
children: React.ReactNode;
|
|
338
|
+
}
|
|
339
|
+
declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
340
|
+
|
|
341
|
+
interface ErrorStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
342
|
+
title?: string;
|
|
343
|
+
message: string;
|
|
344
|
+
onRetry?: () => void;
|
|
345
|
+
retryLabel?: string;
|
|
346
|
+
}
|
|
347
|
+
declare const ErrorState: React.ForwardRefExoticComponent<ErrorStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
348
|
+
|
|
349
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
350
|
+
variant?: "text" | "circular" | "rectangular";
|
|
351
|
+
width?: string | number;
|
|
352
|
+
height?: string | number;
|
|
353
|
+
}
|
|
354
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
355
|
+
|
|
356
|
+
interface DashboardShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
357
|
+
sidebar?: React.ReactNode;
|
|
358
|
+
topbar?: React.ReactNode;
|
|
359
|
+
children: React.ReactNode;
|
|
360
|
+
}
|
|
361
|
+
declare const DashboardShell: React.ForwardRefExoticComponent<DashboardShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
362
|
+
|
|
363
|
+
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, DashboardShell, type DashboardShellProps, DataTable, type DataTableColumn, type DataTableProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, Field, FormField, type FormFieldProps, 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, Skeleton, type SkeletonProps, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -292,4 +292,72 @@ interface PageHeaderProps {
|
|
|
292
292
|
}
|
|
293
293
|
declare const PageHeader: React.ForwardRefExoticComponent<PageHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
294
294
|
|
|
295
|
-
|
|
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
|
+
interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
333
|
+
label: string;
|
|
334
|
+
hint?: string;
|
|
335
|
+
error?: string;
|
|
336
|
+
required?: boolean;
|
|
337
|
+
children: React.ReactNode;
|
|
338
|
+
}
|
|
339
|
+
declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
340
|
+
|
|
341
|
+
interface ErrorStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
342
|
+
title?: string;
|
|
343
|
+
message: string;
|
|
344
|
+
onRetry?: () => void;
|
|
345
|
+
retryLabel?: string;
|
|
346
|
+
}
|
|
347
|
+
declare const ErrorState: React.ForwardRefExoticComponent<ErrorStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
348
|
+
|
|
349
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
350
|
+
variant?: "text" | "circular" | "rectangular";
|
|
351
|
+
width?: string | number;
|
|
352
|
+
height?: string | number;
|
|
353
|
+
}
|
|
354
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
355
|
+
|
|
356
|
+
interface DashboardShellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
357
|
+
sidebar?: React.ReactNode;
|
|
358
|
+
topbar?: React.ReactNode;
|
|
359
|
+
children: React.ReactNode;
|
|
360
|
+
}
|
|
361
|
+
declare const DashboardShell: React.ForwardRefExoticComponent<DashboardShellProps & React.RefAttributes<HTMLDivElement>>;
|
|
362
|
+
|
|
363
|
+
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, DashboardShell, type DashboardShellProps, DataTable, type DataTableColumn, type DataTableProps, DropdownMenu, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, Field, FormField, type FormFieldProps, 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, Skeleton, type SkeletonProps, 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 };
|
package/dist/index.js
CHANGED
|
@@ -632,7 +632,7 @@ var AccordionContent = React17.forwardRef(
|
|
|
632
632
|
ref,
|
|
633
633
|
className: cn("grid transition-[grid-template-rows] duration-200 ease-out", isOpen ? "[grid-template-rows:1fr]" : "[grid-template-rows:0fr]"),
|
|
634
634
|
...props,
|
|
635
|
-
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: cn("px-[1.2rem] pb-
|
|
635
|
+
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: cn("px-[1.2rem] pt-3 pb-4 text-[0.85rem] text-muted-foreground", className), children }) })
|
|
636
636
|
}
|
|
637
637
|
);
|
|
638
638
|
}
|
|
@@ -1079,7 +1079,167 @@ var PageHeader = React17.forwardRef(
|
|
|
1079
1079
|
] }) })
|
|
1080
1080
|
);
|
|
1081
1081
|
PageHeader.displayName = "PageHeader";
|
|
1082
|
+
var EmptyState = React17.forwardRef(
|
|
1083
|
+
({ className, icon, title, description, action, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1084
|
+
"div",
|
|
1085
|
+
{
|
|
1086
|
+
ref,
|
|
1087
|
+
className: cn(
|
|
1088
|
+
"flex flex-col items-center justify-center text-center p-8 border border-dashed border-border rounded-kj-lg bg-muted/20 min-h-[300px]",
|
|
1089
|
+
className
|
|
1090
|
+
),
|
|
1091
|
+
...props,
|
|
1092
|
+
children: [
|
|
1093
|
+
icon && /* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-muted text-muted-foreground mb-4 [&_svg]:h-6 [&_svg]:w-6", children: icon }),
|
|
1094
|
+
/* @__PURE__ */ jsx("h3", { className: "text-base font-bold text-foreground mb-1", children: title }),
|
|
1095
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground max-w-sm mb-6 leading-relaxed", children: description }),
|
|
1096
|
+
action && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3", children: action })
|
|
1097
|
+
]
|
|
1098
|
+
}
|
|
1099
|
+
)
|
|
1100
|
+
);
|
|
1101
|
+
EmptyState.displayName = "EmptyState";
|
|
1102
|
+
var MetricCard = React17.forwardRef(
|
|
1103
|
+
({ className, title, value, trend, trendDirection = "neutral", description, icon, ...props }, ref) => {
|
|
1104
|
+
const trendColor = {
|
|
1105
|
+
up: "text-success bg-success-surface border-success/20",
|
|
1106
|
+
down: "text-danger bg-danger-surface border-danger/20",
|
|
1107
|
+
neutral: "text-muted-foreground bg-muted border-border/20"
|
|
1108
|
+
}[trendDirection];
|
|
1109
|
+
return /* @__PURE__ */ jsxs(Card, { ref, className: cn("p-6", className), ...props, children: [
|
|
1110
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
1111
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono font-semibold uppercase tracking-[0.1em] text-muted-foreground", children: title }),
|
|
1112
|
+
icon && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground shrink-0 [&_svg]:h-4 [&_svg]:w-4", children: icon })
|
|
1113
|
+
] }),
|
|
1114
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2.5 mb-1.5", children: [
|
|
1115
|
+
/* @__PURE__ */ jsx("span", { className: "text-3xl font-bold tracking-tight text-foreground", children: value }),
|
|
1116
|
+
trend && /* @__PURE__ */ jsx("span", { className: cn("text-[0.75rem] font-bold px-2 py-0.5 rounded-full border", trendColor), children: trend })
|
|
1117
|
+
] }),
|
|
1118
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: description })
|
|
1119
|
+
] });
|
|
1120
|
+
}
|
|
1121
|
+
);
|
|
1122
|
+
MetricCard.displayName = "MetricCard";
|
|
1123
|
+
function DataTable({
|
|
1124
|
+
className,
|
|
1125
|
+
columns,
|
|
1126
|
+
data,
|
|
1127
|
+
loading = false,
|
|
1128
|
+
error,
|
|
1129
|
+
emptyTitle = "No data available",
|
|
1130
|
+
emptyDescription = "There are no records to display at this time.",
|
|
1131
|
+
emptyAction,
|
|
1132
|
+
...props
|
|
1133
|
+
}) {
|
|
1134
|
+
return /* @__PURE__ */ jsxs(TableWrap, { className: cn("relative overflow-hidden", className), ...props, children: [
|
|
1135
|
+
/* @__PURE__ */ jsxs(Table, { children: [
|
|
1136
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsx(TableRow, { children: columns.map((col, idx) => /* @__PURE__ */ jsx(TableHead, { className: col.className, children: col.header }, idx)) }) }),
|
|
1137
|
+
/* @__PURE__ */ jsx(TableBody, { children: loading && data.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length, className: "h-64 text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center gap-3", children: [
|
|
1138
|
+
/* @__PURE__ */ jsx(Spinner, { size: 32 }),
|
|
1139
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading dataset..." })
|
|
1140
|
+
] }) }) }) : error ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length, className: "p-8", children: /* @__PURE__ */ jsx(Alert, { variant: "danger", title: "Error loading data", children: error }) }) }) : data.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: columns.length, className: "p-0", children: /* @__PURE__ */ jsx(
|
|
1141
|
+
EmptyState,
|
|
1142
|
+
{
|
|
1143
|
+
title: emptyTitle,
|
|
1144
|
+
description: emptyDescription,
|
|
1145
|
+
action: emptyAction,
|
|
1146
|
+
className: "border-none bg-transparent rounded-none py-16"
|
|
1147
|
+
}
|
|
1148
|
+
) }) }) : data.map((row, rowIdx) => /* @__PURE__ */ jsx(TableRow, { children: columns.map((col, colIdx) => /* @__PURE__ */ jsx(TableCell, { className: col.className, children: col.accessor(row) }, colIdx)) }, rowIdx)) })
|
|
1149
|
+
] }),
|
|
1150
|
+
loading && data.length > 0 && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-background/50 backdrop-blur-[1px] grid place-items-center z-10 transition-opacity duration-150", children: /* @__PURE__ */ jsx(Spinner, { size: 36 }) })
|
|
1151
|
+
] });
|
|
1152
|
+
}
|
|
1153
|
+
DataTable.displayName = "DataTable";
|
|
1154
|
+
var FormField = React17.forwardRef(
|
|
1155
|
+
({ className, label, hint, error, required, children, ...props }, ref) => {
|
|
1156
|
+
const id = React17.useId();
|
|
1157
|
+
const hintId = `${id}-hint`;
|
|
1158
|
+
const errorId = `${id}-error`;
|
|
1159
|
+
const child = React17.Children.only(children);
|
|
1160
|
+
const clonedChild = React17.cloneElement(child, {
|
|
1161
|
+
id: child.props.id ?? id,
|
|
1162
|
+
"aria-describedby": cn(
|
|
1163
|
+
hint && hintId,
|
|
1164
|
+
error && errorId,
|
|
1165
|
+
child.props["aria-describedby"]
|
|
1166
|
+
) || void 0,
|
|
1167
|
+
"aria-invalid": error ? "true" : void 0,
|
|
1168
|
+
required: child.props.required ?? required
|
|
1169
|
+
});
|
|
1170
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-1.5 w-full", className), ...props, children: [
|
|
1171
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: id, required, children: label }),
|
|
1172
|
+
clonedChild,
|
|
1173
|
+
hint && !error && /* @__PURE__ */ jsx(Hint, { id: hintId, children: hint }),
|
|
1174
|
+
error && /* @__PURE__ */ jsx(Hint, { id: errorId, error: true, children: error })
|
|
1175
|
+
] });
|
|
1176
|
+
}
|
|
1177
|
+
);
|
|
1178
|
+
FormField.displayName = "FormField";
|
|
1179
|
+
var ErrorState = React17.forwardRef(
|
|
1180
|
+
({ className, title = "Wyst\u0105pi\u0142 b\u0142\u0105d", message, onRetry, retryLabel = "Spr\xF3buj ponownie", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1181
|
+
"div",
|
|
1182
|
+
{
|
|
1183
|
+
ref,
|
|
1184
|
+
className: cn(
|
|
1185
|
+
"flex flex-col items-center justify-center text-center p-8 border border-danger/25 rounded-kj-lg bg-danger-surface/20 min-h-[300px]",
|
|
1186
|
+
className
|
|
1187
|
+
),
|
|
1188
|
+
...props,
|
|
1189
|
+
children: [
|
|
1190
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-danger-surface border border-danger/30 text-danger mb-4", children: /* @__PURE__ */ jsx("svg", { fill: "none", stroke: "currentColor", strokeWidth: 2.5, viewBox: "0 0 24 24", className: "h-6 w-6", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" }) }) }),
|
|
1191
|
+
/* @__PURE__ */ jsx("h3", { className: "text-base font-bold text-foreground mb-1", children: title }),
|
|
1192
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground max-w-sm mb-6 leading-relaxed", children: message }),
|
|
1193
|
+
onRetry && /* @__PURE__ */ jsx(Button, { size: "sm", variant: "danger", onClick: onRetry, children: retryLabel })
|
|
1194
|
+
]
|
|
1195
|
+
}
|
|
1196
|
+
)
|
|
1197
|
+
);
|
|
1198
|
+
ErrorState.displayName = "ErrorState";
|
|
1199
|
+
var Skeleton = React17.forwardRef(
|
|
1200
|
+
({ className, variant = "rectangular", width, height, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1201
|
+
"div",
|
|
1202
|
+
{
|
|
1203
|
+
ref,
|
|
1204
|
+
className: cn(
|
|
1205
|
+
"animate-pulse bg-muted/40",
|
|
1206
|
+
variant === "text" && "h-3 w-4/5 rounded-sm my-1.5",
|
|
1207
|
+
variant === "circular" && "rounded-full",
|
|
1208
|
+
variant === "rectangular" && "rounded-kj-md",
|
|
1209
|
+
className
|
|
1210
|
+
),
|
|
1211
|
+
style: {
|
|
1212
|
+
width,
|
|
1213
|
+
height,
|
|
1214
|
+
...style
|
|
1215
|
+
},
|
|
1216
|
+
...props
|
|
1217
|
+
}
|
|
1218
|
+
)
|
|
1219
|
+
);
|
|
1220
|
+
Skeleton.displayName = "Skeleton";
|
|
1221
|
+
var DashboardShell = React17.forwardRef(
|
|
1222
|
+
({ className, sidebar, topbar, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1223
|
+
"div",
|
|
1224
|
+
{
|
|
1225
|
+
ref,
|
|
1226
|
+
className: cn(
|
|
1227
|
+
"min-h-screen bg-canvas text-foreground flex flex-col md:flex-row",
|
|
1228
|
+
className
|
|
1229
|
+
),
|
|
1230
|
+
...props,
|
|
1231
|
+
children: [
|
|
1232
|
+
sidebar && /* @__PURE__ */ jsx("aside", { className: "w-full md:w-64 border-r border-border bg-surface shrink-0 z-20", children: /* @__PURE__ */ jsx("div", { className: "sticky top-0 h-auto md:h-screen flex flex-col", children: sidebar }) }),
|
|
1233
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col min-w-0", children: [
|
|
1234
|
+
topbar && /* @__PURE__ */ jsx("header", { className: "sticky top-0 h-14 border-b border-border bg-surface flex items-center px-6 z-10 shrink-0", children: topbar }),
|
|
1235
|
+
/* @__PURE__ */ jsx("main", { className: "flex-1 p-6 md:p-8 max-w-7xl w-full mx-auto", children })
|
|
1236
|
+
] })
|
|
1237
|
+
]
|
|
1238
|
+
}
|
|
1239
|
+
)
|
|
1240
|
+
);
|
|
1241
|
+
DashboardShell.displayName = "DashboardShell";
|
|
1082
1242
|
|
|
1083
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Avatar, AvatarGroup, Badge, Breadcrumb, BreadcrumbItem, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, Field, Hint, Input, Label, Modal, ModalActions, ModalDescription, ModalTitle, PageHeader, Pagination, Progress, Radio, Segmented, Select, Slider, Spinner, Stat, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableWrap, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ToastProvider, Tooltip, badgeVariants, buttonVariants, cn, sliderThumbCSS, useToast };
|
|
1243
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, Avatar, AvatarGroup, Badge, Breadcrumb, BreadcrumbItem, BreadcrumbSeparator, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, DashboardShell, DataTable, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, ErrorState, Field, FormField, Hint, Input, Label, MetricCard, Modal, ModalActions, ModalDescription, ModalTitle, PageHeader, Pagination, Progress, Radio, Segmented, Select, Skeleton, Slider, Spinner, Stat, Switch, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, TableWrap, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ToastProvider, Tooltip, badgeVariants, buttonVariants, cn, sliderThumbCSS, useToast };
|
|
1084
1244
|
//# sourceMappingURL=index.js.map
|
|
1085
1245
|
//# sourceMappingURL=index.js.map
|