SEV-392: reusable fuzzy combobox component (+fuzzysort) v0.4.0
comboboxData(config) Alpine factory: typeable input + fuzzysort-ranked dropdown (prefix/substring/abbreviation subsequence matching), keyboard nav (Arrow/Enter/Escape/Tab), a11y roles, x-modelable value binding. allowFree (default) accepts off-list typed values so classics/kit cars are never blocked; allowFree:false for closed lists (US states) snaps back to a valid option on blur. Foundation for replacing native <select> chrome with inputs that match our text fields. 17/17 tests pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -1,13 +1,14 @@
|
||||
{
|
||||
"name": "@switchev/web-shared",
|
||||
"version": "0.3.0",
|
||||
"description": "Shared browser helpers (formatters, markdown, image polling) for the SwitchEV frontends",
|
||||
"version": "0.4.0",
|
||||
"description": "Shared browser helpers (formatters, markdown, image polling, combobox) for the SwitchEV frontends",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./src/index.js",
|
||||
"./format": "./src/format.js",
|
||||
"./markdown": "./src/markdown.js",
|
||||
"./wait-image": "./src/wait-image.js"
|
||||
"./wait-image": "./src/wait-image.js",
|
||||
"./combobox": "./src/combobox.js"
|
||||
},
|
||||
"files": [
|
||||
"src"
|
||||
@@ -15,6 +16,9 @@
|
||||
"sideEffects": [
|
||||
"./src/markdown.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"fuzzysort": "^3.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"dompurify": ">=3",
|
||||
"marked": ">=12"
|
||||
|
||||
Reference in New Issue
Block a user