---
title: "pdx-text-input JSON API (Canonical)"
slug: "pdx-text-input-json-api"
doc_type: "api-reference"
component: "pdx-text-input"
document_kind: "json-api-canonical"
reference_mode: "canonical"
contract_format: "json"
contract_source: "runtime-and-code"
description: "Referencia canonica do contrato JSON do componente pdx-text-input."
category: "components"
sub_category: "dynamic-fields"
audience:
  - "frontend"
  - "architect"
  - "platform-team"
level: "advanced"
status: "active"
owner: "praxis-ui"
source_of_truth:
  - "projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts"
  - "projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts"
  - "projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts"
  - "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
source_of_truth_last_verified: "2026-03-06"
last_updated: "2026-03-06"
toc: true
sidebar: true
tags:
  - "json-api"
  - "canonical-contract"
  - "pdx-text-input"
api_stability: "canonical"
schema_verified: true
runtime_verified: true
editor_coverage_verified: false
runtime_scope: "public"
legacy_paths_present: false
has_known_mismatches: false
related_components:
  - "praxis-table"
---

# pdx-text-input

Este documento e a referencia canonica da API JSON de pdx-text-input.

## Summary

- Tipo documental: API reference canonica de contrato JSON.
- Source of truth: runtime e codigo declarados no frontmatter.
- Objetivo operacional: consulta rapida, auditavel e deterministica sob pressao.
- Resumo funcional: Contrato JSON metadata-driven com comportamento definido por runtime e schema associado.

## Purpose and scope

- O componente consome payload JSON metadata-driven e expoe comportamento runtime configuravel por contrato.
- Esta referencia cobre contrato publico, classificacao de paths e semantica de cobertura (runtime/schema/editor).
- Fora de escopo: quickstart, tutorial narrativo e notas arquiteturais que nao alteram contrato publico.

## Consulta rapida (obrigatorio)

| Regra/tema | Observado | Canonico desejado | Status | Evidencia |
| --- | --- | --- | --- | --- |
| Component id | `pdx-text-input` | Manter ID canonico estavel e versionado por contrato | Active | frontmatter.component |
| Primary contract source | `runtime-and-code` | Runtime, schema e docs devem permanecer rastreaveis | Partial | frontmatter.contract_source + source_of_truth |
| Runtime coverage | `true` | Comportamentos runtime criticos devem ficar explicitamente verificados | Active | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
| Schema/type coverage | `true` | Tipos e schema devem refletir paths publicos do contrato | Active | source_of_truth + Detailed API reference |
| Editor/tooling coverage | `false` | Editor/tooling deve espelhar somente contrato publico suportado | Partial | `projects/praxis-dynamic-fields/src/lib/editorial/metadata-contract.spec.ts`, `projects/praxis-dynamic-fields/src/lib/editorial/metadata-i18n-contract.spec.ts` |
| Legacy paths | `false` | Segregar legado de caminhos canonicos com janela de migracao | Active | frontmatter.legacy_paths_present |
| Known mismatches | `false` | Registrar observed vs desired de forma auditavel | Active | frontmatter.has_known_mismatches |

## Source of truth

| Source | Kind | Notes |
| --- | --- | --- |
| projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts | schema-metadata | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidencia de contrato. |

## Support legend

- **Active**: suportado em runtime e liberado para uso externo.
- **Partial**: suporte parcial, com restricoes, lacunas ou validacao incompleta.
- **Declared-only**: declarado em tipos/schema sem evidencia operacional completa.
- **Schema-only**: presente em schema/tipos sem cobertura runtime confirmada.
- **Deprecated**: legado suportado por janela de migracao definida.

## Contract status snapshot

| Item | Value | Notes |
| --- | --- | --- |
| Reference mode | `canonical` | Deve permanecer canonico |
| Contract format | `json` | Contrato metadata-driven |
| Contract source | `runtime-and-code` | Alinhar com source_of_truth |
| Runtime scope | `public` | Escopo publicado para consumidores |
| Runtime verified | `true` | Revisar sempre com evidencia de runtime |
| Schema verified | `true` | Revisar sempre com evidencia de tipos/schema |
| Editor coverage verified | `false` | Revisar sempre com evidencia de editor/tooling |
| Legacy paths present | `false` | Segregar legado de contrato canonico |
| Has known mismatches | `false` | Divergencias devem aparecer em secao dedicada |

## Contract classification (obrigatorio)

