add: checkout, track and address map pages dark theme

This commit is contained in:
Mahyar Khanbolooki
2025-08-12 20:35:24 +03:30
parent a67711b075
commit de7a782562
5 changed files with 39 additions and 30 deletions
+8 -4
View File
@@ -1,5 +1,5 @@
.map-google-style {
background-color: #f8f9fa;
background-color: var(--background);
font-family: 'irancell', system-ui, -apple-system, sans-serif;
}
@@ -98,7 +98,7 @@
position: absolute;
right: 20px;
bottom: 40px;
background: rgba(255, 255, 255, 0.95);
background: var(--background);
border-radius: 16px;
box-shadow: 0 4px 16px rgba(0,0,0,0.08),
0 2px 4px rgba(0,0,0,0.05);
@@ -233,7 +233,7 @@
.map-search-results {
margin-top: 12px;
background: rgba(255, 255, 255, 0.95);
background: var(--container);
border-radius: 16px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1),
0 2px 8px rgba(0,0,0,0.05);
@@ -248,7 +248,7 @@
border-bottom: 1px solid rgba(0,0,0,0.05);
font-size: 13px;
font-weight: 400;
color: #1f2937;
color: var(--foreground);
cursor: pointer;
display: block;
width: 100%;
@@ -264,6 +264,10 @@
color: #2563eb;
}
[data-theme="dark"] .map-search-result-item:hover {
color: var(--disabled-text);
}
.map-search-result-item:active {
background-color: rgba(59, 130, 246, 0.1);
}
+18 -14
View File
@@ -20,6 +20,7 @@ interface CustomMapProps {
onPositionSelect?: (position: [number, number]) => void;
onZoomChange?: (zoom: number) => void;
onClick?: (event: L.LeafletMouseEvent) => void;
searchEnabled?: boolean
markerActive?: boolean
}
@@ -85,7 +86,8 @@ const CustomMap: React.FC<CustomMapProps> = ({
onPositionSelect,
onZoomChange,
onClick,
markerActive = true
markerActive = true,
searchEnabled = true,
}) => {
const [selectedPosition, setSelectedPosition] = useState<[number, number] | null>(null);
const [mapInstance, setMapInstance] = useState<L.Map | null>(null);
@@ -208,19 +210,21 @@ const CustomMap: React.FC<CustomMapProps> = ({
return (
<div className="w-full h-full relative">
<ActiveSearchbox
placeholder="جستجو"
onSearch={handleSearch}
isLoading={isSearching}
results={searchResults}
onResultSelect={(v) => {
// Find the full result object with position
const result = searchResults.find(r => r.id === v.id && r.title === v.title);
if (result) {
handleSearchResultSelect(result);
}
}}
/>
{searchEnabled &&
<ActiveSearchbox
placeholder="جستجو"
onSearch={handleSearch}
isLoading={isSearching}
results={searchResults}
onResultSelect={(v) => {
// Find the full result object with position
const result = searchResults.find(r => r.id === v.id && r.title === v.title);
if (result) {
handleSearchResultSelect(result);
}
}}
/>
}
<div className="map-zoom-controls">
<button
onClick={(e) => {
+2 -2
View File
@@ -35,10 +35,10 @@ function Prompt({ title, description, textConfirm, textCancel, onConfirm, onCanc
</p>
{children}
<div className="grid grid-cols-2 gap-5.5 mt-8">
<Button onClick={onConfirm} className="text-sm h-11 font-normal cursor-pointer">
<Button onClick={onConfirm} className="rounded-normal text-sm h-11 font-normal cursor-pointer">
{textConfirm ?? t('ButtonOk')}
</Button>
<Button onClick={onCancel} className="bg-disabled! h-11 cursor-pointer text-disabled2! dark:text-disabled-text! active:brightness-95 hover:brightness-105 text-sm font-normal">
<Button onClick={onCancel} className="rounded-normal bg-disabled! h-11 cursor-pointer text-disabled2! dark:text-disabled-text! active:brightness-95 hover:brightness-105 text-sm font-normal">
{textCancel ?? t('ButtonCancel')}
</Button>
</div>