@super-calendar/native 2.11.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.
package/dist/picker.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as CalendarTheme, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, a as MonthPager, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, x as EventKeyExtractor } from "./DefaultMonthEvent-BlnKHaq2.mjs";
1
+ import { A as CalendarTheme, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, a as MonthPager, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, x as EventKeyExtractor } from "./DefaultMonthEvent-B9KzVzFa.mjs";
2
2
  import { DateRange, DateSelectionConstraints, DaySelectionState, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, UseDateRangeOptions, UseMonthGridOptions, buildMonthGrid, buildMonthWeeks, daySelectionState, getIsToday, getWeekDays, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, minutesIntoDay, nextDateRange, useDateRange, useMonthGrid } from "@super-calendar/core";
3
3
  export { type CalendarEvent, type CalendarMode, type CalendarTheme, CalendarThemeProvider, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultMonthEvent, type EventKeyExtractor, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type PartialCalendarTheme, type RenderEvent, type RenderEventArgs, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, getIsToday, getWeekDays, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, mergeTheme, minutesIntoDay, nextDateRange, useCalendarTheme, useDateRange, useMonthGrid };
package/dist/picker.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as CalendarTheme, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, a as MonthPager, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, x as EventKeyExtractor } from "./DefaultMonthEvent--9Jg6w-x.js";
1
+ import { A as CalendarTheme, E as RenderEventArgs, F as mergeTheme, I as useCalendarTheme, M as PartialCalendarTheme, N as darkTheme, O as WeekStartsOn, P as defaultTheme, S as ICalendarEvent, T as RenderEvent, a as MonthPager, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, x as EventKeyExtractor } from "./DefaultMonthEvent-DlIIWDzr.js";
2
2
  import { DateRange, DateSelectionConstraints, DaySelectionState, MonthGrid, MonthGridDay, MonthGridWeek, MonthGridWeekday, UseDateRangeOptions, UseMonthGridOptions, buildMonthGrid, buildMonthWeeks, daySelectionState, getIsToday, getWeekDays, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, minutesIntoDay, nextDateRange, useDateRange, useMonthGrid } from "@super-calendar/core";
3
3
  export { type CalendarEvent, type CalendarMode, type CalendarTheme, CalendarThemeProvider, type DateRange, type DateSelectionConstraints, type DaySelectionState, DefaultMonthEvent, type EventKeyExtractor, type ICalendarEvent, type MonthGrid, type MonthGridDay, type MonthGridWeek, type MonthGridWeekday, MonthList, type MonthListProps, MonthPager, type MonthPagerProps, MonthView, type MonthViewProps, type PartialCalendarTheme, type RenderEvent, type RenderEventArgs, type UseDateRangeOptions, type UseMonthGridOptions, type WeekStartsOn, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, getIsToday, getWeekDays, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, mergeTheme, minutesIntoDay, nextDateRange, useCalendarTheme, useDateRange, useMonthGrid };
package/dist/picker.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_MonthList = require("./MonthList-DNT1LJkk.js");
2
+ const require_MonthList = require("./MonthList-sGAZxQZ_.js");
3
3
  let _super_calendar_core = require("@super-calendar/core");
4
4
  exports.CalendarThemeProvider = require_MonthList.CalendarThemeProvider;
5
5
  exports.DefaultMonthEvent = require_MonthList.DefaultMonthEvent;
package/dist/picker.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { d as darkTheme, f as defaultTheme, i as MonthView, m as useCalendarTheme, n as DefaultMonthEvent, p as mergeTheme, r as MonthPager, t as MonthList, u as CalendarThemeProvider } from "./MonthList-CjKhzOJX.mjs";
1
+ import { f as CalendarThemeProvider, g as useCalendarTheme, h as mergeTheme, i as MonthView, m as defaultTheme, n as DefaultMonthEvent, p as darkTheme, r as MonthPager, t as MonthList } from "./MonthList-B-UE37ZG.mjs";
2
2
  import { buildMonthGrid, buildMonthWeeks, daySelectionState, getIsToday, getWeekDays, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, minutesIntoDay, nextDateRange, useDateRange, useMonthGrid } from "@super-calendar/core";
3
3
  export { CalendarThemeProvider, DefaultMonthEvent, MonthList, MonthPager, MonthView, buildMonthGrid, buildMonthWeeks, darkTheme, daySelectionState, defaultTheme, getIsToday, getWeekDays, isDateSelectable, isRangeEndpoint, isSameCalendarDay, isWeekend, isWithinDateRange, mergeTheme, minutesIntoDay, nextDateRange, useCalendarTheme, useDateRange, useMonthGrid };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-calendar/native",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "Gesture-driven, virtualized month / week / day calendar and date picker for React Native (and web via react-native-web).",
