@kolkrabbi/kol-component 0.370.0 → 0.372.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.372.0",
|
|
4
4
|
"description": "The core component library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"pdfjs-dist": "^6.3.289",
|
|
34
34
|
"react-syntax-highlighter": "^16.1.1",
|
|
35
35
|
"@kolkrabbi/kol-search": "^0.3.0",
|
|
36
|
-
"@kolkrabbi/kol-
|
|
37
|
-
"@kolkrabbi/kol-
|
|
36
|
+
"@kolkrabbi/kol-markdown": "^0.2.0",
|
|
37
|
+
"@kolkrabbi/kol-growth": "^0.5.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@kolkrabbi/kol-icons": ">=0.69.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@kolkrabbi/kol-icons": "^0.
|
|
48
|
+
"@kolkrabbi/kol-icons": "^0.71.0"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"src",
|
package/src/index.js
CHANGED
|
@@ -180,7 +180,7 @@ export { default as ContentCollection } from './organisms/ContentCollection.jsx'
|
|
|
180
180
|
export { MenuItem, MenuRow, MenuDivider, MenuFlyout, MenuDropdownItem, MenuDropdownDivider, MenuDropdownNest } from './molecules/MenuItem.jsx'
|
|
181
181
|
export { Menu, MenuTrigger, MenuPanel, MenuLabel, MenuFilter, MenuDatePicker, MenuMore } from './molecules/Menu.jsx'
|
|
182
182
|
export { MenuList } from './molecules/MenuList.jsx'
|
|
183
|
-
export { ModalProvider, useModal, Dialog } from './molecules/Modal.jsx'
|
|
183
|
+
export { ModalProvider, useModal, ModalDialog, ModalDialog as Dialog } from './molecules/Modal.jsx'
|
|
184
184
|
export { default as ModalShell } from './molecules/ModalShell.jsx'
|
|
185
185
|
/* the generator settings window's controls (plan-2026-11-05-float-editor W7.2) — `Dialog variant="settings"`'s rows */
|
|
186
186
|
export {
|
|
@@ -24,7 +24,7 @@ export default function IndexRow({ title, cells = [], checked = false, onCheck,
|
|
|
24
24
|
onClick={onClick}
|
|
25
25
|
onKeyDown={onClick ? (e) => { if (e.key === 'Enter') onClick(e) } : undefined}
|
|
26
26
|
aria-selected={onClick ? selected : undefined}
|
|
27
|
-
className={`flex h-7 w-full items-center gap-3 rounded-[var(--kol-float-list-r)] px-2.5 ${onClick ? 'cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]' : ''} ${selected ? 'bg-fg-
|
|
27
|
+
className={`flex h-7 w-full items-center gap-3 rounded-[var(--kol-float-list-r)] px-2.5 ${onClick ? 'cursor-pointer focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)]' : ''} ${selected ? 'bg-fg-12' : 'hover:bg-fg-04'} ${className}`.trim()}
|
|
28
28
|
>
|
|
29
29
|
{onCheck && <span onClick={(e) => e.stopPropagation()} className="inline-flex shrink-0"><ToggleCheckbox variant="float" checked={checked} onChange={onCheck} aria-label="Done" /></span>}
|
|
30
30
|
<span className={`kol-float-hint min-w-0 flex-1 truncate ${checked ? 'text-fg-48' : 'text-fg-emphasis'}`}>{title}</span>
|
package/src/molecules/Modal.jsx
CHANGED
|
@@ -323,13 +323,13 @@ export function useModal() {
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
|
-
* Dialog — Modal's shell holding any content (MetricDashboardUpstream, kol-website 2026-10-31 — metric's filter and
|
|
326
|
+
* ModalDialog (was `Dialog`, renamed 2026-11-12; `Dialog` stays a deprecated alias) — Modal's shell holding any content (MetricDashboardUpstream, kol-website 2026-10-31 — metric's filter and
|
|
327
327
|
* segment dialogs). The same `.kol-overlay-scrim` + `.kol-modal` surface as the prompts above, with `children` in place
|
|
328
328
|
* of a prompt — both draw their panel through `ModalShell` (W2.1, 2026-11-08). **z 150, not Modal's 1000**, so KOL's portalled floats (z 210+) open ABOVE it — a Dropdown or Combobox
|
|
329
329
|
* inside a dialog has to show its list (a native `<dialog>` cannot: `showModal()` puts it in the top layer, over every
|
|
330
330
|
* portal). Esc and a press on the scrim close it; Esc is left to an open float inside first.
|
|
331
331
|
*
|
|
332
|
-
* <
|
|
332
|
+
* <ModalDialog open={open} onClose={() => setOpen(false)} title="Filter by page" width={560}>…</ModalDialog>
|
|
333
333
|
*
|
|
334
334
|
* `variant="float"` (float-everything W6 rows 83 · 84 · 89, 2026-11-04 — kol-float--style 46:2655): the float window —
|
|
335
335
|
* `kol-float-solid` on `--kol-float-window-r`, 24 in, 18 between its parts, the title drawn as `ModalHeader
|
|
@@ -358,7 +358,7 @@ export function useModal() {
|
|
|
358
358
|
* @param {string} [section] · @param {Function} [onSection]
|
|
359
359
|
* @param {ReactNode} [aside] · @param {ReactNode} [footer] · @param {number} [height=656]
|
|
360
360
|
*/
|
|
361
|
-
export function
|
|
361
|
+
export function ModalDialog({ open, onClose, title, width = 560, variant = 'lift', icon, onMinimise, blocking = true, container, kind, headerEnd, sections, section, onSection, aside, footer, height = 656, children }) {
|
|
362
362
|
const look = variant === 'settings' ? 'settings' : modalVariant(variant, 'lift')
|
|
363
363
|
const float = look === 'float'
|
|
364
364
|
useEffect(() => {
|
package/src/molecules/Slider.jsx
CHANGED
|
@@ -212,7 +212,7 @@ const Slider = ({
|
|
|
212
212
|
if (variant === 'dual') {
|
|
213
213
|
const v1 = value ?? min
|
|
214
214
|
const v2 = value2 ?? max
|
|
215
|
-
/* an empty label is no label: `label1="" label2=""` (SettingsRange,
|
|
215
|
+
/* an empty label is no label: `label1="" label2=""` (SettingsRange, RailSettings) drew an empty 16px row that pushed the rail low */
|
|
216
216
|
const showLabels = !!(label1 || label2)
|
|
217
217
|
const ratio = max > min ? (playhead - min) / (max - min) : 0
|
|
218
218
|
return row({ className: `control-slider gap-3 shadow-none ${className}`, style, children: <>
|
package/src/molecules/TocRow.jsx
CHANGED
|
@@ -20,7 +20,7 @@ export default function TocRow({ number, label, current = false, href, onClick,
|
|
|
20
20
|
{...(href ? { href } : { type: 'button' })}
|
|
21
21
|
onClick={onClick}
|
|
22
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-
|
|
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-12' : 'hover:bg-fg-04'} ${className}`.trim()}
|
|
24
24
|
>
|
|
25
25
|
{n != null && <span className="kol-float-ruler w-4 shrink-0 tabular-nums text-fg-64">{n}</span>}
|
|
26
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>
|
|
@@ -13,7 +13,7 @@ import { IconLoader } from '@kolkrabbi/kol-icons'
|
|
|
13
13
|
* lg 40 · glyph 18 · Inter 13 — the sidebar's nav item
|
|
14
14
|
*
|
|
15
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
|
+
* row to fg-12 with the emphasis ink (hover fg-04 — his LayerStack board pick C, 2026-11-12) (the selection rule — translucent, so glass shows through); `open` is the parent
|
|
17
17
|
* of the active row: the emphasis ink, no lift. `count` sits right in mono (`kol-float-ruler`, fg-64). A row with
|
|
18
18
|
* `expanded` defined draws the chevron at its end — right when shut, down when open — and `onToggle` is its press.
|
|
19
19
|
*
|
|
@@ -58,7 +58,7 @@ export default function TreeRow({ size = 'sm', icon, label, count, active = fals
|
|
|
58
58
|
onClick={onClick ?? (expanded !== undefined && !href ? onToggle : undefined)}
|
|
59
59
|
aria-current={active ? 'page' : undefined}
|
|
60
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-
|
|
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-12' : 'hover:bg-fg-04'} ${className}`.trim()}
|
|
62
62
|
style={{ paddingLeft: 10 + depth * 16 }}
|
|
63
63
|
{...rest}
|
|
64
64
|
>
|
|
@@ -1174,7 +1174,7 @@ function FloatPicker({ onClose, onPick, onImport, importLabel = 'Import', title
|
|
|
1174
1174
|
{files.map((o) => (
|
|
1175
1175
|
<li key={o.key}>
|
|
1176
1176
|
<button type="button" onClick={() => pick(o)} aria-pressed={picked === o.key}
|
|
1177
|
-
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-
|
|
1177
|
+
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-12' : 'hover:bg-fg-04'}`}>
|
|
1178
1178
|
<span className="h-[54px] w-11 shrink-0 overflow-hidden rounded-md bg-fg-08"><Thumb row={o} mediaUrl={mediaUrl} /></span>
|
|
1179
1179
|
<span className="flex min-w-0 flex-1 flex-col gap-0.5">
|
|
1180
1180
|
<span className="kol-float-hint truncate text-fg-emphasis" style={{ fontSize: 13 }}>{o.displayKey}</span>
|