@mindly/ui-components 3.1.3 → 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.
- package/dist/fonts/Lato-Bold.ttf +0 -0
- package/dist/fonts/Lato-Regular.ttf +0 -0
- package/dist/fonts/Lato-Semibold.ttf +0 -0
- package/dist/{esm/types/index.d.ts → index.ts} +64 -6
- package/dist/lib/AppHeader/AppHeader.style.ts +19 -0
- package/dist/lib/AppHeader/AppHeader.tsx +23 -0
- package/dist/lib/Avatar/Avatar.style.ts +17 -0
- package/dist/lib/Avatar/Avatar.tsx +46 -0
- package/dist/lib/Container/Container.styled.ts +15 -0
- package/dist/lib/Container/Container.tsx +15 -0
- package/dist/lib/EntryNotFound/EntryNotFound.style.ts +14 -0
- package/dist/lib/EntryNotFound/EntryNotFound.tsx +21 -0
- package/dist/lib/Filters/ListSelect/ListSelect.style.ts +38 -0
- package/dist/lib/Filters/ListSelect/ListSelect.tsx +48 -0
- package/dist/lib/Filters/Range/Range.style.ts +41 -0
- package/dist/lib/Filters/Range/Range.tsx +48 -0
- package/dist/lib/Filters/RowSelect/RowSelect.style.ts +30 -0
- package/dist/lib/Filters/RowSelect/RowSelect.tsx +38 -0
- package/dist/lib/Filters/Toggle/Toggle.style.ts +14 -0
- package/dist/lib/Filters/Toggle/Toggle.tsx +26 -0
- package/dist/lib/HorisontalCalendar/HorizontalCalendar.styled.ts +117 -0
- package/dist/lib/HorisontalCalendar/HorizontalCalendar.tsx +213 -0
- package/dist/lib/ImageWithFallback/ImageWithFallback.tsx +37 -0
- package/dist/lib/LetterAvatar/LetterAvatar.styled.ts +32 -0
- package/dist/lib/LetterAvatar/LetterAvatar.tsx +23 -0
- package/dist/lib/Modal/Modal.style.ts +12 -0
- package/dist/lib/Modal/Modal.tsx +30 -0
- package/dist/lib/ModalCalendar/ModalCalendar.styled.ts +123 -0
- package/dist/lib/ModalCalendar/ModalCalendar.tsx +71 -0
- package/dist/lib/PersonDateTimeCard/PersonDateTimeCard.styled.ts +36 -0
- package/dist/lib/PersonDateTimeCard/PersonDateTimeCard.tsx +32 -0
- package/dist/lib/Segment/Segment.style.ts +14 -0
- package/dist/lib/Segment/Segment.tsx +29 -0
- package/dist/lib/Segment/types.ts +4 -0
- package/dist/lib/SelectImpressionEmoji/ImpressionEmojiEnum.ts +9 -0
- package/dist/lib/SelectImpressionEmoji/SelectImpressionEmoji.styled.ts +28 -0
- package/dist/lib/SelectImpressionEmoji/SelectImpressionEmoji.tsx +56 -0
- package/dist/lib/SelectImpressionEmoji/SelectImpressionEmojiProps.ts +8 -0
- package/dist/lib/SelectImpressionEmoji/emojis.ts +9 -0
- package/dist/lib/SelectImpressionEmoji/index.tsx +14 -0
- package/dist/lib/Theme/global.css +251 -0
- package/dist/lib/Theme/mindly_constants.ts +23 -0
- package/dist/lib/UsersPsychologistScrollList/UserPsychologistScrollList.styled.ts +61 -0
- package/dist/lib/UsersPsychologistScrollList/UsersPsychologistScrollList.tsx +68 -0
- package/dist/lib/archived-consultation-card/ArchivedConsultation.test.tsx +9 -0
- package/dist/lib/archived-consultation-card/ArchivedConsultationCard.style.ts +72 -0
- package/dist/lib/archived-consultation-card/ArchivedConsultationCard.svg +3 -0
- package/dist/lib/archived-consultation-card/ArchivedConsultationCard.tsx +61 -0
- package/dist/lib/button/Button.style.ts +170 -0
- package/dist/lib/button/Button.test.tsx +39 -0
- package/dist/lib/button/Button.tsx +47 -0
- package/dist/lib/consultation-card/ConsultationCard.style.ts +119 -0
- package/dist/lib/consultation-card/ConsultationCard.test.tsx +65 -0
- package/dist/lib/consultation-card/ConsultationCard.tsx +155 -0
- package/dist/lib/consultation-card/ConsultationCardSkeleton.tsx +114 -0
- package/dist/lib/content-card/ContentCard.style.ts +59 -0
- package/dist/lib/content-card/ContentCard.test.tsx +29 -0
- package/dist/lib/content-card/ContentCard.tsx +81 -0
- package/dist/lib/date-picker/DatePicker.style.ts +52 -0
- package/dist/lib/date-picker/DatePicker.test.tsx +9 -0
- package/dist/lib/date-picker/DatePicker.tsx +59 -0
- package/dist/lib/floating-button/FloatingButton.style.ts +21 -0
- package/dist/lib/floating-button/FloatingButton.test.tsx +9 -0
- package/dist/lib/floating-button/FloatingButton.tsx +29 -0
- package/dist/lib/floating-button/floating button.svg +6 -0
- package/dist/lib/footer-for-booking/FooterForBooking.style.ts +56 -0
- package/dist/lib/footer-for-booking/FooterForBooking.test.tsx +30 -0
- package/dist/lib/footer-for-booking/FooterForBooking.tsx +53 -0
- package/dist/lib/input/Input.style.ts +37 -0
- package/dist/lib/input/Input.test.tsx +21 -0
- package/dist/lib/input/Input.tsx +73 -0
- package/dist/lib/list-button/ListButton.style.ts +21 -0
- package/dist/lib/list-button/ListButton.test.tsx +26 -0
- package/dist/lib/list-button/ListButton.tsx +30 -0
- package/dist/lib/navigation-bar/NavigationBar.style.ts +81 -0
- package/dist/lib/navigation-bar/NavigationBar.test.tsx +15 -0
- package/dist/lib/navigation-bar/NavigationBar.tsx +31 -0
- package/dist/lib/no-internet-connection/NoInternetConnection.style.ts +26 -0
- package/dist/lib/no-internet-connection/NoInternetConnection.svg +10 -0
- package/dist/lib/no-internet-connection/NoInternetConnection.test.tsx +9 -0
- package/dist/lib/no-internet-connection/NoInternetConnection.tsx +30 -0
- package/dist/lib/notes-card-text/NotesCardText.style.ts +14 -0
- package/dist/lib/notes-card-text/NotesCardText.tsx +32 -0
- package/dist/lib/notes-editor/NotesEditor.styled.ts +24 -0
- package/dist/lib/notes-editor/NotesEditor.tsx +16 -0
- package/dist/lib/scroll-tabs/ScrollTabs.style.ts +19 -0
- package/dist/lib/scroll-tabs/ScrollTabs.test.tsx +9 -0
- package/dist/lib/scroll-tabs/ScrollTabs.tsx +42 -0
- package/dist/lib/tab-bar/TabBar.style.tsx +43 -0
- package/dist/lib/tab-bar/TabBar.tsx +11 -0
- package/dist/lib/therapist-card/TherapistCard.style.ts +104 -0
- package/dist/lib/therapist-card/TherapistCard.test.tsx +40 -0
- package/dist/lib/therapist-card/TherapistCard.tsx +96 -0
- package/dist/lib/therapist-information-component/TherapistInformationComponent.style.ts +40 -0
- package/dist/lib/therapist-information-component/TherapistInformationComponent.test.tsx +16 -0
- package/dist/lib/therapist-information-component/TherapistInformationComponent.tsx +51 -0
- package/dist/lib/toast/index.css +13 -0
- package/dist/lib/toast/toast.ts +17 -0
- package/dist/lib/userAppTypes.ts +261 -0
- package/dist/lib/your-local-time-block/YourLocalTimeBlock.styled.ts +28 -0
- package/dist/lib/your-local-time-block/YourLocalTimeBlock.tsx +26 -0
- package/dist/react-app-env.d.ts +1 -0
- package/dist/svg.d.ts +13 -0
- package/package.json +4 -17
- package/dist/cjs/index.js +0 -166
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/index.d.ts +0 -48
- package/dist/cjs/types/lib/AppHeader/AppHeader.d.ts +0 -6
- package/dist/cjs/types/lib/AppHeader/AppHeader.style.d.ts +0 -7
- package/dist/cjs/types/lib/Avatar/Avatar.d.ts +0 -9
- package/dist/cjs/types/lib/Avatar/Avatar.style.d.ts +0 -5
- package/dist/cjs/types/lib/Container/Container.d.ts +0 -3
- package/dist/cjs/types/lib/Container/Container.styled.d.ts +0 -5
- package/dist/cjs/types/lib/EntryNotFound/EntryNotFound.d.ts +0 -5
- package/dist/cjs/types/lib/EntryNotFound/EntryNotFound.style.d.ts +0 -2
- package/dist/cjs/types/lib/Filters/ListSelect/ListSelect.d.ts +0 -13
- package/dist/cjs/types/lib/Filters/ListSelect/ListSelect.style.d.ts +0 -9
- package/dist/cjs/types/lib/Filters/Range/Range.d.ts +0 -14
- package/dist/cjs/types/lib/Filters/Range/Range.style.d.ts +0 -3
- package/dist/cjs/types/lib/Filters/RowSelect/RowSelect.d.ts +0 -13
- package/dist/cjs/types/lib/Filters/RowSelect/RowSelect.style.d.ts +0 -7
- package/dist/cjs/types/lib/Filters/Toggle/Toggle.d.ts +0 -8
- package/dist/cjs/types/lib/Filters/Toggle/Toggle.style.d.ts +0 -2
- package/dist/cjs/types/lib/HorisontalCalendar/HorizontalCalendar.d.ts +0 -40
- package/dist/cjs/types/lib/HorisontalCalendar/HorizontalCalendar.styled.d.ts +0 -2
- package/dist/cjs/types/lib/ImageWithFallback/ImageWithFallback.d.ts +0 -6
- package/dist/cjs/types/lib/LetterAvatar/LetterAvatar.d.ts +0 -9
- package/dist/cjs/types/lib/LetterAvatar/LetterAvatar.styled.d.ts +0 -5
- package/dist/cjs/types/lib/Modal/Modal.d.ts +0 -8
- package/dist/cjs/types/lib/Modal/Modal.style.d.ts +0 -6
- package/dist/cjs/types/lib/ModalCalendar/ModalCalendar.d.ts +0 -10
- package/dist/cjs/types/lib/ModalCalendar/ModalCalendar.styled.d.ts +0 -12
- package/dist/cjs/types/lib/PersonDateTimeCard/PersonDateTimeCard.d.ts +0 -8
- package/dist/cjs/types/lib/PersonDateTimeCard/PersonDateTimeCard.styled.d.ts +0 -2
- package/dist/cjs/types/lib/Segment/Segment.d.ts +0 -10
- package/dist/cjs/types/lib/Segment/types.d.ts +0 -4
- package/dist/cjs/types/lib/SelectImpressionEmoji/ImpressionEmojiEnum.d.ts +0 -8
- package/dist/cjs/types/lib/SelectImpressionEmoji/SelectImpressionEmoji.d.ts +0 -4
- package/dist/cjs/types/lib/SelectImpressionEmoji/SelectImpressionEmoji.styled.d.ts +0 -2
- package/dist/cjs/types/lib/SelectImpressionEmoji/SelectImpressionEmojiProps.d.ts +0 -6
- package/dist/cjs/types/lib/SelectImpressionEmoji/emojis.d.ts +0 -5
- package/dist/cjs/types/lib/SelectImpressionEmoji/index.d.ts +0 -4
- package/dist/cjs/types/lib/Theme/mindly_constants.d.ts +0 -22
- package/dist/cjs/types/lib/UsersPsychologistScrollList/UserPsychologistScrollList.styled.d.ts +0 -6
- package/dist/cjs/types/lib/UsersPsychologistScrollList/UsersPsychologistScrollList.d.ts +0 -10
- package/dist/cjs/types/lib/archived-consultation-card/ArchivedConsultationCard.d.ts +0 -14
- package/dist/cjs/types/lib/archived-consultation-card/ArchivedConsultationCard.style.d.ts +0 -3
- package/dist/cjs/types/lib/button/Button.d.ts +0 -9
- package/dist/cjs/types/lib/button/Button.style.d.ts +0 -6
- package/dist/cjs/types/lib/consultation-card/ConsultationCard.d.ts +0 -31
- package/dist/cjs/types/lib/consultation-card/ConsultationCard.style.d.ts +0 -7
- package/dist/cjs/types/lib/consultation-card/ConsultationCardSkeleton.d.ts +0 -2
- package/dist/cjs/types/lib/content-card/ContentCard.d.ts +0 -15
- package/dist/cjs/types/lib/content-card/ContentCard.style.d.ts +0 -11
- package/dist/cjs/types/lib/date-picker/DatePicker.d.ts +0 -13
- package/dist/cjs/types/lib/date-picker/DatePicker.style.d.ts +0 -6
- package/dist/cjs/types/lib/floating-button/FloatingButton.d.ts +0 -8
- package/dist/cjs/types/lib/floating-button/FloatingButton.style.d.ts +0 -6
- package/dist/cjs/types/lib/footer-for-booking/FooterForBooking.d.ts +0 -10
- package/dist/cjs/types/lib/footer-for-booking/FooterForBooking.style.d.ts +0 -7
- package/dist/cjs/types/lib/input/Input.d.ts +0 -13
- package/dist/cjs/types/lib/input/Input.style.d.ts +0 -7
- package/dist/cjs/types/lib/list-button/ListButton.d.ts +0 -9
- package/dist/cjs/types/lib/list-button/ListButton.style.d.ts +0 -2
- package/dist/cjs/types/lib/navigation-bar/NavigationBar.d.ts +0 -8
- package/dist/cjs/types/lib/navigation-bar/NavigationBar.style.d.ts +0 -8
- package/dist/cjs/types/lib/no-internet-connection/NoInternetConnection.d.ts +0 -7
- package/dist/cjs/types/lib/no-internet-connection/NoInternetConnection.style.d.ts +0 -6
- package/dist/cjs/types/lib/notes-card-text/NotesCardText.d.ts +0 -6
- package/dist/cjs/types/lib/notes-card-text/NotesCardText.style.d.ts +0 -1
- package/dist/cjs/types/lib/notes-editor/NotesEditor.d.ts +0 -5
- package/dist/cjs/types/lib/notes-editor/NotesEditor.styled.d.ts +0 -2
- package/dist/cjs/types/lib/scroll-tabs/ScrollTabs.d.ts +0 -7
- package/dist/cjs/types/lib/scroll-tabs/ScrollTabs.style.d.ts +0 -3
- package/dist/cjs/types/lib/tab-bar/TabBar.d.ts +0 -6
- package/dist/cjs/types/lib/tab-bar/TabBar.style.d.ts +0 -5
- package/dist/cjs/types/lib/therapist-card/TherapistCard.d.ts +0 -13
- package/dist/cjs/types/lib/therapist-card/TherapistCard.style.d.ts +0 -5
- package/dist/cjs/types/lib/therapist-information-component/TherapistInformationComponent.d.ts +0 -10
- package/dist/cjs/types/lib/therapist-information-component/TherapistInformationComponent.style.d.ts +0 -2
- package/dist/cjs/types/lib/toast/toast.d.ts +0 -5
- package/dist/cjs/types/lib/userAppTypes.d.ts +0 -239
- package/dist/cjs/types/lib/your-local-time-block/YourLocalTimeBlock.d.ts +0 -6
- package/dist/cjs/types/lib/your-local-time-block/YourLocalTimeBlock.styled.d.ts +0 -2
- package/dist/esm/b7649e1531c181af.svg +0 -69
- package/dist/esm/index.js +0 -180
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/lib/AppHeader/AppHeader.d.ts +0 -6
- package/dist/esm/types/lib/AppHeader/AppHeader.style.d.ts +0 -7
- package/dist/esm/types/lib/AppHeader/index.d.ts +0 -1
- package/dist/esm/types/lib/Avatar/Avatar.d.ts +0 -9
- package/dist/esm/types/lib/Avatar/Avatar.style.d.ts +0 -5
- package/dist/esm/types/lib/Avatar/index.d.ts +0 -1
- package/dist/esm/types/lib/Container/Container.d.ts +0 -3
- package/dist/esm/types/lib/Container/Container.styled.d.ts +0 -5
- package/dist/esm/types/lib/Container/index.d.ts +0 -1
- package/dist/esm/types/lib/EntryNotFound/EntryNotFound.d.ts +0 -5
- package/dist/esm/types/lib/EntryNotFound/EntryNotFound.style.d.ts +0 -2
- package/dist/esm/types/lib/EntryNotFound/index.d.ts +0 -1
- package/dist/esm/types/lib/Filters/ListSelect/ListSelect.d.ts +0 -13
- package/dist/esm/types/lib/Filters/ListSelect/ListSelect.style.d.ts +0 -9
- package/dist/esm/types/lib/Filters/ListSelect/index.d.ts +0 -1
- package/dist/esm/types/lib/Filters/Range/Range.d.ts +0 -14
- package/dist/esm/types/lib/Filters/Range/Range.style.d.ts +0 -3
- package/dist/esm/types/lib/Filters/Range/index.d.ts +0 -1
- package/dist/esm/types/lib/Filters/RowSelect/RowSelect.d.ts +0 -13
- package/dist/esm/types/lib/Filters/RowSelect/RowSelect.style.d.ts +0 -7
- package/dist/esm/types/lib/Filters/RowSelect/index.d.ts +0 -1
- package/dist/esm/types/lib/Filters/Toggle/Toggle.d.ts +0 -8
- package/dist/esm/types/lib/Filters/Toggle/Toggle.style.d.ts +0 -2
- package/dist/esm/types/lib/Filters/Toggle/index.d.ts +0 -1
- package/dist/esm/types/lib/HorisontalCalendar/HorizontalCalendar.d.ts +0 -40
- package/dist/esm/types/lib/HorisontalCalendar/HorizontalCalendar.styled.d.ts +0 -2
- package/dist/esm/types/lib/HorisontalCalendar/index.d.ts +0 -1
- package/dist/esm/types/lib/ImageWithFallback/ImageWithFallback.d.ts +0 -6
- package/dist/esm/types/lib/LetterAvatar/LetterAvatar.d.ts +0 -9
- package/dist/esm/types/lib/LetterAvatar/LetterAvatar.styled.d.ts +0 -5
- package/dist/esm/types/lib/Modal/Modal.d.ts +0 -8
- package/dist/esm/types/lib/Modal/Modal.style.d.ts +0 -6
- package/dist/esm/types/lib/Modal/index.d.ts +0 -1
- package/dist/esm/types/lib/ModalCalendar/ModalCalendar.d.ts +0 -10
- package/dist/esm/types/lib/ModalCalendar/ModalCalendar.styled.d.ts +0 -12
- package/dist/esm/types/lib/PersonDateTimeCard/PersonDateTimeCard.d.ts +0 -8
- package/dist/esm/types/lib/PersonDateTimeCard/PersonDateTimeCard.styled.d.ts +0 -2
- package/dist/esm/types/lib/Segment/Segment.d.ts +0 -10
- package/dist/esm/types/lib/Segment/index.d.ts +0 -2
- package/dist/esm/types/lib/Segment/types.d.ts +0 -4
- package/dist/esm/types/lib/SelectImpressionEmoji/ImpressionEmojiEnum.d.ts +0 -8
- package/dist/esm/types/lib/SelectImpressionEmoji/SelectImpressionEmoji.d.ts +0 -4
- package/dist/esm/types/lib/SelectImpressionEmoji/SelectImpressionEmoji.styled.d.ts +0 -2
- package/dist/esm/types/lib/SelectImpressionEmoji/SelectImpressionEmojiProps.d.ts +0 -6
- package/dist/esm/types/lib/SelectImpressionEmoji/emojis.d.ts +0 -5
- package/dist/esm/types/lib/SelectImpressionEmoji/index.d.ts +0 -4
- package/dist/esm/types/lib/Theme/mindly_constants.d.ts +0 -22
- package/dist/esm/types/lib/UsersPsychologistScrollList/UserPsychologistScrollList.styled.d.ts +0 -6
- package/dist/esm/types/lib/UsersPsychologistScrollList/UsersPsychologistScrollList.d.ts +0 -10
- package/dist/esm/types/lib/archived-consultation-card/ArchivedConsultationCard.d.ts +0 -14
- package/dist/esm/types/lib/archived-consultation-card/ArchivedConsultationCard.style.d.ts +0 -3
- package/dist/esm/types/lib/button/Button.d.ts +0 -9
- package/dist/esm/types/lib/button/Button.style.d.ts +0 -6
- package/dist/esm/types/lib/consultation-card/ConsultationCard.d.ts +0 -31
- package/dist/esm/types/lib/consultation-card/ConsultationCard.style.d.ts +0 -7
- package/dist/esm/types/lib/consultation-card/ConsultationCardSkeleton.d.ts +0 -2
- package/dist/esm/types/lib/consultation-card/index.d.ts +0 -2
- package/dist/esm/types/lib/content-card/ContentCard.d.ts +0 -15
- package/dist/esm/types/lib/content-card/ContentCard.style.d.ts +0 -11
- package/dist/esm/types/lib/date-picker/DatePicker.d.ts +0 -13
- package/dist/esm/types/lib/date-picker/DatePicker.style.d.ts +0 -6
- package/dist/esm/types/lib/floating-button/FloatingButton.d.ts +0 -8
- package/dist/esm/types/lib/floating-button/FloatingButton.style.d.ts +0 -6
- package/dist/esm/types/lib/footer-for-booking/FooterForBooking.d.ts +0 -10
- package/dist/esm/types/lib/footer-for-booking/FooterForBooking.style.d.ts +0 -7
- package/dist/esm/types/lib/input/Input.d.ts +0 -13
- package/dist/esm/types/lib/input/Input.style.d.ts +0 -7
- package/dist/esm/types/lib/list-button/ListButton.d.ts +0 -9
- package/dist/esm/types/lib/list-button/ListButton.style.d.ts +0 -2
- package/dist/esm/types/lib/navigation-bar/NavigationBar.d.ts +0 -8
- package/dist/esm/types/lib/navigation-bar/NavigationBar.style.d.ts +0 -8
- package/dist/esm/types/lib/no-internet-connection/NoInternetConnection.d.ts +0 -7
- package/dist/esm/types/lib/no-internet-connection/NoInternetConnection.style.d.ts +0 -6
- package/dist/esm/types/lib/notes-card-text/NotesCardText.d.ts +0 -6
- package/dist/esm/types/lib/notes-card-text/NotesCardText.style.d.ts +0 -1
- package/dist/esm/types/lib/notes-card-text/index.d.ts +0 -1
- package/dist/esm/types/lib/notes-editor/NotesEditor.d.ts +0 -5
- package/dist/esm/types/lib/notes-editor/NotesEditor.styled.d.ts +0 -2
- package/dist/esm/types/lib/scroll-tabs/ScrollTabs.d.ts +0 -7
- package/dist/esm/types/lib/scroll-tabs/ScrollTabs.style.d.ts +0 -3
- package/dist/esm/types/lib/tab-bar/TabBar.d.ts +0 -6
- package/dist/esm/types/lib/tab-bar/TabBar.style.d.ts +0 -5
- package/dist/esm/types/lib/therapist-card/TherapistCard.d.ts +0 -13
- package/dist/esm/types/lib/therapist-card/TherapistCard.style.d.ts +0 -5
- package/dist/esm/types/lib/therapist-information-component/TherapistInformationComponent.d.ts +0 -10
- package/dist/esm/types/lib/therapist-information-component/TherapistInformationComponent.style.d.ts +0 -2
- package/dist/esm/types/lib/toast/toast.d.ts +0 -5
- package/dist/esm/types/lib/userAppTypes.d.ts +0 -239
- package/dist/esm/types/lib/your-local-time-block/YourLocalTimeBlock.d.ts +0 -6
- package/dist/esm/types/lib/your-local-time-block/YourLocalTimeBlock.styled.d.ts +0 -2
- package/dist/index.d.ts +0 -644
- /package/dist/{cjs/types/lib/AppHeader/index.d.ts → lib/AppHeader/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Avatar/index.d.ts → lib/Avatar/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Container/index.d.ts → lib/Container/index.ts} +0 -0
- /package/dist/{cjs/b7649e1531c181af.svg → lib/EntryNotFound/calendar.svg} +0 -0
- /package/dist/{cjs/types/lib/EntryNotFound/index.d.ts → lib/EntryNotFound/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Filters/ListSelect/index.d.ts → lib/Filters/ListSelect/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Filters/Range/index.d.ts → lib/Filters/Range/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Filters/RowSelect/index.d.ts → lib/Filters/RowSelect/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Filters/Toggle/index.d.ts → lib/Filters/Toggle/index.ts} +0 -0
- /package/dist/{cjs/types/lib/HorisontalCalendar/index.d.ts → lib/HorisontalCalendar/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Modal/index.d.ts → lib/Modal/index.ts} +0 -0
- /package/dist/{cjs/types/lib/Segment/index.d.ts → lib/Segment/index.ts} +0 -0
- /package/dist/{cjs/types/lib/consultation-card/index.d.ts → lib/consultation-card/index.ts} +0 -0
- /package/dist/{cjs/types/lib/notes-card-text/index.d.ts → lib/notes-card-text/index.ts} +0 -0
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { colorConstants } from '../Theme/mindly_constants';
|
|
3
|
+
|
|
4
|
+
interface ContainerProps {
|
|
5
|
+
buttonType:
|
|
6
|
+
| 'primary'
|
|
7
|
+
| 'secondary'
|
|
8
|
+
| 'actionButton'
|
|
9
|
+
| 'actionButtonDisabled'
|
|
10
|
+
| 'secondaryWithStroke'
|
|
11
|
+
| 'secondaryCancel'
|
|
12
|
+
| 'actionButtonActive'
|
|
13
|
+
| 'actionButtonGreen';
|
|
14
|
+
isDisabled: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const Container = styled.button<ContainerProps>`
|
|
18
|
+
padding: 12px 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
max-height: 40px;
|
|
22
|
+
border: 0;
|
|
23
|
+
background: ${colorConstants.primaryColor};
|
|
24
|
+
color: ${colorConstants.White};
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
line-height: 16px;
|
|
28
|
+
|
|
29
|
+
&:hover,
|
|
30
|
+
&:active {
|
|
31
|
+
box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.2),
|
|
32
|
+
inset 0 -4px 15px rgba(0, 0, 0, 0.2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${(props: ContainerProps) =>
|
|
36
|
+
props.buttonType === 'secondary' &&
|
|
37
|
+
css`
|
|
38
|
+
background: inherit;
|
|
39
|
+
color: ${colorConstants.primaryColor};
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
|
|
42
|
+
&:hover,
|
|
43
|
+
&:active {
|
|
44
|
+
box-shadow: none;
|
|
45
|
+
color: ${colorConstants.AccentActiveButtonBG};
|
|
46
|
+
}
|
|
47
|
+
`}
|
|
48
|
+
|
|
49
|
+
${(props: ContainerProps) =>
|
|
50
|
+
props.buttonType === 'secondaryWithStroke' &&
|
|
51
|
+
css`
|
|
52
|
+
color: ${colorConstants.primaryColor};
|
|
53
|
+
background: inherit;
|
|
54
|
+
box-shadow: none;
|
|
55
|
+
border: 1px solid ${colorConstants.primaryColor};
|
|
56
|
+
|
|
57
|
+
&:hover,
|
|
58
|
+
&:active {
|
|
59
|
+
box-shadow: none;
|
|
60
|
+
color: ${colorConstants.AccentActiveButtonBG};
|
|
61
|
+
background: inherit;
|
|
62
|
+
border: 1px solid ${colorConstants.AccentActiveButtonBG};
|
|
63
|
+
}
|
|
64
|
+
`}
|
|
65
|
+
|
|
66
|
+
${(props: ContainerProps) =>
|
|
67
|
+
props.buttonType === 'secondaryCancel' &&
|
|
68
|
+
css`
|
|
69
|
+
color: ${colorConstants.AccentCross};
|
|
70
|
+
background: inherit;
|
|
71
|
+
box-shadow: none;
|
|
72
|
+
border: 0;
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
|
|
75
|
+
&:hover,
|
|
76
|
+
&:active {
|
|
77
|
+
box-shadow: none;
|
|
78
|
+
color: ${colorConstants.AccentCancelActive};
|
|
79
|
+
background: inherit;
|
|
80
|
+
border: 0;
|
|
81
|
+
}
|
|
82
|
+
`}
|
|
83
|
+
|
|
84
|
+
${(props: ContainerProps) =>
|
|
85
|
+
props.buttonType === 'actionButton' &&
|
|
86
|
+
css`
|
|
87
|
+
color: ${colorConstants.AccentDisabledColor};
|
|
88
|
+
background: inherit;
|
|
89
|
+
box-shadow: none;
|
|
90
|
+
border: 1px solid ${colorConstants.AccentDisabledColor};
|
|
91
|
+
|
|
92
|
+
&:hover,
|
|
93
|
+
&:active {
|
|
94
|
+
color: ${colorConstants.AccentDisabledColor};
|
|
95
|
+
background: inherit;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
border: 1px solid ${colorConstants.AccentDisabledColor};
|
|
98
|
+
}
|
|
99
|
+
`}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
${(props: ContainerProps) =>
|
|
103
|
+
props.isDisabled &&
|
|
104
|
+
css`
|
|
105
|
+
background: ${colorConstants.AccentDisabledColor};
|
|
106
|
+
color: ${colorConstants.White};
|
|
107
|
+
box-shadow: none;
|
|
108
|
+
|
|
109
|
+
&:hover,
|
|
110
|
+
&:active {
|
|
111
|
+
box-shadow: none;
|
|
112
|
+
background: ${colorConstants.AccentDisabledColor};
|
|
113
|
+
color: ${colorConstants.White};
|
|
114
|
+
}
|
|
115
|
+
`}
|
|
116
|
+
|
|
117
|
+
${(props: ContainerProps) =>
|
|
118
|
+
props.buttonType === 'actionButtonDisabled' &&
|
|
119
|
+
css`
|
|
120
|
+
color: ${colorConstants.AccentDisabledColor};
|
|
121
|
+
background: inherit;
|
|
122
|
+
box-shadow: none !important;
|
|
123
|
+
border: 1px solid ${colorConstants.AccentDisabledColor};
|
|
124
|
+
text-decoration: line-through;
|
|
125
|
+
`}
|
|
126
|
+
|
|
127
|
+
${(props: ContainerProps) =>
|
|
128
|
+
props.buttonType === 'actionButtonActive' &&
|
|
129
|
+
css`
|
|
130
|
+
box-shadow: none;
|
|
131
|
+
color: ${colorConstants.primaryColor};
|
|
132
|
+
background: ${colorConstants.AccentSurveyButton};
|
|
133
|
+
border: 1px solid ${colorConstants.primaryColor};
|
|
134
|
+
|
|
135
|
+
&:hover,
|
|
136
|
+
&:active {
|
|
137
|
+
box-shadow: none;
|
|
138
|
+
color: ${colorConstants.primaryColor};
|
|
139
|
+
background: ${colorConstants.AccentSurveyButton};
|
|
140
|
+
border: 1px solid ${colorConstants.primaryColor};
|
|
141
|
+
}
|
|
142
|
+
`}
|
|
143
|
+
|
|
144
|
+
${(props: ContainerProps) =>
|
|
145
|
+
props.buttonType === 'actionButtonGreen' &&
|
|
146
|
+
css`
|
|
147
|
+
color: ${colorConstants.AccentTickColor};
|
|
148
|
+
background: linear-gradient(
|
|
149
|
+
0deg,
|
|
150
|
+
rgba(255, 255, 255, 0.86),
|
|
151
|
+
rgba(255, 255, 255, 0.86)
|
|
152
|
+
),
|
|
153
|
+
${colorConstants.AccentTickColor};
|
|
154
|
+
box-shadow: none;
|
|
155
|
+
border: 1px solid ${colorConstants.AccentTickColor};
|
|
156
|
+
|
|
157
|
+
&:hover,
|
|
158
|
+
&:active {
|
|
159
|
+
box-shadow: none;
|
|
160
|
+
color: ${colorConstants.AccentTickColor};
|
|
161
|
+
background: linear-gradient(
|
|
162
|
+
0deg,
|
|
163
|
+
rgba(255, 255, 255, 0.86),
|
|
164
|
+
rgba(255, 255, 255, 0.86)
|
|
165
|
+
),
|
|
166
|
+
${colorConstants.AccentTickColor};
|
|
167
|
+
border: 1px solid ${colorConstants.AccentTickColor};
|
|
168
|
+
}
|
|
169
|
+
`}
|
|
170
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Button } from './Button';
|
|
4
|
+
|
|
5
|
+
describe('Test button', () => {
|
|
6
|
+
test('Smoke test button', () => {
|
|
7
|
+
render(
|
|
8
|
+
<Button buttonType="primary" isDisabled onClick={() => undefined}>
|
|
9
|
+
Text
|
|
10
|
+
</Button>
|
|
11
|
+
);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
test('Click on button test', () => {
|
|
15
|
+
const clickFuncMock = jest.fn();
|
|
16
|
+
const { getByText } = render(
|
|
17
|
+
<Button onClick={clickFuncMock} buttonType="primary" isDisabled={false}>
|
|
18
|
+
Text
|
|
19
|
+
</Button>
|
|
20
|
+
);
|
|
21
|
+
const button = getByText('Text');
|
|
22
|
+
expect(clickFuncMock).not.toHaveBeenCalled();
|
|
23
|
+
button.click();
|
|
24
|
+
expect(clickFuncMock).toHaveBeenCalled();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('Text is button disabled', () => {
|
|
28
|
+
const clickFuncMock = jest.fn();
|
|
29
|
+
const { getByText } = render(
|
|
30
|
+
<Button onClick={clickFuncMock} buttonType="primary" isDisabled>
|
|
31
|
+
Text
|
|
32
|
+
</Button>
|
|
33
|
+
);
|
|
34
|
+
const button = getByText('Text');
|
|
35
|
+
expect(clickFuncMock).not.toHaveBeenCalled();
|
|
36
|
+
button.click();
|
|
37
|
+
expect(clickFuncMock).not.toHaveBeenCalled();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Container } from './Button.style';
|
|
3
|
+
|
|
4
|
+
export interface ButtonProps {
|
|
5
|
+
/*
|
|
6
|
+
* A props that sets the appearance of the button
|
|
7
|
+
*/
|
|
8
|
+
buttonType:
|
|
9
|
+
| 'primary'
|
|
10
|
+
| 'secondary'
|
|
11
|
+
| 'actionButton'
|
|
12
|
+
| 'actionButtonDisabled'
|
|
13
|
+
| 'secondaryWithStroke'
|
|
14
|
+
| 'secondaryCancel'
|
|
15
|
+
| 'actionButtonActive'
|
|
16
|
+
| 'actionButtonGreen';
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Toggles clickability of button. Also changes appearance
|
|
20
|
+
*/
|
|
21
|
+
isDisabled: boolean;
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* Text inside the button (default React children)
|
|
25
|
+
*/
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* Default React onClick
|
|
30
|
+
*/
|
|
31
|
+
onClick?: (props?: React.SyntheticEvent) => void;
|
|
32
|
+
['data-testid']?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const Button: React.FC<ButtonProps> = (props) => {
|
|
36
|
+
return (
|
|
37
|
+
<Container
|
|
38
|
+
data-testid={props['data-testid']}
|
|
39
|
+
onClick={props?.onClick}
|
|
40
|
+
disabled={props.isDisabled}
|
|
41
|
+
isDisabled={props.isDisabled}
|
|
42
|
+
buttonType={props.buttonType}
|
|
43
|
+
>
|
|
44
|
+
{props.children}
|
|
45
|
+
</Container>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { colorConstants } from '../Theme/mindly_constants';
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
width: 100%;
|
|
6
|
+
padding: 16px;
|
|
7
|
+
border: 1px solid ${colorConstants.StrokeGray};
|
|
8
|
+
box-shadow: 1px 5px 20px rgba(0, 0, 0, 0.1);
|
|
9
|
+
border-radius: 4px;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const InfoContainer = styled.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: center;
|
|
16
|
+
height: 104px;
|
|
17
|
+
|
|
18
|
+
& .person-avatar {
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
font-size: 41px;
|
|
22
|
+
line-height: 61px;
|
|
23
|
+
flex: 0 0 104px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export const TextInfo = styled.div`
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
margin-right: 8px;
|
|
31
|
+
justify-content: space-around;
|
|
32
|
+
height: 100%;
|
|
33
|
+
|
|
34
|
+
h3 {
|
|
35
|
+
color: #5b5b5b;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 16px;
|
|
39
|
+
font-family: 'Inter', sans-serif;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
span {
|
|
43
|
+
color: ${colorConstants.primaryColor};
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
line-height: 16px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
h2.time {
|
|
50
|
+
font-family: 'Inter';
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 600;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
line-height: 16px;
|
|
55
|
+
color: #1d201f;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
div.is-free {
|
|
59
|
+
margin-top: 12px;
|
|
60
|
+
padding: 2px 7px;
|
|
61
|
+
border-radius: 12px;
|
|
62
|
+
max-width: max-content;
|
|
63
|
+
text-align: center;
|
|
64
|
+
|
|
65
|
+
&.greeny {
|
|
66
|
+
background-color: #cfe2d7;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&.reddy {
|
|
70
|
+
background-color: #ffc7c7;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
h2 {
|
|
74
|
+
font-weight: 700;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
line-height: 16px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`;
|
|
80
|
+
|
|
81
|
+
export const Photo = styled.img`
|
|
82
|
+
width: 104px;
|
|
83
|
+
height: 104px;
|
|
84
|
+
border-radius: 8px;
|
|
85
|
+
object-fit: cover;
|
|
86
|
+
flex: 0 0 104px;
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
export const DividersContainer = styled.div`
|
|
90
|
+
margin: 16px 0 4px 0;
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
|
|
95
|
+
div.divider {
|
|
96
|
+
height: 1px;
|
|
97
|
+
flex-grow: 1;
|
|
98
|
+
background: ${colorConstants.AccentDisabledColor};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
h4 {
|
|
102
|
+
color: #c1c1c1;
|
|
103
|
+
margin: 0 16px;
|
|
104
|
+
font-size: 12px;
|
|
105
|
+
line-height: 14px;
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
export const ButtonContainer = styled.div`
|
|
110
|
+
display: flex;
|
|
111
|
+
|
|
112
|
+
& button {
|
|
113
|
+
padding: 0;
|
|
114
|
+
}
|
|
115
|
+
`;
|
|
116
|
+
|
|
117
|
+
export const ButtonsContainer = styled.div`
|
|
118
|
+
margin-top: 16px;
|
|
119
|
+
`;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { ConsultationCard, DateTimeType } from './ConsultationCard';
|
|
4
|
+
import { DateTime } from 'luxon';
|
|
5
|
+
|
|
6
|
+
describe('Test consultation card', () => {
|
|
7
|
+
test('Smoke test', () => {
|
|
8
|
+
render(
|
|
9
|
+
<ConsultationCard
|
|
10
|
+
startConsultation={() => undefined}
|
|
11
|
+
handleReschedule={() => undefined}
|
|
12
|
+
handleRefund={() => undefined}
|
|
13
|
+
consultationWith="Елена Шимановская"
|
|
14
|
+
avatar=""
|
|
15
|
+
autorecord
|
|
16
|
+
userTimeZone="America/New_York"
|
|
17
|
+
consultationTime={
|
|
18
|
+
{
|
|
19
|
+
_seconds: DateTime.now().toSeconds(),
|
|
20
|
+
_nanoseconds: 0,
|
|
21
|
+
} as DateTimeType
|
|
22
|
+
}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('Text all handle clicks', () => {
|
|
28
|
+
const startConsultation = jest.fn();
|
|
29
|
+
const handleRefund = jest.fn();
|
|
30
|
+
|
|
31
|
+
render(
|
|
32
|
+
<ConsultationCard
|
|
33
|
+
startConsultation={() => startConsultation()}
|
|
34
|
+
handleReschedule={() => undefined}
|
|
35
|
+
handleRefund={() => handleRefund()}
|
|
36
|
+
consultationWith="Елена Шимановская"
|
|
37
|
+
avatar=""
|
|
38
|
+
autorecord
|
|
39
|
+
userTimeZone="America/New_York"
|
|
40
|
+
consultationTime={
|
|
41
|
+
{
|
|
42
|
+
_seconds: DateTime.now().toSeconds(),
|
|
43
|
+
_nanoseconds: 0,
|
|
44
|
+
} as DateTimeType
|
|
45
|
+
}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const refundButton = screen.getByText('Відмінити');
|
|
50
|
+
const startConsultationButton = screen.getByText('Почати консультацію');
|
|
51
|
+
expect(startConsultation).toHaveBeenCalledTimes(0);
|
|
52
|
+
expect(handleRefund).toHaveBeenCalledTimes(0);
|
|
53
|
+
|
|
54
|
+
startConsultationButton.click();
|
|
55
|
+
expect(startConsultation).toHaveBeenCalledTimes(1);
|
|
56
|
+
expect(handleRefund).toHaveBeenCalledTimes(0);
|
|
57
|
+
|
|
58
|
+
expect(startConsultation).toHaveBeenCalledTimes(1);
|
|
59
|
+
expect(handleRefund).toHaveBeenCalledTimes(0);
|
|
60
|
+
|
|
61
|
+
refundButton.click();
|
|
62
|
+
expect(startConsultation).toHaveBeenCalledTimes(1);
|
|
63
|
+
expect(handleRefund).toHaveBeenCalledTimes(1);
|
|
64
|
+
});
|
|
65
|
+
});
|