@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.
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k2b/ui",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Production-ready components for SolidJS applications.",
5
5
  "repository": {
6
6
  "type": "git",