react-native-agenda-kit 0.1.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/LICENSE +21 -0
- package/README.md +364 -0
- package/lib/commonjs/agenda/AgendaBackdrop.js +68 -0
- package/lib/commonjs/agenda/AgendaBackdrop.js.map +1 -0
- package/lib/commonjs/agenda/AgendaList.js +354 -0
- package/lib/commonjs/agenda/AgendaList.js.map +1 -0
- package/lib/commonjs/agenda/AgendaSlot.js +88 -0
- package/lib/commonjs/agenda/AgendaSlot.js.map +1 -0
- package/lib/commonjs/agenda/AgendaWindow.js +171 -0
- package/lib/commonjs/agenda/AgendaWindow.js.map +1 -0
- package/lib/commonjs/agenda/StickyHeaderOverlay.js +125 -0
- package/lib/commonjs/agenda/StickyHeaderOverlay.js.map +1 -0
- package/lib/commonjs/agenda/buildAgendaLayout.js +100 -0
- package/lib/commonjs/agenda/buildAgendaLayout.js.map +1 -0
- package/lib/commonjs/agenda/constants.js +29 -0
- package/lib/commonjs/agenda/constants.js.map +1 -0
- package/lib/commonjs/agenda/heights.js +49 -0
- package/lib/commonjs/agenda/heights.js.map +1 -0
- package/lib/commonjs/agenda/useAgendaScrollSync.js +204 -0
- package/lib/commonjs/agenda/useAgendaScrollSync.js.map +1 -0
- package/lib/commonjs/core/ArrowGlyph.js +65 -0
- package/lib/commonjs/core/ArrowGlyph.js.map +1 -0
- package/lib/commonjs/core/CalendarContext.js +32 -0
- package/lib/commonjs/core/CalendarContext.js.map +1 -0
- package/lib/commonjs/core/CalendarProvider.js +141 -0
- package/lib/commonjs/core/CalendarProvider.js.map +1 -0
- package/lib/commonjs/core/CalendarStore.js +70 -0
- package/lib/commonjs/core/CalendarStore.js.map +1 -0
- package/lib/commonjs/core/KitText.js +23 -0
- package/lib/commonjs/core/KitText.js.map +1 -0
- package/lib/commonjs/core/TodayButton.js +136 -0
- package/lib/commonjs/core/TodayButton.js.map +1 -0
- package/lib/commonjs/core/civil.js +101 -0
- package/lib/commonjs/core/civil.js.map +1 -0
- package/lib/commonjs/core/dateKey.js +56 -0
- package/lib/commonjs/core/dateKey.js.map +1 -0
- package/lib/commonjs/core/motion.js +56 -0
- package/lib/commonjs/core/motion.js.map +1 -0
- package/lib/commonjs/core/worklets.js +44 -0
- package/lib/commonjs/core/worklets.js.map +1 -0
- package/lib/commonjs/expandable/DayCell.js +120 -0
- package/lib/commonjs/expandable/DayCell.js.map +1 -0
- package/lib/commonjs/expandable/ExpandableCalendar.js +280 -0
- package/lib/commonjs/expandable/ExpandableCalendar.js.map +1 -0
- package/lib/commonjs/expandable/Knob.js +72 -0
- package/lib/commonjs/expandable/Knob.js.map +1 -0
- package/lib/commonjs/expandable/MonthPager.js +180 -0
- package/lib/commonjs/expandable/MonthPager.js.map +1 -0
- package/lib/commonjs/expandable/WeekStrip.js +451 -0
- package/lib/commonjs/expandable/WeekStrip.js.map +1 -0
- package/lib/commonjs/expandable/calendarCells.js +152 -0
- package/lib/commonjs/expandable/calendarCells.js.map +1 -0
- package/lib/commonjs/expandable/geometry.js +62 -0
- package/lib/commonjs/expandable/geometry.js.map +1 -0
- package/lib/commonjs/expandable/useExpandGesture.js +124 -0
- package/lib/commonjs/expandable/useExpandGesture.js.map +1 -0
- package/lib/commonjs/expandable/useHorizontalPager.js +97 -0
- package/lib/commonjs/expandable/useHorizontalPager.js.map +1 -0
- package/lib/commonjs/index.js +167 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/theme/ThemeProvider.js +73 -0
- package/lib/commonjs/theme/ThemeProvider.js.map +1 -0
- package/lib/commonjs/theme/index.js +75 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/theme.js +79 -0
- package/lib/commonjs/theme/theme.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +54 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/timeline/DayColumn.js +95 -0
- package/lib/commonjs/timeline/DayColumn.js.map +1 -0
- package/lib/commonjs/timeline/DayPager.js +250 -0
- package/lib/commonjs/timeline/DayPager.js.map +1 -0
- package/lib/commonjs/timeline/EventBlock.js +91 -0
- package/lib/commonjs/timeline/EventBlock.js.map +1 -0
- package/lib/commonjs/timeline/GridLines.js +47 -0
- package/lib/commonjs/timeline/GridLines.js.map +1 -0
- package/lib/commonjs/timeline/HourGrid.js +96 -0
- package/lib/commonjs/timeline/HourGrid.js.map +1 -0
- package/lib/commonjs/timeline/NowIndicator.js +132 -0
- package/lib/commonjs/timeline/NowIndicator.js.map +1 -0
- package/lib/commonjs/timeline/TimelineDay.js +126 -0
- package/lib/commonjs/timeline/TimelineDay.js.map +1 -0
- package/lib/commonjs/timeline/packEvents.js +102 -0
- package/lib/commonjs/timeline/packEvents.js.map +1 -0
- package/lib/commonjs/timeline/timelineGeometry.js +27 -0
- package/lib/commonjs/timeline/timelineGeometry.js.map +1 -0
- package/lib/commonjs/timeline/timelineMath.js +82 -0
- package/lib/commonjs/timeline/timelineMath.js.map +1 -0
- package/lib/commonjs/types.js +71 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/agenda/AgendaBackdrop.js +63 -0
- package/lib/module/agenda/AgendaBackdrop.js.map +1 -0
- package/lib/module/agenda/AgendaList.js +349 -0
- package/lib/module/agenda/AgendaList.js.map +1 -0
- package/lib/module/agenda/AgendaSlot.js +84 -0
- package/lib/module/agenda/AgendaSlot.js.map +1 -0
- package/lib/module/agenda/AgendaWindow.js +167 -0
- package/lib/module/agenda/AgendaWindow.js.map +1 -0
- package/lib/module/agenda/StickyHeaderOverlay.js +120 -0
- package/lib/module/agenda/StickyHeaderOverlay.js.map +1 -0
- package/lib/module/agenda/buildAgendaLayout.js +95 -0
- package/lib/module/agenda/buildAgendaLayout.js.map +1 -0
- package/lib/module/agenda/constants.js +25 -0
- package/lib/module/agenda/constants.js.map +1 -0
- package/lib/module/agenda/heights.js +42 -0
- package/lib/module/agenda/heights.js.map +1 -0
- package/lib/module/agenda/useAgendaScrollSync.js +200 -0
- package/lib/module/agenda/useAgendaScrollSync.js.map +1 -0
- package/lib/module/core/ArrowGlyph.js +60 -0
- package/lib/module/core/ArrowGlyph.js.map +1 -0
- package/lib/module/core/CalendarContext.js +26 -0
- package/lib/module/core/CalendarContext.js.map +1 -0
- package/lib/module/core/CalendarProvider.js +136 -0
- package/lib/module/core/CalendarProvider.js.map +1 -0
- package/lib/module/core/CalendarStore.js +66 -0
- package/lib/module/core/CalendarStore.js.map +1 -0
- package/lib/module/core/KitText.js +19 -0
- package/lib/module/core/KitText.js.map +1 -0
- package/lib/module/core/TodayButton.js +133 -0
- package/lib/module/core/TodayButton.js.map +1 -0
- package/lib/module/core/civil.js +88 -0
- package/lib/module/core/civil.js.map +1 -0
- package/lib/module/core/dateKey.js +47 -0
- package/lib/module/core/dateKey.js.map +1 -0
- package/lib/module/core/motion.js +49 -0
- package/lib/module/core/motion.js.map +1 -0
- package/lib/module/core/worklets.js +38 -0
- package/lib/module/core/worklets.js.map +1 -0
- package/lib/module/expandable/DayCell.js +116 -0
- package/lib/module/expandable/DayCell.js.map +1 -0
- package/lib/module/expandable/ExpandableCalendar.js +275 -0
- package/lib/module/expandable/ExpandableCalendar.js.map +1 -0
- package/lib/module/expandable/Knob.js +67 -0
- package/lib/module/expandable/Knob.js.map +1 -0
- package/lib/module/expandable/MonthPager.js +175 -0
- package/lib/module/expandable/MonthPager.js.map +1 -0
- package/lib/module/expandable/WeekStrip.js +446 -0
- package/lib/module/expandable/WeekStrip.js.map +1 -0
- package/lib/module/expandable/calendarCells.js +142 -0
- package/lib/module/expandable/calendarCells.js.map +1 -0
- package/lib/module/expandable/geometry.js +58 -0
- package/lib/module/expandable/geometry.js.map +1 -0
- package/lib/module/expandable/useExpandGesture.js +118 -0
- package/lib/module/expandable/useExpandGesture.js.map +1 -0
- package/lib/module/expandable/useHorizontalPager.js +92 -0
- package/lib/module/expandable/useHorizontalPager.js.map +1 -0
- package/lib/module/index.js +35 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/theme/ThemeProvider.js +65 -0
- package/lib/module/theme/ThemeProvider.js.map +1 -0
- package/lib/module/theme/index.js +6 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/theme.js +74 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/theme/tokens.js +50 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/timeline/DayColumn.js +91 -0
- package/lib/module/timeline/DayColumn.js.map +1 -0
- package/lib/module/timeline/DayPager.js +245 -0
- package/lib/module/timeline/DayPager.js.map +1 -0
- package/lib/module/timeline/EventBlock.js +87 -0
- package/lib/module/timeline/EventBlock.js.map +1 -0
- package/lib/module/timeline/GridLines.js +43 -0
- package/lib/module/timeline/GridLines.js.map +1 -0
- package/lib/module/timeline/HourGrid.js +94 -0
- package/lib/module/timeline/HourGrid.js.map +1 -0
- package/lib/module/timeline/NowIndicator.js +126 -0
- package/lib/module/timeline/NowIndicator.js.map +1 -0
- package/lib/module/timeline/TimelineDay.js +122 -0
- package/lib/module/timeline/TimelineDay.js.map +1 -0
- package/lib/module/timeline/packEvents.js +97 -0
- package/lib/module/timeline/packEvents.js.map +1 -0
- package/lib/module/timeline/timelineGeometry.js +22 -0
- package/lib/module/timeline/timelineGeometry.js.map +1 -0
- package/lib/module/timeline/timelineMath.js +75 -0
- package/lib/module/timeline/timelineMath.js.map +1 -0
- package/lib/module/types.js +67 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaBackdrop.d.ts +20 -0
- package/lib/typescript/commonjs/agenda/AgendaBackdrop.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaList.d.ts +12 -0
- package/lib/typescript/commonjs/agenda/AgendaList.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaSlot.d.ts +45 -0
- package/lib/typescript/commonjs/agenda/AgendaSlot.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/AgendaWindow.d.ts +49 -0
- package/lib/typescript/commonjs/agenda/AgendaWindow.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/StickyHeaderOverlay.d.ts +39 -0
- package/lib/typescript/commonjs/agenda/StickyHeaderOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/buildAgendaLayout.d.ts +57 -0
- package/lib/typescript/commonjs/agenda/buildAgendaLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/constants.d.ts +19 -0
- package/lib/typescript/commonjs/agenda/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/heights.d.ts +20 -0
- package/lib/typescript/commonjs/agenda/heights.d.ts.map +1 -0
- package/lib/typescript/commonjs/agenda/useAgendaScrollSync.d.ts +44 -0
- package/lib/typescript/commonjs/agenda/useAgendaScrollSync.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/ArrowGlyph.d.ts +14 -0
- package/lib/typescript/commonjs/core/ArrowGlyph.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/CalendarContext.d.ts +35 -0
- package/lib/typescript/commonjs/core/CalendarContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/CalendarProvider.d.ts +41 -0
- package/lib/typescript/commonjs/core/CalendarProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/CalendarStore.d.ts +28 -0
- package/lib/typescript/commonjs/core/CalendarStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/KitText.d.ts +10 -0
- package/lib/typescript/commonjs/core/KitText.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/TodayButton.d.ts +18 -0
- package/lib/typescript/commonjs/core/TodayButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/civil.d.ts +26 -0
- package/lib/typescript/commonjs/core/civil.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/dateKey.d.ts +21 -0
- package/lib/typescript/commonjs/core/dateKey.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/motion.d.ts +18 -0
- package/lib/typescript/commonjs/core/motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/worklets.d.ts +12 -0
- package/lib/typescript/commonjs/core/worklets.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/DayCell.d.ts +22 -0
- package/lib/typescript/commonjs/expandable/DayCell.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/ExpandableCalendar.d.ts +40 -0
- package/lib/typescript/commonjs/expandable/ExpandableCalendar.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/Knob.d.ts +19 -0
- package/lib/typescript/commonjs/expandable/Knob.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/MonthPager.d.ts +35 -0
- package/lib/typescript/commonjs/expandable/MonthPager.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/WeekStrip.d.ts +34 -0
- package/lib/typescript/commonjs/expandable/WeekStrip.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/calendarCells.d.ts +52 -0
- package/lib/typescript/commonjs/expandable/calendarCells.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/geometry.d.ts +43 -0
- package/lib/typescript/commonjs/expandable/geometry.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/useExpandGesture.d.ts +35 -0
- package/lib/typescript/commonjs/expandable/useExpandGesture.d.ts.map +1 -0
- package/lib/typescript/commonjs/expandable/useHorizontalPager.d.ts +35 -0
- package/lib/typescript/commonjs/expandable/useHorizontalPager.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +26 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/theme/ThemeProvider.d.ts +27 -0
- package/lib/typescript/commonjs/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +4 -0
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/theme.d.ts +62 -0
- package/lib/typescript/commonjs/theme/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/tokens.d.ts +46 -0
- package/lib/typescript/commonjs/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/DayColumn.d.ts +32 -0
- package/lib/typescript/commonjs/timeline/DayColumn.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/DayPager.d.ts +32 -0
- package/lib/typescript/commonjs/timeline/DayPager.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/EventBlock.d.ts +17 -0
- package/lib/typescript/commonjs/timeline/EventBlock.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/GridLines.d.ts +5 -0
- package/lib/typescript/commonjs/timeline/GridLines.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/HourGrid.d.ts +12 -0
- package/lib/typescript/commonjs/timeline/HourGrid.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/NowIndicator.d.ts +28 -0
- package/lib/typescript/commonjs/timeline/NowIndicator.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/TimelineDay.d.ts +14 -0
- package/lib/typescript/commonjs/timeline/TimelineDay.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/packEvents.d.ts +25 -0
- package/lib/typescript/commonjs/timeline/packEvents.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/timelineGeometry.d.ts +14 -0
- package/lib/typescript/commonjs/timeline/timelineGeometry.d.ts.map +1 -0
- package/lib/typescript/commonjs/timeline/timelineMath.d.ts +32 -0
- package/lib/typescript/commonjs/timeline/timelineMath.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +237 -0
- package/lib/typescript/commonjs/types.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaBackdrop.d.ts +20 -0
- package/lib/typescript/module/agenda/AgendaBackdrop.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaList.d.ts +12 -0
- package/lib/typescript/module/agenda/AgendaList.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaSlot.d.ts +45 -0
- package/lib/typescript/module/agenda/AgendaSlot.d.ts.map +1 -0
- package/lib/typescript/module/agenda/AgendaWindow.d.ts +49 -0
- package/lib/typescript/module/agenda/AgendaWindow.d.ts.map +1 -0
- package/lib/typescript/module/agenda/StickyHeaderOverlay.d.ts +39 -0
- package/lib/typescript/module/agenda/StickyHeaderOverlay.d.ts.map +1 -0
- package/lib/typescript/module/agenda/buildAgendaLayout.d.ts +57 -0
- package/lib/typescript/module/agenda/buildAgendaLayout.d.ts.map +1 -0
- package/lib/typescript/module/agenda/constants.d.ts +19 -0
- package/lib/typescript/module/agenda/constants.d.ts.map +1 -0
- package/lib/typescript/module/agenda/heights.d.ts +20 -0
- package/lib/typescript/module/agenda/heights.d.ts.map +1 -0
- package/lib/typescript/module/agenda/useAgendaScrollSync.d.ts +44 -0
- package/lib/typescript/module/agenda/useAgendaScrollSync.d.ts.map +1 -0
- package/lib/typescript/module/core/ArrowGlyph.d.ts +14 -0
- package/lib/typescript/module/core/ArrowGlyph.d.ts.map +1 -0
- package/lib/typescript/module/core/CalendarContext.d.ts +35 -0
- package/lib/typescript/module/core/CalendarContext.d.ts.map +1 -0
- package/lib/typescript/module/core/CalendarProvider.d.ts +41 -0
- package/lib/typescript/module/core/CalendarProvider.d.ts.map +1 -0
- package/lib/typescript/module/core/CalendarStore.d.ts +28 -0
- package/lib/typescript/module/core/CalendarStore.d.ts.map +1 -0
- package/lib/typescript/module/core/KitText.d.ts +10 -0
- package/lib/typescript/module/core/KitText.d.ts.map +1 -0
- package/lib/typescript/module/core/TodayButton.d.ts +18 -0
- package/lib/typescript/module/core/TodayButton.d.ts.map +1 -0
- package/lib/typescript/module/core/civil.d.ts +26 -0
- package/lib/typescript/module/core/civil.d.ts.map +1 -0
- package/lib/typescript/module/core/dateKey.d.ts +21 -0
- package/lib/typescript/module/core/dateKey.d.ts.map +1 -0
- package/lib/typescript/module/core/motion.d.ts +18 -0
- package/lib/typescript/module/core/motion.d.ts.map +1 -0
- package/lib/typescript/module/core/worklets.d.ts +12 -0
- package/lib/typescript/module/core/worklets.d.ts.map +1 -0
- package/lib/typescript/module/expandable/DayCell.d.ts +22 -0
- package/lib/typescript/module/expandable/DayCell.d.ts.map +1 -0
- package/lib/typescript/module/expandable/ExpandableCalendar.d.ts +40 -0
- package/lib/typescript/module/expandable/ExpandableCalendar.d.ts.map +1 -0
- package/lib/typescript/module/expandable/Knob.d.ts +19 -0
- package/lib/typescript/module/expandable/Knob.d.ts.map +1 -0
- package/lib/typescript/module/expandable/MonthPager.d.ts +35 -0
- package/lib/typescript/module/expandable/MonthPager.d.ts.map +1 -0
- package/lib/typescript/module/expandable/WeekStrip.d.ts +34 -0
- package/lib/typescript/module/expandable/WeekStrip.d.ts.map +1 -0
- package/lib/typescript/module/expandable/calendarCells.d.ts +52 -0
- package/lib/typescript/module/expandable/calendarCells.d.ts.map +1 -0
- package/lib/typescript/module/expandable/geometry.d.ts +43 -0
- package/lib/typescript/module/expandable/geometry.d.ts.map +1 -0
- package/lib/typescript/module/expandable/useExpandGesture.d.ts +35 -0
- package/lib/typescript/module/expandable/useExpandGesture.d.ts.map +1 -0
- package/lib/typescript/module/expandable/useHorizontalPager.d.ts +35 -0
- package/lib/typescript/module/expandable/useHorizontalPager.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +26 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/theme/ThemeProvider.d.ts +27 -0
- package/lib/typescript/module/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +4 -0
- package/lib/typescript/module/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/theme/theme.d.ts +62 -0
- package/lib/typescript/module/theme/theme.d.ts.map +1 -0
- package/lib/typescript/module/theme/tokens.d.ts +46 -0
- package/lib/typescript/module/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/module/timeline/DayColumn.d.ts +32 -0
- package/lib/typescript/module/timeline/DayColumn.d.ts.map +1 -0
- package/lib/typescript/module/timeline/DayPager.d.ts +32 -0
- package/lib/typescript/module/timeline/DayPager.d.ts.map +1 -0
- package/lib/typescript/module/timeline/EventBlock.d.ts +17 -0
- package/lib/typescript/module/timeline/EventBlock.d.ts.map +1 -0
- package/lib/typescript/module/timeline/GridLines.d.ts +5 -0
- package/lib/typescript/module/timeline/GridLines.d.ts.map +1 -0
- package/lib/typescript/module/timeline/HourGrid.d.ts +12 -0
- package/lib/typescript/module/timeline/HourGrid.d.ts.map +1 -0
- package/lib/typescript/module/timeline/NowIndicator.d.ts +28 -0
- package/lib/typescript/module/timeline/NowIndicator.d.ts.map +1 -0
- package/lib/typescript/module/timeline/TimelineDay.d.ts +14 -0
- package/lib/typescript/module/timeline/TimelineDay.d.ts.map +1 -0
- package/lib/typescript/module/timeline/packEvents.d.ts +25 -0
- package/lib/typescript/module/timeline/packEvents.d.ts.map +1 -0
- package/lib/typescript/module/timeline/timelineGeometry.d.ts +14 -0
- package/lib/typescript/module/timeline/timelineGeometry.d.ts.map +1 -0
- package/lib/typescript/module/timeline/timelineMath.d.ts +32 -0
- package/lib/typescript/module/timeline/timelineMath.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +237 -0
- package/lib/typescript/module/types.d.ts.map +1 -0
- package/package.json +105 -0
- package/src/agenda/AgendaBackdrop.tsx +55 -0
- package/src/agenda/AgendaList.tsx +370 -0
- package/src/agenda/AgendaSlot.tsx +88 -0
- package/src/agenda/AgendaWindow.tsx +183 -0
- package/src/agenda/StickyHeaderOverlay.tsx +126 -0
- package/src/agenda/buildAgendaLayout.ts +110 -0
- package/src/agenda/constants.ts +22 -0
- package/src/agenda/heights.ts +44 -0
- package/src/agenda/useAgendaScrollSync.ts +251 -0
- package/src/core/ArrowGlyph.tsx +53 -0
- package/src/core/CalendarContext.ts +47 -0
- package/src/core/CalendarProvider.tsx +165 -0
- package/src/core/CalendarStore.ts +64 -0
- package/src/core/KitText.tsx +10 -0
- package/src/core/TodayButton.tsx +121 -0
- package/src/core/civil.ts +92 -0
- package/src/core/dateKey.ts +52 -0
- package/src/core/motion.ts +51 -0
- package/src/core/worklets.ts +37 -0
- package/src/expandable/DayCell.tsx +97 -0
- package/src/expandable/ExpandableCalendar.tsx +278 -0
- package/src/expandable/Knob.tsx +67 -0
- package/src/expandable/MonthPager.tsx +208 -0
- package/src/expandable/WeekStrip.tsx +439 -0
- package/src/expandable/calendarCells.ts +155 -0
- package/src/expandable/geometry.ts +51 -0
- package/src/expandable/useExpandGesture.ts +147 -0
- package/src/expandable/useHorizontalPager.ts +116 -0
- package/src/index.ts +62 -0
- package/src/theme/ThemeProvider.tsx +85 -0
- package/src/theme/index.ts +18 -0
- package/src/theme/theme.ts +110 -0
- package/src/theme/tokens.ts +50 -0
- package/src/timeline/DayColumn.tsx +84 -0
- package/src/timeline/DayPager.tsx +295 -0
- package/src/timeline/EventBlock.tsx +76 -0
- package/src/timeline/GridLines.tsx +36 -0
- package/src/timeline/HourGrid.tsx +90 -0
- package/src/timeline/NowIndicator.tsx +123 -0
- package/src/timeline/TimelineDay.tsx +112 -0
- package/src/timeline/packEvents.ts +118 -0
- package/src/timeline/timelineGeometry.ts +23 -0
- package/src/timeline/timelineMath.ts +86 -0
- package/src/types.ts +252 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MonthPager = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
|
+
var _CalendarContext = require("../core/CalendarContext.js");
|
|
11
|
+
var _dateKey = require("../core/dateKey.js");
|
|
12
|
+
var _calendarCells = require("./calendarCells.js");
|
|
13
|
+
var _DayCell = require("./DayCell.js");
|
|
14
|
+
var _geometry = require("./geometry.js");
|
|
15
|
+
var _useHorizontalPager = require("./useHorizontalPager.js");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
/**
|
|
19
|
+
* The open calendar: one month per page across the selectable window.
|
|
20
|
+
*
|
|
21
|
+
* Selection is the COMMITTED date as a plain prop, handed only to the page that
|
|
22
|
+
* holds it, so a commit re-renders at most two pages and two memo'd cells.
|
|
23
|
+
*
|
|
24
|
+
* Mounted pages derive from that same committed date. Closed, only its month
|
|
25
|
+
* exists: the layer is invisible, and every month crossing commits a date. Open,
|
|
26
|
+
* its two neighbours join so a swipe shows one; a swipe that lands commits the
|
|
27
|
+
* new month, which re-centres the window. A screen reader pages by scroll
|
|
28
|
+
* actions, so it gets every month. Moves page the pager instantly even while
|
|
29
|
+
* closed, so opening shows the right month.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const GRID_HEIGHT = _geometry.MAX_WEEKS * _geometry.WEEK_ROW_HEIGHT;
|
|
33
|
+
const MonthGrid = /*#__PURE__*/(0, _react.memo)(({
|
|
34
|
+
page,
|
|
35
|
+
width,
|
|
36
|
+
lefts,
|
|
37
|
+
gridStart,
|
|
38
|
+
weeks,
|
|
39
|
+
rawPageByIndex,
|
|
40
|
+
labels,
|
|
41
|
+
a11yLabels,
|
|
42
|
+
dots,
|
|
43
|
+
selectedIndex,
|
|
44
|
+
todayIndex,
|
|
45
|
+
minIndex,
|
|
46
|
+
maxIndex,
|
|
47
|
+
onDayPress
|
|
48
|
+
}) => {
|
|
49
|
+
const cells = [];
|
|
50
|
+
for (let r = 0; r < weeks; r += 1) {
|
|
51
|
+
for (let c = 0; c < 7; c += 1) {
|
|
52
|
+
const i = gridStart + r * 7 + c;
|
|
53
|
+
// Days of the neighbouring months are blank, as the library's `hideExtraDays` draws them.
|
|
54
|
+
if (i < 0 || i >= labels.length || rawPageByIndex[i] !== page) continue;
|
|
55
|
+
cells.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_DayCell.DayCell, {
|
|
56
|
+
dayIndex: i,
|
|
57
|
+
label: labels[i],
|
|
58
|
+
accessibilityLabel: a11yLabels?.[i],
|
|
59
|
+
left: lefts[c],
|
|
60
|
+
top: r * _geometry.WEEK_ROW_HEIGHT + _geometry.WEEK_ROW_V_MARGIN,
|
|
61
|
+
isToday: i === todayIndex,
|
|
62
|
+
isDisabled: i < minIndex || i > maxIndex,
|
|
63
|
+
isSelected: i === selectedIndex,
|
|
64
|
+
dot: dots[i],
|
|
65
|
+
onPress: onDayPress
|
|
66
|
+
}, i));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
70
|
+
style: [styles.grid, {
|
|
71
|
+
left: page * width,
|
|
72
|
+
width
|
|
73
|
+
}],
|
|
74
|
+
children: cells
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
MonthGrid.displayName = 'MonthGrid';
|
|
78
|
+
const MonthPagerInner = ({
|
|
79
|
+
width,
|
|
80
|
+
lefts,
|
|
81
|
+
pages,
|
|
82
|
+
pagesSV,
|
|
83
|
+
labels,
|
|
84
|
+
a11yLabels,
|
|
85
|
+
dots,
|
|
86
|
+
selectedIndex,
|
|
87
|
+
initialPage,
|
|
88
|
+
visiblePage,
|
|
89
|
+
onDayPress,
|
|
90
|
+
animatedStyle,
|
|
91
|
+
isOpen,
|
|
92
|
+
screenReader
|
|
93
|
+
}) => {
|
|
94
|
+
const {
|
|
95
|
+
range,
|
|
96
|
+
setDate
|
|
97
|
+
} = (0, _CalendarContext.useCalendarContext)();
|
|
98
|
+
|
|
99
|
+
/** A swipe landed on another month: select its first selectable day. */
|
|
100
|
+
const onMonthSettled = (0, _react.useCallback)(page => {
|
|
101
|
+
setDate((0, _dateKey.ymdAt)(range, (0, _dateKey.clampIndex)(range, pages.monthStartByPage[page])), 'pageScroll', 'month');
|
|
102
|
+
}, [pages, range, setDate]);
|
|
103
|
+
const pageOf = (0, _react.useCallback)(idx => {
|
|
104
|
+
'worklet';
|
|
105
|
+
|
|
106
|
+
return (0, _calendarCells.pageOfIndex)(pagesSV.value, idx);
|
|
107
|
+
}, [pagesSV]);
|
|
108
|
+
const pager = (0, _useHorizontalPager.useHorizontalPager)({
|
|
109
|
+
width,
|
|
110
|
+
initialPage,
|
|
111
|
+
origin: 'month',
|
|
112
|
+
pageOf,
|
|
113
|
+
page: visiblePage,
|
|
114
|
+
onSettled: onMonthSettled
|
|
115
|
+
});
|
|
116
|
+
const interactive = isOpen || screenReader;
|
|
117
|
+
const committed = (0, _calendarCells.pageOfIndex)(pages, (0, _dateKey.clampIndex)(range, selectedIndex));
|
|
118
|
+
const reach = isOpen ? 1 : 0;
|
|
119
|
+
const first = screenReader ? 0 : Math.max(0, committed - reach);
|
|
120
|
+
const last = screenReader ? pages.count - 1 : Math.min(pages.count - 1, committed + reach);
|
|
121
|
+
const grids = [];
|
|
122
|
+
for (let p = first; p <= last; p += 1) {
|
|
123
|
+
grids.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(MonthGrid, {
|
|
124
|
+
page: p,
|
|
125
|
+
width: width,
|
|
126
|
+
lefts: lefts,
|
|
127
|
+
gridStart: pages.gridStartByPage[p],
|
|
128
|
+
weeks: pages.weeksByPage[p],
|
|
129
|
+
rawPageByIndex: pages.rawPageByIndex,
|
|
130
|
+
labels: labels,
|
|
131
|
+
a11yLabels: a11yLabels,
|
|
132
|
+
dots: dots,
|
|
133
|
+
selectedIndex: pages.rawPageByIndex[selectedIndex] === p ? selectedIndex : -1,
|
|
134
|
+
todayIndex: range.todayIndex,
|
|
135
|
+
minIndex: range.minIndex,
|
|
136
|
+
maxIndex: range.maxIndex,
|
|
137
|
+
onDayPress: onDayPress
|
|
138
|
+
}, p));
|
|
139
|
+
}
|
|
140
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
141
|
+
pointerEvents: interactive ? 'auto' : 'none',
|
|
142
|
+
style: [styles.root, {
|
|
143
|
+
width
|
|
144
|
+
}, animatedStyle],
|
|
145
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView, {
|
|
146
|
+
ref: pager.ref,
|
|
147
|
+
horizontal: true,
|
|
148
|
+
pagingEnabled: true,
|
|
149
|
+
showsHorizontalScrollIndicator: false,
|
|
150
|
+
scrollEnabled: interactive,
|
|
151
|
+
onScroll: pager.onScroll,
|
|
152
|
+
scrollEventThrottle: _useHorizontalPager.PAGER_SCROLL_THROTTLE,
|
|
153
|
+
contentOffset: pager.contentOffset,
|
|
154
|
+
onLayout: pager.onLayout,
|
|
155
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
156
|
+
style: {
|
|
157
|
+
width: pages.count * width,
|
|
158
|
+
height: GRID_HEIGHT
|
|
159
|
+
},
|
|
160
|
+
children: grids
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
const MonthPager = exports.MonthPager = /*#__PURE__*/(0, _react.memo)(MonthPagerInner);
|
|
166
|
+
MonthPager.displayName = 'MonthPager';
|
|
167
|
+
const styles = _reactNative.StyleSheet.create({
|
|
168
|
+
root: {
|
|
169
|
+
position: 'absolute',
|
|
170
|
+
top: 0,
|
|
171
|
+
left: 0,
|
|
172
|
+
height: GRID_HEIGHT
|
|
173
|
+
},
|
|
174
|
+
grid: {
|
|
175
|
+
position: 'absolute',
|
|
176
|
+
top: 0,
|
|
177
|
+
height: GRID_HEIGHT
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
//# sourceMappingURL=MonthPager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_CalendarContext","_dateKey","_calendarCells","_DayCell","_geometry","_useHorizontalPager","_jsxRuntime","e","__esModule","default","GRID_HEIGHT","MAX_WEEKS","WEEK_ROW_HEIGHT","MonthGrid","memo","page","width","lefts","gridStart","weeks","rawPageByIndex","labels","a11yLabels","dots","selectedIndex","todayIndex","minIndex","maxIndex","onDayPress","cells","r","c","i","length","push","jsx","DayCell","dayIndex","label","accessibilityLabel","left","top","WEEK_ROW_V_MARGIN","isToday","isDisabled","isSelected","dot","onPress","View","style","styles","grid","children","displayName","MonthPagerInner","pages","pagesSV","initialPage","visiblePage","animatedStyle","isOpen","screenReader","range","setDate","useCalendarContext","onMonthSettled","useCallback","ymdAt","clampIndex","monthStartByPage","pageOf","idx","pageOfIndex","value","pager","useHorizontalPager","origin","onSettled","interactive","committed","reach","first","Math","max","last","count","min","grids","p","gridStartByPage","weeksByPage","pointerEvents","root","ScrollView","ref","horizontal","pagingEnabled","showsHorizontalScrollIndicator","scrollEnabled","onScroll","scrollEventThrottle","PAGER_SCROLL_THROTTLE","contentOffset","onLayout","height","MonthPager","exports","StyleSheet","create","position"],"sourceRoot":"../../../src","sources":["expandable/MonthPager.tsx"],"mappings":";;;;;;AAcA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AAAiF,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAtBjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,MAAMG,WAAW,GAAGC,mBAAS,GAAGC,yBAAe;AAqB/C,MAAMC,SAAS,gBAAG,IAAAC,WAAI,E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AE9F;EAAY,CAAC;EACpEyC,IAAI,EAAE;IAAE0D,QAAQ,EAAE,UAAU;IAAEpE,GAAG,EAAE,CAAC;IAAE+D,MAAM,EAAE9F;EAAY;AAC5D,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.WeekStrip = void 0;
|
|
7
|
+
var _index = require("../theme/index.js");
|
|
8
|
+
var _tokens = require("../theme/tokens.js");
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
13
|
+
var _reactNativeWorklets = require("react-native-worklets");
|
|
14
|
+
var _CalendarContext = require("../core/CalendarContext.js");
|
|
15
|
+
var _dateKey = require("../core/dateKey.js");
|
|
16
|
+
var _KitText = require("../core/KitText.js");
|
|
17
|
+
var _motion = require("../core/motion.js");
|
|
18
|
+
var _calendarCells = require("./calendarCells.js");
|
|
19
|
+
var _geometry = require("./geometry.js");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
22
|
+
/**
|
|
23
|
+
* The closed calendar: a vertical TAPE of weeks seen through a one-row window.
|
|
24
|
+
*
|
|
25
|
+
* Every week is a row stacked in one `Animated.View`; the window clips it and
|
|
26
|
+
* `weekPos` translates it, so crossing into the next week slides the tape up and
|
|
27
|
+
* crossing back slides it down — the owner's Teams reference (2026-09-11). A move
|
|
28
|
+
* of more than a week jumps: the agenda jumps too, and a slide through months
|
|
29
|
+
* would read as a blur.
|
|
30
|
+
*
|
|
31
|
+
* Selection is TWO pills riding the tape: the new day's fades in while the old
|
|
32
|
+
* day's fades out, on the UI thread, with no React commit. Each pill shows its
|
|
33
|
+
* day through one non-editable TextInput (`text` is an animated prop —
|
|
34
|
+
* Reanimated's own `PerformanceMonitor` idiom) and one dot for a marked day.
|
|
35
|
+
*
|
|
36
|
+
* Alternate months sit on a canvas band and a 1st carries its month's short name,
|
|
37
|
+
* so a month edge shows inside a week. A horizontal swipe moves one week.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
const AnimatedTextInput = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.TextInput);
|
|
41
|
+
const DOT_INSET = (_geometry.DAY_CELL - _geometry.DOT_SIZE) / 2;
|
|
42
|
+
/** Where DayCell's flow puts the dot, from the cell top: text margin, the declared line box, the dot's own margin. */
|
|
43
|
+
const DOT_TOP = _geometry.DAY_TEXT_MARGIN_TOP + _geometry.DAY_LINE_HEIGHT + _geometry.DOT_MARGIN_TOP;
|
|
44
|
+
/** How far a 1st's number and dot sit below every other day's. */
|
|
45
|
+
const FIRST_SHIFT = _geometry.FIRST_OF_MONTH_TEXT_TOP - _geometry.DAY_TEXT_MARGIN_TOP;
|
|
46
|
+
const WeekRow = /*#__PURE__*/(0, _react.memo)(({
|
|
47
|
+
week,
|
|
48
|
+
width,
|
|
49
|
+
lefts,
|
|
50
|
+
labels,
|
|
51
|
+
ordinals,
|
|
52
|
+
monthShortLabels,
|
|
53
|
+
dots,
|
|
54
|
+
todayIndex,
|
|
55
|
+
minIndex,
|
|
56
|
+
maxIndex,
|
|
57
|
+
onDayPress
|
|
58
|
+
}) => {
|
|
59
|
+
const styles = (0, _index.useKitStyles)(makeStyles);
|
|
60
|
+
const start = week * 7;
|
|
61
|
+
const cells = [];
|
|
62
|
+
|
|
63
|
+
// Months with an even ordinal (Jan, Mar … Nov) take the band. A week holds at
|
|
64
|
+
// most two months, so its banded days are one run.
|
|
65
|
+
let bandFrom = -1;
|
|
66
|
+
let bandTo = -1;
|
|
67
|
+
for (let col = 0; col < 7 && start + col < labels.length; col += 1) {
|
|
68
|
+
if ((ordinals[start + col] & 1) === 0) {
|
|
69
|
+
if (bandFrom < 0) bandFrom = col;
|
|
70
|
+
bandTo = col;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (bandFrom >= 0) {
|
|
74
|
+
const left = bandFrom === 0 ? 0 : (0, _calendarCells.columnEdge)(width, bandFrom);
|
|
75
|
+
const right = bandTo === 6 ? width : (0, _calendarCells.columnEdge)(width, bandTo + 1);
|
|
76
|
+
cells.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
77
|
+
style: [styles.band, {
|
|
78
|
+
left,
|
|
79
|
+
width: right - left
|
|
80
|
+
}]
|
|
81
|
+
}, "band"));
|
|
82
|
+
}
|
|
83
|
+
for (let col = 0; col < 7; col += 1) {
|
|
84
|
+
const i = start + col;
|
|
85
|
+
if (i >= labels.length) break;
|
|
86
|
+
const left = lefts[col];
|
|
87
|
+
const first = monthShortLabels !== undefined && labels[i] === '1';
|
|
88
|
+
const tone = i < minIndex || i > maxIndex ? styles.labelDisabled : i === todayIndex ? styles.labelToday : null;
|
|
89
|
+
if (first) {
|
|
90
|
+
cells.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_KitText.KitText, {
|
|
91
|
+
style: [styles.monthLabel, {
|
|
92
|
+
left
|
|
93
|
+
}],
|
|
94
|
+
children: monthShortLabels?.[ordinals[i] % 12]
|
|
95
|
+
}, `m${i}`));
|
|
96
|
+
}
|
|
97
|
+
cells.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_KitText.KitText, {
|
|
98
|
+
style: [first ? styles.labelFirst : styles.label, {
|
|
99
|
+
left
|
|
100
|
+
}, tone],
|
|
101
|
+
children: labels[i]
|
|
102
|
+
}, `t${i}`));
|
|
103
|
+
const dot = dots[i];
|
|
104
|
+
if (dot !== null) {
|
|
105
|
+
cells.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
106
|
+
style: [first ? styles.dotFirst : styles.dot, {
|
|
107
|
+
left: left + DOT_INSET
|
|
108
|
+
}, dot ? {
|
|
109
|
+
backgroundColor: dot
|
|
110
|
+
} : styles.dotDefault]
|
|
111
|
+
}, `d${i}`));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// One Pressable per row; the column comes from the touch's x. `locationX` is
|
|
116
|
+
// relative to the view the finger lands on, so labels must not be hit-testable
|
|
117
|
+
// (they were, and every tap resolved to column 0).
|
|
118
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
119
|
+
style: [styles.row, {
|
|
120
|
+
top: week * _geometry.WEEK_ROW_HEIGHT,
|
|
121
|
+
width
|
|
122
|
+
}],
|
|
123
|
+
onPress: e => onDayPress(start + (0, _calendarCells.columnAt)(width, e.nativeEvent.locationX)),
|
|
124
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
125
|
+
pointerEvents: "none",
|
|
126
|
+
style: _reactNative.StyleSheet.absoluteFill,
|
|
127
|
+
children: cells
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
WeekRow.displayName = 'WeekRow';
|
|
132
|
+
const SelectionPill = /*#__PURE__*/(0, _react.memo)(({
|
|
133
|
+
index,
|
|
134
|
+
fade,
|
|
135
|
+
leavingFrom,
|
|
136
|
+
widthSV,
|
|
137
|
+
labels,
|
|
138
|
+
hasDot,
|
|
139
|
+
firstOfMonth
|
|
140
|
+
}) => {
|
|
141
|
+
const styles = (0, _index.useKitStyles)(makeStyles);
|
|
142
|
+
const frame = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
143
|
+
const i = index.value;
|
|
144
|
+
return {
|
|
145
|
+
opacity: leavingFrom === null ? fade.value : leavingFrom.value * (1 - fade.value),
|
|
146
|
+
transform: [{
|
|
147
|
+
translateX: (0, _calendarCells.cellLeft)(widthSV.value, i % 7)
|
|
148
|
+
}, {
|
|
149
|
+
translateY: Math.floor(i / 7) * _geometry.WEEK_ROW_HEIGHT
|
|
150
|
+
}]
|
|
151
|
+
};
|
|
152
|
+
});
|
|
153
|
+
const content = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
154
|
+
transform: [{
|
|
155
|
+
translateY: firstOfMonth[index.value] ? FIRST_SHIFT : 0
|
|
156
|
+
}]
|
|
157
|
+
}));
|
|
158
|
+
const labelProps = (0, _reactNativeReanimated.useAnimatedProps)(() => {
|
|
159
|
+
const text = labels[index.value] ?? '';
|
|
160
|
+
return {
|
|
161
|
+
text,
|
|
162
|
+
defaultValue: text
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
const dotStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
166
|
+
opacity: hasDot[index.value] ? 1 : 0
|
|
167
|
+
}));
|
|
168
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
169
|
+
pointerEvents: "none",
|
|
170
|
+
style: [styles.pill, frame],
|
|
171
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
172
|
+
style: [styles.pillContent, content],
|
|
173
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedTextInput, {
|
|
174
|
+
animatedProps: labelProps,
|
|
175
|
+
editable: false,
|
|
176
|
+
pointerEvents: "none",
|
|
177
|
+
caretHidden: true,
|
|
178
|
+
contextMenuHidden: true,
|
|
179
|
+
allowFontScaling: false,
|
|
180
|
+
maxFontSizeMultiplier: 1,
|
|
181
|
+
underlineColorAndroid: "transparent",
|
|
182
|
+
accessible: false,
|
|
183
|
+
importantForAccessibility: "no",
|
|
184
|
+
style: styles.pillLabel
|
|
185
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
186
|
+
style: [styles.pillDot, dotStyle]
|
|
187
|
+
})]
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
SelectionPill.displayName = 'SelectionPill';
|
|
192
|
+
const WeekStripInner = ({
|
|
193
|
+
width,
|
|
194
|
+
lefts,
|
|
195
|
+
labels,
|
|
196
|
+
ordinals,
|
|
197
|
+
monthShortLabels,
|
|
198
|
+
dots,
|
|
199
|
+
onDayPress,
|
|
200
|
+
animatedStyle,
|
|
201
|
+
interactive
|
|
202
|
+
}) => {
|
|
203
|
+
const styles = (0, _index.useKitStyles)(makeStyles);
|
|
204
|
+
const {
|
|
205
|
+
range,
|
|
206
|
+
store,
|
|
207
|
+
dateRef,
|
|
208
|
+
setDate,
|
|
209
|
+
reduceMotion
|
|
210
|
+
} = (0, _CalendarContext.useCalendarContext)();
|
|
211
|
+
const {
|
|
212
|
+
dayIndex
|
|
213
|
+
} = store;
|
|
214
|
+
const weekCount = range.days / 7;
|
|
215
|
+
const [initialIndex] = (0, _react.useState)(() => (0, _dateKey.clampIndex)(range, (0, _dateKey.dayIndexOf)(range, dateRef.current)));
|
|
216
|
+
const weekPos = (0, _reactNativeReanimated.useSharedValue)(Math.floor(initialIndex / 7));
|
|
217
|
+
/** The week the tape is headed to: a day crossing inside it must not restart the slide. */
|
|
218
|
+
const weekTarget = (0, _reactNativeReanimated.useSharedValue)(Math.floor(initialIndex / 7));
|
|
219
|
+
const current = (0, _reactNativeReanimated.useSharedValue)(initialIndex);
|
|
220
|
+
const previous = (0, _reactNativeReanimated.useSharedValue)(initialIndex);
|
|
221
|
+
const fade = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
222
|
+
/** The leaving pill's opacity when it began to leave, so a change mid-fade does not pop it to full. */
|
|
223
|
+
const leavingFrom = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
224
|
+
const widthSV = (0, _reactNativeReanimated.useSharedValue)(width);
|
|
225
|
+
(0, _react.useEffect)(() => {
|
|
226
|
+
widthSV.value = width;
|
|
227
|
+
}, [width, widthSV]);
|
|
228
|
+
const slide = (0, _motion.kitDuration)(_tokens.ANIMATION.slow, reduceMotion);
|
|
229
|
+
const crossfade = (0, _motion.kitDuration)(_tokens.ANIMATION.base, reduceMotion);
|
|
230
|
+
(0, _reactNativeReanimated.useAnimatedReaction)(() => dayIndex.value, (idx, last) => {
|
|
231
|
+
if (idx === last) return;
|
|
232
|
+
const week = Math.floor(idx / 7);
|
|
233
|
+
if (last === null) {
|
|
234
|
+
weekPos.value = week;
|
|
235
|
+
weekTarget.value = week;
|
|
236
|
+
current.value = idx;
|
|
237
|
+
previous.value = idx;
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (week !== weekTarget.value) {
|
|
241
|
+
const far = Math.abs(week - weekPos.value) > 1.5;
|
|
242
|
+
weekTarget.value = week;
|
|
243
|
+
weekPos.value = far || slide === 0 ? week : (0, _reactNativeReanimated.withTiming)(week, {
|
|
244
|
+
duration: slide,
|
|
245
|
+
easing: _motion.KIT_EASING
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
leavingFrom.value = fade.value;
|
|
249
|
+
previous.value = current.value;
|
|
250
|
+
current.value = idx;
|
|
251
|
+
fade.value = crossfade === 0 ? 1 : (0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withTiming)(0, {
|
|
252
|
+
duration: 0
|
|
253
|
+
}), (0, _reactNativeReanimated.withTiming)(1, {
|
|
254
|
+
duration: crossfade,
|
|
255
|
+
easing: _motion.KIT_EASING
|
|
256
|
+
}));
|
|
257
|
+
}, [crossfade, slide]);
|
|
258
|
+
|
|
259
|
+
/** A swipe asked for `week`: select its first selectable day, unless the range ends before it. */
|
|
260
|
+
const onSwipe = (0, _react.useCallback)(week => {
|
|
261
|
+
const target = (0, _dateKey.clampIndex)(range, week * 7);
|
|
262
|
+
if (Math.floor(target / 7) !== week) return;
|
|
263
|
+
setDate((0, _dateKey.ymdAt)(range, target), 'weekScroll', 'week');
|
|
264
|
+
}, [range, setDate]);
|
|
265
|
+
|
|
266
|
+
// `failOffsetY` hands a vertical drag to the calendar's expand pan, whose own
|
|
267
|
+
// `failOffsetX(±12)` hands a horizontal one to this.
|
|
268
|
+
const swipe = (0, _react.useMemo)(() => _reactNativeGestureHandler.Gesture.Pan().enabled(interactive).activeOffsetX([-16, 16]).failOffsetY([-10, 10]).onEnd(e => {
|
|
269
|
+
'worklet';
|
|
270
|
+
|
|
271
|
+
const dx = Math.abs(e.translationX) >= _geometry.PAN_THRESHOLD ? e.translationX : Math.abs(e.velocityX) >= _geometry.SNAP_VELOCITY ? e.velocityX : 0;
|
|
272
|
+
if (dx === 0) return;
|
|
273
|
+
(0, _reactNativeWorklets.runOnJS)(onSwipe)(Math.floor(dayIndex.value / 7) + (dx < 0 ? 1 : -1));
|
|
274
|
+
}), [dayIndex, interactive, onSwipe]);
|
|
275
|
+
|
|
276
|
+
// Plain arrays captured by the worklets: one table read per day crossing.
|
|
277
|
+
const hasDot = (0, _react.useMemo)(() => dots.map(d => d !== null), [dots]);
|
|
278
|
+
const firstOfMonth = (0, _react.useMemo)(() => labels.map(label => monthShortLabels !== undefined && label === '1'), [labels, monthShortLabels]);
|
|
279
|
+
const rows = (0, _react.useMemo)(() => {
|
|
280
|
+
const out = [];
|
|
281
|
+
for (let w = 0; w < weekCount; w += 1) {
|
|
282
|
+
out.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(WeekRow, {
|
|
283
|
+
week: w,
|
|
284
|
+
width: width,
|
|
285
|
+
lefts: lefts,
|
|
286
|
+
labels: labels,
|
|
287
|
+
ordinals: ordinals,
|
|
288
|
+
monthShortLabels: monthShortLabels,
|
|
289
|
+
dots: dots,
|
|
290
|
+
todayIndex: range.todayIndex,
|
|
291
|
+
minIndex: range.minIndex,
|
|
292
|
+
maxIndex: range.maxIndex,
|
|
293
|
+
onDayPress: onDayPress
|
|
294
|
+
}, w));
|
|
295
|
+
}
|
|
296
|
+
return out;
|
|
297
|
+
}, [dots, labels, lefts, monthShortLabels, onDayPress, ordinals, range, weekCount, width]);
|
|
298
|
+
const tapeStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
299
|
+
transform: [{
|
|
300
|
+
translateY: -weekPos.value * _geometry.WEEK_ROW_HEIGHT
|
|
301
|
+
}]
|
|
302
|
+
}));
|
|
303
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
|
|
304
|
+
gesture: swipe,
|
|
305
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
306
|
+
pointerEvents: interactive ? 'auto' : 'none',
|
|
307
|
+
style: [styles.root, {
|
|
308
|
+
width
|
|
309
|
+
}, animatedStyle],
|
|
310
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
311
|
+
style: [styles.tape, {
|
|
312
|
+
width,
|
|
313
|
+
height: weekCount * _geometry.WEEK_ROW_HEIGHT
|
|
314
|
+
}, tapeStyle],
|
|
315
|
+
children: [rows, /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectionPill, {
|
|
316
|
+
index: previous,
|
|
317
|
+
fade: fade,
|
|
318
|
+
leavingFrom: leavingFrom,
|
|
319
|
+
widthSV: widthSV,
|
|
320
|
+
labels: labels,
|
|
321
|
+
hasDot: hasDot,
|
|
322
|
+
firstOfMonth: firstOfMonth
|
|
323
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectionPill, {
|
|
324
|
+
index: current,
|
|
325
|
+
fade: fade,
|
|
326
|
+
leavingFrom: null,
|
|
327
|
+
widthSV: widthSV,
|
|
328
|
+
labels: labels,
|
|
329
|
+
hasDot: hasDot,
|
|
330
|
+
firstOfMonth: firstOfMonth
|
|
331
|
+
})]
|
|
332
|
+
})
|
|
333
|
+
})
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
const WeekStrip = exports.WeekStrip = /*#__PURE__*/(0, _react.memo)(WeekStripInner);
|
|
337
|
+
WeekStrip.displayName = 'WeekStrip';
|
|
338
|
+
const makeStyles = ({
|
|
339
|
+
colors,
|
|
340
|
+
fonts
|
|
341
|
+
}) => {
|
|
342
|
+
const text = {
|
|
343
|
+
position: 'absolute',
|
|
344
|
+
width: _geometry.DAY_CELL,
|
|
345
|
+
textAlign: 'center',
|
|
346
|
+
fontFamily: fonts.regular,
|
|
347
|
+
fontSize: _tokens.FONT_SIZE.sm,
|
|
348
|
+
lineHeight: _geometry.DAY_LINE_HEIGHT
|
|
349
|
+
};
|
|
350
|
+
const dot = {
|
|
351
|
+
position: 'absolute',
|
|
352
|
+
width: _geometry.DOT_SIZE,
|
|
353
|
+
height: _geometry.DOT_SIZE,
|
|
354
|
+
borderRadius: _tokens.RADIUS.full
|
|
355
|
+
};
|
|
356
|
+
return _reactNative.StyleSheet.create({
|
|
357
|
+
root: {
|
|
358
|
+
position: 'absolute',
|
|
359
|
+
top: 0,
|
|
360
|
+
left: 0,
|
|
361
|
+
height: _geometry.WEEK_ROW_HEIGHT,
|
|
362
|
+
overflow: 'hidden',
|
|
363
|
+
backgroundColor: colors.surface
|
|
364
|
+
},
|
|
365
|
+
tape: {
|
|
366
|
+
position: 'absolute',
|
|
367
|
+
top: 0,
|
|
368
|
+
left: 0
|
|
369
|
+
},
|
|
370
|
+
row: {
|
|
371
|
+
position: 'absolute',
|
|
372
|
+
left: 0,
|
|
373
|
+
height: _geometry.WEEK_ROW_HEIGHT
|
|
374
|
+
},
|
|
375
|
+
// A month's ground, alternating with the strip's own: it carries the month edge: it carries the month edge.
|
|
376
|
+
band: {
|
|
377
|
+
position: 'absolute',
|
|
378
|
+
top: 0,
|
|
379
|
+
height: _geometry.WEEK_ROW_HEIGHT,
|
|
380
|
+
backgroundColor: colors.canvas
|
|
381
|
+
},
|
|
382
|
+
label: {
|
|
383
|
+
...text,
|
|
384
|
+
top: _geometry.WEEK_ROW_V_MARGIN + _geometry.DAY_TEXT_MARGIN_TOP,
|
|
385
|
+
color: colors.text
|
|
386
|
+
},
|
|
387
|
+
labelFirst: {
|
|
388
|
+
...text,
|
|
389
|
+
top: _geometry.WEEK_ROW_V_MARGIN + _geometry.FIRST_OF_MONTH_TEXT_TOP,
|
|
390
|
+
color: colors.text
|
|
391
|
+
},
|
|
392
|
+
labelToday: {
|
|
393
|
+
color: colors.accent
|
|
394
|
+
},
|
|
395
|
+
labelDisabled: {
|
|
396
|
+
color: colors.textMuted
|
|
397
|
+
},
|
|
398
|
+
// Metadata: the muted tier, at the 11 px legibility floor.
|
|
399
|
+
monthLabel: {
|
|
400
|
+
position: 'absolute',
|
|
401
|
+
width: _geometry.DAY_CELL,
|
|
402
|
+
textAlign: 'center',
|
|
403
|
+
top: _geometry.WEEK_ROW_V_MARGIN + _geometry.MONTH_LABEL_TOP,
|
|
404
|
+
fontFamily: fonts.regular,
|
|
405
|
+
fontSize: _tokens.FONT_SIZE.xxs,
|
|
406
|
+
lineHeight: _geometry.MONTH_LABEL_LINE_HEIGHT,
|
|
407
|
+
color: colors.textMuted
|
|
408
|
+
},
|
|
409
|
+
dot: {
|
|
410
|
+
...dot,
|
|
411
|
+
top: _geometry.WEEK_ROW_V_MARGIN + DOT_TOP
|
|
412
|
+
},
|
|
413
|
+
dotFirst: {
|
|
414
|
+
...dot,
|
|
415
|
+
top: _geometry.WEEK_ROW_V_MARGIN + DOT_TOP + FIRST_SHIFT
|
|
416
|
+
},
|
|
417
|
+
dotDefault: {
|
|
418
|
+
backgroundColor: colors.accent
|
|
419
|
+
},
|
|
420
|
+
pill: {
|
|
421
|
+
position: 'absolute',
|
|
422
|
+
top: _geometry.WEEK_ROW_V_MARGIN,
|
|
423
|
+
left: 0,
|
|
424
|
+
width: _geometry.DAY_CELL,
|
|
425
|
+
height: _geometry.DAY_CELL,
|
|
426
|
+
borderRadius: _tokens.RADIUS.full,
|
|
427
|
+
// Active selection — the calendar's one accent fill: one accent, nowhere else.
|
|
428
|
+
backgroundColor: colors.accentFill
|
|
429
|
+
},
|
|
430
|
+
pillContent: {
|
|
431
|
+
..._reactNative.StyleSheet.absoluteFillObject
|
|
432
|
+
},
|
|
433
|
+
// A TextInput sits where a Text does only with Android's padding and font padding zeroed.
|
|
434
|
+
pillLabel: {
|
|
435
|
+
...text,
|
|
436
|
+
top: _geometry.DAY_TEXT_MARGIN_TOP,
|
|
437
|
+
left: 0,
|
|
438
|
+
height: _geometry.DAY_LINE_HEIGHT,
|
|
439
|
+
padding: 0,
|
|
440
|
+
includeFontPadding: false,
|
|
441
|
+
color: colors.onAccentFill
|
|
442
|
+
},
|
|
443
|
+
pillDot: {
|
|
444
|
+
...dot,
|
|
445
|
+
top: DOT_TOP,
|
|
446
|
+
left: DOT_INSET,
|
|
447
|
+
backgroundColor: colors.onAccentFill
|
|
448
|
+
}
|
|
449
|
+
});
|
|
450
|
+
};
|
|
451
|
+
//# sourceMappingURL=WeekStrip.js.map
|