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. 129
      src/components/account/AccountMenuRow.tsx
  3. 111
      src/components/account/HabibCoinsBanner.tsx
  4. 129
      src/components/account/OrderCounterCard.tsx
  5. 131
      src/components/account/ProviderBadgeCard.tsx
  6. 355
      src/components/checkout/AddressCard.tsx
  7. 565
      src/components/checkout/CartItemCard.tsx
  8. 95
      src/components/checkout/OrderSummaryRows.tsx
  9. 144
      src/components/checkout/PaymentMethodCard.tsx
  10. 141
      src/components/checkout/ReviewItemCard.tsx
  11. 81
      src/components/common/CategoryCard.tsx
  12. 213
      src/components/common/CompactProductCard.tsx
  13. 220
      src/components/common/GridProductCard.tsx
  14. 76
      src/components/common/SearchBar.tsx
  15. 634
      src/components/layout/BottomNavBar.tsx
  16. 40
      src/components/layout/MobileShell.tsx
  17. 53
      src/components/layout/StatusBar.tsx
  18. 227
      src/components/layout/StickyFooterBar.tsx
  19. 71
      src/components/layout/TopHeader.tsx
  20. 166
      src/components/orders/OrderFilterTabs.tsx
  21. 418
      src/components/orders/OrderListCard.tsx
  22. 286
      src/components/orders/ShipmentStatusCard.tsx
  23. 4
      src/data/routesRegistry.ts
  24. 628
      src/index.css
  25. 1546
      src/pages/account/LanguageSettingPage.tsx
  26. 1085
      src/pages/account/ProviderRequestPage.tsx
  27. 356
      src/pages/account/ShopAccountPage.tsx
  28. 44
      src/pages/account/ShopAddressPage.tsx
  29. 1051
      src/pages/catalog/ShopBoothPage.tsx
  30. 30
      src/pages/catalog/ShopCatItemsPage.tsx
  31. 31
      src/pages/catalog/ShopCategoryPage.tsx
  32. 974
      src/pages/catalog/ShopSinglePage.tsx
  33. 1208
      src/pages/chat/ShopChatPage.tsx
  34. 381
      src/pages/checkout/ShopBuy01Page.tsx
  35. 418
      src/pages/checkout/ShopCartPage.tsx
  36. 279
      src/pages/checkout/ShopOrderSummaryPage.tsx
  37. 541
      src/pages/checkout/ShopPayResultPage.tsx
  38. 375
      src/pages/checkout/ShopPaymentMethodsPage.tsx
  39. 337
      src/pages/checkout/ShopPaymentPage.tsx
  40. 950
      src/pages/home/ShopHomePage.tsx
  41. 410
      src/pages/orders/ShopOrderDetailPage.tsx
  42. 40
      src/pages/orders/ShopOrdersPage.tsx
  43. 614
      src/pages/orders/ShopSupportPage.tsx
  44. 37
      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

129
src/components/account/AccountMenuRow.tsx

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

111
src/components/account/HabibCoinsBanner.tsx

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

129
src/components/account/OrderCounterCard.tsx

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

131
src/components/account/ProviderBadgeCard.tsx

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

355
src/components/checkout/AddressCard.tsx

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

565
src/components/checkout/CartItemCard.tsx

