Hey Michal,
I have reviewed your impl quickly
and there is one conceptual problem I have found:
in order to achieve as slick performance as possible on client-side,
we should prefer CSS-only components over JS+CSS ones.
I believe ButtonGroup is a sample of component that doesn't have to use JS (Widget Factory)
at all.
(Note that JSF Bridge code may be required though).
Even in case where JS is required, it is good practice to build whole component on simple and CSS-styled markup
and the continue to tie in JS things like event handling.
~ Lukas