medos-sdk 1.1.10 → 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 (265) hide show
  1. package/dist/client/MedosClient.d.ts +1 -0
  2. package/dist/client/MedosClient.js +8 -1
  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 +145 -67
  25. package/dist/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
  26. package/dist/components/appointment-booking/appointment-modal-styles.js +419 -0
  27. package/dist/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
  28. package/dist/components/appointment-booking/components/AppointmentConfirmationStep.js +107 -0
  29. package/dist/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
  30. package/dist/components/appointment-booking/components/AppointmentDateTimeModal.js +306 -0
  31. package/dist/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
  32. package/dist/components/appointment-booking/components/AppointmentSummaryStep.js +194 -0
  33. package/dist/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
  34. package/dist/components/appointment-booking/components/BookingOptionStep.js +350 -0
  35. package/dist/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
  36. package/dist/components/appointment-booking/components/DoctorSelectModal.js +213 -0
  37. package/dist/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
  38. package/dist/components/appointment-booking/components/PatientDetailsStep.js +96 -0
  39. package/dist/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
  40. package/dist/components/appointment-booking/components/PatientSelectionStep.js +254 -0
  41. package/dist/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
  42. package/dist/components/appointment-booking/components/PhoneVerificationStep.js +49 -0
  43. package/dist/components/appointment-booking/components/SuccessStep.d.ts +5 -0
  44. package/dist/components/appointment-booking/components/SuccessStep.js +9 -0
  45. package/dist/components/appointment-booking/components/index.d.ts +9 -0
  46. package/dist/components/appointment-booking/components/index.js +9 -0
  47. package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
  48. package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +111 -25
  49. package/dist/components/appointment-booking/hooks/useAppointmentState.js +32 -0
  50. package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +0 -1
  51. package/dist/components/appointment-booking/index.d.ts +2 -4
  52. package/dist/components/appointment-booking/index.js +2 -2
  53. package/dist/components/appointment-booking/types.d.ts +167 -0
  54. package/dist/components/appointment-booking/types.js +16 -0
  55. package/dist/components/appointment-modal-styles.d.ts +259 -0
  56. package/dist/components/appointment-modal-styles.js +395 -0
  57. package/dist/components/constant.d.ts +2 -0
  58. package/dist/components/constant.js +15 -0
  59. package/dist/components/constants/constant.d.ts +2 -0
  60. package/dist/components/constants/constant.js +15 -0
  61. package/dist/components/constants/index.d.ts +3 -0
  62. package/dist/components/constants/index.js +24 -0
  63. package/dist/components/constants/options.d.ts +13 -0
  64. package/dist/components/constants/options.js +35 -0
  65. package/dist/components/constants/validation.d.ts +6 -0
  66. package/dist/components/constants/validation.js +16 -0
  67. package/dist/components/custom-calendar.js +20 -11
  68. package/dist/components/enquiry-form/EnquiryForm.d.ts +7 -0
  69. package/dist/components/enquiry-form/EnquiryForm.js +238 -0
  70. package/dist/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
  71. package/dist/components/enquiry-form/components/ContactInformationStep.js +21 -0
  72. package/dist/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
  73. package/dist/components/enquiry-form/components/ContactPreferenceStep.js +20 -0
  74. package/dist/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
  75. package/dist/components/enquiry-form/components/InquiryDetailsStep.js +20 -0
  76. package/dist/components/enquiry-form/components/index.d.ts +3 -0
  77. package/dist/components/enquiry-form/components/index.js +3 -0
  78. package/dist/components/enquiry-form/index.d.ts +2 -0
  79. package/dist/components/enquiry-form/index.js +2 -0
  80. package/dist/components/index.d.ts +7 -0
  81. package/dist/components/index.js +7 -0
  82. package/dist/components/shared/icons/Check.d.ts +6 -0
  83. package/dist/components/shared/icons/Check.js +2 -0
  84. package/dist/components/shared/icons/ChevronDownIcon.d.ts +4 -0
  85. package/dist/components/shared/icons/ChevronDownIcon.js +2 -0
  86. package/dist/components/shared/icons/ChevronLeft.d.ts +3 -0
  87. package/dist/components/shared/icons/ChevronLeft.js +3 -0
  88. package/dist/components/shared/icons/ChevronRight.d.ts +3 -0
  89. package/dist/components/shared/icons/ChevronRight.js +3 -0
  90. package/dist/components/shared/icons/CloseIcon.d.ts +9 -0
  91. package/dist/components/shared/icons/CloseIcon.js +5 -0
  92. package/dist/components/shared/icons/ConfirmationCheck.d.ts +1 -0
  93. package/dist/components/shared/icons/ConfirmationCheck.js +9 -0
  94. package/dist/components/shared/icons/ConsultationType.d.ts +1 -0
  95. package/dist/components/shared/icons/ConsultationType.js +2 -0
  96. package/dist/components/shared/icons/Date&TimeIcon.d.ts +1 -0
  97. package/dist/components/shared/icons/Date&TimeIcon.js +2 -0
  98. package/dist/components/shared/icons/MapIcon.d.ts +1 -0
  99. package/dist/components/shared/icons/MapIcon.js +2 -0
  100. package/dist/components/shared/icons/MedosLogo.d.ts +3 -0
  101. package/dist/components/shared/icons/MedosLogo.js +3 -0
  102. package/dist/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
  103. package/dist/components/shared/icons/PaymentMethodIcon.js +2 -0
  104. package/dist/components/shared/icons/SuccessIcon.d.ts +8 -0
  105. package/dist/components/shared/icons/SuccessIcon.js +14 -0
  106. package/dist/components/shared/icons/UserIcon.d.ts +1 -0
  107. package/dist/components/shared/icons/UserIcon.js +2 -0
  108. package/dist/components/shared/icons/index.d.ts +13 -0
  109. package/dist/components/shared/icons/index.js +13 -0
  110. package/dist/components/shared/index.d.ts +2 -0
  111. package/dist/components/shared/index.js +2 -0
  112. package/dist/components/shared/ui/Calendar.d.ts +5 -0
  113. package/dist/components/shared/ui/Calendar.js +167 -0
  114. package/dist/components/shared/ui/SelectDropdown.d.ts +41 -0
  115. package/dist/components/shared/ui/SelectDropdown.js +301 -0
  116. package/dist/components/shared/ui/index.d.ts +2 -0
  117. package/dist/components/shared/ui/index.js +2 -0
  118. package/dist/components/styles/appointment.d.ts +4 -0
  119. package/dist/components/styles/appointment.js +220 -0
  120. package/dist/components/styles/enquiry.d.ts +2 -0
  121. package/dist/components/styles/enquiry.js +3 -0
  122. package/dist/components/styles/index.d.ts +2 -0
  123. package/dist/components/styles/index.js +2 -0
  124. package/dist/components/styles/shared.d.ts +3 -0
  125. package/dist/components/styles/shared.js +78 -0
  126. package/dist/components/styles.d.ts +1 -6
  127. package/dist/components/styles.js +1 -257
  128. package/dist/components/theme-styles.d.ts +5 -4
  129. package/dist/components/theme-styles.js +239 -125
  130. package/dist/components/types/appointment.d.ts +42 -0
  131. package/dist/components/types/appointment.js +1 -0
  132. package/dist/components/types/common.d.ts +24 -0
  133. package/dist/components/types/common.js +1 -0
  134. package/dist/components/types/enquiry.d.ts +59 -0
  135. package/dist/components/types/enquiry.js +1 -0
  136. package/dist/components/types/index.d.ts +4 -0
  137. package/dist/components/types/index.js +4 -0
  138. package/dist/components/types.d.ts +1 -52
  139. package/dist/components/types.js +1 -23
  140. package/dist/components/utils/date.d.ts +4 -0
  141. package/dist/components/utils/date.js +65 -0
  142. package/dist/components/utils/formatting.d.ts +4 -0
  143. package/dist/components/utils/formatting.js +9 -0
  144. package/dist/components/utils/index.d.ts +3 -0
  145. package/dist/components/utils/index.js +3 -0
  146. package/dist/components/utils/validation.d.ts +4 -0
  147. package/dist/components/utils/validation.js +37 -0
  148. package/dist/components/utils.d.ts +1 -5
  149. package/dist/components/utils.js +1 -15
  150. package/dist/components/validation.d.ts +1 -2
  151. package/dist/components/validation.js +1 -7
  152. package/dist/constants/index.d.ts +1 -1
  153. package/dist/constants/index.js +1 -1
  154. package/dist/core/theme/index.d.ts +1 -0
  155. package/dist/core/theme/index.js +1 -0
  156. package/dist/core/theme/responsive.d.ts +15 -0
  157. package/dist/core/theme/responsive.js +113 -0
  158. package/dist/core/theme/themes.js +16 -4
  159. package/dist/core/theme/types.d.ts +8 -0
  160. package/dist/index.d.ts +4 -2
  161. package/dist/index.js +2 -1
  162. package/dist/react/ThemeProvider.d.ts +2 -1
  163. package/dist/react/ThemeProvider.js +49 -10
  164. package/dist/react/index.d.ts +3 -3
  165. package/dist/react/index.js +1 -1
  166. package/dist/services/AppointmentService.d.ts +80 -2
  167. package/dist/services/AppointmentService.js +131 -5
  168. package/dist/services/AuthService.js +1 -1
  169. package/dist/services/WorkspaceService.d.ts +58 -3
  170. package/dist/services/WorkspaceService.js +10 -1
  171. package/dist/vanilla/AppointmentCalendarWidget.d.ts +17 -7
  172. package/dist/vanilla/AppointmentCalendarWidget.js +1401 -380
  173. package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
  174. package/dist/vanilla/EnquiryFormWidget.js +25 -43
  175. package/dist/vanilla/client/MedosClient.d.ts +1 -0
  176. package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +1 -0
  177. package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +1 -0
  178. package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
  179. package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
  180. package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
  181. package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
  182. package/dist/vanilla/components/VanillaCalendar.js +33 -18
  183. package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
  184. package/dist/vanilla/components/VanillaIcons.js +92 -0
  185. package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
  186. package/dist/vanilla/components/VanillaSelect.js +93 -5
  187. package/dist/vanilla/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
  188. package/dist/vanilla/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
  189. package/dist/vanilla/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
  190. package/dist/vanilla/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
  191. package/dist/vanilla/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
  192. package/dist/vanilla/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
  193. package/dist/vanilla/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
  194. package/dist/vanilla/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
  195. package/dist/vanilla/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
  196. package/dist/vanilla/components/appointment-booking/components/SuccessStep.d.ts +5 -0
  197. package/dist/vanilla/components/appointment-booking/components/index.d.ts +9 -0
  198. package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
  199. package/dist/vanilla/components/appointment-booking/index.d.ts +2 -4
  200. package/dist/vanilla/components/appointment-booking/types.d.ts +167 -0
  201. package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
  202. package/dist/vanilla/components/constant.d.ts +2 -0
  203. package/dist/vanilla/components/constants/constant.d.ts +2 -0
  204. package/dist/vanilla/components/constants/index.d.ts +3 -0
  205. package/dist/vanilla/components/constants/options.d.ts +13 -0
  206. package/dist/vanilla/components/constants/validation.d.ts +6 -0
  207. package/dist/vanilla/components/enquiry-form/EnquiryForm.d.ts +7 -0
  208. package/dist/vanilla/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
  209. package/dist/vanilla/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
  210. package/dist/vanilla/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
  211. package/dist/vanilla/components/enquiry-form/components/index.d.ts +3 -0
  212. package/dist/vanilla/components/enquiry-form/index.d.ts +2 -0
  213. package/dist/vanilla/components/index.d.ts +7 -3
  214. package/dist/vanilla/components/shared/icons/Check.d.ts +6 -0
  215. package/dist/vanilla/components/shared/icons/ChevronDownIcon.d.ts +4 -0
  216. package/dist/vanilla/components/shared/icons/ChevronLeft.d.ts +3 -0
  217. package/dist/vanilla/components/shared/icons/ChevronRight.d.ts +3 -0
  218. package/dist/vanilla/components/shared/icons/CloseIcon.d.ts +9 -0
  219. package/dist/vanilla/components/shared/icons/ConfirmationCheck.d.ts +1 -0
  220. package/dist/vanilla/components/shared/icons/ConsultationType.d.ts +1 -0
  221. package/dist/vanilla/components/shared/icons/Date&TimeIcon.d.ts +1 -0
  222. package/dist/vanilla/components/shared/icons/MapIcon.d.ts +1 -0
  223. package/dist/vanilla/components/shared/icons/MedosLogo.d.ts +3 -0
  224. package/dist/vanilla/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
  225. package/dist/vanilla/components/shared/icons/SuccessIcon.d.ts +8 -0
  226. package/dist/vanilla/components/shared/icons/UserIcon.d.ts +1 -0
  227. package/dist/vanilla/components/shared/icons/index.d.ts +13 -0
  228. package/dist/vanilla/components/shared/index.d.ts +2 -0
  229. package/dist/vanilla/components/shared/ui/Calendar.d.ts +5 -0
  230. package/dist/vanilla/components/shared/ui/SelectDropdown.d.ts +41 -0
  231. package/dist/vanilla/components/shared/ui/index.d.ts +2 -0
  232. package/dist/vanilla/components/styles/appointment.d.ts +4 -0
  233. package/dist/vanilla/components/styles/enquiry.d.ts +2 -0
  234. package/dist/vanilla/components/styles/index.d.ts +2 -0
  235. package/dist/vanilla/components/styles/shared.d.ts +3 -0
  236. package/dist/vanilla/components/styles.d.ts +1 -6
  237. package/dist/vanilla/components/theme-styles.d.ts +5 -4
  238. package/dist/vanilla/components/types/appointment.d.ts +42 -0
  239. package/dist/vanilla/components/types/common.d.ts +24 -0
  240. package/dist/vanilla/components/types/enquiry.d.ts +59 -0
  241. package/dist/vanilla/components/types/index.d.ts +4 -0
  242. package/dist/vanilla/components/types.d.ts +1 -52
  243. package/dist/vanilla/components/utils/date.d.ts +4 -0
  244. package/dist/vanilla/components/utils/formatting.d.ts +4 -0
  245. package/dist/vanilla/components/utils/index.d.ts +3 -0
  246. package/dist/vanilla/components/utils/validation.d.ts +4 -0
  247. package/dist/vanilla/components/utils.d.ts +1 -5
  248. package/dist/vanilla/components/validation.d.ts +1 -2
  249. package/dist/vanilla/constants/index.d.ts +1 -1
  250. package/dist/vanilla/core/theme/index.d.ts +1 -0
  251. package/dist/vanilla/core/theme/responsive.d.ts +15 -0
  252. package/dist/vanilla/core/theme/types.d.ts +8 -0
  253. package/dist/vanilla/enquiry-widget.js +3632 -90
  254. package/dist/vanilla/index.d.ts +4 -2
  255. package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
  256. package/dist/vanilla/react/index.d.ts +3 -3
  257. package/dist/vanilla/services/AppointmentService.d.ts +80 -2
  258. package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
  259. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +17 -7
  260. package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
  261. package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
  262. package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
  263. package/dist/vanilla/widget.css +1045 -205
  264. package/dist/vanilla/widget.js +10365 -5737
  265. package/package.json +2 -2
