mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
Merge branch 'next' of https://github.com/shoelace-style/webawesome into konnorrogers/add-copy-buttons-to-swatches
This commit is contained in:
@@ -836,10 +836,15 @@ export default class WaSelect extends WebAwesomeFormAssociatedElement {
|
||||
placeholder=${this.placeholder}
|
||||
.disabled=${this.disabled}
|
||||
.value=${this.displayLabel}
|
||||
?required=${this.required}
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
autocapitalize="off"
|
||||
readonly
|
||||
aria-invalid=${
|
||||
!this.validity.valid
|
||||
/** aria-invalid is required because readonly inputs are technically always valid so it never reads 'invalid data' for screen readers. */
|
||||
}
|
||||
aria-controls="listbox"
|
||||
aria-expanded=${this.open ? 'true' : 'false'}
|
||||
aria-haspopup="listbox"
|
||||
|
||||
@@ -109,8 +109,8 @@ export class WebAwesomeFormAssociatedElement
|
||||
validators: Validator[] = [];
|
||||
|
||||
// Should these be private?
|
||||
@property({ state: true }) valueHasChanged: boolean = false;
|
||||
@property({ state: true }) hasInteracted: boolean = false;
|
||||
@property({ state: true, attribute: false }) valueHasChanged: boolean = false;
|
||||
@property({ state: true, attribute: false }) hasInteracted: boolean = false;
|
||||
|
||||
// This works around a limitation in Safari. It is a hacky way for us to preserve custom errors generated by the user.
|
||||
@property({ attribute: 'custom-error', reflect: true }) customError: string | null = null;
|
||||
@@ -223,6 +223,7 @@ export class WebAwesomeFormAssociatedElement
|
||||
return this.internals.form;
|
||||
}
|
||||
|
||||
@property({ attribute: false, state: true, type: Object })
|
||||
get validity() {
|
||||
return this.internals.validity;
|
||||
}
|
||||
@@ -265,7 +266,7 @@ export class WebAwesomeFormAssociatedElement
|
||||
}
|
||||
|
||||
this.internals.setValidity(flags, message, anchor || undefined);
|
||||
|
||||
this.requestUpdate('validity');
|
||||
this.setCustomStates();
|
||||
}
|
||||
|
||||
@@ -356,6 +357,7 @@ export class WebAwesomeFormAssociatedElement
|
||||
!this.willValidate //
|
||||
) {
|
||||
this.resetValidity();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user