@kolkrabbi/kol-component 0.367.0 → 0.368.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.367.0",
3
+ "version": "0.368.0",
4
4
  "description": "The core component library",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,9 +32,9 @@
32
32
  "embla-carousel-react": "^8.6.0",
33
33
  "pdfjs-dist": "^6.3.289",
34
34
  "react-syntax-highlighter": "^16.1.1",
35
+ "@kolkrabbi/kol-search": "^0.3.0",
35
36
  "@kolkrabbi/kol-growth": "^0.5.0",
36
- "@kolkrabbi/kol-markdown": "^0.2.0",
37
- "@kolkrabbi/kol-search": "^0.3.0"
37
+ "@kolkrabbi/kol-markdown": "^0.2.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@kolkrabbi/kol-icons": ">=0.69.0",
@@ -80,7 +80,11 @@ const Button = ({
80
80
  // it took the text-adjacent ladder until component 0.20.0, which put a 14px
81
81
  // glyph in a 28px square at `sm`. `iconSize` still overrides either.
82
82
  /* a float glyph follows the pointer (18, 20 on touch — `--kol-float-ic`), so its size is the token, not a number */
83
- const resolvedIconSize = iconSize ?? (variant === 'float' ? 'var(--kol-float-ic)' : glyphSize(size, Boolean(iconOnly)))
83
+ /* …except a chevron or caret: LAW 9 (the user, 2026-11-12: *"USE 12px chevron"*), the float chevron token per size
84
+ (12 · 12 · 16, touch 14 · 14 · 18), the same as the Dropdown and the fold. Only when every glyph is one. */
85
+ const glyphs = [iconOnly, iconLeft, iconRight].filter(Boolean)
86
+ const chevronOnly = glyphs.length > 0 && glyphs.every((g) => /^(chevron|caret)/.test(g))
87
+ const resolvedIconSize = iconSize ?? (variant === 'float' ? (chevronOnly ? `var(--kol-float-chev-${size === 'lg' ? 'lg' : size === 'md' ? 'md' : 'sm'})` : 'var(--kol-float-ic)') : glyphSize(size, Boolean(iconOnly)))
84
88
 
85
89
  // `control` is a legacy alias for `ghost` (kept so web call-sites passing
86
90
  // variant="control" keep working post-migration).
@@ -18,12 +18,12 @@ function Side({ dir, item }) {
18
18
  return (
19
19
  <El {...(item.href ? { href: item.href } : { type: 'button' })} onClick={item.onClick}
20
20
  className={`flex h-14 min-w-0 items-center gap-3 rounded-full bg-surface-secondary text-left no-underline cursor-pointer hover:shadow-[inset_0_0_0_999px_var(--kol-fg-08)] focus-visible:outline-none focus-visible:shadow-[var(--kol-float-focus)] ${next ? 'pl-5 pr-4' : 'pl-4 pr-5'}`}>
21
- {!next && <IconLoader name="chevron-left" size="var(--kol-float-ic)" className="shrink-0 text-oq-64" />}
21
+ {!next && <IconLoader name="chevron-left" size="var(--kol-float-chev-md)" className="shrink-0 text-oq-64" />}
22
22
  <span className="flex min-w-0 flex-1 flex-col">
23
23
  <span className="kol-float-ruler truncate uppercase text-fg-64">{item.label ?? (next ? 'Next' : 'Previous')}</span>
24
24
  <span className="kol-float-hint truncate text-fg-emphasis">{item.title}</span>
25
25
  </span>
26
- {next && <IconLoader name="chevron-right" size="var(--kol-float-ic)" className="shrink-0 text-oq-64" />}
26
+ {next && <IconLoader name="chevron-right" size="var(--kol-float-chev-md)" className="shrink-0 text-oq-64" />}
27
27
  </El>
28
28
  )
29
29
  }