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,66 @@
|
|
|
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: 0.75rem;
|
|
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: 0.75rem;
|
|
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
|
+
}
|
|
34
|
+
|
|
35
|
+
.tags-container {
|
|
36
|
+
display: flex;
|
|
37
|
+
max-width: 80%;
|
|
38
|
+
flex-wrap: nowrap;
|
|
39
|
+
overflow: scroll;
|
|
40
|
+
gap: 0.5rem;
|
|
41
|
+
padding: 0 0.25rem;
|
|
42
|
+
span {
|
|
43
|
+
font-size: 0.75rem;
|
|
44
|
+
}
|
|
45
|
+
p {
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.MuiOutlinedInput-root.MuiInputBase-root.MuiInputBase-formControl {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.no_scrollbar {
|
|
59
|
+
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
60
|
+
&::-webkit-scrollbar {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
65
|
+
scrollbar-width: none; /* Firefox */
|
|
66
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import Autocomplete from '@mui/material/Autocomplete';
|
|
2
|
+
import TextField from '@mui/material/TextField';
|
|
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 { TextForButton } from '../Typography/TextForButton';
|
|
8
|
+
import { Checkbox } from '../Checkbox/Checkbox';
|
|
9
|
+
import './MultiSelect.scss';
|
|
10
|
+
import Chip from '@mui/material/Chip';
|
|
11
|
+
|
|
12
|
+
const CssTextField = styled(TextField)({
|
|
13
|
+
'& .MuiInputBase-input': {
|
|
14
|
+
color: '#26292E',
|
|
15
|
+
fontFamily: 'Open Sans !important',
|
|
16
|
+
fontSize: '1rem',
|
|
17
|
+
},
|
|
18
|
+
'& .MuiInputBase-input.Mui-disabled': {
|
|
19
|
+
color: '#26292E',
|
|
20
|
+
fontFamily: 'Open Sans !important',
|
|
21
|
+
fontSize: '1rem',
|
|
22
|
+
},
|
|
23
|
+
'& .Mui-error': {
|
|
24
|
+
color: '#26292E',
|
|
25
|
+
},
|
|
26
|
+
'& .MuiFormHelperText-root': {
|
|
27
|
+
color: '#F54C4C',
|
|
28
|
+
},
|
|
29
|
+
'& .MuiFormLabel-asterisk': {
|
|
30
|
+
color: '#F54C4C',
|
|
31
|
+
},
|
|
32
|
+
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
33
|
+
cursor: 'not-allowed',
|
|
34
|
+
color: '#26292E',
|
|
35
|
+
fieldset: {
|
|
36
|
+
borderColor: '#BCBDBE',
|
|
37
|
+
},
|
|
38
|
+
'&:hover fieldset': {
|
|
39
|
+
borderColor: '#66adff',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
'& label': {
|
|
43
|
+
color: '#26292E',
|
|
44
|
+
fontFamily: 'Open Sans !important',
|
|
45
|
+
fontSize: '1rem',
|
|
46
|
+
},
|
|
47
|
+
'& label.Mui-disabled.Mui-error': {
|
|
48
|
+
color: '#26292E',
|
|
49
|
+
opacity: 0.5,
|
|
50
|
+
fontFamily: 'Open Sans !important',
|
|
51
|
+
fontSize: '1rem',
|
|
52
|
+
},
|
|
53
|
+
'& label.Mui-focused': {
|
|
54
|
+
color: '#26292E',
|
|
55
|
+
fontFamily: 'Open Sans',
|
|
56
|
+
fontSize: '1rem',
|
|
57
|
+
backgroundColor: '#fff',
|
|
58
|
+
marginRight: 5,
|
|
59
|
+
paddingRight: 5,
|
|
60
|
+
},
|
|
61
|
+
'& .MuiOutlinedInput-root': {
|
|
62
|
+
fontFamily: 'Open Sans',
|
|
63
|
+
'& fieldset': {
|
|
64
|
+
borderColor: '#96989A',
|
|
65
|
+
},
|
|
66
|
+
'& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button': {
|
|
67
|
+
display: 'none',
|
|
68
|
+
},
|
|
69
|
+
'& input[type=number]': {
|
|
70
|
+
MozAppearance: 'textfield',
|
|
71
|
+
},
|
|
72
|
+
'&:hover fieldset': {
|
|
73
|
+
borderColor: '#0077FF',
|
|
74
|
+
},
|
|
75
|
+
'&.Mui-focused fieldset': {
|
|
76
|
+
borderColor: '#0077FF',
|
|
77
|
+
},
|
|
78
|
+
'&.Mui-error fieldset': {
|
|
79
|
+
borderColor: '#F54C4C',
|
|
80
|
+
},
|
|
81
|
+
'&.Mui-disabled .Mui-focused fieldset': {
|
|
82
|
+
borderColor: 'rgba(0, 119, 255, 0.5)',
|
|
83
|
+
},
|
|
84
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
85
|
+
height: '99%',
|
|
86
|
+
marginTop: '-0.35rem',
|
|
87
|
+
'& .MuiButtonBase-root': {
|
|
88
|
+
height: '99%',
|
|
89
|
+
'&:hover': {
|
|
90
|
+
background: 'transparent',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
MuiInput: {
|
|
95
|
+
input: {
|
|
96
|
+
'&::placeholder': {
|
|
97
|
+
fontSize: '1rem',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
interface MultiSelectProps {
|
|
105
|
+
label: string;
|
|
106
|
+
placeholder?: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
className?: string;
|
|
109
|
+
id?: string;
|
|
110
|
+
topLabel?: string;
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
required?: boolean;
|
|
113
|
+
defaultValue: any;
|
|
114
|
+
options: any[];
|
|
115
|
+
onChange: (value: any) => void;
|
|
116
|
+
deleteOption: (value: any) => void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Use this component for multiselection !!
|
|
121
|
+
*/
|
|
122
|
+
export const MultiSelect = ({
|
|
123
|
+
options,
|
|
124
|
+
label,
|
|
125
|
+
placeholder,
|
|
126
|
+
name,
|
|
127
|
+
className,
|
|
128
|
+
onChange,
|
|
129
|
+
disabled,
|
|
130
|
+
defaultValue,
|
|
131
|
+
topLabel,
|
|
132
|
+
id,
|
|
133
|
+
required,
|
|
134
|
+
deleteOption,
|
|
135
|
+
...props
|
|
136
|
+
}: MultiSelectProps) => {
|
|
137
|
+
const [value, setValue] = useState(
|
|
138
|
+
defaultValue === undefined ? [] : [defaultValue]
|
|
139
|
+
);
|
|
140
|
+
const [inputValue, setInputValue] = React.useState('');
|
|
141
|
+
|
|
142
|
+
useEffect(() => {
|
|
143
|
+
setValue(defaultValue === undefined ? [] : [defaultValue]);
|
|
144
|
+
}, [defaultValue]);
|
|
145
|
+
|
|
146
|
+
return (
|
|
147
|
+
<div className={`${className}`}>
|
|
148
|
+
{topLabel && (
|
|
149
|
+
<Text
|
|
150
|
+
text={`${topLabel ? topLabel : ''} ${required ? '*' : ''}`}
|
|
151
|
+
weight="bold"
|
|
152
|
+
size="base"
|
|
153
|
+
className={'input_top_label'}
|
|
154
|
+
required={required}
|
|
155
|
+
/>
|
|
156
|
+
)}
|
|
157
|
+
|
|
158
|
+
<Autocomplete
|
|
159
|
+
id="tags-standard"
|
|
160
|
+
value={value}
|
|
161
|
+
defaultValue={defaultValue}
|
|
162
|
+
inputValue={inputValue}
|
|
163
|
+
onInputChange={(_event, newInputValue) => {
|
|
164
|
+
setInputValue(newInputValue);
|
|
165
|
+
}}
|
|
166
|
+
onChange={(_event, newValue) => {
|
|
167
|
+
setValue(newValue);
|
|
168
|
+
onChange(newValue);
|
|
169
|
+
}}
|
|
170
|
+
options={
|
|
171
|
+
options ? options : [{ label: 'Loading...', value: 0, year: 100 }]
|
|
172
|
+
}
|
|
173
|
+
placeholder={label}
|
|
174
|
+
multiple={true}
|
|
175
|
+
autoComplete={options.length > 10}
|
|
176
|
+
disableCloseOnSelect
|
|
177
|
+
size="small"
|
|
178
|
+
fullWidth
|
|
179
|
+
disabled={disabled}
|
|
180
|
+
getOptionLabel={(option) => {
|
|
181
|
+
return option.label;
|
|
182
|
+
}}
|
|
183
|
+
isOptionEqualToValue={(option, value) => {
|
|
184
|
+
return option.value === value.value;
|
|
185
|
+
}}
|
|
186
|
+
renderInput={(params) => (
|
|
187
|
+
<CssTextField
|
|
188
|
+
{...params}
|
|
189
|
+
variant="outlined"
|
|
190
|
+
label={label}
|
|
191
|
+
placeholder={placeholder}
|
|
192
|
+
size="small"
|
|
193
|
+
required={required}
|
|
194
|
+
name={name}
|
|
195
|
+
/>
|
|
196
|
+
)}
|
|
197
|
+
renderTags={(value) => {
|
|
198
|
+
return (
|
|
199
|
+
<div className="tags-container no_scrollbar">
|
|
200
|
+
{value.map((option, index) => (
|
|
201
|
+
<Chip
|
|
202
|
+
label={option.label}
|
|
203
|
+
size="small"
|
|
204
|
+
key={`chipt-option-${index}`}
|
|
205
|
+
onDelete={() => deleteOption(option)}
|
|
206
|
+
/>
|
|
207
|
+
))}
|
|
208
|
+
</div>
|
|
209
|
+
);
|
|
210
|
+
}}
|
|
211
|
+
renderOption={(props, option, { selected }) => {
|
|
212
|
+
return (
|
|
213
|
+
<li {...props} style={{ gap: '0.5rem' }}>
|
|
214
|
+
<Checkbox checked={selected} onChange={() => null} />
|
|
215
|
+
<TextForButton text={option.label} size="sm" />
|
|
216
|
+
</li>
|
|
217
|
+
);
|
|
218
|
+
}}
|
|
219
|
+
clearIcon={<RemoveCircledIcon fill="black" />}
|
|
220
|
+
popupIcon={<ArrowLineDownIcon fill="black" />}
|
|
221
|
+
className={`newAutocomplete ${className}`}
|
|
222
|
+
{...props}
|
|
223
|
+
/>
|
|
224
|
+
</div>
|
|
225
|
+
);
|
|
226
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export const getDisabledStyle = (disabled: boolean | undefined) => {
|
|
2
|
+
if (disabled) {
|
|
3
|
+
return {
|
|
4
|
+
'& .MuiInputLabel-root': {
|
|
5
|
+
color: 'lightgray',
|
|
6
|
+
marginTop: '0.5rem',
|
|
7
|
+
},
|
|
8
|
+
'& .MuiOutlinedInput-root': {
|
|
9
|
+
marginTop: '0.5rem',
|
|
10
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
11
|
+
height: '99%',
|
|
12
|
+
marginTop: '-0.20rem',
|
|
13
|
+
'& .MuiButtonBase-root': {
|
|
14
|
+
height: '99%',
|
|
15
|
+
'&:hover': {
|
|
16
|
+
background: 'transparent',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
cursor: 'not-allowed',
|
|
21
|
+
'& > fieldset': {
|
|
22
|
+
borderColor: 'lightgray',
|
|
23
|
+
'&:hover': { borderColor: 'lightgray' },
|
|
24
|
+
},
|
|
25
|
+
'&:hover fieldset': {
|
|
26
|
+
borderColor: 'lightgray',
|
|
27
|
+
},
|
|
28
|
+
'input:disabled': {
|
|
29
|
+
cursor: 'not-allowed',
|
|
30
|
+
},
|
|
31
|
+
p: {
|
|
32
|
+
color: 'gray',
|
|
33
|
+
fontFamily: 'OpenSans',
|
|
34
|
+
fontSize: '1rem',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
} else
|
|
39
|
+
return {
|
|
40
|
+
'& .MuiInputLabel-root': { marginTop: '0.5rem' },
|
|
41
|
+
'& .MuiOutlinedInput-root': {
|
|
42
|
+
marginTop: '0.5rem',
|
|
43
|
+
'& .MuiAutocomplete-endAdornment': {
|
|
44
|
+
height: '99%',
|
|
45
|
+
marginTop: '-0.20rem',
|
|
46
|
+
'& .MuiButtonBase-root': {
|
|
47
|
+
height: '99%',
|
|
48
|
+
'&:hover': {
|
|
49
|
+
background: 'transparent',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
p: {
|
|
54
|
+
fontFamily: 'OpenSans',
|
|
55
|
+
fontSize: '1rem',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export const getRequiredStyle = (
|
|
61
|
+
required: boolean | undefined,
|
|
62
|
+
topLabel: string | undefined
|
|
63
|
+
) => {
|
|
64
|
+
if (required && !topLabel) {
|
|
65
|
+
return {
|
|
66
|
+
'.MuiFormLabel-asterisk': {
|
|
67
|
+
color: '#db3131',
|
|
68
|
+
'&$error': {
|
|
69
|
+
color: '#db3131',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
} else if (required && topLabel)
|
|
74
|
+
return {
|
|
75
|
+
'.MuiFormLabel-asterisk': { display: 'none' },
|
|
76
|
+
};
|
|
77
|
+
else return {};
|
|
78
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.notification_banner {
|
|
2
|
+
display: flex;
|
|
3
|
+
max-width: 87.5rem;
|
|
4
|
+
padding: 1.5rem;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: flex-start;
|
|
7
|
+
gap: 1rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.notification_banner_header {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 0.5rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.notification_banner_error {
|
|
17
|
+
border-radius: 0.5rem;
|
|
18
|
+
border: 1px solid var(--color-extended-red-500, #f54c4c);
|
|
19
|
+
background: var(--color-extended-red-100, #fddbdb);
|
|
20
|
+
}
|
|
21
|
+
.notification_banner_warning {
|
|
22
|
+
border-radius: 0.5rem;
|
|
23
|
+
border: 1px solid var(--color-extended-yellow-500, #ffb800);
|
|
24
|
+
background: var(--color-extended-yellow-100, #fff3d6);
|
|
25
|
+
}
|
|
26
|
+
.notification_banner_info {
|
|
27
|
+
border-radius: 0.5rem;
|
|
28
|
+
border: 1px solid var(--color-primary-500, #07f);
|
|
29
|
+
background: var(--color-primary-100, #e5f1ff);
|
|
30
|
+
}
|
|
31
|
+
.notification_banner_success {
|
|
32
|
+
border-radius: 0.5rem;
|
|
33
|
+
border: 1px solid var(--color-extended-green-500, #5cbb65);
|
|
34
|
+
background: var(--color-extended-green-100, #e8f5ea);
|
|
35
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { AlertCircledIcon, CheckedCircled, InfoCircledIcon } from '../Icons';
|
|
3
|
+
import { TextWithLink } from '../Typography/TextWithLink';
|
|
4
|
+
import { Text } from '../Typography/Text';
|
|
5
|
+
import { Title } from '../Typography/Title';
|
|
6
|
+
import styles from './Banner.modules.scss';
|
|
7
|
+
|
|
8
|
+
interface BannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
title?: string;
|
|
10
|
+
content?: string;
|
|
11
|
+
textLink?: string;
|
|
12
|
+
link?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
type: 'error' | 'warning' | 'success' | 'info';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=2527-33150&mode=dev
|
|
19
|
+
*/
|
|
20
|
+
export const Banner = ({
|
|
21
|
+
title,
|
|
22
|
+
content,
|
|
23
|
+
textLink,
|
|
24
|
+
link,
|
|
25
|
+
className,
|
|
26
|
+
type,
|
|
27
|
+
...props
|
|
28
|
+
}: BannerProps) => {
|
|
29
|
+
const getBannerIcon = () => {
|
|
30
|
+
if (type === 'error') {
|
|
31
|
+
return <AlertCircledIcon fill="#98312E" stroke="#98312E" />;
|
|
32
|
+
} else if (type === 'warning') {
|
|
33
|
+
return <AlertCircledIcon fill="#9E7200" stroke="#9E7200" />;
|
|
34
|
+
} else if (type === 'success') {
|
|
35
|
+
return <CheckedCircled stroke="#3C743D" fill="#3C743D" />;
|
|
36
|
+
} else {
|
|
37
|
+
return <InfoCircledIcon stroke="#004799" fill="#004799" />;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const getTextColor = () => {
|
|
42
|
+
if (type === 'error') {
|
|
43
|
+
return '#98312E';
|
|
44
|
+
} else if (type === 'warning') {
|
|
45
|
+
return '#9E7200';
|
|
46
|
+
} else if (type === 'success') {
|
|
47
|
+
return '#3C743D';
|
|
48
|
+
} else {
|
|
49
|
+
return '#004799';
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const getBannerColor = () => {
|
|
54
|
+
if (type === 'error') {
|
|
55
|
+
return styles.notification_banner_error;
|
|
56
|
+
} else if (type === 'warning') {
|
|
57
|
+
return styles.notification_banner_warning;
|
|
58
|
+
} else if (type === 'success') {
|
|
59
|
+
return styles.notification_banner_success;
|
|
60
|
+
} else {
|
|
61
|
+
return styles.notification_banner_info;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
{...props}
|
|
68
|
+
className={`${
|
|
69
|
+
styles.notification_banner
|
|
70
|
+
} ${getBannerColor()} ${className}`}
|
|
71
|
+
>
|
|
72
|
+
<div className={styles.notification_banner_header}>
|
|
73
|
+
{getBannerIcon()}
|
|
74
|
+
{title && (
|
|
75
|
+
<Title
|
|
76
|
+
text={title}
|
|
77
|
+
weight="semi-bold"
|
|
78
|
+
size="base"
|
|
79
|
+
color={getTextColor()}
|
|
80
|
+
/>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
{content && textLink && link && (
|
|
84
|
+
<TextWithLink
|
|
85
|
+
text={content}
|
|
86
|
+
weight="regular"
|
|
87
|
+
size="base"
|
|
88
|
+
color={getTextColor()}
|
|
89
|
+
textLink={textLink}
|
|
90
|
+
link={link}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
93
|
+
{content && !textLink && !link && (
|
|
94
|
+
<Text
|
|
95
|
+
text={content}
|
|
96
|
+
weight="regular"
|
|
97
|
+
size="base"
|
|
98
|
+
color={getTextColor()}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { AlarmBellStatusIcon, AlamBellIdleIcon } from '../Icons';
|
|
3
|
+
|
|
4
|
+
interface TagProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
type: 'idle' | 'info' | 'warning' | 'critical';
|
|
6
|
+
className: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=2527-33256&mode=dev */
|
|
10
|
+
export const NotificationIcon = ({ type = 'idle', className }: TagProps) => {
|
|
11
|
+
const getStatusColor = (): string => {
|
|
12
|
+
if (type === 'info') return '#0077FF';
|
|
13
|
+
else if (type === 'warning') return '#FFB800';
|
|
14
|
+
else if (type === 'critical') return '#F54C4C';
|
|
15
|
+
else return '#004799';
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
if (type === 'idle') return <AlamBellIdleIcon className={className} />;
|
|
19
|
+
return (
|
|
20
|
+
<AlarmBellStatusIcon
|
|
21
|
+
className={className}
|
|
22
|
+
stroke={getStatusColor()}
|
|
23
|
+
fill={getStatusColor()}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
.notification_toast {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 27rem;
|
|
4
|
+
justify-content: flex-end;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 0.5rem;
|
|
7
|
+
position: relative;
|
|
8
|
+
padding-right: 2.75rem;
|
|
9
|
+
transform: translateX(170%);
|
|
10
|
+
animation: moveleft 0.5s linear forwards;
|
|
11
|
+
.notification_toast_content {
|
|
12
|
+
display: flex;
|
|
13
|
+
padding: 1rem;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
align-items: flex-end;
|
|
16
|
+
gap: 0.625rem;
|
|
17
|
+
flex: 1 0 0;
|
|
18
|
+
|
|
19
|
+
.toast_link {
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
@keyframes moveleft {
|
|
24
|
+
100% {
|
|
25
|
+
transform: translateX(95%);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.close_toast_btn {
|
|
30
|
+
display: flex;
|
|
31
|
+
width: 2.75rem;
|
|
32
|
+
height: 100% !important;
|
|
33
|
+
min-height: 100% !important;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
flex-shrink: 0;
|
|
37
|
+
border: none;
|
|
38
|
+
border-radius: 0rem 0.4375rem 0.4375rem 0rem;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
svg {
|
|
45
|
+
fill: white;
|
|
46
|
+
stroke: white;
|
|
47
|
+
transform: rotate(45deg);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.close_toast_btn_error {
|
|
51
|
+
border: 1px solid var(--color-extended-red-500, #f54c4c);
|
|
52
|
+
background: var(--color-extended-red-500, #f54c4c);
|
|
53
|
+
}
|
|
54
|
+
.close_toast_btn_warning {
|
|
55
|
+
border: 1px solid var(--color-extended-yellow-500, #ffb800);
|
|
56
|
+
background: var(--color-extended-yellow-500, #ffb800);
|
|
57
|
+
}
|
|
58
|
+
.close_toast_btn_info {
|
|
59
|
+
border: 1px solid var(--color-primary-500, #07f);
|
|
60
|
+
background: var(--color-primary-500, #07f);
|
|
61
|
+
}
|
|
62
|
+
.close_toast_btn_success {
|
|
63
|
+
border: 1px solid var(--color-extended-green-500, #5cbb65);
|
|
64
|
+
background: var(--color-extended-green-500, #5cbb65);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.notification_toast_error {
|
|
69
|
+
border-radius: 0.5rem;
|
|
70
|
+
border: 1px solid var(--color-extended-red-500, #f54c4c);
|
|
71
|
+
background: var(--color-extended-red-100, #fddbdb);
|
|
72
|
+
}
|
|
73
|
+
.notification_toast_warning {
|
|
74
|
+
border-radius: 0.5rem;
|
|
75
|
+
border: 1px solid var(--color-extended-yellow-500, #ffb800);
|
|
76
|
+
background: var(--color-extended-yellow-100, #fff3d6);
|
|
77
|
+
}
|
|
78
|
+
.notification_toast_info {
|
|
79
|
+
border-radius: 0.5rem;
|
|
80
|
+
border: 1px solid var(--color-primary-500, #07f);
|
|
81
|
+
background: var(--color-primary-100, #e5f1ff);
|
|
82
|
+
}
|
|
83
|
+
.notification_toast_success {
|
|
84
|
+
border-radius: 0.5rem;
|
|
85
|
+
border: 1px solid var(--color-extended-green-500, #5cbb65);
|
|
86
|
+
background: var(--color-extended-green-100, #e8f5ea);
|
|
87
|
+
}
|