@aquera/nile-elements 1.3.4-beta-1 → 1.3.4-beta-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/dist/index.js +3 -2
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +3 -2
- package/dist/src/nile-chip/nile-chip.js +8 -0
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-chip/nile-chip.ts +9 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent nile-elements following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "nile-elements",
|
|
6
|
-
"version": "1.3.4-beta-
|
|
6
|
+
"version": "1.3.4-beta-2",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"module": "dist/src/index.js",
|
|
@@ -314,6 +314,7 @@ export class NileChip extends NileElement {
|
|
|
314
314
|
.noOutline=${true}
|
|
315
315
|
.noPadding=${true}
|
|
316
316
|
.disabled=${this.disabled}
|
|
317
|
+
.readonly=${this.readonly}
|
|
317
318
|
.portal=${this.portal}
|
|
318
319
|
openOnFocus
|
|
319
320
|
exportparts="options__wrapper, input, base"
|
|
@@ -402,6 +403,14 @@ export class NileChip extends NileElement {
|
|
|
402
403
|
}
|
|
403
404
|
|
|
404
405
|
private handleInputKeydown(event: KeyboardEvent) {
|
|
406
|
+
if (this.readonly) {
|
|
407
|
+
const allowedKeys = ["ArrowUp", "ArrowDown", "Enter", "Tab"];
|
|
408
|
+
if (!allowedKeys.includes(event.key)) {
|
|
409
|
+
event.preventDefault();
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
405
414
|
if (!this.acceptUserInput) {
|
|
406
415
|
return;
|
|
407
416
|
}
|