Skip to content

Commit

Permalink
add missing annotations and delcarations
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Mar 5, 2025
1 parent e32f90b commit 56b67f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/form-layout/src/vaadin-form-layout-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
import type { Constructor } from '@open-wc/dedupe-mixin';
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';

export type FormLayoutLabelsPosition = 'aside' | 'top';

Expand All @@ -19,7 +20,7 @@ export type FormLayoutResponsiveStep = {
*/
export declare function FormLayoutMixin<T extends Constructor<HTMLElement>>(
base: T,
): Constructor<ResizeMixinClass> & Constructor<FormLayoutMixinClass> & T;
): Constructor<ResizeMixinClass> & Constructor<FormLayoutMixinClass> & Constructor<SlotStylesMixinClass> & T;

export declare class FormLayoutMixinClass {
/**
Expand Down
4 changes: 4 additions & 0 deletions packages/form-layout/src/vaadin-form-layout-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,10 @@ export const FormLayoutMixin = (superClass) =>
this.__childrenAttributesObserver.disconnect();
}

/**
* @override
* @protected
*/
get slotStyles() {
return [`${formLayoutSlotStyles}`.replace('vaadin-form-layout', this.localName)];
}
Expand Down
1 change: 1 addition & 0 deletions packages/form-layout/src/vaadin-form-layout-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const formLayoutStyles = css`
`;

export const formLayoutSlotStyles = css`
/* Using :where to ensure user styles always take precedence */
:where(vaadin-form-layout[auto-responsive] vaadin-form-item > *) {
box-sizing: border-box;
max-width: 100%;
Expand Down

0 comments on commit 56b67f9

Please sign in to comment.