@loykin/designkit 0.0.2 → 0.0.4
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 +208 -125
- package/cli/designkit.mjs +78 -0
- package/dist/index.cjs +65 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +65 -5
- package/dist/index.js.map +1 -1
- package/docs/guides/README.md +20 -0
- package/docs/guides/commerce-workflow.md +47 -0
- package/docs/guides/form-workflow.md +212 -0
- package/docs/guides/managed-table.md +435 -0
- package/docs/guides/manifest.json +48 -0
- package/docs/guides/publishing-workflow.md +53 -0
- package/package.json +17 -5
package/dist/index.d.cts
CHANGED
|
@@ -341,6 +341,12 @@ interface DataBodyTabProps {
|
|
|
341
341
|
label: React__default.ReactNode;
|
|
342
342
|
count?: number;
|
|
343
343
|
disabled?: boolean;
|
|
344
|
+
/** Search and filter controls scoped to this tab. */
|
|
345
|
+
toolbarLeft?: React__default.ReactNode;
|
|
346
|
+
/** Actions scoped to this tab, such as resource creation and export. */
|
|
347
|
+
toolbarRight?: React__default.ReactNode;
|
|
348
|
+
/** Content rendered beneath the active tab body, such as pagination. */
|
|
349
|
+
footer?: React__default.ReactNode;
|
|
344
350
|
children: React__default.ReactNode;
|
|
345
351
|
}
|
|
346
352
|
declare function DataBodyTab(_props: DataBodyTabProps): null;
|
|
@@ -374,6 +380,22 @@ interface DataBodySummaryProps {
|
|
|
374
380
|
children?: React__default.ReactNode;
|
|
375
381
|
}
|
|
376
382
|
declare function DataBodySummary(_props: DataBodySummaryProps): null;
|
|
383
|
+
/**
|
|
384
|
+
* Keeps controls, async status, data content, and pagination in one resource boundary.
|
|
385
|
+
* Render it inside a `Tab` or `Body` when those controls are scoped to that content.
|
|
386
|
+
*/
|
|
387
|
+
interface DataBodyResourceProps {
|
|
388
|
+
toolbarLeft?: React__default.ReactNode;
|
|
389
|
+
toolbarRight?: React__default.ReactNode;
|
|
390
|
+
refreshing?: boolean;
|
|
391
|
+
refreshingLabel?: string;
|
|
392
|
+
notice?: React__default.ReactNode;
|
|
393
|
+
footer?: React__default.ReactNode;
|
|
394
|
+
children?: React__default.ReactNode;
|
|
395
|
+
className?: string;
|
|
396
|
+
bodyClassName?: string;
|
|
397
|
+
}
|
|
398
|
+
declare function DataBodyResource({ toolbarLeft, toolbarRight, refreshing, refreshingLabel, notice, footer, children, className, bodyClassName, }: DataBodyResourceProps): React__default.JSX.Element;
|
|
377
399
|
type GroupLayout = 'stacked' | 'horizontal' | 'inline' | 'split';
|
|
378
400
|
type GroupVariant = 'card' | 'plain' | 'bordered';
|
|
379
401
|
/**
|
|
@@ -437,8 +459,8 @@ declare function Root$1(props: DataBodyTemplateProps): React__default.JSX.Elemen
|
|
|
437
459
|
/**
|
|
438
460
|
* Page-level template for data, list, tab, form, and settings experiences.
|
|
439
461
|
*
|
|
440
|
-
* Compound members such as `DataBodyTemplate.Group`, `Tab`, `Section`,
|
|
441
|
-
* `Row`, and `Field` must be rendered beneath this root. Rendering a compound
|
|
462
|
+
* Compound members such as `DataBodyTemplate.Resource`, `Group`, `Tab`, `Section`,
|
|
463
|
+
* `Body`, `Row`, and `Field` must be rendered beneath this root. Rendering a compound
|
|
442
464
|
* member without the root throws a descriptive runtime error.
|
|
443
465
|
*
|
|
444
466
|
* @example
|
|
@@ -457,6 +479,7 @@ declare const DataBodyTemplate: typeof Root$1 & {
|
|
|
457
479
|
Tab: typeof DataBodyTab;
|
|
458
480
|
Section: typeof DataBodySection;
|
|
459
481
|
Summary: typeof DataBodySummary;
|
|
482
|
+
Resource: typeof DataBodyResource;
|
|
460
483
|
Group: typeof DataBodyGroup;
|
|
461
484
|
Row: typeof DataBodyRow;
|
|
462
485
|
Field: typeof DataBodyField;
|
|
@@ -831,4 +854,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
831
854
|
|
|
832
855
|
declare const useThemeStore: zustand.UseBoundStore<zustand.StoreApi<ThemeState>>;
|
|
833
856
|
|
|
834
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BrowseBodyTemplate, type BrowseBodyTemplateProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, type CurrentTemplateId, 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, ListDetailBodyTemplate, type ListDetailBodyTemplateProps, 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, PanelTemplate, type PanelTemplateProps, type PanelTemplateSectionProps, 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, type StyleInjectorOptions, 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, WorkbenchBodyTemplate, type WorkbenchBodyTemplateProps, type WorkbenchResizeState, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useSidebarOptional, useStyleInjector, useThemeStore };
|
|
857
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BrowseBodyTemplate, type BrowseBodyTemplateProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, type CurrentTemplateId, DashboardBodyTemplate, type DashboardBodyTemplateProps, DashboardPanel, type DashboardPanelProps, type DataBodyBodyProps, type DataBodyFieldProps, type DataBodyGroupProps, type DataBodyResourceProps, 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, ListDetailBodyTemplate, type ListDetailBodyTemplateProps, 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, PanelTemplate, type PanelTemplateProps, type PanelTemplateSectionProps, 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, type StyleInjectorOptions, 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, WorkbenchBodyTemplate, type WorkbenchBodyTemplateProps, type WorkbenchResizeState, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useSidebarOptional, useStyleInjector, useThemeStore };
|
package/dist/index.d.ts
CHANGED
|
@@ -341,6 +341,12 @@ interface DataBodyTabProps {
|
|
|
341
341
|
label: React__default.ReactNode;
|
|
342
342
|
count?: number;
|
|
343
343
|
disabled?: boolean;
|
|
344
|
+
/** Search and filter controls scoped to this tab. */
|
|
345
|
+
toolbarLeft?: React__default.ReactNode;
|
|
346
|
+
/** Actions scoped to this tab, such as resource creation and export. */
|
|
347
|
+
toolbarRight?: React__default.ReactNode;
|
|
348
|
+
/** Content rendered beneath the active tab body, such as pagination. */
|
|
349
|
+
footer?: React__default.ReactNode;
|
|
344
350
|
children: React__default.ReactNode;
|
|
345
351
|
}
|
|
346
352
|
declare function DataBodyTab(_props: DataBodyTabProps): null;
|
|
@@ -374,6 +380,22 @@ interface DataBodySummaryProps {
|
|
|
374
380
|
children?: React__default.ReactNode;
|
|
375
381
|
}
|
|
376
382
|
declare function DataBodySummary(_props: DataBodySummaryProps): null;
|
|
383
|
+
/**
|
|
384
|
+
* Keeps controls, async status, data content, and pagination in one resource boundary.
|
|
385
|
+
* Render it inside a `Tab` or `Body` when those controls are scoped to that content.
|
|
386
|
+
*/
|
|
387
|
+
interface DataBodyResourceProps {
|
|
388
|
+
toolbarLeft?: React__default.ReactNode;
|
|
389
|
+
toolbarRight?: React__default.ReactNode;
|
|
390
|
+
refreshing?: boolean;
|
|
391
|
+
refreshingLabel?: string;
|
|
392
|
+
notice?: React__default.ReactNode;
|
|
393
|
+
footer?: React__default.ReactNode;
|
|
394
|
+
children?: React__default.ReactNode;
|
|
395
|
+
className?: string;
|
|
396
|
+
bodyClassName?: string;
|
|
397
|
+
}
|
|
398
|
+
declare function DataBodyResource({ toolbarLeft, toolbarRight, refreshing, refreshingLabel, notice, footer, children, className, bodyClassName, }: DataBodyResourceProps): React__default.JSX.Element;
|
|
377
399
|
type GroupLayout = 'stacked' | 'horizontal' | 'inline' | 'split';
|
|
378
400
|
type GroupVariant = 'card' | 'plain' | 'bordered';
|
|
379
401
|
/**
|
|
@@ -437,8 +459,8 @@ declare function Root$1(props: DataBodyTemplateProps): React__default.JSX.Elemen
|
|
|
437
459
|
/**
|
|
438
460
|
* Page-level template for data, list, tab, form, and settings experiences.
|
|
439
461
|
*
|
|
440
|
-
* Compound members such as `DataBodyTemplate.Group`, `Tab`, `Section`,
|
|
441
|
-
* `Row`, and `Field` must be rendered beneath this root. Rendering a compound
|
|
462
|
+
* Compound members such as `DataBodyTemplate.Resource`, `Group`, `Tab`, `Section`,
|
|
463
|
+
* `Body`, `Row`, and `Field` must be rendered beneath this root. Rendering a compound
|
|
442
464
|
* member without the root throws a descriptive runtime error.
|
|
443
465
|
*
|
|
444
466
|
* @example
|
|
@@ -457,6 +479,7 @@ declare const DataBodyTemplate: typeof Root$1 & {
|
|
|
457
479
|
Tab: typeof DataBodyTab;
|
|
458
480
|
Section: typeof DataBodySection;
|
|
459
481
|
Summary: typeof DataBodySummary;
|
|
482
|
+
Resource: typeof DataBodyResource;
|
|
460
483
|
Group: typeof DataBodyGroup;
|
|
461
484
|
Row: typeof DataBodyRow;
|
|
462
485
|
Field: typeof DataBodyField;
|
|
@@ -831,4 +854,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
831
854
|
|
|
832
855
|
declare const useThemeStore: zustand.UseBoundStore<zustand.StoreApi<ThemeState>>;
|
|
833
856
|
|
|
834
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BrowseBodyTemplate, type BrowseBodyTemplateProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, type CurrentTemplateId, 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, ListDetailBodyTemplate, type ListDetailBodyTemplateProps, 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, PanelTemplate, type PanelTemplateProps, type PanelTemplateSectionProps, 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, type StyleInjectorOptions, 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, WorkbenchBodyTemplate, type WorkbenchBodyTemplateProps, type WorkbenchResizeState, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useSidebarOptional, useStyleInjector, useThemeStore };
|
|
857
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BrowseBodyTemplate, type BrowseBodyTemplateProps, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, ColorsBodyTemplate, type ColorsBodyTemplateProps, type CurrentTemplateId, DashboardBodyTemplate, type DashboardBodyTemplateProps, DashboardPanel, type DashboardPanelProps, type DataBodyBodyProps, type DataBodyFieldProps, type DataBodyGroupProps, type DataBodyResourceProps, 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, ListDetailBodyTemplate, type ListDetailBodyTemplateProps, 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, PanelTemplate, type PanelTemplateProps, type PanelTemplateSectionProps, 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, type StyleInjectorOptions, 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, WorkbenchBodyTemplate, type WorkbenchBodyTemplateProps, type WorkbenchResizeState, badgeVariants, buildTemplateTheme, buildTopBar, buttonVariants, cn, navigationMenuTriggerStyle, tabsListVariants, useIsMobile, useSidebar, useSidebarOptional, useStyleInjector, useThemeStore };
|
package/dist/index.js
CHANGED
|
@@ -2805,6 +2805,56 @@ function isDataBodySummary(node) {
|
|
|
2805
2805
|
node && typeof node === "object" && "type" in node && node.type === DataBodySummary
|
|
2806
2806
|
);
|
|
2807
2807
|
}
|
|
2808
|
+
function DataBodyResource({
|
|
2809
|
+
toolbarLeft,
|
|
2810
|
+
toolbarRight,
|
|
2811
|
+
refreshing,
|
|
2812
|
+
refreshingLabel = "Refreshing",
|
|
2813
|
+
notice,
|
|
2814
|
+
footer,
|
|
2815
|
+
children,
|
|
2816
|
+
className,
|
|
2817
|
+
bodyClassName
|
|
2818
|
+
}) {
|
|
2819
|
+
useDataBodyTemplateParent("Resource");
|
|
2820
|
+
return /* @__PURE__ */ jsxs(
|
|
2821
|
+
"section",
|
|
2822
|
+
{
|
|
2823
|
+
"data-slot": "data-body-resource",
|
|
2824
|
+
"data-refreshing": refreshing ? "true" : "false",
|
|
2825
|
+
className: cn("flex min-h-0 flex-col", className),
|
|
2826
|
+
children: [
|
|
2827
|
+
(toolbarLeft || toolbarRight || refreshing) && /* @__PURE__ */ jsxs(DataPage.GroupToolbar, { children: [
|
|
2828
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: toolbarLeft }),
|
|
2829
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
2830
|
+
refreshing && /* @__PURE__ */ jsxs(
|
|
2831
|
+
"span",
|
|
2832
|
+
{
|
|
2833
|
+
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
2834
|
+
role: "status",
|
|
2835
|
+
children: [
|
|
2836
|
+
/* @__PURE__ */ jsx("span", { className: "size-3 animate-spin rounded-full border-2 border-muted border-t-primary" }),
|
|
2837
|
+
refreshingLabel
|
|
2838
|
+
]
|
|
2839
|
+
}
|
|
2840
|
+
),
|
|
2841
|
+
/* @__PURE__ */ jsx(DataPage.Actions, { children: toolbarRight })
|
|
2842
|
+
] })
|
|
2843
|
+
] }),
|
|
2844
|
+
notice && /* @__PURE__ */ jsx("div", { className: "mb-3 shrink-0", children: notice }),
|
|
2845
|
+
/* @__PURE__ */ jsx(DataPage.GroupBody, { className: cn("min-h-0 flex-1", bodyClassName), children }),
|
|
2846
|
+
footer && /* @__PURE__ */ jsx(
|
|
2847
|
+
"div",
|
|
2848
|
+
{
|
|
2849
|
+
className: "mt-3 shrink-0 border-t border-border pt-3",
|
|
2850
|
+
"data-slot": "data-body-resource-footer",
|
|
2851
|
+
children: footer
|
|
2852
|
+
}
|
|
2853
|
+
)
|
|
2854
|
+
]
|
|
2855
|
+
}
|
|
2856
|
+
);
|
|
2857
|
+
}
|
|
2808
2858
|
var layoutDefaultVariant = {
|
|
2809
2859
|
stacked: "plain",
|
|
2810
2860
|
horizontal: "card",
|
|
@@ -2994,7 +3044,13 @@ function RootContent({
|
|
|
2994
3044
|
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2995
3045
|
] }),
|
|
2996
3046
|
summaryEl && /* @__PURE__ */ jsx("div", { className: "shrink-0 border-b border-border px-(--designkit-page-padding-x) py-(--designkit-panel-gap)", children: summaryEl.props.children }),
|
|
2997
|
-
/* @__PURE__ */ jsx(DataPage.Content, { className: contentClassName, children: /* @__PURE__ */
|
|
3047
|
+
/* @__PURE__ */ jsx(DataPage.Content, { className: contentClassName, children: /* @__PURE__ */ jsxs(DataPage.Group, { className: "flex h-full flex-col", children: [
|
|
3048
|
+
(toolbarLeft || toolbarRight) && /* @__PURE__ */ jsxs(DataPage.GroupToolbar, { children: [
|
|
3049
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-2", children: toolbarLeft }),
|
|
3050
|
+
/* @__PURE__ */ jsx(DataPage.Actions, { children: toolbarRight })
|
|
3051
|
+
] }),
|
|
3052
|
+
/* @__PURE__ */ jsx(DataPage.GroupBody, { className: cn("min-h-0 flex-1", bodyEl.props.className), children: bodyEl.props.children })
|
|
3053
|
+
] }) })
|
|
2998
3054
|
] });
|
|
2999
3055
|
}
|
|
3000
3056
|
if (hasSections) {
|
|
@@ -3033,6 +3089,8 @@ function RootContent({
|
|
|
3033
3089
|
] });
|
|
3034
3090
|
}
|
|
3035
3091
|
const activeTabNode = tabs.find((tab) => tab.props.id === activeId) ?? tabs[0];
|
|
3092
|
+
const activeToolbarLeft = activeTabNode?.props.toolbarLeft ?? toolbarLeft;
|
|
3093
|
+
const activeToolbarRight = activeTabNode?.props.toolbarRight ?? toolbarRight;
|
|
3036
3094
|
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-databody", className), style: theme, children: [
|
|
3037
3095
|
/* @__PURE__ */ jsx(TopBarSlot, { topBar }),
|
|
3038
3096
|
/* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
@@ -3052,12 +3110,13 @@ function RootContent({
|
|
|
3052
3110
|
tab.props.id
|
|
3053
3111
|
)) }),
|
|
3054
3112
|
/* @__PURE__ */ jsxs(DataPage.Content, { className: contentClassName, children: [
|
|
3055
|
-
(
|
|
3056
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-2", children:
|
|
3057
|
-
/* @__PURE__ */ jsx(DataPage.Actions, { children:
|
|
3113
|
+
(activeToolbarLeft || activeToolbarRight) && /* @__PURE__ */ jsxs(DataPage.GroupToolbar, { children: [
|
|
3114
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-2", children: activeToolbarLeft }),
|
|
3115
|
+
/* @__PURE__ */ jsx(DataPage.Actions, { children: activeToolbarRight })
|
|
3058
3116
|
] }),
|
|
3059
3117
|
hasTabs ? /* @__PURE__ */ jsx(DataPage.GroupBody, { className: "min-h-full", children: renderGroups(activeTabNode?.props.children) }) : /* @__PURE__ */ jsx(DataPage.GroupBody, { children: bodyChildren.map((child, i) => /* @__PURE__ */ jsx(Fragment$1, { children: isDataBodyGroup(child) ? renderGroup(child) : child }, i)) })
|
|
3060
|
-
] })
|
|
3118
|
+
] }),
|
|
3119
|
+
activeTabNode?.props.footer && /* @__PURE__ */ jsx(DataPage.Footer, { children: activeTabNode.props.footer })
|
|
3061
3120
|
] });
|
|
3062
3121
|
}
|
|
3063
3122
|
function Root2(props) {
|
|
@@ -3068,6 +3127,7 @@ var DataBodyTemplate = Object.assign(Root2, {
|
|
|
3068
3127
|
Tab: DataBodyTab,
|
|
3069
3128
|
Section: DataBodySection,
|
|
3070
3129
|
Summary: DataBodySummary,
|
|
3130
|
+
Resource: DataBodyResource,
|
|
3071
3131
|
Group: DataBodyGroup,
|
|
3072
3132
|
Row: DataBodyRow,
|
|
3073
3133
|
Field: DataBodyField
|