@digital-realty/ix-select
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -108,2 +108,3 @@ import { LitElement, PropertyValues } from 'lit'; | ||
private handleSelection; | ||
private handleOpening; | ||
getUpdateComplete(): Promise<boolean>; | ||
@@ -118,2 +119,3 @@ protected updated(changed: PropertyValues<Select>): void; | ||
setCustomValidity(error: string): void; | ||
focus(): void; | ||
/** | ||
@@ -127,3 +129,3 @@ * Reset the select to its default value. | ||
formStateRestoreCallback(newState: string): void; | ||
connectedCallback(): Promise<void>; | ||
connectedCallback(): void; | ||
disconnectedCallback(): void; | ||
@@ -130,0 +132,0 @@ render(): import("lit-html").TemplateResult<2 | 1>; |
@@ -104,5 +104,2 @@ var _a; | ||
this.minWidth = 0; | ||
setTimeout(() => { | ||
this.minWidth = this.component.offsetWidth; | ||
}, 500); | ||
}; | ||
@@ -147,2 +144,7 @@ } | ||
} | ||
handleOpening() { | ||
if (this.wideMenu) { | ||
this.minWidth = this.component.offsetWidth; | ||
} | ||
} | ||
async getUpdateComplete() { | ||
@@ -188,2 +190,6 @@ await super.getUpdateComplete(); | ||
} | ||
focus() { | ||
var _b, _c; | ||
(_c = (_b = this.component.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.field')) === null || _c === void 0 ? void 0 : _c.focus(); | ||
} | ||
/** | ||
@@ -203,7 +209,5 @@ * Reset the select to its default value. | ||
} | ||
async connectedCallback() { | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
if (!isServer && this.wideMenu) { | ||
await this.updateComplete; | ||
this.minWidth = this.component.offsetWidth; | ||
window.addEventListener('resize', this.handleResize); | ||
@@ -235,3 +239,3 @@ } | ||
error-text=${this.getErrorText()} | ||
selected-index=${this.selectedIndex} | ||
selected-index=${ifDefined(this.selectedIndex === -1 ? undefined : this.selectedIndex)} | ||
display-text=${this.displayText} | ||
@@ -241,4 +245,6 @@ label=${this.label} | ||
@request-selection=${this.handleSelection} | ||
@opening=${this.handleOpening} | ||
class="select" | ||
style="min-width:${this.minWidth}px" | ||
@focus=${this.focus} | ||
> | ||
@@ -254,2 +260,3 @@ <slot></slot> | ||
: nothing} | ||
<slot slot="aria-describedby" name="aria-describedby"></slot> | ||
</${tag}>`; | ||
@@ -256,0 +263,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"author": "interxion", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"type": "module", | ||
@@ -36,3 +36,3 @@ "main": "dist/index.js", | ||
"@lit-labs/react": "^2.0.3", | ||
"@material/web": "^1.0.0", | ||
"@material/web": "^1.0.1", | ||
"lit": "^2.0.2", | ||
@@ -109,3 +109,3 @@ "react": "^18.2.0" | ||
], | ||
"gitHead": "22907facb6faf6308fa1ea46a7faf875bcb26422" | ||
"gitHead": "32eacf07ffc017cb281c3ea66f02ebbd1383b23a" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74802
997
Updated@material/web@^1.0.1