You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.9 KiB
1 lines
4.9 KiB
{"ast":null,"code":"var _jsxFileName = \"/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/SearchBox/index.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from \"react\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst SearchBox = _ref => {\n _s();\n\n let {\n cancleIcon,\n searchIcon,\n placeholder,\n className,\n searchBoxHolder\n } = _ref;\n const [activeSearchBox, setActiveSearchBox] = useState(false);\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: `${searchBoxHolder} flex flex-row-reverse items-center relative`,\n children: [activeSearchBox && /*#__PURE__*/_jsxDEV(\"img\", {\n src: cancleIcon,\n alt: \"\",\n className: \"w-3 h-3 absolute left-7 cursor-pointer\",\n onClick: () => setActiveSearchBox(false)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 9\n }, this), searchIcon && /*#__PURE__*/_jsxDEV(\"img\", {\n src: searchIcon,\n alt: \"\",\n className: \"w-4 h-4 absolute left-2 cursor-pointer\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"input\", {\n onFocus: () => setActiveSearchBox(true) // onBlur={() => setActiveSearchBox(false)}\n ,\n type: \"text\",\n placeholder: placeholder,\n className: `${className} w-[100%] text-xs focus:outline-none rounded border focus:ring focus:ring-opacity-20`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 13,\n columnNumber: 5\n }, this);\n};\n\n_s(SearchBox, \"gI3CrReHroA8AxFeVwU2WgVTMjk=\");\n\n_c = SearchBox;\nexport default SearchBox;\nSearchBox.defaultProps = {\n cancleIcon: \"images/SearchBoxzarbedar-icon.svg\",\n searchIcon: \"images/SearchBoxsearch-normal.svg\",\n placeholder: \"دنبال چه چیزی هستید\",\n className: \"text-blue-400 bg-[#F9FBFF] placeholder-blue-300 border-[#B5D6FF] focus:border-blue-200 focus:ring-blue-200\",\n searchBoxHolder: \"\"\n};\n\nvar _c;\n\n$RefreshReg$(_c, \"SearchBox\");","map":{"version":3,"names":["React","useState","SearchBox","cancleIcon","searchIcon","placeholder","className","searchBoxHolder","activeSearchBox","setActiveSearchBox","defaultProps"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/SearchBox/index.js"],"sourcesContent":["import React, { useState } from \"react\";\n\nconst SearchBox = ({\n cancleIcon,\n searchIcon,\n placeholder,\n className,\n searchBoxHolder,\n}) => {\n const [activeSearchBox, setActiveSearchBox] = useState(false);\n\n return (\n <div\n className={`${searchBoxHolder} flex flex-row-reverse items-center relative`}\n >\n {activeSearchBox && (\n <img\n src={cancleIcon}\n alt=\"\"\n className=\"w-3 h-3 absolute left-7 cursor-pointer\"\n onClick={() => setActiveSearchBox(false)}\n />\n )}\n {searchIcon && (\n <img\n src={searchIcon}\n alt=\"\"\n className=\"w-4 h-4 absolute left-2 cursor-pointer\"\n />\n )}\n <input\n onFocus={() => setActiveSearchBox(true)}\n // onBlur={() => setActiveSearchBox(false)}\n type=\"text\"\n placeholder={placeholder}\n className={`${className} w-[100%] text-xs focus:outline-none rounded border focus:ring focus:ring-opacity-20`}\n />\n </div>\n );\n};\n\nexport default SearchBox;\n\nSearchBox.defaultProps = {\n cancleIcon: \"images/SearchBoxzarbedar-icon.svg\",\n searchIcon: \"images/SearchBoxsearch-normal.svg\",\n\n placeholder: \"دنبال چه چیزی هستید\",\n\n className:\n \"text-blue-400 bg-[#F9FBFF] placeholder-blue-300 border-[#B5D6FF] focus:border-blue-200 focus:ring-blue-200\",\n\n searchBoxHolder: \"\",\n};\n"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;;;AAEA,MAAMC,SAAS,GAAG,QAMZ;EAAA;;EAAA,IANa;IACjBC,UADiB;IAEjBC,UAFiB;IAGjBC,WAHiB;IAIjBC,SAJiB;IAKjBC;EALiB,CAMb;EACJ,MAAM,CAACC,eAAD,EAAkBC,kBAAlB,IAAwCR,QAAQ,CAAC,KAAD,CAAtD;EAEA,oBACE;IACE,SAAS,EAAG,GAAEM,eAAgB,8CADhC;IAAA,WAGGC,eAAe,iBACd;MACE,GAAG,EAAEL,UADP;MAEE,GAAG,EAAC,EAFN;MAGE,SAAS,EAAC,wCAHZ;MAIE,OAAO,EAAE,MAAMM,kBAAkB,CAAC,KAAD;IAJnC;MAAA;MAAA;MAAA;IAAA,QAJJ,EAWGL,UAAU,iBACT;MACE,GAAG,EAAEA,UADP;MAEE,GAAG,EAAC,EAFN;MAGE,SAAS,EAAC;IAHZ;MAAA;MAAA;MAAA;IAAA,QAZJ,eAkBE;MACE,OAAO,EAAE,MAAMK,kBAAkB,CAAC,IAAD,CADnC,CAEE;MAFF;MAGE,IAAI,EAAC,MAHP;MAIE,WAAW,EAAEJ,WAJf;MAKE,SAAS,EAAG,GAAEC,SAAU;IAL1B;MAAA;MAAA;MAAA;IAAA,QAlBF;EAAA;IAAA;IAAA;IAAA;EAAA,QADF;AA4BD,CArCD;;GAAMJ,S;;KAAAA,S;AAuCN,eAAeA,SAAf;AAEAA,SAAS,CAACQ,YAAV,GAAyB;EACvBP,UAAU,EAAE,mCADW;EAEvBC,UAAU,EAAE,mCAFW;EAIvBC,WAAW,EAAE,qBAJU;EAMvBC,SAAS,EACP,4GAPqB;EASvBC,eAAe,EAAE;AATM,CAAzB"},"metadata":{},"sourceType":"module"} |