@smilodon/core 1.9.1 → 1.9.3
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/dist/index.cjs +401 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +401 -179
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.umd.js +401 -179
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/components/enhanced-select.d.ts +12 -0
- package/dist/types/src/components/native-select.d.ts +2 -1
- package/dist/types/src/utils/custom-option-pool.d.ts +3 -4
- package/dist/types/src/utils/data-source.d.ts +7 -2
- package/dist/types/src/utils/dom-pool.d.ts +1 -0
- package/dist/types/src/utils/telemetry.d.ts +2 -2
- package/dist/types/src/utils/virtualizer.d.ts +2 -0
- package/dist/types/tests/memory-lifecycle.spec.d.ts +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -170,10 +170,24 @@ select.addEventListener('clear', (e) => {
|
|
|
170
170
|
});
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
+
`hideWhenEmpty` defaults to `true`. In that mode, the button and the action-area layout are hidden when neither an enabled selection nor an enabled search action has content to clear. Selecting a value or typing a searchable query reveals the control; clearing both restores the normal input padding and arrow/separator position. This behavior is the same for single select, multi-select, LTR, and RTL.
|
|
174
|
+
|
|
175
|
+
Set `hideWhenEmpty: false` when the control must remain visible while empty. It will be disabled until an enabled clear target exists. The target flags are independent:
|
|
176
|
+
|
|
177
|
+
| Configuration | Button becomes actionable when |
|
|
178
|
+
|---|---|
|
|
179
|
+
| `clearSelection: true`, `clearSearch: false` | At least one value is selected |
|
|
180
|
+
| `clearSelection: false`, `clearSearch: true` | Search text is present |
|
|
181
|
+
| Both `true` | Either selection or search text is present |
|
|
182
|
+
|
|
183
|
+
The `clear` event reports what actually changed. Programmatic `clear()` and `clearSearch()` remain available when no visible control is desired.
|
|
184
|
+
|
|
173
185
|
Style hooks:
|
|
174
186
|
- Parts: `::part(clear-button)`, `::part(clear-icon)`
|
|
175
187
|
- Tokens: `--select-clear-button-*`, `--select-clear-icon-*`, `--select-input-padding-with-clear`
|
|
176
188
|
|
|
189
|
+
The `--select-input-padding-with-clear` token applies only while the clear control is visible; keep ordinary empty-state spacing in the normal input padding tokens.
|
|
190
|
+
|
|
177
191
|
### Properties
|
|
178
192
|
|
|
179
193
|
```typescript
|