@kolkrabbi/kol-component 0.232.0 → 0.234.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 +5 -5
- package/src/atoms/ActionButton.jsx +1 -1
- package/src/atoms/AnimatedTitle.jsx +1 -1
- package/src/atoms/AudioPlayer.jsx +1 -1
- package/src/atoms/Avatar.jsx +1 -1
- package/src/atoms/Badge.jsx +1 -1
- package/src/atoms/Figure.jsx +1 -1
- package/src/atoms/FileIcon.jsx +1 -1
- package/src/atoms/Kbd.jsx +1 -1
- package/src/atoms/Pill.jsx +1 -1
- package/src/atoms/Tag.jsx +12 -1
- package/src/atoms/Textarea.jsx +2 -2
- package/src/atoms/ToggleSwitch.jsx +1 -1
- package/src/atoms/XYPad.jsx +1 -1
- package/src/molecules/AlignmentGrid.jsx +1 -1
- package/src/molecules/AudioSheet.jsx +1 -1
- package/src/molecules/CodeBlock.jsx +1 -1
- package/src/molecules/ColorRamp.jsx +1 -1
- package/src/molecules/ContentItem.jsx +1 -1
- package/src/molecules/ContentRow.jsx +1 -1
- package/src/molecules/CopyButton.jsx +1 -1
- package/src/molecules/DocFrontmatter.jsx +1 -1
- package/src/molecules/DocPage.jsx +1 -1
- package/src/molecules/DocsToc.jsx +1 -1
- package/src/molecules/Dropdown.jsx +1 -1
- package/src/molecules/DropdownTagFilter.jsx +1 -0
- package/src/molecules/EmptyState.jsx +1 -1
- package/src/molecules/FieldRow.jsx +1 -2
- package/src/molecules/ImageBlock.jsx +1 -1
- package/src/molecules/KindPreview.jsx +1 -1
- package/src/molecules/MediaTile.jsx +2 -2
- package/src/molecules/MenuPopover.jsx +1 -1
- package/src/molecules/OptionRow.jsx +29 -20
- package/src/molecules/PageHeader.jsx +1 -1
- package/src/molecules/PlaybackBar.jsx +1 -1
- package/src/molecules/ProfileCard.jsx +1 -1
- package/src/molecules/QuantityInput.jsx +1 -1
- package/src/molecules/QuickLookFrame.jsx +1 -1
- package/src/molecules/RowMenuButton.jsx +1 -1
- package/src/molecules/SectionText.jsx +1 -1
- package/src/molecules/ShapeDropdown.jsx +1 -1
- package/src/molecules/ShellDrawer.jsx +1 -1
- package/src/molecules/SortControls.jsx +1 -1
- package/src/molecules/SpecList.jsx +1 -1
- package/src/molecules/SplitToolButton.jsx +2 -2
- package/src/molecules/Stepper.jsx +1 -1
- package/src/molecules/SwatchControls.jsx +2 -2
- package/src/molecules/TabsRow.jsx +1 -1
- package/src/molecules/TiltBento.jsx +1 -1
- package/src/molecules/VideoBlock.jsx +1 -1
- package/src/molecules/VideoSheet.jsx +1 -1
- package/src/organisms/Canvas.jsx +3 -3
- package/src/organisms/ColumnBrowser.jsx +14 -8
- package/src/organisms/ContentCollection.jsx +1 -1
- package/src/organisms/CurveEditor.jsx +1 -1
- package/src/organisms/DocumentEditor.jsx +1 -1
- package/src/organisms/FeaturedCarousel.jsx +1 -1
- package/src/organisms/FramedMediaBand.jsx +1 -1
- package/src/organisms/GalleryCarousel.jsx +1 -1
- package/src/organisms/KeyframeEditor.jsx +1 -1
- package/src/organisms/LayerStack.jsx +2 -2
- package/src/organisms/MediaLibrary.jsx +2 -2
- package/src/organisms/MediaLibraryExplorer.jsx +1 -1
- package/src/organisms/MediaLibraryPages.jsx +16 -14
- package/src/organisms/MediaTileGallery.jsx +1 -1
- package/src/organisms/RecordManager.jsx +1 -1
- package/src/organisms/SectionCards.jsx +1 -1
- package/src/organisms/SectionCta.jsx +1 -1
- package/src/organisms/SectionFaq.jsx +1 -1
- package/src/organisms/SectionHero.jsx +1 -1
- package/src/organisms/SectionNewsletter.jsx +1 -1
- package/src/organisms/SectionSplit.jsx +1 -1
- package/src/organisms/SettingsPanel.jsx +8 -8
- package/src/organisms/ShellSearchOverlay.jsx +1 -1
- package/src/organisms/ShortcutsOverlay.jsx +1 -1
- package/src/organisms/SpectrumControls.jsx +4 -4
- package/src/organisms/SpectrumGrid.jsx +1 -1
- package/src/organisms/ToolPalette.jsx +1 -1
- package/src/utilities/AsciiCursor.jsx +1 -1
- package/src/utilities/AssetGrid.jsx +1 -1
- package/src/utilities/ButtonGroup.jsx +1 -1
- package/src/utilities/CropOverlay.jsx +1 -1
- package/src/utilities/CurveOverlay.jsx +1 -1
- package/src/utilities/ErrorBoundary.jsx +1 -1
- package/src/utilities/ExitPreview.jsx +1 -1
- package/src/utilities/FullscreenOverlay.jsx +1 -1
- package/src/utilities/OverlayGlassPanel.jsx +1 -1
- package/src/utilities/Popover.jsx +1 -1
- package/src/utilities/ProsePreview.jsx +1 -1
- package/src/utilities/TiltCard.jsx +1 -1
- package/src/utilities/TransparentX.jsx +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-component",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.234.0",
|
|
4
|
+
"description": "The core component library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./src/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"embla-carousel-react": "^8.6.0",
|
|
26
26
|
"pdfjs-dist": "^6.3.289",
|
|
27
27
|
"react-syntax-highlighter": "^16.1.1",
|
|
28
|
-
"@kolkrabbi/kol-
|
|
29
|
-
"@kolkrabbi/kol-
|
|
28
|
+
"@kolkrabbi/kol-markdown": "^0.1.2",
|
|
29
|
+
"@kolkrabbi/kol-search": "^0.2.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@kolkrabbi/kol-icons": ">=0.22.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"react-dom": "^18.3.0 || ^19.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@kolkrabbi/kol-icons": "^0.
|
|
40
|
+
"@kolkrabbi/kol-icons": "^0.32.0"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"src",
|
|
@@ -6,7 +6,7 @@ import { glyphSize } from '../hooks/glyphLadders.js'
|
|
|
6
6
|
import { Tooltip } from '../utilities/Popover.jsx'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* ActionButton — an icon control that CONFIRMS what it did (2026-08-15 user
|
|
9
|
+
* ActionButton — An icon button that confirms what it did. an icon control that CONFIRMS what it did (2026-08-15 user
|
|
10
10
|
* ruling: *"where is the 'code copied' or whatever message"*).
|
|
11
11
|
*
|
|
12
12
|
* The confirm-flip existed exactly once, welded to the clipboard inside
|
|
@@ -6,7 +6,7 @@ import usePrefersReducedMotion from '../hooks/usePrefersReducedMotion.js'
|
|
|
6
6
|
gsap.registerPlugin(ScrollTrigger)
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* AnimatedTitle — scroll-triggered heading that reveals its words one by
|
|
9
|
+
* AnimatedTitle — A heading whose words fly in on scroll. scroll-triggered heading that reveals its words one by
|
|
10
10
|
* one as it scrolls into view: each word starts far off-screen right,
|
|
11
11
|
* rotated in 3D, and flies into place with a fast stagger (GSAP +
|
|
12
12
|
* ScrollTrigger; plays entering the viewport, reverses scrolling back
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AudioPlayer — the interactive audio atom: one native <audio> with the UA's
|
|
2
|
+
* AudioPlayer — A native audio player with a label. the interactive audio atom: one native <audio> with the UA's
|
|
3
3
|
* own control strip, and an optional label line above it.
|
|
4
4
|
*
|
|
5
5
|
* WHY IT EXISTS. Audio was the one media kind the design system had nothing for,
|
package/src/atoms/Avatar.jsx
CHANGED
|
@@ -8,7 +8,7 @@ const SIZE_MAP = {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Avatar — the initials disc, or a photo at the same geometry.
|
|
11
|
+
* Avatar — Initials or a photo in a disc. the initials disc, or a photo at the same geometry.
|
|
12
12
|
*
|
|
13
13
|
* `src` was added when the ArticleHeader reconciliation (2026-08-15) found the
|
|
14
14
|
* consumer hand-rolling `<img className="w-12 h-12 rounded-full object-cover">`
|
package/src/atoms/Badge.jsx
CHANGED
package/src/atoms/Figure.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Figure — the shared caption'd media shell for long-form prose: optional
|
|
2
|
+
* Figure — Captioned media for long-form prose. the shared caption'd media shell for long-form prose: optional
|
|
3
3
|
* label above, an aspect-locked bordered frame around `children`, optional
|
|
4
4
|
* figcaption below. ImageBlock and VideoBlock (and the portable-text image
|
|
5
5
|
* renderer) all compose this one shell.
|
package/src/atoms/FileIcon.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* FileIcon — the file as a page: folded corner, the kind's glyph, the extension under it.
|
|
4
|
+
* FileIcon — A file drawn as a page. the file as a page: folded corner, the kind's glyph, the extension under it.
|
|
5
5
|
* Finder's generic document icon (user 2026-09-23: *"a generic preview for that like wav and
|
|
6
6
|
* the type below that finder has"*). What a file shows when it has nothing of its own to draw:
|
|
7
7
|
* audio without cover art, an empty file, a kind no renderer handles.
|
package/src/atoms/Kbd.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Kbd — a key cap: one key or chord (↵, ⌘K, Esc) shown as an affordance.
|
|
2
|
+
* Kbd — A key cap for a shortcut. a key cap: one key or chord (↵, ⌘K, Esc) shown as an affordance.
|
|
3
3
|
* Replaces the two hand-rolled <kbd> chips (SearchInput's shortcut hint and
|
|
4
4
|
* the palette footer) that had drifted apart (2026-09-30). A plate, so it
|
|
5
5
|
* takes oq — never fg (icons-use-oq law).
|
package/src/atoms/Pill.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pill — the STATIC chip: a label, category, or status word. Not clickable.
|
|
2
|
+
* Pill — A static label chip. the STATIC chip: a label, category, or status word. Not clickable.
|
|
3
3
|
*
|
|
4
4
|
* The chip family, so the right one gets reached for (documented at source,
|
|
5
5
|
* 2026-07-30):
|
package/src/atoms/Tag.jsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
2
2
|
|
|
3
3
|
const ICON_SIZES = { xs: 8, sm: 10, md: 12, lg: 14 }
|
|
4
|
+
const PALETTE = new Set(['blue', 'teal', 'green', 'yellow', 'red', 'orange', 'purple'])
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
* Tag — the INTERACTIVE chip: filterable, selectable, removable.
|
|
7
|
+
* Tag — An interactive chip to filter or select. the INTERACTIVE chip: filterable, selectable, removable.
|
|
7
8
|
*
|
|
8
9
|
* The chip family (documented at source, 2026-07-30):
|
|
9
10
|
* Pill — static label. No states, no handlers. Reach for this for decoration.
|
|
@@ -53,9 +54,17 @@ export default function Tag({
|
|
|
53
54
|
icon,
|
|
54
55
|
onRemove,
|
|
55
56
|
onClick,
|
|
57
|
+
color,
|
|
56
58
|
className = '',
|
|
59
|
+
style,
|
|
57
60
|
...props
|
|
58
61
|
}) {
|
|
62
|
+
/* COLOR (the showcase review W17, 2026-09-30 — user: "do we hate color? there is no tag colors, no
|
|
63
|
+
* active error warning nothing"). A palette key (blue · teal · green · yellow · red · orange · purple,
|
|
64
|
+
* what kol-markdown's getTagColor returns). It sets one hue the variant's fill and ink mix from, so
|
|
65
|
+
* hover and active stay the variant's own; `dark` and unknown keys stay neutral. Status is Badge's
|
|
66
|
+
* job (success · warning · error · info), not a Tag color. */
|
|
67
|
+
const hue = PALETTE.has(color) ? `var(--kol-palette-${color})` : null
|
|
59
68
|
const isInteractive = !!(onClick || onRemove)
|
|
60
69
|
const Element = isInteractive ? 'button' : 'span'
|
|
61
70
|
const iconSize = ICON_SIZES[size] || 12
|
|
@@ -84,6 +93,7 @@ export default function Tag({
|
|
|
84
93
|
VARIANTS[variant] ?? VARIANTS.primary,
|
|
85
94
|
`kol-tag--${size}`,
|
|
86
95
|
active ? 'is-active' : '',
|
|
96
|
+
hue ? 'kol-tag--hue' : '',
|
|
87
97
|
className
|
|
88
98
|
].filter(Boolean).join(' ')
|
|
89
99
|
|
|
@@ -97,6 +107,7 @@ export default function Tag({
|
|
|
97
107
|
{...props}
|
|
98
108
|
type={isInteractive ? 'button' : undefined}
|
|
99
109
|
className={classes}
|
|
110
|
+
style={hue ? { ...style, '--kol-tag-hue': hue } : style}
|
|
100
111
|
onClick={onClick}
|
|
101
112
|
>
|
|
102
113
|
{icon && <Icon name={icon} size={iconSize} />}
|
package/src/atoms/Textarea.jsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Textarea — multi-line text atom built on the .kol-control shell with the
|
|
5
|
+
* Textarea — Multi-line text input. multi-line text atom built on the .kol-control shell with the
|
|
6
6
|
* `--textarea` modifier (display: block).
|
|
7
7
|
*
|
|
8
8
|
* variant="filled" (default) — persistent solid bg
|
|
@@ -14,7 +14,7 @@ import { Icon } from '@kolkrabbi/kol-icons'
|
|
|
14
14
|
* Default rows = 3 (kept short — long content gets scrollbars instead of
|
|
15
15
|
* dominating the panel). Resize is real (2026-07-08): native resize is
|
|
16
16
|
* OFF (Firefox's built-in grip cannot be hidden any other way) and the
|
|
17
|
-
* kol-icon-set-
|
|
17
|
+
* kol-icon-set-interface `resize-grip` icon IS the drag handle — corner drag,
|
|
18
18
|
* min 120×40. One grip, every browser.
|
|
19
19
|
*
|
|
20
20
|
* The X-drag is container-clamped (2026-08-12, TextareaResizeClamp): the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* ToggleSwitch — bare by default (2026-07-08 chrome law rewrite).
|
|
4
|
+
* ToggleSwitch — An on/off switch. bare by default (2026-07-08 chrome law rewrite).
|
|
5
5
|
*
|
|
6
6
|
* variant="bare" (default) — label + track, no box
|
|
7
7
|
* variant="primary" — filled shell (surface-secondary), button geometry
|
package/src/atoms/XYPad.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef } from 'react'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* XYPad — a two-axis control pad: drag one puck to vary two values at once.
|
|
4
|
+
* XYPad — Drag one puck to set two values. a two-axis control pad: drag one puck to vary two values at once.
|
|
5
5
|
*
|
|
6
6
|
* Lifted verbatim from kol-fxr's editor (`compose/inspectors/XYPad.jsx`,
|
|
7
7
|
* `editor-panels-the-held-specs` A6, 2026-09-03 — the row the filer marked
|
|
@@ -3,7 +3,7 @@ import SegmentedToggle from '../atoms/SegmentedToggle.jsx'
|
|
|
3
3
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* AlignmentGrid — the align control: TWO three-way strips, X and Y.
|
|
6
|
+
* AlignmentGrid — Align on X and Y. the align control: TWO three-way strips, X and Y.
|
|
7
7
|
*
|
|
8
8
|
* Rebuilt on `SegmentedToggle` 2026-09-03 (`editor-chrome-review`, the user's
|
|
9
9
|
* own pass over the running editor: *"alignment isnt using segmentedtoggle?"*).
|
|
@@ -18,7 +18,7 @@ function useCover(src) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
* AudioSheet — audio in the Quick Look window, Finder's layout (user 2026-09-23, the reference
|
|
21
|
+
* AudioSheet — Audio in the preview window. audio in the Quick Look window, Finder's layout (user 2026-09-23, the reference
|
|
22
22
|
* shot): the artwork square left, `Time: mm:ss` beside it, the QuickTime bar docked in the
|
|
23
23
|
* window's footer. Artwork = the file's embedded ID3 `APIC` cover (`readCover`); no cover →
|
|
24
24
|
* `FileIcon`, the same page the tile shows. The `cover` / `sheet` variants are gone — there is
|
|
@@ -3,7 +3,7 @@ import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism'
|
|
|
3
3
|
import CopyButton from './CopyButton.jsx'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* CodeBlock — REPLICATED from the elder reference
|
|
6
|
+
* CodeBlock — Highlighted code with a copy button. REPLICATED from the elder reference
|
|
7
7
|
* (kol-website/packages/ui/src/molecules/CodeBlock.jsx, 2026-07-28 user
|
|
8
8
|
* mandate): react-syntax-highlighter (Prism) with the oneDark theme flattened
|
|
9
9
|
* onto KOL chrome — transparent bg, 14px/1.6 mono, no text-shadow — a single
|
|
@@ -3,7 +3,7 @@ import ColorSwatch from '../atoms/ColorSwatch.jsx'
|
|
|
3
3
|
import { resolveCssVar, isLight } from '../hooks/cssVar.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* ColorRamp — one specimen row of color chips for a token-doc page. A label
|
|
6
|
+
* ColorRamp — One row of color chips. one specimen row of color chips for a token-doc page. A label
|
|
7
7
|
* (+ optional note) above a run of ColorSwatch chips, each captioned with its
|
|
8
8
|
* name and resolved value. Merges the former Ramp (static hex) + ColorRamp
|
|
9
9
|
* (live CSS var) widgets into one component with two mutually-exclusive inputs:
|
|
@@ -2,7 +2,7 @@ import ContentCard from './ContentCard.jsx'
|
|
|
2
2
|
import ContentRow from './ContentRow.jsx'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* ContentItem — the form switch the estate hand-wrote nine times
|
|
5
|
+
* ContentItem — A card or a row by layout. the form switch the estate hand-wrote nine times
|
|
6
6
|
* (`layout === 'list' ? row : card`). One prop picks the form; everything
|
|
7
7
|
* else passes through to ContentCard / ContentRow unchanged, so a listing
|
|
8
8
|
* under a LIST/GRID toggle is one component with one prop flipped.
|
|
@@ -2,7 +2,7 @@ import ContentMedia from './ContentMedia.jsx'
|
|
|
2
2
|
import ContentText from './ContentText.jsx'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* ContentRow — the row form of the content-card system: leading thumb (where
|
|
5
|
+
* ContentRow — The row form of a content card. the row form of the content-card system: leading thumb (where
|
|
6
6
|
* the variant has one) beside the ruled text. Box values — thumb size, gap,
|
|
7
7
|
* padding, frame — default per variant to the RULED structures from the live
|
|
8
8
|
* review (06-content-card-system.md §2 boxes): default is a bare table-like
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ActionButton from '../atoms/ActionButton.jsx'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* CopyButton — THE copy-to-clipboard control (2026-08-09 user ruling): the
|
|
4
|
+
* CopyButton — Copy text to the clipboard. THE copy-to-clipboard control (2026-08-09 user ruling): the
|
|
5
5
|
* 32×32 icon button — `copy` glyph flipping to `check` for 2s on copied,
|
|
6
6
|
* no text label. This is the button CodeBlock carried privately since the
|
|
7
7
|
* 2026-07-28 elder replication, promoted to the one shared atom; the old
|
|
@@ -50,7 +50,7 @@ const orderFields = (metadata) => {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* DocFrontmatter — the frontmatter block above a markdown document's prose: the
|
|
53
|
+
* DocFrontmatter — A document's frontmatter block. the frontmatter block above a markdown document's prose: the
|
|
54
54
|
* `FRONTMATTER` eyebrow, icon + label keys, mono values, tags as `Tag` chips,
|
|
55
55
|
* arrays stacked, a hairline below. A member of `DocPage`.
|
|
56
56
|
*
|
|
@@ -3,7 +3,7 @@ import DocFrontmatter from './DocFrontmatter.jsx'
|
|
|
3
3
|
/* taxonomy-ok: molecule — nests DocFrontmatter (relative). */
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* DocPage — ONE plate for every document (DocPageAndKindShowcase, kol-r2b2
|
|
6
|
+
* DocPage — A page for any text document. ONE plate for every document (DocPageAndKindShowcase, kol-r2b2
|
|
7
7
|
* 2026-08-27, user ruling): markdown · text · code · JSON · YAML render on the
|
|
8
8
|
* same page. Where it sits decides its presentation, in kol-theme (≥0.75.0):
|
|
9
9
|
*
|
|
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useRef } from 'react'
|
|
|
2
2
|
import useScrollSpy from '../hooks/useScrollSpy.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* DocsToc — on-page table of contents for long docs pages: a flat list of
|
|
5
|
+
* DocsToc — A page's table of contents. on-page table of contents for long docs pages: a flat list of
|
|
6
6
|
* anchor links that highlights the heading currently in view. The scroll
|
|
7
7
|
* spy is useScrollSpy (IntersectionObserver + edge lock); this component
|
|
8
8
|
* only renders the nav and maps the active id onto the links.
|
|
@@ -6,7 +6,7 @@ import { PopoverPanel, usePopover } from '../utilities/Popover.jsx'
|
|
|
6
6
|
import { glyphSize, indicatorSize } from '../hooks/glyphLadders.js'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Dropdown — trigger IS button chrome (2026-07-08 chrome law).
|
|
9
|
+
* Dropdown — Pick one value from a list. trigger IS button chrome (2026-07-08 chrome law).
|
|
10
10
|
*
|
|
11
11
|
* The trigger emits `kol-btn kol-btn-{variant} kol-btn-{size}` so it renders
|
|
12
12
|
* pixel-identical to a Button of the same variant/size — fills, hover,
|
|
@@ -7,6 +7,7 @@ const SIZE_MAP = {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
+
* @deprecated 2026-10-01 — use SettingsMulti (a many-of-N `Dropdown`). Drops when nobody imports it (04-retirements.md).
|
|
10
11
|
* Dropdown Tag Filter
|
|
11
12
|
* Multi-select dropdown where all items start selected
|
|
12
13
|
* Click to deselect, with "Deselect All" option
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EmptyState — a stacked "nothing here yet / nothing selected" text block
|
|
2
|
+
* EmptyState — What a panel shows when it has nothing. a stacked "nothing here yet / nothing selected" text block
|
|
3
3
|
* for inspectors, empty rails and unshipped panels. Ported from the brand
|
|
4
4
|
* editor's inspector Placeholder (renamed: AssetPlaceholder already owns
|
|
5
5
|
* the placeholder name). All lines render as authored — no auto casing
|
|
@@ -6,7 +6,7 @@ import Dropdown from './Dropdown'
|
|
|
6
6
|
import OptionRow from './OptionRow.jsx'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* FieldRow — one labeled field row in a record surface (lobby: RecordManager).
|
|
9
|
+
* FieldRow — One labelled field in a record. one labeled field row in a record surface (lobby: RecordManager).
|
|
10
10
|
* Label column left, control right; `type` picks the control:
|
|
11
11
|
*
|
|
12
12
|
* text → Input, with an optional hint line under it (the slug's derived URL)
|
|
@@ -100,7 +100,6 @@ export function StatusChip({ value, options = [], onChange, variant = 'neutral',
|
|
|
100
100
|
role="option"
|
|
101
101
|
aria-selected={val === value}
|
|
102
102
|
size="sm"
|
|
103
|
-
selected={val === value}
|
|
104
103
|
className="w-full"
|
|
105
104
|
onClick={() => {
|
|
106
105
|
onChange?.(val)
|
|
@@ -2,7 +2,7 @@ import Figure from '../atoms/Figure.jsx'
|
|
|
2
2
|
import Image from '../atoms/Image.jsx'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* ImageBlock — a captioned prose image: the DS Figure shell (optional label,
|
|
5
|
+
* ImageBlock — A captioned image for prose. a captioned prose image: the DS Figure shell (optional label,
|
|
6
6
|
* aspect-locked bordered frame, optional figcaption) wrapping a cover-fit DS
|
|
7
7
|
* Image. The long-form counterpart to VideoBlock — both compose the same
|
|
8
8
|
* Figure atom, so the frame chrome lives in one place.
|
|
@@ -13,7 +13,7 @@ import DocPage from './DocPage.jsx'
|
|
|
13
13
|
/* taxonomy-ok: molecule — nests the DS media atoms + CodeBlock (relative). */
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
* KindPreview — a preview for any kind of file: kol-r2b2's `KindPreview.jsx`,
|
|
16
|
+
* KindPreview — A preview for any kind of file. a preview for any kind of file: kol-r2b2's `KindPreview.jsx`,
|
|
17
17
|
* promoted 2026-08-27 (SettingsPanelChromeAndColumnPreview). Before it, anything
|
|
18
18
|
* that was not an image or a video showed a grey box with the word "text".
|
|
19
19
|
* HLS → `HlsVideo` (inert — the DS's background-video atom, preview only),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import RowMenuButton from './RowMenuButton.jsx'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* MediaTile — one file in the grid view, Finder's icon view (user 2026-09-23: *"skip the container
|
|
5
|
+
* MediaTile — One file in the grid view. one file in the grid view, Finder's icon view (user 2026-09-23: *"skip the container
|
|
6
6
|
* card, just show the title and preview, give it hilight focus state … we are fighting the card
|
|
7
7
|
* component"*). The grid borrowed `ContentCard` from the content-filters set — a card with a date,
|
|
8
8
|
* a size and two buttons — so the one view of files that should read like the other two carried
|
|
@@ -28,7 +28,7 @@ export default function MediaTile({ preview, name, selected = false, markKey, on
|
|
|
28
28
|
onContextMenu={onContextMenu}
|
|
29
29
|
onKeyDown={(e) => { if (e.key === 'Enter') { e.preventDefault(); onDoubleClick?.(e) } }}>
|
|
30
30
|
<div className="kol-media-tile-thumb">{preview}</div>
|
|
31
|
-
<span className="kol-media-tile-name">{name}</span>
|
|
31
|
+
<span className="kol-media-tile-name kol-item-name">{name}</span>
|
|
32
32
|
<RowMenuButton variant="grey" onOpen={onContextMenu} className="absolute top-1 right-1" />
|
|
33
33
|
</div>
|
|
34
34
|
)
|
|
@@ -2,7 +2,7 @@ import { MenuItem as MenuTrigger } from './MenuItem.jsx'
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated 2026-07-02 — alias of MenuItem (menu-family unify). Drops when nobody imports it (04-retirements.md).
|
|
5
|
-
* MenuPopover — DEPRECATED alias of MenuItem (2026-07-02 menu-family
|
|
5
|
+
* MenuPopover — Old name for MenuItem. DEPRECATED alias of MenuItem (2026-07-02 menu-family
|
|
6
6
|
* unification).
|
|
7
7
|
*
|
|
8
8
|
* The two triggers had an identical API (label, children incl. ({ close })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OptionRow — one row in a list you move through: the palette's results, a browser's rows, a
|
|
2
|
+
* OptionRow — One row in a list you move through. one row in a list you move through: the palette's results, a browser's rows, a
|
|
3
3
|
* dropdown's options. Lifted out of ShellSearchOverlay (2026-09-30), where it was hand-rolled next to
|
|
4
4
|
* DropdownTagFilter's, FieldRow's and ColumnBrowser's own — four rows for one job.
|
|
5
5
|
*
|
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
* transparent ring, so a row lines up with the field or button beside it at the same size.
|
|
8
8
|
*
|
|
9
9
|
* States, strongest first:
|
|
10
|
+
* selected — the picked item: the tone's PRESSED fill (white in dark, as the grid's picked name)
|
|
10
11
|
* active — the keyboard cursor / hover: the tone fill, full ink
|
|
11
|
-
*
|
|
12
|
-
* trail — on the path to the picked item (a browser's parent folders): oq-04
|
|
12
|
+
* trail — on the path to the picked item (a browser's parent folders): oq-08
|
|
13
13
|
*
|
|
14
14
|
* Renders no role — the caller owns the list semantics (`role="option"`, `aria-selected`, ids)
|
|
15
15
|
* and passes them through `...rest`.
|
|
16
16
|
*
|
|
17
17
|
* @param {'xs'|'sm'|'md'|'lg'} size the control ramp step
|
|
18
|
+
* @param {string} type a type class instead of the ramp's (file lists: `kol-item-name`)
|
|
18
19
|
* @param {string} icon kol-icons name, drawn in oq (icons-use-oq law)
|
|
19
20
|
* @param {ReactNode} leading anything else in the icon column (a check, a thumb) — wins over icon
|
|
20
21
|
* @param {ReactNode} label
|
|
21
|
-
* @param {ReactNode} hint
|
|
22
|
+
* @param {ReactNode} hint secondary text — beside the label, right-aligned on its baseline
|
|
22
23
|
* @param {ReactNode} trailing right-aligned (a shortcut, a count, a menu button)
|
|
23
24
|
* @param {string} as element to render (`div` · `button` · `li`)
|
|
24
|
-
* @param {boolean}
|
|
25
|
-
* deepest-selection is decided in CSS by column); the ink still follows
|
|
25
|
+
* @param {boolean} hover false = hover paints nothing (the media browser's ruling, 2026-09-02)
|
|
26
26
|
* @param {boolean} muted a row that is there but not the point (fg-48)
|
|
27
27
|
*
|
|
28
|
-
* `ROW_HEIGHT` / `ROW_TYPE` are exported for a row that cannot take this anatomy (the
|
|
29
|
-
* view's table row: twisty, drag hit, columns) — it still sits on the same ramp.
|
|
28
|
+
* `ROW_HEIGHT` / `ROW_TYPE` / `ROW_FILL` are exported for a row that cannot take this anatomy (the
|
|
29
|
+
* media rows view's table row: twisty, drag hit, columns) — it still sits on the same ramp and fills.
|
|
30
30
|
*/
|
|
31
31
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
32
32
|
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
@@ -41,13 +41,24 @@ export const ROW_HEIGHT = {
|
|
|
41
41
|
}
|
|
42
42
|
export const ROW_TYPE = { xs: 'kol-mono-12', sm: 'kol-mono-12', md: 'kol-mono-14', lg: 'kol-mono-14' }
|
|
43
43
|
|
|
44
|
+
const TONE = 'bg-[var(--kol-tone-bg,var(--kol-surface-secondary))]'
|
|
45
|
+
/* SELECTED IS THE TONE'S PRESSED STATE (user 2026-09-30: *"use white as focused item like grid
|
|
46
|
+
* already does"*) — `--kol-tone-pressed-*`, the fill a pressed button takes; outside a tone, the
|
|
47
|
+
* same surface-on-primary / surface-primary pair the grid's picked name paints. */
|
|
48
|
+
export const ROW_FILL = {
|
|
49
|
+
selected: 'bg-[var(--kol-tone-pressed-bg,var(--kol-surface-on-primary))] text-[var(--kol-tone-pressed-fg,var(--kol-surface-primary))]',
|
|
50
|
+
active: `${TONE} text-fg`,
|
|
51
|
+
trail: 'bg-oq-08 text-fg',
|
|
52
|
+
}
|
|
53
|
+
|
|
44
54
|
export default function OptionRow({
|
|
45
55
|
as: Tag = 'div',
|
|
46
56
|
size = 'md',
|
|
57
|
+
type,
|
|
47
58
|
active = false,
|
|
48
59
|
selected = false,
|
|
49
60
|
trail = false,
|
|
50
|
-
|
|
61
|
+
hover = true,
|
|
51
62
|
muted = false,
|
|
52
63
|
icon,
|
|
53
64
|
leading,
|
|
@@ -58,23 +69,21 @@ export default function OptionRow({
|
|
|
58
69
|
children,
|
|
59
70
|
...rest
|
|
60
71
|
}) {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
* keyboard cursor gets the same look for free. `fill={false}` rows paint nothing (the columns) */
|
|
64
|
-
const bg = !paints ? '' : active
|
|
65
|
-
? 'bg-[var(--kol-tone-bg,var(--kol-surface-secondary))]'
|
|
66
|
-
: `${selected ? 'bg-oq-08' : trail ? 'bg-oq-04' : ''} hover:bg-[var(--kol-tone-bg,var(--kol-surface-secondary))]`
|
|
67
|
-
const fill = `${bg} ${lit ? 'text-fg' : muted ? 'text-fg-48' : 'text-fg-80'}`
|
|
72
|
+
const state = selected ? ROW_FILL.selected : active ? ROW_FILL.active : trail ? ROW_FILL.trail
|
|
73
|
+
: `${muted ? 'text-fg-48' : 'text-fg-80'}${hover ? ` hover:${TONE}` : ''}`
|
|
68
74
|
const lead = leading ?? (icon && <Icon name={icon} size={glyphSize(size)} />)
|
|
69
75
|
return (
|
|
70
76
|
<Tag
|
|
71
|
-
className={`flex items-center gap-2 px-4 border border-transparent ${ROW_HEIGHT[size] ?? ROW_HEIGHT.md} rounded-[var(--kol-radius-sm)] cursor-pointer text-left ${ROW_TYPE[size] ?? ROW_TYPE.md} transition-colors ${
|
|
77
|
+
className={`flex items-center gap-2 px-4 border border-transparent ${ROW_HEIGHT[size] ?? ROW_HEIGHT.md} rounded-[var(--kol-radius-sm)] cursor-pointer text-left ${type ?? ROW_TYPE[size] ?? ROW_TYPE.md} transition-colors ${state} ${className}`.trim()}
|
|
72
78
|
{...rest}
|
|
73
79
|
>
|
|
74
|
-
{
|
|
75
|
-
<span
|
|
80
|
+
{/* the glyph takes the row's ink when selected — a grey mark on a white fill reads as a hole */}
|
|
81
|
+
{lead && <span aria-hidden="true" className={`flex shrink-0${selected ? '' : ' text-oq-48'}`}>{lead}</span>}
|
|
82
|
+
{/* ONE LINE (user 2026-09-30): the hint sits beside the label on its baseline, right-aligned,
|
|
83
|
+
* so the names read as one column and a long name never pushes the path around */}
|
|
84
|
+
<span className="flex flex-1 items-baseline gap-3 min-w-0">
|
|
76
85
|
<span className="truncate">{label ?? children}</span>
|
|
77
|
-
{hint && <span className=
|
|
86
|
+
{hint && <span className={`kol-mono-12 ml-auto truncate${selected ? ' opacity-60' : ' text-fg-48'}`}>{hint}</span>}
|
|
78
87
|
</span>
|
|
79
88
|
{trailing && <span className="flex shrink-0 items-center">{trailing}</span>}
|
|
80
89
|
</Tag>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SectionText from './SectionText.jsx'
|
|
2
2
|
import { TITLE_ROLES, useMasthead } from '../utilities/masthead.js'
|
|
3
3
|
/**
|
|
4
|
-
* PageHeader — the page's masthead: an optional eyebrow, the title, and a
|
|
4
|
+
* PageHeader — The page masthead. the page's masthead: an optional eyebrow, the title, and a
|
|
5
5
|
* sub-line.
|
|
6
6
|
*
|
|
7
7
|
* LIVES IN kol-component SINCE 2026-09-03 (page-header-one-masthead,
|
|
@@ -11,7 +11,7 @@ export const clock = (s) => `${String(Math.floor((s || 0) / 60)).padStart(2, '0'
|
|
|
11
11
|
const RATES = [1, 1.5, 2]
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* PlaybackBar — the QuickTime bar, ruled against the reference (PlaybackBarAndAudioSheet,
|
|
14
|
+
* PlaybackBar — Play and scrub media. the QuickTime bar, ruled against the reference (PlaybackBarAndAudioSheet,
|
|
15
15
|
* kol-r2b2 2026-08-27; supersedes 0.107.0's strip): a frosted strip over media —
|
|
16
16
|
* `bg-fg-ab-48 backdrop-blur-xl`, **radius 12** (`rounded-xl`, the user's
|
|
17
17
|
* ruling on this surface — the 4px container law stands elsewhere), `h-16 px-8
|
|
@@ -9,7 +9,7 @@ import { surfaceClass } from '../utilities/sectionSurface.js'
|
|
|
9
9
|
* check can't see). */
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* ProfileCard — the digital namecard (ProfileCard, kol-website 2026-09-01;
|
|
12
|
+
* ProfileCard — A digital name card. the digital namecard (ProfileCard, kol-website 2026-09-01;
|
|
13
13
|
* carried class-for-class from `apps/web/src/components/ui/ProfileCard.jsx`):
|
|
14
14
|
* a square photo with a disclosure control inset on it, and a SHELF that opens
|
|
15
15
|
* under it (vertical) or beside it (horizontal) — logo, name, mailto, a rack of
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* QuantityInput — a compact integer quantity picker with two control layouts.
|
|
4
|
+
* QuantityInput — Pick a whole-number quantity. a compact integer quantity picker with two control layouts.
|
|
5
5
|
*
|
|
6
6
|
* controls="chevron" (default) — value with a stacked up/down chevron pair
|
|
7
7
|
* on the right, inside a full-width field.
|
|
@@ -5,7 +5,7 @@ import CloseButton from '../atoms/CloseButton.jsx'
|
|
|
5
5
|
/* taxonomy-ok: molecule — nests Button (atom) + CloseButton (utility). */
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* QuickLookFrame — the Finder Quick Look window (user 2026-09-23: *"put them in a container LIKE
|
|
8
|
+
* QuickLookFrame — The preview window. the Finder Quick Look window (user 2026-09-23: *"put them in a container LIKE
|
|
9
9
|
* FINDER … it just makes everything in the design easier to manage if its wrapped together"*).
|
|
10
10
|
* Every kind sat loose on the scrim with its own chrome — a caption line under a picture, a bar
|
|
11
11
|
* floating over a video, a see-through page — so no two kinds looked like one feature. One
|
|
@@ -3,7 +3,7 @@ import Button from '../atoms/Button.jsx'
|
|
|
3
3
|
import useCoarsePointer from '../hooks/useCoarsePointer.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* RowMenuButton — the `···` that stands in for right-click on a touch device (media D-touch,
|
|
6
|
+
* RowMenuButton — A row's menu on touch devices. the `···` that stands in for right-click on a touch device (media D-touch,
|
|
7
7
|
* 2026-09-23). A finger has no right button, and a held press (`useLongPress`) is invisible until
|
|
8
8
|
* you know it, so on `pointer: coarse` a row or tile that has a context menu wears this. It calls
|
|
9
9
|
* the SAME handler right-click calls, with the tap as the event, so the payload, the selection
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SectionText — the ruled text block of the SECTION family (SectionSet,
|
|
2
|
+
* SectionText — The label, headline and body block. the ruled text block of the SECTION family (SectionSet,
|
|
3
3
|
* kol-website 2026-08-26): label · headline · body · actions, every slot
|
|
4
4
|
* opt-in — an omitted slot renders nothing. The section-tier twin of
|
|
5
5
|
* ContentText: the card family solved "every organism types its own kicker /
|
|
@@ -5,7 +5,7 @@ import { PopoverPanel, usePopover, Tooltip } from '../utilities/Popover.jsx'
|
|
|
5
5
|
import { MenuDropdownItem } from './MenuItem.jsx'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* ShapeDropdown — split icon-button + variant-menu molecule (the tool-palette
|
|
8
|
+
* ShapeDropdown — A tool button with a shape menu. split icon-button + variant-menu molecule (the tool-palette
|
|
9
9
|
* idiom: Select · Text · [Shape ▾] · Pattern). The main button reflects the
|
|
10
10
|
* current variant and fires `onAction` with its id; the chevron half opens a
|
|
11
11
|
* menu of all variants — picking one fires `onChange` and closes.
|
|
@@ -12,7 +12,7 @@ const FOCUSABLE =
|
|
|
12
12
|
'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* ShellDrawer — THE edge drawer: a portalled panel that slides in from the
|
|
15
|
+
* ShellDrawer — A panel that slides in from an edge. THE edge drawer: a portalled panel that slides in from the
|
|
16
16
|
* left, right or BOTTOM viewport edge over a dimming backdrop. Distinct from Modal
|
|
17
17
|
* (centered prompt/confirm) and FullscreenOverlay (fills the whole viewport,
|
|
18
18
|
* not an edge sheet). Escape, backdrop click and the built-in close button
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import SortHeader from '../atoms/SortHeader.jsx'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* SortControls — the sortable-header group (ContentFiltersCollection, kol-r2b2
|
|
4
|
+
* SortControls — A row of sortable headers. the sortable-header group (ContentFiltersCollection, kol-r2b2
|
|
5
5
|
* 2026-08-27): `flex items-center gap-4` of SortHeaders. Click an inactive field
|
|
6
6
|
* → it becomes the sort, ASCENDING; click the active field → the direction
|
|
7
7
|
* flips. `onSort(field)` fires once per click — the consumer writes ONE state
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Divider from '../atoms/Divider.jsx'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* SpecList — compact definition list of [label | value] rows: label left and
|
|
4
|
+
* SpecList — Label and value rows. compact definition list of [label | value] rows: label left and
|
|
5
5
|
* muted, value right-aligned one tone brighter, Divider-separated between
|
|
6
6
|
* rows (never after the last). Data-agnostic "key facts" strip — the caller
|
|
7
7
|
* formats values before passing (e.g. "Limited (30)", "A3, A2, A1").
|