@stfrigerio/sito-template 0.1.52 → 0.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2975,7 +2975,7 @@ const LiquidButton = ({ actions, icon: Icon = lucideReact.Plus, className = '',
2975
2975
  }, onClick: () => handleAction(action), children: [jsxRuntime.jsx(action.icon, { size: 18, color: action.color }), jsxRuntime.jsx("span", { className: styles$a.actionLabel, children: action.label })] }, action.key))) })) }), jsxRuntime.jsx(framerMotion.motion.button, { type: "button", className: styles$a.button, onClick: handleToggle, animate: { rotate: expanded ? 45 : 0 }, transition: { duration: 0.2 }, "aria-label": expanded ? 'Close actions' : 'Open actions', children: jsxRuntime.jsx(Icon, { size: 24, strokeWidth: 2.5 }) })] })] }));
2976
2976
  };
2977
2977
 
2978
- var styles$9 = {"calendar":"Calendar-module_calendar__3mIJS","loading":"Calendar-module_loading__59Z9-","loadingSpinner":"Calendar-module_loadingSpinner__7MXqV","header":"Calendar-module_header__cZHNA","navigation":"Calendar-module_navigation__PGkpY","navButton":"Calendar-module_navButton__kOe-w","title":"Calendar-module_title__oJZ7m","controls":"Calendar-module_controls__i1Z38","todayButton":"Calendar-module_todayButton__Ac9zc","viewToggle":"Calendar-module_viewToggle__Fhg2t","viewButton":"Calendar-module_viewButton__J2WY6","active":"Calendar-module_active__lIqH-","weekDays":"Calendar-module_weekDays__4J-8f","weekNumberHeader":"Calendar-module_weekNumberHeader__xhKbB","weekDay":"Calendar-module_weekDay__cg8Gr","daysGrid":"Calendar-module_daysGrid__ER0GM","weekView":"Calendar-module_weekView__bdtGs","dayCell":"Calendar-module_dayCell__TV-HR","dayNumber":"Calendar-module_dayNumber__ICH-X","today":"Calendar-module_today__eGuUU","events":"Calendar-module_events__qdbs7","event":"Calendar-module_event__Q1Zq3","eventTitle":"Calendar-module_eventTitle__XU7Wd","eventTime":"Calendar-module_eventTime__pMGEB","otherMonth":"Calendar-module_otherMonth__r6VJK","selected":"Calendar-module_selected__5e6h0","compact":"Calendar-module_compact__i0SF3","dots":"Calendar-module_dots__1Q7QR","dot":"Calendar-module_dot__tsCR1","dotMore":"Calendar-module_dotMore__emasD","weekNumber":"Calendar-module_weekNumber__nlo50","completed":"Calendar-module_completed__B-SHI","completedIcon":"Calendar-module_completedIcon__-oDZ9","moreEvents":"Calendar-module_moreEvents__TIKaT","emptyState":"Calendar-module_emptyState__2fcj7","dayView":"Calendar-module_dayView__PCIos","dayViewHeader":"Calendar-module_dayViewHeader__Gvxx2","timeColumnHeader":"Calendar-module_timeColumnHeader__B0btR","dayColumnHeader":"Calendar-module_dayColumnHeader__Rjqwg","dayViewScrollContainer":"Calendar-module_dayViewScrollContainer__84Byq","dayViewContent":"Calendar-module_dayViewContent__VU9JI","timeColumn":"Calendar-module_timeColumn__Sce-X","dayColumn":"Calendar-module_dayColumn__-j2oT","timeSlot":"Calendar-module_timeSlot__jldHq","timeLabel":"Calendar-module_timeLabel__9xLiK","hourSlot":"Calendar-module_hourSlot__z-80Q","hourLine":"Calendar-module_hourLine__fofdD","dayEvent":"Calendar-module_dayEvent__tSPFa","dayEventTitle":"Calendar-module_dayEventTitle__er03k","dayEventTime":"Calendar-module_dayEventTime__TlkeQ","currentTimeIndicator":"Calendar-module_currentTimeIndicator__GntOZ"};
2978
+ var styles$9 = {"calendar":"Calendar-module_calendar__3mIJS","loading":"Calendar-module_loading__59Z9-","loadingSpinner":"Calendar-module_loadingSpinner__7MXqV","header":"Calendar-module_header__cZHNA","navigation":"Calendar-module_navigation__PGkpY","navButton":"Calendar-module_navButton__kOe-w","title":"Calendar-module_title__oJZ7m","controls":"Calendar-module_controls__i1Z38","todayButton":"Calendar-module_todayButton__Ac9zc","viewToggle":"Calendar-module_viewToggle__Fhg2t","viewButton":"Calendar-module_viewButton__J2WY6","active":"Calendar-module_active__lIqH-","weekDays":"Calendar-module_weekDays__4J-8f","weekNumberHeader":"Calendar-module_weekNumberHeader__xhKbB","weekDay":"Calendar-module_weekDay__cg8Gr","daysGrid":"Calendar-module_daysGrid__ER0GM","weekView":"Calendar-module_weekView__bdtGs","dayCell":"Calendar-module_dayCell__TV-HR","dayNumber":"Calendar-module_dayNumber__ICH-X","today":"Calendar-module_today__eGuUU","events":"Calendar-module_events__qdbs7","event":"Calendar-module_event__Q1Zq3","eventTitle":"Calendar-module_eventTitle__XU7Wd","eventTime":"Calendar-module_eventTime__pMGEB","otherMonth":"Calendar-module_otherMonth__r6VJK","selected":"Calendar-module_selected__5e6h0","compact":"Calendar-module_compact__i0SF3","dots":"Calendar-module_dots__1Q7QR","dot":"Calendar-module_dot__tsCR1","dotMore":"Calendar-module_dotMore__emasD","weekNumber":"Calendar-module_weekNumber__nlo50","completed":"Calendar-module_completed__B-SHI","completedIcon":"Calendar-module_completedIcon__-oDZ9","moreEvents":"Calendar-module_moreEvents__TIKaT","emptyState":"Calendar-module_emptyState__2fcj7","dayView":"Calendar-module_dayView__PCIos","dayViewHeader":"Calendar-module_dayViewHeader__Gvxx2","timeColumnHeader":"Calendar-module_timeColumnHeader__B0btR","dayColumnHeader":"Calendar-module_dayColumnHeader__Rjqwg","allDayStrip":"Calendar-module_allDayStrip__VOqbV","allDayLabel":"Calendar-module_allDayLabel__2AmyT","allDayList":"Calendar-module_allDayList__6hFSb","allDayEvent":"Calendar-module_allDayEvent__SYkCs","dayViewScrollContainer":"Calendar-module_dayViewScrollContainer__84Byq","dayTimelineGrid":"Calendar-module_dayTimelineGrid__r1BNI","hourRow":"Calendar-module_hourRow__U-YN-","hourLabel":"Calendar-module_hourLabel__im84k","hourSlots":"Calendar-module_hourSlots__vbtYy","halfHourSlot":"Calendar-module_halfHourSlot__UWIri","halfHourSlotBottom":"Calendar-module_halfHourSlotBottom__aE5Mo","dayEvent":"Calendar-module_dayEvent__tSPFa","dayEventTitle":"Calendar-module_dayEventTitle__er03k","dayEventTime":"Calendar-module_dayEventTime__TlkeQ","currentTimeIndicator":"Calendar-module_currentTimeIndicator__GntOZ"};
2979
2979
 
