@kolkrabbi/kol-component 0.74.1 → 0.75.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.74.1",
3
+ "version": "0.75.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",
@@ -38,7 +38,12 @@ const BOX = {
38
38
  article: { thumb: 120, ratio: '1 / 1', pad: '0', gap: S6, align: 'items-start', thumbBg: 'var(--kol-fg-12)', hover: 'var(--kol-oq-02)', thumbZoom: true },
39
39
  /* work and typeface step UP at md — the shipped rows both do, and a work row
40
40
  * at a fixed 96 cannot hold the display-03 line it was ruled to carry. */
41
- work: { thumb: 64, thumbMd: 112, ratio: '1 / 1', pad: S4, padMd: S6, gap: S4, gapMd: S6, frame: 'transparent', frameHover: 'var(--kol-fg-16)', bg: 'var(--kol-surface-secondary)', minH: 96, minHMd: 160, align: 'items-stretch', thumbRadius: 'var(--kol-radius-xs)', thumbBorder: true, thumbZoom: true },
41
+ /* thumbSquare (2026-08-26, user on the comparison page): the shipped
42
+ * WorkListItem thumb is a fixed SQUARE (w-16 h-16 md:w-28 md:h-28) sitting at
43
+ * the top of a taller row — it does not stretch to the row's height, so the
44
+ * fill-the-height ruling does not apply here and a 64-wide thumb in a 96-tall
45
+ * row came out portrait. */
46
+ work: { thumb: 64, thumbMd: 112, ratio: '1 / 1', pad: S4, padMd: S6, gap: S4, gapMd: S6, frame: 'transparent', frameHover: 'var(--kol-fg-16)', bg: 'var(--kol-surface-secondary)', minH: 96, minHMd: 160, align: 'items-stretch', thumbRadius: 'var(--kol-radius-xs)', thumbBorder: true, thumbZoom: true, thumbSquare: true },
42
47
  /* typeface's row is a COLUMN, not a line: a header (name/styles left,
43
48
  * classification/year right) with a full-width specimen band under it. The
44
49
  * shipped item is `flex-col gap-6`, and forcing it into the horizontal
@@ -112,9 +117,9 @@ export default function ContentRow({
112
117
  * height the row is. An earlier cut freed the width instead and let
113
118
  * `aspect-ratio` fall back to the image's intrinsic size, which is how
114
119
  * one card ate the page. */
115
- <div className="kol-row-thumb shrink-0 self-stretch">
120
+ <div className={`kol-row-thumb shrink-0 ${box.thumbSquare ? 'self-start' : 'self-stretch'}`}>
116
121
  <ContentMedia
117
- ratio={null}
122
+ ratio={box.thumbSquare ? '1 / 1' : null}
118
123
  border={box.thumbBorder ?? false}
119
124
  bg={box.thumbBg}
120
125
  /* zoom where the thumb IS the subject (article · work), never on a
@@ -83,6 +83,9 @@ function MediaLayer({ media }) {
83
83
  * @param {ReactNode} label · headline · body · actions the composed text (SectionText)
84
84
  * @param {string} [headlineSize='display-04']
85
85
  * @param {string} [panelMaxWidth='max-w-[440px]'] the glass panel's cap on the composed route
86
+ * @param {object} panelProps everything else on the glass panel (user ask 2026-08-26):
87
+ * `padding` ('px-6 py-8') · `maxWidth` · `surfaceOpacity`
88
+ * (80) · `blur` ('1px') · `gap` · `className`
86
89
  * @param {ReactNode} panel a caller-authored content node; wins over the text props and children
87
90
  * @param {ReactNode} children fallback content slot
88
91
  * @param {string} align media: 'center' | 'start' | 'end' — placement of the content ·
@@ -102,6 +105,7 @@ export default function SectionHero({
102
105
  body,
103
106
  actions,
104
107
  panelMaxWidth = 'max-w-[440px]',
108
+ panelProps,
105
109
  panel,
106
110
  children,
107
111
  align = 'center',
@@ -145,7 +149,7 @@ export default function SectionHero({
145
149
  : 'justify-center'
146
150
  const composed = label || headline || body || actions
147
151
  const content = panel ?? (composed ? (
148
- <OverlayGlassPanel maxWidth={panelMaxWidth} align={align === 'center' ? 'center' : 'start'}>
152
+ <OverlayGlassPanel maxWidth={panelMaxWidth} align={align === 'center' ? 'center' : 'start'} {...panelProps}>
149
153
  <SectionText
150
154
  label={label}
151
155
  headline={headline}
@@ -11,6 +11,8 @@
11
11
  * @param {string} align 'center' | 'start' | 'end' (cross-axis + text)
12
12
  * @param {string} gap vertical rhythm class between children
13
13
  * @param {string} maxWidth optional max-w-* class (adds mx-auto)
14
+ * @param {string} padding padding classes (default 'px-6 py-8') — 2026-08-26,
15
+ * the one knob the panel had no seam for
14
16
  */
15
17
  export default function OverlayGlassPanel({
16
18
  children,
@@ -19,6 +21,7 @@ export default function OverlayGlassPanel({
19
21
  align = 'center',
20
22
  gap = 'gap-6',
21
23
  maxWidth = '',
24
+ padding = 'px-6 py-8',
22
25
  className = '',
23
26
  }) {
24
27
  const alignCls =
@@ -28,7 +31,7 @@ export default function OverlayGlassPanel({
28
31
 
29
32
  return (
30
33
  <div
31
- className={`flex flex-col ${alignCls} ${gap} rounded-[var(--kol-radius-xs)] px-6 py-8 ${maxWidth ? `${maxWidth} mx-auto` : ''} ${className}`.trim()}
34
+ className={`flex flex-col ${alignCls} ${gap} rounded-[var(--kol-radius-xs)] ${padding} ${maxWidth ? `${maxWidth} mx-auto` : ''} ${className}`.trim()}
32
35
  style={{
33
36
  backgroundColor: `color-mix(in srgb, var(--kol-surface-primary) ${surfaceOpacity}%, transparent)`,
34
37
  backdropFilter: `blur(${blur})`,