@ews-admin/global-design-system 1.1.8 → 1.1.9
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/assets/doctor.png +0 -0
- package/dist/assets/favicon.ico +0 -0
- package/dist/assets/logo.png +0 -0
- package/dist/assets/logoAssets.d.ts +11 -0
- package/dist/assets/logoAssets.d.ts.map +1 -0
- package/dist/assets/logoWhite.png +0 -0
- package/dist/assets/patient.png +0 -0
- package/dist/components/DoctorForm/DoctorForm.d.ts +11 -0
- package/dist/components/DoctorForm/DoctorForm.d.ts.map +1 -0
- package/dist/components/DoctorForm/index.d.ts +3 -0
- package/dist/components/DoctorForm/index.d.ts.map +1 -0
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logo/Logo.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.css +2 -2
- package/dist/index.esm.js +7 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/public/doctor.png +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/image/doctor.png +0 -0
- package/dist/public/image/logo.png +0 -0
- package/dist/public/image/logoWhite.png +0 -0
- package/dist/public/image/patient.png +0 -0
- package/dist/public/logo.png +0 -0
- package/dist/public/logoWhite.png +0 -0
- package/dist/public/patient.png +0 -0
- package/dist/types/doctor.d.ts +144 -0
- package/dist/types/doctor.d.ts.map +1 -0
- package/package.json +5 -4
- package/src/components/Logo/Logo.tsx +7 -5
- package/src/components/Modal/Modal.tsx +10 -10
- package/src/components/Select/Select.tsx +5 -2
- package/src/styles/index.css +0 -11
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
export interface Coordinates {
|
|
2
|
+
lng: number;
|
|
3
|
+
lat: number;
|
|
4
|
+
}
|
|
5
|
+
export interface Location {
|
|
6
|
+
country: string;
|
|
7
|
+
address: string;
|
|
8
|
+
city: string;
|
|
9
|
+
state: string;
|
|
10
|
+
zip: string;
|
|
11
|
+
isPrimary: boolean;
|
|
12
|
+
residency: "HOME" | "OFFICE" | "CLINIC" | "HOSPITAL";
|
|
13
|
+
coordinates: Coordinates;
|
|
14
|
+
}
|
|
15
|
+
export interface Specialty {
|
|
16
|
+
code: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ProvidedService {
|
|
20
|
+
code: "CLINIC" | "ONLINE" | "HOME_VISIT" | "EMERGENCY";
|
|
21
|
+
price: number;
|
|
22
|
+
}
|
|
23
|
+
export interface CreateDoctorPayload {
|
|
24
|
+
firstName: string;
|
|
25
|
+
lastName: string;
|
|
26
|
+
refNumber: string;
|
|
27
|
+
civility: "MAN" | "WOMAN" | "OTHER";
|
|
28
|
+
email: string;
|
|
29
|
+
password: string;
|
|
30
|
+
roleName: "DOCTOR";
|
|
31
|
+
photoUrl?: string;
|
|
32
|
+
phoneNumber: string;
|
|
33
|
+
paymentPhoneNumber?: string;
|
|
34
|
+
healthcareFacilityIds: number[];
|
|
35
|
+
preferredNotificationMethods: ("EMAIL" | "SMS" | "PUSH")[];
|
|
36
|
+
dateOfBirth: string;
|
|
37
|
+
careerStartYear: string;
|
|
38
|
+
hospitalName?: string;
|
|
39
|
+
diplomas?: string;
|
|
40
|
+
activated: boolean;
|
|
41
|
+
providedServices: ProvidedService[];
|
|
42
|
+
specialties: Specialty[];
|
|
43
|
+
locations: Location[];
|
|
44
|
+
}
|
|
45
|
+
export interface DoctorFormData {
|
|
46
|
+
firstName: string;
|
|
47
|
+
lastName: string;
|
|
48
|
+
refNumber: string;
|
|
49
|
+
civility: "MAN" | "WOMAN" | "OTHER";
|
|
50
|
+
email: string;
|
|
51
|
+
password: string;
|
|
52
|
+
confirmPassword: string;
|
|
53
|
+
phoneNumber: string;
|
|
54
|
+
paymentPhoneNumber: string;
|
|
55
|
+
dateOfBirth: string;
|
|
56
|
+
photoUrl: string;
|
|
57
|
+
careerStartYear: string;
|
|
58
|
+
hospitalName: string;
|
|
59
|
+
diplomas: string;
|
|
60
|
+
activated: boolean;
|
|
61
|
+
healthcareFacilityIds: number[];
|
|
62
|
+
preferredNotificationMethods: ("EMAIL" | "SMS" | "PUSH")[];
|
|
63
|
+
providedServices: ProvidedService[];
|
|
64
|
+
specialties: Specialty[];
|
|
65
|
+
locations: Location[];
|
|
66
|
+
}
|
|
67
|
+
export declare const CIVILITY_OPTIONS: readonly [{
|
|
68
|
+
readonly value: "MAN";
|
|
69
|
+
readonly label: "Mr.";
|
|
70
|
+
}, {
|
|
71
|
+
readonly value: "WOMAN";
|
|
72
|
+
readonly label: "Ms.";
|
|
73
|
+
}, {
|
|
74
|
+
readonly value: "OTHER";
|
|
75
|
+
readonly label: "Other";
|
|
76
|
+
}];
|
|
77
|
+
export declare const NOTIFICATION_METHOD_OPTIONS: readonly [{
|
|
78
|
+
readonly value: "EMAIL";
|
|
79
|
+
readonly label: "Email";
|
|
80
|
+
}, {
|
|
81
|
+
readonly value: "SMS";
|
|
82
|
+
readonly label: "SMS";
|
|
83
|
+
}, {
|
|
84
|
+
readonly value: "PUSH";
|
|
85
|
+
readonly label: "Push Notification";
|
|
86
|
+
}];
|
|
87
|
+
export declare const RESIDENCY_OPTIONS: readonly [{
|
|
88
|
+
readonly value: "HOME";
|
|
89
|
+
readonly label: "Home";
|
|
90
|
+
}, {
|
|
91
|
+
readonly value: "OFFICE";
|
|
92
|
+
readonly label: "Office";
|
|
93
|
+
}, {
|
|
94
|
+
readonly value: "CLINIC";
|
|
95
|
+
readonly label: "Clinic";
|
|
96
|
+
}, {
|
|
97
|
+
readonly value: "HOSPITAL";
|
|
98
|
+
readonly label: "Hospital";
|
|
99
|
+
}];
|
|
100
|
+
export declare const SERVICE_TYPE_OPTIONS: readonly [{
|
|
101
|
+
readonly value: "CLINIC";
|
|
102
|
+
readonly label: "Clinic Visit";
|
|
103
|
+
}, {
|
|
104
|
+
readonly value: "ONLINE";
|
|
105
|
+
readonly label: "Online Consultation";
|
|
106
|
+
}, {
|
|
107
|
+
readonly value: "HOME_VISIT";
|
|
108
|
+
readonly label: "Home Visit";
|
|
109
|
+
}, {
|
|
110
|
+
readonly value: "EMERGENCY";
|
|
111
|
+
readonly label: "Emergency";
|
|
112
|
+
}];
|
|
113
|
+
export declare const SPECIALTY_OPTIONS: readonly [{
|
|
114
|
+
readonly value: "STOMATOLOGY";
|
|
115
|
+
readonly label: "Stomatology";
|
|
116
|
+
}, {
|
|
117
|
+
readonly value: "NEPHROLOGY";
|
|
118
|
+
readonly label: "Nephrology";
|
|
119
|
+
}, {
|
|
120
|
+
readonly value: "CARDIOLOGY";
|
|
121
|
+
readonly label: "Cardiology";
|
|
122
|
+
}, {
|
|
123
|
+
readonly value: "DERMATOLOGY";
|
|
124
|
+
readonly label: "Dermatology";
|
|
125
|
+
}, {
|
|
126
|
+
readonly value: "NEUROLOGY";
|
|
127
|
+
readonly label: "Neurology";
|
|
128
|
+
}, {
|
|
129
|
+
readonly value: "PEDIATRICS";
|
|
130
|
+
readonly label: "Pediatrics";
|
|
131
|
+
}, {
|
|
132
|
+
readonly value: "GYNECOLOGY";
|
|
133
|
+
readonly label: "Gynecology";
|
|
134
|
+
}, {
|
|
135
|
+
readonly value: "ORTHOPEDICS";
|
|
136
|
+
readonly label: "Orthopedics";
|
|
137
|
+
}, {
|
|
138
|
+
readonly value: "OPHTHALMOLOGY";
|
|
139
|
+
readonly label: "Ophthalmology";
|
|
140
|
+
}, {
|
|
141
|
+
readonly value: "PSYCHIATRY";
|
|
142
|
+
readonly label: "Psychiatry";
|
|
143
|
+
}];
|
|
144
|
+
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -0,0 +1 @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;;;;;;;;;;EAWpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ews-admin/global-design-system",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "EWS Global Design System - Reusable components for EWS applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"author": "EWS - Erco Web Solutions",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"react": "
|
|
24
|
-
"react-dom": "
|
|
23
|
+
"react": "^18.2.0",
|
|
24
|
+
"react-dom": "^18.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@babel/core": "^7.23.0",
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
"clsx": "^2.0.0",
|
|
64
64
|
"lucide-react": "^0.544.0",
|
|
65
65
|
"react": "^18.2.0",
|
|
66
|
-
"react-dom": "^18.2.0"
|
|
66
|
+
"react-dom": "^18.2.0",
|
|
67
|
+
"react-hook-form": "^7.63.0"
|
|
67
68
|
},
|
|
68
69
|
"scripts": {
|
|
69
70
|
"build": "rollup -c",
|
|
@@ -16,7 +16,7 @@ export interface LogoProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* Logo variant - normal, white, or favicon
|
|
18
18
|
*/
|
|
19
|
-
variant?: "normal" | "white" | "favicon";
|
|
19
|
+
variant?: "normal" | "white" | "fullWhite" | "favicon";
|
|
20
20
|
/**
|
|
21
21
|
* Custom className
|
|
22
22
|
*/
|
|
@@ -54,10 +54,12 @@ const Logo = ({
|
|
|
54
54
|
const logoSrc = iconOnly
|
|
55
55
|
? "/favicon.ico"
|
|
56
56
|
: variant === "white"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
? "/image/logoWhite.png"
|
|
58
|
+
: variant === "fullWhite"
|
|
59
|
+
? "/image/logoFullWhite.png"
|
|
60
|
+
: variant === "favicon"
|
|
61
|
+
? "/favicon.ico"
|
|
62
|
+
: "/image/logo.png";
|
|
61
63
|
|
|
62
64
|
if (iconOnly) {
|
|
63
65
|
return (
|
|
@@ -6,13 +6,13 @@ import { Button } from "../Button/Button";
|
|
|
6
6
|
export interface ErrorField {
|
|
7
7
|
name: string;
|
|
8
8
|
message: string;
|
|
9
|
-
path
|
|
9
|
+
path?: string;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface ErrorObject {
|
|
13
13
|
code: string;
|
|
14
14
|
message: string;
|
|
15
|
-
fields
|
|
15
|
+
fields?: ErrorField[];
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface ModalProps {
|
|
@@ -31,7 +31,7 @@ export interface ModalProps {
|
|
|
31
31
|
/**
|
|
32
32
|
* Modal content/description
|
|
33
33
|
*/
|
|
34
|
-
children
|
|
34
|
+
children?: React.ReactNode;
|
|
35
35
|
/**
|
|
36
36
|
* Modal variant
|
|
37
37
|
*/
|
|
@@ -154,18 +154,18 @@ const Modal = ({
|
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
return (
|
|
157
|
-
<div className="fixed inset-0 z-50
|
|
157
|
+
<div className="flex fixed inset-0 z-50 justify-center items-center">
|
|
158
158
|
{/* Backdrop */}
|
|
159
159
|
<div
|
|
160
|
-
className="absolute inset-0 bg-black/50
|
|
160
|
+
className="absolute inset-0 backdrop-blur-sm bg-black/50"
|
|
161
161
|
onClick={handleOverlayClick}
|
|
162
162
|
/>
|
|
163
163
|
|
|
164
164
|
{/* Modal */}
|
|
165
165
|
<div
|
|
166
166
|
className={cn(
|
|
167
|
-
"relative w-full max-w-md
|
|
168
|
-
"animate-in fade-in-0 zoom-in-95
|
|
167
|
+
"relative mx-4 w-full max-w-md bg-white rounded-lg shadow-xl transition-all transform",
|
|
168
|
+
"duration-200 animate-in fade-in-0 zoom-in-95",
|
|
169
169
|
className
|
|
170
170
|
)}
|
|
171
171
|
role="dialog"
|
|
@@ -192,7 +192,7 @@ const Modal = ({
|
|
|
192
192
|
</div>
|
|
193
193
|
<button
|
|
194
194
|
onClick={onClose}
|
|
195
|
-
className="p-1 text-gray-400 hover:text-gray-600
|
|
195
|
+
className="p-1 text-gray-400 transition-colors hover:text-gray-600"
|
|
196
196
|
aria-label="Close modal"
|
|
197
197
|
>
|
|
198
198
|
<X className="w-5 h-5" />
|
|
@@ -201,7 +201,7 @@ const Modal = ({
|
|
|
201
201
|
|
|
202
202
|
{/* Content */}
|
|
203
203
|
<div className={cn("p-6", contentClassName)}>
|
|
204
|
-
<div className="text-gray-700
|
|
204
|
+
<div className="leading-relaxed text-gray-700">
|
|
205
205
|
{error && variant === "error" ? (
|
|
206
206
|
<div className="space-y-3">
|
|
207
207
|
<p>{error.message}</p>
|
|
@@ -228,7 +228,7 @@ const Modal = ({
|
|
|
228
228
|
|
|
229
229
|
{/* Actions */}
|
|
230
230
|
{(primaryAction || secondaryAction) && (
|
|
231
|
-
<div className="flex
|
|
231
|
+
<div className="flex justify-end items-center p-6 pt-0 space-x-3">
|
|
232
232
|
{secondaryAction && (
|
|
233
233
|
<Button
|
|
234
234
|
variant="ghost"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChevronDown, Search, X } from "lucide-react";
|
|
2
2
|
import React, { forwardRef, useEffect, useId, useRef, useState } from "react";
|
|
3
3
|
import { cn } from "../../utils";
|
|
4
|
+
import { Input } from "../Input";
|
|
4
5
|
|
|
5
6
|
export interface SelectOption<T = any> {
|
|
6
7
|
value: T;
|
|
@@ -478,13 +479,15 @@ const Select = forwardRef<HTMLDivElement, SelectProps>(
|
|
|
478
479
|
<div className="p-2 border-b border-ews-gray-200">
|
|
479
480
|
<div className="relative">
|
|
480
481
|
<Search className="absolute left-3 top-1/2 w-4 h-4 transform -translate-y-1/2 text-ews-gray-400" />
|
|
481
|
-
<
|
|
482
|
+
<Input
|
|
482
483
|
ref={inputRef}
|
|
483
484
|
type="text"
|
|
484
485
|
value={searchTerm}
|
|
485
486
|
onChange={(e) => setSearchTerm(e.target.value)}
|
|
486
487
|
placeholder="Search options..."
|
|
487
|
-
|
|
488
|
+
leftIcon={
|
|
489
|
+
<Search className="w-4 h-4 text-ews-gray-400" />
|
|
490
|
+
}
|
|
488
491
|
/>
|
|
489
492
|
</div>
|
|
490
493
|
</div>
|
package/src/styles/index.css
CHANGED
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
@tailwind components;
|
|
5
5
|
@tailwind utilities;
|
|
6
6
|
|
|
7
|
-
/* Override browser default focus styles */
|
|
8
|
-
*:focus {
|
|
9
|
-
outline: none !important;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
7
|
/* Ensure custom focus styles for all interactive elements */
|
|
13
8
|
button:focus,
|
|
14
9
|
input:focus,
|
|
@@ -40,12 +35,6 @@ textarea:focus,
|
|
|
40
35
|
box-shadow: 0 0 0 2px var(--ews-primary) !important;
|
|
41
36
|
}
|
|
42
37
|
|
|
43
|
-
/* Override any browser default blue focus */
|
|
44
|
-
*:focus {
|
|
45
|
-
outline: none !important;
|
|
46
|
-
box-shadow: none !important;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
38
|
/* Specific override for div elements with tabindex */
|
|
50
39
|
div[tabindex]:focus {
|
|
51
40
|
outline: none !important;
|