This commit is contained in:
Lea Verou
2024-12-17 04:29:37 -05:00
parent 6bb6bcc538
commit d9b8fc6806
4 changed files with 11 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ export default class WaFormatBytes extends WebAwesomeElement {
return this.localize.number(valueToFormat, {
style: 'unit',
unit,
unitDisplay: this.display
unitDisplay: this.display,
});
}
}

View File

@@ -79,7 +79,7 @@ export default class WaFormatDate extends WebAwesomeElement {
second: this.second,
timeZoneName: this.timeZoneName,
timeZone: this.timeZone,
hour12: hour12
hour12: hour12,
})}
</time>
`;

View File

@@ -60,7 +60,7 @@ export default class WaFormatNumber extends WebAwesomeElement {
minimumFractionDigits: this.minimumFractionDigits,
maximumFractionDigits: this.maximumFractionDigits,
minimumSignificantDigits: this.minimumSignificantDigits,
maximumSignificantDigits: this.maximumSignificantDigits
maximumSignificantDigits: this.maximumSignificantDigits,
});
}
}

View File

@@ -207,8 +207,8 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
converter: {
// Allow "true|false" attribute values but keep the property boolean
fromAttribute: value => (!value || value === 'false' ? false : true),
toAttribute: value => (value ? 'true' : 'false')
}
toAttribute: value => (value ? 'true' : 'false'),
},
})
spellcheck = true;
@@ -290,7 +290,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
}
const button = formElements.find(
(el: HTMLButtonElement) => el.type === 'submit' && !el.matches(':disabled')
(el: HTMLButtonElement) => el.type === 'submit' && !el.matches(':disabled'),
) as undefined | HTMLButtonElement | WaButton;
// No button found, don't submit.
@@ -340,7 +340,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
setSelectionRange(
selectionStart: number,
selectionEnd: number,
selectionDirection: 'forward' | 'backward' | 'none' = 'none'
selectionDirection: 'forward' | 'backward' | 'none' = 'none',
) {
this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
}
@@ -350,7 +350,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
replacement: string,
start?: number,
end?: number,
selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'
selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve',
) {
const selectionStart = start ?? this.input.selectionStart!;
const selectionEnd = end ?? this.input.selectionEnd!;
@@ -411,7 +411,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
'form-control--small': this.size === 'small',
'form-control--medium': this.size === 'medium',
'form-control--large': this.size === 'large',
'form-control--has-label': hasLabel
'form-control--has-label': hasLabel,
})}
>
<label
@@ -441,7 +441,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
'input--disabled': this.disabled,
'input--focused': this.hasFocus,
'input--empty': !this.value,
'input--no-spin-buttons': this.noSpinButtons
'input--no-spin-buttons': this.noSpinButtons,
})}
>
<span part="prefix" class="input__prefix">
@@ -532,7 +532,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
name="hint"
part="hint"
class=${classMap({
'has-slotted': hasHint
'has-slotted': hasHint,
})}
aria-hidden=${hasHint ? 'false' : 'true'}
>${this.hint}</slot