Skip to content

Commit f4859c0

Browse files
committed
style: redesign stepper and clinical dashboard tabs into premium theme-aware capsules [skip render]
1 parent 9583e7d commit f4859c0

4 files changed

Lines changed: 55 additions & 37 deletions

File tree

emr-client/src/app/dashboard/patients/[id]/page.tsx

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -224,41 +224,56 @@ export default function PatientDetailPage() {
224224

225225
{/* Center/Right Column: High-Density Clinical Tabs */}
226226
<div className="lg:col-span-3 space-y-4">
227-
<div className="flex items-center gap-1 p-1 bg-[var(--input-bg)] border border-[var(--card-border)] rounded-xl w-fit flex-wrap">
227+
<div className="flex items-center gap-0.5 p-1 bg-slate-200/50 dark:bg-neutral-900/60 backdrop-blur-md rounded-full border border-slate-300/40 dark:border-neutral-800/40 shadow-[inset_0_1px_3px_rgba(0,0,0,0.05)] dark:shadow-[inset_0_1px_3px_rgba(0,0,0,0.5)] w-fit flex-wrap">
228228
<button
229229
onClick={() => setActiveTab("snapshot")}
230-
className={`px-4 py-1.5 rounded-lg text-[9px] font-black uppercase tracking-widest transition-all flex items-center gap-2 active:scale-95
231-
${activeTab === "snapshot" ? "bg-[var(--primary)] text-white shadow-lg" : "text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`}
230+
className={`relative px-4 py-1.5 rounded-full text-[9px] font-extrabold uppercase tracking-widest transition-all duration-300 flex items-center gap-2 group/tab border border-transparent active:scale-95
231+
${activeTab === "snapshot"
232+
? "bg-white dark:bg-white/10 text-[var(--primary)] shadow-[0_2px_8px_rgba(0,0,0,0.06),0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_16px_rgba(0,0,0,0.4)] border-slate-200/50 dark:border-white/5"
233+
: "text-slate-500 hover:text-slate-900 dark:text-neutral-400 dark:hover:text-neutral-200 hover:bg-white/40 dark:hover:bg-white/[0.02]"}`}
232234
>
233-
<Activity className="w-3.5 h-3.5" /> Clinical Snapshot
235+
<Activity className={`w-3.5 h-3.5 transition-colors ${activeTab === "snapshot" ? "text-[var(--primary)]" : "text-slate-400 dark:text-neutral-500 group-hover/tab:text-slate-700 dark:group-hover/tab:text-neutral-300"}`} />
236+
<span>Clinical Snapshot</span>
234237
</button>
235238
<button
236239
onClick={() => setActiveTab("history")}
237-
className={`px-4 py-1.5 rounded-lg text-[9px] font-black uppercase tracking-widest transition-all flex items-center gap-2 active:scale-95
238-
${activeTab === "history" ? "bg-[var(--primary)] text-white shadow-lg" : "text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`}
240+
className={`relative px-4 py-1.5 rounded-full text-[9px] font-extrabold uppercase tracking-widest transition-all duration-300 flex items-center gap-2 group/tab border border-transparent active:scale-95
241+
${activeTab === "history"
242+
? "bg-white dark:bg-white/10 text-[var(--primary)] shadow-[0_2px_8px_rgba(0,0,0,0.06),0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_16px_rgba(0,0,0,0.4)] border-slate-200/50 dark:border-white/5"
243+
: "text-slate-500 hover:text-slate-900 dark:text-neutral-400 dark:hover:text-neutral-200 hover:bg-white/40 dark:hover:bg-white/[0.02]"}`}
239244
>
240-
<History className="w-3.5 h-3.5" /> Historical Activity
245+
<History className={`w-3.5 h-3.5 transition-colors ${activeTab === "history" ? "text-[var(--primary)]" : "text-slate-400 dark:text-neutral-500 group-hover/tab:text-slate-700 dark:group-hover/tab:text-neutral-300"}`} />
246+
<span>Historical Activity</span>
241247
</button>
242248
<button
243249
onClick={() => setActiveTab("activity")}
244-
className={`px-4 py-1.5 rounded-lg text-[9px] font-black uppercase tracking-widest transition-all flex items-center gap-2 active:scale-95
245-
${activeTab === "activity" ? "bg-[var(--primary)] text-white shadow-lg" : "text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`}
250+
className={`relative px-4 py-1.5 rounded-full text-[9px] font-extrabold uppercase tracking-widest transition-all duration-300 flex items-center gap-2 group/tab border border-transparent active:scale-95
251+
${activeTab === "activity"
252+
? "bg-white dark:bg-white/10 text-[var(--primary)] shadow-[0_2px_8px_rgba(0,0,0,0.06),0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_16px_rgba(0,0,0,0.4)] border-slate-200/50 dark:border-white/5"
253+
: "text-slate-500 hover:text-slate-900 dark:text-neutral-400 dark:hover:text-neutral-200 hover:bg-white/40 dark:hover:bg-white/[0.02]"}`}
246254
>
247-
<Calendar className="w-3.5 h-3.5" /> Visit Schedule
255+
<Calendar className={`w-3.5 h-3.5 transition-colors ${activeTab === "activity" ? "text-[var(--primary)]" : "text-slate-400 dark:text-neutral-500 group-hover/tab:text-slate-700 dark:group-hover/tab:text-neutral-300"}`} />
256+
<span>Visit Schedule</span>
248257
</button>
249258
<button
250259
onClick={() => setActiveTab("logistics")}
251-
className={`px-4 py-1.5 rounded-lg text-[9px] font-black uppercase tracking-widest transition-all flex items-center gap-2 active:scale-95
252-
${activeTab === "logistics" ? "bg-[var(--primary)] text-white shadow-lg" : "text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`}
260+
className={`relative px-4 py-1.5 rounded-full text-[9px] font-extrabold uppercase tracking-widest transition-all duration-300 flex items-center gap-2 group/tab border border-transparent active:scale-95
261+
${activeTab === "logistics"
262+
? "bg-white dark:bg-white/10 text-[var(--primary)] shadow-[0_2px_8px_rgba(0,0,0,0.06),0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_16px_rgba(0,0,0,0.4)] border-slate-200/50 dark:border-white/5"
263+
: "text-slate-500 hover:text-slate-900 dark:text-neutral-400 dark:hover:text-neutral-200 hover:bg-white/40 dark:hover:bg-white/[0.02]"}`}
253264
>
254-
<Truck className="w-3.5 h-3.5" /> Logistics & Fleet
265+
<Truck className={`w-3.5 h-3.5 transition-colors ${activeTab === "logistics" ? "text-[var(--primary)]" : "text-slate-400 dark:text-neutral-500 group-hover/tab:text-slate-700 dark:group-hover/tab:text-neutral-300"}`} />
266+
<span>Logistics & Fleet</span>
255267
</button>
256268
<button
257269
onClick={() => setActiveTab("coordination")}
258-
className={`px-4 py-1.5 rounded-lg text-[9px] font-black uppercase tracking-widest transition-all flex items-center gap-2 active:scale-95
259-
${activeTab === "coordination" ? "bg-[var(--primary)] text-white shadow-lg" : "text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`}
270+
className={`relative px-4 py-1.5 rounded-full text-[9px] font-extrabold uppercase tracking-widest transition-all duration-300 flex items-center gap-2 group/tab border border-transparent active:scale-95
271+
${activeTab === "coordination"
272+
? "bg-white dark:bg-white/10 text-[var(--primary)] shadow-[0_2px_8px_rgba(0,0,0,0.06),0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_16px_rgba(0,0,0,0.4)] border-slate-200/50 dark:border-white/5"
273+
: "text-slate-500 hover:text-slate-900 dark:text-neutral-400 dark:hover:text-neutral-200 hover:bg-white/40 dark:hover:bg-white/[0.02]"}`}
260274
>
261-
<CheckCircle2 className="w-3.5 h-3.5" /> Coordination & Records
275+
<CheckCircle2 className={`w-3.5 h-3.5 transition-colors ${activeTab === "coordination" ? "text-[var(--primary)]" : "text-slate-400 dark:text-neutral-500 group-hover/tab:text-slate-700 dark:group-hover/tab:text-neutral-300"}`} />
276+
<span>Coordination & Records</span>
262277
</button>
263278
</div>
264279

emr-client/src/components/CustomDatePicker.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface Props {
1111
required?: boolean;
1212
disabled?: boolean;
1313
className?: string;
14+
align?: "left" | "right";
1415
}
1516

1617
export default function CustomDatePicker({
@@ -20,6 +21,7 @@ export default function CustomDatePicker({
2021
required,
2122
disabled,
2223
className = "",
24+
align = "left",
2325
}: Props) {
2426
const [isOpen, setIsOpen] = useState(false);
2527
const containerRef = useRef<HTMLDivElement>(null);
@@ -161,10 +163,10 @@ export default function CustomDatePicker({
161163
return (
162164
<div className={`relative ${className}`} ref={containerRef}>
163165
<div className={`relative ${disabled ? "opacity-50 pointer-events-none" : ""}`}>
164-
<Calendar className="absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--primary)] opacity-40 pointer-events-none" />
166+
<Calendar className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[var(--primary)] opacity-40 pointer-events-none" />
165167
<input
166168
type="text"
167-
className="w-full bg-[var(--input-bg)] border border-[var(--card-border)] rounded-xl pl-11 pr-4 py-3 text-[11px] font-bold text-[var(--text-primary)] outline-none focus:border-[var(--primary)]/50 transition-all placeholder:text-[var(--text-muted)] placeholder:opacity-50 min-h-[40px] shadow-inner"
169+
className="w-full bg-[var(--input-bg)] border border-[var(--card-border)] rounded-xl pl-9 pr-2 py-3 text-[11px] font-bold text-[var(--text-primary)] outline-none focus:border-[var(--primary)]/50 transition-all placeholder:text-[var(--text-muted)] placeholder:opacity-50 min-h-[40px] shadow-inner"
168170
value={inputValue}
169171
placeholder={placeholder}
170172
onClick={() => setIsOpen(true)}
@@ -181,7 +183,9 @@ export default function CustomDatePicker({
181183
animate={{ opacity: 1, y: 0, scale: 1 }}
182184
exit={{ opacity: 0, y: dropdownPosition === "top" ? 8 : -8, scale: 0.96 }}
183185
transition={{ duration: 0.15 }}
184-
className={`absolute ${dropdownPosition === "top" ? "bottom-full mb-2" : "top-full mt-2"} left-0 right-0 md:w-80 md:right-auto z-[999] bg-[var(--card-bg)] border border-[var(--card-border)] rounded-2xl p-4 shadow-[0_10px_30px_rgba(0,0,0,0.15)] dark:shadow-[0_10px_30px_rgba(0,0,0,0.6)] select-none`}
186+
className={`absolute ${dropdownPosition === "top" ? "bottom-full mb-2" : "top-full mt-2"} ${
187+
align === "right" ? "right-0" : "left-0"
188+
} w-[280px] sm:w-80 z-[999] bg-[var(--card-bg)] border border-[var(--card-border)] rounded-2xl p-4 shadow-[0_10px_30px_rgba(0,0,0,0.15)] dark:shadow-[0_10px_30px_rgba(0,0,0,0.6)] select-none`}
185189
>
186190
<div className="flex items-center justify-between mb-4">
187191
<button

emr-client/src/components/EnrollmentDrawer/components/DrawerHeader.tsx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function DrawerHeader({ state, lead, onClose }: Props) {
3535

3636
{/* Progress Stepper Navigation */}
3737
<div className="flex-1 flex justify-center px-4">
38-
<div className="flex bg-[var(--input-bg)]/50 rounded-xl p-1 border border-[var(--card-border)] backdrop-blur-sm shadow-inner gap-1">
38+
<div className="flex bg-slate-200/50 dark:bg-neutral-900/60 backdrop-blur-md rounded-full p-1 border border-slate-300/40 dark:border-neutral-800/40 shadow-[inset_0_1px_3px_rgba(0,0,0,0.05)] dark:shadow-[inset_0_1px_3px_rgba(0,0,0,0.5)] gap-0.5">
3939
{(["OUTREACH", "ADMIN", "LEGAL", "CLINICAL", "LOGISTICS"] as TabType[]).map((tab, idx) => {
4040
const isActive = state.activeTab === tab;
4141
const isComplete = state.checkStepCompleteness(tab);
@@ -46,25 +46,23 @@ export default function DrawerHeader({ state, lead, onClose }: Props) {
4646
key={tab}
4747
onClick={() => !isLocked && state.setActiveTab(tab)}
4848
disabled={isLocked}
49-
className={`relative px-4 py-2 rounded-lg text-[9px] font-black uppercase tracking-[0.15em] transition-all flex items-center gap-2 group/tab
50-
${isActive ? "bg-[var(--primary)] text-black shadow-[0_0_15px_rgba(var(--primary-rgb),0.25)]" : isLocked ? "opacity-30 cursor-not-allowed grayscale" : "text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-white/5"}`}
49+
className={`relative px-4 py-1.5 rounded-full text-[9px] font-extrabold uppercase tracking-[0.16em] transition-all duration-300 flex items-center gap-2 group/tab border border-transparent
50+
${isActive
51+
? "bg-white dark:bg-white/10 text-[var(--primary)] shadow-[0_2px_8px_rgba(0,0,0,0.06),0_1px_3px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_16px_rgba(0,0,0,0.4)] border-slate-200/50 dark:border-white/5"
52+
: isLocked
53+
? "opacity-35 cursor-not-allowed text-slate-400 dark:text-neutral-600"
54+
: "text-slate-500 hover:text-slate-900 dark:text-neutral-400 dark:hover:text-neutral-200 hover:bg-white/40 dark:hover:bg-white/[0.02]"}`}
5155
>
52-
<span
53-
className={`w-3.5 h-3.5 rounded-full border flex items-center justify-center text-[7px] transition-all
54-
${isActive ? "border-black/20 bg-black/5" : isComplete ? "bg-teal-500/20 border-teal-500/40 text-teal-500" : isLocked ? "border-[var(--card-border)]/30 opacity-50" : "border-[var(--card-border)]"}`}
55-
>
56-
{isComplete && !isActive ? (
57-
<Check className="w-2 h-2" />
58-
) : isLocked ? (
59-
<FolderLock className="w-2 h-2" />
60-
) : (
61-
`0${idx + 1}`
62-
)}
63-
</span>
64-
{tab}
65-
{isActive && (
66-
<div className="absolute -bottom-0.5 left-1/2 -translate-x-1/2 w-0.75 h-0.75 rounded-full bg-black/40" />
56+
{isComplete && !isActive ? (
57+
<Check className="w-3 h-3 text-emerald-600 dark:text-emerald-400 stroke-[3]" />
58+
) : isLocked ? (
59+
<FolderLock className="w-3 h-3 text-slate-400 dark:text-neutral-600" />
60+
) : (
61+
<span className={`text-[8.5px] font-black ${isActive ? "text-[var(--primary)]" : "text-slate-400 dark:text-neutral-500"}`}>
62+
0{idx + 1}
63+
</span>
6764
)}
65+
<span>{tab}</span>
6866
</button>
6967
);
7068
})}

emr-client/src/components/ShiftReportModal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export function ShiftReportModal({
154154
<CustomDatePicker
155155
value={selectedDate}
156156
onChange={(val) => setSelectedDate(val)}
157+
align="right"
157158
/>
158159
</div>
159160
<div className="h-6 w-[1px] bg-[var(--card-border)] hidden sm:block" />

0 commit comments

Comments
 (0)