Browse Source

feat: add core layout, account, catalog, and checkout components and pages

main
sina_sajjadi 3 weeks ago
parent
commit
1d7b340b2a
  1. BIN
      public/assets/images/banner-habib-marketplace-relatable.jpg
  2. 69
      src/components/account/AccountMenuRow.tsx
  3. 57
      src/components/account/HabibCoinsBanner.tsx
  4. 77
      src/components/account/OrderCounterCard.tsx
  5. 79
      src/components/account/ProviderBadgeCard.tsx
  6. 143
      src/components/checkout/AddressCard.tsx
  7. 207
      src/components/checkout/CartItemCard.tsx
  8. 95
      src/components/checkout/OrderSummaryRows.tsx
  9. 62
      src/components/checkout/PaymentMethodCard.tsx
  10. 75
      src/components/checkout/ReviewItemCard.tsx
  11. 47
      src/components/common/CategoryCard.tsx
  12. 145
      src/components/common/CompactProductCard.tsx
  13. 154
      src/components/common/GridProductCard.tsx
  14. 74
      src/components/common/SearchBar.tsx
  15. 518
      src/components/layout/BottomNavBar.tsx
  16. 40
      src/components/layout/MobileShell.tsx
  17. 53
      src/components/layout/StatusBar.tsx
  18. 205
      src/components/layout/StickyFooterBar.tsx
  19. 61
      src/components/layout/TopHeader.tsx
  20. 64
      src/components/orders/OrderFilterTabs.tsx
  21. 226
      src/components/orders/OrderListCard.tsx
  22. 202
      src/components/orders/ShipmentStatusCard.tsx
  23. 4
      src/data/routesRegistry.ts
  24. 628
      src/index.css
  25. 850
      src/pages/account/LanguageSettingPage.tsx
  26. 477
      src/pages/account/ProviderRequestPage.tsx
  27. 170
      src/pages/account/ShopAccountPage.tsx
  28. 26
      src/pages/account/ShopAddressPage.tsx
  29. 443
      src/pages/catalog/ShopBoothPage.tsx
  30. 30
      src/pages/catalog/ShopCatItemsPage.tsx
  31. 31
      src/pages/catalog/ShopCategoryPage.tsx
  32. 582
      src/pages/catalog/ShopSinglePage.tsx
  33. 548
      src/pages/chat/ShopChatPage.tsx
  34. 203
      src/pages/checkout/ShopBuy01Page.tsx
  35. 186
      src/pages/checkout/ShopCartPage.tsx
  36. 119
      src/pages/checkout/ShopOrderSummaryPage.tsx
  37. 261
      src/pages/checkout/ShopPayResultPage.tsx
  38. 157
      src/pages/checkout/ShopPaymentMethodsPage.tsx
  39. 195
      src/pages/checkout/ShopPaymentPage.tsx
  40. 518
      src/pages/home/ShopHomePage.tsx
  41. 194
      src/pages/orders/ShopOrderDetailPage.tsx
  42. 34
      src/pages/orders/ShopOrdersPage.tsx
  43. 334
      src/pages/orders/ShopSupportPage.tsx
  44. 31
      src/pages/test/PixelVerificationModal.tsx
  45. 68
      src/pages/test/TestDirectoryPage.tsx

BIN
public/assets/images/banner-habib-marketplace-relatable.jpg

After

Width: 1376  |  Height: 768  |  Size: 634 KiB

69
src/components/account/AccountMenuRow.tsx

@ -12,8 +12,6 @@ interface AccountMenuRowProps {
*/ */
export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => { export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
const navigate = useNavigate(); const navigate = useNavigate();
const isAddressesRow = row.id === 'acc-addresses';
const isFaqRow = row.id === 'acc-faq' || row.id === 'info-faqs';
return ( return (
<div <div
@ -23,47 +21,48 @@ export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
} }
}} }}
style={{ 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', cursor: row.targetRoute ? 'pointer' : 'default',
minWidth: 0,
}} }}
> >
{/* Left 34×34 icon container (radius 11) */} {/* Left 34×34 icon container (radius 11) */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
position: 'relative',
width: 34, width: 34,
height: 34, height: 34,
borderRadius: 11, borderRadius: 11,
backgroundColor: row.iconBoxBg, backgroundColor: row.iconBoxBg,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
/>
>
<img <img
src={row.iconSrc} src={row.iconSrc}
alt="" alt=""
style={{ style={{
position: 'absolute',
left: row.iconLeft,
top: row.iconTop,
width: row.iconWidth, width: row.iconWidth,
height: row.iconHeight, height: row.iconHeight,
}} }}
/> />
{/* Notification badge (if present, e.g. "2" red pill at x=52, y=381 -> rel 23, -8) */}
{/* Notification badge */}
{row.badgeCount && ( {row.badgeCount && (
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 23,
right: -6,
top: -8, top: -8,
width: 17,
minWidth: 17,
height: 18, height: 18,
padding: '0 4px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#d44747', backgroundColor: '#d44747',
display: 'flex', display: 'flex',
@ -84,28 +83,29 @@ export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
</span> </span>
</div> </div>
)} )}
</div>
{/* Title & optional subtitle */} {/* Title & optional subtitle */}
<div <div
style={{ style={{
position: 'absolute',
left: isAddressesRow ? 43 : 42,
top: row.subtitle ? 3 : isFaqRow ? 12 : 10,
width: 244,
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
gap: 2,
}} }}
> >
<div <div
style={{ style={{
width: row.titleWidth,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: row.titleColor, color: row.titleColor,
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{row.title} {row.title}
@ -113,17 +113,14 @@ export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
{row.subtitle && ( {row.subtitle && (
<div <div
style={{ style={{
marginTop: 3,
width: row.subtitleWidth,
height: 11,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#73889d', color: '#73889d',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{row.subtitle} {row.subtitle}
@ -137,11 +134,9 @@ export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
src="/assets/images/icon-menu-chevron-right-bold.svg" src="/assets/images/icon-menu-chevron-right-bold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: row.rightIconLeft ?? 299,
top: row.rightIconTop ?? 8,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
)} )}
@ -150,11 +145,9 @@ export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
src="/assets/images/icon-menu-arrow-right.svg" src="/assets/images/icon-menu-arrow-right.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: row.rightIconLeft ?? 311,
top: row.rightIconTop ?? 12,
width: 5, width: 5,
height: 10, height: 10,
flexShrink: 0,
}} }}
/> />
)} )}
@ -163,11 +156,9 @@ export const AccountMenuRow: React.FC<AccountMenuRowProps> = ({ row }) => {
src="/assets/images/icon-menu-contact-phone.svg" src="/assets/images/icon-menu-contact-phone.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: row.rightIconLeft ?? 303,
top: row.rightIconTop ?? 10.75,
width: 12.25, width: 12.25,
height: 12.25, height: 12.25,
flexShrink: 0,
}} }}
/> />
)} )}

57
src/components/account/HabibCoinsBanner.tsx

@ -8,95 +8,82 @@ export const HabibCoinsBanner: React.FC = () => {
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 692,
width: 343,
height: 55,
width: '100%',
minHeight: 55,
padding: '10px 12px',
borderRadius: 16.5, borderRadius: 16.5,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(71, 85, 105, 0.1)', boxShadow: '0px 2px 13px rgba(71, 85, 105, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 11,
}} }}
> >
{/* Coin 3D icon (34×34 at rel 12, 11) */}
<div style={{ display: 'flex', alignItems: 'center', gap: 11, minWidth: 0 }}>
{/* Coin 3D icon */}
<img <img
src="/assets/images/icon-habib-coin-gold.svg" src="/assets/images/icon-habib-coin-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 12,
top: 11,
width: 34, width: 34,
height: 34, height: 34,
flexShrink: 0,
}} }}
/> />
{/* "Your Inventory" at rel (57, 13) */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 3, minWidth: 0 }}>
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 13,
width: 86,
height: 10,
fontFamily: "var(--font-sans)",
fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#73889d', color: '#73889d',
display: 'flex',
alignItems: 'center',
}} }}
> >
Your Inventory Your Inventory
</div> </div>
{/* "21 Habib Coins" at rel (57, 30) */}
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 30,
width: 128,
height: 11,
fontFamily: "var(--font-sans)",
fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
}} }}
> >
21 Habib Coins 21 Habib Coins
</div> </div>
</div>
</div>
{/* "Buy Coins" button (96×32 at rel 235, 12, radius 12, fill #292a2e) */}
{/* "Buy Coins" button */}
<button <button
type="button" type="button"
style={{ style={{
position: 'absolute',
left: 235,
top: 12,
width: 96,
minWidth: 96,
height: 32, height: 32,
padding: '0 14px',
borderRadius: 12, borderRadius: 12,
backgroundColor: '#292a2e', backgroundColor: '#292a2e',
border: 'none', border: 'none',
padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
display: 'inline-flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
style={{ style={{
fontFamily: "var(--font-inter)",
fontFamily: 'var(--font-inter)',
fontWeight: 500, fontWeight: 500,
fontSize: 12, fontSize: 12,
lineHeight: '20px', lineHeight: '20px',
color: '#fbfbfc', color: '#fbfbfc',
whiteSpace: 'nowrap',
}} }}
> >
Buy Coins Buy Coins

77
src/components/account/OrderCounterCard.tsx

@ -18,101 +18,82 @@ export const OrderCounterCard: React.FC<OrderCounterCardProps> = ({ counter }) =
<div <div
onClick={() => navigate('/shop-orders')} onClick={() => navigate('/shop-orders')}
style={{ style={{
position: 'absolute',
left: counter.relX,
top: 0,
width: 106,
height: 46,
width: '100%',
minHeight: 46,
padding: '6px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)', boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
gap: 5,
minWidth: 0,
}} }}
> >
{/* Inner row (94×34 at rel 6, 6) */}
<div
style={{
position: 'absolute',
left: 6,
top: 6,
width: 94,
height: 34,
}}
>
{/* Icon box (34×34 at rel 0, 0, radius 11) */}
{/* Icon box */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 34,
height: 34,
width: 'clamp(28px, 9.1vw, 34px)',
height: 'clamp(28px, 9.1vw, 34px)',
borderRadius: 11, borderRadius: 11,
backgroundColor: counter.bgColor, backgroundColor: counter.bgColor,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src={counter.iconSrc} src={counter.iconSrc}
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 5,
top: 5,
width: 24,
height: 24,
width: 'clamp(20px, 6.4vw, 24px)',
height: 'clamp(20px, 6.4vw, 24px)',
}} }}
/> />
</div> </div>
{/* Labels (55×32 at rel 39, 1) */}
{/* Labels */}
<div <div
style={{ style={{
position: 'absolute',
left: 39,
top: 1,
width: 55,
height: 32,
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
gap: 1,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: counter.labelWidth,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10,
fontSize: 'clamp(9px, 2.7vw, 10px)',
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#747474', color: '#747474',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{counter.label} {counter.label}
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 15,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12,
fontSize: 'clamp(10.5px, 3.2vw, 12px)',
lineHeight: '17px', lineHeight: '17px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{counter.countText} {counter.countText}
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}; };

79
src/components/account/ProviderBadgeCard.tsx

@ -13,57 +13,48 @@ export const ProviderBadgeCard: React.FC<ProviderBadgeCardProps> = ({ badge }) =
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: badge.x,
top: badge.y,
width: badge.width,
height: 55,
width: '100%',
minHeight: 55,
padding: '8px 12px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ebebeb', backgroundColor: '#ebebeb',
display: 'flex',
alignItems: 'center',
gap: 10,
minWidth: 0,
}} }}
> >
{/* Inner row at rel (badge.innerLeft, 7), height 38 */}
<div
style={{
position: 'absolute',
left: badge.innerLeft,
top: 7,
width: badge.innerWidth,
height: 38,
}}
>
{/* Icon box (34×34 at rel 0, 4, radius 11, gradientBg) */}
{/* Icon box + status badge */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 4,
position: 'relative',
width: 34, width: 34,
height: 34, height: 34,
borderRadius: 11, borderRadius: 11,
background: badge.gradientBg, background: badge.gradientBg,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
/>
>
<img <img
src={badge.iconSrc} src={badge.iconSrc}
alt="" alt=""
style={{ style={{
position: 'absolute',
left: badge.iconLeft,
top: badge.iconTop,
width: badge.iconWidth, width: badge.iconWidth,
height: badge.iconHeight, height: badge.iconHeight,
}} }}
/> />
{/* Small status badge at top-right of icon (rel 20, 0, size 17×17) */}
{/* Small status badge at top-right of icon */}
{badge.title === 'Hussainiyah' ? ( {badge.title === 'Hussainiyah' ? (
<svg <svg
width="17" width="17"
height="17" height="17"
viewBox="0 0 17 17" viewBox="0 0 17 17"
fill="none" fill="none"
style={{ position: 'absolute', left: 20, top: 0 }}
style={{ position: 'absolute', right: -4, top: -4 }}
> >
<circle cx="8.5" cy="8.5" r="7.5" fill="#ee4848" stroke="#ebebeb" strokeWidth="2" /> <circle cx="8.5" cy="8.5" r="7.5" fill="#ee4848" stroke="#ebebeb" strokeWidth="2" />
<path <path
@ -79,7 +70,7 @@ export const ProviderBadgeCard: React.FC<ProviderBadgeCardProps> = ({ badge }) =
height="17" height="17"
viewBox="0 0 17 17" viewBox="0 0 17 17"
fill="none" fill="none"
style={{ position: 'absolute', left: 20, top: 0 }}
style={{ position: 'absolute', right: -4, top: -4 }}
> >
<circle cx="8.5" cy="8.5" r="7.5" fill="#1b9f24" stroke="#ebebeb" strokeWidth="2" /> <circle cx="8.5" cy="8.5" r="7.5" fill="#1b9f24" stroke="#ebebeb" strokeWidth="2" />
<path <path
@ -96,64 +87,54 @@ export const ProviderBadgeCard: React.FC<ProviderBadgeCardProps> = ({ badge }) =
alt="" alt=""
style={{ style={{
position: 'absolute', position: 'absolute',
left: 20,
top: 0,
right: -4,
top: -4,
width: 17, width: 17,
height: 17, height: 17,
}} }}
/> />
)} )}
</div>
{/* Labels at rel (42, 6.5) */}
{/* Labels */}
<div <div
style={{ style={{
position: 'absolute',
left: 42,
top: 6.5,
width: badge.statusWidth,
height: 25,
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: 2,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: badge.statusWidth,
height: 10,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#73889d', color: '#73889d',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{badge.statusText} {badge.statusText}
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 15,
width: badge.titleWidth,
height: 10,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{badge.title} {badge.title}
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}; };

143
src/components/checkout/AddressCard.tsx

@ -15,47 +15,37 @@ export const AddressCard: React.FC<AddressCardProps> = ({ item, variant, onSelec
<div <div
onClick={onSelect} onClick={onSelect}
style={{ style={{
position: 'absolute',
left: 0,
top: `${item.relY}px`,
width: '348px',
height: '87px',
width: '100%',
minHeight: '87px',
padding: '12px',
borderRadius: '15px', borderRadius: '15px',
background: item.selected background: item.selected
? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)' ? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)'
: '#ffffff', : '#ffffff',
border: item.selected ? '1px solid #d78e06' : undefined, border: item.selected ? '1px solid #d78e06' : undefined,
cursor: onSelect ? 'pointer' : 'default', cursor: onSelect ? 'pointer' : 'default',
}}
>
<div
style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '324px',
height: '63px',
display: 'flex',
alignItems: 'flex-start',
gap: '14px',
}} }}
> >
{/* Radio Indicator 20x20 */} {/* Radio Indicator 20x20 */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '20px', width: '20px',
height: '20px', height: '20px',
borderRadius: '10px', borderRadius: '10px',
backgroundColor: item.selected ? '#d78e06' : 'transparent', backgroundColor: item.selected ? '#d78e06' : 'transparent',
border: item.selected ? undefined : '1px solid #dbdbdb', border: item.selected ? undefined : '1px solid #dbdbdb',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
{item.selected && ( {item.selected && (
<div <div
style={{ style={{
position: 'absolute',
left: '6px',
top: '6px',
width: '8px', width: '8px',
height: '8px', height: '8px',
borderRadius: '50%', borderRadius: '50%',
@ -65,35 +55,28 @@ export const AddressCard: React.FC<AddressCardProps> = ({ item, variant, onSelec
)} )}
</div> </div>
{/* Right Content 290x63 at rel=(34, 0) */}
{/* Right Content */}
<div <div
style={{ style={{
position: 'absolute',
left: '34px',
top: 0,
width: '290px',
height: '63px',
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: '8px',
}} }}
> >
{/* Top Row */} {/* Top Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '290px',
height: variant === 'manage' ? '24px' : '20px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '8px',
minHeight: variant === 'manage' ? '24px' : '20px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: variant === 'manage' ? '2px' : 0,
width: `${item.nameWidth}px`,
height: '20px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '12px', fontSize: '12px',
@ -111,11 +94,6 @@ export const AddressCard: React.FC<AddressCardProps> = ({ item, variant, onSelec
navigate('/shop-adreess'); navigate('/shop-adreess');
}} }}
style={{ style={{
position: 'absolute',
left: '232px',
top: '3.5px',
width: '58px',
height: '13px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '8.5px', fontSize: '8.5px',
@ -123,6 +101,7 @@ export const AddressCard: React.FC<AddressCardProps> = ({ item, variant, onSelec
color: '#d78e06', color: '#d78e06',
textAlign: 'center', textAlign: 'center',
cursor: 'pointer', cursor: 'pointer',
flexShrink: 0,
}} }}
> >
Change Adress Change Adress
@ -132,11 +111,9 @@ export const AddressCard: React.FC<AddressCardProps> = ({ item, variant, onSelec
src="/assets/images/icon-address-delete-edit-pair.svg" src="/assets/images/icon-address-delete-edit-pair.svg"
alt="Delete or Edit" alt="Delete or Edit"
style={{ style={{
position: 'absolute',
left: '205.34px',
top: 0,
width: '84.66px', width: '84.66px',
height: '24px', height: '24px',
flexShrink: 0,
}} }}
/> />
)} )}
@ -145,76 +122,59 @@ export const AddressCard: React.FC<AddressCardProps> = ({ item, variant, onSelec
{/* Address Text */} {/* Address Text */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: variant === 'manage' ? '32px' : '28px',
width: '290px',
height: '36px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '12px', fontSize: '12px',
lineHeight: '18px', lineHeight: '18px',
color: 'var(--color-text-charcoal)', color: 'var(--color-text-charcoal)',
wordBreak: 'break-word',
}} }}
> >
{item.address} {item.address}
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}; };
interface AddNewAddressCardProps { interface AddNewAddressCardProps {
left: number;
top: number;
left?: number;
top?: number;
onClick?: () => void; onClick?: () => void;
} }
export const AddNewAddressCard: React.FC<AddNewAddressCardProps> = ({ left, top, onClick }) => {
export const AddNewAddressCard: React.FC<AddNewAddressCardProps> = ({ onClick }) => {
return ( return (
<div <div
onClick={onClick} onClick={onClick}
style={{ style={{
position: 'absolute',
left: `${left}px`,
top: `${top}px`,
width: '348px',
height: '53px',
width: '100%',
minHeight: '53px',
padding: '12px',
borderRadius: '15px', borderRadius: '15px',
border: '1px solid #d7dbe2', border: '1px solid #d7dbe2',
cursor: onClick ? 'pointer' : 'default', cursor: onClick ? 'pointer' : 'default',
display: 'flex',
alignItems: 'center',
gap: '14px',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '324px',
height: '29px',
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: '0.5px',
width: '28px', width: '28px',
height: '28px', height: '28px',
borderRadius: '20px', borderRadius: '20px',
backgroundColor: '#dbdbdb', backgroundColor: '#dbdbdb',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-plus-gold-16.svg" src="/assets/images/icon-plus-gold-16.svg"
alt="+" alt="+"
style={{ style={{
position: 'absolute',
left: '6px',
top: '6px',
width: '16px', width: '16px',
height: '16px', height: '16px',
}} }}
@ -223,22 +183,15 @@ export const AddNewAddressCard: React.FC<AddNewAddressCardProps> = ({ left, top,
<div <div
style={{ style={{
position: 'absolute',
left: '42px',
top: 0,
width: '244px',
height: '29px',
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: '1px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '-2px',
width: '108px',
height: '20px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '12px', fontSize: '12px',
@ -250,13 +203,6 @@ export const AddNewAddressCard: React.FC<AddNewAddressCardProps> = ({ left, top,
</span> </span>
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '16px',
width: '244px',
height: '13px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '10px', fontSize: '10px',
@ -272,14 +218,11 @@ export const AddNewAddressCard: React.FC<AddNewAddressCardProps> = ({ left, top,
src="/assets/images/icon-arrow-right-circle-light.svg" src="/assets/images/icon-arrow-right-circle-light.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: '300px',
top: '2.5px',
width: '24px', width: '24px',
height: '24px', height: '24px',
flexShrink: 0,
}} }}
/> />
</div> </div>
</div>
); );
}; };

207
src/components/checkout/CartItemCard.tsx

@ -21,24 +21,15 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: '17px',
top: `${item.y}px`,
width: '342px',
height: '123px',
width: '100%',
minHeight: '123px',
padding: '12px',
borderRadius: '20px', borderRadius: '20px',
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff', border: '1px solid #ffffff',
}}
>
{/* Inner Frame 2095586695 at (12, 12) size 318x99 */}
<div
style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '318px',
height: '99px',
display: 'flex',
alignItems: 'stretch',
gap: '8px',
}} }}
> >
<img <img
@ -46,36 +37,39 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
alt={item.title} alt={item.title}
onClick={() => onClickItem?.(item.id)} onClick={() => onClickItem?.(item.id)}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '102.99px',
width: 'clamp(78px, 27vw, 103px)',
height: '99px', height: '99px',
borderRadius: '8px', borderRadius: '8px',
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
cursor: onClickItem ? 'pointer' : undefined, cursor: onClickItem ? 'pointer' : undefined,
}} }}
/> />
{/* Right Info Frame at rel=(109.99, 0) size=208.01x99 */}
{/* Right Info Column */}
<div <div
style={{ style={{
position: 'absolute',
left: '109.99px',
top: 0,
width: '208.01px',
height: '99px',
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minHeight: '99px',
}} }}
> >
{/* Title */}
{/* Top Row: Title + Origin & Close Button */}
<div
style={{
display: 'flex',
alignItems: 'flex-start',
justifyContent: 'space-between',
gap: '8px',
}}
>
<div style={{ flex: 1, minWidth: 0 }}>
<div <div
onClick={() => onClickItem?.(item.id)} onClick={() => onClickItem?.(item.id)}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '146px',
height: `${item.titleHeight}px`,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '12px', fontSize: '12px',
@ -91,11 +85,10 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
<div <div
onClick={() => onClickOrigin?.(item.id)} onClick={() => onClickOrigin?.(item.id)}
style={{ style={{
position: 'absolute',
left: 0,
top: `${item.originRelY}px`,
width: '125px',
height: '10px',
marginTop: '3px',
display: 'inline-flex',
alignItems: 'center',
gap: '3px',
cursor: onClickOrigin ? 'pointer' : undefined, cursor: onClickOrigin ? 'pointer' : undefined,
}} }}
> >
@ -103,22 +96,13 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
src="/assets/images/icon-flag-iran-10.svg" src="/assets/images/icon-flag-iran-10.svg"
alt="Iran" alt="Iran"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '10px', width: '10px',
height: '10px', height: '10px',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: '13px',
top: 0,
width: '112px',
height: '10px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '8.5px', fontSize: '8.5px',
@ -129,55 +113,48 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
{item.origin} {item.origin}
</span> </span>
</div> </div>
</div>
{/* Close / Remove Button at rel=(184, 0) size=24x24 rad=8 */}
{/* Close / Remove Button */}
<div <div
onClick={() => onRemove?.(item.id)} onClick={() => onRemove?.(item.id)}
role={onRemove ? 'button' : undefined} role={onRemove ? 'button' : undefined}
aria-label="Remove item" aria-label="Remove item"
style={{ style={{
position: 'absolute',
left: '184px',
top: 0,
width: '24px', width: '24px',
height: '24px', height: '24px',
borderRadius: '8px', borderRadius: '8px',
backgroundColor: 'rgba(116, 116, 116, 0.05)', backgroundColor: 'rgba(116, 116, 116, 0.05)',
cursor: onRemove ? 'pointer' : undefined, cursor: onRemove ? 'pointer' : undefined,
flexShrink: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
src="/assets/images/icon-close-xmark-grey.svg" src="/assets/images/icon-close-xmark-grey.svg"
alt="Remove" alt="Remove"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '24px', width: '24px',
height: '24px', height: '24px',
}} }}
/> />
</div> </div>
</div>
{/* Bottom Price + Stepper Row at rel=(0, 65) size=208.01x34 */}
{/* Bottom Price + Stepper Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '65px',
width: '208.01px',
height: '34px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '8px',
marginTop: '8px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '9px',
minWidth: '71px',
height: '16px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '16px', fontSize: '16px',
@ -189,21 +166,21 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
{item.price} {item.price}
</span> </span>
{/* Quantity Stepper Pill at rel=(124.61, 0) size=83.4x34 rad=12 */}
{/* Quantity Stepper Pill 83.4x34 */}
<div <div
style={{ style={{
position: 'absolute',
left: '124.61px',
top: 0,
position: 'relative',
width: '83.4px', width: '83.4px',
height: '34px', height: '34px',
borderRadius: '12px', borderRadius: '12px',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)', boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
flexShrink: 0,
}} }}
> >
{/* Minus Button */} {/* Minus Button */}
<div <div
className="habib-qty-btn"
onClick={() => onDecrement?.(item.id)} onClick={() => onDecrement?.(item.id)}
role={onDecrement ? 'button' : undefined} role={onDecrement ? 'button' : undefined}
aria-label="Decrease quantity" aria-label="Decrease quantity"
@ -214,7 +191,6 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
width: '24px', width: '24px',
height: '24px', height: '24px',
borderRadius: '8px', borderRadius: '8px',
backgroundColor: 'rgba(215, 142, 6, 0.15)',
cursor: onDecrement ? 'pointer' : undefined, cursor: onDecrement ? 'pointer' : undefined,
userSelect: 'none', userSelect: 'none',
}} }}
@ -256,6 +232,7 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
{/* Plus Button */} {/* Plus Button */}
<div <div
className="habib-qty-btn"
onClick={() => onIncrement?.(item.id)} onClick={() => onIncrement?.(item.id)}
role={onIncrement ? 'button' : undefined} role={onIncrement ? 'button' : undefined}
aria-label="Increase quantity" aria-label="Increase quantity"
@ -266,7 +243,6 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
width: '24px', width: '24px',
height: '24px', height: '24px',
borderRadius: '8px', borderRadius: '8px',
backgroundColor: 'rgba(215, 142, 6, 0.15)',
cursor: onIncrement ? 'pointer' : undefined, cursor: onIncrement ? 'pointer' : undefined,
userSelect: 'none', userSelect: 'none',
}} }}
@ -287,7 +263,6 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}; };
@ -299,53 +274,40 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: '17px',
top: `${item.y}px`,
width: '342px',
height: '123px',
width: '100%',
minHeight: '123px',
padding: '12px',
borderRadius: '15px', borderRadius: '15px',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
}}
>
<div
style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '318px',
height: '99px',
display: 'flex',
alignItems: 'stretch',
gap: '8px',
}} }}
> >
<img <img
src={item.imageSrc} src={item.imageSrc}
alt={item.title} alt={item.title}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '102.99px',
width: 'clamp(78px, 27vw, 103px)',
height: '99px', height: '99px',
borderRadius: '8px', borderRadius: '8px',
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
<div <div
style={{ style={{
position: 'absolute',
left: '109.99px',
top: 0,
width: '208.01px',
height: '99px',
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minHeight: '99px',
}} }}
> >
<div>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '208.01px',
height: '17px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '12px', fontSize: '12px',
@ -357,33 +319,23 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '19px',
width: '125px',
height: '10px',
marginTop: '3px',
display: 'inline-flex',
alignItems: 'center',
gap: '3px',
}} }}
> >
<img <img
src="/assets/images/icon-flag-iran-10.svg" src="/assets/images/icon-flag-iran-10.svg"
alt="Iran" alt="Iran"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '10px', width: '10px',
height: '10px', height: '10px',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: '13px',
top: 0,
width: '112px',
height: '10px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '8.5px', fontSize: '8.5px',
@ -394,25 +346,18 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
{item.origin} {item.origin}
</span> </span>
</div> </div>
</div>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '65px',
width: '208.01px',
height: '34px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '8px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '9px',
width: '71px',
height: '16px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '18px', fontSize: '18px',
@ -425,14 +370,13 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
<div <div
style={{ style={{
position: 'absolute',
left: '126.01px',
top: 0,
position: 'relative',
width: '82px', width: '82px',
height: '34px', height: '34px',
borderRadius: '6.58px', borderRadius: '6.58px',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)', boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
flexShrink: 0,
}} }}
> >
<img <img
@ -479,6 +423,5 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}; };

95
src/components/checkout/OrderSummaryRows.tsx

