[tooltip] Optional `TrackCursorAxis` component
Closes #1792
Component providers seem to be the cleanest solution for optional features.
All Tooltip features + React
Before (03472e5) 251.13 kB │ gzip: 81.10 kB
After 249.23 kB │ gzip: 80.47 kB
None of the useClientPoint cost is added by default now. There is small overhead from reading the context and setting up the ref. Not sure if this particular feature is worth extracting from a prop though (it would likely be worth it for additional features like truncation and inline() middleware logic however)
Usage example before/after:
<Tooltip.Root trackCursorAxis="both">
...
</Tooltip.Root>
<Tooltip.Root>
<Tooltip.TrackCursorAxis value="both">
...
</Tooltip.TrackCursorAxis>
</Tooltip.Root>
Deploy Preview for base-ui ready!
| Name | Link |
|---|---|
| Latest commit | bf7dec8636d31abc2ba1f1f9433f549dde7d5f1a |
| Latest deploy log | https://app.netlify.com/projects/base-ui/deploys/68300fe4d1bfe600083347bc |
| Deploy Preview | https://deploy-preview-1963--base-ui.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Deploy Preview for base-ui ready!
| Name | Link |
|---|---|
| Latest commit | dcc93910e6f47253898c9bfe1cb8a66a9f15b0c3 |
| Latest deploy log | https://app.netlify.com/projects/base-ui/deploys/68392b3f4f27d800089805ef |
| Deploy Preview | https://deploy-preview-1963--base-ui.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Bundle size report
Total Size Change:${\tiny{\color{red}▲}}$+955B(+0.07%) - Total Gzip Change:${\tiny{\color{red}▲}}$+303B(+0.06%) Files: 41 total (0 added, 0 removed, 2 changed)
@base-ui-components/react/tooltip parsed:${\tiny{\color{red}▲}}$+483B(+0.76%) gzip:${\tiny{\color{red}▲}}$+157B(+0.73%) @base-ui-components/react parsed:${\tiny{\color{red}▲}}$+472B(+0.15%) gzip:${\tiny{\color{red}▲}}$+146B(+0.16%)
Generated by :no_entry_sign: dangerJS against dcc93910e6f47253898c9bfe1cb8a66a9f15b0c3