@loykin/designkit 0.0.1 → 0.0.3
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 +226 -138
- package/cli/designkit.mjs +78 -0
- package/dist/index.cjs +84 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -2
- package/dist/index.d.ts +79 -2
- package/dist/index.js +96 -18
- package/dist/index.js.map +1 -1
- package/docs/guides/README.md +19 -0
- package/docs/guides/commerce-workflow.md +47 -0
- package/docs/guides/managed-table.md +435 -0
- package/docs/guides/manifest.json +39 -0
- package/docs/guides/publishing-workflow.md +53 -0
- package/package.json +19 -6
package/dist/index.d.cts
CHANGED
|
@@ -330,19 +330,43 @@ interface WorkbenchBodyTemplateProps {
|
|
|
330
330
|
}
|
|
331
331
|
declare function WorkbenchBodyTemplate({ theme, className, contentClassName, title, description, status, topBar, headerRight, actions, leftPane, mainPane, rightPane, bottomPane, children, resizable, leftPaneCollapsed, rightPaneCollapsed, bottomPaneCollapsed, leftPaneWidth, rightPaneWidth, bottomPaneHeight, minLeftPaneWidth, maxLeftPaneWidth, minRightPaneWidth, maxRightPaneWidth, minBottomPaneHeight, maxBottomPaneHeight, onResize, leftPaneClassName, mainPaneClassName, rightPaneClassName, bottomPaneClassName, leftPaneLabel, rightPaneLabel, }: WorkbenchBodyTemplateProps): React__default.JSX.Element;
|
|
332
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Defines one tab inside `DataBodyTemplate`.
|
|
335
|
+
*
|
|
336
|
+
* Must be rendered beneath a `DataBodyTemplate` root. Do not mix `Tab`, `Section`,
|
|
337
|
+
* and `Body` as sibling layout modes in the same root.
|
|
338
|
+
*/
|
|
333
339
|
interface DataBodyTabProps {
|
|
334
340
|
id: string;
|
|
335
341
|
label: React__default.ReactNode;
|
|
336
342
|
count?: number;
|
|
337
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;
|
|
338
350
|
children: React__default.ReactNode;
|
|
339
351
|
}
|
|
340
352
|
declare function DataBodyTab(_props: DataBodyTabProps): null;
|
|
353
|
+
/**
|
|
354
|
+
* Defines the single-pane body of `DataBodyTemplate`.
|
|
355
|
+
*
|
|
356
|
+
* Must be rendered beneath a `DataBodyTemplate` root. Use this instead of `Tab`
|
|
357
|
+
* or `Section` when the page has one full-height content pane.
|
|
358
|
+
*/
|
|
341
359
|
interface DataBodyBodyProps {
|
|
342
360
|
children?: React__default.ReactNode;
|
|
343
361
|
className?: string;
|
|
344
362
|
}
|
|
345
363
|
declare function DataBodyBody(_props: DataBodyBodyProps): null;
|
|
364
|
+
/**
|
|
365
|
+
* Defines one section in the left-navigation layout of `DataBodyTemplate`.
|
|
366
|
+
*
|
|
367
|
+
* Must be rendered beneath a `DataBodyTemplate` root. Do not combine sections
|
|
368
|
+
* with `Tab` or `Body` siblings in the same root.
|
|
369
|
+
*/
|
|
346
370
|
interface DataBodySectionProps {
|
|
347
371
|
id: string;
|
|
348
372
|
label: React__default.ReactNode;
|
|
@@ -351,14 +375,40 @@ interface DataBodySectionProps {
|
|
|
351
375
|
children?: React__default.ReactNode;
|
|
352
376
|
}
|
|
353
377
|
declare function DataBodySection(_props: DataBodySectionProps): null;
|
|
378
|
+
/** Adds summary content beneath the header of a `DataBodyTemplate` root. */
|
|
354
379
|
interface DataBodySummaryProps {
|
|
355
380
|
children?: React__default.ReactNode;
|
|
356
381
|
}
|
|
357
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;
|
|
358
399
|
type GroupLayout = 'stacked' | 'horizontal' | 'inline' | 'split';
|
|
359
400
|
type GroupVariant = 'card' | 'plain' | 'bordered';
|
|
401
|
+
/**
|
|
402
|
+
* Groups related content inside `DataBodyTemplate`.
|
|
403
|
+
*
|
|
404
|
+
* `DataBodyTemplate.Group` is a compound child and must never be rendered as a
|
|
405
|
+
* standalone page component. Wrap it in `DataBodyTemplate`, optionally inside a
|
|
406
|
+
* `Tab`, `Section`, or `Body`.
|
|
407
|
+
*/
|
|
360
408
|
interface DataBodyGroupProps {
|
|
409
|
+
/** Visual arrangement of the group. @defaultValue `'stacked'` */
|
|
361
410
|
layout?: GroupLayout;
|
|
411
|
+
/** Surface treatment. Defaults depend on `layout`. */
|
|
362
412
|
variant?: GroupVariant;
|
|
363
413
|
title?: React__default.ReactNode;
|
|
364
414
|
description?: React__default.ReactNode;
|
|
@@ -368,12 +418,14 @@ interface DataBodyGroupProps {
|
|
|
368
418
|
children?: React__default.ReactNode;
|
|
369
419
|
}
|
|
370
420
|
declare function DataBodyGroup(props: DataBodyGroupProps): React__default.JSX.Element;
|
|
421
|
+
/** Read-only label/value content for a `DataBodyTemplate.Group`. */
|
|
371
422
|
interface DataBodyFieldProps {
|
|
372
423
|
label: string;
|
|
373
424
|
description?: string;
|
|
374
425
|
children?: React__default.ReactNode;
|
|
375
426
|
}
|
|
376
427
|
declare function DataBodyField({ label, description, children }: DataBodyFieldProps): React__default.JSX.Element;
|
|
428
|
+
/** Form label/control content for a `DataBodyTemplate.Group`. */
|
|
377
429
|
interface DataBodyRowProps {
|
|
378
430
|
label: string;
|
|
379
431
|
description?: string;
|
|
@@ -381,6 +433,12 @@ interface DataBodyRowProps {
|
|
|
381
433
|
children?: React__default.ReactNode;
|
|
382
434
|
}
|
|
383
435
|
declare function DataBodyRow({ label, description, required, children }: DataBodyRowProps): React__default.JSX.Element;
|
|
436
|
+
/**
|
|
437
|
+
* Props for the required root of the `DataBodyTemplate` compound component.
|
|
438
|
+
*
|
|
439
|
+
* Choose one primary child mode: direct content/groups, `Tab`, `Section`, or
|
|
440
|
+
* `Body`. Do not combine those layout modes in the same root.
|
|
441
|
+
*/
|
|
384
442
|
interface DataBodyTemplateProps {
|
|
385
443
|
theme?: React__default.CSSProperties;
|
|
386
444
|
className?: string;
|
|
@@ -397,12 +455,31 @@ interface DataBodyTemplateProps {
|
|
|
397
455
|
children?: React__default.ReactNode;
|
|
398
456
|
contentClassName?: string;
|
|
399
457
|
}
|
|
400
|
-
declare function Root$1(
|
|
458
|
+
declare function Root$1(props: DataBodyTemplateProps): React__default.JSX.Element;
|
|
459
|
+
/**
|
|
460
|
+
* Page-level template for data, list, tab, form, and settings experiences.
|
|
461
|
+
*
|
|
462
|
+
* Compound members such as `DataBodyTemplate.Resource`, `Group`, `Tab`, `Section`,
|
|
463
|
+
* `Body`, `Row`, and `Field` must be rendered beneath this root. Rendering a compound
|
|
464
|
+
* member without the root throws a descriptive runtime error.
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* ```tsx
|
|
468
|
+
* <DataBodyTemplate title="Settings">
|
|
469
|
+
* <DataBodyTemplate.Group title="Profile">
|
|
470
|
+
* <DataBodyTemplate.Row label="Name">
|
|
471
|
+
* <Input />
|
|
472
|
+
* </DataBodyTemplate.Row>
|
|
473
|
+
* </DataBodyTemplate.Group>
|
|
474
|
+
* </DataBodyTemplate>
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
401
477
|
declare const DataBodyTemplate: typeof Root$1 & {
|
|
402
478
|
Body: typeof DataBodyBody;
|
|
403
479
|
Tab: typeof DataBodyTab;
|
|
404
480
|
Section: typeof DataBodySection;
|
|
405
481
|
Summary: typeof DataBodySummary;
|
|
482
|
+
Resource: typeof DataBodyResource;
|
|
406
483
|
Group: typeof DataBodyGroup;
|
|
407
484
|
Row: typeof DataBodyRow;
|
|
408
485
|
Field: typeof DataBodyField;
|
|
@@ -777,4 +854,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
777
854
|
|
|
778
855
|
declare const useThemeStore: zustand.UseBoundStore<zustand.StoreApi<ThemeState>>;
|
|
779
856
|
|
|
780
|
-
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
|
@@ -330,19 +330,43 @@ interface WorkbenchBodyTemplateProps {
|
|
|
330
330
|
}
|
|
331
331
|
declare function WorkbenchBodyTemplate({ theme, className, contentClassName, title, description, status, topBar, headerRight, actions, leftPane, mainPane, rightPane, bottomPane, children, resizable, leftPaneCollapsed, rightPaneCollapsed, bottomPaneCollapsed, leftPaneWidth, rightPaneWidth, bottomPaneHeight, minLeftPaneWidth, maxLeftPaneWidth, minRightPaneWidth, maxRightPaneWidth, minBottomPaneHeight, maxBottomPaneHeight, onResize, leftPaneClassName, mainPaneClassName, rightPaneClassName, bottomPaneClassName, leftPaneLabel, rightPaneLabel, }: WorkbenchBodyTemplateProps): React__default.JSX.Element;
|
|
332
332
|
|
|
333
|
+
/**
|
|
334
|
+
* Defines one tab inside `DataBodyTemplate`.
|
|
335
|
+
*
|
|
336
|
+
* Must be rendered beneath a `DataBodyTemplate` root. Do not mix `Tab`, `Section`,
|
|
337
|
+
* and `Body` as sibling layout modes in the same root.
|
|
338
|
+
*/
|
|
333
339
|
interface DataBodyTabProps {
|
|
334
340
|
id: string;
|
|
335
341
|
label: React__default.ReactNode;
|
|
336
342
|
count?: number;
|
|
337
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;
|
|
338
350
|
children: React__default.ReactNode;
|
|
339
351
|
}
|
|
340
352
|
declare function DataBodyTab(_props: DataBodyTabProps): null;
|
|
353
|
+
/**
|
|
354
|
+
* Defines the single-pane body of `DataBodyTemplate`.
|
|
355
|
+
*
|
|
356
|
+
* Must be rendered beneath a `DataBodyTemplate` root. Use this instead of `Tab`
|
|
357
|
+
* or `Section` when the page has one full-height content pane.
|
|
358
|
+
*/
|
|
341
359
|
interface DataBodyBodyProps {
|
|
342
360
|
children?: React__default.ReactNode;
|
|
343
361
|
className?: string;
|
|
344
362
|
}
|
|
345
363
|
declare function DataBodyBody(_props: DataBodyBodyProps): null;
|
|
364
|
+
/**
|
|
365
|
+
* Defines one section in the left-navigation layout of `DataBodyTemplate`.
|
|
366
|
+
*
|
|
367
|
+
* Must be rendered beneath a `DataBodyTemplate` root. Do not combine sections
|
|
368
|
+
* with `Tab` or `Body` siblings in the same root.
|
|
369
|
+
*/
|
|
346
370
|
interface DataBodySectionProps {
|
|
347
371
|
id: string;
|
|
348
372
|
label: React__default.ReactNode;
|
|
@@ -351,14 +375,40 @@ interface DataBodySectionProps {
|
|
|
351
375
|
children?: React__default.ReactNode;
|
|
352
376
|
}
|
|
353
377
|
declare function DataBodySection(_props: DataBodySectionProps): null;
|
|
378
|
+
/** Adds summary content beneath the header of a `DataBodyTemplate` root. */
|
|
354
379
|
interface DataBodySummaryProps {
|
|
355
380
|
children?: React__default.ReactNode;
|
|
356
381
|
}
|
|
357
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;
|
|
358
399
|
type GroupLayout = 'stacked' | 'horizontal' | 'inline' | 'split';
|
|
359
400
|
type GroupVariant = 'card' | 'plain' | 'bordered';
|
|
401
|
+
/**
|
|
402
|
+
* Groups related content inside `DataBodyTemplate`.
|
|
403
|
+
*
|
|
404
|
+
* `DataBodyTemplate.Group` is a compound child and must never be rendered as a
|
|
405
|
+
* standalone page component. Wrap it in `DataBodyTemplate`, optionally inside a
|
|
406
|
+
* `Tab`, `Section`, or `Body`.
|
|
407
|
+
*/
|
|
360
408
|
interface DataBodyGroupProps {
|
|
409
|
+
/** Visual arrangement of the group. @defaultValue `'stacked'` */
|
|
361
410
|
layout?: GroupLayout;
|
|
411
|
+
/** Surface treatment. Defaults depend on `layout`. */
|
|
362
412
|
variant?: GroupVariant;
|
|
363
413
|
title?: React__default.ReactNode;
|
|
364
414
|
description?: React__default.ReactNode;
|
|
@@ -368,12 +418,14 @@ interface DataBodyGroupProps {
|
|
|
368
418
|
children?: React__default.ReactNode;
|
|
369
419
|
}
|
|
370
420
|
declare function DataBodyGroup(props: DataBodyGroupProps): React__default.JSX.Element;
|
|
421
|
+
/** Read-only label/value content for a `DataBodyTemplate.Group`. */
|
|
371
422
|
interface DataBodyFieldProps {
|
|
372
423
|
label: string;
|
|
373
424
|
description?: string;
|
|
374
425
|
children?: React__default.ReactNode;
|
|
375
426
|
}
|
|
376
427
|
declare function DataBodyField({ label, description, children }: DataBodyFieldProps): React__default.JSX.Element;
|
|
428
|
+
/** Form label/control content for a `DataBodyTemplate.Group`. */
|
|
377
429
|
interface DataBodyRowProps {
|
|
378
430
|
label: string;
|
|
379
431
|
description?: string;
|
|
@@ -381,6 +433,12 @@ interface DataBodyRowProps {
|
|
|
381
433
|
children?: React__default.ReactNode;
|
|
382
434
|
}
|
|
383
435
|
declare function DataBodyRow({ label, description, required, children }: DataBodyRowProps): React__default.JSX.Element;
|
|
436
|
+
/**
|
|
437
|
+
* Props for the required root of the `DataBodyTemplate` compound component.
|
|
438
|
+
*
|
|
439
|
+
* Choose one primary child mode: direct content/groups, `Tab`, `Section`, or
|
|
440
|
+
* `Body`. Do not combine those layout modes in the same root.
|
|
441
|
+
*/
|
|
384
442
|
interface DataBodyTemplateProps {
|
|
385
443
|
theme?: React__default.CSSProperties;
|
|
386
444
|
className?: string;
|
|
@@ -397,12 +455,31 @@ interface DataBodyTemplateProps {
|
|
|
397
455
|
children?: React__default.ReactNode;
|
|
398
456
|
contentClassName?: string;
|
|
399
457
|
}
|
|
400
|
-
declare function Root$1(
|
|
458
|
+
declare function Root$1(props: DataBodyTemplateProps): React__default.JSX.Element;
|
|
459
|
+
/**
|
|
460
|
+
* Page-level template for data, list, tab, form, and settings experiences.
|
|
461
|
+
*
|
|
462
|
+
* Compound members such as `DataBodyTemplate.Resource`, `Group`, `Tab`, `Section`,
|
|
463
|
+
* `Body`, `Row`, and `Field` must be rendered beneath this root. Rendering a compound
|
|
464
|
+
* member without the root throws a descriptive runtime error.
|
|
465
|
+
*
|
|
466
|
+
* @example
|
|
467
|
+
* ```tsx
|
|
468
|
+
* <DataBodyTemplate title="Settings">
|
|
469
|
+
* <DataBodyTemplate.Group title="Profile">
|
|
470
|
+
* <DataBodyTemplate.Row label="Name">
|
|
471
|
+
* <Input />
|
|
472
|
+
* </DataBodyTemplate.Row>
|
|
473
|
+
* </DataBodyTemplate.Group>
|
|
474
|
+
* </DataBodyTemplate>
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
401
477
|
declare const DataBodyTemplate: typeof Root$1 & {
|
|
402
478
|
Body: typeof DataBodyBody;
|
|
403
479
|
Tab: typeof DataBodyTab;
|
|
404
480
|
Section: typeof DataBodySection;
|
|
405
481
|
Summary: typeof DataBodySummary;
|
|
482
|
+
Resource: typeof DataBodyResource;
|
|
406
483
|
Group: typeof DataBodyGroup;
|
|
407
484
|
Row: typeof DataBodyRow;
|
|
408
485
|
Field: typeof DataBodyField;
|
|
@@ -777,4 +854,4 @@ declare function cn(...inputs: ClassValue[]): string;
|
|
|
777
854
|
|
|
778
855
|
declare const useThemeStore: zustand.UseBoundStore<zustand.StoreApi<ThemeState>>;
|
|
779
856
|
|
|
780
|
-
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
|
@@ -3,7 +3,7 @@ import { clsx } from 'clsx';
|
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
4
|
import { Button as Button$1 } from '@base-ui/react/button';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { jsxs, jsx, Fragment
|
|
6
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
8
8
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
9
9
|
import { useRender } from '@base-ui/react/use-render';
|
|
@@ -18,7 +18,7 @@ import { Select as Select$1 } from '@base-ui/react/select';
|
|
|
18
18
|
import { Separator as Separator$1 } from '@base-ui/react/separator';
|
|
19
19
|
import { Dialog } from '@base-ui/react/dialog';
|
|
20
20
|
import * as React2 from 'react';
|
|
21
|
-
import React2__default, { createContext, forwardRef, useContext, useEffect, useMemo, Children, useState, Fragment, useCallback } from 'react';
|
|
21
|
+
import React2__default, { createContext, forwardRef, useContext, useEffect, useMemo, Children, useState, Fragment as Fragment$1, useCallback } from 'react';
|
|
22
22
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
23
23
|
import { Slider as Slider$1 } from '@base-ui/react/slider';
|
|
24
24
|
import { Switch as Switch$1 } from '@base-ui/react/switch';
|
|
@@ -2645,7 +2645,7 @@ function WorkbenchBodyTemplate({
|
|
|
2645
2645
|
] })
|
|
2646
2646
|
] }),
|
|
2647
2647
|
/* @__PURE__ */ jsxs("div", { className: cn("flex min-h-0 flex-1 overflow-hidden", contentClassName), children: [
|
|
2648
|
-
showLeftPane && /* @__PURE__ */ jsxs(Fragment
|
|
2648
|
+
showLeftPane && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2649
2649
|
/* @__PURE__ */ jsx(
|
|
2650
2650
|
"aside",
|
|
2651
2651
|
{
|
|
@@ -2685,7 +2685,7 @@ function WorkbenchBodyTemplate({
|
|
|
2685
2685
|
] }),
|
|
2686
2686
|
/* @__PURE__ */ jsxs("main", { className: cn("flex min-w-0 flex-1 flex-col overflow-hidden", mainPaneClassName), children: [
|
|
2687
2687
|
/* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-auto", children: mainPane ?? children }),
|
|
2688
|
-
showBottomPane && /* @__PURE__ */ jsxs(Fragment
|
|
2688
|
+
showBottomPane && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2689
2689
|
resizable && /* @__PURE__ */ jsx(
|
|
2690
2690
|
ResizeHandle,
|
|
2691
2691
|
{
|
|
@@ -2724,7 +2724,7 @@ function WorkbenchBodyTemplate({
|
|
|
2724
2724
|
)
|
|
2725
2725
|
] })
|
|
2726
2726
|
] }),
|
|
2727
|
-
showRightPane && /* @__PURE__ */ jsxs(Fragment
|
|
2727
|
+
showRightPane && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2728
2728
|
resizable && /* @__PURE__ */ jsx(
|
|
2729
2729
|
ResizeHandle,
|
|
2730
2730
|
{
|
|
@@ -2765,19 +2765,30 @@ function WorkbenchBodyTemplate({
|
|
|
2765
2765
|
] })
|
|
2766
2766
|
] });
|
|
2767
2767
|
}
|
|
2768
|
+
var DataBodyTemplateContext = React2__default.createContext(false);
|
|
2769
|
+
function useDataBodyTemplateParent(component) {
|
|
2770
|
+
if (!React2__default.useContext(DataBodyTemplateContext)) {
|
|
2771
|
+
throw new Error(
|
|
2772
|
+
`[DesignKit] <DataBodyTemplate.${component}> must be rendered inside <DataBodyTemplate>. Wrap it like: <DataBodyTemplate><DataBodyTemplate.${component}>...</DataBodyTemplate.${component}></DataBodyTemplate>.`
|
|
2773
|
+
);
|
|
2774
|
+
}
|
|
2775
|
+
}
|
|
2768
2776
|
function DataBodyTab(_props) {
|
|
2777
|
+
useDataBodyTemplateParent("Tab");
|
|
2769
2778
|
return null;
|
|
2770
2779
|
}
|
|
2771
2780
|
function isDataBodyTab(node) {
|
|
2772
2781
|
return Boolean(node && typeof node === "object" && "type" in node && node.type === DataBodyTab);
|
|
2773
2782
|
}
|
|
2774
2783
|
function DataBodyBody(_props) {
|
|
2784
|
+
useDataBodyTemplateParent("Body");
|
|
2775
2785
|
return null;
|
|
2776
2786
|
}
|
|
2777
2787
|
function isDataBodyBody(node) {
|
|
2778
2788
|
return Boolean(node && typeof node === "object" && "type" in node && node.type === DataBodyBody);
|
|
2779
2789
|
}
|
|
2780
2790
|
function DataBodySection(_props) {
|
|
2791
|
+
useDataBodyTemplateParent("Section");
|
|
2781
2792
|
return null;
|
|
2782
2793
|
}
|
|
2783
2794
|
function isDataBodySection(node) {
|
|
@@ -2786,6 +2797,7 @@ function isDataBodySection(node) {
|
|
|
2786
2797
|
);
|
|
2787
2798
|
}
|
|
2788
2799
|
function DataBodySummary(_props) {
|
|
2800
|
+
useDataBodyTemplateParent("Summary");
|
|
2789
2801
|
return null;
|
|
2790
2802
|
}
|
|
2791
2803
|
function isDataBodySummary(node) {
|
|
@@ -2793,6 +2805,56 @@ function isDataBodySummary(node) {
|
|
|
2793
2805
|
node && typeof node === "object" && "type" in node && node.type === DataBodySummary
|
|
2794
2806
|
);
|
|
2795
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
|
+
}
|
|
2796
2858
|
var layoutDefaultVariant = {
|
|
2797
2859
|
stacked: "plain",
|
|
2798
2860
|
horizontal: "card",
|
|
@@ -2800,6 +2862,7 @@ var layoutDefaultVariant = {
|
|
|
2800
2862
|
split: "bordered"
|
|
2801
2863
|
};
|
|
2802
2864
|
function DataBodyGroup(props) {
|
|
2865
|
+
useDataBodyTemplateParent("Group");
|
|
2803
2866
|
return renderGroupProps(props);
|
|
2804
2867
|
}
|
|
2805
2868
|
function isDataBodyGroup(node) {
|
|
@@ -2819,12 +2882,12 @@ function GroupWrapper({
|
|
|
2819
2882
|
}
|
|
2820
2883
|
return /* @__PURE__ */ jsx("div", { className: "rounded-(--radius) border border-border p-(--designkit-panel-gap)", children });
|
|
2821
2884
|
}
|
|
2822
|
-
return /* @__PURE__ */ jsx(Fragment
|
|
2885
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
2823
2886
|
}
|
|
2824
2887
|
function renderGroups(nodes) {
|
|
2825
2888
|
const childArray = Children.toArray(nodes);
|
|
2826
2889
|
if (!childArray.some(isDataBodyGroup)) return nodes;
|
|
2827
|
-
return /* @__PURE__ */ jsx(Fragment
|
|
2890
|
+
return /* @__PURE__ */ jsx(Fragment, { children: childArray.map((child, i) => /* @__PURE__ */ jsx(Fragment$1, { children: isDataBodyGroup(child) ? renderGroup(child) : child }, i)) });
|
|
2828
2891
|
}
|
|
2829
2892
|
function renderGroup(group) {
|
|
2830
2893
|
return renderGroupProps(group.props);
|
|
@@ -2897,6 +2960,7 @@ function renderGroupProps(props) {
|
|
|
2897
2960
|
] });
|
|
2898
2961
|
}
|
|
2899
2962
|
function DataBodyField({ label, description, children }) {
|
|
2963
|
+
useDataBodyTemplateParent("Field");
|
|
2900
2964
|
return /* @__PURE__ */ jsxs(
|
|
2901
2965
|
"div",
|
|
2902
2966
|
{
|
|
@@ -2913,6 +2977,7 @@ function DataBodyField({ label, description, children }) {
|
|
|
2913
2977
|
);
|
|
2914
2978
|
}
|
|
2915
2979
|
function DataBodyRow({ label, description, required, children }) {
|
|
2980
|
+
useDataBodyTemplateParent("Row");
|
|
2916
2981
|
return /* @__PURE__ */ jsxs(
|
|
2917
2982
|
"div",
|
|
2918
2983
|
{
|
|
@@ -2935,7 +3000,7 @@ function TopBarSlot({ topBar }) {
|
|
|
2935
3000
|
if (!topBar) return null;
|
|
2936
3001
|
return /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar });
|
|
2937
3002
|
}
|
|
2938
|
-
function
|
|
3003
|
+
function RootContent({
|
|
2939
3004
|
theme,
|
|
2940
3005
|
className,
|
|
2941
3006
|
topBar,
|
|
@@ -2979,7 +3044,13 @@ function Root2({
|
|
|
2979
3044
|
/* @__PURE__ */ jsx(DataPage.Actions, { children: actions })
|
|
2980
3045
|
] }),
|
|
2981
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 }),
|
|
2982
|
-
/* @__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
|
+
] }) })
|
|
2983
3054
|
] });
|
|
2984
3055
|
}
|
|
2985
3056
|
if (hasSections) {
|
|
@@ -3018,6 +3089,8 @@ function Root2({
|
|
|
3018
3089
|
] });
|
|
3019
3090
|
}
|
|
3020
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;
|
|
3021
3094
|
return /* @__PURE__ */ jsxs(DataPage, { className: cn("layout-databody", className), style: theme, children: [
|
|
3022
3095
|
/* @__PURE__ */ jsx(TopBarSlot, { topBar }),
|
|
3023
3096
|
/* @__PURE__ */ jsxs(DataPage.Header, { children: [
|
|
@@ -3037,19 +3110,24 @@ function Root2({
|
|
|
3037
3110
|
tab.props.id
|
|
3038
3111
|
)) }),
|
|
3039
3112
|
/* @__PURE__ */ jsxs(DataPage.Content, { className: contentClassName, children: [
|
|
3040
|
-
(
|
|
3041
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-2", children:
|
|
3042
|
-
/* @__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 })
|
|
3043
3116
|
] }),
|
|
3044
|
-
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, { children: isDataBodyGroup(child) ? renderGroup(child) : child }, i)) })
|
|
3045
|
-
] })
|
|
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)) })
|
|
3118
|
+
] }),
|
|
3119
|
+
activeTabNode?.props.footer && /* @__PURE__ */ jsx(DataPage.Footer, { children: activeTabNode.props.footer })
|
|
3046
3120
|
] });
|
|
3047
3121
|
}
|
|
3122
|
+
function Root2(props) {
|
|
3123
|
+
return /* @__PURE__ */ jsx(DataBodyTemplateContext.Provider, { value: true, children: /* @__PURE__ */ jsx(RootContent, { ...props }) });
|
|
3124
|
+
}
|
|
3048
3125
|
var DataBodyTemplate = Object.assign(Root2, {
|
|
3049
3126
|
Body: DataBodyBody,
|
|
3050
3127
|
Tab: DataBodyTab,
|
|
3051
3128
|
Section: DataBodySection,
|
|
3052
3129
|
Summary: DataBodySummary,
|
|
3130
|
+
Resource: DataBodyResource,
|
|
3053
3131
|
Group: DataBodyGroup,
|
|
3054
3132
|
Row: DataBodyRow,
|
|
3055
3133
|
Field: DataBodyField
|
|
@@ -3193,7 +3271,7 @@ function DetailBodySection({
|
|
|
3193
3271
|
);
|
|
3194
3272
|
}
|
|
3195
3273
|
function renderChildren(nodes) {
|
|
3196
|
-
return Children.toArray(nodes).map((child, i) => /* @__PURE__ */ jsx(Fragment, { children: child }, i));
|
|
3274
|
+
return Children.toArray(nodes).map((child, i) => /* @__PURE__ */ jsx(Fragment$1, { children: child }, i));
|
|
3197
3275
|
}
|
|
3198
3276
|
function DetailBodyTemplateRoot({
|
|
3199
3277
|
variant = "record",
|
|
@@ -3268,7 +3346,7 @@ function DetailBodyTemplateRoot({
|
|
|
3268
3346
|
const hasRecordInspector = Boolean(leadSlot);
|
|
3269
3347
|
const hasFullLeadArea = Boolean(leadSlot || insideAsideSlot);
|
|
3270
3348
|
const layout = {
|
|
3271
|
-
media: /* @__PURE__ */ jsxs(Fragment
|
|
3349
|
+
media: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3272
3350
|
leadSlot && /* @__PURE__ */ jsx("div", { className: "mb-(--designkit-panel-gap)", children: leadSlot }),
|
|
3273
3351
|
body
|
|
3274
3352
|
] }),
|
|
@@ -3285,7 +3363,7 @@ function DetailBodyTemplateRoot({
|
|
|
3285
3363
|
]
|
|
3286
3364
|
}
|
|
3287
3365
|
),
|
|
3288
|
-
full: /* @__PURE__ */ jsxs(Fragment
|
|
3366
|
+
full: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3289
3367
|
hasFullLeadArea && /* @__PURE__ */ jsxs(
|
|
3290
3368
|
"div",
|
|
3291
3369
|
{
|
|
@@ -3493,7 +3571,7 @@ function FormWizardBodyTemplate({
|
|
|
3493
3571
|
return /* @__PURE__ */ jsxs(DataPage, { className: "layout-form-wizard", style: theme, children: [
|
|
3494
3572
|
topBar && /* @__PURE__ */ jsx("div", { className: "shrink-0", children: topBar }),
|
|
3495
3573
|
/* @__PURE__ */ jsx(DataPage.Header, { children: /* @__PURE__ */ jsx(DataPage.TitleBlock, { title, status }) }),
|
|
3496
|
-
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-(--designkit-page-padding-x) pb-4", children: /* @__PURE__ */ jsx("div", { className: "flex items-center", children: steps.map((step, i) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3574
|
+
/* @__PURE__ */ jsx("div", { className: "shrink-0 px-(--designkit-page-padding-x) pb-4", children: /* @__PURE__ */ jsx("div", { className: "flex items-center", children: steps.map((step, i) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
3497
3575
|
i > 0 && /* @__PURE__ */ jsx(
|
|
3498
3576
|
"div",
|
|
3499
3577
|
{
|