cleanplate 0.3.2 → 0.3.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/docs/AppShell.md CHANGED
@@ -11,6 +11,8 @@ Purpose: Full-page layout that combines an optional Header (top), optional Foote
11
11
  | footer | ReactNode \| FooterProps | no | — | Bottom bar: pass Footer props object or custom ReactNode. Omit to hide footer. |
12
12
  | sidebar | AppShellSidebarConfig | no | — | Sidebar config (MenuList as vertical nav on the left). Omit to hide sidebar. |
13
13
  | sidebarWidth | string | no | "240px" | Width of the sidebar (e.g. "240px", "16rem"). |
14
+ | mobileSidebarDrawer | boolean | no | *see below* | When `sidebar` is set: show a Floating UI drawer + trigger on narrow viewports (≤1024px). Default `false` if `header` is `HeaderProps` (header mobile menu); otherwise default `true`. |
15
+ | mobileSidebarDrawerLabel | string | no | "Main navigation" | Accessible name (`aria-label`) for the mobile navigation dialog. |
14
16
  | className | string | no | "" | Additional class name for the root element. |
15
17
  | contentClassName | string | no | "" | Additional class name for the main content wrapper. |
16
18
 
@@ -35,6 +37,8 @@ interface AppShellProps {
35
37
  footer?: React.ReactNode | FooterProps;
36
38
  sidebar?: AppShellSidebarConfig;
37
39
  sidebarWidth?: string;
40
+ mobileSidebarDrawer?: boolean;
41
+ mobileSidebarDrawerLabel?: string;
38
42
  className?: string;
39
43
  contentClassName?: string;
40
44
  }
@@ -133,7 +137,7 @@ const Dashboard = () => {
133
137
  - **Layout:** Root is a flex column with `min-height: 100vh`. Header and footer slots are full width; body is a flex row (sidebar + main). Main area is scrollable.
134
138
  - **Header / footer:** When `header` or `footer` is a plain object with Header/Footer props (e.g. `menuItems` for header), the component renders `<Header {...header} />` or `<Footer {...footer} />`. Otherwise it renders the ReactNode as-is.
135
139
  - **Sidebar:** Rendered in an `<aside aria-label="Main navigation">` with MenuList `direction="vertical"`. Width from `sidebarWidth` (inline style).
136
- - **Responsive:** At viewport width ≤ 1024px the sidebar is hidden via CSS. Pass the same `menuItems` and `activeMenuItem` / `onMenuItemClick` to `header` so the header’s mobile menu provides navigation.
140
+ - **Responsive:** At viewport width ≤ 1024px the sidebar column is hidden via CSS. When `header` is `HeaderProps`, the default is to rely on the header’s mobile menu for the same items. When there is no header (or `mobileSidebarDrawer` is `true`), AppShell renders a **Floating UI** mobile drawer: fixed menu trigger, `FloatingPortal` + `FloatingOverlay` (scroll lock) + `FloatingFocusManager` (modal focus), dismiss on overlay press and Escape, and the same `MenuList` as the sidebar.
137
141
  - **No root spacing props:** AppShell does not expose margin/padding; use `className` or `contentClassName` for layout.
138
142
 
139
143
  ## Related Components / Links
package/llms.txt CHANGED
@@ -229,7 +229,7 @@ All component documentation is located in the `docs/` folder. The following docu
229
229
  ### AppShell Component
230
230
  - File: `docs/AppShell.md`
231
231
  - Purpose: Full-page layout combining optional Header (top), Footer (bottom), and MenuList as left sidebar with main content. For dashboard-style apps.
232
- - Key Features: header (Header props or ReactNode), footer (Footer props or ReactNode), sidebar (AppShellSidebarConfig: items, activeItem, onMenuClick, size, variant), sidebarWidth, responsive (sidebar hidden ≤1024px; use header mobile menu)
232
+ - Key Features: header (Header props or ReactNode), footer (Footer props or ReactNode), sidebar (AppShellSidebarConfig: items, activeItem, onMenuClick, size, variant), sidebarWidth, mobileSidebarDrawer / mobileSidebarDrawerLabel, responsive (sidebar column hidden ≤1024px; default Floating UI drawer when no HeaderProps header, else header mobile menu)
233
233
  - Types: AppShellProps, AppShellSidebarConfig
234
234
  - Related Components: Header, Footer, MenuList (sidebar), Container, Typography, Avatar
235
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cleanplate",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "CleanPlate - A Headless React UI Framework",
5
5
  "files": [
6
6
  "dist",