@kolkrabbi/kol-component 0.91.3 → 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.
|
|
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/
|
|
@@ -120,7 +120,7 @@ function MediaLayer({ media }) {
|
|
|
120
120
|
* @param {ReactNode|{src, kind, poster, srcSet, alt}|Array} media background (media) / the half (split) / an ARRAY of slides → carousel
|
|
121
121
|
* @param {number} overlayOpacity 0–100 surface-primary scrim over the media (default 0)
|
|
122
122
|
* @param {boolean} veil bottom-heavy gradient over the media
|
|
123
|
-
* @param {'center'|'end'} justify content vertically centred, or pinned to the foot (with `foot
|
|
123
|
+
* @param {'center'|'end'} justify content vertically centred, or pinned to the foot (with `foot`: `overlap` + 32px, 48 from md — the text sits just above the card; without: the pb ramp)
|
|
124
124
|
* @param {ReactNode} foot a node rendered across the hero's bottom edge
|
|
125
125
|
* @param {number} overlap how far `foot` rises into the hero, px (default 250); published on the section as `--kol-section-foot-overlap`
|
|
126
126
|
* @param {boolean} autoPlay · {number} autoPlayInterval · {'stack'|'header'} navPosition carousel only
|
|
@@ -321,8 +321,14 @@ export default function SectionHero({
|
|
|
321
321
|
/* the bottom inset is never the `p-*` shorthand: `md:p-10` sits in a later
|
|
322
322
|
* media query than a bare `pb-*` and would win it back at ≥768 (measured —
|
|
323
323
|
* the old `pb-32 sm:pb-40` ramp lost to it between 768 and 1023 too). */
|
|
324
|
+
/* WITH a foot the inset is `overlap` + one small gap — 32px, 48 from md
|
|
325
|
+
* (SectionHeroFootGap, kol-website 2026-08-27: 0.86.0's ramp + overlap
|
|
326
|
+
* floated the lede ~474px above the card; live sat it ~50px above). No
|
|
327
|
+
* foot → the padding ramp, as before. */
|
|
324
328
|
const justifyCls = justify === 'end'
|
|
325
|
-
?
|
|
329
|
+
? (foot
|
|
330
|
+
? 'items-end pb-[calc(var(--kol-section-foot-overlap)+2rem)] md:pb-[calc(var(--kol-section-foot-overlap)+3rem)]'
|
|
331
|
+
: 'items-end pb-32 sm:pb-40 lg:pb-48 xl:pb-56')
|
|
326
332
|
: 'items-center pb-6 md:pb-10'
|
|
327
333
|
const footVar = foot ? { '--kol-section-foot-overlap': `${overlap}px` } : undefined
|
|
328
334
|
|