@mindly/ui-components 3.1.4 → 3.1.5

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 (118) hide show
  1. package/dist/fonts/Lato-Bold.ttf +0 -0
  2. package/dist/fonts/Lato-Regular.ttf +0 -0
  3. package/dist/fonts/Lato-Semibold.ttf +0 -0
  4. package/dist/index.ts +106 -0
  5. package/dist/lib/AppHeader/AppHeader.style.ts +19 -0
  6. package/dist/lib/AppHeader/AppHeader.tsx +23 -0
  7. package/dist/lib/AppHeader/index.ts +1 -0
  8. package/dist/lib/Avatar/Avatar.style.ts +17 -0
  9. package/dist/lib/Avatar/Avatar.tsx +46 -0
  10. package/dist/lib/Avatar/index.ts +1 -0
  11. package/dist/lib/Container/Container.styled.ts +15 -0
  12. package/dist/lib/Container/Container.tsx +15 -0
  13. package/dist/lib/Container/index.ts +1 -0
  14. package/dist/lib/EntryNotFound/EntryNotFound.style.ts +14 -0
  15. package/dist/lib/EntryNotFound/EntryNotFound.tsx +21 -0
  16. package/dist/lib/EntryNotFound/calendar.svg +69 -0
  17. package/dist/lib/EntryNotFound/index.ts +1 -0
  18. package/dist/lib/Filters/ListSelect/ListSelect.style.ts +38 -0
  19. package/dist/lib/Filters/ListSelect/ListSelect.tsx +48 -0
  20. package/dist/lib/Filters/ListSelect/index.ts +1 -0
  21. package/dist/lib/Filters/Range/Range.style.ts +41 -0
  22. package/dist/lib/Filters/Range/Range.tsx +48 -0
  23. package/dist/lib/Filters/Range/index.ts +1 -0
  24. package/dist/lib/Filters/RowSelect/RowSelect.style.ts +30 -0
  25. package/dist/lib/Filters/RowSelect/RowSelect.tsx +38 -0
  26. package/dist/lib/Filters/RowSelect/index.ts +1 -0
  27. package/dist/lib/Filters/Toggle/Toggle.style.ts +14 -0
  28. package/dist/lib/Filters/Toggle/Toggle.tsx +26 -0
  29. package/dist/lib/Filters/Toggle/index.ts +1 -0
  30. package/dist/lib/HorisontalCalendar/HorizontalCalendar.styled.ts +117 -0
  31. package/dist/lib/HorisontalCalendar/HorizontalCalendar.tsx +213 -0
  32. package/dist/lib/HorisontalCalendar/index.ts +1 -0
  33. package/dist/lib/ImageWithFallback/ImageWithFallback.tsx +37 -0
  34. package/dist/lib/LetterAvatar/LetterAvatar.styled.ts +32 -0
  35. package/dist/lib/LetterAvatar/LetterAvatar.tsx +23 -0
  36. package/dist/lib/Modal/Modal.style.ts +12 -0
  37. package/dist/lib/Modal/Modal.tsx +30 -0
  38. package/dist/lib/Modal/index.ts +1 -0
  39. package/dist/lib/ModalCalendar/ModalCalendar.styled.ts +123 -0
  40. package/dist/lib/ModalCalendar/ModalCalendar.tsx +71 -0
  41. package/dist/lib/PersonDateTimeCard/PersonDateTimeCard.styled.ts +36 -0
  42. package/dist/lib/PersonDateTimeCard/PersonDateTimeCard.tsx +32 -0
  43. package/dist/lib/Segment/Segment.style.ts +14 -0
  44. package/dist/lib/Segment/Segment.tsx +29 -0
  45. package/dist/lib/Segment/index.ts +2 -0
  46. package/dist/lib/Segment/types.ts +4 -0
  47. package/dist/lib/SelectImpressionEmoji/ImpressionEmojiEnum.ts +9 -0
  48. package/dist/lib/SelectImpressionEmoji/SelectImpressionEmoji.styled.ts +28 -0
  49. package/dist/lib/SelectImpressionEmoji/SelectImpressionEmoji.tsx +56 -0
  50. package/dist/lib/SelectImpressionEmoji/SelectImpressionEmojiProps.ts +8 -0
  51. package/dist/lib/SelectImpressionEmoji/emojis.ts +9 -0
  52. package/dist/lib/SelectImpressionEmoji/index.tsx +14 -0
  53. package/dist/lib/Theme/global.css +251 -0
  54. package/dist/lib/Theme/mindly_constants.ts +23 -0
  55. package/dist/lib/UsersPsychologistScrollList/UserPsychologistScrollList.styled.ts +61 -0
  56. package/dist/lib/UsersPsychologistScrollList/UsersPsychologistScrollList.tsx +68 -0
  57. package/dist/lib/archived-consultation-card/ArchivedConsultation.test.tsx +9 -0
  58. package/dist/lib/archived-consultation-card/ArchivedConsultationCard.style.ts +72 -0
  59. package/dist/lib/archived-consultation-card/ArchivedConsultationCard.svg +3 -0
  60. package/dist/lib/archived-consultation-card/ArchivedConsultationCard.tsx +61 -0
  61. package/dist/lib/button/Button.style.ts +170 -0
  62. package/dist/lib/button/Button.test.tsx +39 -0
  63. package/dist/lib/button/Button.tsx +47 -0
  64. package/dist/lib/consultation-card/ConsultationCard.style.ts +119 -0
  65. package/dist/lib/consultation-card/ConsultationCard.test.tsx +65 -0
  66. package/dist/lib/consultation-card/ConsultationCard.tsx +155 -0
  67. package/dist/lib/consultation-card/ConsultationCardSkeleton.tsx +114 -0
  68. package/dist/lib/consultation-card/index.ts +2 -0
  69. package/dist/lib/content-card/ContentCard.style.ts +59 -0
  70. package/dist/lib/content-card/ContentCard.test.tsx +29 -0
  71. package/dist/lib/content-card/ContentCard.tsx +81 -0
  72. package/dist/lib/date-picker/DatePicker.style.ts +52 -0
  73. package/dist/lib/date-picker/DatePicker.test.tsx +9 -0
  74. package/dist/lib/date-picker/DatePicker.tsx +59 -0
  75. package/dist/lib/floating-button/FloatingButton.style.ts +21 -0
  76. package/dist/lib/floating-button/FloatingButton.test.tsx +9 -0
  77. package/dist/lib/floating-button/FloatingButton.tsx +29 -0
  78. package/dist/lib/floating-button/floating button.svg +6 -0
  79. package/dist/lib/footer-for-booking/FooterForBooking.style.ts +56 -0
  80. package/dist/lib/footer-for-booking/FooterForBooking.test.tsx +30 -0
  81. package/dist/lib/footer-for-booking/FooterForBooking.tsx +53 -0
  82. package/dist/lib/input/Input.style.ts +37 -0
  83. package/dist/lib/input/Input.test.tsx +21 -0
  84. package/dist/lib/input/Input.tsx +73 -0
  85. package/dist/lib/list-button/ListButton.style.ts +21 -0
  86. package/dist/lib/list-button/ListButton.test.tsx +26 -0
  87. package/dist/lib/list-button/ListButton.tsx +30 -0
  88. package/dist/lib/navigation-bar/NavigationBar.style.ts +81 -0
  89. package/dist/lib/navigation-bar/NavigationBar.test.tsx +15 -0
  90. package/dist/lib/navigation-bar/NavigationBar.tsx +31 -0
  91. package/dist/lib/no-internet-connection/NoInternetConnection.style.ts +26 -0
  92. package/dist/lib/no-internet-connection/NoInternetConnection.svg +10 -0
  93. package/dist/lib/no-internet-connection/NoInternetConnection.test.tsx +9 -0
  94. package/dist/lib/no-internet-connection/NoInternetConnection.tsx +30 -0
  95. package/dist/lib/notes-card-text/NotesCardText.style.ts +14 -0
  96. package/dist/lib/notes-card-text/NotesCardText.tsx +32 -0
  97. package/dist/lib/notes-card-text/index.ts +1 -0
  98. package/dist/lib/notes-editor/NotesEditor.styled.ts +24 -0
  99. package/dist/lib/notes-editor/NotesEditor.tsx +16 -0
  100. package/dist/lib/scroll-tabs/ScrollTabs.style.ts +19 -0
  101. package/dist/lib/scroll-tabs/ScrollTabs.test.tsx +9 -0
  102. package/dist/lib/scroll-tabs/ScrollTabs.tsx +42 -0
  103. package/dist/lib/tab-bar/TabBar.style.tsx +43 -0
  104. package/dist/lib/tab-bar/TabBar.tsx +11 -0
  105. package/dist/lib/therapist-card/TherapistCard.style.ts +104 -0
  106. package/dist/lib/therapist-card/TherapistCard.test.tsx +40 -0
  107. package/dist/lib/therapist-card/TherapistCard.tsx +96 -0
  108. package/dist/lib/therapist-information-component/TherapistInformationComponent.style.ts +40 -0
  109. package/dist/lib/therapist-information-component/TherapistInformationComponent.test.tsx +16 -0
  110. package/dist/lib/therapist-information-component/TherapistInformationComponent.tsx +51 -0
  111. package/dist/lib/toast/index.css +13 -0
  112. package/dist/lib/toast/toast.ts +17 -0
  113. package/dist/lib/userAppTypes.ts +261 -0
  114. package/dist/lib/your-local-time-block/YourLocalTimeBlock.styled.ts +28 -0
  115. package/dist/lib/your-local-time-block/YourLocalTimeBlock.tsx +26 -0
  116. package/dist/react-app-env.d.ts +1 -0
  117. package/dist/svg.d.ts +13 -0
  118. package/package.json +4 -17
