@kolkrabbi/kol-component 0.133.0 → 0.134.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.133.0",
3
+ "version": "0.134.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",
@@ -11,9 +11,13 @@ import Input from '../atoms/Input.jsx'
11
11
  * One bare inline row: label · track · readout. (Bordered `default` and chip
12
12
  * `subtle` variants retired 2026-07-08 — minimal is the only single slider.)
13
13
  *
14
- * Track color is exposed as the `--kol-slider-track` CSS variable on
15
- * `.slider-black`; override per-instance via
16
- * style={{ '--kol-slider-track': '...' }}.
14
+ * Track color is `--kol-slider-track`. Set it per-instance via
15
+ * `style={{ '--kol-slider-track': '…' }}` on this component, or from ANY
16
+ * ancestor — `.slider-black` reads it as a fallback rather than declaring it,
17
+ * so it inherits (SliderTrackVariableNotForwarded, kol-mirror 2026-08-30: both
18
+ * routes were documented and neither was wired, so consumers were reaching into
19
+ * `.slider-black` by specificity from their own stylesheets).
20
+ * `--kol-slider-playhead` works the same way on the dual rail.
17
21
  *
18
22
  * DUAL + PLAYHEAD (SliderDualThumbAndPlayhead, kol-mirror 2026-08-30):
19
23
  * `variant="dual"` stacks two native ranges on one rail for an in/out pair,
@@ -35,6 +39,7 @@ import Input from '../atoms/Input.jsx'
35
39
  * @param {string} props.className - Additional wrapper classes
36
40
  * @param {number} props.displayWidth - Width of the value readout, in characters (default: 6)
37
41
  * @param {string} props.fontSize - Font size for label/value (e.g., '11px')
42
+ * @param {Object} props.style - forwarded to the wrapper; the seam for `--kol-slider-track` / `--kol-slider-playhead`
38
43
  * @param {number} props.defaultValue - alt-click the control resets to this (falls back to `min`). Same contract on RotaryDial
39
44
  * @param {'input'|'value'|'none'} props.readout - `input` (default) an editable Input · `value` a plain right-aligned span, RotaryDial's own display-only readout · `none`
40
45
  * @param {'minimal'|'dual'} props.variant - `dual` = two thumbs on one rail
@@ -67,6 +72,7 @@ const Slider = ({
67
72
  label2,
68
73
  playhead = null,
69
74
  onPlayheadChange,
75
+ style,
70
76
  }) => {
71
77
  /* Label ↔ input pairing — the <label> is a sibling of the range input, so
72
78
  * without an htmlFor/id pair the visible label confers no accessible name. */
@@ -169,7 +175,7 @@ const Slider = ({
169
175
  const showLabels = label1 != null || label2 != null
170
176
  const ratio = max > min ? (playhead - min) / (max - min) : 0
171
177
  return (
172
- <div className={`control-slider gap-3 shadow-none ${className}`}>
178
+ <div className={`control-slider gap-3 shadow-none ${className}`} style={style}>
173
179
  {label && (
174
180
  <label
175
181
  className={`kol-helper-12 whitespace-nowrap shrink-0 w-fit ${disabled ? 'opacity-50' : ''}`}
@@ -231,7 +237,7 @@ const Slider = ({
231
237
  }
232
238
 
233
239
  return (
234
- <div className={`control-slider gap-3 shadow-none ${className}`} onClick={onAltReset}>
240
+ <div className={`control-slider gap-3 shadow-none ${className}`} style={style} onClick={onAltReset}>
235
241
  {label && (
236
242
  <label
237
243
  htmlFor={sliderId}