Skip to content

Commit

Permalink
fix(ui5-textarea): improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
niyap committed Nov 23, 2023
1 parent 04598ad commit 02bd029
Showing 1 changed file with 21 additions and 54 deletions.
75 changes: 21 additions & 54 deletions packages/main/src/TextArea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@ type ExceededText = {
* <code>import "@ui5/webcomponents/dist/TextArea";</code>
*
* @constructor
* @author SAP SE
* @alias sap.ui.webc.main.TextArea
* @extends sap.ui.webc.base.UI5Element
* @tagname ui5-textarea
* @extends UI5Element
* @implements {IFormElement}
* @public
* @csspart textarea - Used to style the native textarea
*/
@customElement({
tag: "ui5-textarea",
Expand All @@ -99,7 +98,6 @@ type ExceededText = {
/**
* Fired when the text has changed and the focus leaves the component.
*
* @event sap.ui.webc.main.TextArea#change
* @public
*/
@event("change")
Expand All @@ -108,7 +106,6 @@ type ExceededText = {
* Fired when the value of the component changes at each keystroke or when
* something is pasted.
*
* @event sap.ui.webc.main.TextArea#input
* @since 1.0.0-rc.5
* @public
*/
Expand All @@ -118,11 +115,9 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Defines the value of the component.
*
* @type {string}
* @name sap.ui.webc.main.TextArea.prototype.value
* @formEvents change input
* @formProperty
* @defaultvalue ""
* @default ""
* @public
*/
@property()
Expand All @@ -132,9 +127,7 @@ class TextArea extends UI5Element implements IFormElement {
* <br><br>
* <b>Note:</b> A disabled component is completely noninteractive.
*
* @type {boolean}
* @name sap.ui.webc.main.TextArea.prototype.disabled
* @defaultvalue false
* @default false
* @public
*/
@property({ type: Boolean })
Expand All @@ -145,19 +138,15 @@ class TextArea extends UI5Element implements IFormElement {
* <b>Note:</b> A read-only component is not editable,
* but still provides visual feedback upon user interaction.
*
* @type {boolean}
* @name sap.ui.webc.main.TextArea.prototype.readonly
* @defaultvalue false
* @default false
* @public
*/
@property({ type: Boolean })
readonly!: boolean;
/**
* Defines whether the component is required.
*
* @type {boolean}
* @name sap.ui.webc.main.TextArea.prototype.required
* @defaultvalue false
* @default false
* @public
* @since 1.0.0-rc.3
*/
Expand All @@ -167,9 +156,7 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Defines a short hint intended to aid the user with data entry when the component has no value.
*
* @type {string}
* @name sap.ui.webc.main.TextArea.prototype.placeholder
* @defaultvalue ""
* @default ""
* @public
*/
@property()
Expand All @@ -182,9 +169,8 @@ class TextArea extends UI5Element implements IFormElement {
* <b>Note:</b> If <code>maxlength</code> property is set,
* the component turns into "Warning" state once the characters exceeds the limit.
* In this case, only the "Error" state is considered and can be applied.
* @type {sap.ui.webc.base.types.ValueState}
* @name sap.ui.webc.main.TextArea.prototype.valueState
* @defaultvalue "None"
*
* @default "None"
* @since 1.0.0-rc.7
* @public
*/
Expand All @@ -201,9 +187,7 @@ class TextArea extends UI5Element implements IFormElement {
* <li>The CSS <code>height</code> property wins over the <code>rows</code> property, if both are set.</li>
* </ul>
*
* @type {sap.ui.webc.base.types.Integer}
* @name sap.ui.webc.main.TextArea.prototype.rows
* @defaultvalue 0
* @default 0
* @public
*/
@property({ validator: Integer, defaultValue: 0 })
Expand All @@ -212,9 +196,7 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Defines the maximum number of characters that the <code>value</code> can have.
*
* @type {sap.ui.webc.base.types.Integer}
* @name sap.ui.webc.main.TextArea.prototype.maxlength
* @defaultValue null
* @default null
* @public
*/
@property({ validator: Integer, defaultValue: null })
Expand All @@ -229,10 +211,7 @@ class TextArea extends UI5Element implements IFormElement {
* If set to <code>true</code> the characters exceeding the <code>maxlength</code> value are selected on
* paste and the counter below the component displays their number.
*
* @type {boolean}
* @name sap.ui.webc.main.TextArea.prototype.showExceededText
* @defaultvalue false
* @default false
* @public
*/
@property({ type: Boolean })
Expand All @@ -241,9 +220,8 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Enables the component to automatically grow and shrink dynamically with its content.
* <br><br>
* @type {boolean}
* @name sap.ui.webc.main.TextArea.prototype.growing
* @defaultvalue false
*
* @default false
* @public
*/
@property({ type: Boolean })
Expand All @@ -252,9 +230,7 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Defines the maximum number of lines that the component can grow.
*
* @type {sap.ui.webc.base.types.Integer}
* @name sap.ui.webc.main.TextArea.prototype.growingMaxLines
* @defaultvalue 0
* @default 0
* @public
*/
@property({ validator: Integer, defaultValue: 0 })
Expand All @@ -272,9 +248,7 @@ class TextArea extends UI5Element implements IFormElement {
* will be created inside the component so that it can be submitted as
* part of an HTML form. Do not use this property unless you need to submit a form.
*
* @type {string}
* @name sap.ui.webc.main.TextArea.prototype.name
* @defaultvalue ""
* @default ""
* @public
*/
@property()
Expand All @@ -283,8 +257,7 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Defines the accessible ARIA name of the component.
*
* @type {string}
* @name sap.ui.webc.main.TextArea.prototype.accessibleName
* @default ""
* @public
* @since 1.0.0-rc.15
*/
Expand All @@ -294,9 +267,7 @@ class TextArea extends UI5Element implements IFormElement {
/**
* Receives id(or many ids) of the elements that label the textarea.
*
* @type {string}
* @name sap.ui.webc.main.TextArea.prototype.accessibleNameRef
* @defaultvalue ""
* @default ""
* @public
* @since 1.0.0-rc.15
*/
Expand Down Expand Up @@ -342,20 +313,16 @@ class TextArea extends UI5Element implements IFormElement {
* <br><br>
* <b>Note:</b> The <code>valueStateMessage</code> would be displayed if the component has
* <code>valueState</code> of type <code>Information</code>, <code>Warning</code> or <code>Error</code>.
* @type {HTMLElement[]}
* @name sap.ui.webc.main.TextArea.prototype.valueStateMessage
*
* @since 1.0.0-rc.7
* @slot
* @public
*/
@slot()
valueStateMessage!: Array<HTMLElement>;
/**
* The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,
* when <code>name</code> property is set.
* @type {HTMLElement[]}
* @name sa.ui.webc.main.TextArea.prototype.formSupport
* @slot
*
* @private
*/
@slot()
Expand Down

0 comments on commit 02bd029

Please sign in to comment.