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
13 KiB
1 lines
13 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: \"flex flex-col\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"w-fit min-w-[900px] 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: 18,\n columnNumber: 11\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: 25,\n columnNumber: 11\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: 32,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(CustomSelectBox, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\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: 40,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 17,\n columnNumber: 9\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: 48,\n columnNumber: 11\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: 55,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(CustomSelectBox, {\n options: items\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 11\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: 63,\n columnNumber: 11\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: 70,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 9\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: 79,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 16,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(Button, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 82,\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=\"flex flex-col\">\n <div className=\"w-fit min-w-[900px] 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 <Button />\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,eAAf;IAAA,wBACE;MAAK,SAAS,EAAC,mMAAf;MAAA,wBACE;QAAK,SAAS,EAAC,6CAAf;QAAA,wBACE,QAAC,KAAD;UACE,QAAQ,EAAEO,QAAQ,CAAC,WAAD,CADpB;UAEE,KAAK,EAAC,qBAFR;UAGE,IAAI,EAAC,MAHP;UAIE,eAAe,EAAG,8BA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