feat(chips): modo de escolha única com radio e rodapé Limpar/Filtrar - #1256
Merged
igor-monteiro-almeida merged 2 commits intoSep 11, 2026
Merged
Conversation
Co-Authored-By: igor.monteiro <igor.monteiro@useblu.com.br>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
Original prompt from igor.monteiro
|
igor-monteiro-almeida
marked this pull request as ready for review
September 11, 2026 16:54
|
igor-monteiro-almeida
approved these changes
Sep 11, 2026
igor-monteiro-almeida
deleted the
devin/1789144442-chips-single-selection
branch
September 11, 2026 17:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Adiciona ao
Chipso modo de escolha única com rodapé de ações, que hoje não existe:multiChoiceé o único modo que expõe "Limpar"/"Filtrar", e ele vem com checkbox — forma errada para um filtro em que marcar dois não faz sentido (ex.: período da Agenda).O novo
singleSelectionreaproveita o mesmo popover (e o mesmo contrato de rascunho: a seleção só é confirmada no "Filtrar"), trocando o controle porradio, que oListSelectablejá suporta nativamente:Semântica:
onChange/onConfirmrecebem array ([]ou[option]), igual aomultiChoice, para o consumidor não ter que tratar duas formas;multiChoicee o modo de menu contextual (sem nenhuma das duas flags) ficam inalterados.Motivação: o pattern transversal de filtros da KB de UX (Pagnet/knowledge-bases#1221) define checkbox quando "nada selecionado" é estado válido e radio quando ver dois valores juntos não é um recorte possível, mantendo um único comportamento de dropdown por barra ("Limpar"/"Filtrar" em todos). Sem este modo, o preview da Agenda só conseguia chegar ao desenho aprovado sobrescrevendo o CSS do checkbox.
Types of changes
How Has This Been Tested?
npx jest packages/ocean-react/src/Chips packages/ocean-react/src/ListSelectable— 60 testes verdes, incluindo os 6 novos dosingleSelection(render com radio e rodapé, troca de opção, volta ao vazio,onConfirmno "Filtrar",onCleanno "Limpar",selectAllOptionsignorado).npx eslint packages/ocean-react/src/Chipseprettier --checklimpos;tsc --noEmitsem erro emsrc/Chips(os erros restantes são pré-existentes emCrossSellCard/stories).Components/Chips → SingleSelectionno Storybook.Screenshots (if appropriate):
Checklist:
Link to Devin session: https://app.devin.ai/sessions/07e212e459e943379753ff34d7298b5c
Open in Devin Desktop: https://app.devin.ai/desktop/session/07e212e459e943379753ff34d7298b5c?variant=devin
Requested by: @igor-monteiro-almeida