@sudobility/building_blocks 0.0.145 → 0.0.146

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.
@@ -1,5 +1,4 @@
1
1
  import React, { type ReactNode } from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
3
2
  import { type AppBreadcrumbsProps } from '../breadcrumbs/app-breadcrumbs';
4
3
  import { type AppTopBarProps } from '../topbar/app-topbar';
5
4
  import { type AppTopBarWithFirebaseAuthProps } from '../topbar/app-topbar-with-firebase-auth';
@@ -7,9 +6,6 @@ import { type AppTopBarWithWalletProps } from '../topbar/app-topbar-with-wallet'
7
6
  import { type AppFooterProps } from '../footer/app-footer';
8
7
  import { type AppFooterForHomePageProps } from '../footer/app-footer-for-home-page';
9
8
  import type { MaxWidth, ContentPadding, BackgroundVariant } from '../../types';
10
- declare const layoutVariants: (props?: ({
11
- background?: "default" | "white" | "gradient" | null | undefined;
12
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
9
  /** Discriminated union for selecting which TopBar component to render. */
14
10
  export type TopBarConfig = ({
15
11
  variant: 'base';
@@ -27,15 +23,8 @@ export type FooterConfig = ({
27
23
  } & AppFooterProps) | ({
28
24
  variant: 'full';
29
25
  } & AppFooterForHomePageProps);
30
- export interface AppPageLayoutProps extends VariantProps<typeof layoutVariants> {
31
- /** Page content */
32
- children: ReactNode;
33
- /** TopBar configuration - selects which TopBar component to render */
34
- topBar: TopBarConfig;
35
- /** Breadcrumbs configuration (optional) */
36
- breadcrumbs?: AppBreadcrumbsProps;
37
- /** Footer configuration - selects which Footer component to render */
38
- footer?: FooterConfig;
26
+ /** Page-level layout and styling options. */
27
+ export interface AppPageProps {
39
28
  /** Max width for content area (default: '7xl') */
40
29
  maxWidth?: MaxWidth;
41
30
  /** Content padding (default: 'md') */
@@ -53,6 +42,18 @@ export interface AppPageLayoutProps extends VariantProps<typeof layoutVariants>
53
42
  /** Optional aspect ratio (width / height) for content area. When set, children are placed inside a container with fixed aspect ratio using AspectFit behavior. */
54
43
  aspectRatio?: number;
55
44
  }
45
+ export interface AppPageLayoutProps {
46
+ /** Page content */
47
+ children: ReactNode;
48
+ /** TopBar configuration - selects which TopBar component to render */
49
+ topBar: TopBarConfig;
50
+ /** Breadcrumbs configuration (optional) */
51
+ breadcrumbs?: AppBreadcrumbsProps;
52
+ /** Footer configuration - selects which Footer component to render */
53
+ footer?: FooterConfig;
54
+ /** Page-level layout and styling options */
55
+ page?: AppPageProps;
56
+ }
56
57
  /**
57
58
  * AppPageLayout - Layout wrapper combining TopBar, Breadcrumbs, Content, and Footer.
58
59
  *
@@ -84,8 +85,7 @@ export interface AppPageLayoutProps extends VariantProps<typeof layoutVariants>
84
85
  * companyName: 'My Company',
85
86
  * links: [{ label: 'Privacy', href: '/privacy' }],
86
87
  * }}
87
- * maxWidth="7xl"
88
- * background="default"
88
+ * page={{ maxWidth: '7xl', background: 'default' }}
89
89
  * >
90
90
  * <h1>Page Content</h1>
91
91
  * </AppPageLayout>
@@ -1 +1 @@
1
- export { AppPageLayout, type AppPageLayoutProps, type TopBarConfig, type FooterConfig, } from './app-page-layout';
1
+ export { AppPageLayout, type AppPageLayoutProps, type AppPageProps, type TopBarConfig, type FooterConfig, } from './app-page-layout';
package/dist/index.js CHANGED
@@ -1108,15 +1108,18 @@ const AppPageLayout = ({
1108
1108
  topBar,
1109
1109
  breadcrumbs,
1110
1110
  footer,
1111
- maxWidth = "7xl",
1112
- contentPadding = "md",
1113
- background = "default",
1114
- layoutMode = "standard",
1115
- className,
1116
- contentClassName,
1117
- mainClassName,
1118
- aspectRatio
1111
+ page
1119
1112
  }) => {
1113
+ const {
1114
+ maxWidth = "7xl",
1115
+ contentPadding = "md",
1116
+ background = "default",
1117
+ layoutMode = "standard",
1118
+ className,
1119
+ contentClassName,
1120
+ mainClassName,
1121
+ aspectRatio
1122
+ } = page ?? {};
1120
1123
  const isCompactFooter = (footer == null ? void 0 : footer.variant) === "compact";
1121
1124
  const content = aspectRatio ? /* @__PURE__ */ jsx(AspectFitView, { aspectRatio, children }) : children;
1122
1125
  return /* @__PURE__ */ jsx(LayoutProvider, { mode: layoutMode, children: /* @__PURE__ */ jsxs("div", { className: cn(layoutVariants({ background }), className), children: [