medos-sdk 1.1.11 → 1.1.12

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 (195) hide show
  1. package/dist/client/MedosClient.js +1 -1
  2. package/dist/components/appointment-booking/AppointmentCalender.js +10 -72
  3. package/dist/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
  4. package/dist/components/appointment-booking/appointment-modal-styles.js +419 -0
  5. package/dist/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
  6. package/dist/components/appointment-booking/components/AppointmentConfirmationStep.js +107 -0
  7. package/dist/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
  8. package/dist/components/appointment-booking/components/AppointmentDateTimeModal.js +306 -0
  9. package/dist/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
  10. package/dist/components/appointment-booking/components/AppointmentSummaryStep.js +194 -0
  11. package/dist/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
  12. package/dist/components/appointment-booking/components/BookingOptionStep.js +350 -0
  13. package/dist/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
  14. package/dist/components/appointment-booking/components/DoctorSelectModal.js +213 -0
  15. package/dist/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
  16. package/dist/components/appointment-booking/components/PatientDetailsStep.js +96 -0
  17. package/dist/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
  18. package/dist/components/appointment-booking/components/PatientSelectionStep.js +254 -0
  19. package/dist/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
  20. package/dist/components/appointment-booking/components/PhoneVerificationStep.js +49 -0
  21. package/dist/components/appointment-booking/components/SuccessStep.d.ts +5 -0
  22. package/dist/components/appointment-booking/components/SuccessStep.js +9 -0
  23. package/dist/components/appointment-booking/components/index.d.ts +9 -0
  24. package/dist/components/appointment-booking/components/index.js +9 -0
  25. package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +1 -0
  26. package/dist/components/appointment-booking/index.d.ts +2 -4
  27. package/dist/components/appointment-booking/index.js +2 -2
  28. package/dist/components/appointment-booking/types.d.ts +4 -0
  29. package/dist/components/constants/constant.d.ts +2 -0
  30. package/dist/components/constants/constant.js +15 -0
  31. package/dist/components/constants/index.d.ts +3 -0
  32. package/dist/components/constants/index.js +24 -0
  33. package/dist/components/constants/options.d.ts +13 -0
  34. package/dist/components/constants/options.js +35 -0
  35. package/dist/components/constants/validation.d.ts +6 -0
  36. package/dist/components/constants/validation.js +16 -0
  37. package/dist/components/enquiry-form/EnquiryForm.d.ts +7 -0
  38. package/dist/components/enquiry-form/EnquiryForm.js +238 -0
  39. package/dist/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
  40. package/dist/components/enquiry-form/components/ContactInformationStep.js +21 -0
  41. package/dist/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
  42. package/dist/components/enquiry-form/components/ContactPreferenceStep.js +20 -0
  43. package/dist/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
  44. package/dist/components/enquiry-form/components/InquiryDetailsStep.js +20 -0
  45. package/dist/components/enquiry-form/components/index.d.ts +3 -0
  46. package/dist/components/enquiry-form/components/index.js +3 -0
  47. package/dist/components/enquiry-form/index.d.ts +2 -0
  48. package/dist/components/enquiry-form/index.js +2 -0
  49. package/dist/components/index.d.ts +7 -0
  50. package/dist/components/index.js +7 -0
  51. package/dist/components/shared/icons/Check.d.ts +6 -0
  52. package/dist/components/shared/icons/Check.js +2 -0
  53. package/dist/components/shared/icons/ChevronDownIcon.d.ts +4 -0
  54. package/dist/components/shared/icons/ChevronDownIcon.js +2 -0
  55. package/dist/components/shared/icons/ChevronLeft.d.ts +3 -0
  56. package/dist/components/shared/icons/ChevronLeft.js +3 -0
  57. package/dist/components/shared/icons/ChevronRight.d.ts +3 -0
  58. package/dist/components/shared/icons/ChevronRight.js +3 -0
  59. package/dist/components/shared/icons/CloseIcon.d.ts +9 -0
  60. package/dist/components/shared/icons/CloseIcon.js +5 -0
  61. package/dist/components/shared/icons/ConfirmationCheck.d.ts +1 -0
  62. package/dist/components/shared/icons/ConfirmationCheck.js +9 -0
  63. package/dist/components/shared/icons/ConsultationType.d.ts +1 -0
  64. package/dist/components/shared/icons/ConsultationType.js +2 -0
  65. package/dist/components/shared/icons/Date&TimeIcon.d.ts +1 -0
  66. package/dist/components/shared/icons/Date&TimeIcon.js +2 -0
  67. package/dist/components/shared/icons/MapIcon.d.ts +1 -0
  68. package/dist/components/shared/icons/MapIcon.js +2 -0
  69. package/dist/components/shared/icons/MedosLogo.d.ts +3 -0
  70. package/dist/components/shared/icons/MedosLogo.js +3 -0
  71. package/dist/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
  72. package/dist/components/shared/icons/PaymentMethodIcon.js +2 -0
  73. package/dist/components/shared/icons/SuccessIcon.d.ts +8 -0
  74. package/dist/components/shared/icons/SuccessIcon.js +14 -0
  75. package/dist/components/shared/icons/UserIcon.d.ts +1 -0
  76. package/dist/components/shared/icons/UserIcon.js +2 -0
  77. package/dist/components/shared/icons/index.d.ts +13 -0
  78. package/dist/components/shared/icons/index.js +13 -0
  79. package/dist/components/shared/index.d.ts +2 -0
  80. package/dist/components/shared/index.js +2 -0
  81. package/dist/components/shared/ui/Calendar.d.ts +5 -0
  82. package/dist/components/shared/ui/Calendar.js +167 -0
  83. package/dist/components/shared/ui/SelectDropdown.d.ts +41 -0
  84. package/dist/components/shared/ui/SelectDropdown.js +301 -0
  85. package/dist/components/shared/ui/index.d.ts +2 -0
  86. package/dist/components/shared/ui/index.js +2 -0
  87. package/dist/components/styles/appointment.d.ts +4 -0
  88. package/dist/components/styles/appointment.js +220 -0
  89. package/dist/components/styles/enquiry.d.ts +2 -0
  90. package/dist/components/styles/enquiry.js +3 -0
  91. package/dist/components/styles/index.d.ts +2 -0
  92. package/dist/components/styles/index.js +2 -0
  93. package/dist/components/styles/shared.d.ts +3 -0
  94. package/dist/components/styles/shared.js +78 -0
  95. package/dist/components/styles.d.ts +1 -6
  96. package/dist/components/styles.js +1 -298
  97. package/dist/components/theme-styles.js +18 -0
  98. package/dist/components/types/appointment.d.ts +42 -0
  99. package/dist/components/types/appointment.js +1 -0
  100. package/dist/components/types/common.d.ts +24 -0
  101. package/dist/components/types/common.js +1 -0
  102. package/dist/components/types/enquiry.d.ts +59 -0
  103. package/dist/components/types/enquiry.js +1 -0
  104. package/dist/components/types/index.d.ts +4 -0
  105. package/dist/components/types/index.js +4 -0
  106. package/dist/components/types.d.ts +1 -54
  107. package/dist/components/types.js +1 -38
  108. package/dist/components/utils/date.d.ts +4 -0
  109. package/dist/components/utils/date.js +65 -0
  110. package/dist/components/utils/formatting.d.ts +4 -0
  111. package/dist/components/utils/formatting.js +9 -0
  112. package/dist/components/utils/index.d.ts +3 -0
  113. package/dist/components/utils/index.js +3 -0
  114. package/dist/components/utils/validation.d.ts +4 -0
  115. package/dist/components/utils/validation.js +37 -0
  116. package/dist/components/utils.d.ts +1 -8
  117. package/dist/components/utils.js +1 -74
  118. package/dist/components/validation.d.ts +1 -4
  119. package/dist/components/validation.js +1 -48
  120. package/dist/constants/index.d.ts +1 -1
  121. package/dist/constants/index.js +1 -1
  122. package/dist/index.d.ts +2 -2
  123. package/dist/index.js +1 -1
  124. package/dist/react/index.d.ts +3 -3
  125. package/dist/react/index.js +1 -1
  126. package/dist/services/AppointmentService.js +26 -9
  127. package/dist/services/AuthService.js +1 -1
  128. package/dist/vanilla/AppointmentCalendarWidget.d.ts +8 -0
  129. package/dist/vanilla/AppointmentCalendarWidget.js +598 -20
  130. package/dist/vanilla/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
  131. package/dist/vanilla/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
  132. package/dist/vanilla/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
  133. package/dist/vanilla/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
  134. package/dist/vanilla/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
  135. package/dist/vanilla/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
  136. package/dist/vanilla/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
  137. package/dist/vanilla/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
  138. package/dist/vanilla/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
  139. package/dist/vanilla/components/appointment-booking/components/SuccessStep.d.ts +5 -0
  140. package/dist/vanilla/components/appointment-booking/components/index.d.ts +9 -0
  141. package/dist/vanilla/components/appointment-booking/index.d.ts +2 -4
  142. package/dist/vanilla/components/appointment-booking/types.d.ts +4 -0
  143. package/dist/vanilla/components/constants/constant.d.ts +2 -0
  144. package/dist/vanilla/components/constants/index.d.ts +3 -0
  145. package/dist/vanilla/components/constants/options.d.ts +13 -0
  146. package/dist/vanilla/components/constants/validation.d.ts +6 -0
  147. package/dist/vanilla/components/enquiry-form/EnquiryForm.d.ts +7 -0
  148. package/dist/vanilla/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
  149. package/dist/vanilla/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
  150. package/dist/vanilla/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
  151. package/dist/vanilla/components/enquiry-form/components/index.d.ts +3 -0
  152. package/dist/vanilla/components/enquiry-form/index.d.ts +2 -0
  153. package/dist/vanilla/components/index.d.ts +7 -3
  154. package/dist/vanilla/components/shared/icons/Check.d.ts +6 -0
  155. package/dist/vanilla/components/shared/icons/ChevronDownIcon.d.ts +4 -0
  156. package/dist/vanilla/components/shared/icons/ChevronLeft.d.ts +3 -0
  157. package/dist/vanilla/components/shared/icons/ChevronRight.d.ts +3 -0
  158. package/dist/vanilla/components/shared/icons/CloseIcon.d.ts +9 -0
  159. package/dist/vanilla/components/shared/icons/ConfirmationCheck.d.ts +1 -0
  160. package/dist/vanilla/components/shared/icons/ConsultationType.d.ts +1 -0
  161. package/dist/vanilla/components/shared/icons/Date&TimeIcon.d.ts +1 -0
  162. package/dist/vanilla/components/shared/icons/MapIcon.d.ts +1 -0
  163. package/dist/vanilla/components/shared/icons/MedosLogo.d.ts +3 -0
  164. package/dist/vanilla/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
  165. package/dist/vanilla/components/shared/icons/SuccessIcon.d.ts +8 -0
  166. package/dist/vanilla/components/shared/icons/UserIcon.d.ts +1 -0
  167. package/dist/vanilla/components/shared/icons/index.d.ts +13 -0
  168. package/dist/vanilla/components/shared/index.d.ts +2 -0
  169. package/dist/vanilla/components/shared/ui/Calendar.d.ts +5 -0
  170. package/dist/vanilla/components/shared/ui/SelectDropdown.d.ts +41 -0
  171. package/dist/vanilla/components/shared/ui/index.d.ts +2 -0
  172. package/dist/vanilla/components/styles/appointment.d.ts +4 -0
  173. package/dist/vanilla/components/styles/enquiry.d.ts +2 -0
  174. package/dist/vanilla/components/styles/index.d.ts +2 -0
  175. package/dist/vanilla/components/styles/shared.d.ts +3 -0
  176. package/dist/vanilla/components/styles.d.ts +1 -6
  177. package/dist/vanilla/components/types/appointment.d.ts +42 -0
  178. package/dist/vanilla/components/types/common.d.ts +24 -0
  179. package/dist/vanilla/components/types/enquiry.d.ts +59 -0
  180. package/dist/vanilla/components/types/index.d.ts +4 -0
  181. package/dist/vanilla/components/types.d.ts +1 -54
  182. package/dist/vanilla/components/utils/date.d.ts +4 -0
  183. package/dist/vanilla/components/utils/formatting.d.ts +4 -0
  184. package/dist/vanilla/components/utils/index.d.ts +3 -0
  185. package/dist/vanilla/components/utils/validation.d.ts +4 -0
  186. package/dist/vanilla/components/utils.d.ts +1 -8
  187. package/dist/vanilla/components/validation.d.ts +1 -4
  188. package/dist/vanilla/constants/index.d.ts +1 -1
  189. package/dist/vanilla/enquiry-widget.js +3277 -56
  190. package/dist/vanilla/index.d.ts +2 -2
  191. package/dist/vanilla/react/index.d.ts +3 -3
  192. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +8 -0
  193. package/dist/vanilla/widget.css +214 -0
  194. package/dist/vanilla/widget.js +4047 -187
  195. package/package.json +2 -2