@@ -0,0 +1,251 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
2
+
3
+ * {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ body {
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ span,
13
+ p {
14
+ font-family: 'Inter', sans-serif;
15
+ font-size: 10px;
16
+ line-height: 14px;
17
+ margin: 0;
18
+ font-weight: 400;
19
+ padding: 0;
20
+ }
21
+
22
+ h5 {
23
+ font-family: 'Inter', sans-serif;
24
+ margin: 0;
25
+ padding: 0;
26
+ font-size: 14px;
27
+ font-weight: 400;
28
+ line-height: 16px;
29
+ }
30
+
31
+ h4 {
32
+ font-family: 'Inter', sans-serif;
33
+ margin: 0;
34
+ padding: 0;
35
+ font-size: 16px;
36
+ font-weight: 400;
37
+ line-height: 24px;
38
+ }
39
+
40
+ h3 {
41
+ font-family: 'Inter', sans-serif;
42
+ margin: 0;
43
+ padding: 0;
44
+ font-size: 18px;
45
+ font-weight: 400;
46
+ line-height: 24px;
47
+ }
48
+
49
+ h2 {
50
+ font-family: 'Inter', sans-serif;
51
+ margin: 0;
52
+ padding: 0;
53
+ font-size: 20px;
54
+ font-weight: 400;
55
+ line-height: 24px;
56
+ }
57
+
58
+ h1 {
59
+ font-family: 'Inter', sans-serif;
60
+ margin: 0;
61
+ padding: 0;
62
+ font-weight: 400;
63
+ font-size: 24px;
64
+ line-height: 32px;
65
+ }
66
+
67
+ span.semiBold,
68
+ p.semiBold {
69
+ font-family: 'Inter', sans-serif;
70
+ font-size: 10px;
71
+ line-height: 14px;
72
+ margin: 0;
73
+ padding: 0;
74
+ font-weight: 600;
75
+ }
76
+
77
+ h5.semiBold {
78
+ font-family: 'Inter', sans-serif;
79
+ margin: 0;
80
+ padding: 0;
81
+ font-size: 14px;
82
+ line-height: 16px;
83
+ font-weight: 600;
84
+ }
85
+
86
+ h4.semiBold {
87
+ font-family: 'Inter', sans-serif;
88
+ margin: 0;
89
+ padding: 0;
90
+ font-size: 16px;
91
+ line-height: 24px;
92
+ font-weight: 600;
93
+ }
94
+
95
+ h3.semiBold {
96
+ font-family: 'Inter', sans-serif;
97
+ margin: 0;
98
+ padding: 0;
99
+ font-size: 18px;
100
+ line-height: 24px;
101
+ font-weight: 600;
102
+ }
103
+
104
+ h2.semiBold {
105
+ font-family: 'Inter', sans-serif;
106
+ margin: 0;
107
+ padding: 0;
108
+ font-size: 20px;
109
+ line-height: 24px;
110
+ font-weight: 600;
111
+ }
112
+
113
+ h1.semiBold {
114
+ font-family: 'Inter', sans-serif;
115
+ margin: 0;
116
+ padding: 0;
117
+ font-size: 24px;
118
+ line-height: 32px;
119
+ font-weight: 600;
120
+ }
121
+
122
+ span.bold,
123
+ p.bold {
124
+ font-family: 'Inter', sans-serif;
125
+ font-size: 10px;
126
+ line-height: 14px;
127
+ margin: 0;
128
+ padding: 0;
129
+ font-weight: 700;
130
+ }
131
+
132
+ h5.bold {
133
+ font-family: 'Inter', sans-serif;
134
+ margin: 0;
135
+ padding: 0;
136
+ font-size: 14px;
137
+ line-height: 16px;
138
+ font-weight: 700;
139
+ }
140
+
141
+ h4.bold {
142
+ font-family: 'Inter', sans-serif;
143
+ margin: 0;
144
+ padding: 0;
145
+ font-size: 16px;
146
+ line-height: 24px;
147
+ font-weight: 700;
148
+ }
149
+
150
+ h3.bold {
151
+ font-family: 'Inter', sans-serif;
152
+ margin: 0;
153
+ padding: 0;
154
+ font-size: 18px;
155
+ line-height: 24px;
156
+ font-weight: 700;
157
+ }
158
+
159
+ h2.bold {
160
+ font-family: 'Inter', sans-serif;
161
+ margin: 0;
162
+ padding: 0;
163
+ font-size: 20px;
164
+ line-height: 24px;
165
+ font-weight: 700;
166
+ }
167
+
168
+ h1.bold {
169
+ font-family: 'Inter', sans-serif;
170
+ margin: 0;
171
+ padding: 0;
172
+ font-size: 24px;
173
+ line-height: 32px;
174
+ font-weight: 700;
175
+ }
176
+
177
+ :root {
178
+ /** primary **/
179
+ --ion-color-primary: #21abd2;
180
+ --ion-color-primary-rgb: 33, 171, 210;
181
+ --ion-color-primary-contrast: #000000;
182
+ --ion-color-primary-contrast-rgb: 0, 0, 0;
183
+ --ion-color-primary-shade: #1d96b9;
184
+ --ion-color-primary-tint: #37b3d7;
185
+
186
+ /** secondary **/
187
+ --ion-color-secondary: #1d201f;
188
+ --ion-color-secondary-rgb: 29, 32, 31;
189
+ --ion-color-secondary-contrast: #ffffff;
190
+ --ion-color-secondary-contrast-rgb: 255, 255, 255;
191
+ --ion-color-secondary-shade: #1a1c1b;
192
+ --ion-color-secondary-tint: #343635;
193
+
194
+ /** tertiary **/
195
+ --ion-color-tertiary: #d6f2f9;
196
+ --ion-color-tertiary-rgb: 214, 242, 249;
197
+ --ion-color-tertiary-contrast: #000000;
198
+ --ion-color-tertiary-contrast-rgb: 0, 0, 0;
199
+ --ion-color-tertiary-shade: #bcd5db;
200
+ --ion-color-tertiary-tint: #daf3fa;
201
+
202
+ /** success **/
203
+ --ion-color-success: #478862;
204
+ --ion-color-success-rgb: 71, 136, 98;
205
+ --ion-color-success-contrast: #ffffff;
206
+ --ion-color-success-contrast-rgb: 255, 255, 255;
207
+ --ion-color-success-shade: #3e7856;
208
+ --ion-color-success-tint: #599472;
209
+
210
+ /** warning **/
211
+ --ion-color-warning: #ffc409;
212
+ --ion-color-warning-rgb: 255, 196, 9;
213
+ --ion-color-warning-contrast: #000000;
214
+ --ion-color-warning-contrast-rgb: 0, 0, 0;
215
+ --ion-color-warning-shade: #e0ac08;
216
+ --ion-color-warning-tint: #ffca22;
217
+
218
+ /** danger **/
219
+ --ion-color-danger: #f1646f;
220
+ --ion-color-danger-rgb: 241, 100, 111;
221
+ --ion-color-danger-contrast: #000000;
222
+ --ion-color-danger-contrast-rgb: 0, 0, 0;
223
+ --ion-color-danger-shade: #d45862;
224
+ --ion-color-danger-tint: #f2747d;
225
+
226
+ /** dark **/
227
+ --ion-color-dark: #222428;
228
+ --ion-color-dark-rgb: 34, 36, 40;
229
+ --ion-color-dark-contrast: #ffffff;
230
+ --ion-color-dark-contrast-rgb: 255, 255, 255;
231
+ --ion-color-dark-shade: #1e2023;
232
+ --ion-color-dark-tint: #383a3e;
233
+
234
+ /** medium **/
235
+ --ion-color-medium: #5b5b5b;
236
+ --ion-color-medium-rgb: 91, 91, 91;
237
+ --ion-color-medium-contrast: #ffffff;
238
+ --ion-color-medium-contrast-rgb: 255, 255, 255;
239
+ --ion-color-medium-shade: #505050;
240
+ --ion-color-medium-tint: #6b6b6b;
241
+
242
+ /** light **/
243
+ --ion-color-light: #ffffff;
244
+ --ion-color-light-rgb: 255, 255, 255;
245
+ --ion-color-light-contrast: #000000;
246
+ --ion-color-light-contrast-rgb: 0, 0, 0;
247
+ --ion-color-light-shade: #e0e0e0;
248
+ --ion-color-light-tint: #ffffff;
249
+
250
+ --ion-font-family: 'Inter', sans-serif;
251
+ }
@@ -0,0 +1,23 @@
1
+ export const colorConstants = {
2
+ primaryColor: '#21ABD2',
3
+ secondaryColor: '#F0FBFF',
4
+ primaryTextColor: '#1D201F',
5
+ secondaryTextColor: '#5B5B5B',
6
+ AccentStrokeColor: '#EDEFF2',
7
+ AccentDisabledColor: '#C1C1C1',
8
+ AccentCrossColor: '#A31621',
9
+ AccentTickColor: '#478862',
10
+ AccentInputBgColor: '#F5F9FF',
11
+ AccentTabsBgColor: '#D6F2F9',
12
+ AccentCross: '#f1646f',
13
+ White: '#FFFFFF',
14
+ AccentAchieveBgNew: '#E7E7E7',
15
+ StrokeGray: '#F2F4F7',
16
+ AccentSurveyButton: '#E9F7FB',
17
+ AccentCancelActive: '#F5939A',
18
+ AccentActiveButtonBG: '#90D5E8',
19
+ AccentDivider: '#E5E5E5',
20
+ AccentGrayBlue: '#E8ECF2',
21
+ };
22
+
23
+ export const maxContainerWidth = '410px';
@@ -0,0 +1,61 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const StyledScrollListSectionWrapper = styled.div`
4
+ @media (min-width: 1024px) {
5
+ grid-column: 1 / 3;
6
+ }
7
+
8
+ @media (max-width: 1024px) and (min-width: 600px) {
9
+ max-width: 452px;
10
+ }
11
+ `;
12
+
13
+ export const StyledSectionTitle = styled.div`
14
+ font-weight: 700;
15
+ font-size: 24px;
16
+ line-height: 32px;
17
+ `;
18
+
19
+ export const StyledScrollListWrapper = styled.div`
20
+ display: flex;
21
+ overflow-x: auto;
22
+ scrollbar-width: none;
23
+ &::-webkit-scrollbar {
24
+ display: none;
25
+ }
26
+ `;
27
+
28
+ export const StyledScrollListPsychologist = styled.div`
29
+ min-width: max-content;
30
+ margin-right: 12px;
31
+ cursor: pointer;
32
+ `;
33
+
34
+ export const StyledScrollListPsychologistAvatar = styled.section`
35
+ border: 1px solid #f2f4f7;
36
+ border-radius: 999px;
37
+ height: 72px;
38
+ width: 72px;
39
+ padding: 5px;
40
+ overflow: hidden !important;
41
+ display: flex;
42
+ justify-content: center;
43
+ align-items: center;
44
+ .img {
45
+ border-radius: 99px;
46
+ max-width: max-content;
47
+ min-width: 62px;
48
+ width: 62px;
49
+ height: 62px;
50
+ user-select: none;
51
+ }
52
+ `;
53
+
54
+ export const StyledScrollListPsychologistName = styled.div`
55
+ color: #1d201f;
56
+ font-style: normal;
57
+ font-weight: 600;
58
+ font-size: 12px;
59
+ line-height: 16px;
60
+ text-align: center;
61
+ `;
@@ -0,0 +1,68 @@
1
+ import React, { useState } from 'react';
2
+ import { IonSkeletonText } from '@ionic/react';
3
+ import {
4
+ StyledScrollListSectionWrapper,
5
+ StyledScrollListWrapper,
6
+ StyledScrollListPsychologist,
7
+ StyledScrollListPsychologistAvatar,
8
+ StyledScrollListPsychologistName,
9
+ } from './UserPsychologistScrollList.styled';
10
+ import { PsychologistType } from '../userAppTypes';
11
+
12
+ export type UsersPsychologistScrollListPropsType = {
13
+ psychologistClickHandler: React.Dispatch<
14
+ React.SetStateAction<{
15
+ isShow: boolean;
16
+ psychologist_id: string;
17
+ }>
18
+ >;
19
+ usersPsychologists: Array<PsychologistType> | null;
20
+ };
21
+
22
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
23
+ export const UsersPsychologistScrollList = ({
24
+ psychologistClickHandler,
25
+ usersPsychologists,
26
+ }: UsersPsychologistScrollListPropsType) => {
27
+ const [imageLoaded, setImageLoaded] = useState(false);
28
+
29
+
30
+ if (usersPsychologists && usersPsychologists.length) {
31
+ return (
32
+ <StyledScrollListSectionWrapper>
33
+ <StyledScrollListWrapper>
34
+ {usersPsychologists.map((psychologist) => (
35
+ <StyledScrollListPsychologist
36
+ key={`${psychologist.id}-scroll`}
37
+ onClick={() =>
38
+ psychologistClickHandler({
39
+ isShow: true,
40
+ psychologist_id: psychologist.id,
41
+ })
42
+ }
43
+ >
44
+ <StyledScrollListPsychologistAvatar>
45
+ <img
46
+ className="img"
47
+ src={psychologist.avatar}
48
+ alt={psychologist.first_name}
49
+ onLoad={() => setImageLoaded(true)}
50
+ style={{ display: imageLoaded ? 'block' : 'none' }}
51
+ />
52
+ <IonSkeletonText
53
+ animated
54
+ className="img"
55
+ style={{ display: imageLoaded ? 'none' : 'block' }}
56
+ />
57
+ </StyledScrollListPsychologistAvatar>
58
+ <StyledScrollListPsychologistName>
59
+ {psychologist.first_name}
60
+ </StyledScrollListPsychologistName>
61
+ </StyledScrollListPsychologist>
62
+ ))}
63
+ </StyledScrollListWrapper>
64
+ </StyledScrollListSectionWrapper>
65
+ );
66
+ }
67
+ return null;
68
+ };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import { ArchivedConsultationCard } from './ArchivedConsultationCard';
4
+
5
+ describe('Test archived consultation', () => {
6
+ test('Smoke test', () => {
7
+ render(<ArchivedConsultationCard date="" img="" name="" />);
8
+ });
9
+ });
@@ -0,0 +1,72 @@
1
+ import styled from 'styled-components';
2
+ import { colorConstants } from '../Theme/mindly_constants';
3
+
4
+ export const Container = styled.div`
5
+ overflow: hidden;
6
+ display: flex;
7
+ justify-content: space-between;
8
+ background: ${colorConstants.AccentGrayBlue};
9
+ padding: 8px;
10
+ width: 100%;
11
+ border-radius: 4px;
12
+ `;
13
+
14
+ export const TextContainer = styled.div`
15
+ h3 {
16
+ padding-top: 5px;
17
+ font-weight: 700;
18
+ font-size: 18px;
19
+ line-height: 24px;
20
+ color: ${colorConstants.primaryTextColor};
21
+ }
22
+
23
+ h5 {
24
+ color: ${colorConstants.secondaryTextColor};
25
+ font-weight: 400;
26
+ font-size: 16px;
27
+ line-height: 24px;
28
+ }
29
+
30
+ h5.isFreeStatus {
31
+ font-weight: 700;
32
+ font-size: 12px;
33
+ line-height: 16px;
34
+ text-align: center;
35
+ padding: 2px 8px;
36
+ color: ${colorConstants.primaryTextColor};
37
+ }
38
+
39
+ .greeny-bg {
40
+ max-width: max-content;
41
+ background: #cfe2d7;
42
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
43
+ border-radius: 12px;
44
+ }
45
+
46
+ .reddy-bg {
47
+ max-width: max-content;
48
+ background: #f6dfdf;
49
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
50
+ border-radius: 12px;
51
+ }
52
+
53
+ h5.check {
54
+ margin-top: 5px;
55
+ display: flex;
56
+ align-items: center;
57
+ color: ${colorConstants.AccentTickColor};
58
+ font-weight: 400;
59
+ font-size: 14px;
60
+ line-height: 16px;
61
+ }
62
+
63
+ svg {
64
+ margin-right: 4px;
65
+ }
66
+ `;
67
+
68
+ export const Avatar = styled.img`
69
+ max-width: 94px;
70
+ max-height: 94px;
71
+ border-radius: 8px;
72
+ `;
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.6237 3.67075C12.8056 3.46294 13.1214 3.44188 13.3293 3.62372C13.5342 3.80307 13.5575 4.11281 13.3836 4.32066L13.3763 4.32926L6.37629 12.3293C6.18827 12.5441 5.85953 12.5578 5.65438 12.3613L5.64645 12.3536L2.64645 9.35356C2.45118 9.1583 2.45118 8.84171 2.64645 8.64645C2.839 8.4539 3.14952 8.45123 3.34535 8.63843L3.35355 8.64645L5.97563 11.2685L12.6237 3.67075Z" fill="#478862"/>
3
+ </svg>
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import {
3
+ Avatar,
4
+ Container,
5
+ TextContainer,
6
+ } from './ArchivedConsultationCard.style';
7
+ import { ReactComponent as Icon } from './ArchivedConsultationCard.svg';
8
+ import '../Theme/global.css';
9
+
10
+ export interface ArchivedConsultationCardProps {
11
+ /*
12
+ * Psychologist name and surname
13
+ */
14
+ nameAndSurname: string;
15
+
16
+ /*
17
+ * Start date of the last consultation ( in format day, month, time)
18
+ */
19
+ date: string;
20
+
21
+ /*
22
+ * Psychologist avatar link
23
+ */
24
+ avatar: string;
25
+ /*
26
+ * If that's a free consultation
27
+ */
28
+ isFree?: boolean;
29
+ /**
30
+ * Consultation price
31
+ */
32
+ price: string;
33
+ ['data-testid']?: string;
34
+ }
35
+
36
+ export const ArchivedConsultationCard: React.FC<ArchivedConsultationCardProps> =
37
+ (props) => {
38
+ return (
39
+ <Container data-testid={props['data-testid']}>
40
+ <TextContainer>
41
+ {typeof props.isFree === 'boolean' &&
42
+ (props.isFree ? (
43
+ <div className="reddy-bg">
44
+ <h5 className="isFreeStatus">Безкоштовна</h5>
45
+ </div>
46
+ ) : (
47
+ <div className="greeny-bg">
48
+ <h5 className="isFreeStatus">{`Платна - ${props.price} грн`}</h5>
49
+ </div>
50
+ ))}
51
+ <h3>{props.nameAndSurname}</h3>
52
+ <h5 className="semiBold">{props.date}</h5>
53
+ <h5 className="check">
54
+ <Icon />
55
+ Завершена
56
+ </h5>
57
+ </TextContainer>
58
+ <Avatar src={props.avatar} alt="user-avatar" />
59
+ </Container>
60
+ );
61
+ };