diff --git a/public/assets/images/banner-habib-marketplace-relatable.jpg b/public/assets/images/banner-habib-marketplace-relatable.jpg new file mode 100644 index 0000000..736aa50 Binary files /dev/null and b/public/assets/images/banner-habib-marketplace-relatable.jpg differ diff --git a/src/components/account/AccountMenuRow.tsx b/src/components/account/AccountMenuRow.tsx index 78363fe..9c48bc7 100644 --- a/src/components/account/AccountMenuRow.tsx +++ b/src/components/account/AccountMenuRow.tsx @@ -12,8 +12,6 @@ interface AccountMenuRowProps { */ export const AccountMenuRow: React.FC = ({ row }) => { const navigate = useNavigate(); - const isAddressesRow = row.id === 'acc-addresses'; - const isFaqRow = row.id === 'acc-faq' || row.id === 'info-faqs'; return (
= ({ row }) => { } }} style={{ - position: 'absolute', - left: 29, - top: row.y, - width: 317, - height: 34, + width: '100%', + minHeight: 38, + display: 'flex', + alignItems: 'center', + gap: 9, cursor: row.targetRoute ? 'pointer' : 'default', + minWidth: 0, }} > {/* Left 34×34 icon container (radius 11) */}
- - - {/* Notification badge (if present, e.g. "2" red pill at x=52, y=381 -> rel 23, -8) */} - {row.badgeCount && ( -
+ - + + {/* Notification badge */} + {row.badgeCount && ( +
- {row.badgeCount} - -
- )} + + {row.badgeCount} + +
+ )} +
{/* Title & optional subtitle */}
{row.title} @@ -113,17 +113,14 @@ export const AccountMenuRow: React.FC = ({ row }) => { {row.subtitle && (
{row.subtitle} @@ -137,11 +134,9 @@ export const AccountMenuRow: React.FC = ({ row }) => { src="/assets/images/icon-menu-chevron-right-bold.svg" alt="" style={{ - position: 'absolute', - left: row.rightIconLeft ?? 299, - top: row.rightIconTop ?? 8, width: 18, height: 18, + flexShrink: 0, }} /> )} @@ -150,11 +145,9 @@ export const AccountMenuRow: React.FC = ({ row }) => { src="/assets/images/icon-menu-arrow-right.svg" alt="" style={{ - position: 'absolute', - left: row.rightIconLeft ?? 311, - top: row.rightIconTop ?? 12, width: 5, height: 10, + flexShrink: 0, }} /> )} @@ -163,11 +156,9 @@ export const AccountMenuRow: React.FC = ({ row }) => { src="/assets/images/icon-menu-contact-phone.svg" alt="" style={{ - position: 'absolute', - left: row.rightIconLeft ?? 303, - top: row.rightIconTop ?? 10.75, width: 12.25, height: 12.25, + flexShrink: 0, }} /> )} diff --git a/src/components/account/HabibCoinsBanner.tsx b/src/components/account/HabibCoinsBanner.tsx index 8c67a2d..2e60a99 100644 --- a/src/components/account/HabibCoinsBanner.tsx +++ b/src/components/account/HabibCoinsBanner.tsx @@ -8,95 +8,82 @@ export const HabibCoinsBanner: React.FC = () => { return (
- {/* Coin 3D icon (34×34 at rel 12, 11) */} - +
+ {/* Coin 3D icon */} + - {/* "Your Inventory" at rel (57, 13) */} -
- Your Inventory -
+
+
+ Your Inventory +
- {/* "21 Habib Coins" at rel (57, 30) */} -
- 21 Habib Coins +
+ 21 Habib Coins +
+
- {/* "Buy Coins" button (96×32 at rel 235, 12, radius 12, fill #292a2e) */} + {/* "Buy Coins" button */} )}
); diff --git a/src/components/layout/BottomNavBar.tsx b/src/components/layout/BottomNavBar.tsx index f22f51c..41a656b 100644 --- a/src/components/layout/BottomNavBar.tsx +++ b/src/components/layout/BottomNavBar.tsx @@ -1,311 +1,411 @@ -import React from 'react'; +import React, { useEffect, useSyncExternalStore } from 'react'; import { useNavigate } from 'react-router-dom'; export type BottomNavTab = 'home' | 'category' | 'account' | 'cart'; interface BottomNavBarProps { activeTab: BottomNavTab; - top: number; + top?: number; showCartBadge?: boolean; cartBadgeCount?: number; } +type WavePhase = 'idle' | 'flatten' | 'rise'; + +interface NavWaveSnapshot { + leaving: BottomNavTab | null; + entering: BottomNavTab | null; + seq: number; +} + +const NAV_ICON_ASSETS = [ + '/assets/images/nav-home-active.svg', + '/assets/images/nav-home-inactive.svg', + '/assets/images/nav-category-active.svg', + '/assets/images/nav-category-inactive.svg', + '/assets/images/nav-account-active.svg', + '/assets/images/nav-account-inactive.svg', + '/assets/images/nav-cart-active.svg', + '/assets/images/nav-cart-inactive.svg', +]; + +// Persists across per-page BottomNavBar unmounts on route navigation. +let lastCommittedTab: BottomNavTab | null = null; +let waveSnapshot: NavWaveSnapshot = { leaving: null, entering: null, seq: 0 }; +let settleTimerId: number | undefined; +const waveListeners = new Set<() => void>(); + +function tabFromPathname(pathname: string): BottomNavTab | null { + if (pathname === '/' || pathname === '/shop-home') return 'home'; + if (pathname === '/shop-category') return 'category'; + if (pathname === '/shop-account' || pathname === '/shop-category-4214-345') return 'account'; + if (pathname === '/shop-cart') return 'cart'; + return null; +} + +function subscribeWave(listener: () => void): () => void { + waveListeners.add(listener); + return () => { + waveListeners.delete(listener); + }; +} + +function getWaveSnapshot(): NavWaveSnapshot { + return waveSnapshot; +} + +function emitWaveSnapshot(next: NavWaveSnapshot): void { + waveSnapshot = next; + waveListeners.forEach((listener) => listener()); +} + +function completeWaveTransition(seq: number): void { + if (waveSnapshot.seq !== seq) { + return; + } + if (waveSnapshot.leaving === null && waveSnapshot.entering === null) { + return; + } + window.clearTimeout(settleTimerId); + emitWaveSnapshot({ leaving: null, entering: null, seq }); +} + +function startWaveTransition(fromTab: BottomNavTab, toTab: BottomNavTab): void { + if (fromTab === toTab) { + lastCommittedTab = toTab; + return; + } + + lastCommittedTab = toTab; + const nextSeq = waveSnapshot.seq + 1; + + window.clearTimeout(settleTimerId); + emitWaveSnapshot({ leaving: fromTab, entering: toTab, seq: nextSeq }); + + // Fallback cleanup when prefers-reduced-motion disables CSS animations. + settleTimerId = window.setTimeout(() => { + completeWaveTransition(nextSeq); + }, 650); +} + +if (typeof window !== 'undefined') { + for (const src of NAV_ICON_ASSETS) { + const img = new Image(); + img.src = src; + } + + window.addEventListener( + 'popstate', + () => { + const nextTab = tabFromPathname(window.location.pathname); + if (lastCommittedTab !== null && nextTab !== null && nextTab !== lastCommittedTab) { + startWaveTransition(lastCommittedTab, nextTab); + } + }, + { capture: true } + ); +} + +function getItemVisualClass(isActive: boolean, phase: WavePhase | null): string { + if (phase === 'rise') return 'is-entering'; + if (phase === 'flatten') return 'is-leaving'; + return isActive ? 'is-active' : 'is-inactive'; +} + +const NavTabIcon: React.FC<{ + activeSrc: string; + inactiveSrc: string; + alt: string; + visualClass: string; +}> = ({ activeSrc, inactiveSrc, alt, visualClass }) => ( + + + {alt} + +); + +const IndicatorWave: React.FC<{ + phase: WavePhase; + onSettled?: () => void; +}> = ({ phase, onSettled }) => ( + + + +); + export const BottomNavBar: React.FC = ({ activeTab, - top, showCartBadge = true, cartBadgeCount = 2, }) => { const navigate = useNavigate(); + const snapshot = useSyncExternalStore(subscribeWave, getWaveSnapshot, getWaveSnapshot); + + useEffect(() => { + lastCommittedTab = activeTab; + }, [activeTab]); + + const handleTabNavigate = (targetTab: BottomNavTab, route: string) => { + if (activeTab !== targetTab) { + startWaveTransition(activeTab, targetTab); + } + navigate(route); + }; + + const handleRiseSettled = () => { + completeWaveTransition(snapshot.seq); + }; - // Indicator wave center X inside Subtract boolean operation (Ellipse 2 x + 9) - const cx = - activeTab === 'home' - ? 44 - : activeTab === 'category' - ? 116 - : activeTab === 'account' - ? 260 - : 331; + const getWavePhase = (tab: BottomNavTab): WavePhase | null => { + if (activeTab === tab) { + return snapshot.entering === tab ? 'rise' : 'idle'; + } + return snapshot.leaving === tab ? 'flatten' : null; + }; - const indicatorWavePath = `M ${cx - 20.894} 78 C ${cx - 13.8055} 78 ${cx - 7.0885} 71 ${cx} 71 C ${cx + 7.0885} 71 ${cx + 13.8055} 78 ${cx + 20.894} 78 Z`; + const homePhase = getWavePhase('home'); + const categoryPhase = getWavePhase('category'); + const accountPhase = getWavePhase('account'); + const cartPhase = getWavePhase('cart'); + + const homeVisual = getItemVisualClass(activeTab === 'home', homePhase); + const categoryVisual = getItemVisualClass(activeTab === 'category', categoryPhase); + const accountVisual = getItemVisualClass(activeTab === 'account', accountPhase); + const cartVisual = getItemVisualClass(activeTab === 'cart', cartPhase); return ( -
- {/* Subtract white shape with active boolean wave indicator */} + {/* White rounded background */}
- - - -
- - {/* Home Tab */} -
navigate('/shop-home')} - style={{ - position: 'absolute', - left: '21px', - top: '17px', - width: '47px', - height: '44px', - cursor: 'pointer', - }} - > - Home - - Home - -
- - {/* Category Tab */} -
navigate('/shop-category')} - style={{ - position: 'absolute', - left: '91px', - top: '17px', - width: '50px', - height: '44px', - cursor: 'pointer', }} > - Category - - Category - -
+
+ {/* Home Tab */} + - {/* Center Habib Emblem Pill (54x54 node at rel=(161, 12), exported SVG 114x85 with shadow padding) */} - Habib navigate('/shop-home')} - style={{ - position: 'absolute', - left: '131px', - top: '-7px', - width: '114px', - height: '85px', - cursor: 'pointer', - }} - /> + {/* Category Tab */} + - {/* Account Tab */} -
navigate('/shop-account')} - style={{ - position: 'absolute', - left: '237px', - top: '17px', - width: '45px', - height: '44px', - cursor: 'pointer', - }} - > - Account - - Account - -
+ {/* Center Habib Emblem Pill */} +
+ Habib handleTabNavigate('home', '/shop-home')} + style={{ + position: 'absolute', + top: '-7px', + left: '50%', + transform: 'translateX(-50%)', + width: '114px', + height: '85px', + cursor: 'pointer', + }} + /> +
- {/* Cart Tab */} -
navigate('/shop-cart')} - style={{ - position: 'absolute', - left: '316px', - top: '17px', - width: '28px', - height: '44px', - cursor: 'pointer', - }} - > - Cart - - Cart - -
+ {/* Account Tab */} + - {/* Optional Cart Badge at rel=(332, 13) */} - {showCartBadge && cartBadgeCount > 0 && ( -
- handleTabNavigate('cart', '/shop-cart')} style={{ - position: 'absolute', - left: 0, - top: '3.5px', - width: '16px', - height: '8px', + position: 'relative', + height: '78px', display: 'flex', + flexDirection: 'column', alignItems: 'center', justifyContent: 'center', - fontFamily: 'var(--font-sans)', - fontWeight: 700, - fontSize: '10px', - lineHeight: '13.9px', - color: '#ffffff', + gap: '1px', + cursor: 'pointer', + padding: 0, }} > - {cartBadgeCount} - +
+ + {showCartBadge && cartBadgeCount > 0 && ( +
+ + {cartBadgeCount} + +
+ )} +
+ Cart + {cartPhase && ( + + )} +
- )} -
+
+ ); }; diff --git a/src/components/layout/MobileShell.tsx b/src/components/layout/MobileShell.tsx index 0af777a..efa2b6a 100644 --- a/src/components/layout/MobileShell.tsx +++ b/src/components/layout/MobileShell.tsx @@ -20,16 +20,18 @@ export const MobileShell: React.FC = ({ const searchParams = new URLSearchParams(location.search); const isEmbed = searchParams.get('embed') === '1' || searchParams.get('bare') === '1'; + const cssVars = { + '--desktop-frame-w': `${width}px`, + '--desktop-frame-h': `${height}px`, + '--desktop-frame-r': `${borderRadius}px`, + '--shell-bg': backgroundColor, + } as React.CSSProperties; + if (isEmbed) { return (
{children}
@@ -37,28 +39,8 @@ export const MobileShell: React.FC = ({ } return ( -
- {/* Exact Figma Frame */} -
+
+
{children}
diff --git a/src/components/layout/StatusBar.tsx b/src/components/layout/StatusBar.tsx deleted file mode 100644 index 3d3b2b2..0000000 --- a/src/components/layout/StatusBar.tsx +++ /dev/null @@ -1,53 +0,0 @@ -import React from 'react'; - -interface StatusBarProps { - variant?: 'light' | 'dark'; - height?: number; -} - -export const StatusBar: React.FC = ({ variant = 'dark', height = 35 }) => { - const leftSrc = - variant === 'light' - ? '/assets/images/status-bar-left-light.svg' - : '/assets/images/status-bar-left-dark.svg'; - const rightSrc = - variant === 'light' - ? '/assets/images/status-bar-right-light.svg' - : '/assets/images/status-bar-right-dark.svg'; - - return ( -
- - -
- ); -}; diff --git a/src/components/layout/StickyFooterBar.tsx b/src/components/layout/StickyFooterBar.tsx index 4067ce2..1f1882e 100644 --- a/src/components/layout/StickyFooterBar.tsx +++ b/src/components/layout/StickyFooterBar.tsx @@ -2,8 +2,8 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; interface StickyFooterBarProps { - top: number; - height: number; + top?: number; + height?: number; hasShadow?: boolean; borderRadius?: number; price: string; @@ -14,22 +14,23 @@ interface StickyFooterBarProps { topLabel?: string; buttonText: string; buttonLeft?: number; - buttonTextLeft: number; + buttonTextLeft?: number; buttonTextTop?: number; - buttonTextWidth: number; + buttonTextWidth?: number; buttonTextHeight?: number; buttonFontWeight?: number; iconSrc: string; - iconLeft: number; + iconLeft?: number; iconTop?: number; + iconPosition?: 'left' | 'right'; targetRoute: string; disabled?: boolean; onButtonClick?: () => void; + aboveBottomNav?: boolean; } export const StickyFooterBar: React.FC = ({ - top, - height, + height = 90, hasShadow = true, borderRadius = 17, price, @@ -39,75 +40,63 @@ export const StickyFooterBar: React.FC = ({ onTotalItemsClick, topLabel, buttonText, - buttonLeft = 159, - buttonTextLeft, - buttonTextTop = 14, - buttonTextWidth, - buttonTextHeight = 24, buttonFontWeight = 700, iconSrc, - iconLeft, - iconTop = 14, + iconLeft = 49.5, + buttonTextLeft = 81.5, + iconPosition, targetRoute, disabled = false, onButtonClick, + aboveBottomNav = false, }) => { const navigate = useNavigate(); - const totalItemsLeft = oldPrice && oldPrice.length > 6 ? 46 : oldPrice ? 39 : 0; + const isIconRight = iconPosition === 'right' || iconLeft > buttonTextLeft; return (
- {/* Rectangle 3217 */} -
- {/* Left Price / Total Summary Info */}
{oldPrice && ( = ({ )} {discountBadge && ( -
- - {discountBadge} - -
+ {discountBadge} +
)} {totalItemsLabel && ( -
= ({ 12 ? '75px' : '70px', - top: '1.5px', - width: '14px', - height: '14px', - }} + style={{ width: '14px', height: '14px', flexShrink: 0 }} /> -
+ )} {topLabel && ( = ({ )}
- {/* Main Price ($24.00) */} = ({
{/* Primary Gold CTA Button */} -
{ if (disabled) return; if (onButtonClick) { @@ -255,50 +208,48 @@ export const StickyFooterBar: React.FC = ({ } }} style={{ - position: 'absolute', - left: `${buttonLeft}px`, - top: '19px', - width: '200px', + width: 'min(200px, 54%)', + minWidth: '142px', height: '52px', borderRadius: '11px', - backgroundColor: '#d78e06', cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.5 : 1, - transition: 'opacity 0.15s ease', + display: 'inline-flex', + alignItems: 'center', + justifyContent: 'center', + gap: '8px', + padding: '0 14px', + flexShrink: 0, }} > - + {!isIconRight && ( + + )} {buttonText} -
+ {isIconRight && ( + + )} +
); }; diff --git a/src/components/layout/TopHeader.tsx b/src/components/layout/TopHeader.tsx index 9819518..d94205a 100644 --- a/src/components/layout/TopHeader.tsx +++ b/src/components/layout/TopHeader.tsx @@ -10,61 +10,72 @@ interface StandardPageHeaderProps { export const StandardPageHeader: React.FC = ({ title, - titleTop = 29, backTo = '/shop-home', showBack = true, }) => { const navigate = useNavigate(); return ( - <> -
- {title} -
+
{showBack && ( -
navigate(backTo)} + aria-label="Back" style={{ position: 'absolute', - left: '16px', + left: 'var(--page-px, 16px)', top: '21px', width: '40px', height: '40px', borderRadius: '15px', backgroundColor: '#ffffff', cursor: 'pointer', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', }} > Back -
+ )} - +

+ {title} +

+
); }; diff --git a/src/components/orders/OrderFilterTabs.tsx b/src/components/orders/OrderFilterTabs.tsx index b620458..3d70497 100644 --- a/src/components/orders/OrderFilterTabs.tsx +++ b/src/components/orders/OrderFilterTabs.tsx @@ -18,103 +18,89 @@ export const OrderFilterTabs: React.FC = ({ onSelectTab, }) => { return ( - <> -
-
- {tabs.map((tab) => { - const isActive = tab.id === activeTabId; +
+ {tabs.map((tab) => { + const isActive = tab.id === activeTabId; - return ( -
onSelectTab(tab.id)} + return ( +
- ); - })} -
- + {tab.count} + + + + ); + })} +
); }; diff --git a/src/components/orders/OrderListCard.tsx b/src/components/orders/OrderListCard.tsx index 2ab58b8..29644fe 100644 --- a/src/components/orders/OrderListCard.tsx +++ b/src/components/orders/OrderListCard.tsx @@ -17,116 +17,98 @@ export const OrderListCard: React.FC = ({ order }) => { return (
- {/* Top section (318×86 at rel 12, 12) */} + {/* Top section */}
{/* Row 1: Order code, dot, price, and date */}
- {order.orderCode} -
+ + {order.orderCode} + -
+ -
- {order.price} + + {order.price} +
- {/* Date on right (rel 218, 4, size 100×18) */} + {/* Date on right */}
= ({ order }) => {
- {/* Thumbnails row (315×50 at rel 0, 36) */} + {/* Thumbnails row */}
{order.thumbnails.map((thumb, idx) => ( @@ -156,13 +138,11 @@ export const OrderListCard: React.FC = ({ order }) => { src={thumb.src} alt="" style={{ - position: 'absolute', - left: thumb.relX, - top: 0, - width: 50, - height: 50, + width: 'clamp(42px, 13.5vw, 50px)', + height: 'clamp(42px, 13.5vw, 50px)', borderRadius: thumb.radius, objectFit: 'cover', + flexShrink: 0, }} /> ))} @@ -170,23 +150,21 @@ export const OrderListCard: React.FC = ({ order }) => { {order.moreCountBadge && (
= ({ order }) => {
- {/* Grey status bar (318×41 at rel 12, 113, radius 8, fill #f3f3f3) */} + {/* Grey status bar */}
- - - {order.itemsCountText} - +
+ + + {order.itemsCountText} + +
- {/* Vertical divider */}
- - - {order.shopsCountText} - - - {/* Right delivery count */} -
-
+ - -
+ /> - {order.deliveryProgressText} + {order.shopsCountText}
-
- {/* View Details button (318×52 at rel 12, 169, radius 11, stroke #efc47e) */} -
+
+ + {/* View Details button */} +
); diff --git a/src/components/orders/ShipmentStatusCard.tsx b/src/components/orders/ShipmentStatusCard.tsx index 96b4f4a..36503de 100644 --- a/src/components/orders/ShipmentStatusCard.tsx +++ b/src/components/orders/ShipmentStatusCard.tsx @@ -5,102 +5,97 @@ interface ShipmentStatusCardProps { shipment: ShipmentCardData; } -const STEP_LABELS = [ - { label: 'Order', left: 0, width: 48, circleLeft: 16 }, - { label: 'Packed', left: 93, width: 42, circleLeft: 105 }, - { label: 'Shiping', left: 179, width: 48, circleLeft: 194 }, - { label: 'Delivery', left: 270, width: 48, circleLeft: 283 }, -]; +const STEP_LABELS = ['Order', 'Packed', 'Shiping', 'Delivery']; /** * Store shipment status card on `shop-order detail` (4175:10452, 4175:11079, 4175:11149). */ export const ShipmentStatusCard: React.FC = ({ shipment }) => { + const progressRatio = Math.max(0, Math.min(1, (shipment.completedSteps - 1) / 3)); + return (
- {/* Top store row (rel 12, 12, size 318×27) */} + {/* Top store row */}
- {shipment.boothName} - - {shipment.boothName} - + {shipment.boothName} + + {shipment.boothName} + +
{/* Right status badge */}
= ({ shipment
- {/* Thumbnails row (rel 15, 54, size 315×50) */} + {/* Thumbnails row */}
{shipment.thumbnails.map((thumb, idx) => ( @@ -130,79 +125,71 @@ export const ShipmentStatusCard: React.FC = ({ shipment src={thumb.src} alt="" style={{ - position: 'absolute', - left: thumb.relX, - top: 0, - width: 50, - height: 50, + width: 'clamp(42px, 13.5vw, 50px)', + height: 'clamp(42px, 13.5vw, 50px)', borderRadius: thumb.radius, objectFit: 'cover', + flexShrink: 0, }} /> ))}
- {/* Grey info box (rel 12, 119, width 318, height 38 or 66, radius 8, fill #f3f3f3) */} + {/* Grey info box */}
{shipment.infoRows.map((row, idx) => (
- - - {row.label} - +
+ + + {row.label} + +
{row.value} @@ -211,40 +198,38 @@ export const ShipmentStatusCard: React.FC = ({ shipment ))}
- {/* 4-Step Progress Bar (rel 12, shipment.stepperRelY, size 318×37) */} + {/* 4-Step Progress Bar */}
- {/* Grey background line (265×1 at rel 25, 9) */} -
- {/* Green active line (greenLineWidth×1 at rel 24, 9) */} + {/* Connecting line between first and last step centers (24px inset) */}
+ > +
+
- {STEP_LABELS.map((step, index) => { + {STEP_LABELS.map((label, index) => { const isCompleted = index < shipment.completedSteps; const labelColor = index === 3 @@ -254,14 +239,21 @@ export const ShipmentStatusCard: React.FC = ({ shipment : '#8b8b8b'; return ( - - {/* Circle 18×18 at (step.circleLeft, 0) */} +
{isCompleted ? (
= ({ shipment ) : (
= ({ shipment
)} - {/* Step Label at (step.left, 23) */} -
- {step.label} -
- + {label} + +
); })}
diff --git a/src/data/routesRegistry.ts b/src/data/routesRegistry.ts index 41a1d3c..d1d4d41 100644 --- a/src/data/routesRegistry.ts +++ b/src/data/routesRegistry.ts @@ -28,11 +28,11 @@ export const ALL_IMPLEMENTED_ROUTES: ScreenRouteEntry[] = [ aliases: ['/'], category: 'Home & Discovery', width: 375, - height: 1150, + height: 1074, refImage: '/assets/images/references/ref-shop-home.png', description: 'Main Habib Shop landing page with Islamic pattern header, search bar, green hero banner, 5 quick categories, Populars & New Stores product carousels, and bottom navigation.', scenarios: [ - { label: 'Default Landing View', route: '/shop-home', description: 'Initial marketplace home state (375×1150).' }, + { label: 'Default Landing View', route: '/shop-home', description: 'Initial marketplace home state (375×1074).' }, { label: 'Open Category Grid via "More"', route: '/shop-category', description: 'Navigate to full 2×6 category grid.' }, { label: 'Open Single Product Card', route: '/shop-single-page', description: 'Click any product card to view product details.' }, ], diff --git a/src/index.css b/src/index.css index 56c8771..b52250b 100644 --- a/src/index.css +++ b/src/index.css @@ -1,5 +1,33 @@ @import './styles/tokens.css'; +:root { + --page-px: 16px; +} + +@media (max-width: 359.98px) { + :root { + --page-px: 12px; + } +} + +@media (min-width: 600px) and (max-width: 767.98px) { + :root { + --page-px: 22px; + } +} + +@media (min-width: 768px) and (max-width: 1023.98px) { + :root { + --page-px: 28px; + } +} + +@media (min-width: 1024px) { + :root { + --page-px: 16px; + } +} + *, *::before, *::after { @@ -22,6 +50,7 @@ body { #root { width: 100%; min-height: 100vh; + min-height: 100dvh; } button, @@ -33,21 +62,76 @@ textarea { background: none; } +input, +textarea { + user-select: text; +} + +.habib-search-input::placeholder, +.habib-textarea::placeholder { + color: #8f8f8f; + opacity: 1; +} + a { color: inherit; text-decoration: none; } -/* Exact Mobile Screen Canvas Wrapper */ +/* Outer Shell: full-bleed responsive on mobile & tablet (<1024px), centered dark frame on desktop (>=1024px) */ +.habib-shell-outer { + width: 100%; + min-height: 100vh; + min-height: 100dvh; + display: flex; + flex-direction: column; + align-items: stretch; + justify-content: flex-start; + padding: 0; + background-color: var(--shell-bg, var(--bg-page)); +} + +/* Mobile & Tablet Viewport (<1024px) */ .habib-mobile-viewport { position: relative; - width: 375px; - background-color: var(--bg-page); - overflow: hidden; + display: flex; + flex-direction: column; + width: 100%; + max-width: 100%; + min-height: 100vh; + min-height: 100dvh; + background-color: var(--shell-bg, var(--bg-page)); + overflow-x: clip; flex-shrink: 0; user-select: none; } +/* Desktop (>=1024px): show current 375px mobile size centered on dark backdrop */ +@media (min-width: 1024px) { + .habib-shell-outer { + align-items: center; + padding: 0 16px; + background-color: #1e2229; + } + + .habib-mobile-viewport:not(.is-embed) { + --page-px: 16px; + width: var(--desktop-frame-w, 375px); + min-height: var(--desktop-frame-h, 814px); + border-radius: var(--desktop-frame-r, 0px); + box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); + } +} + +/* Bare/Embed iframe mode for /test Pixel Verification */ +.habib-mobile-viewport.is-embed { + --page-px: 16px; + width: var(--desktop-frame-w, 375px); + min-height: var(--desktop-frame-h, 814px); + border-radius: 0; + box-shadow: none; +} + .habib-node-btn { cursor: pointer; transition: opacity 0.12s ease; @@ -57,6 +141,25 @@ a { opacity: 0.85; } +.habib-cta-btn { + background-color: #d78e06; + transition: background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; +} + +.habib-cta-btn:hover:not(:disabled) { + background-color: #be7d05; + box-shadow: 0 4px 12px rgba(215, 142, 6, 0.3); +} + +.habib-qty-btn { + background-color: rgba(215, 142, 6, 0.15); + transition: background-color 0.15s ease; +} + +.habib-qty-btn[role='button']:hover { + background-color: rgba(215, 142, 6, 0.28); +} + .habib-scroll-container { scrollbar-width: none; -ms-overflow-style: none; @@ -66,3 +169,520 @@ a { display: none; } +/* Responsive Grids & Tracks */ +.habib-product-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + width: 100%; +} + +.habib-category-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + width: 100%; +} + +.habib-carousel-scroller { + margin: 0 calc(-1 * var(--page-px, 16px)); + padding: 0 var(--page-px, 16px); + overflow-x: auto; + overflow-y: hidden; +} + +.habib-carousel-track { + display: flex; + gap: 12px; + width: max-content; +} + +.habib-compact-card { + width: 152px; + flex: 0 0 152px; +} + +.habib-compact-card-img { + width: 100%; + height: 112px; +} + +.habib-quick-cats { + display: grid; + grid-template-columns: repeat(5, minmax(0, 1fr)); + gap: 2px; + width: 100%; +} + +.habib-orders-grid { + display: flex; + flex-direction: column; + gap: 20px; + width: 100%; +} + +.habib-support-subjects-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 10px; + width: 100%; +} + +.habib-counters-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 12px; + width: 100%; +} + +.habib-provider-badges-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; + width: 100%; +} + +.habib-booth-metrics-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 7px; + width: 100%; +} + +.habib-single-attrs-grid { + display: grid; + grid-template-columns: 1.2fr 1.1fr 0.95fr; + gap: 7.5px; + width: 100%; +} + +.habib-hero-banner { + height: 164px; +} + +.habib-hero-title { + font-size: 16px; +} + +.habib-hero-subtitle { + font-size: 8.5px; +} + +.habib-quick-cat-label { + font-size: 7.5px; +} + +.habib-single-hero-wrap { + position: relative; + width: 100%; + height: 422px; + background-color: #ffffff; + overflow: hidden; +} + +.habib-single-hero-img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; +} + +.habib-bottom-sheet { + width: 100%; + border-radius: 22px 22px 0 0; + background-color: #fafafa; +} + +.habib-bottom-nav-inner { + width: 100%; + height: 100%; + display: grid; + grid-template-columns: 1fr 1fr 75px 1fr 1fr; + align-items: center; + padding: 0 8px; + position: relative; +} + +.habib-nav-icon-wrap { + position: relative; + display: block; + width: 28px; + height: 28px; + flex-shrink: 0; +} + +.habib-nav-icon { + position: absolute; + inset: 0; + width: 28px; + height: 28px; + display: block; + transition: opacity 300ms cubic-bezier(0.22, 1, 0.36, 1); +} + +.habib-nav-icon-wrap.is-active .habib-nav-icon-active, +.habib-nav-icon-wrap.is-entering .habib-nav-icon-active { + opacity: 1; +} + +.habib-nav-icon-wrap.is-active .habib-nav-icon-inactive, +.habib-nav-icon-wrap.is-entering .habib-nav-icon-inactive { + opacity: 0; +} + +.habib-nav-icon-wrap.is-inactive .habib-nav-icon-active, +.habib-nav-icon-wrap.is-leaving .habib-nav-icon-active { + opacity: 0; +} + +.habib-nav-icon-wrap.is-inactive .habib-nav-icon-inactive, +.habib-nav-icon-wrap.is-leaving .habib-nav-icon-inactive { + opacity: 1; +} + +.habib-nav-icon-wrap.is-entering .habib-nav-icon-active { + animation: habib-icon-fade-in 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards; +} + +.habib-nav-icon-wrap.is-entering .habib-nav-icon-inactive { + animation: habib-icon-fade-out 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards; +} + +.habib-nav-icon-wrap.is-leaving .habib-nav-icon-active { + animation: habib-icon-fade-out 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards; +} + +.habib-nav-icon-wrap.is-leaving .habib-nav-icon-inactive { + animation: habib-icon-fade-in 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards; +} + +.habib-nav-label { + font-family: var(--font-sans); + font-weight: 600; + font-size: 12px; + line-height: 17px; + text-align: center; + white-space: nowrap; + color: #3d3d3d; + transition: color 300ms cubic-bezier(0.22, 1, 0.36, 1); +} + +.habib-nav-label.is-active, +.habib-nav-label.is-entering { + color: #d78e06; +} + +.habib-nav-label.is-entering { + animation: habib-label-enter 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards; +} + +.habib-nav-label.is-leaving { + animation: habib-label-leave 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards; +} + +@keyframes habib-icon-fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes habib-icon-fade-out { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes habib-label-enter { + 0% { + color: #3d3d3d; + } + 100% { + color: #d78e06; + } +} + +@keyframes habib-label-leave { + 0% { + color: #d78e06; + } + 100% { + color: #3d3d3d; + } +} + +.habib-nav-wave { + position: absolute; + bottom: 0; + left: 50%; + width: 42px; + height: 7px; + transform: translateX(-50%) scaleX(1) scaleY(1); + transform-origin: 50% 100%; + pointer-events: none; +} + +.habib-nav-wave.is-flatten { + animation: habib-wave-flatten 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards; +} + +.habib-nav-wave.is-rise { + animation: habib-wave-rise 300ms cubic-bezier(0.22, 1, 0.36, 1) 140ms both; +} + +@keyframes habib-wave-flatten { + 0% { + transform: translateX(-50%) scaleX(1) scaleY(1); + opacity: 1; + } + 85% { + opacity: 1; + } + 100% { + transform: translateX(-50%) scaleX(1.16) scaleY(0.001); + opacity: 0; + } +} + +@keyframes habib-wave-rise { + 0% { + transform: translateX(-50%) scaleX(1.16) scaleY(0.001); + opacity: 0; + } + 15% { + opacity: 1; + } + 100% { + transform: translateX(-50%) scaleX(1) scaleY(1); + opacity: 1; + } +} + +@media (prefers-reduced-motion: reduce) { + .habib-nav-wave.is-flatten, + .habib-nav-wave.is-rise, + .habib-nav-icon-wrap.is-entering .habib-nav-icon, + .habib-nav-icon-wrap.is-leaving .habib-nav-icon, + .habib-nav-label.is-entering, + .habib-nav-label.is-leaving { + animation: none; + } + + .habib-nav-icon, + .habib-nav-label { + transition: none; + } + + .habib-nav-wave.is-flatten { + display: none; + } +} + +/* Small Phone Refinements (<360px, e.g., 320px iPhone SE) */ +@media (max-width: 359.98px) { + .habib-mobile-viewport:not(.is-embed) .habib-product-grid, + .habib-mobile-viewport:not(.is-embed) .habib-category-grid { + gap: 8px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-counters-grid { + gap: 6px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-support-subjects-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 8px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-provider-badges-grid { + grid-template-columns: 1fr; + gap: 8px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-single-attrs-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 5px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-booth-metrics-grid { + gap: 5px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-single-hero-wrap { + height: 350px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-bottom-nav-inner { + grid-template-columns: 1fr 1fr 64px 1fr 1fr; + padding: 0 4px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-title { + font-size: 14px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-subtitle { + font-size: 8px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-quick-cat-label { + font-size: 7px; + } +} + +/* Small Tablet / Large Mobile (600px - 767.98px) */ +@media (min-width: 600px) and (max-width: 767.98px) { + .habib-mobile-viewport:not(.is-embed) .habib-product-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 14px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-category-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 14px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-carousel-scroller { + margin: 0; + padding: 0; + overflow: visible; + } + + .habib-mobile-viewport:not(.is-embed) .habib-carousel-track { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 14px; + width: 100%; + } + + .habib-mobile-viewport:not(.is-embed) .habib-compact-card { + width: 100%; + flex: 1 1 auto; + } + + .habib-mobile-viewport:not(.is-embed) .habib-compact-card-img { + height: auto; + aspect-ratio: 128 / 112; + } + + .habib-mobile-viewport:not(.is-embed) .habib-single-hero-img { + object-fit: contain; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-banner { + height: 188px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-title { + font-size: 18px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-subtitle { + font-size: 10.5px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-quick-cat-label { + font-size: 10px; + } +} + +/* Tablet (768px - 1023.98px) */ +@media (min-width: 768px) and (max-width: 1023.98px) { + .habib-mobile-viewport:not(.is-embed) .habib-product-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 16px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-category-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 16px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-carousel-scroller { + margin: 0; + padding: 0; + overflow: visible; + } + + .habib-mobile-viewport:not(.is-embed) .habib-carousel-track { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 16px; + width: 100%; + } + + .habib-mobile-viewport:not(.is-embed) .habib-compact-card { + width: 100%; + flex: 1 1 auto; + } + + .habib-mobile-viewport:not(.is-embed) .habib-compact-card-img { + height: auto; + aspect-ratio: 128 / 112; + } + + .habib-mobile-viewport:not(.is-embed) .habib-orders-grid { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 16px; + align-items: start; + } + + .habib-mobile-viewport:not(.is-embed) .habib-support-subjects-grid { + grid-template-columns: repeat(6, minmax(0, 1fr)); + gap: 12px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-provider-badges-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 14px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-single-attrs-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 12px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-booth-metrics-grid { + gap: 12px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-banner { + height: 212px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-title { + font-size: 20px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-hero-subtitle { + font-size: 11.5px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-quick-cat-label { + font-size: 11px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-single-hero-wrap { + height: 420px; + } + + .habib-mobile-viewport:not(.is-embed) .habib-single-hero-img { + object-fit: contain; + } + + .habib-mobile-viewport:not(.is-embed) .habib-bottom-sheet { + max-width: 560px; + margin: 0 auto; + } + + .habib-mobile-viewport:not(.is-embed) .habib-bottom-nav-inner { + max-width: 640px; + margin: 0 auto; + } +} diff --git a/src/pages/account/LanguageSettingPage.tsx b/src/pages/account/LanguageSettingPage.tsx index 040c32b..e450fa1 100644 --- a/src/pages/account/LanguageSettingPage.tsx +++ b/src/pages/account/LanguageSettingPage.tsx @@ -1,6 +1,91 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; +import { AccountMenuRow } from '../../components/account/AccountMenuRow'; +import type { AccountMenuRowItem } from '../../data/accountData'; + +const LANGUAGE_SETTING_MENU_ROWS: AccountMenuRowItem[] = [ + { + id: 'lang-location', + y: 700, + title: 'Location', + titleWidth: 87, + titleColor: '#151c31', + subtitle: 'Tehran', + subtitleWidth: 41, + iconBoxBg: 'rgba(21, 28, 49, 0.1)', + iconSrc: '/assets/images/icon-menu-saved-bookmark.svg', + iconLeft: 10, + iconTop: 8, + iconWidth: 14, + iconHeight: 18, + rightIconType: 'edit-path', + targetRoute: '/shop-adreess', + }, + { + id: 'lang-language', + y: 757, + title: 'Language', + titleWidth: 69, + titleColor: '#151c31', + subtitle: 'English', + subtitleWidth: 45, + iconBoxBg: 'rgba(21, 28, 49, 0.1)', + iconSrc: '/assets/images/icon-menu-notification-bell.svg', + iconLeft: 9, + iconTop: 10, + iconWidth: 16, + iconHeight: 15, + rightIconType: 'none', + targetRoute: '/language-setting', + }, + { + id: 'lang-notifications', + y: 814, + title: 'Notifications', + titleWidth: 91, + titleColor: '#151c31', + iconBoxBg: 'rgba(21, 28, 49, 0.1)', + iconSrc: '/assets/images/icon-menu-my-addresses-pin.svg', + iconLeft: 9, + iconTop: 7, + iconWidth: 16, + iconHeight: 19.5, + badgeCount: '2', + rightIconType: 'arrow-right', + targetRoute: '/shop-orders', + }, + { + id: 'lang-notes', + y: 871, + title: 'Notes', + titleWidth: 91, + titleColor: '#151c31', + iconBoxBg: 'rgba(21, 28, 49, 0.1)', + iconSrc: '/assets/images/icon-menu-prayer-hands.svg', + iconLeft: 8, + iconTop: 9, + iconWidth: 17, + iconHeight: 17, + rightIconType: 'arrow-right', + targetRoute: '/shop-account', + }, + { + id: 'lang-permissions', + y: 928, + title: 'Program Access and Permissions', + titleWidth: 229, + titleColor: '#151c31', + iconBoxBg: 'rgba(21, 28, 49, 0.1)', + iconSrc: '/assets/images/icon-menu-Reminder-bell.svg', + iconLeft: 8.32, + iconTop: 6, + iconWidth: 14.79, + iconHeight: 20, + rightIconType: 'arrow-right', + targetRoute: '/shop-account', + }, +]; /** * Node 4214:11018 — `language-setting` (Language Setting & Provider Status, 375×813) @@ -11,1007 +96,614 @@ export const LanguageSettingPage: React.FC = () => { return (
+ {/* Top Profile Header */}
- {/* Top Left Back Button at (16, 21), 40×40 */} - - - {/* Top Center Avatar at (146, 26), 84×84 */} - Ahd Art - - {/* Top Right Logout Button at (319, 21), 40×40 */} - +
+ {/* Top Left Back Button */} + - {/* Name "Ahd Art" at (150, 118), 75×26 */} -
- Ahd Art -
+ {/* Top Center Avatar */} + Ahd Art - {/* Email "Ahdart14@gmail.com" at (130, 147), 116×18 */} -
- Ahdart14@gmail.com -
+ {/* Top Right Logout Button */} + +
- {/* Provider Requests Card (4214:11186) at (16, 188), 343×116 */} -
- {/* Row 1: Provider request on Habib Meet -> Pending */} -
- -
- Provider request on Habib Meet -
-
- - Pending - -
+ Ahd Art +
- {/* Row 2: Provider request on Habib Talk -> rejected */} -
- -
- Provider request on Habib Talk -
-
- - rejected - + Ahdart14@gmail.com +
-
- {/* Green Donate Card (4214:11115) at (16, 326), 343×101 */} -
- + {/* Provider Requests Card (4214:11186) */}
- Donate Habib -
-
- Help Habib's Large-Scale project -
- -
+
+
+ +
+
+ Provider request on Habib Meet +
+
- {/* Habib Coins Banner (4214:11036) at (16, 448), 343×55 */} -
- -
- Your Inventory -
-
- 21 Habib Coins -
-
+
+ + {/* Row 2: Provider request on Habib Talk -> rejected */} +
- Buy Coins - - -
+
+
+ +
+
+ Provider request on Habib Talk +
+
- {/* "Apply as Provider" Card at (16, 526), 343×55 */} -
navigate('/provider-requst')} - style={{ - position: 'absolute', - left: 16, - top: 526, - width: 343, - height: 55, - borderRadius: 15, - backgroundColor: '#fbfbfc', - boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)', - cursor: 'pointer', - }} - > -
- -
- Apply as Provider +
+ + rejected + +
+
-
- {/* "My Wallet ($24)" / " income from Habib" Card at (16, 604), 343×55 */} -
-
- + {/* Green Donate Card (4214:11115) */}
- My Wallet ($24) -
-
- {' income from Habib'} -
- -
+ - {/* Bottom Settings Card at (16, 682), 343×304 (clipped at 813px) */} -
+
+
+
+ Donate Habib +
+
+ Help Habib's Large-Scale project +
+
- {/* Row 1: Location / Tehran at (29, 700) */} -
-
- -
- Location -
-
- Tehran + +
- -
- {/* Row 2: Language / English at (29, 757) */} -
-
- -
- Language -
+ {/* Habib Coins Banner (4214:11036) */}
- English +
+ +
+
+ Your Inventory +
+
+ 21 Habib Coins +
+
+
+ +
-
- {/* Row 3: Notifications at (29, 814) */} -
navigate('/shop-orders')} - style={{ - position: 'absolute', - left: 29, - top: 814, - width: 317, - height: 34, - cursor: 'pointer', - }} - > -
- + {/* "Apply as Provider" Card */}
navigate('/provider-requst')} + style={{ + width: '100%', + minHeight: 55, + padding: '10px 13px', + borderRadius: 15, + backgroundColor: '#fbfbfc', + boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)', + cursor: 'pointer', display: 'flex', alignItems: 'center', + gap: 10, }} > - Notifications +
+ +
+
+ Apply as Provider +
- -
- - {/* Notification Red Badge "2" at (52, 806), 17×18 */} -
- - 2 - -
- {/* Row 4: Notes at (29, 871) */} -
navigate('/shop-account')} - style={{ - position: 'absolute', - left: 29, - top: 871, - width: 317, - height: 34, - cursor: 'pointer', - }} - > -
- + {/* "My Wallet ($24)" / "income from Habib" Card */}
- Notes +
+ +
+
+
+ My Wallet ($24) +
+
+ income from Habib +
+
+
- -
- {/* Row 5: Program Access and Permissions at (29, 928) */} -
navigate('/shop-account')} - style={{ - position: 'absolute', - left: 29, - top: 928, - width: 317, - height: 34, - cursor: 'pointer', - }} - > -
- + {/* Bottom Settings Card */}
- Program Access and Permissions -
- -
+ {LANGUAGE_SETTING_MENU_ROWS.map((row) => ( + + ))}
diff --git a/src/pages/account/ProviderRequestPage.tsx b/src/pages/account/ProviderRequestPage.tsx index abe388b..e83fe3c 100644 --- a/src/pages/account/ProviderRequestPage.tsx +++ b/src/pages/account/ProviderRequestPage.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; import { HabibCoinsBanner } from '../../components/account/HabibCoinsBanner'; @@ -15,634 +15,593 @@ import { */ export const ProviderRequestPage: React.FC = () => { const navigate = useNavigate(); + const [fullName, setFullName] = useState(''); + const [email, setEmail] = useState(''); + const [phoneNumber, setPhoneNumber] = useState(''); return ( - {/* Top Left Back Button (4214:10545) at (16, 21), 40×40 */} - - - {/* Top Center Avatar (4214:10552) at (146, 26), 84×84 */} - Profile - - {/* Top Right Logout Button (4214:10553) at (319, 21), 40×40 */} - - - {/* Form Card (4214:10540) at (16, 136), 343×335 */} -
- - {/* Field 1: Full Name at (28, 156) */}
- Full Name -
-
- - Full Name - -
+ - {/* Field 2: Email at (28, 262) */} -
- Email -
-
- - Email - -
+ Profile - {/* Field 3: Phone Number at (28, 368) */} -
- Phone Number -
-
- navigate('/language-setting')} + aria-label="Logout" + style={{ + width: 40, + height: 40, + borderRadius: 15, + backgroundColor: '#ffffff', + border: 'none', + padding: 0, + cursor: 'pointer', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + flexShrink: 0, + }} + > + + +
+ + {/* Form Card (4214:10540) */} +
- +23 - + {/* Field 1: Full Name */} +
+ + setFullName(e.target.value)} + placeholder="Full Name" + style={{ + width: '100%', + height: 55, + padding: '0 15px', + borderRadius: 11, + backgroundColor: '#fbfbfc', + border: '1px solid #8b8b8b', + boxSizing: 'border-box', + fontFamily: 'var(--font-sans)', + fontWeight: 400, + fontSize: 14, + lineHeight: '20px', + color: '#111111', + }} + /> +
+ + {/* Field 2: Email */} +
+ + setEmail(e.target.value)} + placeholder="Email" + style={{ + width: '100%', + height: 55, + padding: '0 15px', + borderRadius: 11, + backgroundColor: '#fbfbfc', + border: '1px solid #8b8b8b', + boxSizing: 'border-box', + fontFamily: 'var(--font-sans)', + fontWeight: 400, + fontSize: 14, + lineHeight: '20px', + color: '#111111', + }} + /> +
+ + {/* Field 3: Phone Number */} +
+ +
+ + +23 + +
+ setPhoneNumber(e.target.value)} + placeholder="Phone number" + style={{ + flex: 1, + minWidth: 0, + height: '100%', + fontFamily: 'var(--font-sans)', + fontWeight: 400, + fontSize: 14, + lineHeight: '20px', + color: '#111111', + backgroundColor: 'transparent', + }} + /> +
+
+
+ + {/* Provider Status Card (4214:10539) */}
- - Phone number - -
- - {/* Provider Status Card (4214:10539) at (16, 494), 343×175 */} -
-
- Your are a provider in: -
+
+ Your are a provider in: +
- {/* 3 Provider Badge Cards */} - {PROVIDER_BADGE_CARDS.map((badge) => ( - - ))} +
+ {PROVIDER_BADGE_CARDS.map((badge) => ( + + ))} +
+
- {/* Habib Coins Banner (4214:10558) at (16, 692), 343×55 */} - + {/* Habib Coins Banner (4214:10558) */} + - {/* "Become a provider on Habib" Card (4214:10599) at (16, 770), 343×55 */} -
navigate('/language-setting')} - style={{ - position: 'absolute', - left: 16, - top: 770, - width: 343, - height: 55, - borderRadius: 15, - backgroundColor: '#fbfbfc', - boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)', - cursor: 'pointer', - }} - > -
- + {/* "Become a provider on Habib" Card (4214:10599) */}
navigate('/language-setting')} style={{ - position: 'absolute', - left: 57, - top: 20, - width: 161, - height: 14, - fontFamily: 'var(--font-sans)', - fontWeight: 600, - fontSize: 14, - lineHeight: '16px', - color: '#111111', + width: '100%', + minHeight: 55, + padding: '10px 13px', + borderRadius: 15, + backgroundColor: '#fbfbfc', + boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)', + cursor: 'pointer', display: 'flex', alignItems: 'center', + gap: 10, }} > - Become a provider on Habib +
+ +
+
+ Become a provider on Habib +
-
- {/* "My Wallet ($24)" Card (4214:10615) at (16, 848), 343×55 */} -
+ {/* "My Wallet ($24)" Card (4214:10615) */}
- -
- My Wallet ($24) +
+ +
+
+
+ My Wallet ($24) +
+
+ Habib Income +
+
+
+ + {/* Settings Card (4214:10627) */}
- Habib Income + {PROVIDER_SETTINGS_MENU_ROWS.map((row) => ( + + ))}
- -
- {/* Settings Card (4214:10627) at (16, 926), 343×305 */} -
- {PROVIDER_SETTINGS_MENU_ROWS.map((row) => ( - - ))} - - {/* Info Card (4214:10628) at (16, 1254), 343×182 */} -
- {PROVIDER_INFO_MENU_ROWS.map((row) => ( - - ))} - - {/* Delete Account Card (4214:10703) at (16, 1459), 343×55 */} -
+ {/* Info Card (4214:10628) */}
- + > + {PROVIDER_INFO_MENU_ROWS.map((row) => ( + + ))} +
+ + {/* Delete Account Card (4214:10703) */}
- Delete Account +
+ +
+
+
+ Delete Account +
+
+ Permanently remove user and associated data +
+
+ + {/* Footer Version & Social Icons */}
- Permanently remove user and associated data -
-
+
+ Habib | Version 2.1 +
- {/* Footer Version "Habib | Version 2.1" (4214:10538) at (143, 1569), 89×11 */} -
- Habib | Version 2.1 +
+ Instagram + Telegram + WhatsApp +
+
- - {/* Footer Social Icons at y=1632 */} - Instagram - Telegram - WhatsApp ); }; diff --git a/src/pages/account/ShopAccountPage.tsx b/src/pages/account/ShopAccountPage.tsx index ceff06d..aa33207 100644 --- a/src/pages/account/ShopAccountPage.tsx +++ b/src/pages/account/ShopAccountPage.tsx @@ -17,213 +17,207 @@ export const ShopAccountPage: React.FC = () => { return ( - {/* Avatar Circle (4215:11560) at (145, 21), 84×84, radius 78.5, fill #768293 */}
- Habib shoper -
- - {/* Right Edit Profile Button (4214:11436) at (319, 21), 40×40 */} - + > + {/* Right Edit Profile Button (4214:11436) */} + - {/* User Name "Habib shoper" (4214:366) at (131, 114), 114×26 */} -
- Habib shoper -
+ {/* Avatar Circle (4215:11560) */} +
+ Habib shoper +
- {/* Phone "09102036523" (4214:367) at (158, 143), 60×13 */} -
- 09102036523 -
+ {/* User Name "Habib shoper" (4214:366) */} +
+ Habib shoper +
- {/* 3 Order Status Counter Cards (4215:11563) at (16, 187), 343×46 */} -
- {ACCOUNT_ORDER_COUNTERS.map((counter) => ( - - ))} -
- - {/* White Menu Card Background (4214:364) at (16, 257), 343×304 */} -
+ {/* Phone "09102036523" (4214:367) */} +
+ 09102036523 +
+
- {/* 5 Account Menu Rows */} - {SHOP_ACCOUNT_MENU_ROWS.map((row) => ( - - ))} + {/* 3 Order Status Counter Cards (4215:11563) */} +
+ {ACCOUNT_ORDER_COUNTERS.map((counter) => ( + + ))} +
- {/* Sign Out Card (4214:464) at (16, 576), 343×55 */} -
navigate('/shop-home')} - style={{ - position: 'absolute', - left: 16, - top: 576, - width: 343, - height: 55, - borderRadius: 15, - backgroundColor: '#ffffff', - cursor: 'pointer', - }} - > - {/* Icon Box (34×34 at abs 29, 587 -> rel 13, 11) */} -
- + {/* White Menu Card (4214:364) with 5 Account Menu Rows */}
- Sign out + {SHOP_ACCOUNT_MENU_ROWS.map((row) => ( + + ))}
+ + {/* Sign Out Card (4214:464) */}
navigate('/shop-home')} style={{ - position: 'absolute', - left: 57, - top: 30, - width: 244, - height: 11, - fontFamily: 'var(--font-sans)', - fontWeight: 600, - fontSize: 10, - lineHeight: '12.9px', - color: '#8b8b8b', + width: '100%', + minHeight: 55, + padding: '10px 13px', + borderRadius: 15, + backgroundColor: '#ffffff', + cursor: 'pointer', display: 'flex', alignItems: 'center', + gap: 10, }} > - sign out from account +
+ +
+
+
+ Sign out +
+
+ sign out from account +
+
- {/* Bottom Navigation Bar (4214:470) at y=736 */} - + {/* Bottom Navigation Bar (4214:470) */} + ); }; diff --git a/src/pages/account/ShopAddressPage.tsx b/src/pages/account/ShopAddressPage.tsx index 0e4c793..e461201 100644 --- a/src/pages/account/ShopAddressPage.tsx +++ b/src/pages/account/ShopAddressPage.tsx @@ -20,35 +20,43 @@ export const ShopAddressPage: React.FC = () => { return ( - {/* Top Header: Back button at (16, 21) + "My Adresses" at (114, 29) */} + {/* Top Header: Back button + "My Adresses" */} - {/* Saved Addresses List (4182:13410) at (14, 93), 348×184 */}
- {addresses.map((address) => ( - setSelectedId(address.id)} - /> - ))} -
+ {/* Saved Addresses List (4182:13410) */} +
+ {addresses.map((address) => ( + setSelectedId(address.id)} + /> + ))} +
- {/* Add New Address Card (4182:13457) at (14, 299), 348×53 */} - + {/* Add New Address Card (4182:13457) */} + +
); }; diff --git a/src/pages/catalog/ShopBoothPage.tsx b/src/pages/catalog/ShopBoothPage.tsx index a06b696..dc5f965 100644 --- a/src/pages/catalog/ShopBoothPage.tsx +++ b/src/pages/catalog/ShopBoothPage.tsx @@ -1,7 +1,6 @@ -import React from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; -import { StatusBar } from '../../components/layout/StatusBar'; import { GridProductCard } from '../../components/common/GridProductCard'; import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData'; @@ -10,581 +9,605 @@ import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData'; */ export const ShopBoothPage: React.FC = () => { const navigate = useNavigate(); + const [copied, setCopied] = useState(false); + const copyTimerRef = useRef(undefined); + + useEffect(() => () => window.clearTimeout(copyTimerRef.current), []); + + const handleShare = async () => { + const url = window.location.href; + const shareData: ShareData = { + title: 'TashakolFarzandan Rohhallah', + url, + }; + + if ( + typeof navigator.share === 'function' && + (!navigator.canShare || navigator.canShare(shareData)) + ) { + try { + await navigator.share(shareData); + return; + } catch (err) { + if ( + (err instanceof DOMException || err instanceof Error) && + (err.name === 'AbortError' || err.name === 'InvalidStateError') + ) { + return; + } + } + } + + let didCopy = false; + if (navigator.clipboard?.writeText) { + try { + await navigator.clipboard.writeText(url); + didCopy = true; + } catch { + // Fall through to legacy copy for non-secure contexts + } + } + + if (!didCopy) { + const textarea = document.createElement('textarea'); + textarea.value = url; + textarea.setAttribute('readonly', ''); + textarea.style.position = 'fixed'; + textarea.style.opacity = '0'; + document.body.appendChild(textarea); + textarea.select(); + try { + didCopy = document.execCommand('copy'); + } catch { + didCopy = false; + } + document.body.removeChild(textarea); + } + + if (didCopy) { + setCopied(true); + window.clearTimeout(copyTimerRef.current); + copyTimerRef.current = window.setTimeout(() => setCopied(false), 2000); + } else { + window.prompt('Share link:', url); + } + }; return ( - {/* Whole-Body Scrollable Container */} + {/* Top Banner Calligraphy Image & Floating Actions */}
-
- {/* Top Banner Calligraphy Image (4129:16355) at (0, 0), 375×152 */} -
-
- {/* Status Bar (4129:15736) */} - - - {/* Back Button (4129:15761) at (16, 35) */} - - - {/* Right Top Actions (4129:15767) at (271, 35), 88×40 */} - - - {/* Store Title "TashakolFarzandan Rohhallah" (4129:16389) at (15, 131), 344×20 */} -
- TashakolFarzandan Rohhallah + {/* Right Top Actions */} +
+ +
+
- {/* Iran Flag + "Iran | Tehran" (4129:16390) at (140, 157), 94×19 */} + {/* Store Profile & Products Body */}
+ {/* Circular Store Avatar */} Iran - - Iran | Tehran - -
- {/* Store Stats Row (4129:16452) at (15, 188), 344×31 */} -
- {/* Star + "4.4 (608)" at abs (34, 196) -> rel (19, 8) */} - - - 4.4 (608) - + TashakolFarzandan Rohhallah + - {/* Divider 1 (4129:16483) at abs (120.75, 197.5) -> rel (105.75, 9.5) */} + {/* Iran Flag + "Iran | Tehran" */}
- - {/* "+1 year membership" (4129:16476) at abs (148.5, 197) -> rel (133.5, 9) */} - - +1 year membership - + Iran + + Iran | Tehran + +
- {/* Divider 2 (4129:16481) at abs (269.25, 197.5) -> rel (254.25, 9.5) */} + {/* Store Stats Row */}
- - {/* "+60 sales" (4129:16478) at abs (297, 197) -> rel (282, 9) */} - - +60 sales - -
+
+ + + 4.4 (608) + +
- {/* 3 Store Metric Cards (4129:16522) at (15, 240), 344×58 */} - {/* Card 1: 2h Avg. Response (4129:16523) at (15, 240), 110×58 */} -
navigate('/shop-chat')} - style={{ - position: 'absolute', - left: 15, - top: 240, - width: 110, - height: 58, - borderRadius: 8, - backgroundColor: '#efece9', - border: '1px solid #e8e4df', - boxSizing: 'border-box', - cursor: 'pointer', - }} - > - - - 2h - - - Avg. Response - -
+
- {/* Card 2: 87% On-time Delivery (4129:16594) at (132, 240), 110×58 */} -
- - + +1 year membership + + +
+ + + +60 sales + +
+ + {/* 3 Store Metric Cards */} +
+ {/* Card 1: 2h Avg. Response */} +
navigate('/shop-chat')} + style={{ + minHeight: 58, + padding: '8px', + borderRadius: 8, + backgroundColor: '#efece9', + border: '1px solid #e8e4df', + cursor: 'pointer', + display: 'flex', + flexDirection: 'column', + justifyContent: 'space-between', + minWidth: 0, + }} + > +
+ + + 2h + +
+ + Avg. Response + +
+ + {/* Card 2: 87% On-time Delivery */} +
+
+ + + 87% + +
+ + On-time Delivery + +
+ + {/* Card 3: 98% Satisfaction */} +
+
+ + + 98% + +
+ + Satisfaction + +
+
+ + {/* About Section */} +
- 87% - - + About +
+
+ { + 'In this room, we are going to talk about raising children from the perspective of Islam In this room, we are going to talk about raising children from the perspective of Islam of Islam In this room, we are going to talk about raising children from about the perspective talk about of Islam room.' + } +
+ + + {/* Products Section */} +
- On-time Delivery - +
+ Products +
+ +
+ {TWO_COLUMN_GRID_PRODUCTS.map((product) => ( + + ))} +
+
- {/* Card 3: 98% Satisfaction (4129:16586) at (249, 240), 110×58 */} -
- - - 98% - - - Satisfaction - -
- - {/* About Section (4129:16420) at (15, 329), 344×129 */} -
- About -
-
- {'In this room, we are going to talk about raising children from the perspective of Islam In this room, we are going to talk about raising children from the perspective of Islam of Islam In this room, we are going to talk about raising children from about the perspective talk about of Islam room.'} -
- - {/* Products Section (4129:16997) at (15, 489), 344×777 */} -
- Products -
- - {/* 2×3 Product Grid (4169:321) at (15, 519), 344×747 */} -
- {TWO_COLUMN_GRID_PRODUCTS.map((product) => ( - - ))} -
+ Link copied
-
+ )}
); }; diff --git a/src/pages/catalog/ShopCatItemsPage.tsx b/src/pages/catalog/ShopCatItemsPage.tsx index 9a5c2e3..6979a70 100644 --- a/src/pages/catalog/ShopCatItemsPage.tsx +++ b/src/pages/catalog/ShopCatItemsPage.tsx @@ -11,34 +11,20 @@ import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData'; export const ShopCatItemsPage: React.FC = () => { return ( - {/* Top Header: Back button at (16, 21) + "Home & Living" at (114, 29) */} - {/* Search Bar at (16, 84), width 343 */} - - - {/* 2-Column Product Grid Group (4181:13003) at (16, 157), scrollable */}
-
+ + +
{TWO_COLUMN_GRID_PRODUCTS.map((product) => ( ))} diff --git a/src/pages/catalog/ShopCategoryPage.tsx b/src/pages/catalog/ShopCategoryPage.tsx index a073e8b..e4afcce 100644 --- a/src/pages/catalog/ShopCategoryPage.tsx +++ b/src/pages/catalog/ShopCategoryPage.tsx @@ -11,38 +11,25 @@ import { CATEGORY_GRID_TILES } from '../../data/catalogData'; export const ShopCategoryPage: React.FC = () => { return ( - {/* 12 Category Tiles in 2-Column Scrollable Grid */}
-
+ + +
{CATEGORY_GRID_TILES.map((tile) => ( ))}
- {/* Search Bar at (16, 38), width 343 */} - - - {/* Bottom Navigation Bar at y=736 */} - + ); }; diff --git a/src/pages/catalog/ShopSinglePage.tsx b/src/pages/catalog/ShopSinglePage.tsx index 24bc529..006174e 100644 --- a/src/pages/catalog/ShopSinglePage.tsx +++ b/src/pages/catalog/ShopSinglePage.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; -import { StatusBar } from '../../components/layout/StatusBar'; import { CompactProductCard } from '../../components/common/CompactProductCard'; import { HOME_POPULAR_PRODUCTS } from '../../data/catalogData'; @@ -14,187 +13,150 @@ export const ShopSinglePage: React.FC = () => { return ( - {/* Whole-Body Scrollable Container */} -
+ {/* Hero Product Image & Floating Top Controls */} +
+ Islam in the Bible Book + + {/* Floating Top Action Row */}
- {/* Hero Product Image (4153:19199) at (0, 0), 375×422 */} - Islam in the Bible Book - - {/* iPhone Status Bar (4153:19202) */} - + - {/* Back Button (4153:19227) at (16, 35) */} - + {/* Right Search + Cart Buttons */} +
+ +
+
- {/* Right Search + Cart Buttons (4153:19233) at (271, 35) */} -
+ {/* Image Carousel Dots */} -
- {/* Image Carousel Dots (4153:19390) at (169, 359) */} - - - {/* Top Rounded Sheet Cap (4153:19394) at (0, 384), 375×40 */} + {/* Rounded Top Sheet & Main Product Info Section */}
- - {/* Main Product Info Section (4153:19395) at (17, 400), 343×213 */} -
- {/* Breadcrumb & Bookmark/Share row (4153:19482) at rel (0, 0) */} + {/* Breadcrumb & Bookmark/Share row */}
Leather accessories and supplies / Leather bags @@ -204,87 +166,63 @@ export const ShopSinglePage: React.FC = () => { src="/assets/images/icon-single-bookmark-share-pair.svg" alt="" style={{ - position: 'absolute', - left: 287, - top: 0, width: 56, height: 24, + flexShrink: 0, }} />
- {/* Product Title & Rating (4153:19397) at rel (0, 34) */} -
-
+

Islam in the Bible Book -

+
- - - 4.4 - +
+ + + 4.4 + +
0 Reviews @@ -292,73 +230,57 @@ export const ShopSinglePage: React.FC = () => {
- {/* 3 Attribute Pills Row (4153:19414) at rel (0, 106), 343×48 */} -
- {/* Pill 1: Product Condition -> In Stock (121×48 at rel 0, 0) */} + {/* 3 Attribute Pills Row */} +
+ {/* Pill 1: Product Condition -> In Stock */}
Product Condition
-
{
- {/* Pill 2: Processing Time -> 2–3 Days (111×48 at rel 128.5, 0) */} + {/* Pill 2: Processing Time -> 2–3 Days */}
Processing Time
{
- {/* Pill 3: Product Type -> Bag (96×48 at rel 247, 0) */} + {/* Pill 3: Product Type -> Bag */}
Product Type
{
- {/* Store Booth Row (4153:19431) at rel (0, 169), 343×49 */} + {/* Store Booth Row */}
navigate('/shop-booth')} style={{ - position: 'absolute', - left: 0, - top: 169, - width: 343, - height: 49, + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + gap: 10, + minHeight: 49, cursor: 'pointer', }} > - Al-Hujjah Books - -
-
- Al-Hujjah Books -
+
-
- Qom, Iran + +
+
+ + Al-Hujjah Books + + +
+
+ Qom, Iran +
- {/* Right Store Rating (4153:19441) at rel (297, 8) */} + {/* Right Store Rating */}
- - - 4.2 - +
+ + + 4.2 + +
{
-
- {/* Tabs: "Information" (4153:19246) & "Review(3)" (4153:19247) */} -
setActiveTab('info')} - style={{ - position: 'absolute', - left: 66, - top: 643, - width: 76, - height: 16, - fontFamily: 'var(--font-sans)', - fontWeight: 600, - fontSize: 14, - lineHeight: '16px', - color: activeTab === 'info' ? '#111111' : '#8b8b8b', - textAlign: 'center', - cursor: 'pointer', - }} - > - Information -
-
setActiveTab('review')} - style={{ - position: 'absolute', - left: 245, - top: 644, - width: 62, - height: 16, - fontFamily: 'var(--font-sans)', - fontWeight: 600, - fontSize: 14, - lineHeight: '16px', - color: activeTab === 'review' ? '#111111' : '#8b8b8b', - textAlign: 'center', - cursor: 'pointer', - }} - > - Review(3) -
+ {/* Tabs: "Information" & "Review(3)" */} +
+ + - {/* Active Tab Indicator Bar (4153:19248) at (17, 671), 165×3 */} -
+ {/* Active Tab Indicator Bar */} +
+
+
- {/* Lower Content Background (4153:19245) at (0, 674), 375×628, #ebe8e5 */} + {/* Lower Content Background & Sections */}
- - {/* Information & Populars Content (4153:19249) at (16, 702) */} -
{/* Category block */} -
+
{
{
{/* Introduction block */} -
+
{
{
- {/* Populars Row at rel (0, 231) -> abs (16, 933) */} -
+ {/* Populars Row */} +
{
navigate('/shop-catitems')} style={{ - position: 'absolute', - left: 277, - top: 0, - width: 64, - height: 18, + display: 'inline-flex', + alignItems: 'center', + gap: 4, cursor: 'pointer', }} > { src="/assets/images/icon-arrow-right-circle-grey.svg" alt="" style={{ - position: 'absolute', - left: 49.5, - top: 2.5, width: 13, height: 13, }} @@ -830,94 +663,59 @@ export const ShopSinglePage: React.FC = () => {
-
-
+
+
{HOME_POPULAR_PRODUCTS.map((product) => ( - + ))}
-
-
- {/* Bottom Sticky Add to Cart Bar (4153:19448) at (0, 1146), 375×87 */} + {/* Bottom Sticky Add to Cart Bar */}
- {/* Left Price & 20% Badge (4153:19687) at rel (16, 24) */} -
- - $28.50 - -
+ {/* Left Price & 20% Badge */} +
+
+ + $28.50 + {
{
- {/* Add to Cart Button (4153:19451) at rel (159, 19), 200×52 */} + {/* Add to Cart Button */} + > + + - {/* Center Store Title & Location (4129:17512) at (79, 28) */} -
navigate('/shop-booth')} - style={{ - position: 'absolute', - left: 79, - top: 28, - width: 218, - height: 33, - cursor: 'pointer', - }} - > + {/* Center Store Title & Location */}
navigate('/shop-booth')} style={{ - position: 'absolute', - left: 53, - top: 5.5, - width: 112, - height: 16, - fontFamily: 'var(--font-sans)', - fontWeight: 700, - fontSize: 14, - lineHeight: '19px', - color: '#111111', - textAlign: 'center', - whiteSpace: 'nowrap', + flex: 1, + minWidth: 0, + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + gap: 1, + cursor: 'pointer', }} > - Al-Hujjah Books +
+ Al-Hujjah Books +
+
+ Qom, Iran +
-
setMenuOpen((prev) => !prev)} + aria-label="More options" style={{ - position: 'absolute', - left: 53, - top: 23.5, - width: 112, - height: 10, - fontFamily: 'var(--font-sans)', - fontWeight: 700, - fontSize: 10, - lineHeight: '13.9px', - color: '#8b8b8b', - textAlign: 'center', - whiteSpace: 'nowrap', + width: 40, + height: 40, + borderRadius: 15, + backgroundColor: '#ffffff', + border: 'none', + padding: 0, + cursor: 'pointer', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + flexShrink: 0, }} > - Qom, Iran -
-
+ + - {/* Right 3-Dots Menu Button (4129:17409) at (319, 21) */} - + {/* Dropdown Menu Overlay */} + {menuOpen && ( +
+ {/* Row 1: Report */} +
navigate('/shop-support')} + style={{ + display: 'flex', + alignItems: 'center', + gap: 8, + cursor: 'pointer', + }} + > + + + Report + +
- {/* Scrollable Chat Messages Area */} -
-
- {/* "Yesterday" Date Label (4129:17418) at (160, 208) */} -
- Yesterday -
+ {/* Row 2: Support */} +
navigate('/shop-support')} + style={{ + display: 'flex', + alignItems: 'center', + gap: 8, + cursor: 'pointer', + }} + > + + + Support + +
- {/* Store Avatars at (14, 238), (14, 302), (14, 503) */} - {[238, 302, 503].map((topY) => ( - Al-Hujjah Books - ))} + {/* Row 3: Guidelines */} +
+ + + + + + + Guidelines + +
+
+ )} + - {/* Incoming Bubble 1 (4129:17457) at (58, 238) */} + {/* Chat Messages Area */}
+ {/* "Yesterday" Date Label */}
- Hey, How are you? -
-
- 22:13 -
-
- - {/* Incoming Bubble 2 (4129:17453) at (58, 302) */} -
-
- Hey, How are you? -
-
- 22:13 + Yesterday
-
- {/* Incoming Bubble 3 (4129:17470) at (58, 366) */} -
-
- I was asking for your New Year Plans, ask we are going to host a party. -
-
- 22:13 + {/* Incoming Bubble 1 */} +
+ Al-Hujjah Books +
+
+ Hey, How are you? +
+
+ 22:13 +
+
-
- {/* "Today " Date Label (4129:17420) at (173, 473) */} -
- {'Today '} -
- - {/* Incoming Bubble 4 (4129:17474) at (58, 503) */} -
-
- I was asking for your New Year Plans, ask we are going to host a party. -
-
- 22:13 + {/* Incoming Bubble 2 */} +
+ Al-Hujjah Books +
+
+ Hey, How are you? +
+
+ 22:13 +
+
-
- {/* Outgoing Green Bubble (4129:17461) at right: 28, top: 602 */} -
-
- are you? -
-
- 22:13 + {/* Incoming Bubble 3 (indented alongside previous avatar) */} +
+
+
+
+ I was asking for your New Year Plans, ask we are going to host a party. +
+
+ 22:13 +
+
-
- {/* "Try Again" Button (4129:17422) at (143, 671), 36×36 */} -
- + {/* "Today " Date Label */}
- Try Again + {'Today '}
-
- {/* Outgoing Red Failed Bubble (4129:17465) at right: 28, top: 664 */} -
-
- Hey, How are you? + {/* Incoming Bubble 4 */} +
+ Al-Hujjah Books +
+
+ I was asking for your New Year Plans, ask we are going to host a party. +
+
+ 22:13 +
+
+ + {/* Outgoing Green Bubble */}
- - + are you? +
+
{ }} > 22:13 - -
-
+
-
- {/* Dropdown Menu Overlay (4129:17427) at (232, 69), 127×106 */} - {menuOpen && ( + {/* Outgoing Red Failed Bubble + "Try Again" Button */}
- {/* Row 1: Report (rel 12, 12) */}
navigate('/shop-support')} style={{ - position: 'absolute', - left: 12, - top: 12, - width: 103, - height: 22, + display: 'flex', + flexDirection: 'column', + alignItems: 'center', cursor: 'pointer', + flexShrink: 0, }} > - - Report - + Try Again +
- {/* Row 2: Support (rel 12, 42) */}
navigate('/shop-support')} style={{ - position: 'absolute', - left: 12, - top: 42, - width: 103, - height: 22, - cursor: 'pointer', + padding: '8px 16px', + display: 'flex', + flexDirection: 'column', + gap: 4, + borderRadius: '20px 0px 20px 20px', + backgroundColor: '#d44747', }} > - - - Support - -
- - {/* Row 3: Guidelines (rel 12, 72) */} -
- - - - - - +
- {' Guidelines'} - + + + 22:13 + +
- )} +
- {/* Bottom Message Input Bar (4129:17479) at (15, 742), 344×56 */} + {/* Bottom Sticky Message Input Bar */}
- setMessageText(e.target.value)} - onKeyDown={(e) => { - if (e.key === 'Enter' && messageText.trim()) { - setMessageText(''); - } - }} - placeholder="Messages" +
-
+ > + - {/* Emoji / Attachment Icon (4129:17484) at (30, 758), 24×24 */} - + setMessageText(e.target.value)} + onKeyDown={(e) => { + if (e.key === 'Enter' && messageText.trim()) { + setMessageText(''); + } + }} + placeholder="Messages" + style={{ + flex: 1, + minWidth: 0, + height: '100%', + border: 'none', + outline: 'none', + backgroundColor: 'transparent', + padding: 0, + fontFamily: 'var(--font-sans)', + fontWeight: 400, + fontSize: 12, + lineHeight: '18px', + color: '#111111', + }} + /> - {/* Mic Icon (4129:17488) at (288, 758), 24×24 */} - + - {/* Send Icon (4129:17482) at (321, 758), 24×24 */} - { - if (messageText.trim()) { - setMessageText(''); - } - }} - style={{ - position: 'absolute', - left: 321, - top: 758, - width: 24, - height: 24, - cursor: 'pointer', - }} - /> + { + if (messageText.trim()) { + setMessageText(''); + } + }} + style={{ + width: 24, + height: 24, + cursor: 'pointer', + flexShrink: 0, + }} + /> +
+
); }; diff --git a/src/pages/checkout/ShopBuy01Page.tsx b/src/pages/checkout/ShopBuy01Page.tsx index 9b910b1..177e9f4 100644 --- a/src/pages/checkout/ShopBuy01Page.tsx +++ b/src/pages/checkout/ShopBuy01Page.tsx @@ -20,192 +20,112 @@ export const ShopBuy01Page: React.FC = () => { return ( - {/* Top Header: Back at (16, 21) + "Shipping Details" at (114, 30) */} - {/* Scrollable Shipping Details Sections */} + {/* Shipping Details Body */}
-
- {/* Delivery Address Section (4171:1035) at (14, 100), 348×284 */} -
- {/* Section Heading (4160:9197) */} -
- - - Delivery Address - -
- - {/* Address Cards Container (4171:1034) at rel (0, 37) */} -
- {addresses.map((address) => ( - setSelectedId(address.id)} + {/* Delivery Address Section */} +
+
+ - ))} + + Delivery Address + +
- navigate('/shop-adreess')} - /> -
-
+
+ {addresses.map((address) => ( + setSelectedId(address.id)} + /> + ))} - {/* Delivery Method Section (4171:1036) at (17, 445), 348×92 */} -
-
- - - Delivery method - -
+ navigate('/shop-adreess')} /> +
+ - {/* Standard Shipping Card (4170:998) at rel (0, 36), 348×56 */} -
+ {/* Delivery Method Section */} +
+
+ + + Delivery method + +
+ + {/* Standard Shipping Card */}
- {/* Selected Radio (20×20 at rel 0, 0) */} + {/* Selected Radio */}
{ />
- {/* Truck Icon (24×24 at rel 34, 0) */} + {/* Truck Icon */} - {/* "Standard shiping" & "2-3 business day" at rel (72, 0) */} + {/* "Standard shiping" & "2-3 business day" */}
- Standard shiping -
-
- 2-3 business day +
+ Standard shiping +
+
+ 2-3 business day +
- {/* Price "$5,00" at rel (287, 0) */} + {/* Price "$5,00" */}
$5,00
-
-
+ - {/* Green Encryption Banner (4160:905) at (17, 657), 342×37 */} -
- - Your information is encrypted during transmission. - -
+ + Your information is encrypted during transmission. +
- {/* Bottom Sticky Continue Bar (4159:368) at y=724, height 90 */} + {/* Bottom Sticky Continue Bar */} diff --git a/src/pages/checkout/ShopCartPage.tsx b/src/pages/checkout/ShopCartPage.tsx index e25037f..dc048e3 100644 --- a/src/pages/checkout/ShopCartPage.tsx +++ b/src/pages/checkout/ShopCartPage.tsx @@ -106,70 +106,65 @@ export const ShopCartPage: React.FC = () => { return ( - {/* Top Info Bar: "3 item from 2 Shops" (4129:18180) at (18, 42) & "Clear all" (4169:802) at (316, 42) */} + {/* Main Cart Content */}
- {topInfoText} -
+ {/* Top Info Bar */} +
+
+ {topInfoText} +
-
0 ? 'Clear all' : 'Restore'} - style={{ - position: 'absolute', - left: 316, - top: 42, - width: 38, - height: 14, - fontFamily: 'var(--font-sans)', - fontWeight: 700, - fontSize: 10, - lineHeight: '13.9px', - color: items.length > 0 ? '#d44747' : '#d78e06', - textAlign: 'center', - cursor: 'pointer', - whiteSpace: 'nowrap', - userSelect: 'none', - }} - > - {items.length > 0 ? 'Clear all' : 'Restore'} -
+
0 ? 'Clear all' : 'Restore'} + style={{ + fontFamily: 'var(--font-sans)', + fontWeight: 700, + fontSize: 10, + lineHeight: '13.9px', + color: items.length > 0 ? '#d44747' : '#d78e06', + textAlign: 'right', + cursor: 'pointer', + whiteSpace: 'nowrap', + userSelect: 'none', + }} + > + {items.length > 0 ? 'Clear all' : 'Restore'} +
+
- {/* Cart Item Cards (4154:20418 at y=69, 4154:20372 at y=202), scrollable */} -
+ {/* Cart Item Cards */} {items.length > 0 ? (
{items.map((item, idx) => { @@ -197,7 +192,7 @@ export const ShopCartPage: React.FC = () => { ) : (
{ > Looks like you removed all items from your shopping cart.
-
+
- {/* Checkout Bar above BottomNavBar (4154:20281) at y=645, height 104 */} - setIsSummaryOpen(true)} - buttonText="checkout" - buttonFontWeight={700} - iconSrc="/assets/images/icon-credit-card-white.svg" - iconLeft={49.5} - buttonTextLeft={81.5} - buttonTextWidth={69} - targetRoute="/shop-buy01" - disabled={items.length === 0} - /> + {/* Sticky Bottom Stack: Checkout Bar + Bottom Navigation Bar */} +
+ setIsSummaryOpen(true)} + buttonText="checkout" + buttonFontWeight={700} + iconSrc="/assets/images/icon-credit-card-white.svg" + targetRoute="/shop-buy01" + disabled={items.length === 0} + /> - {/* Bottom Navigation Bar (4154:20230) at y=736 */} - 0} - cartBadgeCount={items.length} - /> + 0} + cartBadgeCount={items.length} + /> +
{/* Interactive Order Summary Bottom Sheet Modal */} {isSummaryOpen && ( - <> -
setIsSummaryOpen(false)} - style={{ - position: 'absolute', - left: 0, - top: 0, - width: 375, - height: 814, - backgroundColor: 'rgba(17, 17, 17, 0.9)', - zIndex: 20, - }} - /> +
setIsSummaryOpen(false)} + style={{ + position: 'absolute', + inset: 0, + backgroundColor: 'rgba(17, 17, 17, 0.9)', + zIndex: 40, + display: 'flex', + flexDirection: 'column', + justifyContent: 'flex-end', + }} + >
e.stopPropagation()} style={{ - position: 'absolute', - left: 0, - top: 505, - width: 375, - height: 309, - borderRadius: 22, - backgroundColor: '#fafafa', - zIndex: 21, + padding: '22px var(--page-px) 24px', + display: 'flex', + flexDirection: 'column', + gap: 24, }} > + {/* Header Row */}
Orded Summery @@ -354,15 +347,15 @@ export const ShopCartPage: React.FC = () => { onClick={() => setIsSummaryOpen(false)} aria-label="Close" style={{ - position: 'absolute', - left: 318, - top: 11, - width: 11.67, - height: 11.67, + width: 24, + height: 24, background: 'transparent', border: 'none', padding: 0, cursor: 'pointer', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', }} > { }} /> +
- {/* Dynamic Breakdown Rows */} + {/* Dynamic Breakdown Rows */} +
+ + Items ({totalQuantity}) + + + ${totalPrice.toFixed(2)} + +
+ + {items.map((item) => (
{ fontSize: 14, lineHeight: '20px', color: '#747474', + overflow: 'hidden', + textOverflow: 'ellipsis', + whiteSpace: 'nowrap', + minWidth: 0, }} > - Items ({totalQuantity}) + {item.title} (×{item.qty}) { fontSize: 14, lineHeight: '20px', color: '#747474', + flexShrink: 0, }} > - ${totalPrice.toFixed(2)} + ${(item.unitPrice * item.qty).toFixed(2)}
+ ))} +
- {items.map((item, idx) => ( -
- - {item.title} (×{item.qty}) - - - ${(item.unitPrice * item.qty).toFixed(2)} - -
- ))} -
+
-
+ - -
+ Total + + - - Total - - - ${totalPrice.toFixed(2)} - -
+ ${totalPrice.toFixed(2)} +
@@ -526,10 +503,7 @@ export const ShopCartPage: React.FC = () => { type="button" onClick={() => setIsSummaryOpen(false)} style={{ - position: 'absolute', - left: 20, - top: 233, - width: 335, + width: '100%', height: 52, borderRadius: 11, backgroundColor: '#d78e06', @@ -554,7 +528,7 @@ export const ShopCartPage: React.FC = () => {
- +
)} ); diff --git a/src/pages/checkout/ShopOrderSummaryPage.tsx b/src/pages/checkout/ShopOrderSummaryPage.tsx index d0132e7..230cc9b 100644 --- a/src/pages/checkout/ShopOrderSummaryPage.tsx +++ b/src/pages/checkout/ShopOrderSummaryPage.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; -import { StatusBar } from '../../components/layout/StatusBar'; import { BottomNavBar } from '../../components/layout/BottomNavBar'; import { StickyFooterBar } from '../../components/layout/StickyFooterBar'; import { OrderSummaryBgItemCard } from '../../components/checkout/CartItemCard'; @@ -17,189 +16,175 @@ export const ShopOrderSummaryPage: React.FC = () => { return ( {/* Underlying Cart Screen Layer */} - - -
- Cart -
- 3 Products from 2 Shops -
+
+ Cart +
+
+ 3 Products from 2 Shops +
- {ORDER_SUMMARY_BG_ITEMS.map((item) => ( - - ))} +
+ {ORDER_SUMMARY_BG_ITEMS.map((item) => ( + + ))} +
+
- +
+ - + +
- {/* Dark Backdrop Overlay (4154:20689) at (0, 0), 375×814, rgba(17, 17, 17, 0.9) */} + {/* Dark Backdrop Overlay & Bottom Sheet Modal */}
navigate('/shop-cart')} style={{ position: 'absolute', - left: 0, - top: 0, - width: 375, - height: 814, + inset: 0, backgroundColor: 'rgba(17, 17, 17, 0.9)', - }} - /> - - {/* Bottom Sheet Modal (4154:20694) at (0, 505), 375×309 */} -
- {/* Header & Breakdown Container (4154:20700) at rel (14, 16), 340.57×190.54 */}
e.stopPropagation()} style={{ - position: 'absolute', - left: 14, - top: 16, - width: 340.57, - height: 190.54, + padding: '22px var(--page-px) 24px', + display: 'flex', + flexDirection: 'column', + gap: 28, }} > - {/* Title "Orded Summery" (4154:20702) at rel (0, 7.77) */} + {/* Header & Close X Button */}
- Orded Summery +
+ Orded Summery +
+ +
- {/* Close X Button (4154:20703) at rel (318, 11) */} + {/* Breakdown Rows */} + + + {/* "Got it" CTA Button */} - - {/* Breakdown Rows (4154:20721) at rel (0, 56.54) */} -
- - {/* "Got it" CTA Button (4154:20698) at rel (20, 233), 335×52 */} -
); diff --git a/src/pages/checkout/ShopPayResultPage.tsx b/src/pages/checkout/ShopPayResultPage.tsx index e6eefcd..ad79784 100644 --- a/src/pages/checkout/ShopPayResultPage.tsx +++ b/src/pages/checkout/ShopPayResultPage.tsx @@ -11,150 +11,131 @@ export const ShopPayResultPage: React.FC = () => { return ( - {/* Top Header: "Payment result" at (114, 29), no back button in node 4162:11664 */} - {/* Success Icon Group (4162:11721) at (141, 190), 93.26×93.26 */}
- Payment Successful -
+ > + Payment Successful - {/* "Payment Successful" (4162:11719) at (86, 301), 203×26 */} -
- Payment Successful -
+
+ Payment Successful +
- {/* Subtitle (4162:11720) at (16, 331), 344×43 */} -
- Thank you for your purchase. your order has been places and is now being processed -
+
+ Thank you for your purchase. your order has been places and is now being processed +
+
- {/* Receipt Summary Box (4173:9782) at (16, 474), 343×246 */} -
- {/* Inner Container (4162:11739) at rel (16, 16), 311×214 */} + {/* Receipt Summary Box */}
- {/* Total Paid Row (4162:11798) at rel (0, 0), 311×22 */} + {/* Total Paid Row */}
-
- +
+ +
+ + > + Total Paid +
+ - Total Paid - - {
- {/* Horizontal Divider (4162:11762) at rel (0, 37) */} + {/* Horizontal Divider */}
- {/* 3 Metadata Rows (4172:9764) at rel (0, 52), 311×95 */} -
+ {/* 3 Metadata Rows */} +
{/* Row 1: Order Code -> ORD-28465 */}
- - - Order Code - +
+ + + Order Code + +
+
{ {/* Row 2: Payment method -> PayPal */}
- - - Payment method - +
+ + + Payment method + +
+ { {/* Row 3: Order Date -> Mar 15,2025 | 9:41 PM */}
- - - Order Date - +
+ + + Order Date + +
+ {
- {/* "track Order" Secondary Button (4173:9774) at rel (0, 162), 313×52 */} + {/* "track Order" Secondary Button */}
-
- {/* "Continue Shoping" Primary CTA Button (4162:11764) at (16, 738), 343×52 */} - + +
); }; diff --git a/src/pages/checkout/ShopPaymentMethodsPage.tsx b/src/pages/checkout/ShopPaymentMethodsPage.tsx index d4733f1..a631d57 100644 --- a/src/pages/checkout/ShopPaymentMethodsPage.tsx +++ b/src/pages/checkout/ShopPaymentMethodsPage.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; -import { StatusBar } from '../../components/layout/StatusBar'; import { BottomNavBar } from '../../components/layout/BottomNavBar'; import { StickyFooterBar } from '../../components/layout/StickyFooterBar'; import { OrderSummaryBgItemCard } from '../../components/checkout/CartItemCard'; @@ -21,155 +20,148 @@ export const ShopPaymentMethodsPage: React.FC = () => { return ( {/* Underlying Cart Screen Layer */} - -
- Cart -
-
- 3 Products from 2 Shops -
+
+ Cart +
+
+ 3 Products from 2 Shops +
- {ORDER_SUMMARY_BG_ITEMS.map((item) => ( - - ))} +
+ {ORDER_SUMMARY_BG_ITEMS.map((item) => ( + + ))} +
+
- +
+ - + +
- {/* Dark Backdrop Overlay (4171:1586) at (0, 0), 375×814, rgba(17, 17, 17, 0.9) */} + {/* Dark Backdrop Overlay & Payment Methods Bottom Sheet Modal */}
navigate('/shop-payment')} style={{ position: 'absolute', - left: 0, - top: 0, - width: 375, - height: 814, + inset: 0, backgroundColor: 'rgba(17, 17, 17, 0.9)', - }} - /> - - {/* Payment Methods Bottom Sheet Modal (4171:1587) at (0, 445.54), 375×368.46 */} -
- {/* Header & Payment Options Container (4171:1593) at abs (14, 462) -> rel (14, 16.46) */}
e.stopPropagation()} style={{ - position: 'absolute', - left: 14, - top: 16.46, - width: 340.57, - height: 248.54, + padding: '22px var(--page-px) 24px', + display: 'flex', + flexDirection: 'column', + gap: 24, }} > - {/* Title "Payment methos" (4171:1595) at rel (0, 7.77) */} + {/* Header & Close X Button */}
- Payment methos -
+
+ Payment methos +
- {/* Close X Button (4171:1596) at rel (318, 11) */} - + > + + +
- {/* 3 Payment Method Cards (4171:1612) at rel (0, 56.54), 340.57×192 */} + {/* 3 Payment Method Cards */}
{PAYMENT_METHODS_LIST.map((method) => ( @@ -181,95 +173,86 @@ export const ShopPaymentMethodsPage: React.FC = () => { /> ))}
-
- {/* "Purchase" CTA Button (4171:1591) at abs (20, 742) -> rel (20, 296.46), 335×52 */} - + + $24.00 + +
+ +
); diff --git a/src/pages/checkout/ShopPaymentPage.tsx b/src/pages/checkout/ShopPaymentPage.tsx index 123ac08..b2581ce 100644 --- a/src/pages/checkout/ShopPaymentPage.tsx +++ b/src/pages/checkout/ShopPaymentPage.tsx @@ -12,290 +12,165 @@ import { PAYMENT_REVIEW_ITEMS } from '../../data/checkoutData'; export const ShopPaymentPage: React.FC = () => { return ( - {/* Top Header: "Review & Confirm" at (114, 29), no back button in node 4160:11203 */} - {/* Scrollable Review Sections */} + {/* Review Sections Body */}
-
- {/* Review Items Section (4171:1222) at (14, 99), 348×209 */} -
-
- - - Review items - -
+ {/* Review Items Section */} +
+
+ + + Review items + +
- {/* Review Item Cards Container (4171:1225) at rel (0, 37) */} -
- {PAYMENT_REVIEW_ITEMS.map((item) => ( - - ))} -
-
+
+ {PAYMENT_REVIEW_ITEMS.map((item) => ( + + ))} +
+ - {/* Delivery Address Section (4171:1313) at (14, 358), 348×111 */} -
-
- - - Delivery Address - -
+ {/* Delivery Address Section */} +
+
+ + + Delivery Address + +
- {/* Read-only Address Card (4171:1319) at rel (0, 37), 348×74 */} -
+ {/* Read-only Address Card */}
Ali Ghaderi
250 Park Avenue South, New York, NY 10003 United States
-
-
+ - {/* Orded Summery Section (4171:1365) at (14, 514), 348×195 */} -
-
- - +
+ + + Orded Summery + +
+ + {/* Summary Card */} +
- Orded Summery - -
- - {/* Summary Card (4171:1371) at rel (0, 37), 348×158 */} -
- -
-
-
+ +
+
- {/* Bottom Sticky Payment Bar (4160:11204) at y=724, height 90 */} + {/* Bottom Sticky Payment Bar */}
diff --git a/src/pages/home/ShopHomePage.tsx b/src/pages/home/ShopHomePage.tsx index 3b8ea83..35b083a 100644 --- a/src/pages/home/ShopHomePage.tsx +++ b/src/pages/home/ShopHomePage.tsx @@ -1,7 +1,6 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; import { MobileShell } from '../../components/layout/MobileShell'; -import { StatusBar } from '../../components/layout/StatusBar'; import { BottomNavBar } from '../../components/layout/BottomNavBar'; import { SearchBar } from '../../components/common/SearchBar'; import { CompactProductCard } from '../../components/common/CompactProductCard'; @@ -11,50 +10,58 @@ import { HOME_NEW_STORES_PRODUCTS, } from '../../data/catalogData'; +const HERO_BANNER_SLIDES = [ + { + id: 'global-marketplace', + imageSrc: '/assets/images/banner-habib-marketplace-relatable.jpg', + objectPosition: 'center 68%', + imageScale: undefined, + tag: 'Habib Shop', + title: 'Global Marketplace for the Muslim Community', + subtitle: 'Diverse stores, products, and cultures united in one shared marketplace.', + ctaLabel: 'Explore Products', + ctaRoute: '/shop-catitems', + }, + { + id: 'trusted-booths', + imageSrc: '/assets/images/banner-habib-marketplace.png', + objectPosition: 'center center', + imageScale: 'scale(1.03)', + tag: 'Habib Shop', + title: 'Authentic Crafts from Trusted Muslim Sellers', + subtitle: 'Curated books, handicrafts, modest fashion, and home essentials worldwide.', + ctaLabel: 'Browse Booths', + ctaRoute: '/shop-booth', + }, +] as const; + /** - * Node 4080:9587 — `shop-home` (375×1150) + * Node 4080:9587 — `shop-home` (375×1074) */ export const ShopHomePage: React.FC = () => { const navigate = useNavigate(); + const [activeSlide, setActiveSlide] = useState(0); + const [isPaused, setIsPaused] = useState(false); + + useEffect(() => { + if (isPaused) return; + const timer = window.setTimeout(() => { + setActiveSlide((prev) => (prev + 1) % HERO_BANNER_SLIDES.length); + }, 3800); + return () => window.clearTimeout(timer); + }, [activeSlide, isPaused]); return ( - - {/* Top background pattern & golden blur glow (4080:9589 & 4080:9627) */} - - - {/* Ellipse 428 (4080:9590) */} + + {/* Decorative Top Glow & Islamic Pattern */}
{ pointerEvents: 'none', }} /> - {/* Ellipse 431 (4080:9591) */}
{ pointerEvents: 'none', }} /> - {/* Ellipse 434 (4080:9592) */}
{ pointerEvents: 'none', }} /> - - {/* iPhone Status Bar (4080:9602) */} - - - {/* Back Button (4080:9596) at (16, 37) */} - - - {/* "Shop" Display Title (4080:9595) at (133, 49) */} -
- Shop -
- - {/* Right Notification Bell Button (4128:15184) at (320, 37) */} - - - {/* Search Bar & Filter Button (4128:15096) at (16, 108) */} - navigate('/shop-category')} /> - {/* Hero Green Marketplace Card (4086:10812) at (16, 178) */} + {/* Fluid Main Body */}
- - - {/* "Habib Shop" (4086:10826) at rel (17, 17) */} -
- Habib Shop -
- - {/* "Global Marketplace for the Muslim Community" (4086:10829) at rel (17, 33) */} -
- Global Marketplace for the Muslim Community -
- - {/* Subtitle (4087:12834) at rel (17, 77) */} -
- Diverse stores, products, and cultures united in one shared marketplace. -
- - {/* "Explore Products" CTA button (4086:10827) at rel (17, 117) */} - - - {/* Carousel indicator dots at rel (159, 139.43) & (171, 139.43) */} -
-
-
- - {/* 5 Quick Category Circular Pills (4128:15118) at (16, 362) */} -
- {HOME_QUICK_CATEGORIES.map((cat) => ( -
navigate(cat.targetRoute)} - style={{ - position: 'absolute', - left: cat.relX, - top: 0, - width: 68.12, - height: 59.57, + width: 40, + height: 40, + borderRadius: 15, + backgroundColor: '#ffffff', + border: 'none', + padding: 0, cursor: 'pointer', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + flexShrink: 0, }} > -
- {cat.label} -
-
- {cat.label} -
-
- ))} -
+ /> + - {/* Populars Section (4088:12838) at (16, 441.57) */} -
- {/* Header row (4165:13530) at rel (3, 0) */} -
- Populars + Shop
-
navigate('/shop-catitems')} + +
-
+ + + + {/* Search Bar & Filter Button */} + navigate('/shop-category')} + /> - {/* 3 Popular product cards (horizontally scrollable) */} + {/* Hero Green Marketplace Card */}
setIsPaused(true)} + onMouseLeave={() => setIsPaused(false)} + onFocusCapture={() => setIsPaused(true)} + onBlurCapture={() => setIsPaused(false)} style={{ - position: 'absolute', - left: -16, - top: 28, - width: 375, - height: 230, - overflowX: 'auto', - overflowY: 'hidden', + position: 'relative', + width: '100%', + borderRadius: 15, + overflow: 'hidden', + backgroundColor: '#182c1f', }} > + {/* Horizontal sliding track */}
- {HOME_POPULAR_PRODUCTS.map((product) => ( - + {HERO_BANNER_SLIDES.map((slide) => ( +
+ + +
+
+
+ {slide.tag} +
+ +
+ {slide.title} +
+ +
+ {slide.subtitle} +
+
+ + +
+
))}
-
-
- {/* New Stores Section (4089:13018) at (16, 718.87) */} -
- {/* Header row (4165:13539) at rel (1, 0) */} -
+ {/* Carousel indicator dots */}
- New Stores + {HERO_BANNER_SLIDES.map((slide, idx) => { + const isActive = activeSlide === idx; + return ( +
+
+ + {/* 5 Quick Category Circular Pills */} +
+ {HOME_QUICK_CATEGORIES.map((cat) => ( +
navigate(cat.targetRoute)} + style={{ + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + gap: 4, + cursor: 'pointer', + minWidth: 0, + }} + > +
+ {cat.label} +
+
+ {cat.label} +
+
+ ))} +
+ + {/* Populars Section */} +
navigate('/shop-booth')} style={{ - position: 'absolute', - left: 277, - top: 0, - width: 64, - height: 18, - cursor: 'pointer', + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + padding: '0 2px', }} > - - See more - - +
navigate('/shop-catitems')} style={{ - position: 'absolute', - left: 49.5, - top: 2.5, - width: 13, - height: 13, + display: 'inline-flex', + alignItems: 'center', + gap: 4, + cursor: 'pointer', }} - /> + > + + See more + + +
-
- {/* 3 New Stores product cards (horizontally scrollable) */} -
+
+
+ {HOME_POPULAR_PRODUCTS.map((product) => ( + + ))} +
+
+ + + {/* New Stores Section */} +
- {HOME_NEW_STORES_PRODUCTS.map((product) => ( - - ))} +
+ New Stores +
+
navigate('/shop-booth')} + style={{ + display: 'inline-flex', + alignItems: 'center', + gap: 4, + cursor: 'pointer', + }} + > + + See more + + +
-
+ +
+
+ {HOME_NEW_STORES_PRODUCTS.map((product) => ( + + ))} +
+
+
- {/* Bottom Navigation Bar (4090:14079) at y=1072 */} - + {/* Bottom Navigation Bar */} + ); }; diff --git a/src/pages/orders/ShopOrderDetailPage.tsx b/src/pages/orders/ShopOrderDetailPage.tsx index 387987e..a9fcd55 100644 --- a/src/pages/orders/ShopOrderDetailPage.tsx +++ b/src/pages/orders/ShopOrderDetailPage.tsx @@ -13,229 +13,213 @@ export const ShopOrderDetailPage: React.FC = () => { return ( - {/* Top Header: Back button at (16, 21) + "Order Details" at (114, 29) */} + {/* Top Header: Back button + "Order Details" */} - {/* Top Order Summary Card (4175:11005) at (17, 87), 342×106, radius 20, fill #ebe8e5 */}
- {/* Row 1: Order code, dot, price, and date (318×26 at rel 12, 12) */} + {/* Top Order Summary Card (4175:11005) */}
+ {/* Row 1: Order code, dot, price, and date */}
- ORD-28465 -
+
+ + ORD-28465 + -
+ -
- $24.00 -
+ + $24.00 + +
- {/* Date on right (rel 218, 4, size 100×18) */} -
- - - Mar 15,2025 - + + + Mar 15,2025 + +
-
- {/* Grey Status Bar (318×41 at rel 12, 53, radius 12, fill #f3f3f3) */} -
+ {/* Grey Status Bar */}
- - - 3 item - +
+ + + 3 item + +
- {/* Vertical divider */} -
+ {/* Vertical divider */} +
- - - 1 shop - +
+ + + 1 shop + +
+
{/* Right delivery count */}
{ display: 'flex', alignItems: 'center', justifyContent: 'center', + flexShrink: 0, }} > {
{
-
- {/* 3 Shipment Cards (Packed at y=213, Delivered at y=454, Shiping at y=695) */} - {ORDER_DETAIL_SHIPMENTS.map((shipment) => ( - - ))} + {/* 3 Shipment Cards (Packed, Delivered, Shiping) */} +
+ {ORDER_DETAIL_SHIPMENTS.map((shipment) => ( + + ))} +
- {/* Bottom CTA Button "Order support" (4175:10432) at (16, 989), 343×52 */} - + +
); }; diff --git a/src/pages/orders/ShopOrdersPage.tsx b/src/pages/orders/ShopOrdersPage.tsx index 8882111..38acb63 100644 --- a/src/pages/orders/ShopOrdersPage.tsx +++ b/src/pages/orders/ShopOrdersPage.tsx @@ -18,37 +18,27 @@ export const ShopOrdersPage: React.FC = () => { return ( - {/* Top Header: Back button at (16, 21) + "Orders" at (114, 29) */} + {/* Top Header: Back button + "Orders" */} - {/* Segmented Filter Tabs (4175:9880 + 4175:9892) */} - setActiveTabId(id)} - /> - - {/* Order Cards (4175:10954 at y=154 & 4175:10644 at y=407), scrollable */}
-
+ {/* Segmented Filter Tabs (4175:9880 + 4175:9892) */} + setActiveTabId(id)} + /> + + {/* Order Cards (4175:10954 & 4175:10644) */} +
{ORDERS_LIST_CARDS.map((order) => ( ))} diff --git a/src/pages/orders/ShopSupportPage.tsx b/src/pages/orders/ShopSupportPage.tsx index 79b3088..d17f79d 100644 --- a/src/pages/orders/ShopSupportPage.tsx +++ b/src/pages/orders/ShopSupportPage.tsx @@ -10,86 +10,83 @@ import { SUPPORT_SUBJECT_OPTIONS } from '../../data/ordersData'; export const ShopSupportPage: React.FC = () => { const navigate = useNavigate(); const [selectedSubjectId, setSelectedSubjectId] = useState('subj-counterfeit'); + const [description, setDescription] = useState(''); return ( - {/* Top Header: Back button at (16, 21) + "Support" at (114, 29) */} + {/* Top Header: Back button + "Support" */} - {/* Main White Support Card (4177:11307) at (17, 90), 342×759 */}
- {/* Product Box (4177:11308) at rel (12, 12), 318×81, radius 15, fill #ebe8e5 */} + {/* Main White Support Card (4177:11307) */}
+ {/* Product Box (4177:11308) */}
Islam in the Bible Book
Islam in the Bible Book @@ -97,54 +94,41 @@ export const ShopSupportPage: React.FC = () => {
$24.00 - {/* Quantity Badge (35×34 at rel 192.7, 0) */} + {/* Quantity Badge (35×34) */}
{
-
- {/* Amber Notice Box (4178:11668) at rel (12, 113), 318×85, radius 12 */} -
- {/* Header Row (120×24 at rel 99, 9.5) */} + {/* Amber Notice Box (4178:11668) */}
- - + + + Order support + +
+ + {/* Body Text */} +
- Order support - -
- - {/* Body Text at rel (12, 35.5), 294×36 */} -
- We’ve received your support request and will follow up on it. Rest assured, our team will take care of it. + We’ve received your support request and will follow up on it. Rest assured, our team will take care of it. +
-
- {/* Request Subject Section (4178:11682) at rel (12, 218), 318×173 */} -
+ {/* Request Subject Section (4178:11682) */}
- Request Subject* -
+
+ Request Subject* +
- {/* 6 Subject Tiles Grid (318×136 at rel 0, 37) */} -
- {SUPPORT_SUBJECT_OPTIONS.map((option) => { - const isSelected = option.id === selectedSubjectId; - const topY = option.row === 0 ? 0 : 73; + {/* 6 Subject Tiles Grid */} +
+ {SUPPORT_SUBJECT_OPTIONS.map((option) => { + const isSelected = option.id === selectedSubjectId; - return ( -
setSelectedSubjectId(option.id)} - style={{ - position: 'absolute', - left: option.relX, - top: topY, - width: 98, - height: 63, - borderRadius: 15, - background: isSelected - ? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)' - : '#ffffff', - border: `1px solid ${isSelected ? '#d78e06' : '#bcbcbc'}`, - boxSizing: 'border-box', - cursor: 'pointer', - }} - > - {option.label} setSelectedSubjectId(option.id)} style={{ - position: 'absolute', - left: option.iconLeft, - top: 9, - width: 28, - height: 28, - }} - /> - - {option.label} - -
- ); - })} + {option.label} + + {option.label} + + + ); + })} +
-
- {/* Description* Section (4178:11675) at rel (12, 411), 318×179 */} -
+ {/* Description* Section (4178:11675) */}
- Description* -
+ -
- setDescription(e.target.value)} + placeholder="Write here..." style={{ - position: 'absolute', - left: 10, - top: 10, - width: 68, - height: 20, + width: '100%', + height: 148, + padding: '10px 12px', + borderRadius: 15, + border: '1px solid #bcbcbc', + boxSizing: 'border-box', + resize: 'vertical', fontFamily: 'var(--font-sans)', fontWeight: 400, fontSize: 12, lineHeight: '18px', - color: '#bcbcbc', - display: 'flex', - alignItems: 'center', + color: '#111111', + backgroundColor: 'transparent', }} - > - Write here... - -
-
- - {/* Add Evidence or Image(Optional) Section (4178:11683) at rel (12, 610), 318×137 */} -
-
- Add Evidence or Image(Optional) + />
+ {/* Add Evidence or Image(Optional) Section (4178:11683) */}
-
- + Upload Image + Add Evidence or Image(Optional)
+
- mp4, mpeg, h24 + +
+ + Upload Image +
+
+ mp4, mpeg, h24 +
-
- {/* Bottom CTA Button "Submit Order" (4177:11292) at (16, 989), 343×52 */} - + +
); }; diff --git a/src/pages/test/PixelVerificationModal.tsx b/src/pages/test/PixelVerificationModal.tsx index e2d1ae5..60faffb 100644 --- a/src/pages/test/PixelVerificationModal.tsx +++ b/src/pages/test/PixelVerificationModal.tsx @@ -62,14 +62,16 @@ export const PixelVerificationModal: React.FC = ({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', - padding: '12px 24px', + padding: '10px var(--page-px, 16px)', backgroundColor: '#111916', borderBottom: '1px solid rgba(255, 255, 255, 0.12)', flexWrap: 'wrap', - gap: 12, + gap: 10, + maxHeight: '42vh', + overflowY: 'auto', }} > -
+
= ({ fontWeight: 600, padding: '4px 10px', borderRadius: 6, + flexShrink: 0, }} > Node {entry.figmaNodeId} -
-
+
+
{entry.title}{' '} - + ({entry.figmaName} — {entry.width}×{entry.height}px)
- ); diff --git a/src/pages/test/TestDirectoryPage.tsx b/src/pages/test/TestDirectoryPage.tsx index 262dcc5..af1b4e4 100644 --- a/src/pages/test/TestDirectoryPage.tsx +++ b/src/pages/test/TestDirectoryPage.tsx @@ -65,7 +65,7 @@ export const TestDirectoryPage: React.FC = () => { style={{ background: 'linear-gradient(135deg, #004d36 0%, #00714f 55%, #0a2e22 100%)', borderBottom: '1px solid rgba(255,255,255,0.12)', - padding: '32px 24px', + padding: '28px var(--page-px, 16px)', }} >
@@ -78,7 +78,7 @@ export const TestDirectoryPage: React.FC = () => { gap: 16, }} > -
+
{ fontWeight: 600, color: '#a7f3d0', marginBottom: 10, + maxWidth: '100%', }} > - Habib Shop — Figma Design Extraction QA & Test Hub + + Habib Shop — Figma Design Extraction QA & Test Hub +

Implemented Pages, Scenarios & Pixel Verification (`/test`) @@ -160,7 +164,7 @@ export const TestDirectoryPage: React.FC = () => {
{ style={{ maxWidth: 1280, margin: '24px auto 0', - padding: '0 24px', + padding: '0 var(--page-px, 16px)', }} >
{ flexWrap: 'wrap', gap: 14, backgroundColor: '#15201b', - padding: 16, + padding: 14, borderRadius: 12, border: '1px solid rgba(255,255,255,0.08)', }} @@ -252,7 +256,10 @@ export const TestDirectoryPage: React.FC = () => { value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} style={{ - minWidth: 280, + flex: '1 1 220px', + minWidth: 0, + width: '100%', + maxWidth: 360, padding: '8px 14px', borderRadius: 8, border: '1px solid rgba(255,255,255,0.15)', @@ -268,7 +275,7 @@ export const TestDirectoryPage: React.FC = () => {
{ display: 'flex', flexDirection: 'column', justifyContent: 'space-between', + minWidth: 0, }} >
{/* Top Card Header */}
-
+
{ {/* Main Body with Reference Thumbnail & Details */}
{/* Reference Thumbnail Preview */} @@ -359,8 +369,8 @@ export const TestDirectoryPage: React.FC = () => { onClick={() => setInspectingEntry(entry)} title="Click to open Pixel Comparison Modal" style={{ - width: 96, - height: 148, + width: 88, + height: 140, flexShrink: 0, backgroundColor: '#0b110e', borderRadius: 8, @@ -398,7 +408,7 @@ export const TestDirectoryPage: React.FC = () => {
{/* Text Details */} -
+

{ fontWeight: 700, color: '#ffffff', lineHeight: '22px', + wordBreak: 'break-word', }} > {entry.title} @@ -415,6 +426,7 @@ export const TestDirectoryPage: React.FC = () => { fontSize: 12, color: '#9ca3af', marginTop: 2, + wordBreak: 'break-word', }} > Figma Name: {entry.figmaName} @@ -425,6 +437,7 @@ export const TestDirectoryPage: React.FC = () => { color: '#38ae8a', marginTop: 4, fontFamily: 'monospace', + wordBreak: 'break-all', }} > {entry.route} @@ -438,6 +451,7 @@ export const TestDirectoryPage: React.FC = () => { fontSize: 12, color: '#d1d5db', lineHeight: '17px', + wordBreak: 'break-word', }} > {entry.description} @@ -446,7 +460,7 @@ export const TestDirectoryPage: React.FC = () => {

{/* Scenarios List */} -
+
{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', + flexWrap: 'wrap', + gap: 6, padding: '6px 10px', borderRadius: 6, backgroundColor: '#1c2a24', @@ -477,8 +493,15 @@ export const TestDirectoryPage: React.FC = () => { fontSize: 12, }} > - {sc.label} - + {sc.label} + {sc.route} → @@ -490,17 +513,18 @@ export const TestDirectoryPage: React.FC = () => { {/* Card Footer Actions */}
{ type="button" onClick={() => setInspectingEntry(entry)} style={{ - flex: 1, + flex: '1 1 130px', padding: '8px 12px', borderRadius: 8, backgroundColor: '#1f2f28',