@@ -0,0 +1,419 @@
1
+ export const getMobileStyles = (theme, breakpoint) => {
2
+ const borderRadius = "12px";
3
+ const cardBorder = `1px solid ${theme.colors.border}`;
4
+ const buttonRadius = "8px";
5
+ return {
6
+ container: {
7
+ backgroundColor: theme.colors.background,
8
+ padding: "20px 16px",
9
+ maxWidth: "100%",
10
+ fontFamily: theme.typography.fontFamily,
11
+ color: theme.colors.text,
12
+ minHeight: "100vh",
13
+ boxSizing: "border-box",
14
+ },
15
+ header: { marginBottom: 24 },
16
+ title: {
17
+ fontSize: 18,
18
+ fontWeight: 600,
19
+ margin: 0,
20
+ color: theme.colors.text,
21
+ },
22
+ section: { marginBottom: 24 },
23
+ sectionTitle: {
24
+ fontSize: 15,
25
+ fontWeight: 600,
26
+ marginBottom: 12,
27
+ color: theme.colors.text,
28
+ },
29
+ required: { color: theme.colors.error, marginLeft: 4 },
30
+ modeContainer: {
31
+ display: "flex",
32
+ flexDirection: "column",
33
+ gap: 10,
34
+ },
35
+ modeOption: {
36
+ display: "flex",
37
+ alignItems: "center",
38
+ gap: 12,
39
+ padding: "14px 16px",
40
+ border: cardBorder,
41
+ borderRadius,
42
+ cursor: "pointer",
43
+ fontSize: 15,
44
+ transition: "all 0.2s ease",
45
+ backgroundColor: theme.colors.surface,
46
+ },
47
+ radioInput: { width: 18, height: 18, accentColor: theme.colors.primary },
48
+ chargeAmount: { fontSize: 18, fontWeight: 600, color: theme.colors.text },
49
+ paymentOption: {
50
+ padding: "14px 16px",
51
+ border: cardBorder,
52
+ borderRadius,
53
+ fontSize: 15,
54
+ color: theme.colors.textSecondary,
55
+ backgroundColor: theme.colors.surface,
56
+ },
57
+ dateSection: {
58
+ marginBottom: 24,
59
+ padding: "16px",
60
+ backgroundColor: theme.colors.backgroundSecondary,
61
+ borderRadius,
62
+ border: cardBorder,
63
+ },
64
+ dateSectionHeader: { marginBottom: 12 },
65
+ dateSectionTitle: {
66
+ fontSize: 12,
67
+ fontWeight: 600,
68
+ color: theme.colors.textSecondary,
69
+ margin: 0,
70
+ letterSpacing: "0.5px",
71
+ textTransform: "uppercase",
72
+ },
73
+ monthNavigationContainer: {
74
+ display: "flex",
75
+ alignItems: "center",
76
+ justifyContent: "space-between",
77
+ marginBottom: 16,
78
+ position: "relative",
79
+ },
80
+ monthYearDisplay: {
81
+ fontSize: 16,
82
+ fontWeight: 600,
83
+ color: theme.colors.text,
84
+ textAlign: "center",
85
+ flex: 1,
86
+ },
87
+ navButton: {
88
+ background: "none",
89
+ border: "none",
90
+ color: theme.colors.text,
91
+ cursor: "pointer",
92
+ padding: 8,
93
+ borderRadius: buttonRadius,
94
+ display: "flex",
95
+ alignItems: "center",
96
+ justifyContent: "center",
97
+ transition: "all 0.2s ease",
98
+ minWidth: 36,
99
+ minHeight: 36,
100
+ flexShrink: 0,
101
+ },
102
+ dateCardsContainer: {
103
+ display: "flex",
104
+ justifyContent: "space-around",
105
+ alignItems: "center",
106
+ gap: 8,
107
+ width: "100%",
108
+ maxWidth: "100%",
109
+ overflow: "hidden",
110
+ },
111
+ dateCard: {
112
+ width: 56,
113
+ height: 56,
114
+ border: `2px solid ${theme.colors.border}`,
115
+ borderRadius: "50%",
116
+ display: "flex",
117
+ flexDirection: "column",
118
+ alignItems: "center",
119
+ justifyContent: "center",
120
+ cursor: "pointer",
121
+ transition: "all 0.2s ease",
122
+ backgroundColor: theme.colors.surface,
123
+ position: "relative",
124
+ flex: "0 0 auto",
125
+ },
126
+ dateCardSelected: {
127
+ borderColor: theme.colors.primary,
128
+ backgroundColor: theme.colors.primary,
129
+ color: theme.colors.textOnPrimary,
130
+ },
131
+ dateCardWeekday: {
132
+ fontSize: 9,
133
+ fontWeight: 500,
134
+ textTransform: "uppercase",
135
+ marginBottom: 2,
136
+ letterSpacing: "0.3px",
137
+ lineHeight: 1,
138
+ },
139
+ dateCardDay: { fontSize: 14, fontWeight: 700, lineHeight: 1 },
140
+ slotsContainer: {
141
+ marginBottom: 24,
142
+ width: "100%",
143
+ boxSizing: "border-box",
144
+ },
145
+ slotGrid: {
146
+ display: "grid",
147
+ gridTemplateColumns: "1fr 1fr",
148
+ gap: 12,
149
+ marginTop: 12,
150
+ maxHeight: "280px",
151
+ overflowY: "auto",
152
+ paddingRight: "8px",
153
+ paddingBottom: "4px",
154
+ scrollbarWidth: "thin",
155
+ scrollbarColor: `${theme.colors.primary}40 ${theme.colors.surface}`,
156
+ width: "100%",
157
+ boxSizing: "border-box",
158
+ },
159
+ slotButton: {
160
+ padding: "12px 8px",
161
+ border: `2px solid ${theme.colors.border}`,
162
+ borderRadius: buttonRadius,
163
+ backgroundColor: theme.colors.surface,
164
+ color: theme.colors.text,
165
+ fontSize: 12,
166
+ fontWeight: 600,
167
+ cursor: "pointer",
168
+ transition: "all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",
169
+ minHeight: 48,
170
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.03)",
171
+ position: "relative",
172
+ letterSpacing: "0.3px",
173
+ width: "100%",
174
+ boxSizing: "border-box",
175
+ textAlign: "center",
176
+ display: "flex",
177
+ alignItems: "center",
178
+ justifyContent: "center",
179
+ whiteSpace: "nowrap",
180
+ overflow: "hidden",
181
+ textOverflow: "ellipsis",
182
+ },
183
+ slotButtonSelected: {
184
+ borderColor: theme.colors.primary,
185
+ backgroundColor: theme.colors.primary,
186
+ color: theme.colors.textOnPrimary,
187
+ boxShadow: `0 4px 12px ${theme.colors.primary}30, 0 2px 4px ${theme.colors.primary}20`,
188
+ transform: "translateY(-1px)",
189
+ },
190
+ noSlots: {
191
+ textAlign: "center",
192
+ color: theme.colors.textSecondary,
193
+ fontSize: 14,
194
+ marginTop: 16,
195
+ padding: "20px",
196
+ },
197
+ footer: {
198
+ display: "flex",
199
+ gap: 12,
200
+ marginTop: "auto",
201
+ paddingTop: 20,
202
+ borderTop: cardBorder,
203
+ },
204
+ backButton: {
205
+ flex: 1,
206
+ padding: "12px 20px",
207
+ border: cardBorder,
208
+ borderRadius: buttonRadius,
209
+ backgroundColor: theme.colors.surface,
210
+ color: theme.colors.text,
211
+ fontSize: 14,
212
+ fontWeight: 600,
213
+ cursor: "pointer",
214
+ transition: "all 0.2s ease",
215
+ minHeight: 44,
216
+ },
217
+ nextButton: {
218
+ flex: 1,
219
+ padding: "12px 20px",
220
+ border: "none",
221
+ borderRadius: buttonRadius,
222
+ backgroundColor: theme.colors.secondary,
223
+ color: theme.colors.textOnSecondary,
224
+ fontSize: 14,
225
+ fontWeight: 600,
226
+ cursor: "pointer",
227
+ transition: "all 0.2s ease",
228
+ minHeight: 44,
229
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
230
+ },
231
+ };
232
+ };
233
+ export const getDesktopStyles = (theme, breakpoint) => {
234
+ const borderRadius = "12px";
235
+ const buttonRadius = "8px";
236
+ const cardBorder = `1px solid ${theme.colors.border}`;
237
+ return {
238
+ modalWrapper: {
239
+ borderRadius,
240
+ maxWidth: 850,
241
+ margin: "0 auto",
242
+ fontFamily: theme.typography.fontFamily,
243
+ color: theme.colors.text,
244
+ boxSizing: "border-box",
245
+ },
246
+ sectionCard: {
247
+ border: cardBorder,
248
+ borderRadius,
249
+ marginBottom: 20,
250
+ position: "relative",
251
+ overflow: "hidden",
252
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
253
+ },
254
+ sectionHeader: {
255
+ background: theme.colors.primary,
256
+ color: theme.colors.textOnPrimary,
257
+ borderBottom: cardBorder,
258
+ padding: "14px 20px",
259
+ display: "flex",
260
+ alignItems: "center",
261
+ gap: 10,
262
+ },
263
+ sectionTitle: { fontSize: 16, fontWeight: 600 },
264
+ sectionBody: {
265
+ padding: "20px",
266
+ position: "relative",
267
+ },
268
+ label: {
269
+ fontSize: 14,
270
+ fontWeight: 500,
271
+ marginBottom: 8,
272
+ display: "block",
273
+ color: theme.colors.text,
274
+ },
275
+ modeContainer: {
276
+ display: "flex",
277
+ gap: 20,
278
+ marginTop: 8,
279
+ flexDirection: "row",
280
+ },
281
+ radioLabel: {
282
+ display: "flex",
283
+ alignItems: "center",
284
+ gap: 10,
285
+ cursor: "pointer",
286
+ fontSize: 14,
287
+ padding: "8px 16px",
288
+ borderRadius: buttonRadius,
289
+ border: cardBorder,
290
+ transition: "all 0.2s ease",
291
+ backgroundColor: theme.colors.surface,
292
+ },
293
+ radioInput: {
294
+ width: 18,
295
+ height: 18,
296
+ accentColor: theme.colors.secondary,
297
+ cursor: "pointer",
298
+ },
299
+ rupee: {
300
+ fontWeight: 600,
301
+ fontSize: 18,
302
+ color: theme.colors.text,
303
+ },
304
+ dateTimeContainer: {
305
+ display: "flex",
306
+ gap: 24,
307
+ flexDirection: "row",
308
+ alignItems: "flex-start",
309
+ },
310
+ calendarBox: {
311
+ border: cardBorder,
312
+ borderRadius,
313
+ padding: 0,
314
+ width: "320px",
315
+ minWidth: "320px",
316
+ overflow: "visible",
317
+ backgroundColor: theme.colors.surface,
318
+ },
319
+ timesContainer: {
320
+ flex: 1,
321
+ minWidth: "300px",
322
+ maxWidth: "400px",
323
+ width: "100%",
324
+ boxSizing: "border-box",
325
+ },
326
+ timesLabel: {
327
+ fontWeight: 600,
328
+ fontSize: 15,
329
+ color: theme.colors.text,
330
+ marginBottom: 4,
331
+ },
332
+ dateLabel: {
333
+ color: theme.colors.textSecondary,
334
+ fontSize: 13,
335
+ fontWeight: 400,
336
+ },
337
+ noSlots: {
338
+ color: theme.colors.textSecondary,
339
+ fontSize: 14,
340
+ marginTop: 12,
341
+ padding: "16px",
342
+ textAlign: "center",
343
+ backgroundColor: theme.colors.backgroundSecondary,
344
+ borderRadius: buttonRadius,
345
+ },
346
+ slotGrid: {
347
+ display: "grid",
348
+ gridTemplateColumns: "1fr 1fr",
349
+ gap: 12,
350
+ marginTop: 16,
351
+ maxHeight: "240px",
352
+ overflowY: "auto",
353
+ paddingRight: "8px",
354
+ paddingBottom: "4px",
355
+ scrollbarWidth: "thin",
356
+ scrollbarColor: `${theme.colors.secondary}40 ${theme.colors.surface}`,
357
+ width: "100%",
358
+ boxSizing: "border-box",
359
+ },
360
+ slotButton: {
361
+ borderRadius: buttonRadius,
362
+ padding: "12px 8px",
363
+ border: `2px solid ${theme.colors.border}`,
364
+ fontSize: 13,
365
+ fontWeight: 600,
366
+ cursor: "pointer",
367
+ transition: "all 0.25s cubic-bezier(0.4, 0, 0.2, 1)",
368
+ minHeight: 48,
369
+ backgroundColor: theme.colors.surface,
370
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
371
+ position: "relative",
372
+ letterSpacing: "0.3px",
373
+ textAlign: "center",
374
+ width: "100%",
375
+ boxSizing: "border-box",
376
+ display: "flex",
377
+ alignItems: "center",
378
+ justifyContent: "center",
379
+ whiteSpace: "nowrap",
380
+ overflow: "hidden",
381
+ textOverflow: "ellipsis",
382
+ },
383
+ footer: {
384
+ display: "flex",
385
+ justifyContent: "flex-end",
386
+ alignItems: "center",
387
+ paddingTop: 20,
388
+ gap: 12,
389
+ flexDirection: "row",
390
+ },
391
+ backBtn: {
392
+ border: cardBorder,
393
+ background: theme.colors.surface,
394
+ color: theme.colors.text,
395
+ borderRadius: buttonRadius,
396
+ fontWeight: 600,
397
+ padding: "10px 20px",
398
+ cursor: "pointer",
399
+ width: "auto",
400
+ minHeight: 40,
401
+ fontSize: 14,
402
+ transition: "all 0.2s ease",
403
+ },
404
+ continueBtn: {
405
+ background: theme.colors.secondary,
406
+ color: theme.colors.textOnSecondary,
407
+ border: "none",
408
+ borderRadius: buttonRadius,
409
+ fontWeight: 600,
410
+ padding: "10px 20px",
411
+ cursor: "pointer",
412
+ width: "auto",
413
+ minHeight: 40,
414
+ fontSize: 14,
415
+ transition: "all 0.2s ease",
416
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
417
+ },
418
+ };
419
+ };
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import { Doctor, AddressItem } from "../../../services/AppointmentService";
3
+ interface AppointmentDetails {
4
+ patientName?: string;
5
+ visitationType?: string;
6
+ appointmentDate?: string;
7
+ fromTime?: string;
8
+ toTime?: string;
9
+ duration?: number;
10
+ location?: string;
11
+ mode?: string;
12
+ paymentMode?: string;
13
+ }
14
+ interface AppointmentConfirmationStepProps {
15
+ appointment: AppointmentDetails;
16
+ patient: {
17
+ firstName?: string;
18
+ middleName?: string;
19
+ lastName?: string;
20
+ patientName?: string;
21
+ };
22
+ selectedDoctor?: Doctor | null;
23
+ selectedAddress?: AddressItem | null;
24
+ onClose: () => void;
25
+ onGoBackToSlots?: () => void;
26
+ }
27
+ declare const AppointmentConfirmationStep: React.FC<AppointmentConfirmationStepProps>;
28
+ export default AppointmentConfirmationStep;
@@ -0,0 +1,107 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useTheme } from "../../../react/hooks/useTheme";
3
+ import { SuccessIcon, CloseIcon } from "../../shared/icons";
4
+ import { formatDate, formatTime, calculateDuration } from "../../utils/date";
5
+ const AppointmentConfirmationStep = ({ appointment, patient, selectedDoctor, selectedAddress, onClose, onGoBackToSlots, }) => {
6
+ const theme = useTheme();
7
+ const getDuration = () => {
8
+ if (appointment.duration)
9
+ return appointment.duration;
10
+ if (appointment.fromTime && appointment.toTime) {
11
+ return calculateDuration(`2000-01-01T${appointment.fromTime}`, `2000-01-01T${appointment.toTime}`);
12
+ }
13
+ return 60;
14
+ };
15
+ const getPatientName = () => {
16
+ if (appointment.patientName)
17
+ return appointment.patientName;
18
+ if (patient.patientName)
19
+ return patient.patientName;
20
+ const parts = [
21
+ patient.firstName,
22
+ patient.middleName,
23
+ patient.lastName,
24
+ ].filter(Boolean);
25
+ return parts.join(" ") || "Patient";
26
+ };
27
+ const duration = getDuration();
28
+ const patientName = getPatientName();
29
+ return (_jsxs("div", { style: {
30
+ display: "flex",
31
+ flexDirection: "column",
32
+ padding: "0",
33
+ fontFamily: theme.typography.fontFamily,
34
+ background: theme.colors.background,
35
+ minHeight: "500px",
36
+ position: "relative",
37
+ }, children: [_jsxs("div", { style: {
38
+ display: "flex",
39
+ justifyContent: "space-between",
40
+ alignItems: "center",
41
+ padding: "20px 24px",
42
+ borderBottom: `2px solid ${theme.colors.border}`,
43
+ background: theme.colors.surface,
44
+ }, children: [_jsx("h2", { style: {
45
+ fontSize: 24,
46
+ fontWeight: "bold",
47
+ color: theme.colors.text,
48
+ margin: 0,
49
+ }, children: "Appointment Confirmed" }), _jsx("button", { onClick: onGoBackToSlots || onClose, style: {
50
+ background: "none",
51
+ border: "none",
52
+ cursor: "pointer",
53
+ padding: "8px",
54
+ borderRadius: "6px",
55
+ display: "flex",
56
+ alignItems: "center",
57
+ justifyContent: "center",
58
+ transition: "background-color 0.2s ease",
59
+ backgroundColor: "transparent",
60
+ }, onMouseEnter: (e) => {
61
+ e.currentTarget.style.backgroundColor = theme.colors.border;
62
+ }, onMouseLeave: (e) => {
63
+ e.currentTarget.style.backgroundColor = "transparent";
64
+ }, title: "Close and select new slot", children: _jsx(CloseIcon, { size: 16, color: theme.colors.text }) })] }), _jsxs("div", { style: {
65
+ flex: 1,
66
+ display: "flex",
67
+ flexDirection: "column",
68
+ alignItems: "center",
69
+ justifyContent: "center",
70
+ padding: "40px 24px",
71
+ border: `2px solid ${theme.colors.border}`,
72
+ borderTop: "none",
73
+ background: theme.colors.surface,
74
+ textAlign: "center",
75
+ }, children: [_jsx("h3", { style: {
76
+ fontSize: 20,
77
+ fontWeight: "600",
78
+ color: theme.colors.success,
79
+ margin: "0 0 24px 0",
80
+ }, children: "Appointment Confirmed" }), _jsx("div", { style: { marginBottom: 32 }, children: _jsx(SuccessIcon, { size: 64, checkColor: "white", shapeColor: theme.colors.success }) }), _jsxs("div", { style: {
81
+ width: "100%",
82
+ maxWidth: 500,
83
+ marginBottom: 32,
84
+ }, children: [_jsx("h4", { style: {
85
+ fontSize: 18,
86
+ fontWeight: "600",
87
+ color: theme.colors.success,
88
+ marginBottom: 24,
89
+ }, children: "Appointment Details" }), _jsxs("div", { style: {
90
+ display: "flex",
91
+ flexDirection: "column",
92
+ gap: 12,
93
+ fontSize: 16,
94
+ lineHeight: 1.6,
95
+ color: theme.colors.text,
96
+ }, children: [_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Patient:" }), " ", patientName] }), selectedDoctor && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Doctor:" }), " ", selectedDoctor.name] })), appointment.visitationType && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Visitation Type:" }), " ", appointment.visitationType] })), appointment.appointmentDate && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Date:" }), " ", formatDate(appointment.appointmentDate)] })), appointment.fromTime && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Time:" }), " ", formatTime(appointment.fromTime)] })), _jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Duration:" }), " ", "~", duration, " minutes"] }), selectedAddress && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Location:" }), " ", selectedAddress.completeAddress ||
97
+ selectedAddress.address ||
98
+ "Address not available"] })), appointment.location && !selectedAddress && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Location:" }), " ", appointment.location] }))] })] }), _jsx("div", { style: {
99
+ fontSize: 16,
100
+ fontStyle: "italic",
101
+ color: theme.colors.textSecondary,
102
+ textAlign: "center",
103
+ maxWidth: 600,
104
+ lineHeight: 1.5,
105
+ }, children: "A confirmation email has been sent to the Patient's Email address." })] })] }));
106
+ };
107
+ export default AppointmentConfirmationStep;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { Slot } from "../../../services/AppointmentService";
3
+ export type AppointmentMode = "ONLINE" | "OFFLINE";
4
+ export type PaymentMode = "CASH" | "CARD" | "UPI";
5
+ type AppointmentModalProps = {
6
+ onlineFee?: number | null;
7
+ offlineFee?: number | null;
8
+ slots: Slot[];
9
+ selectedDate?: Date;
10
+ selectedSlot?: Slot | null;
11
+ consultationMode?: AppointmentMode;
12
+ onCancel: () => void;
13
+ onContinue: (mode: AppointmentMode, date: Date, slot: Slot, charge: string, paymentMode: PaymentMode) => void;
14
+ onDateChange?: (date: Date) => void;
15
+ initialStep?: "consultation" | "datetime";
16
+ };
17
+ export declare const AppointmentDateTimeModal: React.FC<AppointmentModalProps>;
18
+ export {};