@mindly/ui-components 0.1.7 → 0.1.9

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 (58) hide show
  1. package/dist/index.tsx +0 -9
  2. package/dist/index.tsx.map +0 -0
  3. package/dist/node_modules/ionicons/icons/index.mjs.js +10 -0
  4. package/dist/node_modules/ionicons/icons/index.mjs.js.map +1 -0
  5. package/dist/node_modules/style-inject/dist/style-inject.es.js +29 -0
  6. package/dist/node_modules/style-inject/dist/style-inject.es.js.map +1 -0
  7. package/dist/node_modules/tslib/tslib.es6.js +33 -0
  8. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  9. package/dist/src/index.js +7 -0
  10. package/dist/src/index.js.map +1 -0
  11. package/dist/src/lib/Theme/global.css.js +7 -0
  12. package/dist/src/lib/Theme/global.css.js.map +1 -0
  13. package/dist/{Theme/mindly_constants.ts → src/lib/Theme/mindly_constants.js} +5 -2
  14. package/dist/src/lib/Theme/mindly_constants.js.map +1 -0
  15. package/dist/src/lib/button/Button.js +11 -0
  16. package/dist/src/lib/button/Button.js.map +1 -0
  17. package/dist/src/lib/button/Button.style.js +9 -0
  18. package/dist/src/lib/button/Button.style.js.map +1 -0
  19. package/dist/src/lib/floating-button/floating button.svg.js +6 -0
  20. package/dist/src/lib/floating-button/floating button.svg.js.map +1 -0
  21. package/dist/src/lib/floating-button/floatingButton.js +12 -0
  22. package/dist/src/lib/floating-button/floatingButton.js.map +1 -0
  23. package/dist/src/lib/floating-button/floatingButton.style.js +8 -0
  24. package/dist/src/lib/floating-button/floatingButton.style.js.map +1 -0
  25. package/dist/src/lib/footer-for-booking/FooterForBooking.js +13 -0
  26. package/dist/src/lib/footer-for-booking/FooterForBooking.js.map +1 -0
  27. package/dist/src/lib/footer-for-booking/FooterForBooking.style.js +12 -0
  28. package/dist/src/lib/footer-for-booking/FooterForBooking.style.js.map +1 -0
  29. package/dist/src/lib/list-button/listButton.js +10 -0
  30. package/dist/src/lib/list-button/listButton.js.map +1 -0
  31. package/dist/src/lib/list-button/listButton.style.js +11 -0
  32. package/dist/src/lib/list-button/listButton.style.js.map +1 -0
  33. package/dist/src/lib/navigation-bar/NavigationBar.js +12 -0
  34. package/dist/src/lib/navigation-bar/NavigationBar.js.map +1 -0
  35. package/dist/src/lib/navigation-bar/NavigationBar.style.js +10 -0
  36. package/dist/src/lib/navigation-bar/NavigationBar.style.js.map +1 -0
  37. package/dist/src/lib/tab-bar/tabBar.js +10 -0
  38. package/dist/src/lib/tab-bar/tabBar.js.map +1 -0
  39. package/dist/src/lib/tab-bar/tabBar.style.js +9 -0
  40. package/dist/src/lib/tab-bar/tabBar.style.js.map +1 -0
  41. package/package.json +10 -3
  42. package/dist/Theme/global.css +0 -191
  43. package/dist/button/Button.style.ts +0 -83
  44. package/dist/button/Button.tsx +0 -29
  45. package/dist/consultation-card/consultationCard.tsx +0 -18
  46. package/dist/floating-button/floating button.svg +0 -6
  47. package/dist/floating-button/floatingButton.style.ts +0 -21
  48. package/dist/floating-button/floatingButton.tsx +0 -29
  49. package/dist/footer-for-booking/FooterForBooking.style.ts +0 -42
  50. package/dist/footer-for-booking/FooterForBooking.tsx +0 -43
  51. package/dist/list-button/listButton.style.ts +0 -19
  52. package/dist/list-button/listButton.tsx +0 -19
  53. package/dist/navigation-bar/NavigationBar.style.ts +0 -56
  54. package/dist/navigation-bar/NavigationBar.tsx +0 -26
  55. package/dist/tab-bar/tabBar.style.ts +0 -15
  56. package/dist/tab-bar/tabBar.tsx +0 -33
  57. package/dist/therapist-card/TherapistCard.style.ts +0 -140
  58. package/dist/therapist-card/TherapistCard.tsx +0 -97