### Canonical paths (public contract)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | n/a | Partial | See Detailed API reference for runtime semantics. |
| `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `visible` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.name` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.label` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |

### Supported legacy paths

Nenhum path legado suportado foi identificado nesta revisao.

### Internal-only paths

Nao ha paths internal-only confirmados no contrato publico desta revisao.

### Experimental paths

Nao ha paths experimentais confirmados no contrato publico desta revisao.

## Public contract surface (obrigatorio)

### Top-level configuration blocks

| Block | Purpose | Required | Merge strategy | Notes |
| --- | --- | --- | --- | --- |
| `metadata` | Payload declarativo principal do componente | true | deep-merge | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `readonlyMode` | Override de readonly no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `disabledMode` | Override de disabled no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `visible` | Override de visibilidade no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |

### Nested configuration blocks

| Path | Type | Required | Default | Constraints | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata.name` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.label` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.controlType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.inputType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.id` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.placeholder` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.autocomplete` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.spellcheck` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.minLength` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.maxLength` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |

### Input bindings (inbound data)

| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | host-json | component-defined | Primary inbound contract payload. |
| `readonlyMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `disabledMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `visible` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `presentationMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |

### Output events

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `validationChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `valueChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `focusChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `nativeBlur` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `nativeChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |

### External side channels

| Channel | Direction | Contract | Failure mode | Notes |
| --- | --- | --- | --- | --- |
| `host/services/storage` | bidirectional | component-defined | component-defined | Side channels variam por componente e host; verificar em source_of_truth. |

### Host/runtime dependencies

| Dependency | Required | Environment | Purpose | Notes |
| --- | --- | --- | --- | --- |
| `text-input.metadata.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts`. |
| `text-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`. |
| `simple-base-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`. |
| `material-field-metadata.interface.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`. |

## Coverage by surface (obrigatorio)

### Coverage matrix (runtime, schema/type, editor/tooling)

