wix-style-react
Version:
wix-style-react
35 lines (34 loc) • 1.01 kB
JavaScript
;
exports.__esModule = true;
exports.useFocusRing = void 0;
var _focus = require("@react-aria/focus");
if (process.env.NODE_ENV === 'test') {
if (typeof window !== 'undefined') {
// @ts-expect-error
window.MutationObserver = class {
constructor() {
/** Stops observer from observing any mutations. Until the observe() method is used again, observer's callback will not be invoked. */
this.disconnect = void 0;
this.observe = void 0;
/** Empties the record queue and returns what was in there. */
this.takeRecords = void 0;
this.disconnect = () => ({});
this.observe = () => ({});
this.takeRecords = () => [];
}
};
global.MutationObserver = window.MutationObserver;
}
}
var useFocusRing = () => {
var {
isFocusVisible,
focusProps
} = (0, _focus.useFocusRing)();
return {
isFocusVisible,
focusProps
};
};
exports.useFocusRing = useFocusRing;
//# sourceMappingURL=useFocusRing.js.map