@kolkrabbi/kol-framework 0.6.1 → 0.6.3

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/README.md CHANGED
@@ -17,9 +17,14 @@ npm i @kolkrabbi/kol-framework @kolkrabbi/kol-component @kolkrabbi/kol-theme
17
17
  @import "tailwindcss";
18
18
  @import "@kolkrabbi/kol-theme";
19
19
  @import "@kolkrabbi/kol-framework/kol-brand-color.css";
20
- @import "@kolkrabbi/kol-framework/kol-framework.css";
20
+ @import "@kolkrabbi/kol-framework/kol-framework.css" layer(components);
21
21
  ```
22
22
 
23
+ `layer(components)` is **required**, not optional. Unlayered rules outrank every
24
+ layered rule regardless of specificity, so a bare import promotes framework
25
+ chrome above the theme's type layer and the same package renders differently
26
+ per consumer.
27
+
23
28
  ```jsx
24
29
  import { AppShell } from '@kolkrabbi/kol-framework'
25
30
  import { NAV_TREE, getActivePage } from './sidebars.config'
package/kol-framework.css CHANGED
@@ -828,7 +828,13 @@ body {
828
828
  align-items: center;
829
829
  gap: 6px;
830
830
  font-family: var(--kol-font-family-mono, monospace);
831
- font-size: 13px;
831
+ /* The tab IS kol-mono-14 (14/18). Stated here, not as a utility class on the
832
+ element: this rule and the utility have equal specificity, so whichever
833
+ stylesheet loads last wins — and that flipped per consumer depending on
834
+ whether kol-framework.css was imported into a layer. Type lives in the
835
+ rule; do not re-add a kol-mono-* class to the tab. */
836
+ font-size: 14px;
837
+ line-height: 18px;
832
838
  font-weight: 500;
833
839
  letter-spacing: 0.02em;
834
840
  color: var(--kol-fg-64);
@@ -856,7 +862,8 @@ body {
856
862
  }
857
863
 
858
864
  .kol-shell-header-tab {
859
- font-size: 16px;
865
+ /* No type bump — 14/18 is the tab size at every viewport (user ruling
866
+ 2026-07-30). Only the spacing breathes at wide widths. */
860
867
  gap: 8px;
861
868
  padding-top: 10px;
862
869
  padding-bottom: 14px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-framework",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "KOL app shell — sidenav, layout, theme toggle, footer, heroes + brand color layer. SideNav takes nav data as props so the tree stays app-local.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  import { Icon } from '@kolkrabbi/kol-icons'
2
- import { SearchInput } from '@kolkrabbi/kol-component'
2
+ import { SearchInput, Tooltip } from '@kolkrabbi/kol-component'
3
3
  import ThemeToggle from './ThemeToggle.jsx'
4
4
 
5
5
  /**
@@ -21,6 +21,11 @@ import ThemeToggle from './ThemeToggle.jsx'
21
21
  * Tab-strip chrome (mono type, active underline, hidden scrollbar, wide-
22
22
  * viewport bumps) lives in kol-framework.css under kol-shell-header-*.
23
23
  *
24
+ * Every icon-only control is Tooltip-wrapped and aria-labelled, the bar is a
25
+ * real `<header>` landmark, and the theme toggle steps up a rung at lg+ —
26
+ * folded in from the kol-website workshop fork (2026-07-30), which existed
27
+ * only to add these. Consumers get ONE header; the fork is retired.
28
+ *
24
29
  * @param {ReactNode} brand Row-1 left slot — logo/wordmark + link, consumer-supplied
25
30
  * @param {Array} nav section tabs: [{ label, href, icon? }]
26
31
  * @param {Function} isActive (href) => boolean — marks the active tab
@@ -58,7 +63,7 @@ export default function ShellHeader({
58
63
  const hasTabRow = nav.length > 0 || Boolean(search) || Boolean(onNavToggle) || Boolean(onTocToggle)
59
64
 
60
65
  return (
61
- <div className={`kol-shell-header sticky top-0 z-50 shrink-0 bg-surface-primary ${className}`.trim()}>
66
+ <header className={`kol-shell-header sticky top-0 z-50 shrink-0 bg-surface-primary ${className}`.trim()}>
62
67
  {/* Row 1: brand block + controls */}
63
68
  <div className="border-b border-fg-08">
64
69
  <div className="w-full px-4 py-4 md:px-5 lg:px-6">
@@ -70,16 +75,25 @@ export default function ShellHeader({
70
75
  </div>
71
76
  <div className="flex shrink-0 items-center gap-1">
72
77
  {actions}
73
- {showThemeToggle && <ThemeToggle />}
78
+ {showThemeToggle && (
79
+ <Tooltip label="Toggle theme">
80
+ {/* one rung up at lg+ — the bar has room, and the toggle is
81
+ * the most-used control in the row */}
82
+ <span className="hidden lg:inline-flex"><ThemeToggle size="lg" /></span>
83
+ <span className="lg:hidden"><ThemeToggle /></span>
84
+ </Tooltip>
85
+ )}
74
86
  {onMenuClick && (
75
- <button
76
- type="button"
77
- className={`${iconBtnCls} text-fg-64`}
78
- onClick={onMenuClick}
79
- aria-label="Open navigation menu"
80
- >
81
- <Icon name="hamburger" size={18} />
82
- </button>
87
+ <Tooltip label="Open navigation menu">
88
+ <button
89
+ type="button"
90
+ className={`${iconBtnCls} text-fg-64`}
91
+ onClick={onMenuClick}
92
+ aria-label="Open navigation menu"
93
+ >
94
+ <Icon name="hamburger" size={18} />
95
+ </button>
96
+ </Tooltip>
83
97
  )}
84
98
  </div>
85
99
  </div>
@@ -111,30 +125,37 @@ export default function ShellHeader({
111
125
  {search && (
112
126
  <SearchInput
113
127
  className="shrink-0 self-center"
128
+ aria-label="Search"
114
129
  {...(search === true ? {} : search)}
115
130
  />
116
131
  )}
117
132
  {(onNavToggle || onTocToggle) && (
118
133
  <div className="hidden lg:flex items-center gap-1 pb-2">
119
134
  {onNavToggle && (
120
- <button
121
- type="button"
122
- className={`${iconBtnCls} ${navCollapsed ? 'text-fg-32' : 'text-fg-64'}`}
123
- onClick={onNavToggle}
124
- aria-label="Toggle navigation sidebar"
125
- >
126
- <Icon name="panel-left" size={18} />
127
- </button>
135
+ <Tooltip label="Toggle navigation sidebar">
136
+ <button
137
+ type="button"
138
+ className={`${iconBtnCls} ${navCollapsed ? 'text-fg-32' : 'text-fg-64'}`}
139
+ onClick={onNavToggle}
140
+ aria-label="Toggle navigation sidebar"
141
+ aria-pressed={!navCollapsed}
142
+ >
143
+ <Icon name="panel-left" size={18} />
144
+ </button>
145
+ </Tooltip>
128
146
  )}
129
147
  {onTocToggle && (
130
- <button
131
- type="button"
132
- className={`${iconBtnCls} ${tocCollapsed ? 'text-fg-32' : 'text-fg-64'}`}
133
- onClick={onTocToggle}
134
- aria-label="Toggle table of contents sidebar"
135
- >
136
- <Icon name="panel-right" size={18} />
137
- </button>
148
+ <Tooltip label="Toggle table of contents sidebar">
149
+ <button
150
+ type="button"
151
+ className={`${iconBtnCls} ${tocCollapsed ? 'text-fg-32' : 'text-fg-64'}`}
152
+ onClick={onTocToggle}
153
+ aria-label="Toggle table of contents sidebar"
154
+ aria-pressed={!tocCollapsed}
155
+ >
156
+ <Icon name="panel-right" size={18} />
157
+ </button>
158
+ </Tooltip>
138
159
  )}
139
160
  </div>
140
161
  )}
@@ -142,6 +163,6 @@ export default function ShellHeader({
142
163
  </div>
143
164
  </div>
144
165
  )}
145
- </div>
166
+ </header>
146
167
  )
147
168
  }