@kolkrabbi/kol-component 0.61.0 → 0.62.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.
|
|
3
|
+
"version": "0.62.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",
|
|
@@ -81,6 +81,8 @@ export default function SearchInput({
|
|
|
81
81
|
open,
|
|
82
82
|
onOpenChange,
|
|
83
83
|
expandedWidth = 280,
|
|
84
|
+
iconSize,
|
|
85
|
+
fieldHeight,
|
|
84
86
|
triggerLabel = 'Open search',
|
|
85
87
|
className = '',
|
|
86
88
|
...inputProps
|
|
@@ -100,11 +102,14 @@ export default function SearchInput({
|
|
|
100
102
|
|
|
101
103
|
/* the pinned squares, 05-control-chrome.md — sm 28 · md 32 · lg 36 */
|
|
102
104
|
const square = { sm: 28, md: 32, lg: 36 }[size] ?? 32
|
|
103
|
-
/* THE OPEN FIELD IS
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
|
|
105
|
+
/* THE OPEN FIELD'S HEIGHT IS ITS OWN KNOB, defaulting to the square.
|
|
106
|
+
*
|
|
107
|
+
* /work's pill is `h-9` open AND closed, sitting level with a 36px toggle —
|
|
108
|
+
* that is the shipped design and the default must reproduce it. But a field
|
|
109
|
+
* beside two BARE 32px glyphs (ContentFilters) read as chunky at the full
|
|
110
|
+
* square, so that surface asks for a shorter one. Deriving it (`square - 4`)
|
|
111
|
+
* served the second case and silently broke the first. */
|
|
112
|
+
const fieldH = fieldHeight ?? square
|
|
108
113
|
|
|
109
114
|
/* Escape closes, and so does clicking away — a field that can only be closed
|
|
110
115
|
* by emptying it and blurring is a trap, and this one had neither wired. The
|
|
@@ -154,7 +159,7 @@ export default function SearchInput({
|
|
|
154
159
|
{/* SOLO ladder, and NO ink class — it inherits from its chrome
|
|
155
160
|
exactly as IconFrame's glyph does, so it cannot drift from the
|
|
156
161
|
icon beside it. */}
|
|
157
|
-
<Icon name="search" size={glyphSize(size, true)} />
|
|
162
|
+
<Icon name="search" size={iconSize ?? glyphSize(size, true)} />
|
|
158
163
|
</button>
|
|
159
164
|
)}
|
|
160
165
|
{isOpen && (
|
|
@@ -201,7 +206,7 @@ export default function SearchInput({
|
|
|
201
206
|
className={`flex items-center shrink-0 ${bare ? 'text-fg-48' : 'text-auto opacity-50'}`}
|
|
202
207
|
>
|
|
203
208
|
{/* ADJACENT — this glyph sits in the field's line box beside the query */}
|
|
204
|
-
<Icon name="search" size={glyphSize(size)} />
|
|
209
|
+
<Icon name="search" size={iconSize ?? glyphSize(size)} />
|
|
205
210
|
</span>
|
|
206
211
|
<input
|
|
207
212
|
type="search"
|
|
@@ -321,6 +321,9 @@ const ContentFilters = ({
|
|
|
321
321
|
* The organism's own field never had one. */
|
|
322
322
|
placeholder=""
|
|
323
323
|
size="md"
|
|
324
|
+
/* a rung under the 32 square: this field sits beside two BARE
|
|
325
|
+
* glyphs, and at the full square it read as a chunky input. */
|
|
326
|
+
fieldHeight={28}
|
|
324
327
|
/>
|
|
325
328
|
{headerActions}
|
|
326
329
|
</div>
|