@@ -1,258 +1,367 @@
1
- export function getContainerStyles(theme, prefix = "medos") {
1
+ export function getContainerStyles(theme, prefix = "medos", breakpoint) {
2
+ const isMobile = breakpoint === "mobile";
3
+ const isTablet = breakpoint === "tablet";
2
4
  return {
3
5
  container: {
4
6
  display: "flex",
5
7
  justifyContent: "center",
6
- padding: theme.spacing.xl,
8
+ padding: isMobile ? "16px" : "20px",
7
9
  fontFamily: theme.typography.fontFamily,
8
10
  background: theme.colors.background,
9
11
  },
10
12
  card: {
11
13
  width: "100%",
12
- maxWidth: 720,
14
+ maxWidth: isMobile || isTablet ? "100%" : 720,
13
15
  background: theme.colors.surface,
14
- borderRadius: theme.radii.lg,
15
- boxShadow: theme.shadows.lg,
16
- padding: theme.spacing["2xl"],
16
+ borderRadius: "12px",
17
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.08)",
18
+ padding: isMobile ? "20px" : "24px",
17
19
  boxSizing: "border-box",
18
20
  },
19
21
  header: {
20
22
  display: "flex",
21
23
  alignItems: "center",
22
24
  justifyContent: "space-between",
23
- marginBottom: theme.spacing.lg,
25
+ marginBottom: "20px",
26
+ flexWrap: isMobile ? "wrap" : "nowrap",
24
27
  },
25
28
  title: {
26
- marginLeft: 10,
27
- fontSize: theme.typography.fontSizeXl,
28
- fontWeight: theme.typography.fontWeightSemibold,
29
+ marginLeft: isMobile ? 0 : 10,
30
+ fontSize: isMobile ? "18px" : "20px",
31
+ fontWeight: 600,
29
32
  color: theme.colors.text,
33
+ margin: 0,
30
34
  },
31
35
  section: {
32
- marginTop: theme.spacing.md,
36
+ marginTop: "16px",
33
37
  },
34
38
  errorMessage: {
35
- marginBottom: theme.spacing.md,
39
+ marginBottom: "16px",
40
+ padding: "12px 16px",
41
+ borderRadius: "8px",
42
+ backgroundColor: theme.colors.errorBackground,
36
43
  color: theme.colors.error,
37
- fontWeight: theme.typography.fontWeightSemibold,
44
+ fontWeight: 500,
45
+ fontSize: "14px",
46
+ border: `1px solid ${theme.colors.error}20`,
47
+ },
48
+ content: {
49
+ padding: isMobile ? "16px 0 16px 0" : "24px 0 24px 0",
38
50
  },
39
51
  actions: {
40
52
  display: "flex",
41
- gap: theme.spacing.sm,
42
- marginTop: theme.spacing.lg,
43
- justifyContent: "flex-end",
53
+ gap: "12px",
54
+ marginTop: "24px",
55
+ paddingTop: "20px",
56
+ borderTop: `1px solid ${theme.colors.border}`,
57
+ justifyContent: isMobile ? "stretch" : "flex-end",
58
+ flexDirection: isMobile ? "column" : "row",
59
+ },
60
+ branding: {
61
+ display: "flex",
62
+ alignItems: "center",
63
+ justifyContent: "center",
64
+ gap: "8px",
65
+ marginTop: isMobile ? "16px" : "24px",
66
+ paddingTop: isMobile ? "12px" : "16px",
67
+ borderTop: `1px solid ${theme.colors.border}`,
68
+ opacity: 0.8,
69
+ },
70
+ poweredBy: {
71
+ fontSize: "12px",
72
+ color: theme.colors.textSecondary,
73
+ fontWeight: 500,
44
74
  },
45
75
  };
46
76
  }
