@kolkrabbi/kol-component 0.92.0 → 0.92.1
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.92.
|
|
3
|
+
"version": "0.92.1",
|
|
4
4
|
"description": "KOL design-system components — atoms through organisms, emitting canonical kol-* classes. Pairs with @kolkrabbi/kol-theme for styling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -189,9 +189,15 @@ export default function ContentText({
|
|
|
189
189
|
* so a card that wants the whole excerpt simply does not pass it. */
|
|
190
190
|
const extra = (slot) => (slot === 'body' && clamp ? ` line-clamp-${clamp}` : '')
|
|
191
191
|
|
|
192
|
+
/* the title dim is BEHAVIOUR, not voice: a `titleClass` override replaces the
|
|
193
|
+
* ramp string whole (that is the seam's contract), and the hook was riding in
|
|
194
|
+
* that string — so Stack's uppercase display title lost its hover the moment
|
|
195
|
+
* it overrode the class (user 2026-08-27: "I had put A HOVER OPACITY drop,
|
|
196
|
+
* WHERE IS IT"). The hook is re-attached after the override. */
|
|
197
|
+
const hook = (slot) => (overrides[slot] && /\bkol-content-title-dim\b/.test(ramp[slot] ?? '') ? ' kol-content-title-dim' : '')
|
|
192
198
|
const line = (slot) =>
|
|
193
199
|
values[slot] == null ? null : (
|
|
194
|
-
<div key={slot} className={`${overrides[slot] ?? ramp[slot] ?? ''}${extra(slot)}`.trim()}>{values[slot]}</div>
|
|
200
|
+
<div key={slot} className={`${overrides[slot] ?? ramp[slot] ?? ''}${extra(slot)}${hook(slot)}`.trim()}>{values[slot]}</div>
|
|
195
201
|
)
|
|
196
202
|
|
|
197
203
|
/* RECURSIVE (2026-08-15) — an entry inside a line/between/group may itself be
|
|
@@ -25,6 +25,9 @@ import IconFrame from '../atoms/IconFrame.jsx'
|
|
|
25
25
|
* @param {string} props.layout — controlled LIST/GRID value (kol-r2b2 2026-08-27: a consumer that persists
|
|
26
26
|
* layout per bucket needs the strip's value back; `defaultLayout` alone kept it internal)
|
|
27
27
|
* @param {Function} props.onLayoutChange — (layout) => void, fires on every strip click
|
|
28
|
+
* @param {ReactNode} props.trailingActions — the header's RIGHT slot, where the view strip sits
|
|
29
|
+
* (kol-r2b2 2026-08-27: a consumer's own controls — sort, flat, select — belong there;
|
|
30
|
+
* `headerActions` is the left group beside search and was never that)
|
|
28
31
|
* @param {Function} props.onFilterChange — optional callback when filters change
|
|
29
32
|
* @param {Array} props.mutuallyExclusiveFilters — filter keys that should be mutually exclusive
|
|
30
33
|
* @param {Array} props.customFilterKeys — filter keys handled by renderItem, not by ContentFilters
|
|
@@ -80,6 +83,7 @@ const ContentFilters = ({
|
|
|
80
83
|
customFilterKeys = [],
|
|
81
84
|
searchKeys = ['label', 'name', 'title', 'type'],
|
|
82
85
|
headerActions,
|
|
86
|
+
trailingActions,
|
|
83
87
|
showCountOnlyWhenFiltering = false,
|
|
84
88
|
iconComponent,
|
|
85
89
|
className = '',
|
|
@@ -218,8 +222,10 @@ const ContentFilters = ({
|
|
|
218
222
|
{layoutOptions.map((opt) => (
|
|
219
223
|
<span
|
|
220
224
|
key={opt.value}
|
|
221
|
-
onClick={() => setLayout(opt.value)}
|
|
222
|
-
|
|
225
|
+
onClick={opt.onClick ?? (() => setLayout(opt.value))}
|
|
226
|
+
aria-pressed={opt.active !== undefined ? !!opt.active : undefined}
|
|
227
|
+
title={opt.title}
|
|
228
|
+
className={`${layoutClassName} cursor-pointer select-none ${(opt.active ?? layout === opt.value) ? stripActiveClassName : stripRestClassName}`}
|
|
223
229
|
style={{ letterSpacing: 1 }}
|
|
224
230
|
>
|
|
225
231
|
{opt.label}
|
|
@@ -360,6 +366,7 @@ const ContentFilters = ({
|
|
|
360
366
|
</div>
|
|
361
367
|
|
|
362
368
|
<div className="flex items-center gap-8">
|
|
369
|
+
{trailingActions}
|
|
363
370
|
{layoutPlacement === 'header' && layoutStrip}
|
|
364
371
|
{/* RECENT / SAVED is the SAME STRIP as LIST / GRID, not a ViewToggle.
|
|
365
372
|
* Read off kol-monitor's original (_tmp/2026-08-15-shell-adoption/
|