@@ -1,140 +0,0 @@
1
- import {
2
- IonCard,
3
- IonCardContent,
4
- IonCardHeader,
5
- IonCardSubtitle,
6
- IonCardTitle,
7
- IonCol,
8
- IonIcon, IonSkeletonText,
9
- } from '@ionic/react';
10
- import styled from 'styled-components';
11
- import {colorConstants} from '../Theme/mindly_constants';
12
-
13
- export const IonColWithoutPadding = styled(IonCol)`
14
- padding: 0;
15
- margin: 0;
16
- `;
17
-
18
- interface ContainerProps {
19
- isIos: boolean
20
- }
21
-
22
- export const Container = styled.div<ContainerProps>`
23
- margin: 0 16px 24px;
24
- border-radius: 8px;
25
- box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
26
-
27
- &:first-child {
28
- margin-top: ${(props) => (props.isIos ? '28px' : '20px')};
29
- }
30
-
31
- &:last-of-type {
32
- margin-bottom: 80px;
33
- }
34
- `;
35
-
36
- type SkeletonProps = {
37
- isLoading: boolean
38
- }
39
-
40
- export const Skeleton = styled.div<SkeletonProps>`
41
- visibility: ${(props) => (props.isLoading ? 'visible' : 'hidden')};
42
- position: absolute;
43
- width: 100%;
44
- top: 0;
45
- `;
46
-
47
- type HideProps = {
48
- isLoading: boolean
49
- }
50
-
51
- export const Hide = styled.div<HideProps>`
52
- visibility: ${(props) => (props.isLoading ? 'hidden' : 'visible')};
53
- `;
54
-
55
- export const PsychologistCardIonCard = styled(IonCard)`
56
- height: 100%;
57
- border-radius: 8px;
58
- margin: 0;
59
- position: relative;
60
- box-shadow: none;
61
-
62
- img {
63
- height: 222px;
64
- width: 100%;
65
- object-fit: cover;
66
- }
67
- `;
68
-
69
- export const PsychologistCardIonCardHeader = styled(IonCardHeader)`
70
- padding: 16px 16px 0;
71
- `;
72
-
73
- export const PsychologistCardIonCardSubtitle = styled(IonCardSubtitle)`
74
- display: flex;
75
- align-items: flex-start;
76
- text-transform: none;
77
- letter-spacing: 0;
78
- margin: 4px 0 16px;
79
- color: ${colorConstants.primaryTextColor};
80
- `;
81
-
82
- export const PsychologistCardIonCardTitle = styled(IonCardTitle)`
83
- color: ${colorConstants.secondaryTextColor};
84
- margin: 0;
85
- `;
86
-
87
- export const PsychologistCardIonCardContent = styled(IonCardContent)`
88
- padding: 0 16px 16px;
89
- `;
90
-
91
- export const PsychologistCardIcons = styled(IonIcon)`
92
- color: ${colorConstants.primaryColor};
93
- width: 20px;
94
- height: 20px;
95
- margin: 0;
96
-
97
- @media (max-width: 320px) {
98
- width: 19px;
99
- }
100
- `;
101
-
102
- export const IconsContainer = styled.div`
103
- display: flex;
104
- align-items: center;
105
- padding: 0;
106
- margin: 0;
107
-
108
- p {
109
- color: ${colorConstants.secondaryTextColor};
110
- font-size: 14px;
111
- padding-left: 5px;
112
- margin: 0;
113
-
114
- @media (max-width: 320px) {
115
- font-size: 11.5px;
116
- }
117
- }
118
- `;
119
-
120
- export const InfoContainer = styled.div`
121
- display: flex;
122
- justify-content: space-between;
123
- `;
124
-
125
- interface SkeletonTextProps{
126
- height: number
127
- }
128
-
129
- export const SkeletonText = styled(IonSkeletonText)<SkeletonTextProps>`
130
- width: 100%;
131
- height: ${(props) => props.height + 'px'};
132
-
133
- &:first-child {
134
- margin-bottom: 16px;
135
- }
136
-
137
- &:last-child{
138
- margin-top: 16px;
139
- }
140
- `;
@@ -1,97 +0,0 @@
1
- import React, {useState} from 'react';
2
- import {timeOutline, cardOutline, briefcaseOutline} from 'ionicons/icons';
3
- import {
4
- PsychologistCardIonCardContent,
5
- PsychologistCardIonCardHeader,
6
- PsychologistCardIonCardSubtitle,
7
- PsychologistCardIonCardTitle,
8
- PsychologistCardIcons,
9
- PsychologistCardIonCard,
10
- IconsContainer,
11
- Container,
12
- Skeleton,
13
- Hide,
14
- InfoContainer,
15
- SkeletonText,
16
- } from './TherapistCard.style';
17
- import {isPlatform} from '@ionic/react';
18
-
19
- interface TherapistCardProps {
20
- psychologistName: string
21
- psychologistLastName: string
22
- psychologistType: string
23
- psychologistPhoto: string
24
- psychologistPrice: number
25
- psychologistDuration: number
26
- psychologistExperience: number
27
- handleClick: React.MouseEventHandler,
28
- }
29
-
30
-
31
- const TherapistCard: React.FC<TherapistCardProps> = ({
32
- psychologistName,
33
- psychologistLastName,
34
- psychologistType,
35
- psychologistPhoto,
36
- psychologistPrice,
37
- psychologistDuration,
38
- psychologistExperience,
39
- handleClick,
40
- }) => {
41
- const [isLoading, setIsLoading] = useState<boolean>(true);
42
-
43
- return (
44
- <Container isIos={isPlatform('ios')}>
45
- <PsychologistCardIonCard onClick={handleClick}>
46
- <Hide isLoading={isLoading}>
47
- <img src={psychologistPhoto}
48
- onLoad={() => setIsLoading(false)}
49
- alt='psychologistPhoto'
50
- />
51
- <PsychologistCardIonCardHeader>
52
- <PsychologistCardIonCardTitle>
53
- <h1 className='bold'>
54
- {`${psychologistName} ${psychologistLastName}`}
55
- </h1>
56
- </PsychologistCardIonCardTitle>
57
- <PsychologistCardIonCardSubtitle>
58
- <h3 className='semiBold'>
59
- {psychologistType}
60
- </h3>
61
- </PsychologistCardIonCardSubtitle>
62
- </PsychologistCardIonCardHeader>
63
- <PsychologistCardIonCardContent>
64
- <InfoContainer>
65
- <IconsContainer>
66
- <PsychologistCardIcons icon={timeOutline} />
67
- <p className='semiBold'>{`${psychologistDuration} минут`}</p>
68
- </IconsContainer>
69
- <IconsContainer>
70
- <PsychologistCardIcons icon={cardOutline} />
71
- <p className='semiBold'>{`${psychologistPrice} грн`}</p>
72
- </IconsContainer>
73
- <IconsContainer>
74
- <PsychologistCardIcons icon={briefcaseOutline} />
75
- <p className='semiBold'>
76
- {psychologistExperience >= 5 ?
77
- `${psychologistExperience} лет опыта` :
78
- psychologistExperience === 1 ?
79
- `${psychologistExperience} год опыта` :
80
- `${psychologistExperience} года опыта`}
81
- </p>
82
- </IconsContainer>
83
- </InfoContainer>
84
- </PsychologistCardIonCardContent>
85
- </Hide>
86
-
87
- <Skeleton isLoading={isLoading}>
88
- <SkeletonText height={222} animated/>
89
- <SkeletonText animated height={60} />
90
- <SkeletonText animated height={22} />
91
- </Skeleton>
92
- </PsychologistCardIonCard>
93
- </Container>
94
- );
95
- };
96
-
97
- export default TherapistCard;