odaptos_design_system 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -74
- package/package.json +24 -15
- package/src/Accordion/Accordion.modules.scss +41 -0
- package/src/Accordion/Accordion.tsx +55 -0
- package/src/Badge/Badge.modules.scss +83 -0
- package/src/Badge/Badge.tsx +69 -0
- package/src/Buttons/Button.modules.scss +235 -0
- package/src/Buttons/Button.tsx +55 -7
- package/src/Buttons/IconButton.modules.scss +185 -0
- package/src/Buttons/IconButton.tsx +53 -0
- package/src/Cards/Card.modules.scss +12 -0
- package/src/Cards/Card.tsx +14 -0
- package/src/Cards/CardButton.modules.scss +23 -0
- package/src/Cards/CardButton.tsx +14 -0
- package/src/Checkbox/Checkbox.module.scss +4 -0
- package/src/Checkbox/Checkbox.tsx +120 -0
- package/src/ColorGuide/colors.ts +99 -0
- package/src/Icons/Arrows/ArrowDoubleLineDownIcon.tsx +44 -0
- package/src/Icons/Arrows/ArrowDoubleLineLeftIcon.tsx +44 -0
- package/src/Icons/Arrows/ArrowDoubleLineRightIcon.tsx +44 -0
- package/src/Icons/Arrows/ArrowDoubleLineUpIcon.tsx +44 -0
- package/src/Icons/Arrows/ArrowFilledDownIcon.tsx +29 -0
- package/src/Icons/Arrows/ArrowFilledLeftIcon.tsx +29 -0
- package/src/Icons/Arrows/ArrowFilledRightIcon.tsx +29 -0
- package/src/Icons/Arrows/ArrowFilledUpIcon.tsx +29 -0
- package/src/Icons/Arrows/ArrowLineDownIcon.tsx +38 -0
- package/src/Icons/Arrows/ArrowLineLeftIcon.tsx +38 -0
- package/src/Icons/Arrows/ArrowLineRightIcon.tsx +38 -0
- package/src/Icons/Arrows/ArrowLineUpIcon.tsx +38 -0
- package/src/Icons/Arrows/ArrowPointerDown.tsx +44 -0
- package/src/Icons/Arrows/ArrowPointerDownLeft.tsx +37 -0
- package/src/Icons/Arrows/ArrowPointerDownRight.tsx +37 -0
- package/src/Icons/Arrows/ArrowPointerLeft.tsx +44 -0
- package/src/Icons/Arrows/ArrowPointerRight.tsx +44 -0
- package/src/Icons/Arrows/ArrowPointerUp.tsx +44 -0
- package/src/Icons/Arrows/ArrowPointerUpLeft.tsx +37 -0
- package/src/Icons/Arrows/ArrowPointerUpRight.tsx +37 -0
- package/src/Icons/Circled/AddCircledIcon.tsx +43 -0
- package/src/Icons/Circled/AlertCircledIcon.tsx +56 -0
- package/src/Icons/Circled/CheckedCircled.tsx +44 -0
- package/src/Icons/Circled/InfoCircledIcon.tsx +56 -0
- package/src/Icons/Circled/MinusCircledIcon.tsx +44 -0
- package/src/Icons/Circled/NavigationCircledIcon.tsx +50 -0
- package/src/Icons/Circled/QuestionCircledIcon.tsx +49 -0
- package/src/Icons/Circled/RemoveCircledIcon.tsx +43 -0
- package/src/Icons/Circled/SearchCircledIcon.tsx +50 -0
- package/src/Icons/Circled/SettingsCircledIcon.tsx +43 -0
- package/src/Icons/Equipment/CameraIcon.tsx +37 -0
- package/src/Icons/Equipment/LaptopIcon.tsx +66 -0
- package/src/Icons/Equipment/MicrophonePodcastIcon.tsx +31 -0
- package/src/Icons/Equipment/MobileIcon.tsx +73 -0
- package/src/Icons/Equipment/TvFlatScreenIcon.tsx +67 -0
- package/src/Icons/Equipment/TvIcon.tsx +43 -0
- package/src/Icons/Interaction/AccountIcon.tsx +31 -0
- package/src/Icons/Interaction/AddIcon.tsx +44 -0
- package/src/Icons/Interaction/AgendaIcon.tsx +68 -0
- package/src/Icons/Interaction/BillingIcon.tsx +67 -0
- package/src/Icons/Interaction/BinIcon.tsx +50 -0
- package/src/Icons/Interaction/CheckedIcon.tsx +31 -0
- package/src/Icons/Interaction/ClockIcon.tsx +50 -0
- package/src/Icons/Interaction/CopyPasteIcon.tsx +75 -0
- package/src/Icons/Interaction/DragDropIcon.tsx +34 -0
- package/src/Icons/Interaction/EditIcon.tsx +44 -0
- package/src/Icons/Interaction/EditTextIcon.tsx +56 -0
- package/src/Icons/Interaction/LogoutIcon.tsx +50 -0
- package/src/Icons/Interaction/MenuHorizontalIcon.tsx +28 -0
- package/src/Icons/Interaction/MenuVerticalIcon.tsx +40 -0
- package/src/Icons/Interaction/MinusIcon.tsx +26 -0
- package/src/Icons/Interaction/SearchIcon.tsx +44 -0
- package/src/Icons/Interaction/SearchRemoveIcon.tsx +56 -0
- package/src/Icons/Interaction/ShareIcon.tsx +55 -0
- package/src/Icons/Interaction/TeamIcon.tsx +68 -0
- package/src/Icons/Logos/LogoBeta.tsx +51 -0
- package/src/Icons/Logos/LogoNormal.tsx +37 -0
- package/src/Icons/Logos/LogoSmall.tsx +31 -0
- package/src/Icons/Logos/LogoSquare.tsx +71 -0
- package/src/Icons/Logos/LogoText.tsx +31 -0
- package/src/Icons/MediaControl/HangUpIcon.tsx +50 -0
- package/src/Icons/MediaControl/MeetingIcon.tsx +37 -0
- package/src/Icons/MediaControl/MicrophoneIcon.tsx +43 -0
- package/src/Icons/MediaControl/MoveInIcon.tsx +51 -0
- package/src/Icons/MediaControl/MuteIcon.tsx +43 -0
- package/src/Icons/MediaControl/PauseIcon.tsx +37 -0
- package/src/Icons/MediaControl/PlayIcon.tsx +30 -0
- package/src/Icons/MediaControl/PreviousIcon.tsx +39 -0
- package/src/Icons/MediaControl/RecordingIcon.tsx +74 -0
- package/src/Icons/MediaControl/VolumeIcon.tsx +49 -0
- package/src/Icons/Miscellaneous/AddSeatIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/AddUsersIcon.tsx +62 -0
- package/src/Icons/Miscellaneous/BillPdfIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/BinocularIcon.tsx +31 -0
- package/src/Icons/Miscellaneous/BrainIcon.tsx +98 -0
- package/src/Icons/Miscellaneous/ChatBubbleIcon.tsx +60 -0
- package/src/Icons/Miscellaneous/ChatIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/CheckoutIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/ClipIcon.tsx +49 -0
- package/src/Icons/Miscellaneous/CreditCardIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/DownloadIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/EarthIcon.tsx +50 -0
- package/src/Icons/Miscellaneous/FaceCenterIcon.tsx +34 -0
- package/src/Icons/Miscellaneous/FaceRecognitionIcon.tsx +80 -0
- package/src/Icons/Miscellaneous/FilesIcon.tsx +43 -0
- package/src/Icons/Miscellaneous/FillRecordIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/FolderIcon.tsx +31 -0
- package/src/Icons/Miscellaneous/GoogleIcon.tsx +59 -0
- package/src/Icons/Miscellaneous/HardDriveIcon.tsx +50 -0
- package/src/Icons/Miscellaneous/HelpIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/LanguageIcon.tsx +27 -0
- package/src/Icons/Miscellaneous/LinkIcon.tsx +34 -0
- package/src/Icons/Miscellaneous/MetaAnalyseIcon.tsx +67 -0
- package/src/Icons/Miscellaneous/ModeratedIcon.tsx +80 -0
- package/src/Icons/Miscellaneous/NbOfUsersIcon.tsx +56 -0
- package/src/Icons/Miscellaneous/NeutralBackgroudIcon.tsx +34 -0
- package/src/Icons/Miscellaneous/ReportIcon.tsx +62 -0
- package/src/Icons/Miscellaneous/SeatIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/SendEmailIcon.tsx +43 -0
- package/src/Icons/Miscellaneous/SendIcon.tsx +38 -0
- package/src/Icons/Miscellaneous/SmartBrainIcon.tsx +44 -0
- package/src/Icons/Miscellaneous/TasksIcon.tsx +48 -0
- package/src/Icons/Miscellaneous/TestDetailsIcon.tsx +29 -0
- package/src/Icons/Miscellaneous/TestIcon.tsx +38 -0
- package/src/Icons/Miscellaneous/UnmoderatedIcon.tsx +55 -0
- package/src/Icons/Notifications/AlamBellIdleIcon.tsx +46 -0
- package/src/Icons/Notifications/AlarmBellStatusIcon.tsx +54 -0
- package/src/Icons/Notifications/NotifAlertIcon.tsx +33 -0
- package/src/Icons/index.ts +108 -0
- package/src/Interviews/Chat.modules.scss +29 -0
- package/src/Interviews/Chat.tsx +123 -0
- package/src/Interviews/ChatInput.modules.scss +29 -0
- package/src/Interviews/ChatInput.tsx +33 -0
- package/src/Interviews/CircleIconButton.modules.scss +44 -0
- package/src/Interviews/CircledIconButton.tsx +31 -0
- package/src/Interviews/ControlsBar.modules.scss +15 -0
- package/src/Interviews/ControlsBar.tsx +101 -0
- package/src/Interviews/GoBack.modules.scss +14 -0
- package/src/Interviews/GoBack.tsx +22 -0
- package/src/Interviews/InterviewButton.modules.scss +107 -0
- package/src/Interviews/InterviewButton.tsx +45 -0
- package/src/Interviews/MarkUpBar.modules.scss +33 -0
- package/src/Interviews/MarkUpBar.tsx +40 -0
- package/src/Interviews/StartInterview.modules.scss +14 -0
- package/src/Interviews/StartInterview.tsx +27 -0
- package/src/Interviews/Task.modules.scss +179 -0
- package/src/Interviews/Task.tsx +176 -0
- package/src/Interviews/WelcomeMessage.modules.scss +29 -0
- package/src/Interviews/WelcomeMessage.tsx +33 -0
- package/src/LateralMenu/LateralMenu.modules.scss +21 -0
- package/src/LateralMenu/LateralMenu.tsx +23 -0
- package/src/Modal/Modal.modules.scss +58 -0
- package/src/Modal/Modal.tsx +135 -0
- package/src/MultiSelect/MultiSelect.scss +66 -0
- package/src/MultiSelect/MultiSelect.tsx +226 -0
- package/src/MultiSelect/utils/textInputStyle.ts +78 -0
- package/src/Notifications/Banner.modules.scss +35 -0
- package/src/Notifications/Banner.tsx +103 -0
- package/src/Notifications/NotificationIcon.scss +0 -0
- package/src/Notifications/NotificationIcon.tsx +26 -0
- package/src/Notifications/Toast.modules.scss +87 -0
- package/src/Notifications/Toast.tsx +92 -0
- package/src/Popover/Popover.modules.scss +47 -0
- package/src/Popover/Popover.tsx +77 -0
- package/src/Radio/Radio.module.scss +9 -0
- package/src/Radio/Radio.tsx +82 -0
- package/src/Search/Search.tsx +25 -0
- package/src/SingleSelect/SingleSelect.scss +62 -0
- package/src/SingleSelect/SingleSelect.tsx +209 -0
- package/src/Step/Step.module.scss +54 -0
- package/src/Step/Step.tsx +88 -0
- package/src/Switch/Switch.module.scss +5 -0
- package/src/Switch/Switch.tsx +51 -0
- package/src/Table/header.modules.scss +20 -0
- package/src/Table/header.tsx +74 -0
- package/src/Table/index.tsx +53 -0
- package/src/Table/rows.modules.scss +16 -0
- package/src/Table/rows.tsx +74 -0
- package/src/Table/table-cell.modules.scss +12 -0
- package/src/Table/table-cell.tsx +40 -0
- package/src/Tabs/Tabs.tsx +83 -0
- package/src/Tabs/TabsUnderLine.tsx +90 -0
- package/src/Tabs/tabs.modules.scss +60 -0
- package/src/Tabs/tabsUnderline.modules.scss +29 -0
- package/src/Tag/Tag.modules.scss +58 -0
- package/src/Tag/Tag.tsx +63 -0
- package/src/TextInput/TextInput.scss +50 -0
- package/src/TextInput/TextInput.tsx +212 -0
- package/src/Textarea/Textarea.module.scss +19 -0
- package/src/Textarea/Textarea.tsx +88 -0
- package/src/Tooltip/Layout/TooltipCustomLayout.module.scss +24 -0
- package/src/Tooltip/Layout/TooltipCustomLayout.tsx +104 -0
- package/src/Tooltip/Tooltip.tsx +139 -0
- package/src/Typography/{Caption.css → Caption.modules.scss} +5 -5
- package/src/Typography/Caption.tsx +8 -4
- package/src/Typography/Link.modules.scss +140 -0
- package/src/Typography/Link.tsx +73 -0
- package/src/Typography/Text.modules.scss +277 -0
- package/src/Typography/Text.tsx +38 -8
- package/src/Typography/{TextForButton.css → TextForButton.modules.scss} +8 -8
- package/src/Typography/TextForButton.tsx +15 -5
- package/src/Typography/{TextForDropDownItem.css → TextForDropDownItem.modules.scss} +11 -14
- package/src/Typography/TextForDropDownItem.tsx +14 -4
- package/src/Typography/TextWithLink.modules.scss +281 -0
- package/src/Typography/TextWithLink.tsx +65 -0
- package/src/Typography/{Title.css → Title.modules.scss} +27 -25
- package/src/Typography/Title.tsx +114 -16
- package/src/hooks/useClickOutside.ts +31 -0
- package/src/index.ts +34 -0
- package/dist/Buttons/Button.d.ts +0 -6
- package/dist/Color Guide/colors.d.ts +0 -6
- package/dist/Typography/Caption.d.ts +0 -12
- package/dist/Typography/Text.d.ts +0 -15
- package/dist/Typography/TextForButton.d.ts +0 -13
- package/dist/Typography/TextForDropDownItem.d.ts +0 -13
- package/dist/Typography/Title.d.ts +0 -14
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -8
- package/dist/odaptos_design_system.cjs.development.css +0 -5
- package/dist/odaptos_design_system.cjs.development.js +0 -108
- package/dist/odaptos_design_system.cjs.development.js.map +0 -1
- package/dist/odaptos_design_system.cjs.production.min.js +0 -2
- package/dist/odaptos_design_system.cjs.production.min.js.map +0 -1
- package/dist/odaptos_design_system.esm.js +0 -97
- package/dist/odaptos_design_system.esm.js.map +0 -1
- package/src/Color Guide/colors.ts +0 -89
- package/src/Typography/Text.css +0 -272
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { AddIcon } from '../Icons';
|
|
3
|
+
import { Link } from '../Typography/Link';
|
|
4
|
+
import { Text } from '../Typography/Text';
|
|
5
|
+
import styles from './Toast.modules.scss';
|
|
6
|
+
|
|
7
|
+
interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
content: string;
|
|
9
|
+
textLink?: string;
|
|
10
|
+
link?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
type: 'error' | 'warning' | 'success' | 'info';
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=2527-33231&mode=dev
|
|
18
|
+
*/
|
|
19
|
+
export const Toast = ({
|
|
20
|
+
content,
|
|
21
|
+
textLink,
|
|
22
|
+
link,
|
|
23
|
+
className,
|
|
24
|
+
type,
|
|
25
|
+
onClose,
|
|
26
|
+
...props
|
|
27
|
+
}: ToastProps) => {
|
|
28
|
+
const getTextColor = () => {
|
|
29
|
+
if (type === 'error') {
|
|
30
|
+
return '#98312E';
|
|
31
|
+
} else if (type === 'warning') {
|
|
32
|
+
return '#9E7200';
|
|
33
|
+
} else if (type === 'success') {
|
|
34
|
+
return '#3C743D';
|
|
35
|
+
} else {
|
|
36
|
+
return '#004799';
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const getCloseBtnStyleByType = () => {
|
|
41
|
+
if (type === 'error') {
|
|
42
|
+
return styles.close_toast_btn_error;
|
|
43
|
+
} else if (type === 'warning') {
|
|
44
|
+
return styles.close_toast_btn_warning;
|
|
45
|
+
} else if (type === 'success') {
|
|
46
|
+
return styles.close_toast_btn_success;
|
|
47
|
+
} else {
|
|
48
|
+
return styles.close_toast_btn_info;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const getToastStyleByType = () => {
|
|
52
|
+
if (type === 'error') {
|
|
53
|
+
return styles.notification_toast_error;
|
|
54
|
+
} else if (type === 'warning') {
|
|
55
|
+
return styles.notification_toast_warning;
|
|
56
|
+
} else if (type === 'success') {
|
|
57
|
+
return styles.notification_toast_success;
|
|
58
|
+
} else {
|
|
59
|
+
return styles.notification_toast_info;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div
|
|
65
|
+
{...props}
|
|
66
|
+
className={`${
|
|
67
|
+
styles.notification_toast
|
|
68
|
+
} ${getToastStyleByType()} ${className}`}
|
|
69
|
+
>
|
|
70
|
+
<div className={styles.notification_toast_content}>
|
|
71
|
+
<Text
|
|
72
|
+
text={content}
|
|
73
|
+
weight="regular"
|
|
74
|
+
size="base"
|
|
75
|
+
color={getTextColor()}
|
|
76
|
+
/>
|
|
77
|
+
|
|
78
|
+
{link && textLink && (
|
|
79
|
+
<Link text={textLink} link={link} className={styles.toast_link} />
|
|
80
|
+
)}
|
|
81
|
+
</div>
|
|
82
|
+
<button
|
|
83
|
+
className={`${styles.close_toast_btn} ${getCloseBtnStyleByType()}`}
|
|
84
|
+
onClick={() => {
|
|
85
|
+
if (onClose) onClose;
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
<AddIcon />
|
|
89
|
+
</button>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.popover {
|
|
2
|
+
position: absolute;
|
|
3
|
+
z-index: 99;
|
|
4
|
+
display: flex;
|
|
5
|
+
width: 9.375rem;
|
|
6
|
+
padding: 0.5rem;
|
|
7
|
+
height: fit-content;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
border-radius: 0.25rem;
|
|
12
|
+
border: 1px solid var(--color-neutral-clear-shades-350, #bcbdbe);
|
|
13
|
+
background: var(--color-neutral-basics-white, #fff);
|
|
14
|
+
|
|
15
|
+
.popover_header {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
gap: 0.5rem;
|
|
20
|
+
svg {
|
|
21
|
+
width: 1rem;
|
|
22
|
+
height: 1rem;
|
|
23
|
+
fill: red;
|
|
24
|
+
stroke: red;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
.popover.open {
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.popover_action {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
border-radius: 0.3125rem;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
gap: 0.5rem;
|
|
38
|
+
svg {
|
|
39
|
+
width: 1rem;
|
|
40
|
+
height: 1rem;
|
|
41
|
+
fill: black;
|
|
42
|
+
stroke: black;
|
|
43
|
+
}
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: var(--gray-lighter);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { RemoveCircledIcon } from '../Icons';
|
|
3
|
+
import { Text } from '../Typography/Text';
|
|
4
|
+
import { IconButton } from '../Buttons/IconButton';
|
|
5
|
+
import { useOnClickOutside } from '../hooks/useClickOutside';
|
|
6
|
+
import styles from './Popover.modules.scss';
|
|
7
|
+
|
|
8
|
+
interface Item {
|
|
9
|
+
label: string;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
icon: JSX.Element;
|
|
12
|
+
hide?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface PopoverProps {
|
|
17
|
+
open: boolean;
|
|
18
|
+
title: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
items: Item[];
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
style?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const Popover = ({
|
|
26
|
+
onClose,
|
|
27
|
+
open,
|
|
28
|
+
title,
|
|
29
|
+
className,
|
|
30
|
+
items,
|
|
31
|
+
style,
|
|
32
|
+
}: PopoverProps) => {
|
|
33
|
+
const ref = useRef(null);
|
|
34
|
+
|
|
35
|
+
useOnClickOutside({
|
|
36
|
+
handler: onClose,
|
|
37
|
+
elementRef: ref,
|
|
38
|
+
isOpen: open,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (!open) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div
|
|
47
|
+
className={`${styles.popover} ${open && styles.open} ${className}`}
|
|
48
|
+
ref={ref}
|
|
49
|
+
style={style}
|
|
50
|
+
>
|
|
51
|
+
<div className={styles.popover_header}>
|
|
52
|
+
<Text text={title} color="gray" size="sm" />
|
|
53
|
+
<IconButton
|
|
54
|
+
size="xxs"
|
|
55
|
+
variant="tertiary"
|
|
56
|
+
onClick={onClose}
|
|
57
|
+
icon={<RemoveCircledIcon />}
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
{items.map((item, index) => {
|
|
61
|
+
if (item.hide) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return (
|
|
65
|
+
<div
|
|
66
|
+
className={`${styles.popover_action} ${item.className}`}
|
|
67
|
+
key={index}
|
|
68
|
+
onClick={item.onClick}
|
|
69
|
+
>
|
|
70
|
+
{item.icon && item.icon}
|
|
71
|
+
<Text text={item.label} size="sm" />
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
})}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
import { Radio as MuiRadio } from '@mui/material';
|
|
3
|
+
import { Text } from '../Typography/Text';
|
|
4
|
+
import styles from './Radio.module.scss';
|
|
5
|
+
|
|
6
|
+
const BpIcon = styled('span')(() => ({
|
|
7
|
+
borderRadius: '50%',
|
|
8
|
+
width: 16,
|
|
9
|
+
height: 16,
|
|
10
|
+
border: '1px solid #A6A29E',
|
|
11
|
+
backgroundColor: '#f5f8fa',
|
|
12
|
+
backgroundImage:
|
|
13
|
+
'linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))',
|
|
14
|
+
'.Mui-focusVisible &': {
|
|
15
|
+
outline: '2px auto rgba(19,124,189,.6)',
|
|
16
|
+
outlineOffset: 2,
|
|
17
|
+
},
|
|
18
|
+
'input:disabled ~ &': {
|
|
19
|
+
boxShadow: 'none',
|
|
20
|
+
background: 'rgba(206,217,224,.5)',
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
const BpCheckedIcon = styled(BpIcon)({
|
|
25
|
+
backgroundColor: '#0077FF',
|
|
26
|
+
border: 'none',
|
|
27
|
+
width: 16,
|
|
28
|
+
height: 16,
|
|
29
|
+
backgroundImage:
|
|
30
|
+
'linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))',
|
|
31
|
+
'&:before': {
|
|
32
|
+
display: 'block',
|
|
33
|
+
width: 16,
|
|
34
|
+
height: 16,
|
|
35
|
+
backgroundImage: 'radial-gradient(#fff,#fff 28%,transparent 32%)',
|
|
36
|
+
content: '""',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
interface RadioProps {
|
|
41
|
+
label?: string;
|
|
42
|
+
leftLabel?: string;
|
|
43
|
+
onChange: () => void;
|
|
44
|
+
onBlur?: () => void;
|
|
45
|
+
checked: boolean;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
required?: boolean;
|
|
48
|
+
value?: any;
|
|
49
|
+
name?: string;
|
|
50
|
+
className?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const Radio = ({
|
|
54
|
+
label,
|
|
55
|
+
checked,
|
|
56
|
+
disabled,
|
|
57
|
+
onChange,
|
|
58
|
+
required,
|
|
59
|
+
value,
|
|
60
|
+
leftLabel,
|
|
61
|
+
name,
|
|
62
|
+
className,
|
|
63
|
+
}: RadioProps) => {
|
|
64
|
+
return (
|
|
65
|
+
<div className={`${styles.radioBtnWrapper} ${className}`}>
|
|
66
|
+
{leftLabel && <Text text={leftLabel} size="sm" />}
|
|
67
|
+
<MuiRadio
|
|
68
|
+
disableRipple
|
|
69
|
+
color="default"
|
|
70
|
+
checkedIcon={<BpCheckedIcon />}
|
|
71
|
+
icon={<BpIcon />}
|
|
72
|
+
checked={checked}
|
|
73
|
+
disabled={disabled}
|
|
74
|
+
onChange={onChange}
|
|
75
|
+
required={required}
|
|
76
|
+
value={value}
|
|
77
|
+
name={name}
|
|
78
|
+
/>
|
|
79
|
+
{label && <Text text={label} size="sm" />}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SearchCircledIcon } from '../Icons';
|
|
2
|
+
import { TextInput } from '../TextInput/TextInput';
|
|
3
|
+
|
|
4
|
+
interface RadioProps {
|
|
5
|
+
searchInput: string | number;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
onChange: (e: any) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Search = ({ searchInput, onChange, placeholder }: RadioProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<TextInput
|
|
13
|
+
value={searchInput}
|
|
14
|
+
placeholder={placeholder ?? 'Search'}
|
|
15
|
+
rightIcon={
|
|
16
|
+
<SearchCircledIcon
|
|
17
|
+
fill="black"
|
|
18
|
+
stroke="black"
|
|
19
|
+
style={{ height: '1rem', width: '1rem' }}
|
|
20
|
+
/>
|
|
21
|
+
}
|
|
22
|
+
onChange={onChange}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.newAutocomplete {
|
|
2
|
+
width: 100%;
|
|
3
|
+
min-width: 16rem;
|
|
4
|
+
|
|
5
|
+
span {
|
|
6
|
+
font-family: Open Sans;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
line-height: 1.3;
|
|
11
|
+
letter-spacing: 0.03em;
|
|
12
|
+
text-align: left;
|
|
13
|
+
margin: unset;
|
|
14
|
+
}
|
|
15
|
+
label {
|
|
16
|
+
font-family: Open Sans;
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
font-size: 1rem;
|
|
20
|
+
line-height: 1.3;
|
|
21
|
+
letter-spacing: 0.03em;
|
|
22
|
+
text-align: left;
|
|
23
|
+
margin: unset;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.MuiAutocomplete-endAdornment {
|
|
27
|
+
svg {
|
|
28
|
+
width: 1rem;
|
|
29
|
+
height: 1rem;
|
|
30
|
+
}
|
|
31
|
+
display: flex;
|
|
32
|
+
gap: 0.5rem;
|
|
33
|
+
margin-top: -0.35rem !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tags-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
max-width: 90%;
|
|
39
|
+
flex-wrap: nowrap;
|
|
40
|
+
overflow: scroll;
|
|
41
|
+
gap: 0.5rem;
|
|
42
|
+
padding: 0 0.5rem;
|
|
43
|
+
p {
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.input_top_label {
|
|
51
|
+
margin-bottom: 0.625rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.MuiOutlinedInput-root.MuiInputBase-root.MuiInputBase-formControl {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: row;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.text-below {
|
|
61
|
+
margin: 0.25rem 0.5rem 0.25rem 0.75rem;
|
|
62
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import Autocomplete from '@mui/material/Autocomplete';
|
|
2
|
+
import { TextField } from '@mui/material';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import { ArrowLineDownIcon, RemoveCircledIcon } from '../Icons';
|
|
6
|
+
import { Text } from '../Typography/Text';
|
|
7
|
+
import './SingleSelect.scss';
|
|
8
|
+
|
|
9
|
+
const CssTextField = styled(TextField)({
|
|
10
|
+
'& .MuiInputBase-input': {
|
|
11
|
+
color: '#26292E',
|
|
12
|
+
fontFamily: 'Open Sans !important',
|
|
13
|
+
fontSize: '1rem',
|
|
14
|
+
},
|
|
15
|
+
'& .MuiInputBase-input.Mui-disabled': {
|
|
16
|
+
color: '#26292E',
|
|
17
|
+
fontFamily: 'Open Sans !important',
|
|
18
|
+
fontSize: '1rem',
|
|
19
|
+
},
|
|
20
|
+
'& .Mui-error': {
|
|
21
|
+
color: '#26292E',
|
|
22
|
+
},
|
|
23
|
+
'& .MuiFormHelperText-root': {
|
|
24
|
+
color: '#F54C4C',
|
|
25
|
+
},
|
|
26
|
+
'& .MuiFormLabel-asterisk': {
|
|
27
|
+
color: '#F54C4C',
|
|
28
|
+
},
|
|
29
|
+
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
30
|
+
cursor: 'not-allowed',
|
|
31
|
+
color: '#26292E',
|
|
32
|
+
fieldset: {
|
|
33
|
+
borderColor: '#BCBDBE',
|
|
34
|
+
},
|
|
35
|
+
'&:hover fieldset': {
|
|
36
|
+
borderColor: '#66adff',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
'& label': {
|
|
40
|
+
color: '#26292E',
|
|
41
|
+
fontFamily: 'Open Sans !important',
|
|
42
|
+
fontSize: '1rem',
|
|
43
|
+
},
|
|
44
|
+
'& label.Mui-disabled.Mui-error': {
|
|
45
|
+
color: '#26292E',
|
|
46
|
+
opacity: 0.5,
|
|
47
|
+
fontFamily: 'Open Sans !important',
|
|
48
|
+
fontSize: '1rem',
|
|
49
|
+
},
|
|
50
|
+
'& label.Mui-focused': {
|
|
51
|
+
color: '#26292E',
|
|
52
|
+
fontFamily: 'Open Sans',
|
|
53
|
+
fontSize: '1rem',
|
|
54
|
+
backgroundColor: '#fff',
|
|
55
|
+
marginRight: 5,
|
|
56
|
+
paddingRight: 5,
|
|
57
|
+
},
|
|
58
|
+
'& .MuiOutlinedInput-root': {
|
|
59
|
+
fontFamily: 'Open Sans',
|
|
60
|
+
'& fieldset': {
|
|
61
|
+
borderColor: '#96989A',
|
|
62
|
+
},
|
|
63
|
+
'& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button': {
|
|
64
|
+
display: 'none',
|
|
65
|
+
},
|
|
66
|
+
'& input[type=number]': {
|
|
67
|
+
MozAppearance: 'textfield',
|
|
68
|
+
},
|
|
69
|
+
'&:hover fieldset': {
|
|
70
|
+
borderColor: '#0077FF',
|
|
71
|
+
},
|
|
72
|
+
'&.Mui-focused fieldset': {
|
|
73
|
+
borderColor: '#0077FF',
|
|
74
|
+
},
|
|
75
|
+
'&.Mui-error fieldset': {
|
|
76
|
+
borderColor: '#F54C4C',
|
|
77
|
+
},
|
|
78
|
+
'&.Mui-disabled .Mui-focused fieldset': {
|
|
79
|
+
borderColor: 'rgba(0, 119, 255, 0.5)',
|
|
80
|
+
},
|
|
81
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
82
|
+
height: '99%',
|
|
83
|
+
marginTop: '-0.20rem',
|
|
84
|
+
'& .MuiButtonBase-root': {
|
|
85
|
+
height: '99%',
|
|
86
|
+
'&:hover': {
|
|
87
|
+
background: 'transparent',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
interface SingleSelectProps {
|
|
94
|
+
label: string;
|
|
95
|
+
placeholder?: string;
|
|
96
|
+
name?: string;
|
|
97
|
+
className?: string;
|
|
98
|
+
id?: string;
|
|
99
|
+
topLabel?: string;
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
required?: boolean;
|
|
102
|
+
error?: boolean;
|
|
103
|
+
helperText?: string;
|
|
104
|
+
errorText?: string;
|
|
105
|
+
defaultValue: any;
|
|
106
|
+
options: any[];
|
|
107
|
+
onChange: (value: any) => void;
|
|
108
|
+
onBlur?: () => void;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Use this component for single selection !!
|
|
113
|
+
*/
|
|
114
|
+
export const SingleSelect = ({
|
|
115
|
+
options,
|
|
116
|
+
label,
|
|
117
|
+
placeholder,
|
|
118
|
+
name,
|
|
119
|
+
className,
|
|
120
|
+
onChange,
|
|
121
|
+
disabled,
|
|
122
|
+
defaultValue,
|
|
123
|
+
topLabel,
|
|
124
|
+
id,
|
|
125
|
+
required,
|
|
126
|
+
error,
|
|
127
|
+
helperText,
|
|
128
|
+
errorText,
|
|
129
|
+
onBlur,
|
|
130
|
+
...props
|
|
131
|
+
}: SingleSelectProps) => {
|
|
132
|
+
const [value, setValue] = useState(
|
|
133
|
+
defaultValue === undefined ? null : defaultValue
|
|
134
|
+
);
|
|
135
|
+
const [inputValue, setInputValue] = React.useState('');
|
|
136
|
+
|
|
137
|
+
useEffect(() => {
|
|
138
|
+
setValue(defaultValue === undefined ? null : defaultValue);
|
|
139
|
+
}, [defaultValue]);
|
|
140
|
+
|
|
141
|
+
return (
|
|
142
|
+
<div className={`${className}`}>
|
|
143
|
+
{topLabel && (
|
|
144
|
+
<Text
|
|
145
|
+
text={`${topLabel ? topLabel : ''} ${required ? '*' : ''}`}
|
|
146
|
+
weight="bold"
|
|
147
|
+
size="base"
|
|
148
|
+
className={'input_top_label'}
|
|
149
|
+
required={required}
|
|
150
|
+
/>
|
|
151
|
+
)}
|
|
152
|
+
|
|
153
|
+
<Autocomplete
|
|
154
|
+
id="tags-standard"
|
|
155
|
+
value={value}
|
|
156
|
+
defaultValue={defaultValue}
|
|
157
|
+
inputValue={inputValue}
|
|
158
|
+
onInputChange={(_event, newInputValue) => {
|
|
159
|
+
setInputValue(newInputValue);
|
|
160
|
+
}}
|
|
161
|
+
onChange={(_event, newValue) => {
|
|
162
|
+
setValue(newValue);
|
|
163
|
+
onChange(newValue);
|
|
164
|
+
}}
|
|
165
|
+
options={options}
|
|
166
|
+
placeholder={label}
|
|
167
|
+
multiple={false}
|
|
168
|
+
autoComplete={options.length > 10}
|
|
169
|
+
disableCloseOnSelect
|
|
170
|
+
size="small"
|
|
171
|
+
fullWidth
|
|
172
|
+
disabled={disabled}
|
|
173
|
+
getOptionLabel={(option) => {
|
|
174
|
+
return option.label;
|
|
175
|
+
}}
|
|
176
|
+
isOptionEqualToValue={(option, value) => {
|
|
177
|
+
return option.value === value.value;
|
|
178
|
+
}}
|
|
179
|
+
renderInput={(params) => (
|
|
180
|
+
<CssTextField
|
|
181
|
+
{...params}
|
|
182
|
+
variant="outlined"
|
|
183
|
+
label={label}
|
|
184
|
+
placeholder={placeholder}
|
|
185
|
+
size="small"
|
|
186
|
+
required={required}
|
|
187
|
+
name={name}
|
|
188
|
+
/>
|
|
189
|
+
)}
|
|
190
|
+
clearIcon={<RemoveCircledIcon fill="black" />}
|
|
191
|
+
popupIcon={<ArrowLineDownIcon fill="black" />}
|
|
192
|
+
className={`newAutocomplete ${className}`}
|
|
193
|
+
{...props}
|
|
194
|
+
/>
|
|
195
|
+
{errorText && (
|
|
196
|
+
<Text
|
|
197
|
+
size="xs"
|
|
198
|
+
color="#F54C4C"
|
|
199
|
+
italic
|
|
200
|
+
text={errorText}
|
|
201
|
+
className="text-below"
|
|
202
|
+
/>
|
|
203
|
+
)}
|
|
204
|
+
{helperText && (
|
|
205
|
+
<Text size="xs" italic text={helperText} className="text-below" />
|
|
206
|
+
)}
|
|
207
|
+
</div>
|
|
208
|
+
);
|
|
209
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.step_number {
|
|
2
|
+
display: flex;
|
|
3
|
+
max-width: 1.5rem;
|
|
4
|
+
max-height: 1.5rem;
|
|
5
|
+
width: 1.5rem;
|
|
6
|
+
height: 1.5rem;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
border-radius: 62.4375rem;
|
|
11
|
+
border: 1px solid var(--color-neutral-basics-black, #00040a);
|
|
12
|
+
}
|
|
13
|
+
.left_container {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: 0.75rem;
|
|
18
|
+
}
|
|
19
|
+
.step_container {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
gap: 0.75rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.step_icon_container {
|
|
26
|
+
display: flex;
|
|
27
|
+
width: 1.5rem;
|
|
28
|
+
height: 1.5rem;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
gap: 0.5rem;
|
|
32
|
+
align-self: stretch;
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
.step_line {
|
|
36
|
+
width: 0.0625rem;
|
|
37
|
+
height: 1.875rem;
|
|
38
|
+
background: #8a8b8e;
|
|
39
|
+
margin-left: 0.7rem;
|
|
40
|
+
}
|
|
41
|
+
.step_completed_icon {
|
|
42
|
+
color: #5cbb65;
|
|
43
|
+
stroke: #5cbb65;
|
|
44
|
+
fill: #5cbb65;
|
|
45
|
+
width: 1.5rem;
|
|
46
|
+
height: 1.5rem;
|
|
47
|
+
}
|
|
48
|
+
.step_warning_icon {
|
|
49
|
+
color: #f54c4c;
|
|
50
|
+
stroke: #f54c4c;
|
|
51
|
+
fill: #f54c4c;
|
|
52
|
+
width: 1.5rem;
|
|
53
|
+
height: 1.5rem;
|
|
54
|
+
}
|