39820.js.map 2.5 KB

1
  1. {"version":3,"file":"39820.js","mappings":";;;;;;;;;;;;;AAAA;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA,GAAG;AACH;AACA,iEAAe,SAAS;;;;;;;;;;;;;ACdkB;AAE1C;;;;;CAKC,GACM,MAAMC,eAAe,GAAG,CAC7BC,OAAsB,GACS;IAC/B,MAAMC,UAAU,GAAGH,6CAAM,CAAI,IAAI,CAAC;IAClC,yHAAyH;IACzH,MAAMI,YAAY,GAAG,IAAY;QAC/B,sCAAsC;QACtC,IAAID,UAAU,CAACE,OAAO,EAAE;YACtBF,UAAU,CAACE,OAAO,CAACC,KAAK,CAACJ,OAAO,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,OAAO;QAACE,YAAY;QAAED,UAAU;KAAC,CAAC;AACpC,CAAC,CAAC;AAEF,iEAAeF,eAAe,EAAC","sources":["webpack://quran.com/./public/icons/search.svg","webpack://quran.com/./src/hooks/useFocusElement.ts"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgSearch = function SvgSearch(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m23.5 21.466-7.01-7.01a9.066 9.066 0 0 0 1.736-5.343C18.226 4.088 14.138 0 9.113 0 4.088 0 0 4.088 0 9.113c0 5.025 4.088 9.113 9.113 9.113a9.066 9.066 0 0 0 5.343-1.735l7.01 7.009 2.034-2.034ZM9.113 15.348a6.236 6.236 0 1 1 6.235-6.235 6.243 6.243 0 0 1-6.235 6.235Z\"\n })));\n};\nexport default SvgSearch;","import { useRef, RefObject } from 'react';\n\n/**\n * A hook that focus a referenced element.\n *\n * @param {FocusOptions} options\n * @returns {[() => void, RefObject<T>]}\n */\nexport const useFocusElement = <T extends HTMLElement>(\n options?: FocusOptions,\n): [() => void, RefObject<T>] => {\n const elementRef = useRef<T>(null);\n // a function that will be invoked by the component using this hook to focus the the element being referenced (if found).\n const executeFocus = (): void => {\n // only focus when the ref has a value\n if (elementRef.current) {\n elementRef.current.focus(options);\n }\n };\n\n return [executeFocus, elementRef];\n};\n\nexport default useFocusElement;\n"],"names":["useRef","useFocusElement","options","elementRef","executeFocus","current","focus"],"sourceRoot":""}