2980
2980
  /**
2981
2981
  * Calendar component - A flexible, reusable calendar for displaying events
@@ -3006,30 +3006,25 @@ var styles$9 = {"calendar":"Calendar-module_calendar__3mIJS","loading":"Calendar
3006
3006
  * onEventClick={handleEventClick}
3007
3007
  * />
3008
3008
  */
3009
- function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDateClickByView, onTimeSlotClick, viewMode = 'month', initialDate = new Date(), config = {}, className = '', style = {}, loading = false, emptyState, hideHeader = false, compact = false, selectedDate }) {
3009
+ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDateClickByView, onTimeSlotClick, onEventDrop, viewMode = 'month', initialDate = new Date(), config = {}, className = '', style = {}, loading = false, emptyState, hideHeader = false, compact = false, selectedDate }) {
3010
3010
  const [currentDate, setCurrentDate] = React.useState(initialDate);
3011
3011
  const [currentViewMode, setCurrentViewMode] = React.useState(viewMode);
3012
3012
  const dayViewScrollRef = React.useRef(null);
3013
- const { eventColors = {}, iconRenderer, maxEventsPerDay = 3, mondayStart = false, showWeekNumbers = false, dateFormat = { month: 'long', year: 'numeric' }, locale = 'en-US', dayLabels, monthNames } = config;
3013
+ const { eventColors = {}, iconRenderer, maxEventsPerDay = 3, mondayStart = false, showWeekNumbers = false, dateFormat = { month: 'long', year: 'numeric' }, locale = 'en-US', dayLabels, monthNames, startHour = 0, endHour = 24, hourHeight = 60, halfHourSlots = false } = config;
3014
3014
  const defaultDayLabels = mondayStart
3015
3015
  ? ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
3016
3016
  : ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
3017
3017
  const finalDayLabels = dayLabels || defaultDayLabels;
3018
- // Auto-scroll to current time in day view
3018
+ // Auto-scroll to current time in day view (respects startHour/hourHeight config)
3019
+ const dayViewHourHeight = config?.hourHeight ?? 60;
3020
+ const dayViewStartHour = config?.startHour ?? 0;
3019
3021
  React.useEffect(() => {
3020
3022
  if (currentViewMode === 'day' && dayViewScrollRef.current) {
3021
- // Check if viewing today
3022
3023
  const now = new Date();
3023
3024
  const isToday = currentDate.toDateString() === now.toDateString();
3024
3025
  if (isToday) {
3025
- // Calculate scroll position based on current time
3026
- const currentHour = now.getHours();
3027
- const currentMinute = now.getMinutes();
3028
- const minutesSinceMidnight = currentHour * 60 + currentMinute;
3029
- // Each hour is 60px, so calculate pixel position
3030
- // Scroll to put current time in the upper third of the view
3031
- const scrollPosition = (minutesSinceMidnight / 60) * 60 - 100; // Subtract 100 to show some context above
3032
- // Use setTimeout to ensure DOM is ready
3026
+ const minutesFromStart = (now.getHours() - dayViewStartHour) * 60 + now.getMinutes();
3027
+ const scrollPosition = (minutesFromStart / 60) * dayViewHourHeight - 100;
3033
3028
  setTimeout(() => {
3034
3029
  if (dayViewScrollRef.current) {
3035
3030
  dayViewScrollRef.current.scrollTop = Math.max(0, scrollPosition);
@@ -3037,7 +3032,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
3037
3032
  }, 0);
3038
3033
  }
3039
3034
  }
3040
- }, [currentViewMode, currentDate]);
3035
+ }, [currentViewMode, currentDate, dayViewStartHour, dayViewHourHeight]);
3041
3036
  const calendarData = React.useMemo(() => {
3042
3037
  const year = currentDate.getFullYear();
3043
3038
  const month = currentDate.getMonth();
@@ -3199,16 +3194,6 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
3199
3194
  onDateClick(date);
3200
3195
  }
3201
3196
  };
