---
title: "pdx-material-checkbox-group JSON API (Canonical)"
slug: "pdx-material-checkbox-group-json-api"
doc_type: "api-reference"
component: "pdx-material-checkbox-group"
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-checkbox-group."
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-checkbox-group/material-checkbox-group.metadata.ts"
  - "projects/praxis-dynamic-fields/src/lib/components/material-checkbox-group/material-checkbox-group.component.ts"
  - "projects/praxis-dynamic-fields/src/lib/base/simple-base-select.component.ts"
  - "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
source_of_truth_last_verified: "2026-06-25"
last_updated: "2026-06-25"
toc: true
sidebar: true
tags:
  - "json-api"
  - "canonical-contract"
  - "pdx-material-checkbox-group"
api_stability: "canonical"
schema_verified: true
runtime_verified: true
editor_coverage_verified: false
runtime_scope: "public"
legacy_paths_present: true
has_known_mismatches: false
related_components:
  - "praxis-table"
  - "pdx-base-select-runtime-contract"
  - "pdx-base-input-runtime-contract"
  - "pdx-material-radio-group"
  - "pdx-material-selection-list"
---

# pdx-material-checkbox-group

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

## 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-checkbox-group` | 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-checkbox-group/material-checkbox-group.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/material-checkbox-group/material-checkbox-group.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-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 | `true` | Segregar legado de caminhos canonicos com janela de migracao | Partial | 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-checkbox-group/material-checkbox-group.metadata.ts | schema-metadata | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/components/material-checkbox-group/material-checkbox-group.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/base/simple-base-select.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 | `true` | 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 | `false` | Active | Bloqueia interacao e expoe semantica readonly acessivel. |
| `disabledMode` | boolean | false | `false` | Active | Desabilita checkboxes nativos, host e fieldset/select-all quando aplicavel. |
| `visible` | boolean | false | `true` | Active | Controla `display` do host e `aria-hidden` quando invisivel. |
| `presentationMode` | boolean | false | `false` | Active | Renderiza o valor sem permitir mutacao por clique ou handlers publicos governados. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.selectionMode` | string | false | heuristic legacy | Active | `boolean` e `multiple` sao o contrato canonico; ausencia mantem fallback legado. |
| `metadata.variant` | string | false | `default` | Active | `consent` e a variante semantica inicial para checkbox booleano institucional. |
| `metadata.density` | string | false | `comfortable` | Active | Token de densidade do shell do campo. |
| `metadata.description` | string | false | n/a | Active | Texto de apoio do checkbox boolean/consent. |
| `metadata.links` | array | false | n/a | Active | Links ricos exibidos no shell boolean/consent. |
| `metadata.checkboxOptions` | array | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.options` | array | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.required` | boolean | false | n/a | Active | Marca checkbox/fieldset como obrigatório no runtime acessível. |
| `metadata.readonly` | boolean | false | `false` | Active | Estado readonly declarativo do payload; bloqueia interação como `readonlyMode`. |

### Supported legacy paths

| Legacy path | Canonical replacement | Support window | Runtime behavior | Notes |
| --- | --- | --- | --- | --- |
| `metadata.options` | `metadata.checkboxOptions` | not-yet-defined | accepted for backward compatibility | Alias legado para opcoes do grupo. |
| ausencia de `metadata.selectionMode` | `metadata.selectionMode` explicito | not-yet-defined | runtime infere `boolean` sem opcoes e `multiple` com opcoes | Fallback legado preservado para migracao. |
| valores booleanos legados `S`/`N`, `1`/`0`, `true`/`false` no `FormControl` | `boolean` real | not-yet-defined | em `selectionMode: 'boolean'`, o runtime normaliza antes de renderizar e emitir eventos | Compatibilidade para telas migradas que recebem flags legadas do backend. |

### 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-04-27). |
| `readonlyMode` | Override de readonly no host/runtime | false | override | Bloqueia boolean, options e select-all; expõe `praxis-readonly` e `aria-readonly` (component specs, 2026-04-27). |
| `disabledMode` | Override de disabled no host/runtime | false | override | Desabilita controles nativos e expõe `praxis-disabled`/`aria-disabled` (component specs, 2026-04-27). |
| `visible` | Override de visibilidade no host/runtime | false | override | Controla display/`aria-hidden` no host. |
| `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | Bloqueia mutação por shell click e handlers públicos governados (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.checkboxOptions` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.options` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.selectAll` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.maxSelections` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.layout` | string | 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. |
| `metadata.labelPosition` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.description` | string | false | n/a | component-defined | Texto de apoio no modo boolean/consent. |
| `metadata.links` | array | false | n/a | component-defined | Links ricos no modo boolean/consent. |
| `metadata.required` | boolean | false | n/a | component-defined | Propaga required e `aria-required` no controle renderizado. |
| `metadata.resourcePath` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.filterCriteria` | unknown | 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 | Angular input binding | Host-level readonly override; disables interaction without declaring disabled semantics. |
| `disabledMode` | boolean | false | host-runtime | Angular input binding | Host-level disabled override; disables native controls and host semantics. |
| `visible` | boolean | false | host-runtime | Angular input binding | Host-level visibility override. |
| `presentationMode` | boolean | false | host-runtime | Angular input binding | Non-interactive presentation override. |

### Output events

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `searchTermChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `selectionChange` | unknown | runtime-event | Experimental | Emitido em modo boolean e múltiplo quando o valor muda via runtime. |
| `openedChange` | 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. |

### Runtime semantics addendum

- `selectionMode` explicito governa a semantica interna de selecao; heuristica por presenca de opcoes so vale quando `selectionMode` nao e informado.
- Em `selectionMode: 'boolean'`, o valor de entrada aceita `boolean` real e flags legadas textuais/numéricas (`S`/`N`, `T`/`F`, `1`/`0`, `true`/`false`, `sim`/`não`) e normaliza para `boolean` antes da interação.
- `required`/`requiredChecked` propagam sinalizacao acessivel (`aria-required`) para o checkbox renderizado.
- No modo boolean, cliques no shell de conteudo tambem emitem `selectionChange` e `optionSelected` para alinhamento operacional com o runtime base de selecao.
- Estados governados (`disabledMode`, `readonlyMode`, `presentationMode`, `metadata.readonly` e `FormControl.disabled`) bloqueiam mutacoes em modo boolean, option e select-all.
- `disabledMode`/`FormControl.disabled` expõem `aria-disabled`; readonly/presentation expõem `aria-readonly`; erros expõem `aria-invalid` no controle/fieldset aplicavel.
- Chamadas diretas aos handlers publicos governados (`selectOption`, `toggleSelectAll`) respeitam o mesmo bloqueio de interacao visual.

### 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-checkbox-group.metadata.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-checkbox-group/material-checkbox-group.metadata.ts`. |
| `material-checkbox-group.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-checkbox-group/material-checkbox-group.component.ts`. |
| `simple-base-select.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-select.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-checkbox-group/material-checkbox-group.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/material-checkbox-group/material-checkbox-group.component.ts` | Core runtime flows, governed states and legacy boolean value normalization verified via focused component specs on 2026-06-25; 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-checkbox-group` exibe um grupo de checkboxes Material controlado por JSON, com modo multiplo e opcao de selecionar todos.

Use quando precisar:
- selecao multipla sempre visivel na tela;
- layout vertical ou horizontal;
- limite de selecoes com bloqueio de itens.

### 2. API do Componente (Inputs/Outputs)
| Propriedade | Tipo | Padrao | Obrigatorio | Comportamento |
| --- | --- | --- | --- | --- |
| `metadata` | `MaterialCheckboxMetadata` | - | Sim | Contrato principal do grupo de checkboxes. |
| `readonlyMode` | `boolean` | `false` | Nao | Bloqueia interacao e expoe semantica readonly. |
| `disabledMode` | `boolean` | `false` | Nao | Desabilita os checkboxes nativos e expoe semantica disabled. |
| `visible` | `boolean` | `true` | Nao | Controla exibicao no host. |
| `presentationMode` | `boolean` | `false` | Nao | Modo apresentacao sem edicao ou mutacao por handlers governados. |
| `selectionChange` | `T[]` | - | Output herdado | Mudanca da lista de valores selecionados. |
| `optionSelected` | `SelectOption` | - | Output herdado | Item alternado pelo usuario. |
| `optionsLoaded` | `SelectOption[]` | - | Output herdado | Carga remota de opcoes. |

### 3. Matriz de Cobertura JSON (Completa)
#### 3.1 Campos especificos do componente
| Caminho JSON | Tipo | Status | Comportamento em runtime |
| --- | --- | --- | --- |
| `metadata.controlType` | `'checkbox'` | Ativo | Seleciona renderer de checkbox group. |
| `metadata.checkboxOptions` | `Array<{ value; text; label?; description?; disabled? }>` | Ativo | Fonte principal das opcoes; `description` renderiza texto de apoio por item. |
| `metadata.options` | `Array<any>` | Extensao de runtime | Alias legado quando `checkboxOptions` nao vem. |
| `metadata.selectAll` | `boolean` | Ativo | Renderiza linha "Selecionar todos" no mesmo shell estrutural das opcoes. |
| `metadata.description` | `string` | Ativo | Renderiza texto de apoio no shell boolean/consent. |
| `metadata.links` | `Array<{ label; href; target?; rel? }>` | Ativo | Renderiza links ricos no shell boolean/consent. |
| `metadata.readonly` | `boolean` | Ativo | Bloqueia interacao como estado readonly declarativo do payload. |
| `metadata.maxSelections` | `number` | Ativo | Desabilita opcoes excedentes quando limite e atingido. |
| `metadata.layout` | `'horizontal' \| 'vertical'` | Ativo | Altera classe de layout do grupo. |
| `metadata.color` | `ThemePalette` | Ativo | Cor dos checkboxes Material. |
| `metadata.labelPosition` | `'before' \| 'after'` | Ativo | Posicao do label no checkbox. |
| `metadata.resourcePath` | `string` | Ativo | Carga remota via base select. |
| `metadata.filterCriteria` | `Record<string, any>` | Ativo | Filtro base de backend. |
| `metadata.optionLabelKey` | `string` | Ativo | Chave de label em payload remoto. |
| `metadata.optionValueKey` | `string` | Ativo | Chave de value em payload remoto. |
| `metadata.searchable` | `boolean` | Declared-only | Campo herdado, sem UI de busca neste template. |
| `metadata.indeterminate` | `boolean` | Declared-only | Nao aplicado aos itens deste grupo. |
| `metadata.linkText` | `string` | Extensao de runtime | Fallback legado para links ricos quando `metadata.links` nao vem. |
| `metadata.linkUrl` | `string` | Extensao de runtime | Fallback legado para links ricos quando `metadata.links` nao vem. |
| `metadata.linkTarget` | `'_blank' \| '_self'` | Extensao de runtime | Target do fallback legado de link. |

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

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`: selectionMode, variant, density, description, links, checkboxOptions, selectAll, maxSelections, layout, color, labelPosition.
- `Declared-only`: link/indeterminate/searchable sem renderizacao dedicada.
- `Extensao de runtime`: alias `options`.

### 4. Mapeamento de Comportamento
- Selecao: sempre multipla (componente define `multiple=true`).
- Selecionar todos: usa utilitarios do base select.
- Limite: item nao selecionado fica desabilitado quando `maxSelections` atinge.
- Eventos: valor emitido como array de selecionados.

### 5. Exemplo Minimo (JSON + Uso)
```json
{
  "componentId": "pdx-material-checkbox-group",
  "metadata": {
    "name": "flags",
    "label": "Flags",
    "controlType": "checkbox",
    "checkboxOptions": [
      { "value": "A", "text": "Ativo" },
      { "value": "I", "text": "Inativo" }
    ]
  }
}
```
Uso: grupo simples de checkboxes com valores multiplos.

### 6. Exemplo Corporativo (JSON + Uso)
```json
{
  "componentId": "pdx-material-checkbox-group",
  "metadata": {
    "name": "scopes",
    "label": "Escopos de Acesso",
    "controlType": "checkbox",
    "layout": "horizontal",
    "color": "primary",
    "labelPosition": "after",
    "selectAll": true,
    "maxSelections": 4,
    "resourcePath": "rbac/scopes/options",
    "filterCriteria": { "tenant": "corp", "active": true },
    "optionLabelKey": "label",
    "optionValueKey": "code",
    "hint": "Selecione no maximo 4 escopos."
  }
}
```
Uso: controla escopos de perfil com limite e carregamento remoto.

### 7. Troubleshooting e Armadilhas Comuns
1. Tentar usar modo single.
Correcao: este componente e multiplo por design.

2. Layout nao muda para horizontal.
Correcao: usar `layout: "horizontal"` no metadata.

3. Limite nao bloqueia item.
Correcao: garantir `maxSelections` numerico e valores consistentes no form control.

4. Campo `searchable` nao cria busca.
Correcao: sem caixa de busca neste renderer; use select com busca se necessario.

5. Link de termos nao aparece.
Correcao: preferir `metadata.links`; `linkText/linkUrl` seguem como fallback legado quando `metadata.links` nao vem.

### 8. Cross-links
- `projects/praxis-dynamic-fields/src/lib/base/pdx-base-select-runtime-contract.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/components/material-radio-group/pdx-material-radio-group.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/components/material-selection-list/pdx-material-selection-list.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 | `false` | Active | See Detailed API reference. |
| `disabledMode` | boolean | false | `false` | Active | See Detailed API reference. |
| `visible` | boolean | false | `true` | Active | See Detailed API reference. |
| `presentationMode` | boolean | false | `false` | Active | See Detailed API reference. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.checkboxOptions` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.options` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.selectAll` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.maxSelections` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.layout` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.color` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.labelPosition` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.resourcePath` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.filterCriteria` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.optionLabelKey` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.optionValueKey` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.searchable` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.indeterminate` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.linkText` | unknown | false | n/a | Partial | See Detailed API reference. |

## Events reference (obrigatorio)

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `searchTermChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `selectionChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `openedChange` | 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 |
| --- | --- | --- | --- |
| `metadata.color` | 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-checkbox-group",
  "metadata": {
    "name": "flags",
    "label": "Flags",
    "controlType": "checkbox",
    "checkboxOptions": [
      {
        "value": "A",
        "text": "Ativo"
      },
      {
        "value": "I",
        "text": "Inativo"
      }
    ]
  },
  "readonlyMode": false
}
```

### Common setup

```json
{
  "componentId": "pdx-material-checkbox-group",
  "metadata": {
    "name": "scopes",
    "label": "Escopos de Acesso",
    "controlType": "pdx-material-checkbox-group-common",
    "layout": "horizontal",
    "color": "primary",
    "labelPosition": "after",
    "selectAll": true,
    "maxSelections": 4,
    "resourcePath": "rbac/scopes/options",
    "filterCriteria": {
      "tenant": "corp",
      "active": true
    },
    "optionLabelKey": "label",
    "optionValueKey": "code",
    "hint": "Selecione no maximo 4 escopos."
  }
}
```

### Advanced setup

```json
{
  "componentId": "pdx-material-checkbox-group",
  "metadata": {
    "name": "scopes",
    "label": "Escopos de Acesso",
    "controlType": "checkbox",
    "layout": "horizontal",
    "color": "primary",
    "labelPosition": "after",
    "selectAll": true,
    "maxSelections": 5,
    "resourcePath": "rbac/scopes/options",
    "filterCriteria": {
      "tenant": "corp",
      "active": true
    },
    "optionLabelKey": "label",
    "optionValueKey": "code",
    "hint": "Selecione no maximo 4 escopos."
  },
  "readonlyMode": false,
  "disabledMode": false
}
```

### Enterprise scenario

```json
{
  "componentId": "pdx-material-checkbox-group",
  "metadata": {
    "name": "scopes",
    "label": "Escopos de Acesso",
    "controlType": "checkbox",
    "layout": "horizontal",
    "color": "primary",
    "labelPosition": "after",
    "selectAll": true,
    "maxSelections": 4,
    "resourcePath": "rbac/scopes/options",
    "filterCriteria": {
      "tenant": "corp",
      "active": true
    },
    "optionLabelKey": "label",
    "optionValueKey": "code",
    "hint": "Selecione no maximo 4 escopos."
  },
  "presentationMode": true,
  "visible": true
}
```

## Compatibility and migration notes (recomendado)

| Concern | Affected versions | Migration action | Deadline | Notes |
| --- | --- | --- | --- | --- |
| Legacy aliases coexist with canonical paths | Active consumers using legacy JSON keys | Keep canonical paths for new usage and map aliases in migration backlog | not-yet-defined | Track via component-level migration issue |

## 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-checkbox-group/material-checkbox-group.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-checkbox-group/material-checkbox-group.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-select.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 |
