diff --git a/src/assets/index.css b/src/assets/index.css index 36e2976..d4da37b 100644 --- a/src/assets/index.css +++ b/src/assets/index.css @@ -221,3 +221,16 @@ background: transparent; } } + +/* + * Disable enter/exit animations on reka-ui overlays (dialog, sheet, + * popover, dropdown, tooltip, …) app-wide. They animate via the + * data-state open/closed attribute; zeroing the duration keeps the final + * state but removes the motion (overlays appear/disappear instantly). + * Pulse/spin loaders and CSS transitions (e.g. hovers, the favourite + * heart pop) are unaffected. + */ +[data-state='open'], +[data-state='closed'] { + animation-duration: 0s !important; +} diff --git a/src/components/layout/ProfileSheetContent.vue b/src/components/layout/ProfileSheetContent.vue index 5bf0122..ce082b7 100644 --- a/src/components/layout/ProfileSheetContent.vue +++ b/src/components/layout/ProfileSheetContent.vue @@ -1,7 +1,7 @@ - - diff --git a/src/modules/events/components/EventCalendarPopup.vue b/src/modules/events/components/EventCalendarPopup.vue new file mode 100644 index 0000000..9a16173 --- /dev/null +++ b/src/modules/events/components/EventCalendarPopup.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/modules/events/components/EventCalendarView.vue b/src/modules/events/components/EventCalendarView.vue index 77e0778..f0a70c8 100644 --- a/src/modules/events/components/EventCalendarView.vue +++ b/src/modules/events/components/EventCalendarView.vue @@ -12,6 +12,10 @@ import type { Event } from '../types/event' const props = defineProps<{ events: Event[] + /** When true, render only the month grid for date-picking — no + * selected-day events panel — and emit selectDate on every day tap + * (used inside the calendar popup). */ + pickerMode?: boolean }>() const emit = defineEmits<{ @@ -68,13 +72,21 @@ function getDotCount(date: Date): number { return Math.min(getEventsForDay(date).length, 3) } -const selectedDay = ref(null) +// Default the selection to today so the calendar opens on today's events +// rather than an empty panel (currentMonth already starts on this month). +const selectedDay = ref(new Date()) const selectedDayEvents = computed(() => { if (!selectedDay.value) return [] return getEventsForDay(selectedDay.value) }) function selectDay(date: Date) { + // Picker mode: every tap selects + emits (parent closes the popup). + if (props.pickerMode) { + selectedDay.value = date + emit('selectDate', date) + return + } if (selectedDay.value && isSameDay(selectedDay.value, date)) { selectedDay.value = null } else { @@ -95,7 +107,7 @@ function nextMonth() {