Skip to content

Commit

Permalink
improve JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Feb 19, 2025
1 parent c19c8d0 commit 490294f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
29 changes: 14 additions & 15 deletions packages/form-layout/src/vaadin-form-layout-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,16 @@ export declare class FormLayoutMixinClass {
responsiveSteps: FormLayoutResponsiveStep[];

/**
* When enabled, makes the layout automatically create and adjust its columns based on
* the container width. The layout creates columns of fixed width (defined by `columnWidth`),
* up to the limit set by `maxColumns`. The number of columns adjusts dynamically as
* the container size changes.
* When enabled, the layout automatically creates and adjusts columns based on
* the container's width. Columns have a fixed width defined by `columnWidth`
* and their number increases up to the limit set by `maxColumns`. The layout
* dynamically adjusts the number of columns as the container size changes.
*
* By default, each field is placed on a new row. To group fields on the same row,
* wrap them into <vaadin-form-row> or enable the `autoRows` property to make
* the layout try to fit as many fields as possible on the same row before moving
* to the new row.
* By default, each field is placed on a new row. To group fields in the same row,
* wrap them in `<vaadin-form-row>` or enable the `autoRows` property, which allows
* the layout to fit as many fields as possible in a row before wrapping.
*
* NOTE: This property overrides any `responsiveSteps` configuration.
*
* @attr {boolean} auto-responsive
* NOTE: In this mode, `responsiveSteps` are ignored.
*/
autoResponsive: boolean;

Expand All @@ -85,14 +82,16 @@ export declare class FormLayoutMixinClass {
columnWidth: string;

/**
* When `autoResponsive` is enabled, defines the maximum number of columns the layout can create.
* The layout will create columns up to this limit, based on the available container width.
* When `autoResponsive` is enabled, defines the maximum number of columns
* that the layout can create. The layout will create columns up to this
* limit based on the available container width.
*/
maxColumns: number;

/**
* When enabled with `autoResponsive`, automatically places each field into the next available column
* until the row is filled. Then the layout moves to the next row.
* When enabled with `autoResponsive`, distributes fields across columns
* by placing each field in the next available column until the row is full,
* then starts a new row.
*/
autoRows: boolean;

Expand Down
27 changes: 14 additions & 13 deletions packages/form-layout/src/vaadin-form-layout-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,16 @@ export const FormLayoutMixin = (superClass) =>
},

/**
* When enabled, makes the layout automatically create and adjust its columns based on
* the container width. The layout creates columns of fixed width (defined by `columnWidth`),
* up to the limit set by `maxColumns`. The number of columns adjusts dynamically as
* the container size changes.
* When enabled, the layout automatically creates and adjusts columns based on
* the container's width. Columns have a fixed width defined by `columnWidth`
* and their number increases up to the limit set by `maxColumns`. The layout
* dynamically adjusts the number of columns as the container size changes.
*
* By default, each field is placed on a new row. To group fields on the same row,
* wrap them into <vaadin-form-row> or enable the `autoRows` property to make
* the layout try to fit as many fields as possible on the same row before moving
* to the new row.
* By default, each field is placed on a new row. To group fields in the same row,
* wrap them in `<vaadin-form-row>` or enable the `autoRows` property, which allows
* the layout to fit as many fields as possible in a row before wrapping.
*
* NOTE: This property overrides any `responsiveSteps` configuration.
* NOTE: In this mode, `responsiveSteps` are ignored.
*
* @attr {boolean} auto-responsive
*/
Expand All @@ -116,8 +115,9 @@ export const FormLayoutMixin = (superClass) =>
},

/**
* When `autoResponsive` is enabled, defines the maximum number of columns the layout can create.
* The layout will create columns up to this limit, based on the available container width.
* When `autoResponsive` is enabled, defines the maximum number of columns
* that the layout can create. The layout will create columns up to this
* limit based on the available container width.
*
* @attr {number} max-columns
*/
Expand All @@ -128,8 +128,9 @@ export const FormLayoutMixin = (superClass) =>
},

/**
* When enabled with `autoResponsive`, automatically places each field into the next available column
* until the row is filled. Then the layout moves to the next row.
* When enabled with `autoResponsive`, distributes fields across columns
* by placing each field in the next available column until the row is full,
* then starts a new row.
*
* @attr {boolean} auto-rows
*/
Expand Down

0 comments on commit 490294f

Please sign in to comment.