@kolkrabbi/kol-component 0.49.0 → 0.50.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.49.0",
3
+ "version": "0.50.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",
@@ -14,20 +14,24 @@ import usePrefersReducedMotion from '../hooks/usePrefersReducedMotion.js'
14
14
  * (measure → invert → play) when a consumer needs card↔row to tween.
15
15
  *
16
16
  * BOTH FORMS ARE GRIDS (user call 2026-08-15: *"layout always wraps the items
17
- * in a grid, at least 99% of the time"*). `list` is not a single column it is
18
- * the same wall with WIDER tracks, so a compact row gets the room its fields
19
- * need. The shipped consumers already did this (`repeat(4, 1fr)` for list,
20
- * `repeat(6, 1fr)` for grid); what they got wrong was FORCING the count.
17
+ * in a grid, at least 99% of the time"*) but a LIST IS ONE COLUMN. That is
18
+ * what a list is on a page: one entry per line, full width, fields laid across
19
+ * it. kol-website's /work listing is exactly that, and so is every listing
20
+ * anyone has built. A multi-column wall of rows is not a list, it is a wall.
21
21
  *
22
- * The count derives from the wall's OWN width, never the viewport, and never a
23
- * fixed track count 05-layout-systems.md, the card-wall law: *"the shell
24
- * rails eat width that viewport breakpoints can't see, so a forced count
22
+ * (kol-monitor's `repeat(4, 1fr)` list is a dense file-browser cut, not the
23
+ * general casea consumer that wants it passes `listMin`.)
24
+ *
25
+ * The GRID's count derives from the wall's OWN width, never the viewport, and
26
+ * never a fixed track count — 05-layout-systems.md, the card-wall law: *"the
27
+ * shell rails eat width that viewport breakpoints can't see, so a forced count
25
28
  * compresses every card"* (user call 2026-08-09). Hence `auto-fill` +
26
29
  * `minmax()`, with the law's 20rem minimum as the default.
27
30
  *
28
31
  * @param {string} form 'grid' | 'list'
29
32
  * @param {string} min grid track minimum, card form (default 20rem — the law)
30
- * @param {string} listMin grid track minimum, list form (default 30rem)
33
+ * @param {string} listMin OPT-IN: makes the list multi-column too, for a dense
34
+ * file-browser cut. Unset = one full-width column
31
35
  * @param {number} gap px between items — defaults PER FORM (grid 24,
32
36
  * list 8), the values every shipped consumer
33
37
  * re-typed as a ternary at its own call site. A
@@ -38,7 +42,7 @@ import usePrefersReducedMotion from '../hooks/usePrefersReducedMotion.js'
38
42
  export default function ContentCollection({
39
43
  form = 'grid',
40
44
  min = '20rem',
41
- listMin = '30rem',
45
+ listMin,
42
46
  gap,
43
47
  stagger = true,
44
48
  children,
@@ -57,7 +61,9 @@ export default function ContentCollection({
57
61
  className={`m-0 list-none p-0 ${className}`.trim()}
58
62
  style={{
59
63
  display: 'grid',
60
- gridTemplateColumns: `repeat(auto-fill, minmax(${form === 'list' ? listMin : min}, 1fr))`,
64
+ gridTemplateColumns: form === 'list'
65
+ ? (listMin ? `repeat(auto-fill, minmax(${listMin}, 1fr))` : '1fr')
66
+ : `repeat(auto-fill, minmax(${min}, 1fr))`,
61
67
  gap: `${px}px`,
62
68
  }}
63
69
  >