diff --git a/package.json b/package.json index 3ebef177..37832e67 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,16 @@ "@Stores": "./dist/front/Stores/*", "@FrontServices": "./dist/front/services/*", "@Pages": "./dist/pages", + "@Components": "./dist/front/components", + "@Common": "./dist/common", "@Services": "./dist/common/services", "@Entries": "./dist/common/entries", "@Common": "./dist/common", "@Config": "./dist/common/config", "@Entities": "./dist/common/entities", "@System": "./dist/common/system", - "@ControllerPattern": "./dist/common/system/controller-pattern" + "@ControllerPattern": "./dist/common/system/controller-pattern", + "@Front": "./dist/front/*" }, "scripts": { "build": "next build && tsc", diff --git a/src/front/assets/icons/arrow-black.svg b/src/front/assets/icons/arrow-black.svg deleted file mode 100644 index 7aaac553..00000000 --- a/src/front/assets/icons/arrow-black.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/front/assets/icons/arrow-white.svg b/src/front/assets/icons/arrow-white.svg deleted file mode 100644 index 5f07944e..00000000 --- a/src/front/assets/icons/arrow-white.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/front/assets/icons/books.svg b/src/front/assets/icons/books.svg deleted file mode 100644 index 257be65d..00000000 --- a/src/front/assets/icons/books.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/icons/cards.svg b/src/front/assets/icons/cards.svg deleted file mode 100644 index b548dc82..00000000 --- a/src/front/assets/icons/cards.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/copy.svg b/src/front/assets/icons/copy.svg deleted file mode 100644 index 9b5ff0b9..00000000 --- a/src/front/assets/icons/copy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/front/assets/icons/cross.svg b/src/front/assets/icons/cross.svg new file mode 100644 index 00000000..8c89398c --- /dev/null +++ b/src/front/assets/icons/cross.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/front/assets/icons/documentation.svg b/src/front/assets/icons/documentation.svg deleted file mode 100644 index abb796a4..00000000 --- a/src/front/assets/icons/documentation.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/input-error.svg b/src/front/assets/icons/input-error.svg deleted file mode 100644 index 920a48bc..00000000 --- a/src/front/assets/icons/input-error.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/input-success.svg b/src/front/assets/icons/input-success.svg deleted file mode 100644 index 71e405bd..00000000 --- a/src/front/assets/icons/input-success.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/island.svg b/src/front/assets/icons/island.svg deleted file mode 100644 index b6f06832..00000000 --- a/src/front/assets/icons/island.svg +++ /dev/null @@ -1 +0,0 @@ -beach-nature-landscape-sun-island \ No newline at end of file diff --git a/src/front/assets/icons/login.svg b/src/front/assets/icons/login.svg deleted file mode 100644 index 579853e7..00000000 --- a/src/front/assets/icons/login.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/notification.svg b/src/front/assets/icons/notification.svg new file mode 100644 index 00000000..ab1761dd --- /dev/null +++ b/src/front/assets/icons/notification.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/front/assets/icons/password.svg b/src/front/assets/icons/password.svg deleted file mode 100644 index 9045f0b9..00000000 --- a/src/front/assets/icons/password.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/plus-card.svg b/src/front/assets/icons/plus-card.svg deleted file mode 100644 index f19afd9a..00000000 --- a/src/front/assets/icons/plus-card.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/sign-up.svg b/src/front/assets/icons/sign-up.svg deleted file mode 100644 index a18bc36e..00000000 --- a/src/front/assets/icons/sign-up.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/front/assets/icons/support.svg b/src/front/assets/icons/support.svg deleted file mode 100644 index 9ed454cf..00000000 --- a/src/front/assets/icons/support.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/front/assets/icons/unplugged.svg b/src/front/assets/icons/unplugged.svg deleted file mode 100644 index 95daeb82..00000000 --- a/src/front/assets/icons/unplugged.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/front/assets/icons/user.svg b/src/front/assets/icons/user.svg index 76dbea45..61ee9be9 100644 --- a/src/front/assets/icons/user.svg +++ b/src/front/assets/icons/user.svg @@ -1,17 +1,4 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + diff --git a/src/front/assets/images/accenture.svg b/src/front/assets/images/accenture.svg deleted file mode 100644 index b1f333fb..00000000 --- a/src/front/assets/images/accenture.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/front/assets/images/architecture.png b/src/front/assets/images/architecture.png deleted file mode 100644 index b7a13a5e..00000000 Binary files a/src/front/assets/images/architecture.png and /dev/null differ diff --git a/src/front/assets/images/arg1.svg b/src/front/assets/images/arg1.svg deleted file mode 100644 index 2d705e26..00000000 --- a/src/front/assets/images/arg1.svg +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/arg2.svg b/src/front/assets/images/arg2.svg deleted file mode 100644 index 43fa4cca..00000000 --- a/src/front/assets/images/arg2.svg +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/arg3.svg b/src/front/assets/images/arg3.svg deleted file mode 100644 index 1fc85344..00000000 --- a/src/front/assets/images/arg3.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/logo.svg b/src/front/assets/images/logo.svg deleted file mode 100644 index 1cdd699f..00000000 --- a/src/front/assets/images/logo.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/metrics.png b/src/front/assets/images/metrics.png deleted file mode 100644 index 29891bd8..00000000 Binary files a/src/front/assets/images/metrics.png and /dev/null differ diff --git a/src/front/assets/images/mini-torus.png b/src/front/assets/images/mini-torus.png deleted file mode 100644 index fed551ac..00000000 Binary files a/src/front/assets/images/mini-torus.png and /dev/null differ diff --git a/src/front/assets/images/nomadic.svg b/src/front/assets/images/nomadic.svg deleted file mode 100644 index fda21fd7..00000000 --- a/src/front/assets/images/nomadic.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/particle.svg b/src/front/assets/images/particle.svg deleted file mode 100644 index 04022616..00000000 --- a/src/front/assets/images/particle.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/front/assets/images/torus-bg.svg b/src/front/assets/images/torus-bg.svg deleted file mode 100644 index 0956eddc..00000000 --- a/src/front/assets/images/torus-bg.svg +++ /dev/null @@ -1,451 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/torus-cables.svg b/src/front/assets/images/torus-cables.svg deleted file mode 100644 index bf58142e..00000000 --- a/src/front/assets/images/torus-cables.svg +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/torus-fg.svg b/src/front/assets/images/torus-fg.svg deleted file mode 100644 index eec67eb6..00000000 --- a/src/front/assets/images/torus-fg.svg +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/torus-logo.svg b/src/front/assets/images/torus-logo.svg deleted file mode 100644 index 1f2a0831..00000000 --- a/src/front/assets/images/torus-logo.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/torus.svg b/src/front/assets/images/torus.svg deleted file mode 100644 index a6e062d0..00000000 --- a/src/front/assets/images/torus.svg +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/front/assets/images/tq.svg b/src/front/assets/images/tq.svg deleted file mode 100644 index 0ec39d04..00000000 --- a/src/front/assets/images/tq.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/front/assets/link_logo.svg b/src/front/assets/link_logo.svg deleted file mode 100644 index 4d2dc991..00000000 --- a/src/front/assets/link_logo.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/front/assets/logo.png b/src/front/assets/logo.png new file mode 100644 index 00000000..7a125469 Binary files /dev/null and b/src/front/assets/logo.png differ diff --git a/src/front/assets/logo.svg b/src/front/assets/logo.svg deleted file mode 100644 index 95f7c75e..00000000 --- a/src/front/assets/logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/front/components/DesignSystem/Header/HeaderLink/classes.module.scss b/src/front/components/DesignSystem/Header/HeaderLink/classes.module.scss new file mode 100644 index 00000000..5bbc5d29 --- /dev/null +++ b/src/front/components/DesignSystem/Header/HeaderLink/classes.module.scss @@ -0,0 +1,22 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + position: relative; + width: fit-content; + margin: auto; + height: 83px; + padding: 10px 16px; + + .content{ + margin: auto; + } + .underline{ + width: 100%; + height: 3px; + background-color: $black; + position: absolute; + bottom: 0; + left: 0; + } +} \ No newline at end of file diff --git a/src/front/components/DesignSystem/Header/HeaderLink/index.tsx b/src/front/components/DesignSystem/Header/HeaderLink/index.tsx new file mode 100644 index 00000000..9c1259f5 --- /dev/null +++ b/src/front/components/DesignSystem/Header/HeaderLink/index.tsx @@ -0,0 +1,37 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import Link from "next/link"; +import Typography, { ITypo } from "../../Typography"; +import classNames from "classnames"; +import router from "next/router"; +import { useEffect, useState } from 'react' + +type IPropsClass = { + text: string | JSX.Element; + path?: string; + isActive?: boolean; +}; + +type IStateClass = {}; + +class HeaderLinkClass extends React.Component { + public override render(): JSX.Element { + return +
+ + {this.props.text} + +
+ {this.props.isActive &&
} + ; + } + +} + +export default function HeaderLink(props: IPropsClass) { + const [url, setUrl] = useState("") + useEffect(() => setUrl(router?.asPath), []) + const isActive = url === props.path; + return ; +} diff --git a/src/front/components/DesignSystem/Header/Navigation/classes.module.scss b/src/front/components/DesignSystem/Header/Navigation/classes.module.scss new file mode 100644 index 00000000..ba0e4863 --- /dev/null +++ b/src/front/components/DesignSystem/Header/Navigation/classes.module.scss @@ -0,0 +1,8 @@ +@import "@Themes/constants.scss"; + +.root { + display: inline-flex; + @media screen and (max-width: $screen-ls) { + display: none; + } +} diff --git a/src/front/components/DesignSystem/Header/Navigation/index.tsx b/src/front/components/DesignSystem/Header/Navigation/index.tsx new file mode 100644 index 00000000..b5d8402d --- /dev/null +++ b/src/front/components/DesignSystem/Header/Navigation/index.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import HeaderLink from "../HeaderLink"; + +type IProps = {}; +type IState = {}; + +export default class Navigation extends React.Component { + public override render(): JSX.Element { + return
+ + + + + +
; + } +} diff --git a/src/front/components/DesignSystem/Header/Notifications/classes.module.scss b/src/front/components/DesignSystem/Header/Notifications/classes.module.scss new file mode 100644 index 00000000..9501ac5b --- /dev/null +++ b/src/front/components/DesignSystem/Header/Notifications/classes.module.scss @@ -0,0 +1,8 @@ +@import "@Themes/constants.scss"; + +.root { + .notification-icon{ + height: 24px; + width: 24px; + } +} diff --git a/src/front/components/DesignSystem/Header/Notifications/index.tsx b/src/front/components/DesignSystem/Header/Notifications/index.tsx new file mode 100644 index 00000000..3bf7144d --- /dev/null +++ b/src/front/components/DesignSystem/Header/Notifications/index.tsx @@ -0,0 +1,20 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import Image from "next/image"; +import NotificationIcon from "@Assets/icons/notification.svg"; + +type IProps = {}; +type IState = { + hasNotifications: boolean; +}; + +export default class Notifications extends React.Component { + public override render(): JSX.Element { + return
+
+ notifications +
+ +
; + } +} diff --git a/src/front/components/DesignSystem/Header/Profile/classes.module.scss b/src/front/components/DesignSystem/Header/Profile/classes.module.scss new file mode 100644 index 00000000..43b03265 --- /dev/null +++ b/src/front/components/DesignSystem/Header/Profile/classes.module.scss @@ -0,0 +1,8 @@ +@import "@Themes/constants.scss"; + +.root { + .profile-icon{ + height: 24px; + width: 24px; + } +} diff --git a/src/front/components/DesignSystem/Header/Profile/index.tsx b/src/front/components/DesignSystem/Header/Profile/index.tsx new file mode 100644 index 00000000..8605842b --- /dev/null +++ b/src/front/components/DesignSystem/Header/Profile/index.tsx @@ -0,0 +1,15 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import Image from "next/image"; +import ProfileIcon from "@Assets/icons/user.svg"; + +type IProps = {}; +type IState = {}; + +export default class Profile extends React.Component { + public override render(): JSX.Element { + return
+ notifications +
; + } +} diff --git a/src/front/components/DesignSystem/Header/classes.module.scss b/src/front/components/DesignSystem/Header/classes.module.scss new file mode 100644 index 00000000..5757c25c --- /dev/null +++ b/src/front/components/DesignSystem/Header/classes.module.scss @@ -0,0 +1,25 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + align-items: center; + justify-content: space-between; + height: 83px; + background-color: $white; + box-shadow: $shadow-neutral; + padding: 0 48px; + + .logo-container { + .logo { + width: 174px; + height: 39px; + } + } + + .right-section { + display: inline-flex; + >:first-child{ + margin-right: 32px; + } + } +} \ No newline at end of file diff --git a/src/front/components/DesignSystem/Header/index.tsx b/src/front/components/DesignSystem/Header/index.tsx new file mode 100644 index 00000000..b4ca00a9 --- /dev/null +++ b/src/front/components/DesignSystem/Header/index.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import Image from "next/image"; +import LogoIcon from "@Assets/logo.png" +import Link from "next/link"; +import Navigation from "./Navigation"; +import Notifications from "./Notifications"; +import Profile from "./Profile"; + +type IProps = {}; +type IState = {}; + +export default class Header extends React.Component { + public override render(): JSX.Element { + return
+
+ + logo + +
+ +
+ + +
+
; + } +} diff --git a/src/front/components/DesignSystem/Loader/classes.module.scss b/src/front/components/DesignSystem/Loader/classes.module.scss new file mode 100644 index 00000000..a7f47cba --- /dev/null +++ b/src/front/components/DesignSystem/Loader/classes.module.scss @@ -0,0 +1,16 @@ +@import "Themes/constants.scss"; + +.loader { + animation: spin 2s linear infinite; + width: 100%; + height: 100%; + + @keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } + } +} diff --git a/src/front/components/DesignSystem/Loader/index.tsx b/src/front/components/DesignSystem/Loader/index.tsx new file mode 100644 index 00000000..8e4dbaf3 --- /dev/null +++ b/src/front/components/DesignSystem/Loader/index.tsx @@ -0,0 +1,14 @@ +import React from "react"; +import LoaderIcon from "assets/images/icons/loader.svg"; +import classes from "./classes.module.scss"; + +interface IProps { + className?: string; +} + +export default class Loader extends React.Component { + public override render(): JSX.Element { + return + // ; + } +} diff --git a/src/front/components/DesignSystem/Modal/Alert/classes.module.scss b/src/front/components/DesignSystem/Modal/Alert/classes.module.scss new file mode 100644 index 00000000..c9a8155b --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Alert/classes.module.scss @@ -0,0 +1,10 @@ +@import "Themes/constants.scss"; + +.sub-container{ + padding: 40px; +} + +.button-container{ + display: flex; + justify-content:flex-start; +} diff --git a/src/front/components/DesignSystem/Modal/Alert/index.tsx b/src/front/components/DesignSystem/Modal/Alert/index.tsx new file mode 100644 index 00000000..3b7c6a74 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Alert/index.tsx @@ -0,0 +1,46 @@ +import Modal, { IModalProps } from ".."; +import Button, { EButtonVariant } from "../../Button"; +import classes from "./classes.module.scss"; + +type IProps = IModalProps & { + closeText: string | JSX.Element; +}; +export default class Alert extends Modal { + static defaultProps = { + closeText: "Ok", + }; + + constructor(props: IProps) { + super(props); + + this.onClose = this.onClose.bind(this); + } + + public override render(): JSX.Element | null { + return ( + + {this.props.children} + + ); + } + + private footer(): JSX.Element { + return ( +
+ +
+ ); + } + + private onClose() { + this.close(); + this.props.onClose?.(); + } +} diff --git a/src/front/components/DesignSystem/Modal/Confirm/classes.module.scss b/src/front/components/DesignSystem/Modal/Confirm/classes.module.scss new file mode 100644 index 00000000..ce9eba25 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Confirm/classes.module.scss @@ -0,0 +1,17 @@ +@import "@Themes/constants.scss"; + +.buttons-container { + display: flex; + justify-content: space-between; + gap: 16px; + margin-top: 8px; + + button { + flex: 1; + } + + @media (max-width: $screen-s) { + flex-direction: column-reverse; + gap: 8px; + } +} diff --git a/src/front/components/DesignSystem/Modal/Confirm/index.tsx b/src/front/components/DesignSystem/Modal/Confirm/index.tsx new file mode 100644 index 00000000..3e266c80 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Confirm/index.tsx @@ -0,0 +1,66 @@ +import Button, { EButtonVariant } from "../../Button"; +import Modal, { IModalProps } from ".."; +import classes from "./classes.module.scss"; + +type IProps = IModalProps & { + onAccept?: () => void; + onCancel?: () => void; + cancelText: string | JSX.Element; + confirmText: string | JSX.Element; + showCancelButton: boolean; + isConfirmButtonDisabled: boolean; +}; + +type IState = { + isOpen: boolean; +}; +export default class Confirm extends Modal { + static defaultProps: Partial = { + showCancelButton: true, + cancelText: "Cancel", + confirmText: "Confirm", + isConfirmButtonDisabled: false, + }; + + constructor(props: IProps) { + super(props); + this.onCancel = this.onCancel.bind(this); + } + + public override render(): JSX.Element | null { + return ( + + {this.props.children} + + ); + } + + private footer(): JSX.Element { + return ( +
+ {this.props.showCancelButton && ( + + )} + + +
+ ); + } + + private onCancel() { + this.close(); + this.props.onCancel?.(); + } +} diff --git a/src/front/components/DesignSystem/Modal/Elements/Footer/classes.module.scss b/src/front/components/DesignSystem/Modal/Elements/Footer/classes.module.scss new file mode 100644 index 00000000..1009a115 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Elements/Footer/classes.module.scss @@ -0,0 +1,5 @@ +@import "@Themes/constants.scss"; + +.root { + margin-top: 24px; +} diff --git a/src/front/components/DesignSystem/Modal/Elements/Footer/index.tsx b/src/front/components/DesignSystem/Modal/Elements/Footer/index.tsx new file mode 100644 index 00000000..1b166f40 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Elements/Footer/index.tsx @@ -0,0 +1,12 @@ +import React from "react"; +import classes from "./classes.module.scss"; + +type IProps = { + content: JSX.Element; +}; + +export default class Footer extends React.Component { + public override render(): JSX.Element { + return
{this.props.content}
; + } +} diff --git a/src/front/components/DesignSystem/Modal/Elements/Header/classes.module.scss b/src/front/components/DesignSystem/Modal/Elements/Header/classes.module.scss new file mode 100644 index 00000000..39e121ff --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Elements/Header/classes.module.scss @@ -0,0 +1,13 @@ +@import "@Themes/constants.scss"; + +.root { + margin-bottom: 24px; + display: flex; + align-items: center; + justify-content: flex-start; + + h5 { + color: var(--color-neutral-900); + } +} + diff --git a/src/front/components/DesignSystem/Modal/Elements/Header/index.tsx b/src/front/components/DesignSystem/Modal/Elements/Header/index.tsx new file mode 100644 index 00000000..addbaecf --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Elements/Header/index.tsx @@ -0,0 +1,19 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; + +type IProps = { + content: string | JSX.Element; +}; + +export default class Header extends React.Component { + public override render(): JSX.Element { + return ( +
+ + {this.props.content} + +
+ ); + } +} diff --git a/src/front/components/DesignSystem/Modal/Elements/Loader/classes.module.scss b/src/front/components/DesignSystem/Modal/Elements/Loader/classes.module.scss new file mode 100644 index 00000000..687007f0 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Elements/Loader/classes.module.scss @@ -0,0 +1,13 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + text-align: center; + + margin: 0; + padding: 40px; + margin-top: 24px; +} diff --git a/src/front/components/DesignSystem/Modal/Elements/Loader/index.tsx b/src/front/components/DesignSystem/Modal/Elements/Loader/index.tsx new file mode 100644 index 00000000..0c29ec04 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/Elements/Loader/index.tsx @@ -0,0 +1,22 @@ +// import Loader from "Components/Elements/Loader"; +import React from "react"; +import classes from "./classes.module.scss"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; + +type IProps = { + text?: string | JSX.Element; +}; + +export default class PopUpLoader extends React.Component { + public override render(): JSX.Element { + return ( +
+ {/* */} + TODO: INTEGRER LOARDER ISLOADING + + {this.props.text && this.props.text} + +
+ ); + } +} diff --git a/src/front/components/DesignSystem/Modal/classes.module.scss b/src/front/components/DesignSystem/Modal/classes.module.scss new file mode 100644 index 00000000..8bc21419 --- /dev/null +++ b/src/front/components/DesignSystem/Modal/classes.module.scss @@ -0,0 +1,98 @@ +@import "@Themes/constants.scss"; + +.root { + position: fixed; + z-index: 6; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + display: flex; + align-items: center; + justify-content: center; + + .background { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: $modal-background; + } + + .container { + position: relative; + width: 594px; + max-height: 90%; + background: $white; + box-shadow: 0px 6px 12px rgba(255, 255, 255, 0.11); + overflow: auto; + padding: 32px; + + @media (max-width: $screen-s) { + width: 90%; + max-width: 493px; + } + + .cross { + display: flex; + flex-direction: row-reverse; + + .close-icon { + height: 24px; + width: 24px; + cursor: pointer; + } + } + } + + .transparant-background { + background-color: transparent; + box-shadow: none; + } + + &[data-side-background="true"] { + .container { + max-width: 711px; + + .sub-container { + padding: 0; + display: flex; + + p { + max-width: 711px; + } + + @media (max-width: $screen-s) { + display: block; + } + + .banner { + @media (max-width: $screen-s) { + overflow: hidden; + } + } + } + } + + .side-image { + height: 100%; + + @media (max-width: $screen-s) { + display: none; + } + } + + .top-image { + @media (min-width: $screen-s) { + display: none; + } + + @media (max-width: $screen-s) { + width: 100%; + max-height: 82px; + min-height: 82px; + } + } + } +} \ No newline at end of file diff --git a/src/front/components/DesignSystem/Modal/index.tsx b/src/front/components/DesignSystem/Modal/index.tsx new file mode 100644 index 00000000..bfdaec0d --- /dev/null +++ b/src/front/components/DesignSystem/Modal/index.tsx @@ -0,0 +1,81 @@ +import React from "react"; +import classes from "./classes.module.scss"; +import Footer from "./Elements/Footer"; +import Header from "./Elements/Header"; + +import Loader from "./Elements/Loader"; +import Typography, { ITypo } from "../Typography"; +import CrossIcon from "@Assets/icons/cross.svg" +import Image from "next/image"; + +export type IModalProps = { + closeBtn?: boolean; + header?: string | JSX.Element; + footer?: JSX.Element; + textLoader?: string | JSX.Element; + isOpen: boolean; + onClose?: () => void; + hasTransparentBackground?: boolean; + hasContainerClosable?: boolean; + withSideBackground?: boolean; + children?: React.ReactNode; +}; + +type IState = { + isOpen: boolean; +}; + +export default class Modal

