makeup-listbox
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -249,3 +249,3 @@ "use strict"; | ||
if (isTolElSelected === false) { | ||
if (this._options.autoSelect === false && isTolElSelected === false) { | ||
this.unselect(this.index); | ||
@@ -262,3 +262,3 @@ this.select(toElIndex); | ||
if (isTolElSelected === false) { | ||
if (this._options.autoSelect === false && isTolElSelected === false) { | ||
this.unselect(this.index); | ||
@@ -265,0 +265,0 @@ this.select(toElIndex); |
{ | ||
"name": "makeup-listbox", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"lockfileVersion": 1, | ||
@@ -11,4 +11,66 @@ "requires": true, | ||
"integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" | ||
}, | ||
"makeup-active-descendant": { | ||
"version": "0.3.9", | ||
"resolved": "https://registry.npmjs.org/makeup-active-descendant/-/makeup-active-descendant-0.3.9.tgz", | ||
"integrity": "sha512-YsVRw/i6xAUSv0RbjCqzPTl2uKeYSeBdaZZUvTGCLGPr9RO+W0cEfNgWnvFP8301QhcWC63UhD8VLLsH9v0r5Q==", | ||
"requires": { | ||
"custom-event": "^1", | ||
"makeup-navigation-emitter": "~0.3.8", | ||
"makeup-next-id": "~0.1.3", | ||
"nodelist-foreach-polyfill": "^1" | ||
} | ||
}, | ||
"makeup-exit-emitter": { | ||
"version": "0.2.6", | ||
"resolved": "https://registry.npmjs.org/makeup-exit-emitter/-/makeup-exit-emitter-0.2.6.tgz", | ||
"integrity": "sha512-Z96cKFAZ2MZNmu24qylOhStUNrNMDVAqJuDdfocH71/MN3dn23k9QhNr0mXFIs3c72Gyn1Wg5qqNbeO5ZTSMOQ==", | ||
"requires": { | ||
"custom-event": "^1", | ||
"makeup-next-id": "~0.1.3" | ||
} | ||
}, | ||
"makeup-key-emitter": { | ||
"version": "0.1.3", | ||
"resolved": "https://registry.npmjs.org/makeup-key-emitter/-/makeup-key-emitter-0.1.3.tgz", | ||
"integrity": "sha512-cykzWqrqGcL7f49QQHSPbocS2WrDcBv51ZhQNimhNhyHI5NCeU7wYUDiLet/6RstQIwhpGKt18U8BO585kUq8A==", | ||
"requires": { | ||
"custom-event": "^1" | ||
} | ||
}, | ||
"makeup-navigation-emitter": { | ||
"version": "0.3.8", | ||
"resolved": "https://registry.npmjs.org/makeup-navigation-emitter/-/makeup-navigation-emitter-0.3.8.tgz", | ||
"integrity": "sha512-MmJ8V2bRzntgGPU+eeIQBoZ7ZTpA4eh/jF4sZuoBtAxnoe0tUgOvUn8L/6u1n2qIfcqhdhdMcWhFweh+n6twXw==", | ||
"requires": { | ||
"custom-event": "^1", | ||
"makeup-exit-emitter": "~0.2.6", | ||
"makeup-key-emitter": "~0.1.2", | ||
"nodelist-foreach-polyfill": "^1" | ||
} | ||
}, | ||
"makeup-next-id": { | ||
"version": "0.1.3", | ||
"resolved": "https://registry.npmjs.org/makeup-next-id/-/makeup-next-id-0.1.3.tgz", | ||
"integrity": "sha512-X0iLqUblyFBbGA78JCTpoXno08NseFOBx6ywTKk0+o1A/rqs1fAr6xdNLGSQhAwbppIztGS3ByjZ/t/Gd7Azdg==", | ||
"requires": { | ||
"nanoid": "^2" | ||
} | ||
}, | ||
"makeup-prevent-scroll-keys": { | ||
"version": "0.0.4", | ||
"resolved": "https://registry.npmjs.org/makeup-prevent-scroll-keys/-/makeup-prevent-scroll-keys-0.0.4.tgz", | ||
"integrity": "sha512-gwQJlWF0u2Rk02IN4Fwjzl4fMGJBBqUxf3TE0uVXLTlqveePFSlGksGwCJuicsFk1v0DYXV14gO1K9v0MuVjUw==" | ||
}, | ||
"nanoid": { | ||
"version": "2.1.11", | ||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", | ||
"integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" | ||
}, | ||
"nodelist-foreach-polyfill": { | ||
"version": "1.2.0", | ||
"resolved": "https://registry.npmjs.org/nodelist-foreach-polyfill/-/nodelist-foreach-polyfill-1.2.0.tgz", | ||
"integrity": "sha512-hPW0tSoi1gJ3diSOyjFYOsYLZjnxF04psobzKA5GGGCz3fKHnLODwgdyXQq2cddYlvmT3q+ZNEBrfBdMkYPLaA==" | ||
} | ||
} | ||
} |
{ | ||
"name": "makeup-listbox", | ||
"description": "A JavaScript class representing an ARIA listbox", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/makeup-js/makeup-js/tree/master/packages/makeup-listbox", |
# makeup-listbox | ||
A JavaScript class that represents an ARIA listbox. No CSS provided. | ||
A JavaScript class that represents an ARIA [listbox](https://ebay.github.io/mindpatterns/input/listbox/index.html). No CSS provided. | ||
## Example | ||
The following markup is required. Classnames are configurable (see config section below). | ||
The following markup structure and classnames are required. Any SVG icons can be used. | ||
@@ -57,9 +57,4 @@ ```html | ||
Set to true if using the class as the model for a custom element (aka Web Component) | ||
Set to true if using the class as the model for a custom element (aka Web Component). | ||
### BEM | ||
Use this object to specify your custom classnames (i.e. if you don't wish to use the default `listbox` prefixes). | ||
## Events | ||
@@ -69,4 +64,5 @@ | ||
Fired when the switch is toggled. | ||
Fired when the selected option changes. | ||
* `detail.on`: true or false | ||
* `optionIndex`: the index position of the selected option | ||
* `optionValue`: the value of the selected option |
17401
330
67