medos-sdk 1.1.10 → 1.1.11

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 (97) hide show
  1. package/dist/client/MedosClient.d.ts +1 -0
  2. package/dist/client/MedosClient.js +7 -0
  3. package/dist/components/AppointmentCalender.js +19 -22
  4. package/dist/components/AppointmentConfirmationStep.d.ts +1 -0
  5. package/dist/components/AppointmentConfirmationStep.js +34 -42
  6. package/dist/components/AppointmentDateTimeModal.d.ts +1 -0
  7. package/dist/components/AppointmentDateTimeModal.js +201 -168
  8. package/dist/components/AppointmentSummaryStep.d.ts +12 -0
  9. package/dist/components/AppointmentSummaryStep.js +168 -0
  10. package/dist/components/BookingOptionStep.d.ts +14 -0
  11. package/dist/components/BookingOptionStep.js +346 -0
  12. package/dist/components/ContactInformationStep.js +10 -4
  13. package/dist/components/ContactPreferenceStep.js +10 -1
  14. package/dist/components/DoctorSelectModal.js +105 -59
  15. package/dist/components/EnquiryForm.js +81 -69
  16. package/dist/components/Icons/CloseIcon.d.ts +9 -0
  17. package/dist/components/Icons/CloseIcon.js +5 -0
  18. package/dist/components/InquiryDetailsStep.js +5 -1
  19. package/dist/components/PatientDetailsStep.js +17 -12
  20. package/dist/components/PatientSelectionStep.d.ts +12 -0
  21. package/dist/components/PatientSelectionStep.js +254 -0
  22. package/dist/components/PhoneVerificationStep.js +1 -1
  23. package/dist/components/SuccessStep.js +1 -1
  24. package/dist/components/appointment-booking/AppointmentCalender.js +200 -60
  25. package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
  26. package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +110 -25
  27. package/dist/components/appointment-booking/hooks/useAppointmentState.js +32 -0
  28. package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +0 -1
  29. package/dist/components/appointment-booking/types.d.ts +163 -0
  30. package/dist/components/appointment-booking/types.js +16 -0
  31. package/dist/components/appointment-modal-styles.d.ts +259 -0
  32. package/dist/components/appointment-modal-styles.js +395 -0
  33. package/dist/components/constant.d.ts +2 -0
  34. package/dist/components/constant.js +15 -0
  35. package/dist/components/custom-calendar.js +20 -11
  36. package/dist/components/styles.js +93 -52
  37. package/dist/components/theme-styles.d.ts +5 -4
  38. package/dist/components/theme-styles.js +221 -125
  39. package/dist/components/types.d.ts +3 -1
  40. package/dist/components/types.js +15 -0
  41. package/dist/components/utils.d.ts +3 -0
  42. package/dist/components/utils.js +59 -0
  43. package/dist/components/validation.d.ts +2 -0
  44. package/dist/components/validation.js +41 -0
  45. package/dist/core/theme/index.d.ts +1 -0
  46. package/dist/core/theme/index.js +1 -0
  47. package/dist/core/theme/responsive.d.ts +15 -0
  48. package/dist/core/theme/responsive.js +113 -0
  49. package/dist/core/theme/themes.js +16 -4
  50. package/dist/core/theme/types.d.ts +8 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.js +1 -0
  53. package/dist/react/ThemeProvider.d.ts +2 -1
  54. package/dist/react/ThemeProvider.js +49 -10
  55. package/dist/services/AppointmentService.d.ts +80 -2
  56. package/dist/services/AppointmentService.js +114 -5
  57. package/dist/services/WorkspaceService.d.ts +58 -3
  58. package/dist/services/WorkspaceService.js +10 -1
  59. package/dist/vanilla/AppointmentCalendarWidget.d.ts +9 -7
  60. package/dist/vanilla/AppointmentCalendarWidget.js +820 -377
  61. package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
  62. package/dist/vanilla/EnquiryFormWidget.js +25 -43
  63. package/dist/vanilla/client/MedosClient.d.ts +1 -0
  64. package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +1 -0
  65. package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +1 -0
  66. package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
  67. package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
  68. package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
  69. package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
  70. package/dist/vanilla/components/VanillaCalendar.js +33 -18
  71. package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
  72. package/dist/vanilla/components/VanillaIcons.js +92 -0
  73. package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
  74. package/dist/vanilla/components/VanillaSelect.js +93 -5
  75. package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
  76. package/dist/vanilla/components/appointment-booking/types.d.ts +163 -0
  77. package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
  78. package/dist/vanilla/components/constant.d.ts +2 -0
  79. package/dist/vanilla/components/theme-styles.d.ts +5 -4
  80. package/dist/vanilla/components/types.d.ts +3 -1
  81. package/dist/vanilla/components/utils.d.ts +3 -0
  82. package/dist/vanilla/components/validation.d.ts +2 -0
  83. package/dist/vanilla/core/theme/index.d.ts +1 -0
  84. package/dist/vanilla/core/theme/responsive.d.ts +15 -0
  85. package/dist/vanilla/core/theme/types.d.ts +8 -0
  86. package/dist/vanilla/enquiry-widget.js +373 -52
  87. package/dist/vanilla/index.d.ts +2 -0
  88. package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
  89. package/dist/vanilla/services/AppointmentService.d.ts +80 -2
  90. package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
  91. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +9 -7
  92. package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
  93. package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
  94. package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
  95. package/dist/vanilla/widget.css +833 -207
  96. package/dist/vanilla/widget.js +6444 -5676
  97. package/package.json +1 -1
