{
  "name": "text-area",
  "version": "20.0.2",
  "jetVersion": "^20.0.2",
  "pack": "oj-c",
  "type": "composite",
  "dependencyScope": "runtime",
  "license": "https://opensource.org/licenses/UPL",
  "implements": [
    "CTextAreaElement"
  ],
  "displayName": "TextArea",
  "description": "A text area allows the user to enter a multi-line text value.",
  "help": "oj-c.TextArea.html",
  "main": "oj-c/text-area",
  "extension": {
    "catalog": {
      "category": "Forms"
    },
    "vbdt": {
      "module": "oj-c/text-area",
      "defaultColumns": 6,
      "minColumns": 2
    },
    "oracle": {
      "icon": "oj-ux-ico-text-input-area"
    },
    "webelement": {
      "package": "@oracle/oraclejet-core-pack",
      "version": "20.0.2",
      "docUrl": "https://www.oracle.com/webfolder/technetwork/jet/cpwdtsdoc/classes/TextAreaWebElement.html",
      "export": "findTextArea",
      "main": "@oracle/oraclejet-core-pack/webdriver"
    }
  },
  "since": "13.0.0",
  "status": [
    {
      "type": "supersedes",
      "since": "16.0.0",
      "value": [
        "oj-text-area"
      ]
    }
  ],
  "requirements": [
    {
      "type": "anyOf",
      "label": "accessibility",
      "properties": [
        "labelHint"
      ]
    },
    {
      "type": "not",
      "label": "accessibility",
      "properties": [
        "aria-label",
        "aria-labelledby"
      ]
    }
  ],
  "properties": {
    "autocomplete": {
      "type": "string",
      "description": "Dictates component's autocomplete state",
      "displayName": "Autocomplete",
      "help": "#autocomplete",
      "value": "on"
    },
    "columnSpan": {
      "type": "number",
      "description": "Specifies how many columns this component should span.",
      "displayName": "Column Span",
      "help": "#columnSpan",
      "value": 1
    },
    "containerReadonly": {
      "type": "boolean",
      "description": "Specifies whether an ancestor container, like oj-c-form-layout, is readonly.",
      "displayName": "Container Readonly",
      "help": "#containerReadonly",
      "binding": {
        "consume": {
          "name": "containerReadonly"
        }
      }
    },
    "converter": {
      "type": "object|null",
      "description": "Specifies the converter instance.",
      "displayName": "Converter",
      "help": "#converter",
      "value": null
    },
    "disabled": {
      "type": "boolean",
      "description": "Specifies whether the component is disabled.",
      "displayName": "Disabled",
      "help": "#disabled",
      "value": false
    },
    "displayOptions": {
      "type": "object",
      "description": "Display options for auxiliary content that determines whether or not it should be displayed.",
      "displayName": "Display Options",
      "help": "#displayOptions",
      "properties": {
        "converterHint": {
          "type": "string",
          "enumValues": [
            "none",
            "display"
          ],
          "value": "display"
        },
        "messages": {
          "type": "string",
          "enumValues": [
            "none",
            "display"
          ],
          "value": "display"
        },
        "validatorHint": {
          "type": "string",
          "enumValues": [
            "none",
            "display"
          ],
          "value": "display"
        }
      }
    },
    "help": {
      "type": "object",
      "description": "Form component help information.",
      "displayName": "Help",
      "help": "#help",
      "properties": {
        "instruction": {
          "type": "string",
          "value": ""
        }
      }
    },
    "helpHints": {
      "type": "object",
      "description": "The helpHints object contains a definition property and a source property.",
      "displayName": "Help Hints",
      "help": "#helpHints",
      "properties": {
        "definition": {
          "type": "string",
          "value": ""
        },
        "source": {
          "type": "string",
          "value": ""
        },
        "sourceText": {
          "type": "string"
        }
      }
    },
    "labelEdge": {
      "type": "string",
      "description": "Specifies how the label is positioned for the component",
      "displayName": "Label Edge",
      "help": "#labelEdge",
      "propertyEditorValues": {
        "inside": {
          "description": "The label floats over the input element, but moves up on focus or when the component has a value (default, if unspecified).",
          "displayName": "Inside"
        },
        "none": {
          "description": "The component will not create a label, but instead set the aria-label property on the input element.",
          "displayName": "None"
        },
        "start": {
          "description": "The label will be placed before the start of the component.",
          "displayName": "Start"
        },
        "top": {
          "description": "The label will be placed on top of the component.",
          "displayName": "Top"
        }
      },
      "enumValues": [
        "none",
        "start",
        "top",
        "inside"
      ],
      "binding": {
        "consume": {
          "name": "containerLabelEdge"
        }
      }
    },
    "labelHint": {
      "type": "string",
      "description": "Represents a hint for rendering a label on the component.",
      "displayName": "Label Hint",
      "help": "#labelHint",
      "required": true,
      "translatable": true
    },
    "labelStartWidth": {
      "type": "number|string",
      "description": "The width of the label when labelEdge is 'start'.",
      "displayName": "Label Start Width",
      "help": "#labelStartWidth",
      "binding": {
        "consume": {
          "name": "labelWidth"
        }
      }
    },
    "labelWrapping": {
      "type": "string",
      "status": [
        {
          "type": "deprecated",
          "since": "18.0.0",
          "description": "Label truncation for 'start' and 'top' aligned labels is no longer recommended by the Redwood Design System. The default for labelWrapping was 'wrap' and that is now the only suggested pattern by UX design for 'start' and 'top' aligned labels. 'inside' aligned labels are always truncated per UX design and are not affected by this property's value."
        }
      ],
      "description": "Should the labels wrap or truncate when there is not enough available space.",
      "displayName": "Label Wrapping",
      "help": "#labelWrapping",
      "propertyEditorValues": {
        "truncate": {
          "description": "Label will truncate if needed.",
          "displayName": "Truncate"
        },
        "wrap": {
          "description": "Label will wrap if needed.",
          "displayName": "Wrap"
        }
      },
      "enumValues": [
        "truncate",
        "wrap"
      ],
      "binding": {
        "consume": {
          "name": "labelWrapping"
        }
      }
    },
    "length": {
      "type": "object",
      "description": "Defines the length limit for the field",
      "displayName": "Length",
      "help": "#length",
      "properties": {
        "countBy": {
          "type": "string",
          "enumValues": [
            "codePoint",
            "codeUnit"
          ],
          "value": "codePoint"
        },
        "counter": {
          "type": "string",
          "enumValues": [
            "none",
            "remaining"
          ],
          "value": "remaining"
        },
        "max": {
          "type": "number|null",
          "value": null
        }
      }
    },
    "maxRows": {
      "type": "number",
      "description": "The maximum number of visible text lines of the textarea.",
      "displayName": "Max Rows",
      "help": "#maxRows"
    },
    "maxWidth": {
      "type": "number|string",
      "description": "The max width of the control.",
      "displayName": "Max Width",
      "help": "#maxWidth",
      "propertyEditorValues": {
        "sm": {},
        "md": {}
      }
    },
    "messagesCustom": {
      "type": "Array<object>",
      "description": "List of custom component messages",
      "displayName": "Messages Custom",
      "help": "#messagesCustom",
      "extension": {
        "vbdt": {
          "itemProperties": {
            "summary": {
              "type": "string"
            },
            "detail": {
              "type": "string"
            },
            "severity": {
              "type": "string",
              "enumValues": [
                "error",
                "confirmation",
                "info",
                "warning"
              ]
            }
          }
        }
      },
      "writeback": true,
      "value": []
    },
    "placeholder": {
      "type": "string",
      "description": "The placeholder text to set on the element.",
      "displayName": "Placeholder",
      "help": "#placeholder",
      "translatable": true
    },
    "readonly": {
      "type": "boolean",
      "description": "Whether the component is readonly",
      "displayName": "Readonly",
      "help": "#readonly",
      "binding": {
        "consume": {
          "name": "containerReadonly"
        }
      }
    },
    "readonlyUserAssistanceShown": {
      "type": "string",
      "description": "Specifies which user assistance types should be shown when the component is readonly.",
      "displayName": "ReadonlyUserAssistanceShown",
      "help": "#readonlyUserAssistanceShown",
      "enumValues": [
        "none",
        "confirmationAndInfoMessages"
      ],
      "value": "none"
    },
    "required": {
      "type": "boolean",
      "description": "Specifies whether or not the component is required.",
      "displayName": "Required",
      "help": "#required",
      "value": false
    },
    "requiredMessageDetail": {
      "type": "string",
      "description": "Overrides the default Required error message.",
      "displayName": "Required Message Detail",
      "help": "#requiredMessageDetail",
      "translatable": true
    },
    "resizeBehavior": {
      "type": "string",
      "description": "Defines the resizeBehavior of the textarea.",
      "displayName": "Resize Behavior",
      "help": "#resizeBehavior",
      "propertyEditorValues": {
        "horizontal": {
          "description": "The textarea will be resizable in the horizontal direction only.",
          "displayName": "Horizontal"
        },
        "vertical": {
          "description": "The textarea will be resizable in the vertical direction only.",
          "displayName": "Vertical"
        },
        "both": {
          "description": "The textarea will be interactively resizable both horizontally and vertically.",
          "displayName": "Both"
        },
        "none": {
          "description": "The textarea will not be resizable by the user.",
          "displayName": "None"
        }
      },
      "enumValues": [
        "none",
        "both",
        "horizontal",
        "vertical"
      ],
      "value": "none"
    },
    "rows": {
      "type": "number",
      "description": "The number of visible text lines in the textarea.",
      "displayName": "Rows",
      "help": "#rows"
    },
    "textAlign": {
      "type": "string",
      "description": "Specifies how the text is aligned within the text field",
      "displayName": "Text Align",
      "help": "#textAlign",
      "propertyEditorValues": {
        "start": {
          "description": "Aligns text left when reading direction is ltr and right when reading direction is rtl (default, if unspecified).",
          "displayName": "Start"
        },
        "end": {
          "description": "Aligns text right when reading direction is ltr and left when reading direction is rtl.",
          "displayName": "End"
        },
        "right": {
          "description": "Aligns text right regardless of reading direction, often used for numbers.",
          "displayName": "Right"
        }
      },
      "enumValues": [
        "end",
        "start",
        "right"
      ]
    },
    "userAssistanceDensity": {
      "type": "string",
      "description": "Specifies the density of the form component's user assistance presentation.",
      "displayName": "User Assistance Density",
      "help": "#userAssistanceDensity",
      "propertyEditorValues": {
        "reflow": {
          "description": "Messages, help, hints, and required are all shown inline under the field with no reserved space.",
          "displayName": "Reflow"
        },
        "efficient": {
          "description": "Messages, help, hints, and required are all shown inline under the field with reserved space.",
          "displayName": "Efficient"
        },
        "compact": {
          "description": "Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like a popup for the messages, and a required icon to indicate Required.",
          "displayName": "Compact"
        }
      },
      "enumValues": [
        "compact",
        "reflow",
        "efficient"
      ],
      "binding": {
        "consume": {
          "name": "containerUserAssistanceDensity"
        }
      }
    },
    "validators": {
      "type": "Array<object>|null",
      "description": "Specifies the validators for the component.",
      "displayName": "Validators",
      "help": "#validators",
      "value": []
    },
    "value": {
      "type": "any",
      "description": "The value of the component.",
      "displayName": "Value",
      "help": "#value",
      "writeback": true,
      "value": null
    },
    "width": {
      "type": "number|string",
      "description": "The width of the control.",
      "displayName": "Width",
      "help": "#width",
      "propertyEditorValues": {
        "sm": {},
        "md": {}
      }
    },
    "rawValue": {
      "type": "string",
      "description": "Specifies how the raw value of the component",
      "displayName": "Raw Value",
      "help": "#rawValue",
      "readOnly": true,
      "writeback": true
    },
    "valid": {
      "type": "string",
      "description": "Specifies how the valid state of the component",
      "displayName": "Valid",
      "help": "#valid",
      "propertyEditorValues": {
        "valid": {
          "description": "The component is valid",
          "displayName": "Valid"
        },
        "pending": {
          "description": "The component is waiting for the validation state to be determined. The 'pending' state is set at the start of the convert/validate process.",
          "displayName": "Pending"
        },
        "invalidHidden": {
          "description": "The component has invalid messages hidden and no invalid messages showing. An invalid message is one with severity 'error'.",
          "displayName": "Invalid Hidden"
        },
        "invalidShown": {
          "description": "The component has invalid messages showing. An invalid message is one with severity 'error'.",
          "displayName": "Invalid Shown"
        }
      },
      "enumValues": [
        "pending",
        "valid",
        "invalidHidden",
        "invalidShown"
      ],
      "readOnly": true,
      "writeback": true
    }
  },
  "methods": {
    "blur": {
      "description": "Blurs the input field.",
      "return": "void"
    },
    "focus": {
      "description": "Focuses the input field.",
      "return": "void"
    },
    "showMessages": {
      "description": "Takes all deferred messages and shows them.",
      "return": "void"
    },
    "reset": {
      "description": "Resets the component by clearing all messages and updating the component's display value using the attribute value.",
      "return": "void"
    },
    "validate": {
      "description": "If enabled, validates the component's display value using the converter and all validators registered on the component. The Promise resolves to 'valid' if there were no converter parse errors and the component passed all validations, or if the component is disabled or readonly.",
      "return": "Promise"
    },
    "setProperty": {
      "description": "Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.",
      "help": "#setProperty",
      "params": [
        {
          "name": "property",
          "description": "The property name to set. Supports dot notation for subproperty access.",
          "type": "string"
        },
        {
          "name": "value",
          "description": "The new value to set the property to.",
          "type": "any"
        }
      ],
      "return": "void"
    },
    "getProperty": {
      "description": "Retrieves the value of a property or a subproperty.",
      "help": "#getProperty",
      "params": [
        {
          "name": "property",
          "description": "The property name to get. Supports dot notation for subproperty access.",
          "type": "string"
        }
      ],
      "return": "any"
    },
    "setProperties": {
      "description": "Performs a batch set of properties.",
      "help": "#setProperties",
      "params": [
        {
          "name": "properties",
          "description": "An object containing the property and value pairs to set.",
          "type": "object"
        }
      ],
      "return": "void"
    }
  }
}