@ -2,58 +2,46 @@ import React from 'react';
import { ORDER_SUMMARY_ROWS } from '../../data/checkoutData'; import { ORDER_SUMMARY_ROWS } from '../../data/checkoutData';
interface OrderSummaryRowsProps { interface OrderSummaryRowsProps {
left: number;
top: number;
width: number;
valueLeft: number;
totalValueLeft: number;
left?: number;
top?: number;
width?: number;
valueLeft?: number;
totalValueLeft?: number;
} }
export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
left,
top,
width,
valueLeft,
totalValueLeft,
}) => {
export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = () => {
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: `${left}px`,
top: `${top}px`,
width: `${width}px`,
height: '134px',
width: '100%',
display: 'flex',
flexDirection: 'column',
gap: '14px',
}} }}
> >
{/* 3 Line Items (height 80px) */}
{/* 3 Line Items */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: `${width}px`,
height: '80px',
width: '100%',
display: 'flex',
flexDirection: 'column',
gap: '10px',
}} }}
> >
{ORDER_SUMMARY_ROWS.map((row) => ( {ORDER_SUMMARY_ROWS.map((row) => (
<div <div
key={row.id} key={row.id}
style={{ style={{
position: 'absolute',
left: 0,
top: `${row.relY}px`,
width: `${width}px`,
height: '20px',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '12px',
minHeight: '20px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: `${row.labelWidth}px`,
height: '20px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '14px', fontSize: '14px',
@ -65,16 +53,12 @@ export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
</span> </span>
<span <span
style={{ style={{
position: 'absolute',
left: `${valueLeft}px`,
top: 0,
width: '42px',
height: '20px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '14px', fontSize: '14px',
lineHeight: '20px', lineHeight: '20px',
color: '#747474', color: '#747474',
flexShrink: 0,
}} }}
> >
{row.value} {row.value}
@ -83,37 +67,28 @@ export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
))} ))}
</div> </div>
{/* Line 402 at relY=95 */}
{/* Divider */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '95px',
width: '341px',
width: '100%',
height: '1px', height: '1px',
backgroundColor: '#d7dbe2', backgroundColor: '#d7dbe2',
}} }}
/> />
{/* Total Row at relY=110 */}
{/* Total Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '110px',
width: `${width}px`,
height: '24px',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '12px',
minHeight: '24px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '2px',
width: '38px',
height: '20px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '16px', fontSize: '16px',
@ -125,18 +100,12 @@ export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
</span> </span>
<span <span
style={{ style={{
position: 'absolute',
left: `${totalValueLeft}px`,
top: '2px',
width: '51px',
height: '20px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '16px', fontSize: '16px',
lineHeight: '20px', lineHeight: '20px',
color: 'var(--color-text-charcoal)', color: 'var(--color-text-charcoal)',
flexShrink: 0,
}} }}
> >
$70.50 $70.50

62
src/components/checkout/PaymentMethodCard.tsx

@ -16,47 +16,37 @@ export const PaymentMethodCard: React.FC<PaymentMethodCardProps> = ({
<div <div
onClick={onSelect} onClick={onSelect}
style={{ style={{
position: 'absolute',
left: 0,
top: `${item.relY}px`,
width: '340.57px',
height: '54px',
width: '100%',
minHeight: '54px',
padding: '12px',
borderRadius: '15px', borderRadius: '15px',
background: isSelected background: isSelected
? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)' ? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)'
: '#ffffff', : '#ffffff',
border: isSelected ? '1px solid #d78e06' : undefined, border: isSelected ? '1px solid #d78e06' : undefined,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
gap: '14px',
}} }}
> >
{/* Radio Circle 20x20 */}
<div <div
style={{ style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '324px',
height: '30px',
}}
>
{/* Radio Circle 20x20 at rel=(0, 5) */}
<div
style={{
position: 'absolute',
left: 0,
top: '5px',
width: '20px', width: '20px',
height: '20px', height: '20px',
borderRadius: '10px', borderRadius: '10px',
backgroundColor: isSelected ? '#d78e06' : 'transparent', backgroundColor: isSelected ? '#d78e06' : 'transparent',
border: isSelected ? undefined : '1px solid #dbdbdb', border: isSelected ? undefined : '1px solid #dbdbdb',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
{isSelected && ( {isSelected && (
<div <div
style={{ style={{
position: 'absolute',
left: '6px',
top: '6px',
width: '8px', width: '8px',
height: '8px', height: '8px',
borderRadius: '50%', borderRadius: '50%',
@ -66,34 +56,32 @@ export const PaymentMethodCard: React.FC<PaymentMethodCardProps> = ({
)} )}
</div> </div>
{/* Icon + Label at rel=(34, 0) size=254x30 */}
{/* Icon + Label */}
<div <div
style={{ style={{
position: 'absolute',
left: '34px',
top: 0,
width: '254px',
height: '30px',
flex: 1,
minWidth: 0,
display: 'flex',
alignItems: 'center',
gap: '10px',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '30px', width: '30px',
height: '30px', height: '30px',
borderRadius: '9px', borderRadius: '9px',
backgroundColor: 'rgba(208, 208, 208, 0.3)', backgroundColor: 'rgba(208, 208, 208, 0.3)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src={item.iconSrc} src={item.iconSrc}
alt={item.label} alt={item.label}
style={{ style={{
position: 'absolute',
left: '7px',
top: '7px',
width: '16px', width: '16px',
height: '16px', height: '16px',
}} }}
@ -102,13 +90,6 @@ export const PaymentMethodCard: React.FC<PaymentMethodCardProps> = ({
<span <span
style={{ style={{
position: 'absolute',
left: '40px',
top: '10px',
width: '214px',
height: '10px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '14px', fontSize: '14px',
@ -120,6 +101,5 @@ export const PaymentMethodCard: React.FC<PaymentMethodCardProps> = ({
</span> </span>
</div> </div>
</div> </div>
</div>
); );
}; };

75
src/components/checkout/ReviewItemCard.tsx

@ -12,62 +12,46 @@ interface ReviewItemCardProps {
export const ReviewItemCard: React.FC<ReviewItemCardProps> = ({ export const ReviewItemCard: React.FC<ReviewItemCardProps> = ({
item, item,
width = 343,
backgroundColor = '#ffffff', backgroundColor = '#ffffff',
rightTextWidth = 251.7,
badgeLeft = 216.7,
badgeBg = '#ffffff', badgeBg = '#ffffff',
}) => { }) => {
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: `${item.relY}px`,
width: `${width}px`,
height: '81px',
width: '100%',
minHeight: '81px',
padding: '12px',
borderRadius: '15px', borderRadius: '15px',
backgroundColor, backgroundColor,
}}
>
<div
style={{
position: 'absolute',
left: '12px',
top: '12px',
width: `${width - 24}px`,
height: '57px',
display: 'flex',
alignItems: 'center',
gap: '8px',
}} }}
> >
<img <img
src={item.imageSrc} src={item.imageSrc}
alt={item.title} alt={item.title}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '59.3px', width: '59.3px',
height: '57px', height: '57px',
borderRadius: '8px', borderRadius: '8px',
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
<div <div
style={{ style={{
position: 'absolute',
left: '66.3px',
top: 0,
width: `${rightTextWidth}px`,
height: '57px',
flex: 1,
minWidth: 0,
minHeight: '57px',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
gap: '4px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: `${rightTextWidth}px`,
height: '17px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '12px', fontSize: '12px',
@ -80,22 +64,14 @@ export const ReviewItemCard: React.FC<ReviewItemCardProps> = ({
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '23px',
width: `${rightTextWidth}px`,
height: '34px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '8px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '9px',
width: '71px',
height: '16px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '18px', fontSize: '18px',
@ -108,25 +84,19 @@ export const ReviewItemCard: React.FC<ReviewItemCardProps> = ({
<div <div
style={{ style={{
position: 'absolute',
left: `${badgeLeft}px`,
top: 0,
width: '35px', width: '35px',
height: '34px', height: '34px',
borderRadius: '6.58px', borderRadius: '6.58px',
backgroundColor: badgeBg, backgroundColor: badgeBg,
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)', boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: '13.8px',
top: '10.42px',
width: '7.4px',
height: '13.16px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '11.51px', fontSize: '11.51px',
@ -140,6 +110,5 @@ export const ReviewItemCard: React.FC<ReviewItemCardProps> = ({
</div> </div>
</div> </div>
</div> </div>
</div>
); );
}; };

47
src/components/common/CategoryCard.tsx

@ -13,37 +13,40 @@ export const CategoryCard: React.FC<CategoryCardProps> = ({ tile }) => {
<div <div
onClick={() => navigate('/shop-catitems')} onClick={() => navigate('/shop-catitems')}
style={{ style={{
position: 'absolute',
left: `${tile.x}px`,
top: `${tile.y}px`,
width: `${tile.width}px`,
position: 'relative',
width: '100%',
height: '120px', height: '120px',
padding: '18px 8px 14px',
borderRadius: '15px', borderRadius: '15px',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
border: tile.isRightCol ? undefined : '1px solid rgba(0, 0, 0, 0.05)', border: tile.isRightCol ? undefined : '1px solid rgba(0, 0, 0, 0.05)',
boxShadow: tile.isRightCol ? '0px 4px 17px rgba(148, 163, 184, 0.05)' : undefined, boxShadow: tile.isRightCol ? '0px 4px 17px rgba(148, 163, 184, 0.05)' : undefined,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '8px',
minWidth: 0,
}} }}
> >
{/* Count Badge "24" */} {/* Count Badge "24" */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: `${tile.countBadgeLeft}px`,
right: '10px',
top: '9px', top: '9px',
width: '21px', width: '21px',
height: '21px', height: '21px',
borderRadius: '6px', borderRadius: '6px',
backgroundColor: 'rgba(215, 142, 6, 0.1)', backgroundColor: 'rgba(215, 142, 6, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: '2px',
top: '2px',
width: '17px',
height: '17px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '12px', fontSize: '12px',
@ -56,37 +59,18 @@ export const CategoryCard: React.FC<CategoryCardProps> = ({ tile }) => {
</span> </span>
</div> </div>
{/* Inner Frame 133x68 */}
<div
style={{
position: 'absolute',
left: `${tile.innerLeft}px`,
top: '26px',
width: '133px',
height: '68px',
}}
>
<img <img
src={tile.iconSrc} src={tile.iconSrc}
alt={tile.label} alt={tile.label}
style={{ style={{
position: 'absolute',
left: `${tile.iconLeft}px`,
top: 0,
width: `${tile.iconWidth}px`, width: `${tile.iconWidth}px`,
height: `${tile.iconHeight}px`, height: `${tile.iconHeight}px`,
objectFit: 'contain',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: `${tile.labelRelY}px`,
width: '133px',
height: '21px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '14px', fontSize: '14px',
@ -98,6 +82,5 @@ export const CategoryCard: React.FC<CategoryCardProps> = ({ tile }) => {
{tile.label} {tile.label}
</span> </span>
</div> </div>
</div>
); );
}; };

145
src/components/common/CompactProductCard.tsx

@ -11,65 +11,60 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
return ( return (
<div <div
className="habib-compact-card"
onClick={() => navigate('/shop-single-page')} onClick={() => navigate('/shop-single-page')}
style={{ style={{
position: 'absolute',
left: `${item.relX}px`,
top: `${item.relY}px`,
width: '152px',
height: '229px',
minHeight: '229px',
padding: '12px',
borderRadius: '20px', borderRadius: '20px',
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff', border: '1px solid #ffffff',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
flexDirection: 'column',
gap: '7px',
}} }}
> >
{/* Inner Frame 2095586695 at (12, 12) size 128x205 */}
{/* Product Image Container */}
<div <div
style={{ style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '128px',
height: '205px',
position: 'relative',
width: '100%',
flexShrink: 0,
}} }}
> >
{/* Product Image 128x112 rad=12 */}
<img <img
className="habib-compact-card-img"
src={item.imageSrc} src={item.imageSrc}
alt={item.title} alt={item.title}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '128px',
height: '112px',
borderRadius: '12px', borderRadius: '12px',
objectFit: 'cover', objectFit: 'cover',
display: 'block',
}} }}
/> />
{/* Bookmark Pill at rel=(104, 6) size=18x18 rad=6 */}
{/* Bookmark Pill */}
{item.hasBookmark && ( {item.hasBookmark && (
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: '104px',
right: '6px',
top: '6px', top: '6px',
width: '18px', width: '18px',
height: '18px', height: '18px',
borderRadius: '6px', borderRadius: '6px',
backgroundColor: 'rgba(255, 255, 255, 0.8)', backgroundColor: 'rgba(255, 255, 255, 0.8)',
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)', boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
src="/assets/images/icon-bookmark-mini.svg" src="/assets/images/icon-bookmark-mini.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: '3px',
top: '3px',
width: '12px', width: '12px',
height: '12px', height: '12px',
}} }}
@ -77,40 +72,36 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
</div> </div>
)} )}
{/* Rating Pill at rel=(6, 6) size=(28|34)x18 rad=6 */}
{/* Rating Pill */}
{item.rating && ( {item.rating && (
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: '6px', left: '6px',
top: item.rating === '5' ? '6.43px' : '6px',
width: `${item.ratingPillWidth ?? 34}px`,
top: '6px',
minWidth: `${item.ratingPillWidth ?? 34}px`,
height: '18px', height: '18px',
padding: '0 4px',
borderRadius: '6px', borderRadius: '6px',
backgroundColor: 'rgba(255, 255, 255, 0.8)', backgroundColor: 'rgba(255, 255, 255, 0.8)',
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)', boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
gap: '2px',
}} }}
> >
<img <img
src="/assets/images/icon-star-rating-11.svg" src="/assets/images/icon-star-rating-11.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: `${item.ratingStarLeft ?? 3.5}px`,
top: '3.84px',
width: '11px', width: '11px',
height: '10.31px', height: '10.31px',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: `${item.ratingTextLeft ?? 15.5}px`,
top: '3.5px',
width: `${item.ratingTextWidth ?? 15}px`,
height: '11px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '8.5px', fontSize: '8.5px',
@ -122,25 +113,21 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
</span> </span>
</div> </div>
)} )}
</div>
{/* Content Frame 2095586694 at rel=(0, 119) size=127x86 */}
{/* Content Block */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '119px',
width: '127px',
height: '86px',
flex: 1,
display: 'flex',
flexDirection: 'column',
minHeight: '86px',
minWidth: 0,
}} }}
> >
{/* Title */} {/* Title */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '127px',
height: item.titleLines === 2 ? '28px' : '14px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '12px', fontSize: '12px',
@ -154,38 +141,32 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
{/* Origin Row */} {/* Origin Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: `${item.originRelY}px`,
width: '125px',
height: '10px',
marginTop: '4px',
display: 'flex',
alignItems: 'center',
gap: '3px',
minWidth: 0,
}} }}
> >
<img <img
src="/assets/images/icon-flag-iran-10.svg" src="/assets/images/icon-flag-iran-10.svg"
alt="Iran" alt="Iran"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '10px', width: '10px',
height: '10px', height: '10px',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: '13px',
top: 0,
width: '112px',
height: '10px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '8.5px', fontSize: '8.5px',
lineHeight: '12.52px', lineHeight: '12.52px',
color: '#747474', color: '#747474',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{item.origin} {item.origin}
@ -193,20 +174,15 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
</div> </div>
{/* Price Block */} {/* Price Block */}
<div style={{ marginTop: 'auto', paddingTop: '6px' }}>
{item.oldPrice && ( {item.oldPrice && (
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '59px',
width: '54px',
height: '8px',
display: 'flex',
alignItems: 'center',
display: 'block',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '8.5px', fontSize: '8.5px',
lineHeight: '12.52px',
lineHeight: '11px',
color: '#747474', color: '#747474',
textDecoration: 'line-through', textDecoration: 'line-through',
}} }}
@ -217,22 +193,14 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '67px',
width: '127px',
height: '19px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '4px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '2px',
width: '57px',
height: '17px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '16px', fontSize: '16px',
@ -246,22 +214,19 @@ export const CompactProductCard: React.FC<CompactProductCardProps> = ({ item })
{item.discountBadge && ( {item.discountBadge && (
<div <div
style={{ style={{
position: 'absolute',
left: '94px',
top: 0,
width: '33px',
minWidth: '33px',
height: '19px', height: '19px',
padding: '0 6px',
borderRadius: '10px', borderRadius: '10px',
backgroundColor: '#d44747', backgroundColor: '#d44747',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: '6px',
top: '2.5px',
width: '21px',
height: '14px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '10px', fontSize: '10px',

154
src/components/common/GridProductCard.tsx

@ -13,101 +13,94 @@ export const GridProductCard: React.FC<GridProductCardProps> = ({ item }) => {
<div <div
onClick={() => navigate('/shop-single-page')} onClick={() => navigate('/shop-single-page')}
style={{ style={{
position: 'absolute',
left: `${item.relX}px`,
top: `${item.relY}px`,
width: '166px',
height: '241px',
width: '100%',
minHeight: '241px',
padding: '12px',
borderRadius: '20px', borderRadius: '20px',
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff', border: '1px solid #ffffff',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
flexDirection: 'column',
gap: '7px',
minWidth: 0,
}} }}
> >
{/* Inner Frame 2095586695 at (12, 12) size 142x217 */}
{/* Product Image Container */}
<div <div
style={{ style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '142px',
height: '217px',
position: 'relative',
width: '100%',
flexShrink: 0,
}} }}
> >
{/* Product Image 142x124 */}
<img <img
src={item.imageSrc} src={item.imageSrc}
alt={item.title} alt={item.title}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '142px',
height: '124px',
width: '100%',
aspectRatio: '142 / 124',
borderRadius: `${item.imageRadius}px`, borderRadius: `${item.imageRadius}px`,
objectFit: 'cover', objectFit: 'cover',
display: 'block',
}} }}
/> />
{/* Bookmark Pill at rel=(115.38, 5.91) size=19.97x18 rad=6 */}
{/* Bookmark Pill */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: '115.38px',
top: '5.91px',
width: '19.97px',
right: '6px',
top: '6px',
width: '20px',
height: '18px', height: '18px',
borderRadius: '6px', borderRadius: '6px',
backgroundColor: 'rgba(255, 255, 255, 0.8)', backgroundColor: 'rgba(255, 255, 255, 0.8)',
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)', boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
src="/assets/images/icon-bookmark-mini.svg" src="/assets/images/icon-bookmark-mini.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: '3.98px',
top: '3px',
width: '12px', width: '12px',
height: '12px', height: '12px',
}} }}
/> />
</div> </div>
{/* Rating Pill at rel=(6, 6) size=(28|34)x18 rad=6 */}
{/* Rating Pill */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: '6px', left: '6px',
top: item.rating === '5' ? '6.43px' : '6px',
width: `${item.ratingPillWidth}px`,
top: '6px',
minWidth: `${item.ratingPillWidth}px`,
height: '18px', height: '18px',
padding: '0 4px',
borderRadius: '6px', borderRadius: '6px',
backgroundColor: 'rgba(255, 255, 255, 0.8)', backgroundColor: 'rgba(255, 255, 255, 0.8)',
boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)', boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.08)',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
gap: '2px',
}} }}
> >
<img <img
src="/assets/images/icon-star-rating-11.svg" src="/assets/images/icon-star-rating-11.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: `${item.ratingStarLeft}px`,
top: '3.84px',
width: '11px', width: '11px',
height: '10.31px', height: '10.31px',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: `${item.ratingTextLeft}px`,
top: '3.5px',
width: `${item.ratingTextWidth}px`,
height: '11px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '8.5px', fontSize: '8.5px',
@ -118,25 +111,21 @@ export const GridProductCard: React.FC<GridProductCardProps> = ({ item }) => {
{item.rating} {item.rating}
</span> </span>
</div> </div>
</div>
{/* Content Frame 2095586694 at rel=(0, 131) size=142x86 */}
{/* Content Block */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '131px',
width: '142px',
height: '86px',
flex: 1,
display: 'flex',
flexDirection: 'column',
minHeight: '86px',
minWidth: 0,
}} }}
> >
{/* Title */} {/* Title */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '142px',
height: item.titleLines === 2 ? '28px' : '14px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '12px', fontSize: '12px',
@ -150,59 +139,48 @@ export const GridProductCard: React.FC<GridProductCardProps> = ({ item }) => {
{/* Origin Row */} {/* Origin Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: `${item.originRelY}px`,
width: '125px',
height: '10px',
marginTop: '4px',
display: 'flex',
alignItems: 'center',
gap: '3px',
minWidth: 0,
}} }}
> >
<img <img
src="/assets/images/icon-flag-iran-10.svg" src="/assets/images/icon-flag-iran-10.svg"
alt="Iran" alt="Iran"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '10px', width: '10px',
height: '10px', height: '10px',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: '13px',
top: 0,
width: '112px',
height: '10px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: '8.5px', fontSize: '8.5px',
lineHeight: '12.52px', lineHeight: '12.52px',
color: '#747474', color: '#747474',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
{item.origin} {item.origin}
</span> </span>
</div> </div>
{/* Old Price */}
{/* Price + Discount Badge */}
<div style={{ marginTop: 'auto', paddingTop: '6px' }}>
{item.oldPrice && ( {item.oldPrice && (
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '59px',
width: '54px',
height: '8px',
display: 'flex',
alignItems: 'center',
display: 'block',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '8.5px', fontSize: '8.5px',
lineHeight: '12.52px',
lineHeight: '11px',
color: '#747474', color: '#747474',
textDecoration: 'line-through', textDecoration: 'line-through',
}} }}
@ -211,25 +189,16 @@ export const GridProductCard: React.FC<GridProductCardProps> = ({ item }) => {
</span> </span>
)} )}
{/* Price + Discount Badge */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: '67px',
width: '142px',
height: '19px',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '4px',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '2px',
width: '57px',
height: '17px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '16px', fontSize: '16px',
@ -243,22 +212,19 @@ export const GridProductCard: React.FC<GridProductCardProps> = ({ item }) => {
{item.discountBadge && ( {item.discountBadge && (
<div <div
style={{ style={{
position: 'absolute',
left: '109px',
top: 0,
width: '33px',
minWidth: '33px',
height: '19px', height: '19px',
padding: '0 6px',
borderRadius: '10px', borderRadius: '10px',
backgroundColor: '#d44747', backgroundColor: '#d44747',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: '6px',
top: '2.5px',
width: '21px',
height: '14px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '10px', fontSize: '10px',

74
src/components/common/SearchBar.tsx

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
interface SearchBarProps { interface SearchBarProps {
left: number;
top: number;
left?: number;
top?: number;
width?: number; width?: number;
inputWidth?: number; inputWidth?: number;
showFilterButton?: boolean; showFilterButton?: boolean;
@ -10,32 +10,24 @@ interface SearchBarProps {
} }
export const SearchBar: React.FC<SearchBarProps> = ({ export const SearchBar: React.FC<SearchBarProps> = ({
left,
top,
width = 343,
inputWidth,
showFilterButton = false, showFilterButton = false,
onFilterClick, onFilterClick,
}) => { }) => {
const actualInputWidth = inputWidth ?? (showFilterButton ? 285 : width);
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: `${left}px`,
top: `${top}px`,
width: `${width}px`,
display: 'flex',
alignItems: 'center',
gap: '9px',
width: '100%',
height: '50px', height: '50px',
}} }}
> >
{/* Group 1956 */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: `${actualInputWidth}px`,
position: 'relative',
flex: 1,
minWidth: 0,
height: '50px', height: '50px',
borderRadius: '15px', borderRadius: '15px',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
@ -46,47 +38,55 @@ export const SearchBar: React.FC<SearchBarProps> = ({
alt="Search" alt="Search"
style={{ style={{
position: 'absolute', position: 'absolute',
left: '8.94px',
left: '9px',
top: '13px', top: '13px',
width: '23.83px', width: '23.83px',
height: '24px', height: '24px',
pointerEvents: 'none',
}} }}
/> />
<span
<input
type="text"
className="habib-search-input"
placeholder="Search products, stores, categories..."
aria-label="Search products, stores, categories..."
style={{ style={{
position: 'absolute',
left: '39px',
top: '15px',
width: '200px',
height: '18px',
display: 'flex',
alignItems: 'flex-end',
width: '100%',
height: '100%',
borderRadius: '15px',
padding: '15px 12px 17px 39px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '12px', fontSize: '12px',
lineHeight: '18px', lineHeight: '18px',
color: '#8f8f8f',
color: '#111111',
}} }}
>
Search products, stores, categories...
</span>
/>
</div> </div>
{/* Group 1000005767 (50x50 filter button) */}
{showFilterButton && ( {showFilterButton && (
<img
src="/assets/images/icon-filter-button-square.svg"
alt="Filter"
<button
type="button"
onClick={onFilterClick} onClick={onFilterClick}
aria-label="Filter"
style={{ style={{
position: 'absolute',
left: '294px',
top: 0,
width: '50px', width: '50px',
height: '50px', height: '50px',
flexShrink: 0,
cursor: 'pointer', cursor: 'pointer',
padding: 0,
}}
>
<img
src="/assets/images/icon-filter-button-square.svg"
alt=""
style={{
width: '50px',
height: '50px',
display: 'block',
}} }}
/> />
</button>
)} )}
</div> </div>
); );

518
src/components/layout/BottomNavBar.tsx

@ -1,304 +1,392 @@
import React from 'react';
import React, { useEffect, useSyncExternalStore } from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
export type BottomNavTab = 'home' | 'category' | 'account' | 'cart'; export type BottomNavTab = 'home' | 'category' | 'account' | 'cart';
interface BottomNavBarProps { interface BottomNavBarProps {
activeTab: BottomNavTab; activeTab: BottomNavTab;
top: number;
top?: number;
showCartBadge?: boolean; showCartBadge?: boolean;
cartBadgeCount?: number; 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 }) => (
<span className={`habib-nav-icon-wrap ${visualClass}`}>
<img
src={inactiveSrc}
alt=""
aria-hidden="true"
decoding="sync"
className="habib-nav-icon habib-nav-icon-inactive"
/>
<img
src={activeSrc}
alt={alt}
decoding="sync"
className="habib-nav-icon habib-nav-icon-active"
/>
</span>
);
const IndicatorWave: React.FC<{
phase: WavePhase;
onSettled?: () => void;
}> = ({ phase, onSettled }) => (
<svg
width="42"
height="7"
viewBox="0 0 42 7"
fill="none"
className={phase === 'idle' ? 'habib-nav-wave' : `habib-nav-wave is-${phase}`}
onAnimationEnd={phase === 'rise' ? onSettled : undefined}
>
<path
d="M 0.106 7 C 7.1945 7 13.9115 0 21 0 C 28.0885 0 34.8055 7 41.894 7 Z"
fill="#d78e06"
/>
</svg>
);
export const BottomNavBar: React.FC<BottomNavBarProps> = ({ export const BottomNavBar: React.FC<BottomNavBarProps> = ({
activeTab, activeTab,
top,
showCartBadge = true, showCartBadge = true,
cartBadgeCount = 2, cartBadgeCount = 2,
}) => { }) => {
const navigate = useNavigate(); const navigate = useNavigate();
const snapshot = useSyncExternalStore(subscribeWave, getWaveSnapshot, getWaveSnapshot);
// Indicator wave center X inside Subtract boolean operation (Ellipse 2 x + 9)
const cx =
activeTab === 'home'
? 44
: activeTab === 'category'
? 116
: activeTab === 'account'
? 260
: 331;
useEffect(() => {
lastCommittedTab = activeTab;
}, [activeTab]);
const handleTabNavigate = (targetTab: BottomNavTab, route: string) => {
if (activeTab !== targetTab) {
startWaveTransition(activeTab, targetTab);
}
navigate(route);
};
const handleRiseSettled = () => {
completeWaveTransition(snapshot.seq);
};
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 ( return (
<div
<nav
aria-label="Bottom Navigation"
style={{ style={{
position: 'absolute',
left: 0,
top: `${top}px`,
width: '375px',
position: 'sticky',
bottom: 0,
marginTop: 'auto',
width: '100%',
height: '78px', height: '78px',
flexShrink: 0,
zIndex: 30,
}} }}
> >
{/* Subtract white shape with active boolean wave indicator */}
{/* White rounded background */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '375px',
position: 'relative',
width: '100%',
height: '78px', height: '78px',
borderRadius: '17px',
borderRadius: '17px 17px 0 0',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
boxShadow: '0px -7px 12px rgba(103, 110, 124, 0.15)', boxShadow: '0px -7px 12px rgba(103, 110, 124, 0.15)',
overflow: 'hidden',
}}
>
<svg
width="375"
height="78"
viewBox="0 0 375 78"
fill="none"
style={{
position: 'absolute',
left: 0,
top: 0,
width: '375px',
height: '78px',
pointerEvents: 'none',
}} }}
> >
<path d={indicatorWavePath} fill="#d78e06" />
</svg>
</div>
<div className="habib-bottom-nav-inner">
{/* Home Tab */} {/* Home Tab */}
<div
onClick={() => navigate('/shop-home')}
<button
type="button"
onClick={() => handleTabNavigate('home', '/shop-home')}
style={{ style={{
position: 'absolute',
left: '21px',
top: '17px',
width: '47px',
height: '44px',
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer', cursor: 'pointer',
padding: 0,
}} }}
> >
<img
src={
activeTab === 'home'
? '/assets/images/nav-home-active.svg'
: '/assets/images/nav-home-inactive.svg'
}
<NavTabIcon
activeSrc="/assets/images/nav-home-active.svg"
inactiveSrc="/assets/images/nav-home-inactive.svg"
alt="Home" alt="Home"
style={{
position: 'absolute',
left: '9px',
top: 0,
width: '28px',
height: '28px',
}}
visualClass={homeVisual}
/> />
<span
style={{
position: 'absolute',
left: 0,
top: '27px',
width: '47px',
height: '17px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '12px',
lineHeight: '17px',
color: activeTab === 'home' ? '#d78e06' : '#3d3d3d',
textAlign: 'center',
}}
>
Home
</span>
</div>
<span className={`habib-nav-label ${homeVisual}`}>Home</span>
{homePhase && (
<IndicatorWave
key={snapshot.seq}
phase={homePhase}
onSettled={handleRiseSettled}
/>
)}
</button>
{/* Category Tab */} {/* Category Tab */}
<div
onClick={() => navigate('/shop-category')}
<button
type="button"
onClick={() => handleTabNavigate('category', '/shop-category')}
style={{ style={{
position: 'absolute',
left: '91px',
top: '17px',
width: '50px',
height: '44px',
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer', cursor: 'pointer',
padding: 0,
}} }}
> >
<img
src={
activeTab === 'category'
? '/assets/images/nav-category-active.svg'
: '/assets/images/nav-category-inactive.svg'
}
<NavTabIcon
activeSrc="/assets/images/nav-category-active.svg"
inactiveSrc="/assets/images/nav-category-inactive.svg"
alt="Category" alt="Category"
style={{
position: 'absolute',
left: '11px',
top: 0,
width: '28px',
height: '28px',
}}
visualClass={categoryVisual}
/> />
<span
<span className={`habib-nav-label ${categoryVisual}`}>Category</span>
{categoryPhase && (
<IndicatorWave
key={snapshot.seq}
phase={categoryPhase}
onSettled={handleRiseSettled}
/>
)}
</button>
{/* Center Habib Emblem Pill */}
<div
style={{ style={{
position: 'absolute',
left: 0,
top: '27px',
width: '50px',
height: '17px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '12px',
lineHeight: '17px',
color: activeTab === 'category' ? '#d78e06' : '#3d3d3d',
textAlign: 'left',
position: 'relative',
height: '78px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
Category
</span>
</div>
{/* Center Habib Emblem Pill (54x54 node at rel=(161, 12), exported SVG 114x85 with shadow padding) */}
<img <img
src="/assets/images/nav-center-habib-pill.svg" src="/assets/images/nav-center-habib-pill.svg"
alt="Habib" alt="Habib"
onClick={() => navigate('/shop-home')}
decoding="sync"
onClick={() => handleTabNavigate('home', '/shop-home')}
style={{ style={{
position: 'absolute', position: 'absolute',
left: '131px',
top: '-7px', top: '-7px',
left: '50%',
transform: 'translateX(-50%)',
width: '114px', width: '114px',
height: '85px', height: '85px',
cursor: 'pointer', cursor: 'pointer',
}} }}
/> />
</div>
{/* Account Tab */} {/* Account Tab */}
<div
onClick={() => navigate('/shop-account')}
<button
type="button"
onClick={() => handleTabNavigate('account', '/shop-account')}
style={{ style={{
position: 'absolute',
left: '237px',
top: '17px',
width: '45px',
height: '44px',
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer', cursor: 'pointer',
padding: 0,
}} }}
> >
<img
src={
activeTab === 'account'
? '/assets/images/nav-account-active.svg'
: '/assets/images/nav-account-inactive.svg'
}
<NavTabIcon
activeSrc="/assets/images/nav-account-active.svg"
inactiveSrc="/assets/images/nav-account-inactive.svg"
alt="Account" alt="Account"
style={{
position: 'absolute',
left: '9px',
top: 0,
width: '28px',
height: '28px',
}}
visualClass={accountVisual}
/> />
<span
style={{
position: 'absolute',
left: 0,
top: '27px',
width: '45px',
height: '17px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '12px',
lineHeight: '17px',
color: activeTab === 'account' ? '#d78e06' : '#3d3d3d',
textAlign: 'left',
}}
>
Account
</span>
</div>
<span className={`habib-nav-label ${accountVisual}`}>Account</span>
{accountPhase && (
<IndicatorWave
key={snapshot.seq}
phase={accountPhase}
onSettled={handleRiseSettled}
/>
)}
</button>
{/* Cart Tab */} {/* Cart Tab */}
<div
onClick={() => navigate('/shop-cart')}
<button
type="button"
onClick={() => handleTabNavigate('cart', '/shop-cart')}
style={{ style={{
position: 'absolute',
left: '316px',
top: '17px',
width: '28px',
height: '44px',
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer', cursor: 'pointer',
padding: 0,
}} }}
> >
<img
src={
activeTab === 'cart'
? '/assets/images/nav-cart-active.svg'
: '/assets/images/nav-cart-inactive.svg'
}
<div style={{ position: 'relative', width: '28px', height: '28px' }}>
<NavTabIcon
activeSrc="/assets/images/nav-cart-active.svg"
inactiveSrc="/assets/images/nav-cart-inactive.svg"
alt="Cart" alt="Cart"
style={{
position: 'absolute',
left: 0,
top: 0,
width: '28px',
height: '28px',
}}
visualClass={cartVisual}
/> />
<span
style={{
position: 'absolute',
left: '2px',
top: '27px',
width: '23px',
height: '17px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '12px',
lineHeight: '17px',
color: activeTab === 'cart' ? '#d78e06' : '#3d3d3d',
textAlign: 'left',
}}
>
Cart
</span>
</div>
{/* Optional Cart Badge at rel=(332, 13) */}
{showCartBadge && cartBadgeCount > 0 && ( {showCartBadge && cartBadgeCount > 0 && (
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: '332px',
top: '13px',
right: '-6px',
top: '-4px',
width: '16px', width: '16px',
height: '16px', height: '16px',
borderRadius: '8px', borderRadius: '8px',
backgroundColor: '#d44747', backgroundColor: '#d44747',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
pointerEvents: 'none', pointerEvents: 'none',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '3.5px',
width: '16px',
height: '8px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '10px', fontSize: '10px',
lineHeight: '13.9px',
lineHeight: '14px',
color: '#ffffff', color: '#ffffff',
}} }}
> >
@ -307,5 +395,17 @@ export const BottomNavBar: React.FC<BottomNavBarProps> = ({
</div> </div>
)} )}
</div> </div>
<span className={`habib-nav-label ${cartVisual}`}>Cart</span>
{cartPhase && (
<IndicatorWave
key={snapshot.seq}
phase={cartPhase}
onSettled={handleRiseSettled}
/>
)}
</button>
</div>
</div>
</nav>
); );
}; };

40
src/components/layout/MobileShell.tsx

@ -20,16 +20,18 @@ export const MobileShell: React.FC<MobileShellProps> = ({
const searchParams = new URLSearchParams(location.search); const searchParams = new URLSearchParams(location.search);
const isEmbed = searchParams.get('embed') === '1' || searchParams.get('bare') === '1'; 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) { if (isEmbed) {
return ( return (
<div <div
className="habib-mobile-viewport"
style={{
width: `${width}px`,
height: `${height}px`,
backgroundColor,
borderRadius: '0px',
}}
className="habib-mobile-viewport is-embed"
style={cssVars}
> >
{children} {children}
</div> </div>
@ -37,28 +39,8 @@ export const MobileShell: React.FC<MobileShellProps> = ({
} }
return ( return (
<div
style={{
minHeight: '100vh',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'flex-start',
padding: '24px 16px 48px',
backgroundColor: '#1e2229',
}}
>
{/* Exact Figma Frame */}
<div
className="habib-mobile-viewport"
style={{
width: `${width}px`,
height: `${height}px`,
backgroundColor,
borderRadius: `${borderRadius}px`,
boxShadow: '0 20px 50px rgba(0, 0, 0, 0.45)',
}}
>
<div className="habib-shell-outer" style={cssVars}>
<div className="habib-mobile-viewport" style={cssVars}>
{children} {children}
</div> </div>
</div> </div>

53
src/components/layout/StatusBar.tsx

@ -1,53 +0,0 @@
import React from 'react';
interface StatusBarProps {
variant?: 'light' | 'dark';
height?: number;
}
export const StatusBar: React.FC<StatusBarProps> = ({ 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 (
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: '375px',
height: `${height}px`,
pointerEvents: 'none',
}}
>
<img
src={leftSrc}
alt=""
style={{
position: 'absolute',
left: '16.58px',
top: '9.47px',
width: '42.62px',
height: '16.58px',
}}
/>
<img
src={rightSrc}
alt=""
style={{
position: 'absolute',
left: '310.8px',
top: '13.68px',
width: '52.62px',
height: '8.95px',
}}
/>
</div>
);
};

205
src/components/layout/StickyFooterBar.tsx

@ -2,8 +2,8 @@ import React from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
interface StickyFooterBarProps { interface StickyFooterBarProps {
top: number;
height: number;
top?: number;
height?: number;
hasShadow?: boolean; hasShadow?: boolean;
borderRadius?: number; borderRadius?: number;
price: string; price: string;
@ -14,22 +14,23 @@ interface StickyFooterBarProps {
topLabel?: string; topLabel?: string;
buttonText: string; buttonText: string;
buttonLeft?: number; buttonLeft?: number;
buttonTextLeft: number;
buttonTextLeft?: number;
buttonTextTop?: number; buttonTextTop?: number;
buttonTextWidth: number;
buttonTextWidth?: number;
buttonTextHeight?: number; buttonTextHeight?: number;
buttonFontWeight?: number; buttonFontWeight?: number;
iconSrc: string; iconSrc: string;
iconLeft: number;
iconLeft?: number;
iconTop?: number; iconTop?: number;
iconPosition?: 'left' | 'right';
targetRoute: string; targetRoute: string;
disabled?: boolean; disabled?: boolean;
onButtonClick?: () => void; onButtonClick?: () => void;
aboveBottomNav?: boolean;
} }
export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
top,
height,
height = 90,
hasShadow = true, hasShadow = true,
borderRadius = 17, borderRadius = 17,
price, price,
@ -39,75 +40,63 @@ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
onTotalItemsClick, onTotalItemsClick,
topLabel, topLabel,
buttonText, buttonText,
buttonLeft = 159,
buttonTextLeft,
buttonTextTop = 14,
buttonTextWidth,
buttonTextHeight = 24,
buttonFontWeight = 700, buttonFontWeight = 700,
iconSrc, iconSrc,
iconLeft,
iconTop = 14,
iconLeft = 49.5,
buttonTextLeft = 81.5,
iconPosition,
targetRoute, targetRoute,
disabled = false, disabled = false,
onButtonClick, onButtonClick,
aboveBottomNav = false,
}) => { }) => {
const navigate = useNavigate(); const navigate = useNavigate();
const totalItemsLeft = oldPrice && oldPrice.length > 6 ? 46 : oldPrice ? 39 : 0;
const isIconRight = iconPosition === 'right' || iconLeft > buttonTextLeft;
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: `${top}px`,
width: '375px',
height: `${height}px`,
}}
>
{/* Rectangle 3217 */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: '375px',
height: `${height}px`,
borderRadius: borderRadius ? `${borderRadius}px` : undefined,
position: aboveBottomNav ? 'relative' : 'sticky',
bottom: aboveBottomNav ? undefined : 0,
marginTop: aboveBottomNav ? undefined : 'auto',
width: '100%',
minHeight: `${aboveBottomNav ? 91 : height}px`,
paddingBottom: aboveBottomNav ? '13px' : undefined,
marginBottom: aboveBottomNav ? '-13px' : undefined,
borderRadius: borderRadius ? `${borderRadius}px ${borderRadius}px 0 0` : undefined,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
boxShadow: hasShadow ? '0px -7px 12px rgba(103, 110, 124, 0.15)' : undefined, boxShadow: hasShadow ? '0px -7px 12px rgba(103, 110, 124, 0.15)' : undefined,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '10px',
padding: `18px var(--page-px, 16px) ${aboveBottomNav ? '28px' : '18px'}`,
flexShrink: 0,
zIndex: aboveBottomNav ? 25 : 28,
}} }}
/>
>
{/* Left Price / Total Summary Info */} {/* Left Price / Total Summary Info */}
<div <div
style={{ style={{
position: 'absolute',
left: '16px',
top: '24px',
width: '136px',
height: '46px',
display: 'flex',
flexDirection: 'column',
gap: '2px',
minWidth: 0,
flexShrink: 1,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '136px',
height: '18px',
display: 'flex',
alignItems: 'center',
gap: '6px',
flexWrap: 'wrap',
minHeight: '18px',
}} }}
> >
{oldPrice && ( {oldPrice && (
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
minWidth: '35px',
height: '18px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '12px', fontSize: '12px',
@ -122,59 +111,41 @@ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
)} )}
{discountBadge && ( {discountBadge && (
<div
<span
style={{ style={{
position: 'absolute',
left: '39px',
top: '1px',
width: '29px',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
padding: '1px 5px',
height: '16px', height: '16px',
borderRadius: '10px', borderRadius: '10px',
backgroundColor: '#d44747', backgroundColor: '#d44747',
}}
>
<span
style={{
position: 'absolute',
left: '4px',
top: '2.5px',
width: '21px',
height: '9px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '10px', fontSize: '10px',
lineHeight: '13.9px',
lineHeight: '14px',
color: '#f5f5f5', color: '#f5f5f5',
whiteSpace: 'nowrap',
}} }}
> >
{discountBadge} {discountBadge}
</span> </span>
</div>
)} )}
{totalItemsLabel && ( {totalItemsLabel && (
<div
<button
type="button"
onClick={onTotalItemsClick} onClick={onTotalItemsClick}
style={{ style={{
position: 'absolute',
left: `${totalItemsLeft}px`,
top: '0.5px',
width: '88px',
height: '17px',
display: 'inline-flex',
alignItems: 'center',
gap: '3px',
cursor: onTotalItemsClick ? 'pointer' : 'default', cursor: onTotalItemsClick ? 'pointer' : 'default',
padding: 0,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '1.5px',
minWidth: '68px',
height: '14px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '12px', fontSize: '12px',
@ -188,27 +159,14 @@ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
<img <img
src="/assets/images/icon-caret-up-gold.svg" src="/assets/images/icon-caret-up-gold.svg"
alt="" alt=""
style={{
position: 'absolute',
left: totalItemsLabel.length > 12 ? '75px' : '70px',
top: '1.5px',
width: '14px',
height: '14px',
}}
style={{ width: '14px', height: '14px', flexShrink: 0 }}
/> />
</div>
</button>
)} )}
{topLabel && ( {topLabel && (
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: '75px',
height: '18px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: '12px', fontSize: '12px',
@ -222,16 +180,8 @@ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
)} )}
</div> </div>
{/* Main Price ($24.00) */}
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: '20px',
minWidth: '77px',
height: '26px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: '22px', fontSize: '22px',
@ -245,7 +195,10 @@ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
</div> </div>
{/* Primary Gold CTA Button */} {/* Primary Gold CTA Button */}
<div
<button
type="button"
className="habib-cta-btn"
disabled={disabled}
onClick={() => { onClick={() => {
if (disabled) return; if (disabled) return;
if (onButtonClick) { if (onButtonClick) {
@ -255,50 +208,48 @@ export const StickyFooterBar: React.FC<StickyFooterBarProps> = ({
} }
}} }}
style={{ style={{
position: 'absolute',
left: `${buttonLeft}px`,
top: '19px',
width: '200px',
width: 'min(200px, 54%)',
minWidth: '142px',
height: '52px', height: '52px',
borderRadius: '11px', borderRadius: '11px',
backgroundColor: '#d78e06',
cursor: disabled ? 'not-allowed' : 'pointer', cursor: disabled ? 'not-allowed' : 'pointer',
opacity: disabled ? 0.5 : 1, 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 && (
<img <img
src={iconSrc} src={iconSrc}
alt="" alt=""
style={{
position: 'absolute',
left: `${iconLeft}px`,
top: `${iconTop}px`,
width: '24px',
height: '24px',
}}
style={{ width: '24px', height: '24px', flexShrink: 0 }}
/> />
)}
<span <span
style={{ style={{
position: 'absolute',
left: `${buttonTextLeft}px`,
top: `${buttonTextTop}px`,
width: `${buttonTextWidth}px`,
height: `${buttonTextHeight}px`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: buttonFontWeight, fontWeight: buttonFontWeight,
fontSize: '16px', fontSize: '16px',
lineHeight: '24px', lineHeight: '24px',
color: '#fbfbfc', color: '#fbfbfc',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
{buttonText} {buttonText}
</span> </span>
</div>
{isIconRight && (
<img
src={iconSrc}
alt=""
style={{ width: '24px', height: '24px', flexShrink: 0 }}
/>
)}
</button>
</div> </div>
); );
}; };

61
src/components/layout/TopHeader.tsx

@ -10,61 +10,72 @@ interface StandardPageHeaderProps {
export const StandardPageHeader: React.FC<StandardPageHeaderProps> = ({ export const StandardPageHeader: React.FC<StandardPageHeaderProps> = ({
title, title,
titleTop = 29,
backTo = '/shop-home', backTo = '/shop-home',
showBack = true, showBack = true,
}) => { }) => {
const navigate = useNavigate(); const navigate = useNavigate();
return ( return (
<>
<div
<header
style={{ style={{
position: 'absolute',
left: '114px',
top: `${titleTop}px`,
width: '148px',
height: '20px',
position: 'relative',
width: '100%',
minHeight: '61px',
padding: '21px var(--page-px, 16px) 0',
display: 'flex', display: 'flex',
alignItems: 'flex-end',
alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '16px',
lineHeight: '20px',
color: '#111111',
textAlign: 'center',
flexShrink: 0,
}} }}
> >
{title}
</div>
{showBack && ( {showBack && (
<div
<button
type="button"
onClick={() => navigate(backTo)} onClick={() => navigate(backTo)}
aria-label="Back"
style={{ style={{
position: 'absolute', position: 'absolute',
left: '16px',
left: 'var(--page-px, 16px)',
top: '21px', top: '21px',
width: '40px', width: '40px',
height: '40px', height: '40px',
borderRadius: '15px', borderRadius: '15px',
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
src="/assets/images/icon-back-arrow-dark.svg" src="/assets/images/icon-back-arrow-dark.svg"
alt="Back"
alt=""
style={{ style={{
position: 'absolute',
left: '11px',
top: '12px',
width: '18.22px', width: '18.22px',
height: '15.21px', height: '15.21px',
display: 'block',
}} }}
/> />
</div>
</button>
)} )}
</>
<h1
style={{
margin: 0,
padding: showBack ? '0 48px' : '0 12px',
minHeight: '40px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '16px',
lineHeight: '20px',
color: '#111111',
textAlign: 'center',
}}
>
{title}
</h1>
</header>
); );
}; };

64
src/components/orders/OrderFilterTabs.tsx

@ -18,40 +18,30 @@ export const OrderFilterTabs: React.FC<OrderFilterTabsProps> = ({
onSelectTab, onSelectTab,
}) => { }) => {
return ( return (
<>
<div <div
style={{ style={{
position: 'absolute',
left: 15,
top: 87,
width: 345,
height: 45,
width: '100%',
minHeight: 45,
padding: 4,
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ebe8e5', backgroundColor: '#ebe8e5',
}}
/>
<div
style={{
position: 'absolute',
left: 18,
top: 91,
width: 337,
height: 37,
display: 'grid',
gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
gap: 4,
}} }}
> >
{tabs.map((tab) => { {tabs.map((tab) => {
const isActive = tab.id === activeTabId; const isActive = tab.id === activeTabId;
return ( return (
<div
<button
key={tab.id} key={tab.id}
type="button"
onClick={() => onSelectTab(tab.id)} onClick={() => onSelectTab(tab.id)}
style={{ style={{
position: 'absolute',
left: tab.relX,
top: 0,
width: 109,
height: 37,
width: '100%',
minHeight: 37,
padding: '0 4px',
borderRadius: 12, borderRadius: 12,
background: isActive background: isActive
? '#d78e06' ? '#d78e06'
@ -62,41 +52,38 @@ export const OrderFilterTabs: React.FC<OrderFilterTabsProps> = ({
boxShadow: isActive boxShadow: isActive
? '0px 4px 11px rgba(215, 142, 6, 0.3)' ? '0px 4px 11px rgba(215, 142, 6, 0.3)'
: 'none', : 'none',
boxSizing: 'border-box',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 4,
minWidth: 0,
}} }}
> >
<div
<span
style={{ style={{
position: 'absolute',
left: tab.labelLeft,
top: 10,
width: tab.labelWidth,
height: 16,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14,
fontSize: 'clamp(11.5px, 3.75vw, 14px)',
lineHeight: '16px', lineHeight: '16px',
color: isActive ? '#ffffff' : '#787878', color: isActive ? '#ffffff' : '#787878',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
{tab.label} {tab.label}
</div>
</span>
{/* Count badge pill 19×19 at (tab.badgeLeft, 7.5) */}
<div
{/* Count badge pill 19×19 */}
<span
style={{ style={{
position: 'absolute',
left: tab.badgeLeft,
top: 7.5,
width: 19, width: 19,
height: 19, height: 19,
borderRadius: 10, borderRadius: 10,
backgroundColor: isActive ? '#ffffff' : '#787878', backgroundColor: isActive ? '#ffffff' : '#787878',
display: 'flex',
display: 'inline-flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
@ -110,11 +97,10 @@ export const OrderFilterTabs: React.FC<OrderFilterTabsProps> = ({
> >
{tab.count} {tab.count}
</span> </span>
</div>
</div>
</span>
</button>
); );
})} })}
</div> </div>
</>
); );
}; };

226
src/components/orders/OrderListCard.tsx

@ -17,116 +17,98 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: 17,
top: order.y,
width: 342,
height: 233,
width: '100%',
minHeight: 233,
padding: 12,
borderRadius: 20, borderRadius: 20,
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff', border: '1px solid #ffffff',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
gap: 15,
}} }}
> >
{/* Top section (318×86 at rel 12, 12) */}
{/* Top section */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 318,
height: 86,
display: 'flex',
flexDirection: 'column',
gap: 10,
}} }}
> >
{/* Row 1: Order code, dot, price, and date */} {/* Row 1: Order code, dot, price, and date */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 318,
height: 26,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
flexWrap: 'wrap',
gap: 8,
minHeight: 26,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 3,
width: 76,
height: 20,
display: 'flex',
alignItems: 'center',
gap: 6,
}}
>
<span
style={{
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '24px', lineHeight: '24px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
}} }}
> >
{order.orderCode} {order.orderCode}
</div>
</span>
<div
<span
style={{ style={{
position: 'absolute',
left: 80,
top: 10,
width: 6, width: 6,
height: 6, height: 6,
borderRadius: '50%', borderRadius: '50%',
backgroundColor: '#dbdbdb', backgroundColor: '#dbdbdb',
flexShrink: 0,
}} }}
/> />
<div
<span
style={{ style={{
position: 'absolute',
left: 90,
top: 0,
width: 53,
height: 26,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '24px', lineHeight: '24px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
{order.price} {order.price}
</span>
</div> </div>
{/* Date on right (rel 218, 4, size 100×18) */}
{/* Date on right */}
<div <div
style={{ style={{
position: 'absolute',
left: 218,
top: 4,
width: 100,
height: 18,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}} }}
> >
<img <img
src="/assets/images/icon-date-time-grey-18.svg" src="/assets/images/icon-date-time-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 2,
width: 78,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
@ -140,14 +122,14 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</div> </div>
</div> </div>
{/* Thumbnails row (315×50 at rel 0, 36) */}
{/* Thumbnails row */}
<div <div
className="habib-scroll-container"
style={{ style={{
position: 'absolute',
left: 0,
top: 36,
width: 315,
height: 50,
display: 'flex',
alignItems: 'center',
gap: 3,
overflowX: 'auto',
}} }}
> >
{order.thumbnails.map((thumb, idx) => ( {order.thumbnails.map((thumb, idx) => (
@ -156,13 +138,11 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
src={thumb.src} src={thumb.src}
alt="" alt=""
style={{ 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, borderRadius: thumb.radius,
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
))} ))}
@ -170,23 +150,21 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
{order.moreCountBadge && ( {order.moreCountBadge && (
<div <div
style={{ style={{
position: 'absolute',
left: 265,
top: 0,
width: 50,
height: 50,
width: 'clamp(42px, 13.5vw, 50px)',
height: 'clamp(42px, 13.5vw, 50px)',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#dbdbdb', backgroundColor: '#dbdbdb',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
style={{ style={{
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16,
fontSize: 15,
lineHeight: '20px', lineHeight: '20px',
color: '#3d3d3d', color: '#3d3d3d',
}} }}
@ -198,46 +176,44 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</div> </div>
</div> </div>
{/* Grey status bar (318×41 at rel 12, 113, radius 8, fill #f3f3f3) */}
{/* Grey status bar */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 113,
width: 318,
height: 41,
width: '100%',
minHeight: 41,
padding: '10px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#f3f3f3', backgroundColor: '#f3f3f3',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
flexWrap: 'wrap',
gap: 8,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 10,
top: 11.5,
width: 298,
height: 18,
display: 'flex',
alignItems: 'center',
gap: 8,
flexWrap: 'wrap',
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-shipping-box-grey-18.svg" src="/assets/images/icon-shipping-box-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14,
fontSize: 13,
lineHeight: '14px', lineHeight: '14px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
@ -245,38 +221,32 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
> >
{order.itemsCountText} {order.itemsCountText}
</span> </span>
</div>
{/* Vertical divider */}
<div <div
style={{ style={{
position: 'absolute',
left: 73,
top: 0.5,
width: 1, width: 1,
height: 17, height: 17,
backgroundColor: '#dbdbdb', backgroundColor: '#dbdbdb',
flexShrink: 0,
}} }}
/> />
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-order-item-next-circle.svg" src="/assets/images/icon-order-item-next-circle.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 83,
top: 1,
width: 16, width: 16,
height: 16, height: 16,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 103,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14,
fontSize: 13,
lineHeight: '14px', lineHeight: '14px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
@ -284,22 +254,19 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
> >
{order.shopsCountText} {order.shopsCountText}
</span> </span>
</div>
</div>
{/* Right delivery count */} {/* Right delivery count */}
<div <div
style={{ style={{
position: 'absolute',
left: 206,
top: 1,
width: 92,
height: 16,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 16, width: 16,
height: 16, height: 16,
borderRadius: 10, borderRadius: 10,
@ -307,6 +274,7 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
@ -320,9 +288,6 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</div> </div>
<span <span
style={{ style={{
position: 'absolute',
left: 20,
top: 1,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
@ -335,45 +300,27 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</span> </span>
</div> </div>
</div> </div>
</div>
{/* View Details button (318×52 at rel 12, 169, radius 11, stroke #efc47e) */}
{/* View Details button */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-order-detail')} onClick={() => navigate('/shop-order-detail')}
style={{ style={{
position: 'absolute',
left: 12,
top: 169,
width: 318,
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: 'transparent', backgroundColor: 'transparent',
border: '1px solid #efc47e', border: '1px solid #efc47e',
padding: 0,
padding: '0 16px',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
marginTop: 'auto',
}} }}
> >
<div
style={{
position: 'absolute',
left: 101.5,
top: 14,
width: 115,
height: 24,
}}
>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
style={{
position: 'absolute',
left: 0,
top: 0,
}}
>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" style={{ flexShrink: 0 }}>
<path <path
d="M5 13V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3L19 3C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V18C21 19 20.4 21 18 21M18 21H6C5 21 3 20.4 3 18V16H15V18C15 20.4 17 21 18 21ZM9 7L17 7M9 11H13" d="M5 13V5C5 4.46957 5.21071 3.96086 5.58579 3.58579C5.96086 3.21071 6.46957 3 7 3L19 3C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V18C21 19 20.4 21 18 21M18 21H6C5 21 3 20.4 3 18V16H15V18C15 20.4 17 21 18 21ZM9 7L17 7M9 11H13"
stroke="#d78e06" stroke="#d78e06"
@ -384,25 +331,16 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</svg> </svg>
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: 0,
width: 89,
height: 24,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 16, fontSize: 16,
lineHeight: '24px', lineHeight: '24px',
color: '#d78e06', color: '#d78e06',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
View Details View Details
</span> </span>
</div>
</button> </button>
</div> </div>
); );

202
src/components/orders/ShipmentStatusCard.tsx

@ -5,102 +5,97 @@ interface ShipmentStatusCardProps {
shipment: ShipmentCardData; 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). * Store shipment status card on `shop-order detail` (4175:10452, 4175:11079, 4175:11149).
*/ */
export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment }) => { export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment }) => {
const progressRatio = Math.max(0, Math.min(1, (shipment.completedSteps - 1) / 3));
return ( return (
<div <div
style={{ style={{
position: 'absolute',
left: 17,
top: shipment.y,
width: 342,
height: shipment.height,
width: '100%',
padding: 12,
borderRadius: 20, borderRadius: 20,
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff', border: '1px solid #ffffff',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
gap: 15,
}} }}
> >
{/* Top store row (rel 12, 12, size 318×27) */}
{/* Top store row */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 318,
height: 27,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
minHeight: 27,
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
gap: 6,
minWidth: 0,
}} }}
> >
<img <img
src={shipment.boothAvatar} src={shipment.boothAvatar}
alt={shipment.boothName} alt={shipment.boothName}
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 27, width: 27,
height: 27, height: 27,
borderRadius: 75, borderRadius: 75,
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 32.54,
top: 5,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '13.15px',
lineHeight: '14px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
{shipment.boothName} {shipment.boothName}
</span> </span>
</div>
{/* Right status badge */} {/* Right status badge */}
<div <div
style={{ style={{
position: 'absolute',
left: shipment.statusBadgeLeft,
top: 0,
width: shipment.statusBadgeWidth,
height: 27,
minHeight: 27,
padding: '0 8px',
borderRadius: 8, borderRadius: 8,
backgroundColor: shipment.statusBg, backgroundColor: shipment.statusBg,
display: 'inline-flex',
alignItems: 'center',
gap: 5,
flexShrink: 0,
}} }}
> >
<img <img
src={shipment.statusIconSrc} src={shipment.statusIconSrc}
alt="" alt=""
style={{ style={{
position: 'absolute',
left: shipment.statusIconLeft,
top: shipment.statusIconTop,
width: shipment.statusIconSize, width: shipment.statusIconSize,
height: shipment.statusIconSize, height: shipment.statusIconSize,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: shipment.statusTextLeft,
top: 6.5,
width: shipment.statusTextWidth,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
@ -114,14 +109,14 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
</div> </div>
</div> </div>
{/* Thumbnails row (rel 15, 54, size 315×50) */}
{/* Thumbnails row */}
<div <div
className="habib-scroll-container"
style={{ style={{
position: 'absolute',
left: 15,
top: 54,
width: 315,
height: 50,
display: 'flex',
alignItems: 'center',
gap: 3,
overflowX: 'auto',
}} }}
> >
{shipment.thumbnails.map((thumb, idx) => ( {shipment.thumbnails.map((thumb, idx) => (
@ -130,58 +125,51 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
src={thumb.src} src={thumb.src}
alt="" alt=""
style={{ 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, borderRadius: thumb.radius,
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
))} ))}
</div> </div>
{/* Grey info box (rel 12, 119, width 318, height 38 or 66, radius 8, fill #f3f3f3) */}
{/* Grey info box */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 119,
width: 318,
height: shipment.infoBoxHeight,
width: '100%',
padding: '10px 8px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#f3f3f3', backgroundColor: '#f3f3f3',
display: 'flex',
flexDirection: 'column',
gap: 10,
}} }}
> >
{shipment.infoRows.map((row, idx) => ( {shipment.infoRows.map((row, idx) => (
<div <div
key={idx} key={idx}
style={{ style={{
position: 'absolute',
left: 8,
top: row.relY,
width: 302,
height: 18,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
minHeight: 18,
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4, minWidth: 0 }}>
<img <img
src={row.iconSrc} src={row.iconSrc}
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 2,
width: row.labelWidth,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
@ -192,17 +180,16 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
> >
{row.label} {row.label}
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: row.valueLeft,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
lineHeight: '14px', lineHeight: '14px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
textAlign: 'right',
wordBreak: 'break-all',
}} }}
> >
{row.value} {row.value}
@ -211,40 +198,38 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
))} ))}
</div> </div>
{/* 4-Step Progress Bar (rel 12, shipment.stepperRelY, size 318×37) */}
{/* 4-Step Progress Bar */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: shipment.stepperRelY,
width: 318,
height: 37,
position: 'relative',
width: '100%',
minHeight: 37,
display: 'flex',
alignItems: 'flex-start',
justifyContent: 'space-between',
}} }}
> >
{/* Grey background line (265×1 at rel 25, 9) */}
{/* Connecting line between first and last step centers (24px inset) */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 25,
left: 24,
right: 24,
top: 9, top: 9,
width: 265,
height: 1, height: 1,
backgroundColor: '#8b8b8b', backgroundColor: '#8b8b8b',
}} }}
/>
{/* Green active line (greenLineWidth×1 at rel 24, 9) */}
>
<div <div
style={{ style={{
position: 'absolute',
left: 24,
top: 9,
width: shipment.greenLineWidth,
height: 1,
width: `${progressRatio * 100}%`,
height: '100%',
backgroundColor: '#0eb13c', backgroundColor: '#0eb13c',
}} }}
/> />
</div>
{STEP_LABELS.map((step, index) => {
{STEP_LABELS.map((label, index) => {
const isCompleted = index < shipment.completedSteps; const isCompleted = index < shipment.completedSteps;
const labelColor = const labelColor =
index === 3 index === 3
@ -254,14 +239,21 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
: '#8b8b8b'; : '#8b8b8b';
return ( return (
<React.Fragment key={step.label}>
{/* Circle 18×18 at (step.circleLeft, 0) */}
<div
key={label}
style={{
position: 'relative',
zIndex: 1,
width: 48,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 5,
}}
>
{isCompleted ? ( {isCompleted ? (
<div <div
style={{ style={{
position: 'absolute',
left: step.circleLeft,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
borderRadius: 10, borderRadius: 10,
@ -283,20 +275,17 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
) : ( ) : (
<div <div
style={{ style={{
position: 'absolute',
left: step.circleLeft,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
borderRadius: 10, borderRadius: 10,
backgroundColor: '#8b8b8b', backgroundColor: '#8b8b8b',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 5,
top: 5,
width: 8, width: 8,
height: 8, height: 8,
borderRadius: 10, borderRadius: 10,
@ -306,25 +295,20 @@ export const ShipmentStatusCard: React.FC<ShipmentStatusCardProps> = ({ shipment
</div> </div>
)} )}
{/* Step Label at (step.left, 23) */}
<div
<span
style={{ style={{
position: 'absolute',
left: step.left,
top: 23,
width: step.width,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
lineHeight: '13.9px', lineHeight: '13.9px',
color: labelColor, color: labelColor,
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
{step.label}
{label}
</span>
</div> </div>
</React.Fragment>
); );
})} })}
</div> </div>

4
src/data/routesRegistry.ts

@ -28,11 +28,11 @@ export const ALL_IMPLEMENTED_ROUTES: ScreenRouteEntry[] = [
aliases: ['/'], aliases: ['/'],
category: 'Home & Discovery', category: 'Home & Discovery',
width: 375, width: 375,
height: 1150,
height: 1074,
refImage: '/assets/images/references/ref-shop-home.png', 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.', 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: [ 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 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.' }, { label: 'Open Single Product Card', route: '/shop-single-page', description: 'Click any product card to view product details.' },
], ],

628
src/index.css

@ -1,5 +1,33 @@
@import './styles/tokens.css'; @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, *::before,
*::after { *::after {
@ -22,6 +50,7 @@ body {
#root { #root {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
min-height: 100dvh;
} }
button, button,
@ -33,21 +62,76 @@ textarea {
background: none; background: none;
} }
input,
textarea {
user-select: text;
}
.habib-search-input::placeholder,
.habib-textarea::placeholder {
color: #8f8f8f;
opacity: 1;
}
a { a {
color: inherit; color: inherit;
text-decoration: none; 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 { .habib-mobile-viewport {
position: relative; 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; flex-shrink: 0;
user-select: none; 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 { .habib-node-btn {
cursor: pointer; cursor: pointer;
transition: opacity 0.12s ease; transition: opacity 0.12s ease;
@ -57,6 +141,25 @@ a {
opacity: 0.85; 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 { .habib-scroll-container {
scrollbar-width: none; scrollbar-width: none;
-ms-overflow-style: none; -ms-overflow-style: none;
@ -66,3 +169,520 @@ a {
display: none; 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;
}
}

850
src/pages/account/LanguageSettingPage.tsx
File diff suppressed because it is too large
View File

477
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 { useNavigate } from 'react-router-dom';
import { MobileShell } from '../../components/layout/MobileShell'; import { MobileShell } from '../../components/layout/MobileShell';
import { HabibCoinsBanner } from '../../components/account/HabibCoinsBanner'; import { HabibCoinsBanner } from '../../components/account/HabibCoinsBanner';
@ -15,18 +15,35 @@ import {
*/ */
export const ProviderRequestPage: React.FC = () => { export const ProviderRequestPage: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const [fullName, setFullName] = useState('');
const [email, setEmail] = useState('');
const [phoneNumber, setPhoneNumber] = useState('');
return ( return (
<MobileShell width={375} height={1768} backgroundColor="#f5f5f5"> <MobileShell width={375} height={1768} backgroundColor="#f5f5f5">
{/* Top Left Back Button (4214:10545) at (16, 21), 40×40 */}
<div
style={{
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '21px var(--page-px) 44px',
gap: 23,
}}
>
{/* Top Bar: Back + Center Avatar + Edit/Camera */}
<div
style={{
display: 'flex',
alignItems: 'flex-start',
justifyContent: 'space-between',
minHeight: 89,
}}
>
<button <button
type="button" type="button"
onClick={() => navigate('/shop-account')} onClick={() => navigate('/shop-account')}
aria-label="Back" aria-label="Back"
style={{ style={{
position: 'absolute',
left: 16,
top: 21,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -34,45 +51,40 @@ export const ProviderRequestPage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-back-arrow-dark.svg" src="/assets/images/icon-back-arrow-dark.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 11,
top: 12,
width: 18.22, width: 18.22,
height: 15.21, height: 15.21,
}} }}
/> />
</button> </button>
{/* Top Center Avatar (4214:10552) at (146, 26), 84×84 */}
<img <img
src="/assets/images/avatar-provider-ahd-art.png" src="/assets/images/avatar-provider-ahd-art.png"
alt="Profile" alt="Profile"
style={{ style={{
position: 'absolute',
left: 146,
top: 26,
marginTop: 5,
width: 84, width: 84,
height: 84, height: 84,
borderRadius: 80, borderRadius: 80,
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
{/* Top Right Logout Button (4214:10553) at (319, 21), 40×40 */}
<button <button
type="button" type="button"
onClick={() => navigate('/language-setting')} onClick={() => navigate('/language-setting')}
aria-label="Logout" aria-label="Logout"
style={{ style={{
position: 'absolute',
left: 319,
top: 21,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -80,540 +92,490 @@ export const ProviderRequestPage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-camera-edit-white.svg" src="/assets/images/icon-camera-edit-white.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 8,
top: 8,
width: 24, width: 24,
height: 24, height: 24,
}} }}
/> />
</button> </button>
</div>
{/* Form Card (4214:10540) at (16, 136), 343×335 */}
{/* Form Card (4214:10540) */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 136,
width: 343,
height: 335,
width: '100%',
padding: '20px 12px',
borderRadius: 16.5, borderRadius: 16.5,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(71, 85, 105, 0.1)', boxShadow: '0px 2px 13px rgba(71, 85, 105, 0.1)',
display: 'flex',
flexDirection: 'column',
gap: 20,
}} }}
/>
{/* Field 1: Full Name at (28, 156) */}
<div
>
{/* Field 1: Full Name */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
<label
htmlFor="provider-full-name"
style={{ style={{
position: 'absolute',
left: 28,
top: 156,
width: 164,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
lineHeight: '17px',
lineHeight: '20px',
color: '#3d3d3d', color: '#3d3d3d',
display: 'flex',
alignItems: 'center',
}} }}
> >
Full Name Full Name
</div>
<div
style={{
position: 'absolute',
left: 28,
top: 184,
width: 321,
</label>
<input
id="provider-full-name"
type="text"
className="habib-search-input"
value={fullName}
onChange={(e) => setFullName(e.target.value)}
placeholder="Full Name"
style={{
width: '100%',
height: 55, height: 55,
padding: '0 15px',
borderRadius: 11, borderRadius: 11,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
border: '1px solid #8b8b8b', border: '1px solid #8b8b8b',
boxSizing: 'border-box', boxSizing: 'border-box',
}}
>
<span
style={{
position: 'absolute',
left: 15,
top: 17.5,
width: 63,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#8b8b8b',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
color: '#111111',
}} }}
>
Full Name
</span>
/>
</div> </div>
{/* Field 2: Email at (28, 262) */}
<div
{/* Field 2: Email */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
<label
htmlFor="provider-email"
style={{ style={{
position: 'absolute',
left: 28,
top: 262,
width: 164,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
lineHeight: '17px',
lineHeight: '20px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
}} }}
> >
Email Email
</div>
<div
style={{
position: 'absolute',
left: 28,
top: 290,
width: 321,
</label>
<input
id="provider-email"
type="email"
className="habib-search-input"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="Email"
style={{
width: '100%',
height: 55, height: 55,
padding: '0 15px',
borderRadius: 11, borderRadius: 11,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
border: '1px solid #8b8b8b', border: '1px solid #8b8b8b',
boxSizing: 'border-box', boxSizing: 'border-box',
}}
>
<span
style={{
position: 'absolute',
left: 15,
top: 17.5,
width: 33,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#8b8b8b',
display: 'flex',
alignItems: 'center',
color: '#111111',
}} }}
>
Email
</span>
/>
</div> </div>
{/* Field 3: Phone Number at (28, 368) */}
<div
{/* Field 3: Phone Number */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
<label
htmlFor="provider-phone"
style={{ style={{
position: 'absolute',
left: 28,
top: 368,
width: 164,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
lineHeight: '17px',
lineHeight: '20px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
}} }}
> >
Phone Number Phone Number
</div>
</label>
<div <div
style={{ style={{
position: 'absolute',
left: 28,
top: 396,
width: 321,
width: '100%',
height: 55, height: 55,
padding: '0 15px',
borderRadius: 11, borderRadius: 11,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
border: '1px solid #8b8b8b', border: '1px solid #8b8b8b',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
alignItems: 'center',
gap: 8,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 15,
top: 17.5,
width: 25,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#292a2e', color: '#292a2e',
display: 'flex',
alignItems: 'center',
flexShrink: 0,
}} }}
> >
+23 +23
</span> </span>
<div <div
style={{ style={{
position: 'absolute',
left: 48,
top: 19,
width: 1, width: 1,
height: 17, height: 17,
backgroundColor: '#292a2e', backgroundColor: '#292a2e',
flexShrink: 0,
}} }}
/> />
<span
style={{
position: 'absolute',
left: 56,
top: 17.5,
width: 92,
height: 20,
<input
id="provider-phone"
type="tel"
className="habib-search-input"
value={phoneNumber}
onChange={(e) => setPhoneNumber(e.target.value)}
placeholder="Phone number"
style={{
flex: 1,
minWidth: 0,
height: '100%',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#8b8b8b',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
color: '#111111',
backgroundColor: 'transparent',
}} }}
>
Phone number
</span>
/>
</div>
</div>
</div> </div>
{/* Provider Status Card (4214:10539) at (16, 494), 343×175 */}
{/* Provider Status Card (4214:10539) */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 494,
width: 343,
height: 175,
width: '100%',
padding: '14px 12px 16px',
borderRadius: 16.5, borderRadius: 16.5,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(71, 85, 105, 0.1)', boxShadow: '0px 2px 13px rgba(71, 85, 105, 0.1)',
display: 'flex',
flexDirection: 'column',
gap: 11,
}} }}
/>
>
<div <div
style={{ style={{
position: 'absolute',
left: 31,
top: 508,
width: 161,
height: 14,
padding: '0 3px',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#73889d', color: '#73889d',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
}} }}
> >
Your are a provider in: Your are a provider in:
</div> </div>
{/* 3 Provider Badge Cards */}
<div className="habib-provider-badges-grid">
{PROVIDER_BADGE_CARDS.map((badge) => ( {PROVIDER_BADGE_CARDS.map((badge) => (
<ProviderBadgeCard key={badge.id} badge={badge} /> <ProviderBadgeCard key={badge.id} badge={badge} />
))} ))}
</div>
</div>
{/* Habib Coins Banner (4214:10558) at (16, 692), 343×55 */}
{/* Habib Coins Banner (4214:10558) */}
<HabibCoinsBanner /> <HabibCoinsBanner />
{/* "Become a provider on Habib" Card (4214:10599) at (16, 770), 343×55 */}
{/* "Become a provider on Habib" Card (4214:10599) */}
<div <div
onClick={() => navigate('/language-setting')} onClick={() => navigate('/language-setting')}
style={{ style={{
position: 'absolute',
left: 16,
top: 770,
width: 343,
height: 55,
width: '100%',
minHeight: 55,
padding: '10px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)', boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.25)',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
gap: 10,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 13,
top: 10,
width: 34, width: 34,
height: 34, height: 34,
borderRadius: 11, borderRadius: 11,
backgroundColor: 'rgba(17, 17, 17, 0.1)', backgroundColor: 'rgba(17, 17, 17, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
/>
>
<img <img
src="/assets/images/icon-menu-bookmark-subtract.svg" src="/assets/images/icon-menu-bookmark-subtract.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 23,
top: 18,
width: 15, width: 15,
height: 18, height: 18,
}} }}
/> />
</div>
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 20,
width: 161,
height: 14,
flex: 1,
minWidth: 0,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
}} }}
> >
Become a provider on Habib Become a provider on Habib
</div> </div>
</div> </div>
{/* "My Wallet ($24)" Card (4214:10615) at (16, 848), 343×55 */}
{/* "My Wallet ($24)" Card (4214:10615) */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 848,
width: 343,
height: 55,
width: '100%',
minHeight: 55,
padding: '10px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
gap: 10,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 13,
top: 11,
width: 34, width: 34,
height: 34, height: 34,
borderRadius: 11, borderRadius: 11,
backgroundColor: 'rgba(17, 17, 17, 0.1)', backgroundColor: 'rgba(17, 17, 17, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
/>
>
<img <img
src="/assets/images/icon-menu-edit-profile-user.svg" src="/assets/images/icon-menu-edit-profile-user.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 21,
top: 19,
width: 18, width: 18,
height: 18, height: 18,
}} }}
/> />
</div>
<div
style={{
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 55,
top: 16,
width: 161,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
}} }}
> >
My Wallet ($24) My Wallet ($24)
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 55,
top: 29,
width: 244,
height: 11,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#73889d', color: '#73889d',
display: 'flex',
alignItems: 'center',
}} }}
> >
Habib Income Habib Income
</div> </div>
</div>
<img <img
src="/assets/images/icon-menu-arrow-right.svg" src="/assets/images/icon-menu-arrow-right.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 325,
top: 23.63,
width: 5, width: 5,
height: 10, height: 10,
flexShrink: 0,
}} }}
/> />
</div> </div>
{/* Settings Card (4214:10627) at (16, 926), 343×305 */}
{/* Settings Card (4214:10627) */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 926,
width: 343,
height: 305,
width: '100%',
padding: '18px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.21)', boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.21)',
display: 'flex',
flexDirection: 'column',
gap: 19,
}} }}
/>
>
{PROVIDER_SETTINGS_MENU_ROWS.map((row) => ( {PROVIDER_SETTINGS_MENU_ROWS.map((row) => (
<AccountMenuRow key={row.id} row={row} /> <AccountMenuRow key={row.id} row={row} />
))} ))}
</div>
{/* Info Card (4214:10628) at (16, 1254), 343×182 */}
{/* Info Card (4214:10628) */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 1254,
width: 343,
height: 182,
width: '100%',
padding: '18px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.21)', boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.21)',
display: 'flex',
flexDirection: 'column',
gap: 19,
}} }}
/>
>
{PROVIDER_INFO_MENU_ROWS.map((row) => ( {PROVIDER_INFO_MENU_ROWS.map((row) => (
<AccountMenuRow key={row.id} row={row} /> <AccountMenuRow key={row.id} row={row} />
))} ))}
</div>
{/* Delete Account Card (4214:10703) at (16, 1459), 343×55 */}
{/* Delete Account Card (4214:10703) */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 1459,
width: 343,
height: 55,
width: '100%',
minHeight: 55,
padding: '10px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
gap: 10,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 13,
top: 11,
width: 34, width: 34,
height: 34, height: 34,
borderRadius: 11, borderRadius: 11,
backgroundColor: 'rgba(17, 17, 17, 0.1)', backgroundColor: 'rgba(17, 17, 17, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
/>
>
<img <img
src="/assets/images/icon-logout-door-red.svg" src="/assets/images/icon-logout-door-red.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 20,
top: 18,
width: 20, width: 20,
height: 20, height: 20,
}} }}
/> />
</div>
<div
style={{
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 13,
width: 161,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#d44747', color: '#d44747',
display: 'flex',
alignItems: 'center',
}} }}
> >
Delete Account Delete Account
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 30,
width: 244,
height: 11,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#8b8b8b', color: '#8b8b8b',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
wordBreak: 'break-word',
}} }}
> >
Permanently remove user and associated data Permanently remove user and associated data
</div> </div>
</div> </div>
</div>
{/* Footer Version "Habib | Version 2.1" (4214:10538) at (143, 1569), 89×11 */}
{/* Footer Version & Social Icons */}
<div
style={{
marginTop: 32,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 28,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 143,
top: 1569,
width: 89,
height: 11,
fontFamily: 'var(--font-inter)', fontFamily: 'var(--font-inter)',
fontWeight: 400, fontWeight: 400,
fontSize: 10, fontSize: 10,
lineHeight: '20px', lineHeight: '20px',
color: '#203bcc', color: '#203bcc',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
textAlign: 'center',
}} }}
> >
Habib | Version 2.1 Habib | Version 2.1
</div> </div>
{/* Footer Social Icons at y=1632 */}
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 27,
}}
>
<img <img
src="/assets/images/icon-social-instagram.svg" src="/assets/images/icon-social-instagram.svg"
alt="Instagram" alt="Instagram"
style={{ style={{
position: 'absolute',
left: 112,
top: 1632,
width: 32, width: 32,
height: 31, height: 31,
cursor: 'pointer', cursor: 'pointer',
@ -623,9 +585,6 @@ export const ProviderRequestPage: React.FC = () => {
src="/assets/images/icon-social-telegram.svg" src="/assets/images/icon-social-telegram.svg"
alt="Telegram" alt="Telegram"
style={{ style={{
position: 'absolute',
left: 171,
top: 1632,
width: 32, width: 32,
height: 31, height: 31,
cursor: 'pointer', cursor: 'pointer',
@ -635,14 +594,14 @@ export const ProviderRequestPage: React.FC = () => {
src="/assets/images/icon-social-youtube.svg" src="/assets/images/icon-social-youtube.svg"
alt="WhatsApp" alt="WhatsApp"
style={{ style={{
position: 'absolute',
left: 230,
top: 1632.89,
width: 30.25, width: 30.25,
height: 30.28, height: 30.28,
cursor: 'pointer', cursor: 'pointer',
}} }}
/> />
</div>
</div>
</div>
</MobileShell> </MobileShell>
); );
}; };

170
src/pages/account/ShopAccountPage.tsx

@ -17,40 +17,33 @@ export const ShopAccountPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Avatar Circle (4215:11560) at (145, 21), 84×84, radius 78.5, fill #768293 */}
<div <div
style={{ style={{
position: 'absolute',
left: 145,
top: 21,
width: 84,
height: 84,
borderRadius: 78.5,
backgroundColor: '#768293',
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '21px var(--page-px) 24px',
}} }}
> >
<img
src="/assets/images/icon-account-avatar-gold.svg"
alt="Habib shoper"
{/* Top Profile Header */}
<div
style={{ style={{
position: 'absolute',
left: 26,
top: 25.48,
width: 31,
height: 33.04,
position: 'relative',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginBottom: 31,
}} }}
/>
</div>
{/* Right Edit Profile Button (4214:11436) at (319, 21), 40×40 */}
>
{/* Right Edit Profile Button (4214:11436) */}
<button <button
type="button" type="button"
onClick={() => navigate('/provider-requst')} onClick={() => navigate('/provider-requst')}
aria-label="Edit Profile" aria-label="Edit Profile"
style={{ style={{
position: 'absolute', position: 'absolute',
left: 319,
top: 21,
right: 0,
top: 0,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -58,172 +51,173 @@ export const ShopAccountPage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
src="/assets/images/icon-edit-pencil-gold.svg" src="/assets/images/icon-edit-pencil-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 8,
top: 8,
width: 24, width: 24,
height: 24, height: 24,
}} }}
/> />
</button> </button>
{/* User Name "Habib shoper" (4214:366) at (131, 114), 114×26 */}
{/* Avatar Circle (4215:11560) */}
<div <div
style={{ style={{
position: 'absolute',
left: 131,
top: 114,
width: 114,
height: 26,
width: 84,
height: 84,
borderRadius: 78.5,
backgroundColor: '#768293',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<img
src="/assets/images/icon-account-avatar-gold.svg"
alt="Habib shoper"
style={{
width: 31,
height: 33.04,
}}
/>
</div>
{/* User Name "Habib shoper" (4214:366) */}
<div
style={{
marginTop: 9,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 18, fontSize: 18,
lineHeight: '26px', lineHeight: '26px',
color: '#111111', color: '#111111',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
Habib shoper Habib shoper
</div> </div>
{/* Phone "09102036523" (4214:367) at (158, 143), 60×13 */}
{/* Phone "09102036523" (4214:367) */}
<div <div
style={{ style={{
position: 'absolute',
left: 158,
top: 143,
width: 60,
height: 13,
marginTop: 3,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#8b8b8b', color: '#8b8b8b',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
09102036523 09102036523
</div> </div>
</div>
{/* 3 Order Status Counter Cards (4215:11563) at (16, 187), 343×46 */}
<div
style={{
position: 'absolute',
left: 16,
top: 187,
width: 343,
height: 46,
}}
>
{/* 3 Order Status Counter Cards (4215:11563) */}
<div className="habib-counters-grid" style={{ marginBottom: 24 }}>
{ACCOUNT_ORDER_COUNTERS.map((counter) => ( {ACCOUNT_ORDER_COUNTERS.map((counter) => (
<OrderCounterCard key={counter.id} counter={counter} /> <OrderCounterCard key={counter.id} counter={counter} />
))} ))}
</div> </div>
{/* White Menu Card Background (4214:364) at (16, 257), 343×304 */}
{/* White Menu Card (4214:364) with 5 Account Menu Rows */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 257,
width: 343,
height: 304,
width: '100%',
padding: '18px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#fbfbfc', backgroundColor: '#fbfbfc',
boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.21)', boxShadow: '0px 2px 13px rgba(180, 187, 200, 0.21)',
display: 'flex',
flexDirection: 'column',
gap: 19,
marginBottom: 15,
}} }}
/>
{/* 5 Account Menu Rows */}
>
{SHOP_ACCOUNT_MENU_ROWS.map((row) => ( {SHOP_ACCOUNT_MENU_ROWS.map((row) => (
<AccountMenuRow key={row.id} row={row} /> <AccountMenuRow key={row.id} row={row} />
))} ))}
</div>
{/* Sign Out Card (4214:464) at (16, 576), 343×55 */}
{/* Sign Out Card (4214:464) */}
<div <div
onClick={() => navigate('/shop-home')} onClick={() => navigate('/shop-home')}
style={{ style={{
position: 'absolute',
left: 16,
top: 576,
width: 343,
height: 55,
width: '100%',
minHeight: 55,
padding: '10px 13px',
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
gap: 10,
}} }}
> >
{/* Icon Box (34×34 at abs 29, 587 -> rel 13, 11) */}
<div <div
style={{ style={{
position: 'absolute',
left: 13,
top: 11,
width: 34, width: 34,
height: 34, height: 34,
borderRadius: 11, borderRadius: 11,
backgroundColor: 'rgba(17, 17, 17, 0.1)', backgroundColor: 'rgba(17, 17, 17, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
/>
>
<img <img
src="/assets/images/icon-exit-booth-red.svg" src="/assets/images/icon-exit-booth-red.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 22,
top: 19,
width: 19, width: 19,
height: 19, height: 19,
}} }}
/> />
</div>
<div
style={{
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 13,
width: 161,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '16px', lineHeight: '16px',
color: '#d44747', color: '#d44747',
display: 'flex',
alignItems: 'center',
}} }}
> >
Sign out Sign out
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 57,
top: 30,
width: 244,
height: 11,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#8b8b8b', color: '#8b8b8b',
display: 'flex',
alignItems: 'center',
}} }}
> >
sign out from account sign out from account
</div> </div>
</div> </div>
</div>
</div>
{/* Bottom Navigation Bar (4214:470) at y=736 */}
<BottomNavBar activeTab="account" top={736} showCartBadge={true} />
{/* Bottom Navigation Bar (4214:470) */}
<BottomNavBar activeTab="account" showCartBadge={true} />
</MobileShell> </MobileShell>
); );
}; };

26
src/pages/account/ShopAddressPage.tsx

@ -20,21 +20,28 @@ export const ShopAddressPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Header: Back button at (16, 21) + "My Adresses" at (114, 29) */}
{/* Top Header: Back button + "My Adresses" */}
<StandardPageHeader <StandardPageHeader
title="My Adresses" title="My Adresses"
titleTop={29} titleTop={29}
backTo="/shop-account" backTo="/shop-account"
/> />
{/* Saved Addresses List (4182:13410) at (14, 93), 348×184 */}
<div <div
style={{ style={{
position: 'absolute',
left: 14,
top: 93,
width: 348,
height: 184,
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '32px var(--page-px) 28px',
gap: 22,
}}
>
{/* Saved Addresses List (4182:13410) */}
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: 10,
}} }}
> >
{addresses.map((address) => ( {addresses.map((address) => (
@ -47,8 +54,9 @@ export const ShopAddressPage: React.FC = () => {
))} ))}
</div> </div>
{/* Add New Address Card (4182:13457) at (14, 299), 348×53 */}
<AddNewAddressCard left={14} top={299} />
{/* Add New Address Card (4182:13457) */}
<AddNewAddressCard />
</div>
</MobileShell> </MobileShell>
); );
}; };

443
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 { useNavigate } from 'react-router-dom';
import { MobileShell } from '../../components/layout/MobileShell'; import { MobileShell } from '../../components/layout/MobileShell';
import { StatusBar } from '../../components/layout/StatusBar';
import { GridProductCard } from '../../components/common/GridProductCard'; import { GridProductCard } from '../../components/common/GridProductCard';
import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData'; import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData';
@ -10,67 +9,110 @@ import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData';
*/ */
export const ShopBoothPage: React.FC = () => { export const ShopBoothPage: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const [copied, setCopied] = useState(false);
const copyTimerRef = useRef<number | undefined>(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 ( return (
<MobileShell width={375} height={1233} backgroundColor="#f3f1ef"> <MobileShell width={375} height={1233} backgroundColor="#f3f1ef">
{/* Whole-Body Scrollable Container */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 1233,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
{/* Top Banner Calligraphy Image & Floating Actions */}
<div <div
style={{ style={{
position: 'relative', position: 'relative',
width: 375,
height: 1290,
}}
>
{/* Top Banner Calligraphy Image (4129:16355) at (0, 0), 375×152 */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 375,
width: '100%',
height: 152, height: 152,
overflow: 'hidden', overflow: 'hidden',
pointerEvents: 'none',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/bg-booth-calligraphy-header.png" src="/assets/images/bg-booth-calligraphy-header.png"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 152,
width: '100%',
height: '100%',
objectFit: 'cover', objectFit: 'cover',
display: 'block',
pointerEvents: 'none',
}} }}
/> />
</div>
{/* Status Bar (4129:15736) */}
<StatusBar variant="dark" height={35} />
{/* Back Button (4129:15761) at (16, 35) */}
<div
style={{
position: 'absolute',
top: 35,
left: 'var(--page-px)',
right: 'var(--page-px)',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
}}
>
<button <button
type="button" type="button"
onClick={() => navigate('/shop-home')} onClick={() => navigate('/shop-home')}
aria-label="Back" aria-label="Back"
style={{ style={{
position: 'absolute',
left: 16,
top: 35,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -78,42 +120,43 @@ export const ShopBoothPage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
src="/assets/images/icon-back-arrow-dark.svg" src="/assets/images/icon-back-arrow-dark.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 11,
top: 13,
width: 18.22, width: 18.22,
height: 14.56, height: 14.56,
}} }}
/> />
</button> </button>
{/* Right Top Actions (4129:15767) at (271, 35), 88×40 */}
{/* Right Top Actions */}
<div style={{ position: 'relative', width: 88, height: 40 }}>
<img <img
src="/assets/images/header-booth-share-cart-pill.svg" src="/assets/images/header-booth-share-cart-pill.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 271,
top: 35,
width: 88, width: 88,
height: 40, height: 40,
display: 'block',
pointerEvents: 'none', pointerEvents: 'none',
}} }}
/> />
<button <button
type="button" type="button"
onClick={() => navigate('/shop-single-page')}
onClick={() => {
void handleShare();
}}
aria-label="Share" aria-label="Share"
style={{ style={{
position: 'absolute', position: 'absolute',
left: 271,
top: 35,
left: 0,
top: 0,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -129,8 +172,8 @@ export const ShopBoothPage: React.FC = () => {
aria-label="Cart" aria-label="Cart"
style={{ style={{
position: 'absolute', position: 'absolute',
left: 319,
top: 35,
left: 48,
top: 0,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -140,15 +183,28 @@ export const ShopBoothPage: React.FC = () => {
cursor: 'pointer', cursor: 'pointer',
}} }}
/> />
</div>
</div>
</div>
{/* Circular Store Avatar (4129:16345) at (155, 55), 64×64 */}
{/* Store Profile & Products Body */}
<div
style={{
position: 'relative',
zIndex: 1,
marginTop: -97,
flex: 1,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
padding: '0 var(--page-px) 32px',
}}
>
{/* Circular Store Avatar */}
<img <img
src="/assets/images/avatar-tashakol-booth.png" src="/assets/images/avatar-tashakol-booth.png"
alt="TashakolFarzandan Rohhallah" alt="TashakolFarzandan Rohhallah"
style={{ style={{
position: 'absolute',
left: 155,
top: 55,
width: 64, width: 64,
height: 64, height: 64,
borderRadius: 32, borderRadius: 32,
@ -158,54 +214,41 @@ export const ShopBoothPage: React.FC = () => {
}} }}
/> />
{/* Store Title "TashakolFarzandan Rohhallah" (4129:16389) at (15, 131), 344×20 */}
<div
{/* Store Title */}
<h1
style={{ style={{
position: 'absolute',
left: 15,
top: 131,
width: 344,
height: 20,
marginTop: 12,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '20px', lineHeight: '20px',
color: '#151c31', color: '#151c31',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
width: '100%',
}} }}
> >
TashakolFarzandan Rohhallah TashakolFarzandan Rohhallah
</div>
</h1>
{/* Iran Flag + "Iran | Tehran" (4129:16390) at (140, 157), 94×19 */}
{/* Iran Flag + "Iran | Tehran" */}
<div <div
style={{ style={{
position: 'absolute',
left: 140,
top: 157,
width: 94,
height: 19,
marginTop: 6,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}} }}
> >
<img <img
src="/assets/images/icon-flag-iran-19.svg" src="/assets/images/icon-flag-iran-19.svg"
alt="Iran" alt="Iran"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 19, width: 19,
height: 19, height: 19,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 1,
width: 72,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
@ -218,67 +261,54 @@ export const ShopBoothPage: React.FC = () => {
</span> </span>
</div> </div>
{/* Store Stats Row (4129:16452) at (15, 188), 344×31 */}
{/* Store Stats Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 15,
top: 188,
width: 344,
height: 31,
marginTop: 12,
width: '100%',
maxWidth: 460,
minHeight: 31,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-around',
gap: 6,
}} }}
> >
{/* Star + "4.4 (608)" at abs (34, 196) -> rel (19, 8) */}
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 3 }}>
<img <img
src="/assets/images/icon-star-rating-16.svg" src="/assets/images/icon-star-rating-16.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 19,
top: 8,
width: 16, width: 16,
height: 15, height: 15,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 37,
top: 9,
width: 41,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#747474', color: '#747474',
textAlign: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
4.4 (608) 4.4 (608)
</span> </span>
</div>
{/* Divider 1 (4129:16483) at abs (120.75, 197.5) -> rel (105.75, 9.5) */}
<div <div
style={{ style={{
position: 'absolute',
left: 105.75,
top: 9.5,
width: 1, width: 1,
height: 12, height: 12,
backgroundColor: '#d7dbe2', backgroundColor: '#d7dbe2',
flexShrink: 0,
}} }}
/> />
{/* "+1 year membership" (4129:16476) at abs (148.5, 197) -> rel (133.5, 9) */}
<span <span
style={{ style={{
position: 'absolute',
left: 133.5,
top: 9,
width: 93,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
@ -291,26 +321,17 @@ export const ShopBoothPage: React.FC = () => {
+1 year membership +1 year membership
</span> </span>
{/* Divider 2 (4129:16481) at abs (269.25, 197.5) -> rel (254.25, 9.5) */}
<div <div
style={{ style={{
position: 'absolute',
left: 254.25,
top: 9.5,
width: 1, width: 1,
height: 12, height: 12,
backgroundColor: '#d7dbe2', backgroundColor: '#d7dbe2',
flexShrink: 0,
}} }}
/> />
{/* "+60 sales" (4129:16478) at abs (297, 197) -> rel (282, 9) */}
<span <span
style={{ style={{
position: 'absolute',
left: 282,
top: 9,
width: 43,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 10, fontSize: 10,
@ -324,44 +345,39 @@ export const ShopBoothPage: React.FC = () => {
</span> </span>
</div> </div>
{/* 3 Store Metric Cards (4129:16522) at (15, 240), 344×58 */}
{/* Card 1: 2h Avg. Response (4129:16523) at (15, 240), 110×58 */}
{/* 3 Store Metric Cards */}
<div className="habib-booth-metrics-grid" style={{ marginTop: 21 }}>
{/* Card 1: 2h Avg. Response */}
<div <div
onClick={() => navigate('/shop-chat')} onClick={() => navigate('/shop-chat')}
style={{ style={{
position: 'absolute',
left: 15,
top: 240,
width: 110,
height: 58,
minHeight: 58,
padding: '8px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#efece9', backgroundColor: '#efece9',
border: '1px solid #e8e4df', border: '1px solid #e8e4df',
boxSizing: 'border-box',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minWidth: 0,
}} }}
> >
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-booth-chat-dots.svg" src="/assets/images/icon-booth-chat-dots.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 9,
top: 8,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 37,
top: 8,
width: 19,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16,
fontSize: 'clamp(14px, 4.3vw, 16px)',
lineHeight: '20px', lineHeight: '20px',
background: 'linear-gradient(195deg, #eaba73 0%, #d78e06 100%)', background: 'linear-gradient(195deg, #eaba73 0%, #d78e06 100%)',
WebkitBackgroundClip: 'text', WebkitBackgroundClip: 'text',
@ -371,60 +387,52 @@ export const ShopBoothPage: React.FC = () => {
> >
2h 2h
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: 9,
top: 36,
width: 69,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10,
fontSize: 'clamp(8.5px, 2.7vw, 10px)',
lineHeight: '13.9px', lineHeight: '13.9px',
color: '#1f1f1f', color: '#1f1f1f',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
Avg. Response Avg. Response
</span> </span>
</div> </div>
{/* Card 2: 87% On-time Delivery (4129:16594) at (132, 240), 110×58 */}
{/* Card 2: 87% On-time Delivery */}
<div <div
style={{ style={{
position: 'absolute',
left: 132,
top: 240,
width: 110,
height: 58,
minHeight: 58,
padding: '8px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#efece9', backgroundColor: '#efece9',
border: '1px solid #e8e4df', border: '1px solid #e8e4df',
boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minWidth: 0,
}} }}
> >
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-booth-delivery-truck.svg" src="/assets/images/icon-booth-delivery-truck.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 9,
top: 8,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 37,
top: 8,
width: 33,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16,
fontSize: 'clamp(14px, 4.3vw, 16px)',
lineHeight: '20px', lineHeight: '20px',
background: 'linear-gradient(195deg, #eaba73 0%, #d78e06 100%)', background: 'linear-gradient(195deg, #eaba73 0%, #d78e06 100%)',
WebkitBackgroundClip: 'text', WebkitBackgroundClip: 'text',
@ -434,60 +442,52 @@ export const ShopBoothPage: React.FC = () => {
> >
87% 87%
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: 9,
top: 36,
width: 81,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10,
fontSize: 'clamp(8.5px, 2.7vw, 10px)',
lineHeight: '13.9px', lineHeight: '13.9px',
color: '#1f1f1f', color: '#1f1f1f',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
On-time Delivery On-time Delivery
</span> </span>
</div> </div>
{/* Card 3: 98% Satisfaction (4129:16586) at (249, 240), 110×58 */}
{/* Card 3: 98% Satisfaction */}
<div <div
style={{ style={{
position: 'absolute',
left: 249,
top: 240,
width: 110,
height: 58,
minHeight: 58,
padding: '8px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#efece9', backgroundColor: '#efece9',
border: '1px solid #e8e4df', border: '1px solid #e8e4df',
boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minWidth: 0,
}} }}
> >
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-booth-shield-protect.svg" src="/assets/images/icon-booth-shield-protect.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 9,
top: 8,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 37,
top: 8,
width: 33,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16,
fontSize: 'clamp(14px, 4.3vw, 16px)',
lineHeight: '20px', lineHeight: '20px',
background: 'linear-gradient(195deg, #eaba73 0%, #d78e06 100%)', background: 'linear-gradient(195deg, #eaba73 0%, #d78e06 100%)',
WebkitBackgroundClip: 'text', WebkitBackgroundClip: 'text',
@ -497,33 +497,36 @@ export const ShopBoothPage: React.FC = () => {
> >
98% 98%
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: 9,
top: 36,
width: 56,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10,
fontSize: 'clamp(8.5px, 2.7vw, 10px)',
lineHeight: '13.9px', lineHeight: '13.9px',
color: '#1f1f1f', color: '#1f1f1f',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
}} }}
> >
Satisfaction Satisfaction
</span> </span>
</div> </div>
</div>
{/* About Section (4129:16420) at (15, 329), 344×129 */}
{/* About Section */}
<section
style={{
marginTop: 26,
width: '100%',
display: 'flex',
flexDirection: 'column',
gap: 14,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 15,
top: 324,
width: 344,
height: 19,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -535,11 +538,6 @@ export const ShopBoothPage: React.FC = () => {
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 15,
top: 360,
width: 344,
height: 90,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -548,17 +546,24 @@ export const ShopBoothPage: React.FC = () => {
whiteSpace: 'pre-wrap', whiteSpace: 'pre-wrap',
}} }}
> >
{'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.'}
{
'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.'
}
</div> </div>
</section>
{/* Products Section (4129:16997) at (15, 489), 344×777 */}
{/* Products Section */}
<section
style={{
marginTop: 28,
width: '100%',
display: 'flex',
flexDirection: 'column',
gap: 12,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 15,
top: 489,
width: 344,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -569,22 +574,40 @@ export const ShopBoothPage: React.FC = () => {
Products Products
</div> </div>
{/* 2×3 Product Grid (4169:321) at (15, 519), 344×747 */}
<div
style={{
position: 'absolute',
left: 15,
top: 519,
width: 344,
height: 747,
}}
>
<div className="habib-product-grid">
{TWO_COLUMN_GRID_PRODUCTS.map((product) => ( {TWO_COLUMN_GRID_PRODUCTS.map((product) => (
<GridProductCard key={product.id} item={product} /> <GridProductCard key={product.id} item={product} />
))} ))}
</div> </div>
</section>
</div> </div>
{copied && (
<div
role="status"
aria-live="polite"
style={{
position: 'fixed',
bottom: 24,
left: '50%',
transform: 'translateX(-50%)',
zIndex: 50,
padding: '8px 16px',
borderRadius: 999,
backgroundColor: '#151c31',
color: '#ffffff',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 12,
lineHeight: '16px',
boxShadow: '0 4px 14px rgba(0, 0, 0, 0.2)',
pointerEvents: 'none',
whiteSpace: 'nowrap',
}}
>
Link copied
</div> </div>
)}
</MobileShell> </MobileShell>
); );
}; };

30
src/pages/catalog/ShopCatItemsPage.tsx

@ -11,34 +11,20 @@ import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData';
export const ShopCatItemsPage: React.FC = () => { export const ShopCatItemsPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Header: Back button at (16, 21) + "Home & Living" at (114, 29) */}
<StandardPageHeader title="Home & Living" backTo="/shop-category" /> <StandardPageHeader title="Home & Living" backTo="/shop-category" />
{/* Search Bar at (16, 84), width 343 */}
<SearchBar left={16} top={84} showFilterButton={false} />
{/* 2-Column Product Grid Group (4181:13003) at (16, 157), scrollable */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: 0,
top: 145,
width: 375,
height: 669,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
<div <div
style={{ style={{
position: 'relative',
marginLeft: 16,
marginTop: 12,
width: 344,
height: 771,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '11px var(--page-px) 28px',
gap: 23,
}} }}
> >
<SearchBar showFilterButton={false} />
<div className="habib-product-grid">
{TWO_COLUMN_GRID_PRODUCTS.map((product) => ( {TWO_COLUMN_GRID_PRODUCTS.map((product) => (
<GridProductCard key={product.id} item={product} /> <GridProductCard key={product.id} item={product} />
))} ))}

31
src/pages/catalog/ShopCategoryPage.tsx

@ -11,38 +11,25 @@ import { CATEGORY_GRID_TILES } from '../../data/catalogData';
export const ShopCategoryPage: React.FC = () => { export const ShopCategoryPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* 12 Category Tiles in 2-Column Scrollable Grid */}
<div <div
className="habib-scroll-container"
style={{ style={{
position: 'absolute',
left: 0,
top: 99,
width: 375,
height: 715,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
<div
style={{
position: 'relative',
marginTop: -99,
width: 375,
height: 985,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '38px var(--page-px) 24px',
gap: 20,
}} }}
> >
<SearchBar showFilterButton={false} />
<div className="habib-category-grid">
{CATEGORY_GRID_TILES.map((tile) => ( {CATEGORY_GRID_TILES.map((tile) => (
<CategoryCard key={tile.id} tile={tile} /> <CategoryCard key={tile.id} tile={tile} />
))} ))}
</div> </div>
</div> </div>
{/* Search Bar at (16, 38), width 343 */}
<SearchBar left={16} top={38} showFilterButton={false} />
{/* Bottom Navigation Bar at y=736 */}
<BottomNavBar activeTab="category" top={736} showCartBadge={true} />
<BottomNavBar activeTab="category" showCartBadge={true} />
</MobileShell> </MobileShell>
); );
}; };

582
src/pages/catalog/ShopSinglePage.tsx
File diff suppressed because it is too large
View File

548
src/pages/chat/ShopChatPage.tsx

@ -12,15 +12,24 @@ export const ShopChatPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Back Button (4162:11510) at (16, 21) */}
{/* Top Chat Header */}
<header
style={{
position: 'relative',
zIndex: 15,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '21px var(--page-px) 8px',
gap: 12,
}}
>
{/* Back Button */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-booth')} onClick={() => navigate('/shop-booth')}
aria-label="Back" aria-label="Back"
style={{ style={{
position: 'absolute',
left: 16,
top: 21,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -28,40 +37,37 @@ export const ShopChatPage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-back-arrow-dark.svg" src="/assets/images/icon-back-arrow-dark.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 11,
top: 12,
width: 18.22, width: 18.22,
height: 15.21, height: 15.21,
}} }}
/> />
</button> </button>
{/* Center Store Title & Location (4129:17512) at (79, 28) */}
{/* Center Store Title & Location */}
<div <div
onClick={() => navigate('/shop-booth')} onClick={() => navigate('/shop-booth')}
style={{ style={{
position: 'absolute',
left: 79,
top: 28,
width: 218,
height: 33,
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 1,
cursor: 'pointer', cursor: 'pointer',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 53,
top: 5.5,
width: 112,
height: 16,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -69,17 +75,15 @@ export const ShopChatPage: React.FC = () => {
color: '#111111', color: '#111111',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
maxWidth: '100%',
}} }}
> >
Al-Hujjah Books Al-Hujjah Books
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 53,
top: 23.5,
width: 112,
height: 10,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
@ -93,15 +97,12 @@ export const ShopChatPage: React.FC = () => {
</div> </div>
</div> </div>
{/* Right 3-Dots Menu Button (4129:17409) at (319, 21) */}
{/* Right 3-Dots Menu Button */}
<button <button
type="button" type="button"
onClick={() => setMenuOpen((prev) => !prev)} onClick={() => setMenuOpen((prev) => !prev)}
aria-label="More options" aria-label="More options"
style={{ style={{
position: 'absolute',
left: 319,
top: 21,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -109,90 +110,197 @@ export const ShopChatPage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-more-dots-horizontal.svg" src="/assets/images/icon-more-dots-horizontal.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 18,
top: 10,
width: 4.29, width: 4.29,
height: 18, height: 18,
}} }}
/> />
</button> </button>
{/* Scrollable Chat Messages Area */}
{/* Dropdown Menu Overlay */}
{menuOpen && (
<div <div
className="habib-scroll-container"
style={{ style={{
position: 'absolute', position: 'absolute',
left: 0,
right: 'var(--page-px)',
top: 69, top: 69,
width: 375,
height: 673,
overflowY: 'auto',
overflowX: 'hidden',
width: 132,
padding: 12,
borderRadius: '15px 0px 15px 15px',
background: 'linear-gradient(180deg, #ffffff 0%, #f4f7f5 100%)',
border: '1px solid rgba(255, 255, 255, 0.3)',
boxShadow: '0px 4px 11px rgba(30, 30, 30, 0.19)',
boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
gap: 10,
zIndex: 20,
}} }}
> >
{/* Row 1: Report */}
<div <div
onClick={() => navigate('/shop-support')}
style={{ style={{
position: 'relative',
marginTop: -69,
width: 375,
height: 735,
display: 'flex',
alignItems: 'center',
gap: 8,
cursor: 'pointer',
}} }}
> >
{/* "Yesterday" Date Label (4129:17418) at (160, 208) */}
<img
src="/assets/images/icon-chat-support-agent-orange.svg"
alt=""
style={{
width: 23,
height: 22,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-inter)',
fontWeight: 400,
fontSize: 14,
lineHeight: '14px',
color: '#151c31',
}}
>
Report
</span>
</div>
{/* Row 2: Support */}
<div <div
onClick={() => navigate('/shop-support')}
style={{
display: 'flex',
alignItems: 'center',
gap: 8,
cursor: 'pointer',
}}
>
<img
src="/assets/images/icon-chat-support-headset-white.svg"
alt=""
style={{
width: 22,
height: 22,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-inter)',
fontWeight: 400,
fontSize: 14,
lineHeight: '14px',
color: '#151c31',
}}
>
Support
</span>
</div>
{/* Row 3: Guidelines */}
<div
style={{
display: 'flex',
alignItems: 'center',
gap: 8,
cursor: 'pointer',
}}
>
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" style={{ flexShrink: 0 }}>
<path
d="M17.5 10.5V5C17.5 3.34315 16.1569 2 14.5 2H6.5C4.84315 2 3.5 3.34315 3.5 5V17C3.5 18.6569 4.84315 20 6.5 20H10.5"
stroke="#151c31"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M7 7H14M7 11H11.5"
stroke="#151c31"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M16.8 13.2C17.2 12.8 17.8 12.8 18.2 13.2L18.8 13.8C19.2 14.2 19.2 14.8 18.8 15.2L14.5 19.5L12 20L12.5 17.5L16.8 13.2Z"
stroke="#151c31"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span
style={{ style={{
position: 'absolute',
left: 160,
top: 208,
width: 48,
height: 20,
fontFamily: 'var(--font-inter)',
fontWeight: 400,
fontSize: 14,
lineHeight: '14px',
color: '#151c31',
whiteSpace: 'nowrap',
}}
>
Guidelines
</span>
</div>
</div>
)}
</header>
{/* Chat Messages Area */}
<div
style={{
flex: 1,
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
gap: 14,
padding: '24px var(--page-px) 16px',
}}
>
{/* "Yesterday" Date Label */}
<div
style={{
alignSelf: 'center',
fontFamily: 'var(--font-inter)', fontFamily: 'var(--font-inter)',
fontWeight: 400, fontWeight: 400,
fontSize: 10, fontSize: 10,
lineHeight: '20px', lineHeight: '20px',
color: '#475569', color: '#475569',
textAlign: 'center', textAlign: 'center',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
Yesterday Yesterday
</div> </div>
{/* Store Avatars at (14, 238), (14, 302), (14, 503) */}
{[238, 302, 503].map((topY) => (
{/* Incoming Bubble 1 */}
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 9 }}>
<img <img
key={topY}
src="/assets/images/avatar-al-hujjah-books.png" src="/assets/images/avatar-al-hujjah-books.png"
alt="Al-Hujjah Books" alt="Al-Hujjah Books"
style={{ style={{
position: 'absolute',
left: 14,
top: topY,
width: 35, width: 35,
height: 35, height: 35,
borderRadius: 108, borderRadius: 108,
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
))}
{/* Incoming Bubble 1 (4129:17457) at (58, 238) */}
<div <div
style={{ style={{
position: 'absolute',
left: 58,
top: 238,
maxWidth: 'min(320px, calc(100% - 44px))',
padding: '8px 16px', padding: '8px 16px',
boxSizing: 'border-box',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 4, gap: 4,
@ -207,7 +315,6 @@ export const ShopChatPage: React.FC = () => {
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#3d3d3d', color: '#3d3d3d',
whiteSpace: 'nowrap',
}} }}
> >
Hey, How are you? Hey, How are you?
@ -225,15 +332,25 @@ export const ShopChatPage: React.FC = () => {
22:13 22:13
</div> </div>
</div> </div>
</div>
{/* Incoming Bubble 2 (4129:17453) at (58, 302) */}
{/* Incoming Bubble 2 */}
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 9 }}>
<img
src="/assets/images/avatar-al-hujjah-books.png"
alt="Al-Hujjah Books"
style={{
width: 35,
height: 35,
borderRadius: 108,
objectFit: 'cover',
flexShrink: 0,
}}
/>
<div <div
style={{ style={{
position: 'absolute',
left: 58,
top: 302,
maxWidth: 'min(320px, calc(100% - 44px))',
padding: '8px 16px', padding: '8px 16px',
boxSizing: 'border-box',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 4, gap: 4,
@ -248,7 +365,6 @@ export const ShopChatPage: React.FC = () => {
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#3d3d3d', color: '#3d3d3d',
whiteSpace: 'nowrap',
}} }}
> >
Hey, How are you? Hey, How are you?
@ -266,16 +382,15 @@ export const ShopChatPage: React.FC = () => {
22:13 22:13
</div> </div>
</div> </div>
</div>
{/* Incoming Bubble 3 (4129:17470) at (58, 366) */}
{/* Incoming Bubble 3 (indented alongside previous avatar) */}
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 9 }}>
<div style={{ width: 35, flexShrink: 0 }} />
<div <div
style={{ style={{
position: 'absolute',
left: 58,
top: 366,
width: 264,
maxWidth: 'min(320px, calc(100% - 44px))',
padding: '8px 16px', padding: '8px 16px',
boxSizing: 'border-box',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 4, gap: 4,
@ -307,38 +422,40 @@ export const ShopChatPage: React.FC = () => {
22:13 22:13
</div> </div>
</div> </div>
</div>
{/* "Today " Date Label (4129:17420) at (173, 473) */}
{/* "Today " Date Label */}
<div <div
style={{ style={{
position: 'absolute',
left: 173,
top: 473,
width: 29,
height: 20,
alignSelf: 'center',
fontFamily: 'var(--font-inter)', fontFamily: 'var(--font-inter)',
fontWeight: 400, fontWeight: 400,
fontSize: 10, fontSize: 10,
lineHeight: '20px', lineHeight: '20px',
color: '#475569', color: '#475569',
textAlign: 'center', textAlign: 'center',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
{'Today '} {'Today '}
</div> </div>
{/* Incoming Bubble 4 (4129:17474) at (58, 503) */}
{/* Incoming Bubble 4 */}
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 9 }}>
<img
src="/assets/images/avatar-al-hujjah-books.png"
alt="Al-Hujjah Books"
style={{
width: 35,
height: 35,
borderRadius: 108,
objectFit: 'cover',
flexShrink: 0,
}}
/>
<div <div
style={{ style={{
position: 'absolute',
left: 58,
top: 503,
width: 264,
maxWidth: 'min(320px, calc(100% - 44px))',
padding: '8px 16px', padding: '8px 16px',
boxSizing: 'border-box',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 4, gap: 4,
@ -370,15 +487,15 @@ export const ShopChatPage: React.FC = () => {
22:13 22:13
</div> </div>
</div> </div>
</div>
{/* Outgoing Green Bubble (4129:17461) at right: 28, top: 602 */}
{/* Outgoing Green Bubble */}
<div <div
style={{ style={{
position: 'absolute',
right: 28,
top: 602,
alignSelf: 'flex-end',
marginRight: 8,
maxWidth: 'min(320px, 85%)',
padding: '8px 16px', padding: '8px 16px',
boxSizing: 'border-box',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 4, gap: 4,
@ -393,7 +510,6 @@ export const ShopChatPage: React.FC = () => {
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#ffffff', color: '#ffffff',
whiteSpace: 'nowrap',
}} }}
> >
are you? are you?
@ -412,35 +528,36 @@ export const ShopChatPage: React.FC = () => {
</div> </div>
</div> </div>
{/* "Try Again" Button (4129:17422) at (143, 671), 36×36 */}
{/* Outgoing Red Failed Bubble + "Try Again" Button */}
<div <div
style={{ style={{
position: 'absolute',
left: 143,
top: 671,
width: 36,
height: 36,
alignSelf: 'flex-end',
marginRight: 8,
display: 'flex',
alignItems: 'center',
gap: 12,
maxWidth: '100%',
}}
>
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
cursor: 'pointer', cursor: 'pointer',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-chat-resend-lock.svg" src="/assets/images/icon-chat-resend-lock.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 11.54,
top: 0,
width: 12.93, width: 12.93,
height: 16, height: 16,
}} }}
/> />
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 16,
width: 36,
height: 20,
fontFamily: 'var(--font-inter)', fontFamily: 'var(--font-inter)',
fontWeight: 400, fontWeight: 400,
fontSize: 8, fontSize: 8,
@ -454,14 +571,9 @@ export const ShopChatPage: React.FC = () => {
</div> </div>
</div> </div>
{/* Outgoing Red Failed Bubble (4129:17465) at right: 28, top: 664 */}
<div <div
style={{ style={{
position: 'absolute',
right: 28,
top: 664,
padding: '8px 16px', padding: '8px 16px',
boxSizing: 'border-box',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: 4, gap: 4,
@ -476,7 +588,6 @@ export const ShopChatPage: React.FC = () => {
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#ffffff', color: '#ffffff',
whiteSpace: 'nowrap',
}} }}
> >
Hey, How are you? Hey, How are you?
@ -513,172 +624,40 @@ export const ShopChatPage: React.FC = () => {
</div> </div>
</div> </div>
{/* Dropdown Menu Overlay (4129:17427) at (232, 69), 127×106 */}
{menuOpen && (
{/* Bottom Sticky Message Input Bar */}
<div <div
style={{ style={{
position: 'absolute',
left: 232,
top: 69,
width: 127,
height: 106,
borderRadius: '15px 0px 15px 15px',
background: 'linear-gradient(180deg, #ffffff 0%, #f4f7f5 100%)',
border: '1px solid rgba(255, 255, 255, 0.3)',
boxShadow: '0px 4px 11px rgba(30, 30, 30, 0.19)',
boxSizing: 'border-box',
position: 'sticky',
bottom: 0,
zIndex: 10, zIndex: 10,
padding: '6px var(--page-px) 16px',
backgroundColor: '#f3f1ef',
}} }}
> >
{/* Row 1: Report (rel 12, 12) */}
<div <div
onClick={() => navigate('/shop-support')}
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 103,
height: 22,
cursor: 'pointer',
}}
>
<img
src="/assets/images/icon-chat-support-agent-orange.svg"
alt=""
style={{
position: 'absolute',
left: 0,
top: 0,
width: 23,
height: 22,
}}
/>
<span
style={{
position: 'absolute',
left: 31,
top: 4,
fontFamily: 'var(--font-inter)',
fontWeight: 400,
fontSize: 14,
lineHeight: '14px',
color: '#151c31',
}}
>
Report
</span>
</div>
{/* Row 2: Support (rel 12, 42) */}
<div
onClick={() => navigate('/shop-support')}
style={{
position: 'absolute',
left: 12,
top: 42,
width: 103,
height: 22,
cursor: 'pointer',
width: '100%',
height: 56,
padding: '0 15px',
borderRadius: 20,
backgroundColor: '#ffffff',
boxShadow: '5px 4px 20px rgba(0, 0, 0, 0.08)',
display: 'flex',
alignItems: 'center',
gap: 9,
}} }}
> >
<img <img
src="/assets/images/icon-chat-support-headset-white.svg"
src="/assets/images/icon-chat-attachment-paperclip.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 22,
height: 22,
}}
/>
<span
style={{
position: 'absolute',
left: 30,
top: 4,
fontFamily: 'var(--font-inter)',
fontWeight: 400,
fontSize: 14,
lineHeight: '14px',
color: '#151c31',
}}
>
Support
</span>
</div>
{/* Row 3: Guidelines (rel 12, 72) */}
<div
style={{
position: 'absolute',
left: 12,
top: 72,
width: 103,
height: 22,
width: 24,
height: 24,
cursor: 'pointer', cursor: 'pointer',
flexShrink: 0,
}} }}
>
<svg
width="22"
height="22"
viewBox="0 0 22 22"
fill="none"
style={{ position: 'absolute', left: 0, top: 0 }}
>
<path
d="M17.5 10.5V5C17.5 3.34315 16.1569 2 14.5 2H6.5C4.84315 2 3.5 3.34315 3.5 5V17C3.5 18.6569 4.84315 20 6.5 20H10.5"
stroke="#151c31"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/> />
<path
d="M7 7H14M7 11H11.5"
stroke="#151c31"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M16.8 13.2C17.2 12.8 17.8 12.8 18.2 13.2L18.8 13.8C19.2 14.2 19.2 14.8 18.8 15.2L14.5 19.5L12 20L12.5 17.5L16.8 13.2Z"
stroke="#151c31"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span
style={{
position: 'absolute',
left: 30,
top: 4,
fontFamily: 'var(--font-inter)',
fontWeight: 400,
fontSize: 14,
lineHeight: '14px',
color: '#151c31',
whiteSpace: 'nowrap',
}}
>
{' Guidelines'}
</span>
</div>
</div>
)}
{/* Bottom Message Input Bar (4129:17479) at (15, 742), 344×56 */}
<div
style={{
position: 'absolute',
left: 15,
top: 742,
width: 344,
height: 56,
borderRadius: 20,
backgroundColor: '#ffffff',
boxShadow: '5px 4px 20px rgba(0, 0, 0, 0.08)',
}}
>
<input <input
type="text" type="text"
value={messageText} value={messageText}
@ -690,11 +669,9 @@ export const ShopChatPage: React.FC = () => {
}} }}
placeholder="Messages" placeholder="Messages"
style={{ style={{
position: 'absolute',
left: 47,
top: 0,
width: 220,
height: 56,
flex: 1,
minWidth: 0,
height: '100%',
border: 'none', border: 'none',
outline: 'none', outline: 'none',
backgroundColor: 'transparent', backgroundColor: 'transparent',
@ -706,37 +683,18 @@ export const ShopChatPage: React.FC = () => {
color: '#111111', color: '#111111',
}} }}
/> />
</div>
{/* Emoji / Attachment Icon (4129:17484) at (30, 758), 24×24 */}
<img
src="/assets/images/icon-chat-attachment-paperclip.svg"
alt=""
style={{
position: 'absolute',
left: 30,
top: 758,
width: 24,
height: 24,
cursor: 'pointer',
}}
/>
{/* Mic Icon (4129:17488) at (288, 758), 24×24 */}
<img <img
src="/assets/images/icon-chat-microphone.svg" src="/assets/images/icon-chat-microphone.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 288,
top: 758,
width: 24, width: 24,
height: 24, height: 24,
cursor: 'pointer', cursor: 'pointer',
flexShrink: 0,
}} }}
/> />
{/* Send Icon (4129:17482) at (321, 758), 24×24 */}
<img <img
src="/assets/images/icon-chat-send-orange.svg" src="/assets/images/icon-chat-send-orange.svg"
alt="" alt=""
@ -746,14 +704,14 @@ export const ShopChatPage: React.FC = () => {
} }
}} }}
style={{ style={{
position: 'absolute',
left: 321,
top: 758,
width: 24, width: 24,
height: 24, height: 24,
cursor: 'pointer', cursor: 'pointer',
flexShrink: 0,
}} }}
/> />
</div>
</div>
</MobileShell> </MobileShell>
); );
}; };

203
src/pages/checkout/ShopBuy01Page.tsx

@ -20,88 +20,44 @@ export const ShopBuy01Page: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Header: Back at (16, 21) + "Shipping Details" at (114, 30) */}
<StandardPageHeader title="Shipping Details" titleTop={30} backTo="/shop-cart" /> <StandardPageHeader title="Shipping Details" titleTop={30} backTo="/shop-cart" />
{/* Scrollable Shipping Details Sections */}
{/* Shipping Details Body */}
<div <div
className="habib-scroll-container"
style={{ style={{
position: 'absolute',
left: 0,
top: 75,
width: 375,
height: 649,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
<div
style={{
position: 'relative',
marginTop: -75,
width: 375,
height: 720,
}}
>
{/* Delivery Address Section (4171:1035) at (14, 100), 348×284 */}
<div
style={{
position: 'absolute',
left: 14,
top: 100,
width: 348,
height: 284,
}}
>
{/* Section Heading (4160:9197) */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 154,
height: 16,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '24px var(--page-px) 24px',
gap: 32,
}} }}
> >
{/* Delivery Address Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img <img
src="/assets/images/icon-location-pin-gold.svg" src="/assets/images/icon-location-pin-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: -4,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '20px', lineHeight: '20px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Delivery Address Delivery Address
</span> </span>
</div> </div>
{/* Address Cards Container (4171:1034) at rel (0, 37) */}
<div
style={{
position: 'absolute',
left: 0,
top: 37,
width: 348,
height: 247,
}}
>
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
{addresses.map((address) => ( {addresses.map((address) => (
<AddressCard <AddressCard
key={address.id} key={address.id}
@ -111,101 +67,65 @@ export const ShopBuy01Page: React.FC = () => {
/> />
))} ))}
<AddNewAddressCard
left={0}
top={194}
onClick={() => navigate('/shop-adreess')}
/>
</div>
<AddNewAddressCard onClick={() => navigate('/shop-adreess')} />
</div> </div>
</section>
{/* Delivery Method Section (4171:1036) at (17, 445), 348×92 */}
<div
style={{
position: 'absolute',
left: 17,
top: 445,
width: 348,
height: 92,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 154,
height: 16,
}}
>
{/* Delivery Method Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img <img
src="/assets/images/icon-box-fill-gold.svg" src="/assets/images/icon-box-fill-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: -4,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '20px', lineHeight: '20px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Delivery method Delivery method
</span> </span>
</div> </div>
{/* Standard Shipping Card (4170:998) at rel (0, 36), 348×56 */}
{/* Standard Shipping Card */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 36,
width: 348,
height: 56,
width: '100%',
minHeight: 56,
padding: 12,
borderRadius: 15, borderRadius: 15,
background: 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)', background: 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)',
border: '1px solid #d78e06', border: '1px solid #d78e06',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
alignItems: 'center',
gap: 14,
}} }}
> >
{/* Selected Radio */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 324,
height: 32,
}}
>
{/* Selected Radio (20×20 at rel 0, 0) */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 20, width: 20,
height: 20, height: 20,
borderRadius: 10, borderRadius: 10,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 6,
top: 6,
width: 8, width: 8,
height: 8, height: 8,
borderRadius: '50%', borderRadius: '50%',
@ -214,88 +134,74 @@ export const ShopBuy01Page: React.FC = () => {
/> />
</div> </div>
{/* Truck Icon (24×24 at rel 34, 0) */}
{/* Truck Icon */}
<img <img
src="/assets/images/icon-delivery-truck-grey-24.svg" src="/assets/images/icon-delivery-truck-grey-24.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 34,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
{/* "Standard shiping" & "2-3 business day" at rel (72, 0) */}
{/* "Standard shiping" & "2-3 business day" */}
<div
style={{
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 72,
top: -0.5,
width: 145,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#36363c', color: '#36363c',
display: 'flex',
alignItems: 'center',
}} }}
> >
Standard shiping Standard shiping
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 72,
top: 19.5,
width: 145,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: '#747474', color: '#747474',
display: 'flex',
alignItems: 'center',
}} }}
> >
2-3 business day 2-3 business day
</div> </div>
</div>
{/* Price "$5,00" at rel (287, 0) */}
{/* Price "$5,00" */}
<div <div
style={{ style={{
position: 'absolute',
left: 287,
top: 0,
width: 37,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
lineHeight: '19px', lineHeight: '19px',
color: '#292a2e', color: '#292a2e',
display: 'flex',
alignItems: 'center',
flexShrink: 0,
}} }}
> >
$5,00 $5,00
</div> </div>
</div> </div>
</div>
</div>
</section>
{/* Green Encryption Banner (4160:905) at (17, 657), 342×37 */}
{/* Green Encryption Banner */}
<div <div
style={{ style={{
position: 'absolute',
left: 17,
top: 657,
width: 342,
height: 37,
marginTop: 'auto',
width: '100%',
minHeight: 37,
padding: '8px 12px',
borderRadius: 12, borderRadius: 12,
backgroundColor: 'rgba(14, 177, 60, 0.1)', backgroundColor: 'rgba(14, 177, 60, 0.1)',
border: '1px solid #bce6c8', border: '1px solid #bce6c8',
@ -319,21 +225,16 @@ export const ShopBuy01Page: React.FC = () => {
</span> </span>
</div> </div>
</div> </div>
</div>
{/* Bottom Sticky Continue Bar (4159:368) at y=724, height 90 */}
{/* Bottom Sticky Continue Bar */}
<StickyFooterBar <StickyFooterBar
top={724}
height={90} height={90}
price="$24.00" price="$24.00"
topLabel="Total Cost" topLabel="Total Cost"
buttonText="Continue" buttonText="Continue"
buttonFontWeight={700} buttonFontWeight={700}
buttonLeft={161}
iconSrc="/assets/images/icon-arrow-right-white.svg" iconSrc="/assets/images/icon-arrow-right-white.svg"
iconLeft={126.5}
buttonTextLeft={51.5}
buttonTextWidth={69}
iconPosition="right"
targetRoute="/shop-payment" targetRoute="/shop-payment"
/> />
</MobileShell> </MobileShell>

186
src/pages/checkout/ShopCartPage.tsx

@ -106,21 +106,33 @@ export const ShopCartPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Info Bar: "3 item from 2 Shops" (4129:18180) at (18, 42) & "Clear all" (4169:802) at (316, 42) */}
{/* Main Cart Content */}
<div
style={{
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '42px var(--page-px) 24px',
gap: 13,
}}
>
{/* Top Info Bar */}
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
padding: '0 2px',
}}
>
<div <div
style={{ style={{
position: 'absolute',
left: 18,
top: 42,
minWidth: 96,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
lineHeight: '13.9px', lineHeight: '13.9px',
color: '#292a2e', color: '#292a2e',
textAlign: 'left',
whiteSpace: 'nowrap',
}} }}
> >
{topInfoText} {topInfoText}
@ -131,17 +143,12 @@ export const ShopCartPage: React.FC = () => {
role="button" role="button"
aria-label={items.length > 0 ? 'Clear all' : 'Restore'} aria-label={items.length > 0 ? 'Clear all' : 'Restore'}
style={{ style={{
position: 'absolute',
left: 316,
top: 42,
width: 38,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
lineHeight: '13.9px', lineHeight: '13.9px',
color: items.length > 0 ? '#d44747' : '#d78e06', color: items.length > 0 ? '#d44747' : '#d78e06',
textAlign: 'center',
textAlign: 'right',
cursor: 'pointer', cursor: 'pointer',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
userSelect: 'none', userSelect: 'none',
@ -149,27 +156,15 @@ export const ShopCartPage: React.FC = () => {
> >
{items.length > 0 ? 'Clear all' : 'Restore'} {items.length > 0 ? 'Clear all' : 'Restore'}
</div> </div>
</div>
{/* Cart Item Cards (4154:20418 at y=69, 4154:20372 at y=202), scrollable */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: 0,
top: 62,
width: 375,
height: 583,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
{/* Cart Item Cards */}
{items.length > 0 ? ( {items.length > 0 ? (
<div <div
style={{ style={{
position: 'relative',
marginTop: -62,
width: 375,
height: Math.max(350, 69 + items.length * 133 + 20),
display: 'flex',
flexDirection: 'column',
gap: 10,
}} }}
> >
{items.map((item, idx) => { {items.map((item, idx) => {
@ -197,7 +192,7 @@ export const ShopCartPage: React.FC = () => {
) : ( ) : (
<div <div
style={{ style={{
margin: '28px 17px 0',
marginTop: 16,
padding: '32px 20px', padding: '32px 20px',
borderRadius: 20, borderRadius: 20,
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
@ -231,7 +226,7 @@ export const ShopCartPage: React.FC = () => {
> >
Looks like you removed all items from your shopping cart. Looks like you removed all items from your shopping cart.
</div> </div>
<div style={{ display: 'flex', gap: 10, marginTop: 8 }}>
<div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', gap: 10, marginTop: 8 }}>
<button <button
type="button" type="button"
onClick={handleClearOrRestore} onClick={handleClearOrRestore}
@ -271,9 +266,18 @@ export const ShopCartPage: React.FC = () => {
)} )}
</div> </div>
{/* Checkout Bar above BottomNavBar (4154:20281) at y=645, height 104 */}
{/* Sticky Bottom Stack: Checkout Bar + Bottom Navigation Bar */}
<div
style={{
position: 'sticky',
bottom: 0,
zIndex: 25,
width: '100%',
marginTop: 'auto',
}}
>
<StickyFooterBar <StickyFooterBar
top={645}
aboveBottomNav={true}
height={104} height={104}
price={footerPrice} price={footerPrice}
oldPrice={footerOldPrice} oldPrice={footerOldPrice}
@ -282,68 +286,57 @@ export const ShopCartPage: React.FC = () => {
buttonText="checkout" buttonText="checkout"
buttonFontWeight={700} buttonFontWeight={700}
iconSrc="/assets/images/icon-credit-card-white.svg" iconSrc="/assets/images/icon-credit-card-white.svg"
iconLeft={49.5}
buttonTextLeft={81.5}
buttonTextWidth={69}
targetRoute="/shop-buy01" targetRoute="/shop-buy01"
disabled={items.length === 0} disabled={items.length === 0}
/> />
{/* Bottom Navigation Bar (4154:20230) at y=736 */}
<BottomNavBar <BottomNavBar
activeTab="cart" activeTab="cart"
top={736}
showCartBadge={items.length > 0} showCartBadge={items.length > 0}
cartBadgeCount={items.length} cartBadgeCount={items.length}
/> />
</div>
{/* Interactive Order Summary Bottom Sheet Modal */} {/* Interactive Order Summary Bottom Sheet Modal */}
{isSummaryOpen && ( {isSummaryOpen && (
<>
<div <div
onClick={() => setIsSummaryOpen(false)} onClick={() => setIsSummaryOpen(false)}
style={{ style={{
position: 'absolute', position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 814,
inset: 0,
backgroundColor: 'rgba(17, 17, 17, 0.9)', backgroundColor: 'rgba(17, 17, 17, 0.9)',
zIndex: 20,
zIndex: 40,
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
}} }}
/>
>
<div <div
className="habib-bottom-sheet"
onClick={(e) => e.stopPropagation()}
style={{ 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 */}
<div <div
style={{ style={{
position: 'absolute',
left: 14,
top: 16,
width: 340.57,
height: 190.54,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 7.77,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
lineHeight: '19px', lineHeight: '19px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Orded Summery Orded Summery
@ -354,15 +347,15 @@ export const ShopCartPage: React.FC = () => {
onClick={() => setIsSummaryOpen(false)} onClick={() => setIsSummaryOpen(false)}
aria-label="Close" aria-label="Close"
style={{ style={{
position: 'absolute',
left: 318,
top: 11,
width: 11.67,
height: 11.67,
width: 24,
height: 24,
background: 'transparent', background: 'transparent',
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
@ -375,35 +368,29 @@ export const ShopCartPage: React.FC = () => {
}} }}
/> />
</button> </button>
</div>
{/* Dynamic Breakdown Rows */} {/* Dynamic Breakdown Rows */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 56.54,
width: 340.57,
height: 134,
display: 'flex',
flexDirection: 'column',
gap: 14,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 340.57,
height: 80,
display: 'flex',
flexDirection: 'column',
gap: 10,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 340.57,
height: 20,
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center',
gap: 12,
}} }}
> >
<span <span
@ -430,17 +417,14 @@ export const ShopCartPage: React.FC = () => {
</span> </span>
</div> </div>
{items.map((item, idx) => (
{items.map((item) => (
<div <div
key={item.id} key={item.id}
style={{ style={{
position: 'absolute',
left: 0,
top: (idx + 1) * 30,
width: 340.57,
height: 20,
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center',
gap: 12,
}} }}
> >
<span <span
@ -450,10 +434,10 @@ export const ShopCartPage: React.FC = () => {
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#747474', color: '#747474',
maxWidth: 260,
overflow: 'hidden', overflow: 'hidden',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
minWidth: 0,
}} }}
> >
{item.title} (×{item.qty}) {item.title} (×{item.qty})
@ -465,6 +449,7 @@ export const ShopCartPage: React.FC = () => {
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#747474', color: '#747474',
flexShrink: 0,
}} }}
> >
${(item.unitPrice * item.qty).toFixed(2)} ${(item.unitPrice * item.qty).toFixed(2)}
@ -475,10 +460,7 @@ export const ShopCartPage: React.FC = () => {
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 95,
width: 341,
width: '100%',
height: 1, height: 1,
backgroundColor: '#d7dbe2', backgroundColor: '#d7dbe2',
}} }}
@ -486,14 +468,10 @@ export const ShopCartPage: React.FC = () => {
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 110,
width: 340.57,
height: 24,
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
gap: 12,
}} }}
> >
<span <span
@ -520,16 +498,12 @@ export const ShopCartPage: React.FC = () => {
</span> </span>
</div> </div>
</div> </div>
</div>
<button <button
type="button" type="button"
onClick={() => setIsSummaryOpen(false)} onClick={() => setIsSummaryOpen(false)}
style={{ style={{
position: 'absolute',
left: 20,
top: 233,
width: 335,
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
@ -554,7 +528,7 @@ export const ShopCartPage: React.FC = () => {
</span> </span>
</button> </button>
</div> </div>
</>
</div>
)} )}
</MobileShell> </MobileShell>
); );

119
src/pages/checkout/ShopOrderSummaryPage.tsx

@ -1,7 +1,6 @@
import React from 'react'; import React from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { MobileShell } from '../../components/layout/MobileShell'; import { MobileShell } from '../../components/layout/MobileShell';
import { StatusBar } from '../../components/layout/StatusBar';
import { BottomNavBar } from '../../components/layout/BottomNavBar'; import { BottomNavBar } from '../../components/layout/BottomNavBar';
import { StickyFooterBar } from '../../components/layout/StickyFooterBar'; import { StickyFooterBar } from '../../components/layout/StickyFooterBar';
import { OrderSummaryBgItemCard } from '../../components/checkout/CartItemCard'; import { OrderSummaryBgItemCard } from '../../components/checkout/CartItemCard';
@ -17,15 +16,17 @@ export const ShopOrderSummaryPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f5f5f5"> <MobileShell width={375} height={814} backgroundColor="#f5f5f5">
{/* Underlying Cart Screen Layer */} {/* Underlying Cart Screen Layer */}
<StatusBar variant="dark" height={31.54} />
<div <div
style={{ style={{
position: 'absolute',
left: 114,
top: 41,
width: 148,
height: 20,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '41px var(--page-px) 24px',
gap: 11,
}}
>
<div
style={{
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
@ -38,29 +39,34 @@ export const ShopOrderSummaryPage: React.FC = () => {
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 119,
top: 72,
width: 139,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#747474', color: '#747474',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
3 Products from 2 Shops 3 Products from 2 Shops
</div> </div>
<div
style={{
marginTop: 12,
display: 'flex',
flexDirection: 'column',
gap: 10,
}}
>
{ORDER_SUMMARY_BG_ITEMS.map((item) => ( {ORDER_SUMMARY_BG_ITEMS.map((item) => (
<OrderSummaryBgItemCard key={item.id} item={item} /> <OrderSummaryBgItemCard key={item.id} item={item} />
))} ))}
</div>
</div>
<div style={{ width: '100%', marginTop: 'auto' }}>
<StickyFooterBar <StickyFooterBar
top={645}
aboveBottomNav={true}
height={104} height={104}
price="$24.00" price="$24.00"
oldPrice="$28.50" oldPrice="$28.50"
@ -68,83 +74,70 @@ export const ShopOrderSummaryPage: React.FC = () => {
buttonText="checkout" buttonText="checkout"
buttonFontWeight={600} buttonFontWeight={600}
iconSrc="/assets/images/icon-credit-card-white.svg" iconSrc="/assets/images/icon-credit-card-white.svg"
iconLeft={51}
buttonTextLeft={83}
buttonTextWidth={66}
targetRoute="/shop-buy01" targetRoute="/shop-buy01"
/> />
<BottomNavBar activeTab="cart" top={736} showCartBadge={true} />
<BottomNavBar activeTab="cart" showCartBadge={true} />
</div>
{/* Dark Backdrop Overlay (4154:20689) at (0, 0), 375×814, rgba(17, 17, 17, 0.9) */}
{/* Dark Backdrop Overlay & Bottom Sheet Modal */}
<div <div
onClick={() => navigate('/shop-cart')} onClick={() => navigate('/shop-cart')}
style={{ style={{
position: 'absolute', position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 814,
inset: 0,
backgroundColor: 'rgba(17, 17, 17, 0.9)', backgroundColor: 'rgba(17, 17, 17, 0.9)',
zIndex: 40,
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
}} }}
/>
{/* Bottom Sheet Modal (4154:20694) at (0, 505), 375×309 */}
>
<div <div
className="habib-bottom-sheet"
onClick={(e) => e.stopPropagation()}
style={{ style={{
position: 'absolute',
left: 0,
top: 505,
width: 375,
height: 309,
borderRadius: 22,
backgroundColor: '#fafafa',
padding: '22px var(--page-px) 24px',
display: 'flex',
flexDirection: 'column',
gap: 28,
}} }}
> >
{/* Header & Breakdown Container (4154:20700) at rel (14, 16), 340.57×190.54 */}
{/* Header & Close X Button */}
<div <div
style={{ style={{
position: 'absolute',
left: 14,
top: 16,
width: 340.57,
height: 190.54,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
}} }}
> >
{/* Title "Orded Summery" (4154:20702) at rel (0, 7.77) */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 7.77,
width: 109,
height: 19,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
lineHeight: '19px', lineHeight: '19px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Orded Summery Orded Summery
</div> </div>
{/* Close X Button (4154:20703) at rel (318, 11) */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-cart')} onClick={() => navigate('/shop-cart')}
aria-label="Close" aria-label="Close"
style={{ style={{
position: 'absolute',
left: 318,
top: 11,
width: 11.67,
height: 11.67,
width: 24,
height: 24,
background: 'transparent', background: 'transparent',
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
@ -157,26 +150,17 @@ export const ShopOrderSummaryPage: React.FC = () => {
}} }}
/> />
</button> </button>
{/* Breakdown Rows (4154:20721) at rel (0, 56.54) */}
<OrderSummaryRows
left={0}
top={56.54}
width={340.57}
valueLeft={298}
totalValueLeft={289}
/>
</div> </div>
{/* "Got it" CTA Button (4154:20698) at rel (20, 233), 335×52 */}
{/* Breakdown Rows */}
<OrderSummaryRows />
{/* "Got it" CTA Button */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-buy01')} onClick={() => navigate('/shop-buy01')}
style={{ style={{
position: 'absolute',
left: 20,
top: 233,
width: 335,
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
@ -201,6 +185,7 @@ export const ShopOrderSummaryPage: React.FC = () => {
</span> </span>
</button> </button>
</div> </div>
</div>
</MobileShell> </MobileShell>
); );
}; };

261
src/pages/checkout/ShopPayResultPage.tsx

@ -11,63 +11,59 @@ export const ShopPayResultPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Header: "Payment result" at (114, 29), no back button in node 4162:11664 */}
<StandardPageHeader <StandardPageHeader
title="Payment result" title="Payment result"
titleTop={29} titleTop={29}
showBack={false} showBack={false}
/> />
{/* Success Icon Group (4162:11721) at (141, 190), 93.26×93.26 */}
<div <div
style={{ style={{
position: 'absolute',
left: 141,
top: 190,
width: 93.26,
height: 93.26,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '20px var(--page-px) 24px',
gap: 18,
}}
>
{/* Success Hero Block */}
<div
style={{
flex: 1,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
textAlign: 'center',
padding: '28px 0',
}} }}
> >
<img <img
src="/assets/images/illustration-payment-success-basket.png" src="/assets/images/illustration-payment-success-basket.png"
alt="Payment Successful" alt="Payment Successful"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 93.26, width: 93.26,
height: 93.26, height: 93.26,
}} }}
/> />
</div>
{/* "Payment Successful" (4162:11719) at (86, 301), 203×26 */}
<div <div
style={{ style={{
position: 'absolute',
left: 86,
top: 301,
width: 203,
height: 26,
marginTop: 18,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 22, fontSize: 22,
lineHeight: '26px', lineHeight: '26px',
color: '#0eb13c', color: '#0eb13c',
whiteSpace: 'nowrap',
}} }}
> >
Payment Successful Payment Successful
</div> </div>
{/* Subtitle (4162:11720) at (16, 331), 344×43 */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 331,
width: 344,
height: 43,
marginTop: 6,
maxWidth: 380,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 14, fontSize: 14,
@ -78,59 +74,48 @@ export const ShopPayResultPage: React.FC = () => {
> >
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
</div> </div>
</div>
{/* Receipt Summary Box (4173:9782) at (16, 474), 343×246 */}
{/* Receipt Summary Box */}
<div <div
style={{ style={{
position: 'absolute',
left: 16,
top: 474,
width: 343,
height: 246,
width: '100%',
padding: 16,
borderRadius: 15, borderRadius: 15,
backgroundColor: '#efedea', backgroundColor: '#efedea',
border: '1px solid #d5d0cb', border: '1px solid #d5d0cb',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
gap: 14,
}} }}
> >
{/* Inner Container (4162:11739) at rel (16, 16), 311×214 */}
<div
style={{
position: 'absolute',
left: 16,
top: 16,
width: 311,
height: 214,
}}
>
{/* Total Paid Row (4162:11798) at rel (0, 0), 311×22 */}
{/* Total Paid Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 311,
height: 22,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 6 }}>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: -1,
width: 24, width: 24,
height: 24, height: 24,
borderRadius: 80, borderRadius: 80,
backgroundColor: '#d5d0cb', backgroundColor: '#d5d0cb',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-money-bill-grey.svg" src="/assets/images/icon-money-bill-grey.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 6,
top: 7.8,
width: 12.01, width: 12.01,
height: 8.4, height: 8.4,
}} }}
@ -138,9 +123,6 @@ export const ShopPayResultPage: React.FC = () => {
</div> </div>
<span <span
style={{ style={{
position: 'absolute',
left: 28,
top: 1,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -150,11 +132,10 @@ export const ShopPayResultPage: React.FC = () => {
> >
Total Paid Total Paid
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: 266,
top: 1,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -166,54 +147,38 @@ export const ShopPayResultPage: React.FC = () => {
</span> </span>
</div> </div>
{/* Horizontal Divider (4162:11762) at rel (0, 37) */}
{/* Horizontal Divider */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 37,
width: 311,
width: '100%',
height: 1, height: 1,
backgroundColor: '#e2dedb', backgroundColor: '#e2dedb',
}} }}
/> />
{/* 3 Metadata Rows (4172:9764) at rel (0, 52), 311×95 */}
<div
style={{
position: 'absolute',
left: 0,
top: 52,
width: 311,
height: 95,
}}
>
{/* 3 Metadata Rows */}
<div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
{/* Row 1: Order Code -> ORD-28465 */} {/* Row 1: Order Code -> ORD-28465 */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 3,
width: 311,
height: 19,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-shipping-box-grey-18.svg" src="/assets/images/icon-shipping-box-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0.5,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 0.5,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -223,19 +188,19 @@ export const ShopPayResultPage: React.FC = () => {
> >
Order Code Order Code
</span> </span>
</div>
<div <div
style={{ style={{
position: 'absolute',
left: 241,
top: 0,
width: 70,
padding: '0 6px',
height: 19, height: 19,
borderRadius: 3, borderRadius: 3,
border: '1px solid #000000', border: '1px solid #000000',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
display: 'inline-flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
@ -256,29 +221,24 @@ export const ShopPayResultPage: React.FC = () => {
{/* Row 2: Payment method -> PayPal */} {/* Row 2: Payment method -> PayPal */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 38.5,
width: 311,
height: 18,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-payment-card-grey-18.svg" src="/assets/images/icon-payment-card-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 0,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -288,11 +248,10 @@ export const ShopPayResultPage: React.FC = () => {
> >
Payment method Payment method
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: 277,
top: 0,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -307,29 +266,25 @@ export const ShopPayResultPage: React.FC = () => {
{/* Row 3: Order Date -> Mar 15,2025 | 9:41 PM */} {/* Row 3: Order Date -> Mar 15,2025 | 9:41 PM */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 73.5,
width: 311,
height: 18,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
flexWrap: 'wrap',
gap: 8,
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-date-time-grey-18.svg" src="/assets/images/icon-date-time-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 0,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -339,11 +294,10 @@ export const ShopPayResultPage: React.FC = () => {
> >
Order Date Order Date
</span> </span>
</div>
<span <span
style={{ style={{
position: 'absolute',
left: 192,
top: 0,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -357,127 +311,90 @@ export const ShopPayResultPage: React.FC = () => {
</div> </div>
</div> </div>
{/* "track Order" Secondary Button (4173:9774) at rel (0, 162), 313×52 */}
{/* "track Order" Secondary Button */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-order-detail')} onClick={() => navigate('/shop-order-detail')}
style={{ style={{
position: 'absolute',
left: 0,
top: 162,
width: 313,
marginTop: 2,
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d5d0cb', backgroundColor: '#d5d0cb',
border: 'none', border: 'none',
padding: 0,
padding: '0 16px',
cursor: 'pointer', cursor: 'pointer',
}}
>
<div
style={{
position: 'absolute',
left: 102,
top: 14,
width: 109,
height: 24,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
}} }}
> >
<img <img
src="/assets/images/icon-order-detail-doc-gold.svg" src="/assets/images/icon-order-detail-doc-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: 0,
width: 83,
height: 24,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 16, fontSize: 16,
lineHeight: '24px', lineHeight: '24px',
color: '#292a2e', color: '#292a2e',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
track Order track Order
</span> </span>
</div>
</button> </button>
</div> </div>
</div>
{/* "Continue Shoping" Primary CTA Button (4162:11764) at (16, 738), 343×52 */}
{/* "Continue Shoping" Primary CTA Button */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-home')} onClick={() => navigate('/shop-home')}
style={{ style={{
position: 'absolute',
left: 16,
top: 738,
width: 343,
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
border: 'none', border: 'none',
padding: 0,
padding: '0 16px',
cursor: 'pointer', cursor: 'pointer',
}}
>
<div
style={{
position: 'absolute',
left: 93,
top: 14,
width: 157,
height: 24,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 8,
}} }}
> >
<img <img
src="/assets/images/icon-continue-shopping-cart-white.svg" src="/assets/images/icon-continue-shopping-cart-white.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: 0,
width: 131,
height: 24,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 16, fontSize: 16,
lineHeight: '24px', lineHeight: '24px',
color: '#fbfbfc', color: '#fbfbfc',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
Continue Shoping Continue Shoping
</span> </span>
</div>
</button> </button>
</div>
</MobileShell> </MobileShell>
); );
}; };

157
src/pages/checkout/ShopPaymentMethodsPage.tsx

@ -1,7 +1,6 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { MobileShell } from '../../components/layout/MobileShell'; import { MobileShell } from '../../components/layout/MobileShell';
import { StatusBar } from '../../components/layout/StatusBar';
import { BottomNavBar } from '../../components/layout/BottomNavBar'; import { BottomNavBar } from '../../components/layout/BottomNavBar';
import { StickyFooterBar } from '../../components/layout/StickyFooterBar'; import { StickyFooterBar } from '../../components/layout/StickyFooterBar';
import { OrderSummaryBgItemCard } from '../../components/checkout/CartItemCard'; import { OrderSummaryBgItemCard } from '../../components/checkout/CartItemCard';
@ -21,15 +20,17 @@ export const ShopPaymentMethodsPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f5f5f5"> <MobileShell width={375} height={814} backgroundColor="#f5f5f5">
{/* Underlying Cart Screen Layer */} {/* Underlying Cart Screen Layer */}
<StatusBar variant="dark" height={31.54} />
<div <div
style={{ style={{
position: 'absolute',
left: 114,
top: 41,
width: 148,
height: 20,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '41px var(--page-px) 24px',
gap: 11,
}}
>
<div
style={{
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
@ -42,29 +43,34 @@ export const ShopPaymentMethodsPage: React.FC = () => {
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 119,
top: 72,
width: 139,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#747474', color: '#747474',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
3 Products from 2 Shops 3 Products from 2 Shops
</div> </div>
<div
style={{
marginTop: 12,
display: 'flex',
flexDirection: 'column',
gap: 10,
}}
>
{ORDER_SUMMARY_BG_ITEMS.map((item) => ( {ORDER_SUMMARY_BG_ITEMS.map((item) => (
<OrderSummaryBgItemCard key={item.id} item={item} /> <OrderSummaryBgItemCard key={item.id} item={item} />
))} ))}
</div>
</div>
<div style={{ width: '100%', marginTop: 'auto' }}>
<StickyFooterBar <StickyFooterBar
top={645}
aboveBottomNav={true}
height={104} height={104}
price="$24.00" price="$24.00"
oldPrice="$28.50" oldPrice="$28.50"
@ -72,83 +78,70 @@ export const ShopPaymentMethodsPage: React.FC = () => {
buttonText="checkout" buttonText="checkout"
buttonFontWeight={600} buttonFontWeight={600}
iconSrc="/assets/images/icon-credit-card-white.svg" iconSrc="/assets/images/icon-credit-card-white.svg"
iconLeft={51}
buttonTextLeft={83}
buttonTextWidth={66}
targetRoute="/shop-payresult" targetRoute="/shop-payresult"
/> />
<BottomNavBar activeTab="cart" top={736} showCartBadge={true} />
<BottomNavBar activeTab="cart" showCartBadge={true} />
</div>
{/* Dark Backdrop Overlay (4171:1586) at (0, 0), 375×814, rgba(17, 17, 17, 0.9) */}
{/* Dark Backdrop Overlay & Payment Methods Bottom Sheet Modal */}
<div <div
onClick={() => navigate('/shop-payment')} onClick={() => navigate('/shop-payment')}
style={{ style={{
position: 'absolute', position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 814,
inset: 0,
backgroundColor: 'rgba(17, 17, 17, 0.9)', backgroundColor: 'rgba(17, 17, 17, 0.9)',
zIndex: 40,
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
}} }}
/>
{/* Payment Methods Bottom Sheet Modal (4171:1587) at (0, 445.54), 375×368.46 */}
>
<div <div
className="habib-bottom-sheet"
onClick={(e) => e.stopPropagation()}
style={{ style={{
position: 'absolute',
left: 0,
top: 445.54,
width: 375,
height: 368.46,
borderRadius: 22,
backgroundColor: '#fafafa',
padding: '22px var(--page-px) 24px',
display: 'flex',
flexDirection: 'column',
gap: 24,
}} }}
> >
{/* Header & Payment Options Container (4171:1593) at abs (14, 462) -> rel (14, 16.46) */}
{/* Header & Close X Button */}
<div <div
style={{ style={{
position: 'absolute',
left: 14,
top: 16.46,
width: 340.57,
height: 248.54,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
}} }}
> >
{/* Title "Payment methos" (4171:1595) at rel (0, 7.77) */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 7.77,
width: 111,
height: 19,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
lineHeight: '19px', lineHeight: '19px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Payment methos Payment methos
</div> </div>
{/* Close X Button (4171:1596) at rel (318, 11) */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-payment')} onClick={() => navigate('/shop-payment')}
aria-label="Close" aria-label="Close"
style={{ style={{
position: 'absolute',
left: 318,
top: 11,
width: 11.67,
height: 11.67,
width: 24,
height: 24,
background: 'transparent', background: 'transparent',
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
<img <img
@ -161,15 +154,14 @@ export const ShopPaymentMethodsPage: React.FC = () => {
}} }}
/> />
</button> </button>
</div>
{/* 3 Payment Method Cards (4171:1612) at rel (0, 56.54), 340.57×192 */}
{/* 3 Payment Method Cards */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 56.54,
width: 340.57,
height: 192,
display: 'flex',
flexDirection: 'column',
gap: 15,
}} }}
> >
{PAYMENT_METHODS_LIST.map((method) => ( {PAYMENT_METHODS_LIST.map((method) => (
@ -181,75 +173,65 @@ export const ShopPaymentMethodsPage: React.FC = () => {
/> />
))} ))}
</div> </div>
</div>
{/* "Purchase" CTA Button (4171:1591) at abs (20, 742) -> rel (20, 296.46), 335×52 */}
{/* "Purchase" CTA Button */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-payresult')} onClick={() => navigate('/shop-payresult')}
style={{ style={{
position: 'absolute',
left: 20,
top: 296.46,
width: 335,
position: 'relative',
width: '100%',
height: 52, height: 52,
padding: '0 14px',
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
border: 'none', border: 'none',
padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
{/* Center Icon + "Purchase" Text (4171:9719) at rel (119.5, 14), 96×24 */}
{/* Center Icon + "Purchase" Text */}
<div <div
style={{ style={{
position: 'absolute',
left: 119.5,
top: 14,
width: 96,
height: 24,
display: 'inline-flex',
alignItems: 'center',
gap: 6,
}} }}
> >
<img <img
src="/assets/images/icon-credit-card-white.svg" src="/assets/images/icon-credit-card-white.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 28,
top: 0,
width: 68,
height: 24,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '24px', lineHeight: '24px',
color: '#fbfbfc', color: '#fbfbfc',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
Purchase Purchase
</span> </span>
</div> </div>
{/* Right Price Pill "$24.00" (4171:9712) at rel (265, 14), 56×24 */}
{/* Right Price Pill "$24.00" */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 265,
top: 14,
width: 56,
right: 14,
top: '50%',
transform: 'translateY(-50%)',
minWidth: 56,
height: 24, height: 24,
padding: '0 6px',
borderRadius: 5, borderRadius: 5,
backgroundColor: 'rgba(255, 255, 255, 0.2)', backgroundColor: 'rgba(255, 255, 255, 0.2)',
display: 'flex', display: 'flex',
@ -271,6 +253,7 @@ export const ShopPaymentMethodsPage: React.FC = () => {
</div> </div>
</button> </button>
</div> </div>
</div>
</MobileShell> </MobileShell>
); );
}; };

195
src/pages/checkout/ShopPaymentPage.tsx

@ -12,290 +12,165 @@ import { PAYMENT_REVIEW_ITEMS } from '../../data/checkoutData';
export const ShopPaymentPage: React.FC = () => { export const ShopPaymentPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Header: "Review & Confirm" at (114, 29), no back button in node 4160:11203 */}
<StandardPageHeader <StandardPageHeader
title="Review & Confirm" title="Review & Confirm"
titleTop={29} titleTop={29}
showBack={false} showBack={false}
/> />
{/* Scrollable Review Sections */}
{/* Review Sections Body */}
<div <div
className="habib-scroll-container"
style={{ style={{
position: 'absolute',
left: 0,
top: 75,
width: 375,
height: 649,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
<div
style={{
position: 'relative',
marginTop: -75,
width: 375,
height: 735,
}}
>
{/* Review Items Section (4171:1222) at (14, 99), 348×209 */}
<div
style={{
position: 'absolute',
left: 14,
top: 99,
width: 348,
height: 209,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 156,
height: 16,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '24px var(--page-px) 24px',
gap: 28,
}} }}
> >
{/* Review Items Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img <img
src="/assets/images/icon-checkbox-checked-gold.svg" src="/assets/images/icon-checkbox-checked-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: -4,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '20px', lineHeight: '20px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Review items Review items
</span> </span>
</div> </div>
{/* Review Item Cards Container (4171:1225) at rel (0, 37) */}
<div
style={{
position: 'absolute',
left: 0,
top: 37,
width: 348,
height: 172,
}}
>
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
{PAYMENT_REVIEW_ITEMS.map((item) => ( {PAYMENT_REVIEW_ITEMS.map((item) => (
<ReviewItemCard key={item.id} item={item} /> <ReviewItemCard key={item.id} item={item} />
))} ))}
</div> </div>
</div>
</section>
{/* Delivery Address Section (4171:1313) at (14, 358), 348×111 */}
<div
style={{
position: 'absolute',
left: 14,
top: 358,
width: 348,
height: 111,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 154,
height: 16,
}}
>
{/* Delivery Address Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img <img
src="/assets/images/icon-location-pin-gold.svg" src="/assets/images/icon-location-pin-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: -4,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '20px', lineHeight: '20px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Delivery Address Delivery Address
</span> </span>
</div> </div>
{/* Read-only Address Card (4171:1319) at rel (0, 37), 348×74 */}
{/* Read-only Address Card */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 37,
width: 348,
height: 74,
width: '100%',
minHeight: 74,
padding: 12,
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
display: 'flex',
flexDirection: 'column',
gap: 8,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 324,
height: 50,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 74,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#292a2e', color: '#292a2e',
display: 'flex',
alignItems: 'center',
}} }}
> >
Ali Ghaderi Ali Ghaderi
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 28,
width: 324,
height: 18,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
lineHeight: '18px', lineHeight: '18px',
color: '#3d3d3d', color: '#3d3d3d',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
wordBreak: 'break-word',
}} }}
> >
250 Park Avenue South, New York, NY 10003 United States 250 Park Avenue South, New York, NY 10003 United States
</div> </div>
</div> </div>
</div>
</div>
</section>
{/* Orded Summery Section (4171:1365) at (14, 514), 348×195 */}
<div
style={{
position: 'absolute',
left: 14,
top: 514,
width: 348,
height: 195,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 154,
height: 16,
}}
>
{/* Orded Summery Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img <img
src="/assets/images/icon-location-pin-gold.svg" src="/assets/images/icon-location-pin-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: -4,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16, fontSize: 16,
lineHeight: '20px', lineHeight: '20px',
color: '#111111', color: '#111111',
whiteSpace: 'nowrap',
}} }}
> >
Orded Summery Orded Summery
</span> </span>
</div> </div>
{/* Summary Card (4171:1371) at rel (0, 37), 348×158 */}
{/* Summary Card */}
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 37,
width: 348,
height: 158,
width: '100%',
padding: 12,
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ffffff', backgroundColor: '#ffffff',
}} }}
> >
<OrderSummaryRows
left={12}
top={12}
width={324}
valueLeft={282}
totalValueLeft={273}
/>
</div>
</div>
<OrderSummaryRows />
</div> </div>
</section>
</div> </div>
{/* Bottom Sticky Payment Bar (4160:11204) at y=724, height 90 */}
{/* Bottom Sticky Payment Bar */}
<StickyFooterBar <StickyFooterBar
top={724}
height={90} height={90}
price="$24.00" price="$24.00"
topLabel="Total Cost" topLabel="Total Cost"
buttonText="Payment" buttonText="Payment"
buttonFontWeight={700} buttonFontWeight={700}
buttonLeft={159}
iconSrc="/assets/images/icon-credit-card-white.svg" iconSrc="/assets/images/icon-credit-card-white.svg"
iconLeft={51}
buttonTextLeft={83}
buttonTextWidth={66}
targetRoute="/shop-payment-methods" targetRoute="/shop-payment-methods"
/> />
</MobileShell> </MobileShell>

518
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 { useNavigate } from 'react-router-dom';
import { MobileShell } from '../../components/layout/MobileShell'; import { MobileShell } from '../../components/layout/MobileShell';
import { StatusBar } from '../../components/layout/StatusBar';
import { BottomNavBar } from '../../components/layout/BottomNavBar'; import { BottomNavBar } from '../../components/layout/BottomNavBar';
import { SearchBar } from '../../components/common/SearchBar'; import { SearchBar } from '../../components/common/SearchBar';
import { CompactProductCard } from '../../components/common/CompactProductCard'; import { CompactProductCard } from '../../components/common/CompactProductCard';
@ -11,50 +10,58 @@ import {
HOME_NEW_STORES_PRODUCTS, HOME_NEW_STORES_PRODUCTS,
} from '../../data/catalogData'; } 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 = () => { export const ShopHomePage: React.FC = () => {
const navigate = useNavigate(); 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 ( return (
<MobileShell width={375} height={1150} backgroundColor="#f3f1ef">
{/* Top background pattern & golden blur glow (4080:9589 & 4080:9627) */}
<img
src="/assets/images/bg-islamic-pattern.png"
alt=""
style={{
position: 'absolute',
left: 0,
top: 2,
width: 375,
height: 375,
opacity: 0.2,
pointerEvents: 'none',
objectFit: 'cover',
}}
/>
<img
src="/assets/images/bg-islamic-pattern.png"
alt=""
style={{
position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 375,
opacity: 0.05,
pointerEvents: 'none',
objectFit: 'cover',
}}
/>
{/* Ellipse 428 (4080:9590) */}
<MobileShell width={375} height={1074} backgroundColor="#f3f1ef">
{/* Decorative Top Glow & Islamic Pattern */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 16,
left: '50%',
top: -31, top: -31,
width: 343,
transform: 'translateX(-50%)',
width: '92%',
maxWidth: 480,
height: 45, height: 45,
borderRadius: '50%', borderRadius: '50%',
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
@ -63,12 +70,12 @@ export const ShopHomePage: React.FC = () => {
pointerEvents: 'none', pointerEvents: 'none',
}} }}
/> />
{/* Ellipse 431 (4080:9591) */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 93,
left: '50%',
top: -13, top: -13,
transform: 'translateX(-50%)',
width: 190, width: 190,
height: 35, height: 35,
borderRadius: '50%', borderRadius: '50%',
@ -78,12 +85,12 @@ export const ShopHomePage: React.FC = () => {
pointerEvents: 'none', pointerEvents: 'none',
}} }}
/> />
{/* Ellipse 434 (4080:9592) */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 116,
left: '50%',
top: -3, top: -3,
transform: 'translateX(-50%)',
width: 144, width: 144,
height: 7, height: 7,
borderRadius: '50%', borderRadius: '50%',
@ -92,19 +99,63 @@ export const ShopHomePage: React.FC = () => {
pointerEvents: 'none', pointerEvents: 'none',
}} }}
/> />
<img
src="/assets/images/bg-islamic-pattern.png"
alt=""
style={{
position: 'absolute',
left: 0,
top: 2,
width: '100%',
height: 375,
filter: 'brightness(0) invert(1)',
pointerEvents: 'none',
objectFit: 'cover',
}}
/>
<img
src="/assets/images/bg-islamic-pattern.png"
alt=""
style={{
position: 'absolute',
left: 0,
top: 0,
width: '100%',
height: 375,
opacity: 0.25,
filter: 'brightness(0) invert(1)',
pointerEvents: 'none',
objectFit: 'cover',
}}
/>
{/* iPhone Status Bar (4080:9602) */}
<StatusBar variant="dark" height={36.5} />
{/* Back Button (4080:9596) at (16, 37) */}
{/* Fluid Main Body */}
<div
style={{
position: 'relative',
zIndex: 1,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '37px var(--page-px) 22px',
gap: 20,
}}
>
{/* Top Bar: Back + "Shop" + Notifications */}
<header
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
minHeight: 40,
marginBottom: 11,
}}
>
<button <button
type="button" type="button"
onClick={() => navigate('/test')} onClick={() => navigate('/test')}
aria-label="Back" aria-label="Back"
style={{ style={{
position: 'absolute',
left: 16,
top: 37,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -112,52 +163,40 @@ export const ShopHomePage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-back-arrow-dark.svg" src="/assets/images/icon-back-arrow-dark.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 11,
top: 13.06,
width: 18.22, width: 18.22,
height: 15.18, height: 15.18,
}} }}
/> />
</button> </button>
{/* "Shop" Display Title (4080:9595) at (133, 49) */}
<div <div
style={{ style={{
position: 'absolute',
left: 133,
top: 49,
width: 109,
height: 15,
fontFamily: "'Faminela', Georgia, 'Times New Roman', serif", fontFamily: "'Faminela', Georgia, 'Times New Roman', serif",
fontWeight: 700, fontWeight: 700,
fontSize: 20, fontSize: 20,
lineHeight: '27px', lineHeight: '27px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
textAlign: 'center', textAlign: 'center',
}} }}
> >
Shop Shop
</div> </div>
{/* Right Notification Bell Button (4128:15184) at (320, 37) */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-orders')} onClick={() => navigate('/shop-orders')}
aria-label="Notifications" aria-label="Notifications"
style={{ style={{
position: 'absolute',
left: 320,
top: 37,
width: 40, width: 40,
height: 40, height: 40,
borderRadius: 15, borderRadius: 15,
@ -165,234 +204,256 @@ export const ShopHomePage: React.FC = () => {
border: 'none', border: 'none',
padding: 0, padding: 0,
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src="/assets/images/icon-bell-notification.svg" src="/assets/images/icon-bell-notification.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 6,
top: 6,
width: 28, width: 28,
height: 28, height: 28,
}} }}
/> />
</button> </button>
</header>
{/* Search Bar & Filter Button (4128:15096) at (16, 108) */}
{/* Search Bar & Filter Button */}
<SearchBar <SearchBar
left={16}
top={108}
showFilterButton={true} showFilterButton={true}
onFilterClick={() => navigate('/shop-category')} onFilterClick={() => navigate('/shop-category')}
/> />
{/* Hero Green Marketplace Card (4086:10812) at (16, 178) */}
{/* Hero Green Marketplace Card */}
<div <div
className="habib-hero-banner"
onMouseEnter={() => setIsPaused(true)}
onMouseLeave={() => setIsPaused(false)}
onFocusCapture={() => setIsPaused(true)}
onBlurCapture={() => setIsPaused(false)}
style={{ style={{
position: 'absolute',
left: 16,
top: 178,
width: 344,
height: 164,
position: 'relative',
width: '100%',
borderRadius: 15, borderRadius: 15,
overflow: 'hidden', overflow: 'hidden',
backgroundColor: '#182c1f',
}}
>
{/* Horizontal sliding track */}
<div
style={{
display: 'flex',
width: '100%',
height: '100%',
transform: `translateX(-${activeSlide * 100}%)`,
transition: 'transform 550ms cubic-bezier(0.22, 1, 0.36, 1)',
willChange: 'transform',
}}
>
{HERO_BANNER_SLIDES.map((slide) => (
<div
key={slide.id}
style={{
position: 'relative',
flex: '0 0 100%',
width: '100%',
height: '100%',
overflow: 'hidden',
}} }}
> >
<img <img
src="/assets/images/banner-habib-marketplace.png"
src={slide.imageSrc}
alt="" alt=""
style={{ style={{
position: 'absolute', position: 'absolute',
left: 0,
top: 0,
width: 344,
height: 164,
inset: 0,
width: '100%',
height: '100%',
objectFit: 'cover', objectFit: 'cover',
objectPosition: slide.objectPosition,
transform: slide.imageScale,
}} }}
/> />
{/* "Habib Shop" (4086:10826) at rel (17, 17) */}
<div <div
style={{ style={{
position: 'absolute',
left: 17,
top: 17,
width: 45,
height: 13,
position: 'relative',
zIndex: 1,
height: '100%',
padding: '15px 17px',
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
maxWidth: 'min(74%, 380px)',
}}
>
<div>
<div
style={{
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 8.5, fontSize: 8.5,
lineHeight: '12.52px', lineHeight: '12.52px',
color: '#caaf7f', color: '#caaf7f',
whiteSpace: 'nowrap',
}} }}
> >
Habib Shop
{slide.tag}
</div> </div>
{/* "Global Marketplace for the Muslim Community" (4086:10829) at rel (17, 33) */}
<div <div
className="habib-hero-title"
style={{ style={{
position: 'absolute',
left: 17,
top: 33,
width: 221,
height: 40,
marginTop: 3,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
lineHeight: '1.22',
background: 'linear-gradient(180deg, #ffffff 0%, #aee8ba 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #aee8ba 100%)',
WebkitBackgroundClip: 'text', WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent', WebkitTextFillColor: 'transparent',
}} }}
> >
Global Marketplace for the Muslim Community
{slide.title}
</div> </div>
{/* Subtitle (4087:12834) at rel (17, 77) */}
<div <div
className="habib-hero-subtitle"
style={{ style={{
position: 'absolute',
left: 17,
top: 77,
width: 195,
height: 27,
marginTop: 4,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 8.5,
lineHeight: '12.52px',
lineHeight: '1.4',
color: '#afcdb6', color: '#afcdb6',
}} }}
> >
Diverse stores, products, and cultures united in one shared marketplace.
{slide.subtitle}
</div>
</div> </div>
{/* "Explore Products" CTA button (4086:10827) at rel (17, 117) */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-catitems')}
onClick={() => navigate(slide.ctaRoute)}
style={{ style={{
position: 'absolute',
left: 17,
top: 117,
width: 105,
alignSelf: 'flex-start',
minWidth: 105,
height: 30, height: 30,
borderRadius: 8, borderRadius: 8,
background: 'linear-gradient(180deg, #465c39 0%, rgba(67, 83, 58, 0.7) 100%)', background: 'linear-gradient(180deg, #465c39 0%, rgba(67, 83, 58, 0.7) 100%)',
border: '1px solid #455b39', border: '1px solid #455b39',
padding: 0,
padding: '0 12.5px',
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
cursor: 'pointer', cursor: 'pointer',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 12.5,
top: 7,
width: 80,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
lineHeight: '13.9px', lineHeight: '13.9px',
color: '#ffffff', color: '#ffffff',
textAlign: 'left',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
Explore Products
{slide.ctaLabel}
</span> </span>
</button> </button>
</div>
</div>
))}
</div>
{/* Carousel indicator dots at rel (159, 139.43) & (171, 139.43) */}
{/* Carousel indicator dots */}
<div <div
style={{ style={{
position: 'absolute', position: 'absolute',
left: 159,
top: 139.43,
width: 7,
height: 7,
borderRadius: '50%',
backgroundColor: 'rgba(255, 255, 255, 0.4)',
left: '50%',
bottom: 17,
transform: 'translateX(-50%)',
display: 'flex',
alignItems: 'center',
gap: 5,
zIndex: 2,
}} }}
/>
<div
>
{HERO_BANNER_SLIDES.map((slide, idx) => {
const isActive = activeSlide === idx;
return (
<button
key={slide.id}
type="button"
aria-label={`Show banner slide ${idx + 1}`}
aria-current={isActive ? 'true' : undefined}
onClick={() => setActiveSlide(idx)}
style={{ style={{
position: 'absolute',
left: 171,
top: 139.43,
width: 16,
width: isActive ? 16 : 7,
height: 7, height: 7,
borderRadius: 20, borderRadius: 20,
backgroundColor: '#ffffff',
border: 'none',
padding: 0,
cursor: 'pointer',
backgroundColor: isActive ? '#ffffff' : 'rgba(255, 255, 255, 0.4)',
transition: 'width 350ms ease, background-color 350ms ease',
}} }}
/> />
);
})}
</div>
</div> </div>
{/* 5 Quick Category Circular Pills (4128:15118) at (16, 362) */}
<div
style={{
position: 'absolute',
left: 16,
top: 362,
width: 344,
height: 59.57,
}}
>
{/* 5 Quick Category Circular Pills */}
<div className="habib-quick-cats">
{HOME_QUICK_CATEGORIES.map((cat) => ( {HOME_QUICK_CATEGORIES.map((cat) => (
<div <div
key={cat.id} key={cat.id}
onClick={() => navigate(cat.targetRoute)} onClick={() => navigate(cat.targetRoute)}
style={{ style={{
position: 'absolute',
left: cat.relX,
top: 0,
width: 68.12,
height: 59.57,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 4,
cursor: 'pointer', cursor: 'pointer',
minWidth: 0,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 12.78,
top: 0,
width: 42.57, width: 42.57,
height: 42.57, height: 42.57,
borderRadius: '50%', borderRadius: '50%',
backgroundColor: 'rgba(215, 142, 6, 0.1)', backgroundColor: 'rgba(215, 142, 6, 0.1)',
border: '1px solid rgba(215, 142, 6, 0.14)', border: '1px solid rgba(215, 142, 6, 0.14)',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
src={cat.iconSrc} src={cat.iconSrc}
alt={cat.label} alt={cat.label}
style={{ style={{
position: 'absolute',
left: 8.29,
top: 8.29,
width: 24, width: 24,
height: 24, height: 24,
}} }}
/> />
</div> </div>
<div <div
className="habib-quick-cat-label"
style={{ style={{
position: 'absolute',
left: cat.labelLeft,
top: 46.57,
width: cat.labelWidth,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 7.5,
lineHeight: '12.52px', lineHeight: '12.52px',
color: '#292a2e', color: '#292a2e',
textAlign: 'center', textAlign: 'center',
width: '100%',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
@ -402,32 +463,18 @@ export const ShopHomePage: React.FC = () => {
))} ))}
</div> </div>
{/* Populars Section (4088:12838) at (16, 441.57) */}
<div
style={{
position: 'absolute',
left: 16,
top: 441.57,
width: 344,
height: 257.3,
}}
>
{/* Header row (4165:13530) at rel (3, 0) */}
{/* Populars Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
<div <div
style={{ style={{
position: 'absolute',
left: 3,
top: 0,
width: 341,
height: 18,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '0 2px',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
height: 18,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -440,19 +487,14 @@ export const ShopHomePage: React.FC = () => {
<div <div
onClick={() => navigate('/shop-catitems')} onClick={() => navigate('/shop-catitems')}
style={{ style={{
position: 'absolute',
left: 277,
top: 0,
width: 64,
height: 18,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
cursor: 'pointer', cursor: 'pointer',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 1.5,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
@ -467,9 +509,6 @@ export const ShopHomePage: React.FC = () => {
src="/assets/images/icon-arrow-right-circle-grey.svg" src="/assets/images/icon-arrow-right-circle-grey.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 49.5,
top: 2.5,
width: 13, width: 13,
height: 13, height: 13,
}} }}
@ -477,61 +516,27 @@ export const ShopHomePage: React.FC = () => {
</div> </div>
</div> </div>
{/* 3 Popular product cards (horizontally scrollable) */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: -16,
top: 28,
width: 375,
height: 230,
overflowX: 'auto',
overflowY: 'hidden',
}}
>
<div
style={{
position: 'relative',
marginLeft: 16,
marginTop: -28,
width: 496,
height: 258,
}}
>
<div className="habib-carousel-scroller habib-scroll-container">
<div className="habib-carousel-track">
{HOME_POPULAR_PRODUCTS.map((product) => ( {HOME_POPULAR_PRODUCTS.map((product) => (
<CompactProductCard key={product.id} item={product} /> <CompactProductCard key={product.id} item={product} />
))} ))}
</div> </div>
</div> </div>
</div>
</section>
{/* New Stores Section (4089:13018) at (16, 718.87) */}
<div
style={{
position: 'absolute',
left: 16,
top: 718.87,
width: 344,
height: 257,
}}
>
{/* Header row (4165:13539) at rel (1, 0) */}
{/* New Stores Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
<div <div
style={{ style={{
position: 'absolute',
left: 1,
top: 0,
width: 341,
height: 18,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '0 2px',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
height: 18,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 14, fontSize: 14,
@ -545,19 +550,14 @@ export const ShopHomePage: React.FC = () => {
<div <div
onClick={() => navigate('/shop-booth')} onClick={() => navigate('/shop-booth')}
style={{ style={{
position: 'absolute',
left: 277,
top: 0,
width: 64,
height: 18,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
cursor: 'pointer', cursor: 'pointer',
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 1.5,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 10, fontSize: 10,
@ -572,9 +572,6 @@ export const ShopHomePage: React.FC = () => {
src="/assets/images/icon-arrow-right-circle-grey.svg" src="/assets/images/icon-arrow-right-circle-grey.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 49.5,
top: 2.5,
width: 13, width: 13,
height: 13, height: 13,
}} }}
@ -582,37 +579,18 @@ export const ShopHomePage: React.FC = () => {
</div> </div>
</div> </div>
{/* 3 New Stores product cards (horizontally scrollable) */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: -16,
top: 28,
width: 375,
height: 230,
overflowX: 'auto',
overflowY: 'hidden',
}}
>
<div
style={{
position: 'relative',
marginLeft: 16,
marginTop: -28,
width: 496,
height: 258,
}}
>
<div className="habib-carousel-scroller habib-scroll-container">
<div className="habib-carousel-track">
{HOME_NEW_STORES_PRODUCTS.map((product) => ( {HOME_NEW_STORES_PRODUCTS.map((product) => (
<CompactProductCard key={product.id} item={product} /> <CompactProductCard key={product.id} item={product} />
))} ))}
</div> </div>
</div> </div>
</section>
</div> </div>
{/* Bottom Navigation Bar (4090:14079) at y=1072 */}
<BottomNavBar activeTab="home" top={1072} showCartBadge={true} />
{/* Bottom Navigation Bar */}
<BottomNavBar activeTab="home" showCartBadge={true} />
</MobileShell> </MobileShell>
); );
}; };

194
src/pages/orders/ShopOrderDetailPage.tsx

@ -13,114 +13,109 @@ export const ShopOrderDetailPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={1061} backgroundColor="#f3f1ef"> <MobileShell width={375} height={1061} backgroundColor="#f3f1ef">
{/* Top Header: Back button at (16, 21) + "Order Details" at (114, 29) */}
{/* Top Header: Back button + "Order Details" */}
<StandardPageHeader <StandardPageHeader
title="Order Details" title="Order Details"
titleTop={29} titleTop={29}
backTo="/shop-orders" backTo="/shop-orders"
/> />
{/* Top Order Summary Card (4175:11005) at (17, 87), 342×106, radius 20, fill #ebe8e5 */}
<div <div
style={{ style={{
position: 'absolute',
left: 17,
top: 87,
width: 342,
height: 106,
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '26px var(--page-px) 20px',
gap: 20,
}}
>
{/* Top Order Summary Card (4175:11005) */}
<div
style={{
width: '100%',
padding: 12,
borderRadius: 20, borderRadius: 20,
backgroundColor: '#ebe8e5', backgroundColor: '#ebe8e5',
display: 'flex',
flexDirection: 'column',
gap: 15,
}} }}
> >
{/* Row 1: Order code, dot, price, and date (318×26 at rel 12, 12) */}
{/* Row 1: Order code, dot, price, and date */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 318,
height: 26,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
flexWrap: 'wrap',
minHeight: 26,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 3,
width: 76,
height: 20,
display: 'flex',
alignItems: 'center',
gap: 6,
flexWrap: 'wrap',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '24px', lineHeight: '24px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
whiteSpace: 'nowrap',
}} }}
> >
ORD-28465 ORD-28465
</div>
</span>
<div
<span
style={{ style={{
position: 'absolute',
left: 80,
top: 10,
width: 6, width: 6,
height: 6, height: 6,
borderRadius: '50%', borderRadius: '50%',
backgroundColor: '#bcbcbc', backgroundColor: '#bcbcbc',
flexShrink: 0,
}} }}
/> />
<div
<span
style={{ style={{
position: 'absolute',
left: 90,
top: 0,
width: 53,
height: 26,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
lineHeight: '24px', lineHeight: '24px',
color: '#111111', color: '#111111',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
whiteSpace: 'nowrap',
}} }}
> >
$24.00 $24.00
</span>
</div> </div>
{/* Date on right (rel 218, 4, size 100×18) */}
{/* Date on right */}
<div <div
style={{ style={{
position: 'absolute',
left: 218,
top: 4,
width: 100,
height: 18,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}} }}
> >
<img <img
src="/assets/images/icon-date-time-grey-18.svg" src="/assets/images/icon-date-time-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 2,
width: 78,
height: 14,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
@ -134,43 +129,40 @@ export const ShopOrderDetailPage: React.FC = () => {
</div> </div>
</div> </div>
{/* Grey Status Bar (318×41 at rel 12, 53, radius 12, fill #f3f3f3) */}
{/* Grey Status Bar */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 53,
width: 318,
height: 41,
width: '100%',
minHeight: 41,
padding: '10px',
borderRadius: 12, borderRadius: 12,
backgroundColor: '#f3f3f3', backgroundColor: '#f3f3f3',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
flexWrap: 'wrap',
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 10,
top: 11.5,
width: 298,
height: 18,
display: 'flex',
alignItems: 'center',
gap: 9,
}} }}
> >
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-shipping-box-grey-18.svg" src="/assets/images/icon-shipping-box-grey-18.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 18, width: 18,
height: 18, height: 18,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 22,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
@ -181,35 +173,30 @@ export const ShopOrderDetailPage: React.FC = () => {
> >
3 item 3 item
</span> </span>
</div>
{/* Vertical divider */} {/* Vertical divider */}
<div <div
style={{ style={{
position: 'absolute',
left: 73,
top: 0.5,
width: 1, width: 1,
height: 17, height: 17,
backgroundColor: '#dbdbdb', backgroundColor: '#dbdbdb',
flexShrink: 0,
}} }}
/> />
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img <img
src="/assets/images/icon-order-item-next-circle.svg" src="/assets/images/icon-order-item-next-circle.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 83,
top: 1,
width: 16, width: 16,
height: 16, height: 16,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 103,
top: 2,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 14, fontSize: 14,
@ -220,22 +207,19 @@ export const ShopOrderDetailPage: React.FC = () => {
> >
1 shop 1 shop
</span> </span>
</div>
</div>
{/* Right delivery count */} {/* Right delivery count */}
<div <div
style={{ style={{
position: 'absolute',
left: 206,
top: 1,
width: 92,
height: 16,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 16, width: 16,
height: 16, height: 16,
borderRadius: 10, borderRadius: 10,
@ -243,6 +227,7 @@ export const ShopOrderDetailPage: React.FC = () => {
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<img <img
@ -256,9 +241,6 @@ export const ShopOrderDetailPage: React.FC = () => {
</div> </div>
<span <span
style={{ style={{
position: 'absolute',
left: 20,
top: 1,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
@ -272,72 +254,56 @@ export const ShopOrderDetailPage: React.FC = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
{/* 3 Shipment Cards (Packed at y=213, Delivered at y=454, Shiping at y=695) */}
{/* 3 Shipment Cards (Packed, Delivered, Shiping) */}
<div className="habib-orders-grid">
{ORDER_DETAIL_SHIPMENTS.map((shipment) => ( {ORDER_DETAIL_SHIPMENTS.map((shipment) => (
<ShipmentStatusCard key={shipment.id} shipment={shipment} /> <ShipmentStatusCard key={shipment.id} shipment={shipment} />
))} ))}
</div>
{/* Bottom CTA Button "Order support" (4175:10432) at (16, 989), 343×52 */}
{/* Bottom CTA Button "Order support" (4175:10432) */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-support')} onClick={() => navigate('/shop-support')}
style={{ style={{
position: 'absolute',
left: 16,
top: 989,
width: 343,
marginTop: 'auto',
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
border: 'none', border: 'none',
padding: 0,
padding: '0 16px',
cursor: 'pointer', cursor: 'pointer',
}}
>
<div
style={{
position: 'absolute',
left: 106.5,
top: 14,
width: 130,
height: 24,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
}} }}
> >
<img <img
src="/assets/images/icon-customer-support-headset-white.svg" src="/assets/images/icon-customer-support-headset-white.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: 0,
width: 104,
height: 24,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 16, fontSize: 16,
lineHeight: '24px', lineHeight: '24px',
color: '#fbfbfc', color: '#fbfbfc',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
Order support Order support
</span> </span>
</div>
</button> </button>
</div>
</MobileShell> </MobileShell>
); );
}; };

34
src/pages/orders/ShopOrdersPage.tsx

@ -18,9 +18,18 @@ export const ShopOrdersPage: React.FC = () => {
return ( return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef"> <MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* Top Header: Back button at (16, 21) + "Orders" at (114, 29) */}
{/* Top Header: Back button + "Orders" */}
<StandardPageHeader title="Orders" titleTop={29} backTo="/shop-account" /> <StandardPageHeader title="Orders" titleTop={29} backTo="/shop-account" />
<div
style={{
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '26px var(--page-px) 28px',
gap: 22,
}}
>
{/* Segmented Filter Tabs (4175:9880 + 4175:9892) */} {/* Segmented Filter Tabs (4175:9880 + 4175:9892) */}
<OrderFilterTabs <OrderFilterTabs
tabs={ORDER_FILTER_TABS} tabs={ORDER_FILTER_TABS}
@ -28,27 +37,8 @@ export const ShopOrdersPage: React.FC = () => {
onSelectTab={(id) => setActiveTabId(id)} onSelectTab={(id) => setActiveTabId(id)}
/> />
{/* Order Cards (4175:10954 at y=154 & 4175:10644 at y=407), scrollable */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: 0,
top: 140,
width: 375,
height: 674,
overflowY: 'auto',
overflowX: 'hidden',
}}
>
<div
style={{
position: 'relative',
marginTop: -140,
width: 375,
height: 680,
}}
>
{/* Order Cards (4175:10954 & 4175:10644) */}
<div className="habib-orders-grid">
{ORDERS_LIST_CARDS.map((order) => ( {ORDERS_LIST_CARDS.map((order) => (
<OrderListCard key={order.id} order={order} /> <OrderListCard key={order.id} order={order} />
))} ))}

334
src/pages/orders/ShopSupportPage.tsx

@ -10,86 +10,83 @@ import { SUPPORT_SUBJECT_OPTIONS } from '../../data/ordersData';
export const ShopSupportPage: React.FC = () => { export const ShopSupportPage: React.FC = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const [selectedSubjectId, setSelectedSubjectId] = useState('subj-counterfeit'); const [selectedSubjectId, setSelectedSubjectId] = useState('subj-counterfeit');
const [description, setDescription] = useState('');
return ( return (
<MobileShell width={375} height={1061} backgroundColor="#f3f1ef"> <MobileShell width={375} height={1061} backgroundColor="#f3f1ef">
{/* Top Header: Back button at (16, 21) + "Support" at (114, 29) */}
{/* Top Header: Back button + "Support" */}
<StandardPageHeader <StandardPageHeader
title="Support" title="Support"
titleTop={29} titleTop={29}
backTo="/shop-order-detail" backTo="/shop-order-detail"
/> />
{/* Main White Support Card (4177:11307) at (17, 90), 342×759 */}
<div <div
style={{ style={{
position: 'absolute',
left: 17,
top: 90,
width: 342,
height: 759,
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '29px var(--page-px) 20px',
gap: 20,
}}
>
{/* Main White Support Card (4177:11307) */}
<div
style={{
width: '100%',
padding: 12,
borderRadius: 20, borderRadius: 20,
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)', background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff', border: '1px solid #ffffff',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
gap: 20,
}} }}
> >
{/* Product Box (4177:11308) at rel (12, 12), 318×81, radius 15, fill #ebe8e5 */}
{/* Product Box (4177:11308) */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 12,
width: 318,
height: 81,
width: '100%',
minHeight: 81,
padding: 12,
borderRadius: 15, borderRadius: 15,
backgroundColor: '#ebe8e5', backgroundColor: '#ebe8e5',
}}
>
<div
style={{
position: 'absolute',
left: 12,
top: 12,
width: 294,
height: 57,
display: 'flex',
alignItems: 'center',
gap: 8,
}} }}
> >
<img <img
src="/assets/images/product-grey-tshirt-model.png" src="/assets/images/product-grey-tshirt-model.png"
alt="Islam in the Bible Book" alt="Islam in the Bible Book"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 59.3, width: 59.3,
height: 57, height: 57,
borderRadius: 8, borderRadius: 8,
objectFit: 'cover', objectFit: 'cover',
flexShrink: 0,
}} }}
/> />
<div <div
style={{ style={{
position: 'absolute',
left: 66.3,
top: 0,
width: 227.7,
height: 57,
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
gap: 6,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 208.01,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#111111', color: '#111111',
wordBreak: 'break-word',
}} }}
> >
Islam in the Bible Book Islam in the Bible Book
@ -97,54 +94,41 @@ export const ShopSupportPage: React.FC = () => {
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 23,
width: 227.7,
height: 34,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 8,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 0,
top: 9,
width: 71,
height: 16,
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 18, fontSize: 18,
lineHeight: '26px', lineHeight: '26px',
color: '#3d3d3d', color: '#3d3d3d',
whiteSpace: 'nowrap',
}} }}
> >
$24.00 $24.00
</span> </span>
{/* Quantity Badge (35×34 at rel 192.7, 0) */}
{/* Quantity Badge (35×34) */}
<div <div
style={{ style={{
position: 'absolute',
left: 192.7,
top: 0,
width: 35, width: 35,
height: 34, height: 34,
borderRadius: 6.58, borderRadius: 6.58,
backgroundColor: 'rgba(255, 255, 255, 0.1)', backgroundColor: 'rgba(255, 255, 255, 0.1)',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)', boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}} }}
> >
<span <span
style={{ style={{
position: 'absolute',
left: 13.8,
top: 10.42,
width: 7.4,
height: 13.16,
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 11.51, fontSize: 11.51,
@ -158,56 +142,46 @@ export const ShopSupportPage: React.FC = () => {
</div> </div>
</div> </div>
</div> </div>
</div>
{/* Amber Notice Box (4178:11668) at rel (12, 113), 318×85, radius 12 */}
{/* Amber Notice Box (4178:11668) */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 113,
width: 318,
height: 85,
width: '100%',
padding: '9.5px 12px 12px',
borderRadius: 12, borderRadius: 12,
backgroundColor: 'rgba(189, 138, 28, 0.1)', backgroundColor: 'rgba(189, 138, 28, 0.1)',
border: '1px solid #d78e06', border: '1px solid #d78e06',
boxSizing: 'border-box', boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 3,
}} }}
> >
{/* Header Row (120×24 at rel 99, 9.5) */}
{/* Header Row */}
<div <div
style={{ style={{
position: 'absolute',
left: 99,
top: 9.5,
width: 120,
height: 24,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}} }}
> >
<img <img
src="/assets/images/icon-customer-support-headset-gold.svg" src="/assets/images/icon-customer-support-headset-gold.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 28,
top: 3.5,
width: 92,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#d78e06', color: '#d78e06',
textAlign: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
@ -215,14 +189,9 @@ export const ShopSupportPage: React.FC = () => {
</span> </span>
</div> </div>
{/* Body Text at rel (12, 35.5), 294×36 */}
{/* Body Text */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 35.5,
width: 294,
height: 36,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
@ -235,23 +204,16 @@ export const ShopSupportPage: React.FC = () => {
</div> </div>
</div> </div>
{/* Request Subject Section (4178:11682) at rel (12, 218), 318×173 */}
{/* Request Subject Section (4178:11682) */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 218,
width: 318,
height: 173,
display: 'flex',
flexDirection: 'column',
gap: 16,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 318,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
@ -262,30 +224,20 @@ export const ShopSupportPage: React.FC = () => {
Request Subject<span style={{ color: '#ff383c' }}>*</span> Request Subject<span style={{ color: '#ff383c' }}>*</span>
</div> </div>
{/* 6 Subject Tiles Grid (318×136 at rel 0, 37) */}
<div
style={{
position: 'absolute',
left: 0,
top: 37,
width: 318,
height: 136,
}}
>
{/* 6 Subject Tiles Grid */}
<div className="habib-support-subjects-grid">
{SUPPORT_SUBJECT_OPTIONS.map((option) => { {SUPPORT_SUBJECT_OPTIONS.map((option) => {
const isSelected = option.id === selectedSubjectId; const isSelected = option.id === selectedSubjectId;
const topY = option.row === 0 ? 0 : 73;
return ( return (
<div
<button
key={option.id} key={option.id}
type="button"
onClick={() => setSelectedSubjectId(option.id)} onClick={() => setSelectedSubjectId(option.id)}
style={{ style={{
position: 'absolute',
left: option.relX,
top: topY,
width: 98,
height: 63,
width: '100%',
minHeight: 63,
padding: '8px 4px',
borderRadius: 15, borderRadius: 15,
background: isSelected background: isSelected
? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)' ? 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)'
@ -293,60 +245,51 @@ export const ShopSupportPage: React.FC = () => {
border: `1px solid ${isSelected ? '#d78e06' : '#bcbcbc'}`, border: `1px solid ${isSelected ? '#d78e06' : '#bcbcbc'}`,
boxSizing: 'border-box', boxSizing: 'border-box',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: 4,
}} }}
> >
<img <img
src={option.iconSrc} src={option.iconSrc}
alt={option.label} alt={option.label}
style={{ style={{
position: 'absolute',
left: option.iconLeft,
top: 9,
width: 28, width: 28,
height: 28, height: 28,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: option.labelLeft,
top: 41,
width: option.labelWidth,
height: 13,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: isSelected ? 700 : 600, fontWeight: isSelected ? 700 : 600,
fontSize: 10, fontSize: 10,
lineHeight: '12.9px', lineHeight: '12.9px',
color: isSelected ? '#111111' : '#3d3d3d', color: isSelected ? '#111111' : '#3d3d3d',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
{option.label} {option.label}
</span> </span>
</div>
</button>
); );
})} })}
</div> </div>
</div> </div>
{/* Description* Section (4178:11675) at rel (12, 411), 318×179 */}
{/* Description* Section (4178:11675) */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 411,
width: 318,
height: 179,
display: 'flex',
flexDirection: 'column',
gap: 14,
}} }}
> >
<div
<label
htmlFor="support-description-input"
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 318,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
@ -355,58 +298,42 @@ export const ShopSupportPage: React.FC = () => {
}} }}
> >
Description<span style={{ color: '#ff383c' }}>*</span> Description<span style={{ color: '#ff383c' }}>*</span>
</div>
</label>
<div
style={{
position: 'absolute',
left: 0,
top: 31,
width: 318,
<textarea
id="support-description-input"
className="habib-textarea"
value={description}
onChange={(e) => setDescription(e.target.value)}
placeholder="Write here..."
style={{
width: '100%',
height: 148, height: 148,
padding: '10px 12px',
borderRadius: 15, borderRadius: 15,
border: '1px solid #bcbcbc', border: '1px solid #bcbcbc',
boxSizing: 'border-box', boxSizing: 'border-box',
}}
>
<span
style={{
position: 'absolute',
left: 10,
top: 10,
width: 68,
height: 20,
resize: 'vertical',
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 12, fontSize: 12,
lineHeight: '18px', lineHeight: '18px',
color: '#bcbcbc',
display: 'flex',
alignItems: 'center',
color: '#111111',
backgroundColor: 'transparent',
}} }}
>
Write here...
</span>
</div>
/>
</div> </div>
{/* Add Evidence or Image(Optional) Section (4178:11683) at rel (12, 610), 318×137 */}
{/* Add Evidence or Image(Optional) Section (4178:11683) */}
<div <div
style={{ style={{
position: 'absolute',
left: 12,
top: 610,
width: 318,
height: 137,
display: 'flex',
flexDirection: 'column',
gap: 16,
}} }}
> >
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 318,
height: 17,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
@ -419,62 +346,48 @@ export const ShopSupportPage: React.FC = () => {
<div <div
style={{ style={{
position: 'absolute',
left: 0,
top: 37,
width: 318,
height: 100,
width: '100%',
minHeight: 100,
padding: '16px 12px',
borderRadius: 15, borderRadius: 15,
border: '1px dashed #bcbcbc', border: '1px dashed #bcbcbc',
boxSizing: 'border-box', boxSizing: 'border-box',
cursor: 'pointer', cursor: 'pointer',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: 2,
}} }}
> >
<img <img
src="/assets/images/icon-upload-image-placeholder.svg" src="/assets/images/icon-upload-image-placeholder.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 147,
top: 22.5,
width: 24, width: 24,
height: 24, height: 24,
}} }}
/> />
<div <div
style={{ style={{
position: 'absolute',
left: 108.5,
top: 46.5,
width: 101,
height: 20,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 400, fontWeight: 400,
fontSize: 14, fontSize: 14,
lineHeight: '20px', lineHeight: '20px',
color: '#111111', color: '#111111',
textAlign: 'center', textAlign: 'center',
whiteSpace: 'nowrap',
}} }}
> >
+ Upload Image + Upload Image
</div> </div>
<div <div
style={{ style={{
position: 'absolute',
left: 103,
top: 66.5,
width: 112,
height: 11,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 700, fontWeight: 700,
fontSize: 12, fontSize: 12,
lineHeight: '17px', lineHeight: '17px',
color: '#bcbcbc', color: '#bcbcbc',
textAlign: 'center', textAlign: 'center',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}} }}
> >
mp4, mpeg, h24 mp4, mpeg, h24
@ -483,65 +396,48 @@ export const ShopSupportPage: React.FC = () => {
</div> </div>
</div> </div>
{/* Bottom CTA Button "Submit Order" (4177:11292) at (16, 989), 343×52 */}
{/* Bottom CTA Button "Submit Order" (4177:11292) */}
<button <button
type="button" type="button"
onClick={() => navigate('/shop-orders')} onClick={() => navigate('/shop-orders')}
style={{ style={{
position: 'absolute',
left: 16,
top: 989,
width: 343,
marginTop: 'auto',
width: '100%',
height: 52, height: 52,
borderRadius: 11, borderRadius: 11,
backgroundColor: '#d78e06', backgroundColor: '#d78e06',
border: 'none', border: 'none',
padding: 0,
padding: '0 16px',
cursor: 'pointer', cursor: 'pointer',
}}
>
<div
style={{
position: 'absolute',
left: 109,
top: 14,
width: 125,
height: 24,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
}} }}
> >
<img <img
src="/assets/images/icon-customer-support-headset-white.svg" src="/assets/images/icon-customer-support-headset-white.svg"
alt="" alt=""
style={{ style={{
position: 'absolute',
left: 0,
top: 0,
width: 24, width: 24,
height: 24, height: 24,
flexShrink: 0,
}} }}
/> />
<span <span
style={{ style={{
position: 'absolute',
left: 26,
top: 0,
width: 99,
height: 24,
fontFamily: 'var(--font-sans)', fontFamily: 'var(--font-sans)',
fontWeight: 600, fontWeight: 600,
fontSize: 16, fontSize: 16,
lineHeight: '24px', lineHeight: '24px',
color: '#fbfbfc', color: '#fbfbfc',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
}} }}
> >
Submit Order Submit Order
</span> </span>
</div>
</button> </button>
</div>
</MobileShell> </MobileShell>
); );
}; };

31
src/pages/test/PixelVerificationModal.tsx

@ -62,14 +62,16 @@ export const PixelVerificationModal: React.FC<PixelVerificationModalProps> = ({
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
padding: '12px 24px',
padding: '10px var(--page-px, 16px)',
backgroundColor: '#111916', backgroundColor: '#111916',
borderBottom: '1px solid rgba(255, 255, 255, 0.12)', borderBottom: '1px solid rgba(255, 255, 255, 0.12)',
flexWrap: 'wrap', flexWrap: 'wrap',
gap: 12,
gap: 10,
maxHeight: '42vh',
overflowY: 'auto',
}} }}
> >
<div style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 10, flexWrap: 'wrap', minWidth: 0 }}>
<span <span
style={{ style={{
backgroundColor: '#00714f', backgroundColor: '#00714f',
@ -78,18 +80,19 @@ export const PixelVerificationModal: React.FC<PixelVerificationModalProps> = ({
fontWeight: 600, fontWeight: 600,
padding: '4px 10px', padding: '4px 10px',
borderRadius: 6, borderRadius: 6,
flexShrink: 0,
}} }}
> >
Node {entry.figmaNodeId} Node {entry.figmaNodeId}
</span> </span>
<div>
<div style={{ fontSize: 16, fontWeight: 700, lineHeight: '20px' }}>
<div style={{ minWidth: 0 }}>
<div style={{ fontSize: 15, fontWeight: 700, lineHeight: '20px', wordBreak: 'break-word' }}>
{entry.title}{' '} {entry.title}{' '}
<span style={{ color: '#9ca3af', fontWeight: 400, fontSize: 13 }}>
<span style={{ color: '#9ca3af', fontWeight: 400, fontSize: 12 }}>
({entry.figmaName} — {entry.width}×{entry.height}px) ({entry.figmaName} — {entry.width}×{entry.height}px)
</span> </span>
</div> </div>
<div style={{ fontSize: 12, color: '#9ca3af', marginTop: 2 }}>
<div style={{ fontSize: 12, color: '#9ca3af', marginTop: 2, wordBreak: 'break-all' }}>
Route:{' '} Route:{' '}
<a <a
href={activeScenarioRoute} href={activeScenarioRoute}
@ -104,10 +107,11 @@ export const PixelVerificationModal: React.FC<PixelVerificationModalProps> = ({
</div> </div>
{/* Mode Controls */} {/* Mode Controls */}
<div style={{ display: 'flex', alignItems: 'center', gap: 10, flexWrap: 'wrap' }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}>
<div <div
style={{ style={{
display: 'inline-flex', display: 'inline-flex',
flexWrap: 'wrap',
backgroundColor: '#1c2823', backgroundColor: '#1c2823',
padding: 3, padding: 3,
borderRadius: 8, borderRadius: 8,
@ -387,11 +391,17 @@ export const PixelVerificationModal: React.FC<PixelVerificationModalProps> = ({
style={{ style={{
flex: 1, flex: 1,
overflow: 'auto', overflow: 'auto',
padding: 28,
padding: '20px var(--page-px, 16px)',
}}
>
<div
style={{
display: 'flex', display: 'flex',
flexWrap: 'wrap',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'flex-start', alignItems: 'flex-start',
gap: 36,
gap: 28,
minWidth: 'min-content',
}} }}
> >
{mode === 'side-by-side' ? ( {mode === 'side-by-side' ? (
@ -585,6 +595,7 @@ export const PixelVerificationModal: React.FC<PixelVerificationModalProps> = ({
)} )}
</div> </div>
</div> </div>
</div>
); );
}; };

68
src/pages/test/TestDirectoryPage.tsx

@ -65,7 +65,7 @@ export const TestDirectoryPage: React.FC = () => {
style={{ style={{
background: 'linear-gradient(135deg, #004d36 0%, #00714f 55%, #0a2e22 100%)', background: 'linear-gradient(135deg, #004d36 0%, #00714f 55%, #0a2e22 100%)',
borderBottom: '1px solid rgba(255,255,255,0.12)', borderBottom: '1px solid rgba(255,255,255,0.12)',
padding: '32px 24px',
padding: '28px var(--page-px, 16px)',
}} }}
> >
<div style={{ maxWidth: 1280, margin: '0 auto' }}> <div style={{ maxWidth: 1280, margin: '0 auto' }}>
@ -78,7 +78,7 @@ export const TestDirectoryPage: React.FC = () => {
gap: 16, gap: 16,
}} }}
> >
<div>
<div style={{ minWidth: 0, flex: '1 1 260px' }}>
<div <div
style={{ style={{
display: 'inline-flex', display: 'inline-flex',
@ -91,17 +91,21 @@ export const TestDirectoryPage: React.FC = () => {
fontWeight: 600, fontWeight: 600,
color: '#a7f3d0', color: '#a7f3d0',
marginBottom: 10, marginBottom: 10,
maxWidth: '100%',
}} }}
> >
<span>Habib Shop — Figma Design Extraction QA & Test Hub</span>
<span style={{ wordBreak: 'break-word' }}>
Habib Shop — Figma Design Extraction QA & Test Hub
</span>
</div> </div>
<h1 <h1
style={{ style={{
margin: 0, margin: 0,
fontSize: 28,
fontSize: 'clamp(20px, 4.5vw, 28px)',
fontWeight: 700, fontWeight: 700,
letterSpacing: '-0.02em', letterSpacing: '-0.02em',
color: '#ffffff', color: '#ffffff',
wordBreak: 'break-word',
}} }}
> >
Implemented Pages, Scenarios & Pixel Verification (`/test`) Implemented Pages, Scenarios & Pixel Verification (`/test`)
@ -160,7 +164,7 @@ export const TestDirectoryPage: React.FC = () => {
<div <div
style={{ style={{
display: 'grid', display: 'grid',
gridTemplateColumns: 'repeat(auto-fit, minmax(180px, 1fr))',
gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 160px), 1fr))',
gap: 12, gap: 12,
marginTop: 24, marginTop: 24,
}} }}
@ -197,7 +201,7 @@ export const TestDirectoryPage: React.FC = () => {
style={{ style={{
maxWidth: 1280, maxWidth: 1280,
margin: '24px auto 0', margin: '24px auto 0',
padding: '0 24px',
padding: '0 var(--page-px, 16px)',
}} }}
> >
<div <div
@ -208,7 +212,7 @@ export const TestDirectoryPage: React.FC = () => {
flexWrap: 'wrap', flexWrap: 'wrap',
gap: 14, gap: 14,
backgroundColor: '#15201b', backgroundColor: '#15201b',
padding: 16,
padding: 14,
borderRadius: 12, borderRadius: 12,
border: '1px solid rgba(255,255,255,0.08)', border: '1px solid rgba(255,255,255,0.08)',
}} }}
@ -252,7 +256,10 @@ export const TestDirectoryPage: React.FC = () => {
value={searchQuery} value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)} onChange={(e) => setSearchQuery(e.target.value)}
style={{ style={{
minWidth: 280,
flex: '1 1 220px',
minWidth: 0,
width: '100%',
maxWidth: 360,
padding: '8px 14px', padding: '8px 14px',
borderRadius: 8, borderRadius: 8,
border: '1px solid rgba(255,255,255,0.15)', border: '1px solid rgba(255,255,255,0.15)',
@ -268,7 +275,7 @@ export const TestDirectoryPage: React.FC = () => {
<div <div
style={{ style={{
display: 'grid', display: 'grid',
gridTemplateColumns: 'repeat(auto-fill, minmax(360px, 1fr))',
gridTemplateColumns: 'repeat(auto-fill, minmax(min(100%, 340px), 1fr))',
gap: 20, gap: 20,
marginTop: 24, marginTop: 24,
}} }}
@ -284,21 +291,23 @@ export const TestDirectoryPage: React.FC = () => {
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
justifyContent: 'space-between', justifyContent: 'space-between',
minWidth: 0,
}} }}
> >
<div> <div>
{/* Top Card Header */} {/* Top Card Header */}
<div <div
style={{ style={{
padding: '14px 16px',
padding: '12px 14px',
borderBottom: '1px solid rgba(255,255,255,0.08)', borderBottom: '1px solid rgba(255,255,255,0.08)',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
flexWrap: 'wrap',
gap: 8, gap: 8,
}} }}
> >
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6, flexWrap: 'wrap' }}>
<span <span
style={{ style={{
backgroundColor: '#00714f', backgroundColor: '#00714f',
@ -348,10 +357,11 @@ export const TestDirectoryPage: React.FC = () => {
{/* Main Body with Reference Thumbnail & Details */} {/* Main Body with Reference Thumbnail & Details */}
<div <div
style={{ style={{
padding: 16,
padding: 14,
display: 'flex', display: 'flex',
gap: 16,
gap: 14,
alignItems: 'flex-start', alignItems: 'flex-start',
flexWrap: 'wrap',
}} }}
> >
{/* Reference Thumbnail Preview */} {/* Reference Thumbnail Preview */}
@ -359,8 +369,8 @@ export const TestDirectoryPage: React.FC = () => {
onClick={() => setInspectingEntry(entry)} onClick={() => setInspectingEntry(entry)}
title="Click to open Pixel Comparison Modal" title="Click to open Pixel Comparison Modal"
style={{ style={{
width: 96,
height: 148,
width: 88,
height: 140,
flexShrink: 0, flexShrink: 0,
backgroundColor: '#0b110e', backgroundColor: '#0b110e',
borderRadius: 8, borderRadius: 8,
@ -398,7 +408,7 @@ export const TestDirectoryPage: React.FC = () => {
</div> </div>
{/* Text Details */} {/* Text Details */}
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{ flex: '1 1 160px', minWidth: 0 }}>
<h2 <h2
style={{ style={{
margin: 0, margin: 0,
@ -406,6 +416,7 @@ export const TestDirectoryPage: React.FC = () => {
fontWeight: 700, fontWeight: 700,
color: '#ffffff', color: '#ffffff',
lineHeight: '22px', lineHeight: '22px',
wordBreak: 'break-word',
}} }}
> >
{entry.title} {entry.title}
@ -415,6 +426,7 @@ export const TestDirectoryPage: React.FC = () => {
fontSize: 12, fontSize: 12,
color: '#9ca3af', color: '#9ca3af',
marginTop: 2, marginTop: 2,
wordBreak: 'break-word',
}} }}
> >
Figma Name: <strong style={{ color: '#e5e7eb' }}>{entry.figmaName}</strong> Figma Name: <strong style={{ color: '#e5e7eb' }}>{entry.figmaName}</strong>
@ -425,6 +437,7 @@ export const TestDirectoryPage: React.FC = () => {
color: '#38ae8a', color: '#38ae8a',
marginTop: 4, marginTop: 4,
fontFamily: 'monospace', fontFamily: 'monospace',
wordBreak: 'break-all',
}} }}
> >
{entry.route} {entry.route}
@ -438,6 +451,7 @@ export const TestDirectoryPage: React.FC = () => {
fontSize: 12, fontSize: 12,
color: '#d1d5db', color: '#d1d5db',
lineHeight: '17px', lineHeight: '17px',
wordBreak: 'break-word',
}} }}
> >
{entry.description} {entry.description}
@ -446,7 +460,7 @@ export const TestDirectoryPage: React.FC = () => {
</div> </div>
{/* Scenarios List */} {/* Scenarios List */}
<div style={{ padding: '0 16px 14px' }}>
<div style={{ padding: '0 14px 14px' }}>
<div <div
style={{ style={{
fontSize: 11, fontSize: 11,
@ -468,6 +482,8 @@ export const TestDirectoryPage: React.FC = () => {
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
flexWrap: 'wrap',
gap: 6,
padding: '6px 10px', padding: '6px 10px',
borderRadius: 6, borderRadius: 6,
backgroundColor: '#1c2a24', backgroundColor: '#1c2a24',
@ -477,8 +493,15 @@ export const TestDirectoryPage: React.FC = () => {
fontSize: 12, fontSize: 12,
}} }}
> >
<span>{sc.label}</span>
<span style={{ color: '#38ae8a', fontSize: 11, fontFamily: 'monospace' }}>
<span style={{ wordBreak: 'break-word' }}>{sc.label}</span>
<span
style={{
color: '#38ae8a',
fontSize: 11,
fontFamily: 'monospace',
wordBreak: 'break-all',
}}
>
{sc.route} → {sc.route} →
</span> </span>
</Link> </Link>
@ -490,17 +513,18 @@ export const TestDirectoryPage: React.FC = () => {
{/* Card Footer Actions */} {/* Card Footer Actions */}
<div <div
style={{ style={{
padding: '12px 16px',
padding: '12px 14px',
backgroundColor: '#111a16', backgroundColor: '#111a16',
borderTop: '1px solid rgba(255,255,255,0.08)', borderTop: '1px solid rgba(255,255,255,0.08)',
display: 'flex', display: 'flex',
flexWrap: 'wrap',
gap: 10, gap: 10,
}} }}
> >
<Link <Link
to={entry.route} to={entry.route}
style={{ style={{
flex: 1,
flex: '1 1 110px',
textAlign: 'center', textAlign: 'center',
padding: '8px 12px', padding: '8px 12px',
borderRadius: 8, borderRadius: 8,
@ -517,7 +541,7 @@ export const TestDirectoryPage: React.FC = () => {
type="button" type="button"
onClick={() => setInspectingEntry(entry)} onClick={() => setInspectingEntry(entry)}
style={{ style={{
flex: 1,
flex: '1 1 130px',
padding: '8px 12px', padding: '8px 12px',
borderRadius: 8, borderRadius: 8,
backgroundColor: '#1f2f28', backgroundColor: '#1f2f28',

Loading…
Cancel
Save