ai-design-system 0.1.28 → 0.1.29
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/components/features/PageLayout/PageLayout.tsx +16 -7
- package/components/index.ts +7 -10
- package/dist/index.cjs +8499 -9044
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -271
- package/dist/index.js +8534 -8873
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -44,8 +44,9 @@ import { PageContainer } from "@/components/composites/PageContainer"
|
|
|
44
44
|
export interface PageLayoutProps {
|
|
45
45
|
/**
|
|
46
46
|
* Sidebar configuration
|
|
47
|
+
* Optional for apps that need header + content layout without a sidebar.
|
|
47
48
|
*/
|
|
48
|
-
sidebar
|
|
49
|
+
sidebar?: AppSidebarProps
|
|
49
50
|
/**
|
|
50
51
|
* Header configuration
|
|
51
52
|
*/
|
|
@@ -127,6 +128,19 @@ export const PageLayout = React.memo<PageLayoutProps>(
|
|
|
127
128
|
<div className="flex min-h-0 flex-1 flex-col">{children}</div>
|
|
128
129
|
)
|
|
129
130
|
|
|
131
|
+
const pageContainer = (
|
|
132
|
+
<PageContainer className={`overflow-hidden ${className ?? ""}`}>
|
|
133
|
+
<AppHeader {...header} />
|
|
134
|
+
<div className={`min-h-0 flex-1 overflow-x-hidden ${layoutSections ? "overflow-hidden" : "overflow-y-auto"}`}>
|
|
135
|
+
{contentArea}
|
|
136
|
+
</div>
|
|
137
|
+
</PageContainer>
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
if (!sidebar) {
|
|
141
|
+
return pageContainer
|
|
142
|
+
}
|
|
143
|
+
|
|
130
144
|
return (
|
|
131
145
|
<LayoutProvider
|
|
132
146
|
defaultOpen={defaultSidebarOpen}
|
|
@@ -134,12 +148,7 @@ export const PageLayout = React.memo<PageLayoutProps>(
|
|
|
134
148
|
sidebarWidthIcon={sidebarWidthIcon}
|
|
135
149
|
>
|
|
136
150
|
<AppSidebar {...sidebar} />
|
|
137
|
-
|
|
138
|
-
<AppHeader {...header} />
|
|
139
|
-
<div className={`min-h-0 flex-1 overflow-x-hidden ${layoutSections ? "overflow-hidden" : "overflow-y-auto"}`}>
|
|
140
|
-
{contentArea}
|
|
141
|
-
</div>
|
|
142
|
-
</PageContainer>
|
|
151
|
+
{pageContainer}
|
|
143
152
|
</LayoutProvider>
|
|
144
153
|
)
|
|
145
154
|
}
|
package/components/index.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
export * from './primitives';
|
|
3
|
-
|
|
4
|
-
// Composites
|
|
5
|
-
export * from './composites';
|
|
6
|
-
|
|
7
|
-
// Blocks
|
|
8
|
-
export * from './blocks';
|
|
9
|
-
|
|
10
|
-
// Features
|
|
1
|
+
// Root public runtime API: feature-layer values only.
|
|
11
2
|
export * from './features';
|
|
12
3
|
|
|
4
|
+
// Root public type API: allow contracts from all layers.
|
|
5
|
+
export type * from './primitives';
|
|
6
|
+
export type * from './composites';
|
|
7
|
+
export type * from './blocks';
|
|
8
|
+
export type * from './features';
|
|
9
|
+
|
|
13
10
|
// Utilities
|
|
14
11
|
export { cn } from '@/lib/utils';
|