@kolkrabbi/kol-shell 0.131.0 → 0.133.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 +7 -7
- package/src/AccountForm.jsx +2 -4
- package/src/AppFloatNav.jsx +130 -11
- package/src/CatalogGrid.jsx +15 -1
- package/src/CatalogPage.jsx +18 -1
- package/src/DocumentCapsule.jsx +29 -4
- package/src/FloatActionMenu.jsx +8 -13
- package/src/GlobalActions.jsx +4 -4
- package/src/HubHome.jsx +2 -2
- package/src/MenuBar.jsx +57 -4
- package/src/PropertyRail.jsx +13 -13
- package/src/RailDisplayControls.jsx +2 -2
- package/src/RailTrigger.jsx +3 -3
- package/src/ReaderBar.jsx +8 -8
- package/src/ToolRail.jsx +86 -9
- package/src/TopControlsBar.jsx +6 -6
- package/src/WorkspaceStrips.jsx +3 -3
- package/src/index.js +2 -4
- package/src/FloatLayout.jsx +0 -148
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.133.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The application shell",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
"./src/*": "./src/*"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@kolkrabbi/kol-component": ">=0.
|
|
15
|
+
"@kolkrabbi/kol-component": ">=0.384.0",
|
|
16
16
|
"@kolkrabbi/kol-framework": ">=0.55.0",
|
|
17
17
|
"@kolkrabbi/kol-icons": ">=0.69.0",
|
|
18
|
-
"@kolkrabbi/kol-theme": ">=0.
|
|
18
|
+
"@kolkrabbi/kol-theme": ">=0.230.0",
|
|
19
19
|
"gsap": "^3.13.0",
|
|
20
20
|
"react": "^18.3.0 || ^19.0.0",
|
|
21
21
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kolkrabbi/kol-
|
|
25
|
-
"@kolkrabbi/kol-
|
|
26
|
-
"@kolkrabbi/kol-
|
|
27
|
-
"@kolkrabbi/kol-
|
|
24
|
+
"@kolkrabbi/kol-theme": "^0.230.0",
|
|
25
|
+
"@kolkrabbi/kol-icons": "^0.74.1",
|
|
26
|
+
"@kolkrabbi/kol-component": "^0.384.0",
|
|
27
|
+
"@kolkrabbi/kol-framework": "^0.74.1"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"src",
|
package/src/AccountForm.jsx
CHANGED
|
@@ -11,8 +11,7 @@ import { Button, Input, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
|
11
11
|
* Two looks, one form:
|
|
12
12
|
* - `column` (default) — style A, 360 wide: the desk's sign-in column over Home (HubHome) and the phone column.
|
|
13
13
|
* - `box` — the floating style, the user's phone sign-in box (round 3, W16 2026-10-31): 340 wide, 28 round, 20 in, 8 between
|
|
14
|
-
* rows, on its `surface
|
|
15
|
-
* consumer never does.
|
|
14
|
+
* rows, on its `surface`.
|
|
16
15
|
*
|
|
17
16
|
* @param {string} title the eyebrow ("Sign in", "Create account", "Request an invite")
|
|
18
17
|
* @param {Array} fields `[{ id, placeholder, type?, autoComplete? }]` — the placeholder is the field's name
|
|
@@ -50,7 +49,6 @@ export default function AccountForm({ title, fields = [], okLabel, footer, onSub
|
|
|
50
49
|
placeholder={f.placeholder}
|
|
51
50
|
aria-label={f.placeholder}
|
|
52
51
|
size="md"
|
|
53
|
-
variant={box ? 'float' : undefined}
|
|
54
52
|
value={vals[f.id]}
|
|
55
53
|
onChange={(e) => setVals((v) => ({ ...v, [f.id]: e.target.value }))}
|
|
56
54
|
className="w-full"
|
|
@@ -63,7 +61,7 @@ export default function AccountForm({ title, fields = [], okLabel, footer, onSub
|
|
|
63
61
|
{footer.text} <a href={footer.href ?? '#'} onClick={(e) => { if (footer.onPress) { e.preventDefault(); footer.onPress() } }} className="text-emphasis underline">{footer.link}</a>
|
|
64
62
|
</p>
|
|
65
63
|
)}
|
|
66
|
-
<Button type="submit"
|
|
64
|
+
<Button type="submit" size="md" className={`self-start${box ? '' : ' mt-4'}`} disabled={busy || !!done}>{okLabel}</Button>
|
|
67
65
|
</>
|
|
68
66
|
)
|
|
69
67
|
return box
|
package/src/AppFloatNav.jsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { useCallback, useEffect, useState } from 'react'
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { Button, TabsRow, Tooltip, TABBAR_H, TABBAR_PILL_H, TABBAR_PILL_INSET, tabbarPillWidth, tabbarPillSlot, floatSurfaceClass, usePopover, PopoverPanel, useMediaQuery } from '@kolkrabbi/kol-component'
|
|
3
3
|
import { hasIcon, IconLoader } from '@kolkrabbi/kol-icons'
|
|
4
4
|
import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
|
|
5
5
|
import Timecode from './Timecode.jsx'
|
|
6
|
+
import ToolRail, { ToolRailSlot } from './ToolRail.jsx'
|
|
7
|
+
import { Input, Menu } from '@kolkrabbi/kol-component'
|
|
6
8
|
|
|
7
9
|
/* taxonomy-ok: molecule — TabsRow's pill + MenuFloatRows sheets of Buttons */
|
|
8
10
|
|
|
@@ -81,7 +83,7 @@ import Timecode from './Timecode.jsx'
|
|
|
81
83
|
* depth — `sub`, the More's `actions` and the transport's `sheetFor` rows alike (MenuFloat). On the `dock` a
|
|
82
84
|
* level opens BESIDE its row (the + menu's popover); on every phone variant it REPLACES the card's rows under a Back row. A
|
|
83
85
|
* leaf runs and closes every level; Escape and an outside press close all; ↑ ↓ move, → / Enter open a level, ← goes back one.
|
|
84
|
-
* Its menus are the floating style B
|
|
86
|
+
* Its menus are the floating style B — the board's.
|
|
85
87
|
* @param {boolean} menuBorder the sheets' 1px hairline (`.kol-more-sheet-bordered`) — off by default, the board's menus have none
|
|
86
88
|
* THE FOUR VARIANTS (user ruling 2026-10-30): `mobile` · `dock` · `panel` · `transport` — nothing else.
|
|
87
89
|
*
|
|
@@ -112,6 +114,8 @@ const activePath = (items, path) => items
|
|
|
112
114
|
.sort((a, b) => b.path.length - a.path.length)[0]?.path
|
|
113
115
|
|
|
114
116
|
export default function AppFloatNav(props) {
|
|
117
|
+
if (props.variant === 'folio') return <TransportFolio {...props} />
|
|
118
|
+
if (props.variant === 'kolbox') return props.transport ? <TransportKolbox {...props} /> : <PhoneNavKolbox {...props} />
|
|
115
119
|
return props.variant === 'transport' ? <Transport {...props} /> : <FloatNav {...props} />
|
|
116
120
|
}
|
|
117
121
|
|
|
@@ -217,7 +221,7 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
|
|
|
217
221
|
{sub && (
|
|
218
222
|
<div className={`kol-phone-nav-more ${card}`} role="menu" aria-label={inBar.find((i) => key(i) === sub)?.label} style={overSlot(inBar.findIndex((i) => key(i) === sub))}>
|
|
219
223
|
<MenuFloat beside={dock} cardClass={card} onLeaf={pickSub} title={inBar.find((i) => key(i) === sub)?.label}>
|
|
220
|
-
<MenuFloatRows
|
|
224
|
+
<MenuFloatRows actions={inBar.find((i) => key(i) === sub)?.sub} onPick={pickSub} />
|
|
221
225
|
</MenuFloat>
|
|
222
226
|
</div>
|
|
223
227
|
)}
|
|
@@ -230,16 +234,16 @@ function FloatNav({ items = [], currentPath = '/', onNavigate, actions = [], sha
|
|
|
230
234
|
<div className={`kol-phone-nav-more ${card}`} role="menu" aria-label="More" style={sheetStyle}>
|
|
231
235
|
{/* the nav, the page's actions, then the pinned foot (frame A2) */}
|
|
232
236
|
<MenuFloat cardClass={card} onLeaf={pickMoreLeaf} title="More">
|
|
233
|
-
<MenuFloatRows
|
|
234
|
-
{after.length > 0 && <MenuFloatRows
|
|
237
|
+
<MenuFloatRows actions={actions} items={before} itemsFirst active={active} onPick={(x) => { setOpen(false); if (x.onPress && !actions.includes(x)) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />
|
|
238
|
+
{after.length > 0 && <MenuFloatRows items={after} active={active} onPick={(x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />}
|
|
235
239
|
</MenuFloat>
|
|
236
240
|
</div>
|
|
237
241
|
)}
|
|
238
242
|
{dock && (
|
|
239
243
|
<PopoverPanel popover={morePop} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
|
|
240
244
|
<MenuFloat beside cardClass={card} onLeaf={pickMoreLeaf} title="More">
|
|
241
|
-
<MenuFloatRows
|
|
242
|
-
{after.length > 0 && <MenuFloatRows
|
|
245
|
+
<MenuFloatRows actions={actions} items={before} itemsFirst active={active} onPick={(x) => { setOpen(false); if (x.onPress && !actions.includes(x)) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />
|
|
246
|
+
{after.length > 0 && <MenuFloatRows items={after} active={active} onPick={(x) => { setOpen(false); if (x.onPress) { x.onPress(); return } if (x.path) onNavigate?.(x.path) }} />}
|
|
243
247
|
</MenuFloat>
|
|
244
248
|
</PopoverPanel>
|
|
245
249
|
)}
|
|
@@ -360,8 +364,8 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', collapsibl
|
|
|
360
364
|
const main = canH ? tabs[tabs.length - 1] : null
|
|
361
365
|
const shown = canH ? tabs.slice(0, -1).filter((t) => !isH || t.selected) : tabs
|
|
362
366
|
const slot = (t) => (
|
|
363
|
-
<Tooltip key={t.value}
|
|
364
|
-
<Button
|
|
367
|
+
<Tooltip key={t.value} placement={top ? 'bottom' : 'top'} offset={12} label={t.label}>
|
|
368
|
+
<Button tone="ghost" iconOnly={t.icon} aria-label={t.label} pressed={t.selected} onClick={() => press(t.value)} />
|
|
365
369
|
</Tooltip>
|
|
366
370
|
)
|
|
367
371
|
/* the desktop capsule — ToolRail's slots laid in a row; the sheet sits over its slot (6 in + 40 a slot + 18 its centre,
|
|
@@ -375,7 +379,7 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', collapsibl
|
|
|
375
379
|
{sheet && (
|
|
376
380
|
<div className={`kol-phone-nav-more kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}${menuBorder ? ' kol-more-sheet-bordered' : ''}`} role="menu" aria-label={items[at]?.label} style={capsuleSheet}>
|
|
377
381
|
<MenuFloat onLeaf={() => setSheet(null)} title={items[at]?.label}>
|
|
378
|
-
<MenuFloatRows
|
|
382
|
+
<MenuFloatRows actions={sheetFor[sheet]} onPick={() => setSheet(null)} />
|
|
379
383
|
</MenuFloat>
|
|
380
384
|
</div>
|
|
381
385
|
)}
|
|
@@ -401,7 +405,7 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', collapsibl
|
|
|
401
405
|
{sheet && (
|
|
402
406
|
<div className={`kol-phone-nav-more kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}${menuBorder ? ' kol-more-sheet-bordered' : ''}`} role="menu" aria-label={items[at]?.label} style={sheetStyle}>
|
|
403
407
|
<MenuFloat onLeaf={() => setSheet(null)} title={items[at]?.label}>
|
|
404
|
-
<MenuFloatRows
|
|
408
|
+
<MenuFloatRows actions={sheetFor[sheet]} onPick={() => setSheet(null)} />
|
|
405
409
|
</MenuFloat>
|
|
406
410
|
</div>
|
|
407
411
|
)}
|
|
@@ -429,3 +433,118 @@ function Transport({ items = [], sheetFor = {}, placement = 'bottom', collapsibl
|
|
|
429
433
|
</>
|
|
430
434
|
)
|
|
431
435
|
}
|
|
436
|
+
|
|
437
|
+
/* ── kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18) ─────────────────────────────────────────────────
|
|
438
|
+
* `variant="kolbox"`: kolbox's floating nav, both of its members (TransportPill and PhoneNav are this component's
|
|
439
|
+
* aliases, so both kolbox twins land here). `transport` — kolbox's ToolbarTransport; unset — kolbox's RailPhone. */
|
|
440
|
+
|
|
441
|
+
/* THE TRANSPORT (Figma plan 19.1, W15, W20.1), carried from apps/kolbox/src/ui/ToolbarTransport.jsx: on ToolRail kolbox's
|
|
442
|
+
* shell, Play and Pause each a slot with the current state lit, Rewind, Stop and the time; after a rule, Loop and its
|
|
443
|
+
* length ("Loop / 4 s", the length's words as the field's prefix, on one line, the value hugging its text), the
|
|
444
|
+
* Timeline slot (`onTimeline`, lit while `timeline` is up) and `more` (further slots). The length commits on Enter or
|
|
445
|
+
* blur; a unit is part of the value. kolbox's words, no twin in the default transport's props: playing, time, loop,
|
|
446
|
+
* loopLength, timeline, onPlay(on), onRewind, onStop, onLoop(on), onLoopLength(seconds), onTimeline, more. */
|
|
447
|
+
function TransportKolbox({ playing = false, time = 0, loop = false, loopLength = 4, timeline = false, onPlay, onRewind, onStop, onLoop, onLoopLength, onTimeline, more, className = '' }) {
|
|
448
|
+
const length = `${loopLength} s`
|
|
449
|
+
const commit = (e) => {
|
|
450
|
+
const n = parseFloat(e.target.value)
|
|
451
|
+
if (n > 0) onLoopLength?.(n)
|
|
452
|
+
else e.target.value = length
|
|
453
|
+
}
|
|
454
|
+
return (
|
|
455
|
+
<ToolRail
|
|
456
|
+
variant="kolbox"
|
|
457
|
+
className={`kol-transport--kolbox ${className}`.trim()}
|
|
458
|
+
end={
|
|
459
|
+
<>
|
|
460
|
+
<ToolRailSlot icon="repeat" label="Loop" lit={loop} onClick={() => onLoop?.(!loop)} />
|
|
461
|
+
<Input variant="kolbox"
|
|
462
|
+
key={length}
|
|
463
|
+
prefix="Loop /"
|
|
464
|
+
aria-label="Loop length in seconds"
|
|
465
|
+
defaultValue={length}
|
|
466
|
+
onBlur={commit}
|
|
467
|
+
onKeyDown={(e) => e.key === 'Enter' && e.currentTarget.blur()}
|
|
468
|
+
hug
|
|
469
|
+
className="[&>span:first-child]:w-auto [&>span:first-child]:whitespace-nowrap"
|
|
470
|
+
/>
|
|
471
|
+
{onTimeline && <ToolRailSlot icon="panel-bottom" label="Timeline" lit={timeline} onClick={onTimeline} />}
|
|
472
|
+
{more}
|
|
473
|
+
</>
|
|
474
|
+
}
|
|
475
|
+
>
|
|
476
|
+
<ToolRailSlot icon="play" label="Play" lit={playing} onClick={() => onPlay?.(true)} />
|
|
477
|
+
<ToolRailSlot icon="pause" label="Pause" lit={!playing} onClick={() => onPlay?.(false)} />
|
|
478
|
+
<ToolRailSlot icon="rewind" label="Rewind" onClick={onRewind} />
|
|
479
|
+
<ToolRailSlot icon="stop" label="Stop" onClick={onStop} />
|
|
480
|
+
<span className="kol-transport-time w-16 px-2 tabular-nums">{time.toFixed(2)} s</span>
|
|
481
|
+
</ToolRail>
|
|
482
|
+
)
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/* ── folio (Folio migration batch D, 2026-11-22) ──────────────────────────────────────────────────────────────────────
|
|
486
|
+
* `variant="folio" transport`: Folio's ToolTransport, carried from apps/folio's EditorChrome.jsx (Folio has no phone
|
|
487
|
+
* nav, so the transport is the look's one member). Play (Pause while playing, lit), Stop and Loop (lit while on), each a
|
|
488
|
+
* 32 square with a 20 glyph, 4 apart, then the time and its total. Words: `timecode` `{ current, total }` (the default
|
|
489
|
+
* transport's; Folio's `time` and `total`); kolbox's `playing`, `onPlay(on)`, `onStop`, `loop`, `onLoop(on)`. The slots
|
|
490
|
+
* are `Button variant="folio" iconOnly` (Folio's ToolIcon, batch A). */
|
|
491
|
+
function TransportFolio({ playing = false, onPlay, onStop, loop = false, onLoop, timecode, className = '' }) {
|
|
492
|
+
const tc = timecode == null ? {} : typeof timecode === 'string' ? { current: timecode } : timecode
|
|
493
|
+
return (
|
|
494
|
+
<span role="group" aria-label="Transport" className={`kol-transport--folio flex shrink-0 items-center gap-[4px] ${className}`.trim()}>
|
|
495
|
+
<Button variant="folio" keepFocus iconOnly={playing ? 'pause' : 'play'} aria-label={playing ? 'Pause' : 'Play'} pressed={playing} onClick={() => onPlay?.(!playing)} />
|
|
496
|
+
<Button variant="folio" keepFocus iconOnly="stop" aria-label="Stop" onClick={onStop} />
|
|
497
|
+
<Button variant="folio" keepFocus iconOnly="repeat" aria-label="Loop" pressed={loop} onClick={() => onLoop?.(!loop)} />
|
|
498
|
+
<span className="kol-transport-time whitespace-pre px-[8px] tabular-nums">{tc.current}{tc.total != null && <span className="kol-transport-total">{` / ${tc.total}`}</span>}</span>
|
|
499
|
+
</span>
|
|
500
|
+
)
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/* THE PHONE NAV (round 4, W15), carried from apps/kolbox/src/ui/RailPhone.jsx: the real hub's phone nav in kolbox's
|
|
504
|
+
* look. AppFloatNav's words: `items` [{ path, icon, label, onPress }] in rail order (the app's rows; kolbox's `run` is
|
|
505
|
+
* `onPress`), `currentPath`. More than five, so the first four sit in the pill and the fifth slot is More; More is the
|
|
506
|
+
* whole nav, titled "More", the current page lit; while it is open the pill gives way (its place kept) and More turns to
|
|
507
|
+
* its × ("Close"); a pick or a press off it closes it. The active slot is the current page's (a page reached through More
|
|
508
|
+
* lights More). Geometry: 66 high, 56 slots 4 apart, 28 glyphs, More its own 66 circle 8 off the pill, 16 off the
|
|
509
|
+
* window's foot. */
|
|
510
|
+
const KOLBOX_IN_BAR = 4
|
|
511
|
+
const kolboxAt = (row, path) => path === row.path || path.startsWith(`${row.path}/`)
|
|
512
|
+
const SlotKolbox = ({ icon, label, lit, onClick, round = false, refEl }) => (
|
|
513
|
+
<Tooltip variant="kolbox" label={label}>
|
|
514
|
+
<button
|
|
515
|
+
ref={refEl}
|
|
516
|
+
type="button"
|
|
517
|
+
aria-label={label}
|
|
518
|
+
aria-current={lit || undefined}
|
|
519
|
+
onClick={onClick}
|
|
520
|
+
className={`kol-phone-nav-slot${lit ? ' is-lit' : ''}${round ? ' is-round size-[66px]' : ' size-14'} inline-flex shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-solid focus-visible:outline-1`}
|
|
521
|
+
>
|
|
522
|
+
<IconLoader name={icon} size={28} className="kol-kolbox-icon shrink-0" />
|
|
523
|
+
</button>
|
|
524
|
+
</Tooltip>
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
function PhoneNavKolbox({ items = [], currentPath = '/' }) {
|
|
528
|
+
const [open, setOpen] = useState(false)
|
|
529
|
+
const moreRef = useRef(null)
|
|
530
|
+
const active = items.find((r) => kolboxAt(r, currentPath))
|
|
531
|
+
const inBar = items.slice(0, KOLBOX_IN_BAR)
|
|
532
|
+
const litMore = open || (active && !inBar.includes(active))
|
|
533
|
+
return (
|
|
534
|
+
<nav aria-label="Pages" className="kol-phone-nav--kolbox pointer-events-none fixed inset-x-0 bottom-4 z-40 flex items-center justify-center gap-2 pb-[env(safe-area-inset-bottom)] *:pointer-events-auto" data-rail-phone>
|
|
535
|
+
<div className={`kol-phone-nav-pill flex h-[66px] items-center gap-1 rounded-full p-[5px] ${open ? 'invisible' : ''}`} data-rail-phone-pill>
|
|
536
|
+
{inBar.map((r) => <SlotKolbox key={r.path} icon={r.icon} label={r.label} lit={r === active} onClick={r.onPress} />)}
|
|
537
|
+
</div>
|
|
538
|
+
<SlotKolbox round icon={open ? 'x' : 'more'} label={open ? 'Close' : 'More'} lit={litMore} onClick={() => setOpen((o) => !o)} refEl={moreRef} />
|
|
539
|
+
<Menu variant="kolbox"
|
|
540
|
+
aria-label="More"
|
|
541
|
+
anchor={moreRef}
|
|
542
|
+
open={open}
|
|
543
|
+
placement="left-start"
|
|
544
|
+
onClose={() => setOpen(false)}
|
|
545
|
+
onSelect={(row) => row.run?.()}
|
|
546
|
+
groups={[{ title: 'More', rows: items.map((r) => ({ label: r.label, icon: r.icon, highlighted: r === active, run: r.onPress })) }]}
|
|
547
|
+
/>
|
|
548
|
+
</nav>
|
|
549
|
+
)
|
|
550
|
+
}
|
package/src/CatalogGrid.jsx
CHANGED
|
@@ -20,7 +20,7 @@ import { useCallback, useRef, useState } from 'react'
|
|
|
20
20
|
* @param {Function} onColumns `(n) => void` — the measured track count, whenever it changes
|
|
21
21
|
* @param {ReactNode} children the cards (grid) or rows (list)
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function CatalogGridDefault({ layout = 'grid', minColumn = 160, maxColumns = 6, listColumns = 4, listLayout = 'grid', onColumns, children, className, style }) {
|
|
24
24
|
const [cols, setCols] = useState(null)
|
|
25
25
|
const observer = useRef(null)
|
|
26
26
|
const report = useRef(onColumns)
|
|
@@ -54,3 +54,17 @@ export default function CatalogGrid({ layout = 'grid', minColumn = 160, maxColum
|
|
|
54
54
|
</div>
|
|
55
55
|
)
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
/* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5): tracks no narrower than 240, gap 32, 34 in from the sides and 22 under the title row, so
|
|
59
|
+
Figma's file browser's 4 cards a row at its width (plan-2026-11-23 W6); one a row on a phone */
|
|
60
|
+
function CatalogGridKolbox({ children, className }) {
|
|
61
|
+
return (
|
|
62
|
+
<div className={`min-h-0 flex-1 overflow-y-auto max-md:flex-none max-md:overflow-visible ${className ?? ''}`.trim()} data-file-grid>
|
|
63
|
+
<div role="list" className="grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-x-8 gap-y-8 px-[34px] pt-[22px] pb-8 max-md:grid-cols-1 max-md:px-4 max-md:pb-28">{children}</div>
|
|
64
|
+
</div>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default function CatalogGrid(props) {
|
|
69
|
+
return props.variant === 'kolbox' ? <CatalogGridKolbox {...props} /> : <CatalogGridDefault {...props} />
|
|
70
|
+
}
|
package/src/CatalogPage.jsx
CHANGED
|
@@ -252,7 +252,7 @@ function toSlideCard(c, { layout }) {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
function CatalogPageDefault({
|
|
256
256
|
/* FIRST, so every default below can read it */
|
|
257
257
|
preset = 'catalog',
|
|
258
258
|
header,
|
|
@@ -413,3 +413,20 @@ export default function CatalogPage({
|
|
|
413
413
|
</AppItemMenuProvider>
|
|
414
414
|
)
|
|
415
415
|
}
|
|
416
|
+
|
|
417
|
+
/* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): kolbox's Browser (Figma `Browser`), carried from
|
|
418
|
+
* apps/kolbox/src/home/Browser.jsx: the whole window with its own top bar, so not in an EditorShell: `sidebar` (the home
|
|
419
|
+
* rail) and the main column (children: the top bar, the title row, the grid or the list, which scroll). The panel fill,
|
|
420
|
+
* the sans 12 / 16 in the ink. Under 768 it stacks and scrolls as one column. */
|
|
421
|
+
function CatalogPageKolbox({ sidebar, children, className = '' }) {
|
|
422
|
+
return (
|
|
423
|
+
<div className={`kol-catalog-page--kolbox flex h-full overflow-hidden max-md:flex-col max-md:overflow-y-auto ${className}`.trim()} data-browser>
|
|
424
|
+
{sidebar}
|
|
425
|
+
<main className="flex min-w-0 flex-1 flex-col max-md:contents" data-browser-main>{children}</main>
|
|
426
|
+
</div>
|
|
427
|
+
)
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export default function CatalogPage(props) {
|
|
431
|
+
return props.variant === 'kolbox' ? <CatalogPageKolbox {...props} /> : <CatalogPageDefault {...props} />
|
|
432
|
+
}
|
package/src/DocumentCapsule.jsx
CHANGED
|
@@ -21,20 +21,45 @@ import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
|
|
|
21
21
|
* @param {'solid'|'glass-dark'|'glass-light'} surface what the capsule (and its menu) is made of (default `solid`)
|
|
22
22
|
* @param {string} className
|
|
23
23
|
*/
|
|
24
|
-
export default function DocumentCapsule({ name, status, statusIcon, onBack, menuItems, onMenu, surface = 'solid', className = '' }) {
|
|
24
|
+
export default function DocumentCapsule({ name, status, statusIcon, onBack, menuItems, onMenu, surface = 'solid', variant, open: kolboxOpen, ref, className = '' }) {
|
|
25
|
+
/* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): the kolbox top rail's DocumentTitle (the file's
|
|
26
|
+
* TopRail 36:9458), carried from apps/kolbox/src/ui/TopRail.jsx: the slash, then the `name` and its 12 chevron, 12
|
|
27
|
+
* apart. `onMenu(event)` the name's press (the host owns the menu, anchored to the name; `ref` reaches the name's
|
|
28
|
+
* button); without it the name is not a button's press and draws no chevron. `open` lights the name while its menu
|
|
29
|
+
* is up. No save state (W19.5: saving raises a toast). */
|
|
30
|
+
if (variant === 'kolbox') {
|
|
31
|
+
return (
|
|
32
|
+
<span className={`kol-document-title--kolbox flex min-w-0 items-center gap-3 ${className}`.trim()} data-document-title>
|
|
33
|
+
<span className="kol-document-title-slash">/</span>
|
|
34
|
+
<button
|
|
35
|
+
ref={ref}
|
|
36
|
+
type="button"
|
|
37
|
+
aria-haspopup={onMenu ? 'menu' : undefined}
|
|
38
|
+
aria-expanded={onMenu ? kolboxOpen : undefined}
|
|
39
|
+
disabled={!onMenu}
|
|
40
|
+
onClick={onMenu}
|
|
41
|
+
data-file-name
|
|
42
|
+
className={`kol-document-title-name${kolboxOpen ? ' is-open' : ''} inline-flex min-w-0 items-center gap-3 outline-none focus-visible:outline-solid focus-visible:outline-1`}
|
|
43
|
+
>
|
|
44
|
+
<span className="truncate">{name}</span>
|
|
45
|
+
{onMenu && <IconLoader name="chevron-down" size={12} className={`kol-kolbox-chevron shrink-0${kolboxOpen ? '' : ' kol-document-title-chevron'}`} />}
|
|
46
|
+
</button>
|
|
47
|
+
</span>
|
|
48
|
+
)
|
|
49
|
+
}
|
|
25
50
|
const [open, setOpen] = useState(false)
|
|
26
51
|
const popover = usePopover({ open, onOpenChange: setOpen, placement: 'bottom-start', offset: 8 })
|
|
27
52
|
const hasMenu = menuItems?.length > 0
|
|
28
53
|
const card = `kol-more-sheet kol-more-sheet-float ${floatSurfaceClass(surface, true)}`
|
|
29
54
|
return (
|
|
30
55
|
<div className={`kol-document-capsule kol-float-chrome inline-flex items-center gap-3 h-12 pl-2 pr-4 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
|
|
31
|
-
{onBack && <Button
|
|
56
|
+
{onBack && <Button tone="ghost" size="sm" iconOnly="arrow-left" aria-label="Back" onClick={onBack} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
|
|
32
57
|
{hasMenu || onMenu ? (
|
|
33
58
|
/* the name ▾ is a MenuTrigger float (plan-2026-11-06-buttons-page 2.3 — it was a hand-rolled <button>): clear at
|
|
34
59
|
* rest on the capsule, lit while its menu is open; the popover holds the span, the pattern TopControlsBar uses */
|
|
35
60
|
<span ref={hasMenu ? popover.refs.setReference : undefined} {...(hasMenu ? popover.getReferenceProps() : {})} className="inline-flex">
|
|
36
61
|
{/* inline: the theme's menu-trigger rule sets the well at 3-class weight, a utility class cannot reach it */}
|
|
37
|
-
<MenuTrigger
|
|
62
|
+
<MenuTrigger open={hasMenu && open} iconRight="chevron-down" aria-haspopup="menu" aria-expanded={hasMenu ? open : undefined}
|
|
38
63
|
onClick={hasMenu ? undefined : onMenu}
|
|
39
64
|
style={{ '--kol-tone-bg': 'transparent', '--kol-float-px-md': 'var(--kol-spacing-2)' }}>
|
|
40
65
|
{name}
|
|
@@ -52,7 +77,7 @@ export default function DocumentCapsule({ name, status, statusIcon, onBack, menu
|
|
|
52
77
|
{hasMenu && (
|
|
53
78
|
<PopoverPanel popover={popover} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
|
|
54
79
|
<MenuFloat beside cardClass={card} onLeaf={() => setOpen(false)} title={name}>
|
|
55
|
-
<MenuFloatRows
|
|
80
|
+
<MenuFloatRows actions={menuItems} onPick={() => setOpen(false)} />
|
|
56
81
|
</MenuFloat>
|
|
57
82
|
</PopoverPanel>
|
|
58
83
|
)}
|
package/src/FloatActionMenu.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { Button, PopoverPanel, usePopover,
|
|
3
|
-
import { MenuFloatRows
|
|
2
|
+
import { Button, PopoverPanel, usePopover, floatMotion } from '@kolkrabbi/kol-component'
|
|
3
|
+
import { MenuFloatRows } from '@kolkrabbi/kol-component'
|
|
4
4
|
|
|
5
5
|
/* taxonomy-ok: molecule — a round Button that opens the More sheet's rows */
|
|
6
6
|
|
|
@@ -12,20 +12,17 @@ import { MenuFloatRows, MenuFloat } from '@kolkrabbi/kol-component'
|
|
|
12
12
|
*
|
|
13
13
|
* @param {Array} actions `[{ label, icon?, onPress }]` — MenuFloatRows' actions
|
|
14
14
|
* @param {'more'|'plus'|string} [icon='more'] the button's glyph; anything but `more` turns to × while open
|
|
15
|
-
* @param {'float'} [variant] the sheet in the float look (`kol-more-sheet-float` on `surface`); unset, the plain sheet
|
|
16
|
-
* @param {'solid'|'glass-dark'|'glass-light'} [surface='solid'] what the float sheet is made of — the button never changes
|
|
17
15
|
* @param {'rotate'|'swap'} [iconMotion='rotate'] how a glyph that is not `more` becomes the × while open: `rotate` turns
|
|
18
16
|
* the one glyph 45° (the + into the ×) and back on close; `swap` exchanges the icon
|
|
19
17
|
* @param {boolean|Object} [motion=true] the button's states, the turn and the sheet's enter and leave: `true` the
|
|
20
18
|
* `--kol-float-*` tokens · `false` none · `{ duration, ease }` per app (floatMotion)
|
|
21
|
-
* @param {string} [title='Actions'] the float sheet's header (MenuFloat's Header) — the button's label
|
|
22
19
|
* @param {string} [className]
|
|
23
20
|
*
|
|
24
21
|
* The button's ladder (FloatActionStatesAndMotion, kol-website 2026-11-04): rest the solid inverted circle with the float
|
|
25
22
|
* shadow · hover the same fill at `--kol-float-hover-opacity` · pressed `--kol-float-press-scale` · open the × on the same
|
|
26
|
-
* fill and shadow (`.kol-float-action
|
|
23
|
+
* fill and shadow (`.kol-float-action`).
|
|
27
24
|
*/
|
|
28
|
-
export default function FloatActionMenu({ actions, icon = 'more',
|
|
25
|
+
export default function FloatActionMenu({ actions, icon = 'more', iconMotion = 'rotate', motion = true, className = '' }) {
|
|
29
26
|
const [open, setOpen] = useState(false)
|
|
30
27
|
/* the sheet opens to the LEFT of the button, top edges on one line (user 2026-10-23) — as the phone's sits beside its × */
|
|
31
28
|
const popover = usePopover({ open, onOpenChange: setOpen, placement: 'left-start', offset: 12 })
|
|
@@ -37,13 +34,11 @@ export default function FloatActionMenu({ actions, icon = 'more', variant, surfa
|
|
|
37
34
|
{/* `icon` — `more` on Home, `plus` signed out (frame B2), the × while its sheet is open */}
|
|
38
35
|
{/* always the inverted round button — `surface` dresses its menu only (HomeDockRound4, kol-fxr 2026-10-31 — user: *"this
|
|
39
36
|
* also changed the action button, but it is not supposed to change"*) */}
|
|
40
|
-
<Button iconOnly={glyph} size="lg"
|
|
41
|
-
className={`kol-float-action${
|
|
37
|
+
<Button iconOnly={glyph} size="lg" radius="full" aria-label={open ? 'Close' : 'Actions'} pressed={open}
|
|
38
|
+
className={`kol-float-action${turn ? ` kol-float-turn${open ? ' is-open' : ''}` : ''}`} />
|
|
42
39
|
</span>
|
|
43
|
-
<PopoverPanel popover={popover} panel={false} motion={motion} className=
|
|
44
|
-
{
|
|
45
|
-
? <MenuFloat title={title} onLeaf={() => setOpen(false)}><MenuFloatRows actions={actions} variant="float" onPick={() => setOpen(false)} /></MenuFloat>
|
|
46
|
-
: <MenuFloatRows actions={actions} variant={variant} onPick={() => setOpen(false)} />}
|
|
40
|
+
<PopoverPanel popover={popover} panel={false} motion={motion} className="kol-more-sheet" style={{ minWidth: 220 }}>
|
|
41
|
+
<MenuFloatRows actions={actions} onPick={() => setOpen(false)} />
|
|
47
42
|
</PopoverPanel>
|
|
48
43
|
</div>
|
|
49
44
|
)
|
package/src/GlobalActions.jsx
CHANGED
|
@@ -18,15 +18,15 @@ import { Avatar, Button } from '@kolkrabbi/kol-component'
|
|
|
18
18
|
export default function GlobalActions({ onUndo, onRedo, actionLabel = 'Export', onAction, account, onAccount, className = '' }) {
|
|
19
19
|
return (
|
|
20
20
|
<div className={`kol-global-actions kol-float-chrome inline-flex items-center gap-3 ${className}`.trim()}>
|
|
21
|
-
{onUndo && <Button
|
|
22
|
-
{onRedo && <Button
|
|
23
|
-
{onAction && <Button
|
|
21
|
+
{onUndo && <Button tone="ghost" size="sm" iconOnly="undo" aria-label="Undo" onClick={onUndo} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
|
|
22
|
+
{onRedo && <Button tone="ghost" size="sm" iconOnly="redo" aria-label="Redo" onClick={onRedo} className="[--kol-tone-fg:var(--kol-oq-96)]" />}
|
|
23
|
+
{onAction && <Button size="md" onClick={onAction}>{actionLabel}</Button>}
|
|
24
24
|
{account?.src || account?.initial ? (
|
|
25
25
|
<button type="button" aria-label={account.label ?? 'Account'} onClick={onAccount} className="inline-flex rounded-full bg-transparent border-0 p-0 cursor-pointer">
|
|
26
26
|
<Avatar src={account.src} initial={account.initial} alt="" size="md" />
|
|
27
27
|
</button>
|
|
28
28
|
) : (
|
|
29
|
-
<Button
|
|
29
|
+
<Button tone="grey" size="md" iconOnly="user" aria-label={account?.label ?? 'Account'} onClick={onAccount} />
|
|
30
30
|
)}
|
|
31
31
|
</div>
|
|
32
32
|
)
|
package/src/HubHome.jsx
CHANGED
|
@@ -328,8 +328,8 @@ export default function HubHome({
|
|
|
328
328
|
</div>
|
|
329
329
|
)}
|
|
330
330
|
{/* the + on the phone too (Round 3: the phone had no way to sign in from Home) — top-right on the mark's line, 16 in
|
|
331
|
-
* and 24 down; its menu is the floating style
|
|
332
|
-
{outActions.length > 0 && <FloatActionMenu actions={outActions} icon="plus"
|
|
331
|
+
* and 24 down; its menu is the floating style, as the dock's sheets are */}
|
|
332
|
+
{outActions.length > 0 && <FloatActionMenu actions={outActions} icon="plus" surface={surface} className="absolute z-10 right-4 top-6 md:right-16 md:top-16" />}
|
|
333
333
|
{/* over a stage the dock floats: the transport's shadow (HomeDockShadow, kol-fxr 2026-10-31) */}
|
|
334
334
|
{chromes.length > 0 && <AppFloatNav variant="dock" shape="pill" shadow={stage != null} surface={surface} items={chromes.map((c) => ({ id: c.label, label: c.label, icon: c.icon, onPress: c.onPress, sub: c.sub }))} sheetItems={dockMore} />}
|
|
335
335
|
{/* the walkthrough over the stage, where the catalog's would sit — on the mark's left line */}
|
package/src/MenuBar.jsx
CHANGED
|
@@ -21,20 +21,22 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
|
21
21
|
* menu capsule 19:10617): the menus on a float sheet (the secondary surface, the window round,
|
|
22
22
|
* 20 in), each trigger the float label role in caps at fg-48 with the spec chevron (`--kol-float-chev-sm`), 12 apart,
|
|
23
23
|
* lit fg-96 while open. The same menus, lists and keys as the bar.
|
|
24
|
+
* `folio`: Folio's editor bar, `menus` and `children` only (see `MenuBarFolio`).
|
|
25
|
+
* `kolbox`: kolbox's bar, the same two props (see `MenuBarKolbox`).
|
|
24
26
|
* @param {string} className
|
|
25
27
|
*
|
|
26
28
|
* A row in `items` (Menu's own row keys): `{ label, onClick, kbd?, disabled?, checked?, indicator?, icon?, tone? }` ·
|
|
27
29
|
* `{ label, items }` a submenu · `{ divider: true }` · `{ heading }` a section label.
|
|
28
30
|
*/
|
|
29
|
-
const ROW = 'kol-menubar-row w-full shrink-0 flex items-center gap-2 h-6 px-2 rounded-[var(--kol-radius-
|
|
31
|
+
const ROW = 'kol-menubar-row w-full shrink-0 flex items-center gap-2 h-6 px-2 rounded-[var(--kol-radius-4)] text-left font-[family-name:var(--kol-font-family-sans)] text-[13px] font-medium leading-normal text-[color:var(--kol-fg-emphasis)] hover:bg-[var(--kol-fg-08)] aria-expanded:bg-[var(--kol-fg-08)] disabled:opacity-40 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:bg-[var(--kol-fg-08)]'
|
|
30
32
|
/* the list: the secondary surface, a 2% rim, 4 in, the large shadow; the key cap on the rim's fill, its ink oq-80 */
|
|
31
|
-
const LIST = 'kol-menubar-list flex flex-col bg-[var(--kol-surface-secondary)] border border-[var(--kol-fg-02)] rounded-[var(--kol-radius-
|
|
33
|
+
const LIST = 'kol-menubar-list flex flex-col bg-[var(--kol-surface-secondary)] border border-[var(--kol-fg-02)] rounded-[var(--kol-radius-4)] p-1 shadow-[0_10px_15px_rgba(0,0,0,0.1)] [&_.kol-menu-kbd]:bg-[var(--kol-fg-02)] [&_.kol-menu-kbd]:border [&_.kol-menu-kbd]:border-[var(--kol-fg-02)] [&_.kol-menu-kbd]:text-[var(--kol-oq-80)] [&_.kol-menu-kbd]:rounded-[2px]'
|
|
32
34
|
/* the capsule's trigger (his 19:9544): Inter 11 caps at fg-48, the chevron 8 after, 26 tall, the text on the top */
|
|
33
35
|
const CAPSULE_TRIGGER = 'kol-menu-btn inline-flex items-start gap-2 h-[26px] p-0 bg-transparent border-0 kol-float-label uppercase whitespace-nowrap text-fg-48 hover:text-(--kol-fg-80) aria-expanded:text-(--kol-fg-96) focus-visible:outline-none focus-visible:text-(--kol-fg-96) [&_svg]:mt-[3px]'
|
|
34
36
|
/* the trigger: 26 tall, 12 in; lit while its menu is open. The line box is the pill (leading 26, not 13): a 13 line box
|
|
35
37
|
* centred in 26 starts on a half pixel, and the glyphs rode it — the label's cap centre on the pill's centre, measured
|
|
36
38
|
* in Chromium and Firefox (±0.5 at 1x is the 9px cap's own rounding). */
|
|
37
|
-
const TRIGGER = 'kol-menu-btn inline-flex items-center h-[26px] px-3 rounded-[var(--kol-radius-
|
|
39
|
+
const TRIGGER = 'kol-menu-btn inline-flex items-center h-[26px] px-3 rounded-[var(--kol-radius-4)] font-[family-name:var(--kol-font-family-sans)] text-[13px] leading-[26px] text-[color:var(--kol-fg-emphasis)] whitespace-nowrap hover:bg-[var(--kol-fg-08)] aria-expanded:bg-[var(--kol-fg-08)] focus-visible:outline-none focus-visible:bg-[var(--kol-fg-08)]'
|
|
38
40
|
|
|
39
41
|
function Rows({ items, width }) {
|
|
40
42
|
return items.map((it, i) => {
|
|
@@ -60,7 +62,58 @@ function Rows({ items, width }) {
|
|
|
60
62
|
})
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
/* `variant="folio"` (Folio migration batch B, 2026-11-22): Folio's editor menu bar (apps/folio EditorChrome `MenuBar`)
|
|
66
|
+
* carried class for class, the chrome in kol-theme `.kol-menubar--folio`: 48 high between two rules, the menus from 42
|
|
67
|
+
* in, `children` (Folio's word: the tools every format has) at the far right. Each trigger is 32 high, lit while its
|
|
68
|
+
* list is open; once one is open, pointing at another opens it; Esc or a press outside closes. The lists are `Menu
|
|
69
|
+
* variant="folio"` under their trigger, in place. `menus` `[{ label, items }]`, Menu's rows. No app name, no `end`. */
|
|
70
|
+
function MenuBarFolio({ menus = [], children }) {
|
|
71
|
+
const [open, setOpen] = useState(null)
|
|
72
|
+
return (
|
|
73
|
+
<div className="kol-menubar--folio flex h-[48px] shrink-0 items-center gap-[2px] border-y pl-[42px] pr-[48px]">
|
|
74
|
+
{menus.map(({ label, items }) => (
|
|
75
|
+
<span key={label} className="relative">
|
|
76
|
+
<button type="button" aria-haspopup="menu" aria-expanded={open === label} onMouseDown={(e) => e.preventDefault()} onClick={() => setOpen(open === label ? null : label)} onMouseEnter={() => open && setOpen(label)}
|
|
77
|
+
className={`kol-menubar-trigger--folio${open === label ? ' is-open' : ''} flex h-[32px] items-center rounded-[4px] px-[14px]`}>{label}</button>
|
|
78
|
+
<Menu variant="folio" open={open === label} onClose={() => setOpen(null)} aria-label={label} items={items} panelClassName="absolute left-0 top-[calc(100%+4px)]" />
|
|
79
|
+
</span>
|
|
80
|
+
))}
|
|
81
|
+
<div className="ml-auto flex items-center gap-[4px]">{children}</div>
|
|
82
|
+
</div>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* `variant="kolbox"` (Folio on kolbox, 2026-11-22): kolbox's own menu bar (round 2, retired from kolbox's top rail in
|
|
87
|
+
* round 3, `_tmp/2026-11-18-menubar/MenuBar.jsx` and its TopRail) carried class for class, the chrome in kol-theme
|
|
88
|
+
* `.kol-menubar--kolbox`: the top rail's 56 on the panel fill, 16 in, the rails' line under it; each trigger the kolbox
|
|
89
|
+
* control height (`--kol-kolbox-ctl`), 8 in, radius 4, the label role in the ink, the field fill on hover and while its
|
|
90
|
+
* list is open. The lists are `Menu variant="kolbox"` dropped from their trigger; once one is open, pointing at another
|
|
91
|
+
* opens it; Escape or a press outside closes. Folio's words, so a host switches by the variant alone: `menus`
|
|
92
|
+
* `[{ label, items }]` (Menu's rows) and `children` at the far right. */
|
|
93
|
+
function MenuBarKolbox({ menus = [], children }) {
|
|
94
|
+
const [open, setOpen] = useState(null)
|
|
95
|
+
const refs = useRef({})
|
|
96
|
+
const current = menus.find((m) => m.label === open)
|
|
97
|
+
return (
|
|
98
|
+
<nav aria-label="Menu bar" className="kol-menubar--kolbox flex h-14 shrink-0 items-center border-b px-4">
|
|
99
|
+
{menus.map(({ label }) => (
|
|
100
|
+
<button key={label} ref={(el) => { refs.current[label] = el }} type="button" aria-haspopup="menu" aria-expanded={open === label}
|
|
101
|
+
onMouseDown={(e) => e.preventDefault()} onClick={() => setOpen((o) => (o === label ? null : label))} onPointerEnter={() => { if (open && open !== label) setOpen(label) }}
|
|
102
|
+
className={`kol-menubar-trigger--kolbox${open === label ? ' is-open' : ''} inline-flex h-(--kol-kolbox-ctl) items-center px-2 outline-none focus-visible:outline-1`}>{label}</button>
|
|
103
|
+
))}
|
|
104
|
+
{current && <Menu key={open} variant="kolbox" aria-label={open} anchor={refs.current[open]} open onClose={() => setOpen(null)} items={current.items} />}
|
|
105
|
+
<div className="ml-auto flex items-center gap-1">{children}</div>
|
|
106
|
+
</nav>
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export default function MenuBar(props) {
|
|
111
|
+
if (props.variant === 'kolbox') return <MenuBarKolbox {...props} />
|
|
112
|
+
if (props.variant === 'folio') return <MenuBarFolio {...props} />
|
|
113
|
+
return <MenuBarOn {...props} />
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function MenuBarOn({ app, menus = [], end = [], variant = 'bar', className = '' }) {
|
|
64
117
|
const capsule = variant === 'capsule'
|
|
65
118
|
const appMenu = typeof app === 'string' ? { label: app } : app
|
|
66
119
|
const all = [...(appMenu ? [{ ...appMenu, app: true }] : []), ...menus, ...end]
|
package/src/PropertyRail.jsx
CHANGED
|
@@ -9,7 +9,7 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
|
9
9
|
* the selected object's line (kol-component's `LayerRow variant="head"`: glyph, name and eye, W8.1) and sections — each a
|
|
10
10
|
* float `LabeledControlSection` (W10.1: the `kol-float-label` head with an optional + or meta over its rows) of rows that
|
|
11
11
|
* kol-component draws: `fields` two-up Inputs float, `select` a Dropdown, `slider` a Slider float with its
|
|
12
|
-
* readout, `switch` a ToggleSwitch float, or `render`. Every labelled row is `LabeledControl
|
|
12
|
+
* readout, `switch` a ToggleSwitch float, or `render`. Every labelled row is `LabeledControl`. Nothing is forked: the sheet is the only new chrome. The
|
|
13
13
|
* exploration's `Floating properties inspector` (kol-float--style 9:9273); the section hairlines stay out (no-borders law).
|
|
14
14
|
* Since 0.123.0 the sheet, header, collapse-v and its pill are kol-component's `RailFloat` (plan-2026-11-12-float-system
|
|
15
15
|
* W4.1) — the one shell NavRail float and ReadingContents draw on too; the body scrolls under the header.
|
|
@@ -77,24 +77,24 @@ function PropertyRailWindow({ title, kind, onCollapseH, onCollapse, onExpand, de
|
|
|
77
77
|
collapsibleV={collapsibleV ?? foldable} collapsedV={collapsedV ?? folded} defaultCollapsedV={defaultCollapsedV ?? defaultFolded} onCollapseV={onCollapseV ?? onFold}
|
|
78
78
|
compact={compact} wide={wide} width={width} surface={surface} className={`kol-property-rail ${className}`.trim()}
|
|
79
79
|
footer={footer && compact ? <div className="pt-4">{footer}</div> : footer}>
|
|
80
|
-
{tabs?.length > 0 && <TabsRow
|
|
80
|
+
{tabs?.length > 0 && <TabsRow size="xs" tabs={tabs} value={tab} onChange={onTab} ariaLabel={`${title} tabs`} />}
|
|
81
81
|
{selected && (
|
|
82
82
|
<LayerRow variant="head" icon={selected.icon} name={selected.name} visible={selected.visible !== false}
|
|
83
83
|
onToggleVisible={selected.onVisible && (() => selected.onVisible(selected.visible === false))} />
|
|
84
84
|
)}
|
|
85
85
|
{sections.map((s, i) => {
|
|
86
|
-
const add = s.onAdd && <Button
|
|
86
|
+
const add = s.onAdd && <Button tone="ghost" size="sm" iconOnly="plus" aria-label={`Add to ${s.label}`} onClick={s.onAdd} />
|
|
87
87
|
const meta = s.meta && <span className="kol-float-timecode text-emphasis">{s.meta}</span>
|
|
88
88
|
/* a collapsible section is LabeledControlSection's own `collapsible`: the title, the meta, the 12 chevron at the head's
|
|
89
89
|
* right end (W10.1). No section pads itself: the space between sections is the body's gap */
|
|
90
90
|
const label = s.collapsible ? <span className="kol-float-panel text-emphasis min-w-0">{s.label}</span> : s.label
|
|
91
91
|
const end = s.collapsible ? (s.meta && <span className="kol-float-timecode text-oq-64">{s.meta}</span>) : (add || meta) && <>{add}{meta}</>
|
|
92
92
|
return (
|
|
93
|
-
<LabeledControlSection key={s.id ?? s.label ?? i}
|
|
93
|
+
<LabeledControlSection key={s.id ?? s.label ?? i} data-section={s.id ?? s.label} label={label} end={end}
|
|
94
94
|
collapsible={!!s.collapsible} open={s.collapsible ? !!s.open : undefined} onToggle={s.onToggle}
|
|
95
95
|
gap={compact ? 2 : 'module'} rowGap={compact ? 2 : 'module'}>
|
|
96
96
|
{groups(s.rows ?? []).map((g, j) => (g.head
|
|
97
|
-
? <LabeledControlSection key={g.head.id ?? `g${j}`}
|
|
97
|
+
? <LabeledControlSection key={g.head.id ?? `g${j}`} label={g.head.label} end={g.head.meta && <span className="kol-float-label text-fg-emphasis">{g.head.meta}</span>}
|
|
98
98
|
gap={compact ? 2 : 'module'} rowGap={compact ? 2 : 'module'}>
|
|
99
99
|
{g.rows.map((r, k) => <Row key={r.id ?? k} row={r} />)}
|
|
100
100
|
</LabeledControlSection>
|
|
@@ -120,7 +120,7 @@ function groups(rows) {
|
|
|
120
120
|
function Row({ row: r }) {
|
|
121
121
|
if (r.type === 'labeled') {
|
|
122
122
|
return (
|
|
123
|
-
<LabeledControl
|
|
123
|
+
<LabeledControl horizontal label={r.label} className="w-full">
|
|
124
124
|
<div className="flex w-full min-w-0 items-center gap-1.5" data-control={r.label}>{r.render()}</div>
|
|
125
125
|
</LabeledControl>
|
|
126
126
|
)
|
|
@@ -130,28 +130,28 @@ function Row({ row: r }) {
|
|
|
130
130
|
return (
|
|
131
131
|
<div className="flex gap-2">
|
|
132
132
|
{r.fields.map((f) => (
|
|
133
|
-
<Input key={f.id}
|
|
133
|
+
<Input key={f.id} size="md" prefix={f.prefix} suffix={f.unit} value={f.value} onChange={(e) => f.onChange?.(e.target.value)} aria-label={f.label ?? f.prefix ?? f.id} className="flex-1 min-w-0" />
|
|
134
134
|
))}
|
|
135
135
|
</div>
|
|
136
136
|
)
|
|
137
137
|
}
|
|
138
138
|
if (r.type === 'select') {
|
|
139
|
-
const dd = <Dropdown
|
|
140
|
-
return r.label ? <LabeledControl
|
|
139
|
+
const dd = <Dropdown size="md" options={r.options} value={r.value} onChange={r.onChange} aria-label={r.label} className="w-full" />
|
|
140
|
+
return r.label ? <LabeledControl label={r.label}>{dd}</LabeledControl> : dd
|
|
141
141
|
}
|
|
142
142
|
if (r.type === 'slider') {
|
|
143
143
|
const shown = r.formatValue ? r.formatValue(r.value) : r.value
|
|
144
144
|
return (
|
|
145
|
-
<LabeledControl
|
|
146
|
-
<Slider
|
|
145
|
+
<LabeledControl label={r.label} hint={shown}>
|
|
146
|
+
<Slider aria-label={r.label} value={r.value} onChange={r.onChange} min={r.min} max={r.max} step={r.step} className="w-full" />
|
|
147
147
|
</LabeledControl>
|
|
148
148
|
)
|
|
149
149
|
}
|
|
150
150
|
if (r.type === 'switch') {
|
|
151
151
|
const label = r.icon ? <span className="inline-flex items-center gap-1.5"><IconLoader name={r.icon} size={16} className="text-oq-96" />{r.label}</span> : r.label
|
|
152
152
|
return (
|
|
153
|
-
<LabeledControl
|
|
154
|
-
<div className="flex w-full justify-end"><ToggleSwitch
|
|
153
|
+
<LabeledControl horizontal label={label}>
|
|
154
|
+
<div className="flex w-full justify-end"><ToggleSwitch checked={!!r.on} onChange={r.onChange} aria-label={r.label} /></div>
|
|
155
155
|
</LabeledControl>
|
|
156
156
|
)
|
|
157
157
|
}
|
|
@@ -19,8 +19,8 @@ export default function RailDisplayControls({ onCollapse, onHide, theme = true,
|
|
|
19
19
|
<div className={`kol-rail-display kol-float-chrome flex flex-col gap-2 ${className}`.trim()}>
|
|
20
20
|
{theme && <ThemeToggle size="sm" fill="none" className="kol-float-label self-start" />}
|
|
21
21
|
<div className="flex items-center gap-1 p-1 rounded-[var(--kol-float-list-r)] bg-[var(--kol-float-well)]">
|
|
22
|
-
<Button
|
|
23
|
-
<Button
|
|
22
|
+
<Button tone="ghost" size="md" iconLeft="panel-left" iconGap={10} className="flex-1 justify-start kol-float-label" onClick={onCollapse}>{collapseLabel}</Button>
|
|
23
|
+
<Button tone="ghost" size="md" iconLeft="hamburger" iconGap={10} className="flex-1 justify-start kol-float-label" onClick={onHide}>{hideLabel}</Button>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
)
|
package/src/RailTrigger.jsx
CHANGED
|
@@ -32,13 +32,13 @@ export default function RailTrigger({ items = [], currentPath = '/', onNavigate,
|
|
|
32
32
|
return (
|
|
33
33
|
<div className={`kol-rail-trigger kol-float-chrome inline-flex items-center gap-4 ${className}`.trim()} style={floatMotion(motion).style}>
|
|
34
34
|
<span ref={popover.refs.setReference} {...popover.getReferenceProps()} className="inline-flex">
|
|
35
|
-
<Button
|
|
35
|
+
<Button size="lg" iconOnly="hamburger" aria-label="Open navigation" aria-haspopup="menu" aria-expanded={open} className={floatSurfaceClass(surface)} />
|
|
36
36
|
</span>
|
|
37
37
|
{breadcrumb && <span className="kol-float-hint text-oq-64">{Array.isArray(breadcrumb) ? breadcrumb.join(' / ') : breadcrumb}</span>}
|
|
38
38
|
<PopoverPanel popover={popover} panel={false} focus={false} motion={motion} className={`${card} w-[280px]`} style={{ maxWidth: 'calc(100vw - 24px)' }}>
|
|
39
39
|
<MenuFloat cardClass={card} onLeaf={pick} title={title}
|
|
40
|
-
titleActions={<Button
|
|
41
|
-
<MenuFloatRows
|
|
40
|
+
titleActions={<Button tone="ghost" size="sm" iconOnly="x" aria-label="Close" onClick={() => setOpen(false)} />}>
|
|
41
|
+
<MenuFloatRows items={items.filter((i) => !i.heading)} active={currentPath} onPick={pick} itemsFirst
|
|
42
42
|
actions={onRestore ? [{ label: 'Show navigation', icon: 'panel-left', restore: true }] : undefined} />
|
|
43
43
|
</MenuFloat>
|
|
44
44
|
</PopoverPanel>
|
package/src/ReaderBar.jsx
CHANGED
|
@@ -23,15 +23,15 @@ export default function ReaderBar({ path, onBack, onContents, onSearch, onBookma
|
|
|
23
23
|
const surf = floatSurfaceClass(surface)
|
|
24
24
|
return (
|
|
25
25
|
<div className={`kol-reader-bar kol-float-chrome flex items-center justify-between gap-4 ${className}`.trim()}>
|
|
26
|
-
<Button
|
|
26
|
+
<Button size="lg" iconLeft="arrow-left" iconGap={12} onClick={onBack} className={`${surf} pr-5`}>
|
|
27
27
|
{Array.isArray(path) ? path.join(' / ') : path}
|
|
28
28
|
</Button>
|
|
29
29
|
<div className="flex items-center gap-3">
|
|
30
|
-
{onContents && <Button
|
|
31
|
-
{onSearch && <Button
|
|
32
|
-
{onBookmark && <Button
|
|
30
|
+
{onContents && <Button size="lg" iconLeft="list-bullet" onClick={onContents} className={surf}>Contents</Button>}
|
|
31
|
+
{onSearch && <Button size="lg" iconOnly="search" aria-label="Search" onClick={onSearch} className={surf} />}
|
|
32
|
+
{onBookmark && <Button size="lg" iconOnly="bookmark" aria-label="Bookmark" pressed={bookmarked} onClick={onBookmark} className={surf} />}
|
|
33
33
|
{onTools && (
|
|
34
|
-
<Button
|
|
34
|
+
<Button size="lg" iconRight="chevron-down" onClick={onTools} className={`${surf} pl-4`}>
|
|
35
35
|
<span className="kol-float-body-lg text-emphasis">Aa</span>
|
|
36
36
|
<span>{toolsLabel}</span>
|
|
37
37
|
</Button>
|
|
@@ -58,15 +58,15 @@ export function ProgressDock({ page = 1, pages = 1, onPrev, onNext, onSeek, form
|
|
|
58
58
|
const pct = pages > 1 ? Math.round(((page - 1) / (pages - 1)) * 100) : 100
|
|
59
59
|
return (
|
|
60
60
|
<div className={`kol-progress-dock kol-float-chrome flex items-center gap-4 h-16 px-2.5 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()} style={{ width }}>
|
|
61
|
-
<Button
|
|
61
|
+
<Button tone="ghost" size="lg" iconOnly="chevron-left" aria-label="Previous page" onClick={onPrev} disabled={page <= 1} />
|
|
62
62
|
<div className="flex-1 min-w-0 flex flex-col gap-1">
|
|
63
63
|
<div className="flex items-center justify-between">
|
|
64
64
|
<span className="kol-float-hint text-emphasis">{formatPage(page, pages)}</span>
|
|
65
65
|
<span className="kol-float-timecode text-oq-64">{pct}%</span>
|
|
66
66
|
</div>
|
|
67
|
-
<Slider
|
|
67
|
+
<Slider readout="none" aria-label="Reading position" min={1} max={pages} step={1} value={page} onChange={onSeek} className="w-full" />
|
|
68
68
|
</div>
|
|
69
|
-
<Button
|
|
69
|
+
<Button tone="ghost" size="lg" iconOnly="chevron-right" aria-label="Next page" onClick={onNext} disabled={page >= pages} />
|
|
70
70
|
</div>
|
|
71
71
|
)
|
|
72
72
|
}
|
package/src/ToolRail.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { Button, Tooltip, MenuPanel, MenuRow, PopoverPanel, usePopover, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
2
|
+
import { Button, ButtonSplit, KbdKeys, Tooltip, MenuPanel, MenuRow, PopoverPanel, usePopover, floatSurfaceClass } from '@kolkrabbi/kol-component'
|
|
3
3
|
import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
4
4
|
|
|
5
5
|
/* taxonomy-ok: molecule — a column of float Buttons, each named by the float Tooltip */
|
|
@@ -25,12 +25,12 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
|
25
25
|
* @param {ReactNode} end after a rule — the dock's hand and undo
|
|
26
26
|
* @param {Object} search `{ onPress, kbd?, label?, pressed? }` — the ⌘K pill at the dock's end, after a rule
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
function ToolRailDefault({ tools = [], value, onChange, surface = 'solid', more, orientation = 'vertical', end, search, className = '' }) {
|
|
29
29
|
const row = orientation === 'horizontal'
|
|
30
30
|
if (more?.length && !row) {
|
|
31
31
|
return (
|
|
32
32
|
<div className={`inline-flex flex-col items-center gap-4 ${className}`.trim()}>
|
|
33
|
-
<
|
|
33
|
+
<ToolRailDefault tools={tools} value={value} onChange={onChange} surface={surface} />
|
|
34
34
|
<ToolMore items={more} surface={surface} />
|
|
35
35
|
</div>
|
|
36
36
|
)
|
|
@@ -41,9 +41,9 @@ export default function ToolRail({ tools = [], value, onChange, surface = 'solid
|
|
|
41
41
|
/* a slot with its own ▾ shows the member armed from it (the dock's Shapes slot reads Ellipse once Ellipse is picked) */
|
|
42
42
|
const shown = t.more?.find((m) => m.id != null && m.id === value) ?? t
|
|
43
43
|
const slot = (
|
|
44
|
-
<Tooltip key={t.id}
|
|
44
|
+
<Tooltip key={t.id} placement={row ? 'top' : 'right'} offset={12} label={shown.label} shortcut={shown.kbd}>
|
|
45
45
|
{/* every slot at full ink, armed or not (his frame 19:6071 — W1.3; the ghost tone's oq-48 read as disabled) */}
|
|
46
|
-
<Button
|
|
46
|
+
<Button tone="ghost" iconOnly={shown.icon} aria-label={shown.label} pressed={shown.id === value || t.id === value}
|
|
47
47
|
onClick={() => (shown.onClick ? shown.onClick() : onChange?.(shown.id))} className="[--kol-tone-fg:var(--kol-oq-96)]" />
|
|
48
48
|
</Tooltip>
|
|
49
49
|
)
|
|
@@ -61,8 +61,8 @@ export default function ToolRail({ tools = [], value, onChange, surface = 'solid
|
|
|
61
61
|
* `kbd: null` (a phone has no ⌘) draws the glyph alone */
|
|
62
62
|
function ToolSearchPill({ onPress, kbd = '⌘K', label = 'Search', pressed }) {
|
|
63
63
|
return (
|
|
64
|
-
<Tooltip
|
|
65
|
-
<Button
|
|
64
|
+
<Tooltip placement="top" offset={12} label={label} shortcut={kbd}>
|
|
65
|
+
<Button tone="ghost" aria-label={label} pressed={pressed} onClick={onPress}
|
|
66
66
|
className={`kol-tool-search gap-2 ${kbd ? 'px-4' : 'px-2.5'} bg-[var(--kol-float-well)] [--kol-tone-fg:var(--kol-oq-96)]`}>
|
|
67
67
|
<IconLoader name="search" size="var(--kol-float-ic)" />
|
|
68
68
|
{kbd && <span className="kol-float-panel">{kbd}</span>}
|
|
@@ -79,12 +79,12 @@ function ToolMore({ items, surface, chevron = false, label = 'More tools', onPic
|
|
|
79
79
|
return (
|
|
80
80
|
<>
|
|
81
81
|
<span ref={pop.refs.setReference} {...pop.getReferenceProps()} className={chevron ? 'inline-flex' : `kol-float-chrome inline-flex rounded-full ${floatSurfaceClass(surface)}`}>
|
|
82
|
-
<Button
|
|
82
|
+
<Button tone="ghost" iconOnly={chevron ? 'chevron-down' : 'more-vertical'} aria-label={label} pressed={open}
|
|
83
83
|
className={chevron ? 'kol-tool-chevron [--kol-tone-fg:var(--kol-oq-64)]' : '[--kol-tone-fg:var(--kol-oq-96)]'} />
|
|
84
84
|
</span>
|
|
85
85
|
{open && (
|
|
86
86
|
<PopoverPanel popover={pop} panel={false} focus={false}>
|
|
87
|
-
<MenuPanel
|
|
87
|
+
<MenuPanel className="min-w-[200px]">
|
|
88
88
|
{items.map((it) => (
|
|
89
89
|
<MenuRow key={it.label} rowClass="kol-menu-row kol-helper-12" kbd={it.kbd} disabled={it.disabled}
|
|
90
90
|
indicator={chevron && it.id != null && it.id === active ? 'dot' : undefined}
|
|
@@ -97,3 +97,80 @@ function ToolMore({ items, surface, chevron = false, label = 'More tools', onPic
|
|
|
97
97
|
</>
|
|
98
98
|
)
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
/* ── kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18) ─────────────────────────────────────────────────
|
|
102
|
+
* kolbox's ToolDock (the file's ToolDock 28:9326, plan 10.8; W19.2), carried from apps/kolbox/src/ui/ToolDock.jsx: the
|
|
103
|
+
* panel fill, radius 12, padding 8, on the one floating surface (`kol-kolbox-surface`). The tools, 4 apart; a rule 1 by
|
|
104
|
+
* 24 between groups; `end` a second group after a rule (kolbox's well; the design draws none, the transport fills it).
|
|
105
|
+
* ToolRail's words: `tools` [{ id, icon, label, kbd, more: [{ id, icon, label, kbd, action }] }] (kolbox's `variants`),
|
|
106
|
+
* `value` a tool's id or one of its `more` ids (the tool shows its current member's glyph), `onChange(id)`. Two more
|
|
107
|
+
* kinds in `tools`, as the real ToolPalette's: `{ divider: true }` and a one-shot `{ id, icon, label, kbd, disabled,
|
|
108
|
+
* onClick }` that is never the armed tool. A tool with `more` is `ButtonSplit variant="kolbox"` in its icon-only form:
|
|
109
|
+
* the tool a tile, its chevron a separate 16 by 32 button 1 beside it, `onVariants(tool, element)` its press (the host
|
|
110
|
+
* opens its own menu), `variantsOpen` the id of the tool whose menu is open (its chevron keeps the quiet fill).
|
|
111
|
+
* `children` replace the tools (the transport's own cells).
|
|
112
|
+
* Under 768 the dock and its end wrap onto a second row. Sizes are Figma's dock as measured 2026-11-20 (W16.3): 48 high,
|
|
113
|
+
* padding 8, a slot 32 square, 8 between a tool's chevron and the next tool. Glyphs are your icons by the set's names at
|
|
114
|
+
* 20 in the full ink (his "bigger icons", R3.4): drawn 14 to 15, Figma's 16 to 17 inside its 24 box. */
|
|
115
|
+
export function ToolRailSlot({ icon, label, kbd, active = false, lit = false, className = '', ...rest }) {
|
|
116
|
+
return (
|
|
117
|
+
<Tooltip variant="kolbox" label={kbd ? <>{label}<KbdKeys variant="kolbox" size="sm" keys={kbd} className="ml-2" /></> : label}>
|
|
118
|
+
<button
|
|
119
|
+
type="button"
|
|
120
|
+
aria-label={label}
|
|
121
|
+
aria-pressed={active || lit}
|
|
122
|
+
data-dock-cell
|
|
123
|
+
className={`kol-tool-slot--kolbox${active ? ' is-active' : lit ? ' is-lit' : ''} inline-flex size-8 shrink-0 items-center justify-center outline-none focus-visible:outline-solid focus-visible:outline-1 ${active || lit ? '' : 'disabled:opacity-40'} ${className}`.trim()}
|
|
124
|
+
{...rest}
|
|
125
|
+
>
|
|
126
|
+
<IconLoader name={icon} size={22} className="kol-kolbox-icon shrink-0" />
|
|
127
|
+
</button>
|
|
128
|
+
</Tooltip>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function ToolRailKolbox({ tools = [], value, onChange, onVariants, variantsOpen, end, children, className = '' }) {
|
|
133
|
+
const rule = (key) => <span key={key} className="kol-tool-rail-rule h-6 w-px shrink-0" />
|
|
134
|
+
return (
|
|
135
|
+
<div data-kol-dock className={`kol-tool-rail--kolbox kol-kolbox-surface inline-flex items-center gap-2 p-2 max-md:max-w-full max-md:flex-wrap max-md:justify-center ${className}`.trim()}>
|
|
136
|
+
<div className="flex items-center gap-2">
|
|
137
|
+
{children ??
|
|
138
|
+
tools.map((t, i) => {
|
|
139
|
+
if (t.divider) return rule(`d${i}`)
|
|
140
|
+
if (t.onClick) return <ToolRailSlot key={t.id} icon={t.icon} label={t.label} kbd={t.kbd} disabled={t.disabled} onClick={t.onClick} />
|
|
141
|
+
const current = t.more?.find((v) => v.id === value)
|
|
142
|
+
const icon = current?.icon ?? t.icon
|
|
143
|
+
const label = current?.label ?? t.label
|
|
144
|
+
const kbd = current ? current.kbd : t.kbd
|
|
145
|
+
const active = value === t.id || !!current
|
|
146
|
+
const arm = () => onChange?.(current?.id ?? t.id)
|
|
147
|
+
if (!t.more?.length) return <ToolRailSlot key={t.id} icon={icon} label={label} kbd={kbd} active={active} onClick={arm} />
|
|
148
|
+
return (
|
|
149
|
+
<ButtonSplit key={t.id} variant="kolbox" iconOnly={icon} aria-label={label} pressed={active} onClick={arm}
|
|
150
|
+
tooltip={kbd ? <>{label}<KbdKeys variant="kolbox" size="sm" keys={kbd} className="ml-2" /></> : label}
|
|
151
|
+
menuLabel={`${t.label} variants`} menuOpen={variantsOpen === t.id} onMenu={(e) => onVariants?.(t, e.currentTarget)} />
|
|
152
|
+
)
|
|
153
|
+
})}
|
|
154
|
+
</div>
|
|
155
|
+
{end && (
|
|
156
|
+
<>
|
|
157
|
+
{rule('end')}
|
|
158
|
+
<div className="flex items-center gap-1 max-md:flex-wrap max-md:justify-center">{end}</div>
|
|
159
|
+
</>
|
|
160
|
+
)}
|
|
161
|
+
</div>
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* ── folio (Folio migration batch D, 2026-11-22) ──────────────────────────────────────────────────────────────────────
|
|
166
|
+
* Folio's toolbar row under the menus (ToolRow), carried from apps/folio's EditorChrome.jsx: 56 high, 56 in, 8 between
|
|
167
|
+
* its tools, a rule under it in Folio's rule ink; a row wider than the window scrolls sideways with no scrollbar. Its
|
|
168
|
+
* tools are the format's own, as `children` (kolbox's word for cells in the dock's place). */
|
|
169
|
+
function ToolRailFolio({ children, className = '' }) {
|
|
170
|
+
return <div className={`kol-tool-rail--folio flex h-[56px] shrink-0 items-center gap-[8px] overflow-x-auto border-b px-[56px] [scrollbar-width:none] ${className}`.trim()}>{children}</div>
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export default function ToolRail(props) {
|
|
174
|
+
if (props.variant === 'folio') return <ToolRailFolio {...props} />
|
|
175
|
+
return props.variant === 'kolbox' ? <ToolRailKolbox {...props} /> : <ToolRailDefault {...props} />
|
|
176
|
+
}
|
package/src/TopControlsBar.jsx
CHANGED
|
@@ -24,12 +24,12 @@ export function PanelsRestore({ label = 'Panels', children, items, surface = 'so
|
|
|
24
24
|
return (
|
|
25
25
|
<>
|
|
26
26
|
<span ref={popover.refs.setReference} {...popover.getReferenceProps()} className="inline-flex">
|
|
27
|
-
<Button
|
|
27
|
+
<Button size="lg" iconRight="chevron-down" aria-haspopup="menu" aria-expanded={open} className={`${floatSurfaceClass(surface)} ${className}`.trim()}>{label}</Button>
|
|
28
28
|
</span>
|
|
29
29
|
<PopoverPanel popover={popover} panel={false} focus={false} className={card} style={{ minWidth: 220, maxWidth: 'calc(100vw - 24px)' }}>
|
|
30
30
|
{children ?? (
|
|
31
31
|
<MenuFloat beside cardClass={card} onLeaf={() => setOpen(false)} title={label}>
|
|
32
|
-
<MenuFloatRows
|
|
32
|
+
<MenuFloatRows actions={items ?? []} onPick={() => setOpen(false)} />
|
|
33
33
|
</MenuFloat>
|
|
34
34
|
)}
|
|
35
35
|
</PopoverPanel>
|
|
@@ -64,8 +64,8 @@ export default function TopControlsBar({ document, tabs, tab, onTab, onSearch, p
|
|
|
64
64
|
<div className="flex-1 flex items-center justify-center gap-4 min-w-0">
|
|
65
65
|
{center ?? (
|
|
66
66
|
<>
|
|
67
|
-
{tabs?.length > 0 && <TabsRow
|
|
68
|
-
{onSearch && <Button
|
|
67
|
+
{tabs?.length > 0 && <TabsRow tabs={tabs} value={tab} onChange={onTab} className={`rounded-full p-1.5 ${floatSurfaceClass(surface)}`} />}
|
|
68
|
+
{onSearch && <Button tone="ghost" size="lg" iconOnly="search" aria-label="Search" onClick={onSearch} className={floatSurfaceClass(surface)} />}
|
|
69
69
|
</>
|
|
70
70
|
)}
|
|
71
71
|
</div>
|
|
@@ -73,8 +73,8 @@ export default function TopControlsBar({ document, tabs, tab, onTab, onSearch, p
|
|
|
73
73
|
{end ?? (
|
|
74
74
|
<>
|
|
75
75
|
{panels && <PanelsRestore {...panels} surface={surface} />}
|
|
76
|
-
{action && <Button
|
|
77
|
-
{menu?.length > 0 && <FloatActionMenu actions={menu} icon="plus"
|
|
76
|
+
{action && <Button size="lg" iconLeft={action.icon ?? 'plus'} onClick={action.onPress}>{action.label}</Button>}
|
|
77
|
+
{menu?.length > 0 && <FloatActionMenu actions={menu} icon="plus" surface={surface} motion={motion} />}
|
|
78
78
|
</>
|
|
79
79
|
)}
|
|
80
80
|
</div>
|
package/src/WorkspaceStrips.jsx
CHANGED
|
@@ -98,9 +98,9 @@ export function FooterStrip({ start, end, className = '' }) {
|
|
|
98
98
|
export function PeriodNav({ label = 'Today', onPrev, onNext, onToday, surface = 'solid', className = '' }) {
|
|
99
99
|
return (
|
|
100
100
|
<div className={`kol-period-nav kol-float-chrome inline-flex items-center h-9 rounded-full ${floatSurfaceClass(surface)} ${className}`.trim()}>
|
|
101
|
-
<Button
|
|
102
|
-
<Button
|
|
103
|
-
<Button
|
|
101
|
+
<Button tone="ghost" size="md" iconOnly="chevron-left" aria-label="Previous" onClick={onPrev} />
|
|
102
|
+
<Button tone="ghost" size="md" onClick={onToday} className="kol-float-hint px-3">{label}</Button>
|
|
103
|
+
<Button tone="ghost" size="md" iconOnly="chevron-right" aria-label="Next" onClick={onNext} />
|
|
104
104
|
</div>
|
|
105
105
|
)
|
|
106
106
|
}
|
package/src/index.js
CHANGED
|
@@ -20,9 +20,9 @@ export { default as AppFloatNav, APP_FLOAT_NAV_VARIANTS } from './AppFloatNav.js
|
|
|
20
20
|
export { default as Timecode } from './Timecode.jsx'
|
|
21
21
|
// THE FLOAT CHROME (float-everything W5 · W9, 2026-11-04 — the gap map's rows 63–81 and 129–144): the editor's and the
|
|
22
22
|
// workspace's chrome on the float tokens, every boxed part on its `surface`. Composed from kol-component's float controls.
|
|
23
|
-
export { default as ToolRail } from './ToolRail.jsx'
|
|
23
|
+
export { default as ToolRail, ToolRailSlot } from './ToolRail.jsx'
|
|
24
24
|
export { default as PropertyRail } from './PropertyRail.jsx'
|
|
25
|
-
export { RailFloat, RailHeader, FloatModule
|
|
25
|
+
export { RailFloat, RailHeader, FloatModule } from '@kolkrabbi/kol-component' // the float Rail shell and its header live in kol-component (NavRail float draws on it)
|
|
26
26
|
export { default as DocumentCapsule } from './DocumentCapsule.jsx'
|
|
27
27
|
export { default as GlobalActions } from './GlobalActions.jsx'
|
|
28
28
|
export { ZoomReadout, SceneBreadcrumb, CanvasHint, SelectionMeasure } from './CanvasReadouts.jsx'
|
|
@@ -37,8 +37,6 @@ export { default as MenuBar } from './MenuBar.jsx'
|
|
|
37
37
|
export { default as RailFlyout } from './RailFlyout.jsx'
|
|
38
38
|
export { default as RailDisplayControls } from './RailDisplayControls.jsx'
|
|
39
39
|
export { AccountFooter, StatusStrip, Breadcrumb, FooterStrip, PeriodNav, DataStatus } from './WorkspaceStrips.jsx'
|
|
40
|
-
// the float page frame, assembled from the chrome above (plan-2026-11-04-float-views W1.1)
|
|
41
|
-
export { default as FloatLayout } from './FloatLayout.jsx'
|
|
42
40
|
export { default as PhoneNav, PHONE_NAV_VARIANTS } from './PhoneNav.jsx'
|
|
43
41
|
export { default as TransportPill } from './TransportPill.jsx'
|
|
44
42
|
export { default as PageShell, PageBleed } from './PageShell.jsx'
|
package/src/FloatLayout.jsx
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { useRef, useState } from 'react'
|
|
2
|
-
import { NavRail, CommandOverlay, useMediaQuery, useRailKeys, floatMotion, useFloatPresence } from '@kolkrabbi/kol-component'
|
|
3
|
-
import TopControlsBar from './TopControlsBar.jsx'
|
|
4
|
-
import RailTrigger from './RailTrigger.jsx'
|
|
5
|
-
import RailFlyout from './RailFlyout.jsx'
|
|
6
|
-
import RailDisplayControls from './RailDisplayControls.jsx'
|
|
7
|
-
|
|
8
|
-
/* taxonomy-ok: module — the float page frame: NavRail float · RailTrigger · RailFlyout · TopControlsBar · PanelsRestore · the inspector slot · the bottom Rail slot */
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* FloatLayout — The float workspace frame (plan-2026-11-04-float-views W1.1 — kol-float--style 9:15449 "Adaptive
|
|
12
|
-
* workspace", its rules 9:15179). Assembled from the float chrome, nothing drawn here: the nav Rail (`NavRail
|
|
13
|
-
* variant="float"`) in three states — `expanded` 264, `collapsed` 72 (a section's rows open beside a slot on hover,
|
|
14
|
-
* RailFlyout), `hidden` 0 (RailTrigger and the breadcrumb take the corner) — the 64 TopControlsBar, the content slot,
|
|
15
|
-
* ONE inspector slot (PropertyRail, 264 on the sheet radius), and a `bottom` Rail under both. 24 round the page and between the Rails, 40 under the bar.
|
|
16
|
-
*
|
|
17
|
-
* Visibility controls space, selection controls content: a hidden Rail is never removed — Panels ▾ (PanelsRestore)
|
|
18
|
-
* shows in the bar exactly while one is hidden and brings it back as it was (the nav at its last width). Below `md` the
|
|
19
|
-
* nav is the trigger and the inspector stacks under the content.
|
|
20
|
-
*
|
|
21
|
-
* @param {Array} nav NavRail float items — `{ heading }` | `{ icon, label, path, count?, sub? }`
|
|
22
|
-
* @param {string} currentPath · {Function} onNavigate `(path) => void`
|
|
23
|
-
* @param {string} [title] · {string} [icon] · {Function} [onSwitch] · {Function} [onSearch] the nav Rail's switcher and search
|
|
24
|
-
* @param {'expanded'|'collapsed'|'hidden'} [rail] the nav Rail's state (controlled); `defaultRail` uncontrolled (default `expanded`) · {Function} [onRailChange]
|
|
25
|
-
* @param {false|Object} [railKeys] `\` expanded ↔ collapsed, `⇧\` hide ↔ show (back to its last width) — kol-component's
|
|
26
|
-
* `useRailKeys`, the same prop on AppShell and SiteLayout; `false` off, `{ collapse, hide }` rebinds
|
|
27
|
-
* @param {'push'|'overlay'} [railMode='push'] `push` lays the rail beside the content (it resizes the page); `overlay` floats it
|
|
28
|
-
* over the content at the frame's 24 inset, so expand, collapse and hide never move the page — the
|
|
29
|
-
* content keeps its full width, the top bar and Panels ⌄ stay where they are, and the hidden
|
|
30
|
-
* state's RailTrigger sits over the bar's start (FloatRailOverlayShadowRestore, 2026-11-04)
|
|
31
|
-
* @param {Array} [defaultExpanded] paths of the nav's sections open at mount (NavRail's own; nothing auto-expands)
|
|
32
|
-
* @param {ReactNode} [railFooter] the expanded Rail's foot (default RailDisplayControls: theme · Collapse · Hide)
|
|
33
|
-
* @param {string|string[]} [breadcrumb] the words beside RailTrigger while the nav is hidden
|
|
34
|
-
* @param {Object} [bar] TopControlsBar's props (`document` · `tabs` · `tab` · `onTab` · `onSearch` · `action` · `menu` · `start` · `center` · `end`); `menu` — `[{ label, icon?, onPress }]` — is FloatActionMenu in the top-right corner; `panels` is the frame's
|
|
35
|
-
* @param {ReactNode} [eyebrow] a line in the 40 under the bar (float-operational W4.2, 9:14340's WORKSPACE / TASKS): 25 under
|
|
36
|
-
* the bar, taking no height, so the content still starts 40 down. Below `md` it sits in flow
|
|
37
|
-
* under the bar
|
|
38
|
-
* @param {ReactNode|Function} [inspector] the one inspector — a node, or `({ hide }) => node` (hand `hide` to PropertyRail's `onCollapse`)
|
|
39
|
-
* @param {ReactNode} [bottom] the bottom Rail (float-operational W1.1, 9:14340's Task index dock + filter capsule): runs under
|
|
40
|
-
* the content AND the inspector, 24 below them, at its own height — the content row takes
|
|
41
|
-
* what is left. Below `md` it scrolls with the content, after the inspector
|
|
42
|
-
* @param {string} [inspectorLabel] its name in Panels ▾ (default "Inspector")
|
|
43
|
-
* @param {boolean} [inspectorHidden] controlled; `defaultInspectorHidden` uncontrolled · {Function} [onInspectorHiddenChange]
|
|
44
|
-
* @param {'solid'|'glass-dark'|'glass-light'} [surface] what the floats are made of (default `solid`)
|
|
45
|
-
* @param {boolean} [panels=true] Panels ⌄ (PanelsRestore) in the bar while a Rail is hidden; `false` drops it — the way back is
|
|
46
|
-
* RailTrigger's "Show navigation" row and `⇧\` (FloatSearchAndPanels, 2026-11-04)
|
|
47
|
-
* @param {Object} [search] CommandOverlay's props (`open` · `onClose` · `results` · `query` · `onQueryChange` · `onSelect` …):
|
|
48
|
-
* the search modal, drawn on this frame's `surface`; the app keeps the data
|
|
49
|
-
* @param {boolean|Object} [motion=true] the float family's motion, handed to every piece (FloatActionStatesAndMotion,
|
|
50
|
-
* 2026-11-04): the nav Rail's expand ↔ collapse (width) and hide ↔ show (the width opens from and
|
|
51
|
-
* closes to 0, fading), RailFlyout and RailTrigger's card in and out, the search modal, and the
|
|
52
|
-
* + and its card. `true` the `--kol-float-*` tokens · `false` none · `{ duration, ease }` per app
|
|
53
|
-
* @param {ReactNode} children the content
|
|
54
|
-
* @param {string} [className]
|
|
55
|
-
*/
|
|
56
|
-
export default function FloatLayout({
|
|
57
|
-
nav = [], currentPath = '', onNavigate, title, icon, onSwitch, onSearch,
|
|
58
|
-
rail, defaultRail = 'expanded', onRailChange, railKeys, railMode = 'push', defaultExpanded, railFooter, breadcrumb,
|
|
59
|
-
bar = {}, eyebrow, inspector, bottom, inspectorLabel = 'Inspector', inspectorHidden, defaultInspectorHidden = false, onInspectorHiddenChange,
|
|
60
|
-
surface = 'solid', panels = true, search, motion = true, children, className = '',
|
|
61
|
-
}) {
|
|
62
|
-
const [ownRail, setOwnRail] = useState(defaultRail)
|
|
63
|
-
const [ownHidden, setOwnHidden] = useState(defaultInspectorHidden)
|
|
64
|
-
const railNow = rail ?? ownRail
|
|
65
|
-
const hidden = inspectorHidden ?? ownHidden
|
|
66
|
-
const lastShown = useRef(railNow === 'hidden' ? 'expanded' : railNow)
|
|
67
|
-
if (railNow !== 'hidden') lastShown.current = railNow
|
|
68
|
-
const setRail = (r) => { if (rail === undefined) setOwnRail(r); onRailChange?.(r) }
|
|
69
|
-
const setHidden = (h) => { if (inspectorHidden === undefined) setOwnHidden(h); onInspectorHiddenChange?.(h) }
|
|
70
|
-
|
|
71
|
-
const phone = useMediaQuery('(max-width: 767px)')
|
|
72
|
-
const shown = phone ? 'hidden' : railNow
|
|
73
|
-
const overlay = railMode === 'overlay'
|
|
74
|
-
const fm = floatMotion(motion)
|
|
75
|
-
/* the rail is held while it hides, so its width closes to 0 instead of the page jumping (FloatActionStatesAndMotion) */
|
|
76
|
-
const railShown = shown !== 'hidden'
|
|
77
|
-
const railPresence = useFloatPresence(railShown, fm.rail)
|
|
78
|
-
const lastRail = useRef(shown)
|
|
79
|
-
if (railShown) lastRail.current = shown
|
|
80
|
-
const railState = railShown ? shown : lastRail.current
|
|
81
|
-
|
|
82
|
-
// the hover flyout: a section's rows beside the 72 Rail, kept open while the pointer is on the slot or the card
|
|
83
|
-
const [fly, setFly] = useState(null)
|
|
84
|
-
/* the last card is kept so RailFlyout can play its leave after `fly` clears */
|
|
85
|
-
const lastFly = useRef(null)
|
|
86
|
-
if (fly) lastFly.current = fly
|
|
87
|
-
const timer = useRef(0)
|
|
88
|
-
const hold = () => clearTimeout(timer.current)
|
|
89
|
-
const drop = () => { hold(); timer.current = setTimeout(() => setFly(null), 160) }
|
|
90
|
-
const onItemHover = (item, el) => {
|
|
91
|
-
if (!item) return drop()
|
|
92
|
-
hold()
|
|
93
|
-
setFly(item.sub?.length ? { item, el } : null)
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* the rail keys (useRailKeys): `\` 264 ↔ 72, `⇧\` hide ↔ show at its last width (`lastShown`) */
|
|
97
|
-
useRailKeys(railKeys, {
|
|
98
|
-
onCollapse: () => { if (railNow !== 'hidden') { setFly(null); setRail(railNow === 'expanded' ? 'collapsed' : 'expanded') } },
|
|
99
|
-
onHide: () => setRail(railNow === 'hidden' ? lastShown.current : 'hidden'),
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
const restore = [
|
|
103
|
-
...(railNow === 'hidden' && !phone ? [{ label: 'Navigation', icon: 'panel-left', onPress: () => setRail(lastShown.current) }] : []),
|
|
104
|
-
...(inspector && hidden ? [{ label: inspectorLabel, icon: 'panel-right', onPress: () => setHidden(false) }] : []),
|
|
105
|
-
]
|
|
106
|
-
const body = typeof inspector === 'function' ? inspector({ hide: () => setHidden(true) }) : inspector
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
<div className={`kol-float-layout relative flex h-dvh gap-6 overflow-hidden bg-surface-primary p-6 max-md:p-4 ${className}`.trim()} style={fm.style}>
|
|
110
|
-
{railPresence.mounted && (
|
|
111
|
-
<NavRail variant="float" items={nav} currentPath={currentPath} onNavigate={onNavigate} motion={motion}
|
|
112
|
-
collapsed={railState === 'collapsed'} onCollapsedChange={(c) => { setFly(null); setRail(c ? 'collapsed' : 'expanded') }}
|
|
113
|
-
title={title} icon={icon} onSwitch={onSwitch} onSearch={onSearch} onHide={() => setRail('hidden')}
|
|
114
|
-
onItemHover={shown === 'collapsed' ? onItemHover : undefined} defaultExpanded={defaultExpanded}
|
|
115
|
-
footer={railState === 'expanded' ? (railFooter ?? <RailDisplayControls onCollapse={() => setRail('collapsed')} onHide={() => setRail('hidden')} />) : undefined}
|
|
116
|
-
className={`${overlay ? 'absolute inset-y-6 left-6 z-[var(--kol-z-sticky)] !h-auto' : 'shrink-0'}${railPresence.entering ? ' is-entering' : ''}${railPresence.exiting ? ' is-exiting' : ''}`} />
|
|
117
|
-
)}
|
|
118
|
-
{shown === 'collapsed' && lastFly.current && (
|
|
119
|
-
<span className="contents" onMouseEnter={hold} onMouseLeave={drop}>
|
|
120
|
-
<RailFlyout icon={lastFly.current.item.icon} title={lastFly.current.item.label} items={lastFly.current.item.sub} active={currentPath}
|
|
121
|
-
anchor={lastFly.current.el} open={!!fly} surface={surface} motion={motion}
|
|
122
|
-
onOpenChange={(o) => { if (!o) setFly(null) }}
|
|
123
|
-
onPick={(i) => { setFly(null); if (i.path) onNavigate?.(i.path) }} />
|
|
124
|
-
</span>
|
|
125
|
-
)}
|
|
126
|
-
<div className="flex min-w-0 flex-1 flex-col gap-10 max-md:gap-6">
|
|
127
|
-
<div className="relative min-w-0 shrink-0">
|
|
128
|
-
<div className="flex min-w-0 items-center gap-4">
|
|
129
|
-
{shown === 'hidden' && <RailTrigger items={nav} currentPath={currentPath} onNavigate={onNavigate} title={title} breadcrumb={phone ? undefined : breadcrumb} surface={surface} motion={motion}
|
|
130
|
-
onRestore={phone ? undefined : () => setRail(lastShown.current)}
|
|
131
|
-
className={overlay && !phone ? 'absolute inset-y-0 left-0 z-[var(--kol-z-sticky)]' : 'shrink-0'} />}
|
|
132
|
-
<TopControlsBar motion={motion} {...bar} panels={panels && restore.length ? { items: restore } : undefined} surface={surface}
|
|
133
|
-
className={`min-w-0 flex-1 max-md:overflow-x-auto max-md:[scrollbar-width:none] ${bar.className ?? ''}`.trim()} />
|
|
134
|
-
</div>
|
|
135
|
-
{eyebrow && <div className="kol-float-layout-eyebrow absolute inset-x-0 top-full pt-[25px] max-md:static max-md:pt-6">{eyebrow}</div>}
|
|
136
|
-
</div>
|
|
137
|
-
<div className="flex min-h-0 flex-1 flex-col gap-6 max-md:overflow-y-auto">
|
|
138
|
-
<div className="flex min-h-0 flex-1 gap-6 max-md:flex-none max-md:flex-col">
|
|
139
|
-
<div className="kol-float-layout-content min-w-0 flex-1 overflow-y-auto max-md:flex-none max-md:overflow-visible">{children}</div>
|
|
140
|
-
{body && !hidden && <aside aria-label={inspectorLabel} className="max-h-full shrink-0 self-start overflow-y-auto [scrollbar-width:none] max-md:max-h-none max-md:self-stretch">{body}</aside>}
|
|
141
|
-
</div>
|
|
142
|
-
{bottom && <div className="kol-float-layout-bottom min-w-0 shrink-0">{bottom}</div>}
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
{search && <CommandOverlay {...search} surface={surface} motion={motion} />}
|
|
146
|
-
</div>
|
|
147
|
-
)
|
|
148
|
-
}
|