@smilodon/vanilla 1.9.1 → 1.9.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/README.md +14 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -438,6 +438,20 @@ document.body.appendChild(select);
|
|
|
438
438
|
|
|
439
439
|
Styling hooks: `::part(clear-button)`, `::part(clear-icon)`, and `--select-clear-*` CSS variables.
|
|
440
440
|
|
|
441
|
+
The default `hideWhenEmpty: true` behavior means an empty clearable select reserves no action-area space. A selection or enabled search query reveals the button and coordinated input/arrow layout; clearing both restores the normal layout. This applies to single, multi-select, LTR, and RTL modes.
|
|
442
|
+
|
|
443
|
+
Use full config passthrough when a permanently visible disabled-when-empty action is intentional:
|
|
444
|
+
|
|
445
|
+
```typescript
|
|
446
|
+
const select = createSelect({
|
|
447
|
+
items,
|
|
448
|
+
clearable: true,
|
|
449
|
+
config: { clearControl: { hideWhenEmpty: false } },
|
|
450
|
+
});
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
`onClear` reports `clearedSelection` and `clearedSearch`. Prefer the clear-button parts and tokens over adding permanent input padding.
|
|
454
|
+
|
|
441
455
|
### With Event Listeners
|
|
442
456
|
|
|
443
457
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smilodon/vanilla",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "Vanilla JavaScript helpers for Smilodon Select - part of the Smilodon UI toolkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepublishOnly": "npm run build"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@smilodon/core": "^1.9.
|
|
27
|
+
"@smilodon/core": "^1.9.2"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"typescript": "^5.6.2",
|