47
- export function getButtonStyles(theme, prefix = "medos") {
77
+ export function getButtonStyles(theme, prefix = "medos", breakpoint) {
78
+ const isMobile = breakpoint === "mobile";
79
+ const minHeight = isMobile ? "44px" : "40px";
80
+ const basePadding = isMobile ? "12px 20px" : "10px 20px";
81
+ const borderRadius = "8px";
48
82
  return {
49
83
  primary: {
50
84
  background: theme.colors.secondary,
51
85
  color: theme.colors.textOnSecondary,
52
86
  border: "none",
53
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
54
- borderRadius: theme.radii.md,
87
+ padding: basePadding,
88
+ borderRadius,
55
89
  cursor: "pointer",
56
- fontWeight: theme.typography.fontWeightSemibold,
57
- fontSize: theme.typography.fontSizeSm,
58
- transition: theme.transitions.normal,
90
+ fontWeight: 600,
91
+ fontSize: "14px",
92
+ transition: "all 0.2s ease",
93
+ minHeight,
94
+ width: isMobile ? "100%" : "auto",
95
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
96
+ lineHeight: "1.5",
59
97
  },
60
98
  primaryHover: {
61
99
  background: theme.colors.secondaryHover,
100
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)",
101
+ },
102
+ primaryDisabled: {
103
+ opacity: 0.6,
104
+ cursor: "not-allowed",
62
105
  },
63
106
  secondary: {
64
107
  background: theme.colors.surface,
65
108
  color: theme.colors.primary,
66
- border: `1px solid ${theme.colors.primary}`,
67
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
68
- borderRadius: theme.radii.md,
109
+ border: `1px solid ${theme.colors.border}`,
110
+ padding: basePadding,
111
+ borderRadius,
69
112
  cursor: "pointer",
70
- fontSize: theme.typography.fontSizeSm,
71
- transition: theme.transitions.normal,
113
+ fontWeight: 600,
114
+ fontSize: "14px",
115
+ transition: "all 0.2s ease",
116
+ minHeight,
117
+ width: isMobile ? "100%" : "auto",
118
+ lineHeight: "1.5",
72
119
  },
73
120
  secondaryHover: {
74
121
  background: theme.colors.surfaceHover,
122
+ borderColor: theme.colors.borderHover,
123
+ },
124
+ outline: {
125
+ background: "transparent",
126
+ color: theme.colors.text,
127
+ border: `1px solid ${theme.colors.border}`,
128
+ padding: basePadding,
129
+ borderRadius,
130
+ cursor: "pointer",
131
+ fontWeight: 500,
132
+ fontSize: "14px",
133
+ transition: "all 0.2s ease",
134
+ minHeight,
135
+ width: isMobile ? "100%" : "auto",
136
+ lineHeight: "1.5",
137
+ },
138
+ outlineHover: {
139
+ background: theme.colors.backgroundSecondary,
140
+ borderColor: theme.colors.borderHover,
141
+ },
142
+ ghost: {
143
+ background: "transparent",
144
+ color: theme.colors.primary,
145
+ border: "none",
146
+ padding: basePadding,
147
+ borderRadius,
148
+ cursor: "pointer",
149
+ fontWeight: 500,
150
+ fontSize: "14px",
151
+ transition: "all 0.2s ease",
152
+ minHeight,
153
+ width: isMobile ? "100%" : "auto",
154
+ lineHeight: "1.5",
155
+ },
156
+ ghostHover: {
157
+ background: `${theme.colors.primary}10`,
75
158
  },
76
159
  };
77
160
  }
