@super-calendar/native 2.10.0 → 2.11.1

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.
@@ -104,6 +104,16 @@ const CalendarThemeProvider = CalendarThemeContext.Provider;
104
104
  /** Read the active {@link CalendarTheme} from context. Useful inside custom renderers. */
105
105
  const useCalendarTheme = () => (0, react.useContext)(CalendarThemeContext);
106
106
  //#endregion
107
+ //#region src/utils/labels.ts
108
+ /**
109
+ * The resolved `labels` of the nearest view, so the built-in event renderers
110
+ * can localize their screen-reader text without a prop on `RenderEventArgs`.
111
+ */
112
+ const CalendarLabelsContext = (0, react.createContext)(_super_calendar_core.defaultCalendarLabels);
113
+ function useCalendarLabels() {
114
+ return (0, react.useContext)(CalendarLabelsContext);
115
+ }
116
+ //#endregion
107
117
  //#region src/utils/slots.ts
108
118
  /**
109
119
  * Build a slot resolver for one render. `slot(name, defaults)` returns the
@@ -199,7 +209,6 @@ const DAY_CELL_PADDING_TOP = 4;
199
209
  const DATE_BADGE_HEIGHT = 24;
200
210
  const BAND_CENTER_Y = 16;
201
211
  const CELL_ROW_GAP = 2;
202
- const CHIP_PADDING_V = 2;
203
212
  const BADGE_AREA = 30;
204
213
  const EMPTY_LAYOUT = {
205
214
  segments: [],
@@ -231,12 +240,13 @@ function isInCreateSpan(drag, day) {
231
240
  const b = (0, date_fns.startOfDay)(drag.hover).getTime();
232
241
  return time >= Math.min(a, b) && time <= Math.max(a, b);
233
242
  }
234
- function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView = true, moreLabel = "{moreCount} More", showAdjacentMonths = true, highlightWeekends = true, disableMonthEventCellPress = false, isRTL = false, showSixWeeks = false, showTitle = true, showWeekdays = true, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection = false, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, onDragEvent, onDragStart, eventStartEditable = true, eventOverlap = true, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }) {
243
+ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView = true, moreLabel = "{moreCount} More", labels: labelsProp, showAdjacentMonths = true, highlightWeekends = true, disableMonthEventCellPress = false, isRTL = false, showSixWeeks = false, showTitle = true, showWeekdays = true, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection = false, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, onDragEvent, onDragStart, eventStartEditable = true, eventOverlap = true, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }) {
235
244
  const theme = useCalendarTheme();
236
245
  const slot = createSlots({
237
246
  classNames,
238
247
  styles: styleOverrides
239
248
  });
249
+ const labels = (0, react.useMemo)(() => (0, _super_calendar_core.resolveCalendarLabels)(labelsProp), [labelsProp]);
240
250
  const selection = (0, _super_calendar_core.useCalendarSelection)();
241
251
  const selectedDates = selectedDatesProp ?? selection.selectedDates;
242
252
  const selectedRange = selectedRangeProp ?? selection.selectedRange;
@@ -274,7 +284,7 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
274
284
  ]);
275
285
  const chipMetrics = (0, react.useMemo)(() => {
276
286
  const fontSize = numericStyle(theme.text.eventTitle.fontSize, 12);
277
- const chipHeight = numericStyle(theme.text.eventTitle.lineHeight, Math.ceil(fontSize * 1.3)) + CHIP_PADDING_V * 2;
287
+ const chipHeight = numericStyle(theme.text.eventTitle.lineHeight, Math.ceil(fontSize * 1.3)) + 4;
278
288
  return {
279
289
  chipHeight,
280
290
  chipRowHeight: chipHeight + CELL_ROW_GAP
@@ -292,7 +302,8 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
292
302
  const rowHeight = gridHeight / weeks.length;
293
303
  const moreFontSize = numericStyle(theme.text.more.fontSize, 11);
294
304
  const moreRowHeight = Math.ceil(moreFontSize * 1.3) + CELL_ROW_GAP;
295
- return (0, _super_calendar_core.monthEventCapacity)(rowHeight - DAY_CELL_PADDING_TOP - DATE_BADGE_HEIGHT, chipMetrics.chipRowHeight, moreRowHeight);
305
+ const available = rowHeight - DAY_CELL_PADDING_TOP - DATE_BADGE_HEIGHT;
306
+ return (0, _super_calendar_core.monthEventCapacity)(available, chipMetrics.chipRowHeight, moreRowHeight);
296
307
  }, [
297
308
  maxVisibleEventCount,
298
309
  gridHeight,
@@ -513,7 +524,14 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
513
524
  };
514
525
  const handleLongPressDay = isDisabled || !onLongPressDay ? void 0 : () => onLongPressDay(day);
515
526
  const eventCount = dayEvents.length;
516
- const accessibilityLabel = `${(0, date_fns.format)(day, "EEEE, d LLLL yyyy", { locale })}${isToday ? ", today" : ""}${isSelected ? ", selected" : ""}${isDisabled ? ", unavailable" : ""}, ${eventCount} ${eventCount === 1 ? "event" : "events"}`;
527
+ const accessibilityLabel = (0, _super_calendar_core.dayAccessibilityLabel)({
528
+ dateLabel: (0, date_fns.format)(day, "EEEE, d LLLL yyyy", { locale }),
529
+ isToday,
530
+ isSelected,
531
+ isDisabled,
532
+ eventCount,
533
+ labels
534
+ });
517
535
  const daySlot = slot("day", {
518
536
  base: [styles$3.dayCell, showGrid && styles$3.dayCellEvents],
519
537
  themed: [
@@ -567,13 +585,13 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
567
585
  },
568
586
  !fillCellOnSelection && isRangeStart && {
569
587
  left: "50%",
570
- marginLeft: -24 / 2,
588
+ marginLeft: -12,
571
589
  borderTopLeftRadius: theme.rangeBandHeight / 2,
572
590
  borderBottomLeftRadius: theme.rangeBandHeight / 2
573
591
  },
574
592
  !fillCellOnSelection && isRangeEnd && {
575
593
  right: "50%",
576
- marginRight: -24 / 2,
594
+ marginRight: -12,
577
595
  borderTopRightRadius: theme.rangeBandHeight / 2,
578
596
  borderBottomRightRadius: theme.rangeBandHeight / 2
579
597
  }
@@ -620,7 +638,7 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
620
638
  events: dayEvents
621
639
  }),
622
640
  accessibilityRole: "button",
623
- accessibilityLabel: `Show ${hiddenCount} more events`,
641
+ accessibilityLabel: `${labels.moreEvents(hiddenCount)}, ${(0, date_fns.format)(day, "d MMMM", { locale })}`,
624
642
  allowFontScaling: false,
625
643
  children: moreLabel.replace("{moreCount}", String(hiddenCount))
626
644
  }) : null
@@ -634,141 +652,144 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
634
652
  height
635
653
  });
636
654
  };
637
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.View, {
638
- style: styles$3.root,
639
- children: [
640
- showTitle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
641
- ...slot("title", {
642
- base: styles$3.title,
643
- themed: [theme.text.monthTitle, { color: theme.colors.text }]
644
- }),
645
- allowFontScaling: false,
646
- children: (0, date_fns.format)(date, "MMMM yyyy", locale ? { locale } : void 0)
647
- }) : null,
648
- showWeekdays ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
649
- ...slot("weekdays", {
650
- base: styles$3.weekdayHeader,
651
- themed: theme.containers.weekdayHeader
652
- }),
653
- children: weekdayLabels.map((day) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
654
- ...slot("weekday", {
655
- base: styles$3.weekdayLabel,
656
- themed: [theme.text.weekday, { color: theme.colors.textMuted }]
655
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CalendarLabelsContext.Provider, {
656
+ value: labels,
657
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.View, {
658
+ style: styles$3.root,
659
+ children: [
660
+ showTitle ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
661
+ ...slot("title", {
662
+ base: styles$3.title,
663
+ themed: [theme.text.monthTitle, { color: theme.colors.text }]
657
664
  }),
658
665
  allowFontScaling: false,
659
- children: (0, date_fns.format)(day, (0, _super_calendar_core.weekdayFormatToken)(weekdayFormat), { locale })
660
- }, day.toISOString()))
661
- }) : null,
662
- moreOpenFor ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Modal, {
663
- transparent: true,
664
- animationType: "fade",
665
- visible: true,
666
- onRequestClose: () => setMoreOpenFor(null),
667
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Pressable, {
668
- style: styles$3.moreBackdrop,
669
- accessibilityLabel: "Close",
670
- onPress: () => setMoreOpenFor(null),
671
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.Pressable, {
672
- onPress: () => {},
673
- ...slot("morePopover", {
674
- base: styles$3.moreCard,
675
- themed: {
676
- backgroundColor: theme.colors.surface,
677
- borderColor: theme.colors.gridLine
678
- }
666
+ children: (0, date_fns.format)(date, "MMMM yyyy", locale ? { locale } : void 0)
667
+ }) : null,
668
+ showWeekdays ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
669
+ ...slot("weekdays", {
670
+ base: styles$3.weekdayHeader,
671
+ themed: theme.containers.weekdayHeader
672
+ }),
673
+ children: weekdayLabels.map((day) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
674
+ ...slot("weekday", {
675
+ base: styles$3.weekdayLabel,
676
+ themed: [theme.text.weekday, { color: theme.colors.textMuted }]
679
677
  }),
680
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
681
- accessibilityRole: "header",
682
- style: [styles$3.moreCardTitle, { color: theme.colors.text }],
683
- allowFontScaling: false,
684
- children: (0, date_fns.format)(moreOpenFor.day, "EEEE, d LLLL yyyy", { locale })
685
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.ScrollView, { children: moreOpenFor.events.map((event, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
686
- style: styles$3.moreCardRow,
687
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderEventComponent, {
688
- event,
689
- mode: "month",
690
- isAllDay: (0, _super_calendar_core.isAllDayEvent)(event),
691
- onPress: () => {
692
- setMoreOpenFor(null);
693
- onPressEvent(event);
678
+ allowFontScaling: false,
679
+ children: (0, date_fns.format)(day, (0, _super_calendar_core.weekdayFormatToken)(weekdayFormat), { locale })
680
+ }, day.toISOString()))
681
+ }) : null,
682
+ moreOpenFor ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Modal, {
683
+ transparent: true,
684
+ animationType: "fade",
685
+ visible: true,
686
+ onRequestClose: () => setMoreOpenFor(null),
687
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Pressable, {
688
+ style: styles$3.moreBackdrop,
689
+ accessibilityLabel: labels.close,
690
+ onPress: () => setMoreOpenFor(null),
691
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.Pressable, {
692
+ onPress: () => {},
693
+ ...slot("morePopover", {
694
+ base: styles$3.moreCard,
695
+ themed: {
696
+ backgroundColor: theme.colors.surface,
697
+ borderColor: theme.colors.gridLine
694
698
  }
695
- })
696
- }, keyExtractor(event, index))) })]
699
+ }),
700
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.Text, {
701
+ accessibilityRole: "header",
702
+ style: [styles$3.moreCardTitle, { color: theme.colors.text }],
703
+ allowFontScaling: false,
704
+ children: (0, date_fns.format)(moreOpenFor.day, "EEEE, d LLLL yyyy", { locale })
705
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.ScrollView, { children: moreOpenFor.events.map((event, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
706
+ style: styles$3.moreCardRow,
707
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderEventComponent, {
708
+ event,
709
+ mode: "month",
710
+ isAllDay: (0, _super_calendar_core.isAllDayEvent)(event),
711
+ onPress: () => {
712
+ setMoreOpenFor(null);
713
+ onPressEvent(event);
714
+ }
715
+ })
716
+ }, keyExtractor(event, index))) })]
717
+ })
697
718
  })
698
- })
699
- }) : null,
700
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MonthGridSurface, {
701
- gesture: dragGesture,
702
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
703
- ref: gridRef,
704
- testID: "month-grid",
705
- ...slot("grid", { base: styles$3.container }),
706
- onLayout: handleLayout,
707
- ...isWeb$2 && dragEnabled ? {
708
- onPointerDown: (event) => {
709
- const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
710
- if (point) beginDrag(point.x, point.y);
711
- },
712
- onPointerMove: (event) => {
713
- if (!dragRef.current) return;
714
- const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
715
- if (point) extendDrag(point.x, point.y);
716
- }
717
- } : null,
718
- children: weeks.map((week, weekIndex) => {
719
- const rowLayout = weekLayouts[weekIndex] ?? EMPTY_LAYOUT;
720
- const visibleLanes = (0, _super_calendar_core.monthVisibleCount)(rowLayout.laneCount, capacity);
721
- const cols = week.length;
722
- let firstVisCol = 0;
723
- let lastVisCol = cols - 1;
724
- if (showGrid && !showAdjacentMonths) {
725
- const first = week.findIndex((d) => (0, date_fns.isSameMonth)(d, date));
726
- if (first !== -1) {
727
- firstVisCol = first;
728
- lastVisCol = cols - 1 - [...week].reverse().findIndex((d) => (0, date_fns.isSameMonth)(d, date));
719
+ }) : null,
720
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MonthGridSurface, {
721
+ gesture: dragGesture,
722
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
723
+ ref: gridRef,
724
+ testID: "month-grid",
725
+ ...slot("grid", { base: styles$3.container }),
726
+ onLayout: handleLayout,
727
+ ...isWeb$2 && dragEnabled ? {
728
+ onPointerDown: (event) => {
729
+ const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
730
+ if (point) beginDrag(point.x, point.y);
731
+ },
732
+ onPointerMove: (event) => {
733
+ if (!dragRef.current) return;
734
+ const point = gridPoint(event.nativeEvent.clientX, event.nativeEvent.clientY);
735
+ if (point) extendDrag(point.x, point.y);
729
736
  }
730
- }
731
- return /* @__PURE__ */ (0, react.createElement)(react_native.View, {
732
- ...slot("week", {
733
- base: styles$3.weekRow,
734
- themed: theme.containers.weekRow
735
- }),
736
- key: week[0].toISOString()
737
- }, week.map((day, dayCol) => renderDay(day, dayCol, rowLayout, visibleLanes)), showGrid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
738
- style: [react_native.StyleSheet.absoluteFill, { pointerEvents: "box-none" }],
739
- children: rowLayout.segments.filter((seg) => seg.lane < visibleLanes).map((seg) => {
740
- const startCol = Math.max(seg.startCol, firstVisCol);
741
- const endCol = Math.min(seg.endCol, lastVisCol);
742
- if (startCol > endCol) return null;
743
- const isDragged = drag?.kind === "move" && drag.event === seg.event;
744
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
745
- style: {
746
- position: "absolute",
747
- left: pct(startCol / cols * 100),
748
- width: pct((endCol - startCol + 1) / cols * 100),
749
- top: BADGE_AREA + seg.lane * chipMetrics.chipRowHeight,
750
- height: chipMetrics.chipHeight,
751
- paddingHorizontal: CHIP_INSET_H,
752
- pointerEvents: drag ? "none" : "box-none",
753
- opacity: isDragged ? DRAGGED_BAR_OPACITY : 1
754
- },
755
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderEventComponent, {
756
- event: seg.event,
757
- mode: "month",
758
- isAllDay: (0, _super_calendar_core.isAllDayEvent)(seg.event),
759
- onPress: disableMonthEventCellPress ? () => {} : () => {
760
- if (consumeSuppressedPress()) return;
761
- onPressEvent(seg.event);
737
+ } : null,
738
+ children: weeks.map((week, weekIndex) => {
739
+ const rowLayout = weekLayouts[weekIndex] ?? EMPTY_LAYOUT;
740
+ const visibleLanes = (0, _super_calendar_core.monthVisibleCount)(rowLayout.laneCount, capacity);
741
+ const cols = week.length;
742
+ let firstVisCol = 0;
743
+ let lastVisCol = cols - 1;
744
+ if (showGrid && !showAdjacentMonths) {
745
+ const first = week.findIndex((d) => (0, date_fns.isSameMonth)(d, date));
746
+ if (first !== -1) {
747
+ firstVisCol = first;
748
+ lastVisCol = cols - 1 - [...week].reverse().findIndex((d) => (0, date_fns.isSameMonth)(d, date));
749
+ }
750
+ }
751
+ return /* @__PURE__ */ (0, react.createElement)(react_native.View, {
752
+ ...slot("week", {
753
+ base: styles$3.weekRow,
754
+ themed: theme.containers.weekRow
755
+ }),
756
+ key: week[0].toISOString()
757
+ }, week.map((day, dayCol) => renderDay(day, dayCol, rowLayout, visibleLanes)), showGrid ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
758
+ style: [react_native.StyleSheet.absoluteFill, { pointerEvents: "box-none" }],
759
+ children: rowLayout.segments.filter((seg) => seg.lane < visibleLanes).map((seg) => {
760
+ const startCol = Math.max(seg.startCol, firstVisCol);
761
+ const endCol = Math.min(seg.endCol, lastVisCol);
762
+ if (startCol > endCol) return null;
763
+ const isDragged = drag?.kind === "move" && drag.event === seg.event;
764
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
765
+ style: {
766
+ position: "absolute",
767
+ left: pct(startCol / cols * 100),
768
+ width: pct((endCol - startCol + 1) / cols * 100),
769
+ top: BADGE_AREA + seg.lane * chipMetrics.chipRowHeight,
770
+ height: chipMetrics.chipHeight,
771
+ paddingHorizontal: CHIP_INSET_H,
772
+ pointerEvents: drag ? "none" : "box-none",
773
+ opacity: isDragged ? DRAGGED_BAR_OPACITY : 1
762
774
  },
763
- onLongPress: disableMonthEventCellPress || !onLongPressEvent ? void 0 : () => onLongPressEvent(seg.event)
764
- })
765
- }, `bar-${seg.event.start.toISOString()}:${seg.event.title}:${seg.lane}`);
766
- })
767
- }) : null);
775
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RenderEventComponent, {
776
+ event: seg.event,
777
+ mode: "month",
778
+ isAllDay: (0, _super_calendar_core.isAllDayEvent)(seg.event),
779
+ onPress: disableMonthEventCellPress ? () => {} : () => {
780
+ if (consumeSuppressedPress()) return;
781
+ onPressEvent(seg.event);
782
+ },
783
+ onLongPress: disableMonthEventCellPress || !onLongPressEvent ? void 0 : () => onLongPressEvent(seg.event)
784
+ })
785
+ }, `bar-${seg.event.start.toISOString()}:${seg.event.title}:${seg.lane}`);
786
+ })
787
+ }) : null);
788
+ })
768
789
  })