@@ -11,7 +11,7 @@ export const CONTAINER_STYLES = {
11
11
  maxWidth: 720,
12
12
  background: "#fff",
13
13
  borderRadius: 12,
14
- boxShadow: "0 8px 24px rgba(16,24,40,0.08)",
14
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.08)",
15
15
  padding: 24,
16
16
  boxSizing: "border-box",
17
17
  },
@@ -19,43 +19,61 @@ export const CONTAINER_STYLES = {
19
19
  display: "flex",
20
20
  alignItems: "center",
21
21
  justifyContent: "space-between",
22
- marginBottom: 16,
22
+ marginBottom: 20,
23
23
  },
24
24
  title: {
25
25
  marginLeft: 10,
26
26
  fontSize: 20,
27
27
  fontWeight: 600,
28
+ margin: 0,
28
29
  },
29
- section: { marginTop: 12 },
30
+ section: { marginTop: 16 },
30
31
  errorMessage: {
31
- marginBottom: 12,
32
+ marginBottom: 16,
33
+ padding: "12px 16px",
34
+ borderRadius: 8,
35
+ backgroundColor: "#fee2e2",
32
36
  color: "#ef4444",
33
- fontWeight: 600,
37
+ fontWeight: 500,
38
+ fontSize: 14,
39
+ border: "1px solid rgba(239, 68, 68, 0.2)",
34
40
  },
35
41
  actions: {
36
42
  display: "flex",
37
- gap: 8,
38
- marginTop: 16,
43
+ gap: 12,
44
+ marginTop: 24,
45
+ paddingTop: 20,
46
+ borderTop: "1px solid #e5e7eb",
39
47
  justifyContent: "flex-end",
40
48
  },
41
49
  };
42
50
  export const BUTTON_STYLES = {
43
51
  primary: {
44
- background: "#218838",
52
+ background: "#009b4d",
45
53
  color: "#fff",
46
54
  border: "none",
47
- padding: "10px 14px",
55
+ padding: "10px 20px",
48
56
  borderRadius: 8,
49
57
  cursor: "pointer",
50
58
  fontWeight: 600,
59
+ fontSize: 14,
60
+ transition: "all 0.2s ease",
61
+ minHeight: 40,
62
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
63
+ lineHeight: "1.5",
51
64
  },
52
65
  secondary: {
53
66
  background: "#fff",
54
- color: "#218838",
55
- border: "1px solid #218838",
56
- padding: "10px 14px",
67
+ color: "#111827",
68
+ border: "1px solid #e5e7eb",
69
+ padding: "10px 20px",
57
70
  borderRadius: 8,
58
71
  cursor: "pointer",
72
+ fontWeight: 600,
73
+ fontSize: 14,
74
+ transition: "all 0.2s ease",
75
+ minHeight: 40,
76
+ lineHeight: "1.5",
59
77
  },
60
78
  };
