From f58b40c70dbcd35c02d805f2049991c09b405676 Mon Sep 17 00:00:00 2001 From: karyamanswasta Date: Wed, 27 Aug 2025 03:20:49 +0700 Subject: [PATCH] ok --- src/App.css | 17 +- src/components/Carousel.js | 52 -- src/components/Carousel.module.css | 74 --- src/components/Item.js | 26 +- src/components/Item.module.css | 620 ++++++++++++++++------ src/components/ItemConfig.js | 182 +++---- src/components/ItemLister.js | 271 +++++----- src/components/ItemLister.module.css | 204 ++++++-- src/components/Modal.module.css | 250 ++++++++- src/index.css | 85 +++ src/pages/Cart.module.css | 3 +- src/pages/Invoice.module.css | 5 + src/pages/MaterialList.js | 742 ++++++++++++++++----------- src/pages/MaterialList.module.css | 667 +++++++++++++++++++----- 14 files changed, 2127 insertions(+), 1071 deletions(-) delete mode 100644 src/components/Carousel.js delete mode 100644 src/components/Carousel.module.css diff --git a/src/App.css b/src/App.css index 810e639..1952907 100644 --- a/src/App.css +++ b/src/App.css @@ -1,8 +1,9 @@ @import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Aboreto&family=Rubik+Doodle+Shadow&display=swap"); -@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&ital,wght@0,200..800;1,200..800&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display"); + :root { - --brand-primary: #73a585; /* general brand (e.g., music player) */ + --brand-primary: #73a585; /* general brand (e. g., music player) */ --brand-sage: #6B8F71; /* sage green for active category */ --brand-sage-50: #F0F6F2; /* very light hover bg */ --brand-sage-100: #E9F3ED; /* light hover bg */ @@ -66,7 +67,15 @@ body { /* Ensure sticky cart bar stays above item overlays */ .StickyCartBar { - z-index: 3000 !important; + z-index: 100 !important; /* Menurunkan z-index agar tidak menutupi material list */ + position: fixed; + bottom: 0; + left: 0; + right: 0; + background-color: white; + box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); + padding: 15px 20px; + border-radius: 20px 20px 0 0; } .App-link { @@ -91,4 +100,4 @@ body { to { transform: rotate(360deg); } -} +} \ No newline at end of file diff --git a/src/components/Carousel.js b/src/components/Carousel.js deleted file mode 100644 index 820b3a9..0000000 --- a/src/components/Carousel.js +++ /dev/null @@ -1,52 +0,0 @@ -import React, { useState } from "react"; -import styles from "./Carousel.module.css"; // Import CSS module - -const Carousel = ({ selectedIndex, items, onSelect }) => { - - const moveToNext = () => { - console.log('aa') - if (selectedIndex < items.length - 1) { - console.log('bb') - onSelect(selectedIndex + 1); // Send the next index to the parent - } - }; - - const moveToPrev = () => { - if (selectedIndex > -1) { - onSelect(selectedIndex - 1); // Send the previous index to the parent - } - }; - - return ( -
-
- {/* Previous Item */} -
0 ? "hidden" : "visible" , backgroundColor: items.length < 1 ? '#919191':'#007bff'}} - > - {selectedIndex === -1 ? (items.length > 0 ? "+" : "") : items[selectedIndex - 1]?.name || "+"} -
- - {/* Current Item */} -
- {selectedIndex >= 0 ? items[selectedIndex]?.name : "+"} -
- - {/* Next Item */} -
0 ? "hidden" : "visible", backgroundColor: items.length < 1 ? '#919191':'#007bff' - }} - > - {selectedIndex < items.length - 1 && items[selectedIndex + 1]?.name} -
-
-
- ); -}; - -export default Carousel; diff --git a/src/components/Carousel.module.css b/src/components/Carousel.module.css deleted file mode 100644 index a6cbe11..0000000 --- a/src/components/Carousel.module.css +++ /dev/null @@ -1,74 +0,0 @@ -/* Carousel.module.css */ -.carouselContainer { - display: flex; - justify-content: center; - align-items: center; - position: relative; -} - -.carousel { - display: flex; - justify-content: center; - align-items: center; - width: 100%; - max-width: 600px; - overflow: hidden; - position: relative; -} - -.carouselItem { - display: flex; - justify-content: center; - align-items: center; - transition: transform 0.3s ease-in-out; - height: 200px; - background-color: #007bff; - color: white; - font-size: 24px; - width: 100%; - border-radius: 8px; -} - -.carouselItem.prev, -.carouselItem.next { - transform: scale(0.8); -} - -.carouselItem.center { - transform: scale(1); - width: 134%; -} - -.prevBtn, -.nextBtn { - position: absolute; - top: 50%; - transform: translateY(-50%); - color: white; - border: none; - padding: 10px 20px; - font-size: 16px; - border-radius: 8px; - cursor: pointer; -} - -.prevBtn { - left: 10px; -} - -.nextBtn { - right: 10px; -} - -@media (max-width: 600px) { - .carouselItem { - font-size: 18px; - height: 110px; - } - - .prevBtn, - .nextBtn { - padding: 8px 15px; - font-size: 14px; - } -} diff --git a/src/components/Item.js b/src/components/Item.js index 1e4234e..50c0c61 100644 --- a/src/components/Item.js +++ b/src/components/Item.js @@ -149,28 +149,18 @@ const Item = ({ )}
{forInvoice && - - - - +
+ ⌧ +
} {/* Title under image for portrait, non-overlay */} {portrait && null} {!portrait && (

{displayName}

+ {initialDescription && !forInvoice && ( +

{initialDescription}

+ )} {!forInvoice && (
{promoPrice && promoPrice != 0 && promoPrice != '' ? ( @@ -207,9 +197,9 @@ const Item = ({ !isBeingEdit ? (
- + {itemQty} - +
) : ( diff --git a/src/components/Item.module.css b/src/components/Item.module.css index 854cec0..7c2ac2f 100644 --- a/src/components/Item.module.css +++ b/src/components/Item.module.css @@ -8,17 +8,22 @@ align-items: center; justify-content: space-between; width: 100%; - gap: 8px; /* Increased gap for better spacing */ - padding: 6px 8px; /* Increased padding for better touch targets */ - margin: 8px 0; /* Increased margin for better separation */ - border: 1px solid #e3ece6; - border-radius: 8px; /* Slightly increased border radius */ - background: var(--brand-sage-50, #F0F6F2); - box-shadow: 0 1px 3px rgba(0,0,0,0.03); + gap: 12px; + padding: 16px; + margin: 0; + border: none; + border-radius: 12px; + background: #ffffff; + box-shadow: 0 1px 5px rgba(0,0,0,0.08); box-sizing: border-box; - transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease; + transition: all 0.2s ease; + position: relative; +} + +.item:hover { + box-shadow: 0 4px 12px rgba(0,0,0,0.12); + transform: translateY(-2px); } -.item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); border-color: #d9e6de; } /* Portrait variant for cafe page grid */ .itemPortrait { @@ -29,30 +34,84 @@ border: none; background: transparent; box-shadow: none; + border-radius: 12px; + overflow: hidden; } -.imageWrap { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.12); } -.imageContainer { display: block; width: 100%; height: 100%; object-fit: cover; } -.itemPortrait .imageWrap { width: 100%; height: auto; aspect-ratio: 1 / 1; } -.itemPortrait .imageContainer { border-radius: 6px; } -.itemPortrait .itemDetails { align-items: flex-start; text-align: left; gap: 8px; } /* Increased gap */ -.itemPortrait .itemQty { justify-content: flex-start; } -.itemPortrait .title { font-size: 14px; } /* Increased font size */ -.itemPortrait .priceNow { font-size: 13px; } /* Increased font size */ +.imageWrap { + position: relative; + border-radius: 10px; + overflow: hidden; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); + width: 80px; + height: 80px; + flex-shrink: 0; +} -.notLast{ - padding-bottom: 12px; /* Increased padding */ - border-bottom: 2px solid #00000017; +.itemPortrait .imageWrap { + width: 100%; + height: auto; + aspect-ratio: 1 / 1; + border-radius: 12px; +} + +.imageContainer { + display: block; + width: 100%; + height: 100%; + object-fit: cover; +} + +.itemPortrait .imageContainer { + border-radius: 12px; +} + +.itemDetails { + display: flex; + flex-direction: column; + justify-content: center; + align-items: stretch; + gap: 8px; + flex: 1; + min-width: 0; +} + +.itemPortrait .itemDetails { + align-items: flex-start; + text-align: left; + gap: 8px; + padding: 12px 0; +} + +.itemPortrait .itemQty { + justify-content: flex-start; +} + +.itemPortrait .title { + font-size: 15px; +} + +.itemPortrait .priceNow { + font-size: 14px; +} + +.notLast { + border-bottom: none; + padding-bottom: 16px; } .itemInvoice { flex-direction: row; align-items: center; justify-content: space-around; - font-size: 20px; /* Increased font size */ + font-size: 18px; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; + padding: 16px; + background: #ffffff; + border-radius: 12px; + box-shadow: 0 1px 5px rgba(0,0,0,0.08); } .itemInvoice:last-child { @@ -66,27 +125,28 @@ .item:not(.itemPortrait) .imageContainer { position: relative; - width: clamp(80px, 20vw, 110px); /* Increased size */ - height: clamp(80px, 20vw, 110px); /* Increased size */ - border-radius: 12px; /* Increased border radius */ + width: 80px; + height: 80px; + border-radius: 10px; object-fit: cover; } .overlay { position: absolute; - top: 18px; /* Increased top position */ - left: 10px; /* Increased left position */ - right: 10px; /* Increased right position */ - bottom: 18px; /* Increased bottom position */ + top: 16px; + left: 12px; + right: 12px; + bottom: 16px; background-color: rgba(0, 0, 0, 0.5); color: white; display: flex; justify-content: center; align-items: center; - border-radius: 20px; /* Increased border radius */ + border-radius: 16px; cursor: pointer; transition: background-color 0.3s ease; - font-size: 3.8vw; /* Increased font size */ + font-size: 16px; + font-weight: 500; } .overlay:hover { @@ -97,24 +157,18 @@ display: none; } -.itemDetails { +.infoRow { display: flex; - flex-direction: column; - justify-content: center; - align-items: stretch; - gap: 8px; /* Increased gap */ - margin-left: 8px; /* Increased margin */ - margin-right: 8px; /* Increased margin */ - flex: 1; - min-width: 0; + align-items: baseline; + justify-content: space-between; + gap: 12px; } -.infoRow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; } /* Increased gap */ .itemInvoiceDetails { display: flex; flex-direction: column; justify-content: space-between; - margin-left: 12px; /* Increased margin */ + margin-left: 12px; margin-top: -15px; flex-grow: 1; } @@ -122,40 +176,47 @@ .itemName { font-family: "Plus Jakarta Sans", sans-serif; font-style: normal; - width: calc(100% - 18px); /* Adjusted width */ - font-size: 5.5vw; /* Increased font size */ - font-weight: 500; + width: calc(100% - 20px); + font-size: 16px; + font-weight: 600; margin-top: 0; - margin: 0 6px; /* Increased margin */ - color: rgba(88, 55, 50, 1); + margin: 0 6px; + color: #333; background-color: transparent; text-transform: capitalize; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .itemInvoiceName { - width: calc(280% - 18px); /* Adjusted width */ + width: calc(260% - 20px); background-color: transparent; - font-size: 1.4rem; /* Increased font size */ - font-weight: 500; + font-size: 1.2rem; + font-weight: 600; } .multiplySymbol { font-weight: 600; + color: #555; } .qtyInvoice { font-weight: 500; + color: #555; } -.itemPrice { display: none; } +.itemPrice { + display: none; +} .itemPriceInvoice { font-family: "Plus Jakarta Sans", sans-serif; font-style: normal; - font-weight: 600; - font-size: 1rem; /* Increased font size */ - margin-left: 6px; /* Increased margin */ - color: #d9c61c; + font-weight: 700; + font-size: 1rem; + margin-left: 6px; + color: #6B8F71; text-align: right; margin-top: 22px; } @@ -164,30 +225,34 @@ display: flex; align-items: center; justify-content: flex-end; - gap: 10px; /* Increased gap */ - min-height: 36px; /* Increased height */ + gap: 12px; + min-height: 40px; } .itemQtyValue { font-family: "Plus Jakarta Sans", sans-serif; font-style: normal; - font-weight: 600; - margin-top: 22px; /* Increased margin */ + font-weight: 700; + margin-top: 22px; margin-left: 2px; margin-right: 2px; - width: 30px; /* Increased width */ + width: 32px; text-align: center; + color: #333; } .itemQtyInput { font-family: "Plus Jakarta Sans", sans-serif; font-style: normal; - font-weight: 600; - width: 36px; /* Increased width */ - font-size: 1rem; /* Increased font size */ - margin-bottom: 12px; /* Increased margin */ + font-weight: 700; + width: 40px; + font-size: 1rem; + margin-bottom: 12px; text-align: center; background-color: transparent; + border: 1px solid #ddd; + border-radius: 8px; + padding: 8px; } .addButton { @@ -195,188 +260,266 @@ border: 1px solid var(--brand-sage, #6B8F71); color: #ffffff; display: inline-block; - font-size: 14px; /* Increased font size */ + font-size: 14px; font-weight: 600; cursor: pointer; - min-width: 85px; /* Increased width */ - height: 36px; /* Increased height */ - padding: 0 14px; /* Increased padding */ - border-radius: 12px; /* Increased border radius */ - box-shadow: 0 1px 3px rgba(0,0,0,0.08); + min-width: 90px; + height: 40px; + padding: 0 16px; + border-radius: 10px; + box-shadow: 0 2px 6px rgba(107, 143, 113, 0.2); + transition: all 0.2s ease; } -.addButton:hover { background-color: var(--brand-sage-hover, #7FAE7D); border-color: var(--brand-sage-hover, #7FAE7D); } -.addButton:disabled { background-color: var(--brand-sage-muted, #CFD8D3); border-color: var(--brand-sage-muted, #CFD8D3); cursor: default; } + +.addButton:hover { + background-color: var(--brand-sage-hover, #5a7a60); + border-color: var(--brand-sage-hover, #5a7a60); + box-shadow: 0 4px 10px rgba(107, 143, 113, 0.3); +} + +.addButton:disabled { + background-color: var(--brand-sage-muted, #CFD8D3); + border-color: var(--brand-sage-muted, #CFD8D3); + cursor: default; + box-shadow: none; +} + .grayscale { filter: grayscale(100%); } .disabled { - color: gray; + color: #999; } + .plusNegative { - width: 36px; /* Increased width */ - height: 36px; /* Increased height */ + width: 40px; + height: 40px; + border-radius: 10px; + border: 1px solid #ddd; + background: #f8f9fa; + display: flex; + align-items: center; + justify-content: center; + font-size: 20px; + font-weight: 700; + color: #666; + cursor: pointer; + transition: all 0.2s ease; +} + +.plusNegative:hover { + background: #e9ecef; + border-color: #ccc; } .plusNegative2 { - width: 90px; /* Increased width */ - height: 24px; /* Increased height */ + width: 40px; + height: 40px; position: absolute; - transform: rotate(45deg); - left: -38px; /* Adjusted position */ - top: 24px; /* Adjusted position */ + right: 16px; + top: 50%; + transform: translateY(-50%); + border-radius: 10px; + border: 1px solid #ddd; + background: #f8f9fa; + display: flex; + align-items: center; + justify-content: center; + font-size: 20px; + font-weight: 700; + color: #666; + cursor: pointer; + transition: all 0.2s ease; } + +.plusNegative2:hover { + background: #e9ecef; + border-color: #ccc; +} + .remove { - width: 30px; /* Increased width */ - height: 30px; /* Increased height */ - margin-top: -12px; /* Adjusted margin */ - margin-right: 12px; /* Adjusted margin */ + width: 32px; + height: 32px; + position: absolute; + top: 12px; + right: 12px; + border-radius: 50%; + background: #ff4d4d; + color: white; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + font-weight: 700; + cursor: pointer; + transition: all 0.2s ease; + box-shadow: 0 2px 6px rgba(255, 77, 77, 0.3); +} + +.remove:hover { + background: #ff1a1a; + transform: scale(1.1); } /* New elements for clean cafe item card */ .title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 600; - font-size: 18px; /* Increased font size */ - color: #2d2d2d; - margin: 0 0 3px 0; /* Increased margin */ + font-size: 17px; + color: #333; + margin: 0 0 4px 0; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; text-transform: capitalize; text-align: left; - flex: 1; min-width: 0; + flex: 1; + min-width: 0; } /* Responsive type scale for title and price */ @media (min-width: 600px) { - .title { font-size: 19px; } - .priceNow { font-size: 17px; } + .title { + font-size: 18px; + } + .priceNow { + font-size: 16px; + } } + @media (min-width: 992px) { - .title { font-size: 20px; } - .priceNow { font-size: 18px; } + .title { + font-size: 19px; + } + .priceNow { + font-size: 17px; + } } + .desc { - color: #5f5f5f; - font-size: 14px; /* Increased font size */ - line-height: 1.3; + color: #666; + font-size: 13px; + line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; } -.priceRow { display: inline-flex; align-items: center; gap: 10px; } /* Increased gap */ -/* Gaya harga baru untuk item list */ -.itemPriceList { - font-family: "Plus Jakarta Sans", sans-serif; - font-weight: 700; - font-size: 14px; - color: #1c1d1d; - margin: 2px 0; - white-space: nowrap; -} - -.itemPriceList.promo { - color: #e53935; - font-size: 13px; -} - -.itemPriceList.original { - color: #727272; - font-size: 12px; - text-decoration: line-through; +.priceRow { + display: inline-flex; + align-items: center; + gap: 10px; } .promoBadge { display: inline-flex; align-items: center; justify-content: center; - padding: 3px 10px; /* Increased padding */ - height: 24px; /* Increased height */ + padding: 4px 10px; + height: 24px; border-radius: 999px; background: linear-gradient(to right, #e52535, #fe6d78); color: #fff; - font-size: 13px; /* Increased font size */ + font-size: 12px; font-weight: 700; } + .priceNow { color: #1c1d1d; font-weight: 700; - font-size: 16px; /* Increased font size */ + font-size: 15px; white-space: nowrap; } + .priceOld { color: #727272; - font-size: 14px; /* Increased font size */ + font-size: 13px; text-decoration: line-through; white-space: nowrap; } + .qtyGroup { display: inline-flex; align-items: center; - border: 1px solid rgba(255,255,255,0.6); - border-radius: 10px; /* Increased border radius */ - height: 30px; /* Increased height */ + border: 1px solid #ddd; + border-radius: 10px; + height: 36px; overflow: hidden; - background: transparent; + background: #ffffff; + box-shadow: 0 1px 3px rgba(0,0,0,0.05); } + .qtyBtn { - width: 30px; /* Increased width */ - height: 30px; /* Increased height */ + width: 36px; + height: 36px; display: flex; align-items: center; justify-content: center; - background: transparent; - color: #fff; + background: #f8f9fa; + color: #333; border: none; - font-size: 20px; /* Increased font size */ -} -.qtyBtn:hover { background: rgba(255,255,255,0.15); } -.qtyVal { - min-width: 26px; /* Increased width */ - text-align: center; + font-size: 18px; font-weight: 700; - color: #fff; - font-size: 15px; /* Increased font size */ + cursor: pointer; + transition: all 0.2s ease; } -.actionRow { display: flex; align-items: center; gap: 8px; justify-content: space-between; width: 100%; } /* Increased gap */ +.qtyBtn:hover { + background: #e9ecef; +} + +.qtyVal { + min-width: 30px; + text-align: center; + font-weight: 700; + color: #333; + font-size: 16px; +} + +.actionRow { + display: flex; + align-items: center; + gap: 10px; + justify-content: space-between; + width: 100%; +} /* Promo pill overlay on image */ .promoPill { position: absolute; - top: 14px; /* Increased top position */ - right: 14px; /* Increased right position */ + top: 10px; + right: 10px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; - padding: 5px 12px; /* Increased padding */ + padding: 6px 12px; height: auto; - border-radius: 10px; /* Increased border radius */ + border-radius: 8px; background: #e53935; color: #fff; - font-size: 13px; /* Increased font size */ + font-size: 12px; font-weight: 700; + box-shadow: 0 2px 6px rgba(229, 57, 53, 0.3); } /* Info overlay on image (name + price) */ .overlayName { position: absolute; - top: 14px; /* Increased top position */ - left: 14px; /* Increased left position */ + top: 12px; + left: 12px; z-index: 2; font-family: "Plus Jakarta Sans", sans-serif; - font-weight: 800; - font-size: 16px; /* Increased font size */ + font-weight: 700; + font-size: 15px; line-height: 1.3; color: #fff; mix-blend-mode: difference; margin: 0; - max-width: 75%; /* Increased width */ + max-width: 70%; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; @@ -384,10 +527,30 @@ pointer-events: none; text-transform: capitalize; } -@media (min-width: 600px) { .overlayName { font-size: 17px; } } -.overlayPrice { display: flex; align-items: center; gap: 8px; } /* Increased gap */ -.overlayNow { color: #fff; font-weight: 800; font-size: 14px; } /* Increased font size */ -.overlayOld { color: rgba(255,255,255,0.8); font-size: 13px; text-decoration: line-through; } /* Increased font size */ + +@media (min-width: 600px) { + .overlayName { + font-size: 16px; + } +} + +.overlayPrice { + display: flex; + align-items: center; + gap: 8px; +} + +.overlayNow { + color: #fff; + font-weight: 800; + font-size: 13px; +} + +.overlayOld { + color: rgba(255,255,255,0.8); + font-size: 12px; + text-decoration: line-through; +} /* Bottom overlay bar: price left, qty right */ .bottomOverlay { @@ -399,36 +562,66 @@ display: flex; align-items: center; justify-content: space-between; - padding: 6px 12px; /* Increased padding */ - background: rgba(0,0,0,0.55); + padding: 10px 12px; + background: rgba(0,0,0,0.6); color: #fff; + border-radius: 0 0 12px 12px; } /* New stacked price for clarity */ -.overlayPriceCol { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; } /* Increased line height */ -.overlayOriginal { color: rgba(255,255,255,0.85); font-weight: 700; font-size: 12px; text-decoration: line-through; } /* Increased font size */ -@media (min-width: 600px) { .overlayOriginal { font-size: 13px; } } -.overlayPromo { color: #fff; font-weight: 900; font-size: 18px; } /* Increased font size */ +.overlayPriceCol { + display: flex; + flex-direction: column; + align-items: flex-start; + line-height: 1.2; +} + +.overlayOriginal { + color: rgba(255,255,255,0.85); + font-weight: 700; + font-size: 12px; + text-decoration: line-through; +} + @media (min-width: 600px) { - .overlayOriginal { font-size: 16px; } /* Increased font size */ - .overlayPromo { font-size: 20px; } /* Increased font size */ + .overlayOriginal { + font-size: 13px; + } +} + +.overlayPromo { + color: #fff; + font-weight: 800; + font-size: 17px; +} + +@media (min-width: 600px) { + .overlayOriginal { + font-size: 15px; + } + .overlayPromo { + font-size: 19px; + } } /* Title text below image for portrait mode */ .title { font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; - font-size: 16px; /* Increased font size */ - color: #1c1d1d; - margin: 8px 3px 6px 3px; /* Increased margin */ + font-size: 16px; + color: #333; + margin: 10px 4px 6px 4px; text-transform: capitalize; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; -webkit-line-clamp: 2; } + @media (min-width: 600px) { - .title { font-size: 17px; } /* Increased font size */ + .title { + font-size: 17px; + } } .itemInvoice .itemDetails { @@ -440,7 +633,7 @@ .itemInvoice .itemName, .itemInvoice .itemPrice, .itemInvoice .itemQty .qtyInvoice .multiplySymbol { - font-size: 1.1rem; /* Increased font size */ + font-size: 1rem; } .blank { @@ -453,6 +646,103 @@ .createItem { position: absolute; - left: 18px; /* Increased position */ - right: 18px; /* Increased position */ + left: 20px; + right: 20px; + bottom: 20px; +} + +/* Item list container */ +.item-list-container { + display: flex; + flex-direction: column; + gap: 16px; + padding: 16px 0; +} + +/* Section header */ +.section-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 16px 0; + border-bottom: 1px solid #e6e6e6; + margin-bottom: 16px; +} + +.section-title { + font-family: "Plus Jakarta Sans", sans-serif; + font-weight: 700; + font-size: 20px; + color: #333; + margin: 0; +} + +.section-actions { + display: flex; + gap: 12px; +} + +/* Empty state */ +.empty-state { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 40px 20px; + text-align: center; + background: #f8f9fa; + border-radius: 12px; + margin: 20px 0; +} + +.empty-state-icon { + font-size: 48px; + color: #ccc; + margin-bottom: 16px; +} + +.empty-state-title { + font-family: "Plus Jakarta Sans", sans-serif; + font-weight: 600; + font-size: 18px; + color: #666; + margin-bottom: 8px; +} + +.empty-state-description { + font-family: "Plus Jakarta Sans", sans-serif; + font-size: 14px; + color: #999; + margin-bottom: 20px; + max-width: 300px; +} + +/* Card variant */ +.item-card { + background: #ffffff; + border-radius: 12px; + box-shadow: 0 2px 8px rgba(0,0,0,0.08); + padding: 16px; + transition: all 0.2s ease; +} + +.item-card:hover { + box-shadow: 0 4px 16px rgba(0,0,0,0.12); + transform: translateY(-2px); +} + +/* List variant */ +.item-list-item { + background: #ffffff; + border-radius: 12px; + box-shadow: 0 1px 3px rgba(0,0,0,0.05); + padding: 16px; + display: flex; + align-items: center; + gap: 16px; + transition: all 0.2s ease; +} + +.item-list-item:hover { + box-shadow: 0 2px 8px rgba(0,0,0,0.1); } \ No newline at end of file diff --git a/src/components/ItemConfig.js b/src/components/ItemConfig.js index 6c62bf6..d528c18 100644 --- a/src/components/ItemConfig.js +++ b/src/components/ItemConfig.js @@ -25,7 +25,6 @@ const ItemConfig = ({ const textareaRef = useRef(null); useEffect(() => { - // Prevent scrolling when modal is open document.body.style.overflow = "hidden"; if(selectedImage){ @@ -92,123 +91,94 @@ const ItemConfig = ({ }; return ( -
-
{/* Increased padding and border radius */} -
-
{/* Increased size and margin */} - {/* Increased border radius */} - +
+
+
+
+ Preview
-
{/* Increased size */} -
handleChangeImage()} style={{ width: '160px', marginRight: '12px', height: '48px', alignContent: 'center', textAlign: 'center', borderRadius: '12px', border: '1px solid #60d37e', color: '#60d37e', backgroundColor: 'white', display: 'flex', justifyContent: 'center', alignItems: 'center', fontSize: '16px' }}> {/* Increased size and font */} - {isBeingEdit ? 'Ganti gambar' : 'Tambah gambar'} -
-
{/* Increased size and font */} - Hapus -
+
+ + {isBeingEdit && ( + + )}
-
- -
{/* Increased margin */} -

Nama item

{/* Increased margin and font size */} setItemName(e.target.value)} - onFocus={(e) => e.target.style.borderColor = '#60d37e'} - onBlur={(e) => e.target.style.borderColor = '#ccc'} + type="file" + ref={fileInputRef} + className={styles.fileInput} + onChange={handleFileChange} + accept="image/*" + style={{ display: "none" }} />
-
-
-

Harga

{/* Increased margin and font size */} +
+
+ setItemPrice(e.target.value)} - onFocus={(e) => e.target.style.borderColor = '#60d37e'} - onBlur={(e) => e.target.style.borderColor = '#ccc'} + value={itemName} + className={styles.formInput} + onChange={(e)=>setItemName(e.target.value)} + placeholder="Masukkan nama item" />
-
-

Harga promo

{/* Increased margin and font size */} - setItemPromoPrice(e.target.value)} - onFocus={(e) => e.target.style.borderColor = '#60d37e'} - onBlur={(e) => e.target.style.borderColor = '#ccc'} + +
+
+ + setItemPrice(e.target.value)} + placeholder="Rp 0" + /> +
+
+ + setItemPromoPrice(e.target.value)} + placeholder="Opsional" + /> +
+
+ +
+ +