base-ui
base-ui copied to clipboard
[Slider] Modernize implementation
- Replaced
useCompound
withComposite
Previously the id
attribute of all the input
elements were passed to useCompound
as metadata to generate the for
attribute of the output
element.
However the refs provided by Composite can't be used during the render of Output
for this, so the id
s have to be held in a new state
- Converted types to namespaces
- Fix https://github.com/mui/base-ui/issues/635
- Hooks/context are no longer exported for now - it's no longer possible to (easily) implement a Material Design slider as it would require custom subcomponents
- [x] I have followed (at least) the PR section of the contributing guide.