master
mahdi andalib 3 years ago
parent b3496ad1d7
commit b814d25939
  1. 16
      src/App.js
  2. 5
      src/components/ButtonNewDesign/index.js
  3. 22
      src/components/CancleIcon/index.js
  4. 6
      src/components/CancleIcon/pink-cancle-icon.svg
  5. 44
      src/components/OutlineInput/index.js
  6. 48
      src/components/OutlineSpan/index.js
  7. 31
      src/components/OutlineTextarea/index.js
  8. 13
      src/components/PopupCard/document-cloud.svg
  9. 172
      src/components/PopupCard/index.js
  10. 3
      src/components/PopupCard/plus.svg
  11. 8
      src/components/ProfilePicNextToEachOther/images/profilePic1.svg
  12. 8
      src/components/ProfilePicNextToEachOther/images/profilePic2.svg
  13. 8
      src/components/ProfilePicNextToEachOther/images/profilePic3.svg
  14. 8
      src/components/ProfilePicNextToEachOther/images/profilePic4.svg
  15. 8
      src/components/ProfilePicNextToEachOther/images/profilePic5.svg
  16. 44
      src/components/ProfilePicNextToEachOther/index.js

@ -77,7 +77,7 @@ function App() {
{/* <BookDesign /> */}
{/* <ButtonDesign /> */}
{/* <ProductTags /> */}
<CounterDesign />
{/* <CounterDesign /> */}
{/* <BlogDesign1 /> */}
{/* <BlogDesign2 /> */}
{/* <BlogDesign3 /> */}
@ -88,17 +88,17 @@ function App() {
{/* <Testttt /> */}
{/* <Design2D /> */}
{/* <Features /> */}
<Feedback />
{/* <Feedback /> */}
{/* <Alert /> */}
{/* <Toast /> */}
<ProductSuggestion />
{/* <ProductSuggestion /> */}
{/* <ProductImage /> */}
{/* <ProductTab /> */}
{/* <ProductStatusCard /> */}
{/* <AdvertisementDesign1 /> */}
{/* <AdvertisementDesign2 /> */}
{/* <AdvertisementDesign3 /> */}
{/* <CourseChapter /> */}
<CourseChapter />
{/* <SidebarMenu /> */}
{/* <SimpleBarChart /> */}
{/* <SpecifiedDomainRadarChart /> */}
@ -107,8 +107,8 @@ function App() {
{/* <TableDesign1 /> */}
{/* <ReactTable2 /> */}
{/* <ReactTable3 /> */}
<ReactTable4 />
<ReactTable5 />
{/* <ReactTable4 /> */}
{/* <ReactTable5 /> */}
{/* <Digikala /> */}
{/* <HeaderDesign1 /> */}
{/* <div className="flex">
@ -120,14 +120,14 @@ function App() {
</div> */}
{/* <BreadCrumb /> */}
{/* <SearchBox /> */}
<FileManager />
{/* <FileManager /> */}
{/* <Playlist /> */}
{/* <Folderlists /> */}
{/* <Blogs /> */}
{/* <CardHolder /> */}
{/* <UploadFile /> */}
{/* <BarChartApex /> */}
<OutlineInput />
{/* <OutlineInput /> */}
{/* <ButtonNewDesign /> */}
{/* <CancleIcon /> */}
{/* <SemiDonut /> */}

@ -16,6 +16,7 @@ const ButtonNewDesign = ({
buttonIcon,
text,
onClick,
iconMarginRight,
}) => {
return (
<button
@ -24,7 +25,7 @@ const ButtonNewDesign = ({
>
{text}
{icon && (
<span className={`rounded-full mr-2 ${iconBgColor} `}>
<span className={`rounded-full ${iconMarginRight} ${iconBgColor} `}>
<img src={buttonIcon} alt="" className="w-full" />
</span>
)}
@ -47,6 +48,6 @@ ButtonNewDesign.defaultProps = {
// icons
icon: true,
buttonIcon: arrow,
iconMarginRight: "mr-2",
text: "اطلاعات بیشتر",
};

@ -0,0 +1,22 @@
import React from "react";
import cancleIconPink from "./pink-cancle-icon.svg";
const CancleIcon = ({ backgroundColor, icon }) => {
return (
<div
type="button"
data-modal-toggle="defaultModal"
className={`p-2 cursor-pointer rounded ${backgroundColor}`}
>
<img src={icon} className="w-4" />
</div>
);
};
export default CancleIcon;
CancleIcon.defaultProps = {
backgroundColor: "bg-red-600",
icon: cancleIconPink,
};

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="13.782" height="13.781" viewBox="0 0 13.782 13.781">
<g id="Group_1887" data-name="Group 1887" transform="translate(1.061 1.061)">
<path id="Vector" d="M11.544,11.544,0,0" transform="translate(0.117)" fill="none" stroke="#ee00b6" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M11.544,0,0,11.544" transform="translate(0 0.117)" fill="none" stroke="#ee00b6" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 559 B

@ -0,0 +1,44 @@
import React from "react";
const OutlineInput = ({
divWidth,
onClick,
onFocus,
onBlur,
textClr,
borderClr,
outlineTitle,
outlineTitleClr,
}) => {
return (
<div className={`${divWidth}`}>
<input
type="text"
className={`relative w-full border-2 rounded-md text-sm h-12
focus:outline-none focus:border-[#22577E] focus:ring-1 focus:ring-[#22577E] ${textClr}`}
style={{
borderColor: borderClr,
}}
onClick={onClick}
onFocus={onFocus}
onBlur={onBlur}
/>
<span
className={`absolute right-20 -mt-2 bg-white text-xs px-2 font-bold`}
style={{ color: outlineTitleClr }}
>
{outlineTitle}
</span>
</div>
);
};
export default OutlineInput;
OutlineInput.defaultProps = {
divWidth: "w-full",
textClr: "text-red-600",
borderClr: "yellow",
outlineTitle: "مهدی عندلیب",
outlineTitleClr: "red",
};

@ -0,0 +1,48 @@
import React from "react";
const OutlineSpan = ({
divWidth,
onClick,
onFocus,
onBlur,
textClr,
borderClr,
outlineTitle,
outlineTitleClr,
defaultValue,
}) => {
return (
<div className={`${divWidth}`}>
<span
className={`absolute right-20 -mt-2 bg-white text-xs px-2 font-bold z-10`}
style={{ color: outlineTitleClr }}
>
{outlineTitle}
</span>
<p
className={`relative w-full border-2 rounded-md text-sm leading-6 text-justify p-3
focus:outline-none focus:border-[#22577E] focus:ring-1 focus:ring-[#22577E] ${textClr}`}
style={{
borderColor: borderClr,
}}
onClick={onClick}
onFocus={onFocus}
onBlur={onBlur}
>
{defaultValue}
</p>
</div>
);
};
export default OutlineSpan;
OutlineSpan.defaultProps = {
divWidth: "w-full",
textClr: "text-red-600",
borderClr: "yellow",
outlineTitle: "مهدی عندلیب",
outlineTitleClr: "red",
defaultValue:
"جنگ اول خلیج فارس، جنگی به رهبری آمریکا و با همکاری ائتلافی از ۳۵ کشور مختلف بود که علیه عراق بعثی در واکنش به اشغال کویت توسط عراق انجام گرفت",
};

@ -0,0 +1,31 @@
import React from "react";
const OutlineTextarea = ({ text, outlineTitleClr, outlineTitle, outline }) => {
return (
<div>
{outline && (
<span
className={`absolute right-20 mt-3 bg-white text-xs px-2 font-bold z-10`}
style={{ color: outlineTitleClr }}
>
{outlineTitle}
</span>
)}
<textarea
style={{ borderWidth: "2px" }}
class="text-justify leading-5 relative w-full h-20 resize-y rounded-md my-5 text-xs border-[#06BACE] focus:outline-none focus:border-[#22577E] focus:ring-1 focus:ring-[#22577E]"
>
{text}
</textarea>
</div>
);
};
export default OutlineTextarea;
OutlineTextarea.defaultProps = {
text: "جنگ اول خلیج فارس، جنگی به رهبری آمریکا و با همکاری ائتلافی از ۳۵ کشور مختلف بود که علیه عراق بعثی در واکنش به اشغال کویت توسط عراق انجام گرفت ",
outlineTitle: "مهدی عندلیب",
outlineTitleClr: "red",
outline: true,
};

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.27" height="28.27" viewBox="0 0 28.27 28.27">
<g id="document-cloud" opacity="0.16">
<g id="Group" transform="translate(2.356 2.356)">
<path id="Vector" d="M14.135,0H8.245C2.356,0,0,2.356,0,8.245v7.067c0,5.89,2.356,8.245,8.245,8.245" fill="none" stroke="#6e849f" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M0,0V3.534" transform="translate(23.558 9.423)" fill="none" stroke="#6e849f" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-3" data-name="Vector" d="M9.423,9.423H4.712C1.178,9.423,0,8.245,0,4.712V0Z" transform="translate(14.135)" fill="none" stroke="#6e849f" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
</g>
<g id="Group-2" data-name="Group" transform="translate(14.132 16.424)">
<path id="Vector-4" data-name="Vector" d="M2.076,5.084a2.207,2.207,0,0,0,0,4.405H8.625a3.188,3.188,0,0,0,2.144-.825A3.146,3.146,0,0,0,9.12,3.259C8.2-2.266.215-.169,2.1,5.1" fill="none" stroke="#6e849f" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
</g>
<path id="Vector-5" data-name="Vector" d="M0,0H28.27V28.27H0Z" fill="none" opacity="0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -4,9 +4,15 @@ import CancleIcon from "../CancleIcon";
import cancleIcon from "./cancle-icon.svg";
import calender from "./calender.svg";
import documentCloud from "./document-cloud.svg";
import plus from "./plus.svg";
import OutlineInput from "../OutlineInput";
import OutlineTextarea from "../OutlineTextarea";
import ButtonNewDesign from "../ButtonNewDesign";
import ProfilePicNextToEachOther from "../ProfilePicNextToEachOther";
const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
const PopupCard = ({ selectedChecklist }) => {
const [activeInput, setActiveInput] = useState(false);
const [checklist, setChecklist] = useState(0);
@ -33,24 +39,23 @@ const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
<CancleIcon backgroundColor={"bg-[#F8F8F8]"} icon={cancleIcon} />
</div>
{/* modalBody */}
<div className="w-11/12 mx-auto mt-3">
<div className="w-11/12 mx-auto">
{/* top */}
<div className="flex">
<div className="flex flex-row ">
{/* right */}
<OutlineInput
divWidth="w-1/2"
textClr={activeInput ? "text-[#22577E]" : "text-[#06BACE]"}
borderClr={activeInput ? "#22577E" : "#06BACE"}
outlineTitle={"نام کارت"}
outlineTitleClr={activeInput ? "#22577E" : "#06BACE"}
// onClick={() => setSelectedTab(true)}
onFocus={() => setActiveInput(true)}
onBlur={() => setActiveInput(false)}
/>
{/* divider */}
<div className="border border-[#DBDBDB] mx-5"></div>
<div className="border border-[#DBDBDB77] rounded mx-5"></div>
{/* left */}
<div date-rangepicker className="flex items-center w-1/2">
<div date-rangepicker className="flex items-center w-1/2">
<div className="relative w-full">
<img src={calender} className="absolute top-3 left-2" />
<input
@ -61,23 +66,20 @@ const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
placeholder="چهارشنبه 10 فروردین 1401 بماند به یادگار"
/>
</div>
</div>
</div>{" "}
</div>
{/* divider */}
<div className="border border-[#DBDBDB] my-5"></div>
<div className="border border-[#DBDBDB77] rounded my-5"></div>
{/* middle */}
<div className="flex flex-row">
<div className="flex flex-row pb-4">
{/* right */}
<div className="flex flex-col w-1/2">
<span class="resize-y relative w-full h-fit p-4 text-justify border-2 rounded-md text-sm border-[#06BACE] focus:outline-none focus:border-[#22577E] focus:ring-1 focus:ring-[#22577E]">
{textArea}
</span>
<span
className={`absolute right-20 -mt-2 text-[#06BACE] bg-white text-xs px-2 font-bold`}
>
نام کارت
</span>
<div className="my-5 flex flex-col">
<OutlineTextarea
outlineTitle={"نام کارت"}
outlineTitleClr={"#06BACE"}
/>
<div className="flex flex-col">
{/* checkLIst input field */}
<div>
<input
type="checkbox"
@ -86,10 +88,22 @@ const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
/>
<span className="text-sm mr-2">چک لیست ها</span>
</div>
{checklist}
<textarea class="resize-y rounded-md my-5 text-sm border-[#06BACE] focus:outline-none focus:border-[#22577E] focus:ring-1 focus:ring-[#22577E]"></textarea>
{selectedChecklist.slice(0, 1).map((item, index) => (
<div>
{/* progress bar */}
<div className="flex flex-row items-center mt-3">
<div className="bg-[#DBDBDB77] h-2 w-full rounded">
<div
className="bg-[#06BACE] h-2 rounded transition delay-150"
style={{ width: checklist + "%" }}
></div>
</div>
<div className="mr-1 text-sm">
{checklist}
<span>%</span>
</div>
</div>
<OutlineTextarea outline={false} text={""} />
{selectedChecklist.slice(0, 3).map((item, index) => (
<div key={index} className="">
<input
// checked={checklist ? true : false}
// onClick={() => setChecklist(checklist + 25)}
@ -103,10 +117,10 @@ const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
// checked === true ? checklist - 25 : checklist + 25
// )
// }
disabled={checklist >= 100}
type="checkbox"
checked
className="form-checkbox text-blue-500 bg-red-600"
onClick={() => setChecklist(checklist + 25)}
className="form-checkbox text-blue-500"
onClick={() => setChecklist(checklist + 10)}
/>
<span className="text-sm mr-2">{item.title}</span>
</div>
@ -114,19 +128,94 @@ const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
</div>
</div>
{/* divider */}
<div className="border border-[#DBDBDB] mx-5"></div>
<div className="border border-[#DBDBDB77] rounded mx-5"></div>
{/* left */}
<div date-rangepicker className="flex items-center w-1/2">
<div className="relative w-full">
<img src={calender} className="absolute top-3 left-2" />
<div className="w-1/2 flex flex-col items-start">
<span className="text-xs text-[#B3B3B3] mb-3 text-light ">
افراد عضو این کارت
</span>
<div className="flex flex-row items-center justify-between w-full">
<ProfilePicNextToEachOther />
<ButtonNewDesign
bgColor={"bg-[#06BACE]"}
bgHoverColor={"hover:bg-[#06BACE99]"}
textColor={"text-white"}
border={"border-none"}
borderRadius={"rounded"}
fontSize={"text-xs"}
padding={"p-3"}
icon={false}
text={"دعوت فرد جدید"}
/>
</div>
{/* divider */}
<div className="border border-[#DBDBDB77] rounded my-5 w-full"></div>
<span className="text-xs text-[#B3B3B3] mb-3 text-light ">
لیبل های کارت
</span>
<div className="flex flex-row flex-wrap items-center gap-2">
<ButtonNewDesign
bgColor={"bg-[#08E678]"}
bgHoverColor={"hover:bg-[#08E67899]"}
textColor={"text-white"}
border={"border-none"}
borderRadius={"rounded"}
fontSize={"text-xs"}
padding={"p-3"}
icon={false}
text={"برنامه نویس اندروید"}
/>
<ButtonNewDesign
bgColor={"bg-[#1100FF]"}
bgHoverColor={"hover:bg-[#1100FF99]"}
textColor={"text-white"}
border={"border-none"}
borderRadius={"rounded"}
fontSize={"text-xs"}
padding={"p-3"}
icon={false}
text={"رابط کاربری"}
/>
<ButtonNewDesign
bgColor={"bg-[#FFE600]"}
bgHoverColor={"hover:bg-[#FFE60099]"}
textColor={"text-white"}
border={"border-none"}
borderRadius={"rounded"}
fontSize={"text-xs"}
padding={"p-3"}
icon={false}
text={"فرایند قانونگذاری"}
/>
<div className="bg-[#dddddd] py-1 px-2 rounded cursor-pointer">
<img
src={plus}
className="w-full"
style={{ marginTop: "-2px" }}
/>
</div>
</div>
{/* divider */}
<div className="border border-[#DBDBDB77] rounded my-5 w-full"></div>
<span className="text-xs text-[#B3B3B3] mb-3 text-light ">
پیوست ها
</span>
<div className="relative flex flex-row items-center justify-around border-2 border-dashed border-[#65A9FF] w-full p-4 rounded-md">
<img src={documentCloud} />
<input
name="start"
type="text"
className="w-full border-2 border-blue-400 rounded-md text-sm h-12
focus:outline-none focus:border-[#22577E] focus:ring-1 focus:ring-[#22577E]"
placeholder="چهارشنبه 10 فروردین 1401 بماند به یادگار"
type="file"
className="opacity-0 absolute left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-full h-full cursor-pointer"
style={{ top: "39%" }}
/>
<p className="text-sm text-center">
یک فایل را اینجا بکشید یا از{" "}
<span className="text-[#65A9FF] ">
رایانه خود انتخاب کنید
</span>
</p>
</div>
{/* divider */}
<div className="border border-[#DBDBDB77] rounded my-5 w-full"></div>
</div>
</div>
</div>
@ -140,8 +229,6 @@ const PopupCard = ({ textArea, selectedChecklist, notSelectedChecklist }) => {
export default PopupCard;
PopupCard.defaultProps = {
textArea:
"جنگ اول خلیج فارس، جنگی به رهبری آمریکا و با همکاری ائتلافی از ۳۵ کشور مختلف بود که علیه عراق بعثی در واکنش به اشغال کویت توسط عراق انجام گرفت پایان جنگ ایران و عراق هم زمان با بروز تشنّج عراق و کویت بود. ارتش عراق در زمان حکومت صدام حسین و حزب بعث عراق د",
selectedChecklist: [
{
title: "خرید شماره 1",
@ -153,15 +240,4 @@ PopupCard.defaultProps = {
title: "خرید شماره 3",
},
],
notSelectedChecklist: [
{
title: "خرید شماره 1",
},
{
title: "خرید شماره 1",
},
{
title: "خرید شماره 3",
},
],
};

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="31" viewBox="0 0 18 31">
<text id="_" data-name="+" transform="translate(9 25)" fill="#fff" font-size="23" font-family="SegoeUI-Bold, Segoe UI" font-weight="700"><tspan x="-8.131" y="0">+</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 271 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 37 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 28 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 33 KiB

@ -0,0 +1,44 @@
import React from "react";
import profilePic1 from "./images/profilePic1.svg";
import profilePic2 from "./images/profilePic2.svg";
import profilePic3 from "./images/profilePic3.svg";
import profilePic4 from "./images/profilePic4.svg";
import profilePic5 from "./images/profilePic5.svg";
const ProfilePicNextToEachOther = ({ users }) => {
return (
<div className="flex flex-row">
{users.slice(0, 8).map((user, i) => (
<img
key={i}
src={user.picture}
className="w-10"
style={{ marginLeft: "-5px" }}
/>
))}
</div>
);
};
export default ProfilePicNextToEachOther;
ProfilePicNextToEachOther.defaultProps = {
users: [
{
picture: profilePic1,
},
{
picture: profilePic2,
},
{
picture: profilePic3,
},
{
picture: profilePic4,
},
{
picture: profilePic5,
},
],
};
Loading…
Cancel
Save