@kolkrabbi/kol-component 0.334.0 → 0.336.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/atoms/SectionLabel.jsx +29 -0
- package/src/index.js +25 -0
- package/src/molecules/ContentRow.jsx +30 -1
- package/src/molecules/DocsToc.jsx +16 -1
- package/src/molecules/EmptyState.jsx +15 -1
- package/src/molecules/FlyoutRow.jsx +10 -0
- package/src/molecules/IndexRow.jsx +37 -0
- package/src/molecules/LayerRow.jsx +53 -0
- package/src/molecules/Modal.jsx +58 -19
- package/src/molecules/NoticeBanner.jsx +28 -0
- package/src/molecules/QuantityInput.jsx +7 -3
- package/src/molecules/QuickLookFrame.jsx +31 -27
- package/src/molecules/QuickLookHeader.jsx +60 -0
- package/src/molecules/ReadingActions.jsx +31 -0
- package/src/molecules/ReadingChapterNav.jsx +38 -0
- package/src/molecules/ReadingHighlight.jsx +26 -0
- package/src/molecules/ReadingNotes.jsx +39 -0
- package/src/molecules/ReadingSettings.jsx +53 -0
- package/src/molecules/SectionText.jsx +15 -1
- package/src/molecules/SpecList.jsx +21 -1
- package/src/molecules/SummaryLine.jsx +18 -0
- package/src/molecules/TabsRow.jsx +54 -7
- package/src/molecules/TaskRow.jsx +43 -0
- package/src/molecules/TocRow.jsx +29 -0
- package/src/molecules/TreeRow.jsx +72 -0
- package/src/organisms/CalendarDay.jsx +60 -0
- package/src/organisms/CalendarMonth.jsx +75 -0
- package/src/organisms/CalendarTimeline.jsx +65 -0
- package/src/organisms/CalendarWeek.jsx +72 -0
- package/src/organisms/MediaLibrary.jsx +55 -0
- package/src/organisms/NavDrawer.jsx +67 -0
- package/src/organisms/NavRail.jsx +4 -1
- package/src/organisms/NavRailFloat.jsx +110 -0
- package/src/organisms/ReadingColumn.jsx +42 -0
- package/src/organisms/ReadingContents.jsx +54 -0
- package/src/organisms/ReadingOverview.jsx +60 -0
- package/src/organisms/ReadingPanel.jsx +36 -0
- package/src/organisms/Table.jsx +50 -1
- package/src/organisms/calendarDates.js +24 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TocRow — One entry of a numbered contents list: `01 · First interlude` (float-everything W8 row 121, 2026-11-04 —
|
|
3
|
+
* kol-float--style 48:3582). 32 tall on the list radius, 12 in: the number in mono (`kol-float-ruler`, fg-64, two
|
|
4
|
+
* digits), 16 off it the title in `kol-float-hint`. `current` is where the reader is: the row lifts to fg-16 and the
|
|
5
|
+
* title takes the emphasis ink (`aria-current="location"`); the rest sit at fg-64 and brighten under the pointer.
|
|
6
|
+
* `DocsToc variant="float"` draws its list from these.
|
|
7
|
+
*
|
|
8
|
+
* @param {number|string} [number] padded to two digits when a number
|
|
9
|
+
* @param {ReactNode} label
|
|
10
|
+
* @param {boolean} [current]
|
|
11
|
+
* @param {string} [href]
|
|
12
|
+
* @param {Function} [onClick]
|
|
13
|
+
* @param {string} [className]
|
|
14
|
+
*/
|
|
15
|
+
export default function TocRow({ number, label, current = false, href, onClick, className = '' }) {
|
|
16
|
+
const Tag = href ? 'a' : 'button'
|
|
17
|
+
const n = typeof number === 'number' ? String(number).padStart(2, '0') : number
|
|
18
|
+
return (
|
|
19
|
+
<Tag
|
|
20
|
+
{...(href ? { href } : { type: 'button' })}
|
|
21
|
+
onClick={onClick}
|
|
22
|
+
aria-current={current ? 'location' : undefined}
|
|
23
|
+
className={`group flex h-8 w-full items-center gap-4 rounded-[var(--kol-float-list-r)] px-3 text-left no-underline cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)] ${current ? 'bg-fg-16' : 'hover:bg-fg-08'} ${className}`.trim()}
|
|
24
|
+
>
|
|
25
|
+
{n != null && <span className="kol-float-ruler w-4 shrink-0 tabular-nums text-fg-64">{n}</span>}
|
|
26
|
+
<span className={`kol-float-hint min-w-0 flex-1 truncate ${current ? 'text-fg-emphasis' : 'text-fg-64 group-hover:text-fg-emphasis'}`}>{label}</span>
|
|
27
|
+
</Tag>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: molecule — nests kol-icons's Icon. */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* TreeRow — One row of a float tree: glyph · name · count · chevron. (float-everything W8 rows 120 · 122 · 123,
|
|
7
|
+
* 2026-11-04 — kol-float--style 48:3564 tree row, 48:3606 nav item, 48:3904 flyout row.) The navigation rows of the
|
|
8
|
+
* float are one row at four sizes, so the sidebar, its flyout and the drawer read as one list:
|
|
9
|
+
*
|
|
10
|
+
* xs 26 · glyph 14 · `kol-float-label` (11) — a drawer's child row
|
|
11
|
+
* sm 32 · glyph 15 · `kol-float-hint` (12) — a tree's row, the sidebar's child row
|
|
12
|
+
* md 34 · glyph 16 · `kol-float-hint` (12) — a flyout's destination (`FlyoutRow`)
|
|
13
|
+
* lg 40 · glyph 18 · Inter 13 — the sidebar's nav item
|
|
14
|
+
*
|
|
15
|
+
* On the list radius (`--kol-float-list-r`), 10 in. At rest the name is fg-64 and the glyph oq-64; `active` lifts the
|
|
16
|
+
* row to fg-16 with the emphasis ink (the selection rule — translucent, so glass shows through); `open` is the parent
|
|
17
|
+
* of the active row: the emphasis ink, no lift. `count` sits right in mono (`kol-float-ruler`, fg-64). A row with
|
|
18
|
+
* `expanded` defined draws the chevron at its end — right when shut, down when open — and `onToggle` is its press.
|
|
19
|
+
*
|
|
20
|
+
* @param {'xs'|'sm'|'md'|'lg'} [size='sm']
|
|
21
|
+
* @param {string} [icon]
|
|
22
|
+
* @param {ReactNode} label
|
|
23
|
+
* @param {ReactNode} [count]
|
|
24
|
+
* @param {boolean} [active]
|
|
25
|
+
* @param {boolean} [open] the active row's parent — bright, not lifted
|
|
26
|
+
* @param {boolean} [expanded] defined → the chevron; true = down
|
|
27
|
+
* @param {Function} [onToggle] the chevron's press (else the row's own)
|
|
28
|
+
* @param {number} [depth=0] indent, 16 per level
|
|
29
|
+
* @param {string} [href] renders an anchor
|
|
30
|
+
* @param {Function} [onClick]
|
|
31
|
+
* @param {ReactNode} [trailing] controls at the end (LayerRow's eye and lock)
|
|
32
|
+
* @param {string} [className]
|
|
33
|
+
*/
|
|
34
|
+
export const TREE_ROW = {
|
|
35
|
+
xs: { h: 'h-[26px]', ic: 14, type: 'kol-float-label' },
|
|
36
|
+
sm: { h: 'h-8', ic: 15, type: 'kol-float-hint' },
|
|
37
|
+
md: { h: 'h-[34px]', ic: 16, type: 'kol-float-hint' },
|
|
38
|
+
lg: { h: 'h-10', ic: 18, type: 'font-[family-name:var(--kol-font-family-float)] text-[13px] leading-[18px]' },
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default function TreeRow({ size = 'sm', icon, label, count, active = false, open = false, expanded, onToggle, depth = 0, href, onClick, trailing, className = '', ...rest }) {
|
|
42
|
+
const S = TREE_ROW[size] ?? TREE_ROW.sm
|
|
43
|
+
const bright = active || open
|
|
44
|
+
const Tag = href ? 'a' : 'button'
|
|
45
|
+
const toggle = expanded !== undefined && (
|
|
46
|
+
<span
|
|
47
|
+
role={onToggle ? 'button' : undefined}
|
|
48
|
+
aria-label={onToggle ? (expanded ? 'Collapse' : 'Expand') : undefined}
|
|
49
|
+
onClick={onToggle ? (e) => { e.preventDefault(); e.stopPropagation(); onToggle() } : undefined}
|
|
50
|
+
className="inline-flex shrink-0 text-oq-64"
|
|
51
|
+
>
|
|
52
|
+
<Icon name={expanded ? 'chevron-down' : 'chevron-right'} size={12} />
|
|
53
|
+
</span>
|
|
54
|
+
)
|
|
55
|
+
return (
|
|
56
|
+
<Tag
|
|
57
|
+
{...(href ? { href } : { type: 'button' })}
|
|
58
|
+
onClick={onClick ?? (expanded !== undefined && !href ? onToggle : undefined)}
|
|
59
|
+
aria-current={active ? 'page' : undefined}
|
|
60
|
+
aria-expanded={expanded}
|
|
61
|
+
className={`group flex w-full ${S.h} shrink-0 items-center gap-2.5 rounded-[var(--kol-float-list-r)] pr-2.5 text-left no-underline cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)] ${active ? 'bg-fg-16' : 'hover:bg-fg-08'} ${className}`.trim()}
|
|
62
|
+
style={{ paddingLeft: 10 + depth * 16 }}
|
|
63
|
+
{...rest}
|
|
64
|
+
>
|
|
65
|
+
{icon && <Icon name={icon} size={S.ic} className={`shrink-0 ${bright ? 'text-oq-96' : 'text-oq-64 group-hover:text-oq-96'}`} />}
|
|
66
|
+
<span className={`${S.type} min-w-0 flex-1 truncate ${bright ? 'text-fg-emphasis' : 'text-fg-64 group-hover:text-fg-emphasis'}`}>{label}</span>
|
|
67
|
+
{count != null && <span className="kol-float-ruler shrink-0 tabular-nums text-fg-64">{count}</span>}
|
|
68
|
+
{trailing}
|
|
69
|
+
{toggle}
|
|
70
|
+
</Tag>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { toHours } from './calendarDates.js'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: organism — a whole calendar region: the all-day lane over the hours */
|
|
4
|
+
|
|
5
|
+
const HOUR = 25
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* CalendarDay — One day: what lasts all of it, then the hours. `All day · 07:00 … 19:00` (float-everything W11 row
|
|
9
|
+
* 161, 2026-11-04 — kol-float--style W2.11 `Day calendar`). On the page ground at the sheet radius: a 62 all-day lane
|
|
10
|
+
* (`All day` in `kol-float-label`, fg-64, 18 in; each all-day item a 32 bar on fg-16, radius 8, its label in
|
|
11
|
+
* `kol-float-hint`), then one 25 row per hour with the time in `kol-float-ruler` in a 110 gutter. A timed event is an
|
|
12
|
+
* fg-16 block across the lane from its start to its end; `now` draws a 1px line of the ink across the lane with
|
|
13
|
+
* `nowLabel` over its end. No gridlines (no-borders law) — the gutter's times are the scale.
|
|
14
|
+
*
|
|
15
|
+
* @param {Array} [allDay] `[{ label }]`
|
|
16
|
+
* @param {Array} [events] `[{ start: 'HH:MM', end: 'HH:MM', label }]`
|
|
17
|
+
* @param {number} [from] first hour shown (default 7)
|
|
18
|
+
* @param {number} [to] last hour shown (default 19)
|
|
19
|
+
* @param {string} [now] `HH:MM` — the current-time line; unset, none
|
|
20
|
+
* @param {string} [nowLabel] default `Today`
|
|
21
|
+
* @param {string} [allDayLabel] default `All day`
|
|
22
|
+
* @param {string} [className]
|
|
23
|
+
*/
|
|
24
|
+
export default function CalendarDay({ allDay = [], events = [], from = 7, to = 19, now, nowLabel = 'Today', allDayLabel = 'All day', className = '' }) {
|
|
25
|
+
const hours = Array.from({ length: to - from + 1 }, (_, i) => from + i)
|
|
26
|
+
const y = (t) => (toHours(t) - from) * HOUR + 4
|
|
27
|
+
const nowY = now != null ? y(now) : null
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={`overflow-hidden rounded-[var(--kol-float-menu-r)] bg-surface-primary pb-1 ${className}`.trim()}>
|
|
31
|
+
<div className="flex min-h-[62px] items-center gap-4 pl-[18px] pr-[18px]">
|
|
32
|
+
<span className="kol-float-label w-[76px] shrink-0 text-fg-64">{allDayLabel}</span>
|
|
33
|
+
<div className="flex min-w-0 flex-1 flex-col gap-1 py-[15px]">
|
|
34
|
+
{allDay.map((a, i) => (
|
|
35
|
+
<span key={i} className="kol-float-hint flex h-8 items-center truncate rounded-[var(--kol-float-list-r)] bg-fg-16 px-4 text-fg-emphasis">{a.label}</span>
|
|
36
|
+
))}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div className="relative" style={{ height: hours.length * HOUR + 4 }}>
|
|
40
|
+
{hours.map((h, i) => (
|
|
41
|
+
<span key={h} className="kol-float-ruler absolute left-[18px] tabular-nums text-fg-64" style={{ top: i * HOUR + 5 }}>
|
|
42
|
+
{String(h).padStart(2, '0')}:00
|
|
43
|
+
</span>
|
|
44
|
+
))}
|
|
45
|
+
{events.map((e, i) => (
|
|
46
|
+
<span key={i} className="kol-float-label absolute left-[110px] right-[18px] flex items-start overflow-hidden rounded-[var(--kol-float-list-r)] bg-fg-16 px-3 py-1 text-fg-emphasis"
|
|
47
|
+
style={{ top: y(e.start), height: Math.max(HOUR - 2, y(e.end) - y(e.start) - 2) }}>
|
|
48
|
+
<span className="truncate">{e.label}</span>
|
|
49
|
+
</span>
|
|
50
|
+
))}
|
|
51
|
+
{nowY != null && (
|
|
52
|
+
<>
|
|
53
|
+
<span className="kol-float-label absolute right-[30px] text-fg-emphasis" style={{ top: nowY - 18 }}>{nowLabel}</span>
|
|
54
|
+
<span className="absolute left-[110px] right-[18px] h-px bg-[var(--kol-surface-on-primary)]" style={{ top: nowY }} />
|
|
55
|
+
</>
|
|
56
|
+
)}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { toDate, addDays, sameDay, weekStart, daysBetween, WEEKDAYS } from './calendarDates.js'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: organism — a whole calendar region: weekday head, six week rows, event bars */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CalendarMonth — A month as a grid of weeks, with what runs across them. `MON … SUN` over six rows (float-everything
|
|
7
|
+
* W11 row 159, 2026-11-04 — kol-float--style W2.11 `Month calendar`). On the page ground (`bg-surface-primary`) at the
|
|
8
|
+
* sheet radius: a 40 head of weekdays in `kol-float-ruler` (fg-64), then one 60 row per week — the date in mono 11
|
|
9
|
+
* at 16 in (fg-64; outside the month fg-40), today on a 25 disc of the ink, Saturday and Sunday on fg-02. An event is a
|
|
10
|
+
* 16 bar on fg-16 (radius 4, 8 in from its cells) with its label in Inter 10, split at each week's edge and labelled
|
|
11
|
+
* again where it resumes. No gridlines (the no-borders law): the columns read by alignment and the weekend tint.
|
|
12
|
+
*
|
|
13
|
+
* @param {string|Date} month any day of the month to show (`2026-11` or `2026-11-03`)
|
|
14
|
+
* @param {string|Date} [today] lit on the disc
|
|
15
|
+
* @param {Array} [events] `[{ start, end?, label }]` — dates as `YYYY-MM-DD`; `end` inclusive, default `start`
|
|
16
|
+
* @param {string[]} [weekdays] the head's words (default Mon … Sun)
|
|
17
|
+
* @param {Function} [onSelect] `(date: Date) => void` — a day pressed
|
|
18
|
+
* @param {string} [className]
|
|
19
|
+
*/
|
|
20
|
+
export default function CalendarMonth({ month, today, events = [], weekdays = WEEKDAYS, onSelect, className = '' }) {
|
|
21
|
+
const m = toDate(String(month).length === 7 ? `${month}-01` : month)
|
|
22
|
+
const first = new Date(m.getFullYear(), m.getMonth(), 1)
|
|
23
|
+
const last = new Date(m.getFullYear(), m.getMonth() + 1, 0)
|
|
24
|
+
const t = today ? toDate(today) : null
|
|
25
|
+
const weeks = []
|
|
26
|
+
for (let ws = weekStart(first); ws <= last; ws = addDays(ws, 7)) weeks.push(ws)
|
|
27
|
+
const evs = events.map((e) => ({ ...e, s: toDate(e.start), e: toDate(e.end ?? e.start) }))
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={`overflow-hidden rounded-[var(--kol-float-menu-r)] bg-surface-primary ${className}`.trim()}>
|
|
31
|
+
<div className="grid h-10 grid-cols-7 items-center">
|
|
32
|
+
{weekdays.map((d) => <span key={d} className="kol-float-ruler px-4 uppercase text-fg-64">{d}</span>)}
|
|
33
|
+
</div>
|
|
34
|
+
{weeks.map((ws) => {
|
|
35
|
+
const we = addDays(ws, 6)
|
|
36
|
+
const bars = evs.filter((e) => e.s <= we && e.e >= ws).map((e) => {
|
|
37
|
+
const a = Math.max(0, daysBetween(ws, e.s))
|
|
38
|
+
const b = Math.min(6, daysBetween(ws, e.e))
|
|
39
|
+
return { label: e.label, a, b }
|
|
40
|
+
})
|
|
41
|
+
/* lanes: a bar takes the first lane whose last bar ended before it starts */
|
|
42
|
+
const ends = []
|
|
43
|
+
for (const bar of bars) {
|
|
44
|
+
bar.lane = ends.findIndex((end) => end < bar.a)
|
|
45
|
+
if (bar.lane < 0) bar.lane = ends.length
|
|
46
|
+
ends[bar.lane] = bar.b
|
|
47
|
+
}
|
|
48
|
+
return (
|
|
49
|
+
<div key={ws.toISOString()} className="relative grid grid-cols-7" style={{ minHeight: Math.max(60, 38 + ends.length * 20 + 2) }}>
|
|
50
|
+
{Array.from({ length: 7 }, (_, i) => {
|
|
51
|
+
const day = addDays(ws, i)
|
|
52
|
+
const isToday = sameDay(day, t)
|
|
53
|
+
const out = day.getMonth() !== m.getMonth()
|
|
54
|
+
const Cell = onSelect ? 'button' : 'div'
|
|
55
|
+
return (
|
|
56
|
+
<Cell key={i} {...(onSelect ? { type: 'button', onClick: () => onSelect(day) } : {})}
|
|
57
|
+
className={`flex items-start px-4 pt-[9px] text-left ${i >= 5 ? 'bg-fg-02' : ''} ${onSelect ? 'cursor-pointer hover:bg-fg-04 focus-visible:outline-none focus-visible:shadow-[inset_var(--kol-float-focus)]' : ''}`.trim()}>
|
|
58
|
+
<span className={`kol-float-ruler inline-flex h-[25px] min-w-[25px] items-center justify-center rounded-full text-[11px] tabular-nums ${isToday ? '-ml-[7px] bg-[var(--kol-surface-on-primary)] text-[var(--kol-surface-primary)]' : out ? 'text-fg-40 justify-start' : 'text-fg-64 justify-start'}`}>
|
|
59
|
+
{day.getDate()}
|
|
60
|
+
</span>
|
|
61
|
+
</Cell>
|
|
62
|
+
)
|
|
63
|
+
})}
|
|
64
|
+
{bars.map((b, i) => (
|
|
65
|
+
<span key={i} className="kol-float-label pointer-events-none absolute flex h-4 items-center truncate rounded-[4px] bg-fg-16 px-2 text-[10px] leading-none text-fg-emphasis"
|
|
66
|
+
style={{ top: 38 + b.lane * 20, left: `calc(${(b.a / 7) * 100}% + 8px)`, width: `calc(${((b.b - b.a + 1) / 7) * 100}% - 16px)` }}>
|
|
67
|
+
{b.label}
|
|
68
|
+
</span>
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
)
|
|
72
|
+
})}
|
|
73
|
+
</div>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { toDate } from './calendarDates.js'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: organism — a whole calendar region: month head, phase rows, today line */
|
|
4
|
+
|
|
5
|
+
const MONTHS_SHORT = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* CalendarTimeline — A year of phases on one scale. `PHASE · Jan … Dec`, one row per phase (float-everything W11 row
|
|
9
|
+
* 158, 2026-11-04 — kol-float--style W2.11 `Timeline calendar`). On the page ground at the sheet radius: a 44 head
|
|
10
|
+
* (`label` in `kol-float-ruler` over a 172 gutter, the months in `kol-float-label`, fg-64, 11 into each column), then
|
|
11
|
+
* one 26 row per phase — its name in the gutter (`kol-float-label`, fg-64) and its bar on fg-16 (18 tall, radius 6,
|
|
12
|
+
* 4 in from its ends) placed by its dates. An `emphasis` row is the span itself: its name in `kol-float-hint` on the
|
|
13
|
+
* emphasis ink, a 7 bar on fg-64. `today` draws a 1px line of the ink down the rows. Month columns are equal; a date
|
|
14
|
+
* lands by its day within its month. No gridlines (no-borders law).
|
|
15
|
+
*
|
|
16
|
+
* @param {number} [year] the year shown (default `today`'s, else this year)
|
|
17
|
+
* @param {Array} rows `[{ label, start, end, emphasis? }]` — dates as `YYYY-MM-DD`, `end` inclusive
|
|
18
|
+
* @param {string|Date} [today]
|
|
19
|
+
* @param {string} [label] the gutter's head (default `Phase`)
|
|
20
|
+
* @param {string[]} [months] the head's words (default Jan … Dec)
|
|
21
|
+
* @param {string} [className]
|
|
22
|
+
*/
|
|
23
|
+
export default function CalendarTimeline({ year, rows = [], today, label = 'Phase', months = MONTHS_SHORT, className = '' }) {
|
|
24
|
+
const t = today ? toDate(today) : null
|
|
25
|
+
const yr = year ?? (t ?? new Date()).getFullYear()
|
|
26
|
+
/* a date as a share of the year: month index + the day within it, over 12 equal columns */
|
|
27
|
+
const at = (d, end = false) => {
|
|
28
|
+
if (d.getFullYear() < yr) return 0
|
|
29
|
+
if (d.getFullYear() > yr) return 1
|
|
30
|
+
const dim = new Date(yr, d.getMonth() + 1, 0).getDate()
|
|
31
|
+
return (d.getMonth() + (d.getDate() - (end ? 0 : 1)) / dim) / 12
|
|
32
|
+
}
|
|
33
|
+
const pct = (f) => `${f * 100}%`
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div className={`overflow-hidden rounded-[var(--kol-float-menu-r)] bg-surface-primary pb-3 ${className}`.trim()}>
|
|
37
|
+
<div className="flex h-11 items-center">
|
|
38
|
+
<span className="kol-float-ruler w-[172px] shrink-0 pl-5 uppercase text-fg-64">{label}</span>
|
|
39
|
+
<div className="grid flex-1 grid-cols-12">
|
|
40
|
+
{months.map((m) => <span key={m} className="kol-float-label pl-[11px] text-fg-64">{m}</span>)}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div className="relative flex flex-col">
|
|
44
|
+
{rows.map((r, i) => {
|
|
45
|
+
const a = at(toDate(r.start))
|
|
46
|
+
const b = at(toDate(r.end ?? r.start), true)
|
|
47
|
+
return (
|
|
48
|
+
<div key={i} className="flex h-[26px] items-center">
|
|
49
|
+
<span className={`w-[172px] shrink-0 truncate pl-5 ${r.emphasis ? 'kol-float-hint text-fg-emphasis' : 'kol-float-label text-fg-64'}`}>{r.label}</span>
|
|
50
|
+
<div className="relative h-full flex-1">
|
|
51
|
+
<span className={`absolute top-1/2 -translate-y-1/2 ${r.emphasis ? 'h-[7px] rounded-[4px] bg-fg-64' : 'h-[18px] rounded-[6px] bg-fg-16'}`}
|
|
52
|
+
style={{ left: `calc(${pct(a)} + 4px)`, width: `calc(${pct(b - a)} - 8px)` }} />
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
})}
|
|
57
|
+
{t && t.getFullYear() === yr && (
|
|
58
|
+
<span className="pointer-events-none absolute inset-y-0 left-[172px] right-0">
|
|
59
|
+
<span className="absolute inset-y-0 w-px bg-[var(--kol-surface-on-primary)]" style={{ left: pct(at(t)) }} />
|
|
60
|
+
</span>
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { toDate, addDays, sameDay, weekStart, WEEKDAYS } from './calendarDates.js'
|
|
2
|
+
|
|
3
|
+
/* taxonomy-ok: organism — a whole calendar region: seven day columns and the running list */
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* CalendarWeek — A week as seven columns, and what runs through it. `MON 2 … SUN 8` (float-everything W11 row 160,
|
|
7
|
+
* 2026-11-04 — kol-float--style W2.11 `Week calendar`). On the page ground at the sheet radius: each column 20 in, the
|
|
8
|
+
* weekday in `kol-float-ruler` (fg-64), the date in Inter 17 under it (today on a 32 disc of the ink), the day's events
|
|
9
|
+
* as fg-16 chips on the list radius; Saturday and Sunday on fg-02. With no events, `empty` sits along the columns'
|
|
10
|
+
* foot. Under them, `running` — the phases that span the week — under its mono label: each a 92 card on
|
|
11
|
+
* `surface-secondary` (radius 16) with a 7 × 38 marker in fg-64, the name in `kol-float-body-lg`, its meta in mono, the
|
|
12
|
+
* range at the end. No gridlines (no-borders law).
|
|
13
|
+
*
|
|
14
|
+
* @param {string|Date} week any day of the week to show
|
|
15
|
+
* @param {string|Date} [today]
|
|
16
|
+
* @param {Array} [events] `[{ date, label, time? }]`
|
|
17
|
+
* @param {ReactNode} [empty] the line when no event shows
|
|
18
|
+
* @param {Array} [running] `[{ label, meta?, range? }]`
|
|
19
|
+
* @param {string} [runningLabel] default `Running this week`
|
|
20
|
+
* @param {string[]} [weekdays]
|
|
21
|
+
* @param {Function} [onSelect] `(date: Date) => void`
|
|
22
|
+
* @param {string} [className]
|
|
23
|
+
*/
|
|
24
|
+
export default function CalendarWeek({ week, today, events = [], empty, running = [], runningLabel = 'Running this week', weekdays = WEEKDAYS, onSelect, className = '' }) {
|
|
25
|
+
const ws = weekStart(toDate(week))
|
|
26
|
+
const t = today ? toDate(today) : null
|
|
27
|
+
const days = Array.from({ length: 7 }, (_, i) => addDays(ws, i))
|
|
28
|
+
const evs = events.map((e) => ({ ...e, d: toDate(e.date) }))
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className={`overflow-hidden rounded-[var(--kol-float-menu-r)] bg-surface-primary ${className}`.trim()}>
|
|
32
|
+
<div className="relative grid h-[213px] grid-cols-7">
|
|
33
|
+
{days.map((day, i) => {
|
|
34
|
+
const isToday = sameDay(day, t)
|
|
35
|
+
const list = evs.filter((e) => sameDay(e.d, day))
|
|
36
|
+
const Cell = onSelect ? 'button' : 'div'
|
|
37
|
+
return (
|
|
38
|
+
<Cell key={i} {...(onSelect ? { type: 'button', onClick: () => onSelect(day) } : {})}
|
|
39
|
+
className={`flex min-w-0 flex-col items-start gap-1.5 px-5 pt-5 text-left ${i >= 5 ? 'bg-fg-02' : ''} ${onSelect ? 'cursor-pointer focus-visible:outline-none focus-visible:shadow-[inset_var(--kol-float-focus)]' : ''}`.trim()}>
|
|
40
|
+
<span className="kol-float-ruler uppercase text-fg-64">{weekdays[i]}</span>
|
|
41
|
+
<span className={`inline-flex h-8 min-w-8 items-center justify-center rounded-full font-[family-name:var(--kol-font-family-float)] text-[17px] tabular-nums ${isToday ? '-ml-[9px] bg-[var(--kol-surface-on-primary)] text-[var(--kol-surface-primary)]' : 'justify-start text-fg-emphasis'}`}>
|
|
42
|
+
{day.getDate()}
|
|
43
|
+
</span>
|
|
44
|
+
{list.map((e, k) => (
|
|
45
|
+
<span key={k} className="kol-float-label flex w-full min-w-0 flex-col rounded-[var(--kol-float-list-r)] bg-fg-16 px-2 py-1 text-fg-emphasis">
|
|
46
|
+
{e.time && <span className="kol-float-ruler text-fg-64">{e.time}</span>}
|
|
47
|
+
<span className="truncate">{e.label}</span>
|
|
48
|
+
</span>
|
|
49
|
+
))}
|
|
50
|
+
</Cell>
|
|
51
|
+
)
|
|
52
|
+
})}
|
|
53
|
+
{empty && evs.length === 0 && <span className="kol-float-hint pointer-events-none absolute bottom-5 left-6 text-fg-64">{empty}</span>}
|
|
54
|
+
</div>
|
|
55
|
+
{running.length > 0 && (
|
|
56
|
+
<div className="flex flex-col gap-4 px-6 pb-6 pt-8">
|
|
57
|
+
<span className="kol-float-ruler uppercase text-fg-64">{runningLabel}</span>
|
|
58
|
+
{running.map((r, i) => (
|
|
59
|
+
<div key={i} className="flex h-[92px] items-center gap-4 rounded-2xl bg-surface-secondary px-5">
|
|
60
|
+
<span className="h-[38px] w-[7px] shrink-0 rounded-[4px] bg-fg-64" />
|
|
61
|
+
<span className="flex min-w-0 flex-1 flex-col gap-1">
|
|
62
|
+
<span className="kol-float-body-lg truncate text-fg-emphasis">{r.label}</span>
|
|
63
|
+
{r.meta && <span className="kol-float-ruler text-fg-64">{r.meta}</span>}
|
|
64
|
+
</span>
|
|
65
|
+
{r.range && <span className="kol-float-timecode shrink-0 text-fg-64">{r.range}</span>}
|
|
66
|
+
</div>
|
|
67
|
+
))}
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
</div>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
@@ -6,6 +6,7 @@ import Divider from '../atoms/Divider.jsx'
|
|
|
6
6
|
import Dropdown from '../molecules/Dropdown.jsx'
|
|
7
7
|
import Input from '../atoms/Input.jsx'
|
|
8
8
|
import ViewToggle from '../atoms/ViewToggle.jsx'
|
|
9
|
+
import SearchInput from '../molecules/SearchInput.jsx'
|
|
9
10
|
import FullscreenOverlay from '../utilities/FullscreenOverlay.jsx'
|
|
10
11
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
11
12
|
import MediaTile from '../molecules/MediaTile.jsx'
|
|
@@ -1049,6 +1050,14 @@ function PickerShell({ onClose, onPick }) {
|
|
|
1049
1050
|
* @param {boolean} flat start in flat mode
|
|
1050
1051
|
* @param {Function} onClose modal only — Esc, backdrop, close button
|
|
1051
1052
|
* @param {Function} onSelect `(url, { contentType, kind })`. In `modal` it also closes.
|
|
1053
|
+
*
|
|
1054
|
+
* `float` (float-everything W6 row 87, 2026-11-04 — kol-float--style 46:2960): the asset window — a 310 float panel,
|
|
1055
|
+
* non-modal (no scrim, the scene stays live), `kol-float-solid` on the sheet radius, 20 in. The title in
|
|
1056
|
+
* `kol-float-window` with the × · a float SearchInput · the files as rows (a 44 × 54 cover on 6, the name in Inter 13,
|
|
1057
|
+
* `ext · size` in mono 10, a check on the picked one) — a press picks (`onSelect`) · `onImport` draws `+ Import`
|
|
1058
|
+
* (a float button, secondary) beside the count. Same `open` · `client` · `accept` · `onClose` · `onSelect` as `modal`.
|
|
1059
|
+
* @param {string} title float: the window's title (default `Assets`)
|
|
1060
|
+
* @param {Function} onImport float: shows the import button · {string} importLabel (default `Import`)
|
|
1052
1061
|
*/
|
|
1053
1062
|
export default function MediaLibrary({
|
|
1054
1063
|
variant = 'page',
|
|
@@ -1063,6 +1072,7 @@ export default function MediaLibrary({
|
|
|
1063
1072
|
...pageProps
|
|
1064
1073
|
}) {
|
|
1065
1074
|
const opts = { client, accept, pageSize, defaultSort, flat }
|
|
1075
|
+
if (variant === 'float') return open ? withProvider(<FloatPicker onClose={onClose} onPick={onSelect} {...pageProps} />, opts) : null
|
|
1066
1076
|
if (variant === 'modal') {
|
|
1067
1077
|
if (!open) return null
|
|
1068
1078
|
return withProvider(<PickerShell onClose={onClose} onPick={onSelect} />, opts)
|
|
@@ -1139,6 +1149,51 @@ function PickerBrowse({ client, accept, onClose, onSelect, title = 'MEDIA', ...b
|
|
|
1139
1149
|
)
|
|
1140
1150
|
}
|
|
1141
1151
|
|
|
1152
|
+
/* THE ASSET WINDOW (`variant="float"`, W6 row 87) — read-only, a picker: rows from the provider, the search its own */
|
|
1153
|
+
function FloatPicker({ onClose, onPick, onImport, importLabel = 'Import', title = 'Assets', className = '' }) {
|
|
1154
|
+
const { sorted, search, setSearch, mediaUrl, loading, error } = useMediaLibrary()
|
|
1155
|
+
const [picked, setPicked] = useState(null)
|
|
1156
|
+
const files = sorted.filter((o) => o.type !== 'folder')
|
|
1157
|
+
const pick = (o) => { setPicked(o.key); onPick?.(mediaUrl(o.fullKey ?? o.key), { contentType: o.contentType, kind: o.kind }) }
|
|
1158
|
+
return (
|
|
1159
|
+
<section role="dialog" aria-label={title} className={`kol-float-solid flex w-[310px] max-w-full flex-col gap-4 rounded-[var(--kol-float-menu-r)] p-5 ${className}`.trim()}>
|
|
1160
|
+
<div className="flex items-center gap-3">
|
|
1161
|
+
<span className="kol-float-window min-w-0 flex-1 truncate text-fg-emphasis">{title}</span>
|
|
1162
|
+
{onClose && (
|
|
1163
|
+
<button type="button" aria-label="Close" onClick={onClose} className="inline-flex size-6 shrink-0 items-center justify-center rounded-full text-oq-64 hover:bg-fg-08 hover:text-oq-96 cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]">
|
|
1164
|
+
<Icon name="x" size={16} />
|
|
1165
|
+
</button>
|
|
1166
|
+
)}
|
|
1167
|
+
</div>
|
|
1168
|
+
<SearchInput variant="float" value={search ?? ''} onChange={(e) => setSearch(e.target.value)} placeholder="Search assets…" />
|
|
1169
|
+
<ul className="m-0 flex max-h-[320px] list-none flex-col gap-1 overflow-y-auto p-0 [scrollbar-width:none]">
|
|
1170
|
+
{error && <li className="kol-float-hint text-ui-error">Couldn’t load: {error}</li>}
|
|
1171
|
+
{!error && loading && <li className="kol-float-hint text-fg-64">Loading…</li>}
|
|
1172
|
+
{!error && !loading && files.length === 0 && <li className="kol-float-hint text-fg-64">Nothing here.</li>}
|
|
1173
|
+
{files.map((o) => (
|
|
1174
|
+
<li key={o.key}>
|
|
1175
|
+
<button type="button" onClick={() => pick(o)} aria-pressed={picked === o.key}
|
|
1176
|
+
className={`flex w-full items-center gap-3 rounded-[var(--kol-float-list-r)] p-1 text-left cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)] ${picked === o.key ? 'bg-fg-16' : 'hover:bg-fg-08'}`}>
|
|
1177
|
+
<span className="h-[54px] w-11 shrink-0 overflow-hidden rounded-md bg-fg-08"><Thumb row={o} mediaUrl={mediaUrl} /></span>
|
|
1178
|
+
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
|
|
1179
|
+
<span className="kol-float-hint truncate text-fg-emphasis" style={{ fontSize: 13 }}>{o.displayKey}</span>
|
|
1180
|
+
<span className="kol-float-ruler truncate uppercase text-fg-64">{[o.key.split('.').pop(), formatSize(o.size)].filter(Boolean).join(' · ')}</span>
|
|
1181
|
+
</span>
|
|
1182
|
+
{picked === o.key && <Icon name="check" size={14} className="mr-2 shrink-0 text-oq-96" />}
|
|
1183
|
+
</button>
|
|
1184
|
+
</li>
|
|
1185
|
+
))}
|
|
1186
|
+
</ul>
|
|
1187
|
+
{(onImport || files.length > 0) && (
|
|
1188
|
+
<div className="flex items-center gap-3">
|
|
1189
|
+
{onImport && <Button variant="float" tone="secondary" size="md" iconLeft="plus" onClick={onImport}>{importLabel}</Button>}
|
|
1190
|
+
<span className="kol-float-label text-fg-64">{files.length} {files.length === 1 ? 'asset' : 'assets'}</span>
|
|
1191
|
+
</div>
|
|
1192
|
+
)}
|
|
1193
|
+
</section>
|
|
1194
|
+
)
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1142
1197
|
/** @deprecated 2026-08-01 — alias of `MediaLibrary variant="modal"`. Kept so
|
|
1143
1198
|
* existing call sites and the fxr editor's `onPick` naming keep working;
|
|
1144
1199
|
* drops when nobody imports it (04-retirements.md). */
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
|
+
import TreeRow from '../molecules/TreeRow.jsx'
|
|
4
|
+
|
|
5
|
+
/* taxonomy-ok: organism — nests TreeRow (molecule) + kol-icons's Icon. */
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* NavDrawer — The hidden nav, called up on demand. (float-everything W6 row 94, 2026-11-04 — kol-float--style 46:3115.)
|
|
9
|
+
* When the sidebar is hidden (kol-shell's RailTrigger), this is what the trigger opens: a 280 float overlay on the
|
|
10
|
+
* sheet radius, `kol-float-solid`, 16 in, over the page at its top-left — no scrim, it is not a blocking task. The
|
|
11
|
+
* title (`kol-float-body`) and × on one row; the tree under it — `TreeRow size="md"` for a destination, its `sub` rows
|
|
12
|
+
* `TreeRow size="xs"` (26) indented beneath; `footer` at the foot (`All pages ↓`). Escape and the × close it; picking
|
|
13
|
+
* a row navigates and closes it.
|
|
14
|
+
*
|
|
15
|
+
* @param {boolean} open · {Function} onClose
|
|
16
|
+
* @param {string} [title]
|
|
17
|
+
* @param {Array} items `{ icon, label, path, count?, sub?: [...] }` (a `{ heading }` draws a section label)
|
|
18
|
+
* @param {string} [currentPath]
|
|
19
|
+
* @param {Function} [onNavigate] `(path) => void`
|
|
20
|
+
* @param {Array} [defaultExpanded] sections open on open; default — the section holding `currentPath`
|
|
21
|
+
* @param {ReactNode} [footer]
|
|
22
|
+
* @param {boolean} [fixed=true] false renders it in flow (a preview, a story)
|
|
23
|
+
*/
|
|
24
|
+
export default function NavDrawer({ open, onClose, title, items = [], currentPath = '', onNavigate, defaultExpanded, footer, fixed = true, className = '' }) {
|
|
25
|
+
const here = items.filter((it) => it.sub?.some((c) => c.path === currentPath)).map((it) => it.path)
|
|
26
|
+
const [expanded, setExpanded] = useState(() => new Set(defaultExpanded ?? here))
|
|
27
|
+
const toggle = (p) => setExpanded((s) => { const n = new Set(s); n.has(p) ? n.delete(p) : n.add(p); return n })
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!open) return undefined
|
|
30
|
+
const onKey = (e) => { if (e.key === 'Escape') onClose?.() }
|
|
31
|
+
window.addEventListener('keydown', onKey)
|
|
32
|
+
return () => window.removeEventListener('keydown', onKey)
|
|
33
|
+
}, [open, onClose])
|
|
34
|
+
if (!open) return null
|
|
35
|
+
const go = (p) => () => { onNavigate?.(p); onClose?.() }
|
|
36
|
+
return (
|
|
37
|
+
<nav aria-label={title ?? 'Navigation'}
|
|
38
|
+
className={`kol-float-solid flex max-h-[calc(100dvh-32px)] w-[280px] flex-col gap-3 rounded-[var(--kol-float-menu-r)] p-4 ${fixed ? 'fixed left-4 top-4 z-[var(--kol-z-overlay)]' : ''} ${className}`.trim()}>
|
|
39
|
+
<div className="flex items-center gap-3 pl-1">
|
|
40
|
+
<span className="kol-float-body min-w-0 flex-1 truncate text-fg-emphasis">{title}</span>
|
|
41
|
+
{onClose && (
|
|
42
|
+
<button type="button" aria-label="Close" onClick={onClose} className="inline-flex size-6 shrink-0 items-center justify-center rounded-full text-oq-64 hover:bg-fg-08 hover:text-oq-96 cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]">
|
|
43
|
+
<Icon name="x" size={16} />
|
|
44
|
+
</button>
|
|
45
|
+
)}
|
|
46
|
+
</div>
|
|
47
|
+
<div className="flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto [scrollbar-width:none]">
|
|
48
|
+
{items.map((it, i) => {
|
|
49
|
+
if (it.heading) return <span key={`h${i}`} className="kol-float-ruler px-2.5 pb-1 pt-3 text-fg-64">{it.heading}</span>
|
|
50
|
+
const kids = it.sub ?? []
|
|
51
|
+
const isOpen = expanded.has(it.path)
|
|
52
|
+
return (
|
|
53
|
+
<div key={it.path ?? it.label} className="flex flex-col gap-0.5">
|
|
54
|
+
<TreeRow size="md" icon={it.icon} label={it.label} count={it.count}
|
|
55
|
+
active={it.path === currentPath} open={isOpen && kids.some((c) => c.path === currentPath)}
|
|
56
|
+
onClick={kids.length ? () => toggle(it.path) : go(it.path)} aria-expanded={kids.length ? isOpen : undefined} />
|
|
57
|
+
{isOpen && kids.map((c) => (
|
|
58
|
+
<TreeRow key={c.path} size="xs" depth={1} icon={c.icon} label={c.label} count={c.count} active={c.path === currentPath} onClick={go(c.path)} />
|
|
59
|
+
))}
|
|
60
|
+
</div>
|
|
61
|
+
)
|
|
62
|
+
})}
|
|
63
|
+
</div>
|
|
64
|
+
{footer && <div className="shrink-0 pl-1">{footer}</div>}
|
|
65
|
+
</nav>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
@@ -18,6 +18,7 @@ import VectorLoader from '../atoms/VectorLoader.jsx'
|
|
|
18
18
|
import { useRailSlot } from '../hooks/railSlot.jsx'
|
|
19
19
|
import { RAIL_ROW } from '../hooks/railRow.js'
|
|
20
20
|
import NavRailSite from './NavRailSite.jsx'
|
|
21
|
+
import NavRailFloat from './NavRailFloat.jsx'
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* NavRail — the flat rail. ONE fixed column, every child a direct child of it
|
|
@@ -82,7 +83,8 @@ import NavRailSite from './NavRailSite.jsx'
|
|
|
82
83
|
* EXPANDS (its rows open under it in place) and COLLAPSES. No other words, in code or docs.
|
|
83
84
|
*
|
|
84
85
|
* @param {'app'|'site'|'workshop'} preset which rail (default `app`); `variant="site"` is the old spelling of `preset="site"`
|
|
85
|
-
* @param {'top'} variant `top` — the horizontal top rail (TopRail): logomark · items · `actions` (the right slot)
|
|
86
|
+
* @param {'top'|'float'} variant `top` — the horizontal top rail (TopRail): logomark · items · `actions` (the right slot);
|
|
87
|
+
* `float` — the float sidebar, expanded 280 · collapsed 72 (NavRailFloat.jsx, float-everything W9 rows 127 · 128)
|
|
86
88
|
* @param {Array} items `{ icon, path, label, sub?: [{ icon?, path, label }] }`
|
|
87
89
|
* a section (`sub`) with `to` is a FOLDER NOTE: its icon and label open `to`, its chevron expands or enters
|
|
88
90
|
* @param {Array} bottomItems pinned below the rule (Settings)
|
|
@@ -323,6 +325,7 @@ export function registerRailPreset(name, Component) { RAIL_PRESETS[name] = { ...
|
|
|
323
325
|
|
|
324
326
|
export default function NavRail({ variant, preset, ...props }) {
|
|
325
327
|
if (variant === 'top') return <TopRail {...props} />
|
|
328
|
+
if (variant === 'float') return <NavRailFloat {...props} />
|
|
326
329
|
const name = preset ?? (variant === 'site' ? 'site' : 'app')
|
|
327
330
|
if (name === 'app') return <AppRail {...props} sections={props.sections ?? RAIL_PRESETS.app.sections} />
|
|
328
331
|
const Named = RAIL_PRESETS[name]?.component
|