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,58 @@
1
+ .tag {
2
+ display: flex;
3
+ padding: 0px 0.75rem;
4
+ align-items: center;
5
+ gap: 0.25rem;
6
+ border-radius: 0.25rem;
7
+ max-width: 10rem;
8
+ width: fit-content;
9
+ }
10
+
11
+ .tag_idle {
12
+ background: var(--color-neutral-dark-shades-600, #717376);
13
+ svg {
14
+ stroke: #ffffff !important;
15
+ fill: #ffffff !important;
16
+ }
17
+ }
18
+ .tag_info {
19
+ background: var(--color-primary-100, #e5f1ff);
20
+ svg {
21
+ stroke: #004799 !important;
22
+ fill: #004799 !important;
23
+ }
24
+ }
25
+ .tag_success {
26
+ background: var(--color-extended-green-100, #e8f5ea);
27
+ svg {
28
+ stroke: #3c743d !important;
29
+ fill: #3c743d !important;
30
+ }
31
+ }
32
+ .tag_warning {
33
+ background: var(--color-extended-yellow-100, #fff3d6);
34
+ svg {
35
+ stroke: #6e4f00 !important;
36
+ fill: #6e4f00 !important;
37
+ }
38
+ }
39
+ .tag_critical {
40
+ background: var(--color-extended-red-100, #fddbdb);
41
+ svg {
42
+ stroke: #98312e !important;
43
+ fill: #98312e !important;
44
+ }
45
+ }
46
+ .tag_sm {
47
+ svg {
48
+ height: 0.75rem;
49
+ width: 0.75rem;
50
+ }
51
+ }
52
+
53
+ .tag_base {
54
+ svg {
55
+ height: 1rem;
56
+ width: 1rem;
57
+ }
58
+ }
@@ -0,0 +1,63 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import styles from './Tag.modules.scss';
3
+ import { Text } from '../Typography/Text';
4
+
5
+ interface TagProps extends HTMLAttributes<HTMLDivElement> {
6
+ text: string;
7
+ status: 'idle' | 'success' | 'info' | 'warning' | 'critical';
8
+ size: 'sm' | 'base';
9
+ iconLeft: JSX.Element;
10
+ iconRight: JSX.Element;
11
+ className?: string;
12
+ }
13
+
14
+ /** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=1359-33355&mode=dev */
15
+ export const Tag = ({
16
+ text,
17
+ status = 'idle',
18
+ size = 'base',
19
+ iconLeft,
20
+ iconRight,
21
+ className,
22
+ ...props
23
+ }: TagProps) => {
24
+ const getStatusColor = (): string => {
25
+ if (status === 'idle') {
26
+ return '#FFFFFF';
27
+ } else if (status === 'success') return '#3C743D';
28
+ else if (status === 'info') return '#004799';
29
+ else if (status === 'warning') return '#6E4F00';
30
+ else if (status === 'critical') return '#98312E';
31
+ else return '#004799';
32
+ };
33
+
34
+ const getTagStatus = (): string => {
35
+ if (status === 'idle') {
36
+ return styles.tag_idle;
37
+ } else if (status === 'success') return styles.tag_success;
38
+ else if (status === 'info') return styles.tag_info;
39
+ else if (status === 'warning') return styles.tag_warning;
40
+ else if (status === 'critical') return styles.tag_critical;
41
+ else return styles.tag_idle;
42
+ };
43
+
44
+ const getTagSize = (): string => {
45
+ if (size === 'sm') {
46
+ return styles.tag_sm;
47
+ } else if (size === 'base') return styles.tag_base;
48
+ else return styles.tag_base;
49
+ };
50
+
51
+ return (
52
+ <div
53
+ {...props}
54
+ className={`${styles.tag} ${getTagStatus()} ${getTagSize()} ${
55
+ className ?? ''
56
+ }`}
57
+ >
58
+ {iconLeft && iconLeft}
59
+ <Text size={size} text={text} color={getStatusColor()} />
60
+ {iconRight && iconRight}
61
+ </div>
62
+ );
63
+ };
@@ -0,0 +1,50 @@
1
+ .input {
2
+ min-width: 12.5rem;
3
+ width: 100%;
4
+ font-family: var(--sdFontFamilyOpenSans);
5
+ font-style: normal;
6
+ font-weight: var(--sdFontWeightRegular);
7
+ font-size: var(--sdTypoTextNoDecorationRegularBase);
8
+ line-height: var(--sdLineHeight130);
9
+ letter-spacing: var(--sdLetterSpacingButtons);
10
+ text-align: left;
11
+ margin: unset;
12
+ }
13
+
14
+ input {
15
+ font-style: normal;
16
+ font-weight: var(--sdFontWeightRegular);
17
+ font-size: var(--sdTypoTextNoDecorationRegularBase);
18
+ line-height: var(--sdLineHeight130);
19
+ letter-spacing: var(--sdLetterSpacingButtons);
20
+ text-align: left;
21
+ margin: unset;
22
+ }
23
+
24
+ input.input {
25
+ height: 1rem;
26
+ }
27
+ .MuiInputBase-root-MuiOutlinedInput-root {
28
+ font-family: var(--sdFontFamilyOpenSans);
29
+ font-style: normal;
30
+ font-weight: var(--sdFontWeightRegular);
31
+ font-size: var(--sdTypoTextNoDecorationRegularBase);
32
+ line-height: var(--sdLineHeight130);
33
+ letter-spacing: var(--sdLetterSpacingButtons);
34
+ text-align: left;
35
+ margin: unset;
36
+ }
37
+
38
+ .input_top_label {
39
+ margin-bottom: 0.625rem;
40
+ }
41
+ .input .MuiInputBase-input {
42
+ color: var(--gray-black);
43
+ font-family: 'OpenSans';
44
+ font-size: 1rem;
45
+ padding: 0.375rem 0.75rem;
46
+ }
47
+
48
+ .text-below {
49
+ margin: 0.25rem 0.5rem 0.25rem 0.75rem;
50
+ }
@@ -0,0 +1,212 @@
1
+ import { InputAdornment, TextField } from '@mui/material';
2
+ import { Text } from '../Typography/Text';
3
+ import './TextInput.scss';
4
+ import { styled } from '@mui/material/styles';
5
+
6
+ const CssTextField = styled(TextField)({
7
+ '& .MuiInputBase-input': {
8
+ color: '#26292E',
9
+ fontFamily: 'Open Sans !important',
10
+ fontSize: '1rem',
11
+ },
12
+ '& .MuiInputBase-input.Mui-disabled': {
13
+ color: '#26292E',
14
+ fontFamily: 'Open Sans !important',
15
+ fontSize: '1rem',
16
+ },
17
+ '& .Mui-error': {
18
+ color: '#26292E',
19
+ },
20
+ '& .MuiFormHelperText-root': {
21
+ color: '#F54C4C',
22
+ },
23
+ '& .MuiFormLabel-asterisk': {
24
+ color: '#F54C4C',
25
+ },
26
+ '& .MuiOutlinedInput-root.Mui-disabled': {
27
+ cursor: 'not-allowed',
28
+ color: '#26292E',
29
+ fieldset: {
30
+ borderColor: '#BCBDBE',
31
+ },
32
+ '&:hover fieldset': {
33
+ borderColor: '#66adff',
34
+ },
35
+ },
36
+ '& label': {
37
+ color: '#26292E',
38
+ fontFamily: 'Open Sans !important',
39
+ fontSize: '1rem',
40
+ },
41
+ '& label.Mui-disabled.Mui-error': {
42
+ color: '#26292E',
43
+ opacity: 0.5,
44
+ fontFamily: 'Open Sans !important',
45
+ fontSize: '1rem',
46
+ },
47
+ '& label.Mui-focused': {
48
+ color: '#26292E',
49
+ fontFamily: 'Open Sans',
50
+ fontSize: '1rem',
51
+ backgroundColor: '#fff',
52
+ marginRight: 5,
53
+ paddingRight: 5,
54
+ },
55
+ '& .MuiOutlinedInput-root': {
56
+ fontFamily: 'Open Sans',
57
+ '& fieldset': {
58
+ borderColor: '#96989A',
59
+ },
60
+ '& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button': {
61
+ display: 'none',
62
+ },
63
+ '& input[type=number]': {
64
+ MozAppearance: 'textfield',
65
+ },
66
+ '&:hover fieldset': {
67
+ borderColor: '#0077FF',
68
+ },
69
+ '&.Mui-focused fieldset': {
70
+ borderColor: '#0077FF',
71
+ },
72
+ '&.Mui-error fieldset': {
73
+ borderColor: '#F54C4C',
74
+ },
75
+ '&.Mui-disabled .Mui-focused fieldset': {
76
+ borderColor: 'rgba(0, 119, 255, 0.5)',
77
+ },
78
+ '& .MuiAutocomplete-endAdornment': {
79
+ height: '99%',
80
+ marginTop: '-0.20rem',
81
+ '& .MuiButtonBase-root': {
82
+ height: '99%',
83
+ '&:hover': {
84
+ background: 'transparent',
85
+ },
86
+ },
87
+ },
88
+ },
89
+ });
90
+
91
+ interface InputProps {
92
+ className?: string;
93
+ rightIcon?: JSX.Element;
94
+ leftIcon?: JSX.Element;
95
+ variant?: 'filled' | 'standard' | 'outlined';
96
+ topLabel?: string | undefined;
97
+ placeholder?: string;
98
+ label?: string;
99
+ required?: boolean | undefined;
100
+ name?: string;
101
+ value: string | number;
102
+ onChange: (event: any) => void;
103
+ onBlur?: (event: any) => void;
104
+ onKeyDown?: () => void;
105
+ disabled?: boolean;
106
+ type?: 'number' | 'text' | 'password';
107
+ id?: string;
108
+ helperText?: string;
109
+ errorText?: string;
110
+ error?: boolean;
111
+ multiline?: boolean;
112
+ rows?: number;
113
+ inputProps?: any;
114
+ }
115
+
116
+ /** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=738-5899&mode=dev */
117
+ export const TextInput = (props: InputProps) => {
118
+ const {
119
+ className,
120
+ rightIcon,
121
+ leftIcon,
122
+ variant,
123
+ topLabel,
124
+ placeholder = '',
125
+ label,
126
+ required = false,
127
+ name,
128
+ value,
129
+ onChange,
130
+ onBlur,
131
+ disabled,
132
+ error,
133
+ type,
134
+ id,
135
+ helperText,
136
+ errorText,
137
+ multiline,
138
+ rows,
139
+ inputProps,
140
+ onKeyDown,
141
+ } = props;
142
+
143
+ const endAdornment = rightIcon ? (
144
+ <InputAdornment position="end">{rightIcon}</InputAdornment>
145
+ ) : undefined;
146
+ const startAdornment = leftIcon ? (
147
+ <InputAdornment position="end">{leftIcon}</InputAdornment>
148
+ ) : undefined;
149
+
150
+ const InputLabelProps = label === undefined ? { shrink: false } : {};
151
+
152
+ return (
153
+ <div className={`${className}`} id={id}>
154
+ {topLabel && (
155
+ <Text
156
+ text={`${topLabel ? topLabel : ''}`}
157
+ weight="bold"
158
+ size="base"
159
+ className={'input_top_label'}
160
+ required={required}
161
+ />
162
+ )}
163
+ <CssTextField
164
+ fullWidth
165
+ size="small"
166
+ InputProps={{
167
+ endAdornment,
168
+ startAdornment,
169
+ style: {
170
+ fontFamily: 'OpenSans',
171
+ fontSize: '1rem',
172
+ },
173
+ }}
174
+ InputLabelProps={{
175
+ style: { fontFamily: 'OpenSans', fontSize: '1rem' },
176
+ ...InputLabelProps,
177
+ }}
178
+ inputProps={inputProps}
179
+ variant={variant}
180
+ onChange={onChange}
181
+ label={`${label ? label : ''}`}
182
+ placeholder={`${placeholder}`}
183
+ name={name}
184
+ type={type ?? 'text'}
185
+ value={value ? value : ''}
186
+ disabled={disabled}
187
+ required={required}
188
+ error={error}
189
+ onBlur={onBlur}
190
+ rows={rows}
191
+ multiline={multiline}
192
+ onKeyPress={(e) => {
193
+ if (e.key === 'Enter' && onKeyDown) {
194
+ onKeyDown();
195
+ }
196
+ }}
197
+ />
198
+ {errorText && error && (
199
+ <Text
200
+ size="xs"
201
+ color="#F54C4C"
202
+ italic
203
+ text={errorText}
204
+ className="text-below"
205
+ />
206
+ )}
207
+ {helperText && (
208
+ <Text size="xs" italic text={helperText} className="text-below" />
209
+ )}
210
+ </div>
211
+ );
212
+ };
@@ -0,0 +1,19 @@
1
+ .text_area_container {
2
+ width: 100%;
3
+
4
+ .helperTexts {
5
+ display: flex;
6
+ justify-content: space-between;
7
+ padding: 0.25rem 0.5rem 0.25rem 0.75rem;
8
+
9
+ .counter {
10
+ margin-left: auto;
11
+ }
12
+ }
13
+
14
+ font-family: Open Sans;
15
+ font-size: 1rem;
16
+ font-style: normal;
17
+ font-weight: 400;
18
+ line-height: 150%;
19
+ }
@@ -0,0 +1,88 @@
1
+ import { useState } from 'react';
2
+ import { TextInput } from '../TextInput/TextInput';
3
+ import { Text } from '../Typography/Text';
4
+
5
+ import styles from './Textarea.module.scss';
6
+
7
+ interface TextareaProps {
8
+ className?: string;
9
+ topLabel?: string;
10
+ placeholder?: string;
11
+ label?: string;
12
+ required?: boolean;
13
+ name?: string;
14
+ value: string | number;
15
+ onChange: (event: any) => void;
16
+ onBlur?: (event: any) => void;
17
+ id?: string;
18
+ rows?: number;
19
+ error?: boolean;
20
+ maxCharacters: number;
21
+ errorText?: string;
22
+ helperText?: string;
23
+ disabled?: boolean;
24
+ }
25
+
26
+ /** Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=738-6407&mode=dev */
27
+ export const Textarea = ({
28
+ name,
29
+ label,
30
+ className,
31
+ id,
32
+ onChange,
33
+ onBlur,
34
+ placeholder,
35
+ value,
36
+ rows,
37
+ maxCharacters,
38
+ topLabel,
39
+ errorText,
40
+ helperText,
41
+ error,
42
+ disabled,
43
+ required = false,
44
+ }: TextareaProps) => {
45
+ const [charCount, setCharCount] = useState(0);
46
+
47
+ const handleChange = (e: any) => {
48
+ const newCharCount = e.target.value.length;
49
+ if (newCharCount <= maxCharacters) {
50
+ setCharCount(newCharCount);
51
+ onChange(e);
52
+ }
53
+ };
54
+
55
+ return (
56
+ <div className={styles.text_area_container}>
57
+ <TextInput
58
+ name={name}
59
+ variant="outlined"
60
+ multiline={true}
61
+ label={label}
62
+ rows={rows ? rows : 4}
63
+ placeholder={placeholder}
64
+ className={className}
65
+ id={id}
66
+ onChange={handleChange}
67
+ onBlur={onBlur}
68
+ inputProps={{ maxLength: maxCharacters }}
69
+ topLabel={topLabel ? topLabel : ''}
70
+ value={value}
71
+ error={error}
72
+ required={required}
73
+ disabled={disabled}
74
+ />
75
+ <div className={styles.helperTexts}>
76
+ {helperText && <Text text={helperText} size="xs" weight="regular" />}
77
+ {errorText && error && (
78
+ <Text text={errorText} size="xs" weight="regular" color="#F54C4C" />
79
+ )}
80
+ <Text
81
+ text={`${charCount} / ${maxCharacters}`}
82
+ size="xs"
83
+ className={styles.counter}
84
+ />
85
+ </div>
86
+ </div>
87
+ );
88
+ };
@@ -0,0 +1,24 @@
1
+ .tooltip_layout {
2
+ display: flex;
3
+ padding: 1rem;
4
+ flex-direction: column;
5
+ align-items: flex-start;
6
+ gap: 1rem;
7
+ border-radius: 0.25rem;
8
+ background: var(--color-neutral-basics-white, #fff);
9
+
10
+ &_header {
11
+ display: flex;
12
+ justify-content: space-between;
13
+ align-items: center;
14
+ align-self: stretch;
15
+ }
16
+
17
+ &_actions {
18
+ display: flex;
19
+ justify-content: flex-end;
20
+ align-items: flex-start;
21
+ gap: 0.5rem;
22
+ align-self: stretch;
23
+ }
24
+ }
@@ -0,0 +1,104 @@
1
+ import { Button } from '../../Buttons/Button';
2
+ import { IconButton } from '../../Buttons/IconButton';
3
+ import { Text } from '../../Typography/Text';
4
+ import { Title } from '../../Typography/Title';
5
+
6
+ import styles from './TooltipCustomLayout.module.scss';
7
+
8
+ interface TooltipLayoutProps {
9
+ tooltipTitle: string;
10
+ closeButton?: JSX.Element;
11
+ onClickClose?: () => void;
12
+ tooltipDescription?: string;
13
+ customContent?: JSX.Element;
14
+ buttonOneText?: string;
15
+ buttonTwoText?: string;
16
+ buttonOneVariant?:
17
+ | 'primary'
18
+ | 'secondary'
19
+ | 'tertiary'
20
+ | 'tertiary-alt'
21
+ | 'alert'
22
+ | 'success';
23
+ buttonTwoVariant?:
24
+ | 'primary'
25
+ | 'secondary'
26
+ | 'tertiary'
27
+ | 'tertiary-alt'
28
+ | 'alert'
29
+ | 'success';
30
+ buttonOneIconLeft?: JSX.Element;
31
+ buttonTwoIconLeft?: JSX.Element;
32
+ buttonOneIconRight?: JSX.Element;
33
+ buttonTwoIconRight?: JSX.Element;
34
+ buttonOneOnClick?: () => void;
35
+ buttonTwoOnClick?: () => void;
36
+ }
37
+
38
+ export const TooltipLayout = ({
39
+ tooltipTitle,
40
+ closeButton,
41
+ onClickClose,
42
+ tooltipDescription,
43
+ customContent,
44
+ buttonOneText,
45
+ buttonTwoText,
46
+ buttonOneIconLeft,
47
+ buttonTwoIconLeft,
48
+ buttonOneIconRight,
49
+ buttonTwoIconRight,
50
+ buttonOneVariant,
51
+ buttonTwoVariant,
52
+ buttonOneOnClick,
53
+ buttonTwoOnClick,
54
+ }: TooltipLayoutProps) => {
55
+ return (
56
+ <div className={styles.tooltip_layout}>
57
+ <div>
58
+ <div className={styles.tooltip_layout_header}>
59
+ <Title text={tooltipTitle} size="sm" weight="bold" />
60
+ {closeButton && (
61
+ <IconButton
62
+ icon={closeButton}
63
+ onClick={onClickClose}
64
+ variant="tertiary"
65
+ size="xs"
66
+ />
67
+ )}
68
+ </div>
69
+ {tooltipDescription && (
70
+ <Text
71
+ text={tooltipDescription}
72
+ size="xs"
73
+ className={styles.tooltip_layout_description}
74
+ />
75
+ )}
76
+ {customContent && (
77
+ <div className={styles.tooltip_layout_content}>{customContent}</div>
78
+ )}
79
+ </div>
80
+ <div className={styles.tooltip_layout_actions}>
81
+ {buttonOneText && (
82
+ <Button
83
+ text={buttonOneText}
84
+ size="sm"
85
+ variant={buttonOneVariant}
86
+ onClick={buttonOneOnClick}
87
+ iconLeft={buttonOneIconLeft}
88
+ iconRight={buttonOneIconRight}
89
+ />
90
+ )}
91
+ {buttonTwoText && (
92
+ <Button
93
+ text={buttonTwoText}
94
+ size="sm"
95
+ variant={buttonTwoVariant}
96
+ onClick={buttonTwoOnClick}
97
+ iconLeft={buttonTwoIconLeft}
98
+ iconRight={buttonTwoIconRight}
99
+ />
100
+ )}
101
+ </div>
102
+ </div>
103
+ );
104
+ };