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.
- package/dist/client/MedosClient.d.ts +1 -0
- package/dist/client/MedosClient.js +8 -1
- package/dist/components/AppointmentCalender.js +19 -22
- package/dist/components/AppointmentConfirmationStep.d.ts +1 -0
- package/dist/components/AppointmentConfirmationStep.js +34 -42
- package/dist/components/AppointmentDateTimeModal.d.ts +1 -0
- package/dist/components/AppointmentDateTimeModal.js +201 -168
- package/dist/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/components/AppointmentSummaryStep.js +168 -0
- package/dist/components/BookingOptionStep.d.ts +14 -0
- package/dist/components/BookingOptionStep.js +346 -0
- package/dist/components/ContactInformationStep.js +10 -4
- package/dist/components/ContactPreferenceStep.js +10 -1
- package/dist/components/DoctorSelectModal.js +105 -59
- package/dist/components/EnquiryForm.js +81 -69
- package/dist/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/components/Icons/CloseIcon.js +5 -0
- package/dist/components/InquiryDetailsStep.js +5 -1
- package/dist/components/PatientDetailsStep.js +17 -12
- package/dist/components/PatientSelectionStep.d.ts +12 -0
- package/dist/components/PatientSelectionStep.js +254 -0
- package/dist/components/PhoneVerificationStep.js +1 -1
- package/dist/components/SuccessStep.js +1 -1
- package/dist/components/appointment-booking/AppointmentCalender.js +145 -67
- package/dist/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
- package/dist/components/appointment-booking/appointment-modal-styles.js +419 -0
- package/dist/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
- package/dist/components/appointment-booking/components/AppointmentConfirmationStep.js +107 -0
- package/dist/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
- package/dist/components/appointment-booking/components/AppointmentDateTimeModal.js +306 -0
- package/dist/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/components/appointment-booking/components/AppointmentSummaryStep.js +194 -0
- package/dist/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
- package/dist/components/appointment-booking/components/BookingOptionStep.js +350 -0
- package/dist/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
- package/dist/components/appointment-booking/components/DoctorSelectModal.js +213 -0
- package/dist/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
- package/dist/components/appointment-booking/components/PatientDetailsStep.js +96 -0
- package/dist/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
- package/dist/components/appointment-booking/components/PatientSelectionStep.js +254 -0
- package/dist/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
- package/dist/components/appointment-booking/components/PhoneVerificationStep.js +49 -0
- package/dist/components/appointment-booking/components/SuccessStep.d.ts +5 -0
- package/dist/components/appointment-booking/components/SuccessStep.js +9 -0
- package/dist/components/appointment-booking/components/index.d.ts +9 -0
- package/dist/components/appointment-booking/components/index.js +9 -0
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
- package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +111 -25
- package/dist/components/appointment-booking/hooks/useAppointmentState.js +32 -0
- package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +0 -1
- package/dist/components/appointment-booking/index.d.ts +2 -4
- package/dist/components/appointment-booking/index.js +2 -2
- package/dist/components/appointment-booking/types.d.ts +167 -0
- package/dist/components/appointment-booking/types.js +16 -0
- package/dist/components/appointment-modal-styles.d.ts +259 -0
- package/dist/components/appointment-modal-styles.js +395 -0
- package/dist/components/constant.d.ts +2 -0
- package/dist/components/constant.js +15 -0
- package/dist/components/constants/constant.d.ts +2 -0
- package/dist/components/constants/constant.js +15 -0
- package/dist/components/constants/index.d.ts +3 -0
- package/dist/components/constants/index.js +24 -0
- package/dist/components/constants/options.d.ts +13 -0
- package/dist/components/constants/options.js +35 -0
- package/dist/components/constants/validation.d.ts +6 -0
- package/dist/components/constants/validation.js +16 -0
- package/dist/components/custom-calendar.js +20 -11
- package/dist/components/enquiry-form/EnquiryForm.d.ts +7 -0
- package/dist/components/enquiry-form/EnquiryForm.js +238 -0
- package/dist/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
- package/dist/components/enquiry-form/components/ContactInformationStep.js +21 -0
- package/dist/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/components/enquiry-form/components/ContactPreferenceStep.js +20 -0
- package/dist/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/components/enquiry-form/components/InquiryDetailsStep.js +20 -0
- package/dist/components/enquiry-form/components/index.d.ts +3 -0
- package/dist/components/enquiry-form/components/index.js +3 -0
- package/dist/components/enquiry-form/index.d.ts +2 -0
- package/dist/components/enquiry-form/index.js +2 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +7 -0
- package/dist/components/shared/icons/Check.d.ts +6 -0
- package/dist/components/shared/icons/Check.js +2 -0
- package/dist/components/shared/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/components/shared/icons/ChevronDownIcon.js +2 -0
- package/dist/components/shared/icons/ChevronLeft.d.ts +3 -0
- package/dist/components/shared/icons/ChevronLeft.js +3 -0
- package/dist/components/shared/icons/ChevronRight.d.ts +3 -0
- package/dist/components/shared/icons/ChevronRight.js +3 -0
- package/dist/components/shared/icons/CloseIcon.d.ts +9 -0
- package/dist/components/shared/icons/CloseIcon.js +5 -0
- package/dist/components/shared/icons/ConfirmationCheck.d.ts +1 -0
- package/dist/components/shared/icons/ConfirmationCheck.js +9 -0
- package/dist/components/shared/icons/ConsultationType.d.ts +1 -0
- package/dist/components/shared/icons/ConsultationType.js +2 -0
- package/dist/components/shared/icons/Date&TimeIcon.d.ts +1 -0
- package/dist/components/shared/icons/Date&TimeIcon.js +2 -0
- package/dist/components/shared/icons/MapIcon.d.ts +1 -0
- package/dist/components/shared/icons/MapIcon.js +2 -0
- package/dist/components/shared/icons/MedosLogo.d.ts +3 -0
- package/dist/components/shared/icons/MedosLogo.js +3 -0
- package/dist/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
- package/dist/components/shared/icons/PaymentMethodIcon.js +2 -0
- package/dist/components/shared/icons/SuccessIcon.d.ts +8 -0
- package/dist/components/shared/icons/SuccessIcon.js +14 -0
- package/dist/components/shared/icons/UserIcon.d.ts +1 -0
- package/dist/components/shared/icons/UserIcon.js +2 -0
- package/dist/components/shared/icons/index.d.ts +13 -0
- package/dist/components/shared/icons/index.js +13 -0
- package/dist/components/shared/index.d.ts +2 -0
- package/dist/components/shared/index.js +2 -0
- package/dist/components/shared/ui/Calendar.d.ts +5 -0
- package/dist/components/shared/ui/Calendar.js +167 -0
- package/dist/components/shared/ui/SelectDropdown.d.ts +41 -0
- package/dist/components/shared/ui/SelectDropdown.js +301 -0
- package/dist/components/shared/ui/index.d.ts +2 -0
- package/dist/components/shared/ui/index.js +2 -0
- package/dist/components/styles/appointment.d.ts +4 -0
- package/dist/components/styles/appointment.js +220 -0
- package/dist/components/styles/enquiry.d.ts +2 -0
- package/dist/components/styles/enquiry.js +3 -0
- package/dist/components/styles/index.d.ts +2 -0
- package/dist/components/styles/index.js +2 -0
- package/dist/components/styles/shared.d.ts +3 -0
- package/dist/components/styles/shared.js +78 -0
- package/dist/components/styles.d.ts +1 -6
- package/dist/components/styles.js +1 -257
- package/dist/components/theme-styles.d.ts +5 -4
- package/dist/components/theme-styles.js +239 -125
- package/dist/components/types/appointment.d.ts +42 -0
- package/dist/components/types/appointment.js +1 -0
- package/dist/components/types/common.d.ts +24 -0
- package/dist/components/types/common.js +1 -0
- package/dist/components/types/enquiry.d.ts +59 -0
- package/dist/components/types/enquiry.js +1 -0
- package/dist/components/types/index.d.ts +4 -0
- package/dist/components/types/index.js +4 -0
- package/dist/components/types.d.ts +1 -52
- package/dist/components/types.js +1 -23
- package/dist/components/utils/date.d.ts +4 -0
- package/dist/components/utils/date.js +65 -0
- package/dist/components/utils/formatting.d.ts +4 -0
- package/dist/components/utils/formatting.js +9 -0
- package/dist/components/utils/index.d.ts +3 -0
- package/dist/components/utils/index.js +3 -0
- package/dist/components/utils/validation.d.ts +4 -0
- package/dist/components/utils/validation.js +37 -0
- package/dist/components/utils.d.ts +1 -5
- package/dist/components/utils.js +1 -15
- package/dist/components/validation.d.ts +1 -2
- package/dist/components/validation.js +1 -7
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/core/theme/index.d.ts +1 -0
- package/dist/core/theme/index.js +1 -0
- package/dist/core/theme/responsive.d.ts +15 -0
- package/dist/core/theme/responsive.js +113 -0
- package/dist/core/theme/themes.js +16 -4
- package/dist/core/theme/types.d.ts +8 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/react/ThemeProvider.d.ts +2 -1
- package/dist/react/ThemeProvider.js +49 -10
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +1 -1
- package/dist/services/AppointmentService.d.ts +80 -2
- package/dist/services/AppointmentService.js +131 -5
- package/dist/services/AuthService.js +1 -1
- package/dist/services/WorkspaceService.d.ts +58 -3
- package/dist/services/WorkspaceService.js +10 -1
- package/dist/vanilla/AppointmentCalendarWidget.d.ts +17 -7
- package/dist/vanilla/AppointmentCalendarWidget.js +1401 -380
- package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
- package/dist/vanilla/EnquiryFormWidget.js +25 -43
- package/dist/vanilla/client/MedosClient.d.ts +1 -0
- package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +1 -0
- package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +1 -0
- package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
- package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
- package/dist/vanilla/components/VanillaCalendar.js +33 -18
- package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
- package/dist/vanilla/components/VanillaIcons.js +92 -0
- package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
- package/dist/vanilla/components/VanillaSelect.js +93 -5
- package/dist/vanilla/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
- package/dist/vanilla/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
- package/dist/vanilla/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
- package/dist/vanilla/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
- package/dist/vanilla/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
- package/dist/vanilla/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
- package/dist/vanilla/components/appointment-booking/components/SuccessStep.d.ts +5 -0
- package/dist/vanilla/components/appointment-booking/components/index.d.ts +9 -0
- package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
- package/dist/vanilla/components/appointment-booking/index.d.ts +2 -4
- package/dist/vanilla/components/appointment-booking/types.d.ts +167 -0
- package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
- package/dist/vanilla/components/constant.d.ts +2 -0
- package/dist/vanilla/components/constants/constant.d.ts +2 -0
- package/dist/vanilla/components/constants/index.d.ts +3 -0
- package/dist/vanilla/components/constants/options.d.ts +13 -0
- package/dist/vanilla/components/constants/validation.d.ts +6 -0
- package/dist/vanilla/components/enquiry-form/EnquiryForm.d.ts +7 -0
- package/dist/vanilla/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
- package/dist/vanilla/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
- package/dist/vanilla/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
- package/dist/vanilla/components/enquiry-form/components/index.d.ts +3 -0
- package/dist/vanilla/components/enquiry-form/index.d.ts +2 -0
- package/dist/vanilla/components/index.d.ts +7 -3
- package/dist/vanilla/components/shared/icons/Check.d.ts +6 -0
- package/dist/vanilla/components/shared/icons/ChevronDownIcon.d.ts +4 -0
- package/dist/vanilla/components/shared/icons/ChevronLeft.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/ChevronRight.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/CloseIcon.d.ts +9 -0
- package/dist/vanilla/components/shared/icons/ConfirmationCheck.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/ConsultationType.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/Date&TimeIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/MapIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/MedosLogo.d.ts +3 -0
- package/dist/vanilla/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/SuccessIcon.d.ts +8 -0
- package/dist/vanilla/components/shared/icons/UserIcon.d.ts +1 -0
- package/dist/vanilla/components/shared/icons/index.d.ts +13 -0
- package/dist/vanilla/components/shared/index.d.ts +2 -0
- package/dist/vanilla/components/shared/ui/Calendar.d.ts +5 -0
- package/dist/vanilla/components/shared/ui/SelectDropdown.d.ts +41 -0
- package/dist/vanilla/components/shared/ui/index.d.ts +2 -0
- package/dist/vanilla/components/styles/appointment.d.ts +4 -0
- package/dist/vanilla/components/styles/enquiry.d.ts +2 -0
- package/dist/vanilla/components/styles/index.d.ts +2 -0
- package/dist/vanilla/components/styles/shared.d.ts +3 -0
- package/dist/vanilla/components/styles.d.ts +1 -6
- package/dist/vanilla/components/theme-styles.d.ts +5 -4
- package/dist/vanilla/components/types/appointment.d.ts +42 -0
- package/dist/vanilla/components/types/common.d.ts +24 -0
- package/dist/vanilla/components/types/enquiry.d.ts +59 -0
- package/dist/vanilla/components/types/index.d.ts +4 -0
- package/dist/vanilla/components/types.d.ts +1 -52
- package/dist/vanilla/components/utils/date.d.ts +4 -0
- package/dist/vanilla/components/utils/formatting.d.ts +4 -0
- package/dist/vanilla/components/utils/index.d.ts +3 -0
- package/dist/vanilla/components/utils/validation.d.ts +4 -0
- package/dist/vanilla/components/utils.d.ts +1 -5
- package/dist/vanilla/components/validation.d.ts +1 -2
- package/dist/vanilla/constants/index.d.ts +1 -1
- package/dist/vanilla/core/theme/index.d.ts +1 -0
- package/dist/vanilla/core/theme/responsive.d.ts +15 -0
- package/dist/vanilla/core/theme/types.d.ts +8 -0
- package/dist/vanilla/enquiry-widget.js +3632 -90
- package/dist/vanilla/index.d.ts +4 -2
- package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
- package/dist/vanilla/react/index.d.ts +3 -3
- package/dist/vanilla/services/AppointmentService.d.ts +80 -2
- package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
- package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +17 -7
- package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
- package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
- package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
- package/dist/vanilla/widget.css +1045 -205
- package/dist/vanilla/widget.js +10365 -5737
- 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:
|
|
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:
|
|
15
|
-
boxShadow:
|
|
16
|
-
padding:
|
|
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:
|
|
25
|
+
marginBottom: "20px",
|
|
26
|
+
flexWrap: isMobile ? "wrap" : "nowrap",
|
|
24
27
|
},
|
|
25
28
|
title: {
|
|
26
|
-
marginLeft: 10,
|
|
27
|
-
fontSize:
|
|
28
|
-
fontWeight:
|
|
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:
|
|
36
|
+
marginTop: "16px",
|
|
33
37
|
},
|
|
34
38
|
errorMessage: {
|
|
35
|
-
marginBottom:
|
|
39
|
+
marginBottom: "16px",
|
|
40
|
+
padding: "12px 16px",
|
|
41
|
+
borderRadius: "8px",
|
|
42
|
+
backgroundColor: theme.colors.errorBackground,
|
|
36
43
|
color: theme.colors.error,
|
|
37
|
-
fontWeight:
|
|
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:
|
|
42
|
-
marginTop:
|
|
43
|
-
|
|
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:
|
|
54
|
-
borderRadius
|
|
87
|
+
padding: basePadding,
|
|
88
|
+
borderRadius,
|
|
55
89
|
cursor: "pointer",
|
|
56
|
-
fontWeight:
|
|
57
|
-
fontSize:
|
|
58
|
-
transition:
|
|
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.
|
|
67
|
-
padding:
|
|
68
|
-
borderRadius
|
|
109
|
+
border: `1px solid ${theme.colors.border}`,
|
|
110
|
+
padding: basePadding,
|
|
111
|
+
borderRadius,
|
|
69
112
|
cursor: "pointer",
|
|
70
|
-
|
|
71
|
-
|
|
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:
|
|
82
|
-
borderRadius
|
|
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
|
|
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:
|
|
186
|
+
padding: isMobile ? "20px" : "24px",
|
|
92
187
|
},
|
|
93
188
|
label: {
|
|
94
189
|
display: "block",
|
|
95
|
-
fontSize:
|
|
96
|
-
fontWeight:
|
|
190
|
+
fontSize: "14px",
|
|
191
|
+
fontWeight: 500,
|
|
97
192
|
color: theme.colors.text,
|
|
98
|
-
marginBottom:
|
|
193
|
+
marginBottom: "8px",
|
|
99
194
|
},
|
|
100
195
|
phoneInputContainer: {
|
|
101
196
|
display: "flex",
|
|
102
|
-
gap:
|
|
197
|
+
gap: "10px",
|
|
198
|
+
flexDirection: isMobile ? "column" : "row",
|
|
103
199
|
},
|
|
104
200
|
phoneInput: {
|
|
105
201
|
flex: 1,
|
|
106
202
|
width: "100%",
|
|
107
|
-
padding:
|
|
108
|
-
borderRadius:
|
|
203
|
+
padding: "10px 14px",
|
|
204
|
+
borderRadius: "8px",
|
|
109
205
|
border: `1px solid ${theme.colors.border}`,
|
|
110
|
-
fontSize:
|
|
206
|
+
fontSize: "14px",
|
|
111
207
|
outline: "none",
|
|
112
208
|
color: theme.colors.text,
|
|
113
209
|
boxSizing: "border-box",
|
|
114
|
-
transition:
|
|
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.
|
|
118
|
-
|
|
215
|
+
borderColor: theme.colors.primary,
|
|
216
|
+
boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
|
|
119
217
|
},
|
|
120
218
|
phoneDisplay: {
|
|
121
|
-
padding:
|
|
219
|
+
padding: "10px 14px",
|
|
122
220
|
background: theme.colors.backgroundSecondary,
|
|
123
|
-
borderRadius:
|
|
124
|
-
fontSize:
|
|
125
|
-
color: theme.colors.
|
|
126
|
-
fontWeight:
|
|
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:
|
|
131
|
-
border: `1px solid ${theme.colors.
|
|
132
|
-
borderRadius:
|
|
133
|
-
fontSize:
|
|
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:
|
|
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.
|
|
141
|
-
|
|
240
|
+
borderColor: theme.colors.primary,
|
|
241
|
+
boxShadow: `0 0 0 3px ${theme.colors.primary}15`,
|
|
142
242
|
},
|
|
143
243
|
otpHint: {
|
|
144
|
-
marginTop:
|
|
145
|
-
fontSize:
|
|
146
|
-
color: theme.colors.
|
|
244
|
+
marginTop: "8px",
|
|
245
|
+
fontSize: "12px",
|
|
246
|
+
color: theme.colors.textSecondary,
|
|
147
247
|
},
|
|
148
248
|
successMessage: {
|
|
149
|
-
marginTop:
|
|
150
|
-
padding:
|
|
151
|
-
borderRadius:
|
|
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:
|
|
256
|
+
gap: "12px",
|
|
157
257
|
},
|
|
158
258
|
successIcon: {
|
|
159
|
-
fontSize:
|
|
259
|
+
fontSize: "24px",
|
|
160
260
|
color: theme.colors.success,
|
|
161
261
|
},
|
|
162
262
|
successTitle: {
|
|
163
|
-
fontSize:
|
|
164
|
-
fontWeight:
|
|
263
|
+
fontSize: "14px",
|
|
264
|
+
fontWeight: 600,
|
|
165
265
|
color: theme.colors.success,
|
|
166
266
|
},
|
|
167
267
|
successSubtitle: {
|
|
168
|
-
fontSize:
|
|
169
|
-
color: theme.colors.
|
|
170
|
-
marginTop:
|
|
268
|
+
fontSize: "12px",
|
|
269
|
+
color: theme.colors.textSecondary,
|
|
270
|
+
marginTop: "2px",
|
|
171
271
|
},
|
|
172
272
|
footer: {
|
|
173
|
-
padding:
|
|
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:
|
|
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:
|
|
186
|
-
borderRadius
|
|
187
|
-
marginBottom:
|
|
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:
|
|
297
|
+
padding: isMobile ? "16px 20px" : "18px 24px",
|
|
192
298
|
display: "flex",
|
|
193
299
|
alignItems: "center",
|
|
194
|
-
gap:
|
|
195
|
-
borderBottom:
|
|
300
|
+
gap: "12px",
|
|
301
|
+
borderBottom: cardBorder,
|
|
196
302
|
color: theme.colors.textOnPrimary,
|
|
197
303
|
},
|
|
198
304
|
sectionTitle: {
|
|
199
|
-
fontSize:
|
|
200
|
-
fontWeight:
|
|
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:
|
|
311
|
+
padding: isMobile ? "20px" : "24px",
|
|
206
312
|
},
|
|
207
313
|
gridRow: {
|
|
208
314
|
display: "grid",
|
|
209
|
-
gridTemplateColumns: "1fr 1fr",
|
|
210
|
-
gap:
|
|
211
|
-
marginTop:
|
|
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:
|
|
216
|
-
marginBottom:
|
|
217
|
-
color: theme.colors.
|
|
218
|
-
fontWeight:
|
|
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:
|
|
223
|
-
borderRadius:
|
|
224
|
-
border:
|
|
328
|
+
padding: "10px 14px",
|
|
329
|
+
borderRadius: "8px",
|
|
330
|
+
border: cardBorder,
|
|
225
331
|
outline: "none",
|
|
226
|
-
fontSize:
|
|
332
|
+
fontSize: "14px",
|
|
227
333
|
boxSizing: "border-box",
|
|
228
334
|
color: theme.colors.text,
|
|
229
|
-
transition:
|
|
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.
|
|
233
|
-
|
|
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:
|
|
345
|
+
gap: "10px",
|
|
346
|
+
flexDirection: isMobile ? "column" : "row",
|
|
238
347
|
},
|
|
239
348
|
phoneCode: {
|
|
240
|
-
width: "100px",
|
|
241
|
-
padding:
|
|
242
|
-
borderRadius:
|
|
243
|
-
border:
|
|
349
|
+
width: isMobile ? "100%" : "100px",
|
|
350
|
+
padding: "10px 14px",
|
|
351
|
+
borderRadius: "8px",
|
|
352
|
+
border: cardBorder,
|
|
244
353
|
backgroundColor: theme.colors.backgroundSecondary,
|
|
245
|
-
fontSize:
|
|
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:
|
|
252
|
-
borderRadius:
|
|
253
|
-
border:
|
|
360
|
+
padding: "10px 14px",
|
|
361
|
+
borderRadius: "8px",
|
|
362
|
+
border: cardBorder,
|
|
254
363
|
backgroundColor: theme.colors.backgroundSecondary,
|
|
255
|
-
fontSize:
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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
|
-
|
|
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:
|
|
396
|
+
gap: "12px",
|
|
288
397
|
textAlign: "center",
|
|
289
|
-
color: theme.colors.success,
|
|
290
398
|
},
|
|
291
399
|
detailsTitle: {
|
|
292
|
-
fontWeight:
|
|
293
|
-
fontSize:
|
|
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:
|
|
299
|
-
fontSize:
|
|
408
|
+
gap: "4px",
|
|
409
|
+
fontSize: "14px",
|
|
300
410
|
width: "100%",
|
|
301
|
-
maxWidth: "
|
|
411
|
+
maxWidth: "400px",
|
|
302
412
|
textAlign: "center",
|
|
413
|
+
color: theme.colors.textSecondary,
|
|
303
414
|
},
|
|
304
415
|
confirmationNote: {
|
|
305
|
-
marginTop:
|
|
306
|
-
fontSize:
|
|
307
|
-
color: theme.colors.
|
|
416
|
+
marginTop: "12px",
|
|
417
|
+
fontSize: "14px",
|
|
418
|
+
color: theme.colors.textSecondary,
|
|
419
|
+
lineHeight: "1.5",
|
|
308
420
|
},
|
|
309
421
|
actionContainer: {
|
|
310
|
-
marginTop:
|
|
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 {};
|