@kolkrabbi/kol-component 0.85.0 → 0.86.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.85.0",
3
+ "version": "0.86.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",
@@ -120,9 +120,9 @@ 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
123
+ * @param {'center'|'end'} justify content vertically centred, or pinned to the foot (with `foot`, the pb ramp plus `overlap` — the text clears the card)
124
124
  * @param {ReactNode} foot a node rendered across the hero's bottom edge
125
- * @param {number} overlap how far `foot` rises into the hero, px (default 250)
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
127
127
  * @param {Function} renderTitle · {string} ctaLabel · {Function} onNavigate · {boolean} showTitle · showDescription · showCta ·
128
128
  * {string} titleClassName · descriptionClassName · {Object} options carousel only — FeaturedCarousel's
@@ -311,10 +311,23 @@ export default function SectionHero({
311
311
  ))
312
312
  : children)
313
313
 
314
- const justifyCls = justify === 'end' ? 'items-end pb-32 sm:pb-40 lg:pb-48 xl:pb-56' : 'items-center'
314
+ /* `justify="end"` + `foot` (SectionHeroFootClearance, kol-website
315
+ * 2026-08-27 — user, dev vs live: "why can't you make it the same?"): the
316
+ * foot rises `overlap` px into the hero, so the content's bottom inset is
317
+ * the pb ramp PLUS the overlap — the text clears the card at any overlap.
318
+ * The ramp is a custom property so the sum is one literal class; `overlap`
319
+ * is published on the section as --kol-section-foot-overlap (0 without a
320
+ * foot). */
321
+ /* the bottom inset is never the `p-*` shorthand: `md:p-10` sits in a later
322
+ * media query than a bare `pb-*` and would win it back at ≥768 (measured —
323
+ * the old `pb-32 sm:pb-40` ramp lost to it between 768 and 1023 too). */
324
+ const justifyCls = justify === 'end'
325
+ ? 'items-end [--kol-section-pb:8rem] sm:[--kol-section-pb:10rem] lg:[--kol-section-pb:12rem] xl:[--kol-section-pb:14rem] pb-[calc(var(--kol-section-pb)+var(--kol-section-foot-overlap,0px))]'
326
+ : 'items-center pb-6 md:pb-10'
327
+ const footVar = foot ? { '--kol-section-foot-overlap': `${overlap}px` } : undefined
315
328
 
316
329
  return withFoot(
317
- <section ref={themeRef} data-theme={themeStamp} className={`kol-full-bleed-hero relative isolate w-full overflow-hidden ${themed} ${heightCls} ${fullBleed ? 'w-screen ml-[calc(50%-50vw)]' : ''} ${className}`.replace(/\s+/g, ' ').trim()}>
330
+ <section ref={themeRef} data-theme={themeStamp} className={`kol-full-bleed-hero relative isolate w-full overflow-hidden ${themed} ${heightCls} ${fullBleed ? 'w-screen ml-[calc(50%-50vw)]' : ''} ${className}`.replace(/\s+/g, ' ').trim()} style={footVar}>
318
331
  <MediaLayer media={media} />
319
332
  {overlayOpacity > 0 && (
320
333
  <div
@@ -324,7 +337,7 @@ export default function SectionHero({
324
337
  />
325
338
  )}
326
339
  {veil && <div aria-hidden="true" className="kol-section-hero-veil absolute inset-0" />}
327
- <div className={`relative z-10 flex h-full w-full ${justifyCls} ${alignCls} p-6 md:p-10`}>
340
+ <div className={`relative z-10 flex h-full w-full ${justifyCls} ${alignCls} px-6 pt-6 md:px-10 md:pt-10`}>
328
341
  {content}
329
342
  </div>
330
343
  </section>,