[core] Use `useRtl` instead of `useTheme` to access direction
Follow up on https://github.com/mui/mui-x/pull/13363.
When working on https://github.com/mui/mui-x/pull/14142 and noticing that we are reverting back to @mui/system as a peer dependency I thought that it would make sense for all packages to actually "need" that peer dependency to function properly.
This is also a stepping stone for PigmentCSS support.
It also has the added benefit of further reducing the coupling with @mui/material.
Review from the Data Grid team is essential as it touches the store. I've done some testing to ensure that it functions as it currently does, but at least a second pair of eyes is essential.
Deploy preview: https://deploy-preview-14359--material-ui-x.netlify.app/
Generated by :no_entry_sign: dangerJS against 2f41c560891cd4ea6db201eb1360a7a0aa3f4625
CodSpeed Performance Report
Merging #14359 will not alter performance
Comparing LukasTy:use-is-rtl-hook (2f41c56) with master (1a23942)
Summary
✅ 3 untouched benchmarks
This pull request has conflicts, please resolve those before we can evaluate the pull request.