makeup-listbox-button
Advanced tools
Comparing version 0.5.4 to 0.5.5
@@ -153,7 +153,7 @@ "use strict"; | ||
const icon = e.detail.el.querySelector(listboxOptionIconSelector).cloneNode(true); | ||
let btnContent = this._buttonPrefix ? `${this._buttonPrefix}${toValue}` : toValue; | ||
let btnContent = this._buttonPrefix ? "".concat(this._buttonPrefix).concat(toValue) : toValue; | ||
if (icon) { | ||
switch (buttonValueType) { | ||
case "both": | ||
btnContent = `${icon.outerHTML} <span>${btnContent}</span>`; | ||
btnContent = "".concat(icon.outerHTML, " <span>").concat(btnContent, "</span>"); | ||
break; | ||
@@ -171,3 +171,3 @@ case "icon": | ||
const selectorText = (_e$detail$el$querySel = e.detail.el.querySelector(listboxOptionAriaLabelSelector)) === null || _e$detail$el$querySel === void 0 ? void 0 : _e$detail$el$querySel.innerText.trim(); | ||
this._buttonEl.setAttribute("aria-label", this._buttonPrefix ? `${this._buttonPrefix} ${selectorText}` : selectorText); | ||
this._buttonEl.setAttribute("aria-label", this._buttonPrefix ? "".concat(this._buttonPrefix, " ").concat(selectorText) : selectorText); | ||
} | ||
@@ -174,0 +174,0 @@ this._buttonLabelEl.innerHTML = btnContent; |
@@ -18,3 +18,3 @@ import Expander from "makeup-expander"; | ||
}; | ||
class src_default { | ||
class index_default { | ||
constructor(widgetEl, selectedOptions) { | ||
@@ -185,3 +185,3 @@ this._options = Object.assign({}, defaultOptions, selectedOptions); | ||
export { | ||
src_default as default | ||
index_default as default | ||
}; |
{ | ||
"name": "makeup-listbox-button", | ||
"description": "A JavaScript class representing an ARIA listbox button", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"main": "./dist/cjs/index.js", | ||
@@ -23,4 +23,4 @@ "module": "./dist/mjs/index.js", | ||
"dependencies": { | ||
"makeup-expander": "^0.11.3", | ||
"makeup-listbox": "^0.4.3" | ||
"makeup-expander": "^0.11.4", | ||
"makeup-listbox": "^0.4.4" | ||
}, | ||
@@ -36,3 +36,3 @@ "files": [ | ||
], | ||
"gitHead": "d5eb699503d9b7f3eb9ff04379de5a38aa63096a" | ||
"gitHead": "72b3adbcb4d841dbd4ad8e722637b3d7de3ab7f0" | ||
} |
17782
Updatedmakeup-expander@^0.11.4
Updatedmakeup-listbox@^0.4.4