@kolkrabbi/kol-component 0.299.0 → 0.301.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/index.js +4 -0
- package/src/molecules/ContentCard.jsx +36 -15
- package/src/molecules/Rail.jsx +21 -6
- package/src/organisms/RailKit.jsx +71 -0
- package/src/organisms/SettingsPanel.jsx +16 -18
- package/src/organisms/Table.jsx +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.301.0",
|
|
4
4
|
"description": "The core component library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"embla-carousel-react": "^8.6.0",
|
|
27
27
|
"pdfjs-dist": "^6.3.289",
|
|
28
28
|
"react-syntax-highlighter": "^16.1.1",
|
|
29
|
-
"@kolkrabbi/kol-
|
|
30
|
-
"@kolkrabbi/kol-
|
|
29
|
+
"@kolkrabbi/kol-search": "^0.3.0",
|
|
30
|
+
"@kolkrabbi/kol-markdown": "^0.1.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@kolkrabbi/kol-icons": ">=0.22.0",
|
package/src/index.js
CHANGED
|
@@ -211,6 +211,10 @@ export { default as SettingsPanel, LabeledControlSection, SettingsRow, SettingsS
|
|
|
211
211
|
/* the settings BODY as data — one call for the page, the drawer and a sheet
|
|
212
212
|
* (user 2026-09-03: "lets normalise a component they can grab") */
|
|
213
213
|
export { default as SettingsSections } from './organisms/SettingsSections.jsx'
|
|
214
|
+
/* the rail kit (RailKit, kol-monitor 2026-10-24): the parts a Rail's content is built from; RailSection and RailRow
|
|
215
|
+
* are the settings rail's LabeledControlSection and SettingsRow under the kit's names — the same components */
|
|
216
|
+
export { RailHeader, RailTabs, RailHint, RailActions, RailFoot } from './organisms/RailKit.jsx'
|
|
217
|
+
export { LabeledControlSection as RailSection, SettingsRow as RailRow } from './organisms/SettingsPanel.jsx'
|
|
214
218
|
export { default as SectionNewsletter } from './organisms/SectionNewsletter.jsx'
|
|
215
219
|
export { default as NewsletterBand } from './organisms/NewsletterBand.jsx'
|
|
216
220
|
export { default as ColumnBrowser } from './organisms/ColumnBrowser.jsx'
|
|
@@ -40,9 +40,17 @@ import { toneClass } from '../utilities/tone.js'
|
|
|
40
40
|
* is HOW it shows — `flip-image` (the media turns, the plate and the corner controls stay; default),
|
|
41
41
|
* `flip-card` (the whole card turns, the back fills it, bare), `hover` (the back cuts in over the
|
|
42
42
|
* front, no motion) — three treatments on the open-questions page (round 17) for the user's pick; the
|
|
43
|
-
* losers go after his ruling. The choreography is kol-theme's (
|
|
43
|
+
* losers go after his ruling. The choreography is kol-theme's (`[data-back]`, kol-animation.css);
|
|
44
44
|
* reduced motion makes both flips the cut; touch has no hover and keeps the front. Absent `back` = the
|
|
45
45
|
* card as it was. Not `reveal`: that name is the canvas card's overlay NODE.
|
|
46
|
+
*
|
|
47
|
+
* THE WHOLE CARD TURNS, ON A KEY, HOVER OPT-IN (AppCardWholeFlip, kol-monitor 2026-10-24 — user: *"it doesnt truly
|
|
48
|
+
* flip the card, there is still the background that remains"* · *"make the cards flip on a shortcut and disable the
|
|
49
|
+
* hover"* · *"hover flips card? default off"*). `flip-card` is a 3D turner AROUND the card: the card root — plate, text,
|
|
50
|
+
* controls, its own ground — is the front face, and the back is a second full face on the card's surface
|
|
51
|
+
* (surface-secondary, the card's radius) holding the picture; nothing stays behind. `flipped` (controlled) turns the
|
|
52
|
+
* card — `CatalogPage` and `HubHome` take a page-level one, so a page turns every card on a key — and `backHover`
|
|
53
|
+
* (default false) opts the hover (and keyboard focus) reveal in. The faces swap by backface, never a timed visibility.
|
|
46
54
|
*/
|
|
47
55
|
|
|
48
56
|
/* ruled defaults — defaults, not hardcodes; `ratio` stays overridable while
|
|
@@ -192,6 +200,9 @@ export default function ContentCard({
|
|
|
192
200
|
/* `back` + `backReveal` — the second cover and how it shows (AppCardBackCover, 2026-10-24) */
|
|
193
201
|
back,
|
|
194
202
|
backReveal = 'flip-image',
|
|
203
|
+
/* `flipped` · `backHover` — the controlled turn and the opt-in hover (AppCardWholeFlip, 2026-10-24) */
|
|
204
|
+
flipped = false,
|
|
205
|
+
backHover = false,
|
|
195
206
|
/* plateRule (CatalogCardFrameAndZoom): the plate's top hairline — default the variant's (catalog and
|
|
196
207
|
* print draw it); `false` turns it off without an `!important` in a consumer sheet */
|
|
197
208
|
plateRule,
|
|
@@ -505,14 +516,8 @@ export default function ContentCard({
|
|
|
505
516
|
</>
|
|
506
517
|
)
|
|
507
518
|
|
|
508
|
-
/* `flip-card
|
|
509
|
-
|
|
510
|
-
const turned = backMode === 'flip-card' ? (
|
|
511
|
-
<div className="kol-card-turn-inner flex flex-col">
|
|
512
|
-
<div className="kol-card-face kol-card-face--front flex flex-col">{body}</div>
|
|
513
|
-
{backFace}
|
|
514
|
-
</div>
|
|
515
|
-
) : body
|
|
519
|
+
/* `flip-card` wraps the ROOT below — the whole card is the front face (AppCardWholeFlip) */
|
|
520
|
+
const turned = body
|
|
516
521
|
|
|
517
522
|
/* THE ROOT FOLLOWS THE AFFORDANCE. A card that navigates must be a real <a>:
|
|
518
523
|
* middle-click, cmd-click, focus order, "copy link address" and every screen
|
|
@@ -534,8 +539,11 @@ export default function ContentCard({
|
|
|
534
539
|
|
|
535
540
|
const common = {
|
|
536
541
|
'data-tags': isHero && Array.isArray(text.tags) && text.tags.length ? text.tags.join(' ') : undefined,
|
|
537
|
-
|
|
538
|
-
|
|
542
|
+
/* flip-card's attributes ride the turner around the root (below); the other two treatments mark the root */
|
|
543
|
+
'data-back': backMode && backMode !== 'flip-card' ? backMode : undefined,
|
|
544
|
+
'data-back-hover': backMode && backMode !== 'flip-card' && backHover ? '' : undefined,
|
|
545
|
+
'data-flipped': backMode && backMode !== 'flip-card' && flipped ? '' : undefined,
|
|
546
|
+
className: `kol-card group flex ${toneClass(tone)} ${box.layout === 'canvas' && reveal != null ? 'has-reveal' : ''} ${expanded ? 'flex-col md:flex-row-reverse' : 'flex-col'} ${box.layout === 'drawer' ? 'relative overflow-hidden rounded-[var(--kol-radius-sm)]' : ''} ${framed ? 'overflow-hidden rounded-[var(--kol-radius-sm)]' : ''} ${box.border ? 'border' : ''} ${box.layout === 'canvas' ? 'relative' : ''} ${interactive ? 'cursor-pointer select-none' : ''} ${hoverBg && interactive ? 'kol-content-hover' : ''} ${interactive && box.frameHover ? 'kol-content-hover-frame' : ''} ${className}`.trim(),
|
|
539
547
|
style: {
|
|
540
548
|
/* same reason as ContentRow: rest colors are PROPERTIES, because an
|
|
541
549
|
* inline background/borderColor outranks the hover class and the step
|
|
@@ -554,11 +562,24 @@ export default function ContentCard({
|
|
|
554
562
|
},
|
|
555
563
|
}
|
|
556
564
|
|
|
565
|
+
/* THE TURNER AROUND THE ROOT (`flip-card`, AppCardWholeFlip): the card is the front face, the back a full face on
|
|
566
|
+
* the card's surface — perspective, preserve-3d, both faces backface-hidden, kol-theme's `[data-back="flip-card"]` */
|
|
567
|
+
const turn = (root) => backMode === 'flip-card' ? (
|
|
568
|
+
<div className="kol-card-turn" data-back="flip-card" data-back-hover={backHover ? '' : undefined} data-flipped={flipped ? '' : undefined} style={{ gridColumn: common.style.gridColumn, gridRow: common.style.gridRow }}>
|
|
569
|
+
<div className="kol-card-turn-inner">
|
|
570
|
+
<div className="kol-card-face kol-card-face--front">{root}</div>
|
|
571
|
+
<div className="kol-card-face kol-card-face--back overflow-hidden rounded-[var(--kol-radius-sm)] bg-surface-secondary" aria-hidden={!flipped || undefined}>
|
|
572
|
+
<ContentMedia ratio={null} radius={false} fit="cover">{backNode}</ContentMedia>
|
|
573
|
+
</div>
|
|
574
|
+
</div>
|
|
575
|
+
</div>
|
|
576
|
+
) : root
|
|
577
|
+
|
|
557
578
|
if (href) {
|
|
558
|
-
return <a href={href} onClick={nav} {...common}>{turned}</a>
|
|
579
|
+
return turn(<a href={href} onClick={nav} {...common}>{turned}</a>)
|
|
559
580
|
}
|
|
560
581
|
if (onClick) {
|
|
561
|
-
return (
|
|
582
|
+
return turn(
|
|
562
583
|
<article
|
|
563
584
|
onClick={onClick}
|
|
564
585
|
onContextMenu={onContextMenu}
|
|
@@ -578,8 +599,8 @@ export default function ContentCard({
|
|
|
578
599
|
{...common}
|
|
579
600
|
>
|
|
580
601
|
{turned}
|
|
581
|
-
</article
|
|
602
|
+
</article>,
|
|
582
603
|
)
|
|
583
604
|
}
|
|
584
|
-
return <article {...common}>{turned}</article>
|
|
605
|
+
return turn(<article {...common}>{turned}</article>)
|
|
585
606
|
}
|
package/src/molecules/Rail.jsx
CHANGED
|
@@ -37,6 +37,12 @@ const FOCUSABLE =
|
|
|
37
37
|
* Presentational shell — the parent owns the open state and supplies the
|
|
38
38
|
* header slot and body; no navigation or routing logic lives here.
|
|
39
39
|
*
|
|
40
|
+
* @param {'app'|'site'} variant THE TIER (RailKit, kol-monitor 2026-10-24): its width when `width` / `height` is not given
|
|
41
|
+
* (`--kol-rail-w-app` 320 · `--kol-rail-w-site` 380) and its padding (`--kol-pad-rail-app` ·
|
|
42
|
+
* `--kol-pad-rail-site`), kol-theme's tokens — so the settings rail and a page rail of one
|
|
43
|
+
* app are one size. Unset = the rail as before (`--kol-pad-overlay`, the width yours)
|
|
44
|
+
* @param {ReactNode} footer a FOOT pinned below the scrolling body (fxr's transport dock; `RailFoot` is its shape) —
|
|
45
|
+
* the body scrolls, the foot does not
|
|
40
46
|
* @param {boolean} open drawer visible (drives slide in/out)
|
|
41
47
|
* @param {Function} onClose close request (Esc / backdrop / close button)
|
|
42
48
|
* @param {string} side 'left' | 'right' | 'bottom' — edge the panel slides from.
|
|
@@ -62,6 +68,8 @@ const px = (v) => (v == null ? undefined : typeof v === 'number' ? `${v}px` : v)
|
|
|
62
68
|
export default function Rail({
|
|
63
69
|
open,
|
|
64
70
|
onClose,
|
|
71
|
+
variant,
|
|
72
|
+
footer,
|
|
65
73
|
side = 'left',
|
|
66
74
|
mode = 'over',
|
|
67
75
|
resizable = false,
|
|
@@ -206,7 +214,11 @@ export default function Rail({
|
|
|
206
214
|
}
|
|
207
215
|
}, [open, present, push])
|
|
208
216
|
|
|
209
|
-
|
|
217
|
+
/* the tier's width stands in for an absent `width` on a side rail; a bottom or top rail keeps its own height */
|
|
218
|
+
const tierWidth = variant && !vertical && width == null ? `var(--kol-rail-w-${variant})` : undefined
|
|
219
|
+
const extent = dragged ?? (vertical ? height : width ?? tierWidth)
|
|
220
|
+
/* the tier's padding, else the overlay inset — one variable the classes below read */
|
|
221
|
+
const pad = { '--kol-pad-rail': variant ? `var(--kol-pad-rail-${variant})` : 'var(--kol-pad-overlay)' }
|
|
210
222
|
/* the edge that faces the page carries the border, on every side */
|
|
211
223
|
const edgeCls = edge ? ({ left: 'border-r', right: 'border-l', top: 'border-b', bottom: 'border-t' })[side] : ''
|
|
212
224
|
|
|
@@ -218,12 +230,13 @@ export default function Rail({
|
|
|
218
230
|
ref={panelRef}
|
|
219
231
|
aria-hidden={!open || undefined}
|
|
220
232
|
className={`relative shrink-0 overflow-hidden bg-surface-primary border-oq-08 ${open ? edgeCls : ''} ${reduced ? '' : 'transition-[width,height] duration-200 ease-out'} ${className}`}
|
|
221
|
-
style={sizeStyle}
|
|
233
|
+
style={{ ...sizeStyle, ...pad }}
|
|
222
234
|
>
|
|
223
235
|
{grab}
|
|
224
|
-
<div className="flex h-full flex-col p-[var(--kol-pad-
|
|
236
|
+
<div className="flex h-full flex-col p-[var(--kol-pad-rail)]">
|
|
225
237
|
{header != null && <div className="mb-6 min-w-0">{header}</div>}
|
|
226
238
|
<div className="flex-1 overflow-auto" style={{ overflowAnchor: 'none' }}>{children}</div>
|
|
239
|
+
{footer != null && <div className="shrink-0">{footer}</div>}
|
|
227
240
|
</div>
|
|
228
241
|
</div>
|
|
229
242
|
)
|
|
@@ -240,7 +253,7 @@ export default function Rail({
|
|
|
240
253
|
: `inset-y-0 max-w-full ${side === 'right' ? 'right-0' : 'left-0'} ${edgeCls} ${extent == null ? 'w-full' : ''}`
|
|
241
254
|
/* padding per side (RailOverlay): a bottom rail clears the home bar at its foot; a top rail its notch */
|
|
242
255
|
const size = vertical
|
|
243
|
-
? { ...(extent != null ? { height: px(extent) } : {}), ...(side === 'bottom' ? { paddingBottom: 'calc(var(--kol-pad-
|
|
256
|
+
? { ...(extent != null ? { height: px(extent) } : {}), ...(side === 'bottom' ? { paddingBottom: 'calc(var(--kol-pad-rail) + env(safe-area-inset-bottom, 0px))' } : { paddingTop: 'calc(var(--kol-pad-rail) + env(safe-area-inset-top, 0px))' }) }
|
|
244
257
|
: extent != null ? { width: px(extent) } : undefined
|
|
245
258
|
const motionBackdrop = reduced
|
|
246
259
|
? ''
|
|
@@ -267,8 +280,8 @@ export default function Rail({
|
|
|
267
280
|
tabIndex={-1}
|
|
268
281
|
/* `edge` / `shadow` (SettingsPanelApproved, 2026-08-27): the approved settings
|
|
269
282
|
* drawer has neither — the sheet meets the page flat */
|
|
270
|
-
className={`fixed z-[200] flex flex-col bg-surface-primary p-[var(--kol-pad-
|
|
271
|
-
style={size}
|
|
283
|
+
className={`fixed z-[200] flex flex-col bg-surface-primary p-[var(--kol-pad-rail)] outline-none ${backdrop && shadow ? 'shadow-2xl' : ''} ${place} border-oq-08 ${motionPanel} ${className}`}
|
|
284
|
+
style={{ ...size, ...pad }}
|
|
272
285
|
>
|
|
273
286
|
{grab}
|
|
274
287
|
{/* closeSide="start": the reference sets the × glyph ~9px deeper than
|
|
@@ -296,6 +309,8 @@ export default function Rail({
|
|
|
296
309
|
<div className="flex-1 overflow-y-auto pr-1" style={{ overflowAnchor: 'none' }}>
|
|
297
310
|
{children}
|
|
298
311
|
</div>
|
|
312
|
+
{/* the foot: pinned under the scroller (RailKit) */}
|
|
313
|
+
{footer != null && <div className="shrink-0">{footer}</div>}
|
|
299
314
|
</div>
|
|
300
315
|
</>,
|
|
301
316
|
document.body,
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import SegmentedToggle from '../atoms/SegmentedToggle.jsx'
|
|
2
|
+
import Divider from '../atoms/Divider.jsx'
|
|
3
|
+
|
|
4
|
+
/* taxonomy-ok: organism — the parts a Rail's content is built from, beside SettingsPanel's LabeledControlSection and SettingsRow */
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The rail kit — the parts of a Rail's content, so an app composes a rail instead of improvising one (RailKit,
|
|
8
|
+
* kol-monitor 2026-10-24 — user: *"FXR uses a system of components to structure their rails … does DS need to ship a
|
|
9
|
+
* better rail instructions? … some sort of set or apps/rails? if we can have some reference source of truth"*).
|
|
10
|
+
*
|
|
11
|
+
* THE ANATOMY IS FXR'S INSPECTOR (`kol-fxr/src/editor/labs/LabsView.jsx` LabsRail + `params/AutoControls.jsx`, its own
|
|
12
|
+
* `kol-editor.css` until now): an uppercase title; segmented tabs (Generate · Style · Animation); label / value rows (a
|
|
13
|
+
* label column, a control column); a divider between groups; segmented Off / On rows; a hint line; full-width action
|
|
14
|
+
* buttons and a row of icon buttons; a FOOT pinned under the scroller with its own tabs (Transport · Output · File)
|
|
15
|
+
* and a transport row. Two of those parts the DS already shipped under the settings rail's names, and they are the same
|
|
16
|
+
* components here — `RailSection` IS `LabeledControlSection`, `RailRow` IS `SettingsRow` (aliases in the barrel, not
|
|
17
|
+
* copies). The rest are below. `SettingsPanel` wears `RailHeader`, so the settings rail and every page rail are one
|
|
18
|
+
* thing; the SHELL (width, padding, scrim, the ×) is `Rail`'s, per tier (`variant="app" | "site"`).
|
|
19
|
+
*
|
|
20
|
+
* RailHeader title (helper-14 uppercase), a subtitle, the header's actions — the node Rail's `header` slot takes
|
|
21
|
+
* RailTabs segmented tabs across the rail's width
|
|
22
|
+
* RailSection = LabeledControlSection — an eyebrow over its rows, `divided` for the hairline above
|
|
23
|
+
* RailRow = SettingsRow — label · control, the label column fixed (160) or `labelWidth="auto"` in a narrow rail
|
|
24
|
+
* RailHint one quiet line under a row or a group (mono-10, meta ink — fxr's)
|
|
25
|
+
* RailActions full-width buttons stacked, or `row` for a line of icon buttons
|
|
26
|
+
* RailFoot the pinned foot — a hairline, optional tabs, then the slot; passed to Rail's `footer`
|
|
27
|
+
*
|
|
28
|
+
* The reference is `apps/rails` (`pnpm rails`): every part on its own, then the whole rails — the settings rail, an
|
|
29
|
+
* inspector like fxr's, a list rail like monitor's patch table, and the bottom rail — in both tiers.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/** RailHeader — the rail's title line: title, subtitle, and the actions before the × (which Rail draws). */
|
|
33
|
+
export function RailHeader({ title, subtitle, actions }) {
|
|
34
|
+
return (
|
|
35
|
+
<div className="flex min-w-0 items-center gap-2">
|
|
36
|
+
<div className="flex min-w-0 flex-1 flex-col">
|
|
37
|
+
{title && <span className="kol-helper-14 uppercase text-emphasis">{title}</span>}
|
|
38
|
+
{subtitle && <span className="kol-mono-12 text-meta">{subtitle}</span>}
|
|
39
|
+
</div>
|
|
40
|
+
{actions}
|
|
41
|
+
</div>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** RailTabs — segmented tabs across the rail: `tabs` `[{ value, label }]`, controlled by `value` / `onChange`. */
|
|
46
|
+
export function RailTabs({ tabs = [], value, onChange, ariaLabel = 'Tabs', className = '' }) {
|
|
47
|
+
return <SegmentedToggle size="sm" className={`w-full ${className}`.trim()} options={tabs} value={value} onChange={onChange} ariaLabel={ariaLabel} />
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** RailHint — one quiet line of guidance under a row or a group; a sentence, never a label. */
|
|
51
|
+
export function RailHint({ children, className = '' }) {
|
|
52
|
+
return <p className={`kol-mono-10 text-meta ${className}`.trim()}>{children}</p>
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** RailActions — the rail's buttons: stacked full width (default), or `row` for a line of icon buttons. */
|
|
56
|
+
export function RailActions({ row = false, children, className = '' }) {
|
|
57
|
+
return row
|
|
58
|
+
? <div className={`flex items-center gap-2 ${className}`.trim()}>{children}</div>
|
|
59
|
+
: <div className={`flex flex-col gap-2 [&>*]:w-full ${className}`.trim()}>{children}</div>
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** RailFoot — the pinned foot for Rail's `footer` slot: a hairline, its own tabs when it has them, then the slot. */
|
|
63
|
+
export function RailFoot({ tabs, value, onChange, ariaLabel = 'Foot tabs', children, className = '' }) {
|
|
64
|
+
return (
|
|
65
|
+
<div className={`flex flex-col gap-4 pt-4 ${className}`.trim()}>
|
|
66
|
+
<Divider />
|
|
67
|
+
{tabs?.length > 0 && <RailTabs tabs={tabs} value={value} onChange={onChange} ariaLabel={ariaLabel} />}
|
|
68
|
+
{children}
|
|
69
|
+
</div>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
@@ -8,6 +8,7 @@ import ToggleSwitch from '../atoms/ToggleSwitch.jsx'
|
|
|
8
8
|
import Rail from '../molecules/Rail.jsx'
|
|
9
9
|
import FullscreenOverlay from '../utilities/FullscreenOverlay.jsx'
|
|
10
10
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
11
|
+
import { RailHeader } from './RailKit.jsx'
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* SettingsPanel — Settings beside the thing they change. a settings surface for the thing you are looking at: you
|
|
@@ -38,7 +39,10 @@ import { Tooltip } from '../utilities/Popover.jsx'
|
|
|
38
39
|
* usually conditionally renders it)
|
|
39
40
|
* @param {'rail'|'overlay'} variant presentation — `rail` (default) or `overlay`, the only two names (user 2026-10-18);
|
|
40
41
|
* `drawer` is the old name of `rail`, still accepted
|
|
41
|
-
* @param {
|
|
42
|
+
* @param {'app'|'site'} tier THE RAIL'S TIER (RailKit, kol-monitor 2026-10-24; default `app`): its width and padding are
|
|
43
|
+
* the tier's tokens, the same the page rails read — `app` 320, `site` 380, the overlay inset.
|
|
44
|
+
* The 380 of 2026-08-27 is the site tier's; an app's settings rail is as wide as its other rails
|
|
45
|
+
* @param {number|string} width width — overrides the tier's for the rail; the ⌘K overlay's 32rem for the overlay
|
|
42
46
|
* @param {string} title header line 1
|
|
43
47
|
* @param {string} subtitle header line 2 (the approved drawer passes none)
|
|
44
48
|
* @param {string} intro a note under the header (the approved drawer passes none)
|
|
@@ -57,6 +61,7 @@ import { Tooltip } from '../utilities/Popover.jsx'
|
|
|
57
61
|
export default function SettingsPanel({
|
|
58
62
|
open = true,
|
|
59
63
|
variant = 'rail',
|
|
64
|
+
tier = 'app',
|
|
60
65
|
width: widthProp,
|
|
61
66
|
title,
|
|
62
67
|
subtitle,
|
|
@@ -69,24 +74,14 @@ export default function SettingsPanel({
|
|
|
69
74
|
children,
|
|
70
75
|
className = '',
|
|
71
76
|
}) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
* user: "all wrong font styles"): the collection beside the panel is the
|
|
77
|
-
* reference — helper-14 uppercase titles, the eyebrow for section labels,
|
|
78
|
-
* mono-12 rows and hints. No mono-10 anywhere. */}
|
|
79
|
-
{title && <span className="kol-helper-14 uppercase text-emphasis">{title}</span>}
|
|
80
|
-
{subtitle && <span className="kol-mono-12 text-meta">{subtitle}</span>}
|
|
81
|
-
</div>
|
|
82
|
-
{headerActions}
|
|
83
|
-
</div>
|
|
84
|
-
)
|
|
77
|
+
/* THE APP REGISTER (SettingsPanelChromeAndColumnPreview, kol-r2b2 2026-08-27 — user: "all wrong font styles"): the
|
|
78
|
+
* collection beside the panel is the reference — helper-14 uppercase titles, the eyebrow for section labels, mono-12
|
|
79
|
+
* rows and hints. The header is the kit's `RailHeader` (RailKit, 2026-10-24): the same node every page rail wears. */
|
|
80
|
+
const header = <RailHeader title={title} subtitle={subtitle} actions={headerActions} />
|
|
85
81
|
const body = (
|
|
86
82
|
<>
|
|
87
83
|
{intro && <p className="kol-mono-12 text-meta">{intro}</p>}
|
|
88
84
|
<div className="flex flex-col gap-5">{children}</div>
|
|
89
|
-
{footer && <div className="mt-2">{footer}</div>}
|
|
90
85
|
</>
|
|
91
86
|
)
|
|
92
87
|
|
|
@@ -106,13 +101,14 @@ export default function SettingsPanel({
|
|
|
106
101
|
<div className="min-w-0 flex-1">{header}</div>
|
|
107
102
|
<CloseButton onClick={onClose} hover={false} className="shrink-0" />
|
|
108
103
|
</div>
|
|
109
|
-
<div className="flex flex-col gap-4"><Divider />{body}</div>
|
|
104
|
+
<div className="flex flex-col gap-4"><Divider />{body}{footer && <div className="mt-2">{footer}</div>}</div>
|
|
110
105
|
</div>
|
|
111
106
|
</FullscreenOverlay>
|
|
112
107
|
)
|
|
113
108
|
}
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
/* no 380 here any more: the width is the tier's token unless the caller sets one (RailKit) */
|
|
111
|
+
const width = widthProp
|
|
116
112
|
return (
|
|
117
113
|
/* THE APPROVED DRAWER (SettingsPanelApproved, kol-r2b2 2026-08-27 — user: "LOCK
|
|
118
114
|
THIS"): no edge, no shadow, a Divider under the header, the sections.
|
|
@@ -123,7 +119,9 @@ export default function SettingsPanel({
|
|
|
123
119
|
the controls floated in the right third of the screen.
|
|
124
120
|
`backdrop` FORWARDS (SettingsPanelBackdrop, kol-monitor 2026-10-24): the default keeps olina's scrim; a page-level
|
|
125
121
|
rail passes `false` and gets the Rail's own no-scrim setup — the page keeps running under it. */
|
|
126
|
-
<Rail open={open} onClose={onClose} side="right" width={width} header={header} className={className} edge={false} shadow={false} closeHover={false} backdrop={backdrop} mode={mode}
|
|
122
|
+
<Rail open={open} onClose={onClose} side="right" variant={tier} width={width} header={header} className={className} edge={false} shadow={false} closeHover={false} backdrop={backdrop} mode={mode}
|
|
123
|
+
/* the foot is the Rail's pinned slot now (RailKit): reset and the verbs stay in reach while the sections scroll */
|
|
124
|
+
footer={footer ? <div className="mt-4">{footer}</div> : undefined}>
|
|
127
125
|
<div className="flex flex-col gap-4"><Divider />{body}</div>
|
|
128
126
|
</Rail>
|
|
129
127
|
)
|
package/src/organisms/Table.jsx
CHANGED
|
@@ -99,7 +99,9 @@ const Table = ({ caption, columns, rows, variant = 'default', className = '', wi
|
|
|
99
99
|
{sorted.map((row, rowIndex) => (
|
|
100
100
|
<tr key={row.id ?? row.token ?? rowIndex} className={`kol-table-row${rowClassName ? ` ${rowClassName(row, rowIndex)}` : ''}`}>
|
|
101
101
|
{columns.map((column) => (
|
|
102
|
-
|
|
102
|
+
/* a column's `wrap: true` is the body cell that wraps (TableWrapTextCell, kol-studio 2026-10-24) — the default
|
|
103
|
+
* class with its `--wrap` modifier; a column naming its own className keeps it */
|
|
104
|
+
<td key={column.accessor} className={(typeof column.className === 'function' ? column.className(row) : column.className) ?? (column.wrap ? 'kol-table-cell-text kol-table-cell-text--wrap' : 'kol-table-cell-text')} style={column.style}>
|
|
103
105
|
{column.render ? column.render(row) : row[column.accessor] ?? '—'}
|
|
104
106
|
</td>
|
|
105
107
|
))}
|