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,139 @@
1
+ import { Tooltip as MTooltip } from '@mui/material';
2
+ import { tooltipClasses } from '@mui/material/Tooltip';
3
+ import { styled } from '@mui/material/styles';
4
+
5
+ import { TooltipLayout } from './Layout/TooltipCustomLayout';
6
+
7
+ import { useState } from 'react';
8
+
9
+ const StyledTooltip = styled(MTooltip)({
10
+ [`& .${tooltipClasses.tooltip}`]: {
11
+ backgroundColor: '#fff',
12
+ },
13
+ });
14
+
15
+ interface TooltipProps {
16
+ placement?:
17
+ | 'bottom-end'
18
+ | 'bottom-start'
19
+ | 'bottom'
20
+ | 'left-end'
21
+ | 'left-start'
22
+ | 'left'
23
+ | 'right-end'
24
+ | 'right-start'
25
+ | 'right'
26
+ | 'top-end'
27
+ | 'top-start'
28
+ | 'top';
29
+ onOpen?: () => void;
30
+ onClose?: () => void;
31
+ title: string;
32
+ closeButton?: JSX.Element;
33
+ tooltipDescription?: string;
34
+ customContent?: JSX.Element;
35
+ buttonOneText?: string;
36
+ buttonTwoText?: string;
37
+ buttonOneVariant?:
38
+ | 'primary'
39
+ | 'secondary'
40
+ | 'tertiary'
41
+ | 'tertiary-alt'
42
+ | 'alert'
43
+ | 'success';
44
+ buttonTwoVariant?:
45
+ | 'primary'
46
+ | 'secondary'
47
+ | 'tertiary'
48
+ | 'tertiary-alt'
49
+ | 'alert'
50
+ | 'success';
51
+ buttonOneIconLeft?: JSX.Element;
52
+ buttonTwoIconLeft?: JSX.Element;
53
+ buttonOneIconRight?: JSX.Element;
54
+ buttonTwoIconRight?: JSX.Element;
55
+ buttonOneOnClick?: () => void;
56
+ buttonTwoOnClick?: () => void;
57
+ arrow?: boolean;
58
+ followCursor?: boolean;
59
+ children: JSX.Element;
60
+ }
61
+
62
+ export const Tooltip = ({
63
+ placement,
64
+ onOpen,
65
+ onClose,
66
+ title,
67
+ closeButton,
68
+ tooltipDescription,
69
+ customContent,
70
+ buttonOneText,
71
+ buttonTwoText,
72
+ buttonOneVariant,
73
+ buttonTwoVariant,
74
+ buttonOneIconLeft,
75
+ buttonTwoIconLeft,
76
+ buttonOneIconRight,
77
+ buttonTwoIconRight,
78
+ buttonOneOnClick,
79
+ buttonTwoOnClick,
80
+ arrow,
81
+ followCursor,
82
+ children,
83
+ }: TooltipProps) => {
84
+ const [open, setOpen] = useState(false);
85
+
86
+ const handleClose = () => {
87
+ setOpen(false);
88
+ onClose && onClose();
89
+ };
90
+
91
+ const handleOpen = () => {
92
+ setOpen(true);
93
+ onOpen && onOpen();
94
+ };
95
+ return (
96
+ <StyledTooltip
97
+ open={open}
98
+ placement={placement}
99
+ onClose={handleClose}
100
+ onOpen={handleOpen}
101
+ componentsProps={{
102
+ tooltip: {
103
+ sx: {
104
+ bgcolor: 'white',
105
+ padding: 0,
106
+ boxShadow:
107
+ '0px 4px 12px 6px rgba(0, 0, 0, 0.08), 0px 4px 4px 0px rgba(0, 0, 0, 0.15)',
108
+ '& .MuiTooltip-arrow': {
109
+ color: 'white',
110
+ },
111
+ },
112
+ },
113
+ }}
114
+ title={
115
+ <TooltipLayout
116
+ tooltipTitle={title}
117
+ closeButton={closeButton}
118
+ onClickClose={handleClose}
119
+ tooltipDescription={tooltipDescription}
120
+ customContent={customContent}
121
+ buttonOneText={buttonOneText}
122
+ buttonTwoText={buttonTwoText}
123
+ buttonOneVariant={buttonOneVariant}
124
+ buttonTwoVariant={buttonTwoVariant}
125
+ buttonOneIconLeft={buttonOneIconLeft}
126
+ buttonTwoIconLeft={buttonTwoIconLeft}
127
+ buttonOneIconRight={buttonOneIconRight}
128
+ buttonTwoIconRight={buttonTwoIconRight}
129
+ buttonOneOnClick={buttonOneOnClick}
130
+ buttonTwoOnClick={buttonTwoOnClick}
131
+ />
132
+ }
133
+ arrow={arrow}
134
+ followCursor={followCursor}
135
+ >
136
+ {children}
137
+ </StyledTooltip>
138
+ );
139
+ };
@@ -1,17 +1,17 @@
1
- @import '../../../example/index.css';
1
+ @import '../../example/index.css';
2
2
 
