@pattern-stack/frontend-patterns 0.2.0-alpha.11 → 0.2.0-alpha.13

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,7 +1,27 @@
1
- import React from "react";
2
- interface AppHeaderProps {
1
+ import React, { type ReactNode } from "react";
2
+ export interface AppHeaderProps {
3
3
  className?: string;
4
+ /**
5
+ * Replaces the default "Frontend Template" + Trial Mode badge cluster.
6
+ * Pass a ReactNode for full custom branding, or a `{ title, badge? }` object
7
+ * to keep the default layout with a different label.
8
+ */
9
+ branding?: ReactNode | {
10
+ title: string;
11
+ badge?: ReactNode;
12
+ };
13
+ /** Override the global-search placeholder. */
14
+ searchPlaceholder?: string;
15
+ /**
16
+ * Show the global search slot. Opt-in. Default: false.
17
+ * Search is non-trivial to wire and looks broken when it's a no-op,
18
+ * so consumers must explicitly enable it.
19
+ */
20
+ showSearch?: boolean;
21
+ /** Show the user-menu slot. Opt-in. Default: false. */
22
+ showUserMenu?: boolean;
23
+ /** Show the connection-status slot. Opt-in. Default: false. */
24
+ showConnectionStatus?: boolean;
4
25
  }
5
26
  export declare const AppHeader: React.FC<AppHeaderProps>;
6
- export {};
7
27
  //# sourceMappingURL=AppHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../src/molecules/layout/AppHeader/AppHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA2C9C,CAAC"}
1
+ {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../../../src/molecules/layout/AppHeader/AppHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK9C,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC;IAC5D,8CAA8C;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uDAAuD;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+DAA+D;IAC/D,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAaD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAgE9C,CAAC"}
@@ -1,2 +1,2 @@
1
- export { AppHeader } from "./AppHeader";
1
+ export { AppHeader, type AppHeaderProps } from "./AppHeader";
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecules/layout/AppHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/molecules/layout/AppHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -1,2 +1,21 @@
1
- export declare const AppLayout: () => import("react/jsx-runtime").JSX.Element;
1
+ import type { ReactNode } from "react";
2
+ import { type AppHeaderProps } from "./AppHeader";
3
+ export interface AppLayoutProps {
4
+ /**
5
+ * Header configuration:
6
+ * - `undefined` (default): renders the standard `<AppHeader>` with library defaults.
7
+ * - `false`: skips the header entirely. Main content shifts up to the top of the viewport.
8
+ * - `AppHeaderProps`: renders `<AppHeader>` with the supplied overrides
9
+ * (branding, searchPlaceholder, showSearch, etc.).
10
+ */
11
+ header?: false | AppHeaderProps;
12
+ /**
13
+ * Sidebar configuration. Currently supports an optional footer node;
14
+ * when omitted, the sidebar renders no footer at all (no empty space).
15
+ */
16
+ sidebar?: {
17
+ footer?: ReactNode;
18
+ };
19
+ }
20
+ export declare const AppLayout: ({ header, sidebar }?: AppLayoutProps) => import("react/jsx-runtime").JSX.Element;
2
21
  //# sourceMappingURL=AppLayout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/molecules/layout/AppLayout.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,+CAsBrB,CAAC"}
1
+ {"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/molecules/layout/AppLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7D,MAAM,WAAW,cAAc;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC;CAClC;AAED,eAAO,MAAM,SAAS,GAAI,sBAAqB,cAAmB,4CAyBjE,CAAC"}
@@ -1,6 +1,13 @@
1
- interface SidebarProps {
1
+ import type { ReactNode } from "react";
2
+ export interface SidebarProps {
2
3
  className?: string;
4
+ /**
5
+ * Optional footer content rendered in the sidebar's footer slot.
6
+ * When omitted, the entire footer (and its top border) is not rendered.
7
+ * The expand/collapse opacity transition wrapper is preserved; pass a node
8
+ * that handles per-state content if you want different content per state.
9
+ */
10
+ footer?: ReactNode;
3
11
  }
4
- export declare const Sidebar: ({ className }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
12
+ export declare const Sidebar: ({ className, footer }: SidebarProps) => import("react/jsx-runtime").JSX.Element;
6
13
  //# sourceMappingURL=Sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/molecules/layout/Sidebar.tsx"],"names":[],"mappings":"AASA,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,GAAI,eAAe,YAAY,4CA0HlD,CAAC"}
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/molecules/layout/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,GAAI,uBAAuB,YAAY,4CA+G1D,CAAC"}
@@ -1,11 +1,11 @@
1
1
  export { PageTemplate, type PageTemplateProps } from "./PageTemplate";
2
2
  export { ShowcaseSection } from "./ShowcaseSection";
3
- export { AppLayout } from "./AppLayout";
3
+ export { AppLayout, type AppLayoutProps } from "./AppLayout";
4
4
  export { DashboardWithSidePanel } from "./DashboardWithSidePanel";
5
5
  export { SectionHeader } from "./SectionHeader";
6
6
  export { PageTitle, type PageTitleProps } from "./PageTitle";
7
7
  export { SidebarButton } from "./SidebarButton";
8
- export { AppHeader } from "./AppHeader";
8
+ export { AppHeader, type AppHeaderProps } from "./AppHeader";
9
9
  export { SidebarProvider } from "./SidebarContext";
10
10
  export { useSidebar } from "./use-sidebar";
11
11
  export { NavigationProvider } from "./NavigationContext";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecules/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OA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Ac,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import type { ReactNode } from "react";
3
+ import type { AppHeaderProps } from "../molecules/layout/AppHeader";
3
4
  import type { AuthConfig, NavigationConfig } from "../atoms/types";
4
5
  export interface AppConfig {
5
6
  title: string;
@@ -18,6 +19,22 @@ export interface AppConfig {
18
19
  customProviders?: React.ComponentType<{
19
20
  children: ReactNode;
20
21
  }>[];
22
+ /**
23
+ * Header configuration for the app shell.
24
+ * - `undefined` (default): renders the standard `<AppHeader>` with library defaults.
25
+ * - `false`: skips the header entirely.
26
+ * - `AppHeaderProps`: renders `<AppHeader>` with the supplied overrides
27
+ * (branding, searchPlaceholder, showSearch, etc.).
28
+ */
29
+ header?: false | AppHeaderProps;
30
+ /**
31
+ * Sidebar configuration for the app shell. Currently supports an optional
32
+ * `footer` ReactNode that renders in the sidebar's footer slot. When omitted,
33
+ * the sidebar renders no footer at all.
34
+ */
35
+ sidebar?: {
36
+ footer?: ReactNode;
37
+ };
21
38
  /**
22
39
  * Enable Query cache persistence to localStorage.
23
40
  * When true, cached data survives page refresh for instant offline UI.
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/templates/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAwCnE,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,EAAE,CAAC;IACjE;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,SAAS,CAAC;IACxB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACxD,KAAK,EAAE,CAAC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C;IACjC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,SAAS,CAAC;IACxB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACxD,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAGD,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,GAAG,WAAW,CAoMtE;AAGD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAE1D"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pattern-stack/frontend-patterns",
3
3
  "description": "Production-ready React frontend template with atomic architecture patterns. Build ultra-lean applications by importing shared UI foundation patterns.",
4
4
  "private": false,
5
- "version": "0.2.0-alpha.11",
5
+ "version": "0.2.0-alpha.13",
6
6
  "keywords": [
7
7
  "react",
8
8
  "typescript",