@kolkrabbi/kol-component 0.286.0 → 0.287.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.287.0",
|
|
4
4
|
"description": "The core component library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"embla-carousel-react": "^8.6.0",
|
|
27
27
|
"pdfjs-dist": "^6.3.289",
|
|
28
28
|
"react-syntax-highlighter": "^16.1.1",
|
|
29
|
-
"@kolkrabbi/kol-
|
|
30
|
-
"@kolkrabbi/kol-
|
|
29
|
+
"@kolkrabbi/kol-search": "^0.3.0",
|
|
30
|
+
"@kolkrabbi/kol-markdown": "^0.1.3"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@kolkrabbi/kol-icons": ">=0.22.0",
|
|
@@ -93,7 +93,9 @@ const BOX = {
|
|
|
93
93
|
* control vanishing. article is the exception the shipped card already set: it
|
|
94
94
|
* has no surface of its own to step, so it dims its title instead. */
|
|
95
95
|
const HOVER = {
|
|
96
|
-
file:
|
|
96
|
+
/* file: no fill change on hover (user 2026-10-22: "remove the card background color change on hover") —
|
|
97
|
+
* the cover's zoom and the corner controls are its hover. Was oq-04. */
|
|
98
|
+
file: null,
|
|
97
99
|
slide: 'var(--kol-surface-primary)', /* the plate holds its color on hover; the drawer control is the affordance */
|
|
98
100
|
catalog: 'var(--kol-surface-tertiary)',
|
|
99
101
|
/* article and work take NO surface hover, and that is a decision not a gap:
|
|
@@ -47,7 +47,11 @@ const BOX = {
|
|
|
47
47
|
* grey background, remove it"). The default row is a bare ruled line — a
|
|
48
48
|
* full-width grey band under it is heavier than the line itself. Scoped to
|
|
49
49
|
* `default`: catalog and print still carry the same `oq-04`, unruled. */
|
|
50
|
-
|
|
50
|
+
/* THE FILE CARD'S ANATOMY, SIDEWAYS (user 2026-10-22: *"its 2 items IMAGE + TEXT in one container that has rounded
|
|
51
|
+
* corners and bg color. the padding is done on the text"*). The row is the container — fg-02, rounded, clipped, no
|
|
52
|
+
* padding, no gap; the thumb is a 72 square flush in it; `plate` is the text section's padding (12 all round), and the text, specs
|
|
53
|
+
* and actions live inside that one padded box. */
|
|
54
|
+
file: { thumb: 72, ratio: '1 / 1', pad: '0px', gap: '0px', align: 'items-stretch', bg: 'var(--kol-fg-02)', clip: true, plate: S3 },
|
|
51
55
|
/* SLIDE (slide-variant-and-shelf-preset, 2026-09-03): file's row with the thumb FILLING the
|
|
52
56
|
* rung's height and taking its width from 16:9 — 48 tall, 85 wide, the whole frame — not
|
|
53
57
|
* the 48 square, which cropped a deck to a sliver (read off olina's /slide-deck). `minH` 64
|
|
@@ -269,9 +273,11 @@ export default function ContentRow({
|
|
|
269
273
|
* media object-covers into it; row height = max(thumb, text). This
|
|
270
274
|
* retires the 2026-08-15 fill-the-height ruling and the `thumbSquare`
|
|
271
275
|
* exception it needed. Rows never zoom their thumb — cards keep theirs. */
|
|
272
|
-
<div className={`kol-row-thumb shrink-0 self-start ${thumbPx === 'fill' ? 'is-fill' : ''} ${thumbPx === 'fill' && ratioAxis === 'height' ? 'pays-height' : ''}`.replace(/\s+/g, ' ').trim()}>
|
|
276
|
+
<div className={`kol-row-thumb shrink-0 ${box.plate ? 'self-stretch' : 'self-start'} ${thumbPx === 'fill' ? 'is-fill' : ''} ${thumbPx === 'fill' && ratioAxis === 'height' ? 'pays-height' : ''}`.replace(/\s+/g, ' ').trim()}>
|
|
273
277
|
<ContentMedia
|
|
274
278
|
ratio={null}
|
|
279
|
+
/* a row that clips its own corners does not round the thumb again — the card's rule (2026-08-15) */
|
|
280
|
+
radius={!box.clip}
|
|
275
281
|
border={box.thumbBorder ?? false}
|
|
276
282
|
bg={box.thumbBg}
|
|
277
283
|
className={box.thumbRadius ? 'rounded-[var(--kol-radius-xs)]' : ''}
|
|
@@ -284,7 +290,20 @@ export default function ContentRow({
|
|
|
284
290
|
* ruled it on screen): the two lines stack to 34 inside a 40 content box,
|
|
285
291
|
* and pushing them fully apart puts the ascenders hard against the thumb's
|
|
286
292
|
* top and bottom edges. It is the ROW's ruling, so the row passes it. */}
|
|
293
|
+
{box.plate ? (
|
|
294
|
+
/* the TEXT SECTION — one padded box holding the copy, the specs and the actions (the card's plate) */
|
|
295
|
+
/* items-STRETCH: the actions column spans the padded height, so a column of controls spreads from the
|
|
296
|
+
* top pad to the bottom pad as it does on the card's plate, and the copy spans it too — title on the top
|
|
297
|
+
* pad, date · size on the bottom one, level with the last control (user 2026-10-22) */
|
|
298
|
+
<div className="flex flex-1 min-w-0 items-stretch" style={{ padding: box.plate, gap: box.plateGap ?? box.plate }}>
|
|
299
|
+
{/* the meta line's leading is its type size, so its baseline lands on the bottom pad, level with the last
|
|
300
|
+
* control — at its 16px line the digits sat ~4px above it (user 2026-10-22) */}
|
|
301
|
+
<ContentText variant={variant} form="row" className="flex-1 justify-between [&_.kol-mono-12]:leading-none" tagVariant={tagVariant ?? (/surface-/.test(bg ?? box.bg ?? '') ? 'tertiary' : 'primary')} {...text} />
|
|
302
|
+
{actions && <div className="shrink-0">{actions}</div>}
|
|
303
|
+
</div>
|
|
304
|
+
) : (
|
|
287
305
|
<ContentText variant={variant} form="row" className={`flex-1 ${box.height != null ? 'py-[2px]' : ''}`.trim()} tagVariant={tagVariant ?? (/surface-/.test(bg ?? box.bg ?? '') ? 'tertiary' : 'primary')} {...text} />
|
|
306
|
+
)}
|
|
288
307
|
{/* `specs` rides the trailing edge on EVERY variant — year · material ·
|
|
289
308
|
* edition is a content difference, not a geometry one, and minting a
|
|
290
309
|
* seventh page-named box for it is the exact mistake §1 of the ticket is
|
|
@@ -302,12 +321,12 @@ export default function ContentRow({
|
|
|
302
321
|
</dl>
|
|
303
322
|
)}
|
|
304
323
|
{/* trailing edge, never in the text flow — MediaRow's placement */}
|
|
305
|
-
{actions && <div className="shrink-0">{actions}</div>}
|
|
324
|
+
{actions && !box.plate && <div className="shrink-0">{actions}</div>}
|
|
306
325
|
</>
|
|
307
326
|
)
|
|
308
327
|
|
|
309
328
|
const common = {
|
|
310
|
-
className: `kol-row group flex ${box.column ? 'flex-col' : ''} ${box.align} ${box.height != null ? 'kol-row--fixed' : ''} ${box.heightSm != null ? 'kol-row--fixed-sm' : ''} ${box.divider ? 'kol-row--divided' : ''} ${box.frame ? 'rounded-[var(--kol-radius-sm)] border' : ''} ${interactive ? 'cursor-pointer select-none' : ''} ${interactive && box.hover ? 'kol-content-hover' : ''} ${interactive && box.frameHover ? 'kol-content-hover-frame' : ''} ${className}`.trim(),
|
|
329
|
+
className: `kol-row group flex ${box.column ? 'flex-col' : ''} ${box.align} ${box.height != null ? 'kol-row--fixed' : ''} ${box.heightSm != null ? 'kol-row--fixed-sm' : ''} ${box.divider ? 'kol-row--divided' : ''} ${box.frame ? 'rounded-[var(--kol-radius-sm)] border' : ''} ${box.clip ? 'overflow-hidden rounded-[var(--kol-radius-sm)]' : ''} ${interactive ? 'cursor-pointer select-none' : ''} ${interactive && box.hover ? 'kol-content-hover' : ''} ${interactive && box.frameHover ? 'kol-content-hover-frame' : ''} ${className}`.trim(),
|
|
311
330
|
style: vars,
|
|
312
331
|
}
|
|
313
332
|
|