5
5
  "keywords": [
6
6
  "agenda",
@@ -64,13 +64,13 @@
64
64
  "access": "public"
65
65
  },
66
66
  "dependencies": {
67
- "@super-calendar/core": "2.11.0"
67
+ "@super-calendar/core": "2.11.1"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@legendapp/list": ">=3",
71
71
  "date-fns": ">=3",
72
72
  "react": ">=18",
73
- "react-native": ">=0.74",
73
+ "react-native": ">=0.74 <2",
74
74
  "react-native-gesture-handler": ">=2.16",
75
75
  "react-native-reanimated": ">=4.0.0 <5",
76
76
  "react-native-worklets": ">=0.5"
@@ -34,6 +34,8 @@ import {
34
34
  type WeekdayFormat,
35
35
  getViewDays,
36
36
  } from "@super-calendar/core";
37
+ import { type CalendarLabels, resolveCalendarLabels } from "@super-calendar/core";
38
+ import { CalendarLabelsContext } from "../utils/labels";
37
39
  import { type SlotStyleProps } from "../utils/slots";
38
40
  import { YearView, type YearViewSlot } from "./YearView";
39
41
  import { Agenda, type AgendaSlot } from "./Agenda";
@@ -158,6 +160,8 @@ export type CalendarProps<T> = SlotStyleProps<CalendarSlot> & {
158
160
  sortedMonthView?: boolean;
159
161
  /** Month overflow label template; `{moreCount}` is replaced. Default "{moreCount} More". */
160
162
  moreLabel?: string;
163
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
164
+ labels?: Partial<CalendarLabels>;
161
165
  /** Show dimmed adjacent-month days in the month grid. Default true. */
162
166
  showAdjacentMonths?: boolean;
163
167
  /** Ignore taps on month-cell events (day taps still fire). Default false. */
@@ -469,6 +473,7 @@ export function Calendar<T>({
469
473
  maxVisibleEventCount,
470
474
  sortedMonthView,
471
475
  moreLabel,
476
+ labels,
472
477
  showAdjacentMonths,
473
478
  disableMonthEventCellPress,
474
479
  weekStartsOn = 0,
@@ -630,158 +635,165 @@ export function Calendar<T>({
630
635
  eventAccessibilityLabel,
631
636
  ]);
632
637
 
638
+ const resolvedLabels = useMemo(() => resolveCalendarLabels(labels), [labels]);
639
+
633
640
  return (
634
641
  <CalendarThemeProvider value={mergedTheme}>
635
- {mode === "month" ? (
636
- <MonthPager
637
- date={date}
638
- events={displayEvents}
639
- maxVisibleEventCount={maxVisibleEventCount}
640
- weekStartsOn={weekStartsOn}
641
- hiddenDays={hiddenDays}
642
- weekdayFormat={weekdayFormat}
643
- locale={locale}
644
- sortedMonthView={sortedMonthView}
645
- moreLabel={moreLabel}
646
- showAdjacentMonths={showAdjacentMonths}
647
- highlightWeekends={highlightWeekends}
648
- disableMonthEventCellPress={disableMonthEventCellPress}
649
- isRTL={isRTL}
650
- showSixWeeks={showSixWeeks}
651
- showTitle={showTitle}
652
- activeDate={activeDate}
653
- renderHeaderForMonthView={renderHeaderForMonthView}
654
- renderCustomDateForMonth={renderCustomDateForMonth}
655
- calendarCellStyle={calendarCellStyle}
656
- renderEvent={resolvedRenderEvent}
657
- keyExtractor={keyExtractor}
658
- onPressDay={onPressDay}
659
- onLongPressDay={onLongPressDay}
660
- onPressCell={onPressCell}
661
- onPressEvent={handlePressEvent}
662
- onLongPressEvent={handleLongPressEvent}
663
- onPressMore={onPressMore}
664
- onCreateEvent={onCreateEvent}
665
- onSelectDrag={onSelectDrag}
666
- onDragEvent={onDragEvent}
667
- onDragStart={onDragStart}
668
- eventStartEditable={eventStartEditable}
669
- eventOverlap={eventOverlap}
670
- selectedDates={selectedDates}
671
- selectedRange={selectedRange}
672
- fillCellOnSelection={fillCellOnSelection}
673
- minDate={minDate}
674
- maxDate={maxDate}
675
- isDateDisabled={isDateDisabled}
676
- onChangeDate={handleChangeDate}
677
- freeSwipe={freeSwipe}
678
- swipeEnabled={swipeEnabled}
679
- classNames={classNames}
680
- styles={styleOverrides}
681
- />
682
- ) : mode === "year" ? (
683
- <YearView
684
- date={date}
685
- events={displayEvents}
686
- refreshControl={refreshControl}
687
- weekStartsOn={weekStartsOn}
688
- hiddenDays={hiddenDays}
689
- locale={locale}
690
- activeDate={activeDate}
691
- selectedDates={selectedDates}
692
- selectedRange={selectedRange}
693
- minDate={minDate}
694
- maxDate={maxDate}
695
- isDateDisabled={isDateDisabled}
696
- onPressDay={onPressDay}
697
- onPressMonth={onPressMonth}
698
- onSelectDrag={onSelectDrag}
699
- onCreateEvent={onCreateEvent}
700
- classNames={classNames}
701
- styles={styleOverrides}
702
- />
703
- ) : mode === "schedule" ? (
704
- <Agenda
705
- events={displayEvents}
706
- locale={locale}
707
- renderEvent={resolvedRenderEvent}
708
- keyExtractor={keyExtractor}
709
- onPressEvent={handlePressEvent}
710
- onLongPressEvent={handleLongPressEvent}
711
- onPressDay={onPressDay}
712
- activeDate={activeDate}
713
- itemSeparatorComponent={itemSeparatorComponent}
714
- refreshControl={refreshControl}
715
- classNames={classNames}
716
- styles={styleOverrides}
717
- />
718
- ) : (
719
- <TimeGrid
720
- mode={mode}
721
- numberOfDays={numberOfDays}
722
- weekEndsOn={weekEndsOn}
723
- date={date}
724
- events={displayEvents}
725
- cellHeight={cellHeight}
726
- hourHeight={hourHeight}
727
- weekStartsOn={weekStartsOn}
728
- weekdayFormat={weekdayFormat}
729
- hiddenDays={hiddenDays}
730
- now={now}
731
- timeZone={timeZone}
732
- renderEvent={resolvedRenderEvent}
733
- keyExtractor={keyExtractor}
734
- scrollOffsetMinutes={scrollOffsetMinutes}
735
- hourColumnWidth={hourColumnWidth}
736
- hideHours={hideHours}
737
- timeslots={timeslots}
738
- showAllDayEventCell={showAllDayEventCell}
739
- showAllDayLabel={showAllDayLabel}
740
- refreshControl={refreshControl}
741
- highlightWeekends={highlightWeekends}
742
- eventStartEditable={eventStartEditable}
743
- eventDurationEditable={eventDurationEditable}
744
- eventOverlap={eventOverlap}
745
- calendarCellStyle={calendarCellStyle}
746
- businessHours={businessHours}
747
- renderBusinessHours={renderBusinessHours}
748
- renderBackgroundEvent={renderBackgroundEvent}
749
- showWeekNumber={showWeekNumber}
750
- weekNumberPrefix={weekNumberPrefix}
751
- hourComponent={hourComponent}
752
- showVerticalScrollIndicator={showVerticalScrollIndicator}
753
- verticalScrollEnabled={verticalScrollEnabled}
754
- headerComponent={headerComponent}
755
- minHour={minHour}
756
- maxHour={maxHour}
757
- ampm={ampm}
758
- minHourHeight={minHourHeight}
759
- maxHourHeight={maxHourHeight}
760
- minEventHeight={minEventHeight}
761
- eventGap={eventGap}
762
- showNowIndicator={showNowIndicator}
763
- locale={locale}
764
- activeDate={activeDate}
765
- isRTL={isRTL}
766
- freeSwipe={freeSwipe}
767
- swipeEnabled={swipeEnabled}
768
- onPressEvent={handlePressEvent}
769
- onLongPressEvent={handleLongPressEvent}
770
- onDragEvent={onDragEvent}
771
- showDragHandle={showDragHandle}
772
- onDragStart={onDragStart}
773
- dragStepMinutes={dragStepMinutes}
774
- onPressCell={onPressCell}
775
- resetPageOnPressCell={resetPageOnPressCell}
776
- onLongPressCell={onLongPressCell}
777
- onCreateEvent={onCreateEvent}
778
- onPressDateHeader={onPressDateHeader}
779
- onChangeDate={handleChangeDate}
780
- renderHeader={renderTimeGridHeader}
781
- classNames={classNames}
782
- styles={styleOverrides}
783
- />
784
- )}
642
+ <CalendarLabelsContext.Provider value={resolvedLabels}>
643
+ {mode === "month" ? (
644
+ <MonthPager
645
+ date={date}
646
+ events={displayEvents}
647
+ maxVisibleEventCount={maxVisibleEventCount}
648
+ weekStartsOn={weekStartsOn}
649
+ hiddenDays={hiddenDays}
650
+ weekdayFormat={weekdayFormat}
651
+ locale={locale}
652
+ labels={labels}
653
+ sortedMonthView={sortedMonthView}
654
+ moreLabel={moreLabel}
655
+ showAdjacentMonths={showAdjacentMonths}
656
+ highlightWeekends={highlightWeekends}
657
+ disableMonthEventCellPress={disableMonthEventCellPress}
658
+ isRTL={isRTL}
659
+ showSixWeeks={showSixWeeks}
660
+ showTitle={showTitle}
661
+ activeDate={activeDate}
662
+ renderHeaderForMonthView={renderHeaderForMonthView}
663
+ renderCustomDateForMonth={renderCustomDateForMonth}
664
+ calendarCellStyle={calendarCellStyle}
665
+ renderEvent={resolvedRenderEvent}
666
+ keyExtractor={keyExtractor}
667
+ onPressDay={onPressDay}
668
+ onLongPressDay={onLongPressDay}
669
+ onPressCell={onPressCell}
670
+ onPressEvent={handlePressEvent}
671
+ onLongPressEvent={handleLongPressEvent}
672
+ onPressMore={onPressMore}
673
+ onCreateEvent={onCreateEvent}
674
+ onSelectDrag={onSelectDrag}
675
+ onDragEvent={onDragEvent}
676
+ onDragStart={onDragStart}
677
+ eventStartEditable={eventStartEditable}
678
+ eventOverlap={eventOverlap}
679
+ selectedDates={selectedDates}
680
+ selectedRange={selectedRange}
681
+ fillCellOnSelection={fillCellOnSelection}
682
+ minDate={minDate}
683
+ maxDate={maxDate}
684
+ isDateDisabled={isDateDisabled}
685
+ onChangeDate={handleChangeDate}
686
+ freeSwipe={freeSwipe}
687
+ swipeEnabled={swipeEnabled}
688
+ classNames={classNames}
689
+ styles={styleOverrides}
690
+ />
691
+ ) : mode === "year" ? (
692
+ <YearView
693
+ date={date}
694
+ events={displayEvents}
695
+ refreshControl={refreshControl}
696
+ weekStartsOn={weekStartsOn}
697
+ hiddenDays={hiddenDays}
698
+ locale={locale}
699
+ labels={labels}
700
+ activeDate={activeDate}
701
+ selectedDates={selectedDates}
702
+ selectedRange={selectedRange}
703
+ minDate={minDate}
704
+ maxDate={maxDate}
705
+ isDateDisabled={isDateDisabled}
706
+ onPressDay={onPressDay}
707
+ onPressMonth={onPressMonth}
708
+ onSelectDrag={onSelectDrag}
709
+ onCreateEvent={onCreateEvent}
710
+ classNames={classNames}
711
+ styles={styleOverrides}
712
+ />
713
+ ) : mode === "schedule" ? (
714
+ <Agenda
715
+ events={displayEvents}
716
+ locale={locale}
717
+ renderEvent={resolvedRenderEvent}
718
+ keyExtractor={keyExtractor}
719
+ onPressEvent={handlePressEvent}
720
+ onLongPressEvent={handleLongPressEvent}
721
+ onPressDay={onPressDay}
722
+ activeDate={activeDate}
723
+ itemSeparatorComponent={itemSeparatorComponent}
724
+ refreshControl={refreshControl}
725
+ classNames={classNames}
726
+ styles={styleOverrides}
727
+ />
728
+ ) : (
729
+ <TimeGrid
730
+ mode={mode}
731
+ numberOfDays={numberOfDays}
732
+ weekEndsOn={weekEndsOn}
733
+ date={date}
734
+ events={displayEvents}
735
+ cellHeight={cellHeight}
736
+ hourHeight={hourHeight}
737
+ weekStartsOn={weekStartsOn}
738
+ weekdayFormat={weekdayFormat}
739
+ hiddenDays={hiddenDays}
740
+ now={now}
741
+ timeZone={timeZone}
742
+ renderEvent={resolvedRenderEvent}
743
+ keyExtractor={keyExtractor}
744
+ scrollOffsetMinutes={scrollOffsetMinutes}
745
+ hourColumnWidth={hourColumnWidth}
746
+ hideHours={hideHours}
747
+ timeslots={timeslots}
748
+ showAllDayEventCell={showAllDayEventCell}
749
+ showAllDayLabel={showAllDayLabel}
750
+ refreshControl={refreshControl}
751
+ highlightWeekends={highlightWeekends}
752
+ eventStartEditable={eventStartEditable}
753
+ eventDurationEditable={eventDurationEditable}
754
+ eventOverlap={eventOverlap}
755
+ calendarCellStyle={calendarCellStyle}
756
+ businessHours={businessHours}
757
+ renderBusinessHours={renderBusinessHours}
758
+ renderBackgroundEvent={renderBackgroundEvent}
759
+ showWeekNumber={showWeekNumber}
760
+ weekNumberPrefix={weekNumberPrefix}
761
+ hourComponent={hourComponent}
762
+ showVerticalScrollIndicator={showVerticalScrollIndicator}
763
+ verticalScrollEnabled={verticalScrollEnabled}
764
+ headerComponent={headerComponent}
765
+ minHour={minHour}
766
+ maxHour={maxHour}
767
+ ampm={ampm}
768
+ minHourHeight={minHourHeight}
769
+ maxHourHeight={maxHourHeight}
770
+ minEventHeight={minEventHeight}
771
+ eventGap={eventGap}
772
+ showNowIndicator={showNowIndicator}
773
+ locale={locale}
774
+ labels={labels}
775
+ activeDate={activeDate}
776
+ isRTL={isRTL}
777
+ freeSwipe={freeSwipe}
778
+ swipeEnabled={swipeEnabled}
779
+ onPressEvent={handlePressEvent}
780
+ onLongPressEvent={handleLongPressEvent}
781
+ onDragEvent={onDragEvent}
782
+ showDragHandle={showDragHandle}
783
+ onDragStart={onDragStart}
784
+ dragStepMinutes={dragStepMinutes}
785
+ onPressCell={onPressCell}
786
+ resetPageOnPressCell={resetPageOnPressCell}
787
+ onLongPressCell={onLongPressCell}
788
+ onCreateEvent={onCreateEvent}
789
+ onPressDateHeader={onPressDateHeader}
790
+ onChangeDate={handleChangeDate}
791
+ renderHeader={renderTimeGridHeader}
792
+ classNames={classNames}
793
+ styles={styleOverrides}
794
+ />
795
+ )}
796
+ </CalendarLabelsContext.Provider>
785
797
  </CalendarThemeProvider>
786
798
  );
787
799
  }
@@ -2,6 +2,7 @@ import type { ReactElement } from "react";
2
2
  import { StyleSheet, Text, TouchableOpacity } from "react-native";
3
3
  import Animated, { useAnimatedStyle, useDerivedValue } from "react-native-reanimated";
4
4
  import { useCalendarTheme } from "../theme";
5
+ import { useCalendarLabels } from "../utils/labels";
5
6
  import type { RenderEventArgs } from "../types";
6
7
  import {
7
8
  eventAccessibilityLabel,
@@ -46,6 +47,7 @@ export function DefaultEvent<T>({
46
47
  onLongPress,
47
48
  }: RenderEventArgs<T>): ReactElement {
48
49
  const theme = useCalendarTheme();
50
+ const labels = useCalendarLabels();
49
51
  const isAllDayEvent = isAllDay ?? false;
50
52
  const timeLabel = eventTimeLabel({
51
53
  mode,
@@ -75,6 +77,7 @@ export function DefaultEvent<T>({
75
77
  end: event.end,
76
78
  ampm,
77
79
  allDayLabel,
80
+ labels,
78
81
  });
79
82
 
80
83
  // Month cells and the all-day lane get a single clipped line; the timed grid
@@ -1,6 +1,7 @@
1
1
  import type { ReactElement } from "react";
2
2
  import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
3
3
  import { useCalendarTheme } from "../theme";
4
+ import { useCalendarLabels } from "../utils/labels";
4
5
  import type { RenderEventArgs } from "../types";
5
6
  import {
6
7
  eventAccessibilityLabel,
@@ -30,6 +31,7 @@ export function DefaultMonthEvent<T>({
30
31
  onLongPress,
31
32
  }: RenderEventArgs<T>): ReactElement {
32
33
  const theme = useCalendarTheme();
34
+ const labels = useCalendarLabels();
33
35
  const isAllDayEvent = isAllDay ?? false;
34
36
  const timeLabel = eventTimeLabel({
35
37
  mode,
@@ -50,6 +52,7 @@ export function DefaultMonthEvent<T>({
50
52
  end: event.end,
51
53
  ampm,
52
54
  allDayLabel,
55
+ labels,
53
56
  });
54
57
 
55
58
  return (
@@ -36,6 +36,7 @@ import {
36
36
  type WeekdayFormat,
37
37
  isDateSelectable,
38
38
  } from "@super-calendar/core";
39
+ import type { CalendarLabels } from "@super-calendar/core";
39
40
  import { buildMonthWeeks, getWeekDays, weekdayFormatToken } from "@super-calendar/core";
40
41
  import { createSlots, type SlotStyleProps } from "../utils/slots";
41
42
  import { DefaultMonthEvent } from "./DefaultMonthEvent";
@@ -100,6 +101,8 @@ export type MonthListProps<T> = {
100
101
  locale?: Locale;
101
102
  sortedMonthView?: boolean;
102
103
  moreLabel?: string;
104
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
105
+ labels?: Partial<CalendarLabels>;
103
106
  /** Show dimmed adjacent-month days. Default false (each month shows only its own days). */
104
107
  showAdjacentMonths?: boolean;
105
108
  /** Tint weekend day cells with the theme's weekend background. Default true. */
@@ -153,6 +156,7 @@ function MonthListInner<T>({
153
156
  locale,
154
157
  sortedMonthView,
155
158
  moreLabel,
159
+ labels,
156
160
  showAdjacentMonths = false,
157
161
  highlightWeekends = true,
158
162
  disableMonthEventCellPress,
@@ -466,6 +470,7 @@ function MonthListInner<T>({
466
470
  locale={locale}
467
471
  sortedMonthView={sortedMonthView}
468
472
  moreLabel={moreLabel}
473
+ labels={labels}
469
474
  showAdjacentMonths={showAdjacentMonths}
470
475
  highlightWeekends={highlightWeekends}
471
476
  disableMonthEventCellPress={disableMonthEventCellPress}
@@ -501,6 +506,7 @@ function MonthListInner<T>({
501
506
  weekStartsOn,
502
507
  sortedMonthView,
503
508
  moreLabel,
509
+ labels,
504
510
  showAdjacentMonths,
505
511
  disableMonthEventCellPress,
506
512
  isRTL,
@@ -34,6 +34,7 @@ import {
34
34
  getWeekDays,
35
35
  weekdayFormatToken,
36
36
  } from "@super-calendar/core";
37
+ import type { CalendarLabels } from "@super-calendar/core";
37
38
  import { createSlots, type SlotStyleProps } from "../utils/slots";
38
39
  import { useWebPagerKeys } from "../utils/useWebPagerKeys";
39
40
  import { MonthView, type MonthViewSlot } from "./MonthView";
@@ -63,6 +64,8 @@ export type MonthPagerProps<T> = {
63
64
  locale?: Locale;
64
65
  sortedMonthView?: boolean;
65
66
  moreLabel?: string;
67
+ /** Translations for the screen-reader words and gutter text; omitted keys use English. */
68
+ labels?: Partial<CalendarLabels>;
66
69
  showAdjacentMonths?: boolean;
67
70
  highlightWeekends?: boolean;
68
71
  disableMonthEventCellPress?: boolean;
@@ -124,6 +127,7 @@ function MonthPagerInner<T>({
124
127
  locale,
125
128
  sortedMonthView,
126
129
  moreLabel,
130
+ labels,
127
131
  showAdjacentMonths,
128
132
  highlightWeekends,
129
133
  disableMonthEventCellPress,
@@ -318,6 +322,7 @@ function MonthPagerInner<T>({
318
322
  locale={locale}
319
323
  sortedMonthView={sortedMonthView}
320
324
  moreLabel={moreLabel}
325
+ labels={labels}
321
326
  showAdjacentMonths={showAdjacentMonths}
322
327
  highlightWeekends={highlightWeekends}
323
328
  disableMonthEventCellPress={disableMonthEventCellPress}
@@ -356,6 +361,7 @@ function MonthPagerInner<T>({
356
361
  locale,
357
362
  sortedMonthView,
358
363
  moreLabel,
364
+ labels,
359
365
  showAdjacentMonths,
360
366
  highlightWeekends,
361
367
  disableMonthEventCellPress,