| Surface | Verified | Coverage status | Evidence | Notes |
| --- | --- | --- | --- | --- |
| Runtime | `true` | Active | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` | Core runtime flows verified via focused component specs on 2026-03-06; editor/tooling coverage remains independent. |
| Schema/Types | `true` | Active | source_of_truth + Detailed API reference | Reconcile schema/types with canonical paths during follow-up when needed. |
| Editor/Tooling | `false` | Partial | `projects/praxis-dynamic-fields/src/lib/editorial/metadata-contract.spec.ts`, `projects/praxis-dynamic-fields/src/lib/editorial/metadata-i18n-contract.spec.ts` | Wave 1 registry, derived metadata exports and localized editorial resolution are guarded by aggregate editorial specs; end-to-end editor integration not yet verified. |

### Runtime coverage boundaries

- Ambientes suportados: browser/dev/prod; SSR/hydration appears to be component-dependent unless explicitly verified.
- Pre-condicoes: payload JSON valido, bindings de host consistentes e dependencias descritas no source_of_truth.
- Fora de cobertura confirmada: caminhos internos, experimentais ou aliases nao enumerados formalmente.

### Editor and tooling notes

- Evidencia parcial: `metadata-contract.spec.ts` e `metadata-i18n-contract.spec.ts` validam a trilha agregada de descriptor editorial, metadata derivado e resolucao localizada no registry.
- O que esta exposto no editor visual depende da cobertura real do workspace e nao deve ser inferido como suporte runtime total.
- Campos disponiveis apenas via JSON/manual devem continuar no contrato, com rotulo explicito de cobertura parcial.
- Quando houver divergencia entre editor e runtime, manter mismatch rastreavel em secao dedicada.

## Resolution and precedence model (obrigatorio)

### Merge order

1. defaults do componente
2. contrato JSON recebido
3. overrides de host/runtime
4. normalizacoes internas

### Fallback order

contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro

### Override points

- inputs publicos do componente
- configuracao JSON de runtime
- integracoes de host (servicos/tokens/adapters)

### Runtime normalization

Alias e defaults devem convergir para paths canonicos; onde nao houver evidencia, manter not-yet-verified de forma explicita.

### Precedence rules

Em conflito entre alias legado e path canonico, priorizar path canonico e registrar janela de migracao do legado.

## Validation and error semantics (obrigatorio)

### Validation model

| Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
| --- | --- | --- | --- | --- |
| canonical-paths | parse/runtime | component-defined (warn/reject/default) | not-yet-standardized | Semantica detalhada preservada na referencia tecnica por componente. |

### Invalid and unknown field handling

- Campos desconhecidos: comportamento component-defined (ignore, warn ou reject).
- Tipos invalidos: pode haver fallback, warning ou falha, conforme runtime especifico.
- Valores fora de dominio: registrar observed vs desired em Known limitations and mismatches.

### Fail-open / fail-closed behavior

| Condition | Mode | Runtime behavior | Consumer impact |
| --- | --- | --- | --- |
| invalid-or-unknown-field | component-defined | not-yet-verified | Pode gerar warning, fallback silencioso ou rejeicao; validar por componente. |

### Runtime warnings vs hard failures

| Condition | Severity | Observability | Consumer action |
| --- | --- | --- | --- |
| partial-or-declared-only-coverage | warning | logs/eventos do componente | Confirmar ligacao runtime antes de uso critico. |
| mismatch-confirmed | error-or-warning | componente/host observability | Planejar migracao e corrigir contrato/runtime. |

## Detailed API reference
### Preserved technical reference (normalized from previous revision)

<!--
component: pdx-text-input
document: json-api
source-of-truth:
  - projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts
  - projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts
  - projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts
  - projects/praxis-core/src/lib/models/material-field-metadata.interface.ts
  - projects/praxis-core/src/lib/models/component-metadata.interface.ts
quality-reference: projects/praxis-table/src/lib/praxis-table.json-api.md
updated_at: 2026-02-26
-->


### 1. Visao Geral e Quando Usar
`pdx-text-input` e o campo de texto simples orientado a JSON de `@praxisui/dynamic-fields`.
Ele renderiza `<input matInput>` com comportamento de validacao da base (`SimpleBaseInputComponent`) e estado corporativo de host (`readonlyMode`, `disabledMode`, `visible`, `presentationMode`).

Use quando o formulario e dirigido por metadados e voce precisa de:
- captura textual (ou tipos HTML compativeis, como `email`, `url`, `search`, `password`, `number`, `date` etc.);
- validacoes declarativas (`required`, `minLength`, `maxLength`, `pattern`, validators custom);
- UX padronizada com `mat-form-field` (hint, erro, prefix/suffix icon, clear button);
- emissao de validacao por `validationChange`.

Fontes: `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`.

### 2. Referencia do Contrato JSON
| Propriedade | Tipo | Padrao | Obrigatorio | Comportamento | Fonte |
| --- | --- | --- | --- | --- | --- |
| `metadata` | `MaterialInputMetadata` | - | Sim | Payload principal de configuracao do campo. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts` |
| `metadata.name` | `string` | - | Sim | Chave do campo no modelo/formulario. | `projects/praxis-core/src/lib/models/component-metadata.interface.ts` |
| `metadata.label` | `string` | - | Sim | Rotulo exibido no `mat-label`. | `projects/praxis-core/src/lib/models/component-metadata.interface.ts` |
| `metadata.controlType` | `"input"` | - | Sim | Tipo canonico para resolver este componente. | `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`, `projects/praxis-core/src/lib/metadata/field-control-type.constants.ts` |
| `metadata.inputType` | `"text" \| "email" \| ...` | `"text"` | Nao | Tipo HTML do input (via `inputType()`). | `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
| `metadata.id` | `string` | vazio | Nao | Define `id` do elemento nativo quando informado. | `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
| `metadata.placeholder` | `string` | vazio | Nao | Placeholder exibido quando diferente do label. | `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
| `metadata.autocomplete` | `string` | `"off"` | Nao | Configura autocomplete do input. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
| `metadata.spellcheck` | `boolean` | `true` | Nao | Liga/desliga spellcheck nativo. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
| `metadata.minLength` | `number` | none | Nao | Vincula atributo nativo e validacao da base. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts` |
| `metadata.maxLength` | `number` | none | Nao | Vincula atributo nativo e suporta contador quando `showCharacterCount=true`. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts` |
| `metadata.showCharacterCount` | `boolean` | `false` | Nao | Exibe contador no `mat-hint` de fim. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts` |
| `metadata.clearButton` | `object` | none | Nao | Exibe botao de limpar seguindo regras (`enabled`, `showOnlyWhenFilled`). | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts` |
| `readonlyMode` | `boolean` | `false` | Nao | Override de somente leitura combinado por `computeEffectiveState`. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts`, `projects/praxis-dynamic-fields/src/lib/utils/field-state.util.ts` |
| `disabledMode` | `boolean` | `false` | Nao | Override de desabilitado no host e botao clear. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
| `visible` | `boolean` | `true` | Nao | Controla `display` no host. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
| `presentationMode` | `boolean` | `false` | Nao | Modo apresentacao que bloqueia edicao e clear. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |
| `validationChange` | `ValidationErrors \| null` | - | Output | Emite resultado de validacao quando `validateField()` executa. | `projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts` |

### 3. Mapeamento de Comportamento
- Paginacao: nao se aplica.
- Ordenacao: nao se aplica.
- Selecao: valor unico textual via `FormControl`/CVA.
- Eventos: `validationChange` e especifico do componente; mudanca de valor segue fluxo de `ControlValueAccessor` e `valueChange` herdado da base.
- Renderizacao: `mat-form-field` + `matInput`, com `hint`, `mat-error`, icones prefix/suffix, tooltip de erro e clear button opcional.

Resumo de cobertura (lente corporativa):
- `Ativo`: `metadata.name`, `metadata.label`, `metadata.controlType`, `metadata.inputType`, `placeholder`, `autocomplete`, `spellcheck`, `minLength`, `maxLength`, `clearButton`, estados de host e `validationChange`.
- `Parcial`: `metadata.textTransform` depende de combinacao entre transformacao CSS e fluxo funcional da base; requer testes quando usar mascaras visuais mais complexas.
- `Fora de contrato ativo`: comportamento de mascara textual dedicada (`mask`) nao e implementado neste componente.

### 4. Exemplo Minimo (JSON + Uso)
```json
{
  "componentId": "pdx-text-input",
  "metadata": {
    "name": "fullName",
    "label": "Nome completo",
    "controlType": "input",
    "inputType": "text"
  }
}
```
Uso: o host resolve `componentId`, injeta `metadata` e o componente renderiza input textual simples integrado ao formulario reativo.

### 5. Exemplo Corporativo (JSON + Uso)
```json
{
  "componentId": "pdx-text-input",
  "metadata": {
    "id": "employee-code",
    "name": "employeeCode",
    "label": "Codigo do colaborador",
    "controlType": "input",
    "inputType": "text",
    "placeholder": "AB-12345",
    "required": true,
    "minLength": 8,
    "maxLength": 8,
    "pattern": "^[A-Z]{2}-\\d{5}$",
    "autocomplete": "off",
    "spellcheck": false,
    "showCharacterCount": true,
    "clearButton": {
      "enabled": true,
      "showOnlyWhenFilled": true,
      "ariaLabel": "Limpar codigo"
    },
    "hint": "Formato: duas letras, hifen e cinco digitos"
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true,
  "presentationMode": false
}
```
Uso: em formulario corporativo, aplica validacao de formato, contador de caracteres e clear button contextual.

### 6. Problemas Comuns e Armadilhas
1. Usar `metadata.id` como se fosse a chave principal de binding.
Correcao: a chave de negocio/formulario e `metadata.name`; `id` e apenas identificador do elemento.

2. Enviar `controlType` diferente de `input`.
Correcao: para `pdx-text-input`, use `controlType: "input"`.

3. Esperar suporte nativo de mascara (`mask`) neste componente.
Correcao: use pattern/validators ou componente especifico para mascaramento quando necessario.

4. Campo invisivel (`visible=false`) continuar bloqueando submit por `required`.
Correcao: alinhe regra de visibilidade com regra de obrigatoriedade no schema.

5. Confundir `readonlyMode` com `disabledMode`.
Correcao: `readonlyMode` preserva leitura/foco; `disabledMode` bloqueia interacao.

6. Configurar clear button sem `enabled=true`.
Correcao: defina `clearButton.enabled=true` e, se necessario, `showOnlyWhenFilled=true`.

### 7. Referencias Cruzadas
- `pdx-number-input`: `projects/praxis-dynamic-fields/src/lib/components/number-input/number-input.metadata.ts`
- `pdx-email-input`: `projects/praxis-dynamic-fields/src/lib/components/email-input/email-input.metadata.ts`
- `pdx-password-input`: `projects/praxis-dynamic-fields/src/lib/components/password-input/password-input.metadata.ts`
- Base comum: `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`

### 8. Premissas
- O envelope JSON usa convencao de host com `componentId` + `metadata`.
- O host executa fluxo padrao de validacao para acionar `validationChange` de forma consistente.

### 9. Relatorio de Validacao Estrutural
- Visao geral: PASS
- Referencia do contrato JSON (com fontes): PASS
- Mapeamento de comportamento: PASS
- Exemplo minimo: PASS
- Exemplo corporativo: PASS
- Problemas comuns (>=5 itens): PASS
- Referencias cruzadas: PASS
- Premissas explicitas: PASS

## JSON path index (obrigatorio)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `visible` | boolean | false | n/a | Partial | See Detailed API reference. |
| `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata` | object | false | n/a | Partial | See Detailed API reference. |
| `metadata.name` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.label` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.inputType` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.id` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.placeholder` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.autocomplete` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.spellcheck` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.minLength` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.maxLength` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.showCharacterCount` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.clearButton` | object | false | n/a | Partial | See Detailed API reference. |
| `metadata.textTransform` | unknown | false | n/a | Partial | See Detailed API reference. |

## Events reference (obrigatorio)

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `validationChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `valueChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `focusChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `nativeBlur` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `nativeChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |

## Styling API (obrigatorio quando aplicavel)

| Token/Class | Scope | Purpose | Notes |
| --- | --- | --- | --- |
| `not-yet-verified` | component | Styling contract not yet verified | Use Detailed API reference for component-specific styling notes. |

## Examples (obrigatorio)

| Example | Scenario | Validates | Notes |
| --- | --- | --- | --- |
| `Minimal valid` | baseline payload | required contract blocks | Extracted from preserved technical reference when available. |
| `Common setup` | common component usage | standard runtime behavior | Validate against host integration path. |
| `Advanced setup` | richer config with overrides | precedence and normalization | Requires runtime confirmation for edge cases. |
| `Enterprise scenario` | governance/legacy/migration context | auditability and compatibility boundaries | Include tenant-specific constraints when applicable. |

### Minimal valid

```json
{
  "componentId": "pdx-text-input",
  "metadata": {
    "name": "fullName",
    "label": "Nome completo",
    "controlType": "input",
    "inputType": "text"
  },
  "readonlyMode": false
}
```

### Common setup

```json
{
  "componentId": "pdx-text-input",
  "metadata": {
    "id": "employee-code",
    "name": "employeeCode",
    "label": "pdx-text-input-common",
    "controlType": "input",
    "inputType": "text",
    "placeholder": "AB-12345",
    "required": true,
    "minLength": 8,
    "maxLength": 8,
    "pattern": "^[A-Z]{2}-\\d{5}$",
    "autocomplete": "off",
    "spellcheck": false,
    "showCharacterCount": true,
    "clearButton": {
      "enabled": true,
      "showOnlyWhenFilled": true,
      "ariaLabel": "Limpar codigo"
    },
    "hint": "Formato: duas letras, hifen e cinco digitos"
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true,
  "presentationMode": false
}
```

### Advanced setup

```json
{
  "componentId": "pdx-text-input",
  "metadata": {
    "id": "employee-code",
    "name": "employeeCode",
    "label": "Codigo do colaborador",
    "controlType": "input",
    "inputType": "text",
    "placeholder": "AB-12345",
    "required": true,
    "minLength": 5,
    "maxLength": 8,
    "pattern": "^[A-Z]{2}-\\d{5}$",
    "autocomplete": "off",
    "spellcheck": false,
    "showCharacterCount": true,
    "clearButton": {
      "enabled": true,
      "showOnlyWhenFilled": true,
      "ariaLabel": "Limpar codigo"
    },
    "hint": "Formato: duas letras, hifen e cinco digitos"
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true,
  "presentationMode": false
}
```

### Enterprise scenario

```json
{
  "componentId": "pdx-text-input",
  "metadata": {
    "id": "employee-code",
    "name": "employeeCode",
    "label": "Codigo do colaborador",
    "controlType": "input",
    "inputType": "text",
    "placeholder": "AB-12345",
    "required": true,
    "minLength": 8,
    "maxLength": 8,
    "pattern": "^[A-Z]{2}-\\d{5}$",
    "autocomplete": "off",
    "spellcheck": false,
    "showCharacterCount": true,
    "clearButton": {
      "enabled": true,
      "showOnlyWhenFilled": true,
      "ariaLabel": "Limpar codigo"
    },
    "hint": "Formato: duas letras, hifen e cinco digitos"
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true,
  "presentationMode": true
}
```

## Compatibility and migration notes (recomendado)

| Concern | Affected versions | Migration action | Deadline | Notes |
| --- | --- | --- | --- | --- |
| No legacy path detected in current revision | n/a | No migration action required for canonical paths | n/a | Re-evaluate if backward-compat aliases are introduced |

## Known limitations and mismatches (recomendado)

| Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
| --- | --- | --- | --- | --- | --- |
| Canonical contract parity | No confirmed mismatch in this revision; runtime linkage verified for core flows (2026-03-06), with editor/tooling coverage pending | Keep runtime/schema/editor alignment evidence updated | Low | n/a | Monitor in periodic audit |

## Source references (obrigatorio)

| Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
| --- | --- | --- | --- | --- |
| schema-metadata | projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.metadata.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/components/text-input/text-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| schema-types | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
