// Android Material 3 screens for Janaushadhi
// All screens fit inside AndroidDevice (412 × 892).
// Status bar 40px + nav gesture bar 24px → usable height ≈ 828px.
// Padding bottom reserves space for MdBottomNav (80px + 24 safe area).
const Aroboto = { fontFamily: 'Roboto, "Roboto Flex", system-ui, sans-serif' };
// ═════════════════════════════════════════════════════════════
// A1) HOME (Material)
// ═════════════════════════════════════════════════════════════
function MdScreenHome() {
const cats = [
{ label: 'Medicines', Icon: IconPill, bg: M.primaryContainer, fg: M.onPrimaryContainer },
{ label: 'Wellness', Icon: IconHeart, bg: '#D6F5EA', fg: '#0F5A48' },
{ label: 'Devices', Icon: IconShield, bg: '#E2EAFA', fg: '#0B1F4D' },
{ label: 'Lab tests', Icon: IconScan, bg: '#FFEFD1', fg: '#7A4500' },
{ label: 'Babycare', Icon: IconUser, bg: '#FFE4E4', fg: '#7A1C1F' },
{ label: 'Ayurveda', Icon: IconStar, bg: '#E5DCFF', fg: '#3C2A78' },
{ label: 'Diabetes', Icon: IconRx, bg: '#D6F5EA', fg: '#0F5A48' },
{ label: 'More', Icon: IconPlus, bg: M.surfaceContainerHigh, fg: M.onSurface },
];
return (
{/* App bar with location */}
DELIVER TO
Indiranagar, 560038
AK
{/* Hero card — Material elevated */}
WELCOME OFFER
Flat 20% off + free delivery
Use code JAN20 · Valid till tonight
Order now
{/* Quick actions — outlined cards */}
{[
{ title: 'Upload Rx', sub: 'Get medicines', Icon: IconRx, tone: 'primary' },
{ title: 'Book lab test', sub: 'Home sample', Icon: IconScan, tone: 'tonal' },
].map((q, i) => (
))}
{[
{ name: 'Dolo 650', sub: 'Paracetamol', price: '32', mrp: '40', hue: 'blue', off: '20' },
{ name: 'Vit D3 60K', sub: '4 capsules', price: '149', mrp: '189', hue: 'amber', off: '21' },
{ name: 'Pan-D', sub: '10 capsules', price: '108', mrp: '128', hue: 'mint', off: '16' },
].map((p, i) => (
))}
{[
{ name: 'Metformin SR 500mg', sub: 'Last refilled 27 days ago · 3 days left', hue: 'blue' },
{ name: 'Atorvastatin 10mg', sub: 'Last refilled 21 days ago · 9 days left', hue: 'mint' },
].map((p, i) => (
))}
);
}
// ═════════════════════════════════════════════════════════════
// A2) SEARCH (Material)
// ═════════════════════════════════════════════════════════════
function MdScreenSearch() {
const products = [
{ name: 'Crocin Advance', sub: 'Paracetamol 500mg · 15 tabs', price: '38', mrp: '45', hue: 'blue', stock: 'In stock', rx: false, rating: '4.7' },
{ name: 'Metformin SR', sub: 'Glycomet · 500mg · 30 tabs', price: '78', mrp: '95', hue: 'mint', stock: 'In stock', rx: true, rating: '4.5' },
{ name: 'Azithromycin', sub: 'Azithral 500 · 5 tabs', price: '92', mrp: '118', hue: 'amber', stock: 'Low stock', rx: true, rating: '4.6' },
{ name: 'Calpol 250mg', sub: 'Susp · 60ml bottle', price: '52', mrp: '62', hue: 'rose', stock: 'In stock', rx: false, rating: '4.8' },
];
return (
{/* Sticky M3 search */}
{/* Chips row */}
}>Filters · 2
Tablets
Syrups
Diabetes
Generics
Heart
{/* Product list — outlined cards */}
{products.map((p, i) => (
{p.sub}
{p.rx && }>Rx}
● {p.stock}
{p.rating}
))}
);
}
// ═════════════════════════════════════════════════════════════
// A3) PRODUCT DETAIL (Material)
// ═════════════════════════════════════════════════════════════
function MdScreenProduct() {
return (
{/* Hero image */}
{[0,1,2,3].map(i => (
))}
{/* Title sheet */}
}>Prescription
● In stock
Metformin SR 500mg
Glycomet-SR · USV Ltd · 30 tablets
4.7
(2,341 reviews)
Alternates
{/* Price card */}
₹78
₹95
You save ₹17 (18% off)
{/* M3 quantity stepper */}
{/* Delivery list item */}
Express delivery in 28 min
Free over ₹199 · 560038
Change
{/* Tabs */}
{['Uses', 'How to take', 'Side effects', 'FAQ'].map((t, i) => (
{t}
))}
Used to control high blood sugar in adults with type 2 diabetes. Reduces glucose production in the liver and improves insulin sensitivity.
{/* Bottom action bar */}
Upload Rx
Add to cart · ₹156
);
}
// ═════════════════════════════════════════════════════════════
// A4) Rx UPLOAD (Material)
// ═════════════════════════════════════════════════════════════
function MdScreenRx() {
return (
{/* Stepper */}
{['Upload', 'Verify', 'Order'].map((s, i) => (
{i < 2 && }
))}
{/* Drop zone */}
Drop your prescription here
JPG, PNG or PDF, up to 10 MB
Take photo
From files
Dr_Mehta_Rx.jpg
1.8 MB · Uploaded just now
{[
{ name: 'Aarav Kumar', sub: 'Self · 32 · M', active: true, init: 'AK', hue: M.primaryContainer, fg: M.onPrimaryContainer },
{ name: 'Meera Kumar', sub: 'Mother · 58 · F', active: false, init: 'MK', hue: '#D6F5EA', fg: '#0F5A48' },
{ name: 'Add member', sub: '', active: false, add: true },
].map((p, i) => (
{p.add ? : p.init}
{p.name}
{p.sub &&
{p.sub}
}
{p.active && }
))}
Your prescription is end-to-end encrypted and reviewed only by our licensed pharmacist.
Continue to order
);
}
Object.assign(window, { MdScreenHome, MdScreenSearch, MdScreenProduct, MdScreenRx });