diff --git a/content/en/api/components/ui/textinput.md b/content/en/api/components/ui/textinput.md index 50957f83c..bc1c215dc 100644 --- a/content/en/api/components/ui/textinput.md +++ b/content/en/api/components/ui/textinput.md @@ -8,142 +8,24 @@ description: Text Input component description and its attributes ## What is it? -Input is a component that displays an editable text area for the user. These text fields are used to collect inputs that the user insert using the keyboard. +The Text Input is a component that displays an editable text area for the user. These text inputs are used to collect data inputs from users using a keyboard. -{{% alert color="danger" %}} -The `hidden` attribute has been deprecated in Beagle version 1.6.0 and will be removed in a future version. Use the `display` attribute of the` style` property instead. -{{% /alert %}} +This component has the following attributes: -See how the structure is represented by the attributes below: +|Attribute|Type|Required|Definition| +|:-----|:-----|:-----:|:-----| +|value|String or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})|✓|Item referring to the input value that will be entered in the Text Input component editable text field area.| +|placeholder|String or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||The Placeholder is a text that is displayed when nothing has been entered in the editable text field.| +|enabled|Boolean||Enables or disables a text field| +|readOnly|Boolean||Set the text field to be read only when set to `true`.| +|type|TextInputType or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||This attribute identifies the text type that it will feed the text field area. On Android and iOS, this field also attributes the type of keyboard that will shown.| +|styleId|String||This attribute sets a String key to map this component in a Design System on the front end and set an style to it.| +|error|String or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||This attribute defines the TextInput error message.| +|showError|Boolean or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||Enables the error message to be visible when set to `true`.| +|onFocus|List<Action>||Sets a List of [Actions]({{< ref path="/api/actions" lang="en" >}}) that are triggered when the text field **gains focus**| +|onChange|List<Action>||Sets a List of [Actions]({{< ref path="/api/actions" lang="en" >}}) that are triggered when the text field **value changes**| +|onBlur|List<Action>||Sets a List of [Actions]({{< ref path="/api/actions" lang="en" >}}) that are triggered when the text field **looses focus**| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Attribute - Type - RequiredDefinition -
value - String or - Binding - Item referring to the input value that will be entered in the editable - text area of the Text Input component.
placeholder - String or - Binding - The Placeholder is a text that is displayed when nothing has been entered - in the editable text field.
disabledBooleanEnables or disables the field.
readOnlyBooleanCheck if the Input will be editable or read only.
hiddenBooleanEnables the component to be visible or not. The `hidden` attribute has been deprecated in Beagle version 1.6.0 and will be removed in a future version. Use the `display` attribute of the` style` property instead.
typeTextInputType or BindingThis attribute identifies the text type that it will receive in the editable - field area. On Android and iOS, this field also attributes the type of - keyboard that will be shown to the user.
styleIdStringThis attribute receives a key that is registered in the Design System - of each platform that customizes the component.
error -

String or

-

Binding<b></b>

-
This attribute shows if the TextInput has an error.
showError -

Boolean or

-

Binding<b></b>

-
Enables the error string to be visible or not.
onChangeList <Action> - Actions array that this field can trigger when its value is altered. It - is possible to define a customized action or - any available action in the interface, for example, an action that shows - an Alert message.

