@warp-ds/elements 2.0.2-next.2 → 2.0.2-next.4
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 +12 -9
- package/dist/index.js.map +2 -2
- package/dist/packages/attention/index.js +5 -8
- package/dist/packages/attention/index.js.map +2 -2
- package/dist/packages/select/index.d.ts +3 -0
- package/dist/packages/select/index.js +7 -1
- package/dist/packages/select/index.js.map +2 -2
- package/package.json +1 -1
|
@@ -1818,6 +1818,11 @@ var WarpSelect = class extends kebabCaseAttributes(WarpElement) {
|
|
|
1818
1818
|
event.preventDefault();
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
|
+
// Fire a custom 'change' event, used when the dropdown changes state.
|
|
1822
|
+
onChange({ target }) {
|
|
1823
|
+
const event = new CustomEvent("change", { detail: target.value });
|
|
1824
|
+
this.dispatchEvent(event);
|
|
1825
|
+
}
|
|
1821
1826
|
render() {
|
|
1822
1827
|
return html2`<div class="${select.wrapper}">
|
|
1823
1828
|
${when(
|
|
@@ -1844,7 +1849,8 @@ var WarpSelect = class extends kebabCaseAttributes(WarpElement) {
|
|
|
1844
1849
|
aria-describedby="${ifDefined(__privateGet(this, _WarpSelect_instances, helpId_get))}"
|
|
1845
1850
|
aria-invalid="${ifDefined(this.invalid)}"
|
|
1846
1851
|
aria-errormessage="${ifDefined(this.invalid && __privateGet(this, _WarpSelect_instances, helpId_get))}"
|
|
1847
|
-
@keydown=${this.handleKeyDown}
|
|
1852
|
+
@keydown=${this.handleKeyDown}
|
|
1853
|
+
@change=${this.onChange}>
|
|
1848
1854
|
${unsafeHTML(this._options)}
|
|
1849
1855
|
</select>
|
|
1850
1856
|
<div class="${__privateGet(this, _WarpSelect_instances, chevronClasses_get)}">
|