769
790
  })
770
- })
771
- ]
791
+ ]
792
+ })
772
793
  });
773
794
  }
774
795
  function MonthGridSurface({ gesture, children }) {
@@ -871,7 +892,7 @@ const styles$3 = react_native.StyleSheet.create({
871
892
  const isWeb$1 = react_native.Platform.OS === "web";
872
893
  const PAGE_WINDOW$1 = 60;
873
894
  const PAGE_VIEWABILITY = { itemVisiblePercentThreshold: 90 };
874
- function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onDragEvent, onDragStart, eventStartEditable, eventOverlap, onChangeDate, freeSwipe = false, swipeEnabled = true, showSixWeeks = false, showTitle = true, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }) {
895
+ function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView, moreLabel, labels, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressCell, onPressEvent, onLongPressEvent, onPressMore, onCreateEvent, onSelectDrag, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, onDragEvent, onDragStart, eventStartEditable, eventOverlap, onChangeDate, freeSwipe = false, swipeEnabled = true, showSixWeeks = false, showTitle = true, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }) {
875
896
  const theme = useCalendarTheme();
876
897
  const slot = (0, react.useMemo)(() => createSlots({
877
898
  classNames,
@@ -988,6 +1009,7 @@ function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hid
988
1009
  locale,
989
1010
  sortedMonthView,
990
1011
  moreLabel,
1012
+ labels,
991
1013
  showAdjacentMonths,
992
1014
  highlightWeekends,
993
1015
  disableMonthEventCellPress,
@@ -1024,6 +1046,7 @@ function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hid
1024
1046
  locale,
1025
1047
  sortedMonthView,
1026
1048
  moreLabel,
1049
+ labels,
1027
1050
  showAdjacentMonths,
1028
1051
  highlightWeekends,
1029
1052
  disableMonthEventCellPress,
@@ -1167,6 +1190,7 @@ const styles$2 = react_native.StyleSheet.create({
1167
1190
  */
1168
1191
  function DefaultMonthEvent({ event, mode, isAllDay, ampm = false, showTime = true, ellipsizeTitle = false, allDayLabel, accessibilityLabel: accessibilityLabelProp, cellStyle, onPress, onLongPress }) {
1169
1192
  const theme = useCalendarTheme();
1193
+ const labels = useCalendarLabels();
1170
1194
  const isAllDayEvent = isAllDay ?? false;
1171
1195
  const timeLabel = (0, _super_calendar_core.eventTimeLabel)({
1172
1196
  mode,
@@ -1184,7 +1208,8 @@ function DefaultMonthEvent({ event, mode, isAllDay, ampm = false, showTime = tru
1184
1208
  start: event.start,
1185
1209
  end: event.end,
1186
1210
  ampm,
1187
- allDayLabel
1211
+ allDayLabel,
1212
+ labels
1188
1213
  });
1189
1214
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.TouchableOpacity, {
1190
1215
  style: [
@@ -1247,7 +1272,7 @@ const AUTOSCROLL_INTERVAL_MS = 16;
1247
1272
  const NO_EVENTS = [];
1248
1273
  const noop = () => {};
1249
1274
  const defaultKeyExtractor = (event) => `${event.start.toISOString()}|${event.end.toISOString()}|${event.title ?? ""}`;
1250
- function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat = "short", weekRowHeight: weekRowHeightProp, monthHeaderHeight = DEFAULT_MONTH_HEADER_HEIGHT, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths = false, highlightWeekends = true, disableMonthEventCellPress, isRTL, activeDate, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, calendarCellStyle, renderEvent = DefaultMonthEvent, eventAccessibilityLabel, keyExtractor = defaultKeyExtractor, onPressDay, onLongPressDay, onPressEvent = noop, onLongPressEvent, onPressMore, onSelectDrag, onChangeVisibleMonth, renderMonthHeader, classNames, styles: styleOverrides }) {
1275
+ function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat = "short", weekRowHeight: weekRowHeightProp, monthHeaderHeight = DEFAULT_MONTH_HEADER_HEIGHT, maxVisibleEventCount, locale, sortedMonthView, moreLabel, labels, showAdjacentMonths = false, highlightWeekends = true, disableMonthEventCellPress, isRTL, activeDate, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, calendarCellStyle, renderEvent = DefaultMonthEvent, eventAccessibilityLabel, keyExtractor = defaultKeyExtractor, onPressDay, onLongPressDay, onPressEvent = noop, onLongPressEvent, onPressMore, onSelectDrag, onChangeVisibleMonth, renderMonthHeader, classNames, styles: styleOverrides }) {
1251
1276
  const theme = useCalendarTheme();
1252
1277
  const slot = (0, react.useMemo)(() => createSlots({
1253
1278
  classNames,
@@ -1477,6 +1502,7 @@ function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat
1477
1502
  locale,
1478
1503
  sortedMonthView,
1479
1504
  moreLabel,
1505
+ labels,
1480
1506
  showAdjacentMonths,
1481
1507
  highlightWeekends,
1482
1508
  disableMonthEventCellPress,
@@ -1510,6 +1536,7 @@ function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat
1510
1536
  weekStartsOn,
1511
1537
  sortedMonthView,
1512
1538
  moreLabel,
1539
+ labels,
1513
1540
  showAdjacentMonths,
1514
1541
  disableMonthEventCellPress,
1515
1542
  isRTL,
@@ -1634,6 +1661,12 @@ const styles = react_native.StyleSheet.create({
1634
1661
  }
1635
1662
  });
1636
1663
  //#endregion
1664
+ Object.defineProperty(exports, "CalendarLabelsContext", {
1665
+ enumerable: true,
1666
+ get: function() {
1667
+ return CalendarLabelsContext;
1668
+ }
1669
+ });
1637
1670
  Object.defineProperty(exports, "CalendarThemeProvider", {
1638
1671
  enumerable: true,
1639
1672
  get: function() {
@@ -1694,6 +1727,12 @@ Object.defineProperty(exports, "mergeTheme", {
1694
1727
  return mergeTheme;
1695
1728
  }
1696
1729
  });
1730
+ Object.defineProperty(exports, "useCalendarLabels", {
1731
+ enumerable: true,
1732
+ get: function() {
1733
+ return useCalendarLabels;
1734
+ }
1735
+ });
1697
1736
  Object.defineProperty(exports, "useCalendarTheme", {
1698
1737
  enumerable: true,
1699
1738
  get: function() {