@loykin/designkit 0.0.1-dev.0 → 0.0.1-dev.2
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/README.md +177 -100
- package/dist/index.cjs +435 -2564
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -119
- package/dist/index.d.ts +98 -119
- package/dist/index.js +434 -2559
- package/dist/index.js.map +1 -1
- package/dist/styles.css +0 -59
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ComponentType } from 'react';
|
|
3
|
+
import React__default, { ComponentType, CSSProperties, ReactNode } from 'react';
|
|
4
4
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { useRender } from '@base-ui/react/use-render';
|
|
@@ -18,9 +18,6 @@ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
|
18
18
|
import { Slider as Slider$1 } from '@base-ui/react/slider';
|
|
19
19
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
20
20
|
import { Tabs as Tabs$2 } from '@base-ui/react/tabs';
|
|
21
|
-
import { DataGridColumnDef } from '@loykin/gridkit';
|
|
22
|
-
export { DataGridColumnDef } from '@loykin/gridkit';
|
|
23
|
-
import { Table as Table$1, Row } from '@tanstack/react-table';
|
|
24
21
|
import { ClassValue } from 'clsx';
|
|
25
22
|
import * as zustand from 'zustand';
|
|
26
23
|
|
|
@@ -240,7 +237,7 @@ declare function TabsContent({ className, ...props }: Tabs$2.Panel.Props): react
|
|
|
240
237
|
|
|
241
238
|
type ShellId = 'sidebar' | 'header';
|
|
242
239
|
type DensityId = 'compact' | 'default' | 'comfortable';
|
|
243
|
-
type TemplateId = 'table' | 'table-infinity' | 'table-drag' | 'table-card' | 'table-card-list' | 'tabbed' | 'form' | 'form-stacked' | 'form-wizard' | 'form-inline' | 'databody' | 'databody-detail' | 'databody-split' | 'sectioned' | 'typography' | 'colors' | 'login' | 'login-forgot' | 'login-reset' | 'login-otp';
|
|
240
|
+
type TemplateId = 'table' | 'table-infinity' | 'table-drag' | 'table-card' | 'table-card-list' | 'tabbed' | 'form' | 'form-stacked' | 'form-wizard' | 'form-inline' | 'databody' | 'databody-detail' | 'databody-split' | 'sectioned' | 'typography' | 'colors' | 'login' | 'login-forgot' | 'login-reset' | 'login-otp' | 'dashboard' | 'browse' | 'detail' | 'detail-record' | 'detail-full';
|
|
244
241
|
interface GlobalTheme {
|
|
245
242
|
radius: number;
|
|
246
243
|
primaryHue: number;
|
|
@@ -269,95 +266,33 @@ interface ThemeState {
|
|
|
269
266
|
setTemplate: (template: TemplateId) => void;
|
|
270
267
|
}
|
|
271
268
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
interface DataGridViewCardProps<T> {
|
|
286
|
-
renderCard?: (row: Row<T>) => React.ReactNode;
|
|
287
|
-
cardColumns?: number;
|
|
288
|
-
minCardWidth?: number;
|
|
289
|
-
minColumns?: number;
|
|
290
|
-
}
|
|
291
|
-
interface DataGridViewProps<T extends Record<string, unknown>> {
|
|
292
|
-
data: T[];
|
|
293
|
-
columns: DataGridColumnDef<T>[];
|
|
294
|
-
getRowId?: (row: T, index: number) => string;
|
|
295
|
-
variant?: DataGridViewVariant;
|
|
296
|
-
tableHeight?: string | number;
|
|
297
|
-
rowHeight?: number;
|
|
298
|
-
tableWidthMode?: 'spacer' | 'fill-last' | 'independent';
|
|
299
|
-
enableSorting?: boolean;
|
|
300
|
-
enableColumnFilters?: boolean;
|
|
301
|
-
emptyMessage?: string;
|
|
302
|
-
headerLeft?: DataGridViewFilter<T>;
|
|
303
|
-
headerRight?: DataGridViewFilter<T>;
|
|
304
|
-
pagination?: {
|
|
305
|
-
pageSize?: number;
|
|
306
|
-
} | false;
|
|
307
|
-
footer?: (table: Table$1<T>) => React.ReactNode;
|
|
308
|
-
infinity?: DataGridViewInfinityProps<T>;
|
|
309
|
-
drag?: DataGridViewDragProps<T>;
|
|
310
|
-
card?: DataGridViewCardProps<T>;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
declare function DataGridView<T extends Record<string, unknown>>({ data, columns, getRowId, variant, tableHeight, rowHeight, tableWidthMode, enableSorting, enableColumnFilters, emptyMessage, headerLeft, headerRight, pagination, footer, infinity, drag, card, }: DataGridViewProps<T>): react_jsx_runtime.JSX.Element;
|
|
314
|
-
|
|
315
|
-
type TemplateGroup = 'Table' | 'Pages' | 'Design' | 'Auth';
|
|
316
|
-
type TemplateNavigationGroupId = 'DataBodyTemplate' | 'FormWizardBodyTemplate' | 'LoginBodyTemplate' | 'Common';
|
|
317
|
-
type TemplateExportKind = 'data-grid' | 'data-grid-card' | 'body-template' | 'typography' | 'databody' | 'login';
|
|
318
|
-
interface TemplateOptionChoice {
|
|
319
|
-
value: string;
|
|
320
|
-
label: string;
|
|
269
|
+
interface DashboardPanelProps {
|
|
270
|
+
title?: string;
|
|
271
|
+
description?: string;
|
|
272
|
+
loading?: boolean;
|
|
273
|
+
error?: string | null;
|
|
274
|
+
transparent?: boolean;
|
|
275
|
+
/** Edit mode — shows drag handle and grab cursor on the header */
|
|
276
|
+
editable?: boolean;
|
|
277
|
+
className?: string;
|
|
278
|
+
style?: CSSProperties;
|
|
279
|
+
children?: ReactNode;
|
|
280
|
+
headerRight?: ReactNode;
|
|
321
281
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
282
|
+
declare const DashboardPanel: React$1.ForwardRefExoticComponent<DashboardPanelProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
283
|
+
interface DashboardBodyTemplateProps {
|
|
284
|
+
theme?: CSSProperties;
|
|
285
|
+
className?: string;
|
|
286
|
+
title?: ReactNode;
|
|
287
|
+
description?: ReactNode;
|
|
288
|
+
topBar?: ReactNode;
|
|
289
|
+
toolbar?: ReactNode;
|
|
290
|
+
/** Variable bar — rendered as a separate strip between the header and content */
|
|
291
|
+
variableBar?: ReactNode;
|
|
292
|
+
children?: ReactNode;
|
|
293
|
+
contentClassName?: string;
|
|
328
294
|
}
|
|
329
|
-
|
|
330
|
-
id: TemplateId;
|
|
331
|
-
label: string;
|
|
332
|
-
/** Short label used only in nav sub-menu (omit to fall back to label) */
|
|
333
|
-
navigationLabel?: string;
|
|
334
|
-
/** Section-header label for the nav group this item anchors (omit to fall back to label) */
|
|
335
|
-
navigationSubgroupLabel?: string;
|
|
336
|
-
group: TemplateGroup;
|
|
337
|
-
navigationGroup: TemplateNavigationGroupId;
|
|
338
|
-
navigationParent?: TemplateId;
|
|
339
|
-
layoutClassName: string;
|
|
340
|
-
exportComponent: string;
|
|
341
|
-
exportKind: TemplateExportKind;
|
|
342
|
-
preset: TemplateOverride;
|
|
343
|
-
options?: TemplateOptionSpec[];
|
|
344
|
-
preview?: {
|
|
345
|
-
variant?: DataGridViewVariant;
|
|
346
|
-
breadcrumb?: React.ReactNode;
|
|
347
|
-
title?: React.ReactNode;
|
|
348
|
-
description?: React.ReactNode;
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
declare const TEMPLATE_DEFINITIONS: TemplateDefinition[];
|
|
352
|
-
declare function getTemplateDefinition(id: TemplateId): TemplateDefinition | undefined;
|
|
353
|
-
declare function createTemplateOverrides(): Record<TemplateId, TemplateOverride>;
|
|
354
|
-
|
|
355
|
-
interface TemplateCodeContext {
|
|
356
|
-
definition: TemplateDefinition;
|
|
357
|
-
themeProp: string;
|
|
358
|
-
layoutClassName: string;
|
|
359
|
-
}
|
|
360
|
-
type TemplateCodeBuilder = (context: TemplateCodeContext) => string;
|
|
295
|
+
declare function DashboardBodyTemplate({ theme, className, title, description, topBar, toolbar, variableBar, children, contentClassName, }: DashboardBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
361
296
|
|
|
362
297
|
interface DataBodyTabProps {
|
|
363
298
|
id: string;
|
|
@@ -435,13 +370,78 @@ declare const DataBodyTemplate: typeof Root$1 & {
|
|
|
435
370
|
Field: typeof DataBodyField;
|
|
436
371
|
};
|
|
437
372
|
|
|
438
|
-
interface
|
|
373
|
+
interface BrowseBodyTemplateProps {
|
|
439
374
|
theme?: React__default.CSSProperties;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
375
|
+
className?: string;
|
|
376
|
+
topBar?: React__default.ReactNode;
|
|
377
|
+
title?: React__default.ReactNode;
|
|
378
|
+
description?: React__default.ReactNode;
|
|
379
|
+
actions?: React__default.ReactNode;
|
|
380
|
+
sidebar: React__default.ReactNode;
|
|
381
|
+
sidebarTitle?: string;
|
|
382
|
+
sidebarWidth?: string;
|
|
383
|
+
toolbar?: React__default.ReactNode;
|
|
384
|
+
footer?: React__default.ReactNode;
|
|
385
|
+
contentClassName?: string;
|
|
386
|
+
children?: React__default.ReactNode;
|
|
443
387
|
}
|
|
444
|
-
declare function
|
|
388
|
+
declare function BrowseBodyTemplate({ theme, className, topBar, title, description, actions, sidebar, sidebarTitle, sidebarWidth, toolbar, footer, contentClassName, children, }: BrowseBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
389
|
+
|
|
390
|
+
type DetailBodyVariant = 'media' | 'record' | 'full';
|
|
391
|
+
interface DetailBodyTemplateProps {
|
|
392
|
+
variant?: DetailBodyVariant;
|
|
393
|
+
theme?: React__default.CSSProperties;
|
|
394
|
+
className?: string;
|
|
395
|
+
topBar?: React__default.ReactNode;
|
|
396
|
+
header?: React__default.ReactNode;
|
|
397
|
+
lead?: React__default.ReactNode;
|
|
398
|
+
eyebrow?: React__default.ReactNode;
|
|
399
|
+
title?: React__default.ReactNode;
|
|
400
|
+
description?: React__default.ReactNode;
|
|
401
|
+
status?: React__default.ReactNode;
|
|
402
|
+
actions?: React__default.ReactNode;
|
|
403
|
+
media?: React__default.ReactNode;
|
|
404
|
+
aside?: React__default.ReactNode;
|
|
405
|
+
summary?: React__default.ReactNode;
|
|
406
|
+
stickyAside?: boolean;
|
|
407
|
+
contentClassName?: string;
|
|
408
|
+
mediaClassName?: string;
|
|
409
|
+
asideClassName?: string;
|
|
410
|
+
children?: React__default.ReactNode;
|
|
411
|
+
}
|
|
412
|
+
interface DetailBodyHeaderProps {
|
|
413
|
+
eyebrow?: React__default.ReactNode;
|
|
414
|
+
title?: React__default.ReactNode;
|
|
415
|
+
description?: React__default.ReactNode;
|
|
416
|
+
status?: React__default.ReactNode;
|
|
417
|
+
actions?: React__default.ReactNode;
|
|
418
|
+
compact?: boolean;
|
|
419
|
+
className?: string;
|
|
420
|
+
}
|
|
421
|
+
declare function DetailBodyHeader({ eyebrow, title, description, status, actions, compact, className, }: DetailBodyHeaderProps): react_jsx_runtime.JSX.Element;
|
|
422
|
+
interface DetailBodyTabProps {
|
|
423
|
+
id: string;
|
|
424
|
+
label: React__default.ReactNode;
|
|
425
|
+
count?: number;
|
|
426
|
+
disabled?: boolean;
|
|
427
|
+
children?: React__default.ReactNode;
|
|
428
|
+
}
|
|
429
|
+
declare function DetailBodyTab(_props: DetailBodyTabProps): null;
|
|
430
|
+
interface DetailBodySectionProps {
|
|
431
|
+
title?: React__default.ReactNode;
|
|
432
|
+
description?: React__default.ReactNode;
|
|
433
|
+
actions?: React__default.ReactNode;
|
|
434
|
+
surface?: 'plain' | 'card' | 'bordered';
|
|
435
|
+
className?: string;
|
|
436
|
+
children?: React__default.ReactNode;
|
|
437
|
+
}
|
|
438
|
+
declare function DetailBodySection({ title, description, actions, surface, className, children, }: DetailBodySectionProps): react_jsx_runtime.JSX.Element;
|
|
439
|
+
declare function DetailBodyTemplateRoot({ variant, theme, className, topBar, header, lead, eyebrow, title, description, status, actions, media, aside, summary, stickyAside, contentClassName, mediaClassName, asideClassName, children, }: DetailBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
440
|
+
declare const DetailBodyTemplate: typeof DetailBodyTemplateRoot & {
|
|
441
|
+
Header: typeof DetailBodyHeader;
|
|
442
|
+
Tab: typeof DetailBodyTab;
|
|
443
|
+
Section: typeof DetailBodySection;
|
|
444
|
+
};
|
|
445
445
|
|
|
446
446
|
type FormWizardVariant = 'card' | 'plain';
|
|
447
447
|
interface FormWizardStep {
|
|
@@ -463,14 +463,6 @@ interface FormWizardBodyTemplateProps {
|
|
|
463
463
|
}
|
|
464
464
|
declare function FormWizardBodyTemplate({ theme, title, topBar, variant, steps, activeStep, onNext, onBack, onFinish, }: FormWizardBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
465
465
|
|
|
466
|
-
declare function FormWizardBodyTemplateDemo({ theme, variant, topBarShow, topBarVariant, topBarBg, }: {
|
|
467
|
-
theme?: React.CSSProperties;
|
|
468
|
-
variant?: FormWizardVariant;
|
|
469
|
-
topBarShow?: string;
|
|
470
|
-
topBarVariant?: string;
|
|
471
|
-
topBarBg?: string;
|
|
472
|
-
}): react_jsx_runtime.JSX.Element;
|
|
473
|
-
|
|
474
466
|
interface TypographyBodyTemplateProps {
|
|
475
467
|
theme?: React.CSSProperties;
|
|
476
468
|
breadcrumb?: React.ReactNode;
|
|
@@ -614,16 +606,6 @@ declare function buildTopBar(opts: {
|
|
|
614
606
|
}): React__default.ReactNode;
|
|
615
607
|
declare function PageTopBar({ left, right, variant, height, className, style, children, }: PageTopBarProps): react_jsx_runtime.JSX.Element;
|
|
616
608
|
|
|
617
|
-
interface TemplateConfig {
|
|
618
|
-
id: TemplateId;
|
|
619
|
-
label: string;
|
|
620
|
-
component: ComponentType<{
|
|
621
|
-
theme?: React.CSSProperties;
|
|
622
|
-
}>;
|
|
623
|
-
buildCode?: TemplateCodeBuilder;
|
|
624
|
-
group?: string;
|
|
625
|
-
description?: string;
|
|
626
|
-
}
|
|
627
609
|
interface TemplateNavigationItem {
|
|
628
610
|
id: TemplateId;
|
|
629
611
|
label: string;
|
|
@@ -637,9 +619,6 @@ interface TemplateNavigationGroup {
|
|
|
637
619
|
items: TemplateNavigationItem[];
|
|
638
620
|
}
|
|
639
621
|
|
|
640
|
-
declare const TEMPLATES: TemplateConfig[];
|
|
641
|
-
declare const TEMPLATE_NAVIGATION: TemplateNavigationGroup[];
|
|
642
|
-
|
|
643
622
|
declare function useIsMobile(): boolean;
|
|
644
623
|
|
|
645
624
|
declare function useStyleInjector(): void;
|
|
@@ -664,4 +643,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
664
643
|
|
|
665
644
|
declare const useThemeStore: zustand.UseBoundStore<zustand.StoreApi<ThemeState>>;
|
|
666
645
|
|
|
667
|
-
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, type DataBodyBodyProps, type DataBodyFieldProps, type DataBodyGroupProps, type DataBodyRowProps, type DataBodySectionProps, type DataBodySummaryProps, type DataBodyTabProps, DataBodyTemplate,
|
|
646
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BrowseBodyTemplate, type BrowseBodyTemplateProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, DashboardBodyTemplate, type DashboardBodyTemplateProps, DashboardPanel, type DashboardPanelProps, type DataBodyBodyProps, type DataBodyFieldProps, type DataBodyGroupProps, type DataBodyRowProps, type DataBodySectionProps, type DataBodySummaryProps, type DataBodyTabProps, DataBodyTemplate, type DataBodyTemplateProps, DataPage, type DataPageActionsProps, type DataPageContentProps, type DataPageFooterProps, type DataPageGroupBodyProps, type DataPageGroupHeaderProps, type DataPageGroupProps, type DataPageGroupToolbarProps, type DataPageHeaderProps, type DataPageProps, type DataPageTabProps, type DataPageTabsProps, type DataPageTitleBlockProps, type DensityId, type DetailBodyHeaderProps, type DetailBodySectionProps, type DetailBodyTabProps, DetailBodyTemplate, type DetailBodyTemplateProps, type DetailBodyVariant, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateAction, type EmptyStateProps, FormWizardBodyTemplate, type FormWizardBodyTemplateProps, type FormWizardStep, type FormWizardVariant, type GlobalTheme, type GroupLayout, type GroupVariant, Input, Label, type LoginBg, LoginBodyTemplate, type LoginBodyTemplateProps, type LoginCard, type LoginCardWidth, type LoginLayout, type LoginSide, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, PageBreadcrumb, type PageBreadcrumbItem, PageTopBar, type PageTopBarProps, type PageTopBarVariant, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, type ShellId, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, type TemplateId, type TemplateNavigationGroup, type TemplateNavigationItem, type TemplateOverride, type ThemeState, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TypographyBodyTemplate, type TypographyBodyTemplateProps, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useStyleInjector, useThemeStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
-
import React__default, { ComponentType } from 'react';
|
|
3
|
+
import React__default, { ComponentType, CSSProperties, ReactNode } from 'react';
|
|
4
4
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
5
5
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
6
6
|
import { useRender } from '@base-ui/react/use-render';
|
|
@@ -18,9 +18,6 @@ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
|
18
18
|
import { Slider as Slider$1 } from '@base-ui/react/slider';
|
|
19
19
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
20
20
|
import { Tabs as Tabs$2 } from '@base-ui/react/tabs';
|
|
21
|
-
import { DataGridColumnDef } from '@loykin/gridkit';
|
|
22
|
-
export { DataGridColumnDef } from '@loykin/gridkit';
|
|
23
|
-
import { Table as Table$1, Row } from '@tanstack/react-table';
|
|
24
21
|
import { ClassValue } from 'clsx';
|
|
25
22
|
import * as zustand from 'zustand';
|
|
26
23
|
|
|
@@ -240,7 +237,7 @@ declare function TabsContent({ className, ...props }: Tabs$2.Panel.Props): react
|
|
|
240
237
|
|
|
241
238
|
type ShellId = 'sidebar' | 'header';
|
|
242
239
|
type DensityId = 'compact' | 'default' | 'comfortable';
|
|
243
|
-
type TemplateId = 'table' | 'table-infinity' | 'table-drag' | 'table-card' | 'table-card-list' | 'tabbed' | 'form' | 'form-stacked' | 'form-wizard' | 'form-inline' | 'databody' | 'databody-detail' | 'databody-split' | 'sectioned' | 'typography' | 'colors' | 'login' | 'login-forgot' | 'login-reset' | 'login-otp';
|
|
240
|
+
type TemplateId = 'table' | 'table-infinity' | 'table-drag' | 'table-card' | 'table-card-list' | 'tabbed' | 'form' | 'form-stacked' | 'form-wizard' | 'form-inline' | 'databody' | 'databody-detail' | 'databody-split' | 'sectioned' | 'typography' | 'colors' | 'login' | 'login-forgot' | 'login-reset' | 'login-otp' | 'dashboard' | 'browse' | 'detail' | 'detail-record' | 'detail-full';
|
|
244
241
|
interface GlobalTheme {
|
|
245
242
|
radius: number;
|
|
246
243
|
primaryHue: number;
|
|
@@ -269,95 +266,33 @@ interface ThemeState {
|
|
|
269
266
|
setTemplate: (template: TemplateId) => void;
|
|
270
267
|
}
|
|
271
268
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
interface DataGridViewCardProps<T> {
|
|
286
|
-
renderCard?: (row: Row<T>) => React.ReactNode;
|
|
287
|
-
cardColumns?: number;
|
|
288
|
-
minCardWidth?: number;
|
|
289
|
-
minColumns?: number;
|
|
290
|
-
}
|
|
291
|
-
interface DataGridViewProps<T extends Record<string, unknown>> {
|
|
292
|
-
data: T[];
|
|
293
|
-
columns: DataGridColumnDef<T>[];
|
|
294
|
-
getRowId?: (row: T, index: number) => string;
|
|
295
|
-
variant?: DataGridViewVariant;
|
|
296
|
-
tableHeight?: string | number;
|
|
297
|
-
rowHeight?: number;
|
|
298
|
-
tableWidthMode?: 'spacer' | 'fill-last' | 'independent';
|
|
299
|
-
enableSorting?: boolean;
|
|
300
|
-
enableColumnFilters?: boolean;
|
|
301
|
-
emptyMessage?: string;
|
|
302
|
-
headerLeft?: DataGridViewFilter<T>;
|
|
303
|
-
headerRight?: DataGridViewFilter<T>;
|
|
304
|
-
pagination?: {
|
|
305
|
-
pageSize?: number;
|
|
306
|
-
} | false;
|
|
307
|
-
footer?: (table: Table$1<T>) => React.ReactNode;
|
|
308
|
-
infinity?: DataGridViewInfinityProps<T>;
|
|
309
|
-
drag?: DataGridViewDragProps<T>;
|
|
310
|
-
card?: DataGridViewCardProps<T>;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
declare function DataGridView<T extends Record<string, unknown>>({ data, columns, getRowId, variant, tableHeight, rowHeight, tableWidthMode, enableSorting, enableColumnFilters, emptyMessage, headerLeft, headerRight, pagination, footer, infinity, drag, card, }: DataGridViewProps<T>): react_jsx_runtime.JSX.Element;
|
|
314
|
-
|
|
315
|
-
type TemplateGroup = 'Table' | 'Pages' | 'Design' | 'Auth';
|
|
316
|
-
type TemplateNavigationGroupId = 'DataBodyTemplate' | 'FormWizardBodyTemplate' | 'LoginBodyTemplate' | 'Common';
|
|
317
|
-
type TemplateExportKind = 'data-grid' | 'data-grid-card' | 'body-template' | 'typography' | 'databody' | 'login';
|
|
318
|
-
interface TemplateOptionChoice {
|
|
319
|
-
value: string;
|
|
320
|
-
label: string;
|
|
269
|
+
interface DashboardPanelProps {
|
|
270
|
+
title?: string;
|
|
271
|
+
description?: string;
|
|
272
|
+
loading?: boolean;
|
|
273
|
+
error?: string | null;
|
|
274
|
+
transparent?: boolean;
|
|
275
|
+
/** Edit mode — shows drag handle and grab cursor on the header */
|
|
276
|
+
editable?: boolean;
|
|
277
|
+
className?: string;
|
|
278
|
+
style?: CSSProperties;
|
|
279
|
+
children?: ReactNode;
|
|
280
|
+
headerRight?: ReactNode;
|
|
321
281
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
282
|
+
declare const DashboardPanel: React$1.ForwardRefExoticComponent<DashboardPanelProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
283
|
+
interface DashboardBodyTemplateProps {
|
|
284
|
+
theme?: CSSProperties;
|
|
285
|
+
className?: string;
|
|
286
|
+
title?: ReactNode;
|
|
287
|
+
description?: ReactNode;
|
|
288
|
+
topBar?: ReactNode;
|
|
289
|
+
toolbar?: ReactNode;
|
|
290
|
+
/** Variable bar — rendered as a separate strip between the header and content */
|
|
291
|
+
variableBar?: ReactNode;
|
|
292
|
+
children?: ReactNode;
|
|
293
|
+
contentClassName?: string;
|
|
328
294
|
}
|
|
329
|
-
|
|
330
|
-
id: TemplateId;
|
|
331
|
-
label: string;
|
|
332
|
-
/** Short label used only in nav sub-menu (omit to fall back to label) */
|
|
333
|
-
navigationLabel?: string;
|
|
334
|
-
/** Section-header label for the nav group this item anchors (omit to fall back to label) */
|
|
335
|
-
navigationSubgroupLabel?: string;
|
|
336
|
-
group: TemplateGroup;
|
|
337
|
-
navigationGroup: TemplateNavigationGroupId;
|
|
338
|
-
navigationParent?: TemplateId;
|
|
339
|
-
layoutClassName: string;
|
|
340
|
-
exportComponent: string;
|
|
341
|
-
exportKind: TemplateExportKind;
|
|
342
|
-
preset: TemplateOverride;
|
|
343
|
-
options?: TemplateOptionSpec[];
|
|
344
|
-
preview?: {
|
|
345
|
-
variant?: DataGridViewVariant;
|
|
346
|
-
breadcrumb?: React.ReactNode;
|
|
347
|
-
title?: React.ReactNode;
|
|
348
|
-
description?: React.ReactNode;
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
declare const TEMPLATE_DEFINITIONS: TemplateDefinition[];
|
|
352
|
-
declare function getTemplateDefinition(id: TemplateId): TemplateDefinition | undefined;
|
|
353
|
-
declare function createTemplateOverrides(): Record<TemplateId, TemplateOverride>;
|
|
354
|
-
|
|
355
|
-
interface TemplateCodeContext {
|
|
356
|
-
definition: TemplateDefinition;
|
|
357
|
-
themeProp: string;
|
|
358
|
-
layoutClassName: string;
|
|
359
|
-
}
|
|
360
|
-
type TemplateCodeBuilder = (context: TemplateCodeContext) => string;
|
|
295
|
+
declare function DashboardBodyTemplate({ theme, className, title, description, topBar, toolbar, variableBar, children, contentClassName, }: DashboardBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
361
296
|
|
|
362
297
|
interface DataBodyTabProps {
|
|
363
298
|
id: string;
|
|
@@ -435,13 +370,78 @@ declare const DataBodyTemplate: typeof Root$1 & {
|
|
|
435
370
|
Field: typeof DataBodyField;
|
|
436
371
|
};
|
|
437
372
|
|
|
438
|
-
interface
|
|
373
|
+
interface BrowseBodyTemplateProps {
|
|
439
374
|
theme?: React__default.CSSProperties;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
375
|
+
className?: string;
|
|
376
|
+
topBar?: React__default.ReactNode;
|
|
377
|
+
title?: React__default.ReactNode;
|
|
378
|
+
description?: React__default.ReactNode;
|
|
379
|
+
actions?: React__default.ReactNode;
|
|
380
|
+
sidebar: React__default.ReactNode;
|
|
381
|
+
sidebarTitle?: string;
|
|
382
|
+
sidebarWidth?: string;
|
|
383
|
+
toolbar?: React__default.ReactNode;
|
|
384
|
+
footer?: React__default.ReactNode;
|
|
385
|
+
contentClassName?: string;
|
|
386
|
+
children?: React__default.ReactNode;
|
|
443
387
|
}
|
|
444
|
-
declare function
|
|
388
|
+
declare function BrowseBodyTemplate({ theme, className, topBar, title, description, actions, sidebar, sidebarTitle, sidebarWidth, toolbar, footer, contentClassName, children, }: BrowseBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
389
|
+
|
|
390
|
+
type DetailBodyVariant = 'media' | 'record' | 'full';
|
|
391
|
+
interface DetailBodyTemplateProps {
|
|
392
|
+
variant?: DetailBodyVariant;
|
|
393
|
+
theme?: React__default.CSSProperties;
|
|
394
|
+
className?: string;
|
|
395
|
+
topBar?: React__default.ReactNode;
|
|
396
|
+
header?: React__default.ReactNode;
|
|
397
|
+
lead?: React__default.ReactNode;
|
|
398
|
+
eyebrow?: React__default.ReactNode;
|
|
399
|
+
title?: React__default.ReactNode;
|
|
400
|
+
description?: React__default.ReactNode;
|
|
401
|
+
status?: React__default.ReactNode;
|
|
402
|
+
actions?: React__default.ReactNode;
|
|
403
|
+
media?: React__default.ReactNode;
|
|
404
|
+
aside?: React__default.ReactNode;
|
|
405
|
+
summary?: React__default.ReactNode;
|
|
406
|
+
stickyAside?: boolean;
|
|
407
|
+
contentClassName?: string;
|
|
408
|
+
mediaClassName?: string;
|
|
409
|
+
asideClassName?: string;
|
|
410
|
+
children?: React__default.ReactNode;
|
|
411
|
+
}
|
|
412
|
+
interface DetailBodyHeaderProps {
|
|
413
|
+
eyebrow?: React__default.ReactNode;
|
|
414
|
+
title?: React__default.ReactNode;
|
|
415
|
+
description?: React__default.ReactNode;
|
|
416
|
+
status?: React__default.ReactNode;
|
|
417
|
+
actions?: React__default.ReactNode;
|
|
418
|
+
compact?: boolean;
|
|
419
|
+
className?: string;
|
|
420
|
+
}
|
|
421
|
+
declare function DetailBodyHeader({ eyebrow, title, description, status, actions, compact, className, }: DetailBodyHeaderProps): react_jsx_runtime.JSX.Element;
|
|
422
|
+
interface DetailBodyTabProps {
|
|
423
|
+
id: string;
|
|
424
|
+
label: React__default.ReactNode;
|
|
425
|
+
count?: number;
|
|
426
|
+
disabled?: boolean;
|
|
427
|
+
children?: React__default.ReactNode;
|
|
428
|
+
}
|
|
429
|
+
declare function DetailBodyTab(_props: DetailBodyTabProps): null;
|
|
430
|
+
interface DetailBodySectionProps {
|
|
431
|
+
title?: React__default.ReactNode;
|
|
432
|
+
description?: React__default.ReactNode;
|
|
433
|
+
actions?: React__default.ReactNode;
|
|
434
|
+
surface?: 'plain' | 'card' | 'bordered';
|
|
435
|
+
className?: string;
|
|
436
|
+
children?: React__default.ReactNode;
|
|
437
|
+
}
|
|
438
|
+
declare function DetailBodySection({ title, description, actions, surface, className, children, }: DetailBodySectionProps): react_jsx_runtime.JSX.Element;
|
|
439
|
+
declare function DetailBodyTemplateRoot({ variant, theme, className, topBar, header, lead, eyebrow, title, description, status, actions, media, aside, summary, stickyAside, contentClassName, mediaClassName, asideClassName, children, }: DetailBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
440
|
+
declare const DetailBodyTemplate: typeof DetailBodyTemplateRoot & {
|
|
441
|
+
Header: typeof DetailBodyHeader;
|
|
442
|
+
Tab: typeof DetailBodyTab;
|
|
443
|
+
Section: typeof DetailBodySection;
|
|
444
|
+
};
|
|
445
445
|
|
|
446
446
|
type FormWizardVariant = 'card' | 'plain';
|
|
447
447
|
interface FormWizardStep {
|
|
@@ -463,14 +463,6 @@ interface FormWizardBodyTemplateProps {
|
|
|
463
463
|
}
|
|
464
464
|
declare function FormWizardBodyTemplate({ theme, title, topBar, variant, steps, activeStep, onNext, onBack, onFinish, }: FormWizardBodyTemplateProps): react_jsx_runtime.JSX.Element;
|
|
465
465
|
|
|
466
|
-
declare function FormWizardBodyTemplateDemo({ theme, variant, topBarShow, topBarVariant, topBarBg, }: {
|
|
467
|
-
theme?: React.CSSProperties;
|
|
468
|
-
variant?: FormWizardVariant;
|
|
469
|
-
topBarShow?: string;
|
|
470
|
-
topBarVariant?: string;
|
|
471
|
-
topBarBg?: string;
|
|
472
|
-
}): react_jsx_runtime.JSX.Element;
|
|
473
|
-
|
|
474
466
|
interface TypographyBodyTemplateProps {
|
|
475
467
|
theme?: React.CSSProperties;
|
|
476
468
|
breadcrumb?: React.ReactNode;
|
|
@@ -614,16 +606,6 @@ declare function buildTopBar(opts: {
|
|
|
614
606
|
}): React__default.ReactNode;
|
|
615
607
|
declare function PageTopBar({ left, right, variant, height, className, style, children, }: PageTopBarProps): react_jsx_runtime.JSX.Element;
|
|
616
608
|
|
|
617
|
-
interface TemplateConfig {
|
|
618
|
-
id: TemplateId;
|
|
619
|
-
label: string;
|
|
620
|
-
component: ComponentType<{
|
|
621
|
-
theme?: React.CSSProperties;
|
|
622
|
-
}>;
|
|
623
|
-
buildCode?: TemplateCodeBuilder;
|
|
624
|
-
group?: string;
|
|
625
|
-
description?: string;
|
|
626
|
-
}
|
|
627
609
|
interface TemplateNavigationItem {
|
|
628
610
|
id: TemplateId;
|
|
629
611
|
label: string;
|
|
@@ -637,9 +619,6 @@ interface TemplateNavigationGroup {
|
|
|
637
619
|
items: TemplateNavigationItem[];
|
|
638
620
|
}
|
|
639
621
|
|
|
640
|
-
declare const TEMPLATES: TemplateConfig[];
|
|
641
|
-
declare const TEMPLATE_NAVIGATION: TemplateNavigationGroup[];
|
|
642
|
-
|
|
643
622
|
declare function useIsMobile(): boolean;
|
|
644
623
|
|
|
645
624
|
declare function useStyleInjector(): void;
|
|
@@ -664,4 +643,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
664
643
|
|
|
665
644
|
declare const useThemeStore: zustand.UseBoundStore<zustand.StoreApi<ThemeState>>;
|
|
666
645
|
|
|
667
|
-
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, type DataBodyBodyProps, type DataBodyFieldProps, type DataBodyGroupProps, type DataBodyRowProps, type DataBodySectionProps, type DataBodySummaryProps, type DataBodyTabProps, DataBodyTemplate,
|
|
646
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BrowseBodyTemplate, type BrowseBodyTemplateProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, DashboardBodyTemplate, type DashboardBodyTemplateProps, DashboardPanel, type DashboardPanelProps, type DataBodyBodyProps, type DataBodyFieldProps, type DataBodyGroupProps, type DataBodyRowProps, type DataBodySectionProps, type DataBodySummaryProps, type DataBodyTabProps, DataBodyTemplate, type DataBodyTemplateProps, DataPage, type DataPageActionsProps, type DataPageContentProps, type DataPageFooterProps, type DataPageGroupBodyProps, type DataPageGroupHeaderProps, type DataPageGroupProps, type DataPageGroupToolbarProps, type DataPageHeaderProps, type DataPageProps, type DataPageTabProps, type DataPageTabsProps, type DataPageTitleBlockProps, type DensityId, type DetailBodyHeaderProps, type DetailBodySectionProps, type DetailBodyTabProps, DetailBodyTemplate, type DetailBodyTemplateProps, type DetailBodyVariant, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateAction, type EmptyStateProps, FormWizardBodyTemplate, type FormWizardBodyTemplateProps, type FormWizardStep, type FormWizardVariant, type GlobalTheme, type GroupLayout, type GroupVariant, Input, Label, type LoginBg, LoginBodyTemplate, type LoginBodyTemplateProps, type LoginCard, type LoginCardWidth, type LoginLayout, type LoginSide, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, PageBreadcrumb, type PageBreadcrumbItem, PageTopBar, type PageTopBarProps, type PageTopBarVariant, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, type ShellId, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger, type TemplateId, type TemplateNavigationGroup, type TemplateNavigationItem, type TemplateOverride, type ThemeState, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TypographyBodyTemplate, type TypographyBodyTemplateProps, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useStyleInjector, useThemeStore };
|