From c9a2f3d6e0d653218f9d9d9ad46435339a8da822 Mon Sep 17 00:00:00 2001 From: Alireza khaji Date: Sun, 8 May 2022 17:13:27 +0430 Subject: [PATCH] calendar --- dist/css/BuyInfo.css | 30 ++ dist/css/BuyInfo.css.map | 9 + dist/css/Header.css | 49 +++ dist/css/Header.css.map | 9 + dist/css/M_Exam.css | 376 ++++++++++++++++++++++ dist/css/M_Exam.css.map | 9 + dist/css/Nav.css | 9 + dist/css/Nav.css.map | 9 + dist/css/Packages.css | 30 ++ dist/css/Packages.css.map | 9 + dist/css/Register.css | 123 ++++++++ dist/css/Register.css.map | 9 + dist/css/UserFullInfo.css | 26 ++ dist/css/UserFullInfo.css.map | 9 + dist/css/colors.css | 1 + dist/css/colors.css.map | 9 + dist/css/size.css | 1 + dist/css/size.css.map | 9 + src/components/Calendar2/Calendar2.js | 177 ++++++++++- src/components/Calendar2/Days.js | 434 ++++++++++++++++++++++++++ src/components/Calendar2/Title.js | 33 +- src/components/Calendar2/Week.js | 10 +- 22 files changed, 1369 insertions(+), 11 deletions(-) create mode 100644 dist/css/BuyInfo.css create mode 100644 dist/css/BuyInfo.css.map create mode 100644 dist/css/Header.css create mode 100644 dist/css/Header.css.map create mode 100644 dist/css/M_Exam.css create mode 100644 dist/css/M_Exam.css.map create mode 100644 dist/css/Nav.css create mode 100644 dist/css/Nav.css.map create mode 100644 dist/css/Packages.css create mode 100644 dist/css/Packages.css.map create mode 100644 dist/css/Register.css create mode 100644 dist/css/Register.css.map create mode 100644 dist/css/UserFullInfo.css create mode 100644 dist/css/UserFullInfo.css.map create mode 100644 dist/css/colors.css create mode 100644 dist/css/colors.css.map create mode 100644 dist/css/size.css create mode 100644 dist/css/size.css.map create mode 100644 src/components/Calendar2/Days.js diff --git a/dist/css/BuyInfo.css b/dist/css/BuyInfo.css new file mode 100644 index 0000000..179ab41 --- /dev/null +++ b/dist/css/BuyInfo.css @@ -0,0 +1,30 @@ +.BuyInfo-main { + overflow-x: visible !important; +} + +.BuyInfo-main::-webkit-scrollbar { + position: absolute; + right: 0; + top: 0; + z-index: 2; + width: 5px !important; +} + +.BuyInfo-main::-webkit-scrollbar-button { + display: none; + -webkit-appearance: none; + appearance: none; +} + +.BuyInfo-main::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #97BAE6; +} + +.BuyInfo-main::-webkit-scrollbar-track { + background-color: transparent !important; + display: none; + -webkit-appearance: none; + appearance: none; +} +/*# sourceMappingURL=BuyInfo.css.map */ \ No newline at end of file diff --git a/dist/css/BuyInfo.css.map b/dist/css/BuyInfo.css.map new file mode 100644 index 0000000..ded11f8 --- /dev/null +++ b/dist/css/BuyInfo.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AACG,AAAD,aAAM,CAAC;EACL,UAAU,EAAE,kBAAkB;CAwB/B;;AAzBA,AAEC,aAFI,AAEH,mBAAmB,CAAC;EACnB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,CAAC;EACR,GAAG,EAAE,CAAC;EACN,OAAO,EAAE,CAAC;EACV,KAAK,EAAE,cAAc;CACtB;;AARF,AAUC,aAVI,AAUH,0BAA0B,CAAC;EAC1B,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CACjB;;AAbF,AAeC,aAfI,AAeH,yBAAyB,CAAC;EACzB,aAAa,EAAE,IAAI;EACnB,gBAAgB,EAAE,OAAO;CAC1B;;AAlBF,AAoBC,aApBI,AAoBH,yBAAyB,CAAC;EACzB,gBAAgB,EAAE,sBAAsB;EACxC,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CACjB", + "sources": [ + "../../src/view/dashboard2/BuyInfo.scss" + ], + "names": [], + "file": "BuyInfo.css" +} \ No newline at end of file diff --git a/dist/css/Header.css b/dist/css/Header.css new file mode 100644 index 0000000..d787d5f --- /dev/null +++ b/dist/css/Header.css @@ -0,0 +1,49 @@ +@font-face { + font-family: IRANSansX-Regular; + src: url(../../assets/font/IRANSansX/Webfonts/fonts/woff/IRANSansX-Regular.woff); +} + +.header { + font-family: IRANSansX-Regular; +} + +.header-search-input { + direction: rtl; +} + +.header-search-input:focus { + outline: none !important; +} + +.subMenu { + -webkit-animation: fadeInAnimation ease-in-out 0.5s; + animation: fadeInAnimation ease-in-out 0.5s; + -webkit-animation-iteration-count: 1; + animation-iteration-count: 1; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +@-webkit-keyframes fadeInAnimation { + 0% { + opacity: 0; + } + 100% { + height: -webkit-fit-content; + height: fit-content; + opacity: 1; + } +} + +@keyframes fadeInAnimation { + 0% { + opacity: 0; + } + 100% { + height: -webkit-fit-content; + height: -moz-fit-content; + height: fit-content; + opacity: 1; + } +} +/*# sourceMappingURL=Header.css.map */ \ No newline at end of file diff --git a/dist/css/Header.css.map b/dist/css/Header.css.map new file mode 100644 index 0000000..8c3f64e --- /dev/null +++ b/dist/css/Header.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAAA,UAAU;EACR,WAAW,EAAE,iBAAiB;EAC9B,GAAG,EAAE,2EAA2E;;;AAKlF,AAAA,OAAO,CAAA;EACL,WAAW,EAAE,iBAAiB;CAU/B;;AAPE,AAAD,oBAAc,CAAA;EACZ,SAAS,EAAE,GAAG;CAKf;;AANA,AAGC,oBAHY,AAGX,MAAM,CAAA;EACL,OAAO,EAAE,eAAe;CACzB;;AAGL,AAAA,QAAQ,CAAA;EACN,SAAS,EAAE,gCAAgC;EACzC,yBAAyB,EAAE,CAAC;EAC5B,mBAAmB,EAAC,IAAI;CAE3B;;AAED,UAAU,CAAV,eAAU;EACN,EAAE;IAEE,OAAO,EAAE,CAAC;;EAGd,IAAI;IACA,MAAM,EAAE,WAAW;IACpB,OAAO,EAAE,CAAC", + "sources": [ + "../../src/components/header/Header.scss" + ], + "names": [], + "file": "Header.css" +} \ No newline at end of file diff --git a/dist/css/M_Exam.css b/dist/css/M_Exam.css new file mode 100644 index 0000000..083731d --- /dev/null +++ b/dist/css/M_Exam.css @@ -0,0 +1,376 @@ +.M-Exam { + width: 100vw; + padding: 0 5px; + position: relative; +} + +.M-Exam .M-Exam-top-cover { + width: 96%; + height: 200px; + position: fixed; + top: 0; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + background-color: white; + z-index: 4; +} + +.M-Exam .M-Exam-info { + width: 96%; + padding: 5px 7px; + border-radius: 10px; + border: 2px solid #F1F1F1; + position: fixed; + top: 90px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + background-color: white; + z-index: 5; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 { + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 5px 0; + direction: rtl; + border-bottom: 1px solid #dfdfdf; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-title-and-subtitle-box { + width: 65%; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-title-and-subtitle-box .M-Exam-info-row1-title-box { + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + direction: rtl; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-title-and-subtitle-box .M-Exam-info-row1-title-box .M-Exam-info-row1-title-box-text { + font-size: 13px; + margin-right: 3px; + color: #2E81E8; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-title-and-subtitle-box .M-Exam-info-row1-subtitle-box { + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + direction: rtl; + margin-top: 5px; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-title-and-subtitle-box .M-Exam-info-row1-subtitle-box .M-Exam-info-row1-subtitle-box-icon { + margin-right: 16px; + color: #CEFDFF; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-title-and-subtitle-box .M-Exam-info-row1-subtitle-box .M-Exam-info-row1-subtitle-box-text { + font-size: 10px; + color: #132F52; + margin-right: 3px; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-time { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + padding: 2px 5px; + background-color: #E2EAF4; + direction: rtl; + border-radius: 3px; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-time .M-Exam-info-row1-time-icon { + color: #013273; +} + +.M-Exam .M-Exam-info .M-Exam-info-row1 .M-Exam-info-row1-time .M-Exam-info-row1-time-text { + font-size: 12px; + color: #013273; + margin-right: 3px; +} + +.M-Exam .M-Exam-info .M-Exam-info-row2 { + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + padding: 5px 0; + direction: rtl; +} + +.M-Exam .M-Exam-info .M-Exam-info-row2 .M-Exam-info-row2-text { + font-size: 14px; + color: #2E81E8; + margin-right: 5px; +} + +.M-Exam .M-Exam-info .M-Exam-info-row2 .M-Exam-info-row2-timer { + font-size: 16px; + color: #2E81E8; + margin-right: 5px; +} + +.M-Exam-progress-bar { + width: 96%; + height: 35px; + overflow-x: scroll; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + position: fixed; + top: 180px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); + direction: rtl; + background-color: white; + z-index: 5; + scroll-behavior: smooth; +} + +.M-Exam-progress-bar-item { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 100%; + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.M-Exam-progress-bar-item-circle { + width: 35px !important; + height: 35px !important; + border-radius: 50%; + background-color: #F5F5F5; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + color: #A2B4CB; +} + +.M-Exam-progress-bar-item-line { + font-size: 16px; + color: #E0E0E0; +} + +.M-Exam-main { + width: 96%; + position: absolute; + top: 220px; + left: 50%; + -webkit-transform: translateX(-50%); + transform: translateX(-50%); +} + +.M-Exam-main-item { + width: 100%; + direction: rtl; + margin-top: 15px; +} + +.M-Exam-main-item-number { + font-size: 15px; + color: #132F52; + padding: 2px 5px; + background-color: #E8FCFF; + display: inline; +} + +.M-Exam-main-item-question { + width: 100%; + font-size: 19px; + color: #132F52; + margin-top: 5px; +} + +.M-Exam-main-item-question-img { + width: 100%; + padding: 5px 5px; + border-radius: 5px; + overflow: hidden; + margin-top: 10px; + background-color: #F5F5F5; +} + +.M-Exam-main-item-question-img img { + width: 100%; + height: auto; +} + +.M-Exam-main-item-choices { + width: 100%; + direction: rtl; +} + +.M-Exam-main-item-choices-item { + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + margin-top: 10px; +} + +.M-Exam-main-item-choices-item-badge { + width: 13%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + font-size: 14px; + color: #132F52; + background-color: #E7E7E7; + padding: 6px 0; + border-radius: 0 5px 5px 0; +} + +.M-Exam-main-item-choices-item-text { + width: 100%; + height: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-size: 16px; + color: #132F52; + background-color: #F5F5F5; + padding: 6px 0; + padding-right: 10px; + border-radius: 5px 0 0 5px; +} + +.M-Exam-main-item-answer-box { + width: 100%; + height: 150px; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-top: 10px; +} + +.M-Exam-main-item-answer-box-badge { + height: 100%; + width: 75px; + background-color: #E7E7E7; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + font-size: 14px; + color: #132F52; + border-radius: 0 5px 5px 0; + text-align: center; +} + +.M-Exam-main-item-answer-box-input { + width: 100% !important; + height: 100%; + background-color: #F5F5F5; + border: none !important; + outline: none !important; + border-radius: 5px 0 0 5px; + resize: none; + font-size: 14px; + padding: 10px 10px; +} + +.M-Exam-main-item-line { + width: 100%; + height: 1px; + background-color: #D6E6F9; + margin-top: 20px; +} + +.M-Exam-main-btn-container { + width: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-top: 20px; + margin-bottom: 20px; +} + +.M-Exam-main-btn-container-line { + width: 20%; + height: 2px; + background-color: #2E81E8; +} + +.M-Exam-main-btn-container-btn { + width: 60%; + height: 40px; + border-radius: 7px; + background-color: #2E81E8; + color: white; + font-size: 15px; + color: white; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} +/*# sourceMappingURL=M_Exam.css.map */ \ No newline at end of file diff --git a/dist/css/M_Exam.css.map b/dist/css/M_Exam.css.map new file mode 100644 index 0000000..f7688a8 --- /dev/null +++ b/dist/css/M_Exam.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAsBA,AAAA,OAAO,CAAA;EACL,KAAK,EAAE,KAAK;EACZ,OAAO,EAAE,KAAK;EACd,QAAQ,EAAE,QAAQ;CAmTnB;;AAtTD,AAKE,OALK,CAKL,iBAAiB,CAAA;EACf,KAAK,EAAE,GAAG;EACV,MAAM,EA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AAG;EAClB,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,KAAK;EAEZ,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,eAAe,EAAE,MAAM;CACxB", + "sources": [ + "../../src/view/Exam/M_Exam.scss" + ], + "names": [], + "file": "M_Exam.css" +} \ No newline at end of file diff --git a/dist/css/Nav.css b/dist/css/Nav.css new file mode 100644 index 0000000..4b006ab --- /dev/null +++ b/dist/css/Nav.css @@ -0,0 +1,9 @@ +@font-face { + font-family: IRANSansX-Regular; + src: url(../../assets/font/IRANSansX/Webfonts/fonts/woff/IRANSansX-Regular.woff); +} + +.nav { + font-family: "IRANSansX-Regular"; +} +/*# sourceMappingURL=Nav.css.map */ \ No newline at end of file diff --git a/dist/css/Nav.css.map b/dist/css/Nav.css.map new file mode 100644 index 0000000..9ce0594 --- /dev/null +++ b/dist/css/Nav.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAAA,UAAU;EACR,WAAW,EAAE,iBAAiB;EAC9B,GAAG,EAAE,2EAA2E;;;AAKlF,AAAA,IAAI,CAAA;EACF,WAAW,EAHA,mBAAmB;CA8B/B", + "sources": [ + "../../src/components/nav/Nav.scss" + ], + "names": [], + "file": "Nav.css" +} \ No newline at end of file diff --git a/dist/css/Packages.css b/dist/css/Packages.css new file mode 100644 index 0000000..9ede55c --- /dev/null +++ b/dist/css/Packages.css @@ -0,0 +1,30 @@ +.Packages { + position: relative; +} + +.Packages::-webkit-scrollbar { + position: absolute; + right: 0; + top: 0; + z-index: 2; + width: 5px !important; +} + +.Packages::-webkit-scrollbar-button { + display: none; + -webkit-appearance: none; + appearance: none; +} + +.Packages::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #97bae6; +} + +.Packages::-webkit-scrollbar-track { + background-color: transparent !important; + display: none; + -webkit-appearance: none; + appearance: none; +} +/*# sourceMappingURL=Packages.css.map */ \ No newline at end of file diff --git a/dist/css/Packages.css.map b/dist/css/Packages.css.map new file mode 100644 index 0000000..bba6c96 --- /dev/null +++ b/dist/css/Packages.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAAA,AAAA,SAAS,CAAC;EACR,QAAQ,EAAE,QAAQ;CAyBnB;;AA1BD,AAGE,SAHO,AAGN,mBAAmB,CAAC;EACnB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,CAAC;EACR,GAAG,EAAE,CAAC;EACN,OAAO,EAAE,CAAC;EACV,KAAK,EAAE,cAAc;CACtB;;AATH,AAWE,SAXO,AAWN,0BAA0B,CAAC;EAC1B,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CACjB;;AAdH,AAgBE,SAhBO,AAgBN,yBAAyB,CAAC;EACzB,aAAa,EAAE,IAAI;EACnB,gBAAgB,EAAE,OAAO;CAC1B;;AAnBH,AAqBE,SArBO,AAqBN,yBAAyB,CAAC;EACzB,gBAAgB,EAAE,sBAAsB;EACxC,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CACjB", + "sources": [ + "../../src/view/dashboard2/Packages.scss" + ], + "names": [], + "file": "Packages.css" +} \ No newline at end of file diff --git a/dist/css/Register.css b/dist/css/Register.css new file mode 100644 index 0000000..10bb2f7 --- /dev/null +++ b/dist/css/Register.css @@ -0,0 +1,123 @@ +.Register { + /* Firefox */ +} + +.Register-box { + -webkit-box-shadow: 0px 0px 20px 4px rgba(0, 0, 0, 0.18); + box-shadow: 0px 0px 40px 4px rgba(0, 0, 0, 0.18); +} + +.Register-box-container-col2-relations-row3::-webkit-scrollbar { + position: absolute; + right: 0; + top: 0; + z-index: 2; + width: 5px !important; +} + +.Register-box-container-col2-relations-row3::-webkit-scrollbar-button { + display: none; + -webkit-appearance: none; + appearance: none; +} + +.Register-box-container-col2-relations-row3::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #97bae6; +} + +.Register-box-container-col2-relations-row3::-webkit-scrollbar-track { + background-color: transparent !important; + display: none; + -webkit-appearance: none; + appearance: none; +} + +.Register input::-webkit-outer-spin-button, +.Register input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.Register input[type="number"] { + -moz-appearance: textfield; +} + +.hasImage:hover section { + background-color: rgba(5, 5, 5, 0.4); +} + +.hasImage:hover button:hover { + background: rgba(5, 5, 5, 0.45); +} + +#overlay p, +i { + opacity: 0; +} + +#overlay.draggedover { + background-color: rgba(255, 255, 255, 0.7); +} + +#overlay.draggedover p, +#overlay.draggedover i { + opacity: 1; +} + +.group:hover .group-hover\:text-blue-800 { + color: #2b6cb0; +} + +.Register-box-container-col2-add-member-row2-relation-choices::-webkit-scrollbar { + position: absolute; + right: 0; + top: 0; + z-index: 2; + width: 5px !important; +} + +.Register-box-container-col2-add-member-row2-relation-choices::-webkit-scrollbar-button { + display: none; + -webkit-appearance: none; + appearance: none; +} + +.Register-box-container-col2-add-member-row2-relation-choices::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #97bae6; +} + +.Register-box-container-col2-add-member-row2-relation-choices::-webkit-scrollbar-track { + background-color: transparent !important; + display: none; + -webkit-appearance: none; + appearance: none; +} + +.Register-box-container-col2-add-member-row2::-webkit-scrollbar { + position: absolute; + right: 0; + top: 0; + z-index: 2; + width: 5px !important; +} + +.Register-box-container-col2-add-member-row2::-webkit-scrollbar-button { + display: none; + -webkit-appearance: none; + appearance: none; +} + +.Register-box-container-col2-add-member-row2::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #97bae6; +} + +.Register-box-container-col2-add-member-row2::-webkit-scrollbar-track { + background-color: transparent !important; + display: none; + -webkit-appearance: none; + appearance: none; +} +/*# sourceMappingURL=Register.css.map */ \ No newline at end of file diff --git a/dist/css/Register.css.map b/dist/css/Register.css.map new file mode 100644 index 0000000..feddb6a --- /dev/null +++ b/dist/css/Register.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAAA,AAAA,SAAS,CAAC;EAqCR,aA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"sources": [ + "../../src/view/dashboard/Register.scss" + ], + "names": [], + "file": "Register.css" +} \ No newline at end of file diff --git a/dist/css/UserFullInfo.css b/dist/css/UserFullInfo.css new file mode 100644 index 0000000..f7711de --- /dev/null +++ b/dist/css/UserFullInfo.css @@ -0,0 +1,26 @@ +.UserFullInfo-content::-webkit-scrollbar { + position: absolute; + right: 0; + top: 0; + z-index: 2; + width: 5px !important; +} + +.UserFullInfo-content::-webkit-scrollbar-button { + display: none; + -webkit-appearance: none; + appearance: none; +} + +.UserFullInfo-content::-webkit-scrollbar-thumb { + border-radius: 10px; + background-color: #97BAE6; +} + +.UserFullInfo-content::-webkit-scrollbar-track { + background-color: transparent !important; + display: none; + -webkit-appearance: none; + appearance: none; +} +/*# sourceMappingURL=UserFullInfo.css.map */ \ No newline at end of file diff --git a/dist/css/UserFullInfo.css.map b/dist/css/UserFullInfo.css.map new file mode 100644 index 0000000..2d90fe5 --- /dev/null +++ b/dist/css/UserFullInfo.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAIG,AACD,qBADS,AACR,mBAAmB,CAAC;EACjB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,CAAC;EACR,GAAG,EAAE,CAAC;EACN,OAAO,EAAE,CAAC;EACV,KAAK,EAAE,cAAc;CACtB;;AAPF,AASC,qBATO,AASN,0BAA0B,CAAC;EAC1B,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CACjB;;AAZF,AAcC,qBAdO,AAcN,yBAAyB,CAAC;EACzB,aAAa,EAAE,IAAI;EACnB,gBAAgB,EAAE,OAAO;CAC1B;;AAjBF,AAmBC,qBAnBO,AAmBN,yBAAyB,CAAC;EACzB,gBAAgB,EAAE,sBAAsB;EACxC,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CACjB", + "sources": [ + "../../src/view/dashboard2/UserFullInfo.scss" + ], + "names": [], + "file": "UserFullInfo.css" +} \ No newline at end of file diff --git a/dist/css/colors.css b/dist/css/colors.css new file mode 100644 index 0000000..2449a48 --- /dev/null +++ b/dist/css/colors.css @@ -0,0 +1 @@ +/* No CSS *//*# sourceMappingURL=colors.css.map */ \ No newline at end of file diff --git a/dist/css/colors.css.map b/dist/css/colors.css.map new file mode 100644 index 0000000..9ee17ed --- /dev/null +++ b/dist/css/colors.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "", + "sources": [ + "../../src/constants/colors.scss" + ], + "names": [], + "file": "colors.css" +} \ No newline at end of file diff --git a/dist/css/size.css b/dist/css/size.css new file mode 100644 index 0000000..dcceee6 --- /dev/null +++ b/dist/css/size.css @@ -0,0 +1 @@ +/* No CSS *//*# sourceMappingURL=size.css.map */ \ No newline at end of file diff --git a/dist/css/size.css.map b/dist/css/size.css.map new file mode 100644 index 0000000..27b7e92 --- /dev/null +++ b/dist/css/size.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "", + "sources": [ + "../../src/constants/size.scss" + ], + "names": [], + "file": "size.css" +} \ No newline at end of file diff --git a/src/components/Calendar2/Calendar2.js b/src/components/Calendar2/Calendar2.js index 5dc32cb..82d193f 100644 --- a/src/components/Calendar2/Calendar2.js +++ b/src/components/Calendar2/Calendar2.js @@ -1,17 +1,184 @@ +import moment from "jalali-moment"; +import { useEffect, useState } from "react"; +import Days from "./Days"; import Title from "./Title"; import Week from "./Week"; +let weekList = [ + "شنبه", + "یک‌شنبه", + "دوشنبه", + "سه‌شنبه", + "چهارشنبه", + "پنج‌شنبه", + "جمعه", +]; +//--- +let monthList = [ + "فروردین", + "اردیبهشت", + "خرداد", + "تیر", + "مرداد", + "شهریور", + "مهر", + "آبان", + "آذر", + "دی", + "بهمن", + "اسفند", +]; +//--- +let eventList = [ + { + id: 1, + title: "رویداد1", + date: "2022-05-12 10:12:19.693+04:30", + type: 1, + }, + { + id: 2, + title: "رویداد2", + date: "2022-05-16 10:12:19.693+04:30", + type: 1, + }, + { + id: 3, + title: "رویداد3", + date: "2022-05-16 18:12:19.693+04:30", + type: 2, + }, +]; +//-- +let rightDay =[0,1,7,8,14,15,21,22,28,29,35,36] +let eventBoxTop =84; +let eventBoxRight=8; +let eventBoxisRight=true; +//find current date-------------- +let now = moment(); +now.locale("fa"); +console.log("now:"); +console.log(now.format("YYYY/M/D")); +let currentYear = Number(now.format("YYYY/M/D").split("/")[0]); +console.log("Y:"); +console.log(currentYear); +console.log("M:"); +console.log(Number(now.format("MM"))); +let currentMonth = Number(now.format("MM")); +console.log("D:"); +console.log(Number(now.format("DD"))); +let currentDay = Number(now.format("DD")); +console.log(now.weekday()); +console.log("----------------------------------------1"); - +//========================================================================== const Calendar2 = ({ primaryColor }) => { + const [year, setYear] = useState(currentYear); + const [month, setMonth] = useState(currentMonth); + + //NextMonth-------------------------- + const NextMonth = () => { + if (month !== 12) { + setMonth(month + 1); + } else { + setMonth(1); + setYear(year + 1); + } + }; + + //NextMonth-------------------------- + const previousMonth = () => { + if (month !== 1) { + setMonth(month - 1); + } else { + setMonth(12); + setYear(year - 1); + } + }; + + //findFirstDayWeekDay---------------------------- + const findFirstDayWeekDay = (y, m) => { + console.log("findFirstDayWeekDay-----------------------"); + moment.locale("fa"); + let date = moment(`${y}/${m}/01`, "YYYY/M/D"); + if (m < 10) { + date = moment(`${y}/0${m}/01`, "YYYY/M/D"); + } + console.log("date:"); + console.log(date.format("YYYY/M/D")); + console.log("w_d:"); + console.log(date.weekday()); + return date.weekday(); + }; + + //day select ------------------------------------------- + const [activeDay, setActiveDay] = useState(null); + const [showEvent, setShowEvents] = useState(false); + const selectDay = (index) => { + if (activeDay !== index) { + //set eventBox position--------------- + if (rightDay.includes(index)) { + eventBoxisRight = true; + } else { + eventBoxisRight = false; + } + eventBoxTop = Math.floor(index / 7) * 15; + if (Math.floor(index / 7) > 0) { + eventBoxTop += Math.floor(index / 7) * 2; + } + if (eventBoxisRight){ + eventBoxRight = ((index%7)+1) * 13; + eventBoxRight += ((index % 7) + 1) * 1.5; + + }else{ + let Index = 6 - (index % 7); + eventBoxRight = (Index+1) * 13; + eventBoxRight += (Index + 1) * 1.5; + } + //---------------------------- + setActiveDay(index); + setShowEvents(true); + } else { + setActiveDay(null); + setShowEvents(false); + } + }; + //======================== + return ( -
+
{/* ----title---------------- */} - + <Title + primaryColor={primaryColor} + year={year} + month={month} + monthList={monthList} + NextMonth={NextMonth} + previousMonth={previousMonth} + selectDay={selectDay} + setShowEvents={setShowEvents} + /> {/* ----------week---------------- */} - <Week/> + <Week /> + {/* ----------days---------------- */} + <Days + findFirstDayWeekDay={findFirstDayWeekDay} + year={year} + month={month} + currentYear={currentYear} + currentMonth={currentMonth} + currentDay={currentDay} + primaryColor={primaryColor} + eventList={eventList} + activeDay={activeDay} + selectDay={selectDay} + eventBoxRight={eventBoxRight} + eventBoxTop={eventBoxTop} + eventBoxisRight={eventBoxisRight} + showEvent={showEvent} + /> </div> ); }; -export default Calendar2; \ No newline at end of file +export default Calendar2; diff --git a/src/components/Calendar2/Days.js b/src/components/Calendar2/Days.js new file mode 100644 index 0000000..489c98f --- /dev/null +++ b/src/components/Calendar2/Days.js @@ -0,0 +1,434 @@ +import moment from "jalali-moment"; +import React, { useEffect, useState } from "react"; + +let daysList = [ + { + id: 1, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 2, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 3, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 4, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 5, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 6, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 7, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 8, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 9, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 10, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 11, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 12, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 13, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 14, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 15, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 16, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 17, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 18, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 19, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 20, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 21, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 22, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 23, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 24, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 25, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 26, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 27, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 28, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 29, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 30, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 31, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 32, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 33, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 34, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 35, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 36, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 37, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 38, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 39, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 40, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 41, + dayNumber: "", + isToday: false, + events: [], + }, + { + id: 42, + dayNumber: "", + isToday: false, + events: [], + }, +]; +//--------------- +let dotsColor = ["#249D8C", "#F4C84B"]; +//======================================================= +const Days = ({ + findFirstDayWeekDay, + year, + month, + currentYear, + currentMonth, + currentDay, + primaryColor, + eventList, + activeDay, + selectDay, + eventBoxisRight, + eventBoxTop, + eventBoxRight, + showEvent, +}) => { + const [Daylist, setDayList] = useState(daysList); + const [fake, setFake] = useState(0); + //create month days---------------------------- + useEffect(() => { + let list = daysList; + let w1 = findFirstDayWeekDay(year, month); + let m = 31; + if (month > 6) { + m = 30; + } + if (month === 12) { + m = 29; + } + let dayCounter = 0; + for (let i = 0; i < list.length; i++) { + if (i >= w1 && dayCounter < m) { + dayCounter++; + list[i].dayNumber = dayCounter; + //tody check--------------- + if ( + year === currentYear && + month === currentMonth && + dayCounter === currentDay + ) { + list[i].isToday = true; + } else { + list[i].isToday = false; + } + //events check------------ + list[i].events = []; + for (let p = 0; p < eventList.length; p++) { + moment.locale("en"); + let a = moment(eventList[p].date); + a.locale("fa"); + let eventDay = Number(a.format("DD")); + let eventMonth = Number(a.format("MM")); + let eventYear = Number(a.format("YYYY/M/D").split("/")[0]); + if ( + year === eventYear && + month === eventMonth && + dayCounter === eventDay + ) { + list[i].events.push(eventList[p]); + } + } + } else { + list[i].dayNumber = ""; + list[i].isToday = false; + } + } + console.log(daysList); + setDayList(list); + setFake(fake + 1); + }, [month]); + + //============== + const [eventData, setEventData] = useState([]); + const selectDayHandler=(index)=>{ + setEventData(Daylist[index].events); + selectDay(index); + } + return ( + <div + className="Days w-full flex flex-row-reverse items-start justify-between flex-wrap gap-y-[2%] relative" + style={{ height: "calc(100% - 80px)" }} + > + {Daylist.map((item, index) => ( + <div + key={index} + className="w-[13%] h-[15%] rounded-lg cursor-pointer flex flex-col items-center justify-center text-sm relative" + style={ + activeDay === index + ? { + backgroundColor: primaryColor, + color: "#fff", + } + : item.isToday + ? { + border: `1px solid ${primaryColor}`, + color: `${primaryColor}`, + } + : index % 7 === 6 + ? { color: "#C94E2A" } + : null + } + onClick={() => selectDayHandler(index)} + > + <div>{item.dayNumber}</div> + <div className="w-[90%] flex items-center justify-center gap-x-1 absolute bottom-1"> + {item?.events?.map((event, Index) => ( + <React.Fragment key={Index}> + {Index < 2 && ( + <div + key={Index} + className="w-1 h-1 rounded-full bg-black" + style={ + event?.type + ? { backgroundColor: dotsColor[event.type - 1] } + : { backgroundColor: dotsColor[Index] } + } + ></div> + )} + </React.Fragment> + ))} + </div> + </div> + ))} + {/* ----------events-box---------------- */} + {showEvent && ( + <div + className="w-2/3 rounded bg-[#343234] absolute top-4 p-2" + style={ + eventBoxisRight + ? { + top: `${eventBoxTop}%`, + right: `calc(${eventBoxRight}% - 1px)`, + } + : { + top: `${eventBoxTop}%`, + left: `calc(${eventBoxRight}% - 1px)`, + } + } + > + <div className="w-full flex items-center justify-between"> + {/* <div className="w-1/3 h-[2px] bg-white rounded-lg"></div> */} + <div className="w-full text-right text text-white">:رویدادها</div> + {/* <div className="w-1/3 h-[2px] bg-white rounded-lg"></div> */} + </div> + <div className="w-full mt-1"> + {eventData?.map((item, index) => ( + <div + key={index} + className="w-full flex flex-row-reverse items-center mb-2" + > + <div + className="w-2 h-2 rounded-full bg-white ml-2" + style={ + item?.type + ? { backgroundColor: dotsColor[item.type] } + : { backgroundColor: dotsColor[index%2] } + } + ></div> + <div className="text-sm text-right text-[#999]"> + {item?.title} + </div> + </div> + ))} + </div> + </div> + )} + </div> + ); +}; + +export default Days; + + +// bg-[rgba(0,0,0,0.2)] \ No newline at end of file diff --git a/src/components/Calendar2/Title.js b/src/components/Calendar2/Title.js index 772d126..feb0e62 100644 --- a/src/components/Calendar2/Title.js +++ b/src/components/Calendar2/Title.js @@ -1,9 +1,31 @@ import { IoIosArrowBack, IoIosArrowForward } from "react-icons/io"; -const Title = ({ primaryColor }) => { +const Title = ({ + primaryColor, + year, + month, + monthList, + NextMonth, + previousMonth, + selectDay, + setShowEvents, +}) => { + const backClick = () => { + previousMonth(); + selectDay(null); + setShowEvents(false); + }; + const nextClick = () => { + NextMonth(); + selectDay(null); + setShowEvents(false); + }; return ( <div className="Title w-full h-12 flex flex-row-reverse items-center justify-between"> - <IoIosArrowForward className="text-lg text-[#504F4F] cursor-pointer" /> + <IoIosArrowForward + className="text-lg text-[#504F4F] cursor-pointer" + onClick={backClick} + /> <div className="text-lg text-right" style={{ @@ -11,9 +33,12 @@ const Title = ({ primaryColor }) => { fontFamily: "IRANSansXFaNum-Medium", }} > - اریبهشت، 1401 + {monthList[month - 1]}، {year} </div> - <IoIosArrowBack className="text-lg text-[#504F4F] cursor-pointer" /> + <IoIosArrowBack + className="text-lg text-[#504F4F] cursor-pointer" + onClick={nextClick} + /> </div> ); }; diff --git a/src/components/Calendar2/Week.js b/src/components/Calendar2/Week.js index ae29819..3429767 100644 --- a/src/components/Calendar2/Week.js +++ b/src/components/Calendar2/Week.js @@ -4,8 +4,14 @@ let weekList = ["شنبه","یک‌شنبه","دوشنبه","سه‌شنبه"," const Week=()=>{ return ( <div className="Week w-full h-8 flex items-center justify-between flex-row-reverse"> - {weekList.map((item,index)=>( - <div key={index} className="w-[13%] text-center text-xs">{item}</div> + {weekList.map((item, index) => ( + <div + key={index} + className="w-[13%] text-center text-xs" + style={index === 6 ? { color: "#C94E2A" } : null} + > + {item} + </div> ))} </div> );