@ubx/docs-ui 0.8.0 → 0.9.0
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/dist/PageShell.d.ts +14 -1
- package/dist/PageShell.js +2 -2
- package/package.json +1 -1
package/dist/PageShell.d.ts
CHANGED
|
@@ -53,6 +53,19 @@ export type PageShellProps = {
|
|
|
53
53
|
showThemeToggle?: boolean;
|
|
54
54
|
/** See Header's own githubUrl. Omitted means no button. */
|
|
55
55
|
githubUrl?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Render children edge to edge, with no centred, padded main column.
|
|
58
|
+
*
|
|
59
|
+
* The default wraps children in `mx-auto max-w-7xl px-6 py-12`, which
|
|
60
|
+
* is right for a docs page and wrong for a page built from full bleed
|
|
61
|
+
* tone bands: it caps every band at 1280px and insets it 24px, so the
|
|
62
|
+
* bands stop reaching the viewport edges and the alternating tones
|
|
63
|
+
* read as boxes rather than bands.
|
|
64
|
+
*
|
|
65
|
+
* ubiquex.io's home page is built that way, so it opts out and owns
|
|
66
|
+
* its own inner width. Both docs sites are unaffected.
|
|
67
|
+
*/
|
|
68
|
+
fullBleed?: boolean;
|
|
56
69
|
/** Footer identity. Required for the reason stated on Footer itself. */
|
|
57
70
|
footer: {
|
|
58
71
|
tagline: React.ReactNode;
|
|
@@ -63,7 +76,7 @@ export type PageShellProps = {
|
|
|
63
76
|
};
|
|
64
77
|
children: React.ReactNode;
|
|
65
78
|
};
|
|
66
|
-
export declare function PageShell({ nav, tabs, activeTab, sidebar, sidebarLabel, searchPlaceholder, searchPlacement, intro, showThemeToggle, githubUrl, footer, children, }: PageShellProps): React.JSX.Element;
|
|
79
|
+
export declare function PageShell({ nav, tabs, activeTab, sidebar, sidebarLabel, searchPlaceholder, searchPlacement, intro, showThemeToggle, githubUrl, fullBleed, footer, children, }: PageShellProps): React.JSX.Element;
|
|
67
80
|
/**
|
|
68
81
|
* Sets data-theme from localStorage before paint.
|
|
69
82
|
*
|
package/dist/PageShell.js
CHANGED
|
@@ -9,13 +9,13 @@ const HEADER_SEARCH_CLASS = "w-full rounded-full bg-field px-4 py-1.5 text-sm te
|
|
|
9
9
|
/** Full size, for a landing page where search is the point. */
|
|
10
10
|
const HERO_SEARCH_CLASS = "w-full rounded-full bg-field px-5 py-3 text-base text-foreground outline-none " +
|
|
11
11
|
"placeholder:text-foreground-muted focus:ring-2 focus:ring-primary/30";
|
|
12
|
-
export function PageShell({ nav, tabs, activeTab, sidebar, sidebarLabel = "Navigation", searchPlaceholder, searchPlacement = "header", intro, showThemeToggle = true, githubUrl, footer, children, }) {
|
|
12
|
+
export function PageShell({ nav, tabs, activeTab, sidebar, sidebarLabel = "Navigation", searchPlaceholder, searchPlacement = "header", intro, showThemeToggle = true, githubUrl, fullBleed = false, footer, children, }) {
|
|
13
13
|
const headerSearch = searchPlaceholder && searchPlacement === "header" ? (_jsx(GlobalSearch, { placeholder: searchPlaceholder, inputClassName: HEADER_SEARCH_CLASS })) : undefined;
|
|
14
14
|
const heroSearch = searchPlaceholder && searchPlacement === "hero" ? (_jsx("div", { className: "mx-auto mt-8 max-w-xl", children: _jsx(GlobalSearch, { placeholder: searchPlaceholder, inputClassName: HERO_SEARCH_CLASS }) })) : null;
|
|
15
15
|
return (_jsxs(_Fragment, { children: [_jsx(Header, { nav: nav, tabs: tabs, activeTab: activeTab, search: headerSearch, showThemeToggle: showThemeToggle, githubUrl: githubUrl, mobileMenu: sidebar ? (_jsx(MobileSidebarToggle, { label: sidebarLabel, children: sidebar })) : undefined }), sidebar ? (
|
|
16
16
|
// No intro or hero search here on purpose: a page with a sidebar
|
|
17
17
|
// is a content page, and a hero belongs to a landing page.
|
|
18
|
-
_jsxs("div", { className: "mx-auto flex w-full max-w-7xl flex-1 gap-10 px-6 py-10", children: [_jsx("aside", { className: "hidden w-64 shrink-0 lg:block", children: sidebar }), _jsx("main", { className: "min-w-0 flex-1", children: children })] })) : (_jsxs("main", { className: "mx-auto w-full max-w-7xl flex-1 px-6 py-12", children: [intro, heroSearch, children] })), _jsx(Footer, { tagline: footer.tagline, links: footer.links })] }));
|
|
18
|
+
_jsxs("div", { className: "mx-auto flex w-full max-w-7xl flex-1 gap-10 px-6 py-10", children: [_jsx("aside", { className: "hidden w-64 shrink-0 lg:block", children: sidebar }), _jsx("main", { className: "min-w-0 flex-1", children: children })] })) : fullBleed ? (_jsxs("main", { className: "flex-1", children: [intro, heroSearch, children] })) : (_jsxs("main", { className: "mx-auto w-full max-w-7xl flex-1 px-6 py-12", children: [intro, heroSearch, children] })), _jsx(Footer, { tagline: footer.tagline, links: footer.links })] }));
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Sets data-theme from localStorage before paint.
|
package/package.json
CHANGED