import { Icon as PhosphorIcon } from '@phosphor-icons/react'; export interface SelectButtonOption { /** Unique identifier for the option */ value: string; /** Display label */ label: string; /** Optional leading icon */ icon?: PhosphorIcon; } export interface SelectButtonProps { /** Array of 2–5 options to display */ options: SelectButtonOption[]; /** Currently selected value */ value: string; /** Callback fired when the user selects a different option */ onChange: (value: string) => void; /** Disables all interaction */ disabled?: boolean; /** Additional class names for the wrapper */ className?: string; /** aria-label for the group when no surrounding label is present */ 'aria-label'?: string; /** aria-labelledby pointing to an external label element */ 'aria-labelledby'?: string; } /** * SelectButton sobre o SelectButton do PrimeReact 10 (unstyled + pt). * * O Prime é o motor do clique (`onChange` com `allowEmpty={false}`: clicar na * opção já selecionada não a desmarca). Lacunas de acessibilidade do Prime 10 * corrigidas por cima: * - itens são `
` num `role="group"`: o grupo * vira `radiogroup` e o item é o nosso `