@ -21,268 +21,243 @@ export const MainCartItemCard: React.FC<MainCartItemCardProps> = ({
return (
<div
style={{
position: 'absolute',
left: '17px',
top: `${item.y}px`,
width: '342px',
height: '123px',
width: '100%',
minHeight: '123px',
padding: '12px',
borderRadius: '20px',
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff',
display: 'flex',
alignItems: 'stretch',
gap: '8px',
}}
>
{/* Inner Frame 2095586695 at (12, 12) size 318x99 */}
<div
<img
src={item.imageSrc}
alt={item.title}
onClick={() => onClickItem?.(item.id)}
style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '318px',
width: 'clamp(78px, 27vw, 103px)',
height: '99px',
borderRadius: '8px',
objectFit: 'cover',
flexShrink: 0,
cursor: onClickItem ? 'pointer' : undefined,
}}
>
<img
src={item.imageSrc}
alt={item.title}
onClick={() => onClickItem?.(item.id)}
style={{
position: 'absolute',
left: 0,
top: 0,
width: '102.99px',
height: '99px',
borderRadius: '8px',
objectFit: 'cover',
cursor: onClickItem ? 'pointer' : undefined,
}}
/>
/>
{/* Right Info Frame at rel=(109.99, 0) size=208.01x99 */}
{/* Right Info Column */}
<div
style={{
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minHeight: '99px',
}}
>
{/* Top Row: Title + Origin & Close Button */}
<div
style={{
position: 'absolute',
left: '109.99px',
top: 0,
width: '208.01px',
height: '99px',
display: 'flex',
alignItems: 'flex-start',
justifyContent: 'space-between',
gap: '8px',
}}
>
{/* Title */}
<div
onClick={() => onClickItem?.(item.id)}
style={{
position: 'absolute',
left: 0,
top: 0,
width: '146px',
height: `${item.titleHeight}px`,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '12px',
lineHeight: `${item.titleLineHeight}px`,
color: '#111111',
cursor: onClickItem ? 'pointer' : undefined,
}}
>
{item.title}
</div>
{/* Origin Row */}
<div
onClick={() => onClickOrigin?.(item.id)}
style={{
position: 'absolute',
left: 0,
top: `${item.originRelY}px`,
width: '125px',
height: '10px',
cursor: onClickOrigin ? 'pointer' : undefined,
}}
>
<img
src="/assets/images/icon-flag-iran-10.svg"
alt="Iran"
style={{
position: 'absolute',
left: 0,
top: 0,
width: '10px',
height: '10px',
}}
/>
<span
<div style={{ flex: 1, minWidth: 0 }}>
<div
onClick={() => onClickItem?.(item.id)}
style={{
position: 'absolute',
left: '13px',
top: 0,
width: '112px',
height: '10px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '8.5px',
lineHeight: '12.52px',
color: '#747474',
fontSize: '12px',
lineHeight: `${item.titleLineHeight}px`,
color: '#111111',
cursor: onClickItem ? 'pointer' : undefined,
}}
>
{item.origin}
</span>
{item.title}
</div>
{/* Origin Row */}
<div
onClick={() => onClickOrigin?.(item.id)}
style={{
marginTop: '3px',
display: 'inline-flex',
alignItems: 'center',
gap: '3px',
cursor: onClickOrigin ? 'pointer' : undefined,
}}
>
<img
src="/assets/images/icon-flag-iran-10.svg"
alt="Iran"
style={{
width: '10px',
height: '10px',
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '8.5px',
lineHeight: '12.52px',
color: '#747474',
}}
>
{item.origin}
</span>
</div>
</div>
{/* Close / Remove Button at rel=(184, 0) size=24x24 rad=8 */}
{/* Close / Remove Button */}
<div
onClick={() => onRemove?.(item.id)}
role={onRemove ? 'button' : undefined}
aria-label="Remove item"
style={{
position: 'absolute',
left: '184px',
top: 0,
width: '24px',
height: '24px',
borderRadius: '8px',
backgroundColor: 'rgba(116, 116, 116, 0.05)',
cursor: onRemove ? 'pointer' : undefined,
flexShrink: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<img
src="/assets/images/icon-close-xmark-grey.svg"
alt="Remove"
style={{
position: 'absolute',
left: 0,
top: 0,
width: '24px',
height: '24px',
}}
/>
</div>
</div>
{/* Bottom Price + Stepper Row */}
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '8px',
marginTop: '8px',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '16px',
lineHeight: '20px',
color: 'var(--color-text-charcoal)',
whiteSpace: 'nowrap',
}}
>
{item.price}
</span>
{/* Bottom Price + Stepper Row at rel=(0, 65) size=208.01x34 */}
{/* Quantity Stepper Pill 83.4x34 */}
<div
style={{
position: 'absolute',
left: 0,
top: '65px',
width: '208.01px',
position: 'relative',
width: '83.4px',
height: '34px',
borderRadius: '12px',
backgroundColor: '#ffffff',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
flexShrink: 0,
}}
>
{/* Minus Button */}
<div
className="habib-qty-btn"
onClick={() => onDecrement?.(item.id)}
role={onDecrement ? 'button' : undefined}
aria-label="Decrease quantity"
style={{
position: 'absolute',
left: '6px',
top: '5px',
width: '24px',
height: '24px',
borderRadius: '8px',
cursor: onDecrement ? 'pointer' : undefined,
userSelect: 'none',
}}
>
<div
style={{
position: 'absolute',
left: '7.34px',
top: '11.25px',
width: '9.33px',
height: '1.5px',
backgroundColor: '#d78e06',
borderRadius: '1px',
}}
/>
</div>
{/* Quantity Number */}
<span
style={{
position: 'absolute',
left: 0,
top: '9px',
minWidth: '71px',
height: '16px',
left: '30px',
top: '10.42px',
width: '23.4px',
height: '13.16px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '16px',
lineHeight: '20px',
color: 'var(--color-text-charcoal)',
whiteSpace: 'nowrap',
fontSize: '11.51px',
lineHeight: '15.62px',
color: '#151c31',
userSelect: 'none',
}}
>
{item.price}
{item.quantity}
</span>
{/* Quantity Stepper Pill at rel=(124.61, 0) size=83.4x34 rad=12 */}
{/* Plus Button */}
<div
className="habib-qty-btn"
onClick={() => onIncrement?.(item.id)}
role={onIncrement ? 'button' : undefined}
aria-label="Increase quantity"
style={{
position: 'absolute',
left: '124.61px',
top: 0,
width: '83.4px',
height: '34px',
borderRadius: '12px',
backgroundColor: '#ffffff',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
left: '53.4px',
top: '5px',
width: '24px',
height: '24px',
borderRadius: '8px',
cursor: onIncrement ? 'pointer' : undefined,
userSelect: 'none',
}}
>
{/* Minus Button */}
<div
onClick={() => onDecrement?.(item.id)}
role={onDecrement ? 'button' : undefined}
aria-label="Decrease quantity"
style={{
position: 'absolute',
left: '6px',
top: '5px',
width: '24px',
height: '24px',
borderRadius: '8px',
backgroundColor: 'rgba(215, 142, 6, 0.15)',
cursor: onDecrement ? 'pointer' : undefined,
userSelect: 'none',
}}
>
<div
style={{
position: 'absolute',
left: '7.34px',
top: '11.25px',
width: '9.33px',
height: '1.5px',
backgroundColor: '#d78e06',
borderRadius: '1px',
}}
/>
</div>
{/* Quantity Number */}
<span
style={{
position: 'absolute',
left: '30px',
top: '10.42px',
width: '23.4px',
height: '13.16px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '11.51px',
lineHeight: '15.62px',
color: '#151c31',
userSelect: 'none',
}}
>
{item.quantity}
</span>
{/* Plus Button */}
<div
onClick={() => onIncrement?.(item.id)}
role={onIncrement ? 'button' : undefined}
aria-label="Increase quantity"
<img
src="/assets/images/icon-qty-plus-gold.svg"
alt="+"
style={{
position: 'absolute',
left: '53.4px',
top: '5px',
width: '24px',
height: '24px',
borderRadius: '8px',
backgroundColor: 'rgba(215, 142, 6, 0.15)',
cursor: onIncrement ? 'pointer' : undefined,
userSelect: 'none',
left: '6.82px',
top: '6.82px',
width: '10.36px',
height: '10.36px',
}}
>
<img
src="/assets/images/icon-qty-plus-gold.svg"
alt="+"
style={{
position: 'absolute',
left: '6.82px',
top: '6.82px',
width: '10.36px',
height: '10.36px',
}}
/>
</div>
/>
</div>
</div>
</div>
@ -299,53 +274,40 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
return (
<div
style={{
position: 'absolute',
left: '17px',
top: `${item.y}px`,
width: '342px',
height: '123px',
width: '100%',
minHeight: '123px',
padding: '12px',
borderRadius: '15px',
backgroundColor: '#ffffff',
display: 'flex',
alignItems: 'stretch',
gap: '8px',
}}
>
<div
<img
src={item.imageSrc}
alt={item.title}
style={{
position: 'absolute',
left: '12px',
top: '12px',
width: '318px',
width: 'clamp(78px, 27vw, 103px)',
height: '99px',
borderRadius: '8px',
objectFit: 'cover',
flexShrink: 0,
}}
/>
<div
style={{
flex: 1,
minWidth: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
minHeight: '99px',
}}
>
<img
src={item.imageSrc}
alt={item.title}
style={{
position: 'absolute',
left: 0,
top: 0,
width: '102.99px',
height: '99px',
borderRadius: '8px',
objectFit: 'cover',
}}
/>
<div
style={{
position: 'absolute',
left: '109.99px',
top: 0,
width: '208.01px',
height: '99px',
}}
>
<div>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: '208.01px',
height: '17px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '12px',
@ -357,33 +319,23 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
</div>
<div
style={{
position: 'absolute',
left: 0,
top: '19px',
width: '125px',
height: '10px',
marginTop: '3px',
display: 'inline-flex',
alignItems: 'center',
gap: '3px',
}}
>
<img
src="/assets/images/icon-flag-iran-10.svg"
alt="Iran"
style={{
position: 'absolute',
left: 0,
top: 0,
width: '10px',
height: '10px',
flexShrink: 0,
}}
/>
<span
style={{
position: 'absolute',
left: '13px',
top: 0,
width: '112px',
height: '10px',
display: 'flex',
alignItems: 'flex-end',
fontFamily: 'var(--font-sans)',
fontWeight: 400,
fontSize: '8.5px',
@ -394,88 +346,79 @@ export const OrderSummaryBgItemCard: React.FC<OrderSummaryBgItemCardProps> = ({
{item.origin}
</span>
</div>
</div>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: '8px',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '18px',
lineHeight: '26px',
color: 'var(--color-text-charcoal)',
}}
>
{item.price}
</span>
<div
style={{
position: 'absolute',
left: 0,
top: '65px',
width: '208.01px',
position: 'relative',
width: '82px',
height: '34px',
borderRadius: '6.58px',
backgroundColor: '#ffffff',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
flexShrink: 0,
}}
>
<img
src={item.leftIconSrc}
alt=""
style={{
position: 'absolute',
left: '10.9px',
top: '10px',
width: '14px',
height: '14px',
}}
/>
<span
style={{
position: 'absolute',
left: 0,
top: '9px',
width: '71px',
height: '16px',
left: '36.9px',
top: '10.42px',
width: '7.4px',
height: '13.16px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '18px',
lineHeight: '26px',
color: 'var(--color-text-charcoal)',
fontSize: '11.51px',
lineHeight: '15.62px',
color: '#151c31',
}}
>
{item.price}
{item.quantity}
</span>
<div
<img
src="/assets/images/icon-plus-grey-15.svg"
alt="+"
style={{
position: 'absolute',
left: '126.01px',
top: 0,
width: '82px',
height: '34px',
borderRadius: '6.58px',
backgroundColor: '#ffffff',
boxShadow: '0px 1.64px 10.69px rgba(30, 30, 30, 0.1)',
left: '56.3px',
top: '9.6px',
width: '14.8px',
height: '14.8px',
}}
>
<img
src={item.leftIconSrc}
alt=""
style={{
position: 'absolute',
left: '10.9px',
top: '10px',
width: '14px',
height: '14px',
}}
/>
<span
style={{
position: 'absolute',
left: '36.9px',
top: '10.42px',
width: '7.4px',
height: '13.16px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '11.51px',
lineHeight: '15.62px',
color: '#151c31',
}}
>
{item.quantity}
</span>
<img
src="/assets/images/icon-plus-grey-15.svg"
alt="+"
style={{
position: 'absolute',
left: '56.3px',
top: '9.6px',
width: '14.8px',
height: '14.8px',
}}
/>
</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';
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 (
<div
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
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) => (
<div
key={row.id}
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
style={{
position: 'absolute',
left: 0,
top: 0,
width: `${row.labelWidth}px`,
height: '20px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '14px',
@ -65,16 +53,12 @@ export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
</span>
<span
style={{
position: 'absolute',
left: `${valueLeft}px`,
top: 0,
width: '42px',
height: '20px',
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: '14px',
lineHeight: '20px',
color: '#747474',
flexShrink: 0,
}}
>
{row.value}
@ -83,37 +67,28 @@ export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
))}
</div>
{/* Line 402 at relY=95 */}
{/* Divider */}
<div
style={{
position: 'absolute',
left: 0,
top: '95px',
width: '341px',
width: '100%',
height: '1px',
backgroundColor: '#d7dbe2',
}}
/>
{/* Total Row at relY=110 */}
{/* Total Row */}
<div
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
style={{
position: 'absolute',
left: 0,
top: '2px',
width: '38px',
height: '20px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '16px',
@ -125,18 +100,12 @@ export const OrderSummaryRows: React.FC<OrderSummaryRowsProps> = ({
</span>
<span
style={{
position: 'absolute',
left: `${totalValueLeft}px`,
top: '2px',
width: '51px',
height: '20px',
display: 'flex',
alignItems: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '16px',
lineHeight: '20px',
color: 'var(--color-text-charcoal)',
flexShrink: 0,
}}
>
$70.50

144
src/components/checkout/PaymentMethodCard.tsx

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

141
src/components/checkout/ReviewItemCard.tsx

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

81
src/components/common/CategoryCard.tsx

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

213
src/components/common/CompactProductCard.tsx

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

220
src/components/common/GridProductCard.tsx

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

76
src/components/common/SearchBar.tsx

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

634
src/components/layout/BottomNavBar.tsx

@ -1,311 +1,411 @@
import React from 'react';
import React, { useEffect, useSyncExternalStore } from 'react';
import { useNavigate } from 'react-router-dom';
export type BottomNavTab = 'home' | 'category' | 'account' | 'cart';
interface BottomNavBarProps {
activeTab: BottomNavTab;
top: number;
top?: number;
showCartBadge?: boolean;
cartBadgeCount?: number;
}
type WavePhase = 'idle' | 'flatten' | 'rise';
interface NavWaveSnapshot {
leaving: BottomNavTab | null;
entering: BottomNavTab | null;
seq: number;
}
const NAV_ICON_ASSETS = [
'/assets/images/nav-home-active.svg',
'/assets/images/nav-home-inactive.svg',
'/assets/images/nav-category-active.svg',
'/assets/images/nav-category-inactive.svg',
'/assets/images/nav-account-active.svg',
'/assets/images/nav-account-inactive.svg',
'/assets/images/nav-cart-active.svg',
'/assets/images/nav-cart-inactive.svg',
];
// Persists across per-page BottomNavBar unmounts on route navigation.
let lastCommittedTab: BottomNavTab | null = null;
let waveSnapshot: NavWaveSnapshot = { leaving: null, entering: null, seq: 0 };
let settleTimerId: number | undefined;
const waveListeners = new Set<() => void>();
function tabFromPathname(pathname: string): BottomNavTab | null {
if (pathname === '/' || pathname === '/shop-home') return 'home';
if (pathname === '/shop-category') return 'category';
if (pathname === '/shop-account' || pathname === '/shop-category-4214-345') return 'account';
if (pathname === '/shop-cart') return 'cart';
return null;
}
function subscribeWave(listener: () => void): () => void {
waveListeners.add(listener);
return () => {
waveListeners.delete(listener);
};
}
function getWaveSnapshot(): NavWaveSnapshot {
return waveSnapshot;
}
function emitWaveSnapshot(next: NavWaveSnapshot): void {
waveSnapshot = next;
waveListeners.forEach((listener) => listener());
}
function completeWaveTransition(seq: number): void {
if (waveSnapshot.seq !== seq) {
return;
}
if (waveSnapshot.leaving === null && waveSnapshot.entering === null) {
return;
}
window.clearTimeout(settleTimerId);
emitWaveSnapshot({ leaving: null, entering: null, seq });
}
function startWaveTransition(fromTab: BottomNavTab, toTab: BottomNavTab): void {
if (fromTab === toTab) {
lastCommittedTab = toTab;
return;
}
lastCommittedTab = toTab;
const nextSeq = waveSnapshot.seq + 1;
window.clearTimeout(settleTimerId);
emitWaveSnapshot({ leaving: fromTab, entering: toTab, seq: nextSeq });
// Fallback cleanup when prefers-reduced-motion disables CSS animations.
settleTimerId = window.setTimeout(() => {
completeWaveTransition(nextSeq);
}, 650);
}
if (typeof window !== 'undefined') {
for (const src of NAV_ICON_ASSETS) {
const img = new Image();
img.src = src;
}
window.addEventListener(
'popstate',
() => {
const nextTab = tabFromPathname(window.location.pathname);
if (lastCommittedTab !== null && nextTab !== null && nextTab !== lastCommittedTab) {
startWaveTransition(lastCommittedTab, nextTab);
}
},
{ capture: true }
);
}
function getItemVisualClass(isActive: boolean, phase: WavePhase | null): string {
if (phase === 'rise') return 'is-entering';
if (phase === 'flatten') return 'is-leaving';
return isActive ? 'is-active' : 'is-inactive';
}
const NavTabIcon: React.FC<{
activeSrc: string;
inactiveSrc: string;
alt: string;
visualClass: string;
}> = ({ activeSrc, inactiveSrc, alt, visualClass }) => (
<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> = ({
activeTab,
top,
showCartBadge = true,
cartBadgeCount = 2,
}) => {
const navigate = useNavigate();
const snapshot = useSyncExternalStore(subscribeWave, getWaveSnapshot, getWaveSnapshot);
useEffect(() => {
lastCommittedTab = activeTab;
}, [activeTab]);
const handleTabNavigate = (targetTab: BottomNavTab, route: string) => {
if (activeTab !== targetTab) {
startWaveTransition(activeTab, targetTab);
}
navigate(route);
};
const handleRiseSettled = () => {
completeWaveTransition(snapshot.seq);
};
// Indicator wave center X inside Subtract boolean operation (Ellipse 2 x + 9)
const cx =
activeTab === 'home'
? 44
: activeTab === 'category'
? 116
: activeTab === 'account'
? 260
: 331;
const getWavePhase = (tab: BottomNavTab): WavePhase | null => {
if (activeTab === tab) {
return snapshot.entering === tab ? 'rise' : 'idle';
}
return snapshot.leaving === tab ? 'flatten' : null;
};
const indicatorWavePath = `M ${cx - 20.894} 78 C ${cx - 13.8055} 78 ${cx - 7.0885} 71 ${cx} 71 C ${cx + 7.0885} 71 ${cx + 13.8055} 78 ${cx + 20.894} 78 Z`;
const homePhase = getWavePhase('home');
const categoryPhase = getWavePhase('category');
const accountPhase = getWavePhase('account');
const cartPhase = getWavePhase('cart');
const homeVisual = getItemVisualClass(activeTab === 'home', homePhase);
const categoryVisual = getItemVisualClass(activeTab === 'category', categoryPhase);
const accountVisual = getItemVisualClass(activeTab === 'account', accountPhase);
const cartVisual = getItemVisualClass(activeTab === 'cart', cartPhase);
return (
<div
<nav
aria-label="Bottom Navigation"
style={{
position: 'absolute',
left: 0,
top: `${top}px`,
width: '375px',
position: 'sticky',
bottom: 0,
marginTop: 'auto',
width: '100%',
height: '78px',
flexShrink: 0,
zIndex: 30,
}}
>
{/* Subtract white shape with active boolean wave indicator */}
{/* White rounded background */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: '375px',
position: 'relative',
width: '100%',
height: '78px',
borderRadius: '17px',
borderRadius: '17px 17px 0 0',
backgroundColor: '#ffffff',
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>
{/* Home Tab */}
<div
onClick={() => navigate('/shop-home')}
style={{
position: 'absolute',
left: '21px',
top: '17px',
width: '47px',
height: '44px',
cursor: 'pointer',
}}
>
<img
src={
activeTab === 'home'
? '/assets/images/nav-home-active.svg'
: '/assets/images/nav-home-inactive.svg'
}
alt="Home"
style={{
position: 'absolute',
left: '9px',
top: 0,
width: '28px',
height: '28px',
}}
/>
<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>
{/* Category Tab */}
<div
onClick={() => navigate('/shop-category')}
style={{
position: 'absolute',
left: '91px',
top: '17px',
width: '50px',
height: '44px',
cursor: 'pointer',
}}
>
<img
src={
activeTab === 'category'
? '/assets/images/nav-category-active.svg'
: '/assets/images/nav-category-inactive.svg'
}
alt="Category"
style={{
position: 'absolute',
left: '11px',
top: 0,
width: '28px',
height: '28px',
}}
/>
<span
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',
}}
>
Category
</span>
</div>
<div className="habib-bottom-nav-inner">
{/* Home Tab */}
<button
type="button"
onClick={() => handleTabNavigate('home', '/shop-home')}
style={{
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer',
padding: 0,
}}
>
<NavTabIcon
activeSrc="/assets/images/nav-home-active.svg"
inactiveSrc="/assets/images/nav-home-inactive.svg"
alt="Home"
visualClass={homeVisual}
/>
<span className={`habib-nav-label ${homeVisual}`}>Home</span>
{homePhase && (
<IndicatorWave
key={snapshot.seq}
phase={homePhase}
onSettled={handleRiseSettled}
/>
)}
</button>
{/* Center Habib Emblem Pill (54x54 node at rel=(161, 12), exported SVG 114x85 with shadow padding) */}
<img
src="/assets/images/nav-center-habib-pill.svg"
alt="Habib"
onClick={() => navigate('/shop-home')}
style={{
position: 'absolute',
left: '131px',
top: '-7px',
width: '114px',
height: '85px',
cursor: 'pointer',
}}
/>
{/* Category Tab */}
<button
type="button"
onClick={() => handleTabNavigate('category', '/shop-category')}
style={{
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer',
padding: 0,
}}
>
<NavTabIcon
activeSrc="/assets/images/nav-category-active.svg"
inactiveSrc="/assets/images/nav-category-inactive.svg"
alt="Category"
visualClass={categoryVisual}
/>
<span className={`habib-nav-label ${categoryVisual}`}>Category</span>
{categoryPhase && (
<IndicatorWave
key={snapshot.seq}
phase={categoryPhase}
onSettled={handleRiseSettled}
/>
)}
</button>
{/* Account Tab */}
<div
onClick={() => navigate('/shop-account')}
style={{
position: 'absolute',
left: '237px',
top: '17px',
width: '45px',
height: '44px',
cursor: 'pointer',
}}
>
<img
src={
activeTab === 'account'
? '/assets/images/nav-account-active.svg'
: '/assets/images/nav-account-inactive.svg'
}
alt="Account"
style={{
position: 'absolute',
left: '9px',
top: 0,
width: '28px',
height: '28px',
}}
/>
<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>
{/* Center Habib Emblem Pill */}
<div
style={{
position: 'relative',
height: '78px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<img
src="/assets/images/nav-center-habib-pill.svg"
alt="Habib"
decoding="sync"
onClick={() => handleTabNavigate('home', '/shop-home')}
style={{
position: 'absolute',
top: '-7px',
left: '50%',
transform: 'translateX(-50%)',
width: '114px',
height: '85px',
cursor: 'pointer',
}}
/>
</div>
{/* Cart Tab */}
<div
onClick={() => navigate('/shop-cart')}
style={{
position: 'absolute',
left: '316px',
top: '17px',
width: '28px',
height: '44px',
cursor: 'pointer',
}}
>
<img
src={
activeTab === 'cart'
? '/assets/images/nav-cart-active.svg'
: '/assets/images/nav-cart-inactive.svg'
}
alt="Cart"
style={{
position: 'absolute',
left: 0,
top: 0,
width: '28px',
height: '28px',
}}
/>
<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>
{/* Account Tab */}
<button
type="button"
onClick={() => handleTabNavigate('account', '/shop-account')}
style={{
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: '1px',
cursor: 'pointer',
padding: 0,
}}
>
<NavTabIcon
activeSrc="/assets/images/nav-account-active.svg"
inactiveSrc="/assets/images/nav-account-inactive.svg"
alt="Account"
visualClass={accountVisual}
/>
<span className={`habib-nav-label ${accountVisual}`}>Account</span>
{accountPhase && (
<IndicatorWave
key={snapshot.seq}
phase={accountPhase}
onSettled={handleRiseSettled}
/>
)}
</button>
{/* Optional Cart Badge at rel=(332, 13) */}
{showCartBadge && cartBadgeCount > 0 && (
<div
style={{
position: 'absolute',
left: '332px',
top: '13px',
width: '16px',
height: '16px',
borderRadius: '8px',
backgroundColor: '#d44747',
pointerEvents: 'none',
}}
>
<span
{/* Cart Tab */}
<button
type="button"
onClick={() => handleTabNavigate('cart', '/shop-cart')}
style={{
position: 'absolute',
left: 0,
top: '3.5px',
width: '16px',
height: '8px',
position: 'relative',
height: '78px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '10px',
lineHeight: '13.9px',
color: '#ffffff',
gap: '1px',
cursor: 'pointer',
padding: 0,
}}
>
{cartBadgeCount}
</span>
<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"
visualClass={cartVisual}
/>
{showCartBadge && cartBadgeCount > 0 && (
<div
style={{
position: 'absolute',
right: '-6px',
top: '-4px',
width: '16px',
height: '16px',
borderRadius: '8px',
backgroundColor: '#d44747',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
pointerEvents: 'none',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: '10px',
lineHeight: '14px',
color: '#ffffff',
}}
>
{cartBadgeCount}
</span>
</div>
)}
</div>
<span className={`habib-nav-label ${cartVisual}`}>Cart</span>
{cartPhase && (
<IndicatorWave
key={snapshot.seq}
phase={cartPhase}
onSettled={handleRiseSettled}
/>
)}
</button>
</div>
)}
</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 isEmbed = searchParams.get('embed') === '1' || searchParams.get('bare') === '1';
const cssVars = {
'--desktop-frame-w': `${width}px`,
'--desktop-frame-h': `${height}px`,
'--desktop-frame-r': `${borderRadius}px`,
'--shell-bg': backgroundColor,
} as React.CSSProperties;
if (isEmbed) {
return (
<div
className="habib-mobile-viewport"
style={{
width: `${width}px`,
height: `${height}px`,
backgroundColor,
borderRadius: '0px',
}}
className="habib-mobile-viewport is-embed"
style={cssVars}
>
{children}
</div>
@ -37,28 +39,8 @@ export const MobileShell: React.FC<MobileShellProps> = ({
}
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}
</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>
);
};

227
src/components/layout/StickyFooterBar.tsx

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

71
src/components/layout/TopHeader.tsx

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

166
src/components/orders/OrderFilterTabs.tsx

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

418
src/components/orders/OrderListCard.tsx

@ -17,116 +17,98 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
return (
<div
style={{
position: 'absolute',
left: 17,
top: order.y,
width: 342,
height: 233,
width: '100%',
minHeight: 233,
padding: 12,
borderRadius: 20,
background: 'linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%)',
border: '1px solid #ffffff',
boxSizing: 'border-box',
display: 'flex',
flexDirection: 'column',
gap: 15,
}}
>
{/* Top section (318×86 at rel 12, 12) */}
{/* Top section */}
<div
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 */}
<div
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
style={{
position: 'absolute',
left: 0,
top: 3,
width: 76,
height: 20,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '24px',
color: '#111111',
display: 'flex',
alignItems: 'center',
gap: 6,
}}
>
{order.orderCode}
</div>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '24px',
color: '#111111',
}}
>
{order.orderCode}
</span>
<div
style={{
position: 'absolute',
left: 80,
top: 10,
width: 6,
height: 6,
borderRadius: '50%',
backgroundColor: '#dbdbdb',
}}
/>
<span
style={{
width: 6,
height: 6,
borderRadius: '50%',
backgroundColor: '#dbdbdb',
flexShrink: 0,
}}
/>
<div
style={{
position: 'absolute',
left: 90,
top: 0,
width: 53,
height: 26,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '24px',
color: '#111111',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
{order.price}
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '24px',
color: '#111111',
}}
>
{order.price}
</span>
</div>
{/* Date on right (rel 218, 4, size 100×18) */}
{/* Date on right */}
<div
style={{
position: 'absolute',
left: 218,
top: 4,
width: 100,
height: 18,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}}
>
<img
src="/assets/images/icon-date-time-grey-18.svg"
alt=""
style={{
position: 'absolute',
left: 0,
top: 0,
width: 18,
height: 18,
flexShrink: 0,
}}
/>
<span
style={{
position: 'absolute',
left: 22,
top: 2,
width: 78,
height: 14,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
@ -140,14 +122,14 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</div>
</div>
{/* Thumbnails row (315×50 at rel 0, 36) */}
{/* Thumbnails row */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: 0,
top: 36,
width: 315,
height: 50,
display: 'flex',
alignItems: 'center',
gap: 3,
overflowX: 'auto',
}}
>
{order.thumbnails.map((thumb, idx) => (
@ -156,13 +138,11 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
src={thumb.src}
alt=""
style={{
position: 'absolute',
left: thumb.relX,
top: 0,
width: 50,
height: 50,
width: 'clamp(42px, 13.5vw, 50px)',
height: 'clamp(42px, 13.5vw, 50px)',
borderRadius: thumb.radius,
objectFit: 'cover',
flexShrink: 0,
}}
/>
))}
@ -170,23 +150,21 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
{order.moreCountBadge && (
<div
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,
backgroundColor: '#dbdbdb',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
fontSize: 15,
lineHeight: '20px',
color: '#3d3d3d',
}}
@ -198,211 +176,171 @@ export const OrderListCard: React.FC<OrderListCardProps> = ({ order }) => {
</div>
</div>
{/* Grey status bar (318×41 at rel 12, 113, radius 8, fill #f3f3f3) */}
{/* Grey status bar */}
<div
style={{
position: 'absolute',
left: 12,
top: 113,
width: 318,
height: 41,
width: '100%',
minHeight: 41,
padding: '10px',
borderRadius: 8,
backgroundColor: '#f3f3f3',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
flexWrap: 'wrap',
gap: 8,
}}
>
<div
style={{
position: 'absolute',
left: 10,
top: 11.5,
width: 298,
height: 18,
display: 'flex',
alignItems: 'center',
gap: 8,
flexWrap: 'wrap',
}}
>
<img
src="/assets/images/icon-shipping-box-grey-18.svg"
alt=""
style={{
position: 'absolute',
left: 0,
top: 0,
width: 18,
height: 18,
}}
/>
<span
style={{
position: 'absolute',
left: 22,
top: 2,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
{order.itemsCountText}
</span>
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img
src="/assets/images/icon-shipping-box-grey-18.svg"
alt=""
style={{
width: 18,
height: 18,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 13,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
{order.itemsCountText}
</span>
</div>
{/* Vertical divider */}
<div
style={{
position: 'absolute',
left: 73,
top: 0.5,
width: 1,
height: 17,
backgroundColor: '#dbdbdb',
flexShrink: 0,
}}
/>
<img
src="/assets/images/icon-order-item-next-circle.svg"
alt=""
style={{
position: 'absolute',
left: 83,
top: 1,
width: 16,
height: 16,
}}
/>
<span
style={{
position: 'absolute',
left: 103,
top: 2,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
{order.shopsCountText}
</span>
{/* Right delivery count */}
<div
style={{
position: 'absolute',
left: 206,
top: 1,
width: 92,
height: 16,
}}
>
<div
<div style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<img
src="/assets/images/icon-order-item-next-circle.svg"
alt=""
style={{
position: 'absolute',
left: 0,
top: 0,
width: 16,
height: 16,
borderRadius: 10,
backgroundColor: '#0eb13c',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}
>
<img
src="/assets/images/icon-check-white-tiny.svg"
alt=""
style={{
width: 8,
height: 6,
}}
/>
</div>
/>
<span
style={{
position: 'absolute',
left: 20,
top: 1,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 12,
fontSize: 13,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
{order.deliveryProgressText}
{order.shopsCountText}
</span>
</div>
</div>
</div>
{/* View Details button (318×52 at rel 12, 169, radius 11, stroke #efc47e) */}
<button
type="button"
onClick={() => navigate('/shop-order-detail')}
style={{
position: 'absolute',
left: 12,
top: 169,
width: 318,
height: 52,
borderRadius: 11,
backgroundColor: 'transparent',
border: '1px solid #efc47e',
padding: 0,
cursor: 'pointer',
}}
>
{/* Right delivery count */}
<div
style={{
position: 'absolute',
left: 101.5,
top: 14,
width: 115,
height: 24,
display: 'inline-flex',
alignItems: 'center',
gap: 4,
}}
>
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 16,
height: 16,
borderRadius: 10,
backgroundColor: '#0eb13c',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}
>
<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"
stroke="#d78e06"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
<img
src="/assets/images/icon-check-white-tiny.svg"
alt=""
style={{
width: 8,
height: 6,
}}
/>
</svg>
</div>
<span
style={{
position: 'absolute',
left: 26,
top: 0,
width: 89,
height: 24,
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 16,
lineHeight: '24px',
color: '#d78e06',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontSize: 12,
lineHeight: '14px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
View Details
{order.deliveryProgressText}
</span>
</div>
</div>
{/* View Details button */}
<button
type="button"
onClick={() => navigate('/shop-order-detail')}
style={{
width: '100%',
height: 52,
borderRadius: 11,
backgroundColor: 'transparent',
border: '1px solid #efc47e',
padding: '0 16px',
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
marginTop: 'auto',
}}
>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" style={{ flexShrink: 0 }}>
<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"
stroke="#d78e06"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 16,
lineHeight: '24px',
color: '#d78e06',
whiteSpace: 'nowrap',
}}
>
View Details
</span>
</button>
</div>
);

286
src/components/orders/ShipmentStatusCard.tsx

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

4
src/data/routesRegistry.ts

@ -28,11 +28,11 @@ export const ALL_IMPLEMENTED_ROUTES: ScreenRouteEntry[] = [
aliases: ['/'],
category: 'Home & Discovery',
width: 375,
height: 1150,
height: 1074,
refImage: '/assets/images/references/ref-shop-home.png',
description: 'Main Habib Shop landing page with Islamic pattern header, search bar, green hero banner, 5 quick categories, Populars & New Stores product carousels, and bottom navigation.',
scenarios: [
{ label: 'Default Landing View', route: '/shop-home', description: 'Initial marketplace home state (375×1150).' },
{ label: 'Default Landing View', route: '/shop-home', description: 'Initial marketplace home state (375×1074).' },
{ label: 'Open Category Grid via "More"', route: '/shop-category', description: 'Navigate to full 2×6 category grid.' },
{ label: 'Open Single Product Card', route: '/shop-single-page', description: 'Click any product card to view product details.' },
],

628
src/index.css

@ -1,5 +1,33 @@
@import './styles/tokens.css';
:root {
--page-px: 16px;
}
@media (max-width: 359.98px) {
:root {
--page-px: 12px;
}
}
@media (min-width: 600px) and (max-width: 767.98px) {
:root {
--page-px: 22px;
}
}
@media (min-width: 768px) and (max-width: 1023.98px) {
:root {
--page-px: 28px;
}
}
@media (min-width: 1024px) {
:root {
--page-px: 16px;
}
}
*,
*::before,
*::after {
@ -22,6 +50,7 @@ body {
#root {
width: 100%;
min-height: 100vh;
min-height: 100dvh;
}
button,
@ -33,21 +62,76 @@ textarea {
background: none;
}
input,
textarea {
user-select: text;
}
.habib-search-input::placeholder,
.habib-textarea::placeholder {
color: #8f8f8f;
opacity: 1;
}
a {
color: inherit;
text-decoration: none;
}
/* Exact Mobile Screen Canvas Wrapper */
/* Outer Shell: full-bleed responsive on mobile & tablet (<1024px), centered dark frame on desktop (>=1024px) */
.habib-shell-outer {
width: 100%;
min-height: 100vh;
min-height: 100dvh;
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: flex-start;
padding: 0;
background-color: var(--shell-bg, var(--bg-page));
}
/* Mobile & Tablet Viewport (<1024px) */
.habib-mobile-viewport {
position: relative;
width: 375px;
background-color: var(--bg-page);
overflow: hidden;
display: flex;
flex-direction: column;
width: 100%;
max-width: 100%;
min-height: 100vh;
min-height: 100dvh;
background-color: var(--shell-bg, var(--bg-page));
overflow-x: clip;
flex-shrink: 0;
user-select: none;
}
/* Desktop (>=1024px): show current 375px mobile size centered on dark backdrop */
@media (min-width: 1024px) {
.habib-shell-outer {
align-items: center;
padding: 0 16px;
background-color: #1e2229;
}
.habib-mobile-viewport:not(.is-embed) {
--page-px: 16px;
width: var(--desktop-frame-w, 375px);
min-height: var(--desktop-frame-h, 814px);
border-radius: var(--desktop-frame-r, 0px);
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
}
/* Bare/Embed iframe mode for /test Pixel Verification */
.habib-mobile-viewport.is-embed {
--page-px: 16px;
width: var(--desktop-frame-w, 375px);
min-height: var(--desktop-frame-h, 814px);
border-radius: 0;
box-shadow: none;
}
.habib-node-btn {
cursor: pointer;
transition: opacity 0.12s ease;
@ -57,6 +141,25 @@ a {
opacity: 0.85;
}
.habib-cta-btn {
background-color: #d78e06;
transition: background-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.habib-cta-btn:hover:not(:disabled) {
background-color: #be7d05;
box-shadow: 0 4px 12px rgba(215, 142, 6, 0.3);
}
.habib-qty-btn {
background-color: rgba(215, 142, 6, 0.15);
transition: background-color 0.15s ease;
}
.habib-qty-btn[role='button']:hover {
background-color: rgba(215, 142, 6, 0.28);
}
.habib-scroll-container {
scrollbar-width: none;
-ms-overflow-style: none;
@ -66,3 +169,520 @@ a {
display: none;
}
/* Responsive Grids & Tracks */
.habib-product-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
width: 100%;
}
.habib-category-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
width: 100%;
}
.habib-carousel-scroller {
margin: 0 calc(-1 * var(--page-px, 16px));
padding: 0 var(--page-px, 16px);
overflow-x: auto;
overflow-y: hidden;
}
.habib-carousel-track {
display: flex;
gap: 12px;
width: max-content;
}
.habib-compact-card {
width: 152px;
flex: 0 0 152px;
}
.habib-compact-card-img {
width: 100%;
height: 112px;
}
.habib-quick-cats {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 2px;
width: 100%;
}
.habib-orders-grid {
display: flex;
flex-direction: column;
gap: 20px;
width: 100%;
}
.habib-support-subjects-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
width: 100%;
}
.habib-counters-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
width: 100%;
}
.habib-provider-badges-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
width: 100%;
}
.habib-booth-metrics-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 7px;
width: 100%;
}
.habib-single-attrs-grid {
display: grid;
grid-template-columns: 1.2fr 1.1fr 0.95fr;
gap: 7.5px;
width: 100%;
}
.habib-hero-banner {
height: 164px;
}
.habib-hero-title {
font-size: 16px;
}
.habib-hero-subtitle {
font-size: 8.5px;
}
.habib-quick-cat-label {
font-size: 7.5px;
}
.habib-single-hero-wrap {
position: relative;
width: 100%;
height: 422px;
background-color: #ffffff;
overflow: hidden;
}
.habib-single-hero-img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.habib-bottom-sheet {
width: 100%;
border-radius: 22px 22px 0 0;
background-color: #fafafa;
}
.habib-bottom-nav-inner {
width: 100%;
height: 100%;
display: grid;
grid-template-columns: 1fr 1fr 75px 1fr 1fr;
align-items: center;
padding: 0 8px;
position: relative;
}
.habib-nav-icon-wrap {
position: relative;
display: block;
width: 28px;
height: 28px;
flex-shrink: 0;
}
.habib-nav-icon {
position: absolute;
inset: 0;
width: 28px;
height: 28px;
display: block;
transition: opacity 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.habib-nav-icon-wrap.is-active .habib-nav-icon-active,
.habib-nav-icon-wrap.is-entering .habib-nav-icon-active {
opacity: 1;
}
.habib-nav-icon-wrap.is-active .habib-nav-icon-inactive,
.habib-nav-icon-wrap.is-entering .habib-nav-icon-inactive {
opacity: 0;
}
.habib-nav-icon-wrap.is-inactive .habib-nav-icon-active,
.habib-nav-icon-wrap.is-leaving .habib-nav-icon-active {
opacity: 0;
}
.habib-nav-icon-wrap.is-inactive .habib-nav-icon-inactive,
.habib-nav-icon-wrap.is-leaving .habib-nav-icon-inactive {
opacity: 1;
}
.habib-nav-icon-wrap.is-entering .habib-nav-icon-active {
animation: habib-icon-fade-in 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.habib-nav-icon-wrap.is-entering .habib-nav-icon-inactive {
animation: habib-icon-fade-out 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.habib-nav-icon-wrap.is-leaving .habib-nav-icon-active {
animation: habib-icon-fade-out 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.habib-nav-icon-wrap.is-leaving .habib-nav-icon-inactive {
animation: habib-icon-fade-in 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.habib-nav-label {
font-family: var(--font-sans);
font-weight: 600;
font-size: 12px;
line-height: 17px;
text-align: center;
white-space: nowrap;
color: #3d3d3d;
transition: color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.habib-nav-label.is-active,
.habib-nav-label.is-entering {
color: #d78e06;
}
.habib-nav-label.is-entering {
animation: habib-label-enter 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.habib-nav-label.is-leaving {
animation: habib-label-leave 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
@keyframes habib-icon-fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes habib-icon-fade-out {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@keyframes habib-label-enter {
0% {
color: #3d3d3d;
}
100% {
color: #d78e06;
}
}
@keyframes habib-label-leave {
0% {
color: #d78e06;
}
100% {
color: #3d3d3d;
}
}
.habib-nav-wave {
position: absolute;
bottom: 0;
left: 50%;
width: 42px;
height: 7px;
transform: translateX(-50%) scaleX(1) scaleY(1);
transform-origin: 50% 100%;
pointer-events: none;
}
.habib-nav-wave.is-flatten {
animation: habib-wave-flatten 260ms cubic-bezier(0.33, 0, 0.2, 1) forwards;
}
.habib-nav-wave.is-rise {
animation: habib-wave-rise 300ms cubic-bezier(0.22, 1, 0.36, 1) 140ms both;
}
@keyframes habib-wave-flatten {
0% {
transform: translateX(-50%) scaleX(1) scaleY(1);
opacity: 1;
}
85% {
opacity: 1;
}
100% {
transform: translateX(-50%) scaleX(1.16) scaleY(0.001);
opacity: 0;
}
}
@keyframes habib-wave-rise {
0% {
transform: translateX(-50%) scaleX(1.16) scaleY(0.001);
opacity: 0;
}
15% {
opacity: 1;
}
100% {
transform: translateX(-50%) scaleX(1) scaleY(1);
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.habib-nav-wave.is-flatten,
.habib-nav-wave.is-rise,
.habib-nav-icon-wrap.is-entering .habib-nav-icon,
.habib-nav-icon-wrap.is-leaving .habib-nav-icon,
.habib-nav-label.is-entering,
.habib-nav-label.is-leaving {
animation: none;
}
.habib-nav-icon,
.habib-nav-label {
transition: none;
}
.habib-nav-wave.is-flatten {
display: none;
}
}
/* Small Phone Refinements (<360px, e.g., 320px iPhone SE) */
@media (max-width: 359.98px) {
.habib-mobile-viewport:not(.is-embed) .habib-product-grid,
.habib-mobile-viewport:not(.is-embed) .habib-category-grid {
gap: 8px;
}
.habib-mobile-viewport:not(.is-embed) .habib-counters-grid {
gap: 6px;
}
.habib-mobile-viewport:not(.is-embed) .habib-support-subjects-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
}
.habib-mobile-viewport:not(.is-embed) .habib-provider-badges-grid {
grid-template-columns: 1fr;
gap: 8px;
}
.habib-mobile-viewport:not(.is-embed) .habib-single-attrs-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 5px;
}
.habib-mobile-viewport:not(.is-embed) .habib-booth-metrics-grid {
gap: 5px;
}
.habib-mobile-viewport:not(.is-embed) .habib-single-hero-wrap {
height: 350px;
}
.habib-mobile-viewport:not(.is-embed) .habib-bottom-nav-inner {
grid-template-columns: 1fr 1fr 64px 1fr 1fr;
padding: 0 4px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-title {
font-size: 14px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-subtitle {
font-size: 8px;
}
.habib-mobile-viewport:not(.is-embed) .habib-quick-cat-label {
font-size: 7px;
}
}
/* Small Tablet / Large Mobile (600px - 767.98px) */
@media (min-width: 600px) and (max-width: 767.98px) {
.habib-mobile-viewport:not(.is-embed) .habib-product-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
}
.habib-mobile-viewport:not(.is-embed) .habib-category-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
}
.habib-mobile-viewport:not(.is-embed) .habib-carousel-scroller {
margin: 0;
padding: 0;
overflow: visible;
}
.habib-mobile-viewport:not(.is-embed) .habib-carousel-track {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
width: 100%;
}
.habib-mobile-viewport:not(.is-embed) .habib-compact-card {
width: 100%;
flex: 1 1 auto;
}
.habib-mobile-viewport:not(.is-embed) .habib-compact-card-img {
height: auto;
aspect-ratio: 128 / 112;
}
.habib-mobile-viewport:not(.is-embed) .habib-single-hero-img {
object-fit: contain;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-banner {
height: 188px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-title {
font-size: 18px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-subtitle {
font-size: 10.5px;
}
.habib-mobile-viewport:not(.is-embed) .habib-quick-cat-label {
font-size: 10px;
}
}
/* Tablet (768px - 1023.98px) */
@media (min-width: 768px) and (max-width: 1023.98px) {
.habib-mobile-viewport:not(.is-embed) .habib-product-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
}
.habib-mobile-viewport:not(.is-embed) .habib-category-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 16px;
}
.habib-mobile-viewport:not(.is-embed) .habib-carousel-scroller {
margin: 0;
padding: 0;
overflow: visible;
}
.habib-mobile-viewport:not(.is-embed) .habib-carousel-track {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
width: 100%;
}
.habib-mobile-viewport:not(.is-embed) .habib-compact-card {
width: 100%;
flex: 1 1 auto;
}
.habib-mobile-viewport:not(.is-embed) .habib-compact-card-img {
height: auto;
aspect-ratio: 128 / 112;
}
.habib-mobile-viewport:not(.is-embed) .habib-orders-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
align-items: start;
}
.habib-mobile-viewport:not(.is-embed) .habib-support-subjects-grid {
grid-template-columns: repeat(6, minmax(0, 1fr));
gap: 12px;
}
.habib-mobile-viewport:not(.is-embed) .habib-provider-badges-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
}
.habib-mobile-viewport:not(.is-embed) .habib-single-attrs-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
}
.habib-mobile-viewport:not(.is-embed) .habib-booth-metrics-grid {
gap: 12px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-banner {
height: 212px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-title {
font-size: 20px;
}
.habib-mobile-viewport:not(.is-embed) .habib-hero-subtitle {
font-size: 11.5px;
}
.habib-mobile-viewport:not(.is-embed) .habib-quick-cat-label {
font-size: 11px;
}
.habib-mobile-viewport:not(.is-embed) .habib-single-hero-wrap {
height: 420px;
}
.habib-mobile-viewport:not(.is-embed) .habib-single-hero-img {
object-fit: contain;
}
.habib-mobile-viewport:not(.is-embed) .habib-bottom-sheet {
max-width: 560px;
margin: 0 auto;
}
.habib-mobile-viewport:not(.is-embed) .habib-bottom-nav-inner {
max-width: 640px;
margin: 0 auto;
}
}

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

1085
src/pages/account/ProviderRequestPage.tsx
File diff suppressed because it is too large
View File

356
src/pages/account/ShopAccountPage.tsx

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

44
src/pages/account/ShopAddressPage.tsx

@ -20,35 +20,43 @@ export const ShopAddressPage: React.FC = () => {
return (
<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
title="My Adresses"
titleTop={29}
backTo="/shop-account"
/>
{/* Saved Addresses List (4182:13410) at (14, 93), 348×184 */}
<div
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,
}}
>
{addresses.map((address) => (
<AddressCard
key={address.id}
item={address}
variant="manage"
onSelect={() => setSelectedId(address.id)}
/>
))}
</div>
{/* Saved Addresses List (4182:13410) */}
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: 10,
}}
>
{addresses.map((address) => (
<AddressCard
key={address.id}
item={address}
variant="manage"
onSelect={() => setSelectedId(address.id)}
/>
))}
</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>
);
};

1051
src/pages/catalog/ShopBoothPage.tsx
File diff suppressed because it is too large
View File

30
src/pages/catalog/ShopCatItemsPage.tsx

@ -11,34 +11,20 @@ import { TWO_COLUMN_GRID_PRODUCTS } from '../../data/catalogData';
export const ShopCatItemsPage: React.FC = () => {
return (
<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" />
{/* 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',
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '11px var(--page-px) 28px',
gap: 23,
}}
>
<div
style={{
position: 'relative',
marginLeft: 16,
marginTop: 12,
width: 344,
height: 771,
}}
>
<SearchBar showFilterButton={false} />
<div className="habib-product-grid">
{TWO_COLUMN_GRID_PRODUCTS.map((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 = () => {
return (
<MobileShell width={375} height={814} backgroundColor="#f3f1ef">
{/* 12 Category Tiles in 2-Column Scrollable Grid */}
<div
className="habib-scroll-container"
style={{
position: 'absolute',
left: 0,
top: 99,
width: 375,
height: 715,
overflowY: 'auto',
overflowX: 'hidden',
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '38px var(--page-px) 24px',
gap: 20,
}}
>
<div
style={{
position: 'relative',
marginTop: -99,
width: 375,
height: 985,
}}
>
<SearchBar showFilterButton={false} />
<div className="habib-category-grid">
{CATEGORY_GRID_TILES.map((tile) => (
<CategoryCard key={tile.id} tile={tile} />
))}
</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>
);
};

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

1208
src/pages/chat/ShopChatPage.tsx
File diff suppressed because it is too large
View File

381
src/pages/checkout/ShopBuy01Page.tsx

@ -20,192 +20,112 @@ export const ShopBuy01Page: React.FC = () => {
return (
<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" />
{/* Scrollable Shipping Details Sections */}
{/* Shipping Details Body */}
<div
className="habib-scroll-container"
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,
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '24px var(--page-px) 24px',
gap: 32,
}}
>
{/* Section Heading (4160:9197) */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 154,
height: 16,
}}
>
<img
src="/assets/images/icon-location-pin-gold.svg"
alt=""
style={{
position: 'absolute',
left: 0,
top: -4,
width: 24,
height: 24,
}}
/>
<span
style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
Delivery Address
</span>
</div>
{/* Address Cards Container (4171:1034) at rel (0, 37) */}
<div
style={{
position: 'absolute',
left: 0,
top: 37,
width: 348,
height: 247,
}}
>
{addresses.map((address) => (
<AddressCard
key={address.id}
item={address}
variant="checkout"
onSelect={() => setSelectedId(address.id)}
{/* Delivery Address Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img
src="/assets/images/icon-location-pin-gold.svg"
alt=""
style={{
width: 24,
height: 24,
flexShrink: 0,
}}
/>
))}
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: '#111111',
}}
>
Delivery Address
</span>
</div>
<AddNewAddressCard
left={0}
top={194}
onClick={() => navigate('/shop-adreess')}
/>
</div>
</div>
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
{addresses.map((address) => (
<AddressCard
key={address.id}
item={address}
variant="checkout"
onSelect={() => setSelectedId(address.id)}
/>
))}
{/* 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,
}}
>
<img
src="/assets/images/icon-box-fill-gold.svg"
alt=""
style={{
position: 'absolute',
left: 0,
top: -4,
width: 24,
height: 24,
}}
/>
<span
style={{
position: 'absolute',
left: 26,
top: -2,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
Delivery method
</span>
</div>
<AddNewAddressCard onClick={() => navigate('/shop-adreess')} />
</div>
</section>
{/* Standard Shipping Card (4170:998) at rel (0, 36), 348×56 */}
<div
style={{
position: 'absolute',
left: 0,
top: 36,
width: 348,
height: 56,
borderRadius: 15,
background: 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)',
border: '1px solid #d78e06',
boxSizing: 'border-box',
}}
>
{/* Delivery Method Section */}
<section style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
<img
src="/assets/images/icon-box-fill-gold.svg"
alt=""
style={{
width: 24,
height: 24,
flexShrink: 0,
}}
/>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: '#111111',
}}
>
Delivery method
</span>
</div>
{/* Standard Shipping Card */}
<div
style={{
position: 'absolute',
left: 12,
top: 12,
width: 324,
height: 32,
width: '100%',
minHeight: 56,
padding: 12,
borderRadius: 15,
background: 'linear-gradient(180deg, #fff7e9 0%, #fdf9f4 100%)',
border: '1px solid #d78e06',
boxSizing: 'border-box',
display: 'flex',
alignItems: 'center',
gap: 14,
}}
>
{/* Selected Radio (20×20 at rel 0, 0) */}
{/* Selected Radio */}
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 20,
height: 20,
borderRadius: 10,
backgroundColor: '#d78e06',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}
>
<div
style={{
position: 'absolute',
left: 6,
top: 6,
width: 8,
height: 8,
borderRadius: '50%',
@ -214,126 +134,107 @@ export const ShopBuy01Page: React.FC = () => {
/>
</div>
{/* Truck Icon (24×24 at rel 34, 0) */}
{/* Truck Icon */}
<img
src="/assets/images/icon-delivery-truck-grey-24.svg"
alt=""
style={{
position: 'absolute',
left: 34,
top: 0,
width: 24,
height: 24,
flexShrink: 0,
}}
/>
{/* "Standard shiping" & "2-3 business day" at rel (72, 0) */}
{/* "Standard shiping" & "2-3 business day" */}
<div
style={{
position: 'absolute',
left: 72,
top: -0.5,
width: 145,
height: 20,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 12,
lineHeight: '17px',
color: '#36363c',
flex: 1,
minWidth: 0,
display: 'flex',
alignItems: 'center',
flexDirection: 'column',
gap: 2,
}}
>
Standard shiping
</div>
<div
style={{
position: 'absolute',
left: 72,
top: 19.5,
width: 145,
height: 13,
fontFamily: 'var(--font-sans)',
fontWeight: 400,
fontSize: 10,
lineHeight: '12.9px',
color: '#747474',
display: 'flex',
alignItems: 'center',
}}
>
2-3 business day
<div
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 12,
lineHeight: '17px',
color: '#36363c',
}}
>
Standard shiping
</div>
<div
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 400,
fontSize: 10,
lineHeight: '12.9px',
color: '#747474',
}}
>
2-3 business day
</div>
</div>
{/* Price "$5,00" at rel (287, 0) */}
{/* Price "$5,00" */}
<div
style={{
position: 'absolute',
left: 287,
top: 0,
width: 37,
height: 20,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 14,
lineHeight: '19px',
color: '#292a2e',
display: 'flex',
alignItems: 'center',
flexShrink: 0,
}}
>
$5,00
</div>
</div>
</div>
</div>
</section>
{/* Green Encryption Banner (4160:905) at (17, 657), 342×37 */}
<div
style={{
position: 'absolute',
left: 17,
top: 657,
width: 342,
height: 37,
borderRadius: 12,
backgroundColor: 'rgba(14, 177, 60, 0.1)',
border: '1px solid #bce6c8',
boxSizing: 'border-box',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<span
{/* Green Encryption Banner */}
<div
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 12,
lineHeight: '17px',
color: '#0eb13c',
textAlign: 'center',
marginTop: 'auto',
width: '100%',
minHeight: 37,
padding: '8px 12px',
borderRadius: 12,
backgroundColor: 'rgba(14, 177, 60, 0.1)',
border: '1px solid #bce6c8',
boxSizing: 'border-box',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
Your information is encrypted during transmission.
</span>
</div>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 12,
lineHeight: '17px',
color: '#0eb13c',
textAlign: 'center',
}}
>
Your information is encrypted during transmission.
</span>
</div>
</div>
{/* Bottom Sticky Continue Bar (4159:368) at y=724, height 90 */}
{/* Bottom Sticky Continue Bar */}
<StickyFooterBar
top={724}
height={90}
price="$24.00"
topLabel="Total Cost"
buttonText="Continue"
buttonFontWeight={700}
buttonLeft={161}
iconSrc="/assets/images/icon-arrow-right-white.svg"
iconLeft={126.5}
buttonTextLeft={51.5}
buttonTextWidth={69}
iconPosition="right"
targetRoute="/shop-payment"
/>
</MobileShell>

418
src/pages/checkout/ShopCartPage.tsx

@ -106,70 +106,65 @@ export const ShopCartPage: React.FC = () => {
return (
<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={{
position: 'absolute',
left: 18,
top: 42,
minWidth: 96,
height: 14,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 10,
lineHeight: '13.9px',
color: '#292a2e',
textAlign: 'left',
whiteSpace: 'nowrap',
flex: 1,
display: 'flex',
flexDirection: 'column',
padding: '42px var(--page-px) 24px',
gap: 13,
}}
>
{topInfoText}
</div>
{/* Top Info Bar */}
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
padding: '0 2px',
}}
>
<div
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 10,
lineHeight: '13.9px',
color: '#292a2e',
}}
>
{topInfoText}
</div>
<div
onClick={handleClearOrRestore}
role="button"
aria-label={items.length > 0 ? 'Clear all' : 'Restore'}
style={{
position: 'absolute',
left: 316,
top: 42,
width: 38,
height: 14,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 10,
lineHeight: '13.9px',
color: items.length > 0 ? '#d44747' : '#d78e06',
textAlign: 'center',
cursor: 'pointer',
whiteSpace: 'nowrap',
userSelect: 'none',
}}
>
{items.length > 0 ? 'Clear all' : 'Restore'}
</div>
<div
onClick={handleClearOrRestore}
role="button"
aria-label={items.length > 0 ? 'Clear all' : 'Restore'}
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 10,
lineHeight: '13.9px',
color: items.length > 0 ? '#d44747' : '#d78e06',
textAlign: 'right',
cursor: 'pointer',
whiteSpace: 'nowrap',
userSelect: 'none',
}}
>
{items.length > 0 ? 'Clear all' : 'Restore'}
</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 ? (
<div
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) => {
@ -197,7 +192,7 @@ export const ShopCartPage: React.FC = () => {
) : (
<div
style={{
margin: '28px 17px 0',
marginTop: 16,
padding: '32px 20px',
borderRadius: 20,
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.
</div>
<div style={{ display: 'flex', gap: 10, marginTop: 8 }}>
<div style={{ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', gap: 10, marginTop: 8 }}>
<button
type="button"
onClick={handleClearOrRestore}
@ -271,79 +266,77 @@ export const ShopCartPage: React.FC = () => {
)}
</div>
{/* Checkout Bar above BottomNavBar (4154:20281) at y=645, height 104 */}
<StickyFooterBar
top={645}
height={104}
price={footerPrice}
oldPrice={footerOldPrice}
totalItemsLabel={footerTotalItemsLabel}
onTotalItemsClick={() => setIsSummaryOpen(true)}
buttonText="checkout"
buttonFontWeight={700}
iconSrc="/assets/images/icon-credit-card-white.svg"
iconLeft={49.5}
buttonTextLeft={81.5}
buttonTextWidth={69}
targetRoute="/shop-buy01"
disabled={items.length === 0}
/>
{/* Sticky Bottom Stack: Checkout Bar + Bottom Navigation Bar */}
<div
style={{
position: 'sticky',
bottom: 0,
zIndex: 25,
width: '100%',
marginTop: 'auto',
}}
>
<StickyFooterBar
aboveBottomNav={true}
height={104}
price={footerPrice}
oldPrice={footerOldPrice}
totalItemsLabel={footerTotalItemsLabel}
onTotalItemsClick={() => setIsSummaryOpen(true)}
buttonText="checkout"
buttonFontWeight={700}
iconSrc="/assets/images/icon-credit-card-white.svg"
targetRoute="/shop-buy01"
disabled={items.length === 0}
/>
{/* Bottom Navigation Bar (4154:20230) at y=736 */}
<BottomNavBar
activeTab="cart"
top={736}
showCartBadge={items.length > 0}
cartBadgeCount={items.length}
/>
<BottomNavBar
activeTab="cart"
showCartBadge={items.length > 0}
cartBadgeCount={items.length}
/>
</div>
{/* Interactive Order Summary Bottom Sheet Modal */}
{isSummaryOpen && (
<>
<div
onClick={() => setIsSummaryOpen(false)}
style={{
position: 'absolute',
left: 0,
top: 0,
width: 375,
height: 814,
backgroundColor: 'rgba(17, 17, 17, 0.9)',
zIndex: 20,
}}
/>
<div
onClick={() => setIsSummaryOpen(false)}
style={{
position: 'absolute',
inset: 0,
backgroundColor: 'rgba(17, 17, 17, 0.9)',
zIndex: 40,
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
}}
>
<div
className="habib-bottom-sheet"
onClick={(e) => e.stopPropagation()}
style={{
position: 'absolute',
left: 0,
top: 505,
width: 375,
height: 309,
borderRadius: 22,
backgroundColor: '#fafafa',
zIndex: 21,
padding: '22px var(--page-px) 24px',
display: 'flex',
flexDirection: 'column',
gap: 24,
}}
>
{/* Header Row */}
<div
style={{
position: 'absolute',
left: 14,
top: 16,
width: 340.57,
height: 190.54,
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
gap: 12,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 7.77,
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 14,
lineHeight: '19px',
color: '#111111',
whiteSpace: 'nowrap',
}}
>
Orded Summery
@ -354,15 +347,15 @@ export const ShopCartPage: React.FC = () => {
onClick={() => setIsSummaryOpen(false)}
aria-label="Close"
style={{
position: 'absolute',
left: 318,
top: 11,
width: 11.67,
height: 11.67,
width: 24,
height: 24,
background: 'transparent',
border: 'none',
padding: 0,
cursor: 'pointer',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<img
@ -375,35 +368,63 @@ export const ShopCartPage: React.FC = () => {
}}
/>
</button>
</div>
{/* Dynamic Breakdown Rows */}
{/* Dynamic Breakdown Rows */}
<div
style={{
display: 'flex',
flexDirection: 'column',
gap: 14,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 56.54,
width: 340.57,
height: 134,
display: 'flex',
flexDirection: 'column',
gap: 10,
}}
>
<div
style={{
position: 'absolute',
left: 0,
top: 0,
width: 340.57,
height: 80,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
gap: 12,
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '20px',
color: '#747474',
}}
>
Items ({totalQuantity})
</span>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '20px',
color: '#747474',
}}
>
${totalPrice.toFixed(2)}
</span>
</div>
{items.map((item) => (
<div
key={item.id}
style={{
position: 'absolute',
left: 0,
top: 0,
width: 340.57,
height: 20,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
gap: 12,
}}
>
<span
@ -413,9 +434,13 @@ export const ShopCartPage: React.FC = () => {
fontSize: 14,
lineHeight: '20px',
color: '#747474',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
minWidth: 0,
}}
>
Items ({totalQuantity})
{item.title} (×{item.qty})
</span>
<span
style={{
@ -424,101 +449,53 @@ export const ShopCartPage: React.FC = () => {
fontSize: 14,
lineHeight: '20px',
color: '#747474',
flexShrink: 0,
}}
>
${totalPrice.toFixed(2)}
${(item.unitPrice * item.qty).toFixed(2)}
</span>
</div>
))}
</div>
{items.map((item, idx) => (
<div
key={item.id}
style={{
position: 'absolute',
left: 0,
top: (idx + 1) * 30,
width: 340.57,
height: 20,
display: 'flex',
justifyContent: 'space-between',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '20px',
color: '#747474',
maxWidth: 260,
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}
>
{item.title} (×{item.qty})
</span>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 600,
fontSize: 14,
lineHeight: '20px',
color: '#747474',
}}
>
${(item.unitPrice * item.qty).toFixed(2)}
</span>
</div>
))}
</div>
<div
style={{
width: '100%',
height: 1,
backgroundColor: '#d7dbe2',
}}
/>
<div
<div
style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
gap: 12,
}}
>
<span
style={{
position: 'absolute',
left: 0,
top: 95,
width: 341,
height: 1,
backgroundColor: '#d7dbe2',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: '#111111',
}}
/>
<div
>
Total
</span>
<span
style={{
position: 'absolute',
left: 0,
top: 110,
width: 340.57,
height: 24,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: 'var(--color-text-charcoal)',
}}
>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: '#111111',
}}
>
Total
</span>
<span
style={{
fontFamily: 'var(--font-sans)',
fontWeight: 700,
fontSize: 16,
lineHeight: '20px',
color: 'var(--color-text-charcoal)',
}}
>
${totalPrice.toFixed(2)}
</span>
</div>
${totalPrice.toFixed(2)}
</span>
</div>
</div>
@ -526,10 +503,7 @@ export const ShopCartPage: React.FC = () => {
type="button"
onClick={() => setIsSummaryOpen(false)}
style={{
position: 'absolute',
left: 20,
top: 233,
width: 335,
width: '100%',
height: 52,
borderRadius: 11,
backgroundColor: '#d78e06',
@ -554,7 +528,7 @@ export const ShopCartPage: React.FC = () => {
</span>
</button>
</div>
</>
</div>
)}
</MobileShell>
);

279
src/pages/checkout/ShopOrderSummaryPage.tsx

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

541
src/pages/checkout/ShopPayResultPage.tsx

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

375
src/pages/checkout/ShopPaymentMethodsPage.tsx

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

337
src/pages/checkout/ShopPaymentPage.tsx

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

950
src/pages/home/ShopHomePage.tsx
File diff suppressed because it is too large
View File

410
src/pages/orders/ShopOrderDetailPage.tsx

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

40
src/pages/orders/ShopOrdersPage.tsx

@ -18,37 +18,27 @@ export const ShopOrdersPage: React.FC = () => {
return (
<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" />
{/* Segmented Filter Tabs (4175:9880 + 4175:9892) */}
<OrderFilterTabs
tabs={ORDER_FILTER_TABS}
activeTabId={activeTabId}
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',
display: 'flex',
flexDirection: 'column',
flex: 1,
padding: '26px var(--page-px) 28px',
gap: 22,
}}
>
<div
style={{
position: 'relative',
marginTop: -140,
width: 375,
height: 680,
}}
>
{/* Segmented Filter Tabs (4175:9880 + 4175:9892) */}
<OrderFilterTabs
tabs={ORDER_FILTER_TABS}
activeTabId={activeTabId}
onSelectTab={(id) => setActiveTabId(id)}
/>
{/* Order Cards (4175:10954 & 4175:10644) */}
<div className="habib-orders-grid">
{ORDERS_LIST_CARDS.map((order) => (
<OrderListCard key={order.id} order={order} />
))}

614
src/pages/orders/ShopSupportPage.tsx

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

37
src/pages/test/PixelVerificationModal.tsx

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

Loading…
Cancel
Save