@kolkrabbi/kol-framework 0.44.0 → 0.45.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/kol-framework.css CHANGED
@@ -63,16 +63,17 @@ body {
63
63
  --kol-sidenav-step: var(--kol-spacing-4); /* keyboard resize increment */
64
64
  --kol-sidenav-snap-default: var(--kol-sidenav-step); /* release within this of the default clears the override */
65
65
  --kol-sidenav-w-collapsed: 56px;
66
- /* The workshop shell's RIGHT rail. EQUAL TO THE LEFT (user ruling
67
- 2026-08-01) — the two rails frame the same content and a lopsided frame is
68
- a frame nobody drew on purpose; it read 14rem against the left's 16rem.
69
- Kept as its own token rather than aliased: the right rail can be ruled
70
- different later without touching the sidenav.
71
- The track is RESERVED whether or not the rail has anything in it — a rail
72
- that vanishes on a heading-less page re-flows main, so the same shell
73
- renders at two widths. Distinct from --kol-toc-w further down, which is
74
- the BRAND layout's rail: same concept, two shells, two numbers. */
75
- --kol-shell-toc-w: 16rem;
66
+ /* THE WORKSHOP SHELL'S RAILS — their own pair, 256px each (showcase
67
+ refinement 2026-09-28, user: "should they both be the same width? layout
68
+ feels asymmetrical"). The left rail used to read --kol-sidenav-w, which is
69
+ the DRAGGABLE app sidenav's ladder (264, 320 from 1536 — useDragResize,
70
+ NavRail, the labs rail, the deck editor), so the docs shell rendered
71
+ 320 | main | 256: one token, two shells. The workshop rails are not
72
+ draggable and frame the same content, so they are equal and fixed, in px
73
+ like every other layout width. Distinct from --kol-toc-w further down,
74
+ which is the BRAND layout's rail. */
75
+ --kol-shell-nav-w: 256px;
76
+ --kol-shell-toc-w: 256px;
76
77
  --kol-container-max: 100%;
77
78
 
78
79
  /* Opacity tokens (--kol-fg-*) + text-role tokens (--kol-text-*) live in
@@ -736,7 +737,7 @@ body {
736
737
  .kol-portal-footer a { text-decoration: none; transition: opacity 150ms ease; }
737
738
  .kol-portal-footer a:hover { opacity: 0.8; }
738
739
 
739
- /* ───── Back link (structural only; use kol-helper-xs uppercase tracking-widest text-fg-64 on JSX) ───── */
740
+ /* ───── Back link (structural only; PageHero sets its type: kol-helper-12 tracking-widest text-body) ───── */
740
741
 
741
742
  .kol-back-link {
742
743
  display: inline-flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-framework",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
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",
@@ -21,8 +21,8 @@
21
21
  "react-router-dom": "^6.0.0 || ^7.0.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@kolkrabbi/kol-component": "^0.186.0",
25
- "@kolkrabbi/kol-icons": "^0.25.0"
24
+ "@kolkrabbi/kol-component": "^0.228.0",
25
+ "@kolkrabbi/kol-icons": "^0.29.0"
26
26
  },
27
27
  "files": [
28
28
  "src",
@@ -117,6 +117,7 @@ export default function PageLayout({ navTree = [], header, footer, defaultTocCon
117
117
  data-drawer-open={drawerOpen ? 'true' : undefined}
118
118
  data-toc={showToc ? 'true' : undefined}
119
119
  >
120
+ {/* tip-ok: phone-only (md:hidden) — a hover tip never shows on touch; the aria-label names it */}
120
121
  <button
121
122
  type="button"
122
123
  className="kol-sidenav-hamburger md:hidden fixed top-3 left-3 z-30 w-10 h-10 inline-flex items-center justify-center rounded-full bg-surface-primary border border-fg-08 text-emphasis"
@@ -128,12 +128,12 @@ export default function ShellHeader({
128
128
  <div className="flex shrink-0 items-center gap-1">
129
129
  {actions}
130
130
  {showThemeToggle && (
131
- <Tooltip label="Toggle theme">
131
+ <>
132
132
  {/* md at every width (user re-rule 2026-08-09: the whole
133
133
  * header glyph row rides md, full ink — the earlier lg-at-lg+
134
134
  * split is repealed, which also collapsed the two spans). */}
135
135
  <ThemeToggle fill="none" label={false} size="md" />
136
- </Tooltip>
136
+ </>
137
137
  )}
138
138
  {onMenuClick && (
139
139
  <Tooltip label="Open navigation menu">
@@ -1,4 +1,5 @@
1
1
  import { Icon } from '@kolkrabbi/kol-icons'
2
+ import { Tooltip } from '@kolkrabbi/kol-component'
2
3
  import { useTheme } from './theme.js'
3
4
 
4
5
  /**
@@ -88,6 +89,12 @@ export default function ThemeToggle({
88
89
  * ink, so the toggle beside a sunken Dropdown matches it; `inverse` aliased. Rules in kol-theme. */
89
90
  tone = 'default',
90
91
  className = '',
92
+ /* THE TOGGLE CARRIES ITS OWN TOOLTIP (2026-09-28). It set a native `title`
93
+ * AND the header wrapped it in a KOL Tooltip, so hovering showed both — the
94
+ * browser's "Switch to light mode · following your system" under the DS's
95
+ * "Toggle theme". One tip now, the DS one, with the richer text; `false`
96
+ * leaves the button bare for a caller that wraps it itself. */
97
+ tooltip = true,
91
98
  }) {
92
99
  const { theme, mode, cycle, clear } = useTheme()
93
100
  /* six tones (tone-is-the-ground-axis, 2026-09-03); unset inherits the wrapper's */
@@ -149,12 +156,13 @@ export default function ThemeToggle({
149
156
  type: 'button',
150
157
  onClick,
151
158
  'aria-label': `Switch to ${next} mode`,
152
- title: `Switch to ${next} mode${resetHint}`,
153
159
  }
160
+ const tip = `Switch to ${next} mode${resetHint}`
161
+ const wrap = (node) => (tooltip ? <Tooltip label={tip}>{node}</Tooltip> : node)
154
162
 
155
163
  /* ── DEPRECATED aliases — old chrome verbatim (0.6.x) ── */
156
164
  if (variant === 'icon') {
157
- return (
165
+ return wrap(
158
166
  <button {...shared} className={`kol-theme-toggle kol-theme-toggle-none kol-btn-${size} kol-btn-icon ${extra}`.trim()}>
159
167
  {iconSwap(glyphSolo)}
160
168
  </button>
@@ -176,7 +184,7 @@ export default function ThemeToggle({
176
184
  const chromeCls = bare
177
185
  ? `w-full inline-flex items-center justify-start gap-2 ${barePadY} px-6 ${mono} bg-transparent text-emphasis`
178
186
  : 'kol-theme-toggle kol-theme-toggle-subtle kol-btn-md kol-mono-14 w-full justify-start gap-2'
179
- return (
187
+ return wrap(
180
188
  <button {...shared} className={`${chromeCls} ${extra}`.trim()}>
181
189
  <span className="inline-flex items-center justify-center shrink-0" aria-hidden="true">
182
190
  {iconSwap(bare ? glyphWithText : glyphSolo)}
@@ -194,7 +202,7 @@ export default function ThemeToggle({
194
202
  if (variant === 'flush') {
195
203
  const glyph = label ? glyphWithText : glyphSolo
196
204
  const cls = `kol-theme-toggle kol-theme-toggle-flush gap-2 ${mono} ${width} ${extra}`
197
- return (
205
+ return wrap(
198
206
  <button {...shared} className={cls.replace(/\s+/g, ' ').trim()}>
199
207
  {!iconRight && iconSwap(glyph)}
200
208
  {label && <span className={fullWidth ? 'flex-1 min-w-0 text-left' : ''}>{MODE_LABEL[next]}</span>}
@@ -209,13 +217,13 @@ export default function ThemeToggle({
209
217
  const fillCls = fill === 'none' ? 'kol-theme-toggle-none' : 'kol-theme-toggle-subtle'
210
218
  if (!label) {
211
219
  // icon-only pins the square box per rung — geometry condition, not a variant
212
- return (
220
+ return wrap(
213
221
  <button {...shared} className={`kol-theme-toggle ${fillCls} kol-btn-${size} kol-btn-icon ${width} ${extra}`.replace(/\s+/g, ' ').trim()}>
214
222
  {iconSwap(glyphSolo)}
215
223
  </button>
216
224
  )
217
225
  }
218
- return (
226
+ return wrap(
219
227
  <button {...shared} className={`kol-theme-toggle ${fillCls} kol-btn-${size} ${mono} gap-2 ${width} ${extra}`.replace(/\s+/g, ' ').trim()}>
220
228
  {!iconRight && iconSwap(glyphWithText)}
221
229
  <span className={fullWidth ? 'flex-1 min-w-0 text-left' : ''}>{MODE_LABEL[next]}</span>