@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,30 @@
1
+ import React from 'react';
2
+ import '../Theme/global.css';
3
+ import { Container, CustomIonIcon } from './ListButton.style';
4
+
5
+ export interface ListButtonProps {
6
+ /*
7
+ * Text inside the button (default React children)
8
+ */
9
+ children: React.ReactNode;
10
+
11
+ /*
12
+ * Link on icon
13
+ */
14
+ icon: string;
15
+
16
+ /*
17
+ * Default React onClick
18
+ */
19
+ onClick: (props?: React.SyntheticEvent) => void;
20
+ ['data-testid']?: string;
21
+ }
22
+
23
+ export const ListButton: React.FC<ListButtonProps> = (props) => {
24
+ return (
25
+ <Container data-testid={props['data-testid']} onClick={props.onClick}>
26
+ <h4>{props.children}</h4>
27
+ <CustomIonIcon src={props.icon} />
28
+ </Container>
29
+ );
30
+ };
@@ -0,0 +1,81 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { IonHeader } from '@ionic/react';
3
+ import { colorConstants } from '../Theme/mindly_constants';
4
+
5
+ interface ContainerProps {
6
+ isIos: boolean;
7
+ isInternetConnected: boolean;
8
+ }
9
+
10
+ export const Container = styled(IonHeader)<ContainerProps>`
11
+ padding: ${(props) =>
12
+ props.isInternetConnected ? '10px 16px' : '40px 16px 16px'};
13
+ background: #ffffff;
14
+ position: fixed;
15
+ z-index: 1000;
16
+ min-height: ${(props) => (props.isInternetConnected ? '44px' : '74px')};
17
+ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
18
+ color: ${colorConstants.secondaryTextColor};
19
+
20
+ @media (min-width: 600px) {
21
+ padding-left: calc((100vw - 468px) / 2);
22
+ padding-right: calc((100vw - 468px) / 2);
23
+ }
24
+
25
+ @media (min-width: 1024px) {
26
+ padding-left: calc((100vw - 960px) / 2);
27
+ padding-right: calc((100vw - 960px) / 2);
28
+ }
29
+
30
+ .left {
31
+ cursor: pointer;
32
+ position: absolute;
33
+ color: ${colorConstants.primaryColor};
34
+ left: 0;
35
+ }
36
+
37
+ .right {
38
+ cursor: pointer;
39
+ color: ${colorConstants.primaryColor};
40
+ position: absolute;
41
+ right: 0;
42
+ }
43
+
44
+ &:after {
45
+ background-image: none;
46
+ }
47
+
48
+ ${(props: ContainerProps) =>
49
+ props.isIos &&
50
+ css`
51
+ padding: ${props.isInternetConnected
52
+ ? '54px 16px 10px'
53
+ : '64px 16px 10px'};
54
+ min-height: ${props.isInternetConnected ? '88px' : '98px'};
55
+
56
+ .left {
57
+ position: absolute;
58
+ left: 0;
59
+ }
60
+
61
+ .right {
62
+ position: absolute;
63
+ right: 0;
64
+ }
65
+ `}
66
+ `;
67
+
68
+ export const PositionRelative = styled.div`
69
+ position: relative;
70
+ display: flex;
71
+ text-align: center;
72
+ justify-content: center;
73
+
74
+ @media (min-width: 600px) {
75
+ width: 468px;
76
+ }
77
+
78
+ @media (min-width: 1024px) {
79
+ width: 960px;
80
+ }
81
+ `;
@@ -0,0 +1,15 @@
1
+ import { render } from '@testing-library/react';
2
+ import React from 'react';
3
+ import { NavigationBar } from './NavigationBar';
4
+
5
+ describe('Test navigation bar', () => {
6
+ test('Smoke test', () => {
7
+ render(
8
+ <NavigationBar isInternetConnected isIos>
9
+ <h3 className="left">first</h3>
10
+ <h3>second</h3>
11
+ <h3 className="right">third</h3>
12
+ </NavigationBar>
13
+ );
14
+ });
15
+ });
@@ -0,0 +1,31 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Container, PositionRelative } from './NavigationBar.style';
3
+ import '../Theme/global.css';
4
+
5
+ export interface NavigationBarProps {
6
+ /*
7
+ * If internet connected, set this props true. Changes the appearance of a component
8
+ */
9
+ isInternetConnected: boolean;
10
+
11
+ /*
12
+ * Here you pass the special HTML structure. All variations can be viewed in the storybook
13
+ */
14
+ children?: ReactNode;
15
+
16
+ /*
17
+ * If platform === ios set this props true
18
+ */
19
+ isIos: boolean;
20
+ }
21
+
22
+ export const NavigationBar: React.FC<NavigationBarProps> = (props) => {
23
+ return (
24
+ <Container
25
+ isIos={props.isIos}
26
+ isInternetConnected={props.isInternetConnected}
27
+ >
28
+ <PositionRelative>{props.children}</PositionRelative>
29
+ </Container>
30
+ );
31
+ };
@@ -0,0 +1,26 @@
1
+ import styled from 'styled-components';
2
+ import { colorConstants } from '../Theme/mindly_constants';
3
+
4
+ interface ContainerProps {
5
+ isInternetConnected: boolean;
6
+ isIos: boolean;
7
+ }
8
+
9
+ export const Container = styled.div<ContainerProps>`
10
+ z-index: 999;
11
+ position: fixed;
12
+ box-sizing: border-box;
13
+ background: ${colorConstants.AccentCross};
14
+ width: 100%;
15
+ display: ${(props) => (props.isInternetConnected ? 'none' : 'flex')};
16
+ justify-content: center;
17
+ align-items: center;
18
+ padding: ${(props) => (props.isIos ? '32px 0 8px' : '8px 0')};
19
+
20
+ span {
21
+ font-size: 10px;
22
+ line-height: 14px;
23
+ margin-left: 8px;
24
+ color: ${colorConstants.White};
25
+ }
26
+ `;
@@ -0,0 +1,10 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7 13.5625C3.38158 13.5625 0.4375 10.6184 0.4375 7C0.4375 3.38158 3.38158 0.4375 7 0.4375C10.6184 0.4375 13.5625 3.38158 13.5625 7C13.5625 10.6184 10.6184 13.5625 7 13.5625Z" fill="#F1646F"/>
3
+ <path d="M7 14C3.14008 14 0 10.8599 0 7C0 3.14008 3.14008 0 7 0C10.8599 0 14 3.14008 14 7C14 10.8599 10.8599 14 7 14ZM7 0.875C3.6225 0.875 0.875 3.6225 0.875 7C0.875 10.3775 3.6225 13.125 7 13.125C10.3775 13.125 13.125 10.3775 13.125 7C13.125 3.6225 10.3775 0.875 7 0.875Z" fill="white"/>
4
+ <path d="M11.509 6.25341C11.3976 6.25341 11.285 6.21083 11.1999 6.12566C10.9362 5.86199 10.6492 5.62458 10.3476 5.41924C10.1475 5.28391 10.095 5.01208 10.2315 4.81199C10.3663 4.61191 10.6381 4.55824 10.8388 4.69591C11.1859 4.93099 11.5155 5.20399 11.8188 5.50616C11.9897 5.67708 11.9897 5.95416 11.8194 6.12566C11.7336 6.21024 11.6216 6.25341 11.509 6.25341Z" fill="white"/>
5
+ <path d="M2.49085 6.25316C2.37943 6.25316 2.26743 6.21058 2.18226 6.12541C2.01076 5.95508 2.0096 5.67799 2.18051 5.50649C3.7911 3.88949 6.0311 3.17666 8.36735 3.63574C8.60418 3.68241 8.75876 3.91283 8.71268 4.14966C8.66601 4.38649 8.43618 4.53758 8.19876 4.49499C6.1466 4.09074 4.2041 4.71433 2.80001 6.12424C2.71485 6.20999 2.60285 6.25316 2.49085 6.25316Z" fill="white"/>
6
+ <path d="M9.93993 7.82829C9.82851 7.82829 9.71593 7.7857 9.63076 7.70054C9.37351 7.44329 9.08359 7.22395 8.77034 7.04954C8.55918 6.9317 8.48393 6.66512 8.60118 6.45395C8.71843 6.24279 8.98501 6.16695 9.19676 6.28479C9.58001 6.49887 9.93468 6.76662 10.2497 7.08045C10.4206 7.25137 10.4206 7.52845 10.2503 7.69995C10.1645 7.7857 10.0519 7.82829 9.93993 7.82829Z" fill="white"/>
7
+ <path d="M4.06016 7.82864C3.94816 7.82864 3.83616 7.78606 3.75099 7.70031C3.58007 7.52939 3.58007 7.25172 3.75099 7.08139C4.37632 6.45664 5.14691 6.03022 5.97932 5.84939C6.21499 5.79747 6.44891 5.94739 6.50024 6.18306C6.55216 6.41931 6.40224 6.65264 6.16657 6.70397C5.49749 6.84981 4.87624 7.19456 4.36991 7.70031C4.28416 7.78606 4.17157 7.82864 4.06016 7.82864Z" fill="white"/>
8
+ <path d="M6.99999 10.4997C6.42599 10.4997 5.92258 10.1135 5.77733 9.56109C5.71608 9.32776 5.85608 9.08801 6.08941 9.02676C6.32099 8.96726 6.56249 9.10492 6.62374 9.33884C6.66866 9.50976 6.81974 9.62467 6.99999 9.62467C7.21874 9.62467 7.39666 9.44676 7.39666 9.22801C7.39666 9.04776 7.28174 8.89726 7.11082 8.85176C6.87749 8.79051 6.73691 8.55076 6.79874 8.31742C6.85999 8.08351 7.10266 7.94642 7.33307 8.00534C7.88549 8.15059 8.27166 8.65284 8.27166 9.22801C8.27166 9.92917 7.70116 10.4997 6.99999 10.4997Z" fill="white"/>
9
+ <path d="M2.36069 12.0764C2.24869 12.0764 2.13669 12.0339 2.05153 11.9481C1.88061 11.7772 1.88061 11.5001 2.05153 11.3292L11.33 2.05128C11.5009 1.88037 11.778 1.88037 11.9489 2.05128C12.1199 2.2222 12.1199 2.49928 11.9489 2.6702L2.66986 11.9481C2.58469 12.0339 2.47269 12.0764 2.36069 12.0764Z" fill="white"/>
10
+ </svg>
@@ -0,0 +1,9 @@
1
+ import { render } from '@testing-library/react';
2
+ import React from 'react';
3
+ import { NoInternetConnection } from './NoInternetConnection';
4
+
5
+ describe('Test no internet connection', () => {
6
+ test('Smoke test', () => {
7
+ render(<NoInternetConnection isInternetConnected isIos />);
8
+ });
9
+ });
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { ReactComponent as Icon } from './NoInternetConnection.svg';
3
+ import { Container } from './NoInternetConnection.style';
4
+ import '../Theme/global.css';
5
+
6
+ export interface NoInternetConnectionProps {
7
+ /*
8
+ * If internet connected, set this props true. Changes the appearance of a component
9
+ */
10
+ isInternetConnected: boolean;
11
+
12
+ /*
13
+ * If platform === ios set this props true
14
+ */
15
+ isIos: boolean;
16
+ }
17
+
18
+ export const NoInternetConnection: React.FC<NoInternetConnectionProps> = (
19
+ props
20
+ ) => {
21
+ return (
22
+ <Container
23
+ isInternetConnected={props.isInternetConnected}
24
+ isIos={props.isIos}
25
+ >
26
+ <Icon />
27
+ <span>Інтернет підключення відсутнє</span>
28
+ </Container>
29
+ );
30
+ };
@@ -0,0 +1,14 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const StyledNotesCardPre = styled.pre`
4
+ overflow-y: hidden;
5
+ overflow-x: auto;
6
+
7
+ white-space: pre-wrap;
8
+ font-family: 'Inter';
9
+ font-style: normal;
10
+ font-weight: 400;
11
+ font-size: 14px;
12
+ line-height: 16px;
13
+ color: #1d201f;
14
+ `;
@@ -0,0 +1,32 @@
1
+ import { StyledNotesCardPre } from './NotesCardText.style';
2
+ import React, { useCallback } from 'react';
3
+
4
+ export type NotesCardTextProps = {
5
+ text: string
6
+ }
7
+
8
+ const NotesCardText: React.FC<NotesCardTextProps> = ({ text }) => {
9
+ const matchAndReplaceLinkToATag = useCallback(
10
+ () => {
11
+ const expression =
12
+ // eslint-disable-next-line max-len
13
+ /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;
14
+ const regex = RegExp(expression);
15
+
16
+ return text.split(regex).map((textPart) =>
17
+ regex.test(textPart) ? (
18
+ <a className="text-link" href={textPart}>
19
+ {textPart}
20
+ </a>
21
+ ) : (
22
+ textPart
23
+ )
24
+ );
25
+ },
26
+ [text]
27
+ );
28
+
29
+ return (<StyledNotesCardPre>{matchAndReplaceLinkToATag()}</StyledNotesCardPre>);
30
+ };
31
+
32
+ export default NotesCardText;
@@ -0,0 +1 @@
1
+ export * from './NotesCardText';
@@ -0,0 +1,24 @@
1
+ import { IonTextarea } from '@ionic/react';
2
+ import styled from 'styled-components';
3
+
4
+ export const StyledIonTextarea = styled(IonTextarea)`
5
+ font-family: 'Inter';
6
+ font-style: normal;
7
+ font-weight: 600;
8
+ font-size: 16px;
9
+ line-height: 24px;
10
+ --padding-bottom: 20px !important;
11
+ --padding-end: 16px !important;
12
+ --padding-start: 16px !important;
13
+ --padding-top: 0 !important;
14
+
15
+ textarea {
16
+ min-height: 300px !important;
17
+
18
+ overflow: hidden !important;
19
+
20
+ &::-webkit-scrollbar {
21
+ display: none;
22
+ }
23
+ }
24
+ `;
@@ -0,0 +1,16 @@
1
+ import React, { forwardRef, HTMLAttributes, RefAttributes } from 'react';
2
+ import { JSX } from '@ionic/core/components';
3
+ import { StyledIonTextarea } from './NotesEditor.styled';
4
+
5
+ export type NotesEditorProps = JSX.IonTextarea &
6
+ HTMLAttributes<HTMLIonTextareaElement> &
7
+ RefAttributes<HTMLIonTextareaElement>;
8
+
9
+ const NotesEditor = forwardRef<HTMLIonTextareaElement, NotesEditorProps>(
10
+ (props, ref) => {
11
+ return <StyledIonTextarea autoGrow ref={ref} {...props} />;
12
+ }
13
+ );
14
+ NotesEditor.displayName = 'NotesEditor';
15
+
16
+ export default NotesEditor;
@@ -0,0 +1,19 @@
1
+ import styled from 'styled-components';
2
+ import { IonSegment, IonSegmentButton } from '@ionic/react';
3
+ import { colorConstants } from '../Theme/mindly_constants';
4
+
5
+ export const Container = styled(IonSegment)`
6
+ --background: ${colorConstants.AccentTabsBgColor};
7
+ `;
8
+
9
+ export const Button = styled(IonSegmentButton)`
10
+ --background-checked: ${colorConstants.White};
11
+ --background-focused: ${colorConstants.White};
12
+ --background-hover: ${colorConstants.White};
13
+ --color: ${colorConstants.primaryTextColor};
14
+ --color-checked: ${colorConstants.primaryTextColor};
15
+ --color-focused: ${colorConstants.primaryTextColor};
16
+ --color-hover: ${colorConstants.primaryTextColor};
17
+ --transition: 0;
18
+ --indicator-transform: 0;
19
+ `;
@@ -0,0 +1,9 @@
1
+ import { render } from '@testing-library/react';
2
+ import React from 'react';
3
+ import { ScrollTabs } from './ScrollTabs';
4
+
5
+ describe('Test scroll tabs', () => {
6
+ test('Smoke test', () => {
7
+ render(<ScrollTabs setActiveTab={() => false} value="video" />);
8
+ });
9
+ });
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import { IonLabel } from '@ionic/react';
3
+ import { Button, Container } from './ScrollTabs.style';
4
+ import '../Theme/global.css';
5
+
6
+ export interface ScrollTabsProps {
7
+ /*
8
+ * Assumes passing a setter for the active tab value
9
+ */
10
+ setActiveTab: (e?: string) => void;
11
+
12
+ /*
13
+ * Active tab value
14
+ */
15
+ value: 'profile' | 'video' | 'articles';
16
+ }
17
+
18
+ export const ScrollTabs: React.FC<ScrollTabsProps> = (props) => {
19
+ return (
20
+ <Container
21
+ value={props.value}
22
+ mode="ios"
23
+ onIonChange={(e) => props.setActiveTab(e.detail.value)}
24
+ >
25
+ <Button value="profile" data-testid="profile">
26
+ <IonLabel>
27
+ <h5>Профіль</h5>
28
+ </IonLabel>
29
+ </Button>
30
+ <Button value="video" data-testid="video">
31
+ <IonLabel>
32
+ <h5>Відео</h5>
33
+ </IonLabel>
34
+ </Button>
35
+ <Button value="articles" data-testid="articles">
36
+ <IonLabel>
37
+ <h5>Статті</h5>
38
+ </IonLabel>
39
+ </Button>
40
+ </Container>
41
+ );
42
+ };
@@ -0,0 +1,43 @@
1
+ import styled from 'styled-components';
2
+ import { colorConstants } from '../Theme/mindly_constants';
3
+
4
+ interface ContainerProps {
5
+ isIos: boolean;
6
+ }
7
+
8
+ export const Container = styled.div<ContainerProps>`
9
+ display: flex;
10
+ box-shadow: 0px -2px 5px rgba(0, 0, 0, 0.08);
11
+ position: fixed;
12
+ bottom: -1px;
13
+ width: 100vw;
14
+ border: none;
15
+ padding-bottom: ${(props) => (props.isIos ? '34px' : '10px')};
16
+ color: ${colorConstants.secondaryTextColor};
17
+ padding-top: 10px;
18
+ justify-content: center;
19
+ background: white;
20
+
21
+ div {
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: center;
25
+ max-width: 150px;
26
+ flex-grow: 1;
27
+ flex-basis: 0;
28
+ cursor: pointer;
29
+ }
30
+
31
+ ion-icon {
32
+ font-size: 28px;
33
+ margin: 0;
34
+ }
35
+
36
+ ion-label {
37
+ font-weight: 700;
38
+ font-size: 10px;
39
+ margin: 0;
40
+ line-height: 14px;
41
+ font-family: 'Lato Bold', sans-serif;
42
+ }
43
+ `;
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { Container } from './TabBar.style';
3
+
4
+ export interface TabBarProps {
5
+ children: ReactNode;
6
+ isIos: boolean;
7
+ }
8
+
9
+ export const TabBar: React.FC<TabBarProps> = (props) => {
10
+ return <Container isIos={props.isIos}>{props.children}</Container>;
11
+ };
@@ -0,0 +1,104 @@
1
+ import { IonIcon } from '@ionic/react';
2
+ import styled from 'styled-components';
3
+ import { colorConstants } from '../Theme/mindly_constants';
4
+
5
+ export const Container = styled.div`
6
+ cursor: pointer;
7
+ border-radius: 8px;
8
+ box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.15);
9
+ position: relative;
10
+ padding: 11px;
11
+
12
+ @media (min-width: 600px) {
13
+ max-width: 452px;
14
+ }
15
+ `;
16
+
17
+ export const Card = styled.div`
18
+ display: flex;
19
+ flex-direction: row;
20
+ align-content: center;
21
+ align-items: center;
22
+
23
+ .img-container {
24
+ max-height: 102px;
25
+ max-width: 102px;
26
+ flex: 1 0;
27
+ }
28
+
29
+ .card-content {
30
+ display: flex;
31
+ flex-direction: column;
32
+ flex: 1;
33
+ }
34
+
35
+ .img {
36
+ width: 102px;
37
+ height: 102px;
38
+ object-fit: cover;
39
+ border-radius: 4px;
40
+ }
41
+
42
+ h1 {
43
+ margin: 0px 16px 0;
44
+ color: ${colorConstants.primaryTextColor};
45
+ font-size: 16px;
46
+ line-height: 20px;
47
+ white-space: nowrap;
48
+ overflow: hidden;
49
+ text-overflow: ellipsis;
50
+ }
51
+
52
+ h3 {
53
+ margin: 4px 16px 0;
54
+ color: ${colorConstants.secondaryTextColor};
55
+ font-size: 14px;
56
+ line-height: 16px;
57
+ }
58
+ `;
59
+
60
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
61
+ export const PsychologistCardIcons = styled<any>(IonIcon)`
62
+ // #skipcq
63
+ color: ${colorConstants.primaryColor};
64
+ font-size: 20px;
65
+ margin: 0;
66
+
67
+ @media (max-width: 320px) {
68
+ font-size: 19px;
69
+ }
70
+ `;
71
+
72
+ export const IconsContainer = styled.div`
73
+ display: flex;
74
+ align-items: center;
75
+ padding: 0;
76
+ margin-right: 12px;
77
+ margin-top: 4px;
78
+
79
+ .color-green {
80
+ // #skipcq
81
+ color: ${colorConstants.AccentTickColor};
82
+ }
83
+
84
+ p {
85
+ color: ${colorConstants.primaryTextColor};
86
+ font-size: 12px;
87
+ line-height: 16px;
88
+ padding-left: 4px;
89
+ margin: 0;
90
+ font-family: 'Lato Regular', sans-serif;
91
+ white-space: nowrap;
92
+
93
+ @media (max-width: 320px) {
94
+ font-size: 10.5px;
95
+ line-height: 14px;
96
+ }
97
+ }
98
+ `;
99
+
100
+ export const InfoContainer = styled.div`
101
+ display: flex;
102
+ margin-left: 16px;
103
+ flex-wrap: wrap;
104
+ `;
@@ -0,0 +1,40 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import React from 'react';
3
+ import { TherapistCard } from './TherapistCard';
4
+
5
+ describe('Test therapist card', () => {
6
+ test('Smoke test', () => {
7
+ render(
8
+ <TherapistCard
9
+ handleClick={() => false}
10
+ psychologistDuration={50}
11
+ psychologistExperience={11}
12
+ psychologistLastName="Test"
13
+ psychologistName="User"
14
+ psychologistPhoto=""
15
+ psychologistPrice={500}
16
+ psychologistType="Therapist"
17
+ />
18
+ );
19
+ });
20
+
21
+ test('Try click on card', () => {
22
+ const handleClick = jest.fn();
23
+ expect(handleClick).toHaveBeenCalledTimes(0);
24
+ render(
25
+ <TherapistCard
26
+ handleClick={handleClick}
27
+ psychologistDuration={50}
28
+ psychologistExperience={11}
29
+ psychologistLastName="Test"
30
+ psychologistName="User"
31
+ psychologistPhoto=""
32
+ psychologistPrice={500}
33
+ psychologistType="Therapist"
34
+ data-testid="container"
35
+ />
36
+ );
37
+ screen.getByTestId('container').click();
38
+ expect(handleClick).toHaveBeenCalledTimes(1);
39
+ });
40
+ });