@neasg/design-system 0.4.11 → 0.4.13
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 +147 -5
- package/dist/avatar-profile-popover.d.ts +34 -0
- package/dist/avatar-profile-popover.js +27 -0
- package/dist/badge.d.ts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/card.d.ts +2 -0
- package/dist/card.js +72 -3
- package/dist/command-search.d.ts +47 -2
- package/dist/command-search.js +173 -24
- package/dist/command.d.ts +2 -0
- package/dist/command.js +2 -2
- package/dist/dialog-primitive.js +1 -1
- package/dist/draggable-tabs.d.ts +3 -0
- package/dist/draggable-tabs.js +4 -0
- package/dist/editable-table.js +2 -2
- package/dist/guidance-tip.d.ts +26 -0
- package/dist/guidance-tip.js +162 -0
- package/dist/index.d.ts +15 -6
- package/dist/index.js +6 -2
- package/dist/jump-target-highlight.d.ts +13 -0
- package/dist/jump-target-highlight.js +95 -0
- package/dist/layout.d.ts +27 -5
- package/dist/layout.js +128 -34
- package/dist/message-item.js +9 -10
- package/dist/notification.js +1 -1
- package/dist/page-layout.d.ts +22 -0
- package/dist/page-layout.js +38 -0
- package/dist/page-section.js +1 -1
- package/dist/popover-menu.js +2 -2
- package/dist/routing-timeline.js +1 -1
- package/dist/styles.css +16 -0
- package/dist/table-column-visibility.d.ts +2 -1
- package/dist/table-column-visibility.js +9 -8
- package/dist/table-toolbar.d.ts +2 -1
- package/dist/table-toolbar.js +7 -2
- package/dist/table.d.ts +31 -2
- package/dist/table.js +298 -23
- package/dist/tabs.d.ts +2 -1
- package/dist/tabs.js +8 -5
- package/dist/theme-switcher.d.ts +1 -1
- package/dist/theme-switcher.js +4 -6
- package/dist/theme.d.ts +336 -77
- package/dist/theme.js +269 -55
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { Avatar, AvatarProfile, AvatarRoot, AvatarImage, } from "./avatar";
|
|
2
2
|
export type { AvatarProps, AvatarSize, AvatarProfileProps, AvatarRootProps, } from "./avatar";
|
|
3
|
+
export { AvatarProfilePopover, AvatarProfilePopoverContent, AvatarProfilePopoverHeader, AvatarProfilePopoverSection, AvatarProfilePopoverFooter, AvatarProfilePopoverFooterAction, } from "./avatar-profile-popover";
|
|
4
|
+
export type { AvatarProfilePopoverProps, AvatarProfilePopoverContentProps, AvatarProfilePopoverHeaderProps, AvatarProfilePopoverSectionProps, AvatarProfilePopoverFooterProps, AvatarProfilePopoverFooterActionProps, } from "./avatar-profile-popover";
|
|
3
5
|
export * from "./animated-icons";
|
|
4
6
|
export { Alert, AlertAction, AlertConsent, alertVariants } from "./alert";
|
|
5
7
|
export type { AlertActionProps, AlertConsentProps, AlertProps } from "./alert";
|
|
@@ -63,7 +65,7 @@ export type { LinkProps } from "./link";
|
|
|
63
65
|
export { Dialog } from "./dialog";
|
|
64
66
|
export type { DialogAction, DialogProps } from "./dialog";
|
|
65
67
|
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, } from "./command";
|
|
66
|
-
export { CommandSearch, type CommandSearchFilter, type CommandSearchItem, type CommandSearchProps, type CommandSearchSection, type CommandSearchShowAllResultsLabel, } from "./command-search";
|
|
68
|
+
export { CommandSearch, type CommandSearchFilter, type CommandSearchFilterSelectDetails, type CommandSearchItem, type CommandSearchItemDetail, type CommandSearchProps, type CommandSearchSection, type CommandSearchSectionAction, type CommandSearchShowAllResultsLabel, type CommandSearchShortcutPlatform, } from "./command-search";
|
|
67
69
|
export { FileUpload } from "./file-upload";
|
|
68
70
|
export type { FileUploadProps } from "./file-upload";
|
|
69
71
|
export { FileUploadStatusToast, showFileUploadStatusToast, } from "./file-upload-status-toast";
|
|
@@ -90,8 +92,12 @@ export { SectionNav } from "./section-nav";
|
|
|
90
92
|
export type { SectionNavItem, SectionNavProps } from "./section-nav";
|
|
91
93
|
export { GovtMasthead } from "./govt-masthead";
|
|
92
94
|
export type { GovtMastheadProps } from "./govt-masthead";
|
|
95
|
+
export { GuidanceTip } from "./guidance-tip";
|
|
96
|
+
export type { GuidanceTipAction, GuidanceTipProps } from "./guidance-tip";
|
|
93
97
|
export { SearchHighlight, useSearchHighlight, } from "./use-search-highlight";
|
|
94
98
|
export type { SearchHighlightProps, SearchHighlightSegment, } from "./use-search-highlight";
|
|
99
|
+
export { clearJumpTargetHighlights, highlightJumpTarget, jumpTargetHighlightAttribute, jumpTargetHighlightClassName, jumpTargetHighlightDurationMs, jumpTargetHighlightIterations, jumpTargetHighlightSelector, } from "./jump-target-highlight";
|
|
100
|
+
export type { HighlightJumpTargetOptions, JumpTargetHighlightRoot, } from "./jump-target-highlight";
|
|
95
101
|
export { useErrorShake } from "./use-error-shake";
|
|
96
102
|
export type { UseErrorShakeOptions } from "./use-error-shake";
|
|
97
103
|
export { useStickySentinel } from "./use-sticky-sentinel";
|
|
@@ -100,19 +106,22 @@ export { useViewportThreshold } from "./use-viewport-threshold";
|
|
|
100
106
|
export type { UseViewportThresholdOptions, UseViewportThresholdReturn, } from "./use-viewport-threshold";
|
|
101
107
|
export { Textarea } from "./textarea";
|
|
102
108
|
export type { TextareaProps } from "./textarea";
|
|
103
|
-
export { DraggableTabs, type DraggableTabBadge, type DraggableTabItem, type DraggableTabsProps, } from "./draggable-tabs";
|
|
109
|
+
export { DraggableTabs, type DraggableTabBadge, type DraggableTabGuidance, type DraggableTabItem, type DraggableTabsProps, } from "./draggable-tabs";
|
|
104
110
|
export { Drawer, } from "./drawer";
|
|
105
111
|
export type { DrawerAction, DrawerProps, DrawerSide } from "./drawer";
|
|
106
|
-
export { DashboardContent, DashboardLayout, DashboardRightPanel, DashboardRightPanelBody, DashboardRightPanelHeader, DashboardRightPanelSection, DashboardRightPanelTabs, DashboardSidebar, DashboardSidebarProfile, SidebarProvider, useSidebar, } from "./layout";
|
|
107
|
-
export type { DashboardContentProps, DashboardLayoutProps, DashboardRightPanelBodyProps, DashboardRightPanelHeaderProps, DashboardRightPanelMode, DashboardRightPanelProps, DashboardRightPanelSectionProps, DashboardRightPanelTabsProps, DashboardSidebarNavDropdownItem, DashboardSidebarNavGroup, DashboardSidebarNavItem, DashboardSidebarNavLinkItem, DashboardSidebarProfileProps, } from "./layout";
|
|
112
|
+
export { DashboardContent, DashboardLayout, DashboardRightPanel, DashboardRightPanelBody, DashboardRightPanelHeader, DashboardRightPanelSection, DashboardRightPanelTabs, DashboardSidebar, DashboardSidebarProfile, DashboardSidebarProfilePopover, SidebarProvider, useSidebar, } from "./layout";
|
|
113
|
+
export type { DashboardContentProps, DashboardLayoutProps, DashboardRightPanelBodyProps, DashboardRightPanelHeaderProps, DashboardRightPanelMode, DashboardRightPanelProps, DashboardRightPanelSectionProps, DashboardRightPanelTabsProps, DashboardSidebarNavDropdownItem, DashboardSidebarNavGroup, DashboardSidebarNavItem, DashboardSidebarNavLinkItem, DashboardSidebarProfileProps, DashboardSidebarProfilePopoverProps, } from "./layout";
|
|
108
114
|
export { PageHeader } from "./page-header";
|
|
115
|
+
export { PageLayout, PageLayoutContext, PageLayoutControls, PageLayoutHeader, PageLayoutSection, PageLayoutStack, PageLayoutTitle, pageLayoutGapClassNames, pageLayoutStackGapClassNames, } from "./page-layout";
|
|
116
|
+
export type { PageLayoutGap, PageLayoutProps, PageLayoutStackGap, PageLayoutStackProps, PageLayoutTitleProps, } from "./page-layout";
|
|
109
117
|
export { WorkspaceHeader } from "./workspace-header";
|
|
110
118
|
export type { WorkspaceHeaderProps } from "./workspace-header";
|
|
111
119
|
export { PageSection, PageSectionGroup } from "./page-section";
|
|
112
120
|
export type { PageSectionGroupProps, PageSectionProps } from "./page-section";
|
|
113
121
|
export { Typography, typographyVariants } from "./typography";
|
|
114
122
|
export type { TypographyProps } from "./typography";
|
|
115
|
-
export { neaPalette, semanticColorTokens, typographyTokens, radiusTokens, spacingTokens, layoutTokens, } from "./theme";
|
|
123
|
+
export { darkThemeTokenMapping, neaDarkNeutralPalette, neaDarkNeutralTokenMapping, neaPalette, neaPaletteDarkTokenMapping, semanticColorTokens, typographyTokens, radiusTokens, spacingTokens, layoutTokens, } from "./theme";
|
|
124
|
+
export type { CssTokenMapping, SemanticColorToken } from "./theme";
|
|
116
125
|
export { neaDesignSystemContent, neaTailwindPreset, } from "./tailwind-preset";
|
|
117
126
|
export { Pagination } from "./pagination";
|
|
118
127
|
export type { PaginationProps } from "./pagination";
|
|
@@ -123,7 +132,7 @@ export type { TableColumnVisibilityMenuProps } from "./table-column-visibility";
|
|
|
123
132
|
export { useTableSort } from "./use-table-sort";
|
|
124
133
|
export type { UseTableSortOptions, UseTableSortReturn, } from "./use-table-sort";
|
|
125
134
|
export { Table, TableRoot, TableContainer, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, TableRowSkeleton, TABLE_SKELETON_PRESETS, } from "./table";
|
|
126
|
-
export type { TableColumn, TableProps, TableRowTone, TableSortDirection, TableSortingProps, TableSkeletonConfig, TableRowSkeletonProps, } from "./table";
|
|
135
|
+
export type { TableColumn, TableColumnWidths, TableProps, TableRowTone, TableSortDirection, TableSortingProps, TableSkeletonConfig, TableRowSkeletonProps, } from "./table";
|
|
127
136
|
export { Tabs, TabsRoot, TabWithDropdown, type TabsItem, type TabsItemLabel, type TabsItemLabelProps, type TabsProps, TabsList, TabsTrigger, TabsContent, type TabWithDropdownProps, useTabsContext, type TabDropdownSection, } from "./tabs";
|
|
128
137
|
export { Tooltip, TooltipRoot, TooltipTrigger, TooltipContent, TooltipProvider, type TooltipProps, } from "./tooltip";
|
|
129
138
|
export { Toaster, toast } from "./toaster";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Avatar, AvatarProfile, AvatarRoot, AvatarImage, } from "./avatar";
|
|
2
|
+
export { AvatarProfilePopover, AvatarProfilePopoverContent, AvatarProfilePopoverHeader, AvatarProfilePopoverSection, AvatarProfilePopoverFooter, AvatarProfilePopoverFooterAction, } from "./avatar-profile-popover";
|
|
2
3
|
export * from "./animated-icons";
|
|
3
4
|
export { Alert, AlertAction, AlertConsent, alertVariants } from "./alert";
|
|
4
5
|
export { Badge, badgeVariants } from "./badge";
|
|
@@ -46,19 +47,22 @@ export { PopoverMenuContent, PopoverMenuCheckboxItem, PopoverMenuHeader, Popover
|
|
|
46
47
|
export { SearchInput } from "./search-input";
|
|
47
48
|
export { SectionNav } from "./section-nav";
|
|
48
49
|
export { GovtMasthead } from "./govt-masthead";
|
|
50
|
+
export { GuidanceTip } from "./guidance-tip";
|
|
49
51
|
export { SearchHighlight, useSearchHighlight, } from "./use-search-highlight";
|
|
52
|
+
export { clearJumpTargetHighlights, highlightJumpTarget, jumpTargetHighlightAttribute, jumpTargetHighlightClassName, jumpTargetHighlightDurationMs, jumpTargetHighlightIterations, jumpTargetHighlightSelector, } from "./jump-target-highlight";
|
|
50
53
|
export { useErrorShake } from "./use-error-shake";
|
|
51
54
|
export { useStickySentinel } from "./use-sticky-sentinel";
|
|
52
55
|
export { useViewportThreshold } from "./use-viewport-threshold";
|
|
53
56
|
export { Textarea } from "./textarea";
|
|
54
57
|
export { DraggableTabs, } from "./draggable-tabs";
|
|
55
58
|
export { Drawer, } from "./drawer";
|
|
56
|
-
export { DashboardContent, DashboardLayout, DashboardRightPanel, DashboardRightPanelBody, DashboardRightPanelHeader, DashboardRightPanelSection, DashboardRightPanelTabs, DashboardSidebar, DashboardSidebarProfile, SidebarProvider, useSidebar, } from "./layout";
|
|
59
|
+
export { DashboardContent, DashboardLayout, DashboardRightPanel, DashboardRightPanelBody, DashboardRightPanelHeader, DashboardRightPanelSection, DashboardRightPanelTabs, DashboardSidebar, DashboardSidebarProfile, DashboardSidebarProfilePopover, SidebarProvider, useSidebar, } from "./layout";
|
|
57
60
|
export { PageHeader } from "./page-header";
|
|
61
|
+
export { PageLayout, PageLayoutContext, PageLayoutControls, PageLayoutHeader, PageLayoutSection, PageLayoutStack, PageLayoutTitle, pageLayoutGapClassNames, pageLayoutStackGapClassNames, } from "./page-layout";
|
|
58
62
|
export { WorkspaceHeader } from "./workspace-header";
|
|
59
63
|
export { PageSection, PageSectionGroup } from "./page-section";
|
|
60
64
|
export { Typography, typographyVariants } from "./typography";
|
|
61
|
-
export { neaPalette, semanticColorTokens, typographyTokens, radiusTokens, spacingTokens, layoutTokens, } from "./theme";
|
|
65
|
+
export { darkThemeTokenMapping, neaDarkNeutralPalette, neaDarkNeutralTokenMapping, neaPalette, neaPaletteDarkTokenMapping, semanticColorTokens, typographyTokens, radiusTokens, spacingTokens, layoutTokens, } from "./theme";
|
|
62
66
|
export { neaDesignSystemContent, neaTailwindPreset, } from "./tailwind-preset";
|
|
63
67
|
export { Pagination } from "./pagination";
|
|
64
68
|
export { TableToolbar } from "./table-toolbar";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const jumpTargetHighlightAttribute = "data-jump-target-highlight";
|
|
2
|
+
export declare const jumpTargetHighlightSelector = "[data-jump-target-highlight=\"true\"]";
|
|
3
|
+
export declare const jumpTargetHighlightDurationMs = 420;
|
|
4
|
+
export declare const jumpTargetHighlightIterations = 2;
|
|
5
|
+
export declare const jumpTargetHighlightClassName = "transition-[background-color,box-shadow,border-color] duration-150 data-[jump-target-highlight=true]:border-ring/40 data-[jump-target-highlight=true]:bg-primary/5 data-[jump-target-highlight=true]:shadow-[0_0_0_2px_hsl(var(--ring)_/_0.16)] motion-reduce:transition-none";
|
|
6
|
+
export type JumpTargetHighlightRoot = Document | DocumentFragment | Element;
|
|
7
|
+
export interface HighlightJumpTargetOptions {
|
|
8
|
+
root?: JumpTargetHighlightRoot;
|
|
9
|
+
durationMs?: number;
|
|
10
|
+
iterations?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function clearJumpTargetHighlights(root?: JumpTargetHighlightRoot): void;
|
|
13
|
+
export declare function highlightJumpTarget(target: HTMLElement | null | undefined, { root, durationMs, iterations, }?: HighlightJumpTargetOptions): () => void;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export const jumpTargetHighlightAttribute = "data-jump-target-highlight";
|
|
2
|
+
export const jumpTargetHighlightSelector = `[${jumpTargetHighlightAttribute}="true"]`;
|
|
3
|
+
export const jumpTargetHighlightDurationMs = 420;
|
|
4
|
+
export const jumpTargetHighlightIterations = 2;
|
|
5
|
+
export const jumpTargetHighlightClassName = "transition-[background-color,box-shadow,border-color] duration-150 data-[jump-target-highlight=true]:border-ring/40 data-[jump-target-highlight=true]:bg-primary/5 data-[jump-target-highlight=true]:shadow-[0_0_0_2px_hsl(var(--ring)_/_0.16)] motion-reduce:transition-none";
|
|
6
|
+
const jumpTargetHighlightIdDataKey = "jumpTargetHighlightId";
|
|
7
|
+
const activeJumpTargetHighlights = new WeakMap();
|
|
8
|
+
function getJumpTargetHighlightTotalMs(durationMs, iterations) {
|
|
9
|
+
return durationMs * iterations;
|
|
10
|
+
}
|
|
11
|
+
function prefersReducedMotion(ownerWindow) {
|
|
12
|
+
return (typeof ownerWindow.matchMedia === "function" &&
|
|
13
|
+
ownerWindow.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
14
|
+
}
|
|
15
|
+
function clearJumpTargetElement(element) {
|
|
16
|
+
const activeHighlight = activeJumpTargetHighlights.get(element);
|
|
17
|
+
if (activeHighlight) {
|
|
18
|
+
activeJumpTargetHighlights.delete(element);
|
|
19
|
+
if (activeHighlight.timeoutId !== undefined) {
|
|
20
|
+
activeHighlight.ownerWindow.clearTimeout(activeHighlight.timeoutId);
|
|
21
|
+
}
|
|
22
|
+
if (activeHighlight.animation) {
|
|
23
|
+
activeHighlight.animation.onfinish = null;
|
|
24
|
+
activeHighlight.animation.oncancel = null;
|
|
25
|
+
activeHighlight.animation.cancel();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
element.removeAttribute(jumpTargetHighlightAttribute);
|
|
29
|
+
delete element.dataset[jumpTargetHighlightIdDataKey];
|
|
30
|
+
}
|
|
31
|
+
export function clearJumpTargetHighlights(root) {
|
|
32
|
+
const highlightRoot = root !== null && root !== void 0 ? root : (typeof document === "undefined" ? undefined : document);
|
|
33
|
+
if (!highlightRoot) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
highlightRoot
|
|
37
|
+
.querySelectorAll(jumpTargetHighlightSelector)
|
|
38
|
+
.forEach(clearJumpTargetElement);
|
|
39
|
+
}
|
|
40
|
+
export function highlightJumpTarget(target, { root, durationMs = jumpTargetHighlightDurationMs, iterations = jumpTargetHighlightIterations, } = {}) {
|
|
41
|
+
if (!target) {
|
|
42
|
+
return () => undefined;
|
|
43
|
+
}
|
|
44
|
+
const ownerWindow = target.ownerDocument.defaultView;
|
|
45
|
+
if (!ownerWindow) {
|
|
46
|
+
return () => undefined;
|
|
47
|
+
}
|
|
48
|
+
clearJumpTargetHighlights(root !== null && root !== void 0 ? root : target.ownerDocument);
|
|
49
|
+
const highlightId = `${Date.now()}`;
|
|
50
|
+
const clearHighlight = () => {
|
|
51
|
+
if (target.dataset[jumpTargetHighlightIdDataKey] !== highlightId) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
clearJumpTargetElement(target);
|
|
55
|
+
};
|
|
56
|
+
target.dataset[jumpTargetHighlightIdDataKey] = highlightId;
|
|
57
|
+
target.setAttribute(jumpTargetHighlightAttribute, "true");
|
|
58
|
+
if (!prefersReducedMotion(ownerWindow) &&
|
|
59
|
+
typeof target.animate === "function") {
|
|
60
|
+
const animation = target.animate([
|
|
61
|
+
{
|
|
62
|
+
backgroundColor: "hsl(var(--primary) / 0.04)",
|
|
63
|
+
borderColor: "hsl(var(--ring) / 0.35)",
|
|
64
|
+
boxShadow: "0 0 0 2px hsl(var(--ring) / 0.12)",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
backgroundColor: "hsl(var(--primary) / 0.12)",
|
|
68
|
+
borderColor: "hsl(var(--ring) / 0.6)",
|
|
69
|
+
boxShadow: "0 0 0 3px hsl(var(--ring) / 0.24)",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
backgroundColor: "hsl(var(--primary) / 0.04)",
|
|
73
|
+
borderColor: "hsl(var(--ring) / 0.35)",
|
|
74
|
+
boxShadow: "0 0 0 2px hsl(var(--ring) / 0.12)",
|
|
75
|
+
},
|
|
76
|
+
], {
|
|
77
|
+
duration: durationMs,
|
|
78
|
+
easing: "ease-in-out",
|
|
79
|
+
iterations,
|
|
80
|
+
});
|
|
81
|
+
activeJumpTargetHighlights.set(target, {
|
|
82
|
+
animation,
|
|
83
|
+
ownerWindow,
|
|
84
|
+
});
|
|
85
|
+
animation.onfinish = clearHighlight;
|
|
86
|
+
animation.oncancel = clearHighlight;
|
|
87
|
+
return clearHighlight;
|
|
88
|
+
}
|
|
89
|
+
const timeoutId = ownerWindow.setTimeout(clearHighlight, getJumpTargetHighlightTotalMs(durationMs, iterations));
|
|
90
|
+
activeJumpTargetHighlights.set(target, {
|
|
91
|
+
ownerWindow,
|
|
92
|
+
timeoutId,
|
|
93
|
+
});
|
|
94
|
+
return clearHighlight;
|
|
95
|
+
}
|
package/dist/layout.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type AvatarProfileProps } from "./avatar";
|
|
3
|
+
import { type AvatarProfilePopoverProps } from "./avatar-profile-popover";
|
|
3
4
|
import { type CountBadgeProps } from "./count-badge";
|
|
4
5
|
import { type TabsProps } from "./tabs";
|
|
5
6
|
export type DashboardRightPanelMode = "responsive" | "persistent";
|
|
@@ -32,6 +33,14 @@ export interface DashboardLayoutProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
32
33
|
rightPanelMode?: DashboardRightPanelMode;
|
|
33
34
|
/** Allows users to drag-resize a persistent right panel. */
|
|
34
35
|
rightPanelResizable?: boolean;
|
|
36
|
+
/** Shows an edge control that collapses and reopens a persistent right panel. */
|
|
37
|
+
rightPanelCollapsible?: boolean;
|
|
38
|
+
/** Controlled collapsed state for a persistent right panel. */
|
|
39
|
+
rightPanelCollapsed?: boolean;
|
|
40
|
+
/** Initial collapsed state for an uncontrolled persistent right panel. */
|
|
41
|
+
defaultRightPanelCollapsed?: boolean;
|
|
42
|
+
/** Called when the persistent right panel collapse state changes. */
|
|
43
|
+
onRightPanelCollapsedChange?: (collapsed: boolean) => void;
|
|
35
44
|
/** Initial persistent right panel width in pixels when resizing is enabled. */
|
|
36
45
|
rightPanelDefaultWidth?: number;
|
|
37
46
|
/** Minimum persistent right panel width in pixels when resizing is enabled. */
|
|
@@ -46,7 +55,7 @@ export interface DashboardLayoutProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
46
55
|
/** Initial sidebar state on desktop before the user toggles it. */
|
|
47
56
|
defaultSidebarCollapsed?: boolean;
|
|
48
57
|
}
|
|
49
|
-
declare function DashboardLayout({ className, masthead, prototypeBanner, sidebar, rightPanel, surfaceClassName, contentClassName, rightPanelClassName, rightPanelFallbackTrigger, rightPanelMode, rightPanelResizable, rightPanelDefaultWidth, rightPanelMinWidth, rightPanelMaxWidth, rightPanelAutoCollapseSidebarBreakpoint, defaultSidebarCollapsed, children, style, ...props }: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function DashboardLayout({ className, masthead, prototypeBanner, sidebar, rightPanel, surfaceClassName, contentClassName, rightPanelClassName, rightPanelFallbackTrigger, rightPanelMode, rightPanelResizable, rightPanelCollapsible, rightPanelCollapsed, defaultRightPanelCollapsed, onRightPanelCollapsedChange, rightPanelDefaultWidth, rightPanelMinWidth, rightPanelMaxWidth, rightPanelAutoCollapseSidebarBreakpoint, defaultSidebarCollapsed, children, style, ...props }: DashboardLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
50
59
|
export interface DashboardSidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
51
60
|
logo?: React.ReactNode | ((context: {
|
|
52
61
|
isCollapsed: boolean;
|
|
@@ -99,12 +108,21 @@ export interface DashboardSidebarNavGroup {
|
|
|
99
108
|
label?: string;
|
|
100
109
|
items: DashboardSidebarNavItem[];
|
|
101
110
|
}
|
|
111
|
+
type DashboardSidebarProfileStatus = "online" | "busy" | "offline" | "none";
|
|
112
|
+
type DashboardSidebarProfilePopoverPlacementProps = Pick<AvatarProfilePopoverProps, "align" | "alignOffset" | "avoidCollisions" | "collisionPadding" | "defaultOpen" | "modal" | "onOpenChange" | "open" | "side" | "sideOffset">;
|
|
102
113
|
export interface DashboardSidebarProfileProps extends Omit<AvatarProfileProps, "className" | "avatarClassName" | "fallbackClassName" | "avatarOverlay" | "imageClassName" | "contentClassName" | "nameClassName" | "roleClassName" | "topInfoClassName" | "bottomInfoClassName" | "rolePlacement"> {
|
|
103
114
|
isCollapsed?: boolean;
|
|
104
115
|
rolePlacement?: "above" | "below";
|
|
105
|
-
status?:
|
|
116
|
+
status?: DashboardSidebarProfileStatus;
|
|
106
117
|
}
|
|
107
|
-
|
|
118
|
+
export interface DashboardSidebarProfilePopoverProps extends Omit<DashboardSidebarProfileProps, "children">, DashboardSidebarProfilePopoverPlacementProps {
|
|
119
|
+
children: React.ReactNode;
|
|
120
|
+
contentClassName?: string;
|
|
121
|
+
triggerAriaLabel?: string;
|
|
122
|
+
triggerClassName?: string;
|
|
123
|
+
}
|
|
124
|
+
declare function DashboardSidebarProfile({ isCollapsed, ...props }: DashboardSidebarProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
125
|
+
declare function DashboardSidebarProfilePopover({ align, alignOffset, avoidCollisions, children, collisionPadding, contentClassName, defaultOpen, modal, onOpenChange, open, side, sideOffset, triggerAriaLabel, triggerClassName, ...profileProps }: DashboardSidebarProfilePopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
108
126
|
declare function DashboardSidebar({ className, children, logo, search, navGroups, footerItems, footer, toggleAriaLabel, ...props }: DashboardSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
109
127
|
export interface DashboardContentProps extends React.HTMLAttributes<HTMLElement> {
|
|
110
128
|
hasSidebar?: boolean;
|
|
@@ -113,6 +131,10 @@ export interface DashboardContentProps extends React.HTMLAttributes<HTMLElement>
|
|
|
113
131
|
rightPanelFallbackTrigger?: React.ReactNode;
|
|
114
132
|
rightPanelMode?: DashboardRightPanelMode;
|
|
115
133
|
rightPanelResizable?: boolean;
|
|
134
|
+
rightPanelCollapsible?: boolean;
|
|
135
|
+
rightPanelCollapsed?: boolean;
|
|
136
|
+
defaultRightPanelCollapsed?: boolean;
|
|
137
|
+
onRightPanelCollapsedChange?: (collapsed: boolean) => void;
|
|
116
138
|
rightPanelDefaultWidth?: number;
|
|
117
139
|
rightPanelMinWidth?: number;
|
|
118
140
|
rightPanelMaxWidth?: number;
|
|
@@ -148,5 +170,5 @@ declare function DashboardRightPanelTabs({ className, listWrapperClassName, pane
|
|
|
148
170
|
declare function DashboardRightPanel({ className, ...props }: DashboardRightPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
149
171
|
declare function DashboardRightPanelHeader({ className, title, subtitle, badge, action, children, ...props }: DashboardRightPanelHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
150
172
|
declare function DashboardRightPanelBody({ className, contentClassName, footer, footerClassName, children, ...props }: DashboardRightPanelBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
151
|
-
declare function DashboardContent({ className, hasSidebar, rightPanel, rightPanelClassName, rightPanelFallbackTrigger, rightPanelMode, rightPanelResizable, rightPanelDefaultWidth, rightPanelMinWidth, rightPanelMaxWidth, rightPanelAutoCollapseSidebarBreakpoint, surfaceClassName, children, ...props }: DashboardContentProps): import("react/jsx-runtime").JSX.Element;
|
|
152
|
-
export { DashboardLayout, DashboardSidebar, DashboardSidebarProfile, DashboardContent, DashboardRightPanel, DashboardRightPanelHeader, DashboardRightPanelBody, DashboardRightPanelSection, DashboardRightPanelTabs, };
|
|
173
|
+
declare function DashboardContent({ className, hasSidebar, rightPanel, rightPanelClassName, rightPanelFallbackTrigger, rightPanelMode, rightPanelResizable, rightPanelCollapsible, rightPanelCollapsed, defaultRightPanelCollapsed, onRightPanelCollapsedChange, rightPanelDefaultWidth, rightPanelMinWidth, rightPanelMaxWidth, rightPanelAutoCollapseSidebarBreakpoint, surfaceClassName, children, ...props }: DashboardContentProps): import("react/jsx-runtime").JSX.Element;
|
|
174
|
+
export { DashboardLayout, DashboardSidebar, DashboardSidebarProfile, DashboardSidebarProfilePopover, DashboardContent, DashboardRightPanel, DashboardRightPanelHeader, DashboardRightPanelBody, DashboardRightPanelSection, DashboardRightPanelTabs, };
|