extends React.Component { + constructor(props: P) { + super(props); + this.close = this.close.bind(this); + + (this.state as any) = { + isOpen: props.isOpen ?? true, + }; + } + + public override render(): JSX.Element | null { + if (!this.state.isOpen) return null; + + return ( +

+
+
+ {this.props.closeBtn && ( +
+ Unplugged +
+ )} +
+ {this.props.header &&
} + + + <> + {this.props.children ? this.props.children : } + + + {this.props.children && this.props.footer &&
} +
+
+
+ ); + } + + public override componentDidUpdate(prevProps: Readonly

): void { + if (prevProps.isOpen !== this.props.isOpen) { + this.setState({ + isOpen: this.props.isOpen, + }); + } + } + + protected close() { + this.setState({ + isOpen: false, + }); + this.props.onClose?.(); + } +} diff --git a/src/front/components/DesignSystem/Typography/classes.module.scss b/src/front/components/DesignSystem/Typography/classes.module.scss index 92927e8b..380f2115 100644 --- a/src/front/components/DesignSystem/Typography/classes.module.scss +++ b/src/front/components/DesignSystem/Typography/classes.module.scss @@ -1,31 +1,37 @@ @import "@Themes/constants.scss"; @import "@Themes/modes.scss"; + .root { color: $black; + font-family: 'Inter', sans-serif; &.H1-60 { font-style: normal; font-weight: 500; font-size: 50px; line-height: 61px; } + &.H1-bis-40 { font-style: normal; font-weight: 500; font-size: 40px; line-height: 48px; } + &.H2-30 { font-style: normal; font-weight: 500; font-size: 30px; line-height: 36px; } + &.H3-24 { font-style: normal; font-weight: 600; font-size: 24px; line-height: 29px; } + &.Paragraphe-semibold-18 { font-style: normal; font-weight: 600; @@ -33,12 +39,14 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Paragraphe-simple-18 { font-style: normal; font-weight: 400; font-size: 18px; line-height: 22px; } + &.Paragraphe-MAJ-18 { font-style: normal; font-weight: 400; @@ -46,6 +54,7 @@ line-height: 22px; text-transform: uppercase; } + &.Nav-header-off-18 { font-style: normal; font-weight: 400; @@ -53,6 +62,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Paragraphe-18-error { font-style: normal; font-weight: 400; @@ -60,6 +70,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Paragraphe-semibold-16 { font-style: normal; font-weight: 600; @@ -67,6 +78,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Nav-input-off-16 { font-style: normal; font-weight: 400; @@ -75,6 +87,15 @@ letter-spacing: 0.5px; color: $grey; } + + &.Paragraphe-simple-16 { + font-style: normal; + font-weight: 400; + font-size: 16px; + line-height: 22px; + letter-spacing: 0.005em + } + &.Paragraphe-16-error { color: $re-hover; font-style: normal; @@ -83,6 +104,7 @@ line-height: 22px; letter-spacing: 0.5px; } + &.Caption_14 { font-style: normal; font-weight: 400; @@ -98,4 +120,4 @@ &.grey { color: $grey; } -} +} \ No newline at end of file diff --git a/src/front/components/Elements/Modal/classes.module.scss b/src/front/components/Elements/Modal/classes.module.scss deleted file mode 100644 index c063b777..00000000 --- a/src/front/components/Elements/Modal/classes.module.scss +++ /dev/null @@ -1,33 +0,0 @@ -@import "@Themes/constants.scss"; -@import "@Themes/animation.scss"; - - -.overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: black; - opacity: 0.5; - -} - -.root { - border-radius: 6px; - background: $backgroundColor2; - box-shadow: 0 1px 10px $shadowColor; - position: absolute; - left: 0; - right: 0; - top: 150px; - margin: auto; - width: 600px; - max-width: 90vw; - padding: 20px; - - .title { - text-align: center; - - } -} \ No newline at end of file diff --git a/src/front/components/Elements/Modal/index.tsx b/src/front/components/Elements/Modal/index.tsx deleted file mode 100644 index d78a85f4..00000000 --- a/src/front/components/Elements/Modal/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import classes from "./classes.module.scss" - -type IProps = { - title: string, - children: JSX.Element, -} - -export default function Modal(props: IProps) { - return (<> -

-
-

{props.title}

- {props.children} -
- - ) -} \ No newline at end of file diff --git a/src/front/components/LayoutTemplates/DefaultLayout.tsx b/src/front/components/LayoutTemplates/DefaultLayout.tsx index 92eb71b3..c862295b 100644 --- a/src/front/components/LayoutTemplates/DefaultLayout.tsx +++ b/src/front/components/LayoutTemplates/DefaultLayout.tsx @@ -7,7 +7,7 @@ export const DefaultLayout = ({ children }: DefaultLayoutProps) => { return ( <> - Tezos Link + LECoffre
{children}
diff --git a/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx b/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx index 3d3bf3c8..053a548b 100644 --- a/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx +++ b/src/front/components/LayoutTemplates/DefaultTemplate/index.tsx @@ -1,8 +1,6 @@ import React, { ReactNode } from "react"; - -// import Header from "@Components/Materials/Header"; - import classes from "./classes.module.scss"; +import Header from "@Front/Components/DesignSystem/Header"; import ToastHandler from "@Front/Components/DesignSystem/Toasts/ToastsHandler"; type IProps = { @@ -23,7 +21,7 @@ export default class DefaultTemplate extends React.Component { public override render(): JSX.Element { return ( <> - {/*
*/} +
{this.props.children}
diff --git a/src/front/components/Layouts/DesignSystem/classes.module.scss b/src/front/components/Layouts/DesignSystem/classes.module.scss index 820b368a..f4ab9c5e 100644 --- a/src/front/components/Layouts/DesignSystem/classes.module.scss +++ b/src/front/components/Layouts/DesignSystem/classes.module.scss @@ -5,4 +5,8 @@ .sub-section { margin-bottom: 24px; } + + .inline-flex{ + display: inline-flex; + } } diff --git a/src/front/components/Layouts/DesignSystem/index.tsx b/src/front/components/Layouts/DesignSystem/index.tsx index 625dee48..bb39a324 100644 --- a/src/front/components/Layouts/DesignSystem/index.tsx +++ b/src/front/components/Layouts/DesignSystem/index.tsx @@ -4,55 +4,110 @@ import classes from "./classes.module.scss"; import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import Toasts, { IToast } from "@Front/Stores/Toasts"; +import Confirm from "@Front/Components/DesignSystem/Modal/Confirm"; +import HeaderLink from "@Front/Components/DesignSystem/Header/HeaderLink"; -export default class DesignSystem extends BasePage { - public override render(): JSX.Element { - return ( - -
-
-
- Website design System -
-
- - This page allows to gather all the design system of the site. A - Design System is a library of components, visuals and principles - with reusable code. This evolving kit offers a UX and UI - repository for designers and developers of digital products and - services. The construction of a design system offers many - advantages. This solution facilitates the work of the teams and - reduces the "design debt" and the "technical debt". The result - is a coherent ecosystem and therefore a better experience for - users and customers. - -
-
- -
-
- Button components -
- - - -
- -
-
- Toaster component -
- -
-
-
- ); - } - - - - private spawnToast() { - const toast: IToast = { title: "Un collaborateur veut rejoindre votre office", text: "12:00 - 1 fev 2023" } - Toasts.getInstance().open(toast) - } +type IState = { + isModalDisplayed: boolean +} +type IProps = { +} + +export default class DesignSystem extends BasePage { + constructor(props: IProps) { + super(props); + this.state = { + isModalDisplayed: false + } + this.openModal = this.openModal.bind(this); + this.closeModal = this.closeModal.bind(this); + } + + public override render(): JSX.Element { + return ( + +
+
+
+ Website design System +
+
+ + This page allows to gather all the design system of the site. A + Design System is a library of components, visuals and principles + with reusable code. This evolving kit offers a UX and UI + repository for designers and developers of digital products and + services. The construction of a design system offers many + advantages. This solution facilitates the work of the teams and + reduces the "design debt" and the "technical debt". The result + is a coherent ecosystem and therefore a better experience for + users and customers. + +
+
+ +
+
+ Button components +
+ + + +
+ +
+
+ Toaster component +
+ +
+
+
+ Modal components +
+ + + + Lorem ipsum dolor sit amet consectetur. Aliquam nunc lobortis lacus vulputate sagittis sed tempor eget feugiat. Elementum malesuada at sit elit. + + +
+ +
+
+ HeaderLink components +
+
+ + +
+
+ +
+
+ ); + } + private openModal() { + this.setState({ + isModalDisplayed: true + }) + } + private closeModal() { + this.setState({ + isModalDisplayed: false + }) + } + + + private spawnToast() { + console.log('spawn toast') + const toast: IToast = { title: "Un collaborateur veut rejoindre votre office", text: "12:00 - 1 fev 2023" } + Toasts.getInstance().open(toast) + } } diff --git a/src/front/components/Layouts/Home/index.tsx b/src/front/components/Layouts/Home/index.tsx index 132f6e9d..be9baf46 100644 --- a/src/front/components/Layouts/Home/index.tsx +++ b/src/front/components/Layouts/Home/index.tsx @@ -1,7 +1,7 @@ -import BasePage from "@Front/Components/Layouts/Base"; -import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; -import classes from "./classes.module.scss"; import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; +import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; +import BasePage from "../Base"; +import classes from "./classes.module.scss"; export default class Home extends BasePage { public override render(): JSX.Element { diff --git a/src/front/components/Layouts/PageNotFound/index.tsx b/src/front/components/Layouts/PageNotFound/index.tsx index df4475a9..d99171bf 100644 --- a/src/front/components/Layouts/PageNotFound/index.tsx +++ b/src/front/components/Layouts/PageNotFound/index.tsx @@ -1,8 +1,6 @@ -import BasePage from "@Front/Components/Layouts/Base"; -import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate" -import UnpluggedIcon from "@Assets/icons/unplugged.svg" -import Image from "next/image"; +import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; import Link from "next/link"; +import BasePage from "../Base"; import classes from "./classes.module.scss"; export default class PageNotFound extends BasePage { @@ -10,15 +8,26 @@ export default class PageNotFound extends BasePage { return (
- Unplugged Oops + {/* Unplugged Oops */}
There isn't anything here...
{/*
+ + + + + +
); } } + + + diff --git a/src/front/components/Materials/Header/classes.module.scss b/src/front/components/Materials/Header/classes.module.scss deleted file mode 100644 index 3e2f9fba..00000000 --- a/src/front/components/Materials/Header/classes.module.scss +++ /dev/null @@ -1,69 +0,0 @@ -@import "@Themes/constants.scss"; - -.root { - z-index: 10; - height: 64px; - background-color: $backgroundColor; - position: fixed; - top: 0; - width: 100vw; - box-shadow: 0 6px 10px $shadowColor; - - .triangle-under-logo { - position: absolute; - top: 64px; - left: calc(50vw - 70px); - width: 0; - height: 0; - border-left: 70px solid transparent; - border-right: 70px solid transparent; - border-top: 40px solid $backgroundColor; - filter: drop-shadow(0 4px 5px $shadowColor); - } - - - .menu { - position: absolute; - height: 64px; - top: 4px; - left: 60px; - line-height: 64px; - - @media (max-width: 900px) { - display: none; - } - } - - .logo { - position: absolute; - top: 13px; - left: calc(50vw - 30px); - - img { - height: 68px; - width: auto; - margin-top: 5px; - filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25)); - } - } - - .button { - position: absolute; - top: 14px; - right: 14px; - display: grid; - grid-template-columns: 130px 120px; - grid-gap: 10px; - - @media (max-width: 900px) { - display: none; - } - } - - .top-menu-burger { - position: absolute; - top: 10px; - left: 10px; - background-color: aqua; - } -} \ No newline at end of file diff --git a/src/front/themes/constants.scss b/src/front/themes/constants.scss index 9c6ba5f7..c54d928b 100644 --- a/src/front/themes/constants.scss +++ b/src/front/themes/constants.scss @@ -1,8 +1,9 @@ -$screen-xl: 2559px; +// $screen-xl: 2559px; $screen-l: 1440px; +$screen-ls: 1210px; $screen-m: 1023px; $screen-s: 767px; -$screen-xs: 424px; +// $screen-xs: 424px; $custom-easing: cubic-bezier(0.645, 0.045, 0.355, 1); @@ -34,4 +35,8 @@ $pink-soft: #f8b9df; $grey: #939393; $grey-medium: #e7e7e7; -$grey-soft: #f9f9f9; \ No newline at end of file +$grey-soft: #f9f9f9; + +$modal-background: rgba(0, 0, 0, 0.44); + +$shadow-neutral: 0px 8px 10px 0px #00000012; diff --git a/src/front/themes/fonts.scss b/src/front/themes/fonts.scss index d811d91a..0e5e7576 100644 --- a/src/front/themes/fonts.scss +++ b/src/front/themes/fonts.scss @@ -1,6 +1 @@ -@font-face { - font-family: 'Proxima Nova'; - src: url('/fonts/ProximaNova-Thin.woff2') format('woff2'), url('/fonts/ProximaNova-Thin.woff') format('woff'); - font-weight: 100; - font-style: normal; -} \ No newline at end of file +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap'); \ No newline at end of file diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 8ad48959..40cbf0d3 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,8 +1,8 @@ +import { DefaultLayout } from "@Front/Components/LayoutTemplates/DefaultLayout"; import "@Front/index.scss"; import type { NextPage } from "next"; import type { AppType, AppProps } from "next/app"; import type { ReactElement, ReactNode } from "react"; -import { DefaultLayout } from "@Front/Components/LayoutTemplates/DefaultLayout"; export type NextPageWithLayout< TProps = Record, diff --git a/tsconfig.json b/tsconfig.json index 934060f5..07f4fe93 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -52,7 +52,7 @@ "@Config/*": ["src/common/config/*"], "@Entities/*": ["src/common/ressources/*"], "@System/*": ["src/common/system/*"], - "@ControllerPattern/*": ["src/common/system/controller-pattern/*"], + "@ControllerPattern/*": ["src/common/system/controller-pattern/*"] }, // "rootDirs": [], // "typeRoots": [],