chore: add consistent styles inheritance for types
This commit is contained in:
parent
2f48f59244
commit
7f744e6368
5 changed files with 54 additions and 51 deletions
|
|
@ -607,8 +607,7 @@ const FormControlMixinImplementation = superclass =>
|
|||
* @return {CSSResult | CSSResult[]}
|
||||
*/
|
||||
static get styles() {
|
||||
return [
|
||||
css`
|
||||
return css`
|
||||
/**********************
|
||||
{block} .form-field
|
||||
********************/
|
||||
|
|
@ -657,8 +656,7 @@ const FormControlMixinImplementation = superclass =>
|
|||
margin: 0; /* remove input margin in Safari */
|
||||
font-size: 100%; /* normalize default input font-size */
|
||||
}
|
||||
`,
|
||||
];
|
||||
`;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ export function runFormGroupMixinInputSuite(cfg = {}) {
|
|||
<${childTag} name="custom[]"></${childTag}>
|
||||
</${tag}>
|
||||
`));
|
||||
console.log(fieldset.formElements['custom[]'][1]);
|
||||
fieldset.formElements['custom[]'][0].modelValue = 'custom 1';
|
||||
fieldset.formElements['custom[]'][1].modelValue = undefined;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ export declare class NativeTextFieldHost {
|
|||
|
||||
export declare function NativeTextFieldImplementation<T extends Constructor<NativeTextField>>(
|
||||
superclass: T,
|
||||
): T & Constructor<NativeTextFieldHost> & NativeTextFieldHost;
|
||||
): T & Constructor<NativeTextFieldHost> & NativeTextFieldHost & typeof NativeTextField;
|
||||
|
||||
export type NativeTextFieldMixin = typeof NativeTextFieldImplementation;
|
||||
|
|
|
|||
|
|
@ -53,11 +53,14 @@ export class LionInputAmount extends LocalizeMixin(LionInput) {
|
|||
}
|
||||
|
||||
static get styles() {
|
||||
return css`
|
||||
return [
|
||||
super.styles,
|
||||
css`
|
||||
.input-group__container > .input-group__input ::slotted(.form-control) {
|
||||
text-align: right;
|
||||
}
|
||||
`;
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -10,11 +10,14 @@ import { IsNumber, MinNumber, MaxNumber } from '@lion/form-core';
|
|||
// @ts-expect-error false positive for incompatible static get properties. Lit-element merges super properties already for you.
|
||||
export class LionInputStepper extends LionInput {
|
||||
static get styles() {
|
||||
return css`
|
||||
return [
|
||||
super.styles,
|
||||
css`
|
||||
.input-group__container > .input-group__input ::slotted(.form-control) {
|
||||
text-align: center;
|
||||
}
|
||||
`;
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
||||
static get properties() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue