paradiego
This commit is contained in:
1
node_modules/@mui/utils/modern/isFocusVisible/index.js
generated
vendored
Normal file
1
node_modules/@mui/utils/modern/isFocusVisible/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./isFocusVisible.js";
|
||||
15
node_modules/@mui/utils/modern/isFocusVisible/isFocusVisible.js
generated
vendored
Normal file
15
node_modules/@mui/utils/modern/isFocusVisible/isFocusVisible.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Returns a boolean indicating if the event's target has :focus-visible
|
||||
*/
|
||||
export default function isFocusVisible(element) {
|
||||
try {
|
||||
return element.matches(':focus-visible');
|
||||
} catch (error) {
|
||||
// Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped
|
||||
// Tests that rely on `:focus-visible` will still have to be skipped in jsdom
|
||||
if (process.env.NODE_ENV !== 'production' && !/jsdom/.test(window.navigator.userAgent)) {
|
||||
console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\n'));
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user