@super-calendar/native 2.1.5 → 2.3.0
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/{DefaultMonthEvent-C-BiOsXb.d.mts → DefaultMonthEvent-BW6qy50X.d.ts} +62 -8
- package/dist/{DefaultMonthEvent-CcZLyfps.d.ts → DefaultMonthEvent-BbCMc60z.d.mts} +62 -8
- package/dist/{MonthList-BKlLes2B.mjs → MonthList-BidXJMfm.mjs} +98 -32
- package/dist/{MonthList-ege6HsEP.js → MonthList-CFXm7BK_.js} +102 -30
- package/dist/index.d.mts +110 -6
- package/dist/index.d.ts +110 -6
- package/dist/index.js +480 -113
- package/dist/index.mjs +476 -116
- package/dist/picker.d.mts +1 -1
- package/dist/picker.d.ts +1 -1
- package/dist/picker.js +1 -1
- package/dist/picker.mjs +1 -1
- package/package.json +2 -2
- package/src/components/Agenda.tsx +2 -2
- package/src/components/AllDayLane.tsx +11 -2
- package/src/components/Calendar.tsx +37 -3
- package/src/components/DefaultEvent.tsx +68 -47
- package/src/components/DefaultMonthEvent.tsx +11 -8
- package/src/components/MonthList.tsx +15 -2
- package/src/components/MonthPager.tsx +18 -10
- package/src/components/MonthView.tsx +39 -10
- package/src/components/ResourceTimeline.tsx +441 -0
- package/src/components/TimeGrid.tsx +54 -17
- package/src/index.tsx +10 -0
- package/src/theme.ts +74 -4
- package/src/types.ts +9 -0
- package/src/utils/withEventAccessibilityLabel.tsx +30 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
2
|
import { ComponentType, ReactElement } from "react";
|
|
3
|
-
import { SharedValue } from "react-native-reanimated";
|
|
4
|
-
import { BusinessHours, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, EventKeyExtractor, ICalendarEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, WeekStartsOn } from "@super-calendar/core";
|
|
5
3
|
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
4
|
+
import { SharedValue } from "react-native-reanimated";
|
|
5
|
+
import { BusinessHours, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, EventKeyExtractor, ICalendarEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, WeekStartsOn, WeekdayFormat, WeekdayFormat as WeekdayFormat$1 } from "@super-calendar/core";
|
|
6
6
|
|
|
7
7
|
//#region src/theme.d.ts
|
|
8
8
|
/**
|
|
@@ -15,13 +15,39 @@ interface CalendarTheme {
|
|
|
15
15
|
colors: CalendarColors;
|
|
16
16
|
/** Text styles for the calendar's labels and the built-in event box. */
|
|
17
17
|
text: {
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/** The day number in a time-grid (week/day) column header. */dayNumber: TextStyle; /** The weekday label ("Mon") in a time-grid column header. */
|
|
19
|
+
columnHeaderWeekday: TextStyle; /** Short weekday label ("Mon") in the month grid's header row. */
|
|
20
|
+
weekday: TextStyle; /** The "MMMM yyyy" month title above the month grid. */
|
|
21
|
+
monthTitle: TextStyle; /** Date number inside a month cell. */
|
|
20
22
|
dateCell: TextStyle; /** Hour labels down the left of the time grid. */
|
|
21
23
|
hourLabel: TextStyle; /** The "+N more" overflow label in month cells. */
|
|
22
24
|
more: TextStyle; /** Title inside the built-in default event box. */
|
|
23
25
|
eventTitle: TextStyle;
|
|
24
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Per-part `ViewStyle` overrides for the renderer's container elements, the
|
|
29
|
+
* React Native counterpart of the web renderer's per-slot classes. Each is
|
|
30
|
+
* merged onto the built-in style, so you override only what you set. (Rolling
|
|
31
|
+
* out across the views; more slots as they land.)
|
|
32
|
+
*/
|
|
33
|
+
containers: {
|
|
34
|
+
/** The month view's outer container (title + weekday header + grid). */monthContainer: ViewStyle; /** The weekday-label header row above a month grid. */
|
|
35
|
+
weekdayHeader: ViewStyle; /** Each week (row of 7 day cells) in the month grid. */
|
|
36
|
+
weekRow: ViewStyle; /** Each day cell in the month grid. */
|
|
37
|
+
dayCell: ViewStyle; /** The date badge (the circle) inside a month day cell. */
|
|
38
|
+
dayBadge: ViewStyle; /** An event chip inside a month day cell. */
|
|
39
|
+
monthEvent: ViewStyle; /** Each day's column header in the time grid. */
|
|
40
|
+
columnHeader: ViewStyle; /** The day-number badge (the circle) inside a time-grid column header. */
|
|
41
|
+
columnHeaderBadge: ViewStyle; /** A timed event's positioned box in the time grid (and resource timeline). */
|
|
42
|
+
timeGridEvent: ViewStyle; /** The current-time indicator line. */
|
|
43
|
+
nowIndicator: ViewStyle; /** Each resource row in the resource timeline. */
|
|
44
|
+
resourceRow: ViewStyle; /** The left-hand resource-label cell in the resource timeline. */
|
|
45
|
+
resourceLabel: ViewStyle; /** The schedule/agenda list's outer container. */
|
|
46
|
+
agendaList: ViewStyle; /** Each event row in the agenda list. */
|
|
47
|
+
agendaRow: ViewStyle; /** The all-day lane above the time grid. */
|
|
48
|
+
allDayLane: ViewStyle; /** Each day's column within the all-day lane. */
|
|
49
|
+
allDayColumn: ViewStyle;
|
|
50
|
+
};
|
|
25
51
|
/** Corner radius of the today badge. Use a large value for a circle. */
|
|
26
52
|
todayBadgeRadius: number;
|
|
27
53
|
/**
|
|
@@ -48,6 +74,7 @@ declare function mergeTheme(theme?: PartialCalendarTheme): CalendarTheme;
|
|
|
48
74
|
type PartialCalendarTheme = {
|
|
49
75
|
colors?: Partial<CalendarTheme["colors"]>;
|
|
50
76
|
text?: Partial<CalendarTheme["text"]>;
|
|
77
|
+
containers?: Partial<CalendarTheme["containers"]>;
|
|
51
78
|
todayBadgeRadius?: number;
|
|
52
79
|
rangeBandHeight?: number;
|
|
53
80
|
};
|
|
@@ -88,6 +115,12 @@ type RenderEventArgs<T = unknown> = {
|
|
|
88
115
|
ellipsizeTitle?: boolean; /** Label shown for an all-day event in the schedule (and its screen-reader text). Default "All day". */
|
|
89
116
|
allDayLabel?: string; /** Per-event style resolved from `eventCellStyle`; the built-in renderer merges it onto the box. */
|
|
90
117
|
cellStyle?: StyleProp<ViewStyle>;
|
|
118
|
+
/**
|
|
119
|
+
* Screen-reader label to announce for the event, injected by a consumer's
|
|
120
|
+
* `eventAccessibilityLabel` override. The built-in renderers use it in place of
|
|
121
|
+
* their default label; `undefined` falls back to that default.
|
|
122
|
+
*/
|
|
123
|
+
accessibilityLabel?: string;
|
|
91
124
|
onPress: () => void; /** Wired when the consumer passes `onLongPressEvent`; otherwise undefined. */
|
|
92
125
|
onLongPress?: () => void;
|
|
93
126
|
};
|
|
@@ -111,7 +144,8 @@ type MonthViewProps<T> = {
|
|
|
111
144
|
* explicit value when using a custom `renderEvent`.
|
|
112
145
|
*/
|
|
113
146
|
maxVisibleEventCount?: number;
|
|
114
|
-
weekStartsOn: WeekStartsOn;
|
|
147
|
+
weekStartsOn: WeekStartsOn; /** Weekday header label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
|
|
148
|
+
weekdayFormat?: WeekdayFormat;
|
|
115
149
|
locale?: Locale; /** Sort each day's events by start time before slicing. Default true. */
|
|
116
150
|
sortedMonthView?: boolean; /** Template for the overflow label; `{moreCount}` is replaced. Default "{moreCount} More". */
|
|
117
151
|
moreLabel?: string; /** Show dimmed days from adjacent months in the grid. Default true. */
|
|
@@ -136,6 +170,12 @@ type MonthViewProps<T> = {
|
|
|
136
170
|
onDayPointerEnter?: (date: Date) => void; /** Per-date style merged onto the day cell. */
|
|
137
171
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
138
172
|
renderEvent: RenderEvent<T>;
|
|
173
|
+
/**
|
|
174
|
+
* Override the screen-reader label for each event chip. Receives the event and a
|
|
175
|
+
* `{ mode: "month", isAllDay, ampm: false }` context; return the full text to
|
|
176
|
+
* announce. Defaults to the built-in title-and-time label.
|
|
177
|
+
*/
|
|
178
|
+
eventAccessibilityLabel?: EventAccessibilityLabeler<T>;
|
|
139
179
|
keyExtractor: EventKeyExtractor<T>;
|
|
140
180
|
onPressDay?: (date: Date) => void;
|
|
141
181
|
onLongPressDay?: (date: Date) => void;
|
|
@@ -153,6 +193,7 @@ declare function MonthViewInner<T>({
|
|
|
153
193
|
events,
|
|
154
194
|
maxVisibleEventCount,
|
|
155
195
|
weekStartsOn,
|
|
196
|
+
weekdayFormat,
|
|
156
197
|
locale,
|
|
157
198
|
sortedMonthView,
|
|
158
199
|
moreLabel,
|
|
@@ -171,6 +212,7 @@ declare function MonthViewInner<T>({
|
|
|
171
212
|
isDateDisabled: isDateDisabledProp,
|
|
172
213
|
calendarCellStyle,
|
|
173
214
|
renderEvent,
|
|
215
|
+
eventAccessibilityLabel,
|
|
174
216
|
keyExtractor,
|
|
175
217
|
onPressDay,
|
|
176
218
|
onLongPressDay,
|
|
@@ -206,6 +248,7 @@ type MonthPagerProps<T> = {
|
|
|
206
248
|
events: CalendarEvent$1<T>[];
|
|
207
249
|
maxVisibleEventCount?: number;
|
|
208
250
|
weekStartsOn: WeekStartsOn;
|
|
251
|
+
weekdayFormat?: WeekdayFormat;
|
|
209
252
|
locale?: Locale;
|
|
210
253
|
sortedMonthView?: boolean;
|
|
211
254
|
moreLabel?: string;
|
|
@@ -233,6 +276,7 @@ declare function MonthPagerInner<T>({
|
|
|
233
276
|
events,
|
|
234
277
|
maxVisibleEventCount,
|
|
235
278
|
weekStartsOn,
|
|
279
|
+
weekdayFormat,
|
|
236
280
|
locale,
|
|
237
281
|
sortedMonthView,
|
|
238
282
|
moreLabel,
|
|
@@ -280,7 +324,8 @@ declare const MonthPager: typeof MonthPagerInner;
|
|
|
280
324
|
type MonthListProps<T> = {
|
|
281
325
|
/** The month scrolled to on mount. */date: Date; /** Events to render in the grids. Omit for an events-free date picker. */
|
|
282
326
|
events?: CalendarEvent$1<T>[];
|
|
283
|
-
weekStartsOn: WeekStartsOn;
|
|
327
|
+
weekStartsOn: WeekStartsOn; /** Weekday header label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
|
|
328
|
+
weekdayFormat?: WeekdayFormat;
|
|
284
329
|
/**
|
|
285
330
|
* Height of each week row (px). The month block sizes to its row count. Defaults
|
|
286
331
|
* to a taller row when `events` are shown (so a day fits ~3 chips) and a compact
|
|
@@ -307,7 +352,13 @@ type MonthListProps<T> = {
|
|
|
307
352
|
maxDate?: Date;
|
|
308
353
|
isDateDisabled?: (date: Date) => boolean;
|
|
309
354
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>; /** Replace the built-in event box. Defaults to `DefaultEvent`. */
|
|
310
|
-
renderEvent?: RenderEvent<T>;
|
|
355
|
+
renderEvent?: RenderEvent<T>;
|
|
356
|
+
/**
|
|
357
|
+
* Override the screen-reader label for each event chip. Receives the event and a
|
|
358
|
+
* `{ mode: "month", isAllDay, ampm: false }` context; return the full text to
|
|
359
|
+
* announce. Defaults to the built-in title-and-time label.
|
|
360
|
+
*/
|
|
361
|
+
eventAccessibilityLabel?: EventAccessibilityLabeler<T>; /** Stable key per event. Defaults to start-time + index. */
|
|
311
362
|
keyExtractor?: EventKeyExtractor<T>;
|
|
312
363
|
onPressDay?: (date: Date) => void;
|
|
313
364
|
onLongPressDay?: (date: Date) => void;
|
|
@@ -327,6 +378,7 @@ declare function MonthListInner<T>({
|
|
|
327
378
|
date,
|
|
328
379
|
events,
|
|
329
380
|
weekStartsOn,
|
|
381
|
+
weekdayFormat,
|
|
330
382
|
weekRowHeight: weekRowHeightProp,
|
|
331
383
|
monthHeaderHeight,
|
|
332
384
|
maxVisibleEventCount,
|
|
@@ -345,6 +397,7 @@ declare function MonthListInner<T>({
|
|
|
345
397
|
isDateDisabled,
|
|
346
398
|
calendarCellStyle,
|
|
347
399
|
renderEvent,
|
|
400
|
+
eventAccessibilityLabel,
|
|
348
401
|
keyExtractor,
|
|
349
402
|
onPressDay,
|
|
350
403
|
onLongPressDay,
|
|
@@ -391,9 +444,10 @@ declare function DefaultMonthEvent<T>({
|
|
|
391
444
|
showTime,
|
|
392
445
|
ellipsizeTitle,
|
|
393
446
|
allDayLabel,
|
|
447
|
+
accessibilityLabel: accessibilityLabelProp,
|
|
394
448
|
cellStyle,
|
|
395
449
|
onPress,
|
|
396
450
|
onLongPress
|
|
397
451
|
}: RenderEventArgs<T>): ReactElement;
|
|
398
452
|
//#endregion
|
|
399
|
-
export {
|
|
453
|
+
export { CalendarThemeProvider as C, mergeTheme as D, defaultTheme as E, useCalendarTheme as O, CalendarTheme as S, darkTheme as T, RenderEvent as _, MonthPagerProps as a, WeekStartsOn as b, BusinessHours as c, EventAccessibilityLabelContext as d, EventAccessibilityLabeler$1 as f, RecurrenceRule as g, RecurrenceFrequency as h, MonthPager as i, CalendarEvent$1 as l, ICalendarEvent as m, MonthList as n, MonthView as o, EventKeyExtractor as p, MonthListProps as r, MonthViewProps as s, DefaultMonthEvent as t, CalendarMode$1 as u, RenderEventArgs as v, PartialCalendarTheme as w, WeekdayFormat$1 as x, TimeGridMode as y };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
2
|
import { ComponentType, ReactElement } from "react";
|
|
3
|
-
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
4
3
|
import { SharedValue } from "react-native-reanimated";
|
|
5
|
-
import { BusinessHours, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, EventKeyExtractor, ICalendarEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, WeekStartsOn } from "@super-calendar/core";
|
|
4
|
+
import { BusinessHours, CalendarColors, CalendarEvent, CalendarEvent as CalendarEvent$1, CalendarMode, CalendarMode as CalendarMode$1, DateRange, EventAccessibilityLabelContext, EventAccessibilityLabeler, EventAccessibilityLabeler as EventAccessibilityLabeler$1, EventKeyExtractor, ICalendarEvent, RecurrenceFrequency, RecurrenceRule, TimeGridMode, WeekStartsOn, WeekdayFormat, WeekdayFormat as WeekdayFormat$1 } from "@super-calendar/core";
|
|
5
|
+
import { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
6
6
|
|
|
7
7
|
//#region src/theme.d.ts
|
|
8
8
|
/**
|
|
@@ -15,13 +15,39 @@ interface CalendarTheme {
|
|
|
15
15
|
colors: CalendarColors;
|
|
16
16
|
/** Text styles for the calendar's labels and the built-in event box. */
|
|
17
17
|
text: {
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/** The day number in a time-grid (week/day) column header. */dayNumber: TextStyle; /** The weekday label ("Mon") in a time-grid column header. */
|
|
19
|
+
columnHeaderWeekday: TextStyle; /** Short weekday label ("Mon") in the month grid's header row. */
|
|
20
|
+
weekday: TextStyle; /** The "MMMM yyyy" month title above the month grid. */
|
|
21
|
+
monthTitle: TextStyle; /** Date number inside a month cell. */
|
|
20
22
|
dateCell: TextStyle; /** Hour labels down the left of the time grid. */
|
|
21
23
|
hourLabel: TextStyle; /** The "+N more" overflow label in month cells. */
|
|
22
24
|
more: TextStyle; /** Title inside the built-in default event box. */
|
|
23
25
|
eventTitle: TextStyle;
|
|
24
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Per-part `ViewStyle` overrides for the renderer's container elements, the
|
|
29
|
+
* React Native counterpart of the web renderer's per-slot classes. Each is
|
|
30
|
+
* merged onto the built-in style, so you override only what you set. (Rolling
|
|
31
|
+
* out across the views; more slots as they land.)
|
|
32
|
+
*/
|
|
33
|
+
containers: {
|
|
34
|
+
/** The month view's outer container (title + weekday header + grid). */monthContainer: ViewStyle; /** The weekday-label header row above a month grid. */
|
|
35
|
+
weekdayHeader: ViewStyle; /** Each week (row of 7 day cells) in the month grid. */
|
|
36
|
+
weekRow: ViewStyle; /** Each day cell in the month grid. */
|
|
37
|
+
dayCell: ViewStyle; /** The date badge (the circle) inside a month day cell. */
|
|
38
|
+
dayBadge: ViewStyle; /** An event chip inside a month day cell. */
|
|
39
|
+
monthEvent: ViewStyle; /** Each day's column header in the time grid. */
|
|
40
|
+
columnHeader: ViewStyle; /** The day-number badge (the circle) inside a time-grid column header. */
|
|
41
|
+
columnHeaderBadge: ViewStyle; /** A timed event's positioned box in the time grid (and resource timeline). */
|
|
42
|
+
timeGridEvent: ViewStyle; /** The current-time indicator line. */
|
|
43
|
+
nowIndicator: ViewStyle; /** Each resource row in the resource timeline. */
|
|
44
|
+
resourceRow: ViewStyle; /** The left-hand resource-label cell in the resource timeline. */
|
|
45
|
+
resourceLabel: ViewStyle; /** The schedule/agenda list's outer container. */
|
|
46
|
+
agendaList: ViewStyle; /** Each event row in the agenda list. */
|
|
47
|
+
agendaRow: ViewStyle; /** The all-day lane above the time grid. */
|
|
48
|
+
allDayLane: ViewStyle; /** Each day's column within the all-day lane. */
|
|
49
|
+
allDayColumn: ViewStyle;
|
|
50
|
+
};
|
|
25
51
|
/** Corner radius of the today badge. Use a large value for a circle. */
|
|
26
52
|
todayBadgeRadius: number;
|
|
27
53
|
/**
|
|
@@ -48,6 +74,7 @@ declare function mergeTheme(theme?: PartialCalendarTheme): CalendarTheme;
|
|
|
48
74
|
type PartialCalendarTheme = {
|
|
49
75
|
colors?: Partial<CalendarTheme["colors"]>;
|
|
50
76
|
text?: Partial<CalendarTheme["text"]>;
|
|
77
|
+
containers?: Partial<CalendarTheme["containers"]>;
|
|
51
78
|
todayBadgeRadius?: number;
|
|
52
79
|
rangeBandHeight?: number;
|
|
53
80
|
};
|
|
@@ -88,6 +115,12 @@ type RenderEventArgs<T = unknown> = {
|
|
|
88
115
|
ellipsizeTitle?: boolean; /** Label shown for an all-day event in the schedule (and its screen-reader text). Default "All day". */
|
|
89
116
|
allDayLabel?: string; /** Per-event style resolved from `eventCellStyle`; the built-in renderer merges it onto the box. */
|
|
90
117
|
cellStyle?: StyleProp<ViewStyle>;
|
|
118
|
+
/**
|
|
119
|
+
* Screen-reader label to announce for the event, injected by a consumer's
|
|
120
|
+
* `eventAccessibilityLabel` override. The built-in renderers use it in place of
|
|
121
|
+
* their default label; `undefined` falls back to that default.
|
|
122
|
+
*/
|
|
123
|
+
accessibilityLabel?: string;
|
|
91
124
|
onPress: () => void; /** Wired when the consumer passes `onLongPressEvent`; otherwise undefined. */
|
|
92
125
|
onLongPress?: () => void;
|
|
93
126
|
};
|
|
@@ -111,7 +144,8 @@ type MonthViewProps<T> = {
|
|
|
111
144
|
* explicit value when using a custom `renderEvent`.
|
|
112
145
|
*/
|
|
113
146
|
maxVisibleEventCount?: number;
|
|
114
|
-
weekStartsOn: WeekStartsOn;
|
|
147
|
+
weekStartsOn: WeekStartsOn; /** Weekday header label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
|
|
148
|
+
weekdayFormat?: WeekdayFormat;
|
|
115
149
|
locale?: Locale; /** Sort each day's events by start time before slicing. Default true. */
|
|
116
150
|
sortedMonthView?: boolean; /** Template for the overflow label; `{moreCount}` is replaced. Default "{moreCount} More". */
|
|
117
151
|
moreLabel?: string; /** Show dimmed days from adjacent months in the grid. Default true. */
|
|
@@ -136,6 +170,12 @@ type MonthViewProps<T> = {
|
|
|
136
170
|
onDayPointerEnter?: (date: Date) => void; /** Per-date style merged onto the day cell. */
|
|
137
171
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
138
172
|
renderEvent: RenderEvent<T>;
|
|
173
|
+
/**
|
|
174
|
+
* Override the screen-reader label for each event chip. Receives the event and a
|
|
175
|
+
* `{ mode: "month", isAllDay, ampm: false }` context; return the full text to
|
|
176
|
+
* announce. Defaults to the built-in title-and-time label.
|
|
177
|
+
*/
|
|
178
|
+
eventAccessibilityLabel?: EventAccessibilityLabeler<T>;
|
|
139
179
|
keyExtractor: EventKeyExtractor<T>;
|
|
140
180
|
onPressDay?: (date: Date) => void;
|
|
141
181
|
onLongPressDay?: (date: Date) => void;
|
|
@@ -153,6 +193,7 @@ declare function MonthViewInner<T>({
|
|
|
153
193
|
events,
|
|
154
194
|
maxVisibleEventCount,
|
|
155
195
|
weekStartsOn,
|
|
196
|
+
weekdayFormat,
|
|
156
197
|
locale,
|
|
157
198
|
sortedMonthView,
|
|
158
199
|
moreLabel,
|
|
@@ -171,6 +212,7 @@ declare function MonthViewInner<T>({
|
|
|
171
212
|
isDateDisabled: isDateDisabledProp,
|
|
172
213
|
calendarCellStyle,
|
|
173
214
|
renderEvent,
|
|
215
|
+
eventAccessibilityLabel,
|
|
174
216
|
keyExtractor,
|
|
175
217
|
onPressDay,
|
|
176
218
|
onLongPressDay,
|
|
@@ -206,6 +248,7 @@ type MonthPagerProps<T> = {
|
|
|
206
248
|
events: CalendarEvent$1<T>[];
|
|
207
249
|
maxVisibleEventCount?: number;
|
|
208
250
|
weekStartsOn: WeekStartsOn;
|
|
251
|
+
weekdayFormat?: WeekdayFormat;
|
|
209
252
|
locale?: Locale;
|
|
210
253
|
sortedMonthView?: boolean;
|
|
211
254
|
moreLabel?: string;
|
|
@@ -233,6 +276,7 @@ declare function MonthPagerInner<T>({
|
|
|
233
276
|
events,
|
|
234
277
|
maxVisibleEventCount,
|
|
235
278
|
weekStartsOn,
|
|
279
|
+
weekdayFormat,
|
|
236
280
|
locale,
|
|
237
281
|
sortedMonthView,
|
|
238
282
|
moreLabel,
|
|
@@ -280,7 +324,8 @@ declare const MonthPager: typeof MonthPagerInner;
|
|
|
280
324
|
type MonthListProps<T> = {
|
|
281
325
|
/** The month scrolled to on mount. */date: Date; /** Events to render in the grids. Omit for an events-free date picker. */
|
|
282
326
|
events?: CalendarEvent$1<T>[];
|
|
283
|
-
weekStartsOn: WeekStartsOn;
|
|
327
|
+
weekStartsOn: WeekStartsOn; /** Weekday header label width: `narrow` ("M"), `short` ("Mon", default), or `long` ("Monday"). */
|
|
328
|
+
weekdayFormat?: WeekdayFormat;
|
|
284
329
|
/**
|
|
285
330
|
* Height of each week row (px). The month block sizes to its row count. Defaults
|
|
286
331
|
* to a taller row when `events` are shown (so a day fits ~3 chips) and a compact
|
|
@@ -307,7 +352,13 @@ type MonthListProps<T> = {
|
|
|
307
352
|
maxDate?: Date;
|
|
308
353
|
isDateDisabled?: (date: Date) => boolean;
|
|
309
354
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>; /** Replace the built-in event box. Defaults to `DefaultEvent`. */
|
|
310
|
-
renderEvent?: RenderEvent<T>;
|
|
355
|
+
renderEvent?: RenderEvent<T>;
|
|
356
|
+
/**
|
|
357
|
+
* Override the screen-reader label for each event chip. Receives the event and a
|
|
358
|
+
* `{ mode: "month", isAllDay, ampm: false }` context; return the full text to
|
|
359
|
+
* announce. Defaults to the built-in title-and-time label.
|
|
360
|
+
*/
|
|
361
|
+
eventAccessibilityLabel?: EventAccessibilityLabeler<T>; /** Stable key per event. Defaults to start-time + index. */
|
|
311
362
|
keyExtractor?: EventKeyExtractor<T>;
|
|
312
363
|
onPressDay?: (date: Date) => void;
|
|
313
364
|
onLongPressDay?: (date: Date) => void;
|
|
@@ -327,6 +378,7 @@ declare function MonthListInner<T>({
|
|
|
327
378
|
date,
|
|
328
379
|
events,
|
|
329
380
|
weekStartsOn,
|
|
381
|
+
weekdayFormat,
|
|
330
382
|
weekRowHeight: weekRowHeightProp,
|
|
331
383
|
monthHeaderHeight,
|
|
332
384
|
maxVisibleEventCount,
|
|
@@ -345,6 +397,7 @@ declare function MonthListInner<T>({
|
|
|
345
397
|
isDateDisabled,
|
|
346
398
|
calendarCellStyle,
|
|
347
399
|
renderEvent,
|
|
400
|
+
eventAccessibilityLabel,
|
|
348
401
|
keyExtractor,
|
|
349
402
|
onPressDay,
|
|
350
403
|
onLongPressDay,
|
|
@@ -391,9 +444,10 @@ declare function DefaultMonthEvent<T>({
|
|
|
391
444
|
showTime,
|
|
392
445
|
ellipsizeTitle,
|
|
393
446
|
allDayLabel,
|
|
447
|
+
accessibilityLabel: accessibilityLabelProp,
|
|
394
448
|
cellStyle,
|
|
395
449
|
onPress,
|
|
396
450
|
onLongPress
|
|
397
451
|
}: RenderEventArgs<T>): ReactElement;
|
|
398
452
|
//#endregion
|
|
399
|
-
export {
|
|
453
|
+
export { CalendarThemeProvider as C, mergeTheme as D, defaultTheme as E, useCalendarTheme as O, CalendarTheme as S, darkTheme as T, RenderEvent as _, MonthPagerProps as a, WeekStartsOn as b, BusinessHours as c, EventAccessibilityLabelContext as d, EventAccessibilityLabeler$1 as f, RecurrenceRule as g, RecurrenceFrequency as h, MonthPager as i, CalendarEvent$1 as l, ICalendarEvent as m, MonthList as n, MonthView as o, EventKeyExtractor as p, MonthListProps as r, MonthViewProps as s, DefaultMonthEvent as t, CalendarMode$1 as u, RenderEventArgs as v, PartialCalendarTheme as w, WeekdayFormat$1 as x, TimeGridMode as y };
|