pull/1978/head
konnorrogers 2024-04-12 13:29:17 -04:00
rodzic e5791607a4
commit 67ee38e233
2 zmienionych plików z 14 dodań i 14 usunięć

Wyświetl plik

@ -1746,4 +1746,4 @@ The following pages demonstrate why this change was necessary.
## 2.0.0-beta.1
- Initial release
- Initial release

Wyświetl plik

@ -54,7 +54,7 @@ export default class SlInput extends ShoelaceElement implements ShoelaceFormCont
static styles: CSSResultGroup = [componentStyles, formControlStyles, styles];
static dependencies = { 'sl-icon': SlIcon };
protected static __sharedInput: null | HTMLInputElement = null
protected static __sharedInput: null | HTMLInputElement = null;
private readonly formControlController = new FormControlController(this, {
assumeInteractionOn: ['sl-blur', 'sl-input']
@ -67,22 +67,22 @@ export default class SlInput extends ShoelaceElement implements ShoelaceFormCont
@state() private hasFocus = false;
@property() title = ''; // make reactive to pass through
private get __numberInput () {
const ctor = (this.constructor as unknown as typeof SlInput)
if (ctor.__sharedInput === null) ctor.__sharedInput = document.createElement("input")
private get __numberInput() {
const ctor = this.constructor as unknown as typeof SlInput;
if (ctor.__sharedInput === null) ctor.__sharedInput = document.createElement('input');
const input = ctor.__sharedInput
input.type = "number"
return input
const input = ctor.__sharedInput;
input.type = 'number';
return input;
}
private get __dateInput () {
const ctor = (this.constructor as unknown as typeof SlInput)
if (ctor.__sharedInput === null) ctor.__sharedInput = document.createElement("input")
private get __dateInput() {
const ctor = this.constructor as unknown as typeof SlInput;
if (ctor.__sharedInput === null) ctor.__sharedInput = document.createElement('input');
const input = ctor.__sharedInput
input.type = "date"
return input
const input = ctor.__sharedInput;
input.type = 'date';
return input;
}
/**