3
- .text {
3
+ .caption_text {
4
4
  font-family: var(--sdFontFamilyOpenSans);
5
5
  font-style: normal;
6
6
  font-weight: var(--sdFontWeightRegular);
7
7
  font-size: var(--sdFontSizeXs);
8
8
  line-height: var(--sdLineHeight130);
9
- letter-spacing: var(--sdLetterSpacingButtons);
10
- padding: 1px 0px;
9
+ letter-spacing: var(--sdLetterSpacingCaption);
10
+ padding: 0.063rem 0px;
11
11
  text-align: left;
12
12
  margin: unset;
13
13
  }
14
14
 
15
- .text.uppercase {
15
+ .caption_text_uppercase {
16
16
  text-transform: var(--sdTextCaseUppercase);
17
17
  }
@@ -1,5 +1,5 @@
1
- import React, { HTMLAttributes } from 'react';
2
- import './Caption.css';
1
+ import { HTMLAttributes } from 'react';
2
+ import styles from './Caption.modules.scss';
3
3
 
4
4
  interface CaptionProps extends HTMLAttributes<HTMLParagraphElement> {
5
5
  /** Text display in the caption */
@@ -9,7 +9,9 @@ interface CaptionProps extends HTMLAttributes<HTMLParagraphElement> {
9
9
  uppercase?: boolean;
10
10
  }
11
11
 
12
- /** This text should only be used for the captions */
12
+ /** This text should only be used for the captions
13
+ * Figma link :https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-796&mode=dev
14
+ */
13
15
  export const Caption = ({
14
16
  text = 'Caption text',
15
17
  color = 'black',
@@ -21,7 +23,9 @@ export const Caption = ({
21
23
  <p
22
24
  {...props}
23
25
  style={{ color: color }}
24
- className={`text ${uppercase && 'uppercase'} ${className}`}
26
+ className={`${styles.caption_text} ${
27
+ uppercase ? styles.caption_text_uppercase : ''
28
+ } ${className ?? ''}`}
25
29
  >
26
30
  {text}
27
31
  </p>
@@ -0,0 +1,140 @@
1
+ @import '../../example/index.css';
2
+
3
+ .link {
4
+ font-family: var(--sdFontFamilyOpenSans);
5
+ font-style: normal;
6
+ font-weight: var(--sdFontWeightRegular);
7
+ font-size: var(--sdFontSizeXs);
8
+ line-height: var(--sdLineHeight130);
9
+ letter-spacing: var(--sdLetterSpacingButtons);
10
+ text-align: left;
11
+ margin: unset;
12
+ text-decoration: var(--sdUnderline);
13
+ cursor: pointer;
14
+ }
15
+
16
+ /* Regular */
17
+
18
+ .link.link_xs.link_regular {
19
+ font: var(--sdTypoTextUnderlineRegularXs);
20
+ padding: 1px 0px;
21
+ }
22
+
23
+ .link.link_sm.link_regular {
24
+ font: var(--sdTypoTextUnderlineRegularSm);
25
+ padding: 1px 0px 3px;
26
+ }
27
+
28
+ .link.link_base.link_regular {
29
+ font: var(--sdTypoTextUnderlineRegularBase);
30
+ padding: 2px 0px;
31
+ }
32
+
33
+ .link.link_lg.link_regular {
34
+ font: var(--sdTypoTextUnderlineRegularLg);
35
+ padding: 2px 0px;
36
+ }
37
+
38
+ .link.link_xl.link_regular {
39
+ font: var(--sdTypoTextUnderlineRegularXl);
40
+ padding: 1px 0px 3px;
41
+ }
42
+
43
+ .link.link_xxl.link_regular {
44
+ font: var(--sdTypoTextUnderlineRegular2xl);
45
+ padding: 0px;
46
+ }
47
+
48
+ .link.link_xxxl.link_regular {
49
+ font: var(--sdTypoTextUnderlineRegular3xl);
50
+ padding: 1px 0px 3px;
51
+ }
52
+
53
+ .link.link_xxxxl.link_regular {
54
+ font: var(--sdTypoTextUnderlineRegular4xl);
55
+ padding: 3px 0px 1px;
56
+ }
57
+
58
+ /* Bold */
59
+
60
+ .link.link_xs.link_bold {
61
+ font: var(--sdTypoTextUnderlineBoldXs);
62
+ padding: 1px 0px 2px;
63
+ }
64
+
65
+ .link.link_sm.link_bold {
66
+ font: var(--sdTypoTextUnderlineBoldSm);
67
+ padding: 1px 0px 3px;
68
+ }
69
+
70
+ .link.link_base.link_bold {
71
+ font: var(--sdTypoTextUnderlineBoldBase);
72
+ padding: 2px 0px;
73
+ }
74
+
75
+ .link.link_lg.link_bold {
76
+ font: var(--sdTypoTextUnderlineBoldLg);
77
+ padding: 2px 0px;
78
+ }
79
+
80
+ .link.link_xl.link_bold {
81
+ font: var(--sdTypoTextUnderlineBoldXl);
82
+ padding: 1px 0px 3px;
83
+ }
84
+
85
+ .link.link_xxl.link_bold {
86
+ font: var(--sdTypoTextUnderlineBold2xl);
87
+ padding: 0px;
88
+ }
89
+
90
+ .link.link_xxxl.link_bold {
91
+ font: var(--sdTypoTextUnderlineBold3xl);
92
+ padding: 1px 0px 3px;
93
+ }
94
+
95
+ .link.link_xxxxl.link_bold {
96
+ font: var(--sdTypoTextUnderlineBold4xl);
97
+ padding: 3px 0px 1px;
98
+ }
99
+
100
+ /* Semi Bold */
101
+
102
+ .link.link_xs.link_semi_bold {
103
+ font: var(--sdTypoTextUnderlineSemiBoldXs);
104
+ padding: 1px 0px 2px;
105
+ }
106
+
107
+ .link.link_sm.link_semi_bold {
108
+ font: var(--sdTypoTextUnderlineSemiBoldSm);
109
+ padding: 1px 0px 3px;
110
+ }
111
+
112
+ .link.link_base.link_semi_bold {
113
+ font: var(--sdTypoTextUnderlineSemiBoldBase);
114
+ padding: 2px 0px;
115
+ }
116
+
117
+ .link.link_lg.link_semi_bold {
118
+ font: var(--sdTypoTextUnderlineSemiBoldLg);
119
+ padding: 2px 0px;
120
+ }
121
+
122
+ .link.link_xl.link_semi_bold {
123
+ font: var(--sdTypoTextUnderlineSemiBoldXl);
124
+ padding: 1px 0px 3px;
125
+ }
126
+
127
+ .link.link_xxl.link_semi_bold {
128
+ font: var(--sdTypoTextUnderlineSemiBold2xl);
129
+ padding: 0px;
130
+ }
131
+
132
+ .link.link_xxxl.link_semi_bold {
133
+ font: var(--sdTypoTextUnderlineSemiBold3xl);
134
+ padding: 1px 0px 3px;
135
+ }
136
+
137
+ .link.link_xxxxl.link_semi_bold {
138
+ font: var(--sdTypoTextUnderlineSemiBold4xl);
139
+ padding: 3px 0px 1px;
140
+ }
@@ -0,0 +1,73 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import styles from './Link.modules.scss';
3
+
4
+ interface LinkProps extends HTMLAttributes<HTMLParagraphElement> {
5
+ /** Text display */
6
+ text: string;
7
+ link: string;
8
+ size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | 'xxl' | 'xxxl' | 'xxxxl';
9
+ color?: string;
10
+ weight?: 'semi-bold' | 'bold' | 'regular';
11
+ className?: string;
12
+ isExternal?: boolean;
13
+ }
14
+
15
+ /** This text should be use to display basic text */
16
+ export const Link = ({
17
+ text,
18
+ link,
19
+ size = 'base',
20
+ color = '#0077FF',
21
+ weight = 'regular',
22
+ className,
23
+ isExternal = true,
24
+ ...props
25
+ }: LinkProps) => {
26
+ const getLinkSize = (): string => {
27
+ if (size === 'xs') return styles.link_xs;
28
+ else if (size === 'sm') return styles.link_sm;
29
+ else if (size === 'base') return styles.link_base;
30
+ else if (size === 'lg') return styles.link_lg;
31
+ else if (size === 'xl') return styles.link_xl;
32
+ else if (size === 'xxl') return styles.link_xxl;
33
+ else if (size === 'xxxl') return styles.link_xxxl;
34
+ else if (size === 'xxxxl') return styles.link_xxxxl;
35
+ else return styles.link_base;
36
+ };
37
+ const getLinkWeight = (): string => {
38
+ if (weight === 'semi-bold') return styles.link_semi_bold;
39
+ else if (weight === 'bold') return styles.link_bold;
40
+ else if (weight === 'regular') return styles.link_regular;
41
+ else return styles.link_regular;
42
+ };
43
+
44
+ if (isExternal) {
45
+ return (
46
+ <a href={link} target="_blank" rel="noopener noreferrer">
47
+ <p
48
+ {...props}
49
+ style={{ color: color }}
50
+ className={`${
51
+ styles.link
52
+ } ${getLinkWeight()} ${className} ${getLinkSize()}`}
53
+ >
54
+ {text}
55
+ </p>
56
+ </a>
57
+ );
58
+ } else {
59
+ return (
60
+ <a href={link}>
61
+ <p
62
+ {...props}
63
+ style={{ color: color }}
64
+ className={`${
65
+ styles.link
66
+ } ${getLinkWeight()} ${className} ${getLinkSize()}`}
67
+ >
68
+ {text}
69
+ </p>
70
+ </a>
71
+ );
72
+ }
73
+ };
@@ -0,0 +1,277 @@
1
+ @import '../../example/index.css';
2
+
3
+ .text {
4
+ font-family: var(--sdFontFamilyOpenSans);
5
+ font-style: normal;
6
+ font-weight: var(--sdFontWeightRegular);
7
+ font-size: var(--sdFontSizeXs);
8
+ line-height: var(--sdLineHeight130);
9
+ letter-spacing: var(--sdLetterSpacingButtons);
10
+ text-align: left;
11
+ margin: unset;
12
+ }
13
+
14
+ .text_underline {
15
+ text-decoration: var(--sdUnderline);
16
+ }
17
+
18
+ .text_line_through {
19
+ text-decoration: var(--sdLineThrough);
20
+ }
21
+
22
+ .text_required::after {
23
+ content: ' *';
24
+ color: red;
25
+ }
26
+
27
+ /* Regular */
28
+
29
+ .text.text_xs.text_regular {
30
+ font: var(--sdTypoTextNoDecorationRegularXs);
31
+ padding: 0.063rem 0px;
32
+ }
33
+
34
+ .text.text_sm.text_regular {
35
+ font: var(--sdTypoTextNoDecorationRegularSm);
36
+ padding: 0.063rem 0px 0.188rem;
37
+ }
38
+
39
+ .text.text_base.text_regular {
40
+ font: var(--sdTypoTextNoDecorationRegularBase);
41
+ padding: 0.125rem 0px;
42
+ }
43
+
44
+ .text.text_lg.text_regular {
45
+ font: var(--sdTypoTextNoDecorationRegularLg);
46
+ padding: 0.125rem 0px;
47
+ }
48
+
49
+ .text.text_xl.text_regular {
50
+ font: var(--sdTypoTextNoDecorationRegularXl);
51
+ padding: 0.063rem 0px 0.188rem;
52
+ }
53
+
54
+ .text.text_xxl.text_regular {
55
+ font: var(--sdTypoTextNoDecorationRegular2xl);
56
+ padding: 0px;
57
+ }
58
+
59
+ .text.text_xxxl.text_regular {
60
+ font: var(--sdTypoTextNoDecorationRegular3xl);
61
+ padding: 0.063rem 0px 0.188rem;
62
+ }
63
+
64
+ .text.text_xxxxl.text_regular {
65
+ font: var(--sdTypoTextNoDecorationRegular4xl);
66
+ padding: 0.188rem 0px 0.063rem;
67
+ }
68
+
69
+ /* Regular Italic */
70
+
71
+ .text.text_xs.text_regular.text_italic {
72
+ font: var(--sdTypoTextNoDecorationItalicXs);
73
+ padding: 0.063rem 0px 0.125rem;
74
+ }
75
+
76
+ .text.text_sm.text_regular.text_italic {
77
+ font: var(--sdTypoTextNoDecorationItalicSm);
78
+ padding: 0.063rem 0px 0.188rem;
79
+ }
80
+
81
+ .text.text_base.text_regular.text_italic {
82
+ font: var(--sdTypoTextNoDecorationItalicBase);
83
+ padding: 0.125rem 0px;
84
+ }
85
+
86
+ .text.text_lg.text_regular.text_italic {
87
+ font: var(--sdTypoTextNoDecorationItalicLg);
88
+ padding: 0.125rem 0px;
89
+ }
90
+
91
+ .text.text_xl.text_regular.text_italic {
92
+ font: var(--sdTypoTextNoDecorationItalicXl);
93
+ padding: 0.063rem 0px 0.188rem;
94
+ }
95
+
96
+ .text.text_xxl.text_regular.text_italic {
97
+ font: var(--sdTypoTextNoDecorationItalic2xl);
98
+ padding: 0px;
99
+ }
100
+
101
+ .text.text_xxxl.text_regular.text_italic {
102
+ font: var(--sdTypoTextNoDecorationItalic3xl);
103
+ padding: 0.063rem 0px 0.188rem;
104
+ }
105
+
106
+ .text.text_xxxxl.text_regular.text_italic {
107
+ font: var(--sdTypoTextNoDecorationItalic4xl);
108
+ padding: 0.188rem 0px 0.063rem;
109
+ }
110
+
111
+ /* Bold */
112
+
113
+ .text.text_xs.text_bold {
114
+ font: var(--sdTypoTextNoDecorationBoldXs);
115
+ padding: 0.063rem 0px 0.125rem;
116
+ }
117
+
118
+ .text.text_sm.text_bold {
119
+ font: var(--sdTypoTextNoDecorationBoldSm);
120
+ padding: 0.063rem 0px 0.188rem;
121
+ }
122
+
123
+ .text.text_base.text_bold {
124
+ font: var(--sdTypoTextNoDecorationBoldBase);
125
+ padding: 0.125rem 0px;
126
+ }
127
+
128
+ .text.text_lg.text_bold {
129
+ font: var(--sdTypoTextNoDecorationBoldLg);
130
+ padding: 0.125rem 0px;
131
+ }
132
+
133
+ .text.text_xl.text_bold {
134
+ font: var(--sdTypoTextNoDecorationBoldXl);
135
+ padding: 0.063rem 0px 0.188rem;
136
+ }
137
+
138
+ .text.text_xxl.text_bold {
139
+ font: var(--sdTypoTextNoDecorationBold2xl);
140
+ padding: 0px;
141
+ }
142
+
143
+ .text.text_xxxl.text_bold {
144
+ font: var(--sdTypoTextNoDecorationBold3xl);
145
+ padding: 0.063rem 0px 0.188rem;
146
+ }
147
+
148
+ .text.text_xxxxl.text_bold {
149
+ font: var(--sdTypoTextNoDecorationBold4xl);
150
+ padding: 0.188rem 0px 0.063rem;
151
+ }
152
+
153
+ /* Bold Italic */
154
+
155
+ .text.text_xs.text_bold.text_italic {
156
+ font: var(--sdTypoTextNoDecorationBoldItalicXs);
157
+ padding: 0.063rem 0px 0.125rem;
158
+ }
159
+
160
+ .text.text_sm.text_bold.text_italic {
161
+ font: var(--sdTypoTextNoDecorationBoldItalicSm);
162
+ padding: 0.063rem 0px 0.188rem;
163
+ }
164
+
165
+ .text.text_base.text_bold.text_italic {
166
+ font: var(--sdTypoTextNoDecorationBoldItalicBase);
167
+ padding: 0.125rem 0px;
168
+ }
169
+
170
+ .text.text_lg.text_bold.text_italic {
171
+ font: var(--sdTypoTextNoDecorationBoldItalicLg);
172
+ padding: 0.125rem 0px;
173
+ }
174
+
175
+ .text.text_xl.text_bold.text_italic {
176
+ font: var(--sdTypoTextNoDecorationBoldItalicXl);
177
+ padding: 0.063rem 0px 0.188rem;
178
+ }
179
+
180
+ .text.text_xxl.text_bold.text_italic {
181
+ font: var(--sdTypoTextNoDecorationBoldItalic2xl);
182
+ padding: 0px;
183
+ }
184
+
185
+ .text.text_xxxl.text_bold.text_italic {
186
+ font: var(--sdTypoTextNoDecorationBoldItalic3xl);
187
+ padding: 0.063rem 0px 0.188rem;
188
+ }
189
+
190
+ .text.text_xxxxl.text_bold.text_italic {
191
+ font: var(--sdTypoTextNoDecorationBoldItalic4xl);
192
+ padding: 0.188rem 0px 0.063rem;
193
+ }
194
+
195
+ /* Semi Bold */
196
+
197
+ .text.text_xs.text_semi_bold {
198
+ font: var(--sdTypoTextNoDecorationSemiBoldXs);
199
+ padding: 0.063rem 0px 0.125rem;
200
+ }
201
+
202
+ .text.text_sm.text_semi_bold {
203
+ font: var(--sdTypoTextNoDecorationSemiBoldSm);
204
+ padding: 0.063rem 0px 0.188rem;
205
+ }
206
+
207
+ .text.text_base.text_semi_bold {
208
+ font: var(--sdTypoTextNoDecorationSemiBoldBase);
209
+ padding: 0.125rem 0px;
210
+ }
211
+
212
+ .text.text_lg.text_semi_bold {
213
+ font: var(--sdTypoTextNoDecorationSemiBoldLg);
214
+ padding: 0.125rem 0px;
215
+ }
216
+
217
+ .text.text_xl.text_semi_bold {
218
+ font: var(--sdTypoTextNoDecorationSemiBoldXl);
219
+ padding: 0.063rem 0px 0.188rem;
220
+ }
221
+
222
+ .text.text_xxl.text_semi_bold {
223
+ font: var(--sdTypoTextNoDecorationSemiBold2xl);
224
+ padding: 0px;
225
+ }
226
+
227
+ .text.text_xxxl.text_semi_bold {
228
+ font: var(--sdTypoTextNoDecorationSemiBold3xl);
229
+ padding: 0.063rem 0px 0.188rem;
230
+ }
231
+
232
+ .text.text_xxxxl.text_semi_bold {
233
+ font: var(--sdTypoTextNoDecorationSemiBold4xl);
234
+ padding: 0.188rem 0px 0.063rem;
235
+ }
236
+
237
+ /* Semi Bold Italic */
238
+
239
+ .text.text_xs.text_semi_bold.text_italic {
240
+ font: var(--sdTypoTextNoDecorationSemiBoldItalicXs);
241
+ padding: 0.063rem 0px 0.125rem;
242
+ }
243
+
244
+ .text.text_sm.text_semi_bold.text_italic {
245
+ font: var(--sdTypoTextNoDecorationSemiBoldItalicSm);
246
+ padding: 0.063rem 0px 0.188rem;
247
+ }
248
+
249
+ .text.text_base.text_semi_bold.text_italic {
250
+ font: var(--sdTypoTextNoDecorationSemiBoldItalicBase);
251
+ padding: 0.125rem 0px;
252
+ }
253
+
254
+ .text.text_lg.text_semi_bold.text_italic {
255
+ font: var(--sdTypoTextNoDecorationSemiBoldItalicLg);
256
+ padding: 0.125rem 0px;
257
+ }
258
+
259
+ .text.text_xl.text_semi_bold.text_italic {
260
+ font: var(--sdTypoTextNoDecorationSemiBoldItalicXl);
261
+ padding: 0.063rem 0px 0.188rem;
262
+ }
263
+
264
+ .text.text_xxl.text_semi_bold.text_italic {
265
+ font: var(--sdTypoTextNoDecorationSemiBoldItalic2xl);
266
+ padding: 0px;
267
+ }
268
+
269
+ .text.text_xxxl.text_semi_bold.text_italic {
270
+ font: var(--sdTypoTextNoDecorationSemiBoldItalic3xl);
271
+ padding: 0.063rem 0px 0.188rem;
272
+ }
273
+
274
+ .text.text_xxxxl.text_semi_bold.text_italic {
275
+ font: var(--sdTypoTextNoDecorationSemiBoldItalic4xl);
276
+ padding: 0.188rem 0px 0.063rem;
277
+ }