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.
Files changed (224) hide show
  1. package/README.md +8 -74
  2. package/package.json +24 -15
  3. package/src/Accordion/Accordion.modules.scss +41 -0
  4. package/src/Accordion/Accordion.tsx +55 -0
  5. package/src/Badge/Badge.modules.scss +83 -0
  6. package/src/Badge/Badge.tsx +69 -0
  7. package/src/Buttons/Button.modules.scss +235 -0
  8. package/src/Buttons/Button.tsx +55 -7
  9. package/src/Buttons/IconButton.modules.scss +185 -0
  10. package/src/Buttons/IconButton.tsx +53 -0
  11. package/src/Cards/Card.modules.scss +12 -0
  12. package/src/Cards/Card.tsx +14 -0
  13. package/src/Cards/CardButton.modules.scss +23 -0
  14. package/src/Cards/CardButton.tsx +14 -0
  15. package/src/Checkbox/Checkbox.module.scss +4 -0
  16. package/src/Checkbox/Checkbox.tsx +120 -0
  17. package/src/ColorGuide/colors.ts +99 -0
  18. package/src/Icons/Arrows/ArrowDoubleLineDownIcon.tsx +44 -0
  19. package/src/Icons/Arrows/ArrowDoubleLineLeftIcon.tsx +44 -0
  20. package/src/Icons/Arrows/ArrowDoubleLineRightIcon.tsx +44 -0
  21. package/src/Icons/Arrows/ArrowDoubleLineUpIcon.tsx +44 -0
  22. package/src/Icons/Arrows/ArrowFilledDownIcon.tsx +29 -0
  23. package/src/Icons/Arrows/ArrowFilledLeftIcon.tsx +29 -0
  24. package/src/Icons/Arrows/ArrowFilledRightIcon.tsx +29 -0
  25. package/src/Icons/Arrows/ArrowFilledUpIcon.tsx +29 -0
  26. package/src/Icons/Arrows/ArrowLineDownIcon.tsx +38 -0
  27. package/src/Icons/Arrows/ArrowLineLeftIcon.tsx +38 -0
  28. package/src/Icons/Arrows/ArrowLineRightIcon.tsx +38 -0
  29. package/src/Icons/Arrows/ArrowLineUpIcon.tsx +38 -0
  30. package/src/Icons/Arrows/ArrowPointerDown.tsx +44 -0
  31. package/src/Icons/Arrows/ArrowPointerDownLeft.tsx +37 -0
  32. package/src/Icons/Arrows/ArrowPointerDownRight.tsx +37 -0
  33. package/src/Icons/Arrows/ArrowPointerLeft.tsx +44 -0
  34. package/src/Icons/Arrows/ArrowPointerRight.tsx +44 -0
  35. package/src/Icons/Arrows/ArrowPointerUp.tsx +44 -0
  36. package/src/Icons/Arrows/ArrowPointerUpLeft.tsx +37 -0
  37. package/src/Icons/Arrows/ArrowPointerUpRight.tsx +37 -0
  38. package/src/Icons/Circled/AddCircledIcon.tsx +43 -0
  39. package/src/Icons/Circled/AlertCircledIcon.tsx +56 -0
  40. package/src/Icons/Circled/CheckedCircled.tsx +44 -0
  41. package/src/Icons/Circled/InfoCircledIcon.tsx +56 -0
  42. package/src/Icons/Circled/MinusCircledIcon.tsx +44 -0
  43. package/src/Icons/Circled/NavigationCircledIcon.tsx +50 -0
  44. package/src/Icons/Circled/QuestionCircledIcon.tsx +49 -0
  45. package/src/Icons/Circled/RemoveCircledIcon.tsx +43 -0
  46. package/src/Icons/Circled/SearchCircledIcon.tsx +50 -0
  47. package/src/Icons/Circled/SettingsCircledIcon.tsx +43 -0
  48. package/src/Icons/Equipment/CameraIcon.tsx +37 -0
  49. package/src/Icons/Equipment/LaptopIcon.tsx +66 -0
  50. package/src/Icons/Equipment/MicrophonePodcastIcon.tsx +31 -0
  51. package/src/Icons/Equipment/MobileIcon.tsx +73 -0
  52. package/src/Icons/Equipment/TvFlatScreenIcon.tsx +67 -0
  53. package/src/Icons/Equipment/TvIcon.tsx +43 -0
  54. package/src/Icons/Interaction/AccountIcon.tsx +31 -0
  55. package/src/Icons/Interaction/AddIcon.tsx +44 -0
  56. package/src/Icons/Interaction/AgendaIcon.tsx +68 -0
  57. package/src/Icons/Interaction/BillingIcon.tsx +67 -0
  58. package/src/Icons/Interaction/BinIcon.tsx +50 -0
  59. package/src/Icons/Interaction/CheckedIcon.tsx +31 -0
  60. package/src/Icons/Interaction/ClockIcon.tsx +50 -0
  61. package/src/Icons/Interaction/CopyPasteIcon.tsx +75 -0
  62. package/src/Icons/Interaction/DragDropIcon.tsx +34 -0
  63. package/src/Icons/Interaction/EditIcon.tsx +44 -0
  64. package/src/Icons/Interaction/EditTextIcon.tsx +56 -0
  65. package/src/Icons/Interaction/LogoutIcon.tsx +50 -0
  66. package/src/Icons/Interaction/MenuHorizontalIcon.tsx +28 -0
  67. package/src/Icons/Interaction/MenuVerticalIcon.tsx +40 -0
  68. package/src/Icons/Interaction/MinusIcon.tsx +26 -0
  69. package/src/Icons/Interaction/SearchIcon.tsx +44 -0
  70. package/src/Icons/Interaction/SearchRemoveIcon.tsx +56 -0
  71. package/src/Icons/Interaction/ShareIcon.tsx +55 -0
  72. package/src/Icons/Interaction/TeamIcon.tsx +68 -0
  73. package/src/Icons/Logos/LogoBeta.tsx +51 -0
  74. package/src/Icons/Logos/LogoNormal.tsx +37 -0
  75. package/src/Icons/Logos/LogoSmall.tsx +31 -0
  76. package/src/Icons/Logos/LogoSquare.tsx +71 -0
  77. package/src/Icons/Logos/LogoText.tsx +31 -0
  78. package/src/Icons/MediaControl/HangUpIcon.tsx +50 -0
  79. package/src/Icons/MediaControl/MeetingIcon.tsx +37 -0
  80. package/src/Icons/MediaControl/MicrophoneIcon.tsx +43 -0
  81. package/src/Icons/MediaControl/MoveInIcon.tsx +51 -0
  82. package/src/Icons/MediaControl/MuteIcon.tsx +43 -0
  83. package/src/Icons/MediaControl/PauseIcon.tsx +37 -0
  84. package/src/Icons/MediaControl/PlayIcon.tsx +30 -0
  85. package/src/Icons/MediaControl/PreviousIcon.tsx +39 -0
  86. package/src/Icons/MediaControl/RecordingIcon.tsx +74 -0
  87. package/src/Icons/MediaControl/VolumeIcon.tsx +49 -0
  88. package/src/Icons/Miscellaneous/AddSeatIcon.tsx +29 -0
  89. package/src/Icons/Miscellaneous/AddUsersIcon.tsx +62 -0
  90. package/src/Icons/Miscellaneous/BillPdfIcon.tsx +29 -0
  91. package/src/Icons/Miscellaneous/BinocularIcon.tsx +31 -0
  92. package/src/Icons/Miscellaneous/BrainIcon.tsx +98 -0
  93. package/src/Icons/Miscellaneous/ChatBubbleIcon.tsx +60 -0
  94. package/src/Icons/Miscellaneous/ChatIcon.tsx +29 -0
  95. package/src/Icons/Miscellaneous/CheckoutIcon.tsx +29 -0
  96. package/src/Icons/Miscellaneous/ClipIcon.tsx +49 -0
  97. package/src/Icons/Miscellaneous/CreditCardIcon.tsx +29 -0
  98. package/src/Icons/Miscellaneous/DownloadIcon.tsx +29 -0
  99. package/src/Icons/Miscellaneous/EarthIcon.tsx +50 -0
  100. package/src/Icons/Miscellaneous/FaceCenterIcon.tsx +34 -0
  101. package/src/Icons/Miscellaneous/FaceRecognitionIcon.tsx +80 -0
  102. package/src/Icons/Miscellaneous/FilesIcon.tsx +43 -0
  103. package/src/Icons/Miscellaneous/FillRecordIcon.tsx +29 -0
  104. package/src/Icons/Miscellaneous/FolderIcon.tsx +31 -0
  105. package/src/Icons/Miscellaneous/GoogleIcon.tsx +59 -0
  106. package/src/Icons/Miscellaneous/HardDriveIcon.tsx +50 -0
  107. package/src/Icons/Miscellaneous/HelpIcon.tsx +29 -0
  108. package/src/Icons/Miscellaneous/LanguageIcon.tsx +27 -0
  109. package/src/Icons/Miscellaneous/LinkIcon.tsx +34 -0
  110. package/src/Icons/Miscellaneous/MetaAnalyseIcon.tsx +67 -0
  111. package/src/Icons/Miscellaneous/ModeratedIcon.tsx +80 -0
  112. package/src/Icons/Miscellaneous/NbOfUsersIcon.tsx +56 -0
  113. package/src/Icons/Miscellaneous/NeutralBackgroudIcon.tsx +34 -0
  114. package/src/Icons/Miscellaneous/ReportIcon.tsx +62 -0
  115. package/src/Icons/Miscellaneous/SeatIcon.tsx +29 -0
  116. package/src/Icons/Miscellaneous/SendEmailIcon.tsx +43 -0
  117. package/src/Icons/Miscellaneous/SendIcon.tsx +38 -0
  118. package/src/Icons/Miscellaneous/SmartBrainIcon.tsx +44 -0
  119. package/src/Icons/Miscellaneous/TasksIcon.tsx +48 -0
  120. package/src/Icons/Miscellaneous/TestDetailsIcon.tsx +29 -0
  121. package/src/Icons/Miscellaneous/TestIcon.tsx +38 -0
  122. package/src/Icons/Miscellaneous/UnmoderatedIcon.tsx +55 -0
  123. package/src/Icons/Notifications/AlamBellIdleIcon.tsx +46 -0
  124. package/src/Icons/Notifications/AlarmBellStatusIcon.tsx +54 -0
  125. package/src/Icons/Notifications/NotifAlertIcon.tsx +33 -0
  126. package/src/Icons/index.ts +108 -0
  127. package/src/Interviews/Chat.modules.scss +29 -0
  128. package/src/Interviews/Chat.tsx +123 -0
  129. package/src/Interviews/ChatInput.modules.scss +29 -0
  130. package/src/Interviews/ChatInput.tsx +33 -0
  131. package/src/Interviews/CircleIconButton.modules.scss +44 -0
  132. package/src/Interviews/CircledIconButton.tsx +31 -0
  133. package/src/Interviews/ControlsBar.modules.scss +15 -0
  134. package/src/Interviews/ControlsBar.tsx +101 -0
  135. package/src/Interviews/GoBack.modules.scss +14 -0
  136. package/src/Interviews/GoBack.tsx +22 -0
  137. package/src/Interviews/InterviewButton.modules.scss +107 -0
  138. package/src/Interviews/InterviewButton.tsx +45 -0
  139. package/src/Interviews/MarkUpBar.modules.scss +33 -0
  140. package/src/Interviews/MarkUpBar.tsx +40 -0
  141. package/src/Interviews/StartInterview.modules.scss +14 -0
  142. package/src/Interviews/StartInterview.tsx +27 -0
  143. package/src/Interviews/Task.modules.scss +179 -0
  144. package/src/Interviews/Task.tsx +176 -0
  145. package/src/Interviews/WelcomeMessage.modules.scss +29 -0
  146. package/src/Interviews/WelcomeMessage.tsx +33 -0
  147. package/src/LateralMenu/LateralMenu.modules.scss +21 -0
  148. package/src/LateralMenu/LateralMenu.tsx +23 -0
  149. package/src/Modal/Modal.modules.scss +58 -0
  150. package/src/Modal/Modal.tsx +135 -0
  151. package/src/MultiSelect/MultiSelect.scss +66 -0
  152. package/src/MultiSelect/MultiSelect.tsx +226 -0
  153. package/src/MultiSelect/utils/textInputStyle.ts +78 -0
  154. package/src/Notifications/Banner.modules.scss +35 -0
  155. package/src/Notifications/Banner.tsx +103 -0
  156. package/src/Notifications/NotificationIcon.scss +0 -0
  157. package/src/Notifications/NotificationIcon.tsx +26 -0
  158. package/src/Notifications/Toast.modules.scss +87 -0
  159. package/src/Notifications/Toast.tsx +92 -0
  160. package/src/Popover/Popover.modules.scss +47 -0
  161. package/src/Popover/Popover.tsx +77 -0
  162. package/src/Radio/Radio.module.scss +9 -0
  163. package/src/Radio/Radio.tsx +82 -0
  164. package/src/Search/Search.tsx +25 -0
  165. package/src/SingleSelect/SingleSelect.scss +62 -0
  166. package/src/SingleSelect/SingleSelect.tsx +209 -0
  167. package/src/Step/Step.module.scss +54 -0
  168. package/src/Step/Step.tsx +88 -0
  169. package/src/Switch/Switch.module.scss +5 -0
  170. package/src/Switch/Switch.tsx +51 -0
  171. package/src/Table/header.modules.scss +20 -0
  172. package/src/Table/header.tsx +74 -0
  173. package/src/Table/index.tsx +53 -0
  174. package/src/Table/rows.modules.scss +16 -0
  175. package/src/Table/rows.tsx +74 -0
  176. package/src/Table/table-cell.modules.scss +12 -0
  177. package/src/Table/table-cell.tsx +40 -0
  178. package/src/Tabs/Tabs.tsx +83 -0
  179. package/src/Tabs/TabsUnderLine.tsx +90 -0
  180. package/src/Tabs/tabs.modules.scss +60 -0
  181. package/src/Tabs/tabsUnderline.modules.scss +29 -0
  182. package/src/Tag/Tag.modules.scss +58 -0
  183. package/src/Tag/Tag.tsx +63 -0
  184. package/src/TextInput/TextInput.scss +50 -0
  185. package/src/TextInput/TextInput.tsx +212 -0
  186. package/src/Textarea/Textarea.module.scss +19 -0
  187. package/src/Textarea/Textarea.tsx +88 -0
  188. package/src/Tooltip/Layout/TooltipCustomLayout.module.scss +24 -0
  189. package/src/Tooltip/Layout/TooltipCustomLayout.tsx +104 -0
  190. package/src/Tooltip/Tooltip.tsx +139 -0
  191. package/src/Typography/{Caption.css → Caption.modules.scss} +5 -5
  192. package/src/Typography/Caption.tsx +8 -4
  193. package/src/Typography/Link.modules.scss +140 -0
  194. package/src/Typography/Link.tsx +73 -0
  195. package/src/Typography/Text.modules.scss +277 -0
  196. package/src/Typography/Text.tsx +38 -8
  197. package/src/Typography/{TextForButton.css → TextForButton.modules.scss} +8 -8
  198. package/src/Typography/TextForButton.tsx +15 -5
  199. package/src/Typography/{TextForDropDownItem.css → TextForDropDownItem.modules.scss} +11 -14
  200. package/src/Typography/TextForDropDownItem.tsx +14 -4
  201. package/src/Typography/TextWithLink.modules.scss +281 -0
  202. package/src/Typography/TextWithLink.tsx +65 -0
  203. package/src/Typography/{Title.css → Title.modules.scss} +27 -25
  204. package/src/Typography/Title.tsx +114 -16
  205. package/src/hooks/useClickOutside.ts +31 -0
  206. package/src/index.ts +34 -0
  207. package/dist/Buttons/Button.d.ts +0 -6
  208. package/dist/Color Guide/colors.d.ts +0 -6
  209. package/dist/Typography/Caption.d.ts +0 -12
  210. package/dist/Typography/Text.d.ts +0 -15
  211. package/dist/Typography/TextForButton.d.ts +0 -13
  212. package/dist/Typography/TextForDropDownItem.d.ts +0 -13
  213. package/dist/Typography/Title.d.ts +0 -14
  214. package/dist/index.d.ts +0 -6
  215. package/dist/index.js +0 -8
  216. package/dist/odaptos_design_system.cjs.development.css +0 -5
  217. package/dist/odaptos_design_system.cjs.development.js +0 -108
  218. package/dist/odaptos_design_system.cjs.development.js.map +0 -1
  219. package/dist/odaptos_design_system.cjs.production.min.js +0 -2
  220. package/dist/odaptos_design_system.cjs.production.min.js.map +0 -1
  221. package/dist/odaptos_design_system.esm.js +0 -97
  222. package/dist/odaptos_design_system.esm.js.map +0 -1
  223. package/src/Color Guide/colors.ts +0 -89
  224. 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,9 @@
1
+ .radioBtnWrapper {
2
+ display: flex;
3
+ flex-direction: row;
4
+ align-items: center;
5
+ .MuiRadio-root {
6
+ height: 16px;
7
+ width: 16px;
8
+ }
9
+ }
@@ -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
+ }