This attribute is optional, but if - an action is defined here it needs to be configured in the fronted. -
onBlurList <Action> - Action array that this field can trigger when its focus is removed. It - is possible to defined a customized action or - any available action in the interface, for example, an action that shows - an alert message (Alert). - This attribute is optional, but if an action is defined here it needs - to be configured in the fronted. -
onFocusList <Action> - Actions array that this field can trigger when this field is on focus. - It is possible to defined a customized action or - any available action in the interface, for example, an action that shows - an alert message (Alert). - This attribute is optional, but if an action is defined here it needs - to be configured in the fronted. -
### TextInputType diff --git a/content/pt/api/components/ui/textinput.md b/content/pt/api/components/ui/textinput.md index 1f22f61b0..b1a0538a7 100644 --- a/content/pt/api/components/ui/textinput.md +++ b/content/pt/api/components/ui/textinput.md @@ -8,140 +8,23 @@ description: Descrição do componente InputText e seus atributos ## O que é? -O Input é um componente responsável por exibir uma área de texto editável para o usuário. Esses campos de textos são usados para coletar entradas que um usuário insere utilizando o teclado. - -{{% alert color="danger" %}} -O atributo `hidden` foi depreciado na versão 1.6.0 do Beagle e será removido em uma versão futura. Utilize o atributo `display` da propriedade `style` em seu lugar. -{{% /alert %}} +O Text Input é um componente responsável por exibir uma área de texto editável para o usuário. Esses `campos de textos` são usados para coletar dados que um usuário insere utilizando um teclado. A sua estrutura é representada como mostrado abaixo: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Atributo - Tipo - ObrigatórioDefinição -
value - String ou - Binding - Item referente ao valor de entrada que será digitado na área - de texto editável do componente Text Input.
placeholder - String ou - Binding - Texto que é exibido quando nada foi inserido no campo de texto editável.
disabledBooleanPropriedade para habilitar ou desabilitar o campo.
readOnlyBooleanPropriedade para determinar se o campo será editável ou somente - leitura.
hiddenBooleanPropriedade que determina se o campo será escondido. O atributo `hidden` foi depreciado na versão 1.6.0 do Beagle e será removido em uma versão futura. Utilize o atributo `display` da propriedade `style` em seu lugar.
typeTextInputType ou BindingEsse atributo identifica o tipo de texto que iremos receber na área - de texto editável. No Android e no iOS, esse campo também atribui - o tipo de teclado que será exibido pro usuário.
styleIdStringRecebe uma chave que é registrada no Design System de cada plataforma - para fazer customização no componente.
error -

String ou

-

<b></b>Binding<b></b>

-
Esse atributo mostra se o TextInput possui um erro de acordo com uma entrada.
showError -

Boolean ou

-

<b></b>Binding<b></b>

-
Propriedade que identifica se o a String de erro deve ser escondida ou não.
onChangeList <Action> - Array de ações que esse campo pode disparar quando seu valor for alterado. - É possível definir uma ação customizada ou - qualquer ação já disponível na interface, como por - exemplo uma ação que mostra uma mensagem de alerta(Alert). - Este atributo é opcional, mas se uma ação for definida - aqui ela precisa estar configurada no frontend. -
onBlurList <Action> - Array de ações que esse campo pode disparar quando seu foco é retirado. - É possível definir uma ação customizada ou - qualquer ação já disponível na interface como, por - exemplo, uma ação que mostra uma mensagem de alerta(Alert). - Este atributo é opcional, mas se uma ação for definida - aqui ela precisa estar configurada no frontend. -
onFocusList <Action> - Array de ações que esse campo pode disparar quando é colocado - em foco. É possível definir uma ação customizada ou - qualquer ação já disponível na interface como, por exemplo, uma ação que mostra uma mensagem de alerta(Alert). - Este atributo é opcional, mas se uma ação for definida - aqui ela precisa estar configurada no frontend. -
+|Atributos|Tipo|Obrigatório|Descrição| +|:-----|:-----|:-----:|:-----| +|value|String ou [Binding]({{< ref path="/api/context#bindings" lang="pt" >}})|✓|Atributo que guarda o valor inserido em um campo de texto| +|placeholder|String ou [Binding]({{< ref path="/api/context#bindings" lang="pt" >}})||Atributo que define um texto que é mostrado quando não existe informação adicionada ao campo de texto.| +|enabled|Boolean||Habilita ou desabilita um campo de texto| +|readOnly|Boolean||Define um campo de texto como `readOnly` quando definido como `true`.| +|type|TextInputType ou [Binding]({{< ref path="/api/context#bindings" lang="pt" >}})||Este atributo define qual tipo de texto será inserido no campo de texto. Em dispositivos moveis, ele também define qual tipo de teclado aparece quando o campo ganha focus.| +|styleId|String||Define uma chave do tipo String para mapear esse componente em um Design System no front end da aplicação. Essa chave identifica qual estilo será aplicado a esse componente.| +|error|String ou [Binding]({{< ref path="/api/context#bindings" lang="pt" >}})||Define uma mensagem de erro para esse campo de texto.| +|showError|Boolean or [Binding]({{< ref path="/api/context#bindings" lang="en" >}})||Define se a mensagem de erro ficará visível quando definido como `true`| +|onFocus|List<Action>||Define uma lista de [Ações]({{< ref path="/api/actions" lang="pt" >}}) que é executada quando o campo de texto **ganha foco**| +|onChange|List<Action>||Define uma lista de [Ações]({{< ref path="/api/actions" lang="pt" >}}) que é executada quando o campo de texto tem o **valor (value) modificado**| +|onBlur|List<Action>||Define uma lista de [Ações]({{< ref path="/api/actions" lang="pt" >}}) que é executada quando o campo de texto **perde o foco**| ### TextInputType