Skip to content

Commit f55125c

Browse files
authored
docs: update form-item JSDoc for label position and shadow parts (#11393)
1 parent 9908812 commit f55125c

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

packages/form-layout/src/vaadin-form-item.d.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ import { FormItemMixin } from './vaadin-form-item-mixin.js';
4343
* because the `label-position` attribute is triggered automatically by the parent
4444
* `<vaadin-form-layout>`, depending on its width and responsive behavior.
4545
*
46-
* **Deprecation note:** The `label-position` attribute is deprecated since 24.7 and
47-
* will be removed in Vaadin 25, when a new approach for setting the label position
48-
* will be introduced.
46+
* **Deprecation note:** The `label-position` attribute is deprecated and will be removed
47+
* in Vaadin 26. Use `labelsAside` property on the form-layout instead.
4948
*
5049
* ### Input Width
5150
*
@@ -62,23 +61,23 @@ import { FormItemMixin } from './vaadin-form-item-mixin.js';
6261
*
6362
* ### Styling
6463
*
65-
* The `label-position` host attribute can be used to target the label on top state:
64+
* The `label-position` attribute can be used to target the label on top state:
6665
*
6766
* ```css
68-
* :host([label-position="top"]) {
67+
* vaadin-form-item[label-position="top"] {
6968
* padding-top: 0.5rem;
7069
* }
7170
* ```
7271
*
73-
* **Deprecation note:** The `label-position` attribute is deprecated since 24.7 and
74-
* will be removed in Vaadin 25, when a new approach to styling the form-item
75-
* based on the label position will be introduced.
72+
* **Deprecation note:** The `label-position` attribute is deprecated and will be removed
73+
* in Vaadin 26. Use `labelsAside` property on the form-layout instead.
7674
*
7775
* The following shadow DOM parts are available for styling:
7876
*
79-
* Part name | Description
80-
* ---|---
81-
* label | The label slot container
77+
* Part name | Description
78+
* ---------------------|-------------
79+
* `label` | The slotted label element wrapper
80+
* `required-indicator` | The `required` state indicator element
8281
*
8382
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
8483
*/

packages/form-layout/src/vaadin-form-item.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ import { FormItemMixin } from './vaadin-form-item-mixin.js';
4848
* because the `label-position` attribute is triggered automatically by the parent
4949
* `<vaadin-form-layout>`, depending on its width and responsive behavior.
5050
*
51-
* **Deprecation note:** The `label-position` attribute is deprecated since 24.7 and
52-
* will be removed in Vaadin 25, when a new approach for setting the label position
53-
* will be introduced.
51+
* **Deprecation note:** The `label-position` attribute is deprecated and will be removed
52+
* in Vaadin 26. Use `labelsAside` property on the form-layout instead.
5453
*
5554
* ### Input Width
5655
*
@@ -67,23 +66,23 @@ import { FormItemMixin } from './vaadin-form-item-mixin.js';
6766
*
6867
* ### Styling
6968
*
70-
* The `label-position` host attribute can be used to target the label on top state:
69+
* The `label-position` attribute can be used to target the label on top state:
7170
*
7271
* ```css
73-
* :host([label-position="top"]) {
72+
* vaadin-form-item[label-position="top"] {
7473
* padding-top: 0.5rem;
7574
* }
7675
* ```
7776
*
78-
* **Deprecation note:** The `label-position` attribute is deprecated since 24.7 and
79-
* will be removed in Vaadin 25, when a new approach to styling the form-item
80-
* based on the label position will be introduced.
77+
* **Deprecation note:** The `label-position` attribute is deprecated and will be removed
78+
* in Vaadin 26. Use `labelsAside` property on the form-layout instead.
8179
*
8280
* The following shadow DOM parts are available for styling:
8381
*
84-
* Part name | Description
85-
* ---|---
86-
* label | The label slot container
82+
* Part name | Description
83+
* ---------------------|-------------
84+
* `label` | The slotted label element wrapper
85+
* `required-indicator` | The `required` state indicator element
8786
*
8887
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
8988
*

0 commit comments

Comments
 (0)