feat(calendar): flying label animation from card title to toolbar on zoom
The label (month name, week number, day label) now animates from its position above the source card to the toolbar center on zoom-in, and flies back from toolbar to the target card title on zoom-out. The fly-rect rectangle no longer contains text — only skeleton placeholder lines. Sibling card titles and week numbers also fade during zoom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,6 +82,9 @@ defineProps<{
|
||||
selectedDayEvents: CalendarEvent[];
|
||||
calendarFlyVisible: boolean;
|
||||
setCalendarFlyRectRef: (element: HTMLDivElement | null) => void;
|
||||
calendarFlyLabelVisible: boolean;
|
||||
setCalendarFlyLabelRef: (element: HTMLDivElement | null) => void;
|
||||
setCalendarToolbarLabelRef: (element: HTMLDivElement | null) => void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
@@ -103,7 +106,7 @@ defineProps<{
|
||||
<button class="btn btn-xs" @click="setToday">Today</button>
|
||||
</div>
|
||||
|
||||
<div class="text-center text-sm font-medium">
|
||||
<div :ref="setCalendarToolbarLabelRef" class="text-center text-sm font-medium">
|
||||
{{ calendarPeriodLabel }}
|
||||
</div>
|
||||
|
||||
@@ -141,6 +144,13 @@ defineProps<{
|
||||
<p class="mt-1 text-xs text-base-content/80">{{ focusedCalendarEvent.note || "No note" }}</p>
|
||||
</article>
|
||||
|
||||
<!-- GSAP flying label (title transition overlay) -->
|
||||
<div
|
||||
v-show="calendarFlyLabelVisible"
|
||||
:ref="setCalendarFlyLabelRef"
|
||||
class="calendar-fly-label-el"
|
||||
/>
|
||||
|
||||
<div :ref="setCalendarContentWrapRef" class="calendar-content-wrap min-h-0 flex-1">
|
||||
<button
|
||||
class="calendar-side-nav calendar-side-nav-left"
|
||||
@@ -499,6 +509,14 @@ defineProps<{
|
||||
will-change: left, top, width, height;
|
||||
}
|
||||
|
||||
.calendar-fly-label-el {
|
||||
position: absolute;
|
||||
z-index: 30;
|
||||
pointer-events: none;
|
||||
white-space: nowrap;
|
||||
will-change: left, top, font-size;
|
||||
}
|
||||
|
||||
.calendar-zoom-inline {
|
||||
position: relative;
|
||||
display: flex;
|
||||
@@ -612,16 +630,6 @@ defineProps<{
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.calendar-fly-rect .calendar-fly-label {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--color-base-content);
|
||||
margin: 0 0 12px 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.calendar-fly-rect .calendar-fly-skeleton {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user