@kolkrabbi/kol-component 0.135.0 → 0.136.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.135.0",
3
+ "version": "0.136.0",
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",
@@ -20,6 +20,11 @@ import ContentText from './ContentText.jsx'
20
20
  * so a non-square ratio widens the thumb rather than
21
21
  * growing the row past its rung (ruled 2026-08-30)
22
22
  * @param {number} paddingY vertical padding px — overrides the ruled default
23
+ * @param {number} minHeight the row's rung in px — overrides the variant's
24
+ * @param {'width'|'height'} ratioAxis under `thumb="fill"`, WHICH AXIS PAYS for a
25
+ * non-square `ratio`. `width` (default) holds the height
26
+ * at the rung and narrows the thumb; `height` holds the
27
+ * width and lets the thumb grow taller than the rung
23
28
  * @param {{label: ReactNode, value: ReactNode}[]} specs label/value pairs on the
24
29
  * row's trailing edge, independent of variant.
25
30
  * Horizontal variants only — `typeface` is a column
@@ -81,6 +86,8 @@ export default function ContentRow({
81
86
  actions,
82
87
  footer,
83
88
  specs,
89
+ minHeight,
90
+ ratioAxis = 'width',
84
91
  selected = false,
85
92
  onClick,
86
93
  href,
@@ -104,12 +111,24 @@ export default function ContentRow({
104
111
  '--kol-row-pad-md': box.padMd,
105
112
  '--kol-row-gap': box.gap,
106
113
  '--kol-row-gap-md': box.gapMd,
107
- '--kol-row-min-h': box.minH != null ? `${box.minH}px` : undefined,
114
+ /* THE RUNG IS A PROP (RowRungAndFillThumb, kol-website 2026-08-30). It was
115
+ * the variant's literal published as an inline custom property, and an
116
+ * inline property cannot be reached from a stylesheet — so a page wanting a
117
+ * taller row carried `--kol-row-min-h: 224px !important`. */
118
+ '--kol-row-min-h': minHeight != null ? `${minHeight}px` : box.minH != null ? `${box.minH}px` : undefined,
108
119
  '--kol-row-min-h-md': box.minHMd != null ? `${box.minHMd}px` : undefined,
109
120
  /* `fill` = the rung minus the vertical padding — a definite number, not a
110
121
  * stretch (a min-height row has no definite cross size, so a stretched
111
- * aspect-ratio square resolved to the image's intrinsic width) */
112
- '--kol-row-thumb': thumbPx === 'fill' ? `calc(${box.minH ?? 96}px - 2 * ${padY})` : `${thumbPx}px`,
122
+ * aspect-ratio square resolved to the image's intrinsic width).
123
+ *
124
+ * THE EFFECTIVE RUNG, not the variant's. This read `box.minH` — the literal
125
+ * — so raising the rung grew the ROW and left the thumb at its old height,
126
+ * floating. It is now `--kol-row-min-h`, whatever set it, resolved in CSS.
127
+ * That was the second `!important` kol-website was carrying. */
128
+ '--kol-row-pad-y': padY,
129
+ '--kol-row-thumb': thumbPx === 'fill'
130
+ ? 'calc(var(--kol-row-min-h, 96px) - 2 * var(--kol-row-pad-y, 0px))'
131
+ : `${thumbPx}px`,
113
132
  '--kol-row-thumb-md': box.thumbMd != null ? `${box.thumbMd}px` : undefined,
114
133
  /* the documented `ratio` prop, finally connected (RowThumbRatioDead,
115
134
  * kol-website 2026-08-30). It was destructured and then dropped — the row
@@ -150,7 +169,7 @@ export default function ContentRow({
150
169
  * media object-covers into it; row height = max(thumb, text). This
151
170
  * retires the 2026-08-15 fill-the-height ruling and the `thumbSquare`
152
171
  * exception it needed. Rows never zoom their thumb — cards keep theirs. */
153
- <div className={`kol-row-thumb shrink-0 self-start ${thumbPx === 'fill' ? 'is-fill' : ''}`.trim()}>
172
+ <div className={`kol-row-thumb shrink-0 self-start ${thumbPx === 'fill' ? 'is-fill' : ''} ${thumbPx === 'fill' && ratioAxis === 'height' ? 'pays-height' : ''}`.replace(/\s+/g, ' ').trim()}>
154
173
  <ContentMedia
155
174
  ratio={null}
156
175
  border={box.thumbBorder ?? false}