@kolkrabbi/kol-component 0.157.0 → 0.158.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.157.0",
3
+ "version": "0.158.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",
@@ -142,6 +142,9 @@ export default function ContentCard({
142
142
  hero = false,
143
143
  label,
144
144
  pad,
145
+ /* the tag chip follows the BOX (CardTagsNoVisibleFill, 2026-09-01): a solid
146
+ * surface fill keeps `tertiary`, a plain or washed box takes `primary` */
147
+ tagVariant,
145
148
  media,
146
149
  ratio,
147
150
  fit,
@@ -222,7 +225,7 @@ export default function ContentCard({
222
225
  zIndex: box.layout === 'canvas' ? 1 : undefined,
223
226
  }}
224
227
  >
225
- {hasText && <ContentText variant={variant} form={isHero ? 'hero' : 'card'} {...textSlots} />}
228
+ {hasText && <ContentText variant={variant} form={isHero ? 'hero' : 'card'} tagVariant={tagVariant ?? (/surface-/.test(box.bg ?? '') ? 'tertiary' : 'primary')} {...textSlots} />}
226
229
  {/* ABSOLUTE, not a flex sibling: the plate's height moves with the title
227
230
  * and the meta, so a laid-out stack would stretch or drift with it. The
228
231
  * inset reads the SAME pad token the plate uses, so the icons sit the
@@ -33,6 +33,8 @@ import ContentText from './ContentText.jsx'
33
33
  * and takes a band through `footer` instead.
34
34
  * @param {boolean} selected
35
35
  * @param {Function} onClick
36
+ * @param {string} tagVariant the tag chip (CardTagsNoVisibleFill, 2026-09-01): default follows the BOX — a solid
37
+ * surface fill keeps `tertiary` (the /work row it was minted for), a plain or washed box takes `primary`
36
38
  * text slots + *Class seams forwarded to ContentText.
37
39
  */
38
40
 
@@ -151,6 +153,7 @@ export default function ContentRow({
151
153
  onClick,
152
154
  href,
153
155
  onNavigate,
156
+ tagVariant,
154
157
  className = '',
155
158
  ...text
156
159
  }) {
@@ -222,7 +225,7 @@ export default function ContentRow({
222
225
  * (a rendered alphabet, a waveform, a sparkline) is never the family's. */
223
226
  const inner = box.column ? (
224
227
  <>
225
- <ContentText variant={variant} form="row" className="w-full" {...text} />
228
+ <ContentText variant={variant} form="row" className="w-full" tagVariant={tagVariant ?? (/surface-/.test(box.bg ?? '') ? 'tertiary' : 'primary')} {...text} />
226
229
  {footer}
227
230
  </>
228
231
  ) : (
@@ -250,7 +253,7 @@ export default function ContentRow({
250
253
  * ruled it on screen): the two lines stack to 34 inside a 40 content box,
251
254
  * and pushing them fully apart puts the ascenders hard against the thumb's
252
255
  * top and bottom edges. It is the ROW's ruling, so the row passes it. */}
253
- <ContentText variant={variant} form="row" className={`flex-1 ${box.height != null ? 'py-[2px]' : ''}`.trim()} {...text} />
256
+ <ContentText variant={variant} form="row" className={`flex-1 ${box.height != null ? 'py-[2px]' : ''}`.trim()} tagVariant={tagVariant ?? (/surface-/.test(box.bg ?? '') ? 'tertiary' : 'primary')} {...text} />
254
257
  {/* `specs` rides the trailing edge on EVERY variant — year · material ·
255
258
  * edition is a content difference, not a geometry one, and minting a
256
259
  * seventh page-named box for it is the exact mistake §1 of the ticket is
@@ -24,6 +24,10 @@
24
24
  * @param {ReactNode} size default · article (file size / read length)
25
25
  * @param {ReactNode} meta work only
26
26
  * @param {number} gap inner line gap in px (defaults per variant/form)
27
+ * @param {string} tagVariant the Tag variant the `tags` slot draws (default `primary` — a soft ink wash that reads as a chip
28
+ * on a plain surface; CardTagsNoVisibleFill, kol-website 2026-09-01: `tertiary` is surface-primary with no border and was
29
+ * INVISIBLE on every card that sits on surface-primary). ContentCard / ContentRow pass `tertiary` for a box with a
30
+ * solid surface fill — the /work row the variant was minted for — and `primary` otherwise
27
31
  * @param {string} titleClass … eyebrowClass (alias `kickerClass`), bodyClass, detailClass,
28
32
  * dateClass, sizeClass, metaClass — full class overrides
29
33
  */
@@ -203,7 +207,7 @@ export default function ContentText({
203
207
  variant: variantProp = 'file',
204
208
  form = 'card',
205
209
  title, body, eyebrow, kicker, detail, date, size, meta, tags,
206
- gap, clamp,
210
+ gap, clamp, tagVariant = 'primary',
207
211
  titleClass, bodyClass, eyebrowClass, kickerClass, detailClass, dateClass, sizeClass, metaClass, tagsClass,
208
212
  className = '',
209
213
  }) {
@@ -244,7 +248,7 @@ export default function ContentText({
244
248
  if (slot === 'tags')
245
249
  return v.map((t, i) =>
246
250
  typeof t === 'string' || typeof t === 'number' ? (
247
- <Tag key={i} variant="tertiary" size="sm">{t}</Tag>
251
+ <Tag key={i} variant={tagVariant} size="sm">{t}</Tag>
248
252
  ) : t
249
253
  )
250
254
  return v.map((item, i) => <span key={i}>{item}</span>)
@@ -160,9 +160,17 @@ export default function SectionNewsletter({
160
160
  {/* `w-full`: SectionText centres its children as flex items, so
161
161
  * without it the form shrink-wraps and the Input's `w-full` has
162
162
  * nothing to fill — it rendered at its intrinsic ~190px */}
163
+ {/* ON BUTTONGROUP'S LADDER (NewsletterFormGapOffLadder, kol-website
164
+ * 2026-09-01; user: "the gap between input and button in newsletter
165
+ * should be the same as button group"): `gap-2 sm:gap-4` — 8 stacked,
166
+ * 16 in the row — the pair ButtonGroup ruled on 08-31. This form was
167
+ * `gap-4 sm:gap-3`, inverted against it. The `pt-6` went too: the
168
+ * SectionText above already spaces its children by `gap-6`, so the
169
+ * form sat 48 under the body where every other section's actions sit
170
+ * 24. */}
163
171
  <form
164
172
  onSubmit={handleSubmit}
165
- className="flex w-full flex-col gap-4 pt-6 sm:flex-row sm:items-center sm:justify-center sm:gap-3"
173
+ className="flex w-full flex-col gap-2 sm:flex-row sm:items-center sm:justify-center sm:gap-4"
166
174
  >
167
175
  <Input
168
176
  id={emailId}