@k2b/ui 0.10.0 → 0.11.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/browser/feedback/HoverPreview.js +6 -6
- package/dist/browser/feedback/HoverPreview.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +105 -77
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/app-workspace-controller.js +30 -2
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/feedback/HoverPreview.js +6 -6
- package/dist/ssr/feedback/HoverPreview.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +84 -66
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/app-workspace-controller.js +30 -2
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/layout/AppWorkspace.d.ts +14 -0
- package/dist/types/layout/app-workspace-controller.d.ts +5 -0
- package/package.json +1 -1
|
@@ -82,6 +82,8 @@ export type AppWorkspaceBottomDrawerProps = {
|
|
|
82
82
|
resizable?: boolean;
|
|
83
83
|
};
|
|
84
84
|
export type AppWorkspaceSidebarProps = {
|
|
85
|
+
/** Stable element id, for a toggle elsewhere that names the sidebar in `aria-controls`. */
|
|
86
|
+
id?: string;
|
|
85
87
|
label?: string;
|
|
86
88
|
children: JSX.Element;
|
|
87
89
|
class?: string;
|
|
@@ -97,6 +99,18 @@ export type AppWorkspaceSidebarProps = {
|
|
|
97
99
|
defaultSize?: number;
|
|
98
100
|
minSize?: number;
|
|
99
101
|
maxSize?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Hides the desktop navigation completely: the sidebar renders none of its
|
|
104
|
+
* children and no resize handle, and main panes with `surface="navigation"`
|
|
105
|
+
* hide with it. The state is application-owned, like a persisted layout.
|
|
106
|
+
*/
|
|
107
|
+
hidden?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Makes the sidebar hideable by dragging its resize handle below half its
|
|
110
|
+
* minimum width. The controller then requests `true`; showing it again is
|
|
111
|
+
* the application's control.
|
|
112
|
+
*/
|
|
113
|
+
onHiddenChange?: (hidden: boolean) => void;
|
|
100
114
|
};
|
|
101
115
|
export type AppWorkspaceSidebarVisibility = "always" | "expanded" | "collapsed";
|
|
102
116
|
export type AppWorkspaceSidebarAccessoryVisibility = "always" | "hover";
|
|
@@ -4,4 +4,9 @@ export type AppWorkspaceControllerOptions = {
|
|
|
4
4
|
readState?: () => AppWorkspaceLayoutState | null | undefined;
|
|
5
5
|
writeState?: (state: AppWorkspaceLayoutState) => void;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Asks the owning `AppWorkspace.Sidebar` to hide. The sidebar's `hidden` prop
|
|
9
|
+
* stays application state, so the controller only requests the change.
|
|
10
|
+
*/
|
|
11
|
+
export declare const APP_WORKSPACE_SIDEBAR_HIDE_EVENT = "k2b-app-workspace-sidebar-hide";
|
|
7
12
|
export declare const installAppWorkspaceController: (options?: AppWorkspaceControllerOptions) => (() => void);
|