@kolkrabbi/kol-component 0.378.0 → 0.380.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.
Files changed (114) hide show
  1. package/package.json +5 -4
  2. package/src/atoms/Badge.jsx +1 -5
  3. package/src/atoms/BezierPathEditor.jsx +1 -1
  4. package/src/atoms/Button.jsx +88 -12
  5. package/src/atoms/Figure.jsx +19 -1
  6. package/src/atoms/FunctionPlot.jsx +1 -1
  7. package/src/atoms/Input.jsx +107 -7
  8. package/src/atoms/Kbd.jsx +42 -2
  9. package/src/atoms/Link.jsx +20 -0
  10. package/src/atoms/OriginPicker.jsx +9 -5
  11. package/src/atoms/Pill.jsx +1 -3
  12. package/src/atoms/ProgressBar.jsx +3 -6
  13. package/src/atoms/SectionFooter.jsx +22 -0
  14. package/src/atoms/SectionHeader.jsx +24 -0
  15. package/src/atoms/SectionLabel.jsx +0 -22
  16. package/src/atoms/SizeOrDownload.jsx +1 -1
  17. package/src/atoms/Tag.jsx +4 -7
  18. package/src/atoms/Textarea.jsx +12 -7
  19. package/src/atoms/ToggleCheckbox.jsx +25 -5
  20. package/src/atoms/ToggleSwitch.jsx +41 -7
  21. package/src/atoms/ViewToggle.jsx +2 -29
  22. package/src/atoms/XYPad.jsx +25 -0
  23. package/src/hooks/useDragResize.js +1 -1
  24. package/src/index.js +26 -4
  25. package/src/molecules/AccountMenu.jsx +16 -3
  26. package/src/molecules/AlignmentGrid.jsx +13 -1
  27. package/src/molecules/ButtonGroup.jsx +78 -15
  28. package/src/molecules/ButtonSplit.jsx +75 -28
  29. package/src/molecules/Chip.jsx +26 -0
  30. package/src/molecules/CodeBlock.jsx +39 -2
  31. package/src/molecules/ColorInputRow.jsx +125 -4
  32. package/src/molecules/ColorSwatch.jsx +43 -2
  33. package/src/molecules/ContentCard.jsx +104 -3
  34. package/src/molecules/ContentMedia.jsx +1 -1
  35. package/src/molecules/ContentRow.jsx +4 -32
  36. package/src/molecules/ContextMenu.jsx +0 -1
  37. package/src/molecules/DividerLabel.jsx +19 -0
  38. package/src/molecules/DocsToc.jsx +1 -16
  39. package/src/molecules/Dropdown.jsx +115 -18
  40. package/src/molecules/DropdownStepper.jsx +29 -0
  41. package/src/molecules/EmptyState.jsx +1 -15
  42. package/src/molecules/FieldPair.jsx +41 -2
  43. package/src/molecules/Header.jsx +4 -4
  44. package/src/molecules/IndexRow.jsx +1 -1
  45. package/src/molecules/InlineAddRow.jsx +2 -2
  46. package/src/molecules/LabeledControl.jsx +56 -11
  47. package/src/molecules/LayerRow.jsx +1 -1
  48. package/src/molecules/LinkAddRow.jsx +5 -7
  49. package/src/molecules/Menu.jsx +250 -33
  50. package/src/molecules/MenuFloat.jsx +6 -12
  51. package/src/molecules/MenuList.jsx +5 -11
  52. package/src/molecules/Modal.jsx +228 -55
  53. package/src/molecules/ModalHeader.jsx +12 -20
  54. package/src/molecules/ModalShell.jsx +20 -10
  55. package/src/molecules/NoticeBanner.jsx +1 -1
  56. package/src/molecules/OptionRow.jsx +1 -1
  57. package/src/molecules/PanelsMenu.jsx +2 -2
  58. package/src/molecules/ParamBindDot.jsx +29 -2
  59. package/src/molecules/PasswordInput.jsx +1 -1
  60. package/src/molecules/QuantityInput.jsx +45 -13
  61. package/src/molecules/QuickLookFrame.jsx +2 -31
  62. package/src/molecules/RailHeader.jsx +37 -16
  63. package/src/molecules/ReadingActions.jsx +2 -2
  64. package/src/molecules/ReadingNotes.jsx +3 -3
  65. package/src/molecules/ReadingSettings.jsx +8 -8
  66. package/src/molecules/SearchInput.jsx +4 -5
  67. package/src/molecules/SectionText.jsx +56 -10
  68. package/src/molecules/SettingsControls.jsx +23 -23
  69. package/src/molecules/Slider.jsx +103 -55
  70. package/src/molecules/SpecList.jsx +1 -21
  71. package/src/molecules/SplitToolButton.jsx +4 -6
  72. package/src/molecules/SwatchControls.jsx +28 -0
  73. package/src/molecules/SwatchGrid.jsx +39 -0
  74. package/src/molecules/TabsDocument.jsx +131 -0
  75. package/src/molecules/TabsRow.jsx +40 -50
  76. package/src/molecules/TaskRow.jsx +2 -2
  77. package/src/molecules/Toast.jsx +55 -0
  78. package/src/molecules/TocRow.jsx +1 -1
  79. package/src/molecules/TreeRow.jsx +87 -1
  80. package/src/molecules/WorkspaceSwitcher.jsx +3 -6
  81. package/src/organisms/AppItemMenuProvider.jsx +2 -2
  82. package/src/organisms/ColorPickerPopover.jsx +133 -4
  83. package/src/organisms/ColumnBrowser.jsx +1 -1
  84. package/src/organisms/CommandOverlay.jsx +362 -87
  85. package/src/organisms/ContentFilters.jsx +4 -12
  86. package/src/organisms/FindBar.jsx +70 -0
  87. package/src/organisms/FramedMediaBand.jsx +2 -2
  88. package/src/organisms/GalleryCarousel.jsx +1 -1
  89. package/src/organisms/LogoSystem.jsx +38 -0
  90. package/src/organisms/LogoTuner.jsx +32 -0
  91. package/src/organisms/MediaLibrary.jsx +1 -56
  92. package/src/organisms/MediaLibraryPages.jsx +1 -1
  93. package/src/organisms/NavRail.jsx +1 -4
  94. package/src/organisms/Rail.jsx +33 -1
  95. package/src/organisms/RailSwitcher.jsx +62 -0
  96. package/src/organisms/ReadingContents.jsx +65 -3
  97. package/src/organisms/ReadingOverview.jsx +5 -5
  98. package/src/organisms/ReadingPanel.jsx +1 -1
  99. package/src/organisms/SectionSplit.jsx +1 -1
  100. package/src/organisms/SettingsPanel.jsx +64 -41
  101. package/src/organisms/ShortcutsOverlay.jsx +46 -2
  102. package/src/organisms/SpectrumControls.jsx +112 -19
  103. package/src/organisms/StatusBar.jsx +30 -0
  104. package/src/organisms/Table.jsx +136 -45
  105. package/src/organisms/TimelineDock.jsx +281 -1
  106. package/src/organisms/logoBoard.jsx +61 -0
  107. package/src/utilities/AssetPlaceholder.jsx +1 -1
  108. package/src/utilities/EditorShell.jsx +42 -1
  109. package/src/utilities/OverlayGlassPanel.jsx +1 -1
  110. package/src/utilities/Popover.jsx +299 -5
  111. package/src/utilities/SelectionOverlay.jsx +60 -31
  112. package/src/utilities/kolboxGlyph.jsx +10 -0
  113. package/src/molecules/FloatModuleHeader.jsx +0 -11
  114. package/src/organisms/NavRailFloat.jsx +0 -139
