@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,96 @@
1
+ import React from 'react';
2
+ import { IonSkeletonText } from '@ionic/react';
3
+ import { timeOutline, cardOutline, briefcaseOutline } from 'ionicons/icons';
4
+ import {
5
+ PsychologistCardIcons,
6
+ IconsContainer,
7
+ Container,
8
+ InfoContainer,
9
+ Card,
10
+ } from './TherapistCard.style';
11
+
12
+ export interface TherapistCardProps {
13
+ psychologistName: string;
14
+ psychologistLastName: string;
15
+
16
+ /*
17
+ * The direction of psychologist work
18
+ */
19
+ psychologistType: string;
20
+
21
+ /*
22
+ * Link to psychologist photo
23
+ */
24
+ psychologistPhoto: string;
25
+
26
+ /*
27
+ * Consultation price
28
+ */
29
+ psychologistPrice: number;
30
+
31
+ /*
32
+ * Duration of consultation
33
+ */
34
+ psychologistDuration: number;
35
+ psychologistExperience: number;
36
+
37
+ /*
38
+ * The function that is called when clicking on the card
39
+ */
40
+ handleClick: (props?: React.SyntheticEvent) => void;
41
+ ['data-testid']?: string;
42
+ }
43
+
44
+ export const TherapistCard: React.FC<TherapistCardProps> = (props) => {
45
+ const [imageLoaded, setImageLoaded] = React.useState(false);
46
+
47
+ return (
48
+ <Container data-testid={props['data-testid']} onClick={props.handleClick}>
49
+ <Card>
50
+ <div className="img-container">
51
+ <img
52
+ className="img"
53
+ src={props.psychologistPhoto}
54
+ alt="psychologistPhoto"
55
+ onLoad={() => setImageLoaded(true)}
56
+ style={{ display: imageLoaded ? 'block' : 'none' }}
57
+ />
58
+
59
+ <IonSkeletonText
60
+ animated
61
+ className="img"
62
+ style={{ display: imageLoaded ? 'none' : 'block' }}
63
+ />
64
+ </div>
65
+
66
+ <div className="card-content">
67
+ <h1 className="bold">
68
+ {`${props.psychologistName} ${props.psychologistLastName}`}
69
+ </h1>
70
+ <h3 className="semiBold">{props.psychologistType}</h3>
71
+ <InfoContainer>
72
+ <IconsContainer>
73
+ <PsychologistCardIcons icon={timeOutline} />
74
+ <p className="semiBold">{`${props.psychologistDuration} хвилин`}</p>
75
+ </IconsContainer>
76
+ <IconsContainer>
77
+ <PsychologistCardIcons icon={briefcaseOutline} />
78
+ <p className="semiBold">
79
+ {props.psychologistExperience >= 5
80
+ ? `${props.psychologistExperience} років досвіду`
81
+ : props.psychologistExperience === 1
82
+ ? `${props.psychologistExperience} рік досвіду`
83
+ : `${props.psychologistExperience} роки досвіду`}
84
+ </p>
85
+ </IconsContainer>
86
+ <IconsContainer>
87
+ <PsychologistCardIcons icon={cardOutline} className="color-green" />
88
+ <p className="semiBold color-green">{`${props.psychologistPrice} грн`}</p>
89
+ </IconsContainer>
90
+ </InfoContainer>
91
+ </div>
92
+
93
+ </Card>
94
+ </Container>
95
+ );
96
+ };
@@ -0,0 +1,40 @@
1
+ import styled from 'styled-components';
2
+ import { colorConstants } from '../Theme/mindly_constants';
3
+
4
+ export const Container = styled.div`
5
+ width: 100%;
6
+ display: flex;
7
+ flex-direction: column;
8
+
9
+ img {
10
+ width: 100%;
11
+ height: 222px;
12
+ border-radius: 8px;
13
+ object-fit: cover;
14
+
15
+ @media (min-width: 600px) {
16
+ height: auto;
17
+ }
18
+
19
+ @media (min-width: 1024px) {
20
+ height: auto;
21
+ }
22
+ }
23
+ `;
24
+
25
+ export const Info = styled.div`
26
+ display: flex;
27
+ justify-content: space-between;
28
+ margin-top: 16px;
29
+
30
+ h3 {
31
+ color: ${colorConstants.primaryTextColor};
32
+ display: flex;
33
+ align-items: center;
34
+
35
+ ion-icon {
36
+ margin-right: 4px;
37
+ font-size: 24px;
38
+ }
39
+ }
40
+ `;
@@ -0,0 +1,16 @@
1
+ import { render } from '@testing-library/react';
2
+ import React from 'react';
3
+ import { TherapistInformationComponent } from './TherapistInformationComponent';
4
+
5
+ describe('Test therapist information component', () => {
6
+ test('Smoke test', () => {
7
+ render(
8
+ <TherapistInformationComponent
9
+ price="1200 грн"
10
+ avatar=""
11
+ duration="50 хв"
12
+ experience="4 роки"
13
+ />
14
+ );
15
+ });
16
+ });
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { Container, Info } from './TherapistInformationComponent.style';
3
+ import { timeOutline, cardOutline, briefcaseOutline } from 'ionicons/icons';
4
+ import { IonIcon } from '@ionic/react';
5
+ import '../Theme/global.css';
6
+
7
+ export interface TherapistInformationComponentProps {
8
+ /*
9
+ * Link to psychologist avatar
10
+ */
11
+ avatar: string;
12
+
13
+ /*
14
+ * Psychologist's experience
15
+ */
16
+ experience: string;
17
+
18
+ /*
19
+ * Consultation duration
20
+ */
21
+ duration: string;
22
+
23
+ /*
24
+ * Consultation cost
25
+ */
26
+ price: string;
27
+ ['data-testid']?: string;
28
+ }
29
+
30
+ export const TherapistInformationComponent: React.FC<TherapistInformationComponentProps> =
31
+ (props) => {
32
+ return (
33
+ <Container data-testid={props['data-testid']}>
34
+ <img src={props.avatar} alt="therapist avatar" />
35
+ <Info>
36
+ <h3 className="semiBold">
37
+ <IonIcon icon={briefcaseOutline} color="primary" />
38
+ {props.experience}
39
+ </h3>
40
+ <h3 className="semiBold">
41
+ <IonIcon icon={timeOutline} color="primary" />
42
+ {props.duration}
43
+ </h3>
44
+ <h3 className="semiBold">
45
+ <IonIcon icon={cardOutline} color="primary" />
46
+ {props.price}
47
+ </h3>
48
+ </Info>
49
+ </Container>
50
+ );
51
+ };
@@ -0,0 +1,13 @@
1
+ .toast_classes {
2
+ color: #ffffff;
3
+ --background: #1d201f;
4
+ font-weight: 400;
5
+ font-size: 14px;
6
+ line-height: 16px;
7
+ margin-top: 30px;
8
+ border-radius: 4px;
9
+ }
10
+
11
+ .toast_classes_ios {
12
+ top: -36px;
13
+ }
@@ -0,0 +1,17 @@
1
+ import './index.css';
2
+ import { isPlatform } from '@ionic/react';
3
+ /**
4
+ * Toast that work line an API, we can call it anywhere, need message text and duration(default 3 seconds)
5
+ */
6
+ export const toast = (message: string, duration = 4500): Promise<void> => {
7
+ const toastMessage = document.createElement('ion-toast');
8
+ toastMessage.message = message;
9
+ toastMessage.duration = duration;
10
+ toastMessage.position = 'top';
11
+ toastMessage.cssClass = isPlatform('ios')
12
+ ? 'toast_classes toast_classes_ios'
13
+ : 'toast_classes';
14
+
15
+ document.getElementById('root')?.appendChild(toastMessage);
16
+ return toastMessage.present();
17
+ };
@@ -0,0 +1,261 @@
1
+ export interface IPromotionalCode {
2
+ /**
3
+ * The percentage value that specifies the size of the discount
4
+ * @example 25
5
+ */
6
+ percent_off: number;
7
+ /**
8
+ * Price after applying promocode
9
+ */
10
+ price_uah: string;
11
+ }
12
+
13
+ export enum PaidTypes {
14
+ paid_100 = 'paid_100',
15
+ paid_0 = 'paid_0',
16
+ }
17
+
18
+ export type PsychologistProfileType = {
19
+ id: string;
20
+ psychologist_id?: string;
21
+ articles: Array<{
22
+ subtheme: string;
23
+ content: Array<{ photoURL: string; title: string; link: string }>;
24
+ }>;
25
+ education: string;
26
+ experience: string;
27
+ goal: string;
28
+ not_work_with: Array<string>;
29
+ short_description: string;
30
+ specialization: string;
31
+ video: Array<{
32
+ subtheme: string;
33
+ content: Array<{ title: string; url: string }>;
34
+ }>;
35
+ work_with: Array<string>;
36
+ };
37
+
38
+ //PsychologistCalendarType****
39
+ export type PsycologistCalendarType = {
40
+ id: string;
41
+ psychologist_id: string;
42
+ schedule: Array<{ slot_id: string }>;
43
+ };
44
+
45
+ export type WeeklyAvailabilitiesItem = {
46
+ reason: 'busy' | 'opened' | 'booked';
47
+ isAvailable: boolean;
48
+ time: string;
49
+ };
50
+
51
+ export type PsychologistDevicesProfileType = {
52
+ tokens?: {
53
+ fcmtokens?: string[];
54
+ };
55
+ };
56
+
57
+ export type PsychologistType = {
58
+ id: string;
59
+ consultation_with: string;
60
+ duration: number;
61
+ email: string;
62
+ first_name: string;
63
+ last_name: string;
64
+ price: number;
65
+ focus: string;
66
+ photo: string;
67
+ avatar: string;
68
+ experience: number;
69
+ time_zone: string;
70
+ calendar: PsycologistCalendarType;
71
+ devices?: PsychologistDevicesProfileType;
72
+ profile: PsychologistProfileType;
73
+ isTestUser: boolean;
74
+ psychologistSex?: 'female' | 'male';
75
+ };
76
+
77
+ export type ConsultationType = {
78
+ id: string;
79
+ consultation_time: {
80
+ _seconds: number;
81
+ nanoseconds: number;
82
+ };
83
+ consultation_with: string;
84
+ duration: number;
85
+ exchange_rate: string;
86
+ payment_date: {
87
+ _seconds: number;
88
+ nanoseconds: number;
89
+ };
90
+ payment_type?: string;
91
+ price: number;
92
+ price_uah: number;
93
+ psychologist_avatar: string;
94
+ psychologist_id: string;
95
+ psychologist_name: string;
96
+ psychologist_timezone: string;
97
+ user_avatar: string;
98
+ user_id: string;
99
+ user_name: string;
100
+ user_timezone: string;
101
+ videochat_url: string;
102
+ was_rescheduled: boolean;
103
+ session_status?: 'client_showed' | 'client_not_showed';
104
+ consultation_time_before_rescheduling?: {
105
+ _seconds: number;
106
+ nanoseconds: number;
107
+ };
108
+ applied_promotional_code?: string | null;
109
+ auto_booking_status?: 'enable' | 'disable';
110
+ };
111
+
112
+ export type ConsultationWatcherType = {
113
+ user_id: string;
114
+ payment_date: {
115
+ seconds: number;
116
+ nanoseconds: number;
117
+ };
118
+ };
119
+
120
+ export type HasPaidConsultationsWithType = {
121
+ therapistID?: string;
122
+ currentPrice?: string;
123
+ };
124
+
125
+ export type UserType = {
126
+ id?: string | undefined;
127
+ avatar?: Array<{ url: string }>;
128
+ display_name: string;
129
+ last_name?: string;
130
+ displayName?: string;
131
+ email: string;
132
+ phone_number: string;
133
+ phoneNumber?: string;
134
+ surveyAnswers?: QuestionType[];
135
+ user_psychologists?: Array<string> | string;
136
+ isTestUser: boolean;
137
+ /**
138
+ * @deprecated
139
+ */
140
+ client_from_country?: string;
141
+ financial_support_approved?: boolean;
142
+ hasPaidConsultationsWith?: Array<HasPaidConsultationsWithType>;
143
+ };
144
+
145
+ export type QuestionType = {
146
+ answers: string[];
147
+ photoURL: string;
148
+ question: string;
149
+ subquestion: string;
150
+ };
151
+
152
+ export type AnswerType = {
153
+ id: number;
154
+ question: string;
155
+ answer: string;
156
+ };
157
+
158
+ export type SurveyType = {
159
+ questions: QuestionType[];
160
+ };
161
+
162
+ export type InputState = {
163
+ value: string;
164
+ active: boolean;
165
+ };
166
+
167
+ export type ChangeUserDataObject = {
168
+ display_name: string;
169
+ last_name: string;
170
+ phone_number: string;
171
+ };
172
+
173
+ export type GoogleForgotPasswordAnswer = {
174
+ apiKey: string;
175
+ lang: string;
176
+ mode: string;
177
+ oobCode: string;
178
+ };
179
+
180
+ export interface Customer {
181
+ /**
182
+ * Unique identifier for the object.
183
+ */
184
+ id: string;
185
+
186
+ /**
187
+ * String representing the object's type. Objects of the same type share the same value.
188
+ */
189
+ object: 'customer';
190
+
191
+ /**
192
+ * Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
193
+ */
194
+ balance: number;
195
+
196
+ /**
197
+ * Time at which the object was created. Measured in seconds since the Unix epoch.
198
+ */
199
+ created: number;
200
+
201
+ /**
202
+ * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.
203
+ */
204
+ currency: string | null;
205
+
206
+ deleted?: void;
207
+
208
+ /**
209
+ * When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.
210
+ *
211
+ * If an invoice is marked uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't get reset to `false`.
212
+ */
213
+ delinquent: boolean | null;
214
+
215
+ /**
216
+ * An arbitrary string attached to the object. Often useful for displaying to users.
217
+ */
218
+ description: string | null;
219
+
220
+ /**
221
+ * The customer's email address.
222
+ */
223
+ email: string | null;
224
+
225
+ /**
226
+ * The prefix for the customer used to generate unique invoice numbers.
227
+ */
228
+ invoice_prefix: string | null;
229
+
230
+ invoice_settings: {
231
+ /**
232
+ * ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
233
+ */
234
+ default_payment_method?: string;
235
+ };
236
+
237
+ /**
238
+ * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
239
+ */
240
+ livemode: boolean;
241
+
242
+ /**
243
+ * The customer's full name or business name.
244
+ */
245
+ name: string | null;
246
+
247
+ /**
248
+ * The suffix of the customer's next invoice number, e.g., 0001.
249
+ */
250
+ next_invoice_sequence?: number;
251
+
252
+ /**
253
+ * The customer's phone number.
254
+ */
255
+ phone: string | null;
256
+
257
+ /**
258
+ * The customer's preferred locales (languages), ordered by preference.
259
+ */
260
+ preferred_locales: Array<string> | null;
261
+ }
@@ -0,0 +1,28 @@
1
+ import styled from 'styled-components';
2
+
3
+ export const StyledContainer = styled.div`
4
+ overflow: hidden;
5
+ display: flex;
6
+ justify-content: center;
7
+ align-items: center;
8
+ background: #d6f2f9;
9
+ border-radius: 4px;
10
+ `;
11
+
12
+ export const StyledTextWrapper = styled.div`
13
+ padding: 8px 0;
14
+ overflow: hidden;
15
+ display: flex;
16
+ align-items: center;
17
+ img {
18
+ width: 20px;
19
+ margin-right: 10px;
20
+ }
21
+ span {
22
+ font-weight: 400;
23
+ font-size: 14px;
24
+ line-height: 20px;
25
+ max-width: 200px;
26
+ overflow-wrap: break-word;
27
+ }
28
+ `;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import {
3
+ StyledContainer,
4
+ StyledTextWrapper,
5
+ } from './YourLocalTimeBlock.styled';
6
+ import '../Theme/global.css';
7
+
8
+ export interface YourLocalTimeBlockProps {
9
+ /*
10
+ * text to be rendered
11
+ */
12
+ text?: string;
13
+ }
14
+
15
+ export const YourLocalTimeBlock: React.FC<YourLocalTimeBlockProps> = ({
16
+ text = 'За Вашим місцевим часом',
17
+ }) => {
18
+ return (
19
+ <StyledContainer>
20
+ <StyledTextWrapper>
21
+ <img src="./YourLocalTimeBlock.png" alt="clock" />
22
+ <span>{text}</span>
23
+ </StyledTextWrapper>
24
+ </StyledContainer>
25
+ );
26
+ };
@@ -0,0 +1 @@
1
+ // / <reference types="react-scripts" />
package/dist/svg.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ declare module '*.svg?inline' {
2
+ import React = require('react');
3
+ export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
4
+ const src: string;
5
+ export default src;
6
+ }
7
+
8
+ declare module '*.svg' {
9
+ import React = require('react');
10
+ export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
11
+ const src: string;
12
+ export default src;
13
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@mindly/ui-components",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "clean": "rimraf dist",
8
- "build": "react-scripts build",
8
+ "build": "NODE_ENV=production && rm -rf dist/* && babel src/ --out-dir dist --copy-files --no-copy-ignored --ignore src/stories/",
9
9
  "test:ts": "tsc --noEmit --skipLibCheck",
10
10
  "coverage": "npm test -- --env=jsdom --coverage --coverageDirectory=jest-coverage --passWithNoTests",
11
11
  "test:lint": "eslint \"./src/**/*{ts,tsx}\" --ignore-pattern \"*.d.ts\" --fix",
@@ -56,21 +56,8 @@
56
56
  "styled-components": "^5.3.1",
57
57
  "web-vitals": "^1.1.2"
58
58
  },
59
- "main": "dist/cjs/index.js",
60
- "module": "dist/esm/index.js",
61
- "typings": "dist/index.d.ts",
62
- "babel": {
63
- "presets": [
64
- [
65
- "@babel/preset-react",
66
- "@babel/env",
67
- "react-app",
68
- {
69
- "absoluteRuntime": false
70
- }
71
- ]
72
- ]
73
- },
59
+ "main": "dist/index.js",
60
+ "module": "dist/index.js",
74
61
  "eslintConfig": {
75
62
  "extends": [
76
63
  "react-app",