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
12 KiB
1 lines
12 KiB
{"ast":null,"code":"var _jsxFileName = \"/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/FormInput/index.js\",\n _s = $RefreshSig$();\n\n// it has style inside index.scss ---> // Start FormInput Component && end FormInput Component\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport DateRangePicker from \"../DateRangePicker\";\nimport Input from \"../AnimatedInput/Input\";\nimport CustomSelectBox from \"../CustomSelectBox\";\nimport CustomSwitch from \"../CustomSwitch\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst FormInput = _ref => {\n _s();\n\n let {\n items\n } = _ref;\n const {\n register,\n getValues\n } = useForm();\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"w-fit min-w-[600px] h-[375px] flex flex-row items-center justify-between mx-auto bg-surface p-4 border border-surfaceBorder rounded-sm shadow-sm divide-x-2 divide-surfaceBorder divide-x-reverse\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex-grow flex-1 flex flex-col gap-y-4 px-4\",\n children: [/*#__PURE__*/_jsxDEV(Input, {\n register: register(\"firstName\"),\n label: \"\\u0646\\u0627\\u0645 \",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primary focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"lastName\"),\n label: \"\\u0646\\u0627\\u0645 \\u062E\\u0627\\u0646\\u0648\\u0627\\u062F\\u06AF\\u06CC\",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primary focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"birthYear\"),\n label: \"\\u062A\\u0627\\u0631\\u06CC\\u062E \\u062A\\u0648\\u0644\\u062F\",\n type: \"number\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(CustomSelectBox, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(CustomSwitch, {\n register: register(\"gender\"),\n className: \"flex-1 bg-surface border-surfaceBorder\" // defaultValue={activeUser?.gender}\n ,\n values: [\"خانم\", \"آقا\"]\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"flex-grow flex-1 flex flex-col gap-y-4 px-4\",\n children: [/*#__PURE__*/_jsxDEV(Input, {\n register: register(\"mobileNumber\"),\n label: \"\\u0634\\u0645\\u0627\\u0631\\u0647 \\u062A\\u0645\\u0627\\u0633\",\n type: \"number\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"job\"),\n label: \"\\u0634\\u063A\\u0644\",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(CustomSelectBox, {\n options: items\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"foundus\"),\n label: \"\\u0646\\u062D\\u0648\\u0647 \\u0622\\u0634\\u0646\\u0627\\u06CC\\u06CC \\u0628\\u0627 \\u0645\\u0648\\u06A9\\u0628\",\n type: \"text\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(Input, {\n register: register(\"idCard\"),\n label: \"\\u06A9\\u062F \\u0645\\u0644\\u06CC\",\n type: \"number\",\n borderClassname: `border border-surfaceBorder `,\n inputClassname: `px-3 py-2 text-primaryText focus:bg-surface`\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"h-full flex-grow flex-1 flex flex-col items-end justify-end px-4\",\n children: /*#__PURE__*/_jsxDEV(DateRangePicker, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 15,\n columnNumber: 5\n }, this);\n};\n\n_s(FormInput, \"d78zGQJkR2bxiAwp+FiGMpFHej0=\", false, function () {\n return [useForm];\n});\n\n_c = FormInput;\nexport default FormInput;\nFormInput.defaultProps = {\n items: [{\n title: \"mahdi\"\n }, {\n title: \"mahdi\"\n }, {\n title: \"mahdi\"\n }]\n};\n\nvar _c;\n\n$RefreshReg$(_c, \"FormInput\");","map":{"version":3,"names":["React","useForm","DateRangePicker","Input","CustomSelectBox","CustomSwitch","FormInput","items","register","getValues","defaultProps","title"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/src/components/FormInput/index.js"],"sourcesContent":["// it has style inside index.scss ---> // Start FormInput Component && end FormInput Component\n\nimport React from \"react\";\nimport { useForm } from \"react-hook-form\";\n\nimport DateRangePicker from \"../DateRangePicker\";\nimport Input from \"../AnimatedInput/Input\";\nimport CustomSelectBox from \"../CustomSelectBox\";\nimport CustomSwitch from \"../CustomSwitch\";\n\nconst FormInput = ({ items }) => {\n const { register, getValues } = useForm();\n\n return (\n <div className=\"w-fit min-w-[600px] h-[375px] flex flex-row items-center justify-between mx-auto bg-surface p-4 border border-surfaceBorder rounded-sm shadow-sm divide-x-2 divide-surfaceBorder divide-x-reverse\">\n <div className=\"flex-grow flex-1 flex flex-col gap-y-4 px-4\">\n <Input\n register={register(\"firstName\")}\n label=\"نام \"\n type=\"text\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primary focus:bg-surface`}\n />\n <Input\n register={register(\"lastName\")}\n label=\"نام خانوادگی\"\n type=\"text\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primary focus:bg-surface`}\n />\n <Input\n register={register(\"birthYear\")}\n label=\"تاریخ تولد\"\n type=\"number\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primaryText focus:bg-surface`}\n />\n <CustomSelectBox />\n <CustomSwitch\n register={register(\"gender\")}\n className=\"flex-1 bg-surface border-surfaceBorder\"\n // defaultValue={activeUser?.gender}\n values={[\"خانم\", \"آقا\"]}\n />\n </div>\n <div className=\"flex-grow flex-1 flex flex-col gap-y-4 px-4\">\n <Input\n register={register(\"mobileNumber\")}\n label=\"شماره تماس\"\n type=\"number\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primaryText focus:bg-surface`}\n />\n <Input\n register={register(\"job\")}\n label=\"شغل\"\n type=\"text\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primaryText focus:bg-surface`}\n />\n <CustomSelectBox options={items} />\n <Input\n register={register(\"foundus\")}\n label=\"نحوه آشنایی با موکب\"\n type=\"text\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primaryText focus:bg-surface`}\n />\n <Input\n register={register(\"idCard\")}\n label=\"کد ملی\"\n type=\"number\"\n borderClassname={`border border-surfaceBorder `}\n inputClassname={`px-3 py-2 text-primaryText focus:bg-surface`}\n />\n </div>\n <div className=\"h-full flex-grow flex-1 flex flex-col items-end justify-end px-4\">\n <DateRangePicker />\n </div>\n </div>\n );\n};\n\nexport default FormInput;\n\nFormInput.defaultProps = {\n items: [\n {\n title: \"mahdi\",\n },\n {\n title: \"mahdi\",\n },\n {\n title: \"mahdi\",\n },\n ],\n};\n"],"mappings":";;;AAAA;AAEA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,OAAT,QAAwB,iBAAxB;AAEA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,KAAP,MAAkB,wBAAlB;AACA,OAAOC,eAAP,MAA4B,oBAA5B;AACA,OAAOC,YAAP,MAAyB,iBAAzB;;;AAEA,MAAMC,SAAS,GAAG,QAAe;EAAA;;EAAA,IAAd;IAAEC;EAAF,CAAc;EAC/B,MAAM;IAAEC,QAAF;IAAYC;EAAZ,IAA0BR,OAAO,EAAvC;EAEA,oBACE;IAAK,SAAS,EAAC,mMAAf;IAAA,wBACE;MAAK,SAAS,EAAC,6CAAf;MAAA,wBACE,QAAC,KAAD;QACE,QAAQ,EAAEO,QAAQ,CAAC,WAAD,CADpB;QAEE,KAAK,EAAC,qBAFR;QAGE,IAAI,EAAC,MAHP;QAIE,eAAe,EAAG,8BAJpB;QAKE,cAAc,EAAG;MALnB;QAAA;QAAA;QAAA;MAAA,QADF,eAQE,QAAC,KAAD;QACE,QAAQ,EAAEA,QAAQ,CAAC,UAAD,CADpB;QAEE,KAAK,EAAC,qEAFR;QAGE,IAAI,EAAC,MAHP;QAIE,eAAe,EAAG,8BAJpB;QAKE,cAAc,EAAG;MALnB;QAAA;QAAA;QAAA;MAAA,QARF,eAeE,QAAC,KAAD;QACE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