diff --git a/web/src/components/ActivityCalendar/CalendarCell.tsx b/web/src/components/ActivityCalendar/CalendarCell.tsx index 48026e460..c1551b584 100644 --- a/web/src/components/ActivityCalendar/CalendarCell.tsx +++ b/web/src/components/ActivityCalendar/CalendarCell.tsx @@ -26,7 +26,7 @@ export const CalendarCell = memo((props: CalendarCellProps) => { const smallExtraClasses = size === "small" ? `${SMALL_CELL_SIZE.dimensions} min-h-0` : ""; const baseClasses = cn( - "aspect-square w-full flex items-center justify-center text-center transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-offset-2 select-none", + "aspect-square w-full flex items-center justify-center text-center transition-all duration-150 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 focus-visible:ring-offset-2 select-none border border-border/10 bg-muted/20", sizeConfig.font, sizeConfig.borderRadius, smallExtraClasses, @@ -35,7 +35,7 @@ export const CalendarCell = memo((props: CalendarCellProps) => { const ariaLabel = day.isSelected ? `${tooltipText} (selected)` : tooltipText; if (!day.isCurrentMonth) { - return
{day.label}
; + return
{day.label}
; } const intensityClass = getCellIntensityClass(day, maxCount); @@ -45,7 +45,7 @@ export const CalendarCell = memo((props: CalendarCellProps) => { intensityClass, day.isToday && "ring-2 ring-primary/30 ring-offset-1 font-semibold z-10", day.isSelected && "ring-2 ring-primary ring-offset-1 font-bold z-10", - isInteractive ? "cursor-pointer hover:scale-110 hover:shadow-md hover:z-20" : "cursor-default", + isInteractive ? "cursor-pointer hover:bg-muted/40 hover:border-border/30" : "cursor-default", ); const button = ( diff --git a/web/src/components/ActivityCalendar/MonthCalendar.tsx b/web/src/components/ActivityCalendar/MonthCalendar.tsx index b1a9a973d..9869655c9 100644 --- a/web/src/components/ActivityCalendar/MonthCalendar.tsx +++ b/web/src/components/ActivityCalendar/MonthCalendar.tsx @@ -3,7 +3,6 @@ import { useInstance } from "@/contexts/InstanceContext"; import { cn } from "@/lib/utils"; import { useTranslate } from "@/utils/i18n"; import { CalendarCell } from "./CalendarCell"; -import { DEFAULT_CELL_SIZE, SMALL_CELL_SIZE } from "./constants"; import { useTodayDate, useWeekdayLabels } from "./hooks"; import type { MonthCalendarProps } from "./types"; import { useCalendarMatrix } from "./useCalendar"; @@ -28,19 +27,19 @@ export const MonthCalendar = memo((props: MonthCalendarProps) => { selectedDate: "", }); - const sizeConfig = size === "small" ? SMALL_CELL_SIZE : DEFAULT_CELL_SIZE; + const gridGap = size === "small" ? "gap-x-3 gap-y-3" : "gap-x-3.5 gap-y-3.5"; return (
-
+
{rotatedWeekDays.map((label, index) => ( -
+
{label}
))}
-
+
{weeks.map((week, weekIndex) => week.days.map((day, dayIndex) => { const tooltipText = getTooltipText(day.count, day.date, t); diff --git a/web/src/components/ActivityCalendar/YearCalendar.tsx b/web/src/components/ActivityCalendar/YearCalendar.tsx index aa875aa82..c35b13f9e 100644 --- a/web/src/components/ActivityCalendar/YearCalendar.tsx +++ b/web/src/components/ActivityCalendar/YearCalendar.tsx @@ -30,18 +30,20 @@ export const YearCalendar = ({ selectedYear, data, onYearChange, onDateClick, cl const handleToday = () => onYearChange(currentYear); return ( -
-
-

{selectedYear}

+
+
+
+

{selectedYear}

+
-
+
@@ -53,8 +55,8 @@ export const YearCalendar = ({ selectedYear, data, onYearChange, onDateClick, cl disabled={isCurrentYear} aria-label={t("common.today")} className={cn( - "h-9 px-4 rounded-md text-sm font-medium transition-colors", - isCurrentYear ? "bg-secondary/50 text-muted-foreground cursor-default" : "hover:bg-secondary/80 text-foreground", + "h-8 px-3 rounded-md text-[11px] font-semibold uppercase tracking-[0.18em] transition-colors", + isCurrentYear ? "bg-muted/30 text-muted-foreground cursor-default" : "hover:bg-muted/30 text-foreground", )} > {t("common.today")} @@ -66,7 +68,7 @@ export const YearCalendar = ({ selectedYear, data, onYearChange, onDateClick, cl onClick={handleNextYear} disabled={!canGoNext} aria-label="Next year" - className="h-9 w-9 p-0 rounded-md hover:bg-secondary/80 text-muted-foreground hover:text-foreground" + className="h-8 w-8 p-0 rounded-md hover:bg-muted/30 text-muted-foreground hover:text-foreground" > @@ -75,13 +77,15 @@ export const YearCalendar = ({ selectedYear, data, onYearChange, onDateClick, cl
-
+
{months.map((month) => (
-
{getMonthLabel(month)}
+
+ {getMonthLabel(month)} +
))} diff --git a/web/src/components/ActivityCalendar/constants.ts b/web/src/components/ActivityCalendar/constants.ts index e5cab3f08..fdba8f806 100644 --- a/web/src/components/ActivityCalendar/constants.ts +++ b/web/src/components/ActivityCalendar/constants.ts @@ -14,22 +14,22 @@ export const INTENSITY_THRESHOLDS = { } as const; export const CELL_STYLES = { - HIGH: "bg-primary text-primary-foreground shadow-sm", - MEDIUM: "bg-primary/80 text-primary-foreground shadow-sm", - LOW: "bg-primary/60 text-primary-foreground shadow-sm", - MINIMAL: "bg-primary/40 text-foreground", - EMPTY: "bg-secondary/30 text-muted-foreground hover:bg-secondary/50", + HIGH: "bg-primary text-primary-foreground shadow-sm border-transparent", + MEDIUM: "bg-primary/85 text-primary-foreground shadow-sm border-transparent", + LOW: "bg-primary/70 text-primary-foreground border-transparent", + MINIMAL: "bg-primary/50 text-foreground border-transparent", + EMPTY: "bg-muted/20 text-muted-foreground hover:bg-muted/30 border-border/10", } as const; export const SMALL_CELL_SIZE = { - font: "text-xs", - dimensions: "w-8 h-8 mx-auto", - borderRadius: "rounded-md", - gap: "gap-1", + font: "text-[11px]", + dimensions: "w-full h-full", + borderRadius: "rounded-lg", + gap: "gap-1.5", } as const; export const DEFAULT_CELL_SIZE = { font: "text-xs", - borderRadius: "rounded-md", - gap: "gap-1.5", + borderRadius: "rounded-lg", + gap: "gap-2", } as const; diff --git a/web/src/components/MemoEditor/Toolbar/InsertMenu.tsx b/web/src/components/MemoEditor/Toolbar/InsertMenu.tsx index d28c19b78..ec962b5e7 100644 --- a/web/src/components/MemoEditor/Toolbar/InsertMenu.tsx +++ b/web/src/components/MemoEditor/Toolbar/InsertMenu.tsx @@ -1,6 +1,6 @@ import { LatLng } from "leaflet"; import { uniqBy } from "lodash-es"; -import { FileIcon, LinkIcon, LoaderIcon, MapPinIcon, Maximize2Icon, MoreHorizontalIcon, PlusIcon, type LucideIcon } from "lucide-react"; +import { FileIcon, LinkIcon, LoaderIcon, type LucideIcon, MapPinIcon, Maximize2Icon, MoreHorizontalIcon, PlusIcon } from "lucide-react"; import { useCallback, useEffect, useMemo, useState } from "react"; import { useDebounce } from "react-use"; import { useReverseGeocoding } from "@/components/map"; @@ -106,9 +106,12 @@ const InsertMenu = (props: InsertMenuProps) => { setLocationDialogOpen(false); }, [location]); - const handlePositionChange = useCallback((position: LatLng) => { - location.handlePositionChange(position); - }, [location]); + const handlePositionChange = useCallback( + (position: LatLng) => { + location.handlePositionChange(position); + }, + [location], + ); const handleToggleFocusMode = useCallback(() => { onToggleFocusMode?.(); diff --git a/web/src/components/StatisticsView/MonthNavigator.tsx b/web/src/components/StatisticsView/MonthNavigator.tsx index 58a67d201..9bd5e6b89 100644 --- a/web/src/components/StatisticsView/MonthNavigator.tsx +++ b/web/src/components/StatisticsView/MonthNavigator.tsx @@ -1,5 +1,5 @@ import dayjs from "dayjs"; -import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; +import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; import { useState } from "react"; import { YearCalendar } from "@/components/ActivityCalendar"; import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@/components/ui/dialog"; @@ -31,33 +31,36 @@ export const MonthNavigator = ({ visibleMonth, onMonthChange, activityStats }: M }; return ( -
+
- - + Select Month -
+