@kolkrabbi/kol-component 0.20.0 → 0.20.1
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 +1 -1
- package/src/atoms/Input.jsx +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-component",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.1",
|
|
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",
|
package/src/atoms/Input.jsx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Icon } from '@kolkrabbi/kol-icons'
|
|
2
|
+
import { glyphSize } from '../hooks/glyphLadders.js'
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Input — single-input atom built on the .kol-control shell.
|
|
@@ -31,7 +32,6 @@ import { Icon } from '@kolkrabbi/kol-icons'
|
|
|
31
32
|
*/
|
|
32
33
|
|
|
33
34
|
const SIZE_TYPE = { sm: 'kol-mono-12', md: 'kol-mono-14', lg: 'kol-mono-16' }
|
|
34
|
-
const ICON_SIZE = { sm: 14, md: 14, lg: 18 }
|
|
35
35
|
|
|
36
36
|
export default function Input({
|
|
37
37
|
type = 'text',
|
|
@@ -53,7 +53,12 @@ export default function Input({
|
|
|
53
53
|
}) {
|
|
54
54
|
const isNumber = type === 'number'
|
|
55
55
|
const fixedChars = typeof chars === 'number'
|
|
56
|
-
|
|
56
|
+
// The text-adjacent ladder — an Input's icon sits in the rung's line box
|
|
57
|
+
// beside the value, exactly like a labelled Button's. `.kol-control-*` and
|
|
58
|
+
// `.kol-btn-*` carry identical padding + type per rung, so the glyph is the
|
|
59
|
+
// same too. This was a local ICON_SIZE with `md: 14` until 0.20.1, the last
|
|
60
|
+
// of the four transcriptions (sm and lg had always agreed).
|
|
61
|
+
const resolvedIconSize = iconSize ?? glyphSize(size)
|
|
57
62
|
|
|
58
63
|
// ghost folds into outline (2026-07-08 chrome law): one secondary treatment.
|
|
59
64
|
const resolvedVariant = variant === 'ghost' ? 'outline' : variant
|