@mithrl/design-system 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composer/Composer.d.ts +41 -0
- package/dist/components/composer/ComposerViewTransition.d.ts +23 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +2 -1
- package/dist/components/global-app-bar/GlobalAppBar.d.ts +45 -4
- package/dist/components/navigation-item/NavigationItem.d.ts +45 -0
- package/dist/components/popover-surface/PopoverSurface.d.ts +8 -0
- package/dist/components/project-menu/ProjectMenu.d.ts +41 -0
- package/dist/components/resizable-panels/ResizablePanels.d.ts +63 -0
- package/dist/components/workspace-navigation/WorkspaceNavigation.d.ts +94 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +2319 -1197
- package/dist/patterns/workspace-app-shell/WorkspaceAppShell.d.ts +105 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
import { type GlobalAppBarProjectSelector, type GlobalAppBarProps } from "../../components/global-app-bar/GlobalAppBar";
|
|
3
|
+
import { type ResizablePanelGroupProps, type ResizablePanelMinimum } from "../../components/resizable-panels/ResizablePanels";
|
|
4
|
+
import { type WorkspaceNavigationProps } from "../../components/workspace-navigation/WorkspaceNavigation";
|
|
5
|
+
import type { ThemeMode } from "../../components/switch/Switch";
|
|
6
|
+
|
|
7
|
+
export type WorkspaceAppShellLayout = "expanded" | "condensed" | "single";
|
|
8
|
+
type NativeWorkspaceAppShellProps = Omit<HTMLAttributes<HTMLDivElement>, "children">;
|
|
9
|
+
type WorkspaceAppBarConfiguration = Omit<GlobalAppBarProps, "defaultTheme" | "onThemeChange" | "theme" | "workspaceControls">;
|
|
10
|
+
type WorkspaceNavigationConfiguration = Omit<WorkspaceNavigationProps, "presentation">;
|
|
11
|
+
type WorkspaceProjectSelectorConfiguration = Omit<GlobalAppBarProjectSelector, "presentation">;
|
|
12
|
+
export type WorkspaceAppShellProps = NativeWorkspaceAppShellProps & {
|
|
13
|
+
/** Global App Bar account, brand, and native attributes. */
|
|
14
|
+
appBar: WorkspaceAppBarConfiguration;
|
|
15
|
+
/** Project context rendered by the approved Global App Bar selector. */
|
|
16
|
+
projectSelector: WorkspaceProjectSelectorConfiguration;
|
|
17
|
+
/** Workspace Navigation content; App Shell selects Inline or Overlay. */
|
|
18
|
+
navigation: WorkspaceNavigationConfiguration;
|
|
19
|
+
/** Product-owned Primary Panel content. */
|
|
20
|
+
primary: ReactNode;
|
|
21
|
+
/** Product-owned Secondary Panel content. */
|
|
22
|
+
secondary: ReactNode;
|
|
23
|
+
/** Controlled active theme for the entire shell. */
|
|
24
|
+
theme?: ThemeMode;
|
|
25
|
+
/** Initial active theme for uncontrolled use. */
|
|
26
|
+
defaultTheme?: ThemeMode;
|
|
27
|
+
/** Reports a theme request from the Global App Bar. */
|
|
28
|
+
onThemeChange?: (theme: ThemeMode) => void;
|
|
29
|
+
/** Controlled Navigation visibility. */
|
|
30
|
+
navigationOpen?: boolean;
|
|
31
|
+
/** Initial Navigation visibility. Defaults to open. */
|
|
32
|
+
defaultNavigationOpen?: boolean;
|
|
33
|
+
/** Reports explicit Navigation toggle or compact-overlay dismissal. */
|
|
34
|
+
onNavigationOpenChange?: (open: boolean) => void;
|
|
35
|
+
/** Controlled Secondary Panel visibility. */
|
|
36
|
+
secondaryOpen?: boolean;
|
|
37
|
+
/** Initial Secondary visibility. Defaults to collapsed. */
|
|
38
|
+
defaultSecondaryOpen?: boolean;
|
|
39
|
+
/** Reports explicit Secondary toggle requests. */
|
|
40
|
+
onSecondaryOpenChange?: (open: boolean) => void;
|
|
41
|
+
/** Controlled Primary share for the persistent desktop split. */
|
|
42
|
+
split?: number;
|
|
43
|
+
/** Initial Primary share. Defaults to the approved 60%. */
|
|
44
|
+
defaultSplit?: number;
|
|
45
|
+
/** Reports every pointer or keyboard resize. */
|
|
46
|
+
onSplitChange?: ResizablePanelGroupProps["onValueChange"];
|
|
47
|
+
/** Reports the final pointer value or each committed keyboard step. */
|
|
48
|
+
onSplitCommit?: ResizablePanelGroupProps["onValueCommit"];
|
|
49
|
+
/** Primary minimum-size policy. Defaults to Standard. */
|
|
50
|
+
primaryMinSize?: ResizablePanelMinimum;
|
|
51
|
+
/** Secondary minimum in pixels. Defaults to 280px. */
|
|
52
|
+
secondaryMinSize?: number;
|
|
53
|
+
/** Accessible splitter label when the Primary region has no visible label. */
|
|
54
|
+
resizeLabel?: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Complete Workspace layout pattern. It composes the approved Global App Bar,
|
|
58
|
+
* Workspace Navigation, and Resizable Panels contracts while product code
|
|
59
|
+
* retains routing, content, data fetching, and persistence ownership.
|
|
60
|
+
*/
|
|
61
|
+
export declare const WorkspaceAppShell: import("react").ForwardRefExoticComponent<NativeWorkspaceAppShellProps & {
|
|
62
|
+
/** Global App Bar account, brand, and native attributes. */
|
|
63
|
+
appBar: WorkspaceAppBarConfiguration;
|
|
64
|
+
/** Project context rendered by the approved Global App Bar selector. */
|
|
65
|
+
projectSelector: WorkspaceProjectSelectorConfiguration;
|
|
66
|
+
/** Workspace Navigation content; App Shell selects Inline or Overlay. */
|
|
67
|
+
navigation: WorkspaceNavigationConfiguration;
|
|
68
|
+
/** Product-owned Primary Panel content. */
|
|
69
|
+
primary: ReactNode;
|
|
70
|
+
/** Product-owned Secondary Panel content. */
|
|
71
|
+
secondary: ReactNode;
|
|
72
|
+
/** Controlled active theme for the entire shell. */
|
|
73
|
+
theme?: ThemeMode;
|
|
74
|
+
/** Initial active theme for uncontrolled use. */
|
|
75
|
+
defaultTheme?: ThemeMode;
|
|
76
|
+
/** Reports a theme request from the Global App Bar. */
|
|
77
|
+
onThemeChange?: (theme: ThemeMode) => void;
|
|
78
|
+
/** Controlled Navigation visibility. */
|
|
79
|
+
navigationOpen?: boolean;
|
|
80
|
+
/** Initial Navigation visibility. Defaults to open. */
|
|
81
|
+
defaultNavigationOpen?: boolean;
|
|
82
|
+
/** Reports explicit Navigation toggle or compact-overlay dismissal. */
|
|
83
|
+
onNavigationOpenChange?: (open: boolean) => void;
|
|
84
|
+
/** Controlled Secondary Panel visibility. */
|
|
85
|
+
secondaryOpen?: boolean;
|
|
86
|
+
/** Initial Secondary visibility. Defaults to collapsed. */
|
|
87
|
+
defaultSecondaryOpen?: boolean;
|
|
88
|
+
/** Reports explicit Secondary toggle requests. */
|
|
89
|
+
onSecondaryOpenChange?: (open: boolean) => void;
|
|
90
|
+
/** Controlled Primary share for the persistent desktop split. */
|
|
91
|
+
split?: number;
|
|
92
|
+
/** Initial Primary share. Defaults to the approved 60%. */
|
|
93
|
+
defaultSplit?: number;
|
|
94
|
+
/** Reports every pointer or keyboard resize. */
|
|
95
|
+
onSplitChange?: ResizablePanelGroupProps["onValueChange"];
|
|
96
|
+
/** Reports the final pointer value or each committed keyboard step. */
|
|
97
|
+
onSplitCommit?: ResizablePanelGroupProps["onValueCommit"];
|
|
98
|
+
/** Primary minimum-size policy. Defaults to Standard. */
|
|
99
|
+
primaryMinSize?: ResizablePanelMinimum;
|
|
100
|
+
/** Secondary minimum in pixels. Defaults to 280px. */
|
|
101
|
+
secondaryMinSize?: number;
|
|
102
|
+
/** Accessible splitter label when the Primary region has no visible label. */
|
|
103
|
+
resizeLabel?: string;
|
|
104
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
105
|
+
export {};
|