3202
- const handleTimeSlotClick = (hour) => {
3203
- if (onTimeSlotClick) {
3204
- // Create a date object with the current date and the clicked hour
3205
- const slotDate = new Date(currentDate);
3206
- slotDate.setHours(hour, 0, 0, 0);
3207
- // Format time as HH:00
3208
- const timeString = `${hour.toString().padStart(2, '0')}:00`;
3209
- onTimeSlotClick(slotDate, hour, timeString);
3210
- }
3211
- };
3212
3197
  const isToday = (date) => {
3213
3198
  const today = new Date();
3214
3199
  return date.toDateString() === today.toDateString();
@@ -3226,49 +3211,75 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
3226
3211
  return (jsxRuntime.jsx("div", { className: `${styles$9.calendar} ${styles$9.loading} ${className}`, style: style, children: jsxRuntime.jsx("div", { className: styles$9.loadingSpinner, children: "Loading..." }) }));
3227
3212
  }
3228
3213
  return (jsxRuntime.jsxs("div", { className: `${styles$9.calendar} ${compact ? styles$9.compact : ''} ${className}`, style: style, children: [!hideHeader && (jsxRuntime.jsxs("div", { className: styles$9.header, children: [jsxRuntime.jsxs("div", { className: styles$9.navigation, children: [jsxRuntime.jsx("button", { onClick: handlePrevious, className: styles$9.navButton, "aria-label": "Previous", children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "15,18 9,12 15,6" }) }) }), jsxRuntime.jsx("h3", { className: styles$9.title, children: calendarData.displayTitle }), jsxRuntime.jsx("button", { onClick: handleNext, className: styles$9.navButton, "aria-label": "Next", children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "9,6 15,12 9,18" }) }) })] }), jsxRuntime.jsxs("div", { className: styles$9.controls, children: [jsxRuntime.jsx("button", { onClick: handleToday, className: styles$9.todayButton, children: "Today" }), jsxRuntime.jsxs("div", { className: styles$9.viewToggle, children: [jsxRuntime.jsx("button", { className: `${styles$9.viewButton} ${currentViewMode === 'month' ? styles$9.active : ''}`, onClick: () => setCurrentViewMode('month'), children: "Month" }), jsxRuntime.jsx("button", { className: `${styles$9.viewButton} ${currentViewMode === 'week' ? styles$9.active : ''}`, onClick: () => setCurrentViewMode('week'), children: "Week" }), jsxRuntime.jsx("button", { className: `${styles$9.viewButton} ${currentViewMode === 'day' ? styles$9.active : ''}`, onClick: () => setCurrentViewMode('day'), children: "Day" })] })] })] })), currentViewMode !== 'day' && (jsxRuntime.jsxs("div", { className: styles$9.weekDays, children: [showWeekNumbers && jsxRuntime.jsx("div", { className: styles$9.weekNumberHeader, children: "Week" }), finalDayLabels.map((day) => (jsxRuntime.jsx("div", { className: styles$9.weekDay, children: day }, day)))] })), currentViewMode === 'day' ? (
3229
- // Day view layout
3230
- jsxRuntime.jsxs("div", { className: styles$9.dayView, children: [jsxRuntime.jsxs("div", { className: styles$9.dayViewHeader, children: [jsxRuntime.jsx("div", { className: styles$9.timeColumnHeader }), jsxRuntime.jsx("div", { className: styles$9.dayColumnHeader, children: currentDate.toLocaleDateString(locale, { weekday: 'short', day: 'numeric' }) })] }), jsxRuntime.jsx("div", { className: styles$9.dayViewScrollContainer, ref: dayViewScrollRef, children: jsxRuntime.jsxs("div", { className: styles$9.dayViewContent, children: [(() => {
3231
- const now = new Date();
3232
- const currentHour = now.getHours();
3233
- const currentMinute = now.getMinutes();
3234
- const minutesSinceMidnight = currentHour * 60 + currentMinute;
3235
- const topPosition = (minutesSinceMidnight / 1440) * (24 * 60); // 24 hours * 60px per hour
3236
- // Only show if viewing today
3237
- const isToday = currentDate.toDateString() === now.toDateString();
3238
- return isToday ? (jsxRuntime.jsx("div", { className: styles$9.currentTimeIndicator, style: { top: `${topPosition}px` } })) : null;
3239
- })(), jsxRuntime.jsx("div", { className: styles$9.timeColumn, children: Array.from({ length: 24 }, (_, hour) => (jsxRuntime.jsx("div", { className: styles$9.timeSlot, children: jsxRuntime.jsxs("span", { className: styles$9.timeLabel, children: [hour.toString().padStart(2, '0'), ":00"] }) }, hour))) }), jsxRuntime.jsx("div", { className: styles$9.dayColumn, children: Array.from({ length: 24 }, (_, hour) => {
3240
- const hourEvents = getDayEvents(currentDate).filter(event => {
3241
- if (!event.time)
3242
- return false;
3243
- const eventHour = parseInt(event.time.split(':')[0]);
3244
- return eventHour === hour;
3245
- });
3246
- return (jsxRuntime.jsxs("div", { className: styles$9.hourSlot, onClick: (e) => {
3247
- // Only trigger if clicking on the slot itself, not on an event
3248
- if (e.target === e.currentTarget ||
3249
- e.target.classList.contains(styles$9.hourLine)) {
3250
- handleTimeSlotClick(hour);
3251
- }
3252
- }, style: { cursor: 'pointer' }, children: [jsxRuntime.jsx("div", { className: styles$9.hourLine }), hourEvents.map((event, eventIndex) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$9.dayEvent} ${event.status === 'completed' ? styles$9.completed : ''}`, style: {
3253
- backgroundColor: getEventColor(event),
3254
- color: getEventTextColor(event),
3255
- opacity: event.status === 'completed' ? 0.7 : 1
3256
- }, onClick: (e) => {
3257
- e.stopPropagation();
3258
- handleEventClick(event);
3259
- }, initial: { opacity: 0, x: -10 }, animate: { opacity: 1, x: 0 }, transition: {
3260
- duration: 0.2,
3261
- delay: eventIndex * 0.05,
3262
- ease: "easeOut"
3263
- }, whileHover: {
3264
- scale: 1.02,
3265
- y: -1,
3266
- transition: { duration: 0.1 }
3267
- }, whileTap: {
3268
- scale: 0.98,
3269
- transition: { duration: 0.1 }
3270
- }, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$9.dayEventTitle, children: [jsxRuntime.jsx("span", { className: styles$9.dayEventTime, children: event.time }), event.title] }), event.status === 'completed' && (jsxRuntime.jsx("svg", { className: styles$9.completedIcon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "20,6 9,17 4,12" }) }))] }, event.id)))] }, hour));
3271
- }) })] }) })] })) : (jsxRuntime.jsx("div", { className: `${styles$9.daysGrid} ${currentViewMode === 'week' ? styles$9.weekView : ''}`, children: calendarData.days.map((day, index) => {
3214
+ // Day view layout — positioned events with duration, all-day strip, now-line
3215
+ (() => {
3216
+ const dayEvents = getDayEvents(currentDate);
3217
+ const scheduled = dayEvents.filter(e => !e.allDay && e.time);
3218
+ const allDayEvents = dayEvents.filter(e => e.allDay || !e.time);
3219
+ const hours = Array.from({ length: endHour - startHour }, (_, i) => startHour + i);
3220
+ const timelineHeight = hours.length * hourHeight;
3221
+ const now = new Date();
3222
+ const dayIsToday = currentDate.toDateString() === now.toDateString();
3223
+ const nowMinutesFromStart = (now.getHours() - startHour) * 60 + now.getMinutes();
3224
+ const nowOffset = (nowMinutesFromStart / 60) * hourHeight;
3225
+ const showNow = dayIsToday && nowOffset >= 0 && nowOffset <= timelineHeight;
3226
+ const eventMinutes = (time) => {
3227
+ const [h, m] = time.split(':').map(Number);
3228
+ return h * 60 + m;
3229
+ };
3230
+ const eventDuration = (event) => {
3231
+ if (!event.time || !event.endTime)
3232
+ return 30;
3233
+ const d = eventMinutes(event.endTime) - eventMinutes(event.time);
3234
+ return d > 0 ? d : 30;
3235
+ };
3236
+ const handleSlotClick = (hour, minute) => {
3237
+ if (onTimeSlotClick) {
3238
+ const slotDate = new Date(currentDate);
3239
+ slotDate.setHours(hour, minute, 0, 0);
3240
+ const timeString = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
3241
+ onTimeSlotClick(slotDate, hour, timeString);
3242
+ }
3243
+ };
3244
+ const handleEventDragEnd = (event, info) => {
3245
+ if (!onEventDrop)
3246
+ return;
3247
+ const gridEl = dayViewScrollRef.current?.querySelector(`.${styles$9.dayTimelineGrid}`);
3248
+ if (!gridEl)
3249
+ return;
3250
+ const rect = gridEl.getBoundingClientRect();
3251
+ const relativeY = info.point.y - rect.top;
3252
+ const slotSize = halfHourSlots ? hourHeight / 2 : hourHeight;
3253
+ const slotIndex = Math.max(0, Math.floor(relativeY / slotSize));
3254
+ const totalSlots = halfHourSlots ? hours.length * 2 : hours.length;
3255
+ const clamped = Math.min(totalSlots - 1, slotIndex);
3256
+ const newHour = startHour + Math.floor(halfHourSlots ? clamped / 2 : clamped);
3257
+ const newMinute = halfHourSlots && clamped % 2 === 1 ? 30 : 0;
3258
+ const newDate = new Date(currentDate);
3259
+ newDate.setHours(newHour, newMinute, 0, 0);
3260
+ onEventDrop(event, newDate);
3261
+ };
3262
+ return (jsxRuntime.jsxs("div", { className: styles$9.dayView, children: [jsxRuntime.jsxs("div", { className: styles$9.dayViewHeader, children: [jsxRuntime.jsx("div", { className: styles$9.timeColumnHeader }), jsxRuntime.jsx("div", { className: styles$9.dayColumnHeader, children: currentDate.toLocaleDateString(locale, { weekday: 'short', day: 'numeric' }) })] }), allDayEvents.length > 0 && (jsxRuntime.jsxs("div", { className: styles$9.allDayStrip, children: [jsxRuntime.jsx("span", { className: styles$9.allDayLabel, children: "All day" }), jsxRuntime.jsx("div", { className: styles$9.allDayList, children: allDayEvents.map(event => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$9.allDayEvent} ${event.status === 'completed' ? styles$9.completed : ''}`, style: {
3263
+ backgroundColor: getEventColor(event),
3264
+ color: getEventTextColor(event),
3265
+ opacity: event.status === 'completed' ? 0.7 : 1
3266
+ }, onClick: () => handleEventClick(event), whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsx("span", { children: event.title })] }, event.id))) })] })), jsxRuntime.jsx("div", { className: styles$9.dayViewScrollContainer, ref: dayViewScrollRef, children: jsxRuntime.jsxs("div", { className: styles$9.dayTimelineGrid, style: { height: timelineHeight }, children: [hours.map(hour => (jsxRuntime.jsxs("div", { className: styles$9.hourRow, style: { height: hourHeight }, children: [jsxRuntime.jsxs("span", { className: styles$9.hourLabel, children: [hour.toString().padStart(2, '0'), ":00"] }), jsxRuntime.jsx("div", { className: styles$9.hourSlots, children: halfHourSlots ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$9.halfHourSlot, onClick: () => handleSlotClick(hour, 0) }), jsxRuntime.jsx("div", { className: `${styles$9.halfHourSlot} ${styles$9.halfHourSlotBottom}`, onClick: () => handleSlotClick(hour, 30) })] })) : (jsxRuntime.jsx("div", { className: styles$9.halfHourSlot, onClick: () => handleSlotClick(hour, 0) })) })] }, hour))), scheduled.map((event, eventIndex) => {
3267
+ const [h, m] = event.time.split(':').map(Number);
3268
+ const top = (h - startHour) * hourHeight + (m / 60) * hourHeight;
3269
+ const duration = eventDuration(event);
3270
+ const height = Math.max(24, (duration / 60) * hourHeight - 2);
3271
+ return (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$9.dayEvent} ${event.status === 'completed' ? styles$9.completed : ''}`, style: {
3272
+ top,
3273
+ height,
3274
+ backgroundColor: getEventColor(event),
3275
+ color: getEventTextColor(event),
3276
+ opacity: event.status === 'completed' ? 0.7 : 1
3277
+ }, onClick: (e) => {
3278
+ e.stopPropagation();
3279
+ handleEventClick(event);
3280
+ }, initial: { opacity: 0, x: -10 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.2, delay: eventIndex * 0.03, ease: 'easeOut' }, whileHover: { scale: 1.01, transition: { duration: 0.1 } }, whileTap: { scale: 0.98, transition: { duration: 0.1 } }, drag: onEventDrop ? 'y' : false, dragMomentum: false, onDragEnd: (_, info) => handleEventDragEnd(event, info), children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$9.dayEventTitle, children: [jsxRuntime.jsx("span", { className: styles$9.dayEventTime, children: event.time }), event.title] }), event.status === 'completed' && (jsxRuntime.jsx("svg", { className: styles$9.completedIcon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "20,6 9,17 4,12" }) }))] }, event.id));
3281
+ }), showNow && (jsxRuntime.jsx("div", { className: styles$9.currentTimeIndicator, style: { top: `${nowOffset}px` } }))] }) })] }));
3282
+ })()) : (jsxRuntime.jsx("div", { className: `${styles$9.daysGrid} ${currentViewMode === 'week' ? styles$9.weekView : ''}`, children: calendarData.days.map((day, index) => {
3272
3283
  const dayEvents = getDayEvents(day);
3273
3284
  const dayIsToday = isToday(day);
3274
3285
  const isInCurrentMonth = currentViewMode === 'week' || isCurrentMonth(day);