61
79
  export const PHONE_VERIFY_STYLES = {
@@ -64,17 +82,19 @@ export const PHONE_VERIFY_STYLES = {
64
82
  borderRadius: 12,
65
83
  overflow: "hidden",
66
84
  backgroundColor: "#fff",
85
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
67
86
  },
68
87
  header: {
69
- padding: "16px 24px",
88
+ padding: "18px 24px",
70
89
  borderBottom: "1px solid #e5e7eb",
71
- backgroundColor: "#f9fafb",
90
+ backgroundColor: "#27903F",
91
+ color: "#fff",
72
92
  },
73
93
  title: {
74
94
  margin: 0,
75
95
  fontSize: 18,
76
96
  fontWeight: 600,
77
- color: "#111827",
97
+ color: "#fff",
78
98
  },
79
99
  content: { padding: "24px" },
80
100
  label: {
@@ -84,34 +104,38 @@ export const PHONE_VERIFY_STYLES = {
84
104
  color: "#111827",
85
105
  marginBottom: 8,
86
106
  },
87
- phoneInputContainer: { display: "flex", gap: 8 },
107
+ phoneInputContainer: { display: "flex", gap: 10 },
88
108
  phoneInput: {
89
109
  flex: 1,
90
- padding: "10px 12px",
110
+ padding: "10px 14px",
91
111
  borderRadius: 8,
92
- border: "1px solid #e6e9ef",
112
+ border: "1px solid #e5e7eb",
93
113
  fontSize: 14,
94
114
  outline: "none",
95
115
  color: "#111827",
96
116
  boxSizing: "border-box",
117
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
118
+ minHeight: 40,
97
119
  },
98
120
  phoneDisplay: {
99
- padding: "10px 12px",
121
+ padding: "10px 14px",
100
122
  background: "#f9fafb",
101
123
  borderRadius: 8,
102
124
  fontSize: 14,
103
- color: "#374151",
125
+ color: "#111827",
104
126
  fontWeight: 500,
127
+ border: "1px solid #e5e7eb",
105
128
  },
106
129
  otpInput: {
107
130
  width: "100%",
108
- padding: "10px 12px",
109
- border: "1px solid #d1d5db",
131
+ padding: "10px 14px",
132
+ border: "1px solid #e5e7eb",
110
133
  borderRadius: 8,
111
134
  fontSize: 14,
112
135
  outline: "none",
113
136
  color: "#111827",
114
137
  boxSizing: "border-box",
138
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
115
139
  },
116
140
  otpHint: {
117
141
  marginTop: 8,
@@ -123,16 +147,16 @@ export const PHONE_VERIFY_STYLES = {
123
147
  padding: 16,
124
148
  borderRadius: 8,
125
149
  backgroundColor: "#F6FBF6",
126
- border: "1px solid #218838",
150
+ border: "1px solid #4E8F50",
127
151
  display: "flex",
128
152
  alignItems: "center",
129
153
  gap: 12,
130
154
  },
131
- successIcon: { fontSize: 24, color: "#218838" },
155
+ successIcon: { fontSize: 24, color: "#4E8F50" },
132
156
  successTitle: {
133
157
  fontSize: 14,
134
158
  fontWeight: 600,
135
- color: "#218838",
159
+ color: "#4E8F50",
136
160
  },
137
161
  successSubtitle: {
138
162
  fontSize: 12,
@@ -153,19 +177,23 @@ export const PATIENT_DETAILS_STYLES = {
153
177
  border: "1px solid #E5E7EB",
154
178
  borderRadius: "12px",
155
179
  marginBottom: "24px",
180
+ overflow: "hidden",
181
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
156
182
  },
157
183
  sectionHeader: {
158
- backgroundColor: "#F9FAFB",
159
- padding: "16px 20px",
184
+ backgroundColor: "#27903F",
185
+ padding: "18px 24px",
160
186
  display: "flex",
161
187
  alignItems: "center",
162
188
  gap: "12px",
163
189
  borderBottom: "1px solid #E5E7EB",
190
+ color: "#fff",
164
191
  },
165
192
  sectionTitle: {
166
193
  fontSize: "18px",
167
194
  fontWeight: 600,
168
195
  margin: 0,
196
+ color: "#fff",
169
197
  },
170
198
  sectionBody: { padding: "24px" },
171
199
  gridRow: {
@@ -176,34 +204,37 @@ export const PATIENT_DETAILS_STYLES = {
176
204
  },
177
205
  label: {
178
206
  display: "block",
179
- fontSize: 13,
180
- marginBottom: 6,
181
- color: "#374151",
207
+ fontSize: 14,
208
+ marginBottom: 8,
209
+ color: "#111827",
210
+ fontWeight: 500,
182
211
  },
183
212
  input: {
184
213
  width: "100%",
185
- padding: "10px 12px",
214
+ padding: "10px 14px",
186
215
  borderRadius: 8,
187
- border: "1px solid #e6e9ef",
216
+ border: "1px solid #e5e7eb",
188
217
  outline: "none",
189
218
  fontSize: 14,
190
219
  boxSizing: "border-box",
220
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
221
+ minHeight: 40,
191
222
  },
192
- phoneDisplay: { display: "flex", gap: "8px" },
223
+ phoneDisplay: { display: "flex", gap: "10px" },
193
224
  phoneCode: {
194
225
  width: "100px",
195
- padding: "10px 12px",
226
+ padding: "10px 14px",
196
227
  borderRadius: 8,
197
- border: "1px solid #e6e9ef",
228
+ border: "1px solid #e5e7eb",
198
229
  backgroundColor: "#F9FAFB",
199
230
  fontSize: 14,
200
231
  boxSizing: "border-box",
201
232
  },
202
233
  phoneNumber: {
203
234
  flex: 1,
204
- padding: "10px 12px",
235
+ padding: "10px 14px",
205
236
  borderRadius: 8,
206
- border: "1px solid #e6e9ef",
237
+ border: "1px solid #e5e7eb",
207
238
  backgroundColor: "#F9FAFB",
208
239
  fontSize: 14,
209
240
  boxSizing: "border-box",
@@ -213,22 +244,22 @@ export const SUCCESS_STYLES = {
213
244
  container: {
214
245
  display: "flex",
215
246
  flexDirection: "column",
216
- height: "100%",
217
- },
218
- header: {
219
- marginTop: "-16px",
220
247
  alignItems: "center",
248
+ padding: "32px 24px",
221
249
  textAlign: "center",
222
- color: "#27903F",
223
- fontWeight: 800,
224
- fontSize: "18px",
225
- marginBottom: "20px",
250
+ },
251
+ header: {
252
+ marginBottom: "24px",
226
253
  },
227
254
  iconContainer: {
228
255
  display: "flex",
229
256
  alignItems: "center",
230
257
  justifyContent: "center",
231
- padding: "12px 0",
258
+ width: "72px",
259
+ height: "72px",
260
+ borderRadius: "50%",
261
+ backgroundColor: "#ecfdf5",
262
+ marginBottom: "20px",
232
263
  },
233
264
  detailsContainer: {
234
265
  display: "flex",
@@ -236,22 +267,32 @@ export const SUCCESS_STYLES = {
236
267
  alignItems: "center",
237
268
  gap: "12px",
238
269
  textAlign: "center",
239
- color: "#27903F",
240
270
  },
241
- detailsTitle: { fontWeight: 600, fontSize: "16px" },
271
+ detailsTitle: {
272
+ fontWeight: 600,
273
+ fontSize: "18px",
274
+ color: "#4E8F50",
275
+ margin: 0,
276
+ },
242
277
  detailsList: {
243
278
  display: "flex",
244
279
  flexDirection: "column",
245
280
  gap: "4px",
246
281
  fontSize: "14px",
247
282
  width: "100%",
248
- maxWidth: "28rem",
283
+ maxWidth: "400px",
249
284
  textAlign: "center",
285
+ color: "#374151",
250
286
  },
251
287
  confirmationNote: {
252
- marginTop: "8px",
253
- fontSize: "12px",
288
+ marginTop: "12px",
289
+ fontSize: "14px",
254
290
  color: "#6B7280",
291
+ lineHeight: "1.5",
292
+ },
293
+ actionContainer: {
294
+ marginTop: "32px",
295
+ display: "flex",
296
+ justifyContent: "center",
255
297
  },
256
- actionContainer: { marginTop: "24px" },
257
298
  };
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
2
  import { MedosTheme } from "../core/theme/types";
3
- export declare function getContainerStyles(theme: MedosTheme, prefix?: string): Record<string, React.CSSProperties>;
4
- export declare function getButtonStyles(theme: MedosTheme, prefix?: string): Record<string, React.CSSProperties>;
5
- export declare function getPhoneVerifyStyles(theme: MedosTheme, prefix?: string): Record<string, React.CSSProperties>;
6
- export declare function getPatientDetailsStyles(theme: MedosTheme, prefix?: string): Record<string, React.CSSProperties>;
3
+ import { Breakpoint } from "../core/theme/responsive";
4
+ export declare function getContainerStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
5
+ export declare function getButtonStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
6
+ export declare function getPhoneVerifyStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
7
+ export declare function getPatientDetailsStyles(theme: MedosTheme, prefix?: string, breakpoint?: Breakpoint): Record<string, React.CSSProperties>;
7
8
  export declare function getSuccessStyles(theme: MedosTheme, prefix?: string): Record<string, React.CSSProperties>;
8
9
  export declare const CONTAINER_STYLES: Record<string, React.CSSProperties>;
9
10
  export declare const BUTTON_STYLES: Record<string, React.CSSProperties>;