@kolkrabbi/kol-component 0.160.0 → 0.162.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.160.0",
3
+ "version": "0.162.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",
@@ -199,6 +199,13 @@ export default function ContentCard({
199
199
  ) : null
200
200
  const r = ratio ?? RATIOS[variant]
201
201
  const padding = pad ? `var(--kol-pad-card-${pad})` : box.pad
202
+ /* the inset takes SINGLE values (ContentCardActionsInsetShorthand, kol-monitor
203
+ * 2026-09-02): `catalog`'s pad is the two-value shorthand `sm md`, and a
204
+ * two-value string is invalid for top / right / bottom — all three dropped
205
+ * and the actions landed at their static position, under the copy at the
206
+ * left, instead of bottom-right (the 2026-08-15 ruling). Block from the
207
+ * first value, inline from the second (or the same one). */
208
+ const [padBlock, padInline = padBlock] = String(padding ?? '0').trim().split(/\s+/)
202
209
  /* image-only cards (print) pass no text slots — the empty plate must not render */
203
210
  const hasText = ['title', 'body', 'kicker', 'detail', 'date', 'size', 'meta', 'tags'].some((k) => textSlots[k] != null)
204
211
  /* `actions` sit IN THE TEXT PLATE, bottom-right (user ruling 2026-08-15:
@@ -233,7 +240,7 @@ export default function ContentCard({
233
240
  {actions && (
234
241
  <div
235
242
  className="absolute flex"
236
- style={{ top: padding, bottom: padding, right: padding }}
243
+ style={{ top: padBlock, bottom: padBlock, right: padInline }}
237
244
  >
238
245
  {actions}
239
246
  </div>
@@ -12,6 +12,15 @@
12
12
  * at both ends, and `onChange` reports the option in the same event shape
13
13
  * as the number path — `{ target: { value: option } }`.
14
14
  *
15
+ * layout="inline" — `‹ value ›` on ONE line (StepperInlineVariant, kol-monitor
16
+ * 2026-09-02; the rack's Selector shape, the other half of its collapse onto
17
+ * this): the chevrons flank the value as left/right hit targets, the value is
18
+ * centred in a 3ch floor so the row does not jitter as it steps, and there is
19
+ * NO `.kol-control` field chrome — it is inline text on the panel. Value
20
+ * `text-fg-64`, chevrons `text-fg-40`, type from the size ladder; casing is the
21
+ * caller's. Works for `options` and for the number range alike. Default
22
+ * `stacked` is the field with the chevron stack, exactly as before.
23
+ *
15
24
  * Loaded from `00-kol/chevron-{up,down}.svg` via the Icon registry — first
16
25
  * stroke icons in the kol curated set. For a plain number input without
17
26
  * bump affordance, use `<Input type="number" />`.
@@ -28,6 +37,7 @@ export default function Stepper({
28
37
  max,
29
38
  step = 1,
30
39
  options,
40
+ layout = 'stacked',
31
41
  size = 'sm',
32
42
  className = '',
33
43
  style = {},
@@ -63,6 +73,23 @@ export default function Stepper({
63
73
  onChange?.(e)
64
74
  }
65
75
 
76
+ /* INLINE — ‹ value › with no field: the chevrons are the hit targets, the
77
+ * value is text on the panel. `min-w-[3ch]` holds the width across steps. */
78
+ if (layout === 'inline') {
79
+ const chev = CHEVRON_SIZE[size]
80
+ return (
81
+ <div className={`inline-flex items-center justify-center gap-0.5 select-none ${SIZE_TYPE[size]} ${className}`.trim()} style={style}>
82
+ <button type="button" onClick={handleDecrement} className="inline-flex items-center justify-center px-0.5 text-fg-40 hover:text-emphasis transition-colors" aria-label="Previous">
83
+ <Icon name="chevron-left" size={chev} />
84
+ </button>
85
+ <span className="min-w-[3ch] text-center text-fg-64" {...props}>{value ?? ''}</span>
86
+ <button type="button" onClick={handleIncrement} className="inline-flex items-center justify-center px-0.5 text-fg-40 hover:text-emphasis transition-colors" aria-label="Next">
87
+ <Icon name="chevron-right" size={chev} />
88
+ </button>
89
+ </div>
90
+ )
91
+ }
92
+
66
93
  const shellCls = [
67
94
  'kol-control',
68
95
  'kol-control--filled',