From 02bd029eb32c6f51579b1b3d0b557ed6b169a990 Mon Sep 17 00:00:00 2001 From: Nia Peeva Date: Thu, 23 Nov 2023 19:17:13 +0200 Subject: [PATCH] fix(ui5-textarea): improve documentation --- packages/main/src/TextArea.ts | 75 ++++++++++------------------------- 1 file changed, 21 insertions(+), 54 deletions(-) diff --git a/packages/main/src/TextArea.ts b/packages/main/src/TextArea.ts index 5e5631dbb386..524d5827662c 100644 --- a/packages/main/src/TextArea.ts +++ b/packages/main/src/TextArea.ts @@ -80,11 +80,10 @@ type ExceededText = { * import "@ui5/webcomponents/dist/TextArea"; * * @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", @@ -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") @@ -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 */ @@ -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() @@ -132,9 +127,7 @@ class TextArea extends UI5Element implements IFormElement { *

* Note: A disabled component is completely noninteractive. * - * @type {boolean} - * @name sap.ui.webc.main.TextArea.prototype.disabled - * @defaultvalue false + * @default false * @public */ @property({ type: Boolean }) @@ -145,9 +138,7 @@ class TextArea extends UI5Element implements IFormElement { * Note: 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 }) @@ -155,9 +146,7 @@ class TextArea extends UI5Element implements IFormElement { /** * 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 */ @@ -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() @@ -182,9 +169,8 @@ class TextArea extends UI5Element implements IFormElement { * Note: If maxlength 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 */ @@ -201,9 +187,7 @@ class TextArea extends UI5Element implements IFormElement { *
  • The CSS height property wins over the rows property, if both are set.
  • * * - * @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 }) @@ -212,9 +196,7 @@ class TextArea extends UI5Element implements IFormElement { /** * Defines the maximum number of characters that the value 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 }) @@ -229,10 +211,7 @@ class TextArea extends UI5Element implements IFormElement { * If set to true the characters exceeding the maxlength 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 }) @@ -241,9 +220,8 @@ class TextArea extends UI5Element implements IFormElement { /** * Enables the component to automatically grow and shrink dynamically with its content. *

    - * @type {boolean} - * @name sap.ui.webc.main.TextArea.prototype.growing - * @defaultvalue false + * + * @default false * @public */ @property({ type: Boolean }) @@ -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 }) @@ -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() @@ -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 */ @@ -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 */ @@ -342,10 +313,8 @@ class TextArea extends UI5Element implements IFormElement { *

    * Note: The valueStateMessage would be displayed if the component has * valueState of type Information, Warning or Error. - * @type {HTMLElement[]} - * @name sap.ui.webc.main.TextArea.prototype.valueStateMessage + * * @since 1.0.0-rc.7 - * @slot * @public */ @slot() @@ -353,9 +322,7 @@ class TextArea extends UI5Element implements IFormElement { /** * The slot is used to render native input HTML element within Light DOM to enable form submit, * when name property is set. - * @type {HTMLElement[]} - * @name sa.ui.webc.main.TextArea.prototype.formSupport - * @slot + * * @private */ @slot()