78
- export function getPhoneVerifyStyles(theme, prefix = "medos") {
161
+ export function getPhoneVerifyStyles(theme, prefix = "medos", breakpoint) {
162
+ const isMobile = breakpoint === "mobile";
163
+ const borderRadius = "12px";
164
+ const cardBorder = `1px solid ${theme.colors.border}`;
79
165
  return {
80
166
  container: {
81
- border: `1px solid ${theme.colors.border}`,
82
- borderRadius: theme.radii.lg,
167
+ border: cardBorder,
168
+ borderRadius,
83
169
  overflow: "hidden",
84
170
  backgroundColor: theme.colors.surface,
171
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
85
172
  },
86
173
  header: {
87
- padding: "20px 24px 10px 24px",
174
+ padding: isMobile ? "16px 20px" : "18px 24px",
175
+ borderBottom: cardBorder,
176
+ backgroundColor: theme.colors.primary,
177
+ color: theme.colors.textOnPrimary,
178
+ },
179
+ title: {
180
+ fontSize: isMobile ? "16px" : "18px",
181
+ fontWeight: 600,
182
+ margin: 0,
183
+ color: theme.colors.textOnPrimary,
88
184
  },
89
- title: { fontSize: 20, fontWeight: 600, margin: 0 },
90
185
  content: {
91
- padding: theme.spacing["2xl"],
186
+ padding: isMobile ? "20px" : "24px",
92
187
  },
93
188
  label: {
94
189
  display: "block",
95
- fontSize: theme.typography.fontSizeSm,
96
- fontWeight: theme.typography.fontWeightMedium,
190
+ fontSize: "14px",
191
+ fontWeight: 500,
97
192
  color: theme.colors.text,
98
- marginBottom: theme.spacing.sm,
193
+ marginBottom: "8px",
99
194
  },
100
195
  phoneInputContainer: {
101
196
  display: "flex",
102
- gap: theme.spacing.sm,
197
+ gap: "10px",
198
+ flexDirection: isMobile ? "column" : "row",
103
199
  },
104
200
  phoneInput: {
105
201
  flex: 1,
106
202
  width: "100%",
107
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
108
- borderRadius: theme.radii.md,
203
+ padding: "10px 14px",
204
+ borderRadius: "8px",
109
205
  border: `1px solid ${theme.colors.border}`,
110
- fontSize: theme.typography.fontSizeSm,
206
+ fontSize: "14px",
111
207
  outline: "none",
112
208
  color: theme.colors.text,
113
209
  boxSizing: "border-box",
114
- transition: theme.transitions.normal,
210
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
211
+ minHeight: isMobile ? "44px" : "40px",
212
+ backgroundColor: theme.colors.surface,
115
213
  },
116
214
  phoneInputFocus: {
117
- borderColor: theme.colors.borderFocus,
118
- outline: `2px solid ${theme.colors.borderFocus}20`,
215
+ borderColor: theme.colors.primary,
216
+ boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
119
217
  },
120
218
  phoneDisplay: {
121
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
219
+ padding: "10px 14px",
122
220
  background: theme.colors.backgroundSecondary,
123
- borderRadius: theme.radii.md,
124
- fontSize: theme.typography.fontSizeSm,
125
- color: theme.colors.textSecondary,
126
- fontWeight: theme.typography.fontWeightMedium,
221
+ borderRadius: "8px",
222
+ fontSize: "14px",
223
+ color: theme.colors.text,
224
+ fontWeight: 500,
225
+ border: `1px solid ${theme.colors.border}`,
127
226
  },
128
227
  otpInput: {
129
228
  width: "100%",
130
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
131
- border: `1px solid ${theme.colors.borderHover}`,
132
- borderRadius: theme.radii.md,
133
- fontSize: theme.typography.fontSizeSm,
229
+ padding: "10px 14px",
230
+ border: `1px solid ${theme.colors.border}`,
231
+ borderRadius: "8px",
232
+ fontSize: "14px",
134
233
  outline: "none",
135
234
  color: theme.colors.text,
136
235
  boxSizing: "border-box",
137
- transition: theme.transitions.normal,
236
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
237
+ backgroundColor: theme.colors.surface,
138
238
  },
139
239
  otpInputFocus: {
140
- borderColor: theme.colors.borderFocus,
141
- outline: `2px solid ${theme.colors.borderFocus}20`,
240
+ borderColor: theme.colors.primary,
241
+ boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
142
242
  },
143
243
  otpHint: {
144
- marginTop: theme.spacing.sm,
145
- fontSize: theme.typography.fontSizeXs,
146
- color: theme.colors.textTertiary,
244
+ marginTop: "8px",
245
+ fontSize: "12px",
246
+ color: theme.colors.textSecondary,
147
247
  },
148
248
  successMessage: {
149
- marginTop: theme.spacing.xl,
150
- padding: theme.spacing.lg,
151
- borderRadius: theme.radii.md,
249
+ marginTop: "20px",
250
+ padding: "16px",
251
+ borderRadius: "8px",
152
252
  backgroundColor: theme.colors.successBackground,
153
253
  border: `1px solid ${theme.colors.success}`,
154
254
  display: "flex",
155
255
  alignItems: "center",
156
- gap: theme.spacing.md,
256
+ gap: "12px",
157
257
  },
158
258
  successIcon: {
159
- fontSize: theme.typography.fontSize2xl,
259
+ fontSize: "24px",
160
260
  color: theme.colors.success,
161
261
  },
162
262
  successTitle: {
163
- fontSize: theme.typography.fontSizeSm,
164
- fontWeight: theme.typography.fontWeightSemibold,
263
+ fontSize: "14px",
264
+ fontWeight: 600,
165
265
  color: theme.colors.success,
166
266
  },
167
267
  successSubtitle: {
168
- fontSize: theme.typography.fontSizeXs,
169
- color: theme.colors.textTertiary,
170
- marginTop: 2,
268
+ fontSize: "12px",
269
+ color: theme.colors.textSecondary,
270
+ marginTop: "2px",
171
271
  },
172
272
  footer: {
173
- padding: `${theme.spacing.lg} ${theme.spacing["2xl"]}`,
273
+ padding: isMobile ? "16px 20px" : "18px 24px",
174
274
  borderTop: `1px solid ${theme.colors.border}`,
175
275
  backgroundColor: theme.colors.surface,
176
276
  display: "flex",
177
- gap: theme.spacing.md,
178
- justifyContent: "flex-end",
277
+ gap: "12px",
278
+ justifyContent: isMobile ? "stretch" : "flex-end",
279
+ flexDirection: isMobile ? "column" : "row",
179
280
  },
180
281
  };
181
282
  }
182
- export function getPatientDetailsStyles(theme, prefix = "medos") {
283
+ export function getPatientDetailsStyles(theme, prefix = "medos", breakpoint) {
284
+ const isMobile = breakpoint === "mobile";
285
+ const borderRadius = "12px";
286
+ const cardBorder = `1px solid ${theme.colors.border}`;
183
287
  return {
184
288
  sectionCard: {
185
- border: `1px solid ${theme.colors.border}`,
186
- borderRadius: theme.radii.lg,
187
- marginBottom: theme.spacing["2xl"],
289
+ border: cardBorder,
290
+ borderRadius,
291
+ marginBottom: "24px",
292
+ overflow: "visible",
293
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
188
294
  },
189
295
  sectionHeader: {
190
296
  backgroundColor: theme.colors.primary,
191
- padding: `${theme.spacing.lg} ${theme.spacing.xl}`,
297
+ padding: isMobile ? "16px 20px" : "18px 24px",
192
298
  display: "flex",
193
299
  alignItems: "center",
194
- gap: theme.spacing.md,
195
- borderBottom: `1px solid ${theme.colors.border}`,
300
+ gap: "12px",
301
+ borderBottom: cardBorder,
196
302
  color: theme.colors.textOnPrimary,
197
303
  },
198
304
  sectionTitle: {
199
- fontSize: theme.typography.fontSizeLg,
200
- fontWeight: theme.typography.fontWeightSemibold,
305
+ fontSize: isMobile ? "16px" : "18px",
306
+ fontWeight: 600,
201
307
  margin: 0,
202
308
  color: theme.colors.textOnPrimary,
203
309
  },
204
310
  sectionBody: {
205
- padding: theme.spacing["2xl"],
311
+ padding: isMobile ? "20px" : "24px",
206
312
  },
207
313
  gridRow: {
208
314
  display: "grid",
209
- gridTemplateColumns: "1fr 1fr",
210
- gap: theme.spacing.xl,
211
- marginTop: theme.spacing.xl,
315
+ gridTemplateColumns: isMobile ? "1fr" : "1fr 1fr",
316
+ gap: isMobile ? "16px" : "20px",
317
+ marginTop: "20px",
212
318
  },
213
319
  label: {
214
320
  display: "block",
215
- fontSize: theme.typography.fontSizeXs,
216
- marginBottom: theme.spacing.xs,
217
- color: theme.colors.textSecondary,
218
- fontWeight: theme.typography.fontWeightMedium,
321
+ fontSize: "14px",
322
+ marginBottom: "8px",
323
+ color: theme.colors.text,
324
+ fontWeight: 500,
219
325
  },
220
326
  input: {
221
327
  width: "100%",
222
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
223
- borderRadius: theme.radii.md,
224
- border: `1px solid ${theme.colors.border}`,
328
+ padding: "10px 14px",
329
+ borderRadius: "8px",
330
+ border: cardBorder,
225
331
  outline: "none",
226
- fontSize: theme.typography.fontSizeSm,
332
+ fontSize: "14px",
227
333
  boxSizing: "border-box",
228
334
  color: theme.colors.text,
229
- transition: theme.transitions.normal,
335
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
336
+ minHeight: isMobile ? "44px" : "40px",
337
+ backgroundColor: theme.colors.surface,
230
338
  },
231
339
  inputFocus: {
232
- borderColor: theme.colors.borderFocus,
233
- outline: `2px solid ${theme.colors.borderFocus}20`,
340
+ borderColor: theme.colors.primary,
341
+ boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
234
342
  },
235
343
  phoneDisplay: {
236
344
  display: "flex",
237
- gap: theme.spacing.sm,
345
+ gap: "10px",
346
+ flexDirection: isMobile ? "column" : "row",
238
347
  },
239
348
  phoneCode: {
240
- width: "100px",
241
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
242
- borderRadius: theme.radii.md,
243
- border: `1px solid ${theme.colors.border}`,
349
+ width: isMobile ? "100%" : "100px",
350
+ padding: "10px 14px",
351
+ borderRadius: "8px",
352
+ border: cardBorder,
244
353
  backgroundColor: theme.colors.backgroundSecondary,
245
- fontSize: theme.typography.fontSizeSm,
354
+ fontSize: "14px",
246
355
  boxSizing: "border-box",
247
356
  color: theme.colors.textSecondary,
248
357
  },
249
358
  phoneNumber: {
250
359
  flex: 1,
251
- padding: `${theme.spacing.sm} ${theme.spacing.md}`,
252
- borderRadius: theme.radii.md,
253
- border: `1px solid ${theme.colors.border}`,
360
+ padding: "10px 14px",
361
+ borderRadius: "8px",
362
+ border: cardBorder,
254
363
  backgroundColor: theme.colors.backgroundSecondary,
255
- fontSize: theme.typography.fontSizeSm,
364
+ fontSize: "14px",
256
365
  boxSizing: "border-box",
257
366
  color: theme.colors.textSecondary,
258
367
  },
@@ -263,51 +372,56 @@ export function getSuccessStyles(theme, prefix = "medos") {
263
372
  container: {
264
373
  display: "flex",
265
374
  flexDirection: "column",
266
- height: "100%",
267
- },
268
- header: {
269
- marginTop: `-${theme.spacing.lg}`,
270
375
  alignItems: "center",
376
+ padding: "32px 24px",
271
377
  textAlign: "center",
272
- color: theme.colors.success,
273
- fontWeight: theme.typography.fontWeightBold,
274
- fontSize: theme.typography.fontSizeLg,
275
- marginBottom: theme.spacing.xl,
378
+ },
379
+ header: {
380
+ marginBottom: "24px",
276
381
  },
277
382
  iconContainer: {
278
383
  display: "flex",
279
384
  alignItems: "center",
280
385
  justifyContent: "center",
281
- padding: `${theme.spacing.md} 0`,
386
+ width: "72px",
387
+ height: "72px",
388
+ borderRadius: "50%",
389
+ backgroundColor: theme.colors.successBackground,
390
+ marginBottom: "20px",
282
391
  },
283
392
  detailsContainer: {
284
393
  display: "flex",
285
394
  flexDirection: "column",
286
395
  alignItems: "center",
287
- gap: theme.spacing.md,
396
+ gap: "12px",
288
397
  textAlign: "center",
289
- color: theme.colors.success,
290
398
  },
291
399
  detailsTitle: {
292
- fontWeight: theme.typography.fontWeightSemibold,
293
- fontSize: theme.typography.fontSizeMd,
400
+ fontWeight: 600,
401
+ fontSize: "18px",
402
+ color: theme.colors.success,
403
+ margin: 0,
294
404
  },
295
405
  detailsList: {
296
406
  display: "flex",
297
407
  flexDirection: "column",
298
- gap: theme.spacing.xs,
299
- fontSize: theme.typography.fontSizeSm,
408
+ gap: "4px",
409
+ fontSize: "14px",
300
410
  width: "100%",
301
- maxWidth: "28rem",
411
+ maxWidth: "400px",
302
412
  textAlign: "center",
413
+ color: theme.colors.textSecondary,
303
414
  },
304
415
  confirmationNote: {
305
- marginTop: theme.spacing.sm,
306
- fontSize: theme.typography.fontSizeXs,
307
- color: theme.colors.textTertiary,
416
+ marginTop: "12px",
417
+ fontSize: "14px",
418
+ color: theme.colors.textSecondary,
419
+ lineHeight: "1.5",
308
420
  },
309
421
  actionContainer: {
310
- marginTop: theme.spacing["2xl"],
422
+ marginTop: "32px",
423
+ display: "flex",
424
+ justifyContent: "center",
311
425
  },
312
426
  };
313
427
  }
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ export type { AppointmentState, AppointmentAction, Patient, SessionPack, AvailablePackage, BookingOptionType, } from "../appointment-booking/types";
3
+ export { INITIAL_STATE } from "../appointment-booking/types";
4
+ export type PhoneVerificationStepProps = {
5
+ state: any;
6
+ dispatch: React.Dispatch<any>;
7
+ onSendOtp: () => Promise<void>;
8
+ onVerifyOtp: () => Promise<void>;
9
+ onBack: () => void;
10
+ onContinue: () => void;
11
+ };
12
+ export type PatientDetailsStepProps = {
13
+ state: any;
14
+ dispatch: React.Dispatch<any>;
15
+ onBack: () => void;
16
+ onSubmit: () => Promise<void>;
17
+ isFirstStep?: boolean;
18
+ };
19
+ export type SuccessStepProps = {
20
+ onReset: () => void;
21
+ };
22
+ export type PhoneInputSectionProps = {
23
+ countryCode: string;
24
+ patientPhone: string;
25
+ onCountryCodeChange: (code: string) => void;
26
+ onPhoneChange: (phone: string) => void;
27
+ };
28
+ export type OtpInputSectionProps = {
29
+ countryCode: string;
30
+ patientPhone: string;
31
+ otpCode: string;
32
+ otpVerified: boolean;
33
+ onOtpChange: (code: string) => void;
34
+ };
35
+ export type PatientInfoSectionProps = {
36
+ state: any;
37
+ dispatch: React.Dispatch<any>;
38
+ };
39
+ export type AddressInfoSectionProps = {
40
+ state: any;
41
+ dispatch: React.Dispatch<any>;
42
+ };
@@ -0,0 +1 @@
1
+ export { INITIAL_STATE } from "../appointment-booking/types";
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ export interface BaseComponentProps {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ }
6
+ export interface BaseFormProps {
7
+ onSubmit?: () => void | Promise<void>;
8
+ onBack?: () => void;
9
+ onNext?: () => void;
10
+ isLoading?: boolean;
11
+ error?: string | null;
12
+ }
13
+ export interface BaseStepProps extends BaseFormProps {
14
+ onContinue?: () => void;
15
+ onReset?: () => void;
16
+ }
17
+ export interface SelectOption {
18
+ value: string;
19
+ label: string;
20
+ }
21
+ export interface CountryCodeOption {
22
+ code: string;
23
+ label: string;
24
+ }
@@ -0,0 +1 @@
1
+ export {};