@kolkrabbi/kol-shell 0.4.1 → 0.6.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/package.json +3 -3
- package/src/PageHeader.jsx +42 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "KOL application shell — fixed 48px NavRail + AppShell layout root, PageShell/PageHeader scaffolds, ContentFilters catalog organism, GridCard, SettingsScaffold, WalkthroughPanel, ShortcutsOverlay. App chrome (kol-framework owns site chrome). Nav items, content, shortcuts and settings are consumer-injected. Sits above @kolkrabbi/kol-{theme,component,framework}.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@kolkrabbi/kol-component": "^0.
|
|
23
|
+
"@kolkrabbi/kol-component": "^0.53.0",
|
|
24
24
|
"@kolkrabbi/kol-framework": "^0.22.0",
|
|
25
25
|
"@kolkrabbi/kol-icons": "^0.17.0",
|
|
26
|
-
"@kolkrabbi/kol-theme": "^0.
|
|
26
|
+
"@kolkrabbi/kol-theme": "^0.46.1"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"src",
|
package/src/PageHeader.jsx
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PageHeader — page
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* PageHeader — the page's masthead: an optional eyebrow, the title, and a mono
|
|
3
|
+
* subtitle.
|
|
4
|
+
*
|
|
5
|
+
* TWO SCALES, because two things were being called a page header. An app page
|
|
6
|
+
* (monitor's Library, mirror's settings) wears a compact heading; a SITE page
|
|
7
|
+
* (kol-website's /work) opens on the display scale and the difference is not a
|
|
8
|
+
* preference, it is which register you are in. `size` picks:
|
|
9
|
+
*
|
|
10
|
+
* sm kol-sans-heading-03 32px — app chrome, a titled panel
|
|
11
|
+
* md kol-sans-display-03 36 / 42 / 48px — the default page masthead
|
|
12
|
+
* lg kol-sans-display-02 44 / 56 / 64px — a landing or section opener
|
|
13
|
+
*
|
|
14
|
+
* The title used to be `kol-heading-sm`, a retired t-shirt stop with NO rule
|
|
15
|
+
* anywhere in kol-theme, so every page title in every shell app fell through to
|
|
16
|
+
* the browser's default h1 (found 2026-08-15). It was mapped to heading-03,
|
|
17
|
+
* which was still too quiet for a page — hence the scale.
|
|
18
|
+
*
|
|
19
|
+
* `eyebrow` is the small label above the title (kol-website's "USE CASES").
|
|
20
|
+
* It self-hides when unset, so an app page passes nothing and gets nothing.
|
|
21
|
+
*
|
|
22
|
+
* @param {ReactNode} eyebrow small label above the title
|
|
23
|
+
* @param {ReactNode} title
|
|
24
|
+
* @param {ReactNode} subtitle mono line under the title
|
|
25
|
+
* @param {string} size sm | md | lg (default md)
|
|
6
26
|
*/
|
|
7
|
-
|
|
27
|
+
const TITLE = {
|
|
28
|
+
sm: 'kol-sans-heading-03',
|
|
29
|
+
md: 'kol-sans-display-03',
|
|
30
|
+
lg: 'kol-sans-display-02',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default function PageHeader({ eyebrow, title, subtitle, size = 'md', className = '' }) {
|
|
8
34
|
return (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
35
|
+
/* the block owns its own rhythm — margins inline, never in a shared type
|
|
36
|
+
class, which leaks estate-wide (ShellHeaderFilterRefinements, 2026-08-15) */
|
|
37
|
+
<header className={`flex flex-col ${className}`.trim()} style={{ marginBottom: 40 }}>
|
|
38
|
+
{eyebrow && (
|
|
39
|
+
<p className="text-fg-48 kol-mono-12" style={{ marginBottom: 12 }}>{eyebrow}</p>
|
|
40
|
+
)}
|
|
41
|
+
<h1 className={`text-fg-96 ${TITLE[size] ?? TITLE.md}`}>{title}</h1>
|
|
42
|
+
{subtitle && (
|
|
43
|
+
<p className="text-fg-48 kol-mono-14" style={{ marginTop: 12 }}>{subtitle}</p>
|
|
44
|
+
)}
|
|
45
|
+
</header>
|
|
15
46
|
)
|
|
16
47
|
}
|