@apolitical/component-library 1.14.3 → 1.14.5

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,2 +1,6 @@
1
- declare const Header: () => import("react/jsx-runtime").JSX.Element | null;
1
+ interface Props {
2
+ /** If the navigation should be hidden, for pages where we need the user to focus on the content, like onboarding */
3
+ showNavigation?: boolean;
4
+ }
5
+ declare const Header: ({ showNavigation }: Props) => import("react/jsx-runtime").JSX.Element | null;
2
6
  export default Header;
@@ -1,16 +1,36 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
- /** Content to show on the page */
3
+ /** Content to show on the page. This is rendered inside `#content` */
4
4
  children: React.ReactNode | JSX.Element | React.ReactPortal;
5
+ /** Additional content, which can be rendered above or below `#content` */
6
+ additionalContent?: {
7
+ /** Additional content, rendered above `#content` */
8
+ prepended?: React.ReactNode | JSX.Element | React.ReactPortal;
9
+ /** Additional content, rendered below `#content` */
10
+ appended?: React.ReactNode | JSX.Element | React.ReactPortal;
11
+ };
5
12
  /** Handle errors */
6
13
  reportError: () => void;
7
- background?: 'default' | 'gradient';
8
- /** Optionally hide the footer, for pages where we need to focus the user's attention, like onboarding */
9
- showFooter?: boolean;
14
+ /** Optional styling for the page */
15
+ styling?: {
16
+ /** The background of the page. Defaults to `default` */
17
+ background?: 'default' | 'gradient' | 'bold';
18
+ /** The styling variants of the `bold` background */
19
+ variant?: 'default' | 'inverted' | 'alt-1' | 'alt-2';
20
+ /** The size of the circle on the `bold` background */
21
+ circle?: 'default' | 'small';
22
+ };
23
+ /** Optionally hide the header navigation and the footer, for pages where we need to focus the user's attention, like onboarding */
24
+ forceShow?: {
25
+ /** Hide the header navigation */
26
+ navigation?: boolean;
27
+ /** Hide the footer */
28
+ footer?: boolean;
29
+ };
10
30
  /** Additional classes */
11
31
  className?: string;
12
32
  /** The language to use */
13
33
  locale?: string;
14
34
  }
15
- declare const PageLayout: ({ children, reportError, showFooter, background, className, locale }: Props) => import("react/jsx-runtime").JSX.Element;
35
+ declare const PageLayout: ({ children, additionalContent: { prepended, appended }, reportError, forceShow, styling, className, locale, }: Props) => import("react/jsx-runtime").JSX.Element;
16
36
  export default PageLayout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "1.14.3",
3
+ "version": "1.14.5",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {