---
title: "pdx-material-rating JSON API (Canonical)"
slug: "pdx-material-rating-json-api"
doc_type: "api-reference"
component: "pdx-material-rating"
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-material-rating."
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/material-rating/material-rating.metadata.ts"
  - "projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.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-04-27"
last_updated: "2026-04-27"
toc: true
sidebar: true
tags:
  - "json-api"
  - "canonical-contract"
  - "pdx-material-rating"
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-base-input-runtime-contract"
  - "pdx-material-range-slider"
---

# pdx-material-rating

Este documento e a referencia canonica da API JSON de pdx-material-rating.

## 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-material-rating` | 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/material-rating/material-rating.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.component.ts`; focused component specs for keyboard value changes, single valueChange emission, governed disabled state and slider accessibility state, 2026-04-27 |
| 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-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.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/material-rating/material-rating.metadata.ts | schema-metadata | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.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. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `readonlyMode` | 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.controlType` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.max` | number | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.itemsCount` | number | false | n/a | Partial | Alias runtime para `metadata.max` quando presente. |
| `metadata.allowHalf` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.precision` | number \| string | false | `1` / `item` | Partial | `0.5` or `half` enables half-step interaction; other values resolve to whole-item precision. |

### 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). |
| `disabledMode` | Override de disabled no host/runtime | false | override | disables interaction, marks the host disabled and removes it from tab order (component specs, 2026-04-27). |
| `readonlyMode` | Override de readonly no host/runtime | false | override | readonly blocks pointer/keyboard interaction and exposes `aria-readonly` (component specs, 2026-04-27). |
| `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | presentation follows readonly semantics and exposes `aria-readonly` (component specs, 2026-04-27). |

### Nested configuration blocks

| Path | Type | Required | Default | Constraints | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata.controlType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.max` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.itemsCount` | number | false | n/a | component-defined | Runtime alias accepted before falling back to `metadata.max`. |
| `metadata.allowHalf` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.precision` | number \| string | false | `1` / `item` | component-defined | `0.5` or `half` enables half-step interaction. |
| `metadata.icon` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.emptyIcon` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.size` | `small` \| `medium` \| `large` | false | `medium` | component-defined | Size token for the visual rating glyphs. |
| `metadata.readonly` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.color` | string | 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. |
| `disabledMode` | boolean | false | host-runtime | verified | Host-level disabled override; blocks interaction and tab focus. |
| `readonlyMode` | boolean | false | host-runtime | verified | Host-level readonly override; blocks interaction. |
| `presentationMode` | boolean | false | host-runtime | verified | Host-level presentation override; non-interactive. |

### Output events

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `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 |
| --- | --- | --- | --- | --- |
| `material-rating.metadata.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.metadata.ts`. |
| `material-rating.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.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/material-rating/material-rating.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.component.ts` | Keyboard interaction, precision parsing, single `valueChange` emission, slider ARIA state, governed disabled state and disabled tab-order behavior verified via focused component specs on 2026-04-27; 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-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` | Selector/control-type tooling linkage verified via default selector map and registry seeding; visual editor end-to-end coverage remains 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 de tooling: selector `pdx-*` mapeado em `DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP` e semeado no `ComponentRegistryService`; editor visual E2E permanece not-yet-verified.
- 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)

### 1. Visao Geral e Quando Usar
`pdx-material-rating` implementa avaliacao por icones (estrela por padrao), com suporte a meia unidade e acessibilidade por teclado.

Use quando precisar:
- capturar nota visual (1..N itens);
- modo continuo ou modo item unico;
- variacao de precisao inteira ou meia unidade.

### 2. API do Componente (Inputs/Outputs)
| Propriedade | Tipo | Padrao | Obrigatorio | Comportamento |
| --- | --- | --- | --- | --- |
| `metadata` | `MaterialRatingMetadata` | - | Sim | Contrato principal de rating. |
| `itemsCount` | `number` | `5` | Nao | Total de icones renderizados. |
| `selection` | `'continuous' \| 'single'` | `continuous` | Nao | Estrategia de preenchimento visual. |
| `precision` | `'item' \| 'half'` | `item` | Nao | Precisao da interacao. |
| `allowHalf` | `boolean` | `false` | Nao | Alias para configurar `precision='half'`. |
| `disabledMode` | `boolean` | `false` | Nao | Sobrescreve disabled no host governado. |
| `readonlyMode` | `boolean` | `false` | Nao | Sobrescreve leitura no host. |
| `presentationMode` | `boolean` | `false` | Nao | Modo apresentacao sem interacao. |
| `valueChange` | `number` | - | Output base input | Nota final selecionada. |

### 3. Matriz de Cobertura JSON (Completa)
#### 3.1 Campos especificos do componente
| Caminho JSON | Tipo | Status | Comportamento em runtime |
| --- | --- | --- | --- |
| `metadata.controlType` | `'rating'` | Ativo | Define renderer de avaliacao por icones. |
| `metadata.max` | `number` | Ativo | Mapeado para `itemsCount`. |
| `metadata.itemsCount` | `number` | Extensao de runtime | Alias aceito para total de icones; tem precedencia sobre `metadata.max`. |
| `metadata.allowHalf` | `boolean` | Ativo | Ativa precisao de meia unidade. |
| `metadata.precision` | `number \| 'item' \| 'half'` | Ativo | `0.5` ou `half` ativa modo half; outros valores usam item inteiro. |
| `metadata.icon` | `string` | Ativo | Icone preenchido principal. |
| `metadata.emptyIcon` | `string` | Ativo | Icone outline/base. |
| `metadata.size` | `'small' \| 'medium' \| 'large'` | Ativo | Classe visual de tamanho. |
| `metadata.readonly` | `boolean` | Ativo | Mapeado para `readonlyMode`. |
| `metadata.disabled` | `boolean` | Ativo | Participa do estado efetivo disabled. |
| `metadata.color` | `ThemePalette` | Parcial | Mapeamento heuristico para `ratingColor` quando cor explicita nao vem. |
| `metadata.selection` | `'continuous' \| 'single'` | Extensao de runtime | Campo aceito em runtime, fora da interface tipada oficial. |
| `metadata.ratingColor` | `string` | Extensao de runtime | Cor de preenchimento via CSS var. |
| `metadata.outlineColor` | `string` | Extensao de runtime | Cor de contorno via CSS var. |
| `metadata.svgIcon` | `string` | Extensao de runtime | Icone SVG preenchido. |
| `metadata.svgIconOutline` | `string` | Extensao de runtime | Icone SVG de contorno. |
| `metadata.tabIndex` | `number` | Extensao de runtime | Gerencia foco do host com role slider. |
| `metadata.ariaLabel` | `string` | Extensao de runtime | Rotulo acessivel customizado. |

#### 3.2 Campos herdados compartilhados (exaustivo)
Contrato compartilhado de input base:
- [pdx-base-input-runtime-contract.json-api.md](projects/praxis-dynamic-fields/src/lib/base/pdx-base-input-runtime-contract.json-api.md)

Resumo de composicao deste componente:
- `Ativo`: max/allowHalf/precision/icones/tamanho/readonly.
- `Parcial`: `color` com mapeamento heuristico.
- `Extensao de runtime`: selection, cores CSS e icones SVG.

### 4. Mapeamento de Comportamento
- Mouse/pointer: calcula valor pelo indice do item clicado (com suporte half).
- Teclado: setas, Home/End, Enter/Espaco para controle acessivel.
- Valor: normalizado para grade de precisao (`1` ou `0.5`).
- Acessibilidade: o host expõe `role=slider`, `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, `aria-valuetext`, `aria-required`, `aria-invalid`, `aria-disabled` e `aria-readonly`; os itens visuais internos ficam fora da arvore acessivel para evitar controles aninhados.
- Render: camada outline + camada fill com width 0/50/100%.

### 5. Exemplo Minimo (JSON + Uso)
```json
{
  "componentId": "pdx-material-rating",
  "metadata": {
    "name": "customerRate",
    "label": "Avaliacao",
    "controlType": "rating",
    "max": 5
  }
}
```
Uso: rating de 0 a 5 por estrelas.

### 6. Exemplo Corporativo (JSON + Uso)
```json
{
  "componentId": "pdx-material-rating",
  "metadata": {
    "name": "slaScore",
    "label": "Nota de SLA",
    "controlType": "rating",
    "max": 10,
    "allowHalf": true,
    "selection": "continuous",
    "size": "large",
    "ratingColor": "#1976d2",
    "outlineColor": "#90a4ae",
    "ariaLabel": "Nota de cumprimento de SLA",
    "hint": "Use incrementos de 0.5 para avaliacao detalhada."
  }
}
```
Uso: avaliacao corporativa com meia unidade e tema visual customizado.

### 7. Troubleshooting e Armadilhas Comuns
1. Meio ponto nao funciona.
Correcao: habilitar `allowHalf=true` ou `precision=0.5`.

2. Cor nao aplica como esperado.
Correcao: preferir `ratingColor/outlineColor`; `color` e mapeamento heuristico.

3. Esperar campos `selection/ratingColor` tipados na interface oficial.
Correcao: sao extensoes de runtime do componente.

4. Componente continua interativo em tela de leitura.
Correcao: combinar `readonly` em metadata com estado disabled do formulario quando necessario.

5. Nota enviada com valor fora da grade.
Correcao: runtime normaliza valor para passos de `1` ou `0.5`.

### 8. Cross-links
- `projects/praxis-dynamic-fields/src/lib/components/material-range-slider/pdx-material-range-slider.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/base/pdx-base-input-runtime-contract.json-api.md`

### 9. Relatorio de Validacao Estrutural
- Visao geral: PASS
- API (inputs/outputs): PASS
- Cobertura JSON completa (especifico + herdado): PASS
- Mapeamento de comportamento: PASS
- Exemplo minimo: PASS
- Exemplo corporativo: PASS
- Troubleshooting: PASS

## JSON path index (obrigatorio)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | n/a | Partial | See Detailed API reference. |
| `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.max` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.itemsCount` | number | false | n/a | Partial | Alias runtime para `metadata.max`. |
| `metadata.allowHalf` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.precision` | number \| string | false | `1` / `item` | Partial | `0.5` or `half` enables half-step interaction. |
| `metadata.icon` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.emptyIcon` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.size` | `small` \| `medium` \| `large` | false | `medium` | Partial | See Detailed API reference. |
| `metadata.readonly` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.color` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.selection` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.ratingColor` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.outlineColor` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.svgIcon` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.svgIconOutline` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.tabIndex` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.ariaLabel` | string | false | n/a | Partial | See Detailed API reference. |

## Events reference (obrigatorio)

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `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 |
| --- | --- | --- | --- |
| `metadata.icon` | component | Styling-related JSON path | Validate against runtime implementation. |
| `metadata.emptyIcon` | component | Styling-related JSON path | Validate against runtime implementation. |
| `metadata.color` | component | Styling-related JSON path | Validate against runtime implementation. |
| `metadata.ratingColor` | component | Styling-related JSON path | Validate against runtime implementation. |
| `metadata.outlineColor` | component | Styling-related JSON path | Validate against runtime implementation. |
| `metadata.svgIcon` | component | Styling-related JSON path | Validate against runtime implementation. |

## 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-material-rating",
  "metadata": {
    "name": "customerRate",
    "label": "Avaliacao",
    "controlType": "rating",
    "max": 5
  },
  "readonlyMode": false
}
```

### Common setup

```json
{
  "componentId": "pdx-material-rating",
  "metadata": {
    "name": "slaScore",
    "label": "Nota de SLA",
    "controlType": "rating",
    "max": 10,
    "allowHalf": true,
    "selection": "continuous",
    "size": "large",
    "ratingColor": "#1976d2",
    "outlineColor": "#90a4ae",
    "ariaLabel": "pdx-material-rating-common",
    "hint": "Use incrementos de 0.5 para avaliacao detalhada."
  }
}
```

### Advanced setup

```json
{
  "componentId": "pdx-material-rating",
  "metadata": {
    "name": "slaScore",
    "label": "Nota de SLA",
    "controlType": "rating",
    "max": 5,
    "allowHalf": true,
    "selection": "continuous",
    "size": "large",
    "ratingColor": "#1976d2",
    "outlineColor": "#90a4ae",
    "ariaLabel": "Nota de cumprimento de SLA",
    "hint": "Use incrementos de 0.5 para avaliacao detalhada."
  },
  "readonlyMode": false
}
```

### Enterprise scenario

```json
{
  "componentId": "pdx-material-rating",
  "metadata": {
    "name": "slaScore",
    "label": "Nota de SLA",
    "controlType": "rating",
    "max": 10,
    "allowHalf": true,
    "selection": "continuous",
    "size": "large",
    "ratingColor": "#1976d2",
    "outlineColor": "#90a4ae",
    "ariaLabel": "Nota de cumprimento de SLA",
    "hint": "Use incrementos de 0.5 para avaliacao detalhada."
  },
  "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/material-rating/material-rating.metadata.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/components/material-rating/material-rating.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 |
