@super-calendar/native 2.8.0 → 2.8.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/{DefaultMonthEvent-Cm9DsHBK.d.mts → DefaultMonthEvent-CjwX3Nt1.d.ts} +9 -4
- package/dist/{DefaultMonthEvent-DAxZjk_D.d.ts → DefaultMonthEvent-VgJarTO_.d.mts} +9 -4
- package/dist/{MonthList-BWTCCmko.js → MonthList-C-vBotP0.js} +6 -4
- package/dist/{MonthList-Chx0jP5n.mjs → MonthList-DjAz4xoi.mjs} +6 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- 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/Calendar.tsx +1 -0
- package/src/components/MonthList.tsx +4 -0
- package/src/components/MonthPager.tsx +3 -0
- package/src/components/MonthView.tsx +4 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
2
|
import { ComponentType, ReactElement, ReactNode } from "react";
|
|
3
|
+
import { AccessibilityActionEvent, AccessibilityActionInfo, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
4
|
import { SharedValue } from "react-native-reanimated";
|
|
4
5
|
import { BusinessHours, BusinessHoursBand as BusinessHoursBand$1, 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 { AccessibilityActionEvent, AccessibilityActionInfo, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
6
6
|
//#region src/theme.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The full set of colours, text styles and metrics the calendar paints with.
|
|
@@ -235,6 +235,8 @@ type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
235
235
|
moreLabel?: string;
|
|
236
236
|
/** Show dimmed days from adjacent months in the grid. Default true. */
|
|
237
237
|
showAdjacentMonths?: boolean;
|
|
238
|
+
/** Tint weekend day cells with the theme's weekend background. Default true. */
|
|
239
|
+
highlightWeekends?: boolean;
|
|
238
240
|
/** Ignore taps on month-cell events (day-cell taps still fire). Default false. */
|
|
239
241
|
disableMonthEventCellPress?: boolean;
|
|
240
242
|
/** Reverse the day order within each week (right-to-left). Default false. */
|
|
@@ -287,7 +289,7 @@ type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
287
289
|
*/
|
|
288
290
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
289
291
|
};
|
|
290
|
-
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
292
|
+
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
291
293
|
/**
|
|
292
294
|
* A single month rendered as a 7-column grid of day cells, each showing its
|
|
293
295
|
* event chips with a "+N more" overflow. Render it on its own for a static
|
|
@@ -320,6 +322,7 @@ type MonthPagerProps<T> = {
|
|
|
320
322
|
sortedMonthView?: boolean;
|
|
321
323
|
moreLabel?: string;
|
|
322
324
|
showAdjacentMonths?: boolean;
|
|
325
|
+
highlightWeekends?: boolean;
|
|
323
326
|
disableMonthEventCellPress?: boolean;
|
|
324
327
|
isRTL?: boolean;
|
|
325
328
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
@@ -340,7 +343,7 @@ type MonthPagerProps<T> = {
|
|
|
340
343
|
/** Replace the default date badge in each day cell. Receives the day. */
|
|
341
344
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
342
345
|
} & SlotStyleProps<MonthViewSlot>;
|
|
343
|
-
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
346
|
+
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
344
347
|
/**
|
|
345
348
|
* A horizontally swipeable month carousel. Swipe left/right to page between
|
|
346
349
|
* months; the committed month is reported through `onChangeDate`. It is the
|
|
@@ -390,6 +393,8 @@ type MonthListProps<T> = {
|
|
|
390
393
|
moreLabel?: string;
|
|
391
394
|
/** Show dimmed adjacent-month days. Default false (each month shows only its own days). */
|
|
392
395
|
showAdjacentMonths?: boolean;
|
|
396
|
+
/** Tint weekend day cells with the theme's weekend background. Default true. */
|
|
397
|
+
highlightWeekends?: boolean;
|
|
393
398
|
disableMonthEventCellPress?: boolean;
|
|
394
399
|
isRTL?: boolean;
|
|
395
400
|
activeDate?: Date;
|
|
@@ -427,7 +432,7 @@ type MonthListProps<T> = {
|
|
|
427
432
|
/** Replace the per-month title (default "LLLL yyyy"). */
|
|
428
433
|
renderMonthHeader?: (month: Date) => React.ReactNode;
|
|
429
434
|
} & SlotStyleProps<MonthListSlot>;
|
|
430
|
-
declare function MonthListInner<T>({ date, events, weekStartsOn, weekdayFormat, weekRowHeight: weekRowHeightProp, monthHeaderHeight, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, activeDate, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onSelectDrag, onChangeVisibleMonth, renderMonthHeader, classNames, styles: styleOverrides }: MonthListProps<T>): ReactElement;
|
|
435
|
+
declare function MonthListInner<T>({ date, events, weekStartsOn, weekdayFormat, weekRowHeight: weekRowHeightProp, monthHeaderHeight, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, activeDate, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onSelectDrag, onChangeVisibleMonth, renderMonthHeader, classNames, styles: styleOverrides }: MonthListProps<T>): ReactElement;
|
|
431
436
|
/**
|
|
432
437
|
* A vertically scrolling, virtualized list of month grids. It doubles as the
|
|
433
438
|
* date picker: pass `selectedRange`/`selectedDates` and selection handlers to
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Locale } from "date-fns";
|
|
2
2
|
import { ComponentType, ReactElement, ReactNode } from "react";
|
|
3
|
-
import { AccessibilityActionEvent, AccessibilityActionInfo, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
4
3
|
import { SharedValue } from "react-native-reanimated";
|
|
5
4
|
import { BusinessHours, BusinessHoursBand as BusinessHoursBand$1, 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 { AccessibilityActionEvent, AccessibilityActionInfo, StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
6
6
|
//#region src/theme.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The full set of colours, text styles and metrics the calendar paints with.
|
|
@@ -235,6 +235,8 @@ type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
235
235
|
moreLabel?: string;
|
|
236
236
|
/** Show dimmed days from adjacent months in the grid. Default true. */
|
|
237
237
|
showAdjacentMonths?: boolean;
|
|
238
|
+
/** Tint weekend day cells with the theme's weekend background. Default true. */
|
|
239
|
+
highlightWeekends?: boolean;
|
|
238
240
|
/** Ignore taps on month-cell events (day-cell taps still fire). Default false. */
|
|
239
241
|
disableMonthEventCellPress?: boolean;
|
|
240
242
|
/** Reverse the day order within each week (right-to-left). Default false. */
|
|
@@ -287,7 +289,7 @@ type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
287
289
|
*/
|
|
288
290
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
289
291
|
};
|
|
290
|
-
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
292
|
+
declare function MonthViewInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, showSixWeeks, showTitle, showWeekdays, activeDate, selectedDates: selectedDatesProp, selectedRange: selectedRangeProp, fillCellOnSelection, minDate: minDateProp, maxDate: maxDateProp, isDateDisabled: isDateDisabledProp, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }: MonthViewProps<T>): ReactElement;
|
|
291
293
|
/**
|
|
292
294
|
* A single month rendered as a 7-column grid of day cells, each showing its
|
|
293
295
|
* event chips with a "+N more" overflow. Render it on its own for a static
|
|
@@ -320,6 +322,7 @@ type MonthPagerProps<T> = {
|
|
|
320
322
|
sortedMonthView?: boolean;
|
|
321
323
|
moreLabel?: string;
|
|
322
324
|
showAdjacentMonths?: boolean;
|
|
325
|
+
highlightWeekends?: boolean;
|
|
323
326
|
disableMonthEventCellPress?: boolean;
|
|
324
327
|
isRTL?: boolean;
|
|
325
328
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
@@ -340,7 +343,7 @@ type MonthPagerProps<T> = {
|
|
|
340
343
|
/** Replace the default date badge in each day cell. Receives the day. */
|
|
341
344
|
renderCustomDateForMonth?: (date: Date) => React.ReactNode;
|
|
342
345
|
} & SlotStyleProps<MonthViewSlot>;
|
|
343
|
-
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
346
|
+
declare function MonthPagerInner<T>({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe, swipeEnabled, showSixWeeks, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }: MonthPagerProps<T>): ReactElement;
|
|
344
347
|
/**
|
|
345
348
|
* A horizontally swipeable month carousel. Swipe left/right to page between
|
|
346
349
|
* months; the committed month is reported through `onChangeDate`. It is the
|
|
@@ -390,6 +393,8 @@ type MonthListProps<T> = {
|
|
|
390
393
|
moreLabel?: string;
|
|
391
394
|
/** Show dimmed adjacent-month days. Default false (each month shows only its own days). */
|
|
392
395
|
showAdjacentMonths?: boolean;
|
|
396
|
+
/** Tint weekend day cells with the theme's weekend background. Default true. */
|
|
397
|
+
highlightWeekends?: boolean;
|
|
393
398
|
disableMonthEventCellPress?: boolean;
|
|
394
399
|
isRTL?: boolean;
|
|
395
400
|
activeDate?: Date;
|
|
@@ -427,7 +432,7 @@ type MonthListProps<T> = {
|
|
|
427
432
|
/** Replace the per-month title (default "LLLL yyyy"). */
|
|
428
433
|
renderMonthHeader?: (month: Date) => React.ReactNode;
|
|
429
434
|
} & SlotStyleProps<MonthListSlot>;
|
|
430
|
-
declare function MonthListInner<T>({ date, events, weekStartsOn, weekdayFormat, weekRowHeight: weekRowHeightProp, monthHeaderHeight, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, activeDate, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onSelectDrag, onChangeVisibleMonth, renderMonthHeader, classNames, styles: styleOverrides }: MonthListProps<T>): ReactElement;
|
|
435
|
+
declare function MonthListInner<T>({ date, events, weekStartsOn, weekdayFormat, weekRowHeight: weekRowHeightProp, monthHeaderHeight, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, activeDate, selectedDates, selectedRange, fillCellOnSelection, minDate, maxDate, isDateDisabled, calendarCellStyle, renderEvent, eventAccessibilityLabel, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onSelectDrag, onChangeVisibleMonth, renderMonthHeader, classNames, styles: styleOverrides }: MonthListProps<T>): ReactElement;
|
|
431
436
|
/**
|
|
432
437
|
* A vertically scrolling, virtualized list of month grids. It doubles as the
|
|
433
438
|
* date picker: pass `selectedRange`/`selectedDates` and selection handlers to
|
|
@@ -222,7 +222,7 @@ function collectRowEvents(week, eventsByDay) {
|
|
|
222
222
|
return out;
|
|
223
223
|
}
|
|
224
224
|
const pct = (n) => `${n}%`;
|
|
225
|
-
function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView = true, moreLabel = "{moreCount} More", showAdjacentMonths = 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, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }) {
|
|
225
|
+
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, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }) {
|
|
226
226
|
const theme = useCalendarTheme();
|
|
227
227
|
const slot = createSlots({
|
|
228
228
|
classNames,
|
|
@@ -341,7 +341,7 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
|
|
|
341
341
|
borderRightWidth: react_native.StyleSheet.hairlineWidth,
|
|
342
342
|
borderColor: theme.colors.gridLine
|
|
343
343
|
},
|
|
344
|
-
(0, _super_calendar_core.isWeekend)(day) && { backgroundColor: theme.colors.weekendBackground },
|
|
344
|
+
highlightWeekends && (0, _super_calendar_core.isWeekend)(day) && { backgroundColor: theme.colors.weekendBackground },
|
|
345
345
|
theme.containers.dayCell
|
|
346
346
|
]
|
|
347
347
|
});
|
|
@@ -658,7 +658,7 @@ const styles$3 = react_native.StyleSheet.create({
|
|
|
658
658
|
const isWeb$1 = react_native.Platform.OS === "web";
|
|
659
659
|
const PAGE_WINDOW$1 = 60;
|
|
660
660
|
const PAGE_VIEWABILITY = { itemVisiblePercentThreshold: 90 };
|
|
661
|
-
function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe = false, swipeEnabled = true, showSixWeeks = false, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }) {
|
|
661
|
+
function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe = false, swipeEnabled = true, showSixWeeks = false, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }) {
|
|
662
662
|
const theme = useCalendarTheme();
|
|
663
663
|
const slot = (0, react.useMemo)(() => createSlots({
|
|
664
664
|
classNames,
|
|
@@ -756,6 +756,7 @@ function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hid
|
|
|
756
756
|
sortedMonthView,
|
|
757
757
|
moreLabel,
|
|
758
758
|
showAdjacentMonths,
|
|
759
|
+
highlightWeekends,
|
|
759
760
|
disableMonthEventCellPress,
|
|
760
761
|
isRTL,
|
|
761
762
|
showSixWeeks,
|
|
@@ -992,7 +993,7 @@ const AUTOSCROLL_INTERVAL_MS = 16;
|
|
|
992
993
|
const NO_EVENTS = [];
|
|
993
994
|
const noop = () => {};
|
|
994
995
|
const defaultKeyExtractor = (event) => `${event.start.toISOString()}|${event.end.toISOString()}|${event.title ?? ""}`;
|
|
995
|
-
function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat = "short", weekRowHeight: weekRowHeightProp, monthHeaderHeight = DEFAULT_MONTH_HEADER_HEIGHT, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths = false, 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 }) {
|
|
996
|
+
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 }) {
|
|
996
997
|
const theme = useCalendarTheme();
|
|
997
998
|
const slot = (0, react.useMemo)(() => createSlots({
|
|
998
999
|
classNames,
|
|
@@ -1223,6 +1224,7 @@ function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat
|
|
|
1223
1224
|
sortedMonthView,
|
|
1224
1225
|
moreLabel,
|
|
1225
1226
|
showAdjacentMonths,
|
|
1227
|
+
highlightWeekends,
|
|
1226
1228
|
disableMonthEventCellPress,
|
|
1227
1229
|
isRTL,
|
|
1228
1230
|
activeDate,
|
|
@@ -222,7 +222,7 @@ function collectRowEvents(week, eventsByDay) {
|
|
|
222
222
|
return out;
|
|
223
223
|
}
|
|
224
224
|
const pct = (n) => `${n}%`;
|
|
225
|
-
function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView = true, moreLabel = "{moreCount} More", showAdjacentMonths = 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, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }) {
|
|
225
|
+
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, onPressEvent, onLongPressEvent, onPressMore, renderCustomDateForMonth, onDayPointerDown, onDayPointerEnter, classNames, styles: styleOverrides }) {
|
|
226
226
|
const theme = useCalendarTheme();
|
|
227
227
|
const slot = createSlots({
|
|
228
228
|
classNames,
|
|
@@ -341,7 +341,7 @@ function MonthViewInner({ date, events, maxVisibleEventCount, weekStartsOn, hidd
|
|
|
341
341
|
borderRightWidth: StyleSheet.hairlineWidth,
|
|
342
342
|
borderColor: theme.colors.gridLine
|
|
343
343
|
},
|
|
344
|
-
isWeekend(day) && { backgroundColor: theme.colors.weekendBackground },
|
|
344
|
+
highlightWeekends && isWeekend(day) && { backgroundColor: theme.colors.weekendBackground },
|
|
345
345
|
theme.containers.dayCell
|
|
346
346
|
]
|
|
347
347
|
});
|
|
@@ -658,7 +658,7 @@ const styles$3 = StyleSheet.create({
|
|
|
658
658
|
const isWeb$1 = Platform.OS === "web";
|
|
659
659
|
const PAGE_WINDOW$1 = 60;
|
|
660
660
|
const PAGE_VIEWABILITY = { itemVisiblePercentThreshold: 90 };
|
|
661
|
-
function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView, moreLabel, showAdjacentMonths, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe = false, swipeEnabled = true, showSixWeeks = false, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }) {
|
|
661
|
+
function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hiddenDays, weekdayFormat = "short", locale, sortedMonthView, moreLabel, showAdjacentMonths, highlightWeekends, disableMonthEventCellPress, isRTL, calendarCellStyle, renderEvent, keyExtractor, onPressDay, onLongPressDay, onPressEvent, onLongPressEvent, onPressMore, onChangeDate, freeSwipe = false, swipeEnabled = true, showSixWeeks = false, activeDate, renderHeaderForMonthView, renderCustomDateForMonth, classNames, styles: styleOverrides }) {
|
|
662
662
|
const theme = useCalendarTheme();
|
|
663
663
|
const slot = useMemo(() => createSlots({
|
|
664
664
|
classNames,
|
|
@@ -756,6 +756,7 @@ function MonthPagerInner({ date, events, maxVisibleEventCount, weekStartsOn, hid
|
|
|
756
756
|
sortedMonthView,
|
|
757
757
|
moreLabel,
|
|
758
758
|
showAdjacentMonths,
|
|
759
|
+
highlightWeekends,
|
|
759
760
|
disableMonthEventCellPress,
|
|
760
761
|
isRTL,
|
|
761
762
|
showSixWeeks,
|
|
@@ -992,7 +993,7 @@ const AUTOSCROLL_INTERVAL_MS = 16;
|
|
|
992
993
|
const NO_EVENTS = [];
|
|
993
994
|
const noop = () => {};
|
|
994
995
|
const defaultKeyExtractor = (event) => `${event.start.toISOString()}|${event.end.toISOString()}|${event.title ?? ""}`;
|
|
995
|
-
function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat = "short", weekRowHeight: weekRowHeightProp, monthHeaderHeight = DEFAULT_MONTH_HEADER_HEIGHT, maxVisibleEventCount, locale, sortedMonthView, moreLabel, showAdjacentMonths = false, 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 }) {
|
|
996
|
+
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 }) {
|
|
996
997
|
const theme = useCalendarTheme();
|
|
997
998
|
const slot = useMemo(() => createSlots({
|
|
998
999
|
classNames,
|
|
@@ -1223,6 +1224,7 @@ function MonthListInner({ date, events = NO_EVENTS, weekStartsOn, weekdayFormat
|
|
|
1223
1224
|
sortedMonthView,
|
|
1224
1225
|
moreLabel,
|
|
1225
1226
|
showAdjacentMonths,
|
|
1227
|
+
highlightWeekends,
|
|
1226
1228
|
disableMonthEventCellPress,
|
|
1227
1229
|
isRTL,
|
|
1228
1230
|
activeDate,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-
|
|
1
|
+
import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-VgJarTO_.mjs";
|
|
2
2
|
import { Locale } from "date-fns";
|
|
3
3
|
import { ComponentType, ReactElement, ReactNode } from "react";
|
|
4
4
|
import { SharedValue, useSharedValue } from "react-native-reanimated";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-
|
|
1
|
+
import { A as PartialCalendarTheme, C as RenderEvent, D as WeekdayFormat, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, S as RecurrenceRule, T as TimeGridMode, _ as EventAccessibilityLabelContext, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, d as SlotDefault, f as SlotStyleProps, g as CalendarMode, h as CalendarEvent, i as MonthListSlot, j as darkTheme, k as CalendarThemeProvider, l as MonthViewSlot, m as BusinessHoursBand, n as MonthList, o as MonthPagerProps, p as BusinessHours, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, u as ResolvedSlot, v as EventAccessibilityLabeler, w as RenderEventArgs, x as RecurrenceFrequency, y as EventKeyExtractor } from "./DefaultMonthEvent-CjwX3Nt1.js";
|
|
2
2
|
import { Locale } from "date-fns";
|
|
3
3
|
import { ComponentType, ReactElement, ReactNode } from "react";
|
|
4
4
|
import { StyleProp, ViewStyle } from "react-native";
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
|
-
const require_MonthList = require("./MonthList-
|
|
24
|
+
const require_MonthList = require("./MonthList-C-vBotP0.js");
|
|
25
25
|
let date_fns = require("date-fns");
|
|
26
26
|
let react = require("react");
|
|
27
27
|
let react_native_reanimated = require("react-native-reanimated");
|
|
@@ -2254,6 +2254,7 @@ function Calendar({ events, mode, date, onChangeDate, onChangeDateRange, onPress
|
|
|
2254
2254
|
sortedMonthView,
|
|
2255
2255
|
moreLabel,
|
|
2256
2256
|
showAdjacentMonths,
|
|
2257
|
+
highlightWeekends,
|
|
2257
2258
|
disableMonthEventCellPress,
|
|
2258
2259
|
isRTL,
|
|
2259
2260
|
showSixWeeks,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as withEventAccessibilityLabel, c as createSlots, d as darkTheme, f as defaultTheme, i as MonthView, l as useSlots, m as useCalendarTheme, n as DefaultMonthEvent, o as useWebPagerKeys, p as mergeTheme, r as MonthPager, s as SlotStylesProvider, t as MonthList, u as CalendarThemeProvider } from "./MonthList-
|
|
1
|
+
import { a as withEventAccessibilityLabel, c as createSlots, d as darkTheme, f as defaultTheme, i as MonthView, l as useSlots, m as useCalendarTheme, n as DefaultMonthEvent, o as useWebPagerKeys, p as mergeTheme, r as MonthPager, s as SlotStylesProvider, t as MonthList, u as CalendarThemeProvider } from "./MonthList-DjAz4xoi.mjs";
|
|
2
2
|
import { addDays, addMonths, addWeeks, differenceInCalendarDays, endOfDay, endOfMonth, endOfWeek, endOfYear, format, getHours, getISOWeek, getMinutes, isSameDay, startOfDay, startOfMonth, startOfWeek, startOfYear } from "date-fns";
|
|
3
3
|
import { createContext, memo, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import Animated, { runOnJS, scrollTo, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, useReducedMotion, useSharedValue } from "react-native-reanimated";
|
|
@@ -2230,6 +2230,7 @@ function Calendar({ events, mode, date, onChangeDate, onChangeDateRange, onPress
|
|
|
2230
2230
|
sortedMonthView,
|
|
2231
2231
|
moreLabel,
|
|
2232
2232
|
showAdjacentMonths,
|
|
2233
|
+
highlightWeekends,
|
|
2233
2234
|
disableMonthEventCellPress,
|
|
2234
2235
|
isRTL,
|
|
2235
2236
|
showSixWeeks,
|
package/dist/picker.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as PartialCalendarTheme, C as RenderEvent, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as darkTheme, k as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, w as RenderEventArgs, y as EventKeyExtractor } from "./DefaultMonthEvent-
|
|
1
|
+
import { A as PartialCalendarTheme, C as RenderEvent, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as darkTheme, k as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, w as RenderEventArgs, y as EventKeyExtractor } from "./DefaultMonthEvent-VgJarTO_.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 PartialCalendarTheme, C as RenderEvent, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as darkTheme, k as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, w as RenderEventArgs, y as EventKeyExtractor } from "./DefaultMonthEvent-
|
|
1
|
+
import { A as PartialCalendarTheme, C as RenderEvent, E as WeekStartsOn, M as defaultTheme, N as mergeTheme, O as CalendarTheme, P as useCalendarTheme, a as MonthPager, b as ICalendarEvent, c as MonthViewProps, g as CalendarMode, h as CalendarEvent, j as darkTheme, k as CalendarThemeProvider, n as MonthList, o as MonthPagerProps, r as MonthListProps, s as MonthView, t as DefaultMonthEvent, w as RenderEventArgs, y as EventKeyExtractor } from "./DefaultMonthEvent-CjwX3Nt1.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-
|
|
2
|
+
const require_MonthList = require("./MonthList-C-vBotP0.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-
|
|
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-DjAz4xoi.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.8.
|
|
3
|
+
"version": "2.8.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,7 +64,7 @@
|
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@super-calendar/core": "2.8.
|
|
67
|
+
"@super-calendar/core": "2.8.1"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@legendapp/list": ">=3",
|
|
@@ -553,6 +553,7 @@ export function Calendar<T>({
|
|
|
553
553
|
sortedMonthView={sortedMonthView}
|
|
554
554
|
moreLabel={moreLabel}
|
|
555
555
|
showAdjacentMonths={showAdjacentMonths}
|
|
556
|
+
highlightWeekends={highlightWeekends}
|
|
556
557
|
disableMonthEventCellPress={disableMonthEventCellPress}
|
|
557
558
|
isRTL={isRTL}
|
|
558
559
|
showSixWeeks={showSixWeeks}
|
|
@@ -101,6 +101,8 @@ export type MonthListProps<T> = {
|
|
|
101
101
|
moreLabel?: string;
|
|
102
102
|
/** Show dimmed adjacent-month days. Default false (each month shows only its own days). */
|
|
103
103
|
showAdjacentMonths?: boolean;
|
|
104
|
+
/** Tint weekend day cells with the theme's weekend background. Default true. */
|
|
105
|
+
highlightWeekends?: boolean;
|
|
104
106
|
disableMonthEventCellPress?: boolean;
|
|
105
107
|
isRTL?: boolean;
|
|
106
108
|
activeDate?: Date;
|
|
@@ -151,6 +153,7 @@ function MonthListInner<T>({
|
|
|
151
153
|
sortedMonthView,
|
|
152
154
|
moreLabel,
|
|
153
155
|
showAdjacentMonths = false,
|
|
156
|
+
highlightWeekends = true,
|
|
154
157
|
disableMonthEventCellPress,
|
|
155
158
|
isRTL,
|
|
156
159
|
activeDate,
|
|
@@ -463,6 +466,7 @@ function MonthListInner<T>({
|
|
|
463
466
|
sortedMonthView={sortedMonthView}
|
|
464
467
|
moreLabel={moreLabel}
|
|
465
468
|
showAdjacentMonths={showAdjacentMonths}
|
|
469
|
+
highlightWeekends={highlightWeekends}
|
|
466
470
|
disableMonthEventCellPress={disableMonthEventCellPress}
|
|
467
471
|
isRTL={isRTL}
|
|
468
472
|
activeDate={activeDate}
|
|
@@ -53,6 +53,7 @@ export type MonthPagerProps<T> = {
|
|
|
53
53
|
sortedMonthView?: boolean;
|
|
54
54
|
moreLabel?: string;
|
|
55
55
|
showAdjacentMonths?: boolean;
|
|
56
|
+
highlightWeekends?: boolean;
|
|
56
57
|
disableMonthEventCellPress?: boolean;
|
|
57
58
|
isRTL?: boolean;
|
|
58
59
|
calendarCellStyle?: (date: Date) => StyleProp<ViewStyle>;
|
|
@@ -85,6 +86,7 @@ function MonthPagerInner<T>({
|
|
|
85
86
|
sortedMonthView,
|
|
86
87
|
moreLabel,
|
|
87
88
|
showAdjacentMonths,
|
|
89
|
+
highlightWeekends,
|
|
88
90
|
disableMonthEventCellPress,
|
|
89
91
|
isRTL,
|
|
90
92
|
calendarCellStyle,
|
|
@@ -250,6 +252,7 @@ function MonthPagerInner<T>({
|
|
|
250
252
|
sortedMonthView={sortedMonthView}
|
|
251
253
|
moreLabel={moreLabel}
|
|
252
254
|
showAdjacentMonths={showAdjacentMonths}
|
|
255
|
+
highlightWeekends={highlightWeekends}
|
|
253
256
|
disableMonthEventCellPress={disableMonthEventCellPress}
|
|
254
257
|
isRTL={isRTL}
|
|
255
258
|
showSixWeeks={showSixWeeks}
|
|
@@ -136,6 +136,8 @@ export type MonthViewProps<T> = SlotStyleProps<MonthViewSlot> & {
|
|
|
136
136
|
moreLabel?: string;
|
|
137
137
|
/** Show dimmed days from adjacent months in the grid. Default true. */
|
|
138
138
|
showAdjacentMonths?: boolean;
|
|
139
|
+
/** Tint weekend day cells with the theme's weekend background. Default true. */
|
|
140
|
+
highlightWeekends?: boolean;
|
|
139
141
|
/** Ignore taps on month-cell events (day-cell taps still fire). Default false. */
|
|
140
142
|
disableMonthEventCellPress?: boolean;
|
|
141
143
|
/** Reverse the day order within each week (right-to-left). Default false. */
|
|
@@ -200,6 +202,7 @@ function MonthViewInner<T>({
|
|
|
200
202
|
sortedMonthView = true,
|
|
201
203
|
moreLabel = "{moreCount} More",
|
|
202
204
|
showAdjacentMonths = true,
|
|
205
|
+
highlightWeekends = true,
|
|
203
206
|
disableMonthEventCellPress = false,
|
|
204
207
|
isRTL = false,
|
|
205
208
|
showSixWeeks = false,
|
|
@@ -412,7 +415,7 @@ function MonthViewInner<T>({
|
|
|
412
415
|
borderRightWidth: StyleSheet.hairlineWidth,
|
|
413
416
|
borderColor: theme.colors.gridLine,
|
|
414
417
|
},
|
|
415
|
-
isWeekend(day) && { backgroundColor: theme.colors.weekendBackground },
|
|
418
|
+
highlightWeekends && isWeekend(day) && { backgroundColor: theme.colors.weekendBackground },
|
|
416
419
|
theme.containers.dayCell,
|
|
417
420
|
],
|
|
418
421
|
});
|