@kolkrabbi/kol-component 0.15.0 → 0.15.2

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.15.0",
3
+ "version": "0.15.2",
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",
@@ -34,6 +34,11 @@ import { Icon } from '@kolkrabbi/kol-icons'
34
34
  * @param {string} name icon name (kol-icons)
35
35
  * @param {string} variant primary|secondary|accent|outline|ghost|nav|grey|danger
36
36
  * @param {string} size sm|md|lg — square + glyph together
37
+ * @param {string} radius sm (default, the system's 4px) | full (9999px).
38
+ * Two values, nothing between: a round frame is its
39
+ * own chrome idiom (edge-straddling controls, avatars),
40
+ * and it is the only sanctioned exception to the hard
41
+ * 4px repo invariant.
37
42
  * @param {string} className escape hatch
38
43
  */
39
44
  const GLYPH = { sm: 16, md: 20, lg: 24 }
@@ -42,13 +47,15 @@ export default function IconFrame({
42
47
  name,
43
48
  variant = 'secondary',
44
49
  size = 'md',
50
+ radius = 'sm',
45
51
  className = '',
46
52
  ...rest
47
53
  }) {
48
54
  if (!name) return null
55
+ const radiusCls = radius === 'full' ? ' kol-icon-frame-radius-full' : ''
49
56
  return (
50
57
  <span
51
- className={`kol-icon-frame kol-icon-frame-${variant} kol-icon-frame-${size} ${className}`.trim()}
58
+ className={`kol-icon-frame kol-icon-frame-${variant} kol-icon-frame-${size}${radiusCls} ${className}`.trim()}
52
59
  {...rest}
53
60
  >
54
61
  <Icon name={name} size={GLYPH[size] ?? GLYPH.md} />