@@ -17,7 +17,7 @@ import ModalHeader from './ModalHeader.jsx'
17
17
  export default function PanelsMenu({ title = 'Workspace panels', panels = [], onAction, className = '' }) {
18
18
  return (
19
19
  <div className={`flex w-full max-w-md flex-col gap-3 rounded-[var(--kol-float-menu-r)] bg-surface-secondary p-4 ${className}`.trim()}>
20
- <ModalHeader variant="float" title={title} />
20
+ <ModalHeader title={title} />
21
21
  <ul className="flex flex-col gap-2">
22
22
  {panels.map((p) => (
23
23
  <li key={p.id ?? p.name} className="flex items-center gap-4 rounded-[var(--kol-float-list-r)] bg-[var(--kol-float-well)] py-2 pl-4 pr-2">
@@ -26,7 +26,7 @@ export default function PanelsMenu({ title = 'Workspace panels', panels = [], on
26
26
  {p.meta && <span className="kol-float-label truncate text-fg-64">{p.meta}</span>}
27
27
  </span>
28
28
  {p.state && <span className="kol-float-label shrink-0 text-fg-64">{p.state}</span>}
29
- <Button variant="float" size="md" tone={p.primary ? 'inverted' : 'secondary'} className="shrink-0 min-w-20" onClick={() => { p.onAction?.(p); onAction?.(p) }}>{p.action}</Button>
29
+ <Button size="md" tone={p.primary ? 'inverted' : 'secondary'} className="shrink-0 min-w-20" onClick={() => { p.onAction?.(p); onAction?.(p) }}>{p.action}</Button>
30
30
  </li>
31
31
  ))}
32
32
  </ul>
@@ -1,3 +1,4 @@
1
+ import { useRef, useState } from 'react'
1
2
  import { Menu } from './Menu.jsx'
2
3
  import { Tooltip } from '../utilities/Popover.jsx'
3
4
 
@@ -39,7 +40,7 @@ const SIZE = {
39
40
  * @param {number} [minWidth=180] - The menu's minimum width
40
41
  * @param {string} [className] - Extra classes on the trigger
41
42
  */
42
- export default function ParamBindDot({
43
+ function ParamBindDotDefault({
43
44
  bound = false,
44
45
  mode,
45
46
  items = [],
@@ -60,7 +61,7 @@ export default function ParamBindDot({
60
61
  aria-label={name}
61
62
  {...props}
62
63
  className={[
63
- 'kol-param-bind-dot group inline-flex shrink-0 items-center justify-center p-0 border-0 bg-transparent cursor-pointer rounded-[var(--kol-radius-xs)] outline-none',
64
+ 'kol-param-bind-dot group inline-flex shrink-0 items-center justify-center p-0 border-0 bg-transparent cursor-pointer rounded-[var(--kol-radius-2)] outline-none',
64
65
  'focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--kol-focus-ring-quiet)]',
65
66
  SIZE[size] ?? SIZE.sm,
66
67
  className,
@@ -77,3 +78,29 @@ export default function ParamBindDot({
77
78
  )} />
78
79
  )
79
80
  }
81
+
82
+ /* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): kolbox's BindDot (round 4, W5), its drawing carried
83
+ * from apps/kolbox/src/labs/Params.jsx (the binding itself stays the caller's): a 16 hit box, a 6 dot hollow on the muted
84
+ * ring, filled in the accent once `bound`; the kolbox Tooltip (`tooltip`, else "Modulate"); a press opens Menu kolbox
85
+ * beside it with `items` ({ label, checked, onClick }) as one group. */
86
+ function ParamBindDotKolbox({ bound = false, items = [], label, tooltip, minWidth = 180 }) {
87
+ const ref = useRef(null)
88
+ const [open, setOpen] = useState(false)
89
+ return (
90
+ <>
91
+ <Tooltip variant="kolbox" label={tooltip ?? 'Modulate'}>
92
+ <button ref={ref} type="button" aria-label={`Modulate${label ? ` ${label}` : ''}`} aria-haspopup="menu" aria-expanded={open} data-bind-dot
93
+ onClick={() => setOpen((o) => !o)}
94
+ className="kol-bind-dot--kolbox inline-flex size-4 shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-solid focus-visible:outline-1">
95
+ <span className={`kol-bind-dot-mark${bound ? ' is-bound' : ''} size-1.5 rounded-full`} />
96
+ </button>
97
+ </Tooltip>
98
+ <Menu variant="kolbox" aria-label="Modulate" anchor={ref} open={open} onClose={() => setOpen(false)} minWidth={minWidth}
99
+ groups={[items.map((it, i) => ({ label: it.label, value: i, check: !!it.checked }))]} onSelect={(r) => items[r.value]?.onClick?.()} />
100
+ </>
101
+ )
102
+ }
103
+
104
+ export default function ParamBindDot(props) {
105
+ return props.variant === 'kolbox' ? <ParamBindDotKolbox {...props} /> : <ParamBindDotDefault {...props} />
106
+ }
@@ -6,7 +6,7 @@ import Input from '../atoms/Input.jsx'
6
6
  * PasswordInput — A password field with its reveal. `•••••••••••• 👁` (float-everything W3 row 39, 2026-11-04 — the
7
7
  * exploration's password field). An `Input type="password"` with the eye at its trailing edge (`eye-on` masked,
8
8
  * `eye-off` revealed; 16, oq-64 to oq-96): a press flips the type, the field keeps focus. Every Input prop passes
9
- * through — `variant="float"` is the capsule, `error` the message under it.
9
+ * through — `error` is the message under it.
10
10
  *
11
11
  * @param {boolean} [revealed] controlled reveal; omit for internal state
12
12
  * @param {Function} [onRevealChange] `(revealed) => void`
@@ -19,14 +19,27 @@ import { useEffect, useState } from 'react'
19
19
  * @param {number} max upper bound (default 99)
20
20
  * @param {string} controls 'chevron' (default) | 'split'
21
21
  * @param {string} size 'sm' | 'md' | 'lg' — pins the responsive size
22
- * @param {'float'} variant the float stepper (float-everything W2 row 24, 2026-11-04): a 36 capsule on the float
23
- * well, − value + in Inter 500 (the glyphs oq, 40% at a bound), the float heights by `size`
24
- * @param {string} unit FLOAT: a word after the value (`22 px` — the reader's text size, W11 row 151, 2026-11-04)
25
- * @param {string} ariaLabel FLOAT: what the value is; the − + read `Decrease <it>` / `Increase <it>` (default quantity)
22
+ * @param {string} unit a word after the value (`22 px`)
23
+ * @param {string} ariaLabel what the value is; the − + read `Decrease <it>` / `Increase <it>` (default quantity)
24
+ * @param {'folio'} variant also `folio` (Folio migration batch A, 2026-11-22): Folio's stepper, two 32 squares at radius
25
+ * 4 with the rule line round the value (JetBrains Mono 12 / 16), the step glyphs 12 / 500;
26
+ * 8 apart, the root as wide as its row; a bound dims its square to 40%
27
+ * @param {number} step FOLIO: how far one press moves the value (default 1; the reader's sizes step by 2)
28
+ * @param {ReactNode} down FOLIO: the − square's text (`A−`)
29
+ * @param {ReactNode} up FOLIO: the + square's text (`A+`)
30
+ * @param {string} downLabel FOLIO: the − square's name (`Smaller text`)
31
+ * @param {string} upLabel FOLIO: the + square's name (`Larger text`)
32
+ * @param {'kolbox'} variant also `kolbox` (Folio on kolbox, 2026-11-22): kolbox has no stepper of its own, so it is built
33
+ * from its parts: `Input variant="kolbox"` (its sm field, `--kol-kolbox-ctl` high: the value
34
+ * in mono with `unit` after it, typed and committed on Enter or leaving, ↑↓ step it) between
35
+ * two kolbox icon Buttons, − and + (your icons' `minus` and `plus`), 4 apart, the root as wide
36
+ * as its row. `step`, `min`, `max` as folio's: a typed value is held to the range and the step;
37
+ * a button at a bound is disabled. `downLabel`, `upLabel` name the buttons (else
38
+ * `Decrease <ariaLabel>`, `Increase <ariaLabel>`); `down`, `up` are not drawn (the set's glyphs are)
26
39
  * @param {string} className extra classes on the root
27
40
  */
28
- import { IconLoader } from '@kolkrabbi/kol-icons'
29
- const FLOAT_H = { sm: 'h-[var(--kol-float-h-sm)]', md: 'h-[var(--kol-float-h-md)]', lg: 'h-[var(--kol-float-h-lg)]' }
41
+ import Input from '../atoms/Input.jsx'
42
+ import Button from '../atoms/Button.jsx'
30
43
 
31
44
  const SIZE_MAP = {
32
45
  sm: { fontSize: 11, paddingY: 12, paddingX: 24, radius: 20, icon: 10 },
@@ -44,6 +57,11 @@ const QuantityInput = ({
44
57
  variant,
45
58
  unit,
46
59
  ariaLabel = 'quantity',
60
+ step = 1,
61
+ down,
62
+ up,
63
+ downLabel,
64
+ upLabel,
47
65
  className = '',
48
66
  }) => {
49
67
  const [resolvedSize, setResolvedSize] = useState('md')
@@ -78,14 +96,28 @@ const QuantityInput = ({
78
96
  const increment = () => { if (value < max) onChange?.(value + 1) }
79
97
  const decrement = () => { if (value > min) onChange?.(value - 1) }
80
98
 
81
- /* the float stepper: one capsule, the glyphs at each end, the value between */
82
- if (variant === 'float') {
83
- const btn = 'inline-flex h-full w-8 shrink-0 items-center justify-center rounded-full text-oq-64 hover:text-oq-96 disabled:opacity-40 disabled:hover:text-oq-64 cursor-pointer disabled:cursor-not-allowed outline-none focus-visible:[box-shadow:var(--kol-float-focus)] transition-colors'
99
+ /* folio (Folio migration batch A, 2026-11-22): Folio's Stepper carried class for class (apps/folio Chrome.jsx), two 32
100
+ * squares round the value, stepping by `step`; the chrome in kol-theme `.kol-quantity-input--folio` */
101
+ if (variant === 'folio') {
102
+ const stepCls = 'kol-quantity-input-step flex size-[32px] items-center justify-center rounded-[4px] border disabled:opacity-40'
84
103
  return (
85
- <div className={`inline-flex items-center rounded-full bg-[var(--kol-float-well)] px-1 kol-float-panel text-fg-emphasis ${FLOAT_H[size] ?? FLOAT_H.md} ${className}`.trim()}>
86
- <button type="button" onClick={decrement} disabled={value <= min} className={btn} aria-label={`Decrease ${ariaLabel}`}><IconLoader name="minus" size={14} /></button>
87
- <span className="min-w-6 flex-1 text-center tabular-nums">{value}{unit ? ` ${unit}` : ''}</span>
88
- <button type="button" onClick={increment} disabled={value >= max} className={btn} aria-label={`Increase ${ariaLabel}`}><IconLoader name="plus" size={14} /></button>
104
+ <div className={`kol-quantity-input--folio flex items-center gap-[8px] ${className}`.trim()}>
105
+ <button type="button" aria-label={downLabel} disabled={value <= min} onClick={() => onChange?.(value - step)} className={stepCls}>{down}</button>
106
+ <p className="kol-quantity-input-value flex-1 text-center tabular-nums">{value}{unit ? ` ${unit}` : ''}</p>
107
+ <button type="button" aria-label={upLabel} disabled={value >= max} onClick={() => onChange?.(value + step)} className={stepCls}>{up}</button>
108
+ </div>
109
+ )
110
+ }
111
+
112
+ /* kolbox (Folio on kolbox, 2026-11-22): kolbox's field between its two icon buttons */
113
+ if (variant === 'kolbox') {
114
+ const to = (n) => Math.min(max, Math.max(min, min + Math.round((n - min) / step) * step))
115
+ const commit = (text) => { const n = parseFloat(text); if (Number.isFinite(n) && to(n) !== value) onChange?.(to(n)) }
116
+ return (
117
+ <div className={`flex min-w-0 items-center gap-1 ${className}`.trim()}>
118
+ <Button variant="kolbox" iconOnly="minus" aria-label={downLabel ?? `Decrease ${ariaLabel}`} disabled={value <= min} onClick={() => onChange?.(to(value - step))} />
119
+ <Input variant="kolbox" aria-label={ariaLabel} value={value} onCommit={commit} suffix={unit} className="flex-1" />
120
+ <Button variant="kolbox" iconOnly="plus" aria-label={upLabel ?? `Increase ${ariaLabel}`} disabled={value >= max} onClick={() => onChange?.(to(value + step))} />
89
121
  </div>
90
122
  )
91
123
  }
@@ -1,10 +1,9 @@
1
1
  import { useRef, useState } from 'react'
2
2
  import { IconLoader } from '@kolkrabbi/kol-icons'
3
3
  import ModalHeader from './ModalHeader.jsx'
4
- import Header from './Header.jsx'
5
4
  import ModalShell from './ModalShell.jsx'
6
5
 
7
- /* taxonomy-ok: molecule — Header · ModalHeader (molecules) on ModalShell (molecule) + kol-icons's IconLoader. */
6
+ /* taxonomy-ok: molecule — ModalHeader (molecule) on ModalShell (molecule) + kol-icons's IconLoader. */
8
7
 
9
8
  /**
10
9
  * QuickLookFrame — The preview window. the Finder Quick Look window (user 2026-09-23: *"put them in a container LIKE
@@ -32,18 +31,8 @@ import ModalShell from './ModalShell.jsx'
32
31
  * @param {Function} onResize ({ w, h }) => void while the corner is dragged
33
32
  * @param {ReactNode} footer the transport row
34
33
  * @param {ReactNode} children the body
35
- *
36
- * THE UTILITY WINDOW (`variant="float"`, float-everything W6 rows 86 · 88, 2026-11-04 — kol-float--style 46:2840): a
37
- * non-modal float window — no scrim, the scene stays live under it. `kol-float-solid` on `--kol-float-window-r`, 20 in,
38
- * 18 between its parts; the header is `Header variant="modal"` (`icon` · title · `onMinimise` · `onClose`); the
39
- * body is the caller's (chip tabs, float fields); `status` is the footer line (`Changes saved automatically`, the
40
- * `kol-float-label` role on fg-64) with the resize corner as its glyph at the right — the same drag as the default grip.
41
- * @param {'float'} [variant]
42
- * @param {string} [icon] float: the window's glyph
43
- * @param {Function} [onMinimise] float: the − control
44
- * @param {ReactNode} [status] float: the footer line
45
34
  */
46
- export default function QuickLookFrame({ variant, icon, onMinimise, status, title, meta, actions, onClose, nav, size: sizeProp, onResize, footer, className = '', children }) {
35
+ export default function QuickLookFrame({ title, meta, actions, onClose, nav, size: sizeProp, onResize, footer, className = '', children }) {
47
36
  const [own, setOwn] = useState(null)
48
37
  const size = sizeProp !== undefined ? sizeProp : own
49
38
  const setSize = onResize ?? setOwn
@@ -68,24 +57,6 @@ export default function QuickLookFrame({ variant, icon, onMinimise, status, titl
68
57
  const onPointerUp = () => { drag.current = null }
69
58
 
70
59
  const grip = { role: 'separator', 'aria-label': 'Resize', onPointerDown, onPointerMove, onPointerUp, onPointerCancel: onPointerUp }
71
- if (variant === 'float') {
72
- return (
73
- <ModalShell ref={ref} variant="float" style={size ? { width: size.w, height: size.h } : undefined}
74
- className={`w-full max-w-[562px] gap-[18px] p-5 ${className}`.trim()}
75
- header={header && <Header variant="modal" icon={icon} title={title} end={actions} onMinimise={onMinimise} onClose={onClose} />}
76
- footer={(
77
- <>
78
- {footer}
79
- <div className="flex items-center gap-3">
80
- <span className="kol-float-label min-w-0 flex-1 truncate text-fg-64">{status}</span>
81
- <span {...grip} className="inline-flex size-4 cursor-nwse-resize touch-none items-center justify-center text-oq-64 hover:text-oq-96"><IconLoader name="expand" size={13} /></span>
82
- </div>
83
- </>
84
- )}>
85
- <div className="flex min-h-0 flex-1 flex-col gap-[18px]">{children}</div>
86
- </ModalShell>
87
- )
88
- }
89
60
  /* THE PANEL IS ModalShell's (W2.2, 2026-11-08): the lift surface and the one modal radius; the oq-12 hairline the
90
61
  * window wore went with its own panel style — the scrim is the edge, as on every other KOL overlay */
91
62
  const style = size ? { width: size.w, height: size.h, '--kol-ql-frame-h': `${size.h}px`, '--kol-ql-max-w': `${size.w}px` } : undefined
@@ -1,29 +1,50 @@
1
- import Header from './Header.jsx'
2
-
3
- /* taxonomy-ok: molecule — the rail kit's title line; `variant="float"` is Header variant="property" */
1
+ /* taxonomy-ok: molecule — the rail kit's title line */
4
2
 
5
3
  /**
6
4
  * RailHeader — the rail kit's title line (RailKit 2026-10-24): title (helper-14 uppercase), a subtitle, the header's
7
5
  * actions before the × (which Rail draws). The node Rail's `header` slot takes it; SettingsPanel wears it.
8
6
  *
9
- * `variant="float"` is `Header variant="property"` (plan-2026-11-12-one-header W1.1) — deprecated under this name, on the
10
- * retirement ledger: `actions` → `end`, `collapsedV` / `onCollapseV` (the old `folded` / `onFold` still accepted).
11
- * The default line stays here: it is not one of Header's four variants.
7
+ * `variant="kolbox"` (W31.2 batch 5): kolbox's rail header, with `leading` and `size` md · sm (below).
12
8
  *
13
- * @param {'default'|'float'} [variant='default']
9
+ * @param {'default'|'kolbox'} [variant='default']
14
10
  * @param {ReactNode} [title] · {ReactNode} [subtitle] · {ReactNode} [actions] · {string} [className]
15
11
  */
16
- export default function RailHeader({ variant = 'default', title, subtitle, actions, collapsedV, onCollapseV, folded, onFold, className = '' }) {
17
- if (variant !== 'float') {
12
+ export default function RailHeader({ variant = 'default', title, subtitle, actions, leading, size = 'md', className = '' }) {
13
+ /* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): kolbox's RailHeader, carried from
14
+ * apps/kolbox/src/ui/RailHeader.jsx: a `leading` slot, the title, the `subtitle` as a quiet meta line at the right,
15
+ * the actions; inset 16. `size` md the plain header (48 high), sm the document header (the file's RailHeader 61:11315:
16
+ * 65 high as Figma's, the title on the document voice 13 / 22; below). */
17
+ if (variant === 'kolbox') {
18
+ const sm = size === 'sm'
18
19
  return (
19
- <div className={`flex min-w-0 items-center gap-2 ${className}`.trim()}>
20
- <div className="flex min-w-0 flex-1 flex-col">
21
- {title && <span className="kol-helper-14 uppercase text-emphasis">{title}</span>}
22
- {subtitle && <span className="kol-mono-12 text-meta">{subtitle}</span>}
23
- </div>
24
- {actions}
20
+ <div className={`kol-rail-header--kolbox flex items-center ${sm ? 'items-start! gap-2 pt-[13px] pb-[9px] pr-2 pl-4' : 'h-12 gap-2 px-4'} ${className}`.trim()} data-rail-header>
21
+ {leading}
22
+ {sm ? (
23
+ /* sm, the document header: the subtitle is a quiet line UNDER the title, as his reference draws it (2026-11-19);
24
+ the header grows by that line only when there is one. As Figma's file header measures (plan-2026-11-23-editor-
25
+ measured-against-figma W3): 240 x 65, the title row 22 at 13 down, 5 to the line, the line 16, 9 under it; 16
26
+ left, 8 right, the actions 8 down */
27
+ <span className="flex! h-auto! min-w-0 flex-1 flex-col">
28
+ <span className="kol-rail-header-title--sm flex h-[22px] min-w-0 items-center">{title}</span>
29
+ {subtitle && <span className="kol-rail-header-sub truncate">{subtitle}</span>}
30
+ </span>
31
+ ) : (
32
+ <>
33
+ <span className="kol-rail-header-title--md min-w-0 truncate">{title}</span>
34
+ <span className="kol-rail-header-meta min-w-0 flex-1 truncate text-right">{subtitle}</span>
35
+ </>
36
+ )}
37
+ {actions && <span className={`flex shrink-0 items-center ${sm ? '-mt-[5px]' : '-mr-1'}`}>{actions}</span>}
25
38
  </div>
26
39
  )
27
40
  }
28
- return <Header variant="property" title={title} end={actions} collapsedV={collapsedV ?? folded ?? false} onCollapseV={onCollapseV ?? onFold} className={className} />
41
+ return (
42
+ <div className={`flex min-w-0 items-center gap-2 ${className}`.trim()}>
43
+ <div className="flex min-w-0 flex-1 flex-col">
44
+ {title && <span className="kol-helper-14 uppercase text-emphasis">{title}</span>}
45
+ {subtitle && <span className="kol-mono-12 text-meta">{subtitle}</span>}
46
+ </div>
47
+ {actions}
48
+ </div>
49
+ )
29
50
  }
@@ -23,9 +23,9 @@ export default function ReadingActions({ actions = DEFAULT_ACTIONS, onAction, on
23
23
  return (
24
24
  <div role="toolbar" aria-label="Passage" className={`inline-flex h-10 items-center gap-1 rounded-full bg-surface-secondary px-1.5 ${className}`.trim()}>
25
25
  {actions.map((a) => (
26
- <Button key={a.id} variant="float" tone="ghost" size="sm" iconLeft={a.icon} onClick={() => { a.onClick?.(); onAction?.(a.id) }}>{a.label}</Button>
26
+ <Button key={a.id} tone="ghost" size="sm" iconLeft={a.icon} onClick={() => { a.onClick?.(); onAction?.(a.id) }}>{a.label}</Button>
27
27
  ))}
28
- {onMore && <Button variant="float" tone="ghost" size="sm" iconOnly="more" aria-label="More" onClick={onMore} className="ml-auto" />}
28
+ {onMore && <Button tone="ghost" size="sm" iconOnly="more" aria-label="More" onClick={onMore} className="ml-auto" />}
29
29
  </div>
30
30
  )
31
31
  }
@@ -29,10 +29,10 @@ export default function ReadingNotes({ quote, location, note = '', onNoteChange,
29
29
  <blockquote className="mt-3 rounded-[14px] bg-[var(--kol-float-well)] p-3.5 text-[16px] leading-[1.5] text-fg-emphasis" style={{ fontFamily: font }}>{quote}</blockquote>
30
30
  {location && <span className="kol-float-label mt-5 flex h-8 items-center rounded-full bg-[var(--kol-float-well)] px-4 text-fg-64">{location}</span>}
31
31
  <span className="kol-float-ruler mt-8 uppercase text-fg-64">{noteLabel}</span>
32
- <Textarea variant="float" rows={5} value={note} onChange={(e) => onNoteChange?.(e.target.value)} aria-label={noteLabel} className="mt-3" />
32
+ <Textarea rows={5} value={note} onChange={(e) => onNoteChange?.(e.target.value)} aria-label={noteLabel} className="mt-3" />
33
33
  {status && <span className="kol-float-label mt-5 text-fg-64">{status}</span>}
34
- {onView && <Button variant="float" tone="inverted" size="lg" iconRight="external-link" onClick={onView} className="mt-6 w-full justify-center">{viewLabel}</Button>}
35
- {onRemove && <Button variant="float" tone="ghost" size="sm" onClick={onRemove} className="-ml-3 mt-4 self-start">{removeLabel}</Button>}
34
+ {onView && <Button size="lg" iconRight="external-link" onClick={onView} className="mt-6 w-full justify-center">{viewLabel}</Button>}
35
+ {onRemove && <Button tone="ghost" size="sm" onClick={onRemove} className="-ml-3 mt-4 self-start">{removeLabel}</Button>}
36
36
  {footer && <span className="kol-float-ruler mt-5 uppercase text-fg-64">{footer}</span>}
37
37
  </div>
38
38
  )
@@ -10,7 +10,7 @@ const TRACK = 'w-full rounded-full bg-[var(--kol-float-well)] p-1 [&>button]:fle
10
10
 
11
11
  /**
12
12
  * ReadingSettings — How the text is set: the Reading side of `ReadingPanel` (float-everything W11 row 151, 2026-11-04 —
13
- * kol-float--style W2.9 `Contextual reading panel · Reading`). Each setting is a `LabeledControl variant="float"` (the
13
+ * kol-float--style W2.9 `Contextual reading panel · Reading`). Each setting is a `LabeledControl` (the
14
14
  * float label, as written, 8 over the control — plan-2026-11-12-float-rails-figma W12.1; it drew its own uppercase
15
15
  * `kol-float-ruler` label until then), 24 between: the theme pick (`themes` — a row of kol-styleguide `ThemeTile`s; kol-component cannot import
16
16
  * it), the face as a float Dropdown, the size as the float QuantityInput (`22 px`), leading and width as float
@@ -34,13 +34,13 @@ export default function ReadingSettings({ themes, font, fonts = [], onFont, size
34
34
  const L = { ...LABELS, ...l }
35
35
  return (
36
36
  <div className={`flex flex-col gap-6 ${className}`.trim()}>
37
- {themes && <LabeledControl variant="float" label={L.theme}><div className="flex gap-2">{themes}</div></LabeledControl>}
38
- {fonts.length > 0 && <LabeledControl variant="float" label={L.font}><Dropdown variant="float" size="md" options={fonts} value={font} onChange={onFont} className="w-full" /></LabeledControl>}
39
- <LabeledControl variant="float" label={L.size}><QuantityInput variant="float" unit="px" ariaLabel="text size" value={size} onChange={onSize} min={minSize} max={maxSize} className="w-full" /></LabeledControl>
40
- {leadings.length > 0 && <LabeledControl variant="float" label={L.leading}><Dropdown variant="float" size="md" options={leadings} value={leading} onChange={onLeading} className="w-full" /></LabeledControl>}
41
- {widths.length > 0 && <LabeledControl variant="float" label={L.width}><Dropdown variant="float" size="md" options={widths} value={width} onChange={onWidth} className="w-full" /></LabeledControl>}
42
- <LabeledControl variant="float" label={L.flow}><TabsRow variant="float" size="xs" overflow="wrap" tabs={flows} value={flow} onChange={onFlow} ariaLabel={L.flow} className={TRACK} /></LabeledControl>
43
- {onReset && <Button variant="float" tone="secondary" size="lg" onClick={onReset} className="mt-4 w-full justify-center">{resetLabel}</Button>}
37
+ {themes && <LabeledControl label={L.theme}><div className="flex gap-2">{themes}</div></LabeledControl>}
38
+ {fonts.length > 0 && <LabeledControl label={L.font}><Dropdown size="md" options={fonts} value={font} onChange={onFont} className="w-full" /></LabeledControl>}
39
+ <LabeledControl label={L.size}><QuantityInput unit="px" ariaLabel="text size" value={size} onChange={onSize} min={minSize} max={maxSize} className="w-full" /></LabeledControl>
40
+ {leadings.length > 0 && <LabeledControl label={L.leading}><Dropdown size="md" options={leadings} value={leading} onChange={onLeading} className="w-full" /></LabeledControl>}
41
+ {widths.length > 0 && <LabeledControl label={L.width}><Dropdown size="md" options={widths} value={width} onChange={onWidth} className="w-full" /></LabeledControl>}
42
+ <LabeledControl label={L.flow}><TabsRow size="xs" overflow="wrap" tabs={flows} value={flow} onChange={onFlow} ariaLabel={L.flow} className={TRACK} /></LabeledControl>
43
+ {onReset && <Button tone="secondary" size="lg" onClick={onReset} className="mt-4 w-full justify-center">{resetLabel}</Button>}
44
44
  </div>
45
45
  )
46
46
  }
@@ -35,7 +35,7 @@ import Kbd from '../atoms/Kbd.jsx'
35
35
  * @param {string} shortcutHint caller-authored kbd chip (e.g. "⌘K"); shown while the value is empty
36
36
  * @param {Function} onFocus (event) => void — input focus
37
37
  * @param {string} size 'xs' | 'sm' | 'md' — kol-control size + matched mono type class (xs = the panel rung, 2026-09-01)
38
- * @param {string} variant 'filled' | 'ghost' | 'outline' — kol-control variant, same chrome as Input (ignored when bare/expanding) · `float` (float-everything W3 row 40, 2026-11-04): the capsule on the float well, Inter 500, the glyph 18, the ⌘K cap drawn (`shortcutHint="⌘K"`); the float heights by `size`
38
+ * @param {string} variant 'filled' | 'ghost' | 'outline' — kol-control variant, same chrome as Input (ignored when bare/expanding)
39
39
  * @param {string} tone 'default' | 'inverse' — the dark chip for a washed plane (ControlToneInverse, 2026-08-27); on the expanding pill it is the OPEN fill
40
40
  * @param {boolean} bare borderless inline field for overlay panels (full width, no shell chrome; keeps icon/clear/chip slots)
41
41
  * @param {boolean} expanding round icon-button pill that animates open into an inline field
@@ -215,8 +215,7 @@ export default function SearchInput({
215
215
  ? `kol-control--bare kol-control-${size} flex w-full border border-transparent gap-2`
216
216
  : `kol-control${variant ? ` kol-control--${variant}` : ''} kol-control-${size} gap-2${toneClass(tone) ? ` ${toneClass(tone)}` : ''}`,
217
217
  'items-center cursor-text',
218
- /* the float capsule types itself (Inter 500 at the float size, the theme's `.kol-control--float`) */
219
- variant !== 'float' && SIZE_TYPE[size],
218
+ SIZE_TYPE[size],
220
219
  className,
221
220
  ].filter(Boolean).join(' ')
222
221
 
@@ -251,8 +250,8 @@ export default function SearchInput({
251
250
  aria-hidden="true"
252
251
  className={`flex items-center shrink-0 ${bare ? 'text-oq-48' : 'text-auto opacity-50'}`}
253
252
  >
254
- {/* ADJACENT — this glyph sits in the field's line box beside the query; a float glyph is the float's 18 */}
255
- <IconLoader name="search" size={iconSize ?? (variant === 'float' ? 'var(--kol-float-ic)' : glyphSize(size))} />
253
+ {/* ADJACENT — this glyph sits in the field's line box beside the query */}
254
+ <IconLoader name="search" size={iconSize ?? glyphSize(size)} />
256
255
  </span>
257
256
  )}
258
257
  <input
@@ -1,3 +1,4 @@
1
+ import KolboxGlyph from '../utilities/kolboxGlyph.jsx'
1
2
  /**
2
3
  * SectionText — The label, headline and body block. the ruled text block of the SECTION family (SectionSet,
3
4
  * kol-website 2026-08-26): label · headline · body · actions, every slot
@@ -49,9 +50,7 @@
49
50
  * to `--kol-page-header-mb` (40px; content 16px). Unset = the section family as before.
50
51
  * @param {ReactNode} media a mark above the eyebrow (a logo, an SVG) — with a `level` only
51
52
  * @param {ReactNode} meta a fact at the far end of the HEADLINE's row (float-everything W9 row 140, 2026-11-04 —
52
- * `Website traffic · kolkrabbi.io · Umami`): the source or scope, in mono on fg-64 (`kol-float-timecode`
53
- * under `variant="float"`, else `kol-mono-12 text-meta`), baseline-aligned with the title. Unset, nothing
54
- * `variant="float"` — the float page header (see SECTION_TEXT_LEVELS.float).
53
+ * `Website traffic · kolkrabbi.io · Umami`): the source or scope, in mono on fg-64 (`kol-mono-12 text-meta`), baseline-aligned with the title. Unset, nothing
55
54
  */
56
55
  export const HEADLINE_ROLE = {
57
56
  pull: 'kol-section-text-pull',
@@ -78,14 +77,9 @@ export const SECTION_TEXT_LEVELS = {
78
77
  /* document (DocumentIndexFigma, kol-atlas 2026-10-31) — the Research page header, the workspace sheet's: 36/1.2 bold
79
78
  * display face at −0.005em, 12 under it; the lede 15/1.6 in the body face to a 724 edge */
80
79
  document: { title: 'font-[family-name:var(--kol-font-family-sans)] text-[36px] font-bold leading-[1.2] tracking-[-0.005em]', lede: 'm-0 font-[family-name:var(--kol-font-family-sans-neutral)] text-[15px] leading-[1.6] text-fg-96', measure: '724px' },
81
- /* float (float-everything W9 row 135, 2026-11-04 — kol-float--style 48:4542): the float page header — the eyebrow in
82
- * mono (`kol-float-ruler`, fg-64, `STUDIO / WORKSPACE`), the title in `kol-float-sheet` (Inter 38/500), the subtitle
83
- * in `kol-float-body` on fg-64; 8 between, 24 under. A section heading on the float is this with
84
- * `headlineClass="kol-float-window"` and a `meta` (row 140). */
85
- float: { title: 'kol-float-sheet', lede: 'kol-float-body text-fg-64', eyebrow: 'kol-float-ruler text-fg-64', gap: 'gap-2', mb: '24px' },
86
80
  }
87
81
 
88
- export default function SectionText({
82
+ function SectionTextDefault({
89
83
  eyebrow,
90
84
  label,
91
85
  headline,
@@ -166,7 +160,7 @@ export default function SectionText({
166
160
  const titleNode = headline && <Headline className={cls(`kol-section-text-headline ${headlineClass ?? (HEADLINE_ROLE[headlineSize] ?? HEADLINE_ROLE['heading-02'])}${headlineCase === 'upper' ? ' kol-section-text-caps' : ''}`, 'headline')} style={slotStyle.headline}>{headline}</Headline>
167
161
  /* `meta` rides the headline's row, at its far end */
168
162
  const headlineNode = titleNode && meta
169
- ? <div className="flex self-stretch items-baseline justify-between gap-6">{titleNode}<span className={`${variant === 'float' ? 'kol-float-timecode text-fg-64' : 'kol-mono-12 text-meta'} shrink-0`}>{meta}</span></div>
163
+ ? <div className="flex self-stretch items-baseline justify-between gap-6">{titleNode}<span className={`kol-mono-12 text-meta shrink-0`}>{meta}</span></div>
170
164
  : titleNode
171
165
  const bodyNode = body && (typeof body === 'string'
172
166
  ? <p className={cls(bodyClass, 'body')} style={slotStyle.body}>{body}</p>
@@ -219,3 +213,55 @@ export default function SectionText({
219
213
  </div>
220
214
  )
221
215
  }
216
+
217
+ /* kolbox's title row (W31.2 batch 5), below */
218
+ function SectionTextKolbox({ headline, menu, actions, className = '' }) {
219
+ /* kolbox (plan-2026-11-18-kolbox-system W31.2 batch 5, 2026-11-18): kolbox's BrowserTitleRow (Figma `BrowserTitleRow`),
220
+ * carried from apps/kolbox/src/home/BrowserTitleRow.jsx: 64 high, 12 under the top bar, inset 32; the 40 folder glyph,
221
+ * the `headline` (22 / 28, read off the Figma build) and its `menu` (the chevron node) at the left; `actions` (the
222
+ * filters and the view switch) at the right. Under 768 it wraps. */
223
+ return (
224
+ <div className={`kol-section-text--kolbox mt-3 flex h-16 shrink-0 items-center gap-4 px-8 max-md:h-auto max-md:flex-wrap max-md:gap-y-2 max-md:px-4 ${className}`.trim()} data-browser-title-row>
225
+ <KolboxGlyph name="folder" size={40} className="kol-section-text-glyph" />
226
+ <div className="flex min-w-0 flex-1 items-center gap-1 max-md:flex-wrap">
227
+ <h1 className="kol-section-text-title truncate">{headline}</h1>
228
+ {menu}
229
+ </div>
230
+ <div className="flex shrink-0 items-center gap-2 max-md:w-full max-md:flex-wrap">{actions}</div>
231
+ </div>
232
+ )
233
+ }
234
+
235
+ /* folio (Folio batch E, 2026-11-22): Folio's page titles and section heads, carried from apps/folio's FolioShelf (the
236
+ * shelf's title block and its numbered `Heading`) and FolioDocument (a chapter's and an article's head). The `eyebrow`
237
+ * in Folio's label over the `headline` over the `body`, muted; `children` (the document's date row) after the body.
238
+ * `headlineSize` is Folio's type step: `title` (the default, a page's), `chapter` or `section`; `headlineAs` h1 by
239
+ * default. `inline` (Folio's, no twin) sets the three on one baseline row, the numbered section head: the eyebrow its
240
+ * number, `meta` the quiet fact after the headline. `gap` is the rhythm and `slotClass.headline` the headline's extra
241
+ * classes (a title that carries the language flags lays them in a row), as in the default. */
242
+ const FOLIO_HEADLINE = { title: 'kol-folio-title', chapter: 'kol-folio-chapter', section: 'kol-folio-section' }
243
+ function SectionTextFolio({ eyebrow, label, headline, headlineSize = 'title', headlineAs: H = 'h1', body, meta, inline = false, gap = 'gap-[12px]', slotClass = {}, className = '', children }) {
244
+ const eb = eyebrow ?? label
245
+ if (inline) {
246
+ return (
247
+ <div className={`kol-section-text--folio flex items-baseline whitespace-nowrap ${gap} ${className}`.trim()}>
248
+ {eb != null && <p className="kol-folio-label kol-section-text-muted">{eb}</p>}
249
+ <H className={FOLIO_HEADLINE[headlineSize]}>{headline}</H>
250
+ {meta && <p className="kol-folio-meta kol-section-text-muted">{meta}</p>}
251
+ </div>
252
+ )
253
+ }
254
+ return (
255
+ <div className={`kol-section-text--folio flex flex-col ${gap} ${className}`.trim()}>
256
+ {eb != null && <p className="kol-folio-label kol-section-text-muted">{eb}</p>}
257
+ <H className={`${FOLIO_HEADLINE[headlineSize]} ${slotClass.headline ?? ''}`.trim()}>{headline}</H>
258
+ {body && <p className="kol-folio-body kol-section-text-muted">{body}</p>}
259
+ {children}
260
+ </div>
261
+ )
262
+ }
263
+
264
+ export default function SectionText(props) {
265
+ if (props.variant === 'folio') return <SectionTextFolio {...props} />
266
+ return props.variant === 'kolbox' ? <SectionTextKolbox {...props} /> : <SectionTextDefault {...props} />
267
+ }