@kolkrabbi/kol-component 0.346.0 → 0.347.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.346.0",
3
+ "version": "0.347.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -29,9 +29,9 @@
29
29
  "embla-carousel-react": "^8.6.0",
30
30
  "pdfjs-dist": "^6.3.289",
31
31
  "react-syntax-highlighter": "^16.1.1",
32
- "@kolkrabbi/kol-markdown": "^0.2.0",
33
32
  "@kolkrabbi/kol-search": "^0.3.0",
34
- "@kolkrabbi/kol-growth": "^0.5.0"
33
+ "@kolkrabbi/kol-growth": "^0.5.0",
34
+ "@kolkrabbi/kol-markdown": "^0.2.0"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@kolkrabbi/kol-icons": ">=0.61.1",
@@ -7,8 +7,11 @@
7
7
  * @param {number} max default 100
8
8
  * @param {boolean|ReactNode|Function} caption `true` → `value/max`; a node; or `(value, max) => node`; omit for none
9
9
  * @param {'success'|'warning'|'error'|'info'} tone the fill's colour (default the ink)
10
- * @param {'float'} variant the float track (float-everything W2 row 31, 2026-11-04): 4px, a capsule, oq-16 under
11
- * the emphasis ink; the caption in the float label role
10
+ * @param {'float'} variant the float track (float-everything W2 row 31, 2026-11-04): the float slider's 3px capsule,
11
+ * oq-16 under fg-64; the caption in the float label role
12
+ *
13
+ * The track is the Slider's (2026-11-07): `.kol-track` / `.kol-track-run` in kol-theme read the same tokens the range
14
+ * inputs do, so a ProgressBar and a Slider at the same variant draw one track. A tone sets `--kol-track-run`.
12
15
  * @param {string} ariaLabel
13
16
  */
14
17
  const TONE = { success: 'var(--ui-success)', warning: 'var(--ui-warning)', error: 'var(--ui-error)', info: 'var(--ui-info)' }
@@ -19,8 +22,8 @@ export default function ProgressBar({ value = 0, max = 100, caption, tone, varia
19
22
  const float = variant === 'float'
20
23
  return (
21
24
  <div className={`flex flex-col gap-1 ${className}`.trim()}>
22
- <div role="progressbar" aria-valuenow={value} aria-valuemin={0} aria-valuemax={max} aria-label={ariaLabel} className={`h-1 overflow-hidden ${float ? 'rounded-full bg-oq-16' : 'rounded bg-fg-08'}`}>
23
- <div className={`h-full transition-[width] duration-300 ${float ? 'rounded-full' : ''}`} style={{ width: `${pct}%`, background: TONE[tone] ?? (float ? 'var(--kol-fg-emphasis)' : 'var(--kol-fg-64)') }} />
25
+ <div role="progressbar" aria-valuenow={value} aria-valuemin={0} aria-valuemax={max} aria-label={ariaLabel} className={`kol-track ${float ? 'kol-track--float' : ''}`.trim()}>
26
+ <div className="kol-track-run transition-[width] duration-300" style={{ width: `${pct}%`, ...(TONE[tone] && { '--kol-track-run': TONE[tone] }) }} />
24
27
  </div>
25
28
  {text != null && text !== false && <span className={float ? 'kol-float-label text-fg-64' : 'kol-mono-10 text-meta'}>{text}</span>}
26
29
  </div>
@@ -19,6 +19,8 @@ import SliderPanel from './SliderPanel.jsx'
19
19
  * routes were documented and neither was wired, so consumers were reaching into
20
20
  * `.slider-black` by specificity from their own stylesheets).
21
21
  * `--kol-slider-playhead` works the same way on the dual rail.
22
+ * The minimal and float tracks read the shared track tokens (`--kol-track-h` · `-r` · `-bg` · `-run`, kol-theme
23
+ * `.kol-track`, 2026-11-07) — ProgressBar draws the same track from them.
22
24
  *
23
25
  * DUAL + PLAYHEAD (SliderDualThumbAndPlayhead, kol-mirror 2026-08-30):
24
26
  * `variant="dual"` stacks two native ranges on one rail for an in/out pair,