@kolkrabbi/kol-component 0.49.0 → 0.51.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.51.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",
@@ -44,7 +44,6 @@ import { Icon } from '@kolkrabbi/kol-icons'
44
44
 
45
45
  const SIZE_TYPE = { sm: 'kol-mono-12', md: 'kol-mono-14' }
46
46
  const ICON_SIZE = { sm: 14, md: 14 }
47
- const CUBIC_EASE = 'var(--kol-ease-house)'
48
47
 
49
48
  export default function SearchInput({
50
49
  value = '',
@@ -80,8 +79,9 @@ export default function SearchInput({
80
79
  if (expanding) {
81
80
  return (
82
81
  <div
83
- className={`flex items-center bg-fg-04 rounded-full h-9 ${className}`.trim()}
84
- style={{ width: isOpen ? expandedWidth : 36, transition: `width 600ms ${CUBIC_EASE}` }}
82
+ className={`kol-expand flex items-center bg-fg-04 rounded-full h-9 ${className}`.trim()}
83
+ /* motion is `.kol-expand` in kol-theme; only the WIDTH is per-instance */
84
+ style={{ width: isOpen ? expandedWidth : 36 }}
85
85
  >
86
86
  <button
87
87
  type="button"
@@ -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
  >
@@ -231,13 +231,12 @@ const ContentFilters = ({
231
231
  <IconSeam name="filter" size={16} />
232
232
  </button>
233
233
  <div
234
- className="flex items-center justify-center rounded-sm cursor-pointer hover:bg-fg-04 transition-colors"
234
+ className="kol-expand flex items-center justify-center rounded-sm cursor-pointer hover:bg-fg-04"
235
235
  style={{
236
236
  height: 32,
237
237
  width: searchOpen ? 200 : 32,
238
238
  background: searchOpen ? 'var(--kol-surface-secondary)' : 'transparent',
239
239
  border: 'none',
240
- transition: 'width 600ms var(--kol-ease-house), background 400ms var(--kol-ease-house)',
241
240
  overflow: 'hidden',
242
241
  }}
243
242
  onClick={() => {
@@ -249,10 +248,9 @@ const ContentFilters = ({
249
248
  * wearing kol-btn chrome. The clickable thing is the wrapper
250
249
  * div, not this span. */}
251
250
  <span
252
- className="flex items-center justify-center flex-shrink-0"
251
+ className="kol-expand-content flex items-center justify-center flex-shrink-0"
253
252
  style={{
254
253
  opacity: searchOpen ? 0 : 1,
255
- transition: 'opacity 300ms var(--kol-ease-house)',
256
254
  position: searchOpen ? 'absolute' : 'relative',
257
255
  }}
258
256
  >