diff --git a/src/front/Assets/Icons/question-mark-circle.svg b/src/front/Assets/Icons/question-mark-circle.svg new file mode 100644 index 00000000..94ad2cbd --- /dev/null +++ b/src/front/Assets/Icons/question-mark-circle.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/front/Components/DesignSystem/CheckBox/classes.module.scss b/src/front/Components/DesignSystem/CheckBox/classes.module.scss index 5f943fd1..e9ef2f7c 100644 --- a/src/front/Components/DesignSystem/CheckBox/classes.module.scss +++ b/src/front/Components/DesignSystem/CheckBox/classes.module.scss @@ -3,43 +3,75 @@ .root { cursor: pointer; display: flex; - align-items: center; - &.disabled { - cursor: not-allowed; - } + align-items: flex-start; - input[type="checkbox"] { - appearance: none; - background-color: transparent; - width: 16px; - height: 16px; - border: 1px solid var(--color-secondary-500); - border-radius: 2px; - margin-right: 16px; - display: grid; - place-content: center; + color: var(--text-primary, #24282e); + font-size: 16px; + font-style: normal; + font-weight: var(--font-text-weight-regular, 400); + line-height: normal; + letter-spacing: 0.08px; + gap: var(--Radius-lg, 16px); - &:disabled { - cursor: not-allowed; + .content { + cursor: pointer; + display: flex; + flex-direction: column; + .label { + color: var(--text-primary, #24282e); + font-weight: var(--font-text-weight-regular, 400); + } + .description { + color: var(--text-secondary, #47535d); + font-weight: var(--font-text-weight-light, 300); } } - input[type="checkbox"]::before { - content: url("../../../Assets/Icons/check_white.svg"); - place-content: flex-start; - display: grid; - width: 16px; - height: 16px; - background-color: var(--color-secondary-500); - border-radius: 2px; - transform: scale(0); + &.disabled { + opacity: var(--opacity-disabled, 0.3); } - input[type="checkbox"]:checked::before { - transform: scale(1); + input[type="checkbox"] { + cursor: pointer; + display: flex; + width: 20px; + height: 20px; + flex-direction: column; + align-items: flex-start; + margin-right: 16px; + gap: 8px; + border-radius: var(--radius-xs, 2px); + border: 2px solid var(--select-option-unselected-default-border, #6d7e8a); + + &:hover { + border: 2px solid var(--select-option-unselected-default-border, #6d7e8a); + } + + &:active { + border: 2px solid var(--select-option-unselected-pressed-border, #3e474e); + } + + &:disabled { + cursor: not-allowed; + border: 2px solid var(--select-option-unselected-default-border, #6d7e8a); + } } - .tooltip { - margin-left: 16px; - } + // input[type="checkbox"]::before { + // content: url("../../../Assets/Icons/check_white.svg"); + // place-content: flex-start; + // display: grid; + // width: 16px; + // height: 16px; + // background-color: var(--color-secondary-500); + // border-radius: 2px; + // transform: scale(0); + // } + + // input[type="checkbox"]:checked::before { + // transform: scale(1); + // } + + // .tooltip { + // } } diff --git a/src/front/Components/DesignSystem/CheckBox/index.tsx b/src/front/Components/DesignSystem/CheckBox/index.tsx index 70f2c91a..6b697557 100644 --- a/src/front/Components/DesignSystem/CheckBox/index.tsx +++ b/src/front/Components/DesignSystem/CheckBox/index.tsx @@ -47,7 +47,19 @@ export default class CheckBox extends React.Component { checked={this.state.checked} disabled={this.props.disabled} /> - {this.props.option.label} +
+ {this.props.option.label && ( + + {this.props.option.label} + + )} + {this.props.option.description && ( + + {this.props.option.description} + + )} +
+ {this.props.toolTip && } diff --git a/src/front/Components/DesignSystem/RadioBox/classes.module.scss b/src/front/Components/DesignSystem/RadioBox/classes.module.scss index b0a5de0e..8d01e338 100644 --- a/src/front/Components/DesignSystem/RadioBox/classes.module.scss +++ b/src/front/Components/DesignSystem/RadioBox/classes.module.scss @@ -4,37 +4,74 @@ cursor: pointer; user-select: none; display: flex; - align-items: center; + align-items: flex-start; + color: var(--text-primary, #24282e); + + font-size: 16px; + font-style: normal; + font-weight: var(--font-text-weight-regular, 400); + line-height: normal; + letter-spacing: 0.08px; + gap: var(--Radius-lg, 16px); + + .content { + cursor: pointer; + display: flex; + flex-direction: column; + .label { + color: var(--text-primary, #24282e); + font-weight: var(--font-text-weight-regular, 400); + } + .description { + color: var(--text-secondary, #47535d); + font-weight: var(--font-text-weight-light, 300); + } + } + + &.disabled { + opacity: var(--opacity-disabled, 0.3); + } input[type="radio"] { - appearance: none; - background-color: transparent; - width: 15px; - height: 15px; - border: 1px solid var(--color-secondary-500); - border-radius: 100px; + cursor: pointer; + width: 20px; + height: 20px; + border-radius: var(--radius-full, 360px); + border: 2px solid var(--select-option-unselected-default-border, #6d7e8a); margin-right: 16px; display: flex; - align-items: center; - justify-content: center; - margin-top: auto; - margin-bottom: auto; + align-items: flex-start; + flex-direction: column; + gap: 8px; + + &:hover { + border: 2px solid var(--select-option-unselected-default-border, #6d7e8a); + } + + &:active { + border: 2px solid var(--select-option-unselected-pressed-border, #3e474e); + } + + &:disabled { + cursor: not-allowed; + border: 2px solid var(--select-option-unselected-default-border, #6d7e8a); + } } - input[type="radio"]::before { - content: ""; - width: 11px; - height: 11px; - background-color: var(--color-secondary-500); - border-radius: 100px; - transform: scale(0); - } + // input[type="radio"]::before { + // content: ""; + // width: 11px; + // height: 11px; + // background-color: var(--color-secondary-500); + // border-radius: 100px; + // transform: scale(0); + // } - input[type="radio"]:checked::before { - transform: scale(1); - } + // input[type="radio"]:checked::before { + // transform: scale(1); + // } - .tooltip { - margin-left: 16px; - } + // .tooltip { + // margin-left: 16px; + // } } diff --git a/src/front/Components/DesignSystem/RadioBox/index.tsx b/src/front/Components/DesignSystem/RadioBox/index.tsx index a56b80f5..8653e8de 100644 --- a/src/front/Components/DesignSystem/RadioBox/index.tsx +++ b/src/front/Components/DesignSystem/RadioBox/index.tsx @@ -5,7 +5,6 @@ import Typography, { ETypo, ETypoColor } from "../Typography"; import classes from "./classes.module.scss"; type IProps = { - children: React.ReactNode; name: string; toolTip?: string; checked?: boolean; @@ -13,6 +12,8 @@ type IProps = { onChange?: (event: React.ChangeEvent) => void; value: string; disabled: boolean; + description?: string; + label?: string; }; export default class RadioBox extends React.Component { @@ -32,7 +33,19 @@ export default class RadioBox extends React.Component { value={this.props.value} disabled={this.props.disabled} /> - {this.props.children} +
+ {this.props.label && ( + + {this.props.label} + + )} + {this.props.description && ( + + {this.props.description} + + )} +
+ {this.props.toolTip && } diff --git a/src/front/Components/DesignSystem/ToolTip/index.tsx b/src/front/Components/DesignSystem/ToolTip/index.tsx index dd7cd1d6..f0fa6973 100644 --- a/src/front/Components/DesignSystem/ToolTip/index.tsx +++ b/src/front/Components/DesignSystem/ToolTip/index.tsx @@ -1,4 +1,5 @@ -import ToolTipIcon from "@Assets/Icons/tool-tip.svg"; +// import ToolTipIcon from "@Assets/Icons/tool-tip.svg"; +import QuestionMark from "@Assets/Icons/question-mark-circle.svg"; import styled from "@emotion/styled"; import TooltipMUI, { tooltipClasses, TooltipProps } from "@mui/material/Tooltip"; import Image from "next/image"; @@ -48,7 +49,7 @@ export default class Tooltip extends React.Component { return ( - toolTip icon + toolTip icon ); diff --git a/src/front/Components/Layouts/DesignSystem/index.tsx b/src/front/Components/Layouts/DesignSystem/index.tsx index 13d4ae9f..72eaadee 100644 --- a/src/front/Components/Layouts/DesignSystem/index.tsx +++ b/src/front/Components/Layouts/DesignSystem/index.tsx @@ -28,6 +28,8 @@ import { useCallback, useMemo, useState } from "react"; import classes from "./classes.module.scss"; import Menu from "@Front/Components/DesignSystem/Menu"; +import CheckboxesInputElement from "@Front/Components/DesignSystem/CheckBox"; +import RadioBox from "@Front/Components/DesignSystem/RadioBox"; export default function DesignSystem() { const { isOpen, open, close } = useOpenable(); @@ -798,6 +800,55 @@ export default function DesignSystem() { variant={EAlertVariant.NEUTRAL} /> +
+ + + +
+ +
+ + + +
+