@kolkrabbi/kol-shell 0.13.0 → 0.13.2
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/AppShell.jsx +6 -1
- package/src/NavRail.jsx +14 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
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",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"@kolkrabbi/kol-component": ">=0.108.0",
|
|
16
|
-
"@kolkrabbi/kol-framework": ">=0.
|
|
16
|
+
"@kolkrabbi/kol-framework": ">=0.33.0",
|
|
17
17
|
"@kolkrabbi/kol-icons": ">=0.16.0",
|
|
18
18
|
"@kolkrabbi/kol-theme": ">=0.80.0",
|
|
19
19
|
"react": "^18.3.0 || ^19.0.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@kolkrabbi/kol-component": "^0.118.3",
|
|
24
|
-
"@kolkrabbi/kol-framework": "^0.31.0",
|
|
25
24
|
"@kolkrabbi/kol-icons": "^0.24.0",
|
|
25
|
+
"@kolkrabbi/kol-framework": "^0.33.0",
|
|
26
26
|
"@kolkrabbi/kol-theme": "^0.80.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
package/src/AppShell.jsx
CHANGED
|
@@ -19,10 +19,15 @@ import TouchDeviceOverlay, { useTouchPrimary } from './TouchDeviceOverlay.jsx'
|
|
|
19
19
|
* fixed rail + `margin-left` offset is gone. `--kol-shell-rail-width`
|
|
20
20
|
* (kol-theme ≥0.80.0) is LIVE — the sidenav's width in its current state —
|
|
21
21
|
* for consumers that offset a fixed element by it; hidden rail = `0px`.
|
|
22
|
+
* REQUIRES `@kolkrabbi/kol-framework/kol-framework.css` imported after the
|
|
23
|
+
* theme (kol-mirror's bump, 2026-08-28): the grid, the sidenav's box and
|
|
24
|
+
* collapse rules and its width tokens live there, not in kol-theme — without
|
|
25
|
+
* it the root is `display: block` and the rail is a horizontal bar, with a
|
|
26
|
+
* green build and a clean console.
|
|
22
27
|
*
|
|
23
28
|
* @param {Array} props.items nav items `{ icon, path, label }`
|
|
24
29
|
* @param {Array} props.bottomItems items pinned below the theme toggle
|
|
25
|
-
* @param {Object} props.logomark `{ svgUrl, title }` — the rail's
|
|
30
|
+
* @param {Object} props.logomark `{ svgUrl, title }` — the rail's header mark, at the top in both states, navigates to '/'
|
|
26
31
|
* @param {string} props.currentPath the router's current pathname
|
|
27
32
|
* @param {Function} props.onNavigate `(path) => void`
|
|
28
33
|
* @param {ElementType} props.iconComponent icon renderer seam (see Button)
|
package/src/NavRail.jsx
CHANGED
|
@@ -15,8 +15,12 @@ import Logomark from './Logomark.jsx'
|
|
|
15
15
|
* (`expandOnSelect={false}`).
|
|
16
16
|
*
|
|
17
17
|
* The bottom, specified once: theme slot → `bottomItems` (pinned rows) →
|
|
18
|
-
* footer
|
|
19
|
-
*
|
|
18
|
+
* no footer (an app rail never carried the site's wordmark link). The
|
|
19
|
+
* `logomark` is the sidenav's `header` — at the TOP, both states, where every
|
|
20
|
+
* rail in the estate has carried it (RailLogomarkAtTop, 2026-08-28 — user, on
|
|
21
|
+
* 0.13.0's footer placement: "why did you move the logo from top to bottom?
|
|
22
|
+
* … I've never seen that before so you are the first"). Its `title` is the
|
|
23
|
+
* label beside the mark in the open rail; collapsed, the mark alone.
|
|
20
24
|
*/
|
|
21
25
|
export default function NavRail({
|
|
22
26
|
items = [],
|
|
@@ -44,17 +48,21 @@ export default function NavRail({
|
|
|
44
48
|
expandOnSelect={false}
|
|
45
49
|
defaultCollapsed
|
|
46
50
|
hairline
|
|
47
|
-
footer={
|
|
51
|
+
footer={false}
|
|
52
|
+
header={logomark ? (
|
|
48
53
|
<button
|
|
49
54
|
type="button"
|
|
50
|
-
className="
|
|
55
|
+
className="flex items-center gap-3 w-full bg-transparent border-0 p-0 cursor-pointer text-emphasis no-underline text-left"
|
|
51
56
|
onClick={() => onNavigate?.('/')}
|
|
52
57
|
title={logomark.title}
|
|
53
58
|
aria-label={logomark.title}
|
|
54
59
|
>
|
|
55
|
-
<
|
|
60
|
+
<span className="kol-sidenav-hop-icon inline-flex items-center justify-center w-5 h-5 shrink-0" aria-hidden="true">
|
|
61
|
+
<Logomark svgUrl={logomark.svgUrl} size={20} />
|
|
62
|
+
</span>
|
|
63
|
+
{logomark.title && <span className="kol-sidenav-hop-label kol-helper-12 flex-1 min-w-0 truncate">{logomark.title}</span>}
|
|
56
64
|
</button>
|
|
57
|
-
) :
|
|
65
|
+
) : undefined}
|
|
58
66
|
/>
|
|
59
67
|
)
|
|
60
68
|
}
|